1/** 2 * Minified by jsDelivr using Terser v5.39.0. 3 * Original file: /npm/@vue-flow/[email protected]/dist/vue-flow-core.iife.js 4 * 5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 */ 7var VueFlowCore=function(e,t){"use strict";function n(e){return!!t.getCurrentScope()&&(t.onScopeDispose(e),!0)}function o(e){return"function"==typeof e?e():t.unref(e)}const r="undefined"!=typeof window&&"undefined"!=typeof document,i=Object.prototype.toString,a=()=>{};const l=e=>e();function u(e,t=!1,n="Timeout"){return new Promise(((o,r)=>{t?setTimeout((()=>r(n)),e):setTimeout(o,e)}))}function s(e,n,o={}){const{eventFilter:r=l,...i}=o;return t.watch(e,(a=r,u=n,function(...e){return new Promise(((t,n)=>{Promise.resolve(a((()=>u.apply(this,e)),{fn:u,thisArg:this,args:e})).then(t).catch(n)}))}),i);var a,u}function c(e,n,o={}){const{eventFilter:r,...i}=o,{eventFilter:a,pause:u,resume:c,isActive:d}=function(e=l){const n=t.ref(!0);return{isActive:t.readonly(n),pause:function(){n.value=!1},resume:function(){n.value=!0},eventFilter:(...t)=>{n.value&&e(...t)}}}(r);return{stop:s(e,n,{...i,eventFilter:a}),pause:u,resume:c,isActive:d}}function d(e,n={}){if(!t.isRef(e))return t.toRefs(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const i in e.value)r[i]=t.customRef((()=>({get:()=>e.value[i],set(t){var r;if(null==(r=o(n.replaceRef))||r)if(Array.isArray(e.value)){const n=[...e.value];n[i]=t,e.value=n}else{const n={...e.value,[i]:t};Object.setPrototypeOf(n,Object.getPrototypeOf(e.value)),e.value=n}else e.value[i]=t}})));return r}function f(e,n=!1){function r(r,{flush:i="sync",deep:a=!1,timeout:l,throwOnTimeout:s}={}){let c=null;const d=[new Promise((o=>{c=t.watch(e,(e=>{r(e)!==n&&(null==c||c(),o(e))}),{flush:i,deep:a,immediate:!0})}))];return null!=l&&d.push(u(l,s).then((()=>o(e))).finally((()=>null==c?void 0:c()))),Promise.race(d)}function i(i,a){if(!t.isRef(i))return r((e=>e===i),a);const{flush:l="sync",deep:s=!1,timeout:c,throwOnTimeout:d}=null!=a?a:{};let f=null;const h=[new Promise((o=>{f=t.watch([e,i],(([e,t])=>{n!==(e===t)&&(null==f||f(),o(e))}),{flush:l,deep:s,immediate:!0})}))];return null!=c&&h.push(u(c,d).then((()=>o(e))).finally((()=>(null==f||f(),o(e))))),Promise.race(h)}function a(e){return l(1,e)}function l(e=1,t){let n=-1;return r((()=>(n+=1,n>=e)),t)}if(Array.isArray(o(e))){return{toMatch:r,toContains:function(e,t){return r((t=>{const n=Array.from(t);return n.includes(e)||n.includes(o(e))}),t)},changed:a,changedTimes:l,get not(){return f(e,!n)}}}return{toMatch:r,toBe:i,toBeTruthy:function(e){return r((e=>Boolean(e)),e)},toBeNull:function(e){return i(null,e)},toBeNaN:function(e){return r(Number.isNaN,e)},toBeUndefined:function(e){return i(void 0,e)},changed:a,changedTimes:l,get not(){return f(e,!n)}}}function h(e){return f(e)}function p(e){var t;const n=o(e);return null!=(t=null==n?void 0:n.$el)?t:n}const v=r?window:void 0;function g(...e){let r,l,u,s;if("string"==typeof e[0]||Array.isArray(e[0])?([l,u,s]=e,r=v):[r,l,u,s]=e,!r)return a;Array.isArray(l)||(l=[l]),Array.isArray(u)||(u=[u]);const c=[],d=()=>{c.forEach((e=>e())),c.length=0},f=t.watch((()=>[p(r),o(s)]),(([e,t])=>{if(d(),!e)return;const n=(o=t,"[object Object]"===i.call(o)?{...t}:t);var o;c.push(...l.flatMap((t=>u.map((o=>((e,t,n,o)=>(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)))(e,t,o,n))))))}),{immediate:!0,flush:"post"}),h=()=>{f(),d()};return n(h),h}function m(...e){let t,n,r={};3===e.length?(t=e[0],n=e[1],r=e[2]):2===e.length?"object"==typeof e[1]?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=v,eventName:a="keydown",passive:l=!1,dedupe:u=!1}=r,s="function"==typeof(c=t)?c:"string"==typeof c?e=>e.key===c:Array.isArray(c)?e=>c.includes(e.key):()=>!0;var c;return g(i,a,(e=>{e.repeat&&o(u)||s(e)&&n(e)}),l)}function y(e,n,o,r={}){var i,a,l;const{clone:u=!1,passive:s=!1,eventName:c,deep:d=!1,defaultValue:f,shouldEmit:h}=r,p=t.getCurrentInstance(),v=o||(null==p?void 0:p.emit)||(null==(i=null==p?void 0:p.$emit)?void 0:i.bind(p))||(null==(l=null==(a=null==p?void 0:p.proxy)?void 0:a.$emit)?void 0:l.bind(null==p?void 0:p.proxy));let g=c;n||(n="modelValue"),g=g||`update:${n.toString()}`;const m=e=>{return u?"function"==typeof u?u(e):(t=e,JSON.parse(JSON.stringify(t))):e;var t},y=()=>void 0!==e[n]?m(e[n]):f,w=e=>{h?h(e)&&v(g,e):v(g,e)};if(s){const o=y(),r=t.ref(o);let i=!1;return t.watch((()=>e[n]),(e=>{i||(i=!0,r.value=m(e),t.nextTick((()=>i=!1)))})),t.watch(r,(t=>
vendor: 4,367 bytes, line 7
7{i||t===e[n]&&!d||w(t)}),{deep:d}),r}return t.computed({get:()=>y(),set(e){w(e)}})}var w={value:()=>{}};function x(){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 b(o)}function b(e){this._=e}function E(e,t){for(var n,o=0,r=e.length;o<r;++o)if((n=e[o]).name===t)return n.value}function _(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=w,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}b.prototype=x.prototype={constructor:b,on:function(e,t){var n,o,r=this._,i=(o=r,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!o.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,l=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<l;)if(n=(e=i[a]).type)r[n]=_(r[n],e.name,t);else if(null==t)for(n in r)r[n]=_(r[n],e.name,null);return this}for(;++a<l;)if((n=(e=i[a]).type)&&(n=E(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new b(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,o,r=new Array(n),i=0;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(o=this._[e]).length;i<n;++i)o[i].value.apply(t,r)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};var S="http://www.w3.org/1999/xhtml";const N={svg:"http://www.w3.org/2000/svg",xhtml:S,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function k(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),N.hasOwnProperty(t)?{space:N[t],local:e}:e}function C(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===S&&t.documentElement.namespaceURI===S?t.createElement(e):t.createElementNS(n,e)}}function M(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function I(e){var t=k(e);return(t.local?M:C)(t)}function P(){}function T(e){return null==e?P:function(){return this.querySelector(e)}}function B(){return[]}function D(e){return null==e?B:function(){return this.querySelectorAll(e)}}function A(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function O(e){return function(){return this.matches(e)}}function $(e){return function(t){return t.matches(e)}}var V=Array.prototype.find;function z(){return this.firstElementChild}var R=Array.prototype.filter;function L(){return Array.from(this.children)}function H(e){return new Array(e.length)}function Y(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function F(e,t,n,o,r,i){for(var a,l=0,u=t.length,s=i.length;l<s;++l)(a=t[l])?(a.__data__=i[l],o[l]=a):n[l]=new Y(e,i[l]);for(;l<u;++l)(a=t[l])&&(r[l]=a)}function G(e,t,n,o,r,i,a){var l,u,s,c=new Map,d=t.length,f=i.length,h=new Array(d);for(l=0;l<d;++l)(u=t[l])&&(h[l]=s=a.call(u,u.__data__,l,t)+"",c.has(s)?r[l]=u:c.set(s,u));for(l=0;l<f;++l)s=a.call(e,i[l],l,i)+"",(u=c.get(s))?(o[l]=u,u.__data__=i[l],c.delete(s)):n[l]=new Y(e,i[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(h[l])===u&&(r[l]=u)}function X(e){return e.__data__}function U(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function j(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Z(e){return function(){this.removeAttribute(e)}}function K(e){return function(){this.removeAttributeNS(e.space,e.local)}}function W(e,t){return function(){this.setAttribute(e,t)}}function q(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function J(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Q(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 ee(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function te(e){return function(){this.style.removeProperty(e)}}function ne(e,t,n){return function(){this.style.setProperty(e,t,n)}}
vendor: 5,896 bytes, line 7
7function oe(e,t,n){return function(){var o=t.apply(this,arguments);null==o?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function re(e,t){return e.style.getPropertyValue(t)||ee(e).getComputedStyle(e,null).getPropertyValue(t)}function ie(e){return function(){delete this[e]}}function ae(e,t){return function(){this[e]=t}}function le(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function ue(e){return e.trim().split(/^|\s+/)}function se(e){return e.classList||new ce(e)}function ce(e){this._node=e,this._names=ue(e.getAttribute("class")||"")}function de(e,t){for(var n=se(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function fe(e,t){for(var n=se(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function he(e){return function(){de(this,e)}}function pe(e){return function(){fe(this,e)}}function ve(e,t){return function(){(t.apply(this,arguments)?de:fe)(this,e)}}function ge(){this.textContent=""}function me(e){return function(){this.textContent=e}}function ye(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function we(){this.innerHTML=""}function xe(e){return function(){this.innerHTML=e}}function be(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Ee(){this.nextSibling&&this.parentNode.appendChild(this)}function _e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Se(){return null}function Ne(){var e=this.parentNode;e&&e.removeChild(this)}function ke(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ce(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Me(e){return function(){var t=this.__on;if(t){for(var n,o=0,r=-1,i=t.length;o<i;++o)n=t[o],e.type&&n.type!==e.type||n.name!==e.name?t[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?t.length=r:delete this.__on}}}function Ie(e,t,n){return function(){var o,r=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(r)for(var a=0,l=r.length;a<l;++a)if((o=r[a]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),void(o.value=t);this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Pe(e,t,n){var o=ee(e),r=o.CustomEvent;"function"==typeof r?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Te(e,t){return function(){return Pe(this,e,t)}}function Be(e,t){return function(){return Pe(this,e,t.apply(this,arguments))}}Y.prototype={constructor:Y,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)}},ce.prototype={add:function(e){this._names.indexOf(e)<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 De=[null];function Ae(e,t){this._groups=e,this._parents=t}function Oe(){return new Ae([[document.documentElement]],De)}function $e(e){return"string"==typeof e?new Ae([[document.querySelector(e)]],[document.documentElement]):new Ae([[e]],De)}function Ve(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(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())).x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}Ae.prototype=Oe.prototype={constructor:Ae,select:function(e){"function"!=typeof e&&(e=T(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i,a,l=t[r],u=l.length,s=o[r]=new Array(u),c=0;c<u;++c)(i=l[c])&&(a=e.call(i,i.__data__,c,l))&&("__data__"in i&&(a.__data__=i.__data__),s[c]=a);return new Ae(o,this._parents)},selectAll:function(e){e="function"==typeof e?A(e):D(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a,l=t[i],u=l.length,s=0;s<u;++s)(a=l[s])&&(o.push(e.call(a,a.__data__,s,l)),r.push(a));return new Ae(o,r)},selectChild:function(e){return this.select(null==e?z:function(e){return function(){return V.call(this.children,e)}}("function"==typeof e?e:$(e)))},selectChildren:function(e){return this.selectAll(null==e?L:function(e){return function(){return R.call(this.children,e)}}("function"==typeof e?e:$(e)))},filter:function(e){"function"!=typeof e&&(e=O(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i,a=t[r],l=a.length,u=o[r]=[],s=0;s<l;++s)(i=a[s])&&e.call(i,i.__data__,s,a)&&u.push(i);return new Ae(o,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,X);var n,o=t?G:F,r=this._parents,i=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=i.length,l=new Array(a),u=new Array(a),s=new Array(a),c=0;c<a;++c){var d=r[c],f=i[c],h=f.length,p=U(e.call(d,d&&d.__data__,c,r)),v=p.length,g=u[c]=new Array(v),m=l[c]=new Array(v);o(d,f,g,m,s[c]=new Array(h),p,t);for(var y,w,x=0,b=0;x<v;++x)if(y=g[x]){for(x>=b&&(b=x+1);!(w=m[b])&&++b<v;);y._next=w||null}}return(l=new Ae(l,r))._enter=u,l._exit=s,l},enter:function(){return new Ae(this._enter||this._groups.map(H),this._parents)},exit:function(){return new Ae(this._exit||this._groups.map(H),this._parents)},join:function(e,t,n){var o=this.enter(),r=this,i=this.exit();
vendor: 9,168 bytes, line 7
7return"function"==typeof e?(o=e(o))&&(o=o.selection()):o=o.append(e+""),null!=t&&(r=t(r))&&(r=r.selection()),null==n?i.remove():n(i),o&&r?o.merge(r).order():r},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),l=new Array(r),u=0;u<a;++u)for(var s,c=n[u],d=o[u],f=c.length,h=l[u]=new Array(f),p=0;p<f;++p)(s=c[p]||d[p])&&(h[p]=s);for(;u<r;++u)l[u]=n[u];return new Ae(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o,r=e[t],i=r.length-1,a=r[i];--i>=0;)(o=r[i])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=j);for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a,l=n[i],u=l.length,s=r[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(s[c]=a);s.sort(t)}return new Ae(r,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r,i=t[n],a=0,l=i.length;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this},attr:function(e,t){var n=k(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?K:Z:"function"==typeof t?n.local?Q:J:n.local?q:W)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?te:"function"==typeof t?oe:ne)(e,t,null==n?"":n)):re(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ie:"function"==typeof t?le:ae)(e,t)):this.node()[e]},classed:function(e,t){var n=ue(e+"");if(arguments.length<2){for(var o=se(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each(("function"==typeof t?ve:t?he:pe)(n,t))},text:function(e){return arguments.length?this.each(null==e?ge:("function"==typeof e?ye:me)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?we:("function"==typeof e?be:xe)(e)):this.node().innerHTML},raise:function(){return this.each(Ee)},lower:function(){return this.each(_e)},append:function(e){var t="function"==typeof e?e:I(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:I(e),o=null==t?Se:"function"==typeof t?t:T(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(Ne)},clone:function(e){return this.select(e?Ce:ke)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var o,r,i=function(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}}))}(e+""),a=i.length;if(!(arguments.length<2)){for(l=t?Ie:Me,o=0;o<a;++o)this.each(l(i[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((r=i[o]).type===u.type&&r.name===u.name)return u.value},dispatch:function(e,t){return this.each(("function"==typeof t?Be:Te)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o,r=e[t],i=0,a=r.length;i<a;++i)(o=r[i])&&(yield o)}};const ze={passive:!1},Re={capture:!0,passive:!1};function Le(e){e.stopImmediatePropagation()}function He(e){e.preventDefault(),e.stopImmediatePropagation()}function Ye(e){var t=e.document.documentElement,n=$e(e).on("dragstart.drag",He,Re);"onselectstart"in t?n.on("selectstart.drag",He,Re):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fe(e,t){var n=e.document.documentElement,o=$e(e).on("dragstart.drag",null);t&&(o.on("click.drag",He,Re),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 Ge=e=>()=>e;function Xe(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,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:r,enumerable:!0,configurable:!0},active:{value:i,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 Ue(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Ze(e,t){return null==t?{x:e.x,y:e.y}:t}function Ke(){return navigator.maxTouchPoints||"ontouchstart"in this}function We(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qe(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Je(){}Xe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Qe=.7,et=1/Qe,tt="\\s*([+-]?\\d+)\\s*",nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ot="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rt=/^#([0-9a-f]{3,8})$/,it=new RegExp(`^rgb\\(${tt},${tt},${tt}\\)$`),at=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),lt=new RegExp(`^rgba\\(${tt},${tt},${tt},${nt}\\)$`),ut=new RegExp(`^rgba\\(${ot},${ot},${ot},${nt}\\)$`),st=new RegExp(`^hsl\\(${nt},${ot},${ot}\\)$`),ct=new RegExp(`^hsla\\(${nt},${ot},${ot},${nt}\\)$`),dt={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 ft(){return this.rgb().formatHex()}function ht(){return this.rgb().formatRgb()}function pt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?vt(t):3===n?new yt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gt(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=it.exec(e))?new yt(t[1],t[2],t[3],1):(t=at.exec(e))?new yt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=lt.exec(e))?gt(t[1],t[2],t[3],t[4]):(t=ut.exec(e))?gt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=st.exec(e))?
vendor: 6,291 bytes, line 7
7St(t[1],t[2]/100,t[3]/100,1):(t=ct.exec(e))?St(t[1],t[2]/100,t[3]/100,t[4]):dt.hasOwnProperty(e)?vt(dt[e]):"transparent"===e?new yt(NaN,NaN,NaN,0):null}function vt(e){return new yt(e>>16&255,e>>8&255,255&e,1)}function gt(e,t,n,o){return o<=0&&(e=t=n=NaN),new yt(e,t,n,o)}function mt(e,t,n,o){return 1===arguments.length?((r=e)instanceof Je||(r=pt(r)),r?new yt((r=r.rgb()).r,r.g,r.b,r.opacity):new yt):new yt(e,t,n,null==o?1:o);var r}function yt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function wt(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function xt(){const e=bt(this.opacity);return`${1===e?"rgb(":"rgba("}${Et(this.r)}, ${Et(this.g)}, ${Et(this.b)}${1===e?")":`, ${e})`}`}function bt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Et(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return((e=Et(e))<16?"0":"")+e.toString(16)}function St(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,n,o)}function Nt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof Je||(e=pt(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,l=i-r,u=(i+r)/2;return l?(a=t===i?(n-o)/l+6*(n<o):n===i?(o-t)/l+2:(t-n)/l+4,l/=u<.5?i+r:2-i-r,a*=60):l=u>0&&u<1?0:a,new kt(a,l,u,e.opacity)}function kt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function Ct(e){return(e=(e||0)%360)<0?e+360:e}function Mt(e){return Math.max(0,Math.min(1,e||0))}function It(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}We(Je,pt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ft,formatHex:ft,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Nt(this).formatHsl()},formatRgb:ht,toString:ht}),We(yt,mt,qe(Je,{brighter(e){return e=null==e?et:Math.pow(et,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Qe:Math.pow(Qe,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(Et(this.r),Et(this.g),Et(this.b),bt(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:wt,formatHex:wt,formatHex8:function(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xt,toString:xt})),We(kt,(function(e,t,n,o){return 1===arguments.length?Nt(e):new kt(e,t,n,null==o?1:o)}),qe(Je,{brighter(e){return e=null==e?et:Math.pow(et,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Qe:Math.pow(Qe,e),new kt(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,r=2*n-o;return new yt(It(e>=240?e-240:e+120,r,o),It(e,r,o),It(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new kt(Ct(this.h),Mt(this.s),Mt(this.l),bt(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=bt(this.opacity);return`${1===e?"hsl(":"hsla("}${Ct(this.h)}, ${100*Mt(this.s)}%, ${100*Mt(this.l)}%${1===e?")":`, ${e})`}`}}));const Pt=e=>()=>e;function Tt(e){return 1==(e=+e)?Bt:function(t,n){return n-t?function(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)}}(t,n,e):Pt(isNaN(t)?n:t)}}function Bt(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Pt(isNaN(e)?t:e)}const Dt=function e(t){var n=Tt(t);function o(e,t){var o=n((e=mt(e)).r,(t=mt(t)).r),r=n(e.g,t.g),i=n(e.b,t.b),a=Bt(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function At(e,t){t||(t=[]);var n,o=e?Math.min(t.length,e.length):0,r=t.slice();return function(i){for(n=0;n<o;++n)r[n]=e[n]*(1-i)+t[n]*i;return r}}function Ot(e,t){var n,o=t?t.length:0,r=e?Math.min(o,e.length):0,i=new Array(r),a=new Array(o);for(n=0;n<r;++n)i[n]=Yt(e[n],t[n]);for(;n<o;++n)a[n]=t[n];return function(e){for(n=0;n<r;++n)a[n]=i[n](e);return a}}function $t(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Vt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zt(e,t){var n,o={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?o[n]=Yt(e[n],t[n]):r[n]=t[n];return function(e){for(n in o)r[n]=o[n](e);return r}}var Rt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lt=new RegExp(Rt.source,"g");function Ht(e,t){var n,o,r,i=Rt.lastIndex=Lt.lastIndex=0,a=-1,l=[],u=[];for(e+="",t+="";(n=Rt.exec(e))&&(o=Lt.exec(t));)(r=o.index)>i&&(r=t.slice(i,r),l[a]?l[a]+=r:l[++a]=r),(n=n[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,u.push({i:a,x:Vt(n,o)})),i=Lt.lastIndex;return i<t.length&&(r=t.slice(i),l[a]?l[a]+=r:l[++a]=r),l.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(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 Yt(e,t){var n,o,r=typeof t;return null==t||"boolean"===r?Pt(t):("number"===r?Vt:"string"===r?(n=pt(t))?(t=n,Dt):Ht:t instanceof pt?Dt:t instanceof Date?$t:(o=t,!ArrayBuffer.isView(o)||o instanceof DataView?Array.isArray(t)?Ot:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?zt:Vt:At))(e,t)}var Ft,Gt=180/Math.PI,Xt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ut(e,t,n,o,r,i){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:r,translateY:i,rotate:Math.atan2(t,e)*Gt,skewX:Math.atan(u)*Gt,scaleX:a,scaleY:l}}function jt(e,t,n,o){function r(e){return e.length?e.pop()+" ":""}return function(i,a){var l=[],u=[];return i=e(i),a=e(a),function(e,o,r,i,a,l){if(e!==r||o!==i){var u=a.push("translate(",null,t,null,n);l.push({i:u-4,x:Vt(e,r)},{i:u-2,x:Vt(o,i)})}else(r||i)&&a.push("translate("+r+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,u),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(r(n)+"rotate(",null,o)-2,x:Vt(e,t)}
vendor: 5,813 bytes, line 7
7)):t&&n.push(r(n)+"rotate("+t+o)}(i.rotate,a.rotate,l,u),function(e,t,n,i){e!==t?i.push({i:n.push(r(n)+"skewX(",null,o)-2,x:Vt(e,t)}):t&&n.push(r(n)+"skewX("+t+o)}(i.skewX,a.skewX,l,u),function(e,t,n,o,i,a){if(e!==n||t!==o){var l=i.push(r(i)+"scale(",null,",",null,")");a.push({i:l-4,x:Vt(e,n)},{i:l-2,x:Vt(t,o)})}else 1===n&&1===o||i.push(r(i)+"scale("+n+","+o+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,u),i=a=null,function(e){for(var t,n=-1,o=u.length;++n<o;)l[(t=u[n]).i]=t.x(e);return l.join("")}}}var Zt=jt((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Xt:Ut(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Kt=jt((function(e){return null==e?Xt:(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",e),(e=Ft.transform.baseVal.consolidate())?Ut((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Xt)}),", ",")",")");function Wt(e){return((e=Math.exp(e))+1/e)/2}const qt=function e(t,n,o){function r(e,r){var i,a,l=e[0],u=e[1],s=e[2],c=r[0],d=r[1],f=r[2],h=c-l,p=d-u,v=h*h+p*p;if(v<1e-12)a=Math.log(f/s)/t,i=function(e){return[l+e*h,u+e*p,s*Math.exp(t*e*a)]};else{var g=Math.sqrt(v),m=(f*f-s*s+o*v)/(2*s*n*g),y=(f*f-s*s-o*v)/(2*f*n*g),w=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(y*y+1)-y);a=(x-w)/t,i=function(e){var o,r=e*a,i=Wt(w),c=s/(n*g)*(i*(o=t*r+w,((o=Math.exp(2*o))-1)/(o+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w));return[l+c*h,u+c*p,s*i/Wt(t*r+w)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return r.rho=function(t){var n=Math.max(.001,+t),o=n*n;return e(n,o,o*o)},r}(Math.SQRT2,2,4);var Jt,Qt,en=0,tn=0,nn=0,on=0,rn=0,an=0,ln="object"==typeof performance&&performance.now?performance:Date,un="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function sn(){return rn||(un(cn),rn=ln.now()+an)}function cn(){rn=0}function dn(){this._call=this._time=this._next=null}function fn(e,t,n){var o=new dn;return o.restart(e,t,n),o}function hn(){rn=(on=ln.now())+an,en=tn=0;try{!function(){sn(),++en;for(var e,t=Jt;t;)(e=rn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--en}()}finally{en=0,function(){var e,t,n=Jt,o=1/0;for(;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:Jt=t);Qt=e,vn(o)}(),rn=0}}function pn(){var e=ln.now(),t=e-on;t>1e3&&(an-=t,on=e)}function vn(e){en||(tn&&(tn=clearTimeout(tn)),e-rn>24?(e<1/0&&(tn=setTimeout(hn,e-ln.now()-an)),nn&&(nn=clearInterval(nn))):(nn||(on=ln.now(),nn=setInterval(pn,1e3)),en=1,un(hn)))}function gn(e,t,n){var o=new dn;return t=null==t?0:+t,o.restart((n=>{o.stop(),e(n+t)}),t,n),o}dn.prototype=fn.prototype={constructor:dn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?sn():+n)+(null==t?0:+t),this._next||Qt===this||(Qt?Qt._next=this:Jt=this,Qt=this),this._call=e,this._time=n,vn()},stop:function(){this._call&&(this._call=null,this._time=1/0,vn())}};var mn=x("start","end","cancel","interrupt"),yn=[];function wn(e,t,n,o,r,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var o,r=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var s,c,d,f;if(1!==n.state)return u();for(s in r)if((f=r[s]).name===n.name){if(3===f.state)return gn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[s]):+s<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[s])}if(gn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(i))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,o=new Array(d=n.tween.length),s=0,c=-1;s<d;++s)(f=n.tween[s].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=f);o.length=c+1}}function l(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(u),n.state=5,1),i=-1,a=o.length;++i<a;)o[i].call(e,r);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var o in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}r[t]=n,n.timer=fn(i,0,n.time)}(e,n,{name:t,index:o,group:r,on:mn,tween:yn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function xn(e,t){var n=En(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function bn(e,t){var n=En(e,t);if(n.state>3)throw new Error("too late; already running");return n}function En(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _n(e,t){var n,o,r,i=e.__transition,a=!0;if(i){for(r in t=null==t?null:t+"",i)(n=i[r]).name===t?(o=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[r]):a=!1;a&&delete e.__transition}}function Sn(e,t){var n,o;return function(){var r=bn(this,e),i=r.tween;if(i!==n)for(var a=0,l=(o=n=i).length;a<l;++a)if(o[a].name===t){(o=o.slice()).splice(a,1);break}r.tween=o}}function Nn(e,t,n){var o,r;if("function"!=typeof n)throw new Error;return function(){var i=bn(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var l={name:t,value:n},u=0,s=r.length;u<s;++u)if(r[u].name===t){r[u]=l;break}u===s&&r.push(l)}i.tween=r}}function kn(e,t,n){var o=e._id;return e.each((function(){var e=bn(this,o);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return En(e,o).value[t]}}function Cn(e,t){var n;return("number"==typeof t?Vt:t instanceof pt?Dt:(n=pt(t))?(t=n,Dt):Ht)(e,t)}function Mn(e){return function(){this.removeAttribute(e)}}function In(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pn(e,t,n){var o,r,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===o?r:r=t(o=a,n)}}
vendor: 4,630 bytes, line 7
7function Tn(e,t,n){var o,r,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?r:r=t(o=a,n)}}function Bn(e,t,n){var o,r,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttribute(e))===(l=u+"")?null:a===o&&l===r?i:(r=l,i=t(o=a,u));this.removeAttribute(e)}}function Dn(e,t,n){var o,r,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttributeNS(e.space,e.local))===(l=u+"")?null:a===o&&l===r?i:(r=l,i=t(o=a,u));this.removeAttributeNS(e.space,e.local)}}function An(e,t){var n,o;function r(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,r)),n}return r._value=t,r}function On(e,t){var n,o;function r(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,r)),n}return r._value=t,r}function $n(e,t){return function(){xn(this,e).delay=+t.apply(this,arguments)}}function Vn(e,t){return t=+t,function(){xn(this,e).delay=t}}function zn(e,t){return function(){bn(this,e).duration=+t.apply(this,arguments)}}function Rn(e,t){return t=+t,function(){bn(this,e).duration=t}}var Ln=Oe.prototype.constructor;function Hn(e){return function(){this.style.removeProperty(e)}}var Yn=0;function Fn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Gn(){return++Yn}var Xn=Oe.prototype;Fn.prototype={constructor:Fn,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=T(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var l,u,s=o[a],c=s.length,d=i[a]=new Array(c),f=0;f<c;++f)(l=s[f])&&(u=e.call(l,l.__data__,f,s))&&("__data__"in l&&(u.__data__=l.__data__),d[f]=u,wn(d[f],t,n,f,d,En(l,n)));return new Fn(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=D(e));for(var o=this._groups,r=o.length,i=[],a=[],l=0;l<r;++l)for(var u,s=o[l],c=s.length,d=0;d<c;++d)if(u=s[d]){for(var f,h=e.call(u,u.__data__,d,s),p=En(u,n),v=0,g=h.length;v<g;++v)(f=h[v])&&wn(f,t,n,v,h,p);i.push(h),a.push(u)}return new Fn(i,a,t,n)},selectChild:Xn.selectChild,selectChildren:Xn.selectChildren,filter:function(e){"function"!=typeof e&&(e=O(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i,a=t[r],l=a.length,u=o[r]=[],s=0;s<l;++s)(i=a[s])&&e.call(i,i.__data__,s,a)&&u.push(i);return new Fn(o,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),l=0;l<i;++l)for(var u,s=t[l],c=n[l],d=s.length,f=a[l]=new Array(d),h=0;h<d;++h)(u=s[h]||c[h])&&(f[h]=u);for(;l<o;++l)a[l]=t[l];return new Fn(a,this._parents,this._name,this._id)},selection:function(){return new Ln(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Gn(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a,l=o[i],u=l.length,s=0;s<u;++s)if(a=l[s]){var c=En(a,t);wn(a,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fn(o,this._parents,e,n)},call:Xn.call,nodes:Xn.nodes,node:Xn.node,size:Xn.size,empty:Xn.empty,each:Xn.each,on:function(e,t){var n=this._id;return arguments.length<2?En(this.node(),n).on.on(e):this.each(function(e,t,n){var o,r,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?xn:bn;return function(){var a=i(this,e),l=a.on;l!==o&&(r=(o=l).copy()).on(t,n),a.on=r}}(n,e,t))},attr:function(e,t){var n=k(e),o="transform"===n?Kt:Cn;return this.attrTween(e,"function"==typeof t?(n.local?Dn:Bn)(n,o,kn(this,"attr."+e,t)):null==t?(n.local?In:Mn)(n):(n.local?Tn:Pn)(n,o,t))},attrTween:function(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=k(e);return this.tween(n,(o.local?An:On)(o,t))},style:function(e,t,n){var o="transform"==(e+="")?Zt:Cn;return null==t?this.styleTween(e,function(e,t){var n,o,r;return function(){var i=re(this,e),a=(this.style.removeProperty(e),re(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}(e,o)).on("end.style."+e,Hn(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var o,r,i;return function(){var a=re(this,e),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(e),u=l=re(this,e)),a===u?null:a===o&&u===r?i:(r=u,i=t(o=a,l))}}(e,o,kn(this,"style."+e,t))).each(function(e,t){var n,o,r,i,a="style."+t,l="end."+a;return function(){var u=bn(this,e),s=u.on,c=null==u.value[a]?i||
vendor: 4,916 bytes, line 7
7(i=Hn(t)):void 0;s===n&&r===c||(o=(n=s).copy()).on(l,r=c),u.on=o}}(this._id,e)):this.styleTween(e,function(e,t,n){var o,r,i=n+"";return function(){var a=re(this,e);return a===i?null:a===o?r:r=t(o=a,n)}}(e,o,t),n).on("end.style."+e,null)},styleTween:function(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,function(e,t,n){var o,r;function i(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&function(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}(e,i,n)),o}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(kn(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(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,function(e){var t,n;function o(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&function(e){return function(t){this.textContent=e.call(this,t)}}(o)),t}return o._value=e,o}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o,r=En(this.node(),n).tween,i=0,a=r.length;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((null==t?Sn:Nn)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?$n:Vn)(t,e)):En(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?zn:Rn)(t,e)):En(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){bn(this,e).ease=t}}(t,e)):En(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;bn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,o=n._id,r=n.size();return new Promise((function(i,a){var l={value:a},u={value:function(){0==--r&&i()}};n.each((function(){var n=bn(this,o),r=n.on;r!==e&&((t=(e=r).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),n.on=t})),0===r&&i()}))},[Symbol.iterator]:Xn[Symbol.iterator]};var Un={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function jn(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Oe.prototype.interrupt=function(e){return this.each((function(){_n(this,e)}))},Oe.prototype.transition=function(e){var t,n;e instanceof Fn?(t=e._id,e=e._name):(t=Gn(),(n=Un).time=sn(),e=null==e?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a,l=o[i],u=l.length,s=0;s<u;++s)(a=l[s])&&wn(a,e,t,s,l,n||jn(a,t));return new Fn(o,this._parents,e,t)};const Zn=e=>()=>e;function Kn(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){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:r}})}function Wn(e,t,n){this.k=e,this.x=t,this.y=n}Wn.prototype={constructor:Wn,scale:function(e){return 1===e?this:new Wn(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Wn(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 qn=new Wn(1,0,0);function Jn(e){e.stopImmediatePropagation()}function Qn(e){e.preventDefault(),e.stopImmediatePropagation()}function eo(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function to(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).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 no(){return this.__zoom||qn}function oo(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?
71:.002)*(e.ctrlKey?10:1)}function ro(){return navigator.maxTouchPoints||"ontouchstart"in this}function io(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}Wn.prototype;var ao=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(ao||{}),lo=(e=>(e.Partial="partial",e.Full="full",e))(lo||{}),uo=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(uo||{}),so=(e=>(e.Strict="strict",e.Loose="loose",e))(so||{}),co=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(co||{}),fo=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(fo||{}),ho=(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))(ho||{});const po=["INPUT","SELECT","TEXTAREA"],vo="undefined"!=typeof document?document:null;function go(e){var t,n;const o=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target,r="function"==typeof(null==o?void 0:o.hasAttribute)&&o.hasAttribute("contenteditable"),i="function"==typeof(null==o?void 0:o.closest)?o.closest(".nokey"):null;return po.includes(null==o?void 0:o.nodeName)||r||!!i}function mo(e,t,n,o){const r=t.replace("+","\n").replace("\n\n","\n+").split("\n").map((e=>e.trim().toLowerCase()));if(1===r.length)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const i=r.every(((e,t)=>n.has(e)&&Array.from(n.values())[t]===r[t]));return o&&n.delete(e.toLowerCase()),i}function yo(e,n){const o=t.computed((()=>t.toValue(null==n?void 0:n.target)??vo)),r=t.shallowRef(!0===t.toValue(e));let i=!1;const a=new Set;let l=s(t.toValue(e));function u(){i=!1,a.clear(),r.value=!0===t.toValue(e)}function s(e){return null===e?(u(),()=>!1):"boolean"==typeof e?(u(),r.value=e,()=>!1):Array.isArray(e)||"string"==typeof e?function(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=(r=n.code,e.includes(r)?"code":"key");var r;return Array.isArray(e)?e.some((e=>mo(n[o],e,t,"keyup"===n.type))):mo(n[o],e,t,"keyup"===n.type)}}(e,a):e}return t.watch((()=>t.toValue(e)),((e,t)=>{"boolean"==typeof t&&"boolean"!=typeof e&&u(),l=s(e)}),{immediate:!0}),g(["blur","contextmenu"],u),m(((...e)=>l(...e)),(e=>{var o,a;const l=t.toValue(null==n?void 0:n.actInsideInputWithModifier)??!0,u=t.toValue(null==n?void 0:n.preventDefault)??!1;var s;i=(s=e).ctrlKey||s.metaKey||s.shiftKey||s.altKey;if((!i||i&&!l)&&go(e))return;const c=(null==(a=null==(o=e.composedPath)?void 0:o.call(e))?void 0:a[0])||e.target,d="BUTTON"===(null==c?void 0:c.nodeName)||"A"===(null==c?void 0:c.nodeName);u||!i&&d||e.preventDefault(),r.value=!0}),{eventName:"keydown",target:o}),m(((...e)=>l(...e)),(e=>{const o=t.toValue(null==n?void 0:n.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!o)&&go(e))return;i=!1,r.value=!1}}),{eventName:"keyup",target:o}),r}const wo="vue-flow__node-desc",xo="vue-flow__edge-desc",bo=["Enter"," ","Escape"],Eo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function _o(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function So(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 No(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ko(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Co(e,t){return{x:ko(e.x,t[0][0],t[1][0]),y:ko(e.y,t[0][1],t[1][1])}}function Mo(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Io(e){return e&&"object"==typeof e&&"id"in e&&"source"in e&&"target"in e}function Po(e){return e&&"object"==typeof e&&"id"in e&&"position"in e&&!Io(e)}function To(e){return Po(e)&&"computedPosition"in e}function Bo(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Do(e,n,o){const r={id:e.id.toString(),type:e.type??"default",dimensions:t.markRaw({width:0,height:0}),computedPosition:t.markRaw({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:zr(e.data)?e.data:{},events:t.markRaw(zr(e.events)?e.events:{})};return Object.assign(n??r,e,{id:e.id.toString(),parentNode:o})}function Ao(e,n,o){var r,i;const a={id:e.id.toString(),type:e.type??(null==n?void 0:n.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:null==(r=e.sourceHandle)?void 0:r.toString(),targetHandle:null==(i=e.targetHandle)?void 0:i.toString(),updatable:e.updatable??(null==o?void 0:o.updatable),selectable:e.selectable??(null==o?void 0:o.selectable),focusable:e.focu
7sable??(null==o?void 0:o.focusable),data:zr(e.data)?e.data:{},events:t.markRaw(zr(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(null==o?void 0:o.interactionWidth),...o??{}};return Object.assign(n??a,e,{id:e.id.toString()})}function Oo(e,t,n,o){const r="string"==typeof e?e:e.id,i=new Set,a="source"===o?"target":"source";for(const e of n)e[a]===r&&i.add(e[o]);return t.filter((e=>i.has(e.id)))}function $o(...e){if(3===e.length){const[t,n,o]=e;return Oo(t,n,o,"target")}const[t,n]=e,o="string"==typeof t?t:t.id;return n.filter((e=>Io(e)&&e.source===o)).map((e=>n.find((t=>Po(t)&&t.id===e.target))))}function Vo(...e){if(3===e.length){const[t,n,o]=e;return Oo(t,n,o,"source")}const[t,n]=e,o="string"==typeof t?t:t.id;return n.filter((e=>Io(e)&&e.target===o)).map((e=>n.find((t=>Po(t)&&t.id===e.source))))}function zo({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Ro(e,t){return t.some((t=>Io(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 Lo({x:e,y:t},{x:n,y:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function Ho({x:e,y:t},{x:n,y:o,zoom:r},i=!1,a=[1,1]){const l={x:(e-n)/r,y:(t-o)/r};return i?Nr(l,a):l}function Yo(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 Fo({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Go({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function Xo(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=Yo(t,Fo({...o.computedPosition,...o.dimensions}))}return Go(t)}function Uo(e,t,n={x:0,y:0,zoom:1},o=!1,r=!1){const i={...Ho(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const t of e){const{dimensions:e,selectable:n=!0,hidden:l=!1}=t,u=e.width??t.width??null,s=e.height??t.height??null;if(r&&!n||l)continue;const c=So(i,_o(t));(null===u||null===s||o&&c>0||c>=(u??0)*(s??0)||t.dragging)&&a.push(t)}return a}function jo(e,t){const n=new Set;if("string"==typeof e)n.add(e);else if(e.length>=1)for(const t of e)n.add(t.id);return t.filter((e=>n.has(e.source)||n.has(e.target)))}function Zo(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 Ar(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ko(e,t,n,o,r,i=.1){const a=function(e,t,n){if("string"==typeof e||"number"==typeof e){const o=Zo(e,n),r=Zo(e,t);return{top:o,right:r,bottom:o,left:r,x:2*r,y:2*o}}if("object"==typeof e){const o=Zo(e.top??e.y??0,n),r=Zo(e.bottom??e.y??0,n),i=Zo(e.left??e.x??0,t),a=Zo(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(i,t,n),l=(t-a.x)/e.width,u=(n-a.y)/e.height,s=ko(Math.min(l,u),o,r),c=t/2-(e.x+e.width/2)*s,d=n/2-(e.y+e.height/2)*s,f=function(e,t,n,o,r,i){const{x:a,y:l}=Lo(e,{x:t,y:n,zoom:o}),{x:u,y:s}=Lo({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=r-u,d=i-s;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(d)}}(e,c,d,s,t,n),h=Math.min(f.left-a.left,0),p=Math.min(f.top-a.top,0);return{x:c-h+Math.min(f.right-a.right,0),y:d-p+Math.min(f.bottom-a.bottom,0),zoom:s}}function Wo(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return!!n&&(!!n.selected||Wo(n,t))}function qo(e,t){if(void 0===e)return"";if("string"==typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map((t=>`${t}=${e[t]}`)).join("&")}`}function Jo(e){const t=e.ctrlKey&&Sr()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t}function Qo(e,t,n){return e<t?ko(Math.abs(e-t),1,t)/t:e>n?-ko(Math.abs(e-n),1,t)/t:0}function er(e,t,n=15,o=40){return[Qo(e.x,o,t.width-o)*n,Qo(e.y,o,t.height-o)*n]}function tr(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 r={};if("function"==typeof t.style?r={...t.style(t)}:t.style&&(r={...t.style}),r.width=r.width??`${t.dimensions.width}px`,r.height=r.height??`${t.dimensions.height}px`,n>0)if("string"==typeof r.width){const e=Number(r.width.replace("px",""));r.width=`${e+n}px`}else r.width+=n;if(o>0)if("string"==typeof r.height){const e=Number(r.height.replace("px",""));r.height=`${e+o}px`}else r.height+=o;if(e.position.x<0){const n=Math.abs(e.position.x);if(t.position.x=t.position.x-n,"string"==typeof r.width){const e=Number(r.width.replace("px",""));r.width=`${e+n}px`}else r.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 r.height){const e=Number(r.height.replace("px",""));r.height=`${e+n}px`}else r.height+=n;e.position.y=0}t.dimensions.width=Number(r.width.toString().replace("px","")),t.dimensions.height=Number(r.height.toString().replace("px","")),"function"==typeof t.style?t.style=e=>({...(0,t.style)(e),...r}):t.style={...t.style,...r}}}}function nr(e,n){var o,r;const i=e.filter((e=>"add"===e.type||"remove"===e.type));for(const e of i)if("add"===e.type){-1===n.findIndex((t=>t.id===e.item.id))&&n.push(e.item)}else if("remove"===e.type){const t=n.findIndex((t=>t.id===e.id));-1!==t&&n.splice(t,1)}const a=n.map((e=>e.id));for(const i of n)for(const l of e)if(l.id===i.id)switch(l.type){case"select":i.selected=l.selected;break;case"position":if(To(i)&&(void 0!==l.position&&(i.position=l.position),void 0!==l.dragging&&(i.dragging=l.dragging),i.expandParent&&i.parentNode)){const e=n[a.indexOf(i.parentNode)];e&&To(e)&&tr(i,e)}break;case"dimensions":if(To(i)&&(void 0!==l.dimensions&&(i.dimensions=l.dimensions),void 0!==l.updateStyle&&l.updateStyle&&(i.style={...i.style||{},width:`${null==(o=l.dimensions)?void 0:o.width}px`,height:`${null==(r=l.dimensions)?void 0:r.height}px`}),void 0!==l.resizing&&(i.resizing=l.resizing),i.expandParent&&i.parentNode)){const e=n[a.indexOf(i.parentNode)];if(e&&To(e)){!!e.dimensions.width&&!!e.dimensions.height?tr(i,e):t.nextTick((()=>{tr(i,e)}))}}}return n}function or(e,t){return{id:e,type:"select",selected:t}}function rr(e){return{item:e,type:"add"}}function ir(e){return{id:e,type:"remove"}}function ar(e,t,n,o,r){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:r||null,type:"remove"}}function lr(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const e=t.has(r);void 0===i.selected&&!e||i.selected===e||(n&&(i.selected=e),o.push(or(i.id,e)))}return o}const ur=()=>{};function sr(e){const t=new Set;let o=ur,r=()=>!1;const i=()=>t.size>0||r(),a=e=>{t.delete(e)};return{on:e=>{t.add(e);const o=()=>a(e);return n(o),{off:o}},off:a,trigger:n=>{const r=[o];return i()?r.push(...t):e&&r.push(e),Promise.allSettled(r.map((e=>e(n))))},hasListeners:i,listeners:t,setEmitter:e=>{o=e},removeEmitter:()=>{o=ur},setHasEmitListeners:e=>{r=e},removeHasEmitListeners:()=>{r=()=>!1}}}function cr(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;
7if(o===n)return!1;o=o.parentElement}while(o);return!1}function dr({id:e,dragItems:t,findNode:n}){const o=[];for(const e of t){const t=n(e.id);t&&o.push(t)}return[e?o.find((t=>t.id===e)):o[0],o]}function fr(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 hr(e,t,n,o){let r=e.extent||n;if("parent"!==r&&(Array.isArray(r)||"parent"!==(null==r?void 0:r.range))||e.expandParent){if(Array.isArray(r)){const e=(null==o?void 0:o.computedPosition.x)||0,t=(null==o?void 0:o.computedPosition.y)||0;r=[[r[0][0]+e,r[0][1]+t],[r[1][0]+e,r[1][1]+t]]}else if("parent"!==r&&(null==r?void 0:r.range)&&Array.isArray(r.range)){const[e,t,n,i]=fr(r.padding),a=(null==o?void 0:o.computedPosition.x)||0,l=(null==o?void 0:o.computedPosition.y)||0;r=[[r.range[0][0]+a+i,r.range[0][1]+l+e],[r.range[1][0]+a-t,r.range[1][1]+l-n]]}}else if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const e=function(e,t,n){const[o,r,i,a]="string"!=typeof e?fr(e.padding):[0,0,0,0];return!(!n||void 0===n.computedPosition.x||void 0===n.computedPosition.y||void 0===n.dimensions.width||void 0===n.dimensions.height)&&[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-r,n.computedPosition.y+n.dimensions.height-i]]}(r,0,o);e&&(r=e)}else t(new br(wr.NODE_EXTENT_INVALID,e.id)),r=n;return"parent"===r?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:r}function pr(e,t,n,o,r){const i=Co(t,function({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}(e.dimensions,hr(e,n,o,r)));return{position:{x:i.x-((null==r?void 0:r.computedPosition.x)||0),y:i.y-((null==r?void 0:r.computedPosition.y)||0)},computedPosition:i}}function vr(e,t,n=ao.Left,o=!1){const r=((null==t?void 0:t.x)??0)+e.computedPosition.x,i=((null==t?void 0:t.y)??0)+e.computedPosition.y,{width:a,height:l}=t??function(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}}(e);if(o)return{x:r+a/2,y:i+l/2};switch((null==t?void 0:t.position)??n){case ao.Top:return{x:r+a/2,y:i};case ao.Right:return{x:r+a,y:i+l/2};case ao.Bottom:return{x:r+a/2,y:i+l};case ao.Left:return{x:r,y:i+l/2}}}function gr(e,t){return e&&(t?e.find((e=>e.id===t)):e[0])||null}function mr({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:i,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+r),y2:Math.max(e.y+o,t.y+i)};s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const c=Fo({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)),f=Math.max(0,Math.min(c.y2,s.y2)-Math.max(c.y,s.y));return Math.ceil(d*f)>0}function yr(e,t,n=!1){const o="number"==typeof e.zIndex;let r=o?e.zIndex:0;const i=t(e.source),a=t(e.target);return i&&a?(n&&(r=o?e.zIndex:Math.max(i.computedPosition.z||0,a.computedPosition.z||0)),r):0}var wr=(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))(wr||{});const xr={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=>
7`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"};class br extends Error{constructor(e,...t){var n;super(null==(n=xr[e])?void 0:n.call(xr,...t)),this.name="VueFlowError",this.code=e,this.args=t}}function Er(e){return"clientX"in e}function _r(e,t){let n,o;return Er(e)?(n=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(n=0,o=0),{x:n-((null==t?void 0:t.left)??0),y:o-((null==t?void 0:t.top)??0)}}const Sr=()=>{var e;return"undefined"!=typeof navigator&&(null==(e=null==navigator?void 0:navigator.userAgent)?void 0:e.indexOf("Mac"))>=0};function Nr(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const kr=()=>!0;function Cr(e){null==e||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Mr(e,t,n,o){var r,i;let a=[],l=Number.POSITIVE_INFINITY;const u=function(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(const e of t.values())So(r,_o(e))>0&&o.push(e);return o}(e,n,t+250);for(const n of u){const u=[...(null==(r=n.handleBounds)?void 0:r.source)??[],...(null==(i=n.handleBounds)?void 0:i.target)??[]];for(const r of u){if(o.nodeId===r.nodeId&&o.type===r.type&&o.id===r.id)continue;const{x:i,y:u}=vr(n,r,r.position,!0),s=Math.sqrt((i-e.x)**2+(u-e.y)**2);s>t||(s<l?(a=[{...r,x:i,y:u}],l=s):s===l&&a.push({...r,x:i,y:u}))}}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 Ir(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:l,flowId:u,isValidConnection:s=kr},c,d,f,h){const p="target"===i,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}=_r(e),y=a.elementFromPoint(g,m),w=(null==y?void 0:y.classList.contains(`${l}-flow__handle`))?y:v,x={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const e=Pr(void 0,w),t=w.getAttribute("data-nodeid"),i=w.getAttribute("data-handleid"),a=w.classList.contains("connectable"),l=w.classList.contains("connectableend");if(!t||!e)return x;const u={source:p?t:o,sourceHandle:p?i:r,target:p?o:t,targetHandle:p?r:i};x.connection=u;const v=a&&l&&(n===so.Strict?p&&"source"===e||!p&&"target"===e:t!==o||i!==r);x.isValid=v&&s(u,{nodes:d,edges:c,sourceNode:f(u.source),targetNode:f(u.target)}),x.toHandle=Tr(t,e,i,h,n,!0)}return x}function Pr(e,t){return e||((null==t?void 0:t.classList.contains("target"))?"target":(null==t?void 0:t.classList.contains("source"))?"source":null)}function Tr(e,t,n,o,r,i=!1){var a,l,u;const s=o.get(e);if(!s)return null;const c=r===so.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&&i?{...d,...vr(s,d,d.position,!0)}:d}const Br={[ao.Left]:ao.Right,[ao.Right]:ao.Left,[ao.Top]:ao.Bottom,[ao.Bottom]:ao.Top},Dr=["production","prod"];function Ar(e,...t){Or()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Or(){return!Dr.includes(production||"")}function $r(e,t,n,o,r){const i=t.querySelectorAll(`.vue-flow__handle.${e}`);return(null==i?void 0:i.length)?Array.from(i).map((t=>{const i=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:r,position:t.getAttribute("data-handlepos"),x:(i.left-n.left)/o,y:(i.top-n.top)/o,...No(t)}})):null}function Vr(e,n,o,r,i,a=!1,l){i.value=!1,e.selected?(a||e.selected&&n)&&(r([e]),t.nextTick((()=>{l.blur()}))):o([e])}function zr(e){return void 0!==t.unref(e)}function Rr(e,t,n,o){if(!e||!e.source||!e.target)return n(new br(wr.EDGE_INVALID,(null==e?void 0:e.id)??"[ID UNKNOWN]")),!1;let r;return r=Io(e)?e:{...e,id:zo(e)},r=Ao(r,void 0,o),!Ro(r,t)&&r}function Lr(e,t,n){const o={},r=[];for(let i=0;i<e.length;++i){const a=e[i];if(!Po(a)){n(new br(wr.NODE_INVALID,null==a?void 0:a.id)||`[ID UNKNOWN|INDEX ${i}]`);continue}const l=Do(a,t(a.id),a.parentNode);a.parentNode&&(o[a.parentNode]=!0),r[i]=l}
7for(const e of r){const i=t(e.parentNode)||r.find((t=>t.id===e.parentNode));e.parentNode&&!i&&n(new br(wr.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||o[e.id])&&(o[e.id]&&(e.isParent=!0),i&&(i.isParent=!0))}return r}function Hr(e,t,n,o,r,i){let a=r;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a=`${r}-${e}`;const u=o.get(a)||new Map;if(o.set(a,u.set(n,t)),i){a=`${r}-${e}-${i}`;const l=o.get(a)||new Map;o.set(a,l.set(n,t))}}function Yr(e,t,n){e.clear();for(const t of n){const{source:n,target:o,sourceHandle:r=null,targetHandle:i=null}=t,a={edgeId:t.id,source:n,target:o,sourceHandle:r,targetHandle:i},l=`${n}-${r}--${o}-${i}`;Hr("source",a,`${o}-${i}--${n}-${r}`,e,n,r),Hr("target",a,l,e,o,i)}}function Fr(e,t,n){if(!n)return;const o=[];for(const n of e.keys())t.has(n)||o.push(e.get(n));o.length&&n(o)}function Gr(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0}function Xr(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ur(e,t,n,o,r,i,a,l){const u=[];for(const s of e){const e=Io(s)?s:Rr(s,l,r,i);if(!e)continue;const c=n(e.source),d=n(e.target);if(!c||!d){r(new br(wr.EDGE_SOURCE_TARGET_MISSING,e.id,e.source,e.target));continue}if(!c){r(new br(wr.EDGE_SOURCE_MISSING,e.id,e.source));continue}if(!d){r(new br(wr.EDGE_TARGET_MISSING,e.id,e.target));continue}if(t){if(!t(e,{edges:l,nodes:a,sourceNode:c,targetNode:d})){r(new br(wr.EDGE_INVALID,e.id));continue}}const f=o(e.id);u.push({...Ao(e,f,i),sourceNode:c,targetNode:d})}return u}const jr=Symbol("vueFlow"),Zr=Symbol("nodeId"),Kr=Symbol("nodeRef"),Wr=Symbol("edgeId"),qr=Symbol("edgeRef"),Jr=Symbol("slots");function Qr(e){const{vueFlowRef:n,snapToGrid:o,snapGrid:r,noDragClassName:i,nodeLookup:a,nodeExtent:l,nodeDragThreshold:u,viewport:s,autoPanOnNodeDrag:c,autoPanSpeed:d,nodesDraggable:f,panBy:h,findNode:p,multiSelectionActive:v,nodesSelectionActive:g,selectNodesOnDrag:m,removeSelectedElements:y,addSelectedNodes:w,updateNodePositions:b,emits:E}=Qi(),{onStart:_,onDrag:S,onStop:N,onClick:k,el:C,disabled:M,id:I,selectable:P,dragHandle:T}=e,B=t.shallowRef(!1);let D,A=[],O=null,$={x:void 0,y:void 0},V={x:0,y:0},z=null,R=!1,L=!1,H=0,Y=!1;const F=ti(),G=({x:e,y:t})=>{$={x:e,y:t};let n=!1;if(A=A.map((i=>{const a={x:e-i.distance.x,y:t-i.distance.y},{computedPosition:u}=pr(i,o.value?Nr(a,r.value):a,E.error,l.value,i.parentNode?p(i.parentNode):void 0);return n=n||i.position.x!==u.x||i.position.y!==u.y,i.position=u,i})),L=L||n,n&&(b(A,!0,!0),B.value=!0,z)){const[e,t]=dr({id:I,dragItems:A,findNode:p});S({event:z,node:e,nodes:t})}},X=()=>{if(!O)return;const[e,t]=er(V,O,d.value);if(0!==e||0!==t){const n={x:($.x??0)-e/s.value.zoom,y:($.y??0)-t/s.value.zoom};h({x:e,y:t})&&G(n)}H=requestAnimationFrame(X)},U=(e,n)=>{R=!0;const o=p(I);m.value||v.value||!o||o.selected||y(),o&&t.toValue(P)&&m.value&&Vr(o,v.value,w,y,g,!1,n);const r=F(e.sourceEvent);if($=r,A=function(e,t,n,o){var r,i;const a=new Map;for(const[l,u]of e)!u.selected&&u.id!==o||u.parentNode&&Wo(u,e)||!(u.draggable||t&&void 0===u.draggable)||e.get(l)&&a.set(l,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-(null==(r=u.computedPosition)?void 0:r.x)||0,y:n.y-(null==(i=u.computedPosition)?void 0:i.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())}(a.value,f.value,r,I),A.length){const[t,n]=dr({id:I,dragItems:A,findNode:p});_({event:e.sourceEvent,node:t,nodes:n})}};return t.watch([()=>t.toValue(M),C],(([e,o],r,a)=>{if(o){const r=$e(o);e||(D=function(){var e,t,n,o,r=Ue,i=je,a=Ze,l=Ke,u={},s=x("start","drag","end"),c=0,d=0;function f(e){e.on("mousedown.drag",h).filter(l).on("touchstart.drag",g).on("touchmove.drag",m,ze).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(a,l){if(!o&&r.call(this,a,l)){var u=w(this,i.call(this,a,l),a,l,"mouse");u&&($e(a.view).on("mousemove.drag",p,Re).on("mouseup.drag",v,Re),Ye(a.view),Le(a),n=!1,e=a.clientX,t=a.clientY,u("start",a))}}
7function p(o){if(He(o),!n){var r=o.clientX-e,i=o.clientY-t;n=r*r+i*i>d}u.mouse("drag",o)}function v(e){$e(e.view).on("mousemove.drag mouseup.drag",null),Fe(e.view,n),He(e),u.mouse("end",e)}function g(e,t){if(r.call(this,e,t)){var n,o,a=e.changedTouches,l=i.call(this,e,t),u=a.length;for(n=0;n<u;++n)(o=w(this,l,e,t,a[n].identifier,a[n]))&&(Le(e),o("start",e,a[n]))}}function m(e){var t,n,o=e.changedTouches,r=o.length;for(t=0;t<r;++t)(n=u[o[t].identifier])&&(He(e),n("drag",e,o[t]))}function y(e){var t,n,r=e.changedTouches,i=r.length;for(o&&clearTimeout(o),o=setTimeout((function(){o=null}),500),t=0;t<i;++t)(n=u[r[t].identifier])&&(Le(e),n("end",e,r[t]))}function w(e,t,n,o,r,i){var l,d,h,p=s.copy(),v=Ve(i||n,t);if(null!=(h=a.call(e,new Xe("beforestart",{sourceEvent:n,target:f,identifier:r,active:c,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),o)))return l=h.x-v[0]||0,d=h.y-v[1]||0,function n(i,a,s){var g,m=v;switch(i){case"start":u[r]=n,g=c++;break;case"end":delete u[r],--c;case"drag":v=Ve(s||a,t),g=c}p.call(i,e,new Xe(i,{sourceEvent:a,subject:h,target:f,identifier:r,active:g,x:v[0]+l,y:v[1]+d,dx:v[0]-m[0],dy:v[1]-m[1],dispatch:p}),o)}}return f.filter=function(e){return arguments.length?(r="function"==typeof e?e:Ge(!!e),f):r},f.container=function(e){return arguments.length?(i="function"==typeof e?e:Ge(e),f):i},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:Ge(e),f):a},f.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Ge(!!e),f):l},f.on=function(){var e=s.on.apply(s,arguments);return e===s?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",(e=>((e,t)=>{var o;"touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||(L=!1,0===u.value&&U(e,t),$=F(e.sourceEvent),O=(null==(o=n.value)?void 0:o.getBoundingClientRect())||null,V=_r(e.sourceEvent,O))})(e,o))).on("drag",(e=>((e,t)=>{const n=F(e.sourceEvent);if(!Y&&R&&c.value&&(Y=!0,X()),!R){const o=n.xSnapped-($.x??0),r=n.ySnapped-($.y??0);Math.sqrt(o*o+r*r)>u.value&&U(e,t)}($.x!==n.xSnapped||$.y!==n.ySnapped)&&A.length&&R&&(z=e.sourceEvent,V=_r(e.sourceEvent,O),G(n))})(e,o))).on("end",(e=>(e=>{let t=!1;if(!R&&!B.value&&!v.value){const n=e.sourceEvent,o=F(n),r=o.xSnapped-($.x??0),i=o.ySnapped-($.y??0),a=Math.sqrt(r*r+i*i);0!==a&&a<=u.value&&(null==k||k(n),t=!0)}if(A.length&&!t){L&&(b(A,!1,!1),L=!1);const[t,n]=dr({id:I,dragItems:A,findNode:p});N({event:e.sourceEvent,node:t,nodes:n})}A=[],B.value=!1,Y=!1,R=!1,$={x:void 0,y:void 0},cancelAnimationFrame(H)})(e))).filter((e=>{const n=e.target,r=t.toValue(T);return!e.button&&(!i.value||!cr(n,`.${i.value}`,o)&&(!r||cr(n,r,o)))})),r.call(D)),a((()=>{r.on(".drag",null),D&&(D.on("start",null),D.on("drag",null),D.on("end",null))}))}})),B}function ei(e,t){const n={doubleClick:sr(),click:sr(),mouseEnter:sr(),mouseMove:sr(),mouseLeave:sr(),contextMenu:sr(),updateStart:sr(),update:sr(),updateEnd:sr()};return n.doubleClick.on((n=>{var o,r;t.edgeDoubleClick(n),null==(r=null==(o=e.events)?void 0:o.doubleClick)||r.call(o,n)})),n.click.on((n=>{var o,r;t.edgeClick(n),null==(r=null==(o=e.events)?void 0:o.click)||r.call(o,n)})),n.mouseEnter.on((n=>{var o,r;t.edgeMouseEnter(n),null==(r=null==(o=e.events)?void 0:o.mouseEnter)||r.call(o,n)})),n.mouseMove.on((n=>{var o,r;t.edgeMouseMove(n),null==(r=null==(o=e.events)?void 0:o.mouseMove)||r.call(o,n)})),n.mouseLeave.on((n=>{var o,r;t.edgeMouseLeave(n),null==(r=null==(o=e.events)?void 0:o.mouseLeave)||r.call(o,n)})),n.contextMenu.on((n=>{var o,r;t.edgeContextMenu(n),null==(r=null==(o=e.events)?void 0:o.contextMenu)||r.call(o,n)})),n.updateStart.on((n=>{var o,r;t.edgeUpdateStart(n),null==(r=null==(o=e.events)?void 0:o.updateStart)||r.call(o,n)})),n.update.on((n=>{var o,r;t.edgeUpdate(n),null==(r=null==(o=e.events)?void 0:o.update)||r.call(o,n)})),n.updateEnd.on((n=>{var o,r;t.edgeUpdateEnd(n),null==(r=null==(o=e.events)?void 0:o.updateEnd)||r.call(o,n)})),Object.entries(n).reduce(((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e)),{emit:{},on:{}})}function ti(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Qi();return r=>{var i;const a=(null==(i=o.value)?void 0:i.getBoundingClientRect())??{left:0,top:0},l=function(e){return"sourceEvent"in e}(r)?r.sourceEvent:r,{x:u,y:s}=_r(l,a),c=Ho({x:u,y:s},e.value),{x:d,y:f}=n.value?Nr(c,t.value):c;return{xSnapped:d,ySnapped:f,...c}}}function ni(){return!0}function oi({handleId:e,nodeId:n,type:o,isValidConnection:r,edgeUpdaterType:i,onEdgeUpdate:a,onEdgeUpdateEnd:l}){const{id:u,vueFlowRef:s,connectionMode:c,connectionRadius:d,connectOnClick:f,connectionClickStartHandle:h,nodesConnectable:p,autoPanOnConnect:v,autoPanSpeed:g,findNode:m,panBy:y,startConnection:w,updateConnection:x,endConnection:b,emits:E,viewport:_,edges:S,nodes:N,isValidConnection:k,nodeLookup:C}=Qi();let M=null,I=!1,P=null;return{handlePointerDown:function(f){var h;const p="target"===t.toValue(o),T=Er(f),B=Mo(f.target),D=f.currentTarget;if(D&&(T&&0===f.button||!T)){let o=function(o){G=_r(o,H),O=Mr(Ho(G,_.value,!1,[1,1]),d.value,C.value,j),X||(U(),X=!0);const r=Ir(o,{handle:O,connectionMode:c.value,fromNodeId:t.toValue(n),fromHandleId:t.toValue(e),fromType:p?"target":"source",isValidConnection:$,doc:B,lib:"vue",flowId:u,nodeLookup:C.value},S.value,N.value,m,C.value);
7P=r.handleDomNode,M=r.connection,I=function(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}(!!O,r.isValid);const i={...W,isValid:I,to:r.toHandle&&I?Lo({x:r.toHandle.x,y:r.toHandle.y},_.value):G,toHandle:r.toHandle,toPosition:I&&r.toHandle?r.toHandle.position:Br[j.position],toNode:r.toHandle?C.value.get(r.toHandle.nodeId):null};if(I&&O&&(null==W?void 0:W.toHandle)&&i.toHandle&&W.toHandle.type===i.toHandle.type&&W.toHandle.nodeId===i.toHandle.nodeId&&W.toHandle.id===i.toHandle.id&&W.to.x===i.to.x&&W.to.y===i.to.y)return;const a=O??r.toHandle;if(x(a&&I?Lo({x:a.x,y:a.y},_.value):G,r.toHandle,function(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}(!!a,I)),W=i,!O&&!I&&!P)return Cr(F);M&&M.source!==M.target&&P&&(Cr(F),F=P,P.classList.add("connecting","vue-flow__handle-connecting"),P.classList.toggle("valid",!!I),P.classList.toggle("vue-flow__handle-valid",!!I))},T=function(e){"touches"in e&&e.touches.length>0||((O||P)&&M&&I&&(a?a(e,M):E.connect(M)),E.connectEnd(e),i&&(null==l||l(e)),Cr(F),cancelAnimationFrame(V),b(e),X=!1,I=!1,M=null,P=null,B.removeEventListener("mousemove",o),B.removeEventListener("mouseup",T),B.removeEventListener("touchmove",o),B.removeEventListener("touchend",T))};const A=m(t.toValue(n));let O,$=t.toValue(r)||k.value||ni;!$&&A&&($=(p?A.isValidSourcePos:A.isValidTargetPos)||ni);let V=0;const{x:z,y:R}=_r(f),L=Pr(t.toValue(i),D),H=null==(h=s.value)?void 0:h.getBoundingClientRect();if(!H||!L)return;const Y=Tr(t.toValue(n),L,t.toValue(e),C.value,c.value);if(!Y)return;let F,G=_r(f,H),X=!1;const U=()=>{if(!v.value)return;const[e,t]=er(G,H,g.value);y({x:e,y:t}),V=requestAnimationFrame(U)},j={...Y,nodeId:t.toValue(n),type:L,position:Y.position},Z=C.value.get(t.toValue(n)),K={inProgress:!0,isValid:null,from:vr(Z,j,ao.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:Z,to:G,toHandle:null,toPosition:Br[j.position],toNode:null};w({nodeId:t.toValue(n),id:t.toValue(e),type:L,position:(null==D?void 0:D.getAttribute("data-handlepos"))||ao.Top,...G},{x:z-H.left,y:R-H.top}),E.connectStart({event:f,nodeId:t.toValue(n),handleId:t.toValue(e),handleType:L});let W=K;B.addEventListener("mousemove",o),B.addEventListener("mouseup",T),B.addEventListener("touchmove",o),B.addEventListener("touchend",T)}},handleClick:function(i){var a,l;if(!f.value)return;const s="target"===t.toValue(o);if(!h.value)return E.clickConnectStart({event:i,nodeId:t.toValue(n),handleId:t.toValue(e)}),void w({nodeId:t.toValue(n),type:t.toValue(o),id:t.toValue(e),position:ao.Top,..._r(i)},void 0,!0);let d=t.toValue(r)||k.value||ni;const v=m(t.toValue(n));if(!d&&v&&(d=(s?v.isValidSourcePos:v.isValidTargetPos)||ni),v&&!1===(void 0===v.connectable?p.value:v.connectable))return;const g=Mo(i.target),y=Ir(i,{handle:{nodeId:t.toValue(n),id:t.toValue(e),type:t.toValue(o),position:ao.Top,..._r(i)},connectionMode:c.value,fromNodeId:h.value.nodeId,fromHandleId:h.value.id??null,fromType:h.value.type,isValidConnection:d,doc:g,lib:"vue",flowId:u,nodeLookup:C.value},S.value,N.value,m,C.value),x=(null==(a=y.connection)?void 0:a.source)===(null==(l=y.connection)?void 0:l.target);y.isValid&&y.connection&&!x&&E.connect(y.connection),E.clickConnectEnd(i),b(i,!0)}}}function ri(){return t.inject(Zr,"")}function ii(e){const n=e??ri()??"",o=t.inject(Kr,t.ref(null)),{findNode:r,edges:i,emits:a}=Qi(),l=r(n);return l||a.error(new br(wr.NODE_NOT_FOUND,n)),{id:n,nodeEl:o,node:l,parentNode:t.computed((()=>r(l.parentNode))),connectedEdges:t.computed((()=>jo([l],i.value)))}}function ai(e,t){const n={doubleClick:sr(),click:sr(),mouseEnter:sr(),mouseMove:sr(),mouseLeave:sr(),contextMenu:sr(),dragStart:sr(),drag:sr(),dragStop:sr()};return n.doubleClick.on((n=>{var o,r;t.nodeDoubleClick(n),null==(r=null==(o=e.events)?void 0:o.doubleClick)||r.call(o,n)})),n.click.on((n=>{var o,r;t.nodeClick(n),null==(r=null==(o=e.events)?void 0:o.click)||r.call(o,n)})),n.mouseEnter.on((n=>{var o,r;t.nodeMouseEnter(n),null==(r=null==(o=e.events)?void 0:o.mouseEnter)||r.call(o,n)})),n.mouseMove.on((n=>{var o,r;t.nodeMouseMove(n),null==(r=null==(o=e.events)?void 0:o.mouseMove)||r.call(o,n)})),n.mouseLeave.on((n=>{var o,r;t.nodeMouseLeave(n),null==(r=null==(o=e.events)?void 0:o.mouseLeave)||r.call(o,n)})),n.contextMenu.on((n=>{var o,r;t.nodeContextMenu(n),null==(r=null==(o=e.events)?void 0:o.contextMenu)||r.call(o,n)})),n.dragStart.on((n=>{var o,r;t.nodeDragStart(n),null==(r=null==(o=e.events)?void 0:o.dragStart)||r.call(o,n)})),n.drag.on((n=>{var o,r;t.nodeDrag(n),null==(r=null==(o=e.events)?void 0:o.drag)||r.call(o,n)})),n.dragStop.on((n=>{var o,r;t.nodeDragStop(n),null==(r=null==(o=e.events)?void 0:o.dragStop)||r.call(o,n)})),Object.entries(n).reduce(((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e)),{emit:{},on:{}})}function li(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGri
7d:i,nodesDraggable:a,emits:l}=Qi();return(u,s=!1)=>{const c=i.value?r.value[0]:5,d=i.value?r.value[1]:5,f=s?4:1,h=u.x*c*f,p=u.y*d*f,v=[];for(const n of e.value)if(n.draggable||a&&void 0===n.draggable){const e={x:n.computedPosition.x+h,y:n.computedPosition.y+p},{position:r}=pr(n,e,l.error,t.value,n.parentNode?o(n.parentNode):void 0);v.push({id:n.id,position:r,from:n.position,distance:{x:u.x,y:u.y},dimensions:n.dimensions})}n(v,!0,!1)}}const ui=.1,si=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ci(){return Ar("Viewport not initialized yet."),Promise.resolve(!1)}const di={zoomIn:ci,zoomOut:ci,zoomTo:ci,fitView:ci,setCenter:ci,fitBounds:ci,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ci,setTransform:ci,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function fi(e){function n(t,n){return new Promise((o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Yt:qt).scaleBy(hi(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,(()=>{o(!0)})),t):o(!1)}))}function o(t,n,o,r){return new Promise((i=>{var a;const{x:l,y:u}=Co({x:-t,y:-n},e.translateExtent),s=qn.translate(-l,-u).scale(o);e.d3Selection&&e.d3Zoom?null==(a=e.d3Zoom)||a.interpolate("linear"===(null==r?void 0:r.interpolate)?Yt:qt).transform(hi(e.d3Selection,null==r?void 0:r.duration,null==r?void 0:r.ease,(()=>{i(!0)})),s):i(!1)}))}return t.computed((()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:e=>n(1.2,e),zoomOut:e=>n(1/1.2,e),zoomTo:(t,n)=>new Promise((o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Yt:qt).scaleTo(hi(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,(()=>{o(!0)})),t):o(!1)})),setViewport:(e,t)=>o(e.x,e.y,e.zoom,t),setTransform:(e,t)=>o(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:ui,includeHiddenNodes:!1,duration:0})=>{var n,r;const i=[];for(const o of e.nodes){o.dimensions.width&&o.dimensions.height&&((null==t?void 0:t.includeHiddenNodes)||!o.hidden)&&(!(null==(n=t.nodes)?void 0:n.length)||(null==(r=t.nodes)?void 0:r.length)&&t.nodes.includes(o.id))&&i.push(o)}if(!i.length)return Promise.resolve(!1);const a=Xo(i),{x:l,y:u,zoom:s}=Ko(a,e.dimensions.width,e.dimensions.height,t.minZoom??e.minZoom,t.maxZoom??e.maxZoom,t.padding??ui);return o(l,u,s,t)},setCenter:(t,n,r)=>{const i=void 0!==(null==r?void 0:r.zoom)?r.zoom:e.maxZoom;return o(e.dimensions.width/2-t*i,e.dimensions.height/2-n*i,i,r)},fitBounds:(t,n={padding:ui})=>{const{x:r,y:i,zoom:a}=Ko(t,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,n.padding??ui);return o(r,i,a,n)},project:t=>Ho(t,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect();return Ho({x:t.x-n,y:t.y-o},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect();return Lo({x:t.x+n,y:t.y+o},e.viewport)}return{x:0,y:0}}}:di))}function hi(e,t=0,n=si,o=()=>{}){const r="number"==typeof t&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e}function pi(e,n,o){const r=t.effectScope(!0);return r.run((()=>{r.run((()=>{let n,r,i=!(!o.nodes.value.length&&!o.edges.value.length);n=c([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(),o.setElements(e),r||i||!e.length?null==r||r.resume():i=!0)})),r=c([o.nodes,o.edges,()=>o.edges.value.length,()=>o.nodes.value.length],(([o,r])=>{var i;(null==(i=e.modelValue)?void 0:i.value)&&Array.isArray(e.modelValue.value)&&(null==n||n.pause(),e.modelValue.value=[...o,...r],t.nextTick((()=>{null==n||n.resume()})))}),{immediate:i}),t.onScopeDispose((()=>{null==n||n.stop(),null==r||r.stop()}))})),r.run((()=>{let n,r,i=!!o.nodes.value.length;n=c([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(),o.setNodes(e),r||i||!e.length?null==r||r.resume():i=!0)})),r=c([o.nodes,()=>o.nodes.value.length],(([o])=>{var r;(null==(r=e.nodes)?void 0:r.value)&&Array.isArray(e.nodes.value)&&(null==n||n.pause(),e.nodes.value=[...o],t.nextTick((()=>{null==n||n.resume()})))}),{immediate:i}),t.onScopeDispose((()=>{null==n||n.stop(),null==r||r.stop()}))})),r.run((()=>{let n,r,i=!!o.edges.value.length;n=c([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(),o.setEdges(e),r||i||!e.length?null==r||r.resume():i=!0)})),r=c([o.edges,()=>o.edges.value.length],(([o])=>{var r;(null==(r=e.edges)?void 0:r.value)&&Array.isArray(e.edges.value)&&(null==n||n.pause(),e.edges.value=[...o],t.nextTick((()=>{null==n||n.resume()})))}),{immediate:i}),t.onScopeDispose((()=>{null==n||n.stop(),null==r||r.stop()}))})),r.run((()=>{t.watch((()=>n.minZoom),(()=>{n.minZoom&&zr(n.minZoom)&&o.setMinZoom(n.minZoom)}),{immediate:!0})}
7)),r.run((()=>{t.watch((()=>n.maxZoom),(()=>{n.maxZoom&&zr(n.maxZoom)&&o.setMaxZoom(n.maxZoom)}),{immediate:!0})})),r.run((()=>{t.watch((()=>n.translateExtent),(()=>{n.translateExtent&&zr(n.translateExtent)&&o.setTranslateExtent(n.translateExtent)}),{immediate:!0})})),r.run((()=>{t.watch((()=>n.nodeExtent),(()=>{n.nodeExtent&&zr(n.nodeExtent)&&o.setNodeExtent(n.nodeExtent)}),{immediate:!0})})),r.run((()=>{t.watch((()=>n.applyDefault),(()=>{zr(n.applyDefault)&&(o.applyDefault.value=n.applyDefault)}),{immediate:!0})})),r.run((()=>{const e=async e=>{let t=e;"function"==typeof n.autoConnect&&(t=await n.autoConnect(e)),!1!==t&&o.addEdges([t])};t.watch((()=>n.autoConnect),(()=>{zr(n.autoConnect)&&(o.autoConnect.value=n.autoConnect)}),{immediate:!0}),t.watch(o.autoConnect,((t,n,r)=>{t?o.onConnect(e):o.hooks.value.connect.off(e),r((()=>{o.hooks.value.connect.off(e)}))}),{immediate:!0})})),(()=>{const e=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const i of Object.keys(n)){const a=i;if(!e.includes(a)){const e=t.toRef((()=>n[a])),i=o[a];t.isRef(i)&&r.run((()=>{t.watch(e,(e=>{zr(e)&&(i.value=e)}),{immediate:!0})}))}}})()})),()=>r.stop()}function vi(){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:lo.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:fo.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:uo.Bezier,style:{}},connectionMode:so.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:Sr()?"Meta":"Control",zoomActivationKeyCode:Sr()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:{edgesChange:sr(),nodesChange:sr(),nodeDoubleClick:sr(),nodeClick:sr(),nodeMouseEnter:sr(),nodeMouseMove:sr(),nodeMouseLeave:sr(),nodeContextMenu:sr(),nodeDragStart:sr(),nodeDrag:sr(),nodeDragStop:sr(),nodesInitialized:sr(),miniMapNodeClick:sr(),miniMapNodeDoubleClick:sr(),miniMapNodeMouseEnter:sr(),miniMapNodeMouseMove:sr(),miniMapNodeMouseLeave:sr(),connect:sr(),connectStart:sr(),connectEnd:sr(),clickConnectStart:sr(),clickConnectEnd:sr(),paneReady:sr(),init:sr(),move:sr(),moveStart:sr(),moveEnd:sr(),selectionDragStart:sr(),selectionDrag:sr(),selectionDragStop:sr(),selectionContextMenu:sr(),selectionStart:sr(),selectionEnd:sr(),viewportChangeStart:sr(),viewportChange:sr(),viewportChangeEnd:sr(),paneScroll:sr(),paneClick:sr(),paneContextMenu:sr(),paneMouseEnter:sr(),paneMouseMove:sr(),paneMouseLeave:sr(),edgeContextMenu:sr(),edgeMouseEnter:sr(),edgeMouseMove:sr(),edgeMouseLeave:sr(),edgeDoubleClick:sr(),edgeClick:sr(),edgeUpdateStart:sr(),edgeUpdate:sr(),edgeUpdateEnd:sr(),updateNodeInternals:sr(),error:sr((e=>Ar(e.message)))},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 gi=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];
7function mi(e,t,n){const o=fi(e),r=t=>{const n=t??[];e.hooks.updateNodeInternals.trigger(n)},i=t=>jo(t,e.edges),a=e=>{if(e)return t.value.get(e)},l=e=>{if(e)return n.value.get(e)},u=(o,r)=>{const i=new Set,a=new Set;for(const e of o)Po(e)?i.add(e.id):Io(e)&&a.add(e.id);const l=lr(t.value,i,!0),u=lr(n.value,a);if(e.multiSelectionActive){for(const e of i)l.push(or(e,r));for(const e of a)u.push(or(e,r))}l.length&&e.hooks.nodesChange.trigger(l),u.length&&e.hooks.edgesChange.trigger(u)},s=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([t,e.maxZoom]),e.minZoom=t},c=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([e.minZoom,t]),e.maxZoom=t},d=t=>{var n;null==(n=e.d3Zoom)||n.translateExtent(t),e.translateExtent=t},f=t=>{const n=t instanceof Function?t(e.nodes):t;(e.initialized||n.length)&&(e.nodes=Lr(n,a,e.hooks.error.trigger))},p=t=>{const o=t instanceof Function?t(e.edges):t;if(!e.initialized&&!o.length)return;const r=Ur(o,e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Yr(e.connectionLookup,n.value,r),e.edges=r},v=t=>{const n=t instanceof Function?t([...e.nodes,...e.edges]):t;(e.initialized||n.length)&&(f(n.filter(Po)),p(n.filter(Io)))},g=e=>{const t=Bo((n=e).width)&&Bo(n.height)&&Bo(n.x)&&Bo(n.y);var n;const o=t?null:To(e)?e:a(e.id);if(!t&&!o)return[null,null,t];return[t?e:_o(o),o,t]},m=t=>{const n=t instanceof Function?t(e):t,o=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];zr(n.defaultEdgeOptions)&&(e.defaultEdgeOptions=n.defaultEdgeOptions);const r=n.modelValue||n.nodes||n.edges?[]:void 0;r&&(n.modelValue&&r.push(...n.modelValue),n.nodes&&r.push(...n.nodes),n.edges&&r.push(...n.edges),v(r));for(const t of Object.keys(n)){const r=t,i=n[r];![...gi,...o].includes(r)&&zr(i)&&(e[r]=i)}h((()=>e.d3Zoom)).not.toBeNull().then((()=>{zr(n.maxZoom)&&c(n.maxZoom),zr(n.minZoom)&&s(n.minZoom),zr(n.translateExtent)&&d(n.translateExtent)})),e.initialized||(e.initialized=!0)};return{updateNodePositions:(t,n,o)=>{var r,i;const l=[];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=a(e.parentNode);t.position={x:t.position.x-((null==(r=null==n?void 0:n.computedPosition)?void 0:r.x)??0),y:t.position.y-((null==(i=null==n?void 0:n.computedPosition)?void 0:i.y)??0)}}l.push(t)}(null==l?void 0:l.length)&&e.hooks.nodesChange.trigger(l)},updateNodeDimensions:t=>{if(!e.vueFlowRef)return;const n=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!n)return;const r=window.getComputedStyle(n),{m22:i}=new window.DOMMatrixReadOnly(r.transform),l=[];for(const e of t){const t=e,n=a(t.id);if(n){const e=No(t.nodeElement);if(!(!e.width||!e.height||n.dimensions.width===e.width&&n.dimensions.height===e.height&&!t.forceUpdate)){const o=t.nodeElement.getBoundingClientRect();n.dimensions=e,n.handleBounds.source=$r("source",t.nodeElement,o,i,n.id),n.handleBounds.target=$r("target",t.nodeElement,o,i,n.id),l.push({id:n.id,type:"dimensions",dimensions:e})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then((()=>{e.fitViewOnInitDone=!0})),l.length&&e.hooks.nodesChange.trigger(l)},setElements:v,setNodes:f,setEdges:p,addNodes:t=>{let n=t instanceof Function?t(e.nodes):t;n=Array.isArray(n)?n:[n];const o=Lr(n,a,e.hooks.error.trigger),r=[];for(const e of o)r.push(rr(e));r.length&&e.hooks.nodesChange.trigger(r)},addEdges:t=>{let n=t instanceof Function?t(e.edges):t;n=Array.isArray(n)?n:[n];const o=Ur(n,e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),r=[];for(const e of o)r.push(rr(e));r.length&&e.hooks.edgesChange.trigger(r)},removeNodes:(t,n=!0,o=!1)=>{const r=t instanceof Function?t(e.nodes):t,l=Array.isArray(r)?r:[r],u=[],s=[];function c(e){const t=i(e);for(const e of t)zr(e.deletable)&&!e.deletable||s.push(ar(e.id,e.source,e.target,e.sourceHandle,e.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)u.push(ir(e.id));n&&c(o);for(const e of o)d(e.id)}}for(const e of l){const t="string"==typeof e?a(e):e;t&&(zr(t.deletable)&&!t.deletable||(u.push(ir(t.id)),n&&c([t]),o&&d(t.id)))}s.length&&e.hooks.edgesChange.trigger(s),u.length&&e.hooks.nodesChange.trigger(u)},removeEdges:t=>{const n=t instanceof Function?t(e.edges):t,o=Array.isArray(n)?n:[n],r=[];for(const e of o){const t="string"==typeof e?l(e):e;t&&(zr(t.deletable)&&!t.deletable||r.push(ar("string"==typeof e?e:e.id,t.source,t.target,t.sourceHandle,t.targetHandle)))}e.hooks.edgesChange.trigger(r)},findNode:a,findEdge:l,updateEdge:(t,o,r=!0)=>{const i=l(t.id);if(!i)return!1;const u=e.edges.indexOf(i),s=function(e,t,n,o,r){if(!t.source||!t.target)return r(new br(wr.EDGE_INVALID,e.
7id)),!1;if(!n)return r(new br(wr.EDGE_NOT_FOUND,e.id)),!1;const{id:i,...a}=e;return{...a,id:o?zo(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}(t,o,i,r,e.hooks.error.trigger);if(s){const[t]=Ur([s],e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map(((e,n)=>n===u?t:e)),Yr(e.connectionLookup,n.value,[t]),t}return!1},updateEdgeData:(e,t,n={replace:!1})=>{const o=l(e);if(!o)return;const r="function"==typeof t?t(o):t;o.data=n.replace?r:{...o.data,...r}},updateNode:(t,n,o={replace:!1})=>{const r=a(t);if(!r)return;const i="function"==typeof n?n(r):n;o.replace?e.nodes.splice(e.nodes.indexOf(r),1,i):Object.assign(r,i)},updateNodeData:(e,t,n={replace:!1})=>{const o=a(e);if(!o)return;const r="function"==typeof t?t(o):t;o.data=n.replace?r:{...o.data,...r}},applyEdgeChanges:t=>{const o=nr(t,e.edges);return Yr(e.connectionLookup,n.value,o),o},applyNodeChanges:t=>nr(t,e.nodes),addSelectedElements:e=>{u(e,!0)},addSelectedNodes:o=>{if(e.multiSelectionActive){const t=o.map((e=>or(e.id,!0)));e.hooks.nodesChange.trigger(t)}else e.hooks.nodesChange.trigger(lr(t.value,new Set(o.map((e=>e.id))),!0)),e.hooks.edgesChange.trigger(lr(n.value))},addSelectedEdges:o=>{if(e.multiSelectionActive){const t=o.map((e=>or(e.id,!0)));e.hooks.edgesChange.trigger(t)}else e.hooks.edgesChange.trigger(lr(n.value,new Set(o.map((e=>e.id))))),e.hooks.nodesChange.trigger(lr(t.value,new Set,!0))},setMinZoom:s,setMaxZoom:c,setTranslateExtent:d,setNodeExtent:t=>{e.nodeExtent=t,r()},setPaneClickDistance:t=>{var n;null==(n=e.d3Zoom)||n.clickDistance(t)},removeSelectedElements:t=>{if(!t||!t.length)return u([],!1);const n=t.reduce(((e,t)=>{const n=or(t.id,!1);return Po(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)},removeSelectedNodes:t=>{const n=(t||e.nodes).map((e=>(e.selected=!1,or(e.id,!1))));e.hooks.nodesChange.trigger(n)},removeSelectedEdges:t=>{const n=(t||e.edges).map((e=>(e.selected=!1,or(e.id,!1))));e.hooks.edgesChange.trigger(n)},startConnection:(t,n,o=!1)=>{o?e.connectionClickStartHandle=t:e.connectionStartHandle=t,e.connectionEndHandle=null,e.connectionStatus=null,n&&(e.connectionPosition=n)},updateConnection:(t,n=null,o=null)=>{e.connectionStartHandle&&(e.connectionPosition=t,e.connectionEndHandle=n,e.connectionStatus=o)},endConnection:(t,n)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,n?e.connectionClickStartHandle=null:e.connectionStartHandle=null},setInteractive:t=>{e.nodesDraggable=t,e.nodesConnectable=t,e.elementsSelectable=t},setState:m,getIntersectingNodes:(t,n=!0,o=e.nodes)=>{const[r,i,a]=g(t);if(!r)return[];const l=[];for(const t of o||e.nodes){if(!(a||t.id!==i.id&&t.computedPosition))continue;const e=_o(t),o=So(e,r);(n&&o>0||o>=e.width*e.height||o>=Number(r.width)*Number(r.height))&&l.push(t)}return l},getIncomers:t=>Vo(t,e.nodes,e.edges),getOutgoers:t=>$o(t,e.nodes,e.edges),getConnectedEdges:i,getHandleConnections:({id:t,type:n,nodeId:o})=>{var r;const i=t?`-${n}-${t}`:`-${n}`;return Array.from((null==(r=e.connectionLookup.get(`${o}${i}`))?void 0:r.values())??[])},isNodeIntersecting:(e,t,n=!0)=>{const[o]=g(e);if(!o)return!1;const r=So(o,t);return n&&r>0||r>=Number(o.width)*Number(o.height)},panBy:t=>{const{viewport:n,dimensions:o,d3Zoom:r,d3Selection:i,translateExtent:a}=e;if(!r||!i||!t.x&&!t.y)return!1;const l=qn.translate(n.x+t.x,n.y+t.y).scale(n.zoom),u=[[0,0],[o.width,o.height]],s=r.constrain()(l,u,a),c=e.viewport.x!==s.x||e.viewport.y!==s.y||e.viewport.zoom!==s.k;return r.transform(i,s),c},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:()=>{const t=[],n=[];for(const n of e.nodes){const{computedPosition:e,handleBounds:o,selected:r,dimensions:i,isParent:a,resizing:l,dragging:u,events:s,...c}=n;t.push(c)}for(const t of e.edges){const{selected:e,sourceNode:o,targetNode:r,events:i,...a}=t;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}))},fromObject:t=>new Promise((n=>{const{nodes:r,edges:i,position:a,zoom:l,viewport:u}=t;r&&f(r),i&&p(i);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 h((()=>o.value.viewportInitialized)).toBe(!0).then((()=>{o.value.setViewport({x:s,y:c,zoom:t}).then((()=>{n(!0)}))}))}n(!0)})),updateNodeInternals:r,viewportHelper:o,$reset:()=>{const t=vi();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const n=qn.translate(t.defaultViewport.x??0,t.defaultViewport.y??0).scale(ko(t.defaultViewport.zoom??1,t.minZoom,t.maxZoom)),o=e.viewportRef.getBoundingClientRect(),r=[[0,0],[o.width,o.height]],i=e.d3Zoom.constrain()(n,r,t.translateExtent);e.d3Zoom.transform(e.d3Selection,i)}m(t)},$destroy:()=>{}}}const yi=["data-id","data-handleid","data-nodeid","data-handlepos"],wi=t.defineComponent({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>ao.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:n}){const o=t.createPropsRestProxy(e,["position","connectable","connectableStart","connectableEnd","id"]),r=t.toRef((()=>o.type??"source")),i=t.toRef((()=>o.isValidConnection??null)),{id:a,connectionStartHandle:l,connectionClickStartHandle:u,connectionEndHandle:s,vueFlowRef:c,nodesConnectable:d,noDragClassName:f,noPanClassName:h}=Qi(),{id:p,node:v,nodeEl:g,connectedEdges:m}=ii(),y=t.ref(),w=t.toRef((()=>void 0===e.connectableStart||e.connectableStart)),x=t.toRef((()=>void 0===e.connectableEnd||e.connectableEnd)),b=t.toRef((()=>{var t,n,o,i,a,u;return(null==(t=l.value)?void 0:t.nodeId)===p&&(null==(n=l.value)?void 0:n.id)===e.id&&(null==(o=l.value)?void 0:o.type)===r.value||(null==(i=s.value)?void 0:i.nodeId)===p&&(null==(a=s.value)?void 0:a.id)===e.id&&(null==(u=s.value)?void 0:u.type)===r.value})),E=t.toRef((()=>{var t,n,o;return(null==(t=u.value)?void 0:t.nodeId)===p&&(null==(n=u.value)?void 0:n.id)===e.id&&(null==(o=u.value)?void 0:o.type)===r.value})),{handlePointerDown:_,handleClick:S}=oi({nodeId:p,handleId:e.id,isValidConnection:i,type:r}),N=t.computed((()=>"string"==typeof e.connectable&&"single"===e.connectable?!m.value.some((t=>{const n=t[`${r.value}Handle`];return t[r.value]===p&&(!n||n===e.id)}
7)):"number"==typeof e.connectable?m.value.filter((t=>{const n=t[`${r.value}Handle`];return t[r.value]===p&&(!n||n===e.id)})).length<e.connectable:"function"==typeof e.connectable?e.connectable(v,m.value):zr(e.connectable)?e.connectable:d.value));function k(e){const t=Er(e);N.value&&w.value&&(t&&0===e.button||!t)&&_(e)}function C(e){p&&(u.value||w.value)&&N.value&&S(e)}return t.onMounted((()=>{var t;if(!v.dimensions.width||!v.dimensions.height)return;const n=null==(t=v.handleBounds[r.value])?void 0:t.find((t=>t.id===e.id));if(!c.value||n)return;const o=c.value.querySelector(".vue-flow__transformationpane");if(!(g.value&&y.value&&o&&e.id))return;const i=g.value.getBoundingClientRect(),a=y.value.getBoundingClientRect(),l=window.getComputedStyle(o),{m22:u}=new window.DOMMatrixReadOnly(l.transform),s={id:e.id,position:e.position,x:(a.left-i.left)/u,y:(a.top-i.top)/u,type:r.value,nodeId:p,...No(y.value)};v.handleBounds[r.value]=[...v.handleBounds[r.value]??[],s]})),n({handleClick:S,handlePointerDown:_,onClick:C,onPointerDown:k}),(n,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"handle",ref:y,"data-id":`${t.unref(a)}-${t.unref(p)}-${e.id}-${r.value}`,"data-handleid":e.id,"data-nodeid":t.unref(p),"data-handlepos":n.position,class:t.normalizeClass(["vue-flow__handle",[`vue-flow__handle-${n.position}`,`vue-flow__handle-${e.id}`,t.unref(f),t.unref(h),r.value,{connectable:N.value,connecting:E.value,connectablestart:w.value,connectableend:x.value,connectionindicator:N.value&&(w.value&&!b.value||x.value&&b.value)}]]),onMousedown:k,onTouchstartPassive:k,onClick:C},[t.renderSlot(n.$slots,"default",{id:n.id})],42,yi))}}),xi=function({sourcePosition:e=ao.Bottom,targetPosition:n=ao.Top,label:o,connectable:r=!0,isValidTargetPos:i,isValidSourcePos:a,data:l}){const u=l.label??o;return[t.h(wi,{type:"target",position:n,connectable:r,isValidConnection:i}),"string"!=typeof u&&u?t.h(u):t.h(t.Fragment,[u]),t.h(wi,{type:"source",position:e,connectable:r,isValidConnection:a})]};xi.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],xi.inheritAttrs=!1,xi.compatConfig={MODE:3};const bi=xi,Ei=function({targetPosition:e=ao.Top,label:n,connectable:o=!0,isValidTargetPos:r,data:i}){const a=i.label??n;return[t.h(wi,{type:"target",position:e,connectable:o,isValidConnection:r}),"string"!=typeof a&&a?t.h(a):t.h(t.Fragment,[a])]};Ei.props=["targetPosition","label","isValidTargetPos","connectable","data"],Ei.inheritAttrs=!1,Ei.compatConfig={MODE:3};const _i=Ei,Si=function({sourcePosition:e=ao.Bottom,label:n,connectable:o=!0,isValidSourcePos:r,data:i}){const a=i.label??n;return["string"!=typeof a&&a?t.h(a):t.h(t.Fragment,[a]),t.h(wi,{type:"source",position:e,connectable:o,isValidConnection:r})]};Si.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Si.inheritAttrs=!1,Si.compatConfig={MODE:3};const Ni=Si,ki=["transform"],Ci=["width","height","x","y","rx","ry"],Mi=["y"],Ii=t.defineComponent({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const n=t.ref({x:0,y:0,width:0,height:0}),o=t.ref(null),r=t.computed((()=>`translate(${e.x-n.value.width/2} ${e.y-n.value.height/2})`));function i(){if(!o.value)return;const e=o.value.getBBox();e.width===n.value.width&&e.height===n.value.height||(n.value=e)}return t.onMounted(i),t.watch([()=>e.x,()=>e.y,o,()=>e.label],i),(e,i)=>(t.openBlock(),t.createElementBlock("g",{transform:r.value,class:"vue-flow__edge-textwrapper"},[e.labelShowBg?(t.openBlock(),t.createElementBlock("rect",{key:0,class:"vue-flow__edge-textbg",width:`${n.value.width+2*e.labelBgPadding[0]}px`,height:`${n.value.height+2*e.labelBgPadding[1]}px`,x:-e.labelBgPadding[0],y:-e.labelBgPadding[1],style:t.normalizeStyle(e.labelBgStyle),rx:e.labelBgBorderRadius,ry:e.labelBgBorderRadius},null,12,Ci)):t.createCommentVNode("",!0),t.createElementVNode("text",t.mergeProps(e.$attrs,{ref_key:"el",ref:o,class:"vue-flow__edge-text",y:n.value.height/2,dy:"0.3em",style:e.labelStyle}),[t.renderSlot(e.$slots,"default",{},(()=>["string"!=typeof e.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.label),{key:0})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))]))],16,Mi)],8,ki))}}),Pi=["id","d","marker-end","marker-start"],Ti=["d","stroke-width"],Bi=t.defineComponent({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:n}){const o=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.useAttrs();return n({pathEl:o,interactionEl:r,labelEl:i}),(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("path",t.mergeProps(t.unref(a),{id:e.id,ref_key:"pathEl",ref:o,d:e.path,class:"vue-flow__edge-path","marker-end":e.markerEnd,"marker-start":e.markerStart}),null,16,Pi),e.interactionWidth?(t.openBlock(),t.createElementBlock("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,Ti)):t.createCommentVNode("",!0),e.label&&e.labelX&&e.labelY?(t.openBlock(),t.createBlock(Ii,{key:1,ref_key:"labelEl",ref:i,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"])):t.createCommentVNode("",!0)],64))}});function Di({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2;return[i,o<t?o+a:o-a,r,a]}function Ai({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:l}
7){const u=.125*e+.375*r+.375*a+.125*n,s=.125*t+.375*i+.375*l+.125*o;return[u,s,Math.abs(u-e),Math.abs(s-t)]}function Oi(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function $i({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let a,l;switch(e){case ao.Left:a=t-Oi(t-o,i),l=n;break;case ao.Right:a=t+Oi(o-t,i),l=n;break;case ao.Top:a=t,l=n-Oi(n-r,i);break;case ao.Bottom:a=t,l=n+Oi(r-n,i)}return[a,l]}function Vi(e){const{sourceX:t,sourceY:n,sourcePosition:o=ao.Bottom,targetX:r,targetY:i,targetPosition:a=ao.Top,curvature:l=.25}=e,[u,s]=$i({pos:o,x1:t,y1:n,x2:r,y2:i,c:l}),[c,d]=$i({pos:a,x1:r,y1:i,x2:t,y2:n,c:l}),[f,h,p,v]=Ai({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:u,sourceControlY:s,targetControlX:c,targetControlY:d});return[`M${t},${n} C${u},${s} ${c},${d} ${r},${i}`,f,h,p,v]}function zi({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,a;switch(e){case ao.Left:case ao.Right:i=.5*(t+o),a=n;break;case ao.Top:case ao.Bottom:i=t,a=.5*(n+r)}return[i,a]}function Ri(e){const{sourceX:t,sourceY:n,sourcePosition:o=ao.Bottom,targetX:r,targetY:i,targetPosition:a=ao.Top}=e,[l,u]=zi({pos:o,x1:t,y1:n,x2:r,y2:i}),[s,c]=zi({pos:a,x1:r,y1:i,x2:t,y2:n}),[d,f,h,p]=Ai({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:l,sourceControlY:u,targetControlX:s,targetControlY:c});return[`M${t},${n} C${l},${u} ${s},${c} ${r},${i}`,d,f,h,p]}const Li={[ao.Left]:{x:-1,y:0},[ao.Right]:{x:1,y:0},[ao.Top]:{x:0,y:-1},[ao.Bottom]:{x:0,y:1}};function Hi(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Yi({source:e,sourcePosition:t=ao.Bottom,target:n,targetPosition:o=ao.Top,center:r,offset:i}){const a=Li[t],l=Li[o],u={x:e.x+a.x*i,y:e.y+a.y*i},s={x:n.x+l.x*i,y:n.y+l.y*i},c=function({source:e,sourcePosition:t=ao.Bottom,target:n}){return t===ao.Left||t===ao.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}}({source:u,sourcePosition:t,target:s}),d=0!==c.x?"x":"y",f=c[d];let h,p,v;const g={x:0,y:0},m={x:0,y:0},[y,w,x,b]=Di({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*l[d]==-1){p=r.x??y,v=r.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}];h=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const r=[{x:u.x,y:s.y}],c=[{x:s.x,y:u.y}];if(h="x"===d?a.x===f?c:r:a.y===f?r:c,t===o){const t=Math.abs(e[d]-n[d]);if(t<=i){const o=Math.min(i-1,i-t);a[d]===f?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];(1===a[d]&&(!t&&n||t&&o)||1!==a[d]&&(!t&&o||t&&n))&&(h="x"===d?r: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-h[0].x),Math.abs(w.x-h[0].x))>=Math.max(Math.abs(y.y-h[0].y),Math.abs(w.y-h[0].y))?(p=(y.x+w.x)/2,v=h[0].y):(p=h[0].x,v=(y.y+w.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...h,{x:s.x+m.x,y:s.y+m.y},n],p,v,x,b]}function Fi(e){const{sourceX:t,sourceY:n,sourcePosition:o=ao.Bottom,targetX:r,targetY:i,targetPosition:a=ao.Top,borderRadius:l=5,centerX:u,centerY:s,offset:c=20}=e,[d,f,h,p,v]=Yi({source:{x:t,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:u,y:s},offset:c});return[d.reduce(((e,t,n)=>{let o;return o=n>0&&n<d.length-1?function(e,t,n,o){const r=Math.min(Hi(e,t)/2,Hi(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a)return`L ${i+r*(e.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+r*(e.y<n.y?1:-1)}`;const l=e.x<n.x?1:-1;return`L ${i},${a+r*(e.y<n.y?-1:1)}Q ${i},${a} ${i+r*l},${a}`}(d[n-1],t,d[n+1],l):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=o}),""),f,h,p,v]}function Gi(e){const{sourceX:t,sourceY:n,targetX:o,targetY:r}=e,[i,a,l,u]=Di({sourceX:t,sourceY:n,targetX:o,targetY:r});return[`M ${t},${n}L ${o},${r}`,i,a,l,u]}const Xi=t.defineComponent({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup:(e,{attrs:n})=>()=>{const[o,r,i]=Gi(e);return t.h(Bi,{path:o,labelX:r,labelY:i,...n,...e})}}),Ui=t.defineComponent({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:n})=>()=>{const[o,r,i]=Fi({...e,sourcePosition:e.sourcePosition??ao.Bottom,targetPosition:e.targetPosition??ao.Top});return t.h(Bi,{path:o,labelX:r,labelY:i,...n,...e})}}),ji=t.defineComponent({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup:(e,{attrs:n})=>()=>t.h(Ui,{...e,...n,borderRadius:0})}),Zi=t.defineComponent({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:n})=>()=>{const[o,r,i]=Vi({...e,sourcePosition:e.sourcePosition??ao.Bottom,targetPosition:e.targetPosition??ao.Top});return t.h(Bi,{path:o,labelX:r,labelY:i,...n,...e})}}),Ki=t.defineComponent({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup:(e,{attrs:n})=>()=>{const[o,r,i]=Ri({...e,sourcePosition:e.sourcePosition??ao.Bottom,targetPosition:e.targetPosition??ao.Top});return t.h(Bi,{path:o,labelX:r,labelY:i,...n,...e})}}),Wi={input:Ni,default:bi,output:_i},qi={default:Zi,straight:Xi,step:ji,smoothstep:Ui,simplebezier:Ki};class Ji{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var e;const n=null==(e=t.getCurrentInstance())?void 0:e.appContext.app,o=(null==n?void 0:n.config.globalProperties.$vueFlowStorage)??Ji.instance;return Ji.instance=o??new Ji,n&&(n.config.globalProperties.$vueFlowStorage=Ji.instance),Ji.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,n){const o=vi(),r=t.reactive(o),i={};for(const[e,t]of Object.entries(r.hooks)){i[`on${e.charAt(0).toUpperCase()+e.slice(1)}`]=t.on}const a={};for(const[e,t]of Object.entries(r.hooks))a[e]=t.trigger;const l=t.computed((()=>{const e=new Map;
7for(const t of r.nodes)e.set(t.id,t);return e})),u=t.computed((()=>{const e=new Map;for(const t of r.edges)e.set(t.id,t);return e})),s=function(e,n,o){const r=t.computed((()=>e=>n.value.get(e))),i=t.computed((()=>e=>o.value.get(e))),a=t.computed((()=>{const t={...qi,...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=t.computed((()=>{const t={...Wi,...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=t.computed((()=>e.onlyRenderVisibleElements?Uo(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes)),s=t.computed((()=>{if(e.onlyRenderVisibleElements){const t=[];for(const o of e.edges){const r=n.value.get(o.source),i=n.value.get(o.target);mr({sourcePos:r.computedPosition||{x:0,y:0},targetPos:i.computedPosition||{x:0,y:0},sourceWidth:r.dimensions.width,sourceHeight:r.dimensions.height,targetWidth:i.dimensions.width,targetHeight:i.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&t.push(o)}return t}return e.edges})),c=t.computed((()=>[...u.value,...s.value])),d=t.computed((()=>{const t=[];for(const n of e.nodes)n.selected&&t.push(n);return t})),f=t.computed((()=>{const t=[];for(const n of e.edges)n.selected&&t.push(n);return t})),h=t.computed((()=>[...d.value,...f.value])),p=t.computed((()=>{const t=[];for(const n of e.nodes)n.dimensions.width&&n.dimensions.height&&void 0!==n.handleBounds&&t.push(n);return t})),v=t.computed((()=>u.value.length>0&&p.value.length===u.value.length));return{getNode:r,getEdge:i,getElements:c,getEdgeTypes:a,getNodeTypes:l,getEdges:s,getNodes:u,getSelectedElements:h,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:p,areNodesInitialized:v}}(r,l,u),c=mi(r,l,u);c.setState({...r,...n});const f={...i,...s,...c,...d(r),nodeLookup:l,edgeLookup:u,emits:a,id:e,vueFlowVersion:"1.48.0",$destroy:()=>{this.remove(e)}};return this.set(e,f),f}getId(){return"vue-flow-"+this.currentId++}}function Qi(e){const o=Ji.getInstance(),r=t.getCurrentScope(),i="object"==typeof e,a=i?e:{id:e},l=a.id,u=l??(null==r?void 0:r.vueFlowId);let s;if(r){const e=t.inject(jr,null);null==e||u&&e.id!==u||(s=e)}if(s||u&&(s=o.get(u)),!s||u&&s.id!==u){const e=l??o.getId(),i=o.create(e,a);s=i;(r??t.effectScope(!0)).run((()=>{t.watch(i.applyDefault,((e,t,n)=>{const o=e=>{i.applyNodeChanges(e)},r=e=>{i.applyEdgeChanges(e)};e?(i.onNodesChange(o),i.onEdgesChange(r)):(i.hooks.value.nodesChange.off(o),i.hooks.value.edgesChange.off(r)),n((()=>{i.hooks.value.nodesChange.off(o),i.hooks.value.edgesChange.off(r)}))}),{immediate:!0}),n((()=>{if(s){const e=o.get(s.id);e?e.$destroy():Ar(`No store instance found for id ${s.id} in storage.`)}}))}))}else i&&s.setState(a);if(r&&(t.provide(jr,s),r.vueFlowId=s.id),i){const e=t.getCurrentInstance();"VueFlow"!==(null==e?void 0:e.type.name)&&s.emits.error(new br(wr.USEVUEFLOW_OPTIONS))}return s}const ea=t.defineComponent({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup:e=>(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"vue-flow__selection vue-flow__container",style:t.normalizeStyle({width:`${e.userSelectionRect.width}px`,height:`${e.userSelectionRect.height}px`,transform:`translate(${e.userSelectionRect.x}px, ${e.userSelectionRect.y}px)`})},null,4))}),ta=["tabIndex"],na=t.defineComponent({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:n,viewport:o,getSelectedNodes:r,noPanClassName:i,disableKeyboardA11y:a,userSelectionActive:l}=Qi(),u=li(),s=t.ref(null),c=Qr({el:s,onStart(e){n.selectionDragStart(e),n.nodeDragStart(e)},onDrag(e){n.selectionDrag(e),n.nodeDrag(e)},onStop(e){n.selectionDragStop(e),n.nodeDragStop(e)}});t.onMounted((()=>{var e;a.value||null==(e=s.value)||e.focus({preventScroll:!0})}
7));const d=t.computed((()=>Xo(r.value))),f=t.computed((()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`})));function h(e){n.selectionContextMenu({event:e,nodes:r.value})}function p(e){a.value||Eo[e.key]&&(e.preventDefault(),u({x:Eo[e.key].x,y:Eo[e.key].y},e.shiftKey))}return(e,n)=>!t.unref(l)&&d.value.width&&d.value.height?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["vue-flow__nodesselection vue-flow__container",t.unref(i)]),style:t.normalizeStyle({transform:`translate(${t.unref(o).x}px,${t.unref(o).y}px) scale(${t.unref(o).zoom})`})},[t.createElementVNode("div",{ref_key:"el",ref:s,class:t.normalizeClass([{dragging:t.unref(c)},"vue-flow__nodesselection-rect"]),style:t.normalizeStyle(f.value),tabIndex:t.unref(a)?void 0:-1,onContextmenu:h,onKeydown:p},null,46,ta)],6)):t.createCommentVNode("",!0)}});const oa=t.defineComponent({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:n,nodes:o,viewport:r,emits:i,userSelectionActive:a,removeSelectedElements:l,userSelectionRect:u,elementsSelectable:s,nodesSelectionActive:c,getSelectedEdges:d,getSelectedNodes:f,removeNodes:h,removeEdges:p,selectionMode:v,deleteKeyCode:g,multiSelectionKeyCode:m,multiSelectionActive:y,edgeLookup:w,nodeLookup:x,connectionLookup:b,defaultEdgeOptions:E,connectionStartHandle:_}=Qi(),S=t.ref(null),N=t.ref(new Set),k=t.ref(new Set),C=t.ref(),M=t.toRef((()=>s.value&&(e.isSelecting||a.value))),I=t.toRef((()=>null!==_.value));let P=!1,T=!1;const B=yo(g,{actInsideInputWithModifier:!1}),D=yo(m);function A(e,t){return n=>{n.target===t&&(null==e||e(n))}}function O(e){P||I.value?P=!1:(i.paneClick(e),l(),c.value=!1)}function $(e){e.preventDefault(),e.stopPropagation(),i.paneContextMenu(e)}function V(e){i.paneScroll(e)}return t.watch(B,(e=>{e&&(h(f.value),p(d.value),c.value=!1)})),t.watch(D,(e=>{y.value=e})),(d,h)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:S,class:t.normalizeClass(["vue-flow__pane vue-flow__container",{selection:d.isSelecting}]),onClick:h[0]||(h[0]=e=>M.value?void 0:A(O,S.value)(e)),onContextmenu:h[1]||(h[1]=e=>A($,S.value)(e)),onWheelPassive:h[2]||(h[2]=e=>A(V,S.value)(e)),onPointerenter:h[3]||(h[3]=e=>M.value?void 0:t.unref(i).paneMouseEnter(e)),onPointerdown:h[4]||(h[4]=o=>M.value?function(t){var o,r,a;
7if(C.value=null==(o=n.value)?void 0:o.getBoundingClientRect(),!s.value||!e.isSelecting||0!==t.button||t.target!==S.value||!C.value)return;null==(a=null==(r=t.target)?void 0:r.setPointerCapture)||a.call(r,t.pointerId);const{x:c,y:d}=function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(t,C.value);T=!0,P=!1,l(),u.value={width:0,height:0,startX:c,startY:d,x:c,y:d},i.selectionStart(t)}(o):t.unref(i).paneMouseMove(o)),onPointermove:h[5]||(h[5]=e=>M.value?function(e){var t;if(!C.value||!u.value)return;P=!0;const{x:n,y:l}=_r(e,C.value),{startX:s=0,startY:d=0}=u.value,f={startX:s,startY:d,x:n<s?n:s,y:l<d?l:d,width:Math.abs(n-s),height:Math.abs(l-d)},h=N.value,p=k.value;N.value=new Set(Uo(o.value,f,r.value,v.value===lo.Partial,!0).map((e=>e.id))),k.value=new Set;const g=(null==(t=E.value)?void 0:t.selectable)??!0;for(const e of N.value){const t=b.value.get(e);if(t)for(const{edgeId:e}of t.values()){const t=w.value.get(e);t&&(t.selectable??g)&&k.value.add(e)}}if(!Xr(h,N.value)){const e=lr(x.value,N.value,!0);i.nodesChange(e)}if(!Xr(p,k.value)){const e=lr(w.value,k.value);i.edgesChange(e)}u.value=f,a.value=!0,c.value=!1}(e):t.unref(i).paneMouseMove(e)),onPointerup:h[6]||(h[6]=t=>M.value?function(t){var n;0===t.button&&T&&(null==(n=t.target)||n.releasePointerCapture(t.pointerId),!a.value&&u.value&&t.target===S.value&&O(t),a.value=!1,u.value=null,c.value=N.value.size>0,i.selectionEnd(t),e.selectionKeyPressed&&(P=!1),T=!1)}(t):void 0),onPointerleave:h[7]||(h[7]=e=>t.unref(i).paneMouseLeave(e))},[t.renderSlot(d.$slots,"default"),t.unref(a)&&t.unref(u)?(t.openBlock(),t.createBlock(ea,{key:0,"user-selection-rect":t.unref(u)},null,8,["user-selection-rect"])):t.createCommentVNode("",!0),t.unref(c)&&t.unref(f).length?(t.openBlock(),t.createBlock(na,{key:1})):t.createCommentVNode("",!0)],34))}}),ra=t.defineComponent({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:n,fitViewOnInit:o,fitViewOnInitDone:r}=Qi(),i=t.computed((()=>!!o.value&&!r.value)),a=t.computed((()=>`translate(${n.value.x}px,${n.value.y}px) scale(${n.value.zoom})`));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"vue-flow__transformationpane vue-flow__container",style:t.normalizeStyle({transform:a.value,opacity:i.value?0:void 0})},[t.renderSlot(e.$slots,"default")],4))}}),ia=t.defineComponent({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:n,maxZoom:o,defaultViewport:r,translateExtent:i,zoomActivationKeyCode:a,selectionKeyCode:l,panActivationKeyCode:u,panOnScroll:s,panOnScrollMode:c,panOnScrollSpeed:d,panOnDrag:f,zoomOnDoubleClick:h,zoomOnPinch:p,zoomOnScroll:v,preventScrolling:g,noWheelClassName:m,noPanClassName:y,emits:w,connectionStartHandle:b,userSelectionActive:E,paneDragging:_,d3Zoom:S,d3Selection:N,d3ZoomHandler:k,viewport:C,viewportRef:M,paneClickDistance:I}=Qi();!function(e){const{emits:n,dimensions:o}=Qi();let r;t.onMounted((()=>{const i=()=>{var t,r;if(!e.value||!((null==(r=(t=e.value).checkVisibility)?void 0:r.call(t))??1))return;const i=No(e.value);0!==i.width&&0!==i.height||n.error(new br(wr.MISSING_VIEWPORT_DIMENSIONS)),o.value={width:i.width||500,height:i.height||500}};i(),window.addEventListener("resize",i),e.value&&(r=new ResizeObserver((()=>i())),r.observe(e.value)),t.onBeforeUnmount((()=>{window.removeEventListener("resize",i),r&&e.value&&r.unobserve(e.value)}))}))}(M);const P=t.shallowRef(!1),T=t.shallowRef(!1);let B=null,D=!1,A=0,O={x:0,y:0,zoom:0};const $=yo(u),V=yo(l),z=yo(a),R=t.toRef((()=>(!V.value||V.value&&!0===l.value)&&($.value||f.value))),L=t.toRef((()=>$.value||s.value)),H=t.toRef((()=>V.value||!0===l.value&&!0!==R.value)),Y=t.toRef((()=>null!==b.value));function F(e,t){return 2===t&&Array.isArray(e)&&e.includes(2)}function G(e){return{x:e.x,y:e.y,zoom:e.k}}function X(e,t){return e.target.closest(`.${t}`)}return t.onMounted((()=>{if(!M.value)return void Ar("Viewport element is missing");const e=M.value,a=e.getBoundingClientRect(),u=function(){var e,t,n,o=eo,r=to,i=io,a=oo,l=ro,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,d=qt,f=x("start","zoom","end"),h=0,p=10;function v(e){e.property("__zoom",no).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",N).filter(l).on("touchstart.zoom",k).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(u[0],Math.min(u[1],t)))===e.k?e:new Wn(t,e.x,e.y)}function m(e,t,n){var o=t[0]-n[0]*e.k,r=t[1]-n[1]*e.k;return o===e.x&&r===e.y?e:new Wn(e.k,o,r)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function w(e,t,n,o){e.on("start.zoom",(function(){b(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).event(o).end()})).tween("zoom",(function(){var e=this,i=arguments,a=b(e,i).event(o),l=r.apply(e,i),u=null==n?y(l):"function"==typeof n?n.apply(e,i):n,s=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,f="function"==typeof t?t.apply(e,i):t,h=d(c.invert(u).concat(s/c.k),f.invert(u).concat(s/f.k));return function(e){if(1===e)e=f;else{var t=h(e),n=s/t[2];e=new Wn(n,u[0]-t[0]*n,u[1]-t[1]*n)}a.zoom(null,e)}}))}function b(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=r.apply(e,t),this.taps=0}function _(e,...t){if(o.apply(this,arguments)){var n=b(this,t).event(e),r=this.__zoom,l=Math.max(u[0],Math.min(u[1],r.k*Math.pow(2,a.apply(this,arguments)))),c=Ve(e);
vendor: 4,260 bytes, line 7
7if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=r.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(r.k===l)return;n.mouse=[c,r.invert(c)],_n(this),n.start()}Qn(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(m(g(r,l),n.mouse[0],n.mouse[1]),n.extent,s))}}function S(e,...t){if(!n&&o.apply(this,arguments)){var r=e.currentTarget,a=b(this,t,!0).event(e),l=$e(e.view).on("mousemove.zoom",(function(e){if(Qn(e),!a.moved){var t=e.clientX-c,n=e.clientY-d;a.moved=t*t+n*n>h}a.event(e).zoom("mouse",i(m(a.that.__zoom,a.mouse[0]=Ve(e,r),a.mouse[1]),a.extent,s))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),Fe(e.view,a.moved),Qn(e),a.event(e).end()}),!0),u=Ve(e,r),c=e.clientX,d=e.clientY;Ye(e.view),Jn(e),a.mouse=[u,this.__zoom.invert(u)],_n(this),a.start()}}function N(e,...t){if(o.apply(this,arguments)){var n=this.__zoom,a=Ve(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),u=n.k*(e.shiftKey?.5:2),d=i(m(g(n,u),a,l),r.apply(this,t),s);Qn(e),c>0?$e(this).transition().duration(c).call(w,d,a,e):$e(this).call(v.transform,d,a,e)}}function k(n,...r){if(o.apply(this,arguments)){var i,a,l,u,s=n.touches,c=s.length,d=b(this,r,n.changedTouches.length===c).event(n);for(Jn(n),a=0;a<c;++a)u=[u=Ve(l=s[a],this),this.__zoom.invert(u),l.identifier],d.touch0?d.touch1||d.touch0[2]===u[2]||(d.touch1=u,d.taps=0):(d.touch0=u,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=u[0],e=setTimeout((function(){e=null}),500)),_n(this),d.start())}}function C(e,...t){if(this.__zooming){var n,o,r,a,l=b(this,t).event(e),u=e.changedTouches,c=u.length;for(Qn(e),n=0;n<c;++n)r=Ve(o=u[n],this),l.touch0&&l.touch0[2]===o.identifier?l.touch0[0]=r:l.touch1&&l.touch1[2]===o.identifier&&(l.touch1[0]=r);if(o=l.that.__zoom,l.touch1){var d=l.touch0[0],f=l.touch0[1],h=l.touch1[0],p=l.touch1[1],v=(v=h[0]-d[0])*v+(v=h[1]-d[1])*v,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;o=g(o,Math.sqrt(v/y)),r=[(d[0]+h[0])/2,(d[1]+h[1])/2],a=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!l.touch0)return;r=l.touch0[0],a=l.touch0[1]}l.zoom("touch",i(m(o,r,a),l.extent,s))}}function M(e,...o){if(this.__zooming){var r,i,a=b(this,o).event(e),l=e.changedTouches,u=l.length;for(Jn(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),r=0;r<u;++r)i=l[r],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.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&&(i=Ve(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<p)){var s=$e(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return v.transform=function(e,t,n,o){var r=e.selection?e.selection():e;r.property("__zoom",no),e!==r?w(e,t,n,o):r.interrupt().each((function(){b(this,arguments).event(o).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,o){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,o)},v.scaleTo=function(e,t,n,o){v.transform(e,(function(){var e=r.apply(this,arguments),o=this.__zoom,a=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"==typeof t?t.apply(this,arguments):t;return i(m(g(o,u),a,l),e,s)}),n,o)},v.translateBy=function(e,t,n,o){v.transform(e,(function(){return i(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),s)}),null,o)},v.translateTo=function(e,t,n,o,a){v.transform(e,(function(){var e=r.apply(this,arguments),a=this.__zoom,l=null==o?y(e):"function"==typeof o?o.apply(this,arguments):o;return i(qn.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("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
7("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=$e(this.that).datum();f.call(e,this.that,new Kn(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:f}),t)}},v.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:Zn(+e),v):a},v.filter=function(e){return arguments.length?(o="function"==typeof e?e:Zn(!!e),v):o},v.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Zn(!!e),v):l},v.extent=function(e){return arguments.length?(r="function"==typeof e?e:Zn([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):r},v.scaleExtent=function(e){return arguments.length?(u[0]=+e[0],u[1]=+e[1],v):[u[0],u[1]]},v.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],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(i=e,v):i},v.duration=function(e){return arguments.length?(c=+e,v):c},v.interpolate=function(e){return arguments.length?(d=e,v):d},v.on=function(){var e=f.on.apply(f,arguments);return e===f?v:e},v.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,v):Math.sqrt(h)},v.tapDistance=function(e){return arguments.length?(p=+e,v):p},v}().clickDistance(I.value).scaleExtent([n.value,o.value]).translateExtent(i.value),b=$e(e).call(u),V=b.on("wheel.zoom"),H=qn.translate(r.value.x??0,r.value.y??0).scale(ko(r.value.zoom??1,n.value,o.value)),U=[[0,0],[a.width,a.height]],j=u.constrain()(H,U,i.value);u.transform(b,j),u.wheelDelta(Jo),S.value=u,N.value=b,k.value=V,C.value={x:j.x,y:j.y,zoom:j.k},u.on("start",(e=>{var t;if(!e.sourceEvent)return null;A=e.sourceEvent.button,P.value=!0;const n=G(e.transform);"mousedown"===(null==(t=e.sourceEvent)?void 0:t.type)&&(_.value=!0),O=n,w.viewportChangeStart(n),w.moveStart({event:e,flowTransform:n})})),u.on("end",(e=>{if(!e.sourceEvent)return null;if(P.value=!1,_.value=!1,F(R.value,A??0)&&!D&&w.paneContextMenu(e.sourceEvent),D=!1,t=O,n=e.transform,t.x!==n.x&&!Number.isNaN(n.x)||t.y!==n.y&&!Number.isNaN(n.y)||t.zoom!==n.k&&!Number.isNaN(n.k)){const t=G(e.transform);O=t,w.viewportChangeEnd(t),w.moveEnd({event:e,flowTransform:t})}var t,n})),u.filter((e=>{var t;const n=z.value||v.value,o=p.value&&e.ctrlKey,r=e.button,i="wheel"===e.type;if(1===r&&"mousedown"===e.type&&(X(e,"vue-flow__node")||X(e,"vue-flow__edge")))return!0;if(!(R.value||n||L.value||h.value||p.value))return!1;if(E.value)return!1;if(Y.value&&!i)return!1;if(!h.value&&"dblclick"===e.type)return!1;if(X(e,m.value)&&i)return!1;if(X(e,y.value)&&(!i||L.value&&i&&!z.value))return!1;if(!p.value&&e.ctrlKey&&i)return!1;if(!n&&!L.value&&!o&&i)return!1;if(!p&&"touchstart"===e.type&&(null==(t=e.touches)?void 0:t.length)>1)return e.preventDefault(),!1;if(!R.value&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(!0===l.value&&Array.isArray(f.value)&&f.value.includes(0)&&0===r)return!1;if(Array.isArray(f.value)&&!f.value.includes(r)&&("mousedown"===e.type||"touchstart"===e.type))return!1;const a=Array.isArray(f.value)&&f.value.includes(r)||!0===l.value&&Array.isArray(f.value)&&!f.value.includes(0)||!r||r<=1;return(!e.ctrlKey||$.value||i)&&a})),t.watch([E,R],(()=>{E.value&&!P.value?u.on("zoom",null):E.value||u.on("zoom",(e=>{C.value={x:e.transform.x,y:e.transform.y,zoom:e.transform.k};const t=G(e.transform);D=F(R.value,A??0),w.viewportChange(t),w.move({event:e,flowTransform:t})}))}),{immediate:!0}),t.watch([E,L,c,z,p,g,m],(()=>{!L.value||z.value||E.value?void 0!==V&&b.on("wheel.zoom",(function(e,t){const n=!g.value&&"wheel"===e.type&&!e.ctrlKey,o=z.value||v.value,r=p.value&&e.ctrlKey;if(!o&&!s.value&&!r&&"wheel"===e.type||n||X(e,m.value))return null;e.preventDefault(),V.call(this,e,t)}),{passive:!1}):b.on("wheel.zoom",(e=>{if(X(e,m.value))return!1;const t=z.value||v.value,n=p.value&&e.ctrlKey;if(!(!g.value||L.value||t||n))return!1;e.preventDefault(),e.stopImmediatePropagation();const o=b.property("__zoom").k||1,r=Sr();if(!$.value&&e.ctrlKey&&p.value&&r){const t=Ve(e),n=o*2**Jo(e);return void u.scaleTo(b,n,t,e)}const i=1===e.deltaMode?20:1;let a=c.value===fo.Vertical?0:e.deltaX*i,l=c.value===fo.Horizontal?0:e.deltaY*i;!r&&e.shiftKey&&c.value!==fo.Vertical&&!a&&l&&(a=l,l=0),u.translateBy(b,-a/o*d.value,-l/o*d.value);const s=G(b.property("__zoom"));B&&clearTimeout(B),T.value?(w.move({event:e,flowTransform:s}),w.viewportChange(s),B=setTimeout((()=>{w.moveEnd({event:e,flowTransform:s}),w.viewportChangeEnd(s),T.value=!1}),150)):(T.value=!0,w.moveStart({event:e,flowTransform:s}),w.viewportChangeStart(s))}),{passive:!1})}),{immediate:!0})}
7)),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"viewportRef",ref:M,class:"vue-flow__viewport vue-flow__container"},[t.createVNode(oa,{"is-selecting":H.value,"selection-key-pressed":t.unref(V),class:t.normalizeClass({connecting:Y.value,dragging:t.unref(_),draggable:!0===t.unref(f)||Array.isArray(t.unref(f))&&t.unref(f).includes(0)})},{default:t.withCtx((()=>[t.createVNode(ra,null,{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3})])),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),aa=["id"],la=["id"],ua=["id"],sa=t.defineComponent({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:n,disableKeyboardA11y:o,ariaLiveMessage:r}=Qi();return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{id:`${t.unref(wo)}-${t.unref(n)}`,style:{display:"none"}}," Press enter or space to select a node. "+t.toDisplayString(t.unref(o)?"":"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,aa),t.createElementVNode("div",{id:`${t.unref(xo)}-${t.unref(n)}`,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,la),t.unref(o)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,id:`${t.unref("vue-flow__aria-live")}-${t.unref(n)}`,"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%)"}},t.toDisplayString(t.unref(r)),9,ua))],64))}});function ca(e,t,n){return n===ao.Left?e-t:n===ao.Right?e+t:e}function da(e,t,n){return n===ao.Top?e-t:n===ao.Bottom?e+t:e}const fa=function({radius:e=10,centerX:n=0,centerY:o=0,position:r=ao.Top,type:i}){return t.h("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:ca(n,e,r),cy:da(o,e,r),r:e,stroke:"transparent",fill:"transparent"})};fa.props=["radius","centerX","centerY","position","type"],fa.compatConfig={MODE:3};const ha=fa,pa=t.defineComponent({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:n,addSelectedEdges:o,connectionMode:r,edgeUpdaterRadius:i,emits:a,nodesSelectionActive:l,noPanClassName:u,getEdgeTypes:s,removeSelectedEdges:c,findEdge:d,findNode:f,isValidConnection:h,multiSelectionActive:p,disableKeyboardA11y:v,elementsSelectable:g,edgesUpdatable:m,edgesFocusable:y,hooks:w}=Qi(),x=t.computed((()=>d(e.id))),{emit:b,on:E}=ei(x.value,a),_=t.inject(Jr),S=t.getCurrentInstance(),N=t.ref(!1),k=t.ref(!1),C=t.ref(""),M=t.ref(null),I=t.ref("source"),P=t.ref(null),T=t.toRef((()=>void 0===x.value.selectable?g.value:x.value.selectable)),B=t.toRef((()=>void 0===x.value.updatable?m.value:x.value.updatable)),D=t.toRef((()=>void 0===x.value.focusable?y.value:x.value.focusable));t.provide(Wr,e.id),t.provide(qr,P);const A=t.computed((()=>x.value.class instanceof Function?x.value.class(x.value):x.value.class)),O=t.computed((()=>x.value.style instanceof Function?x.value.style(x.value):x.value.style)),$=t.computed((()=>{const e=x.value.type||"default",n=null==_?void 0:_[`edge-${e}`];if(n)return n;let o=x.value.template??s.value[e];if("string"==typeof o&&S){const n=Object.keys(S.appContext.components);n&&n.includes(e)&&(o=t.resolveComponent(e,!1))}return o&&"string"!=typeof o?o:(a.error(new br(wr.EDGE_TYPE_MISSING,o)),!1)})),{handlePointerDown:V}=oi({nodeId:C,handleId:M,type:I,isValidConnection:h,edgeUpdaterType:I,onEdgeUpdate:function(e,t){b.update({event:e,edge:x.value,connection:t})},onEdgeUpdateEnd:function(e){b.updateEnd({event:e,edge:x.value}),k.value=!1}});return()=>{const o=f(x.value.source),l=f(x.value.target),c="pathOptions"in x.value?x.value.pathOptions:{};if(!o&&!l)return a.error(new br(wr.EDGE_SOURCE_TARGET_MISSING,x.value.id,x.value.source,x.value.target)),null;if(!o)return a.error(new br(wr.EDGE_SOURCE_MISSING,x.value.id,x.value.source)),null;if(!l)return a.error(new br(wr.EDGE_TARGET_MISSING,x.value.id,x.value.target)),null;if(!x.value||x.value.hidden||o.hidden||l.hidden)return null;let d;d=r.value===so.Strict?o.handleBounds.source:[...o.handleBounds.source||[],...o.handleBounds.target||[]];const h=gr(d,x.value.sourceHandle);let p;p=r.value===so.Strict?l.handleBounds.target:[...l.handleBounds.target||[],...l.handleBounds.source||[]];const v=gr(p,x.value.targetHandle),g=(null==h?void 0:h.position)||ao.Bottom,m=(null==v?void 0:v.position)||ao.Top,{x:y,y:b}=vr(o,h,g),{x:_,y:S}=vr(l,v,m);return x.value.sourceX=y,x.value.sourceY=b,x.value.targetX=_,x.value.targetY=S,t.h("g",{ref:P,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${!1===$.value?"default":x.value.type||"default"}`,u.value,A.value,{updating:N.value,selected:x.value.selected,animated:x.value.animated,inactive:!T.value&&!w.value.edgeClick.hasListeners()}],tabIndex:D.value?0:void 0,"aria-label":null===x.value.ariaLabel?void 0:x.value.ariaLabel??`Edge from ${x.value.source} to ${x.value.target}`,"aria-describedby":D.value?`${xo}-${n}`:void 0,"aria-roledescription":"edge",role:D.value?"group":"img",...x.value.domAttributes,onClick:H,onContextmenu:Y,onDblclick:F,onMouseenter:G,onMousemove:X,onMouseleave:U,onKeyDown:D.value?K:void 0},[k.value?null:t.h(!1===$.value?s.value.default:$.value,{id:e.id,sourceNode:o,targetNode:l,source:x.value.source,target:x.value.target,type:x.value.type,updatable:B.value,selected:x.value.selected,animated:x.value.animated,label:
7x.value.label,labelStyle:x.value.labelStyle,labelShowBg:x.value.labelShowBg,labelBgStyle:x.value.labelBgStyle,labelBgPadding:x.value.labelBgPadding,labelBgBorderRadius:x.value.labelBgBorderRadius,data:x.value.data,events:{...x.value.events,...E},style:O.value,markerStart:`url('#${qo(x.value.markerStart,n)}')`,markerEnd:`url('#${qo(x.value.markerEnd,n)}')`,sourcePosition:g,targetPosition:m,sourceX:y,sourceY:b,targetX:_,targetY:S,sourceHandleId:x.value.sourceHandle,targetHandleId:x.value.targetHandle,interactionWidth:x.value.interactionWidth,...c}),["source"===B.value||!0===B.value?[t.h("g",{onMousedown:j,onMouseenter:z,onMouseout:R},t.h(ha,{position:g,centerX:y,centerY:b,radius:i.value,type:"source","data-type":"source"}))]:null,"target"===B.value||!0===B.value?[t.h("g",{onMousedown:Z,onMouseenter:z,onMouseout:R},t.h(ha,{position:m,centerX:_,centerY:S,radius:i.value,type:"target","data-type":"target"}))]:null]])};function z(){N.value=!0}function R(){N.value=!1}function L(e,t){0===e.button&&(k.value=!0,C.value=t?x.value.target:x.value.source,M.value=(t?x.value.targetHandle:x.value.sourceHandle)??null,I.value=t?"target":"source",b.updateStart({event:e,edge:x.value}),V(e))}function H(e){var t;const n={event:e,edge:x.value};T.value&&(l.value=!1,x.value.selected&&p.value?(c([x.value]),null==(t=P.value)||t.blur()):o([x.value])),b.click(n)}function Y(e){b.contextMenu({event:e,edge:x.value})}function F(e){b.doubleClick({event:e,edge:x.value})}function G(e){b.mouseEnter({event:e,edge:x.value})}function X(e){b.mouseMove({event:e,edge:x.value})}function U(e){b.mouseLeave({event:e,edge:x.value})}function j(e){L(e,!0)}function Z(e){L(e,!1)}function K(t){var n;if(!v.value&&bo.includes(t.key)&&T.value){"Escape"===t.key?(null==(n=P.value)||n.blur(),c([d(e.id)])):o([d(e.id)])}}}}),va=t.defineComponent({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:n,connectionMode:o,connectionStartHandle:r,connectionEndHandle:i,connectionPosition:a,connectionLineType:l,connectionLineStyle:u,connectionLineOptions:s,connectionStatus:c,viewport:d,findNode:f}=Qi(),h=null==(e=t.inject(Jr))?void 0:e["connection-line"],p=t.computed((()=>{var e;return f(null==(e=r.value)?void 0:e.nodeId)})),v=t.computed((()=>{var e;return f(null==(e=i.value)?void 0:e.nodeId)??null})),g=t.computed((()=>({x:(a.value.x-d.value.x)/d.value.zoom,y:(a.value.y-d.value.y)/d.value.zoom}))),m=t.computed((()=>s.value.markerStart?`url(#${qo(s.value.markerStart,n)})`:"")),y=t.computed((()=>s.value.markerEnd?`url(#${qo(s.value.markerEnd,n)})`:""));return()=>{var e,n,a;if(!p.value||!r.value)return null;const d=r.value.id,f=r.value.type,w=p.value.handleBounds;let x=(null==w?void 0:w[f])??[];if(o.value===so.Loose){const e=(null==w?void 0:w["source"===f?"target":"source"])??[];x=[...x,...e]}if(!x)return null;const b=(d?x.find((e=>e.id===d)):x[0])??null,E=(null==b?void 0:b.position)??ao.Top,{x:_,y:S}=vr(p.value,b,E);let N=null;v.value&&(N=o.value===so.Strict?(null==(e=v.value.handleBounds["source"===f?"target":"source"])?void 0:e.find((e=>{var t;return e.id===(null==(t=i.value)?void 0:t.id)})))||null:(null==(n=[...v.value.handleBounds.source??[],...v.value.handleBounds.target??[]])?void 0:n.find((e=>{var t;return e.id===(null==(t=i.value)?void 0:t.id)})))||null);const k=(null==(a=i.value)?void 0:a.position)??(E?Br[E]:null);if(!E||!k)return null;const C=l.value??s.value.type??uo.Bezier;let M="";const I={sourceX:_,sourceY:S,sourcePosition:E,targetX:g.value.x,targetY:g.value.y,targetPosition:k};return C===uo.Bezier?[M]=Vi(I):C===uo.Step?[M]=Fi({...I,borderRadius:0}):C===uo.SmoothStep?[M]=Fi(I):C===uo.SimpleBezier?[M]=Ri(I):M=`M${_},${S} ${g.value.x},${g.value.y}`,t.h("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},t.h("g",{class:"vue-flow__connection"},h?t.h(h,{sourceX:_,sourceY:S,sourcePosition:E,targetX:g.value.x,targetY:g.value.y,targetPosition:k,sourceNode:p.value,sourceHandle:b,targetNode:v.value,targetHandle:N,markerEnd:y.value,markerStart:m.value,connectionStatus:c.value}):t.h("path",{d:M,class:[s.value.class,c.value,"vue-flow__connection-path"],style:{...u.value,...s.value.style},"marker-end":y.value,"marker-start":m.value})))}}}),ga=["id","markerWidth","markerHeight","markerUnits","orient"],ma=t.defineComponent({name:"MarkerType",compatConfig:{MODE:3},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=>(e,n)=>(t.openBlock(),t.createElementBlock("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===t.unref(co).ArrowClosed?(t.openBlock(),t.createElementBlock("polyline",{key:0,style:t.normalizeStyle({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)):t.createCommentVNode("",!0),e.type===t.unref(co).Arrow?(t.openBlock(),t.createElementBlock("polyline",{key:1,style:t.normalizeStyle({stroke:e.color,strokeWidth:e.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):t.createCommentVNode("",!0)],8,ga))}),ya={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},wa=t.defineComponent({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:n,edges:o,connectionLineOptions:r,defaultMarkerColor:i}=Qi(),a=t.computed((()=>{const e=new Set,t=[],a=o=>{if(o){const r=qo(o,n);e.has(r)||("object"==typeof o?t.push({...o,id:r,color:o.color||i.value}):t.push({id:r,color:i.value,type:o}),e.add(r))}};for(const e of[r.value.markerEnd,r.value.markerStart])a(e);for(const e of o.value)for(const t of[e.markerStart,e.markerEnd])a(t);return t.sort(((e,t)=>e.id.localeCompare(t.id)))}));return(e,n)=>(t.openBlock(),t.createElementBlock("svg",ya,[t.createElementVNode("defs",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(e=>(t.openBlock(),t.createBlock(ma,{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))])]))}}),xa=t.defineComponent({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:n,getEdges:o,elevateEdgesOnSelect:r}=Qi();return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(wa),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(e=>(t.openBlock(),t.createElementBlock("svg",{key:e.id,class:"vue-flow__edges vue-flow__container",style:t.normalizeStyle({zIndex:t.unref(yr)(e,t.unref(n),t.unref(r))})},[t.createVNode(t.unref(pa),{id:e.id},null,8,["id"])],4)))),128)),t.createVNode(t.unref(va))],64))}}),ba=t.defineComponent({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:n,noPanClassName:o,selectNodesOnDrag:r,nodesSelectionActive:i,multiSelectionActive:a,emits:l,removeSelectedNodes:u,addSelectedNodes:s,updateNodeDimensions:c,onUpdateNodeInternals:d,getNodeTypes:f,nodeExtent:p,elevateNodesOnSelect:v,disableKeyboardA11y:g,ariaLiveMessage:m,snapToGri
7d:y,snapGrid:w,nodeDragThreshold:x,nodesDraggable:b,elementsSelectable:E,nodesConnectable:_,nodesFocusable:S,hooks:N}=Qi(),k=t.ref(null);t.provide(Kr,k),t.provide(Zr,e.id);const C=t.inject(Jr),M=t.getCurrentInstance(),I=li(),{node:P,parentNode:T}=ii(e.id),{emit:B,on:D}=ai(P,l),A=t.toRef((()=>void 0===P.draggable?b.value:P.draggable)),O=t.toRef((()=>void 0===P.selectable?E.value:P.selectable)),$=t.toRef((()=>void 0===P.connectable?_.value:P.connectable)),V=t.toRef((()=>void 0===P.focusable?S.value:P.focusable)),z=t.computed((()=>O.value||A.value||N.value.nodeClick.hasListeners()||N.value.nodeDoubleClick.hasListeners()||N.value.nodeMouseEnter.hasListeners()||N.value.nodeMouseMove.hasListeners()||N.value.nodeMouseLeave.hasListeners())),R=t.toRef((()=>!!P.dimensions.width&&!!P.dimensions.height)),L=t.computed((()=>{const e=P.type||"default",n=null==C?void 0:C[`node-${e}`];if(n)return n;let o=P.template||f.value[e];if("string"==typeof o&&M){const n=Object.keys(M.appContext.components);n&&n.includes(e)&&(o=t.resolveComponent(e,!1))}return o&&"string"!=typeof o?o:(l.error(new br(wr.NODE_TYPE_MISSING,o)),!1)})),H=Qr({id:e.id,el:k,disabled:()=>!A.value,selectable:O,dragHandle:()=>P.dragHandle,onStart(e){B.dragStart(e)},onDrag(e){B.drag(e)},onStop(e){B.dragStop(e)},onClick(e){J(e)}}),Y=t.computed((()=>P.class instanceof Function?P.class(P):P.class)),F=t.computed((()=>{const e=(P.style instanceof Function?P.style(P):P.style)||{},t=P.width instanceof Function?P.width(P):P.width,n=P.height instanceof Function?P.height(P):P.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})),G=t.toRef((()=>Number(P.zIndex??F.value.zIndex??0)));return d((t=>{!t.includes(e.id)&&t.length||U()})),t.onMounted((()=>{t.watch((()=>P.hidden),((t=!1,n,o)=>{!t&&k.value&&(e.resizeObserver.observe(k.value),o((()=>{k.value&&e.resizeObserver.unobserve(k.value)})))}),{immediate:!0,flush:"post"})})),t.watch([()=>P.type,()=>P.sourcePosition,()=>P.targetPosition],(()=>{t.nextTick((()=>{c([{id:e.id,nodeElement:k.value,forceUpdate:!0}])}))})),t.watch([()=>P.position.x,()=>P.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},G,()=>P.selected,()=>P.dimensions.height,()=>P.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,r,i])=>{const a={x:e,y:t,z:i+(v.value&&P.selected?1e3:0)};var l,u;P.computedPosition=void 0!==n&&void 0!==o?{x:(u=a).x+(l={x:n,y:o,z:r}).x,y:u.y+l.y,z:(l.z>u.z?l.z:u.z)+1}:a}),{flush:"post",immediate:!0}),t.watch([()=>P.extent,p],(([e,t],[n,o])=>{e===n&&t===o||X()})),"parent"===P.extent||"object"==typeof P.extent&&"range"in P.extent&&"parent"===P.extent.range?h((()=>R)).toBe(!0).then(X):X(),()=>P.hidden?null:t.h("div",{ref:k,"data-id":P.id,class:["vue-flow__node",`vue-flow__node-${!1===L.value?"default":P.type||"default"}`,{[o.value]:A.value,dragging:null==H?void 0:H.value,draggable:A.value,selected:P.selected,selectable:O.value,parent:P.isParent},Y.value],style:{visibility:R.value?"visible":"hidden",zIndex:P.computedPosition.z??G.value,transform:`translate(${P.computedPosition.x}px,${P.computedPosition.y}px)`,pointerEvents:z.value?"all":"none",...F.value},tabIndex:V.value?0:void 0,role:V.value?"group":void 0,"aria-describedby":g.value?void 0:`${wo}-${n}`,"aria-label":P.ariaLabel,"aria-roledescription":"node",...P.domAttributes,onMouseenter:j,onMousemove:Z,onMouseleave:K,onContextmenu:W,onClick:J,onDblclick:q,onKeydown:Q},[t.h(!1===L.value?f.value.default:L.value,{id:P.id,type:P.type,data:P.data,events:{...P.events,...D},selected:P.selected,resizing:P.resizing,dragging:H.value,connectable:$.value,position:P.computedPosition,dimensions:P.dimensions,isValidTargetPos:P.isValidTargetPos,isValidSourcePos:P.isValidSourcePos,parent:P.parentNode,parentNodeId:P.parentNode,zIndex:P.computedPosition.z??G.value,targetPosition:P.targetPosition,sourcePosition:P.sourcePosition,label:P.label,dragHandle:P.dragHandle,onUpdateNodeInternals:U})]);function X(){const e=P.computedPosition,{computedPosition:t,position:n}=pr(P,y.value?Nr(e,w.value):e,l.error,p.value,T.value);P.computedPosition.x===t.x&&P.computedPosition.y===t.y||(P.computedPosition={...P.computedPosition,...t}),P.position.x===n.x&&P.position.y===n.y||(P.position=n)}function U(){k.value&&c([{id:e.id,nodeElement:k.value,forceUpdate:!0}])}function j(e){(null==H?void 0:H.value)||B.mouseEnter({event:e,node:P})}function Z(e){(null==H?void 0:H.value)||B.mouseMove({event:e,node:P})}function K(e){(null==H?void 0:H.value)||B.mouseLeave({event:e,node:P})}function W(e){return B.contextMenu({event:e,node:P})}function q(e){return B.doubleClick({event:e,node:P})}function J(e){O.value&&(!r.value||!A.value||x.value>0)&&Vr(P,a.value,s,u,i,!1,k.value),B.click({event:e,node:P})}
7function Q(e){if(!go(e)&&!g.value)if(bo.includes(e.key)&&O.value){const t="Escape"===e.key;Vr(P,a.value,s,u,i,t,k.value)}else A.value&&P.selected&&Eo[e.key]&&(e.preventDefault(),m.value=`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~P.position.x}, y: ${~~P.position.y}`,I({x:Eo[e.key].x,y:Eo[e.key].y},e.shiftKey))}}}),Ea={height:"0",width:"0"},_a=t.defineComponent({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:n}=Qi(),o=t.toRef((()=>{var e;return null==(e=n.value)?void 0:e.getElementsByClassName("vue-flow__edge-labels")[0]}));return(e,n)=>(t.openBlock(),t.createElementBlock("svg",null,[(t.openBlock(),t.createElementBlock("foreignObject",Ea,[(t.openBlock(),t.createBlock(t.Teleport,{to:o.value,disabled:!o.value},[t.renderSlot(e.$slots,"default")],8,["to","disabled"]))]))]))}});function Sa(e={includeHiddenNodes:!1}){const{nodes:n}=Qi();return t.computed((()=>{if(0===n.value.length)return!1;for(const t of n.value)if((e.includeHiddenNodes||!t.hidden)&&(void 0===(null==t?void 0:t.handleBounds)||0===t.dimensions.width||0===t.dimensions.height))return!1;return!0}))}const Na={class:"vue-flow__nodes vue-flow__container"},ka=t.defineComponent({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:n,updateNodeDimensions:o,emits:r}=Qi(),i=Sa(),a=t.ref();return t.watch(i,(e=>{e&&t.nextTick((()=>{r.nodesInitialized(n.value)}))}),{immediate:!0}),t.onMounted((()=>{a.value=new ResizeObserver((e=>{const n=e.map((e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0})));t.nextTick((()=>o(n)))}))})),t.onBeforeUnmount((()=>{var e;return null==(e=a.value)?void 0:e.disconnect()})),(e,o)=>(t.openBlock(),t.createElementBlock("div",Na,[a.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(n),((e,n,o,r)=>{const i=[e.id];if(r&&r.key===e.id&&t.isMemoSame(r,i))return r;const l=(t.openBlock(),t.createBlock(t.unref(ba),{id:e.id,key:e.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return l.memo=i,l}),o,0),128)):t.createCommentVNode("",!0)]))}});const Ca=t.createElementVNode("div",{class:"vue-flow__edge-labels"},null,-1),Ma=t.defineComponent({name:"VueFlow",compatConfig:{MODE:3},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:o,emit:r}){const i=e,a=t.useSlots(),l=y(i,"modelValue",r),u=y(i,"nodes",r),s=y(i,"edges",r),c=Qi(i),d=pi({modelValue:l,nodes:u,edges:s},i,c);return function(e,o){const r=t.getCurrentInstance();function i(e){var t;const n=function(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,((e,t)=>
7t.toUpperCase()))}${n.length?`:${n.join(":")}`:""}`}(e);return!!(null==(t=null==r?void 0:r.vnode.props)?void 0:t[n])}t.onBeforeMount((()=>{for(const[t,r]of Object.entries(o.value)){const o=n=>{e(t,n)};r.setEmitter(o),n(r.removeEmitter),r.setHasEmitListeners((()=>i(t))),n(r.removeHasEmitListeners)}}))}(r,c.hooks),function(){const e=Qi();t.watch((()=>e.viewportHelper.value.viewportInitialized),(t=>{t&&setTimeout((()=>{e.emits.init(e),e.emits.paneReady(e)}),1)}))}(),function(){const{emits:e}=Qi();t.onMounted((()=>{if(Or()){const t=document.querySelector(".vue-flow__pane");t&&"1"!==window.getComputedStyle(t).zIndex&&e.error(new br(wr.MISSING_STYLES))}}))}(),t.provide(Jr,a),t.onUnmounted(d),o(c),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref:t.unref(c).vueFlowRef,class:"vue-flow"},[t.createVNode(ia,null,{default:t.withCtx((()=>[t.createVNode(xa),Ca,t.createVNode(ka),t.renderSlot(e.$slots,"zoom-pane")])),_:3}),t.renderSlot(e.$slots,"default"),t.createVNode(sa)],512))}}),Ia=t.defineComponent({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const n=e,{userSelectionActive:o}=Qi(),r=t.computed((()=>`${n.position}`.split("-")));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vue-flow__panel",r.value]),style:t.normalizeStyle({pointerEvents:t.unref(o)?"none":"all"})},[t.renderSlot(e.$slots,"default")],6))}});return e.BaseEdge=Bi,e.BezierEdge=Zi,e.ConnectionLineType=uo,e.ConnectionMode=so,e.EdgeLabelRenderer=_a,e.EdgeText=Ii,e.ErrorCode=wr,e.Handle=wi,e.MarkerType=co,e.NodeIdInjection=Zr,e.PanOnScrollMode=fo,e.Panel=Ia,e.PanelPosition=ho,e.Position=ao,e.SelectionMode=lo,e.SimpleBezierEdge=Ki,e.SmoothStepEdge=Ui,e.StepEdge=ji,e.StraightEdge=Xi,e.VueFlow=Ma,e.VueFlowError=br,e.VueFlowInjection=jr,e.addEdge=function(e,t,n){if(!e.source||!e.target)return Ar("Can't create edge. An edge needs a source and a target."),t;let o;return o=Io(e)?{...e}:{...e,id:zo(e)},o=Ao(o,void 0,n),Ro(o,t)||t.push(o),t},e.applyChanges=nr,e.applyEdgeChanges=function(e,t){return nr(e,t)},e.applyNodeChanges=function(e,t){return nr(e,t)},e.clamp=ko,e.connectionExists=Ro,e.defaultEdgeTypes=qi,e.defaultNodeTypes=Wi,e.getBezierEdgeCenter=Ai,e.getBezierPath=Vi,e.getBoundsofRects=function(e,t){return Go(Yo(Fo(e),Fo(t)))},e.getConnectedEdges=jo,e.getIncomers=Vo,e.getMarkerId=qo,e.getNodesInside=Uo,e.getOutgoers=$o,e.getRectOfNodes=Xo,e.getSimpleBezierPath=Ri,e.getSimpleEdgeCenter=Di,e.getSmoothStepPath=Fi,e.getStraightPath=Gi,e.getTransformForBounds=Ko,e.graphPosToZoomedPos=Lo,e.isEdge=Io,e.isErrorOfType=function(e,t){return e.code===t},e.isGraphEdge=function(e){return Io(e)&&"sourceNode"in e&&"targetNode"in e},e.isGraphNode=To,e.isMacOs=Sr,e.isNode=Po,e.pointToRendererPoint=Ho,e.rendererPointToPoint=Lo,e.updateEdge=function(e,t,n){if(!t.source||!t.target)return Ar("Can't create new edge. An edge needs a source and a target."),n;const o=n.find((t=>Io(t)&&t.id===e.id));if(!o)return Ar(`The old edge with id=${e.id} does not exist.`),n;const r={...e,id:zo(t),source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(o),1,r),n.filter((t=>t.id!==e.id))},e.useConnection=function(){const{connectionStartHandle:e,connectionEndHandle:t,connectionStatus:n,connectionPosition:o}=Qi();return{startHandle:e,endHandle:t,status:n,position:o}},e.useEdge=function(e){const n=e??t.inject(Wr,""),o=t.inject(qr,t.ref(null)),{findEdge:r,emits:i}=Qi(),a=r(n);return a||i.error(new br(wr.EDGE_NOT_FOUND,n)),{id:n,edge:a,edgeEl:o}},e.useEdgesData=function(e){const{findEdge:n}=Qi();return t.computed({get(){const o=t.toValue(e);if(!Array.isArray(o)){const e=n(o);return e?{id:e.id,type:e.type,data:e.data??null}:null}const r=[];for(const e of o){const t=n(e);t&&r.push({id:t.id,type:t.type,data:t.data??null})}return r},set(){Ar("You are trying to set edge data via useEdgesData. This is not supported.")}})},e.useGetPointerPosition=ti,e.useHandle=oi,e.useHandleConnections=function(e){const{type:n,id:o,nodeId:r,onConnect:i,onDisconnect:a}=e,{connectionLookup:l}=Qi(),u=ri(),s=t.toRef((()=>t.toValue(r)??u)),c=t.toRef((()=>t.toValue(n))),d=t.toRef((()=>t.toValue(o)??null)),f=t.ref(null),h=t.ref();return t.watch((()=>l.value.get(`${s.value}-${c.value}-${d.value}`)),(e=>{Gr(h.value,e)||(h.value=e)}),{immediate:!0}),t.watch([h,()=>void 0!==i,()=>void 0!==a],(([e=new Map])=>{f.value&&f.value!==e&&(Fr(f.value,e,a),Fr(e,f.value,i)),f.value=e}),{immediate:!0}),t.computed((()=>h.value?Array.from(h.value.values()):[]))},e.useKeyPress=yo,e.useNode=ii,e.useNodeConnections=function(e={}){const{handleType:n,handleId:o,nodeId:r,onConnect:i,onDisconnect:a}=e,{connectionLookup:l}=Qi(),u=ri(),s=t.ref(null),c=t.ref(),d=t.computed((()=>{const e=t.toValue(r)??u,i=t.toValue(n),a=t.toValue(o);let l="";return i&&(l=a?`-${i}-${a}`:`-${i}`),`${e}${l}`}));return t.watch((()=>l.value.get(d.value)),(e=>{Gr(c.value,e)||(c.value=e)}),{immediate:!0}),t.watch([c,()=>void 0!==i,()=>void 0!==a],(([e=new Map])=>{s.value&&s.value!==e&&(Fr(s.value,e,a),Fr(e,s.value,i)),s.value=e}),{immediate:!0}),t.computed((()=>c.value?Array.from(c.value.values()):[]))},e.useNodeId=ri,e.useNodesData=function(e){const{findNode:n}=Qi();return t.computed({get(){const o=t.toValue(e);if(!Array.isArray(o)){const e=n(o);return e?{id:e.id,type:e.type,data:e.data}:null}const r=[];for(const e of o){const t=n(e);t&&r.push({id:t.id,type:t.type,data:t.data})}return r},set(){Ar("You are trying to set node data via useNodesData. This is not supported.")}})},e.useNodesInitialized=Sa,e.useVueFlow=Qi,e.useZoomPanHelper=function(e){const n=fi(function(e){if(!t.isRef(e))return t.reactive(e);const n=new Proxy({},{get:(n,o,r)=>t.unref(Reflect.get(e.value,o,r)),set:(n,o,r)=>(t.isRef(e.value[o])&&!t.isRef(r)?e.value[o].value=r:e.value[o]=r,!0),deleteProperty:(t,n)=>Reflect.deleteProperty(e.value,n),has:(t,n)=>Reflect.has(e.value,n),ownKeys:()=>Object.keys(e.value),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})});return t.reactive(n)}(Qi({id:e})));return{fitView:e=>n.value.fitView(e),zoomIn:e=>n.value.zoomIn(e),zoomOut:e=>n.value.zoomOut(e),zoomTo:(e,t)=>n.value.zoomTo(e,t),setViewport:(e,t)=>n.value.setViewport(e,t),setTransform:(e,t)=>
7n.value.setTransform(e,t),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(e,t,o)=>n.value.setCenter(e,t,o),fitBounds:(e,t)=>n.value.fitBounds(e,t),project:e=>n.value.project(e)}},e.wheelDelta=Jo,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({},Vue); 8//# sourceMappingURL=/sm/0953535e12dd6195a132ab9d554a0ffc8330aefab75eed351637fed50aa52cbe.map
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.