diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index f8d44c04..45e72811 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -779,6 +779,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", @@ -1029,6 +1035,42 @@ "path-browserify": "^1.0.1" } }, + "node_modules/@vue-flow/background": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@vue-flow/background/-/background-1.3.2.tgz", + "integrity": "sha512-eJPhDcLj1wEo45bBoqTXw1uhl0yK2RaQGnEINqvvBsAFKh/camHJd5NPmOdS1w+M9lggc9igUewxaEd3iCQX2w==", + "license": "MIT", + "peerDependencies": { + "@vue-flow/core": "^1.23.0", + "vue": "^3.3.0" + } + }, + "node_modules/@vue-flow/controls": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@vue-flow/controls/-/controls-1.1.3.tgz", + "integrity": "sha512-XCf+G+jCvaWURdFlZmOjifZGw3XMhN5hHlfMGkWh9xot+9nH9gdTZtn+ldIJKtarg3B21iyHU8JjKDhYcB6JMw==", + "license": "MIT", + "peerDependencies": { + "@vue-flow/core": "^1.23.0", + "vue": "^3.3.0" + } + }, + "node_modules/@vue-flow/core": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/@vue-flow/core/-/core-1.46.0.tgz", + "integrity": "sha512-vNIeFcbHuDgl1PSjABL/p+PHlTZYwt1NfZ+htjYlZtqzPfCSkP9URk/TY9ahORBWd/UvgxaNY+AQQoV2O49rtA==", + "license": "MIT", + "dependencies": { + "@vueuse/core": "^10.5.0", + "d3-drag": "^3.0.0", + "d3-interpolate": "^3.0.1", + "d3-selection": "^3.0.0", + "d3-zoom": "^3.0.0" + }, + "peerDependencies": { + "vue": "^3.3.0" + } + }, "node_modules/@vue/compiler-core": { "version": "3.5.20", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.20.tgz", @@ -1193,6 +1235,42 @@ "dev": true, "license": "MIT" }, + "node_modules/@vueuse/core": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz", + "integrity": "sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==", + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.11.1", + "@vueuse/shared": "10.11.1", + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.1.tgz", + "integrity": "sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.1.tgz", + "integrity": "sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==", + "license": "MIT", + "dependencies": { + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -1599,6 +1677,111 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", diff --git a/node_modules/.vite/deps/@vue-flow_background.js b/node_modules/.vite/deps/@vue-flow_background.js new file mode 100644 index 00000000..ee427f5c --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_background.js @@ -0,0 +1,144 @@ +import { + useVueFlow +} from "./chunk-OUZUAOAF.js"; +import { + computed, + createBaseVNode, + createBlock, + createCommentVNode, + createElementBlock, + defineComponent, + h, + normalizeStyle, + openBlock, + renderSlot, + toRef, + unref +} from "./chunk-QT7TTBG7.js"; + +// node_modules/@vue-flow/background/dist/vue-flow-background.mjs +var BackgroundVariant = ((BackgroundVariant2) => { + BackgroundVariant2["Lines"] = "lines"; + BackgroundVariant2["Dots"] = "dots"; + return BackgroundVariant2; +})(BackgroundVariant || {}); +var LinePattern = function({ dimensions, size, color }) { + return h("path", { + "stroke": color, + "stroke-width": size, + "d": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` + }); +}; +var DotPattern = function({ radius, color }) { + return h("circle", { cx: radius, cy: radius, r: radius, fill: color }); +}; +({ + [BackgroundVariant.Lines]: LinePattern, + [BackgroundVariant.Dots]: DotPattern +}); +var DefaultBgColors = { + [BackgroundVariant.Dots]: "#81818a", + [BackgroundVariant.Lines]: "#eee" +}; +var _hoisted_1 = ["id", "x", "y", "width", "height", "patternTransform"]; +var _hoisted_2 = { + key: 2, + height: "100", + width: "100" +}; +var _hoisted_3 = ["fill"]; +var _hoisted_4 = ["x", "y", "fill"]; +var __default__ = { + name: "Background", + compatConfig: { MODE: 3 } +}; +var _sfc_main = defineComponent({ + ...__default__, + props: { + id: {}, + variant: { default: () => BackgroundVariant.Dots }, + gap: { default: 20 }, + size: { default: 1 }, + lineWidth: { default: 1 }, + patternColor: {}, + color: {}, + bgColor: {}, + height: { default: 100 }, + width: { default: 100 }, + x: { default: 0 }, + y: { default: 0 }, + offset: { default: 0 } + }, + setup(__props) { + const { id: vueFlowId, viewport } = useVueFlow(); + const background = computed(() => { + const zoom = viewport.value.zoom; + const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap]; + const scaledGap = [gapX * zoom || 1, gapY * zoom || 1]; + const scaledSize = __props.size * zoom; + const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset]; + const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2]; + return { + scaledGap, + offset: scaledOffset, + size: scaledSize + }; + }); + const patternId = toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : ""}`); + const patternColor = toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("svg", { + class: "vue-flow__background vue-flow__container", + style: normalizeStyle({ + height: `${_ctx.height > 100 ? 100 : _ctx.height}%`, + width: `${_ctx.width > 100 ? 100 : _ctx.width}%` + }) + }, [ + renderSlot(_ctx.$slots, "pattern-container", { id: patternId.value }, () => [ + createBaseVNode("pattern", { + id: patternId.value, + x: unref(viewport).x % background.value.scaledGap[0], + y: unref(viewport).y % background.value.scaledGap[1], + width: background.value.scaledGap[0], + height: background.value.scaledGap[1], + patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`, + patternUnits: "userSpaceOnUse" + }, [ + renderSlot(_ctx.$slots, "pattern", {}, () => [ + _ctx.variant === unref(BackgroundVariant).Lines ? (openBlock(), createBlock(unref(LinePattern), { + key: 0, + size: _ctx.lineWidth, + color: patternColor.value, + dimensions: background.value.scaledGap + }, null, 8, ["size", "color", "dimensions"])) : _ctx.variant === unref(BackgroundVariant).Dots ? (openBlock(), createBlock(unref(DotPattern), { + key: 1, + color: patternColor.value, + radius: background.value.size / 2 + }, null, 8, ["color", "radius"])) : createCommentVNode("", true), + _ctx.bgColor ? (openBlock(), createElementBlock("svg", _hoisted_2, [ + createBaseVNode("rect", { + width: "100%", + height: "100%", + fill: _ctx.bgColor + }, null, 8, _hoisted_3) + ])) : createCommentVNode("", true) + ]) + ], 8, _hoisted_1) + ]), + createBaseVNode("rect", { + x: _ctx.x, + y: _ctx.y, + width: "100%", + height: "100%", + fill: `url(#${patternId.value})` + }, null, 8, _hoisted_4), + renderSlot(_ctx.$slots, "default", { id: patternId.value }) + ], 4); + }; + } +}); +export { + _sfc_main as Background, + BackgroundVariant +}; +//# sourceMappingURL=@vue-flow_background.js.map diff --git a/node_modules/.vite/deps/@vue-flow_background.js.map b/node_modules/.vite/deps/@vue-flow_background.js.map new file mode 100644 index 00000000..3660ab0c --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_background.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../@vue-flow/background/dist/vue-flow-background.mjs"], + "sourcesContent": ["import { h, defineComponent, computed, toRef, openBlock, createElementBlock, normalizeStyle, renderSlot, createElementVNode, unref, createBlock, createCommentVNode } from \"vue\";\nimport { useVueFlow } from \"@vue-flow/core\";\nvar BackgroundVariant = /* @__PURE__ */ ((BackgroundVariant2) => {\n BackgroundVariant2[\"Lines\"] = \"lines\";\n BackgroundVariant2[\"Dots\"] = \"dots\";\n return BackgroundVariant2;\n})(BackgroundVariant || {});\nconst LinePattern = function({ dimensions, size, color }) {\n return h(\"path\", {\n \"stroke\": color,\n \"stroke-width\": size,\n \"d\": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`\n });\n};\nconst DotPattern = function({ radius, color }) {\n return h(\"circle\", { cx: radius, cy: radius, r: radius, fill: color });\n};\n({\n [BackgroundVariant.Lines]: LinePattern,\n [BackgroundVariant.Dots]: DotPattern\n});\nconst DefaultBgColors = {\n [BackgroundVariant.Dots]: \"#81818a\",\n [BackgroundVariant.Lines]: \"#eee\"\n};\nconst _hoisted_1 = [\"id\", \"x\", \"y\", \"width\", \"height\", \"patternTransform\"];\nconst _hoisted_2 = {\n key: 2,\n height: \"100\",\n width: \"100\"\n};\nconst _hoisted_3 = [\"fill\"];\nconst _hoisted_4 = [\"x\", \"y\", \"fill\"];\nconst __default__ = {\n name: \"Background\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...__default__,\n props: {\n id: {},\n variant: { default: () => BackgroundVariant.Dots },\n gap: { default: 20 },\n size: { default: 1 },\n lineWidth: { default: 1 },\n patternColor: {},\n color: {},\n bgColor: {},\n height: { default: 100 },\n width: { default: 100 },\n x: { default: 0 },\n y: { default: 0 },\n offset: { default: 0 }\n },\n setup(__props) {\n const { id: vueFlowId, viewport } = useVueFlow();\n const background = computed(() => {\n const zoom = viewport.value.zoom;\n const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap];\n const scaledGap = [gapX * zoom || 1, gapY * zoom || 1];\n const scaledSize = __props.size * zoom;\n const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset];\n const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2];\n return {\n scaledGap,\n offset: scaledOffset,\n size: scaledSize\n };\n });\n const patternId = toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : \"\"}`);\n const patternColor = toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]);\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"svg\", {\n class: \"vue-flow__background vue-flow__container\",\n style: normalizeStyle({\n height: `${_ctx.height > 100 ? 100 : _ctx.height}%`,\n width: `${_ctx.width > 100 ? 100 : _ctx.width}%`\n })\n }, [\n renderSlot(_ctx.$slots, \"pattern-container\", { id: patternId.value }, () => [\n createElementVNode(\"pattern\", {\n id: patternId.value,\n x: unref(viewport).x % background.value.scaledGap[0],\n y: unref(viewport).y % background.value.scaledGap[1],\n width: background.value.scaledGap[0],\n height: background.value.scaledGap[1],\n patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`,\n patternUnits: \"userSpaceOnUse\"\n }, [\n renderSlot(_ctx.$slots, \"pattern\", {}, () => [\n _ctx.variant === unref(BackgroundVariant).Lines ? (openBlock(), createBlock(unref(LinePattern), {\n key: 0,\n size: _ctx.lineWidth,\n color: patternColor.value,\n dimensions: background.value.scaledGap\n }, null, 8, [\"size\", \"color\", \"dimensions\"])) : _ctx.variant === unref(BackgroundVariant).Dots ? (openBlock(), createBlock(unref(DotPattern), {\n key: 1,\n color: patternColor.value,\n radius: background.value.size / 2\n }, null, 8, [\"color\", \"radius\"])) : createCommentVNode(\"\", true),\n _ctx.bgColor ? (openBlock(), createElementBlock(\"svg\", _hoisted_2, [\n createElementVNode(\"rect\", {\n width: \"100%\",\n height: \"100%\",\n fill: _ctx.bgColor\n }, null, 8, _hoisted_3)\n ])) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_1)\n ]),\n createElementVNode(\"rect\", {\n x: _ctx.x,\n y: _ctx.y,\n width: \"100%\",\n height: \"100%\",\n fill: `url(#${patternId.value})`\n }, null, 8, _hoisted_4),\n renderSlot(_ctx.$slots, \"default\", { id: patternId.value })\n ], 4);\n };\n }\n});\nexport {\n _sfc_main as Background,\n BackgroundVariant\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;AAEA,IAAI,qBAAqC,CAAC,uBAAuB;AAC/D,qBAAmB,OAAO,IAAI;AAC9B,qBAAmB,MAAM,IAAI;AAC7B,SAAO;AACT,GAAG,qBAAqB,CAAC,CAAC;AAC1B,IAAM,cAAc,SAAS,EAAE,YAAY,MAAM,MAAM,GAAG;AACxD,SAAO,EAAE,QAAQ;AAAA,IACf,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,KAAK,I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,QAClB,CAAC;AAAA,QACD,gBAAmB,QAAQ;AAAA,UACzB,GAAG,KAAK;AAAA,UACR,GAAG,KAAK;AAAA,UACR,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,MAAM,QAAQ,UAAU,KAAK;AAAA,QAC/B,GAAG,MAAM,GAAG,UAAU;AAAA,QACtB,WAAW,KAAK,QAAQ,WAAW,EAAE,IAAI,UAAU,MAAM,CAAC;AAAA,MAC5D,GAAG,CAAC;AAAA,IACN;AAAA,EACF;AACF,CAAC;", + "names": [] +} diff --git a/node_modules/.vite/deps/@vue-flow_controls.js b/node_modules/.vite/deps/@vue-flow_controls.js new file mode 100644 index 00000000..b1222861 --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_controls.js @@ -0,0 +1,228 @@ +import { + PanelPosition, + _sfc_main, + useVueFlow +} from "./chunk-OUZUAOAF.js"; +import { + Fragment, + createBaseVNode, + createBlock, + createCommentVNode, + createElementBlock, + createVNode, + defineComponent, + openBlock, + renderSlot, + resolveDynamicComponent, + toRef, + unref, + withCtx +} from "./chunk-QT7TTBG7.js"; + +// node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs +var _sfc_main$1 = { + name: "ControlButton", + compatConfig: { MODE: 3 } +}; +var _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; +}; +var _hoisted_1$5 = { + type: "button", + class: "vue-flow__controls-button" +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("button", _hoisted_1$5, [ + renderSlot(_ctx.$slots, "default") + ]); +} +var ControlButton = _export_sfc(_sfc_main$1, [["render", _sfc_render]]); +var _hoisted_1$4 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 32" +}; +var _hoisted_2$4 = createBaseVNode("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1); +var _hoisted_3$4 = [ + _hoisted_2$4 +]; +function render$4(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$4); +} +var PlusIcon = { render: render$4 }; +var _hoisted_1$3 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 5" +}; +var _hoisted_2$3 = createBaseVNode("path", { d: "M0 0h32v4.2H0z" }, null, -1); +var _hoisted_3$3 = [ + _hoisted_2$3 +]; +function render$3(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3); +} +var MinusIcon = { render: render$3 }; +var _hoisted_1$2 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 30" +}; +var _hoisted_2$2 = createBaseVNode("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1); +var _hoisted_3$2 = [ + _hoisted_2$2 +]; +function render$2(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2); +} +var FitView = { render: render$2 }; +var _hoisted_1$1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +var _hoisted_2$1 = createBaseVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1); +var _hoisted_3$1 = [ + _hoisted_2$1 +]; +function render$1(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1); +} +var Lock = { render: render$1 }; +var _hoisted_1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +var _hoisted_2 = createBaseVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1); +var _hoisted_3 = [ + _hoisted_2 +]; +function render(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3); +} +var Unlock = { render }; +var __default__ = { + name: "Controls", + compatConfig: { MODE: 3 } +}; +var _sfc_main2 = defineComponent({ + ...__default__, + props: { + showZoom: { type: Boolean, default: true }, + showFitView: { type: Boolean, default: true }, + showInteractive: { type: Boolean, default: true }, + fitViewParams: {}, + position: { default: () => PanelPosition.BottomLeft } + }, + emits: ["zoomIn", "zoomOut", "fitView", "interactionChange"], + setup(__props, { emit }) { + const { + nodesDraggable, + nodesConnectable, + elementsSelectable, + setInteractive, + zoomIn, + zoomOut, + fitView, + viewport, + minZoom, + maxZoom + } = useVueFlow(); + const isInteractive = toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value); + const minZoomReached = toRef(() => viewport.value.zoom <= minZoom.value); + const maxZoomReached = toRef(() => viewport.value.zoom >= maxZoom.value); + function onZoomInHandler() { + zoomIn(); + emit("zoomIn"); + } + function onZoomOutHandler() { + zoomOut(); + emit("zoomOut"); + } + function onFitViewHandler() { + fitView(__props.fitViewParams); + emit("fitView"); + } + function onInteractiveChangeHandler() { + setInteractive(!isInteractive.value); + emit("interactionChange", !isInteractive.value); + } + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(_sfc_main), { + class: "vue-flow__controls", + position: _ctx.position + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "top"), + _ctx.showZoom ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ + renderSlot(_ctx.$slots, "control-zoom-in", {}, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-zoomin", + disabled: maxZoomReached.value, + onClick: onZoomInHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-zoom-in", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(PlusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]), + renderSlot(_ctx.$slots, "control-zoom-out", {}, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-zoomout", + disabled: minZoomReached.value, + onClick: onZoomOutHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-zoom-out", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(MinusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]) + ], 64)) : createCommentVNode("", true), + _ctx.showFitView ? renderSlot(_ctx.$slots, "control-fit-view", { key: 1 }, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-fitview", + onClick: onFitViewHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-fit-view", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(FitView)))) + ]) + ]), + _: 3 + }) + ]) : createCommentVNode("", true), + _ctx.showInteractive ? renderSlot(_ctx.$slots, "control-interactive", { key: 2 }, () => [ + _ctx.showInteractive ? (openBlock(), createBlock(ControlButton, { + key: 0, + class: "vue-flow__controls-interactive", + onClick: onInteractiveChangeHandler + }, { + default: withCtx(() => [ + isInteractive.value ? renderSlot(_ctx.$slots, "icon-unlock", { key: 0 }, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(Unlock)))) + ]) : createCommentVNode("", true), + !isInteractive.value ? renderSlot(_ctx.$slots, "icon-lock", { key: 1 }, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(Lock)))) + ]) : createCommentVNode("", true) + ]), + _: 3 + })) : createCommentVNode("", true) + ]) : createCommentVNode("", true), + renderSlot(_ctx.$slots, "default") + ]), + _: 3 + }, 8, ["position"]); + }; + } +}); +export { + ControlButton, + _sfc_main2 as Controls +}; +//# sourceMappingURL=@vue-flow_controls.js.map diff --git a/node_modules/.vite/deps/@vue-flow_controls.js.map b/node_modules/.vite/deps/@vue-flow_controls.js.map new file mode 100644 index 00000000..277eab38 --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_controls.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../@vue-flow/controls/dist/vue-flow-controls.mjs"], + "sourcesContent": ["import { openBlock, createElementBlock, renderSlot, createElementVNode, defineComponent, toRef, createBlock, unref, withCtx, Fragment, createVNode, resolveDynamicComponent, createCommentVNode } from \"vue\";\nimport { PanelPosition, useVueFlow, Panel } from \"@vue-flow/core\";\nconst _sfc_main$1 = {\n name: \"ControlButton\",\n compatConfig: { MODE: 3 }\n};\nconst _export_sfc = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\nconst _hoisted_1$5 = {\n type: \"button\",\n class: \"vue-flow__controls-button\"\n};\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"button\", _hoisted_1$5, [\n renderSlot(_ctx.$slots, \"default\")\n ]);\n}\nconst ControlButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render]]);\nconst _hoisted_1$4 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n};\nconst _hoisted_2$4 = /* @__PURE__ */ createElementVNode(\"path\", { d: \"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z\" }, null, -1);\nconst _hoisted_3$4 = [\n _hoisted_2$4\n];\nfunction render$4(_ctx, _cache) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1$4, _hoisted_3$4);\n}\nconst PlusIcon = { render: render$4 };\nconst _hoisted_1$3 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 5\"\n};\nconst _hoisted_2$3 = /* @__PURE__ */ createElementVNode(\"path\", { d: \"M0 0h32v4.2H0z\" }, null, -1);\nconst _hoisted_3$3 = [\n _hoisted_2$3\n];\nfunction render$3(_ctx, _cache) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1$3, _hoisted_3$3);\n}\nconst MinusIcon = { render: render$3 };\nconst _hoisted_1$2 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 30\"\n};\nconst _hoisted_2$2 = /* @__PURE__ */ createElementVNode(\"path\", { d: \"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\" }, null, -1);\nconst _hoisted_3$2 = [\n _hoisted_2$2\n];\nfunction render$2(_ctx, _cache) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1$2, _hoisted_3$2);\n}\nconst FitView = { render: render$2 };\nconst _hoisted_1$1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 25 32\"\n};\nconst _hoisted_2$1 = /* @__PURE__ */ createElementVNode(\"path\", { d: \"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z\" }, null, -1);\nconst _hoisted_3$1 = [\n _hoisted_2$1\n];\nfunction render$1(_ctx, _cache) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1$1, _hoisted_3$1);\n}\nconst Lock = { render: render$1 };\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 25 32\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", { d: \"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z\" }, null, -1);\nconst _hoisted_3 = [\n _hoisted_2\n];\nfunction render(_ctx, _cache) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_3);\n}\nconst Unlock = { render };\nconst __default__ = {\n name: \"Controls\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...__default__,\n props: {\n showZoom: { type: Boolean, default: true },\n showFitView: { type: Boolean, default: true },\n showInteractive: { type: Boolean, default: true },\n fitViewParams: {},\n position: { default: () => PanelPosition.BottomLeft }\n },\n emits: [\"zoomIn\", \"zoomOut\", \"fitView\", \"interactionChange\"],\n setup(__props, { emit }) {\n const {\n nodesDraggable,\n nodesConnectable,\n elementsSelectable,\n setInteractive,\n zoomIn,\n zoomOut,\n fitView,\n viewport,\n minZoom,\n maxZoom\n } = useVueFlow();\n const isInteractive = toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value);\n const minZoomReached = toRef(() => viewport.value.zoom <= minZoom.value);\n const maxZoomReached = toRef(() => viewport.value.zoom >= maxZoom.value);\n function onZoomInHandler() {\n zoomIn();\n emit(\"zoomIn\");\n }\n function onZoomOutHandler() {\n zoomOut();\n emit(\"zoomOut\");\n }\n function onFitViewHandler() {\n fitView(__props.fitViewParams);\n emit(\"fitView\");\n }\n function onInteractiveChangeHandler() {\n setInteractive(!isInteractive.value);\n emit(\"interactionChange\", !isInteractive.value);\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Panel), {\n class: \"vue-flow__controls\",\n position: _ctx.position\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"top\"),\n _ctx.showZoom ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n renderSlot(_ctx.$slots, \"control-zoom-in\", {}, () => [\n createVNode(ControlButton, {\n class: \"vue-flow__controls-zoomin\",\n disabled: maxZoomReached.value,\n onClick: onZoomInHandler\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon-zoom-in\", {}, () => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(PlusIcon))))\n ])\n ]),\n _: 3\n }, 8, [\"disabled\"])\n ]),\n renderSlot(_ctx.$slots, \"control-zoom-out\", {}, () => [\n createVNode(ControlButton, {\n class: \"vue-flow__controls-zoomout\",\n disabled: minZoomReached.value,\n onClick: onZoomOutHandler\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon-zoom-out\", {}, () => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(MinusIcon))))\n ])\n ]),\n _: 3\n }, 8, [\"disabled\"])\n ])\n ], 64)) : createCommentVNode(\"\", true),\n _ctx.showFitView ? renderSlot(_ctx.$slots, \"control-fit-view\", { key: 1 }, () => [\n createVNode(ControlButton, {\n class: \"vue-flow__controls-fitview\",\n onClick: onFitViewHandler\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon-fit-view\", {}, () => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(FitView))))\n ])\n ]),\n _: 3\n })\n ]) : createCommentVNode(\"\", true),\n _ctx.showInteractive ? renderSlot(_ctx.$slots, \"control-interactive\", { key: 2 }, () => [\n _ctx.showInteractive ? (openBlock(), createBlock(ControlButton, {\n key: 0,\n class: \"vue-flow__controls-interactive\",\n onClick: onInteractiveChangeHandler\n }, {\n default: withCtx(() => [\n isInteractive.value ? renderSlot(_ctx.$slots, \"icon-unlock\", { key: 0 }, () => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(Unlock))))\n ]) : createCommentVNode(\"\", true),\n !isInteractive.value ? renderSlot(_ctx.$slots, \"icon-lock\", { key: 1 }, () => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(Lock))))\n ]) : createCommentVNode(\"\", true)\n ]),\n _: 3\n })) : createCommentVNode(\"\", true)\n ]) : createCommentVNode(\"\", true),\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"position\"]);\n };\n }\n});\nexport {\n ControlButton,\n _sfc_main as Controls\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,cAAc,EAAE,MAA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E,KAAK,EAAE,GAAG,MAAM;AAAA,mBAC5E,UAAU,GAAG,YAAY,wBAAwB,MAAM,MAAM,CAAC,CAAC;AAAA,gBAClE,CAAC,IAAI,mBAAmB,IAAI,IAAI;AAAA,gBAChC,CAAC,cAAc,QAAQ,WAAW,KAAK,QAAQ,aAAa,EAAE,KAAK,EAAE,GAAG,MAAM;AAAA,mBAC3E,UAAU,GAAG,YAAY,wBAAwB,MAAM,IAAI,CAAC,CAAC;AAAA,gBAChE,CAAC,IAAI,mBAAmB,IAAI,IAAI;AAAA,cAClC,CAAC;AAAA,cACD,GAAG;AAAA,YACL,CAAC,KAAK,mBAAmB,IAAI,IAAI;AAAA,UACnC,CAAC,IAAI,mBAAmB,IAAI,IAAI;AAAA,UAChC,WAAW,KAAK,QAAQ,SAAS;AAAA,QACnC,CAAC;AAAA,QACD,GAAG;AAAA,MACL,GAAG,GAAG,CAAC,UAAU,CAAC;AAAA,IACpB;AAAA,EACF;AACF,CAAC;", + "names": ["_sfc_main"] +} diff --git a/node_modules/.vite/deps/@vue-flow_core.js b/node_modules/.vite/deps/@vue-flow_core.js new file mode 100644 index 00000000..57b1f73b --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_core.js @@ -0,0 +1,143 @@ +import { + BezierEdge$1, + ConnectionLineType, + ConnectionMode, + ErrorCode, + MarkerType, + NodeId, + PanOnScrollMode, + PanelPosition, + Position, + SelectionMode, + SimpleBezierEdge$1, + SmoothStepEdge$1, + StepEdge$1, + StraightEdge$1, + VueFlow, + VueFlowError, + _sfc_main, + _sfc_main$1, + _sfc_main$3, + _sfc_main$d, + _sfc_main$e, + _sfc_main$f, + addEdge, + applyChanges, + applyEdgeChanges, + applyNodeChanges, + clamp, + connectionExists, + defaultEdgeTypes, + defaultNodeTypes, + getBezierEdgeCenter, + getBezierPath, + getBoundsofRects, + getConnectedEdges, + getIncomers, + getMarkerId, + getNodesInside, + getOutgoers, + getRectOfNodes, + getSimpleBezierPath, + getSimpleEdgeCenter, + getSmoothStepPath, + getStraightPath, + getTransformForBounds, + isEdge, + isErrorOfType, + isGraphEdge, + isGraphNode, + isMacOs, + isNode, + pointToRendererPoint, + rendererPointToPoint, + updateEdge, + useConnection, + useEdge, + useEdgesData, + useGetPointerPosition, + useHandle, + useHandleConnections, + useKeyPress, + useNode, + useNodeConnections, + useNodeId, + useNodesData, + useNodesInitialized, + useVueFlow, + useZoomPanHelper, + wheelDelta +} from "./chunk-OUZUAOAF.js"; +import "./chunk-QT7TTBG7.js"; +export { + _sfc_main$d as BaseEdge, + BezierEdge$1 as BezierEdge, + ConnectionLineType, + ConnectionMode, + _sfc_main$3 as EdgeLabelRenderer, + _sfc_main$e as EdgeText, + ErrorCode, + _sfc_main$f as Handle, + MarkerType, + NodeId as NodeIdInjection, + PanOnScrollMode, + _sfc_main as Panel, + PanelPosition, + Position, + SelectionMode, + SimpleBezierEdge$1 as SimpleBezierEdge, + SmoothStepEdge$1 as SmoothStepEdge, + StepEdge$1 as StepEdge, + StraightEdge$1 as StraightEdge, + _sfc_main$1 as VueFlow, + VueFlowError, + VueFlow as VueFlowInjection, + addEdge, + applyChanges, + applyEdgeChanges, + applyNodeChanges, + clamp, + connectionExists, + defaultEdgeTypes, + defaultNodeTypes, + getBezierEdgeCenter, + getBezierPath, + getBoundsofRects, + getConnectedEdges, + getIncomers, + getMarkerId, + getNodesInside, + getOutgoers, + getRectOfNodes, + getSimpleBezierPath, + getSimpleEdgeCenter, + getSmoothStepPath, + getStraightPath, + getTransformForBounds, + rendererPointToPoint as graphPosToZoomedPos, + isEdge, + isErrorOfType, + isGraphEdge, + isGraphNode, + isMacOs, + isNode, + pointToRendererPoint, + rendererPointToPoint, + updateEdge, + useConnection, + useEdge, + useEdgesData, + useGetPointerPosition, + useHandle, + useHandleConnections, + useKeyPress, + useNode, + useNodeConnections, + useNodeId, + useNodesData, + useNodesInitialized, + useVueFlow, + useZoomPanHelper, + wheelDelta +}; +//# sourceMappingURL=@vue-flow_core.js.map diff --git a/node_modules/.vite/deps/@vue-flow_core.js.map b/node_modules/.vite/deps/@vue-flow_core.js.map new file mode 100644 index 00000000..98652118 --- /dev/null +++ b/node_modules/.vite/deps/@vue-flow_core.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sourcesContent": [], + "mappings": "", + "names": [] +} diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json index 65a94752..f5493a84 100644 --- a/node_modules/.vite/deps/_metadata.json +++ b/node_modules/.vite/deps/_metadata.json @@ -1,23 +1,41 @@ { - "hash": "891f6d0d", - "browserHash": "ace4061b", + "hash": "5686f588", + "browserHash": "504d91e1", "optimized": { "pinia": { "src": "../../pinia/dist/pinia.mjs", "file": "pinia.js", - "fileHash": "743100d8", + "fileHash": "4984e75a", "needsInterop": false }, "vue": { "src": "../../vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "2793dc8b", + "fileHash": "91b27941", "needsInterop": false }, "vue-router": { "src": "../../vue-router/dist/vue-router.mjs", "file": "vue-router.js", - "fileHash": "868d5267", + "fileHash": "1d5cd9f7", + "needsInterop": false + }, + "@vue-flow/core": { + "src": "../../@vue-flow/core/dist/vue-flow-core.mjs", + "file": "@vue-flow_core.js", + "fileHash": "d8a4d018", + "needsInterop": false + }, + "@vue-flow/controls": { + "src": "../../@vue-flow/controls/dist/vue-flow-controls.mjs", + "file": "@vue-flow_controls.js", + "fileHash": "47d61b01", + "needsInterop": false + }, + "@vue-flow/background": { + "src": "../../@vue-flow/background/dist/vue-flow-background.mjs", + "file": "@vue-flow_background.js", + "fileHash": "aed5145d", "needsInterop": false } }, @@ -25,6 +43,9 @@ "chunk-YFT6OQ5R": { "file": "chunk-YFT6OQ5R.js" }, + "chunk-OUZUAOAF": { + "file": "chunk-OUZUAOAF.js" + }, "chunk-QT7TTBG7": { "file": "chunk-QT7TTBG7.js" } diff --git a/node_modules/.vite/deps/chunk-OUZUAOAF.js b/node_modules/.vite/deps/chunk-OUZUAOAF.js new file mode 100644 index 00000000..588b3d21 --- /dev/null +++ b/node_modules/.vite/deps/chunk-OUZUAOAF.js @@ -0,0 +1,10142 @@ +import { + Fragment, + Teleport, + computed, + createBaseVNode, + createBlock, + createCommentVNode, + createElementBlock, + createPropsRestProxy, + createTextVNode, + createVNode, + customRef, + defineComponent, + effectScope, + getCurrentInstance, + getCurrentScope, + h, + inject, + isMemoSame, + isRef, + markRaw, + mergeProps, + nextTick, + normalizeClass, + normalizeStyle, + onBeforeMount, + onBeforeUnmount, + onMounted, + onScopeDispose, + onUnmounted, + openBlock, + provide, + reactive, + readonly, + ref, + renderList, + renderSlot, + resolveComponent, + resolveDynamicComponent, + shallowRef, + toDisplayString, + toRef, + toRefs, + toValue, + unref, + useAttrs, + useSlots, + watch, + withCtx +} from "./chunk-QT7TTBG7.js"; + +// node_modules/@vue-flow/core/dist/vue-flow-core.mjs +function tryOnScopeDispose(fn) { + if (getCurrentScope()) { + onScopeDispose(fn); + return true; + } + return false; +} +function toValue2(r) { + return typeof r === "function" ? r() : unref(r); +} +function toReactive(objectRef) { + if (!isRef(objectRef)) + return reactive(objectRef); + const proxy = new Proxy({}, { + get(_, p, receiver) { + return unref(Reflect.get(objectRef.value, p, receiver)); + }, + set(_, p, value) { + if (isRef(objectRef.value[p]) && !isRef(value)) + objectRef.value[p].value = value; + else + objectRef.value[p] = value; + return true; + }, + deleteProperty(_, p) { + return Reflect.deleteProperty(objectRef.value, p); + }, + has(_, p) { + return Reflect.has(objectRef.value, p); + }, + ownKeys() { + return Object.keys(objectRef.value); + }, + getOwnPropertyDescriptor() { + return { + enumerable: true, + configurable: true + }; + } + }); + return reactive(proxy); +} +var isClient = typeof window !== "undefined" && typeof document !== "undefined"; +var isDef$1 = (val) => typeof val !== "undefined"; +var toString = Object.prototype.toString; +var isObject = (val) => toString.call(val) === "[object Object]"; +var noop$2 = () => { +}; +function createFilterWrapper(filter2, fn) { + function wrapper(...args) { + return new Promise((resolve, reject) => { + Promise.resolve(filter2(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject); + }); + } + return wrapper; +} +var bypassFilter = (invoke) => { + return invoke(); +}; +function pausableFilter(extendFilter = bypassFilter) { + const isActive = ref(true); + function pause() { + isActive.value = false; + } + function resume() { + isActive.value = true; + } + const eventFilter = (...args) => { + if (isActive.value) + extendFilter(...args); + }; + return { isActive: readonly(isActive), pause, resume, eventFilter }; +} +function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") { + return new Promise((resolve, reject) => { + if (throwOnTimeout) + setTimeout(() => reject(reason), ms); + else + setTimeout(resolve, ms); + }); +} +function watchWithFilter(source, cb, options = {}) { + const { + eventFilter = bypassFilter, + ...watchOptions + } = options; + return watch( + source, + createFilterWrapper( + eventFilter, + cb + ), + watchOptions + ); +} +function watchPausable(source, cb, options = {}) { + const { + eventFilter: filter2, + ...watchOptions + } = options; + const { eventFilter, pause, resume, isActive } = pausableFilter(filter2); + const stop = watchWithFilter( + source, + cb, + { + ...watchOptions, + eventFilter + } + ); + return { stop, pause, resume, isActive }; +} +function toRefs2(objectRef, options = {}) { + if (!isRef(objectRef)) + return toRefs(objectRef); + const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; + for (const key in objectRef.value) { + result[key] = customRef(() => ({ + get() { + return objectRef.value[key]; + }, + set(v) { + var _a; + const replaceRef = (_a = toValue2(options.replaceRef)) != null ? _a : true; + if (replaceRef) { + if (Array.isArray(objectRef.value)) { + const copy = [...objectRef.value]; + copy[key] = v; + objectRef.value = copy; + } else { + const newObject = { ...objectRef.value, [key]: v }; + Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); + objectRef.value = newObject; + } + } else { + objectRef.value[key] = v; + } + } + })); + } + return result; +} +function createUntil(r, isNot = false) { + function toMatch(condition, { flush = "sync", deep = false, timeout: timeout2, throwOnTimeout } = {}) { + let stop = null; + const watcher = new Promise((resolve) => { + stop = watch( + r, + (v) => { + if (condition(v) !== isNot) { + stop == null ? void 0 : stop(); + resolve(v); + } + }, + { + flush, + deep, + immediate: true + } + ); + }); + const promises = [watcher]; + if (timeout2 != null) { + promises.push( + promiseTimeout(timeout2, throwOnTimeout).then(() => toValue2(r)).finally(() => stop == null ? void 0 : stop()) + ); + } + return Promise.race(promises); + } + function toBe(value, options) { + if (!isRef(value)) + return toMatch((v) => v === value, options); + const { flush = "sync", deep = false, timeout: timeout2, throwOnTimeout } = options != null ? options : {}; + let stop = null; + const watcher = new Promise((resolve) => { + stop = watch( + [r, value], + ([v1, v2]) => { + if (isNot !== (v1 === v2)) { + stop == null ? void 0 : stop(); + resolve(v1); + } + }, + { + flush, + deep, + immediate: true + } + ); + }); + const promises = [watcher]; + if (timeout2 != null) { + promises.push( + promiseTimeout(timeout2, throwOnTimeout).then(() => toValue2(r)).finally(() => { + stop == null ? void 0 : stop(); + return toValue2(r); + }) + ); + } + return Promise.race(promises); + } + function toBeTruthy(options) { + return toMatch((v) => Boolean(v), options); + } + function toBeNull(options) { + return toBe(null, options); + } + function toBeUndefined(options) { + return toBe(void 0, options); + } + function toBeNaN(options) { + return toMatch(Number.isNaN, options); + } + function toContains(value, options) { + return toMatch((v) => { + const array2 = Array.from(v); + return array2.includes(value) || array2.includes(toValue2(value)); + }, options); + } + function changed(options) { + return changedTimes(1, options); + } + function changedTimes(n = 1, options) { + let count = -1; + return toMatch(() => { + count += 1; + return count >= n; + }, options); + } + if (Array.isArray(toValue2(r))) { + const instance = { + toMatch, + toContains, + changed, + changedTimes, + get not() { + return createUntil(r, !isNot); + } + }; + return instance; + } else { + const instance = { + toMatch, + toBe, + toBeTruthy, + toBeNull, + toBeNaN, + toBeUndefined, + changed, + changedTimes, + get not() { + return createUntil(r, !isNot); + } + }; + return instance; + } +} +function until(r) { + return createUntil(r); +} +function unrefElement(elRef) { + var _a; + const plain = toValue2(elRef); + return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; +} +var defaultWindow = isClient ? window : void 0; +function useEventListener(...args) { + let target; + let events; + let listeners; + let options; + if (typeof args[0] === "string" || Array.isArray(args[0])) { + [events, listeners, options] = args; + target = defaultWindow; + } else { + [target, events, listeners, options] = args; + } + if (!target) + return noop$2; + if (!Array.isArray(events)) + events = [events]; + if (!Array.isArray(listeners)) + listeners = [listeners]; + const cleanups = []; + const cleanup = () => { + cleanups.forEach((fn) => fn()); + cleanups.length = 0; + }; + const register = (el, event, listener, options2) => { + el.addEventListener(event, listener, options2); + return () => el.removeEventListener(event, listener, options2); + }; + const stopWatch = watch( + () => [unrefElement(target), toValue2(options)], + ([el, options2]) => { + cleanup(); + if (!el) + return; + const optionsClone = isObject(options2) ? { ...options2 } : options2; + cleanups.push( + ...events.flatMap((event) => { + return listeners.map((listener) => register(el, event, listener, optionsClone)); + }) + ); + }, + { immediate: true, flush: "post" } + ); + const stop = () => { + stopWatch(); + cleanup(); + }; + tryOnScopeDispose(stop); + return stop; +} +function createKeyPredicate$1(keyFilter) { + if (typeof keyFilter === "function") + return keyFilter; + else if (typeof keyFilter === "string") + return (event) => event.key === keyFilter; + else if (Array.isArray(keyFilter)) + return (event) => keyFilter.includes(event.key); + return () => true; +} +function onKeyStroke(...args) { + let key; + let handler; + let options = {}; + if (args.length === 3) { + key = args[0]; + handler = args[1]; + options = args[2]; + } else if (args.length === 2) { + if (typeof args[1] === "object") { + key = true; + handler = args[0]; + options = args[1]; + } else { + key = args[0]; + handler = args[1]; + } + } else { + key = true; + handler = args[0]; + } + const { + target = defaultWindow, + eventName = "keydown", + passive = false, + dedupe = false + } = options; + const predicate = createKeyPredicate$1(key); + const listener = (e) => { + if (e.repeat && toValue2(dedupe)) + return; + if (predicate(e)) + handler(e); + }; + return useEventListener(target, eventName, listener, passive); +} +function cloneFnJSON(source) { + return JSON.parse(JSON.stringify(source)); +} +function useVModel(props, key, emit, options = {}) { + var _a, _b, _c; + const { + clone = false, + passive = false, + eventName, + deep = false, + defaultValue, + shouldEmit + } = options; + const vm = getCurrentInstance(); + const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy)); + let event = eventName; + if (!key) { + { + key = "modelValue"; + } + } + event = event || `update:${key.toString()}`; + const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val); + const getValue = () => isDef$1(props[key]) ? cloneFn(props[key]) : defaultValue; + const triggerEmit = (value) => { + if (shouldEmit) { + if (shouldEmit(value)) + _emit(event, value); + } else { + _emit(event, value); + } + }; + if (passive) { + const initialValue = getValue(); + const proxy = ref(initialValue); + let isUpdating = false; + watch( + () => props[key], + (v) => { + if (!isUpdating) { + isUpdating = true; + proxy.value = cloneFn(v); + nextTick(() => isUpdating = false); + } + } + ); + watch( + proxy, + (v) => { + if (!isUpdating && (v !== props[key] || deep)) + triggerEmit(v); + }, + { deep } + ); + return proxy; + } else { + return computed({ + get() { + return getValue(); + }, + set(value) { + triggerEmit(value); + } + }); + } +} +var noop$1 = { value: () => { +} }; +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) + throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} +function Dispatch(_) { + this._ = _; +} +function parseTypenames$1(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) + name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) + throw new Error("unknown type: " + t); + return { type: t, name }; + }); +} +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, T = parseTypenames$1(typename + "", _), t, i = -1, n = T.length; + if (arguments.length < 2) { + while (++i < n) + if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) + return t; + return; + } + if (callback != null && typeof callback !== "function") + throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) + _[t] = set$1(_[t], typename.name, callback); + else if (callback == null) + for (t in _) + _[t] = set$1(_[t], typename.name, null); + } + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) + copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) + for (var args = new Array(n), i = 0, n, t; i < n; ++i) + args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) + throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) + t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) + throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) + t[i].value.apply(that, args); + } +}; +function get$1(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} +function set$1(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop$1, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) + type.push({ name, value: callback }); + return type; +} +var xhtml = "http://www.w3.org/1999/xhtml"; +var namespaces = { + svg: "http://www.w3.org/2000/svg", + xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}; +function namespace(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") + name = name.slice(i + 1); + return namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix], local: name } : name; +} +function creatorInherit(name) { + return function() { + var document2 = this.ownerDocument, uri = this.namespaceURI; + return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name); + }; +} +function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; +} +function creator(name) { + var fullname = namespace(name); + return (fullname.local ? creatorFixed : creatorInherit)(fullname); +} +function none() { +} +function selector(selector2) { + return selector2 == null ? none : function() { + return this.querySelector(selector2); + }; +} +function selection_select(select2) { + if (typeof select2 !== "function") + select2 = selector(select2); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) { + if ("__data__" in node) + subnode.__data__ = node.__data__; + subgroup[i] = subnode; + } + } + } + return new Selection$1(subgroups, this._parents); +} +function array(x) { + return x == null ? [] : Array.isArray(x) ? x : Array.from(x); +} +function empty() { + return []; +} +function selectorAll(selector2) { + return selector2 == null ? empty : function() { + return this.querySelectorAll(selector2); + }; +} +function arrayAll(select2) { + return function() { + return array(select2.apply(this, arguments)); + }; +} +function selection_selectAll(select2) { + if (typeof select2 === "function") + select2 = arrayAll(select2); + else + select2 = selectorAll(select2); + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + subgroups.push(select2.call(node, node.__data__, i, group)); + parents.push(node); + } + } + } + return new Selection$1(subgroups, parents); +} +function matcher(selector2) { + return function() { + return this.matches(selector2); + }; +} +function childMatcher(selector2) { + return function(node) { + return node.matches(selector2); + }; +} +var find = Array.prototype.find; +function childFind(match) { + return function() { + return find.call(this.children, match); + }; +} +function childFirst() { + return this.firstElementChild; +} +function selection_selectChild(match) { + return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match))); +} +var filter = Array.prototype.filter; +function children() { + return Array.from(this.children); +} +function childrenFilter(match) { + return function() { + return filter.call(this.children, match); + }; +} +function selection_selectChildren(match) { + return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match))); +} +function selection_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + return new Selection$1(subgroups, this._parents); +} +function sparse(update) { + return new Array(update.length); +} +function selection_enter() { + return new Selection$1(this._enter || this._groups.map(sparse), this._parents); +} +function EnterNode(parent, datum2) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum2; +} +EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { + return this._parent.insertBefore(child, this._next); + }, + insertBefore: function(child, next) { + return this._parent.insertBefore(child, next); + }, + querySelector: function(selector2) { + return this._parent.querySelector(selector2); + }, + querySelectorAll: function(selector2) { + return this._parent.querySelectorAll(selector2); + } +}; +function constant$3(x) { + return function() { + return x; + }; +} +function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, node, groupLength = group.length, dataLength = data.length; + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } +} +function bindKey(parent, group, enter, update, exit, data, key) { + var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; + if (nodeByKeyValue.has(keyValue)) { + exit[i] = node; + } else { + nodeByKeyValue.set(keyValue, node); + } + } + } + for (i = 0; i < dataLength; ++i) { + keyValue = key.call(parent, data[i], i, data) + ""; + if (node = nodeByKeyValue.get(keyValue)) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue.delete(keyValue); + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) { + exit[i] = node; + } + } +} +function datum(node) { + return node.__data__; +} +function selection_data(value, key) { + if (!arguments.length) + return Array.from(this, datum); + var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; + if (typeof value !== "function") + value = constant$3(value); + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); + for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { + if (previous = enterGroup[i0]) { + if (i0 >= i1) + i1 = i0 + 1; + while (!(next = updateGroup[i1]) && ++i1 < dataLength) + ; + previous._next = next || null; + } + } + } + update = new Selection$1(update, parents); + update._enter = enter; + update._exit = exit; + return update; +} +function arraylike(data) { + return typeof data === "object" && "length" in data ? data : Array.from(data); +} +function selection_exit() { + return new Selection$1(this._exit || this._groups.map(sparse), this._parents); +} +function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + if (typeof onenter === "function") { + enter = onenter(enter); + if (enter) + enter = enter.selection(); + } else { + enter = enter.append(onenter + ""); + } + if (onupdate != null) { + update = onupdate(update); + if (update) + update = update.selection(); + } + if (onexit == null) + exit.remove(); + else + onexit(exit); + return enter && update ? enter.merge(update).order() : update; +} +function selection_merge(context) { + var selection2 = context.selection ? context.selection() : context; + for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Selection$1(merges, this._parents); +} +function selection_order() { + for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) { + for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) { + if (node = group[i]) { + if (next && node.compareDocumentPosition(next) ^ 4) + next.parentNode.insertBefore(node, next); + next = node; + } + } + } + return this; +} +function selection_sort(compare) { + if (!compare) + compare = ascending; + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group[i]) { + sortgroup[i] = node; + } + } + sortgroup.sort(compareNode); + } + return new Selection$1(sortgroups, this._parents).order(); +} +function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} +function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; +} +function selection_nodes() { + return Array.from(this); +} +function selection_node() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) + return node; + } + } + return null; +} +function selection_size() { + let size = 0; + for (const node of this) + ++size; + return size; +} +function selection_empty() { + return !this.node(); +} +function selection_each(callback) { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { + if (node = group[i]) + callback.call(node, node.__data__, i, group); + } + } + return this; +} +function attrRemove$1(name) { + return function() { + this.removeAttribute(name); + }; +} +function attrRemoveNS$1(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} +function attrConstant$1(name, value) { + return function() { + this.setAttribute(name, value); + }; +} +function attrConstantNS$1(fullname, value) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value); + }; +} +function attrFunction$1(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.removeAttribute(name); + else + this.setAttribute(name, v); + }; +} +function attrFunctionNS$1(fullname, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.removeAttributeNS(fullname.space, fullname.local); + else + this.setAttributeNS(fullname.space, fullname.local, v); + }; +} +function selection_attr(name, value) { + var fullname = namespace(name); + if (arguments.length < 2) { + var node = this.node(); + return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname); + } + return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value)); +} +function defaultView(node) { + return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView; +} +function styleRemove$1(name) { + return function() { + this.style.removeProperty(name); + }; +} +function styleConstant$1(name, value, priority) { + return function() { + this.style.setProperty(name, value, priority); + }; +} +function styleFunction$1(name, value, priority) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.style.removeProperty(name); + else + this.style.setProperty(name, v, priority); + }; +} +function selection_style(name, value, priority) { + return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); +} +function styleValue(node, name) { + return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); +} +function propertyRemove(name) { + return function() { + delete this[name]; + }; +} +function propertyConstant(name, value) { + return function() { + this[name] = value; + }; +} +function propertyFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + delete this[name]; + else + this[name] = v; + }; +} +function selection_property(name, value) { + return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; +} +function classArray(string) { + return string.trim().split(/^|\s+/); +} +function classList(node) { + return node.classList || new ClassList(node); +} +function ClassList(node) { + this._node = node; + this._names = classArray(node.getAttribute("class") || ""); +} +ClassList.prototype = { + add: function(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name) { + return this._names.indexOf(name) >= 0; + } +}; +function classedAdd(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) + list.add(names[i]); +} +function classedRemove(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) + list.remove(names[i]); +} +function classedTrue(names) { + return function() { + classedAdd(this, names); + }; +} +function classedFalse(names) { + return function() { + classedRemove(this, names); + }; +} +function classedFunction(names, value) { + return function() { + (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; +} +function selection_classed(name, value) { + var names = classArray(name + ""); + if (arguments.length < 2) { + var list = classList(this.node()), i = -1, n = names.length; + while (++i < n) + if (!list.contains(names[i])) + return false; + return true; + } + return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); +} +function textRemove() { + this.textContent = ""; +} +function textConstant$1(value) { + return function() { + this.textContent = value; + }; +} +function textFunction$1(value) { + return function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; +} +function selection_text(value) { + return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent; +} +function htmlRemove() { + this.innerHTML = ""; +} +function htmlConstant(value) { + return function() { + this.innerHTML = value; + }; +} +function htmlFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; +} +function selection_html(value) { + return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; +} +function raise() { + if (this.nextSibling) + this.parentNode.appendChild(this); +} +function selection_raise() { + return this.each(raise); +} +function lower() { + if (this.previousSibling) + this.parentNode.insertBefore(this, this.parentNode.firstChild); +} +function selection_lower() { + return this.each(lower); +} +function selection_append(name) { + var create2 = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create2.apply(this, arguments)); + }); +} +function constantNull() { + return null; +} +function selection_insert(name, before) { + var create2 = typeof name === "function" ? name : creator(name), select2 = before == null ? constantNull : typeof before === "function" ? before : selector(before); + return this.select(function() { + return this.insertBefore(create2.apply(this, arguments), select2.apply(this, arguments) || null); + }); +} +function remove() { + var parent = this.parentNode; + if (parent) + parent.removeChild(this); +} +function selection_remove() { + return this.each(remove); +} +function selection_cloneShallow() { + var clone = this.cloneNode(false), parent = this.parentNode; + return parent ? parent.insertBefore(clone, this.nextSibling) : clone; +} +function selection_cloneDeep() { + var clone = this.cloneNode(true), parent = this.parentNode; + return parent ? parent.insertBefore(clone, this.nextSibling) : clone; +} +function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +} +function selection_datum(value) { + return arguments.length ? this.property("__data__", value) : this.node().__data__; +} +function contextListener(listener) { + return function(event) { + listener.call(this, event, this.__data__); + }; +} +function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) + name = t.slice(i + 1), t = t.slice(0, i); + return { type: t, name }; + }); +} +function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) + return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + } else { + on[++i] = o; + } + } + if (++i) + on.length = i; + else + delete this.__on; + }; +} +function onAdd(typename, value, options) { + return function() { + var on = this.__on, o, listener = contextListener(value); + if (on) + for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + this.addEventListener(o.type, o.listener = listener, o.options = options); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, options); + o = { type: typename.type, name: typename.name, value, listener, options }; + if (!on) + this.__on = [o]; + else + on.push(o); + }; +} +function selection_on(typename, value, options) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + if (arguments.length < 2) { + var on = this.node().__on; + if (on) + for (var j = 0, m = on.length, o; j < m; ++j) { + for (i = 0, o = on[j]; i < n; ++i) { + if ((t = typenames[i]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + on = value ? onAdd : onRemove; + for (i = 0; i < n; ++i) + this.each(on(typenames[i], value, options)); + return this; +} +function dispatchEvent(node, type, params) { + var window2 = defaultView(node), event = window2.CustomEvent; + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window2.document.createEvent("Event"); + if (params) + event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else + event.initEvent(type, false, false); + } + node.dispatchEvent(event); +} +function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; +} +function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; +} +function selection_dispatch(type, params) { + return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params)); +} +function* selection_iterator() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { + if (node = group[i]) + yield node; + } + } +} +var root = [null]; +function Selection$1(groups, parents) { + this._groups = groups; + this._parents = parents; +} +function selection() { + return new Selection$1([[document.documentElement]], root); +} +function selection_selection() { + return this; +} +Selection$1.prototype = selection.prototype = { + constructor: Selection$1, + select: selection_select, + selectAll: selection_selectAll, + selectChild: selection_selectChild, + selectChildren: selection_selectChildren, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + selection: selection_selection, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch, + [Symbol.iterator]: selection_iterator +}; +function select(selector2) { + return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root); +} +function sourceEvent(event) { + let sourceEvent2; + while (sourceEvent2 = event.sourceEvent) + event = sourceEvent2; + return event; +} +function pointer(event, node) { + event = sourceEvent(event); + if (node === void 0) + node = event.currentTarget; + if (node) { + var svg = node.ownerSVGElement || node; + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } + if (node.getBoundingClientRect) { + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; + } + } + return [event.pageX, event.pageY]; +} +var nonpassive = { passive: false }; +var nonpassivecapture = { capture: true, passive: false }; +function nopropagation$1(event) { + event.stopImmediatePropagation(); +} +function noevent$1(event) { + event.preventDefault(); + event.stopImmediatePropagation(); +} +function dragDisable(view) { + var root2 = view.document.documentElement, selection2 = select(view).on("dragstart.drag", noevent$1, nonpassivecapture); + if ("onselectstart" in root2) { + selection2.on("selectstart.drag", noevent$1, nonpassivecapture); + } else { + root2.__noselect = root2.style.MozUserSelect; + root2.style.MozUserSelect = "none"; + } +} +function yesdrag(view, noclick) { + var root2 = view.document.documentElement, selection2 = select(view).on("dragstart.drag", null); + if (noclick) { + selection2.on("click.drag", noevent$1, nonpassivecapture); + setTimeout(function() { + selection2.on("click.drag", null); + }, 0); + } + if ("onselectstart" in root2) { + selection2.on("selectstart.drag", null); + } else { + root2.style.MozUserSelect = root2.__noselect; + delete root2.__noselect; + } +} +var constant$2 = (x) => () => x; +function DragEvent(type, { + sourceEvent: sourceEvent2, + subject, + target, + identifier, + active, + x, + y, + dx, + dy, + dispatch: dispatch2 +}) { + Object.defineProperties(this, { + type: { value: type, enumerable: true, configurable: true }, + sourceEvent: { value: sourceEvent2, enumerable: true, configurable: true }, + subject: { value: subject, enumerable: true, configurable: true }, + target: { value: target, enumerable: true, configurable: true }, + identifier: { value: identifier, enumerable: true, configurable: true }, + active: { value: active, enumerable: true, configurable: true }, + x: { value: x, enumerable: true, configurable: true }, + y: { value: y, enumerable: true, configurable: true }, + dx: { value: dx, enumerable: true, configurable: true }, + dy: { value: dy, enumerable: true, configurable: true }, + _: { value: dispatch2 } + }); +} +DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; +}; +function defaultFilter$1(event) { + return !event.ctrlKey && !event.button; +} +function defaultContainer() { + return this.parentNode; +} +function defaultSubject(event, d) { + return d == null ? { x: event.x, y: event.y } : d; +} +function defaultTouchable$1() { + return navigator.maxTouchPoints || "ontouchstart" in this; +} +function drag() { + var filter2 = defaultFilter$1, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable$1, gestures = {}, listeners = dispatch("start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0; + function drag2(selection2) { + selection2.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + function mousedowned(event, d) { + if (touchending || !filter2.call(this, event, d)) + return; + var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); + if (!gesture) + return; + select(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture); + dragDisable(event.view); + nopropagation$1(event); + mousemoving = false; + mousedownx = event.clientX; + mousedowny = event.clientY; + gesture("start", event); + } + function mousemoved(event) { + noevent$1(event); + if (!mousemoving) { + var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag", event); + } + function mouseupped(event) { + select(event.view).on("mousemove.drag mouseup.drag", null); + yesdrag(event.view, mousemoving); + noevent$1(event); + gestures.mouse("end", event); + } + function touchstarted(event, d) { + if (!filter2.call(this, event, d)) + return; + var touches = event.changedTouches, c = container.call(this, event, d), n = touches.length, i, gesture; + for (i = 0; i < n; ++i) { + if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { + nopropagation$1(event); + gesture("start", event, touches[i]); + } + } + } + function touchmoved(event) { + var touches = event.changedTouches, n = touches.length, i, gesture; + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent$1(event); + gesture("drag", event, touches[i]); + } + } + } + function touchended(event) { + var touches = event.changedTouches, n = touches.length, i, gesture; + if (touchending) + clearTimeout(touchending); + touchending = setTimeout(function() { + touchending = null; + }, 500); + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation$1(event); + gesture("end", event, touches[i]); + } + } + } + function beforestart(that, container2, event, d, identifier, touch) { + var dispatch2 = listeners.copy(), p = pointer(touch || event, container2), dx, dy, s; + if ((s = subject.call(that, new DragEvent("beforestart", { + sourceEvent: event, + target: drag2, + identifier, + active, + x: p[0], + y: p[1], + dx: 0, + dy: 0, + dispatch: dispatch2 + }), d)) == null) + return; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return function gesture(type, event2, touch2) { + var p0 = p, n; + switch (type) { + case "start": + gestures[identifier] = gesture, n = active++; + break; + case "end": + delete gestures[identifier], --active; + case "drag": + p = pointer(touch2 || event2, container2), n = active; + break; + } + dispatch2.call( + type, + that, + new DragEvent(type, { + sourceEvent: event2, + subject: s, + target: drag2, + identifier, + active: n, + x: p[0] + dx, + y: p[1] + dy, + dx: p[0] - p0[0], + dy: p[1] - p0[1], + dispatch: dispatch2 + }), + d + ); + }; + } + drag2.filter = function(_) { + return arguments.length ? (filter2 = typeof _ === "function" ? _ : constant$2(!!_), drag2) : filter2; + }; + drag2.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant$2(_), drag2) : container; + }; + drag2.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant$2(_), drag2) : subject; + }; + drag2.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$2(!!_), drag2) : touchable; + }; + drag2.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? drag2 : value; + }; + drag2.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, drag2) : Math.sqrt(clickDistance2); + }; + return drag2; +} +function define(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +} +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) + prototype[key] = definition[key]; + return prototype; +} +function Color() { +} +var darker = 0.7; +var brighter = 1 / darker; +var reI = "\\s*([+-]?\\d+)\\s*"; +var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*"; +var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*"; +var reHex = /^#([0-9a-f]{3,8})$/; +var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`); +var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`); +var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`); +var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`); +var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`); +var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`); +var named = { + 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 +}; +define(Color, color, { + copy(channels) { + return Object.assign(new this.constructor(), this, channels); + }, + displayable() { + return this.rgb().displayable(); + }, + hex: color_formatHex, + // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHex8: color_formatHex8, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb +}); +function color_formatHex() { + return this.rgb().formatHex(); +} +function color_formatHex8() { + return this.rgb().formatHex8(); +} +function color_formatHsl() { + return hslConvert(this).formatHsl(); +} +function color_formatRgb() { + return this.rgb().formatRgb(); +} +function color(format) { + var m, l; + format = (format + "").trim().toLowerCase(); + return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; +} +function rgbn(n) { + return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1); +} +function rgba(r, g, b, a) { + if (a <= 0) + r = g = b = NaN; + return new Rgb(r, g, b, a); +} +function rgbConvert(o) { + if (!(o instanceof Color)) + o = color(o); + if (!o) + return new Rgb(); + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} +define(Rgb, rgb, extend(Color, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb() { + return this; + }, + clamp() { + return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity)); + }, + displayable() { + return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); + }, + hex: rgb_formatHex, + // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatHex8: rgb_formatHex8, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb +})); +function rgb_formatHex() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`; +} +function rgb_formatHex8() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; +} +function rgb_formatRgb() { + const a = clampa(this.opacity); + return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`; +} +function clampa(opacity) { + return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity)); +} +function clampi(value) { + return Math.max(0, Math.min(255, Math.round(value) || 0)); +} +function hex(value) { + value = clampi(value); + return (value < 16 ? "0" : "") + value.toString(16); +} +function hsla(h2, s, l, a) { + if (a <= 0) + h2 = s = l = NaN; + else if (l <= 0 || l >= 1) + h2 = s = NaN; + else if (s <= 0) + h2 = NaN; + return new Hsl(h2, s, l, a); +} +function hslConvert(o) { + if (o instanceof Hsl) + return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) + o = color(o); + if (!o) + return new Hsl(); + if (o instanceof Hsl) + return o; + o = o.rgb(); + var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h2 = NaN, s = max - min, l = (max + min) / 2; + if (s) { + if (r === max) + h2 = (g - b) / s + (g < b) * 6; + else if (g === max) + h2 = (b - r) / s + 2; + else + h2 = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h2 *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h2; + } + return new Hsl(h2, s, l, o.opacity); +} +function hsl(h2, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h2) : new Hsl(h2, s, l, opacity == null ? 1 : opacity); +} +function Hsl(h2, s, l, opacity) { + this.h = +h2; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} +define(Hsl, hsl, extend(Color, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb() { + var h2 = this.h % 360 + (this.h < 0) * 360, s = isNaN(h2) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h2 >= 240 ? h2 - 240 : h2 + 120, m1, m2), + hsl2rgb(h2, m1, m2), + hsl2rgb(h2 < 120 ? h2 + 240 : h2 - 120, m1, m2), + this.opacity + ); + }, + clamp() { + return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(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 a = clampa(this.opacity); + return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`; + } +})); +function clamph(value) { + value = (value || 0) % 360; + return value < 0 ? value + 360 : value; +} +function clampt(value) { + return Math.max(0, Math.min(1, value || 0)); +} +function hsl2rgb(h2, m1, m2) { + return (h2 < 60 ? m1 + (m2 - m1) * h2 / 60 : h2 < 180 ? m2 : h2 < 240 ? m1 + (m2 - m1) * (240 - h2) / 60 : m1) * 255; +} +var constant$1 = (x) => () => x; +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant$1(isNaN(a) ? b : a); + }; +} +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant$1(isNaN(a) ? b : a); +} +var interpolateRgb = function rgbGamma(y) { + var color2 = gamma(y); + function rgb$1(start2, end) { + var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity); + return function(t) { + start2.r = r(t); + start2.g = g(t); + start2.b = b(t); + start2.opacity = opacity(t); + return start2 + ""; + }; + } + rgb$1.gamma = rgbGamma; + return rgb$1; +}(1); +function numberArray(a, b) { + if (!b) + b = []; + var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i; + return function(t) { + for (i = 0; i < n; ++i) + c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; +} +function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); +} +function genericArray(a, b) { + var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i; + for (i = 0; i < na; ++i) + x[i] = interpolate$1(a[i], b[i]); + for (; i < nb; ++i) + c[i] = b[i]; + return function(t) { + for (i = 0; i < na; ++i) + c[i] = x[i](t); + return c; + }; +} +function date(a, b) { + var d = /* @__PURE__ */ new Date(); + return a = +a, b = +b, function(t) { + return d.setTime(a * (1 - t) + b * t), d; + }; +} +function interpolateNumber(a, b) { + return a = +a, b = +b, function(t) { + return a * (1 - t) + b * t; + }; +} +function object(a, b) { + var i = {}, c = {}, k; + if (a === null || typeof a !== "object") + a = {}; + if (b === null || typeof b !== "object") + b = {}; + for (k in b) { + if (k in a) { + i[k] = interpolate$1(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + return function(t) { + for (k in i) + c[k] = i[k](t); + return c; + }; +} +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; +var reB = new RegExp(reA.source, "g"); +function zero(b) { + return function() { + return b; + }; +} +function one(b) { + return function(t) { + return b(t) + ""; + }; +} +function interpolateString(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = []; + a = a + "", b = b + ""; + while ((am = reA.exec(a)) && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { + bs = b.slice(bi, bs); + if (s[i]) + s[i] += bs; + else + s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + if (s[i]) + s[i] += bm; + else + s[++i] = bm; + } else { + s[++i] = null; + q.push({ i, x: interpolateNumber(am, bm) }); + } + bi = reB.lastIndex; + } + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) + s[i] += bs; + else + s[++i] = bs; + } + return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) { + for (var i2 = 0, o; i2 < b; ++i2) + s[(o = q[i2]).i] = o.x(t); + return s.join(""); + }); +} +function interpolate$1(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant$1(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color(b)) ? (b = c, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b); +} +var degrees = 180 / Math.PI; +var identity$1 = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; +function decompose(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) + a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) + c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) + c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) + a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX, + scaleY + }; +} +var svgNode; +function parseCss(value) { + const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); + return m.isIdentity ? identity$1 : decompose(m.a, m.b, m.c, m.d, m.e, m.f); +} +function parseSvg(value) { + if (value == null) + return identity$1; + if (!svgNode) + svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) + return identity$1; + value = value.matrix; + return decompose(value.a, value.b, value.c, value.d, value.e, value.f); +} +function interpolateTransform(parse, pxComma, pxParen, degParen) { + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) }); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) + b += 360; + else if (b - a > 180) + a += 360; + q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + function skewX(a, b, s, q) { + if (a !== b) { + q.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) }); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + return function(a, b) { + var s = [], q = []; + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) + s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} +var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); +var epsilon2 = 1e-12; +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} +var interpolateZoom = function zoomRho(rho, rho2, rho4) { + function zoom2(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S; + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + }; + } else { + var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + }; + } + i.duration = S * 1e3 * rho / Math.SQRT2; + return i; + } + zoom2.rho = function(_) { + var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; + return zoomRho(_1, _2, _4); + }; + return zoom2; +}(Math.SQRT2, 2, 4); +var frame = 0; +var timeout$1 = 0; +var interval = 0; +var pokeDelay = 1e3; +var taskHead; +var taskTail; +var clockLast = 0; +var clockNow = 0; +var clockSkew = 0; +var clock = typeof performance === "object" && performance.now ? performance : Date; +var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { + setTimeout(f, 17); +}; +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} +function clearNow() { + clockNow = 0; +} +function Timer() { + this._call = this._time = this._next = null; +} +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") + throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) + taskTail._next = this; + else + taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; +function timer(callback, delay, time) { + var t = new Timer(); + t.restart(callback, delay, time); + return t; +} +function timerFlush() { + now(); + ++frame; + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) + t._call.call(void 0, e); + t = t._next; + } + --frame; +} +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout$1 = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} +function poke() { + var now2 = clock.now(), delay = now2 - clockLast; + if (delay > pokeDelay) + clockSkew -= delay, clockLast = now2; +} +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) + time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} +function sleep(time) { + if (frame) + return; + if (timeout$1) + timeout$1 = clearTimeout(timeout$1); + var delay = time - clockNow; + if (delay > 24) { + if (time < Infinity) + timeout$1 = setTimeout(wake, time - clock.now() - clockSkew); + if (interval) + interval = clearInterval(interval); + } else { + if (!interval) + clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} +function timeout(callback, delay, time) { + var t = new Timer(); + delay = delay == null ? 0 : +delay; + t.restart((elapsed) => { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +} +var emptyOn = dispatch("start", "end", "cancel", "interrupt"); +var emptyTween = []; +var CREATED = 0; +var SCHEDULED = 1; +var STARTING = 2; +var STARTED = 3; +var RUNNING = 4; +var ENDING = 5; +var ENDED = 6; +function schedule(node, name, id2, index, group, timing) { + var schedules = node.__transition; + if (!schedules) + node.__transition = {}; + else if (id2 in schedules) + return; + create(node, id2, { + name, + index, + // For context during callback. + group, + // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); +} +function init(node, id2) { + var schedule2 = get(node, id2); + if (schedule2.state > CREATED) + throw new Error("too late; already scheduled"); + return schedule2; +} +function set(node, id2) { + var schedule2 = get(node, id2); + if (schedule2.state > STARTED) + throw new Error("too late; already running"); + return schedule2; +} +function get(node, id2) { + var schedule2 = node.__transition; + if (!schedule2 || !(schedule2 = schedule2[id2])) + throw new Error("transition not found"); + return schedule2; +} +function create(node, id2, self) { + var schedules = node.__transition, tween; + schedules[id2] = self; + self.timer = timer(schedule2, 0, self.time); + function schedule2(elapsed) { + self.state = SCHEDULED; + self.timer.restart(start2, self.delay, self.time); + if (self.delay <= elapsed) + start2(elapsed - self.delay); + } + function start2(elapsed) { + var i, j, n, o; + if (self.state !== SCHEDULED) + return stop(); + for (i in schedules) { + o = schedules[i]; + if (o.name !== self.name) + continue; + if (o.state === STARTED) + return timeout(start2); + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node, node.__data__, o.index, o.group); + delete schedules[i]; + } else if (+i < id2) { + o.state = ENDED; + o.timer.stop(); + o.on.call("cancel", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + } + timeout(function() { + if (self.state === STARTED) { + self.state = RUNNING; + self.timer.restart(tick, self.delay, self.time); + tick(elapsed); + } + }); + self.state = STARTING; + self.on.call("start", node, node.__data__, self.index, self.group); + if (self.state !== STARTING) + return; + self.state = STARTED; + tween = new Array(n = self.tween.length); + for (i = 0, j = -1; i < n; ++i) { + if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + function tick(elapsed) { + var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length; + while (++i < n) { + tween[i].call(node, t); + } + if (self.state === ENDING) { + self.on.call("end", node, node.__data__, self.index, self.group); + stop(); + } + } + function stop() { + self.state = ENDED; + self.timer.stop(); + delete schedules[id2]; + for (var i in schedules) + return; + delete node.__transition; + } +} +function interrupt(node, name) { + var schedules = node.__transition, schedule2, active, empty2 = true, i; + if (!schedules) + return; + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule2 = schedules[i]).name !== name) { + empty2 = false; + continue; + } + active = schedule2.state > STARTING && schedule2.state < ENDING; + schedule2.state = ENDED; + schedule2.timer.stop(); + schedule2.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule2.index, schedule2.group); + delete schedules[i]; + } + if (empty2) + delete node.__transition; +} +function selection_interrupt(name) { + return this.each(function() { + interrupt(this, name); + }); +} +function tweenRemove(id2, name) { + var tween0, tween1; + return function() { + var schedule2 = set(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1 = tween1.slice(); + tween1.splice(i, 1); + break; + } + } + } + schedule2.tween = tween1; + }; +} +function tweenFunction(id2, name, value) { + var tween0, tween1; + if (typeof value !== "function") + throw new Error(); + return function() { + var schedule2 = set(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1[i] = t; + break; + } + } + if (i === n) + tween1.push(t); + } + schedule2.tween = tween1; + }; +} +function transition_tween(name, value) { + var id2 = this._id; + name += ""; + if (arguments.length < 2) { + var tween = get(this.node(), id2).tween; + for (var i = 0, n = tween.length, t; i < n; ++i) { + if ((t = tween[i]).name === name) { + return t.value; + } + } + return null; + } + return this.each((value == null ? tweenRemove : tweenFunction)(id2, name, value)); +} +function tweenValue(transition, name, value) { + var id2 = transition._id; + transition.each(function() { + var schedule2 = set(this, id2); + (schedule2.value || (schedule2.value = {}))[name] = value.apply(this, arguments); + }); + return function(node) { + return get(node, id2).value[name]; + }; +} +function interpolate(a, b) { + var c; + return (typeof b === "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b); +} +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} +function attrConstant(name, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttribute(name); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function attrConstantNS(fullname, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttributeNS(fullname.space, fullname.local); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function attrFunction(name, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) + return void this.removeAttribute(name); + string0 = this.getAttribute(name); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function attrFunctionNS(fullname, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) + return void this.removeAttributeNS(fullname.space, fullname.local); + string0 = this.getAttributeNS(fullname.space, fullname.local); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function transition_attr(name, value) { + var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate; + return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); +} +function attrInterpolate(name, i) { + return function(t) { + this.setAttribute(name, i.call(this, t)); + }; +} +function attrInterpolateNS(fullname, i) { + return function(t) { + this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); + }; +} +function attrTweenNS(fullname, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && attrInterpolateNS(fullname, i); + return t0; + } + tween._value = value; + return tween; +} +function attrTween(name, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && attrInterpolate(name, i); + return t0; + } + tween._value = value; + return tween; +} +function transition_attrTween(name, value) { + var key = "attr." + name; + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + var fullname = namespace(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); +} +function delayFunction(id2, value) { + return function() { + init(this, id2).delay = +value.apply(this, arguments); + }; +} +function delayConstant(id2, value) { + return value = +value, function() { + init(this, id2).delay = value; + }; +} +function transition_delay(value) { + var id2 = this._id; + return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id2, value)) : get(this.node(), id2).delay; +} +function durationFunction(id2, value) { + return function() { + set(this, id2).duration = +value.apply(this, arguments); + }; +} +function durationConstant(id2, value) { + return value = +value, function() { + set(this, id2).duration = value; + }; +} +function transition_duration(value) { + var id2 = this._id; + return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get(this.node(), id2).duration; +} +function easeConstant(id2, value) { + if (typeof value !== "function") + throw new Error(); + return function() { + set(this, id2).ease = value; + }; +} +function transition_ease(value) { + var id2 = this._id; + return arguments.length ? this.each(easeConstant(id2, value)) : get(this.node(), id2).ease; +} +function easeVarying(id2, value) { + return function() { + var v = value.apply(this, arguments); + if (typeof v !== "function") + throw new Error(); + set(this, id2).ease = v; + }; +} +function transition_easeVarying(value) { + if (typeof value !== "function") + throw new Error(); + return this.each(easeVarying(this._id, value)); +} +function transition_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + return new Transition(subgroups, this._parents, this._name, this._id); +} +function transition_merge(transition) { + if (transition._id !== this._id) + throw new Error(); + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Transition(merges, this._parents, this._name, this._id); +} +function start(name) { + return (name + "").trim().split(/^|\s+/).every(function(t) { + var i = t.indexOf("."); + if (i >= 0) + t = t.slice(0, i); + return !t || t === "start"; + }); +} +function onFunction(id2, name, listener) { + var on0, on1, sit = start(name) ? init : set; + return function() { + var schedule2 = sit(this, id2), on = schedule2.on; + if (on !== on0) + (on1 = (on0 = on).copy()).on(name, listener); + schedule2.on = on1; + }; +} +function transition_on(name, listener) { + var id2 = this._id; + return arguments.length < 2 ? get(this.node(), id2).on.on(name) : this.each(onFunction(id2, name, listener)); +} +function removeFunction(id2) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) + if (+i !== id2) + return; + if (parent) + parent.removeChild(this); + }; +} +function transition_remove() { + return this.on("end.remove", removeFunction(this._id)); +} +function transition_select(select2) { + var name = this._name, id2 = this._id; + if (typeof select2 !== "function") + select2 = selector(select2); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) { + if ("__data__" in node) + subnode.__data__ = node.__data__; + subgroup[i] = subnode; + schedule(subgroup[i], name, id2, i, subgroup, get(node, id2)); + } + } + } + return new Transition(subgroups, this._parents, name, id2); +} +function transition_selectAll(select2) { + var name = this._name, id2 = this._id; + if (typeof select2 !== "function") + select2 = selectorAll(select2); + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + for (var children2 = select2.call(node, node.__data__, i, group), child, inherit2 = get(node, id2), k = 0, l = children2.length; k < l; ++k) { + if (child = children2[k]) { + schedule(child, name, id2, k, children2, inherit2); + } + } + subgroups.push(children2); + parents.push(node); + } + } + } + return new Transition(subgroups, parents, name, id2); +} +var Selection = selection.prototype.constructor; +function transition_selection() { + return new Selection(this._groups, this._parents); +} +function styleNull(name, interpolate2) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1); + }; +} +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} +function styleConstant(name, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = styleValue(this, name); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function styleFunction(name, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + ""; + if (value1 == null) + string1 = value1 = (this.style.removeProperty(name), styleValue(this, name)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function styleMaybeRemove(id2, name) { + var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2; + return function() { + var schedule2 = set(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove(name)) : void 0; + if (on !== on0 || listener0 !== listener) + (on1 = (on0 = on).copy()).on(event, listener0 = listener); + schedule2.on = on1; + }; +} +function transition_style(name, value, priority) { + var i = (name += "") === "transform" ? interpolateTransformCss : interpolate; + return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null); +} +function styleInterpolate(name, i, priority) { + return function(t) { + this.style.setProperty(name, i.call(this, t), priority); + }; +} +function styleTween(name, value, priority) { + var t, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t = (i0 = i) && styleInterpolate(name, i, priority); + return t; + } + tween._value = value; + return tween; +} +function transition_styleTween(name, value, priority) { + var key = "style." + (name += ""); + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); +} +function textConstant(value) { + return function() { + this.textContent = value; + }; +} +function textFunction(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; +} +function transition_text(value) { + return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + "")); +} +function textInterpolate(i) { + return function(t) { + this.textContent = i.call(this, t); + }; +} +function textTween(value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && textInterpolate(i); + return t0; + } + tween._value = value; + return tween; +} +function transition_textTween(value) { + var key = "text"; + if (arguments.length < 1) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + return this.tween(key, textTween(value)); +} +function transition_transition() { + var name = this._name, id0 = this._id, id1 = newId(); + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + var inherit2 = get(node, id0); + schedule(node, name, id1, i, group, { + time: inherit2.time + inherit2.delay + inherit2.duration, + delay: 0, + duration: inherit2.duration, + ease: inherit2.ease + }); + } + } + } + return new Transition(groups, this._parents, name, id1); +} +function transition_end() { + var on0, on1, that = this, id2 = that._id, size = that.size(); + return new Promise(function(resolve, reject) { + var cancel = { value: reject }, end = { value: function() { + if (--size === 0) + resolve(); + } }; + that.each(function() { + var schedule2 = set(this, id2), on = schedule2.on; + if (on !== on0) { + on1 = (on0 = on).copy(); + on1._.cancel.push(cancel); + on1._.interrupt.push(cancel); + on1._.end.push(end); + } + schedule2.on = on1; + }); + if (size === 0) + resolve(); + }); +} +var id = 0; +function Transition(groups, parents, name, id2) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id2; +} +function newId() { + return ++id; +} +var selection_prototype = selection.prototype; +Transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: transition_selectAll, + selectChild: selection_prototype.selectChild, + selectChildren: selection_prototype.selectChildren, + filter: transition_filter, + merge: transition_merge, + selection: transition_selection, + transition: transition_transition, + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: transition_on, + attr: transition_attr, + attrTween: transition_attrTween, + style: transition_style, + styleTween: transition_styleTween, + text: transition_text, + textTween: transition_textTween, + remove: transition_remove, + tween: transition_tween, + delay: transition_delay, + duration: transition_duration, + ease: transition_ease, + easeVarying: transition_easeVarying, + end: transition_end, + [Symbol.iterator]: selection_prototype[Symbol.iterator] +}; +function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} +var defaultTiming = { + time: null, + // Set on use. + delay: 0, + duration: 250, + ease: cubicInOut +}; +function inherit(node, id2) { + var timing; + while (!(timing = node.__transition) || !(timing = timing[id2])) { + if (!(node = node.parentNode)) { + throw new Error(`transition ${id2} not found`); + } + } + return timing; +} +function selection_transition(name) { + var id2, timing; + if (name instanceof Transition) { + id2 = name._id, name = name._name; + } else { + id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; + } + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + schedule(node, name, id2, i, group, timing || inherit(node, id2)); + } + } + } + return new Transition(groups, this._parents, name, id2); +} +selection.prototype.interrupt = selection_interrupt; +selection.prototype.transition = selection_transition; +var constant = (x) => () => x; +function ZoomEvent(type, { + sourceEvent: sourceEvent2, + target, + transform, + dispatch: dispatch2 +}) { + Object.defineProperties(this, { + type: { value: type, enumerable: true, configurable: true }, + sourceEvent: { value: sourceEvent2, enumerable: true, configurable: true }, + target: { value: target, enumerable: true, configurable: true }, + transform: { value: transform, enumerable: true, configurable: true }, + _: { value: dispatch2 } + }); +} +function Transform(k, x, y) { + this.k = k; + this.x = x; + this.y = y; +} +Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x, y) { + return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); + }, + apply: function(point) { + return [point[0] * this.k + this.x, point[1] * this.k + this.y]; + }, + applyX: function(x) { + return x * this.k + this.x; + }, + applyY: function(y) { + return y * this.k + this.y; + }, + invert: function(location) { + return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; + }, + invertX: function(x) { + return (x - this.x) / this.k; + }, + invertY: function(y) { + return (y - this.y) / this.k; + }, + rescaleX: function(x) { + return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); + }, + rescaleY: function(y) { + return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } +}; +var identity = new Transform(1, 0, 0); +Transform.prototype; +function nopropagation(event) { + event.stopImmediatePropagation(); +} +function noevent(event) { + event.preventDefault(); + event.stopImmediatePropagation(); +} +function defaultFilter(event) { + return (!event.ctrlKey || event.type === "wheel") && !event.button; +} +function defaultExtent() { + var e = this; + if (e instanceof SVGElement) { + e = e.ownerSVGElement || e; + if (e.hasAttribute("viewBox")) { + e = e.viewBox.baseVal; + return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; + } + return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; + } + return [[0, 0], [e.clientWidth, e.clientHeight]]; +} +function defaultTransform() { + return this.__zoom || identity; +} +function defaultWheelDelta(event) { + return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * (event.ctrlKey ? 10 : 1); +} +function defaultTouchable() { + return navigator.maxTouchPoints || "ontouchstart" in this; +} +function defaultConstrain(transform, extent, translateExtent) { + var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; + return transform.translate( + dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), + dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) + ); +} +function zoom() { + var filter2 = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate2 = interpolateZoom, listeners = dispatch("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10; + function zoom2(selection2) { + selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + zoom2.transform = function(collection, transform, point, event) { + var selection2 = collection.selection ? collection.selection() : collection; + selection2.property("__zoom", defaultTransform); + if (collection !== selection2) { + schedule2(collection, transform, point, event); + } else { + selection2.interrupt().each(function() { + gesture(this, arguments).event(event).start().zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform).end(); + }); + } + }; + zoom2.scaleBy = function(selection2, k, p, event) { + zoom2.scaleTo(selection2, function() { + var k0 = this.__zoom.k, k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return k0 * k1; + }, p, event); + }; + zoom2.scaleTo = function(selection2, k, p, event) { + zoom2.transform(selection2, function() { + var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); + }, p, event); + }; + zoom2.translateBy = function(selection2, x, y, event) { + zoom2.transform(selection2, function() { + return constrain(this.__zoom.translate( + typeof x === "function" ? x.apply(this, arguments) : x, + typeof y === "function" ? y.apply(this, arguments) : y + ), extent.apply(this, arguments), translateExtent); + }, null, event); + }; + zoom2.translateTo = function(selection2, x, y, p, event) { + zoom2.transform(selection2, function() { + var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; + return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate( + typeof x === "function" ? -x.apply(this, arguments) : -x, + typeof y === "function" ? -y.apply(this, arguments) : -y + ), e, translateExtent); + }, p, event); + }; + function scale(transform, k) { + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); + return k === transform.k ? transform : new Transform(k, transform.x, transform.y); + } + function translate(transform, p0, p1) { + var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; + return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); + } + function centroid(extent2) { + return [(+extent2[0][0] + +extent2[1][0]) / 2, (+extent2[0][1] + +extent2[1][1]) / 2]; + } + function schedule2(transition, transform, point, event) { + transition.on("start.zoom", function() { + gesture(this, arguments).event(event).start(); + }).on("interrupt.zoom end.zoom", function() { + gesture(this, arguments).event(event).end(); + }).tween("zoom", function() { + var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate2(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); + return function(t) { + if (t === 1) + t = b; + else { + var l = i(t), k = w / l[2]; + t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); + } + g.zoom(null, t); + }; + }); + } + function gesture(that, args, clean) { + return !clean && that.__zooming || new Gesture(that, args); + } + function Gesture(that, args) { + this.that = that; + this.args = args; + this.active = 0; + this.sourceEvent = null; + this.extent = extent.apply(that, args); + this.taps = 0; + } + Gesture.prototype = { + event: function(event) { + if (event) + this.sourceEvent = event; + return this; + }, + start: function() { + if (++this.active === 1) { + this.that.__zooming = this; + this.emit("start"); + } + return this; + }, + zoom: function(key, transform) { + if (this.mouse && key !== "mouse") + this.mouse[1] = transform.invert(this.mouse[0]); + if (this.touch0 && key !== "touch") + this.touch0[1] = transform.invert(this.touch0[0]); + if (this.touch1 && key !== "touch") + this.touch1[1] = transform.invert(this.touch1[0]); + this.that.__zoom = transform; + this.emit("zoom"); + return this; + }, + end: function() { + if (--this.active === 0) { + delete this.that.__zooming; + this.emit("end"); + } + return this; + }, + emit: function(type) { + var d = select(this.that).datum(); + listeners.call( + type, + this.that, + new ZoomEvent(type, { + sourceEvent: this.sourceEvent, + target: zoom2, + type, + transform: this.that.__zoom, + dispatch: listeners + }), + d + ); + } + }; + function wheeled(event, ...args) { + if (!filter2.apply(this, arguments)) + return; + var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta2.apply(this, arguments)))), p = pointer(event); + if (g.wheel) { + if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { + g.mouse[1] = t.invert(g.mouse[0] = p); + } + clearTimeout(g.wheel); + } else if (t.k === k) + return; + else { + g.mouse = [p, t.invert(p)]; + interrupt(this); + g.start(); + } + noevent(event); + g.wheel = setTimeout(wheelidled, wheelDelay); + g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); + function wheelidled() { + g.wheel = null; + g.end(); + } + } + function mousedowned(event, ...args) { + if (touchending || !filter2.apply(this, arguments)) + return; + var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = pointer(event, currentTarget), x0 = event.clientX, y0 = event.clientY; + dragDisable(event.view); + nopropagation(event); + g.mouse = [p, this.__zoom.invert(p)]; + interrupt(this); + g.start(); + function mousemoved(event2) { + noevent(event2); + if (!g.moved) { + var dx = event2.clientX - x0, dy = event2.clientY - y0; + g.moved = dx * dx + dy * dy > clickDistance2; + } + g.event(event2).zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event2, currentTarget), g.mouse[1]), g.extent, translateExtent)); + } + function mouseupped(event2) { + v.on("mousemove.zoom mouseup.zoom", null); + yesdrag(event2.view, g.moved); + noevent(event2); + g.event(event2).end(); + } + } + function dblclicked(event, ...args) { + if (!filter2.apply(this, arguments)) + return; + var t0 = this.__zoom, p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); + noevent(event); + if (duration > 0) + select(this).transition().duration(duration).call(schedule2, t1, p0, event); + else + select(this).call(zoom2.transform, t1, p0, event); + } + function touchstarted(event, ...args) { + if (!filter2.apply(this, arguments)) + return; + var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p; + nopropagation(event); + for (i = 0; i < n; ++i) { + t = touches[i], p = pointer(t, this); + p = [p, this.__zoom.invert(p), t.identifier]; + if (!g.touch0) + g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; + else if (!g.touch1 && g.touch0[2] !== p[2]) + g.touch1 = p, g.taps = 0; + } + if (touchstarting) + touchstarting = clearTimeout(touchstarting); + if (started) { + if (g.taps < 2) + touchfirst = p[0], touchstarting = setTimeout(function() { + touchstarting = null; + }, touchDelay); + interrupt(this); + g.start(); + } + } + function touchmoved(event, ...args) { + if (!this.__zooming) + return; + var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l; + noevent(event); + for (i = 0; i < n; ++i) { + t = touches[i], p = pointer(t, this); + if (g.touch0 && g.touch0[2] === t.identifier) + g.touch0[0] = p; + else if (g.touch1 && g.touch1[2] === t.identifier) + g.touch1[0] = p; + } + t = g.that.__zoom; + if (g.touch1) { + var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; + t = scale(t, Math.sqrt(dp / dl)); + p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; + l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; + } else if (g.touch0) + p = g.touch0[0], l = g.touch0[1]; + else + return; + g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); + } + function touchended(event, ...args) { + if (!this.__zooming) + return; + var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t; + nopropagation(event); + if (touchending) + clearTimeout(touchending); + touchending = setTimeout(function() { + touchending = null; + }, touchDelay); + for (i = 0; i < n; ++i) { + t = touches[i]; + if (g.touch0 && g.touch0[2] === t.identifier) + delete g.touch0; + else if (g.touch1 && g.touch1[2] === t.identifier) + delete g.touch1; + } + if (g.touch1 && !g.touch0) + g.touch0 = g.touch1, delete g.touch1; + if (g.touch0) + g.touch0[1] = this.__zoom.invert(g.touch0[0]); + else { + g.end(); + if (g.taps === 2) { + t = pointer(t, this); + if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { + var p = select(this).on("dblclick.zoom"); + if (p) + p.apply(this, arguments); + } + } + } + } + zoom2.wheelDelta = function(_) { + return arguments.length ? (wheelDelta2 = typeof _ === "function" ? _ : constant(+_), zoom2) : wheelDelta2; + }; + zoom2.filter = function(_) { + return arguments.length ? (filter2 = typeof _ === "function" ? _ : constant(!!_), zoom2) : filter2; + }; + zoom2.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom2) : touchable; + }; + zoom2.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom2) : extent; + }; + zoom2.scaleExtent = function(_) { + return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom2) : [scaleExtent[0], scaleExtent[1]]; + }; + zoom2.translateExtent = function(_) { + return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom2) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; + }; + zoom2.constrain = function(_) { + return arguments.length ? (constrain = _, zoom2) : constrain; + }; + zoom2.duration = function(_) { + return arguments.length ? (duration = +_, zoom2) : duration; + }; + zoom2.interpolate = function(_) { + return arguments.length ? (interpolate2 = _, zoom2) : interpolate2; + }; + zoom2.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? zoom2 : value; + }; + zoom2.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom2) : Math.sqrt(clickDistance2); + }; + zoom2.tapDistance = function(_) { + return arguments.length ? (tapDistance = +_, zoom2) : tapDistance; + }; + return zoom2; +} +var Position = ((Position2) => { + Position2["Left"] = "left"; + Position2["Top"] = "top"; + Position2["Right"] = "right"; + Position2["Bottom"] = "bottom"; + return Position2; +})(Position || {}); +var SelectionMode = ((SelectionMode2) => { + SelectionMode2["Partial"] = "partial"; + SelectionMode2["Full"] = "full"; + return SelectionMode2; +})(SelectionMode || {}); +var ConnectionLineType = ((ConnectionLineType2) => { + ConnectionLineType2["Bezier"] = "default"; + ConnectionLineType2["SimpleBezier"] = "simple-bezier"; + ConnectionLineType2["Straight"] = "straight"; + ConnectionLineType2["Step"] = "step"; + ConnectionLineType2["SmoothStep"] = "smoothstep"; + return ConnectionLineType2; +})(ConnectionLineType || {}); +var ConnectionMode = ((ConnectionMode2) => { + ConnectionMode2["Strict"] = "strict"; + ConnectionMode2["Loose"] = "loose"; + return ConnectionMode2; +})(ConnectionMode || {}); +var MarkerType = ((MarkerType2) => { + MarkerType2["Arrow"] = "arrow"; + MarkerType2["ArrowClosed"] = "arrowclosed"; + return MarkerType2; +})(MarkerType || {}); +var PanOnScrollMode = ((PanOnScrollMode2) => { + PanOnScrollMode2["Free"] = "free"; + PanOnScrollMode2["Vertical"] = "vertical"; + PanOnScrollMode2["Horizontal"] = "horizontal"; + return PanOnScrollMode2; +})(PanOnScrollMode || {}); +var PanelPosition = ((PanelPosition2) => { + PanelPosition2["TopLeft"] = "top-left"; + PanelPosition2["TopCenter"] = "top-center"; + PanelPosition2["TopRight"] = "top-right"; + PanelPosition2["BottomLeft"] = "bottom-left"; + PanelPosition2["BottomCenter"] = "bottom-center"; + PanelPosition2["BottomRight"] = "bottom-right"; + return PanelPosition2; +})(PanelPosition || {}); +var inputTags = ["INPUT", "SELECT", "TEXTAREA"]; +var defaultDoc = typeof document !== "undefined" ? document : null; +function isInputDOMNode(event) { + var _a, _b; + const target = ((_b = (_a = event.composedPath) == null ? void 0 : _a.call(event)) == null ? void 0 : _b[0]) || event.target; + const hasAttribute = typeof (target == null ? void 0 : target.hasAttribute) === "function" ? target.hasAttribute("contenteditable") : false; + const closest = typeof (target == null ? void 0 : target.closest) === "function" ? target.closest(".nokey") : null; + return inputTags.includes(target == null ? void 0 : target.nodeName) || hasAttribute || !!closest; +} +function wasModifierPressed(event) { + return event.ctrlKey || event.metaKey || event.shiftKey || event.altKey; +} +function isKeyMatch(pressedKey, keyToMatch, pressedKeys, isKeyUp) { + const keyCombination = keyToMatch.replace("+", "\n").replace("\n\n", "\n+").split("\n").map((k) => k.trim().toLowerCase()); + if (keyCombination.length === 1) { + return pressedKey.toLowerCase() === keyToMatch.toLowerCase(); + } + if (!isKeyUp) { + pressedKeys.add(pressedKey.toLowerCase()); + } + const isMatch = keyCombination.every( + (key, index) => pressedKeys.has(key) && Array.from(pressedKeys.values())[index] === keyCombination[index] + ); + if (isKeyUp) { + pressedKeys.delete(pressedKey.toLowerCase()); + } + return isMatch; +} +function createKeyPredicate(keyFilter, pressedKeys) { + return (event) => { + if (!event.code && !event.key) { + return false; + } + const keyOrCode = useKeyOrCode(event.code, keyFilter); + if (Array.isArray(keyFilter)) { + return keyFilter.some((key) => isKeyMatch(event[keyOrCode], key, pressedKeys, event.type === "keyup")); + } + return isKeyMatch(event[keyOrCode], keyFilter, pressedKeys, event.type === "keyup"); + }; +} +function useKeyOrCode(code, keysToWatch) { + return keysToWatch.includes(code) ? "code" : "key"; +} +function useKeyPress(keyFilter, options) { + const target = computed(() => toValue(options == null ? void 0 : options.target) ?? defaultDoc); + const isPressed = shallowRef(toValue(keyFilter) === true); + let modifierPressed = false; + const pressedKeys = /* @__PURE__ */ new Set(); + let currentFilter = createKeyFilterFn(toValue(keyFilter)); + watch( + () => toValue(keyFilter), + (nextKeyFilter, previousKeyFilter) => { + if (typeof previousKeyFilter === "boolean" && typeof nextKeyFilter !== "boolean") { + reset(); + } + currentFilter = createKeyFilterFn(nextKeyFilter); + }, + { + immediate: true + } + ); + useEventListener(["blur", "contextmenu"], reset); + onKeyStroke( + (...args) => currentFilter(...args), + (e) => { + var _a, _b; + const actInsideInputWithModifier = toValue(options == null ? void 0 : options.actInsideInputWithModifier) ?? true; + const preventDefault = toValue(options == null ? void 0 : options.preventDefault) ?? false; + modifierPressed = wasModifierPressed(e); + const preventAction = (!modifierPressed || modifierPressed && !actInsideInputWithModifier) && isInputDOMNode(e); + if (preventAction) { + return; + } + const target2 = ((_b = (_a = e.composedPath) == null ? void 0 : _a.call(e)) == null ? void 0 : _b[0]) || e.target; + const isInteractiveElement = (target2 == null ? void 0 : target2.nodeName) === "BUTTON" || (target2 == null ? void 0 : target2.nodeName) === "A"; + if (!preventDefault && (modifierPressed || !isInteractiveElement)) { + e.preventDefault(); + } + isPressed.value = true; + }, + { eventName: "keydown", target } + ); + onKeyStroke( + (...args) => currentFilter(...args), + (e) => { + const actInsideInputWithModifier = toValue(options == null ? void 0 : options.actInsideInputWithModifier) ?? true; + if (isPressed.value) { + const preventAction = (!modifierPressed || modifierPressed && !actInsideInputWithModifier) && isInputDOMNode(e); + if (preventAction) { + return; + } + modifierPressed = false; + isPressed.value = false; + } + }, + { eventName: "keyup", target } + ); + function reset() { + modifierPressed = false; + pressedKeys.clear(); + isPressed.value = toValue(keyFilter) === true; + } + function createKeyFilterFn(keyFilter2) { + if (keyFilter2 === null) { + reset(); + return () => false; + } + if (typeof keyFilter2 === "boolean") { + reset(); + isPressed.value = keyFilter2; + return () => false; + } + if (Array.isArray(keyFilter2) || typeof keyFilter2 === "string") { + return createKeyPredicate(keyFilter2, pressedKeys); + } + return keyFilter2; + } + return isPressed; +} +var ARIA_NODE_DESC_KEY = "vue-flow__node-desc"; +var ARIA_EDGE_DESC_KEY = "vue-flow__edge-desc"; +var ARIA_LIVE_MESSAGE = "vue-flow__aria-live"; +var elementSelectionKeys = ["Enter", " ", "Escape"]; +var arrowKeyDiffs = { + ArrowUp: { x: 0, y: -1 }, + ArrowDown: { x: 0, y: 1 }, + ArrowLeft: { x: -1, y: 0 }, + ArrowRight: { x: 1, y: 0 } +}; +function nodeToRect(node) { + return { + ...node.computedPosition || { x: 0, y: 0 }, + width: node.dimensions.width || 0, + height: node.dimensions.height || 0 + }; +} +function getOverlappingArea(rectA, rectB) { + const xOverlap = Math.max(0, Math.min(rectA.x + rectA.width, rectB.x + rectB.width) - Math.max(rectA.x, rectB.x)); + const yOverlap = Math.max(0, Math.min(rectA.y + rectA.height, rectB.y + rectB.height) - Math.max(rectA.y, rectB.y)); + return Math.ceil(xOverlap * yOverlap); +} +function getDimensions(node) { + return { + width: node.offsetWidth, + height: node.offsetHeight + }; +} +function clamp(val, min = 0, max = 1) { + return Math.min(Math.max(val, min), max); +} +function clampPosition(position, extent) { + return { + x: clamp(position.x, extent[0][0], extent[1][0]), + y: clamp(position.y, extent[0][1], extent[1][1]) + }; +} +function getHostForElement(element) { + const doc = element.getRootNode(); + if ("elementFromPoint" in doc) { + return doc; + } + return window.document; +} +function isEdge(element) { + return element && typeof element === "object" && "id" in element && "source" in element && "target" in element; +} +function isGraphEdge(element) { + return isEdge(element) && "sourceNode" in element && "targetNode" in element; +} +function isNode(element) { + return element && typeof element === "object" && "id" in element && "position" in element && !isEdge(element); +} +function isGraphNode(element) { + return isNode(element) && "computedPosition" in element; +} +function isNumeric(n) { + return !Number.isNaN(n) && Number.isFinite(n); +} +function isRect(obj) { + return isNumeric(obj.width) && isNumeric(obj.height) && isNumeric(obj.x) && isNumeric(obj.y); +} +function parseNode(node, existingNode, parentNode) { + const initialState = { + id: node.id.toString(), + type: node.type ?? "default", + dimensions: markRaw({ + width: 0, + height: 0 + }), + computedPosition: markRaw({ + z: 0, + ...node.position + }), + // todo: shouldn't be defined initially, as we want to use handleBounds to check if a node was actually initialized or not + handleBounds: { + source: [], + target: [] + }, + draggable: void 0, + selectable: void 0, + connectable: void 0, + focusable: void 0, + selected: false, + dragging: false, + resizing: false, + initialized: false, + isParent: false, + position: { + x: 0, + y: 0 + }, + data: isDef(node.data) ? node.data : {}, + events: markRaw(isDef(node.events) ? node.events : {}) + }; + return Object.assign(existingNode ?? initialState, node, { id: node.id.toString(), parentNode }); +} +function parseEdge(edge, existingEdge, defaultEdgeOptions) { + var _a, _b; + const initialState = { + id: edge.id.toString(), + type: edge.type ?? (existingEdge == null ? void 0 : existingEdge.type) ?? "default", + source: edge.source.toString(), + target: edge.target.toString(), + sourceHandle: (_a = edge.sourceHandle) == null ? void 0 : _a.toString(), + targetHandle: (_b = edge.targetHandle) == null ? void 0 : _b.toString(), + updatable: edge.updatable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.updatable), + selectable: edge.selectable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.selectable), + focusable: edge.focusable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.focusable), + data: isDef(edge.data) ? edge.data : {}, + events: markRaw(isDef(edge.events) ? edge.events : {}), + label: edge.label ?? "", + interactionWidth: edge.interactionWidth ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.interactionWidth), + ...defaultEdgeOptions ?? {} + }; + return Object.assign(existingEdge ?? initialState, edge, { id: edge.id.toString() }); +} +function getConnectedElements(nodeOrId, nodes, edges, dir) { + const id2 = typeof nodeOrId === "string" ? nodeOrId : nodeOrId.id; + const connectedIds = /* @__PURE__ */ new Set(); + const origin = dir === "source" ? "target" : "source"; + for (const edge of edges) { + if (edge[origin] === id2) { + connectedIds.add(edge[dir]); + } + } + return nodes.filter((n) => connectedIds.has(n.id)); +} +function getOutgoers(...args) { + if (args.length === 3) { + const [nodeOrId2, nodes, edges] = args; + return getConnectedElements(nodeOrId2, nodes, edges, "target"); + } + const [nodeOrId, elements] = args; + const nodeId = typeof nodeOrId === "string" ? nodeOrId : nodeOrId.id; + const outgoers = elements.filter((el) => isEdge(el) && el.source === nodeId); + return outgoers.map((edge) => elements.find((el) => isNode(el) && el.id === edge.target)); +} +function getIncomers(...args) { + if (args.length === 3) { + const [nodeOrId2, nodes, edges] = args; + return getConnectedElements(nodeOrId2, nodes, edges, "source"); + } + const [nodeOrId, elements] = args; + const nodeId = typeof nodeOrId === "string" ? nodeOrId : nodeOrId.id; + const incomers = elements.filter((el) => isEdge(el) && el.target === nodeId); + return incomers.map((edge) => elements.find((el) => isNode(el) && el.id === edge.source)); +} +function getEdgeId({ source, sourceHandle, target, targetHandle }) { + return `vueflow__edge-${source}${sourceHandle ?? ""}-${target}${targetHandle ?? ""}`; +} +function connectionExists(edge, elements) { + return elements.some( + (el) => isEdge(el) && el.source === edge.source && el.target === edge.target && (el.sourceHandle === edge.sourceHandle || !el.sourceHandle && !edge.sourceHandle) && (el.targetHandle === edge.targetHandle || !el.targetHandle && !edge.targetHandle) + ); +} +function addEdge(edgeParams, elements, defaults) { + if (!edgeParams.source || !edgeParams.target) { + warn("Can't create edge. An edge needs a source and a target."); + return elements; + } + let edge; + if (isEdge(edgeParams)) { + edge = { ...edgeParams }; + } else { + edge = { + ...edgeParams, + id: getEdgeId(edgeParams) + }; + } + edge = parseEdge(edge, void 0, defaults); + if (connectionExists(edge, elements)) { + return elements; + } + elements.push(edge); + return elements; +} +function updateEdge(oldEdge, newConnection, elements) { + if (!newConnection.source || !newConnection.target) { + warn("Can't create new edge. An edge needs a source and a target."); + return elements; + } + const foundEdge = elements.find((e) => isEdge(e) && e.id === oldEdge.id); + if (!foundEdge) { + warn(`The old edge with id=${oldEdge.id} does not exist.`); + return elements; + } + const edge = { + ...oldEdge, + id: getEdgeId(newConnection), + source: newConnection.source, + target: newConnection.target, + sourceHandle: newConnection.sourceHandle, + targetHandle: newConnection.targetHandle + }; + elements.splice(elements.indexOf(foundEdge), 1, edge); + return elements.filter((e) => e.id !== oldEdge.id); +} +function rendererPointToPoint({ x, y }, { x: tx, y: ty, zoom: tScale }) { + return { + x: x * tScale + tx, + y: y * tScale + ty + }; +} +function pointToRendererPoint({ x, y }, { x: tx, y: ty, zoom: tScale }, snapToGrid = false, snapGrid = [1, 1]) { + const position = { + x: (x - tx) / tScale, + y: (y - ty) / tScale + }; + return snapToGrid ? snapPosition(position, snapGrid) : position; +} +function getBoundsOfBoxes(box1, box2) { + return { + x: Math.min(box1.x, box2.x), + y: Math.min(box1.y, box2.y), + x2: Math.max(box1.x2, box2.x2), + y2: Math.max(box1.y2, box2.y2) + }; +} +function rectToBox({ x, y, width, height }) { + return { + x, + y, + x2: x + width, + y2: y + height + }; +} +function boxToRect({ x, y, x2, y2 }) { + return { + x, + y, + width: x2 - x, + height: y2 - y + }; +} +function getBoundsofRects(rect1, rect2) { + return boxToRect(getBoundsOfBoxes(rectToBox(rect1), rectToBox(rect2))); +} +function getRectOfNodes(nodes) { + let box = { + x: Number.POSITIVE_INFINITY, + y: Number.POSITIVE_INFINITY, + x2: Number.NEGATIVE_INFINITY, + y2: Number.NEGATIVE_INFINITY + }; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + box = getBoundsOfBoxes( + box, + rectToBox({ + ...node.computedPosition, + ...node.dimensions + }) + ); + } + return boxToRect(box); +} +function getNodesInside(nodes, rect, viewport = { x: 0, y: 0, zoom: 1 }, partially = false, excludeNonSelectableNodes = false) { + const paneRect = { + ...pointToRendererPoint(rect, viewport), + width: rect.width / viewport.zoom, + height: rect.height / viewport.zoom + }; + const visibleNodes = []; + for (const node of nodes) { + const { dimensions, selectable = true, hidden = false } = node; + const width = dimensions.width ?? node.width ?? null; + const height = dimensions.height ?? node.height ?? null; + if (excludeNonSelectableNodes && !selectable || hidden) { + continue; + } + const overlappingArea = getOverlappingArea(paneRect, nodeToRect(node)); + const notInitialized = width === null || height === null; + const partiallyVisible = partially && overlappingArea > 0; + const area = (width ?? 0) * (height ?? 0); + const isVisible = notInitialized || partiallyVisible || overlappingArea >= area; + if (isVisible || node.dragging) { + visibleNodes.push(node); + } + } + return visibleNodes; +} +function getConnectedEdges(nodesOrId, edges) { + const nodeIds = /* @__PURE__ */ new Set(); + if (typeof nodesOrId === "string") { + nodeIds.add(nodesOrId); + } else if (nodesOrId.length >= 1) { + for (const n of nodesOrId) { + nodeIds.add(n.id); + } + } + return edges.filter((edge) => nodeIds.has(edge.source) || nodeIds.has(edge.target)); +} +function getTransformForBounds(bounds, width, height, minZoom, maxZoom, padding = 0.1, offset = { x: 0, y: 0 }) { + const xZoom = width / (bounds.width * (1 + padding)); + const yZoom = height / (bounds.height * (1 + padding)); + const zoom2 = Math.min(xZoom, yZoom); + const clampedZoom = clamp(zoom2, minZoom, maxZoom); + const boundsCenterX = bounds.x + bounds.width / 2; + const boundsCenterY = bounds.y + bounds.height / 2; + const x = width / 2 - boundsCenterX * clampedZoom + (offset.x ?? 0); + const y = height / 2 - boundsCenterY * clampedZoom + (offset.y ?? 0); + return { x, y, zoom: clampedZoom }; +} +function getXYZPos(parentPos, computedPosition) { + return { + x: computedPosition.x + parentPos.x, + y: computedPosition.y + parentPos.y, + z: (parentPos.z > computedPosition.z ? parentPos.z : computedPosition.z) + 1 + }; +} +function isParentSelected(node, findNode) { + if (!node.parentNode) { + return false; + } + const parent = findNode(node.parentNode); + if (!parent) { + return false; + } + if (parent.selected) { + return true; + } + return isParentSelected(parent, findNode); +} +function getMarkerId(marker, vueFlowId) { + if (typeof marker === "undefined") { + return ""; + } + if (typeof marker === "string") { + return marker; + } + const idPrefix = vueFlowId ? `${vueFlowId}__` : ""; + return `${idPrefix}${Object.keys(marker).sort().map((key) => `${key}=${marker[key]}`).join("&")}`; +} +function wheelDelta(event) { + const factor = event.ctrlKey && isMacOs() ? 10 : 1; + return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * factor; +} +function calcAutoPanVelocity(value, min, max) { + if (value < min) { + return clamp(Math.abs(value - min), 1, min) / min; + } + if (value > max) { + return -clamp(Math.abs(value - max), 1, min) / min; + } + return 0; +} +function calcAutoPan(pos, bounds, speed = 15, distance2 = 40) { + const xMovement = calcAutoPanVelocity(pos.x, distance2, bounds.width - distance2) * speed; + const yMovement = calcAutoPanVelocity(pos.y, distance2, bounds.height - distance2) * speed; + return [xMovement, yMovement]; +} +function handleParentExpand(updateItem, parent) { + if (parent) { + const extendWidth = updateItem.position.x + updateItem.dimensions.width - parent.dimensions.width; + const extendHeight = updateItem.position.y + updateItem.dimensions.height - parent.dimensions.height; + if (extendWidth > 0 || extendHeight > 0 || updateItem.position.x < 0 || updateItem.position.y < 0) { + let parentStyles = {}; + if (typeof parent.style === "function") { + parentStyles = { ...parent.style(parent) }; + } else if (parent.style) { + parentStyles = { ...parent.style }; + } + parentStyles.width = parentStyles.width ?? `${parent.dimensions.width}px`; + parentStyles.height = parentStyles.height ?? `${parent.dimensions.height}px`; + if (extendWidth > 0) { + if (typeof parentStyles.width === "string") { + const currWidth = Number(parentStyles.width.replace("px", "")); + parentStyles.width = `${currWidth + extendWidth}px`; + } else { + parentStyles.width += extendWidth; + } + } + if (extendHeight > 0) { + if (typeof parentStyles.height === "string") { + const currWidth = Number(parentStyles.height.replace("px", "")); + parentStyles.height = `${currWidth + extendHeight}px`; + } else { + parentStyles.height += extendHeight; + } + } + if (updateItem.position.x < 0) { + const xDiff = Math.abs(updateItem.position.x); + parent.position.x = parent.position.x - xDiff; + if (typeof parentStyles.width === "string") { + const currWidth = Number(parentStyles.width.replace("px", "")); + parentStyles.width = `${currWidth + xDiff}px`; + } else { + parentStyles.width += xDiff; + } + updateItem.position.x = 0; + } + if (updateItem.position.y < 0) { + const yDiff = Math.abs(updateItem.position.y); + parent.position.y = parent.position.y - yDiff; + if (typeof parentStyles.height === "string") { + const currWidth = Number(parentStyles.height.replace("px", "")); + parentStyles.height = `${currWidth + yDiff}px`; + } else { + parentStyles.height += yDiff; + } + updateItem.position.y = 0; + } + parent.dimensions.width = Number(parentStyles.width.toString().replace("px", "")); + parent.dimensions.height = Number(parentStyles.height.toString().replace("px", "")); + if (typeof parent.style === "function") { + parent.style = (p) => { + const styleFunc = parent.style; + return { + ...styleFunc(p), + ...parentStyles + }; + }; + } else { + parent.style = { + ...parent.style, + ...parentStyles + }; + } + } + } +} +function applyChanges(changes, elements) { + var _a, _b; + const addRemoveChanges = changes.filter((c) => c.type === "add" || c.type === "remove"); + for (const change of addRemoveChanges) { + if (change.type === "add") { + const index = elements.findIndex((el) => el.id === change.item.id); + if (index === -1) { + elements.push(change.item); + } + } else if (change.type === "remove") { + const index = elements.findIndex((el) => el.id === change.id); + if (index !== -1) { + elements.splice(index, 1); + } + } + } + const elementIds = elements.map((el) => el.id); + for (const element of elements) { + for (const currentChange of changes) { + if (currentChange.id !== element.id) { + continue; + } + switch (currentChange.type) { + case "select": + element.selected = currentChange.selected; + break; + case "position": + if (isGraphNode(element)) { + if (typeof currentChange.position !== "undefined") { + element.position = currentChange.position; + } + if (typeof currentChange.dragging !== "undefined") { + element.dragging = currentChange.dragging; + } + if (element.expandParent && element.parentNode) { + const parent = elements[elementIds.indexOf(element.parentNode)]; + if (parent && isGraphNode(parent)) { + handleParentExpand(element, parent); + } + } + } + break; + case "dimensions": + if (isGraphNode(element)) { + if (typeof currentChange.dimensions !== "undefined") { + element.dimensions = currentChange.dimensions; + } + if (typeof currentChange.updateStyle !== "undefined" && currentChange.updateStyle) { + element.style = { + ...element.style || {}, + width: `${(_a = currentChange.dimensions) == null ? void 0 : _a.width}px`, + height: `${(_b = currentChange.dimensions) == null ? void 0 : _b.height}px` + }; + } + if (typeof currentChange.resizing !== "undefined") { + element.resizing = currentChange.resizing; + } + if (element.expandParent && element.parentNode) { + const parent = elements[elementIds.indexOf(element.parentNode)]; + if (parent && isGraphNode(parent)) { + const parentInit = !!parent.dimensions.width && !!parent.dimensions.height; + if (!parentInit) { + nextTick(() => { + handleParentExpand(element, parent); + }); + } else { + handleParentExpand(element, parent); + } + } + } + } + break; + } + } + } + return elements; +} +function applyEdgeChanges(changes, edges) { + return applyChanges(changes, edges); +} +function applyNodeChanges(changes, nodes) { + return applyChanges(changes, nodes); +} +function createSelectionChange(id2, selected) { + return { + id: id2, + type: "select", + selected + }; +} +function createAdditionChange(item) { + return { + item, + type: "add" + }; +} +function createNodeRemoveChange(id2) { + return { + id: id2, + type: "remove" + }; +} +function createEdgeRemoveChange(id2, source, target, sourceHandle, targetHandle) { + return { + id: id2, + source, + target, + sourceHandle: sourceHandle || null, + targetHandle: targetHandle || null, + type: "remove" + }; +} +function getSelectionChanges(items, selectedIds = /* @__PURE__ */ new Set(), mutateItem = false) { + const changes = []; + for (const [id2, item] of items) { + const willBeSelected = selectedIds.has(id2); + if (!(item.selected === void 0 && !willBeSelected) && item.selected !== willBeSelected) { + if (mutateItem) { + item.selected = willBeSelected; + } + changes.push(createSelectionChange(item.id, willBeSelected)); + } + } + return changes; +} +function createExtendedEventHook(defaultHandler) { + const fns = /* @__PURE__ */ new Set(); + let hasDefaultHandler = false; + const hasListeners = () => fns.size > 0; + if (defaultHandler) { + hasDefaultHandler = true; + fns.add(defaultHandler); + } + const off = (fn) => { + fns.delete(fn); + }; + const on = (fn) => { + if (defaultHandler && hasDefaultHandler) { + fns.delete(defaultHandler); + } + fns.add(fn); + const offFn = () => { + off(fn); + if (defaultHandler && hasDefaultHandler) { + fns.add(defaultHandler); + } + }; + tryOnScopeDispose(offFn); + return { + off: offFn + }; + }; + const trigger = (param) => { + return Promise.all(Array.from(fns).map((fn) => fn(param))); + }; + return { + on, + off, + trigger, + hasListeners, + fns + }; +} +function hasSelector(target, selector2, node) { + let current = target; + do { + if (current && current.matches(selector2)) { + return true; + } else if (current === node) { + return false; + } + current = current.parentElement; + } while (current); + return false; +} +function getDragItems(nodes, nodesDraggable, mousePos, findNode, nodeId) { + var _a, _b; + const dragItems = []; + for (const node of nodes) { + if ((node.selected || node.id === nodeId) && (!node.parentNode || !isParentSelected(node, findNode)) && (node.draggable || nodesDraggable && typeof node.draggable === "undefined")) { + dragItems.push( + markRaw({ + id: node.id, + position: node.position || { x: 0, y: 0 }, + distance: { + x: mousePos.x - ((_a = node.computedPosition) == null ? void 0 : _a.x) || 0, + y: mousePos.y - ((_b = node.computedPosition) == null ? void 0 : _b.y) || 0 + }, + from: node.computedPosition, + extent: node.extent, + parentNode: node.parentNode, + dimensions: node.dimensions, + expandParent: node.expandParent + }) + ); + } + } + return dragItems; +} +function getEventHandlerParams({ + id: id2, + dragItems, + findNode +}) { + const extendedDragItems = []; + for (const dragItem of dragItems) { + const node = findNode(dragItem.id); + if (node) { + extendedDragItems.push(node); + } + } + return [id2 ? extendedDragItems.find((n) => n.id === id2) : extendedDragItems[0], extendedDragItems]; +} +function getExtentPadding(padding) { + if (Array.isArray(padding)) { + switch (padding.length) { + case 1: + return [padding[0], padding[0], padding[0], padding[0]]; + case 2: + return [padding[0], padding[1], padding[0], padding[1]]; + case 3: + return [padding[0], padding[1], padding[2], padding[1]]; + case 4: + return padding; + default: + return [0, 0, 0, 0]; + } + } + return [padding, padding, padding, padding]; +} +function getParentExtent(currentExtent, node, parent) { + const [top, right, bottom, left] = typeof currentExtent !== "string" ? getExtentPadding(currentExtent.padding) : [0, 0, 0, 0]; + if (parent && typeof parent.computedPosition.x !== "undefined" && typeof parent.computedPosition.y !== "undefined" && typeof parent.dimensions.width !== "undefined" && typeof parent.dimensions.height !== "undefined") { + return [ + [parent.computedPosition.x + left, parent.computedPosition.y + top], + [ + parent.computedPosition.x + parent.dimensions.width - right, + parent.computedPosition.y + parent.dimensions.height - bottom + ] + ]; + } + return false; +} +function getExtent(item, triggerError, extent, parent) { + let currentExtent = item.extent || extent; + if ((currentExtent === "parent" || !Array.isArray(currentExtent) && (currentExtent == null ? void 0 : currentExtent.range) === "parent") && !item.expandParent) { + if (item.parentNode && parent && item.dimensions.width && item.dimensions.height) { + const parentExtent = getParentExtent(currentExtent, item, parent); + if (parentExtent) { + currentExtent = parentExtent; + } + } else { + triggerError(new VueFlowError(ErrorCode.NODE_EXTENT_INVALID, item.id)); + currentExtent = extent; + } + } else if (Array.isArray(currentExtent)) { + const parentX = (parent == null ? void 0 : parent.computedPosition.x) || 0; + const parentY = (parent == null ? void 0 : parent.computedPosition.y) || 0; + currentExtent = [ + [currentExtent[0][0] + parentX, currentExtent[0][1] + parentY], + [currentExtent[1][0] + parentX, currentExtent[1][1] + parentY] + ]; + } else if (currentExtent !== "parent" && (currentExtent == null ? void 0 : currentExtent.range) && Array.isArray(currentExtent.range)) { + const [top, right, bottom, left] = getExtentPadding(currentExtent.padding); + const parentX = (parent == null ? void 0 : parent.computedPosition.x) || 0; + const parentY = (parent == null ? void 0 : parent.computedPosition.y) || 0; + currentExtent = [ + [currentExtent.range[0][0] + parentX + left, currentExtent.range[0][1] + parentY + top], + [currentExtent.range[1][0] + parentX - right, currentExtent.range[1][1] + parentY - bottom] + ]; + } + return currentExtent === "parent" ? [ + [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], + [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY] + ] : currentExtent; +} +function clampNodeExtent({ width, height }, extent) { + return [extent[0], [extent[1][0] - (width || 0), extent[1][1] - (height || 0)]]; +} +function calcNextPosition(node, nextPosition, triggerError, nodeExtent, parentNode) { + const extent = clampNodeExtent(node.dimensions, getExtent(node, triggerError, nodeExtent, parentNode)); + const clampedPos = clampPosition(nextPosition, extent); + return { + position: { + x: clampedPos.x - ((parentNode == null ? void 0 : parentNode.computedPosition.x) || 0), + y: clampedPos.y - ((parentNode == null ? void 0 : parentNode.computedPosition.y) || 0) + }, + computedPosition: clampedPos + }; +} +function getHandlePosition(node, handle, fallbackPosition = Position.Left, center = false) { + const x = ((handle == null ? void 0 : handle.x) ?? 0) + node.computedPosition.x; + const y = ((handle == null ? void 0 : handle.y) ?? 0) + node.computedPosition.y; + const { width, height } = handle ?? getNodeDimensions(node); + if (center) { + return { x: x + width / 2, y: y + height / 2 }; + } + const position = (handle == null ? void 0 : handle.position) ?? fallbackPosition; + switch (position) { + case Position.Top: + return { x: x + width / 2, y }; + case Position.Right: + return { x: x + width, y: y + height / 2 }; + case Position.Bottom: + return { x: x + width / 2, y: y + height }; + case Position.Left: + return { x, y: y + height / 2 }; + } +} +function getEdgeHandle(bounds, handleId) { + if (!bounds) { + return null; + } + return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null; +} +function isEdgeVisible({ + sourcePos, + targetPos, + sourceWidth, + sourceHeight, + targetWidth, + targetHeight, + width, + height, + viewport +}) { + const edgeBox = { + x: Math.min(sourcePos.x, targetPos.x), + y: Math.min(sourcePos.y, targetPos.y), + x2: Math.max(sourcePos.x + sourceWidth, targetPos.x + targetWidth), + y2: Math.max(sourcePos.y + sourceHeight, targetPos.y + targetHeight) + }; + if (edgeBox.x === edgeBox.x2) { + edgeBox.x2 += 1; + } + if (edgeBox.y === edgeBox.y2) { + edgeBox.y2 += 1; + } + const viewBox = rectToBox({ + x: (0 - viewport.x) / viewport.zoom, + y: (0 - viewport.y) / viewport.zoom, + width: width / viewport.zoom, + height: height / viewport.zoom + }); + const xOverlap = Math.max(0, Math.min(viewBox.x2, edgeBox.x2) - Math.max(viewBox.x, edgeBox.x)); + const yOverlap = Math.max(0, Math.min(viewBox.y2, edgeBox.y2) - Math.max(viewBox.y, edgeBox.y)); + const overlappingArea = Math.ceil(xOverlap * yOverlap); + return overlappingArea > 0; +} +function getEdgeZIndex(edge, findNode, elevateEdgesOnSelect = false) { + const hasZIndex = typeof edge.zIndex === "number"; + let z = hasZIndex ? edge.zIndex : 0; + const source = findNode(edge.source); + const target = findNode(edge.target); + if (!source || !target) { + return 0; + } + if (elevateEdgesOnSelect) { + z = hasZIndex ? edge.zIndex : Math.max(source.computedPosition.z || 0, target.computedPosition.z || 0); + } + return z; +} +var ErrorCode = ((ErrorCode2) => { + ErrorCode2["MISSING_STYLES"] = "MISSING_STYLES"; + ErrorCode2["MISSING_VIEWPORT_DIMENSIONS"] = "MISSING_VIEWPORT_DIMENSIONS"; + ErrorCode2["NODE_INVALID"] = "NODE_INVALID"; + ErrorCode2["NODE_NOT_FOUND"] = "NODE_NOT_FOUND"; + ErrorCode2["NODE_MISSING_PARENT"] = "NODE_MISSING_PARENT"; + ErrorCode2["NODE_TYPE_MISSING"] = "NODE_TYPE_MISSING"; + ErrorCode2["NODE_EXTENT_INVALID"] = "NODE_EXTENT_INVALID"; + ErrorCode2["EDGE_INVALID"] = "EDGE_INVALID"; + ErrorCode2["EDGE_NOT_FOUND"] = "EDGE_NOT_FOUND"; + ErrorCode2["EDGE_SOURCE_MISSING"] = "EDGE_SOURCE_MISSING"; + ErrorCode2["EDGE_TARGET_MISSING"] = "EDGE_TARGET_MISSING"; + ErrorCode2["EDGE_TYPE_MISSING"] = "EDGE_TYPE_MISSING"; + ErrorCode2["EDGE_SOURCE_TARGET_SAME"] = "EDGE_SOURCE_TARGET_SAME"; + ErrorCode2["EDGE_SOURCE_TARGET_MISSING"] = "EDGE_SOURCE_TARGET_MISSING"; + ErrorCode2["EDGE_ORPHANED"] = "EDGE_ORPHANED"; + ErrorCode2["USEVUEFLOW_OPTIONS"] = "USEVUEFLOW_OPTIONS"; + return ErrorCode2; +})(ErrorCode || {}); +var messages = { + [ + "MISSING_STYLES" + /* 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" + /* MISSING_VIEWPORT_DIMENSIONS */ + ]: () => "The Vue Flow parent container needs a width and a height to render the graph", + [ + "NODE_INVALID" + /* NODE_INVALID */ + ]: (id2) => `Node is invalid +Node: ${id2}`, + [ + "NODE_NOT_FOUND" + /* NODE_NOT_FOUND */ + ]: (id2) => `Node not found +Node: ${id2}`, + [ + "NODE_MISSING_PARENT" + /* NODE_MISSING_PARENT */ + ]: (id2, parentId) => `Node is missing a parent +Node: ${id2} +Parent: ${parentId}`, + [ + "NODE_TYPE_MISSING" + /* NODE_TYPE_MISSING */ + ]: (type) => `Node type is missing +Type: ${type}`, + [ + "NODE_EXTENT_INVALID" + /* NODE_EXTENT_INVALID */ + ]: (id2) => `Only child nodes can use a parent extent +Node: ${id2}`, + [ + "EDGE_INVALID" + /* EDGE_INVALID */ + ]: (id2) => `An edge needs a source and a target +Edge: ${id2}`, + [ + "EDGE_SOURCE_MISSING" + /* EDGE_SOURCE_MISSING */ + ]: (id2, source) => `Edge source is missing +Edge: ${id2} +Source: ${source}`, + [ + "EDGE_TARGET_MISSING" + /* EDGE_TARGET_MISSING */ + ]: (id2, target) => `Edge target is missing +Edge: ${id2} +Target: ${target}`, + [ + "EDGE_TYPE_MISSING" + /* EDGE_TYPE_MISSING */ + ]: (type) => `Edge type is missing +Type: ${type}`, + [ + "EDGE_SOURCE_TARGET_SAME" + /* EDGE_SOURCE_TARGET_SAME */ + ]: (id2, source, target) => `Edge source and target are the same +Edge: ${id2} +Source: ${source} +Target: ${target}`, + [ + "EDGE_SOURCE_TARGET_MISSING" + /* EDGE_SOURCE_TARGET_MISSING */ + ]: (id2, source, target) => `Edge source or target is missing +Edge: ${id2} +Source: ${source} +Target: ${target}`, + [ + "EDGE_ORPHANED" + /* EDGE_ORPHANED */ + ]: (id2) => `Edge was orphaned (suddenly missing source or target) and has been removed +Edge: ${id2}`, + [ + "EDGE_NOT_FOUND" + /* EDGE_NOT_FOUND */ + ]: (id2) => `Edge not found +Edge: ${id2}`, + // deprecation errors + [ + "USEVUEFLOW_OPTIONS" + /* USEVUEFLOW_OPTIONS */ + ]: () => `The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead` +}; +var VueFlowError = class extends Error { + constructor(code, ...args) { + var _a; + super((_a = messages[code]) == null ? void 0 : _a.call(messages, ...args)); + this.name = "VueFlowError"; + this.code = code; + this.args = args; + } +}; +function isErrorOfType(error, code) { + return error.code === code; +} +function isMouseEvent(event) { + return "clientX" in event; +} +function isUseDragEvent(event) { + return "sourceEvent" in event; +} +function getEventPosition(event, bounds) { + const isMouse = isMouseEvent(event); + let evtX; + let evtY; + if (isMouse) { + evtX = event.clientX; + evtY = event.clientY; + } else if ("touches" in event && event.touches.length > 0) { + evtX = event.touches[0].clientX; + evtY = event.touches[0].clientY; + } else if ("changedTouches" in event && event.changedTouches.length > 0) { + evtX = event.changedTouches[0].clientX; + evtY = event.changedTouches[0].clientY; + } else { + evtX = 0; + evtY = 0; + } + return { + x: evtX - ((bounds == null ? void 0 : bounds.left) ?? 0), + y: evtY - ((bounds == null ? void 0 : bounds.top) ?? 0) + }; +} +var isMacOs = () => { + var _a; + return typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.indexOf("Mac")) >= 0; +}; +function getNodeDimensions(node) { + var _a, _b; + return { + width: ((_a = node.dimensions) == null ? void 0 : _a.width) ?? node.width ?? 0, + height: ((_b = node.dimensions) == null ? void 0 : _b.height) ?? node.height ?? 0 + }; +} +function snapPosition(position, snapGrid = [1, 1]) { + return { + x: snapGrid[0] * Math.round(position.x / snapGrid[0]), + y: snapGrid[1] * Math.round(position.y / snapGrid[1]) + }; +} +var alwaysValid$1 = () => true; +function resetRecentHandle(handleDomNode) { + handleDomNode == null ? void 0 : handleDomNode.classList.remove("valid", "connecting", "vue-flow__handle-valid", "vue-flow__handle-connecting"); +} +function getNodesWithinDistance(position, nodeLookup, distance2) { + const nodes = []; + const rect = { + x: position.x - distance2, + y: position.y - distance2, + width: distance2 * 2, + height: distance2 * 2 + }; + for (const node of nodeLookup.values()) { + if (getOverlappingArea(rect, nodeToRect(node)) > 0) { + nodes.push(node); + } + } + return nodes; +} +var ADDITIONAL_DISTANCE = 250; +function getClosestHandle(position, connectionRadius, nodeLookup, fromHandle) { + var _a, _b; + let closestHandles = []; + let minDistance = Number.POSITIVE_INFINITY; + const closeNodes = getNodesWithinDistance(position, nodeLookup, connectionRadius + ADDITIONAL_DISTANCE); + for (const node of closeNodes) { + const allHandles = [...((_a = node.handleBounds) == null ? void 0 : _a.source) ?? [], ...((_b = node.handleBounds) == null ? void 0 : _b.target) ?? []]; + for (const handle of allHandles) { + if (fromHandle.nodeId === handle.nodeId && fromHandle.type === handle.type && fromHandle.id === handle.id) { + continue; + } + const { x, y } = getHandlePosition(node, handle, handle.position, true); + const distance2 = Math.sqrt((x - position.x) ** 2 + (y - position.y) ** 2); + if (distance2 > connectionRadius) { + continue; + } + if (distance2 < minDistance) { + closestHandles = [{ ...handle, x, y }]; + minDistance = distance2; + } else if (distance2 === minDistance) { + closestHandles.push({ ...handle, x, y }); + } + } + } + if (!closestHandles.length) { + return null; + } + if (closestHandles.length > 1) { + const oppositeHandleType = fromHandle.type === "source" ? "target" : "source"; + return closestHandles.find((handle) => handle.type === oppositeHandleType) ?? closestHandles[0]; + } + return closestHandles[0]; +} +function isValidHandle(event, { + handle, + connectionMode, + fromNodeId, + fromHandleId, + fromType, + doc, + lib, + flowId, + isValidConnection = alwaysValid$1 +}, edges, nodes, findNode) { + const isTarget = fromType === "target"; + const handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle == null ? void 0 : handle.nodeId}-${handle == null ? void 0 : handle.id}-${handle == null ? void 0 : handle.type}"]`) : null; + const { x, y } = getEventPosition(event); + const handleBelow = doc.elementFromPoint(x, y); + const handleToCheck = (handleBelow == null ? void 0 : handleBelow.classList.contains(`${lib}-flow__handle`)) ? handleBelow : handleDomNode; + const result = { + handleDomNode: handleToCheck, + isValid: false, + connection: null, + toHandle: null + }; + if (handleToCheck) { + const handleType = getHandleType(void 0, handleToCheck); + const handleNodeId = handleToCheck.getAttribute("data-nodeid"); + const handleId = handleToCheck.getAttribute("data-handleid"); + const connectable = handleToCheck.classList.contains("connectable"); + const connectableEnd = handleToCheck.classList.contains("connectableend"); + if (!handleNodeId || !handleType) { + return result; + } + const connection = { + source: isTarget ? handleNodeId : fromNodeId, + sourceHandle: isTarget ? handleId : fromHandleId, + target: isTarget ? fromNodeId : handleNodeId, + targetHandle: isTarget ? fromHandleId : handleId + }; + result.connection = connection; + const isConnectable = connectable && connectableEnd; + const isValid = isConnectable && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType === "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId); + result.isValid = isValid && isValidConnection(connection, { + nodes, + edges, + sourceNode: findNode(connection.source), + targetNode: findNode(connection.target) + }); + result.toHandle = handle; + } + return result; +} +function getHandleType(edgeUpdaterType, handleDomNode) { + if (edgeUpdaterType) { + return edgeUpdaterType; + } else if (handleDomNode == null ? void 0 : handleDomNode.classList.contains("target")) { + return "target"; + } else if (handleDomNode == null ? void 0 : handleDomNode.classList.contains("source")) { + return "source"; + } + return null; +} +function getConnectionStatus(isInsideConnectionRadius, isHandleValid) { + let connectionStatus = null; + if (isHandleValid) { + connectionStatus = "valid"; + } else if (isInsideConnectionRadius && !isHandleValid) { + connectionStatus = "invalid"; + } + return connectionStatus; +} +function isConnectionValid(isInsideConnectionRadius, isHandleValid) { + let isValid = null; + if (isHandleValid) { + isValid = true; + } else if (isInsideConnectionRadius && !isHandleValid) { + isValid = false; + } + return isValid; +} +function getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode, withAbsolutePosition = false) { + var _a, _b, _c; + const node = nodeLookup.get(nodeId); + if (!node) { + return null; + } + const handles = connectionMode === ConnectionMode.Strict ? (_a = node.handleBounds) == null ? void 0 : _a[handleType] : [...((_b = node.handleBounds) == null ? void 0 : _b.source) ?? [], ...((_c = node.handleBounds) == null ? void 0 : _c.target) ?? []]; + const handle = (handleId ? handles == null ? void 0 : handles.find((h2) => h2.id === handleId) : handles == null ? void 0 : handles[0]) ?? null; + return handle && withAbsolutePosition ? { ...handle, ...getHandlePosition(node, handle, handle.position, true) } : handle; +} +var oppositePosition = { + [Position.Left]: Position.Right, + [Position.Right]: Position.Left, + [Position.Top]: Position.Bottom, + [Position.Bottom]: Position.Top +}; +var productionEnvs = ["production", "prod"]; +function warn(message, ...args) { + if (isDev()) { + console.warn(`[Vue Flow]: ${message}`, ...args); + } +} +function isDev() { + return !productionEnvs.includes("development"); +} +function getHandleBounds(type, nodeElement, nodeBounds, zoom2, nodeId) { + const handles = nodeElement.querySelectorAll(`.vue-flow__handle.${type}`); + if (!(handles == null ? void 0 : handles.length)) { + return null; + } + return Array.from(handles).map((handle) => { + const handleBounds = handle.getBoundingClientRect(); + return { + id: handle.getAttribute("data-handleid"), + type, + nodeId, + position: handle.getAttribute("data-handlepos"), + x: (handleBounds.left - nodeBounds.left) / zoom2, + y: (handleBounds.top - nodeBounds.top) / zoom2, + ...getDimensions(handle) + }; + }); +} +function handleNodeClick(node, multiSelectionActive, addSelectedNodes, removeSelectedNodes, nodesSelectionActive, unselect = false, nodeEl) { + nodesSelectionActive.value = false; + if (!node.selected) { + addSelectedNodes([node]); + } else if (unselect || node.selected && multiSelectionActive) { + removeSelectedNodes([node]); + nextTick(() => { + nodeEl.blur(); + }); + } +} +function isDef(val) { + const unrefVal = unref(val); + return typeof unrefVal !== "undefined"; +} +function addEdgeToStore(edgeParams, edges, triggerError, defaultEdgeOptions) { + if (!edgeParams || !edgeParams.source || !edgeParams.target) { + triggerError(new VueFlowError(ErrorCode.EDGE_INVALID, (edgeParams == null ? void 0 : edgeParams.id) ?? `[ID UNKNOWN]`)); + return false; + } + let edge; + if (isEdge(edgeParams)) { + edge = edgeParams; + } else { + edge = { + ...edgeParams, + id: getEdgeId(edgeParams) + }; + } + edge = parseEdge(edge, void 0, defaultEdgeOptions); + if (connectionExists(edge, edges)) { + return false; + } + return edge; +} +function updateEdgeAction(edge, newConnection, prevEdge, shouldReplaceId, triggerError) { + if (!newConnection.source || !newConnection.target) { + triggerError(new VueFlowError(ErrorCode.EDGE_INVALID, edge.id)); + return false; + } + if (!prevEdge) { + triggerError(new VueFlowError(ErrorCode.EDGE_NOT_FOUND, edge.id)); + return false; + } + const { id: id2, ...rest } = edge; + return { + ...rest, + id: shouldReplaceId ? getEdgeId(newConnection) : id2, + source: newConnection.source, + target: newConnection.target, + sourceHandle: newConnection.sourceHandle, + targetHandle: newConnection.targetHandle + }; +} +function createGraphNodes(nodes, findNode, triggerError) { + const parentNodes = {}; + const nextNodes = []; + for (let i = 0; i < nodes.length; ++i) { + const node = nodes[i]; + if (!isNode(node)) { + triggerError( + new VueFlowError(ErrorCode.NODE_INVALID, node == null ? void 0 : node.id) || `[ID UNKNOWN|INDEX ${i}]` + ); + continue; + } + const parsed = parseNode(node, findNode(node.id), node.parentNode); + if (node.parentNode) { + parentNodes[node.parentNode] = true; + } + nextNodes[i] = parsed; + } + for (const node of nextNodes) { + const parentNode = findNode(node.parentNode) || nextNodes.find((n) => n.id === node.parentNode); + if (node.parentNode && !parentNode) { + triggerError(new VueFlowError(ErrorCode.NODE_MISSING_PARENT, node.id, node.parentNode)); + } + if (node.parentNode || parentNodes[node.id]) { + if (parentNodes[node.id]) { + node.isParent = true; + } + if (parentNode) { + parentNode.isParent = true; + } + } + } + return nextNodes; +} +function addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) { + let key = nodeId; + const nodeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map(); + connectionLookup.set(key, nodeMap.set(connectionKey, connection)); + key = `${nodeId}-${type}`; + const typeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map(); + connectionLookup.set(key, typeMap.set(connectionKey, connection)); + if (handleId) { + key = `${nodeId}-${type}-${handleId}`; + const handleMap = connectionLookup.get(key) || /* @__PURE__ */ new Map(); + connectionLookup.set(key, handleMap.set(connectionKey, connection)); + } +} +function updateConnectionLookup(connectionLookup, edgeLookup, edges) { + connectionLookup.clear(); + for (const edge of edges) { + const { source: sourceNode, target: targetNode, sourceHandle = null, targetHandle = null } = edge; + const connection = { edgeId: edge.id, source: sourceNode, target: targetNode, sourceHandle, targetHandle }; + const sourceKey = `${sourceNode}-${sourceHandle}--${targetNode}-${targetHandle}`; + const targetKey = `${targetNode}-${targetHandle}--${sourceNode}-${sourceHandle}`; + addConnectionToLookup("source", connection, targetKey, connectionLookup, sourceNode, sourceHandle); + addConnectionToLookup("target", connection, sourceKey, connectionLookup, targetNode, targetHandle); + } +} +function handleConnectionChange(a, b, cb) { + if (!cb) { + return; + } + const diff = []; + for (const key of a.keys()) { + if (!b.has(key)) { + diff.push(a.get(key)); + } + } + if (diff.length) { + cb(diff); + } +} +function areConnectionMapsEqual(a, b) { + if (!a && !b) { + return true; + } + if (!a || !b || a.size !== b.size) { + return false; + } + if (!a.size && !b.size) { + return true; + } + for (const key of a.keys()) { + if (!b.has(key)) { + return false; + } + } + return true; +} +function areSetsEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const item of a) { + if (!b.has(item)) { + return false; + } + } + return true; +} +function createGraphEdges(nextEdges, isValidConnection, findNode, findEdge, onError, defaultEdgeOptions, nodes, edges) { + const validEdges = []; + for (const edgeOrConnection of nextEdges) { + const edge = isEdge(edgeOrConnection) ? edgeOrConnection : addEdgeToStore(edgeOrConnection, edges, onError, defaultEdgeOptions); + if (!edge) { + continue; + } + const sourceNode = findNode(edge.source); + const targetNode = findNode(edge.target); + if (!sourceNode || !targetNode) { + onError(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.id, edge.source, edge.target)); + continue; + } + if (!sourceNode) { + onError(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.id, edge.source)); + continue; + } + if (!targetNode) { + onError(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.id, edge.target)); + continue; + } + if (isValidConnection) { + const isValid = isValidConnection(edge, { + edges, + nodes, + sourceNode, + targetNode + }); + if (!isValid) { + onError(new VueFlowError(ErrorCode.EDGE_INVALID, edge.id)); + continue; + } + } + const existingEdge = findEdge(edge.id); + validEdges.push({ + ...parseEdge(edge, existingEdge, defaultEdgeOptions), + sourceNode, + targetNode + }); + } + return validEdges; +} +var VueFlow = Symbol("vueFlow"); +var NodeId = Symbol("nodeId"); +var NodeRef = Symbol("nodeRef"); +var EdgeId = Symbol("edgeId"); +var EdgeRef = Symbol("edgeRef"); +var Slots = Symbol("slots"); +function useDrag(params) { + const { + vueFlowRef, + snapToGrid, + snapGrid, + noDragClassName, + nodes, + nodeExtent, + nodeDragThreshold, + viewport, + autoPanOnNodeDrag, + autoPanSpeed, + nodesDraggable, + panBy, + findNode, + multiSelectionActive, + nodesSelectionActive, + selectNodesOnDrag, + removeSelectedElements, + addSelectedNodes, + updateNodePositions, + emits + } = useVueFlow(); + const { onStart, onDrag, onStop, onClick, el, disabled, id: id2, selectable, dragHandle } = params; + const dragging = shallowRef(false); + let dragItems = []; + let dragHandler; + let containerBounds = null; + let lastPos = { x: void 0, y: void 0 }; + let mousePosition = { x: 0, y: 0 }; + let dragEvent = null; + let dragStarted = false; + let autoPanId = 0; + let autoPanStarted = false; + const getPointerPosition = useGetPointerPosition(); + const updateNodes = ({ x, y }) => { + lastPos = { x, y }; + let hasChange = false; + dragItems = dragItems.map((n) => { + const nextPosition = { x: x - n.distance.x, y: y - n.distance.y }; + const { computedPosition } = calcNextPosition( + n, + snapToGrid.value ? snapPosition(nextPosition, snapGrid.value) : nextPosition, + emits.error, + nodeExtent.value, + n.parentNode ? findNode(n.parentNode) : void 0 + ); + hasChange = hasChange || n.position.x !== computedPosition.x || n.position.y !== computedPosition.y; + n.position = computedPosition; + return n; + }); + if (!hasChange) { + return; + } + updateNodePositions(dragItems, true, true); + dragging.value = true; + if (dragEvent) { + const [currentNode, nodes2] = getEventHandlerParams({ + id: id2, + dragItems, + findNode + }); + onDrag({ event: dragEvent, node: currentNode, nodes: nodes2 }); + } + }; + const autoPan = () => { + if (!containerBounds) { + return; + } + const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed.value); + if (xMovement !== 0 || yMovement !== 0) { + const nextPos = { + x: (lastPos.x ?? 0) - xMovement / viewport.value.zoom, + y: (lastPos.y ?? 0) - yMovement / viewport.value.zoom + }; + if (panBy({ x: xMovement, y: yMovement })) { + updateNodes(nextPos); + } + } + autoPanId = requestAnimationFrame(autoPan); + }; + const startDrag = (event, nodeEl) => { + dragStarted = true; + const node = findNode(id2); + if (!selectNodesOnDrag.value && !multiSelectionActive.value && node) { + if (!node.selected) { + removeSelectedElements(); + } + } + if (node && toValue(selectable) && selectNodesOnDrag.value) { + handleNodeClick( + node, + multiSelectionActive.value, + addSelectedNodes, + removeSelectedElements, + nodesSelectionActive, + false, + nodeEl + ); + } + const pointerPos = getPointerPosition(event.sourceEvent); + lastPos = pointerPos; + dragItems = getDragItems(nodes.value, nodesDraggable.value, pointerPos, findNode, id2); + if (dragItems.length) { + const [currentNode, nodes2] = getEventHandlerParams({ + id: id2, + dragItems, + findNode + }); + onStart({ event: event.sourceEvent, node: currentNode, nodes: nodes2 }); + } + }; + const eventStart = (event, nodeEl) => { + var _a; + if (event.sourceEvent.type === "touchmove" && event.sourceEvent.touches.length > 1) { + return; + } + if (nodeDragThreshold.value === 0) { + startDrag(event, nodeEl); + } + lastPos = getPointerPosition(event.sourceEvent); + containerBounds = ((_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect()) || null; + mousePosition = getEventPosition(event.sourceEvent, containerBounds); + }; + const eventDrag = (event, nodeEl) => { + const pointerPos = getPointerPosition(event.sourceEvent); + if (!autoPanStarted && dragStarted && autoPanOnNodeDrag.value) { + autoPanStarted = true; + autoPan(); + } + if (!dragStarted) { + const x = pointerPos.xSnapped - (lastPos.x ?? 0); + const y = pointerPos.ySnapped - (lastPos.y ?? 0); + const distance2 = Math.sqrt(x * x + y * y); + if (distance2 > nodeDragThreshold.value) { + startDrag(event, nodeEl); + } + } + if ((lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems.length && dragStarted) { + dragEvent = event.sourceEvent; + mousePosition = getEventPosition(event.sourceEvent, containerBounds); + updateNodes(pointerPos); + } + }; + const eventEnd = (event) => { + let isClick = false; + if (!dragStarted && !dragging.value && !multiSelectionActive.value) { + const evt = event.sourceEvent; + const pointerPos = getPointerPosition(evt); + const x = pointerPos.xSnapped - (lastPos.x ?? 0); + const y = pointerPos.ySnapped - (lastPos.y ?? 0); + const distance2 = Math.sqrt(x * x + y * y); + if (distance2 !== 0 && distance2 <= nodeDragThreshold.value) { + onClick == null ? void 0 : onClick(evt); + isClick = true; + } + } + if (dragItems.length && !isClick) { + updateNodePositions(dragItems, false, false); + const [currentNode, nodes2] = getEventHandlerParams({ + id: id2, + dragItems, + findNode + }); + onStop({ event: event.sourceEvent, node: currentNode, nodes: nodes2 }); + } + dragItems = []; + dragging.value = false; + autoPanStarted = false; + dragStarted = false; + lastPos = { x: void 0, y: void 0 }; + cancelAnimationFrame(autoPanId); + }; + watch([() => toValue(disabled), el], ([isDisabled, nodeEl], _, onCleanup) => { + if (nodeEl) { + const selection2 = select(nodeEl); + if (!isDisabled) { + dragHandler = drag().on("start", (event) => eventStart(event, nodeEl)).on("drag", (event) => eventDrag(event, nodeEl)).on("end", (event) => eventEnd(event)).filter((event) => { + const target = event.target; + const unrefDragHandle = toValue(dragHandle); + return !event.button && (!noDragClassName.value || !hasSelector(target, `.${noDragClassName.value}`, nodeEl) && (!unrefDragHandle || hasSelector(target, unrefDragHandle, nodeEl))); + }); + selection2.call(dragHandler); + } + onCleanup(() => { + selection2.on(".drag", null); + if (dragHandler) { + dragHandler.on("start", null); + dragHandler.on("drag", null); + dragHandler.on("end", null); + } + }); + } + }); + return dragging; +} +function useEdge(id2) { + const edgeId = id2 ?? inject(EdgeId, ""); + const edgeEl = inject(EdgeRef, ref(null)); + const { findEdge, emits } = useVueFlow(); + const edge = findEdge(edgeId); + if (!edge) { + emits.error(new VueFlowError(ErrorCode.EDGE_NOT_FOUND, edgeId)); + } + return { + id: edgeId, + edge, + edgeEl + }; +} +function createEdgeHooks() { + return { + doubleClick: createExtendedEventHook(), + click: createExtendedEventHook(), + mouseEnter: createExtendedEventHook(), + mouseMove: createExtendedEventHook(), + mouseLeave: createExtendedEventHook(), + contextMenu: createExtendedEventHook(), + updateStart: createExtendedEventHook(), + update: createExtendedEventHook(), + updateEnd: createExtendedEventHook() + }; +} +function useEdgeHooks(edge, emits) { + const edgeHooks = createEdgeHooks(); + edgeHooks.doubleClick.on((event) => { + var _a, _b; + emits.edgeDoubleClick(event); + (_b = (_a = edge.events) == null ? void 0 : _a.doubleClick) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.click.on((event) => { + var _a, _b; + emits.edgeClick(event); + (_b = (_a = edge.events) == null ? void 0 : _a.click) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.mouseEnter.on((event) => { + var _a, _b; + emits.edgeMouseEnter(event); + (_b = (_a = edge.events) == null ? void 0 : _a.mouseEnter) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.mouseMove.on((event) => { + var _a, _b; + emits.edgeMouseMove(event); + (_b = (_a = edge.events) == null ? void 0 : _a.mouseMove) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.mouseLeave.on((event) => { + var _a, _b; + emits.edgeMouseLeave(event); + (_b = (_a = edge.events) == null ? void 0 : _a.mouseLeave) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.contextMenu.on((event) => { + var _a, _b; + emits.edgeContextMenu(event); + (_b = (_a = edge.events) == null ? void 0 : _a.contextMenu) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.updateStart.on((event) => { + var _a, _b; + emits.edgeUpdateStart(event); + (_b = (_a = edge.events) == null ? void 0 : _a.updateStart) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.update.on((event) => { + var _a, _b; + emits.edgeUpdate(event); + (_b = (_a = edge.events) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a, event); + }); + edgeHooks.updateEnd.on((event) => { + var _a, _b; + emits.edgeUpdateEnd(event); + (_b = (_a = edge.events) == null ? void 0 : _a.updateEnd) == null ? void 0 : _b.call(_a, event); + }); + return Object.entries(edgeHooks).reduce( + (hooks, [key, value]) => { + hooks.emit[key] = value.trigger; + hooks.on[key] = value.on; + return hooks; + }, + { emit: {}, on: {} } + ); +} +function useGetPointerPosition() { + const { viewport, snapGrid, snapToGrid, vueFlowRef } = useVueFlow(); + return (event) => { + var _a; + const containerBounds = ((_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect()) ?? { left: 0, top: 0 }; + const evt = isUseDragEvent(event) ? event.sourceEvent : event; + const { x, y } = getEventPosition(evt, containerBounds); + const pointerPos = pointToRendererPoint({ x, y }, viewport.value); + const { x: xSnapped, y: ySnapped } = snapToGrid.value ? snapPosition(pointerPos, snapGrid.value) : pointerPos; + return { + xSnapped, + ySnapped, + ...pointerPos + }; + }; +} +function alwaysValid() { + return true; +} +function useHandle({ + handleId, + nodeId, + type, + isValidConnection, + edgeUpdaterType, + onEdgeUpdate, + onEdgeUpdateEnd +}) { + const { + id: flowId, + vueFlowRef, + connectionMode, + connectionRadius, + connectOnClick, + connectionClickStartHandle, + nodesConnectable, + autoPanOnConnect, + autoPanSpeed, + findNode, + panBy, + startConnection, + updateConnection, + endConnection, + emits, + viewport, + edges, + nodes, + isValidConnection: isValidConnectionProp, + nodeLookup + } = useVueFlow(); + let connection = null; + let isValid = false; + let handleDomNode = null; + function handlePointerDown(event) { + var _a; + const isTarget = toValue(type) === "target"; + const isMouseTriggered = isMouseEvent(event); + const doc = getHostForElement(event.target); + const clickedHandle = event.currentTarget; + if (clickedHandle && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) { + let onPointerMove = function(event2) { + connectionPosition = getEventPosition(event2, containerBounds); + closestHandle = getClosestHandle( + pointToRendererPoint(connectionPosition, viewport.value, false, [1, 1]), + connectionRadius.value, + nodeLookup.value, + fromHandle + ); + if (!autoPanStarted) { + autoPan(); + autoPanStarted = true; + } + const result = isValidHandle( + event2, + { + handle: closestHandle, + connectionMode: connectionMode.value, + fromNodeId: toValue(nodeId), + fromHandleId: toValue(handleId), + fromType: isTarget ? "target" : "source", + isValidConnection: isValidConnectionHandler, + doc, + lib: "vue", + flowId, + nodeLookup: nodeLookup.value + }, + edges.value, + nodes.value, + findNode + ); + handleDomNode = result.handleDomNode; + connection = result.connection; + isValid = isConnectionValid(!!closestHandle, result.isValid); + const newConnection2 = { + // from stays the same + ...previousConnection, + isValid, + to: result.toHandle && isValid ? rendererPointToPoint({ x: result.toHandle.x, y: result.toHandle.y }, viewport.value) : connectionPosition, + toHandle: result.toHandle, + toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position], + toNode: result.toHandle ? nodeLookup.value.get(result.toHandle.nodeId) : null + }; + if (isValid && closestHandle && (previousConnection == null ? void 0 : previousConnection.toHandle) && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id && previousConnection.to.x === newConnection2.to.x && previousConnection.to.y === newConnection2.to.y) { + return; + } + updateConnection( + closestHandle && isValid ? rendererPointToPoint( + { + x: closestHandle.x, + y: closestHandle.y + }, + viewport.value + ) : connectionPosition, + result.toHandle, + getConnectionStatus(!!closestHandle, isValid) + ); + previousConnection = newConnection2; + if (!closestHandle && !isValid && !handleDomNode) { + return resetRecentHandle(prevActiveHandle); + } + if (connection && connection.source !== connection.target && handleDomNode) { + resetRecentHandle(prevActiveHandle); + prevActiveHandle = handleDomNode; + handleDomNode.classList.add("connecting", "vue-flow__handle-connecting"); + handleDomNode.classList.toggle("valid", !!isValid); + handleDomNode.classList.toggle("vue-flow__handle-valid", !!isValid); + } + }, onPointerUp = function(event2) { + if ((closestHandle || handleDomNode) && connection && isValid) { + if (!onEdgeUpdate) { + emits.connect(connection); + } else { + onEdgeUpdate(event2, connection); + } + } + emits.connectEnd(event2); + if (edgeUpdaterType) { + onEdgeUpdateEnd == null ? void 0 : onEdgeUpdateEnd(event2); + } + resetRecentHandle(prevActiveHandle); + cancelAnimationFrame(autoPanId); + endConnection(event2); + autoPanStarted = false; + isValid = false; + connection = null; + handleDomNode = null; + doc.removeEventListener("mousemove", onPointerMove); + doc.removeEventListener("mouseup", onPointerUp); + doc.removeEventListener("touchmove", onPointerMove); + doc.removeEventListener("touchend", onPointerUp); + }; + const node = findNode(toValue(nodeId)); + let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid; + if (!isValidConnectionHandler && node) { + isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid; + } + let closestHandle; + let autoPanId = 0; + const { x, y } = getEventPosition(event); + const handleType = getHandleType(toValue(edgeUpdaterType), clickedHandle); + const containerBounds = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect(); + if (!containerBounds || !handleType) { + return; + } + const fromHandleInternal = getHandle(toValue(nodeId), handleType, toValue(handleId), nodeLookup.value, connectionMode.value); + if (!fromHandleInternal) { + return; + } + let prevActiveHandle; + let connectionPosition = getEventPosition(event, containerBounds); + let autoPanStarted = false; + const autoPan = () => { + if (!autoPanOnConnect.value) { + return; + } + const [xMovement, yMovement] = calcAutoPan(connectionPosition, containerBounds, autoPanSpeed.value); + panBy({ x: xMovement, y: yMovement }); + autoPanId = requestAnimationFrame(autoPan); + }; + const fromHandle = { + ...fromHandleInternal, + nodeId: toValue(nodeId), + type: handleType, + position: fromHandleInternal.position + }; + const fromNodeInternal = nodeLookup.value.get(toValue(nodeId)); + const from = getHandlePosition(fromNodeInternal, fromHandle, Position.Left, true); + const newConnection = { + inProgress: true, + isValid: null, + from, + fromHandle, + fromPosition: fromHandle.position, + fromNode: fromNodeInternal, + to: connectionPosition, + toHandle: null, + toPosition: oppositePosition[fromHandle.position], + toNode: null + }; + startConnection( + { + nodeId: toValue(nodeId), + id: toValue(handleId), + type: handleType, + position: (clickedHandle == null ? void 0 : clickedHandle.getAttribute("data-handlepos")) || Position.Top, + ...connectionPosition + }, + { + x: x - containerBounds.left, + y: y - containerBounds.top + } + ); + emits.connectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId), handleType }); + let previousConnection = newConnection; + doc.addEventListener("mousemove", onPointerMove); + doc.addEventListener("mouseup", onPointerUp); + doc.addEventListener("touchmove", onPointerMove); + doc.addEventListener("touchend", onPointerUp); + } + } + function handleClick(event) { + var _a, _b; + if (!connectOnClick.value) { + return; + } + const isTarget = toValue(type) === "target"; + if (!connectionClickStartHandle.value) { + emits.clickConnectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId) }); + startConnection( + { + nodeId: toValue(nodeId), + type: toValue(type), + id: toValue(handleId), + position: Position.Top, + ...getEventPosition(event) + }, + void 0, + true + ); + return; + } + let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid; + const node = findNode(toValue(nodeId)); + if (!isValidConnectionHandler && node) { + isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid; + } + if (node && (typeof node.connectable === "undefined" ? nodesConnectable.value : node.connectable) === false) { + return; + } + const doc = getHostForElement(event.target); + const result = isValidHandle( + event, + { + handle: { + nodeId: toValue(nodeId), + id: toValue(handleId), + type: toValue(type), + position: Position.Top, + ...getEventPosition(event) + }, + connectionMode: connectionMode.value, + fromNodeId: connectionClickStartHandle.value.nodeId, + fromHandleId: connectionClickStartHandle.value.id ?? null, + fromType: connectionClickStartHandle.value.type, + isValidConnection: isValidConnectionHandler, + doc, + lib: "vue", + flowId, + nodeLookup: nodeLookup.value + }, + edges.value, + nodes.value, + findNode + ); + const isOwnHandle = ((_a = result.connection) == null ? void 0 : _a.source) === ((_b = result.connection) == null ? void 0 : _b.target); + if (result.isValid && result.connection && !isOwnHandle) { + emits.connect(result.connection); + } + emits.clickConnectEnd(event); + endConnection(event, true); + } + return { + handlePointerDown, + handleClick + }; +} +function useNodeId() { + return inject(NodeId, ""); +} +function useNode(id2) { + const nodeId = id2 ?? useNodeId() ?? ""; + const nodeEl = inject(NodeRef, ref(null)); + const { findNode, edges, emits } = useVueFlow(); + const node = findNode(nodeId); + if (!node) { + emits.error(new VueFlowError(ErrorCode.NODE_NOT_FOUND, nodeId)); + } + return { + id: nodeId, + nodeEl, + node, + parentNode: computed(() => findNode(node.parentNode)), + connectedEdges: computed(() => getConnectedEdges([node], edges.value)) + }; +} +function createNodeHooks() { + return { + doubleClick: createExtendedEventHook(), + click: createExtendedEventHook(), + mouseEnter: createExtendedEventHook(), + mouseMove: createExtendedEventHook(), + mouseLeave: createExtendedEventHook(), + contextMenu: createExtendedEventHook(), + dragStart: createExtendedEventHook(), + drag: createExtendedEventHook(), + dragStop: createExtendedEventHook() + }; +} +function useNodeHooks(node, emits) { + const nodeHooks = createNodeHooks(); + nodeHooks.doubleClick.on((event) => { + var _a, _b; + emits.nodeDoubleClick(event); + (_b = (_a = node.events) == null ? void 0 : _a.doubleClick) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.click.on((event) => { + var _a, _b; + emits.nodeClick(event); + (_b = (_a = node.events) == null ? void 0 : _a.click) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.mouseEnter.on((event) => { + var _a, _b; + emits.nodeMouseEnter(event); + (_b = (_a = node.events) == null ? void 0 : _a.mouseEnter) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.mouseMove.on((event) => { + var _a, _b; + emits.nodeMouseMove(event); + (_b = (_a = node.events) == null ? void 0 : _a.mouseMove) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.mouseLeave.on((event) => { + var _a, _b; + emits.nodeMouseLeave(event); + (_b = (_a = node.events) == null ? void 0 : _a.mouseLeave) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.contextMenu.on((event) => { + var _a, _b; + emits.nodeContextMenu(event); + (_b = (_a = node.events) == null ? void 0 : _a.contextMenu) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.dragStart.on((event) => { + var _a, _b; + emits.nodeDragStart(event); + (_b = (_a = node.events) == null ? void 0 : _a.dragStart) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.drag.on((event) => { + var _a, _b; + emits.nodeDrag(event); + (_b = (_a = node.events) == null ? void 0 : _a.drag) == null ? void 0 : _b.call(_a, event); + }); + nodeHooks.dragStop.on((event) => { + var _a, _b; + emits.nodeDragStop(event); + (_b = (_a = node.events) == null ? void 0 : _a.dragStop) == null ? void 0 : _b.call(_a, event); + }); + return Object.entries(nodeHooks).reduce( + (hooks, [key, value]) => { + hooks.emit[key] = value.trigger; + hooks.on[key] = value.on; + return hooks; + }, + { emit: {}, on: {} } + ); +} +function useUpdateNodePositions() { + const { getSelectedNodes, nodeExtent, updateNodePositions, findNode, snapGrid, snapToGrid, nodesDraggable, emits } = useVueFlow(); + return (positionDiff, isShiftPressed = false) => { + const xVelo = snapToGrid.value ? snapGrid.value[0] : 5; + const yVelo = snapToGrid.value ? snapGrid.value[1] : 5; + const factor = isShiftPressed ? 4 : 1; + const positionDiffX = positionDiff.x * xVelo * factor; + const positionDiffY = positionDiff.y * yVelo * factor; + const nodeUpdates = []; + for (const node of getSelectedNodes.value) { + if (node.draggable || nodesDraggable && typeof node.draggable === "undefined") { + const nextPosition = { x: node.computedPosition.x + positionDiffX, y: node.computedPosition.y + positionDiffY }; + const { computedPosition } = calcNextPosition( + node, + nextPosition, + emits.error, + nodeExtent.value, + node.parentNode ? findNode(node.parentNode) : void 0 + ); + nodeUpdates.push({ + id: node.id, + position: computedPosition, + from: node.position, + distance: { x: positionDiff.x, y: positionDiff.y }, + dimensions: node.dimensions + }); + } + } + updateNodePositions(nodeUpdates, true, false); + }; +} +var DEFAULT_PADDING = 0.1; +var defaultEase = (t) => ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +function noop() { + warn("Viewport not initialized yet."); + return Promise.resolve(false); +} +var initialViewportHelper = { + zoomIn: noop, + zoomOut: noop, + zoomTo: noop, + fitView: noop, + setCenter: noop, + fitBounds: noop, + project: (position) => position, + screenToFlowCoordinate: (position) => position, + flowToScreenCoordinate: (position) => position, + setViewport: noop, + setTransform: noop, + getViewport: () => ({ x: 0, y: 0, zoom: 1 }), + getTransform: () => ({ x: 0, y: 0, zoom: 1 }), + viewportInitialized: false +}; +function useViewportHelper(state) { + function zoom2(scale, transitionOptions) { + return new Promise((resolve) => { + if (state.d3Selection && state.d3Zoom) { + state.d3Zoom.interpolate((transitionOptions == null ? void 0 : transitionOptions.interpolate) === "linear" ? interpolate$1 : interpolateZoom).scaleBy( + getD3Transition(state.d3Selection, transitionOptions == null ? void 0 : transitionOptions.duration, transitionOptions == null ? void 0 : transitionOptions.ease, () => { + resolve(true); + }), + scale + ); + } else { + resolve(false); + } + }); + } + function transformViewport(x, y, zoom22, transitionOptions) { + return new Promise((resolve) => { + var _a; + const { x: clampedX, y: clampedY } = clampPosition({ x: -x, y: -y }, state.translateExtent); + const nextTransform = identity.translate(-clampedX, -clampedY).scale(zoom22); + if (state.d3Selection && state.d3Zoom) { + (_a = state.d3Zoom) == null ? void 0 : _a.interpolate((transitionOptions == null ? void 0 : transitionOptions.interpolate) === "linear" ? interpolate$1 : interpolateZoom).transform( + getD3Transition(state.d3Selection, transitionOptions == null ? void 0 : transitionOptions.duration, transitionOptions == null ? void 0 : transitionOptions.ease, () => { + resolve(true); + }), + nextTransform + ); + } else { + resolve(false); + } + }); + } + return computed(() => { + const isInitialized = state.d3Zoom && state.d3Selection && state.dimensions.width && state.dimensions.height; + if (!isInitialized) { + return initialViewportHelper; + } + return { + viewportInitialized: true, + // todo: allow passing scale as option + zoomIn: (options) => { + return zoom2(1.2, options); + }, + zoomOut: (options) => { + return zoom2(1 / 1.2, options); + }, + zoomTo: (zoomLevel, options) => { + return new Promise((resolve) => { + if (state.d3Selection && state.d3Zoom) { + state.d3Zoom.interpolate((options == null ? void 0 : options.interpolate) === "linear" ? interpolate$1 : interpolateZoom).scaleTo( + getD3Transition(state.d3Selection, options == null ? void 0 : options.duration, options == null ? void 0 : options.ease, () => { + resolve(true); + }), + zoomLevel + ); + } else { + resolve(false); + } + }); + }, + setViewport: (transform, options) => { + return transformViewport(transform.x, transform.y, transform.zoom, options); + }, + setTransform: (transform, options) => { + return transformViewport(transform.x, transform.y, transform.zoom, options); + }, + getViewport: () => ({ + x: state.viewport.x, + y: state.viewport.y, + zoom: state.viewport.zoom + }), + getTransform: () => { + return { + x: state.viewport.x, + y: state.viewport.y, + zoom: state.viewport.zoom + }; + }, + fitView: (options = { + padding: DEFAULT_PADDING, + includeHiddenNodes: false, + duration: 0 + }) => { + var _a, _b; + const nodesToFit = []; + for (const node of state.nodes) { + const isVisible = node.dimensions.width && node.dimensions.height && ((options == null ? void 0 : options.includeHiddenNodes) || !node.hidden); + if (isVisible) { + if (!((_a = options.nodes) == null ? void 0 : _a.length) || ((_b = options.nodes) == null ? void 0 : _b.length) && options.nodes.includes(node.id)) { + nodesToFit.push(node); + } + } + } + if (!nodesToFit.length) { + return Promise.resolve(false); + } + const bounds = getRectOfNodes(nodesToFit); + const { x, y, zoom: zoom22 } = getTransformForBounds( + bounds, + state.dimensions.width, + state.dimensions.height, + options.minZoom ?? state.minZoom, + options.maxZoom ?? state.maxZoom, + options.padding ?? DEFAULT_PADDING, + options.offset + ); + return transformViewport(x, y, zoom22, options); + }, + setCenter: (x, y, options) => { + const nextZoom = typeof (options == null ? void 0 : options.zoom) !== "undefined" ? options.zoom : state.maxZoom; + const centerX = state.dimensions.width / 2 - x * nextZoom; + const centerY = state.dimensions.height / 2 - y * nextZoom; + return transformViewport(centerX, centerY, nextZoom, options); + }, + fitBounds: (bounds, options = { padding: DEFAULT_PADDING }) => { + const { x, y, zoom: zoom22 } = getTransformForBounds( + bounds, + state.dimensions.width, + state.dimensions.height, + state.minZoom, + state.maxZoom, + options.padding + ); + return transformViewport(x, y, zoom22, options); + }, + project: (position) => pointToRendererPoint(position, state.viewport, state.snapToGrid, state.snapGrid), + screenToFlowCoordinate: (position) => { + if (state.vueFlowRef) { + const { x: domX, y: domY } = state.vueFlowRef.getBoundingClientRect(); + const correctedPosition = { + x: position.x - domX, + y: position.y - domY + }; + return pointToRendererPoint(correctedPosition, state.viewport, state.snapToGrid, state.snapGrid); + } + return { x: 0, y: 0 }; + }, + flowToScreenCoordinate: (position) => { + if (state.vueFlowRef) { + const { x: domX, y: domY } = state.vueFlowRef.getBoundingClientRect(); + const correctedPosition = { + x: position.x + domX, + y: position.y + domY + }; + return rendererPointToPoint(correctedPosition, state.viewport); + } + return { x: 0, y: 0 }; + } + }; + }); +} +function getD3Transition(selection2, duration = 0, ease = defaultEase, onEnd = () => { +}) { + const hasDuration = typeof duration === "number" && duration > 0; + if (!hasDuration) { + onEnd(); + } + return hasDuration ? selection2.transition().duration(duration).ease(ease).on("end", onEnd) : selection2; +} +function useWatchProps(models, props, store) { + const scope = effectScope(true); + scope.run(() => { + const watchModelValue = () => { + scope.run(() => { + let pauseModel; + let pauseStore; + let immediateStore = !!(store.nodes.value.length || store.edges.value.length); + pauseModel = watchPausable([models.modelValue, () => { + var _a, _b; + return (_b = (_a = models.modelValue) == null ? void 0 : _a.value) == null ? void 0 : _b.length; + }], ([elements]) => { + if (elements && Array.isArray(elements)) { + pauseStore == null ? void 0 : pauseStore.pause(); + store.setElements(elements); + if (!pauseStore && !immediateStore && elements.length) { + immediateStore = true; + } else { + pauseStore == null ? void 0 : pauseStore.resume(); + } + } + }); + pauseStore = watchPausable( + [store.nodes, store.edges, () => store.edges.value.length, () => store.nodes.value.length], + ([nodes, edges]) => { + var _a; + if (((_a = models.modelValue) == null ? void 0 : _a.value) && Array.isArray(models.modelValue.value)) { + pauseModel == null ? void 0 : pauseModel.pause(); + models.modelValue.value = [...nodes, ...edges]; + nextTick(() => { + pauseModel == null ? void 0 : pauseModel.resume(); + }); + } + }, + { immediate: immediateStore } + ); + onScopeDispose(() => { + pauseModel == null ? void 0 : pauseModel.stop(); + pauseStore == null ? void 0 : pauseStore.stop(); + }); + }); + }; + const watchNodesValue = () => { + scope.run(() => { + let pauseModel; + let pauseStore; + let immediateStore = !!store.nodes.value.length; + pauseModel = watchPausable([models.nodes, () => { + var _a, _b; + return (_b = (_a = models.nodes) == null ? void 0 : _a.value) == null ? void 0 : _b.length; + }], ([nodes]) => { + if (nodes && Array.isArray(nodes)) { + pauseStore == null ? void 0 : pauseStore.pause(); + store.setNodes(nodes); + if (!pauseStore && !immediateStore && nodes.length) { + immediateStore = true; + } else { + pauseStore == null ? void 0 : pauseStore.resume(); + } + } + }); + pauseStore = watchPausable( + [store.nodes, () => store.nodes.value.length], + ([nodes]) => { + var _a; + if (((_a = models.nodes) == null ? void 0 : _a.value) && Array.isArray(models.nodes.value)) { + pauseModel == null ? void 0 : pauseModel.pause(); + models.nodes.value = [...nodes]; + nextTick(() => { + pauseModel == null ? void 0 : pauseModel.resume(); + }); + } + }, + { immediate: immediateStore } + ); + onScopeDispose(() => { + pauseModel == null ? void 0 : pauseModel.stop(); + pauseStore == null ? void 0 : pauseStore.stop(); + }); + }); + }; + const watchEdgesValue = () => { + scope.run(() => { + let pauseModel; + let pauseStore; + let immediateStore = !!store.edges.value.length; + pauseModel = watchPausable([models.edges, () => { + var _a, _b; + return (_b = (_a = models.edges) == null ? void 0 : _a.value) == null ? void 0 : _b.length; + }], ([edges]) => { + if (edges && Array.isArray(edges)) { + pauseStore == null ? void 0 : pauseStore.pause(); + store.setEdges(edges); + if (!pauseStore && !immediateStore && edges.length) { + immediateStore = true; + } else { + pauseStore == null ? void 0 : pauseStore.resume(); + } + } + }); + pauseStore = watchPausable( + [store.edges, () => store.edges.value.length], + ([edges]) => { + var _a; + if (((_a = models.edges) == null ? void 0 : _a.value) && Array.isArray(models.edges.value)) { + pauseModel == null ? void 0 : pauseModel.pause(); + models.edges.value = [...edges]; + nextTick(() => { + pauseModel == null ? void 0 : pauseModel.resume(); + }); + } + }, + { immediate: immediateStore } + ); + onScopeDispose(() => { + pauseModel == null ? void 0 : pauseModel.stop(); + pauseStore == null ? void 0 : pauseStore.stop(); + }); + }); + }; + const watchMaxZoom = () => { + scope.run(() => { + watch( + () => props.maxZoom, + () => { + if (props.maxZoom && isDef(props.maxZoom)) { + store.setMaxZoom(props.maxZoom); + } + }, + { + immediate: true + } + ); + }); + }; + const watchMinZoom = () => { + scope.run(() => { + watch( + () => props.minZoom, + () => { + if (props.minZoom && isDef(props.minZoom)) { + store.setMinZoom(props.minZoom); + } + }, + { immediate: true } + ); + }); + }; + const watchTranslateExtent = () => { + scope.run(() => { + watch( + () => props.translateExtent, + () => { + if (props.translateExtent && isDef(props.translateExtent)) { + store.setTranslateExtent(props.translateExtent); + } + }, + { + immediate: true + } + ); + }); + }; + const watchNodeExtent = () => { + scope.run(() => { + watch( + () => props.nodeExtent, + () => { + if (props.nodeExtent && isDef(props.nodeExtent)) { + store.setNodeExtent(props.nodeExtent); + } + }, + { + immediate: true + } + ); + }); + }; + const watchApplyDefault = () => { + scope.run(() => { + watch( + () => props.applyDefault, + () => { + if (isDef(props.applyDefault)) { + store.applyDefault.value = props.applyDefault; + } + }, + { + immediate: true + } + ); + }); + }; + const watchAutoConnect = () => { + scope.run(() => { + const autoConnector = async (params) => { + let connection = params; + if (typeof props.autoConnect === "function") { + connection = await props.autoConnect(params); + } + if (connection !== false) { + store.addEdges([connection]); + } + }; + watch( + () => props.autoConnect, + () => { + if (isDef(props.autoConnect)) { + store.autoConnect.value = props.autoConnect; + } + }, + { immediate: true } + ); + watch( + store.autoConnect, + (autoConnectEnabled, _, onCleanup) => { + if (autoConnectEnabled) { + store.onConnect(autoConnector); + } else { + store.hooks.value.connect.off(autoConnector); + } + onCleanup(() => { + store.hooks.value.connect.off(autoConnector); + }); + }, + { immediate: true } + ); + }); + }; + const watchRest = () => { + const skip = [ + "id", + "modelValue", + "translateExtent", + "nodeExtent", + "edges", + "nodes", + "maxZoom", + "minZoom", + "applyDefault", + "autoConnect" + ]; + for (const key of Object.keys(props)) { + const propKey = key; + if (!skip.includes(propKey)) { + const propValue = toRef(() => props[propKey]); + const storeRef = store[propKey]; + if (isRef(storeRef)) { + scope.run(() => { + watch( + propValue, + (nextValue) => { + if (isDef(nextValue)) { + storeRef.value = nextValue; + } + }, + { immediate: true } + ); + }); + } + } + } + }; + const runAll = () => { + watchModelValue(); + watchNodesValue(); + watchEdgesValue(); + watchMinZoom(); + watchMaxZoom(); + watchTranslateExtent(); + watchNodeExtent(); + watchApplyDefault(); + watchAutoConnect(); + watchRest(); + }; + runAll(); + }); + return () => scope.stop(); +} +function useZoomPanHelper(vueFlowId) { + const state = useVueFlow({ id: vueFlowId }); + const viewportHelper = useViewportHelper(toReactive(state)); + return { + fitView: (params) => viewportHelper.value.fitView(params), + zoomIn: (transitionOpts) => viewportHelper.value.zoomIn(transitionOpts), + zoomOut: (transitionOpts) => viewportHelper.value.zoomOut(transitionOpts), + zoomTo: (zoomLevel, transitionOpts) => viewportHelper.value.zoomTo(zoomLevel, transitionOpts), + setViewport: (params, transitionOpts) => viewportHelper.value.setViewport(params, transitionOpts), + setTransform: (params, transitionOpts) => viewportHelper.value.setTransform(params, transitionOpts), + getViewport: () => viewportHelper.value.getViewport(), + getTransform: () => viewportHelper.value.getTransform(), + setCenter: (x, y, opts) => viewportHelper.value.setCenter(x, y, opts), + fitBounds: (params, opts) => viewportHelper.value.fitBounds(params, opts), + project: (params) => viewportHelper.value.project(params) + }; +} +function createHooks() { + return { + edgesChange: createExtendedEventHook(), + nodesChange: createExtendedEventHook(), + nodeDoubleClick: createExtendedEventHook(), + nodeClick: createExtendedEventHook(), + nodeMouseEnter: createExtendedEventHook(), + nodeMouseMove: createExtendedEventHook(), + nodeMouseLeave: createExtendedEventHook(), + nodeContextMenu: createExtendedEventHook(), + nodeDragStart: createExtendedEventHook(), + nodeDrag: createExtendedEventHook(), + nodeDragStop: createExtendedEventHook(), + nodesInitialized: createExtendedEventHook(), + miniMapNodeClick: createExtendedEventHook(), + miniMapNodeDoubleClick: createExtendedEventHook(), + miniMapNodeMouseEnter: createExtendedEventHook(), + miniMapNodeMouseMove: createExtendedEventHook(), + miniMapNodeMouseLeave: createExtendedEventHook(), + connect: createExtendedEventHook(), + connectStart: createExtendedEventHook(), + connectEnd: createExtendedEventHook(), + clickConnectStart: createExtendedEventHook(), + clickConnectEnd: createExtendedEventHook(), + paneReady: createExtendedEventHook(), + init: createExtendedEventHook(), + move: createExtendedEventHook(), + moveStart: createExtendedEventHook(), + moveEnd: createExtendedEventHook(), + selectionDragStart: createExtendedEventHook(), + selectionDrag: createExtendedEventHook(), + selectionDragStop: createExtendedEventHook(), + selectionContextMenu: createExtendedEventHook(), + selectionStart: createExtendedEventHook(), + selectionEnd: createExtendedEventHook(), + viewportChangeStart: createExtendedEventHook(), + viewportChange: createExtendedEventHook(), + viewportChangeEnd: createExtendedEventHook(), + paneScroll: createExtendedEventHook(), + paneClick: createExtendedEventHook(), + paneContextMenu: createExtendedEventHook(), + paneMouseEnter: createExtendedEventHook(), + paneMouseMove: createExtendedEventHook(), + paneMouseLeave: createExtendedEventHook(), + edgeContextMenu: createExtendedEventHook(), + edgeMouseEnter: createExtendedEventHook(), + edgeMouseMove: createExtendedEventHook(), + edgeMouseLeave: createExtendedEventHook(), + edgeDoubleClick: createExtendedEventHook(), + edgeClick: createExtendedEventHook(), + edgeUpdateStart: createExtendedEventHook(), + edgeUpdate: createExtendedEventHook(), + edgeUpdateEnd: createExtendedEventHook(), + updateNodeInternals: createExtendedEventHook(), + error: createExtendedEventHook((err) => warn(err.message)) + }; +} +function useHooks(emit, hooks) { + onBeforeMount(() => { + for (const [key, value] of Object.entries(hooks.value)) { + const listener = (data) => { + emit(key, data); + }; + value.fns.add(listener); + tryOnScopeDispose(() => { + value.off(listener); + }); + } + }); +} +function useState() { + return { + vueFlowRef: null, + viewportRef: null, + nodes: [], + edges: [], + connectionLookup: /* @__PURE__ */ new Map(), + nodeTypes: {}, + edgeTypes: {}, + initialized: false, + dimensions: { + width: 0, + height: 0 + }, + viewport: { x: 0, y: 0, zoom: 1 }, + d3Zoom: null, + d3Selection: null, + d3ZoomHandler: null, + minZoom: 0.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: SelectionMode.Full, + paneDragging: false, + preventScrolling: true, + zoomOnScroll: true, + zoomOnPinch: true, + zoomOnDoubleClick: true, + panOnScroll: false, + panOnScrollSpeed: 0.5, + panOnScrollMode: PanOnScrollMode.Free, + paneClickDistance: 0, + panOnDrag: true, + edgeUpdaterRadius: 10, + onlyRenderVisibleElements: false, + defaultViewport: { x: 0, y: 0, zoom: 1 }, + nodesSelectionActive: false, + userSelectionActive: false, + userSelectionRect: null, + defaultMarkerColor: "#b1b1b7", + connectionLineStyle: {}, + connectionLineType: null, + connectionLineOptions: { + type: ConnectionLineType.Bezier, + style: {} + }, + connectionMode: ConnectionMode.Loose, + connectionStartHandle: null, + connectionEndHandle: null, + connectionClickStartHandle: null, + connectionPosition: { x: Number.NaN, y: Number.NaN }, + connectionRadius: 20, + connectOnClick: true, + connectionStatus: null, + isValidConnection: null, + snapGrid: [15, 15], + snapToGrid: false, + edgesUpdatable: false, + edgesFocusable: true, + nodesFocusable: true, + nodesConnectable: true, + nodesDraggable: true, + nodeDragThreshold: 1, + elementsSelectable: true, + selectNodesOnDrag: true, + multiSelectionActive: false, + selectionKeyCode: "Shift", + multiSelectionKeyCode: isMacOs() ? "Meta" : "Control", + zoomActivationKeyCode: isMacOs() ? "Meta" : "Control", + deleteKeyCode: "Backspace", + panActivationKeyCode: "Space", + hooks: createHooks(), + applyDefault: true, + autoConnect: false, + fitViewOnInit: false, + fitViewOnInitDone: false, + noDragClassName: "nodrag", + noWheelClassName: "nowheel", + noPanClassName: "nopan", + defaultEdgeOptions: void 0, + elevateEdgesOnSelect: false, + elevateNodesOnSelect: true, + autoPanOnNodeDrag: true, + autoPanOnConnect: true, + autoPanSpeed: 15, + disableKeyboardA11y: false, + ariaLiveMessage: "" + }; +} +var storeOptionsToSkip = [ + "id", + "vueFlowRef", + "viewportRef", + "initialized", + "modelValue", + "nodes", + "edges", + "maxZoom", + "minZoom", + "translateExtent", + "hooks", + "defaultEdgeOptions" +]; +function useActions(state, nodeLookup, edgeLookup) { + const viewportHelper = useViewportHelper(state); + const updateNodeInternals = (ids) => { + const updateIds = ids ?? []; + state.hooks.updateNodeInternals.trigger(updateIds); + }; + const getIncomers$1 = (nodeOrId) => { + return getIncomers(nodeOrId, state.nodes, state.edges); + }; + const getOutgoers$1 = (nodeOrId) => { + return getOutgoers(nodeOrId, state.nodes, state.edges); + }; + const getConnectedEdges$1 = (nodesOrId) => { + return getConnectedEdges(nodesOrId, state.edges); + }; + const getHandleConnections = ({ id: id2, type, nodeId }) => { + var _a; + const handleSuffix = id2 ? `-${type}-${id2}` : `-${type}`; + return Array.from(((_a = state.connectionLookup.get(`${nodeId}${handleSuffix}`)) == null ? void 0 : _a.values()) ?? []); + }; + const findNode = (id2) => { + if (!id2) { + return; + } + return nodeLookup.value.get(id2); + }; + const findEdge = (id2) => { + if (!id2) { + return; + } + return edgeLookup.value.get(id2); + }; + const updateNodePositions = (dragItems, changed, dragging) => { + var _a, _b; + const changes = []; + for (const node of dragItems) { + const change = { + id: node.id, + type: "position", + dragging, + from: node.from + }; + if (changed) { + change.position = node.position; + if (node.parentNode) { + const parentNode = findNode(node.parentNode); + change.position = { + x: change.position.x - (((_a = parentNode == null ? void 0 : parentNode.computedPosition) == null ? void 0 : _a.x) ?? 0), + y: change.position.y - (((_b = parentNode == null ? void 0 : parentNode.computedPosition) == null ? void 0 : _b.y) ?? 0) + }; + } + } + changes.push(change); + } + if (changes == null ? void 0 : changes.length) { + state.hooks.nodesChange.trigger(changes); + } + }; + const updateNodeDimensions = (updates) => { + if (!state.vueFlowRef) { + return; + } + const viewportNode = state.vueFlowRef.querySelector(".vue-flow__transformationpane"); + if (!viewportNode) { + return; + } + const style = window.getComputedStyle(viewportNode); + const { m22: zoom2 } = new window.DOMMatrixReadOnly(style.transform); + const changes = []; + for (const element of updates) { + const update = element; + const node = findNode(update.id); + if (node) { + const dimensions = getDimensions(update.nodeElement); + const doUpdate = !!(dimensions.width && dimensions.height && (node.dimensions.width !== dimensions.width || node.dimensions.height !== dimensions.height || update.forceUpdate)); + if (doUpdate) { + const nodeBounds = update.nodeElement.getBoundingClientRect(); + node.dimensions = dimensions; + node.handleBounds.source = getHandleBounds("source", update.nodeElement, nodeBounds, zoom2, node.id); + node.handleBounds.target = getHandleBounds("target", update.nodeElement, nodeBounds, zoom2, node.id); + changes.push({ + id: node.id, + type: "dimensions", + dimensions + }); + } + } + } + if (!state.fitViewOnInitDone && state.fitViewOnInit) { + viewportHelper.value.fitView().then(() => { + state.fitViewOnInitDone = true; + }); + } + if (changes.length) { + state.hooks.nodesChange.trigger(changes); + } + }; + const elementSelectionHandler = (elements, selected) => { + const nodeIds = /* @__PURE__ */ new Set(); + const edgeIds = /* @__PURE__ */ new Set(); + for (const element of elements) { + if (isNode(element)) { + nodeIds.add(element.id); + } else if (isEdge(element)) { + edgeIds.add(element.id); + } + } + const changedNodes = getSelectionChanges(nodeLookup.value, nodeIds, true); + const changedEdges = getSelectionChanges(edgeLookup.value, edgeIds); + if (state.multiSelectionActive) { + for (const nodeId of nodeIds) { + changedNodes.push(createSelectionChange(nodeId, selected)); + } + for (const edgeId of edgeIds) { + changedEdges.push(createSelectionChange(edgeId, selected)); + } + } + if (changedNodes.length) { + state.hooks.nodesChange.trigger(changedNodes); + } + if (changedEdges.length) { + state.hooks.edgesChange.trigger(changedEdges); + } + }; + const addSelectedNodes = (nodes) => { + if (state.multiSelectionActive) { + const nodeChanges = nodes.map((node) => createSelectionChange(node.id, true)); + state.hooks.nodesChange.trigger(nodeChanges); + return; + } + state.hooks.nodesChange.trigger(getSelectionChanges(nodeLookup.value, new Set(nodes.map((n) => n.id)), true)); + state.hooks.edgesChange.trigger(getSelectionChanges(edgeLookup.value)); + }; + const addSelectedEdges = (edges) => { + if (state.multiSelectionActive) { + const changedEdges = edges.map((edge) => createSelectionChange(edge.id, true)); + state.hooks.edgesChange.trigger(changedEdges); + return; + } + state.hooks.edgesChange.trigger(getSelectionChanges(edgeLookup.value, new Set(edges.map((e) => e.id)))); + state.hooks.nodesChange.trigger(getSelectionChanges(nodeLookup.value, /* @__PURE__ */ new Set(), true)); + }; + const addSelectedElements = (elements) => { + elementSelectionHandler(elements, true); + }; + const removeSelectedNodes = (nodes) => { + const nodesToUnselect = nodes || state.nodes; + const nodeChanges = nodesToUnselect.map((n) => { + n.selected = false; + return createSelectionChange(n.id, false); + }); + state.hooks.nodesChange.trigger(nodeChanges); + }; + const removeSelectedEdges = (edges) => { + const edgesToUnselect = edges || state.edges; + const edgeChanges = edgesToUnselect.map((e) => { + e.selected = false; + return createSelectionChange(e.id, false); + }); + state.hooks.edgesChange.trigger(edgeChanges); + }; + const removeSelectedElements = (elements) => { + if (!elements || !elements.length) { + return elementSelectionHandler([], false); + } + const changes = elements.reduce( + (changes2, curr) => { + const selectionChange = createSelectionChange(curr.id, false); + if (isNode(curr)) { + changes2.nodes.push(selectionChange); + } else { + changes2.edges.push(selectionChange); + } + return changes2; + }, + { nodes: [], edges: [] } + ); + if (changes.nodes.length) { + state.hooks.nodesChange.trigger(changes.nodes); + } + if (changes.edges.length) { + state.hooks.edgesChange.trigger(changes.edges); + } + }; + const setMinZoom = (minZoom) => { + var _a; + (_a = state.d3Zoom) == null ? void 0 : _a.scaleExtent([minZoom, state.maxZoom]); + state.minZoom = minZoom; + }; + const setMaxZoom = (maxZoom) => { + var _a; + (_a = state.d3Zoom) == null ? void 0 : _a.scaleExtent([state.minZoom, maxZoom]); + state.maxZoom = maxZoom; + }; + const setTranslateExtent = (translateExtent) => { + var _a; + (_a = state.d3Zoom) == null ? void 0 : _a.translateExtent(translateExtent); + state.translateExtent = translateExtent; + }; + const setNodeExtent = (nodeExtent) => { + state.nodeExtent = nodeExtent; + updateNodeInternals(); + }; + const setPaneClickDistance = (clickDistance) => { + var _a; + (_a = state.d3Zoom) == null ? void 0 : _a.clickDistance(clickDistance); + }; + const setInteractive = (isInteractive) => { + state.nodesDraggable = isInteractive; + state.nodesConnectable = isInteractive; + state.elementsSelectable = isInteractive; + }; + const setNodes = (nodes) => { + const nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes; + if (!state.initialized && !nextNodes.length) { + return; + } + state.nodes = createGraphNodes(nextNodes, findNode, state.hooks.error.trigger); + }; + const setEdges = (edges) => { + const nextEdges = edges instanceof Function ? edges(state.edges) : edges; + if (!state.initialized && !nextEdges.length) { + return; + } + const validEdges = createGraphEdges( + nextEdges, + state.isValidConnection, + findNode, + findEdge, + state.hooks.error.trigger, + state.defaultEdgeOptions, + state.nodes, + state.edges + ); + updateConnectionLookup(state.connectionLookup, edgeLookup.value, validEdges); + state.edges = validEdges; + }; + const setElements = (elements) => { + const nextElements = elements instanceof Function ? elements([...state.nodes, ...state.edges]) : elements; + if (!state.initialized && !nextElements.length) { + return; + } + setNodes(nextElements.filter(isNode)); + setEdges(nextElements.filter(isEdge)); + }; + const addNodes = (nodes) => { + let nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes; + nextNodes = Array.isArray(nextNodes) ? nextNodes : [nextNodes]; + const graphNodes = createGraphNodes(nextNodes, findNode, state.hooks.error.trigger); + const changes = []; + for (const node of graphNodes) { + changes.push(createAdditionChange(node)); + } + if (changes.length) { + state.hooks.nodesChange.trigger(changes); + } + }; + const addEdges = (params) => { + let nextEdges = params instanceof Function ? params(state.edges) : params; + nextEdges = Array.isArray(nextEdges) ? nextEdges : [nextEdges]; + const validEdges = createGraphEdges( + nextEdges, + state.isValidConnection, + findNode, + findEdge, + state.hooks.error.trigger, + state.defaultEdgeOptions, + state.nodes, + state.edges + ); + const changes = []; + for (const edge of validEdges) { + changes.push(createAdditionChange(edge)); + } + if (changes.length) { + state.hooks.edgesChange.trigger(changes); + } + }; + const removeNodes = (nodes, removeConnectedEdges = true, removeChildren = false) => { + const nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes; + const nodesToRemove = Array.isArray(nextNodes) ? nextNodes : [nextNodes]; + const nodeChanges = []; + const edgeChanges = []; + function createEdgeRemovalChanges(nodes2) { + const connectedEdges = getConnectedEdges$1(nodes2); + for (const edge of connectedEdges) { + if (isDef(edge.deletable) ? edge.deletable : true) { + edgeChanges.push(createEdgeRemoveChange(edge.id, edge.source, edge.target, edge.sourceHandle, edge.targetHandle)); + } + } + } + function createChildrenRemovalChanges(id2) { + const children2 = []; + for (const node of state.nodes) { + if (node.parentNode === id2) { + children2.push(node); + } + } + if (children2.length) { + for (const child of children2) { + nodeChanges.push(createNodeRemoveChange(child.id)); + } + if (removeConnectedEdges) { + createEdgeRemovalChanges(children2); + } + for (const child of children2) { + createChildrenRemovalChanges(child.id); + } + } + } + for (const item of nodesToRemove) { + const currNode = typeof item === "string" ? findNode(item) : item; + if (!currNode) { + continue; + } + if (isDef(currNode.deletable) && !currNode.deletable) { + continue; + } + nodeChanges.push(createNodeRemoveChange(currNode.id)); + if (removeConnectedEdges) { + createEdgeRemovalChanges([currNode]); + } + if (removeChildren) { + createChildrenRemovalChanges(currNode.id); + } + } + if (edgeChanges.length) { + state.hooks.edgesChange.trigger(edgeChanges); + } + if (nodeChanges.length) { + state.hooks.nodesChange.trigger(nodeChanges); + } + }; + const removeEdges = (edges) => { + const nextEdges = edges instanceof Function ? edges(state.edges) : edges; + const edgesToRemove = Array.isArray(nextEdges) ? nextEdges : [nextEdges]; + const changes = []; + for (const item of edgesToRemove) { + const currEdge = typeof item === "string" ? findEdge(item) : item; + if (!currEdge) { + continue; + } + if (isDef(currEdge.deletable) && !currEdge.deletable) { + continue; + } + changes.push( + createEdgeRemoveChange( + typeof item === "string" ? item : item.id, + currEdge.source, + currEdge.target, + currEdge.sourceHandle, + currEdge.targetHandle + ) + ); + } + state.hooks.edgesChange.trigger(changes); + }; + const updateEdge2 = (oldEdge, newConnection, shouldReplaceId = true) => { + const prevEdge = findEdge(oldEdge.id); + if (!prevEdge) { + return false; + } + const prevEdgeIndex = state.edges.indexOf(prevEdge); + const newEdge = updateEdgeAction(oldEdge, newConnection, prevEdge, shouldReplaceId, state.hooks.error.trigger); + if (newEdge) { + const [validEdge] = createGraphEdges( + [newEdge], + state.isValidConnection, + findNode, + findEdge, + state.hooks.error.trigger, + state.defaultEdgeOptions, + state.nodes, + state.edges + ); + state.edges = state.edges.map((edge, index) => index === prevEdgeIndex ? validEdge : edge); + updateConnectionLookup(state.connectionLookup, edgeLookup.value, [validEdge]); + return validEdge; + } + return false; + }; + const updateEdgeData = (id2, dataUpdate, options = { replace: false }) => { + const edge = findEdge(id2); + if (!edge) { + return; + } + const nextData = typeof dataUpdate === "function" ? dataUpdate(edge) : dataUpdate; + edge.data = options.replace ? nextData : { ...edge.data, ...nextData }; + }; + const applyNodeChanges2 = (changes) => { + return applyChanges(changes, state.nodes); + }; + const applyEdgeChanges2 = (changes) => { + const changedEdges = applyChanges(changes, state.edges); + updateConnectionLookup(state.connectionLookup, edgeLookup.value, changedEdges); + return changedEdges; + }; + const updateNode = (id2, nodeUpdate, options = { replace: false }) => { + const node = findNode(id2); + if (!node) { + return; + } + const nextNode = typeof nodeUpdate === "function" ? nodeUpdate(node) : nodeUpdate; + if (options.replace) { + state.nodes.splice(state.nodes.indexOf(node), 1, nextNode); + } else { + Object.assign(node, nextNode); + } + }; + const updateNodeData = (id2, dataUpdate, options = { replace: false }) => { + const node = findNode(id2); + if (!node) { + return; + } + const nextData = typeof dataUpdate === "function" ? dataUpdate(node) : dataUpdate; + node.data = options.replace ? nextData : { ...node.data, ...nextData }; + }; + const startConnection = (startHandle, position, isClick = false) => { + if (isClick) { + state.connectionClickStartHandle = startHandle; + } else { + state.connectionStartHandle = startHandle; + } + state.connectionEndHandle = null; + state.connectionStatus = null; + if (position) { + state.connectionPosition = position; + } + }; + const updateConnection = (position, result = null, status = null) => { + if (state.connectionStartHandle) { + state.connectionPosition = position; + state.connectionEndHandle = result; + state.connectionStatus = status; + } + }; + const endConnection = (event, isClick) => { + state.connectionPosition = { x: Number.NaN, y: Number.NaN }; + state.connectionEndHandle = null; + state.connectionStatus = null; + if (isClick) { + state.connectionClickStartHandle = null; + } else { + state.connectionStartHandle = null; + } + }; + const getNodeRect = (nodeOrRect) => { + const isRectObj = isRect(nodeOrRect); + const node = isRectObj ? null : isGraphNode(nodeOrRect) ? nodeOrRect : findNode(nodeOrRect.id); + if (!isRectObj && !node) { + return [null, null, isRectObj]; + } + const nodeRect = isRectObj ? nodeOrRect : nodeToRect(node); + return [nodeRect, node, isRectObj]; + }; + const getIntersectingNodes = (nodeOrRect, partially = true, nodes = state.nodes) => { + const [nodeRect, node, isRect2] = getNodeRect(nodeOrRect); + if (!nodeRect) { + return []; + } + const intersections = []; + for (const n of nodes || state.nodes) { + if (!isRect2 && (n.id === node.id || !n.computedPosition)) { + continue; + } + const currNodeRect = nodeToRect(n); + const overlappingArea = getOverlappingArea(currNodeRect, nodeRect); + const partiallyVisible = partially && overlappingArea > 0; + if (partiallyVisible || overlappingArea >= currNodeRect.width * currNodeRect.height || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)) { + intersections.push(n); + } + } + return intersections; + }; + const isNodeIntersecting = (nodeOrRect, area, partially = true) => { + const [nodeRect] = getNodeRect(nodeOrRect); + if (!nodeRect) { + return false; + } + const overlappingArea = getOverlappingArea(nodeRect, area); + const partiallyVisible = partially && overlappingArea > 0; + return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height); + }; + const panBy = (delta) => { + const { viewport, dimensions, d3Zoom, d3Selection, translateExtent } = state; + if (!d3Zoom || !d3Selection || !delta.x && !delta.y) { + return false; + } + const nextTransform = identity.translate(viewport.x + delta.x, viewport.y + delta.y).scale(viewport.zoom); + const extent = [ + [0, 0], + [dimensions.width, dimensions.height] + ]; + const constrainedTransform = d3Zoom.constrain()(nextTransform, extent, translateExtent); + const transformChanged = state.viewport.x !== constrainedTransform.x || state.viewport.y !== constrainedTransform.y || state.viewport.zoom !== constrainedTransform.k; + d3Zoom.transform(d3Selection, constrainedTransform); + return transformChanged; + }; + const setState = (options) => { + const opts = options instanceof Function ? options(state) : options; + const exclude = [ + "d3Zoom", + "d3Selection", + "d3ZoomHandler", + "viewportRef", + "vueFlowRef", + "dimensions", + "hooks" + ]; + if (isDef(opts.defaultEdgeOptions)) { + state.defaultEdgeOptions = opts.defaultEdgeOptions; + } + const elements = opts.modelValue || opts.nodes || opts.edges ? [] : void 0; + if (elements) { + if (opts.modelValue) { + elements.push(...opts.modelValue); + } + if (opts.nodes) { + elements.push(...opts.nodes); + } + if (opts.edges) { + elements.push(...opts.edges); + } + setElements(elements); + } + const setSkippedOptions = () => { + if (isDef(opts.maxZoom)) { + setMaxZoom(opts.maxZoom); + } + if (isDef(opts.minZoom)) { + setMinZoom(opts.minZoom); + } + if (isDef(opts.translateExtent)) { + setTranslateExtent(opts.translateExtent); + } + }; + for (const o of Object.keys(opts)) { + const key = o; + const option = opts[key]; + if (![...storeOptionsToSkip, ...exclude].includes(key) && isDef(option)) { + state[key] = option; + } + } + until(() => state.d3Zoom).not.toBeNull().then(setSkippedOptions); + if (!state.initialized) { + state.initialized = true; + } + }; + const toObject = () => { + const nodes = []; + const edges = []; + for (const node of state.nodes) { + const { + computedPosition: _, + handleBounds: __, + selected: ___, + dimensions: ____, + isParent: _____, + resizing: ______, + dragging: _______, + events: _________, + ...rest + } = node; + nodes.push(rest); + } + for (const edge of state.edges) { + const { selected: _, sourceNode: __, targetNode: ___, events: ____, ...rest } = edge; + edges.push(rest); + } + return JSON.parse( + JSON.stringify({ + nodes, + edges, + position: [state.viewport.x, state.viewport.y], + zoom: state.viewport.zoom, + viewport: state.viewport + }) + ); + }; + const fromObject = (obj) => { + return new Promise((resolve) => { + const { nodes, edges, position, zoom: zoom2, viewport } = obj; + if (nodes) { + setNodes(nodes); + } + if (edges) { + setEdges(edges); + } + if ((viewport == null ? void 0 : viewport.x) && (viewport == null ? void 0 : viewport.y) || position) { + const x = (viewport == null ? void 0 : viewport.x) || position[0]; + const y = (viewport == null ? void 0 : viewport.y) || position[1]; + const nextZoom = (viewport == null ? void 0 : viewport.zoom) || zoom2 || state.viewport.zoom; + return until(() => viewportHelper.value.viewportInitialized).toBe(true).then(() => { + viewportHelper.value.setViewport({ + x, + y, + zoom: nextZoom + }).then(() => { + resolve(true); + }); + }); + } else { + resolve(true); + } + }); + }; + const $reset = () => { + const resetState = useState(); + state.edges = []; + state.nodes = []; + if (state.d3Zoom && state.d3Selection) { + const updatedTransform = identity.translate(resetState.defaultViewport.x ?? 0, resetState.defaultViewport.y ?? 0).scale(clamp(resetState.defaultViewport.zoom ?? 1, resetState.minZoom, resetState.maxZoom)); + const bbox = state.viewportRef.getBoundingClientRect(); + const extent = [ + [0, 0], + [bbox.width, bbox.height] + ]; + const constrainedTransform = state.d3Zoom.constrain()(updatedTransform, extent, resetState.translateExtent); + state.d3Zoom.transform(state.d3Selection, constrainedTransform); + } + setState(resetState); + }; + return { + updateNodePositions, + updateNodeDimensions, + setElements, + setNodes, + setEdges, + addNodes, + addEdges, + removeNodes, + removeEdges, + findNode, + findEdge, + updateEdge: updateEdge2, + updateEdgeData, + updateNode, + updateNodeData, + applyEdgeChanges: applyEdgeChanges2, + applyNodeChanges: applyNodeChanges2, + addSelectedElements, + addSelectedNodes, + addSelectedEdges, + setMinZoom, + setMaxZoom, + setTranslateExtent, + setNodeExtent, + setPaneClickDistance, + removeSelectedElements, + removeSelectedNodes, + removeSelectedEdges, + startConnection, + updateConnection, + endConnection, + setInteractive, + setState, + getIntersectingNodes, + getIncomers: getIncomers$1, + getOutgoers: getOutgoers$1, + getConnectedEdges: getConnectedEdges$1, + getHandleConnections, + isNodeIntersecting, + panBy, + fitView: (params) => viewportHelper.value.fitView(params), + zoomIn: (transitionOpts) => viewportHelper.value.zoomIn(transitionOpts), + zoomOut: (transitionOpts) => viewportHelper.value.zoomOut(transitionOpts), + zoomTo: (zoomLevel, transitionOpts) => viewportHelper.value.zoomTo(zoomLevel, transitionOpts), + setViewport: (params, transitionOpts) => viewportHelper.value.setViewport(params, transitionOpts), + setTransform: (params, transitionOpts) => viewportHelper.value.setTransform(params, transitionOpts), + getViewport: () => viewportHelper.value.getViewport(), + getTransform: () => viewportHelper.value.getTransform(), + setCenter: (x, y, opts) => viewportHelper.value.setCenter(x, y, opts), + fitBounds: (params, opts) => viewportHelper.value.fitBounds(params, opts), + project: (params) => viewportHelper.value.project(params), + screenToFlowCoordinate: (params) => viewportHelper.value.screenToFlowCoordinate(params), + flowToScreenCoordinate: (params) => viewportHelper.value.flowToScreenCoordinate(params), + toObject, + fromObject, + updateNodeInternals, + viewportHelper, + $reset, + $destroy: () => { + } + }; +} +var _hoisted_1$9 = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"]; +var __default__$f = { + name: "Handle", + compatConfig: { MODE: 3 } +}; +var _sfc_main$f = defineComponent({ + ...__default__$f, + props: { + id: { default: null }, + type: {}, + position: { default: () => Position.Top }, + isValidConnection: { type: Function }, + connectable: { type: [Boolean, Number, String, Function], default: void 0 }, + connectableStart: { type: Boolean, default: true }, + connectableEnd: { type: Boolean, default: true } + }, + setup(__props, { expose: __expose }) { + const props = createPropsRestProxy(__props, ["position", "connectable", "connectableStart", "connectableEnd", "id"]); + const type = toRef(() => props.type ?? "source"); + const isValidConnection = toRef(() => props.isValidConnection ?? null); + const { + id: flowId, + connectionStartHandle, + connectionClickStartHandle, + connectionEndHandle, + vueFlowRef, + nodesConnectable, + noDragClassName, + noPanClassName + } = useVueFlow(); + const { id: nodeId, node, nodeEl, connectedEdges } = useNode(); + const handle = ref(); + const isConnectableStart = toRef(() => typeof __props.connectableStart !== "undefined" ? __props.connectableStart : true); + const isConnectableEnd = toRef(() => typeof __props.connectableEnd !== "undefined" ? __props.connectableEnd : true); + const isConnecting = toRef( + () => { + var _a, _b, _c, _d, _e, _f; + return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionStartHandle.value) == null ? void 0 : _c.type) === type.value || ((_d = connectionEndHandle.value) == null ? void 0 : _d.nodeId) === nodeId && ((_e = connectionEndHandle.value) == null ? void 0 : _e.id) === __props.id && ((_f = connectionEndHandle.value) == null ? void 0 : _f.type) === type.value; + } + ); + const isClickConnecting = toRef( + () => { + var _a, _b, _c; + return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionClickStartHandle.value) == null ? void 0 : _c.type) === type.value; + } + ); + const { handlePointerDown, handleClick } = useHandle({ + nodeId, + handleId: __props.id, + isValidConnection, + type + }); + const isConnectable = computed(() => { + if (typeof __props.connectable === "string" && __props.connectable === "single") { + return !connectedEdges.value.some((edge) => { + const id2 = edge[`${type.value}Handle`]; + if (edge[type.value] !== nodeId) { + return false; + } + return id2 ? id2 === __props.id : true; + }); + } + if (typeof __props.connectable === "number") { + return connectedEdges.value.filter((edge) => { + const id2 = edge[`${type.value}Handle`]; + if (edge[type.value] !== nodeId) { + return false; + } + return id2 ? id2 === __props.id : true; + }).length < __props.connectable; + } + if (typeof __props.connectable === "function") { + return __props.connectable(node, connectedEdges.value); + } + return isDef(__props.connectable) ? __props.connectable : nodesConnectable.value; + }); + onMounted(() => { + var _a; + if (!node.dimensions.width || !node.dimensions.height) { + return; + } + const existingBounds = (_a = node.handleBounds[type.value]) == null ? void 0 : _a.find((b) => b.id === __props.id); + if (!vueFlowRef.value || existingBounds) { + return; + } + const viewportNode = vueFlowRef.value.querySelector(".vue-flow__transformationpane"); + if (!nodeEl.value || !handle.value || !viewportNode || !__props.id) { + return; + } + const nodeBounds = nodeEl.value.getBoundingClientRect(); + const handleBounds = handle.value.getBoundingClientRect(); + const style = window.getComputedStyle(viewportNode); + const { m22: zoom2 } = new window.DOMMatrixReadOnly(style.transform); + const nextBounds = { + id: __props.id, + position: __props.position, + x: (handleBounds.left - nodeBounds.left) / zoom2, + y: (handleBounds.top - nodeBounds.top) / zoom2, + type: type.value, + nodeId, + ...getDimensions(handle.value) + }; + node.handleBounds[type.value] = [...node.handleBounds[type.value] ?? [], nextBounds]; + }); + function onPointerDown(event) { + const isMouseTriggered = isMouseEvent(event); + if (isConnectable.value && isConnectableStart.value && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) { + handlePointerDown(event); + } + } + function onClick(event) { + if (!nodeId || !connectionClickStartHandle.value && !isConnectableStart.value) { + return; + } + if (isConnectable.value) { + handleClick(event); + } + } + __expose({ + handleClick, + handlePointerDown, + onClick, + onPointerDown + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + ref_key: "handle", + ref: handle, + "data-id": `${unref(flowId)}-${unref(nodeId)}-${__props.id}-${type.value}`, + "data-handleid": __props.id, + "data-nodeid": unref(nodeId), + "data-handlepos": _ctx.position, + class: normalizeClass(["vue-flow__handle", [ + `vue-flow__handle-${_ctx.position}`, + `vue-flow__handle-${__props.id}`, + unref(noDragClassName), + unref(noPanClassName), + type.value, + { + connectable: isConnectable.value, + connecting: isClickConnecting.value, + connectablestart: isConnectableStart.value, + connectableend: isConnectableEnd.value, + connectionindicator: isConnectable.value && (isConnectableStart.value && !isConnecting.value || isConnectableEnd.value && isConnecting.value) + } + ]]), + onMousedown: onPointerDown, + onTouchstartPassive: onPointerDown, + onClick + }, [ + renderSlot(_ctx.$slots, "default", { id: _ctx.id }) + ], 42, _hoisted_1$9); + }; + } +}); +var DefaultNode = function({ + sourcePosition = Position.Bottom, + targetPosition = Position.Top, + label: _label, + connectable = true, + isValidTargetPos, + isValidSourcePos, + data +}) { + const label = data.label ?? _label; + return [ + h(_sfc_main$f, { type: "target", position: targetPosition, connectable, isValidConnection: isValidTargetPos }), + typeof label !== "string" && label ? h(label) : h(Fragment, [label]), + h(_sfc_main$f, { type: "source", position: sourcePosition, connectable, isValidConnection: isValidSourcePos }) + ]; +}; +DefaultNode.props = ["sourcePosition", "targetPosition", "label", "isValidTargetPos", "isValidSourcePos", "connectable", "data"]; +DefaultNode.inheritAttrs = false; +DefaultNode.compatConfig = { MODE: 3 }; +var DefaultNode$1 = DefaultNode; +var OutputNode = function({ + targetPosition = Position.Top, + label: _label, + connectable = true, + isValidTargetPos, + data +}) { + const label = data.label ?? _label; + return [ + h(_sfc_main$f, { type: "target", position: targetPosition, connectable, isValidConnection: isValidTargetPos }), + typeof label !== "string" && label ? h(label) : h(Fragment, [label]) + ]; +}; +OutputNode.props = ["targetPosition", "label", "isValidTargetPos", "connectable", "data"]; +OutputNode.inheritAttrs = false; +OutputNode.compatConfig = { MODE: 3 }; +var OutputNode$1 = OutputNode; +var InputNode = function({ + sourcePosition = Position.Bottom, + label: _label, + connectable = true, + isValidSourcePos, + data +}) { + const label = data.label ?? _label; + return [ + typeof label !== "string" && label ? h(label) : h(Fragment, [label]), + h(_sfc_main$f, { type: "source", position: sourcePosition, connectable, isValidConnection: isValidSourcePos }) + ]; +}; +InputNode.props = ["sourcePosition", "label", "isValidSourcePos", "connectable", "data"]; +InputNode.inheritAttrs = false; +InputNode.compatConfig = { MODE: 3 }; +var InputNode$1 = InputNode; +var _hoisted_1$8 = ["transform"]; +var _hoisted_2$2 = ["width", "height", "x", "y", "rx", "ry"]; +var _hoisted_3$1 = ["y"]; +var __default__$e = { + name: "EdgeText", + compatConfig: { MODE: 3 } +}; +var _sfc_main$e = defineComponent({ + ...__default__$e, + props: { + x: {}, + y: {}, + label: {}, + labelStyle: { default: () => ({}) }, + labelShowBg: { type: Boolean, default: true }, + labelBgStyle: { default: () => ({}) }, + labelBgPadding: { default: () => [2, 4] }, + labelBgBorderRadius: { default: 2 } + }, + setup(__props) { + const box = ref({ x: 0, y: 0, width: 0, height: 0 }); + const el = ref(null); + const transform = computed(() => `translate(${__props.x - box.value.width / 2} ${__props.y - box.value.height / 2})`); + onMounted(getBox); + watch([() => __props.x, () => __props.y, el, () => __props.label], getBox); + function getBox() { + if (!el.value) { + return; + } + const nextBox = el.value.getBBox(); + if (nextBox.width !== box.value.width || nextBox.height !== box.value.height) { + box.value = nextBox; + } + } + return (_ctx, _cache) => { + return openBlock(), createElementBlock("g", { + transform: transform.value, + class: "vue-flow__edge-textwrapper" + }, [ + _ctx.labelShowBg ? (openBlock(), createElementBlock("rect", { + key: 0, + class: "vue-flow__edge-textbg", + width: `${box.value.width + 2 * _ctx.labelBgPadding[0]}px`, + height: `${box.value.height + 2 * _ctx.labelBgPadding[1]}px`, + x: -_ctx.labelBgPadding[0], + y: -_ctx.labelBgPadding[1], + style: normalizeStyle(_ctx.labelBgStyle), + rx: _ctx.labelBgBorderRadius, + ry: _ctx.labelBgBorderRadius + }, null, 12, _hoisted_2$2)) : createCommentVNode("", true), + createBaseVNode("text", mergeProps(_ctx.$attrs, { + ref_key: "el", + ref: el, + class: "vue-flow__edge-text", + y: box.value.height / 2, + dy: "0.3em", + style: _ctx.labelStyle + }), [ + renderSlot(_ctx.$slots, "default", {}, () => [ + typeof _ctx.label !== "string" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.label), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ + createTextVNode(toDisplayString(_ctx.label), 1) + ], 64)) + ]) + ], 16, _hoisted_3$1) + ], 8, _hoisted_1$8); + }; + } +}); +var _hoisted_1$7 = ["id", "d", "marker-end", "marker-start"]; +var _hoisted_2$1 = ["d", "stroke-width"]; +var __default__$d = { + name: "BaseEdge", + inheritAttrs: false, + compatConfig: { MODE: 3 } +}; +var _sfc_main$d = defineComponent({ + ...__default__$d, + props: { + id: {}, + labelX: {}, + labelY: {}, + path: {}, + label: {}, + markerStart: {}, + markerEnd: {}, + interactionWidth: { default: 20 }, + labelStyle: {}, + labelShowBg: { type: Boolean }, + labelBgStyle: {}, + labelBgPadding: {}, + labelBgBorderRadius: {} + }, + setup(__props, { expose: __expose }) { + const pathEl = ref(null); + const interactionEl = ref(null); + const labelEl = ref(null); + const attrs = useAttrs(); + __expose({ + pathEl, + interactionEl, + labelEl + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + createBaseVNode("path", mergeProps(unref(attrs), { + id: _ctx.id, + ref_key: "pathEl", + ref: pathEl, + d: _ctx.path, + class: "vue-flow__edge-path", + "marker-end": _ctx.markerEnd, + "marker-start": _ctx.markerStart + }), null, 16, _hoisted_1$7), + _ctx.interactionWidth ? (openBlock(), createElementBlock("path", { + key: 0, + ref_key: "interactionEl", + ref: interactionEl, + fill: "none", + d: _ctx.path, + "stroke-width": _ctx.interactionWidth, + "stroke-opacity": 0, + class: "vue-flow__edge-interaction" + }, null, 8, _hoisted_2$1)) : createCommentVNode("", true), + _ctx.label && _ctx.labelX && _ctx.labelY ? (openBlock(), createBlock(_sfc_main$e, { + key: 1, + ref_key: "labelEl", + ref: labelEl, + x: _ctx.labelX, + y: _ctx.labelY, + label: _ctx.label, + "label-show-bg": _ctx.labelShowBg, + "label-bg-style": _ctx.labelBgStyle, + "label-bg-padding": _ctx.labelBgPadding, + "label-bg-border-radius": _ctx.labelBgBorderRadius, + "label-style": _ctx.labelStyle + }, null, 8, ["x", "y", "label", "label-show-bg", "label-bg-style", "label-bg-padding", "label-bg-border-radius", "label-style"])) : createCommentVNode("", true) + ], 64); + }; + } +}); +function getSimpleEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY +}) { + const xOffset = Math.abs(targetX - sourceX) / 2; + const centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset; + const yOffset = Math.abs(targetY - sourceY) / 2; + const centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset; + return [centerX, centerY, xOffset, yOffset]; +} +function getBezierEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, + sourceControlX, + sourceControlY, + targetControlX, + targetControlY +}) { + const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125; + const centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125; + const offsetX = Math.abs(centerX - sourceX); + const offsetY = Math.abs(centerY - sourceY); + return [centerX, centerY, offsetX, offsetY]; +} +function calculateControlOffset(distance2, curvature) { + if (distance2 >= 0) { + return 0.5 * distance2; + } else { + return curvature * 25 * Math.sqrt(-distance2); + } +} +function getControlWithCurvature({ pos, x1, y1, x2, y2, c }) { + let ctX, ctY; + switch (pos) { + case Position.Left: + ctX = x1 - calculateControlOffset(x1 - x2, c); + ctY = y1; + break; + case Position.Right: + ctX = x1 + calculateControlOffset(x2 - x1, c); + ctY = y1; + break; + case Position.Top: + ctX = x1; + ctY = y1 - calculateControlOffset(y1 - y2, c); + break; + case Position.Bottom: + ctX = x1; + ctY = y1 + calculateControlOffset(y2 - y1, c); + break; + } + return [ctX, ctY]; +} +function getBezierPath(bezierPathParams) { + const { + sourceX, + sourceY, + sourcePosition = Position.Bottom, + targetX, + targetY, + targetPosition = Position.Top, + curvature = 0.25 + } = bezierPathParams; + const [sourceControlX, sourceControlY] = getControlWithCurvature({ + pos: sourcePosition, + x1: sourceX, + y1: sourceY, + x2: targetX, + y2: targetY, + c: curvature + }); + const [targetControlX, targetControlY] = getControlWithCurvature({ + pos: targetPosition, + x1: targetX, + y1: targetY, + x2: sourceX, + y2: sourceY, + c: curvature + }); + const [labelX, labelY, offsetX, offsetY] = getBezierEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, + sourceControlX, + sourceControlY, + targetControlX, + targetControlY + }); + return [ + `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`, + labelX, + labelY, + offsetX, + offsetY + ]; +} +function getControl({ pos, x1, y1, x2, y2 }) { + let ctX, ctY; + switch (pos) { + case Position.Left: + case Position.Right: + ctX = 0.5 * (x1 + x2); + ctY = y1; + break; + case Position.Top: + case Position.Bottom: + ctX = x1; + ctY = 0.5 * (y1 + y2); + break; + } + return [ctX, ctY]; +} +function getSimpleBezierPath(simpleBezierPathParams) { + const { + sourceX, + sourceY, + sourcePosition = Position.Bottom, + targetX, + targetY, + targetPosition = Position.Top + } = simpleBezierPathParams; + const [sourceControlX, sourceControlY] = getControl({ + pos: sourcePosition, + x1: sourceX, + y1: sourceY, + x2: targetX, + y2: targetY + }); + const [targetControlX, targetControlY] = getControl({ + pos: targetPosition, + x1: targetX, + y1: targetY, + x2: sourceX, + y2: sourceY + }); + const [centerX, centerY, offsetX, offsetY] = getBezierEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, + sourceControlX, + sourceControlY, + targetControlX, + targetControlY + }); + return [ + `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`, + centerX, + centerY, + offsetX, + offsetY + ]; +} +var handleDirections = { + [Position.Left]: { x: -1, y: 0 }, + [Position.Right]: { x: 1, y: 0 }, + [Position.Top]: { x: 0, y: -1 }, + [Position.Bottom]: { x: 0, y: 1 } +}; +function getDirection({ + source, + sourcePosition = Position.Bottom, + target +}) { + if (sourcePosition === Position.Left || sourcePosition === Position.Right) { + return source.x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 }; + } + return source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 }; +} +function distance(a, b) { + return Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2); +} +function getPoints({ + source, + sourcePosition = Position.Bottom, + target, + targetPosition = Position.Top, + center, + offset +}) { + const sourceDir = handleDirections[sourcePosition]; + const targetDir = handleDirections[targetPosition]; + const sourceGapped = { x: source.x + sourceDir.x * offset, y: source.y + sourceDir.y * offset }; + const targetGapped = { x: target.x + targetDir.x * offset, y: target.y + targetDir.y * offset }; + const dir = getDirection({ + source: sourceGapped, + sourcePosition, + target: targetGapped + }); + const dirAccessor = dir.x !== 0 ? "x" : "y"; + const currDir = dir[dirAccessor]; + let points; + let centerX, centerY; + const sourceGapOffset = { x: 0, y: 0 }; + const targetGapOffset = { x: 0, y: 0 }; + const [defaultCenterX, defaultCenterY, defaultOffsetX, defaultOffsetY] = getSimpleEdgeCenter({ + sourceX: source.x, + sourceY: source.y, + targetX: target.x, + targetY: target.y + }); + if (sourceDir[dirAccessor] * targetDir[dirAccessor] === -1) { + centerX = center.x ?? defaultCenterX; + centerY = center.y ?? defaultCenterY; + const verticalSplit = [ + { x: centerX, y: sourceGapped.y }, + { x: centerX, y: targetGapped.y } + ]; + const horizontalSplit = [ + { x: sourceGapped.x, y: centerY }, + { x: targetGapped.x, y: centerY } + ]; + if (sourceDir[dirAccessor] === currDir) { + points = dirAccessor === "x" ? verticalSplit : horizontalSplit; + } else { + points = dirAccessor === "x" ? horizontalSplit : verticalSplit; + } + } else { + const sourceTarget = [{ x: sourceGapped.x, y: targetGapped.y }]; + const targetSource = [{ x: targetGapped.x, y: sourceGapped.y }]; + if (dirAccessor === "x") { + points = sourceDir.x === currDir ? targetSource : sourceTarget; + } else { + points = sourceDir.y === currDir ? sourceTarget : targetSource; + } + if (sourcePosition === targetPosition) { + const diff = Math.abs(source[dirAccessor] - target[dirAccessor]); + if (diff <= offset) { + const gapOffset = Math.min(offset - 1, offset - diff); + if (sourceDir[dirAccessor] === currDir) { + sourceGapOffset[dirAccessor] = (sourceGapped[dirAccessor] > source[dirAccessor] ? -1 : 1) * gapOffset; + } else { + targetGapOffset[dirAccessor] = (targetGapped[dirAccessor] > target[dirAccessor] ? -1 : 1) * gapOffset; + } + } + } + if (sourcePosition !== targetPosition) { + const dirAccessorOpposite = dirAccessor === "x" ? "y" : "x"; + const isSameDir = sourceDir[dirAccessor] === targetDir[dirAccessorOpposite]; + const sourceGtTargetOppo = sourceGapped[dirAccessorOpposite] > targetGapped[dirAccessorOpposite]; + const sourceLtTargetOppo = sourceGapped[dirAccessorOpposite] < targetGapped[dirAccessorOpposite]; + const flipSourceTarget = sourceDir[dirAccessor] === 1 && (!isSameDir && sourceGtTargetOppo || isSameDir && sourceLtTargetOppo) || sourceDir[dirAccessor] !== 1 && (!isSameDir && sourceLtTargetOppo || isSameDir && sourceGtTargetOppo); + if (flipSourceTarget) { + points = dirAccessor === "x" ? sourceTarget : targetSource; + } + } + const sourceGapPoint = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y }; + const targetGapPoint = { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y }; + const maxXDistance = Math.max(Math.abs(sourceGapPoint.x - points[0].x), Math.abs(targetGapPoint.x - points[0].x)); + const maxYDistance = Math.max(Math.abs(sourceGapPoint.y - points[0].y), Math.abs(targetGapPoint.y - points[0].y)); + if (maxXDistance >= maxYDistance) { + centerX = (sourceGapPoint.x + targetGapPoint.x) / 2; + centerY = points[0].y; + } else { + centerX = points[0].x; + centerY = (sourceGapPoint.y + targetGapPoint.y) / 2; + } + } + const pathPoints = [ + source, + { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y }, + ...points, + { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y }, + target + ]; + return [pathPoints, centerX, centerY, defaultOffsetX, defaultOffsetY]; +} +function getBend(a, b, c, size) { + const bendSize = Math.min(distance(a, b) / 2, distance(b, c) / 2, size); + const { x, y } = b; + if (a.x === x && x === c.x || a.y === y && y === c.y) { + return `L${x} ${y}`; + } + if (a.y === y) { + const xDir2 = a.x < c.x ? -1 : 1; + const yDir2 = a.y < c.y ? 1 : -1; + return `L ${x + bendSize * xDir2},${y}Q ${x},${y} ${x},${y + bendSize * yDir2}`; + } + const xDir = a.x < c.x ? 1 : -1; + const yDir = a.y < c.y ? -1 : 1; + return `L ${x},${y + bendSize * yDir}Q ${x},${y} ${x + bendSize * xDir},${y}`; +} +function getSmoothStepPath(smoothStepPathParams) { + const { + sourceX, + sourceY, + sourcePosition = Position.Bottom, + targetX, + targetY, + targetPosition = Position.Top, + borderRadius = 5, + centerX, + centerY, + offset = 20 + } = smoothStepPathParams; + const [points, labelX, labelY, offsetX, offsetY] = getPoints({ + source: { x: sourceX, y: sourceY }, + sourcePosition, + target: { x: targetX, y: targetY }, + targetPosition, + center: { x: centerX, y: centerY }, + offset + }); + const path = points.reduce((res, p, i) => { + let segment; + if (i > 0 && i < points.length - 1) { + segment = getBend(points[i - 1], p, points[i + 1], borderRadius); + } else { + segment = `${i === 0 ? "M" : "L"}${p.x} ${p.y}`; + } + res += segment; + return res; + }, ""); + return [path, labelX, labelY, offsetX, offsetY]; +} +function getStraightPath(straightEdgeParams) { + const { sourceX, sourceY, targetX, targetY } = straightEdgeParams; + const [centerX, centerY, offsetX, offsetY] = getSimpleEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY + }); + return [`M ${sourceX},${sourceY}L ${targetX},${targetY}`, centerX, centerY, offsetX, offsetY]; +} +var StraightEdge = defineComponent({ + name: "StraightEdge", + props: [ + "label", + "labelStyle", + "labelShowBg", + "labelBgStyle", + "labelBgPadding", + "labelBgBorderRadius", + "sourceY", + "sourceX", + "targetX", + "targetY", + "markerEnd", + "markerStart", + "interactionWidth" + ], + compatConfig: { MODE: 3 }, + setup(props, { attrs }) { + return () => { + const [path, labelX, labelY] = getStraightPath(props); + return h(_sfc_main$d, { + path, + labelX, + labelY, + ...attrs, + ...props + }); + }; + } +}); +var StraightEdge$1 = StraightEdge; +var SmoothStepEdge = 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(props, { attrs }) { + return () => { + const [path, labelX, labelY] = getSmoothStepPath({ + ...props, + sourcePosition: props.sourcePosition ?? Position.Bottom, + targetPosition: props.targetPosition ?? Position.Top + }); + return h(_sfc_main$d, { + path, + labelX, + labelY, + ...attrs, + ...props + }); + }; + } +}); +var SmoothStepEdge$1 = SmoothStepEdge; +var StepEdge = defineComponent({ + name: "StepEdge", + props: [ + "sourcePosition", + "targetPosition", + "label", + "labelStyle", + "labelShowBg", + "labelBgStyle", + "labelBgPadding", + "labelBgBorderRadius", + "sourceY", + "sourceX", + "targetX", + "targetY", + "markerEnd", + "markerStart", + "interactionWidth" + ], + setup(props, { attrs }) { + return () => h(SmoothStepEdge$1, { ...props, ...attrs, borderRadius: 0 }); + } +}); +var StepEdge$1 = StepEdge; +var BezierEdge = defineComponent({ + name: "BezierEdge", + props: [ + "sourcePosition", + "targetPosition", + "label", + "labelStyle", + "labelShowBg", + "labelBgStyle", + "labelBgPadding", + "labelBgBorderRadius", + "sourceY", + "sourceX", + "targetX", + "targetY", + "curvature", + "markerEnd", + "markerStart", + "interactionWidth" + ], + compatConfig: { MODE: 3 }, + setup(props, { attrs }) { + return () => { + const [path, labelX, labelY] = getBezierPath({ + ...props, + sourcePosition: props.sourcePosition ?? Position.Bottom, + targetPosition: props.targetPosition ?? Position.Top + }); + return h(_sfc_main$d, { + path, + labelX, + labelY, + ...attrs, + ...props + }); + }; + } +}); +var BezierEdge$1 = BezierEdge; +var SimpleBezierEdge = defineComponent({ + name: "SimpleBezierEdge", + props: [ + "sourcePosition", + "targetPosition", + "label", + "labelStyle", + "labelShowBg", + "labelBgStyle", + "labelBgPadding", + "labelBgBorderRadius", + "sourceY", + "sourceX", + "targetX", + "targetY", + "markerEnd", + "markerStart", + "interactionWidth" + ], + compatConfig: { MODE: 3 }, + setup(props, { attrs }) { + return () => { + const [path, labelX, labelY] = getSimpleBezierPath({ + ...props, + sourcePosition: props.sourcePosition ?? Position.Bottom, + targetPosition: props.targetPosition ?? Position.Top + }); + return h(_sfc_main$d, { + path, + labelX, + labelY, + ...attrs, + ...props + }); + }; + } +}); +var SimpleBezierEdge$1 = SimpleBezierEdge; +var defaultNodeTypes = { + input: InputNode$1, + default: DefaultNode$1, + output: OutputNode$1 +}; +var defaultEdgeTypes = { + default: BezierEdge$1, + straight: StraightEdge$1, + step: StepEdge$1, + smoothstep: SmoothStepEdge$1, + simplebezier: SimpleBezierEdge$1 +}; +function useGetters(state, nodeLookup, edgeLookup) { + const getNode = computed(() => (id2) => nodeLookup.value.get(id2)); + const getEdge = computed(() => (id2) => edgeLookup.value.get(id2)); + const getEdgeTypes = computed(() => { + const edgeTypes = { + ...defaultEdgeTypes, + ...state.edgeTypes + }; + const keys = Object.keys(edgeTypes); + for (const e of state.edges) { + e.type && !keys.includes(e.type) && (edgeTypes[e.type] = e.type); + } + return edgeTypes; + }); + const getNodeTypes = computed(() => { + const nodeTypes = { + ...defaultNodeTypes, + ...state.nodeTypes + }; + const keys = Object.keys(nodeTypes); + for (const n of state.nodes) { + n.type && !keys.includes(n.type) && (nodeTypes[n.type] = n.type); + } + return nodeTypes; + }); + const getNodes = computed(() => { + if (state.onlyRenderVisibleElements) { + return getNodesInside( + state.nodes, + { + x: 0, + y: 0, + width: state.dimensions.width, + height: state.dimensions.height + }, + state.viewport, + true + ); + } + return state.nodes; + }); + const getEdges = computed(() => { + if (state.onlyRenderVisibleElements) { + const visibleEdges = []; + for (const edge of state.edges) { + const source = nodeLookup.value.get(edge.source); + const target = nodeLookup.value.get(edge.target); + if (isEdgeVisible({ + sourcePos: source.computedPosition || { x: 0, y: 0 }, + targetPos: target.computedPosition || { x: 0, y: 0 }, + sourceWidth: source.dimensions.width, + sourceHeight: source.dimensions.height, + targetWidth: target.dimensions.width, + targetHeight: target.dimensions.height, + width: state.dimensions.width, + height: state.dimensions.height, + viewport: state.viewport + })) { + visibleEdges.push(edge); + } + } + return visibleEdges; + } + return state.edges; + }); + const getElements = computed(() => [...getNodes.value, ...getEdges.value]); + const getSelectedNodes = computed(() => { + const selectedNodes = []; + for (const node of state.nodes) { + if (node.selected) { + selectedNodes.push(node); + } + } + return selectedNodes; + }); + const getSelectedEdges = computed(() => { + const selectedEdges = []; + for (const edge of state.edges) { + if (edge.selected) { + selectedEdges.push(edge); + } + } + return selectedEdges; + }); + const getSelectedElements = computed(() => [ + ...getSelectedNodes.value, + ...getSelectedEdges.value + ]); + const getNodesInitialized = computed(() => { + const initializedNodes = []; + for (const node of state.nodes) { + if (!!node.dimensions.width && !!node.dimensions.height && node.handleBounds !== void 0) { + initializedNodes.push(node); + } + } + return initializedNodes; + }); + const areNodesInitialized = computed( + () => getNodes.value.length > 0 && getNodesInitialized.value.length === getNodes.value.length + ); + return { + getNode, + getEdge, + getElements, + getEdgeTypes, + getNodeTypes, + getEdges, + getNodes, + getSelectedElements, + getSelectedNodes, + getSelectedEdges, + getNodesInitialized, + areNodesInitialized + }; +} +var Storage = class _Storage { + constructor() { + this.currentId = 0; + this.flows = /* @__PURE__ */ new Map(); + } + static getInstance() { + var _a; + const vueApp = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app; + const existingInstance = (vueApp == null ? void 0 : vueApp.config.globalProperties.$vueFlowStorage) ?? _Storage.instance; + _Storage.instance = existingInstance ?? new _Storage(); + if (vueApp) { + vueApp.config.globalProperties.$vueFlowStorage = _Storage.instance; + } + return _Storage.instance; + } + set(id2, flow) { + return this.flows.set(id2, flow); + } + get(id2) { + return this.flows.get(id2); + } + remove(id2) { + return this.flows.delete(id2); + } + create(id2, preloadedState) { + const state = useState(); + const reactiveState = reactive(state); + const hooksOn = {}; + for (const [n, h2] of Object.entries(reactiveState.hooks)) { + const name = `on${n.charAt(0).toUpperCase() + n.slice(1)}`; + hooksOn[name] = h2.on; + } + const emits = {}; + for (const [n, h2] of Object.entries(reactiveState.hooks)) { + emits[n] = h2.trigger; + } + const nodeLookup = computed(() => { + const nodesMap = /* @__PURE__ */ new Map(); + for (const node of reactiveState.nodes) { + nodesMap.set(node.id, node); + } + return nodesMap; + }); + const edgeLookup = computed(() => { + const edgesMap = /* @__PURE__ */ new Map(); + for (const edge of reactiveState.edges) { + edgesMap.set(edge.id, edge); + } + return edgesMap; + }); + const getters = useGetters(reactiveState, nodeLookup, edgeLookup); + const actions = useActions(reactiveState, nodeLookup, edgeLookup); + actions.setState({ ...reactiveState, ...preloadedState }); + const flow = { + ...hooksOn, + ...getters, + ...actions, + ...toRefs2(reactiveState), + nodeLookup, + edgeLookup, + emits, + id: id2, + vueFlowVersion: "1.46.0", + $destroy: () => { + this.remove(id2); + } + }; + this.set(id2, flow); + return flow; + } + getId() { + return `vue-flow-${this.currentId++}`; + } +}; +function useVueFlow(idOrOpts) { + const storage = Storage.getInstance(); + const scope = getCurrentScope(); + const isOptsObj = typeof idOrOpts === "object"; + const options = isOptsObj ? idOrOpts : { id: idOrOpts }; + const id2 = options.id; + const vueFlowId = id2 ?? (scope == null ? void 0 : scope.vueFlowId); + let vueFlow; + if (scope) { + const injectedState = inject(VueFlow, null); + if (typeof injectedState !== "undefined" && injectedState !== null && (!vueFlowId || injectedState.id === vueFlowId)) { + vueFlow = injectedState; + } + } + if (!vueFlow) { + if (vueFlowId) { + vueFlow = storage.get(vueFlowId); + } + } + if (!vueFlow || vueFlowId && vueFlow.id !== vueFlowId) { + const name = id2 ?? storage.getId(); + const state = storage.create(name, options); + vueFlow = state; + const vfScope = scope ?? effectScope(true); + vfScope.run(() => { + watch( + state.applyDefault, + (shouldApplyDefault, __, onCleanup) => { + const nodesChangeHandler = (changes) => { + state.applyNodeChanges(changes); + }; + const edgesChangeHandler = (changes) => { + state.applyEdgeChanges(changes); + }; + if (shouldApplyDefault) { + state.onNodesChange(nodesChangeHandler); + state.onEdgesChange(edgesChangeHandler); + } else { + state.hooks.value.nodesChange.off(nodesChangeHandler); + state.hooks.value.edgesChange.off(edgesChangeHandler); + } + onCleanup(() => { + state.hooks.value.nodesChange.off(nodesChangeHandler); + state.hooks.value.edgesChange.off(edgesChangeHandler); + }); + }, + { immediate: true } + ); + tryOnScopeDispose(() => { + if (vueFlow) { + const storedInstance = storage.get(vueFlow.id); + if (storedInstance) { + storedInstance.$destroy(); + } else { + warn(`No store instance found for id ${vueFlow.id} in storage.`); + } + } + }); + }); + } else { + if (isOptsObj) { + vueFlow.setState(options); + } + } + if (scope) { + provide(VueFlow, vueFlow); + scope.vueFlowId = vueFlow.id; + } + if (isOptsObj) { + const instance = getCurrentInstance(); + if ((instance == null ? void 0 : instance.type.name) !== "VueFlow") { + vueFlow.emits.error(new VueFlowError(ErrorCode.USEVUEFLOW_OPTIONS)); + } + } + return vueFlow; +} +function useResizeHandler(viewportEl) { + const { emits, dimensions } = useVueFlow(); + let resizeObserver; + onMounted(() => { + const rendererNode = viewportEl.value; + const updateDimensions = () => { + if (!rendererNode) { + return; + } + const size = getDimensions(rendererNode); + if (size.width === 0 || size.height === 0) { + emits.error(new VueFlowError(ErrorCode.MISSING_VIEWPORT_DIMENSIONS)); + } + dimensions.value = { width: size.width || 500, height: size.height || 500 }; + }; + updateDimensions(); + window.addEventListener("resize", updateDimensions); + if (rendererNode) { + resizeObserver = new ResizeObserver(() => updateDimensions()); + resizeObserver.observe(rendererNode); + } + onBeforeUnmount(() => { + window.removeEventListener("resize", updateDimensions); + if (resizeObserver && rendererNode) { + resizeObserver.unobserve(rendererNode); + } + }); + }); +} +var __default__$c = { + name: "UserSelection", + compatConfig: { MODE: 3 } +}; +var _sfc_main$c = defineComponent({ + ...__default__$c, + props: { + userSelectionRect: {} + }, + setup(__props) { + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + class: "vue-flow__selection vue-flow__container", + style: normalizeStyle({ + width: `${_ctx.userSelectionRect.width}px`, + height: `${_ctx.userSelectionRect.height}px`, + transform: `translate(${_ctx.userSelectionRect.x}px, ${_ctx.userSelectionRect.y}px)` + }) + }, null, 4); + }; + } +}); +var _hoisted_1$6 = ["tabIndex"]; +var __default__$b = { + name: "NodesSelection", + compatConfig: { MODE: 3 } +}; +var _sfc_main$b = defineComponent({ + ...__default__$b, + setup(__props) { + const { emits, viewport, getSelectedNodes, noPanClassName, disableKeyboardA11y, userSelectionActive } = useVueFlow(); + const updatePositions = useUpdateNodePositions(); + const el = ref(null); + const dragging = useDrag({ + el, + onStart(args) { + emits.selectionDragStart(args); + emits.nodeDragStart(args); + }, + onDrag(args) { + emits.selectionDrag(args); + emits.nodeDrag(args); + }, + onStop(args) { + emits.selectionDragStop(args); + emits.nodeDragStop(args); + } + }); + onMounted(() => { + var _a; + if (!disableKeyboardA11y.value) { + (_a = el.value) == null ? void 0 : _a.focus({ preventScroll: true }); + } + }); + const selectedNodesBBox = computed(() => getRectOfNodes(getSelectedNodes.value)); + const innerStyle = computed(() => ({ + width: `${selectedNodesBBox.value.width}px`, + height: `${selectedNodesBBox.value.height}px`, + top: `${selectedNodesBBox.value.y}px`, + left: `${selectedNodesBBox.value.x}px` + })); + function onContextMenu(event) { + emits.selectionContextMenu({ event, nodes: getSelectedNodes.value }); + } + function onKeyDown(event) { + if (disableKeyboardA11y) { + return; + } + if (arrowKeyDiffs[event.key]) { + event.preventDefault(); + updatePositions( + { + x: arrowKeyDiffs[event.key].x, + y: arrowKeyDiffs[event.key].y + }, + event.shiftKey + ); + } + } + return (_ctx, _cache) => { + return !unref(userSelectionActive) && selectedNodesBBox.value.width && selectedNodesBBox.value.height ? (openBlock(), createElementBlock("div", { + key: 0, + class: normalizeClass(["vue-flow__nodesselection vue-flow__container", unref(noPanClassName)]), + style: normalizeStyle({ transform: `translate(${unref(viewport).x}px,${unref(viewport).y}px) scale(${unref(viewport).zoom})` }) + }, [ + createBaseVNode("div", { + ref_key: "el", + ref: el, + class: normalizeClass([{ dragging: unref(dragging) }, "vue-flow__nodesselection-rect"]), + style: normalizeStyle(innerStyle.value), + tabIndex: unref(disableKeyboardA11y) ? void 0 : -1, + onContextmenu: onContextMenu, + onKeydown: onKeyDown + }, null, 46, _hoisted_1$6) + ], 6)) : createCommentVNode("", true); + }; + } +}); +function getMousePosition(event, containerBounds) { + return { + x: event.clientX - containerBounds.left, + y: event.clientY - containerBounds.top + }; +} +var __default__$a = { + name: "Pane", + compatConfig: { MODE: 3 } +}; +var _sfc_main$a = defineComponent({ + ...__default__$a, + props: { + isSelecting: { type: Boolean }, + selectionKeyPressed: { type: Boolean } + }, + setup(__props) { + const { + vueFlowRef, + nodes, + viewport, + emits, + userSelectionActive, + removeSelectedElements, + userSelectionRect, + elementsSelectable, + nodesSelectionActive, + getSelectedEdges, + getSelectedNodes, + removeNodes, + removeEdges, + selectionMode, + deleteKeyCode, + multiSelectionKeyCode, + multiSelectionActive, + edgeLookup, + nodeLookup, + connectionLookup, + defaultEdgeOptions, + connectionStartHandle + } = useVueFlow(); + const container = ref(null); + const selectedNodeIds = ref(/* @__PURE__ */ new Set()); + const selectedEdgeIds = ref(/* @__PURE__ */ new Set()); + const containerBounds = ref(); + const hasActiveSelection = toRef(() => elementsSelectable.value && (__props.isSelecting || userSelectionActive.value)); + const connectionInProgress = toRef(() => connectionStartHandle.value !== null); + let selectionInProgress = false; + let selectionStarted = false; + const deleteKeyPressed = useKeyPress(deleteKeyCode, { actInsideInputWithModifier: false }); + const multiSelectKeyPressed = useKeyPress(multiSelectionKeyCode); + watch(deleteKeyPressed, (isKeyPressed) => { + if (!isKeyPressed) { + return; + } + removeNodes(getSelectedNodes.value); + removeEdges(getSelectedEdges.value); + nodesSelectionActive.value = false; + }); + watch(multiSelectKeyPressed, (isKeyPressed) => { + multiSelectionActive.value = isKeyPressed; + }); + function wrapHandler(handler, containerRef) { + return (event) => { + if (event.target !== containerRef) { + return; + } + handler == null ? void 0 : handler(event); + }; + } + function onClick(event) { + if (selectionInProgress || connectionInProgress.value) { + selectionInProgress = false; + return; + } + emits.paneClick(event); + removeSelectedElements(); + nodesSelectionActive.value = false; + } + function onContextMenu(event) { + event.preventDefault(); + event.stopPropagation(); + emits.paneContextMenu(event); + } + function onWheel(event) { + emits.paneScroll(event); + } + function onPointerDown(event) { + var _a, _b, _c; + containerBounds.value = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect(); + if (!elementsSelectable.value || !__props.isSelecting || event.button !== 0 || event.target !== container.value || !containerBounds.value) { + return; + } + (_c = (_b = event.target) == null ? void 0 : _b.setPointerCapture) == null ? void 0 : _c.call(_b, event.pointerId); + const { x, y } = getMousePosition(event, containerBounds.value); + selectionStarted = true; + selectionInProgress = false; + removeSelectedElements(); + userSelectionRect.value = { + width: 0, + height: 0, + startX: x, + startY: y, + x, + y + }; + emits.selectionStart(event); + } + function onPointerMove(event) { + var _a; + if (!containerBounds.value || !userSelectionRect.value) { + return; + } + selectionInProgress = true; + const { x: mouseX, y: mouseY } = getEventPosition(event, containerBounds.value); + const { startX = 0, startY = 0 } = userSelectionRect.value; + const nextUserSelectRect = { + startX, + startY, + x: mouseX < startX ? mouseX : startX, + y: mouseY < startY ? mouseY : startY, + width: Math.abs(mouseX - startX), + height: Math.abs(mouseY - startY) + }; + const prevSelectedNodeIds = selectedNodeIds.value; + const prevSelectedEdgeIds = selectedEdgeIds.value; + selectedNodeIds.value = new Set( + getNodesInside(nodes.value, nextUserSelectRect, viewport.value, selectionMode.value === SelectionMode.Partial, true).map( + (node) => node.id + ) + ); + selectedEdgeIds.value = /* @__PURE__ */ new Set(); + const edgesSelectable = ((_a = defaultEdgeOptions.value) == null ? void 0 : _a.selectable) ?? true; + for (const nodeId of selectedNodeIds.value) { + const connections = connectionLookup.value.get(nodeId); + if (!connections) { + continue; + } + for (const { edgeId } of connections.values()) { + const edge = edgeLookup.value.get(edgeId); + if (edge && (edge.selectable ?? edgesSelectable)) { + selectedEdgeIds.value.add(edgeId); + } + } + } + if (!areSetsEqual(prevSelectedNodeIds, selectedNodeIds.value)) { + const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds.value, true); + emits.nodesChange(changes); + } + if (!areSetsEqual(prevSelectedEdgeIds, selectedEdgeIds.value)) { + const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds.value); + emits.edgesChange(changes); + } + userSelectionRect.value = nextUserSelectRect; + userSelectionActive.value = true; + nodesSelectionActive.value = false; + } + function onPointerUp(event) { + var _a; + if (event.button !== 0 || !selectionStarted) { + return; + } + (_a = event.target) == null ? void 0 : _a.releasePointerCapture(event.pointerId); + if (!userSelectionActive.value && userSelectionRect.value && event.target === container.value) { + onClick(event); + } + userSelectionActive.value = false; + userSelectionRect.value = null; + nodesSelectionActive.value = selectedNodeIds.value.size > 0; + emits.selectionEnd(event); + if (__props.selectionKeyPressed) { + selectionInProgress = false; + } + selectionStarted = false; + } + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + ref_key: "container", + ref: container, + class: normalizeClass(["vue-flow__pane vue-flow__container", { selection: _ctx.isSelecting }]), + onClick: _cache[0] || (_cache[0] = (event) => hasActiveSelection.value ? void 0 : wrapHandler(onClick, container.value)(event)), + onContextmenu: _cache[1] || (_cache[1] = ($event) => wrapHandler(onContextMenu, container.value)($event)), + onWheelPassive: _cache[2] || (_cache[2] = ($event) => wrapHandler(onWheel, container.value)($event)), + onPointerenter: _cache[3] || (_cache[3] = (event) => hasActiveSelection.value ? void 0 : unref(emits).paneMouseEnter(event)), + onPointerdown: _cache[4] || (_cache[4] = (event) => hasActiveSelection.value ? onPointerDown(event) : unref(emits).paneMouseMove(event)), + onPointermove: _cache[5] || (_cache[5] = (event) => hasActiveSelection.value ? onPointerMove(event) : unref(emits).paneMouseMove(event)), + onPointerup: _cache[6] || (_cache[6] = (event) => hasActiveSelection.value ? onPointerUp(event) : void 0), + onPointerleave: _cache[7] || (_cache[7] = ($event) => unref(emits).paneMouseLeave($event)) + }, [ + renderSlot(_ctx.$slots, "default"), + unref(userSelectionActive) && unref(userSelectionRect) ? (openBlock(), createBlock(_sfc_main$c, { + key: 0, + "user-selection-rect": unref(userSelectionRect) + }, null, 8, ["user-selection-rect"])) : createCommentVNode("", true), + unref(nodesSelectionActive) && unref(getSelectedNodes).length ? (openBlock(), createBlock(_sfc_main$b, { key: 1 })) : createCommentVNode("", true) + ], 34); + }; + } +}); +var __default__$9 = { + name: "Transform", + compatConfig: { MODE: 3 } +}; +var _sfc_main$9 = defineComponent({ + ...__default__$9, + setup(__props) { + const { viewport, fitViewOnInit, fitViewOnInitDone } = useVueFlow(); + const isHidden = computed(() => { + if (fitViewOnInit.value) { + return !fitViewOnInitDone.value; + } + return false; + }); + const transform = computed(() => `translate(${viewport.value.x}px,${viewport.value.y}px) scale(${viewport.value.zoom})`); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + class: "vue-flow__transformationpane vue-flow__container", + style: normalizeStyle({ transform: transform.value, opacity: isHidden.value ? 0 : void 0 }) + }, [ + renderSlot(_ctx.$slots, "default") + ], 4); + }; + } +}); +var __default__$8 = { + name: "Viewport", + compatConfig: { MODE: 3 } +}; +var _sfc_main$8 = defineComponent({ + ...__default__$8, + setup(__props) { + const { + minZoom, + maxZoom, + defaultViewport, + translateExtent, + zoomActivationKeyCode, + selectionKeyCode, + panActivationKeyCode, + panOnScroll, + panOnScrollMode, + panOnScrollSpeed, + panOnDrag, + zoomOnDoubleClick, + zoomOnPinch, + zoomOnScroll, + preventScrolling, + noWheelClassName, + noPanClassName, + emits, + connectionStartHandle, + userSelectionActive, + paneDragging, + d3Zoom: storeD3Zoom, + d3Selection: storeD3Selection, + d3ZoomHandler: storeD3ZoomHandler, + viewport, + viewportRef, + paneClickDistance + } = useVueFlow(); + useResizeHandler(viewportRef); + const isZoomingOrPanning = shallowRef(false); + const isPanScrolling = shallowRef(false); + let panScrollTimeout = null; + let zoomedWithRightMouseButton = false; + let mouseButton = 0; + let prevTransform = { + x: 0, + y: 0, + zoom: 0 + }; + const panKeyPressed = useKeyPress(panActivationKeyCode); + const selectionKeyPressed = useKeyPress(selectionKeyCode); + const zoomKeyPressed = useKeyPress(zoomActivationKeyCode); + const shouldPanOnDrag = toRef( + () => (!selectionKeyPressed.value || selectionKeyPressed.value && selectionKeyCode.value === true) && (panKeyPressed.value || panOnDrag.value) + ); + const shouldPanOnScroll = toRef(() => panKeyPressed.value || panOnScroll.value); + const isSelecting = toRef(() => selectionKeyPressed.value || selectionKeyCode.value === true && shouldPanOnDrag.value !== true); + onMounted(() => { + if (!viewportRef.value) { + warn("Viewport element is missing"); + return; + } + const viewportElement = viewportRef.value; + const bbox = viewportElement.getBoundingClientRect(); + const d3Zoom = zoom().clickDistance(paneClickDistance.value).scaleExtent([minZoom.value, maxZoom.value]).translateExtent(translateExtent.value); + const d3Selection = select(viewportElement).call(d3Zoom); + const d3ZoomHandler = d3Selection.on("wheel.zoom"); + const updatedTransform = identity.translate(defaultViewport.value.x ?? 0, defaultViewport.value.y ?? 0).scale(clamp(defaultViewport.value.zoom ?? 1, minZoom.value, maxZoom.value)); + const extent = [ + [0, 0], + [bbox.width, bbox.height] + ]; + const constrainedTransform = d3Zoom.constrain()(updatedTransform, extent, translateExtent.value); + d3Zoom.transform(d3Selection, constrainedTransform); + d3Zoom.wheelDelta(wheelDelta); + storeD3Zoom.value = d3Zoom; + storeD3Selection.value = d3Selection; + storeD3ZoomHandler.value = d3ZoomHandler; + viewport.value = { x: constrainedTransform.x, y: constrainedTransform.y, zoom: constrainedTransform.k }; + d3Zoom.on("start", (event) => { + var _a; + if (!event.sourceEvent) { + return null; + } + mouseButton = event.sourceEvent.button; + isZoomingOrPanning.value = true; + const flowTransform = eventToFlowTransform(event.transform); + if (((_a = event.sourceEvent) == null ? void 0 : _a.type) === "mousedown") { + paneDragging.value = true; + } + prevTransform = flowTransform; + emits.viewportChangeStart(flowTransform); + emits.moveStart({ event, flowTransform }); + }); + d3Zoom.on("end", (event) => { + if (!event.sourceEvent) { + return null; + } + isZoomingOrPanning.value = false; + paneDragging.value = false; + if (isRightClickPan(shouldPanOnDrag.value, mouseButton ?? 0) && !zoomedWithRightMouseButton) { + emits.paneContextMenu(event.sourceEvent); + } + zoomedWithRightMouseButton = false; + if (viewChanged(prevTransform, event.transform)) { + const flowTransform = eventToFlowTransform(event.transform); + prevTransform = flowTransform; + emits.viewportChangeEnd(flowTransform); + emits.moveEnd({ event, flowTransform }); + } + }); + d3Zoom.filter((event) => { + var _a; + const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value; + const pinchZoom = zoomOnPinch.value && event.ctrlKey; + const eventButton = event.button; + if (eventButton === 1 && event.type === "mousedown" && (isWrappedWithClass(event, "vue-flow__node") || isWrappedWithClass(event, "vue-flow__edge"))) { + return true; + } + if (!shouldPanOnDrag.value && !zoomScroll && !shouldPanOnScroll.value && !zoomOnDoubleClick.value && !zoomOnPinch.value) { + return false; + } + if (userSelectionActive.value) { + return false; + } + if (!zoomOnDoubleClick.value && event.type === "dblclick") { + return false; + } + if (isWrappedWithClass(event, noWheelClassName.value) && event.type === "wheel") { + return false; + } + if (isWrappedWithClass(event, noPanClassName.value) && (event.type !== "wheel" || shouldPanOnScroll.value && event.type === "wheel" && !zoomKeyPressed.value)) { + return false; + } + if (!zoomOnPinch.value && event.ctrlKey && event.type === "wheel") { + return false; + } + if (!zoomScroll && !shouldPanOnScroll.value && !pinchZoom && event.type === "wheel") { + return false; + } + if (!zoomOnPinch && event.type === "touchstart" && ((_a = event.touches) == null ? void 0 : _a.length) > 1) { + event.preventDefault(); + return false; + } + if (!shouldPanOnDrag.value && (event.type === "mousedown" || event.type === "touchstart")) { + return false; + } + if (selectionKeyCode.value === true && Array.isArray(panOnDrag.value) && panOnDrag.value.includes(0) && eventButton === 0) { + return false; + } + if (Array.isArray(panOnDrag.value) && !panOnDrag.value.includes(eventButton) && (event.type === "mousedown" || event.type === "touchstart")) { + return false; + } + const buttonAllowed = Array.isArray(panOnDrag.value) && panOnDrag.value.includes(eventButton) || selectionKeyCode.value === true && Array.isArray(panOnDrag.value) && !panOnDrag.value.includes(0) || !eventButton || eventButton <= 1; + return (!event.ctrlKey || panKeyPressed.value || event.type === "wheel") && buttonAllowed; + }); + watch( + [userSelectionActive, shouldPanOnDrag], + () => { + if (userSelectionActive.value && !isZoomingOrPanning.value) { + d3Zoom.on("zoom", null); + } else if (!userSelectionActive.value) { + d3Zoom.on("zoom", (event) => { + viewport.value = { x: event.transform.x, y: event.transform.y, zoom: event.transform.k }; + const flowTransform = eventToFlowTransform(event.transform); + zoomedWithRightMouseButton = isRightClickPan(shouldPanOnDrag.value, mouseButton ?? 0); + emits.viewportChange(flowTransform); + emits.move({ event, flowTransform }); + }); + } + }, + { immediate: true } + ); + watch( + [userSelectionActive, shouldPanOnScroll, panOnScrollMode, zoomKeyPressed, zoomOnPinch, preventScrolling, noWheelClassName], + () => { + if (shouldPanOnScroll.value && !zoomKeyPressed.value && !userSelectionActive.value) { + d3Selection.on( + "wheel.zoom", + (event) => { + if (isWrappedWithClass(event, noWheelClassName.value)) { + return false; + } + const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value; + const pinchZoom = zoomOnPinch.value && event.ctrlKey; + const scrollEventEnabled = !preventScrolling.value || shouldPanOnScroll.value || zoomScroll || pinchZoom; + if (!scrollEventEnabled) { + return false; + } + event.preventDefault(); + event.stopImmediatePropagation(); + const currentZoom = d3Selection.property("__zoom").k || 1; + const _isMacOs = isMacOs(); + if (!panKeyPressed.value && event.ctrlKey && zoomOnPinch.value && _isMacOs) { + const point = pointer(event); + const pinchDelta = wheelDelta(event); + const zoom2 = currentZoom * 2 ** pinchDelta; + d3Zoom.scaleTo(d3Selection, zoom2, point, event); + return; + } + const deltaNormalize = event.deltaMode === 1 ? 20 : 1; + let deltaX = panOnScrollMode.value === PanOnScrollMode.Vertical ? 0 : event.deltaX * deltaNormalize; + let deltaY = panOnScrollMode.value === PanOnScrollMode.Horizontal ? 0 : event.deltaY * deltaNormalize; + if (!_isMacOs && event.shiftKey && panOnScrollMode.value !== PanOnScrollMode.Vertical && !deltaX && deltaY) { + deltaX = deltaY; + deltaY = 0; + } + d3Zoom.translateBy( + d3Selection, + -(deltaX / currentZoom) * panOnScrollSpeed.value, + -(deltaY / currentZoom) * panOnScrollSpeed.value + ); + const nextViewport = eventToFlowTransform(d3Selection.property("__zoom")); + if (panScrollTimeout) { + clearTimeout(panScrollTimeout); + } + if (!isPanScrolling.value) { + isPanScrolling.value = true; + emits.moveStart({ event, flowTransform: nextViewport }); + emits.viewportChangeStart(nextViewport); + } else { + emits.move({ event, flowTransform: nextViewport }); + emits.viewportChange(nextViewport); + panScrollTimeout = setTimeout(() => { + emits.moveEnd({ event, flowTransform: nextViewport }); + emits.viewportChangeEnd(nextViewport); + isPanScrolling.value = false; + }, 150); + } + }, + { passive: false } + ); + } else if (typeof d3ZoomHandler !== "undefined") { + d3Selection.on( + "wheel.zoom", + function(event, d) { + const invalidEvent = !preventScrolling.value && event.type === "wheel" && !event.ctrlKey; + const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value; + const pinchZoom = zoomOnPinch.value && event.ctrlKey; + const scrollEventsDisabled = !zoomScroll && !panOnScroll.value && !pinchZoom && event.type === "wheel"; + if (scrollEventsDisabled || invalidEvent || isWrappedWithClass(event, noWheelClassName.value)) { + return null; + } + event.preventDefault(); + d3ZoomHandler.call(this, event, d); + }, + { passive: false } + ); + } + }, + { immediate: true } + ); + }); + function isRightClickPan(pan, usedButton) { + return usedButton === 2 && Array.isArray(pan) && pan.includes(2); + } + function viewChanged(prevViewport, eventTransform) { + return prevViewport.x !== eventTransform.x && !Number.isNaN(eventTransform.x) || prevViewport.y !== eventTransform.y && !Number.isNaN(eventTransform.y) || prevViewport.zoom !== eventTransform.k && !Number.isNaN(eventTransform.k); + } + function eventToFlowTransform(eventTransform) { + return { + x: eventTransform.x, + y: eventTransform.y, + zoom: eventTransform.k + }; + } + function isWrappedWithClass(event, className) { + return event.target.closest(`.${className}`); + } + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + ref_key: "viewportRef", + ref: viewportRef, + class: "vue-flow__viewport vue-flow__container" + }, [ + createVNode(_sfc_main$a, { + "is-selecting": isSelecting.value, + "selection-key-pressed": unref(selectionKeyPressed), + class: normalizeClass({ + connecting: !!unref(connectionStartHandle), + dragging: unref(paneDragging), + draggable: unref(panOnDrag) === true || Array.isArray(unref(panOnDrag)) && unref(panOnDrag).includes(0) + }) + }, { + default: withCtx(() => [ + createVNode(_sfc_main$9, null, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "default") + ]), + _: 3 + }) + ]), + _: 3 + }, 8, ["is-selecting", "selection-key-pressed", "class"]) + ], 512); + }; + } +}); +var _hoisted_1$5 = ["id"]; +var _hoisted_2 = ["id"]; +var _hoisted_3 = ["id"]; +var __default__$7 = { + name: "A11yDescriptions", + compatConfig: { MODE: 3 } +}; +var _sfc_main$7 = defineComponent({ + ...__default__$7, + setup(__props) { + const { id: id2, disableKeyboardA11y, ariaLiveMessage } = useVueFlow(); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + createBaseVNode("div", { + id: `${unref(ARIA_NODE_DESC_KEY)}-${unref(id2)}`, + style: { "display": "none" } + }, " Press enter or space to select a node. " + toDisplayString(!unref(disableKeyboardA11y) ? "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, _hoisted_1$5), + createBaseVNode("div", { + id: `${unref(ARIA_EDGE_DESC_KEY)}-${unref(id2)}`, + 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, _hoisted_2), + !unref(disableKeyboardA11y) ? (openBlock(), createElementBlock("div", { + key: 0, + id: `${unref(ARIA_LIVE_MESSAGE)}-${unref(id2)}`, + "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%)" } + }, toDisplayString(unref(ariaLiveMessage)), 9, _hoisted_3)) : createCommentVNode("", true) + ], 64); + }; + } +}); +function useOnInitHandler() { + const vfInstance = useVueFlow(); + watch( + () => vfInstance.viewportHelper.value.viewportInitialized, + (isInitialized) => { + if (isInitialized) { + setTimeout(() => { + vfInstance.emits.init(vfInstance); + vfInstance.emits.paneReady(vfInstance); + }, 1); + } + } + ); +} +function shiftX(x, shift, position) { + if (position === Position.Left) { + return x - shift; + } + if (position === Position.Right) { + return x + shift; + } + return x; +} +function shiftY(y, shift, position) { + if (position === Position.Top) { + return y - shift; + } + if (position === Position.Bottom) { + return y + shift; + } + return y; +} +var EdgeAnchor = function({ + radius = 10, + centerX = 0, + centerY = 0, + position = Position.Top, + type +}) { + return h("circle", { + class: `vue-flow__edgeupdater vue-flow__edgeupdater-${type}`, + cx: shiftX(centerX, radius, position), + cy: shiftY(centerY, radius, position), + r: radius, + stroke: "transparent", + fill: "transparent" + }); +}; +EdgeAnchor.props = ["radius", "centerX", "centerY", "position", "type"]; +EdgeAnchor.compatConfig = { MODE: 3 }; +var EdgeAnchor$1 = EdgeAnchor; +var EdgeWrapper = defineComponent({ + name: "Edge", + compatConfig: { MODE: 3 }, + props: ["id"], + setup(props) { + const { + id: vueFlowId, + addSelectedEdges, + connectionMode, + edgeUpdaterRadius, + emits, + nodesSelectionActive, + noPanClassName, + getEdgeTypes, + removeSelectedEdges, + findEdge, + findNode, + isValidConnection, + multiSelectionActive, + disableKeyboardA11y, + elementsSelectable, + edgesUpdatable, + edgesFocusable, + hooks + } = useVueFlow(); + const edge = computed(() => findEdge(props.id)); + const { emit, on } = useEdgeHooks(edge.value, emits); + const slots = inject(Slots); + const instance = getCurrentInstance(); + const mouseOver = ref(false); + const updating = ref(false); + const nodeId = ref(""); + const handleId = ref(null); + const edgeUpdaterType = ref("source"); + const edgeEl = ref(null); + const isSelectable = toRef( + () => typeof edge.value.selectable === "undefined" ? elementsSelectable.value : edge.value.selectable + ); + const isUpdatable = toRef(() => typeof edge.value.updatable === "undefined" ? edgesUpdatable.value : edge.value.updatable); + const isFocusable = toRef(() => typeof edge.value.focusable === "undefined" ? edgesFocusable.value : edge.value.focusable); + provide(EdgeId, props.id); + provide(EdgeRef, edgeEl); + const edgeClass = computed(() => edge.value.class instanceof Function ? edge.value.class(edge.value) : edge.value.class); + const edgeStyle = computed(() => edge.value.style instanceof Function ? edge.value.style(edge.value) : edge.value.style); + const edgeCmp = computed(() => { + const name = edge.value.type || "default"; + const slot = slots == null ? void 0 : slots[`edge-${name}`]; + if (slot) { + return slot; + } + let edgeType = edge.value.template ?? getEdgeTypes.value[name]; + if (typeof edgeType === "string") { + if (instance) { + const components = Object.keys(instance.appContext.components); + if (components && components.includes(name)) { + edgeType = resolveComponent(name, false); + } + } + } + if (edgeType && typeof edgeType !== "string") { + return edgeType; + } + emits.error(new VueFlowError(ErrorCode.EDGE_TYPE_MISSING, edgeType)); + return false; + }); + const { handlePointerDown } = useHandle({ + nodeId, + handleId, + type: edgeUpdaterType, + isValidConnection, + edgeUpdaterType, + onEdgeUpdate, + onEdgeUpdateEnd + }); + return () => { + const sourceNode = findNode(edge.value.source); + const targetNode = findNode(edge.value.target); + const pathOptions = "pathOptions" in edge.value ? edge.value.pathOptions : {}; + if (!sourceNode && !targetNode) { + emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target)); + return null; + } + if (!sourceNode) { + emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source)); + return null; + } + if (!targetNode) { + emits.error(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target)); + return null; + } + if (!edge.value || edge.value.hidden || sourceNode.hidden || targetNode.hidden) { + return null; + } + let sourceNodeHandles; + if (connectionMode.value === ConnectionMode.Strict) { + sourceNodeHandles = sourceNode.handleBounds.source; + } else { + sourceNodeHandles = [...sourceNode.handleBounds.source || [], ...sourceNode.handleBounds.target || []]; + } + const sourceHandle = getEdgeHandle(sourceNodeHandles, edge.value.sourceHandle); + let targetNodeHandles; + if (connectionMode.value === ConnectionMode.Strict) { + targetNodeHandles = targetNode.handleBounds.target; + } else { + targetNodeHandles = [...targetNode.handleBounds.target || [], ...targetNode.handleBounds.source || []]; + } + const targetHandle = getEdgeHandle(targetNodeHandles, edge.value.targetHandle); + const sourcePosition = (sourceHandle == null ? void 0 : sourceHandle.position) || Position.Bottom; + const targetPosition = (targetHandle == null ? void 0 : targetHandle.position) || Position.Top; + const { x: sourceX, y: sourceY } = getHandlePosition(sourceNode, sourceHandle, sourcePosition); + const { x: targetX, y: targetY } = getHandlePosition(targetNode, targetHandle, targetPosition); + edge.value.sourceX = sourceX; + edge.value.sourceY = sourceY; + edge.value.targetX = targetX; + edge.value.targetY = targetY; + return h( + "g", + { + "ref": edgeEl, + "key": props.id, + "data-id": props.id, + "class": [ + "vue-flow__edge", + `vue-flow__edge-${edgeCmp.value === false ? "default" : edge.value.type || "default"}`, + noPanClassName.value, + edgeClass.value, + { + updating: mouseOver.value, + selected: edge.value.selected, + animated: edge.value.animated, + inactive: !isSelectable.value && !hooks.value.edgeClick.hasListeners() + } + ], + "tabIndex": isFocusable.value ? 0 : void 0, + "aria-label": edge.value.ariaLabel === null ? void 0 : edge.value.ariaLabel ?? `Edge from ${edge.value.source} to ${edge.value.target}`, + "aria-describedby": isFocusable.value ? `${ARIA_EDGE_DESC_KEY}-${vueFlowId}` : void 0, + "aria-roledescription": "edge", + "role": isFocusable.value ? "group" : "img", + ...edge.value.domAttributes, + "onClick": onEdgeClick, + "onContextmenu": onEdgeContextMenu, + "onDblclick": onDoubleClick, + "onMouseenter": onEdgeMouseEnter, + "onMousemove": onEdgeMouseMove, + "onMouseleave": onEdgeMouseLeave, + "onKeyDown": isFocusable.value ? onKeyDown : void 0 + }, + [ + updating.value ? null : h(edgeCmp.value === false ? getEdgeTypes.value.default : edgeCmp.value, { + id: props.id, + sourceNode, + targetNode, + source: edge.value.source, + target: edge.value.target, + type: edge.value.type, + updatable: isUpdatable.value, + selected: edge.value.selected, + animated: edge.value.animated, + label: edge.value.label, + labelStyle: edge.value.labelStyle, + labelShowBg: edge.value.labelShowBg, + labelBgStyle: edge.value.labelBgStyle, + labelBgPadding: edge.value.labelBgPadding, + labelBgBorderRadius: edge.value.labelBgBorderRadius, + data: edge.value.data, + events: { ...edge.value.events, ...on }, + style: edgeStyle.value, + markerStart: `url('#${getMarkerId(edge.value.markerStart, vueFlowId)}')`, + markerEnd: `url('#${getMarkerId(edge.value.markerEnd, vueFlowId)}')`, + sourcePosition, + targetPosition, + sourceX, + sourceY, + targetX, + targetY, + sourceHandleId: edge.value.sourceHandle, + targetHandleId: edge.value.targetHandle, + interactionWidth: edge.value.interactionWidth, + ...pathOptions + }), + [ + isUpdatable.value === "source" || isUpdatable.value === true ? [ + h( + "g", + { + onMousedown: onEdgeUpdaterSourceMouseDown, + onMouseenter: onEdgeUpdaterMouseEnter, + onMouseout: onEdgeUpdaterMouseOut + }, + h(EdgeAnchor$1, { + "position": sourcePosition, + "centerX": sourceX, + "centerY": sourceY, + "radius": edgeUpdaterRadius.value, + "type": "source", + "data-type": "source" + }) + ) + ] : null, + isUpdatable.value === "target" || isUpdatable.value === true ? [ + h( + "g", + { + onMousedown: onEdgeUpdaterTargetMouseDown, + onMouseenter: onEdgeUpdaterMouseEnter, + onMouseout: onEdgeUpdaterMouseOut + }, + h(EdgeAnchor$1, { + "position": targetPosition, + "centerX": targetX, + "centerY": targetY, + "radius": edgeUpdaterRadius.value, + "type": "target", + "data-type": "target" + }) + ) + ] : null + ] + ] + ); + }; + function onEdgeUpdaterMouseEnter() { + mouseOver.value = true; + } + function onEdgeUpdaterMouseOut() { + mouseOver.value = false; + } + function onEdgeUpdate(event, connection) { + emit.update({ event, edge: edge.value, connection }); + } + function onEdgeUpdateEnd(event) { + emit.updateEnd({ event, edge: edge.value }); + updating.value = false; + } + function handleEdgeUpdater(event, isSourceHandle) { + if (event.button !== 0) { + return; + } + updating.value = true; + nodeId.value = isSourceHandle ? edge.value.target : edge.value.source; + handleId.value = (isSourceHandle ? edge.value.targetHandle : edge.value.sourceHandle) ?? null; + edgeUpdaterType.value = isSourceHandle ? "target" : "source"; + emit.updateStart({ event, edge: edge.value }); + handlePointerDown(event); + } + function onEdgeClick(event) { + var _a; + const data = { event, edge: edge.value }; + if (isSelectable.value) { + nodesSelectionActive.value = false; + if (edge.value.selected && multiSelectionActive.value) { + removeSelectedEdges([edge.value]); + (_a = edgeEl.value) == null ? void 0 : _a.blur(); + } else { + addSelectedEdges([edge.value]); + } + } + emit.click(data); + } + function onEdgeContextMenu(event) { + emit.contextMenu({ event, edge: edge.value }); + } + function onDoubleClick(event) { + emit.doubleClick({ event, edge: edge.value }); + } + function onEdgeMouseEnter(event) { + emit.mouseEnter({ event, edge: edge.value }); + } + function onEdgeMouseMove(event) { + emit.mouseMove({ event, edge: edge.value }); + } + function onEdgeMouseLeave(event) { + emit.mouseLeave({ event, edge: edge.value }); + } + function onEdgeUpdaterSourceMouseDown(event) { + handleEdgeUpdater(event, true); + } + function onEdgeUpdaterTargetMouseDown(event) { + handleEdgeUpdater(event, false); + } + function onKeyDown(event) { + var _a; + if (!disableKeyboardA11y.value && elementSelectionKeys.includes(event.key) && isSelectable.value) { + const unselect = event.key === "Escape"; + if (unselect) { + (_a = edgeEl.value) == null ? void 0 : _a.blur(); + removeSelectedEdges([findEdge(props.id)]); + } else { + addSelectedEdges([findEdge(props.id)]); + } + } + } + } +}); +var EdgeWrapper$1 = EdgeWrapper; +var ConnectionLine = defineComponent({ + name: "ConnectionLine", + compatConfig: { MODE: 3 }, + setup() { + var _a; + const { + id: id2, + connectionMode, + connectionStartHandle, + connectionEndHandle, + connectionPosition, + connectionLineType, + connectionLineStyle, + connectionLineOptions, + connectionStatus, + viewport, + findNode + } = useVueFlow(); + const connectionLineComponent = (_a = inject(Slots)) == null ? void 0 : _a["connection-line"]; + const fromNode = computed(() => { + var _a2; + return findNode((_a2 = connectionStartHandle.value) == null ? void 0 : _a2.nodeId); + }); + const toNode = computed(() => { + var _a2; + return findNode((_a2 = connectionEndHandle.value) == null ? void 0 : _a2.nodeId) ?? null; + }); + const toXY = computed(() => { + return { + x: (connectionPosition.value.x - viewport.value.x) / viewport.value.zoom, + y: (connectionPosition.value.y - viewport.value.y) / viewport.value.zoom + }; + }); + const markerStart = computed( + () => connectionLineOptions.value.markerStart ? `url(#${getMarkerId(connectionLineOptions.value.markerStart, id2)})` : "" + ); + const markerEnd = computed( + () => connectionLineOptions.value.markerEnd ? `url(#${getMarkerId(connectionLineOptions.value.markerEnd, id2)})` : "" + ); + return () => { + var _a2, _b, _c; + if (!fromNode.value || !connectionStartHandle.value) { + return null; + } + const startHandleId = connectionStartHandle.value.id; + const handleType = connectionStartHandle.value.type; + const fromHandleBounds = fromNode.value.handleBounds; + let handleBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType]) ?? []; + if (connectionMode.value === ConnectionMode.Loose) { + const oppositeBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType === "source" ? "target" : "source"]) ?? []; + handleBounds = [...handleBounds, ...oppositeBounds]; + } + if (!handleBounds) { + return null; + } + const fromHandle = (startHandleId ? handleBounds.find((d) => d.id === startHandleId) : handleBounds[0]) ?? null; + const fromPosition = (fromHandle == null ? void 0 : fromHandle.position) ?? Position.Top; + const { x: fromX, y: fromY } = getHandlePosition(fromNode.value, fromHandle, fromPosition); + let toHandle = null; + if (toNode.value) { + if (connectionMode.value === ConnectionMode.Strict) { + toHandle = ((_a2 = toNode.value.handleBounds[handleType === "source" ? "target" : "source"]) == null ? void 0 : _a2.find( + (d) => { + var _a3; + return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id); + } + )) || null; + } else { + toHandle = ((_b = [...toNode.value.handleBounds.source ?? [], ...toNode.value.handleBounds.target ?? []]) == null ? void 0 : _b.find( + (d) => { + var _a3; + return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id); + } + )) || null; + } + } + const toPosition = ((_c = connectionEndHandle.value) == null ? void 0 : _c.position) ?? (fromPosition ? oppositePosition[fromPosition] : null); + if (!fromPosition || !toPosition) { + return null; + } + const type = connectionLineType.value ?? connectionLineOptions.value.type ?? ConnectionLineType.Bezier; + let dAttr = ""; + const pathParams = { + sourceX: fromX, + sourceY: fromY, + sourcePosition: fromPosition, + targetX: toXY.value.x, + targetY: toXY.value.y, + targetPosition: toPosition + }; + if (type === ConnectionLineType.Bezier) { + [dAttr] = getBezierPath(pathParams); + } else if (type === ConnectionLineType.Step) { + [dAttr] = getSmoothStepPath({ + ...pathParams, + borderRadius: 0 + }); + } else if (type === ConnectionLineType.SmoothStep) { + [dAttr] = getSmoothStepPath(pathParams); + } else if (type === ConnectionLineType.SimpleBezier) { + [dAttr] = getSimpleBezierPath(pathParams); + } else { + dAttr = `M${fromX},${fromY} ${toXY.value.x},${toXY.value.y}`; + } + return h( + "svg", + { class: "vue-flow__edges vue-flow__connectionline vue-flow__container" }, + h( + "g", + { class: "vue-flow__connection" }, + connectionLineComponent ? h(connectionLineComponent, { + sourceX: fromX, + sourceY: fromY, + sourcePosition: fromPosition, + targetX: toXY.value.x, + targetY: toXY.value.y, + targetPosition: toPosition, + sourceNode: fromNode.value, + sourceHandle: fromHandle, + targetNode: toNode.value, + targetHandle: toHandle, + markerEnd: markerEnd.value, + markerStart: markerStart.value, + connectionStatus: connectionStatus.value + }) : h("path", { + "d": dAttr, + "class": [connectionLineOptions.value.class, connectionStatus, "vue-flow__connection-path"], + "style": { + ...connectionLineStyle.value, + ...connectionLineOptions.value.style + }, + "marker-end": markerEnd.value, + "marker-start": markerStart.value + }) + ) + ); + }; + } +}); +var ConnectionLine$1 = ConnectionLine; +var _hoisted_1$4 = ["id", "markerWidth", "markerHeight", "markerUnits", "orient"]; +var __default__$6 = { + name: "MarkerType", + compatConfig: { MODE: 3 } +}; +var _sfc_main$6 = defineComponent({ + ...__default__$6, + 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(__props) { + return (_ctx, _cache) => { + return openBlock(), createElementBlock("marker", { + id: _ctx.id, + class: "vue-flow__arrowhead", + viewBox: "-10 -10 20 20", + refX: "0", + refY: "0", + markerWidth: `${_ctx.width}`, + markerHeight: `${_ctx.height}`, + markerUnits: _ctx.markerUnits, + orient: _ctx.orient + }, [ + _ctx.type === unref(MarkerType).ArrowClosed ? (openBlock(), createElementBlock("polyline", { + key: 0, + style: normalizeStyle({ + stroke: _ctx.color, + fill: _ctx.color, + strokeWidth: _ctx.strokeWidth + }), + "stroke-linecap": "round", + "stroke-linejoin": "round", + points: "-5,-4 0,0 -5,4 -5,-4" + }, null, 4)) : createCommentVNode("", true), + _ctx.type === unref(MarkerType).Arrow ? (openBlock(), createElementBlock("polyline", { + key: 1, + style: normalizeStyle({ + stroke: _ctx.color, + strokeWidth: _ctx.strokeWidth + }), + "stroke-linecap": "round", + "stroke-linejoin": "round", + fill: "none", + points: "-5,-4 0,0 -5,4" + }, null, 4)) : createCommentVNode("", true) + ], 8, _hoisted_1$4); + }; + } +}); +var _hoisted_1$3 = { + class: "vue-flow__marker vue-flow__container", + "aria-hidden": "true" +}; +var __default__$5 = { + name: "MarkerDefinitions", + compatConfig: { MODE: 3 } +}; +var _sfc_main$5 = defineComponent({ + ...__default__$5, + setup(__props) { + const { id: vueFlowId, edges, connectionLineOptions, defaultMarkerColor: defaultColor } = useVueFlow(); + const markers = computed(() => { + const ids = /* @__PURE__ */ new Set(); + const markers2 = []; + const createMarkers = (marker) => { + if (marker) { + const markerId = getMarkerId(marker, vueFlowId); + if (!ids.has(markerId)) { + if (typeof marker === "object") { + markers2.push({ ...marker, id: markerId, color: marker.color || defaultColor.value }); + } else { + markers2.push({ id: markerId, color: defaultColor.value, type: marker }); + } + ids.add(markerId); + } + } + }; + for (const marker of [connectionLineOptions.value.markerEnd, connectionLineOptions.value.markerStart]) { + createMarkers(marker); + } + for (const edge of edges.value) { + for (const marker of [edge.markerStart, edge.markerEnd]) { + createMarkers(marker); + } + } + return markers2.sort((a, b) => a.id.localeCompare(b.id)); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("svg", _hoisted_1$3, [ + createBaseVNode("defs", null, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(markers.value, (marker) => { + return openBlock(), createBlock(_sfc_main$6, { + id: marker.id, + key: marker.id, + type: marker.type, + color: marker.color, + width: marker.width, + height: marker.height, + markerUnits: marker.markerUnits, + "stroke-width": marker.strokeWidth, + orient: marker.orient + }, null, 8, ["id", "type", "color", "width", "height", "markerUnits", "stroke-width", "orient"]); + }), 128)) + ]) + ]); + }; + } +}); +var __default__$4 = { + name: "Edges", + compatConfig: { MODE: 3 } +}; +var _sfc_main$4 = defineComponent({ + ...__default__$4, + setup(__props) { + const { findNode, getEdges, elevateEdgesOnSelect } = useVueFlow(); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + createVNode(_sfc_main$5), + (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getEdges), (edge) => { + return openBlock(), createElementBlock("svg", { + key: edge.id, + class: "vue-flow__edges vue-flow__container", + style: normalizeStyle({ zIndex: unref(getEdgeZIndex)(edge, unref(findNode), unref(elevateEdgesOnSelect)) }) + }, [ + createVNode(unref(EdgeWrapper$1), { + id: edge.id + }, null, 8, ["id"]) + ], 4); + }), 128)), + createVNode(unref(ConnectionLine$1)) + ], 64); + }; + } +}); +var NodeWrapper = defineComponent({ + name: "Node", + compatConfig: { MODE: 3 }, + props: ["id", "resizeObserver"], + setup(props) { + const { + id: vueFlowId, + noPanClassName, + selectNodesOnDrag, + nodesSelectionActive, + multiSelectionActive, + emits, + removeSelectedNodes, + addSelectedNodes, + updateNodeDimensions, + onUpdateNodeInternals, + getNodeTypes, + nodeExtent, + elevateNodesOnSelect, + disableKeyboardA11y, + ariaLiveMessage, + snapToGrid, + snapGrid, + nodeDragThreshold, + nodesDraggable, + elementsSelectable, + nodesConnectable, + nodesFocusable, + hooks + } = useVueFlow(); + const nodeElement = ref(null); + provide(NodeRef, nodeElement); + provide(NodeId, props.id); + const slots = inject(Slots); + const instance = getCurrentInstance(); + const updateNodePositions = useUpdateNodePositions(); + const { node, parentNode } = useNode(props.id); + const { emit, on } = useNodeHooks(node, emits); + const isDraggable = toRef(() => typeof node.draggable === "undefined" ? nodesDraggable.value : node.draggable); + const isSelectable = toRef(() => typeof node.selectable === "undefined" ? elementsSelectable.value : node.selectable); + const isConnectable = toRef(() => typeof node.connectable === "undefined" ? nodesConnectable.value : node.connectable); + const isFocusable = toRef(() => typeof node.focusable === "undefined" ? nodesFocusable.value : node.focusable); + const hasPointerEvents = computed( + () => isSelectable.value || isDraggable.value || hooks.value.nodeClick.hasListeners() || hooks.value.nodeDoubleClick.hasListeners() || hooks.value.nodeMouseEnter.hasListeners() || hooks.value.nodeMouseMove.hasListeners() || hooks.value.nodeMouseLeave.hasListeners() + ); + const isInit = toRef(() => !!node.dimensions.width && !!node.dimensions.height); + const nodeCmp = computed(() => { + const name = node.type || "default"; + const slot = slots == null ? void 0 : slots[`node-${name}`]; + if (slot) { + return slot; + } + let nodeType = node.template || getNodeTypes.value[name]; + if (typeof nodeType === "string") { + if (instance) { + const components = Object.keys(instance.appContext.components); + if (components && components.includes(name)) { + nodeType = resolveComponent(name, false); + } + } + } + if (nodeType && typeof nodeType !== "string") { + return nodeType; + } + emits.error(new VueFlowError(ErrorCode.NODE_TYPE_MISSING, nodeType)); + return false; + }); + const dragging = useDrag({ + id: props.id, + el: nodeElement, + disabled: () => !isDraggable.value, + selectable: isSelectable, + dragHandle: () => node.dragHandle, + onStart(event) { + emit.dragStart(event); + }, + onDrag(event) { + emit.drag(event); + }, + onStop(event) { + emit.dragStop(event); + }, + onClick(event) { + onSelectNode(event); + } + }); + const getClass = computed(() => node.class instanceof Function ? node.class(node) : node.class); + const getStyle = computed(() => { + const styles = (node.style instanceof Function ? node.style(node) : node.style) || {}; + const width = node.width instanceof Function ? node.width(node) : node.width; + const height = node.height instanceof Function ? node.height(node) : node.height; + if (!styles.width && width) { + styles.width = typeof width === "string" ? width : `${width}px`; + } + if (!styles.height && height) { + styles.height = typeof height === "string" ? height : `${height}px`; + } + return styles; + }); + const zIndex = toRef(() => Number(node.zIndex ?? getStyle.value.zIndex ?? 0)); + onUpdateNodeInternals((updateIds) => { + if (updateIds.includes(props.id) || !updateIds.length) { + updateInternals(); + } + }); + onMounted(() => { + watch( + () => node.hidden, + (isHidden = false, _, onCleanup) => { + if (!isHidden && nodeElement.value) { + props.resizeObserver.observe(nodeElement.value); + onCleanup(() => { + if (nodeElement.value) { + props.resizeObserver.unobserve(nodeElement.value); + } + }); + } + }, + { immediate: true, flush: "post" } + ); + }); + watch([() => node.type, () => node.sourcePosition, () => node.targetPosition], () => { + nextTick(() => { + updateNodeDimensions([{ id: props.id, nodeElement: nodeElement.value, forceUpdate: true }]); + }); + }); + watch( + [ + () => node.position.x, + () => node.position.y, + () => { + var _a; + return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.x; + }, + () => { + var _a; + return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.y; + }, + () => { + var _a; + return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.z; + }, + zIndex, + () => node.selected, + () => node.dimensions.height, + () => node.dimensions.width, + () => { + var _a; + return (_a = parentNode.value) == null ? void 0 : _a.dimensions.height; + }, + () => { + var _a; + return (_a = parentNode.value) == null ? void 0 : _a.dimensions.width; + } + ], + ([newX, newY, parentX, parentY, parentZ, nodeZIndex]) => { + const xyzPos = { + x: newX, + y: newY, + z: nodeZIndex + (elevateNodesOnSelect.value ? node.selected ? 1e3 : 0 : 0) + }; + if (typeof parentX !== "undefined" && typeof parentY !== "undefined") { + node.computedPosition = getXYZPos({ x: parentX, y: parentY, z: parentZ }, xyzPos); + } else { + node.computedPosition = xyzPos; + } + }, + { flush: "post", immediate: true } + ); + watch([() => node.extent, nodeExtent], ([nodeExtent2, globalExtent], [oldNodeExtent, oldGlobalExtent]) => { + if (nodeExtent2 !== oldNodeExtent || globalExtent !== oldGlobalExtent) { + clampPosition2(); + } + }); + if (node.extent === "parent" || typeof node.extent === "object" && "range" in node.extent && node.extent.range === "parent") { + until(() => isInit).toBe(true).then(clampPosition2); + } else { + clampPosition2(); + } + return () => { + if (node.hidden) { + return null; + } + return h( + "div", + { + "ref": nodeElement, + "data-id": node.id, + "class": [ + "vue-flow__node", + `vue-flow__node-${nodeCmp.value === false ? "default" : node.type || "default"}`, + { + [noPanClassName.value]: isDraggable.value, + dragging: dragging == null ? void 0 : dragging.value, + draggable: isDraggable.value, + selected: node.selected, + selectable: isSelectable.value, + parent: node.isParent + }, + getClass.value + ], + "style": { + visibility: isInit.value ? "visible" : "hidden", + zIndex: node.computedPosition.z ?? zIndex.value, + transform: `translate(${node.computedPosition.x}px,${node.computedPosition.y}px)`, + pointerEvents: hasPointerEvents.value ? "all" : "none", + ...getStyle.value + }, + "tabIndex": isFocusable.value ? 0 : void 0, + "role": isFocusable.value ? "group" : void 0, + "aria-describedby": disableKeyboardA11y.value ? void 0 : `${ARIA_NODE_DESC_KEY}-${vueFlowId}`, + "aria-label": node.ariaLabel, + "aria-roledescription": "node", + ...node.domAttributes, + "onMouseenter": onMouseEnter, + "onMousemove": onMouseMove, + "onMouseleave": onMouseLeave, + "onContextmenu": onContextMenu, + "onClick": onSelectNode, + "onDblclick": onDoubleClick, + "onKeydown": onKeyDown + }, + [ + h(nodeCmp.value === false ? getNodeTypes.value.default : nodeCmp.value, { + id: node.id, + type: node.type, + data: node.data, + events: { ...node.events, ...on }, + selected: node.selected, + resizing: node.resizing, + dragging: dragging.value, + connectable: isConnectable.value, + position: node.computedPosition, + dimensions: node.dimensions, + isValidTargetPos: node.isValidTargetPos, + isValidSourcePos: node.isValidSourcePos, + parent: node.parentNode, + parentNodeId: node.parentNode, + zIndex: node.computedPosition.z ?? zIndex.value, + targetPosition: node.targetPosition, + sourcePosition: node.sourcePosition, + label: node.label, + dragHandle: node.dragHandle, + onUpdateNodeInternals: updateInternals + }) + ] + ); + }; + function clampPosition2() { + const nextPosition = node.computedPosition; + const { computedPosition, position } = calcNextPosition( + node, + snapToGrid.value ? snapPosition(nextPosition, snapGrid.value) : nextPosition, + emits.error, + nodeExtent.value, + parentNode.value + ); + if (node.computedPosition.x !== computedPosition.x || node.computedPosition.y !== computedPosition.y) { + node.computedPosition = { ...node.computedPosition, ...computedPosition }; + } + if (node.position.x !== position.x || node.position.y !== position.y) { + node.position = position; + } + } + function updateInternals() { + if (nodeElement.value) { + updateNodeDimensions([{ id: props.id, nodeElement: nodeElement.value, forceUpdate: true }]); + } + } + function onMouseEnter(event) { + if (!(dragging == null ? void 0 : dragging.value)) { + emit.mouseEnter({ event, node }); + } + } + function onMouseMove(event) { + if (!(dragging == null ? void 0 : dragging.value)) { + emit.mouseMove({ event, node }); + } + } + function onMouseLeave(event) { + if (!(dragging == null ? void 0 : dragging.value)) { + emit.mouseLeave({ event, node }); + } + } + function onContextMenu(event) { + return emit.contextMenu({ event, node }); + } + function onDoubleClick(event) { + return emit.doubleClick({ event, node }); + } + function onSelectNode(event) { + if (isSelectable.value && (!selectNodesOnDrag.value || !isDraggable.value || nodeDragThreshold.value > 0)) { + handleNodeClick( + node, + multiSelectionActive.value, + addSelectedNodes, + removeSelectedNodes, + nodesSelectionActive, + false, + nodeElement.value + ); + } + emit.click({ event, node }); + } + function onKeyDown(event) { + if (isInputDOMNode(event) || disableKeyboardA11y.value) { + return; + } + if (elementSelectionKeys.includes(event.key) && isSelectable.value) { + const unselect = event.key === "Escape"; + handleNodeClick( + node, + multiSelectionActive.value, + addSelectedNodes, + removeSelectedNodes, + nodesSelectionActive, + unselect, + nodeElement.value + ); + } else if (isDraggable.value && node.selected && arrowKeyDiffs[event.key]) { + event.preventDefault(); + ariaLiveMessage.value = `Moved selected node ${event.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~node.position.x}, y: ${~~node.position.y}`; + updateNodePositions( + { + x: arrowKeyDiffs[event.key].x, + y: arrowKeyDiffs[event.key].y + }, + event.shiftKey + ); + } + } + } +}); +var NodeWrapper$1 = NodeWrapper; +var _hoisted_1$2 = { + height: "0", + width: "0" +}; +var __default__$3 = { + name: "EdgeLabelRenderer", + compatConfig: { MODE: 3 } +}; +var _sfc_main$3 = defineComponent({ + ...__default__$3, + setup(__props) { + const { viewportRef } = useVueFlow(); + const teleportTarget = toRef(() => { + var _a; + return (_a = viewportRef.value) == null ? void 0 : _a.getElementsByClassName("vue-flow__edge-labels")[0]; + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("svg", null, [ + (openBlock(), createElementBlock("foreignObject", _hoisted_1$2, [ + (openBlock(), createBlock(Teleport, { + to: teleportTarget.value, + disabled: !teleportTarget.value + }, [ + renderSlot(_ctx.$slots, "default") + ], 8, ["to", "disabled"])) + ])) + ]); + }; + } +}); +function useNodesInitialized(options = { includeHiddenNodes: false }) { + const { nodes } = useVueFlow(); + return computed(() => { + if (nodes.value.length === 0) { + return false; + } + for (const node of nodes.value) { + if (options.includeHiddenNodes || !node.hidden) { + if ((node == null ? void 0 : node.handleBounds) === void 0 || node.dimensions.width === 0 || node.dimensions.height === 0) { + return false; + } + } + } + return true; + }); +} +var _hoisted_1$1 = { class: "vue-flow__nodes vue-flow__container" }; +var __default__$2 = { + name: "Nodes", + compatConfig: { MODE: 3 } +}; +var _sfc_main$2 = defineComponent({ + ...__default__$2, + setup(__props) { + const { getNodes, updateNodeDimensions, emits } = useVueFlow(); + const nodesInitialized = useNodesInitialized(); + const resizeObserver = ref(); + watch( + nodesInitialized, + (isInit) => { + if (isInit) { + nextTick(() => { + emits.nodesInitialized(getNodes.value); + }); + } + }, + { immediate: true } + ); + onMounted(() => { + resizeObserver.value = new ResizeObserver((entries) => { + const updates = entries.map((entry) => { + const id2 = entry.target.getAttribute("data-id"); + return { + id: id2, + nodeElement: entry.target, + forceUpdate: true + }; + }); + nextTick(() => updateNodeDimensions(updates)); + }); + }); + onBeforeUnmount(() => { + var _a; + return (_a = resizeObserver.value) == null ? void 0 : _a.disconnect(); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$1, [ + resizeObserver.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(getNodes), (node, __, ___, _cached) => { + const _memo = [node.id]; + if (_cached && _cached.key === node.id && isMemoSame(_cached, _memo)) + return _cached; + const _item = (openBlock(), createBlock(unref(NodeWrapper$1), { + id: node.id, + key: node.id, + "resize-observer": resizeObserver.value + }, null, 8, ["id", "resize-observer"])); + _item.memo = _memo; + return _item; + }, _cache, 0), 128)) : createCommentVNode("", true) + ]); + }; + } +}); +function useStylesLoadedWarning() { + const { emits } = useVueFlow(); + onMounted(() => { + if (isDev()) { + const pane = document.querySelector(".vue-flow__pane"); + if (pane && !(window.getComputedStyle(pane).zIndex === "1")) { + emits.error(new VueFlowError(ErrorCode.MISSING_STYLES)); + } + } + }); +} +var _hoisted_1 = createBaseVNode("div", { class: "vue-flow__edge-labels" }, null, -1); +var __default__$1 = { + name: "VueFlow", + compatConfig: { MODE: 3 } +}; +var _sfc_main$1 = defineComponent({ + ...__default__$1, + 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(__props, { expose: __expose, emit }) { + const props = __props; + const slots = useSlots(); + const modelValue = useVModel(props, "modelValue", emit); + const modelNodes = useVModel(props, "nodes", emit); + const modelEdges = useVModel(props, "edges", emit); + const instance = useVueFlow(props); + const dispose = useWatchProps({ modelValue, nodes: modelNodes, edges: modelEdges }, props, instance); + useHooks(emit, instance.hooks); + useOnInitHandler(); + useStylesLoadedWarning(); + provide(Slots, slots); + onUnmounted(() => { + dispose(); + }); + __expose(instance); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + ref: unref(instance).vueFlowRef, + class: "vue-flow" + }, [ + createVNode(_sfc_main$8, null, { + default: withCtx(() => [ + createVNode(_sfc_main$4), + _hoisted_1, + createVNode(_sfc_main$2), + renderSlot(_ctx.$slots, "zoom-pane") + ]), + _: 3 + }), + renderSlot(_ctx.$slots, "default"), + createVNode(_sfc_main$7) + ], 512); + }; + } +}); +var __default__ = { + name: "Panel", + compatConfig: { MODE: 3 } +}; +var _sfc_main = defineComponent({ + ...__default__, + props: { + position: {} + }, + setup(__props) { + const props = __props; + const { userSelectionActive } = useVueFlow(); + const positionClasses = computed(() => `${props.position}`.split("-")); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + class: normalizeClass(["vue-flow__panel", positionClasses.value]), + style: normalizeStyle({ pointerEvents: unref(userSelectionActive) ? "none" : "all" }) + }, [ + renderSlot(_ctx.$slots, "default") + ], 6); + }; + } +}); +function useConnection() { + const { + connectionStartHandle: startHandle, + connectionEndHandle: endHandle, + connectionStatus: status, + connectionPosition: position + } = useVueFlow(); + return { + startHandle, + endHandle, + status, + position + }; +} +function useHandleConnections(params) { + const { type, id: id2, nodeId, onConnect, onDisconnect } = params; + const { connectionLookup } = useVueFlow(); + const _nodeId = useNodeId(); + const currentNodeId = toRef(() => toValue(nodeId) ?? _nodeId); + const handleType = toRef(() => toValue(type)); + const handleId = toRef(() => toValue(id2) ?? null); + const prevConnections = ref(null); + const connections = ref(); + watch( + () => connectionLookup.value.get(`${currentNodeId.value}-${handleType.value}-${handleId.value}`), + (nextConnections) => { + if (areConnectionMapsEqual(connections.value, nextConnections)) { + return; + } + connections.value = nextConnections; + }, + { immediate: true } + ); + watch( + [connections, () => typeof onConnect !== "undefined", () => typeof onDisconnect !== "undefined"], + ([currentConnections = /* @__PURE__ */ new Map()]) => { + if (prevConnections.value && prevConnections.value !== currentConnections) { + handleConnectionChange(prevConnections.value, currentConnections, onDisconnect); + handleConnectionChange(currentConnections, prevConnections.value, onConnect); + } + prevConnections.value = currentConnections; + }, + { immediate: true } + ); + return computed(() => { + if (!connections.value) { + return []; + } + return Array.from(connections.value.values()); + }); +} +function useNodeConnections(params = {}) { + const { handleType, handleId, nodeId, onConnect, onDisconnect } = params; + const { connectionLookup } = useVueFlow(); + const _nodeId = useNodeId(); + const prevConnections = ref(null); + const connections = ref(); + const lookupKey = computed(() => { + const currNodeId = toValue(nodeId) ?? _nodeId; + const currentHandleType = toValue(handleType); + const currHandleId = toValue(handleId); + let handleSuffix = ""; + if (currentHandleType) { + handleSuffix = currHandleId ? `-${currentHandleType}-${currHandleId}` : `-${currentHandleType}`; + } + return `${currNodeId}${handleSuffix}`; + }); + watch( + () => connectionLookup.value.get(lookupKey.value), + (nextConnections) => { + if (areConnectionMapsEqual(connections.value, nextConnections)) { + return; + } + connections.value = nextConnections; + }, + { immediate: true } + ); + watch( + [connections, () => typeof onConnect !== "undefined", () => typeof onDisconnect !== "undefined"], + ([currentConnections = /* @__PURE__ */ new Map()]) => { + if (prevConnections.value && prevConnections.value !== currentConnections) { + handleConnectionChange(prevConnections.value, currentConnections, onDisconnect); + handleConnectionChange(currentConnections, prevConnections.value, onConnect); + } + prevConnections.value = currentConnections; + }, + { immediate: true } + ); + return computed(() => { + if (!connections.value) { + return []; + } + return Array.from(connections.value.values()); + }); +} +function useNodesData(_nodeIds) { + const { findNode } = useVueFlow(); + return computed({ + get() { + const nodeIds = toValue(_nodeIds); + if (!Array.isArray(nodeIds)) { + const node = findNode(nodeIds); + if (node) { + return { + id: node.id, + type: node.type, + data: node.data + }; + } + return null; + } + const data = []; + for (const nodeId of nodeIds) { + const node = findNode(nodeId); + if (node) { + data.push({ + id: node.id, + type: node.type, + data: node.data + }); + } + } + return data; + }, + set() { + warn("You are trying to set node data via useNodesData. This is not supported."); + } + }); +} +function useEdgesData(_edgeIds) { + const { findEdge } = useVueFlow(); + return computed({ + get() { + const edgeIds = toValue(_edgeIds); + if (!Array.isArray(edgeIds)) { + const edge = findEdge(edgeIds); + if (edge) { + return { + id: edge.id, + type: edge.type, + data: edge.data ?? null + }; + } + return null; + } + const data = []; + for (const edgeId of edgeIds) { + const edge = findEdge(edgeId); + if (edge) { + data.push({ + id: edge.id, + type: edge.type, + data: edge.data ?? null + }); + } + } + return data; + }, + set() { + warn("You are trying to set edge data via useEdgesData. This is not supported."); + } + }); +} + +export { + Position, + SelectionMode, + ConnectionLineType, + ConnectionMode, + MarkerType, + PanOnScrollMode, + PanelPosition, + useKeyPress, + clamp, + isEdge, + isGraphEdge, + isNode, + isGraphNode, + getOutgoers, + getIncomers, + connectionExists, + addEdge, + updateEdge, + rendererPointToPoint, + pointToRendererPoint, + getBoundsofRects, + getRectOfNodes, + getNodesInside, + getConnectedEdges, + getTransformForBounds, + getMarkerId, + wheelDelta, + applyChanges, + applyEdgeChanges, + applyNodeChanges, + ErrorCode, + VueFlowError, + isErrorOfType, + isMacOs, + VueFlow, + NodeId, + useEdge, + useGetPointerPosition, + useHandle, + useNodeId, + useNode, + useZoomPanHelper, + _sfc_main$f, + _sfc_main$e, + _sfc_main$d, + getSimpleEdgeCenter, + getBezierEdgeCenter, + getBezierPath, + getSimpleBezierPath, + getSmoothStepPath, + getStraightPath, + StraightEdge$1, + SmoothStepEdge$1, + StepEdge$1, + BezierEdge$1, + SimpleBezierEdge$1, + defaultNodeTypes, + defaultEdgeTypes, + useVueFlow, + _sfc_main$3, + useNodesInitialized, + _sfc_main$1, + _sfc_main, + useConnection, + useHandleConnections, + useNodeConnections, + useNodesData, + useEdgesData +}; +//# sourceMappingURL=chunk-OUZUAOAF.js.map diff --git a/node_modules/.vite/deps/chunk-OUZUAOAF.js.map b/node_modules/.vite/deps/chunk-OUZUAOAF.js.map new file mode 100644 index 00000000..e488ab57 --- /dev/null +++ b/node_modules/.vite/deps/chunk-OUZUAOAF.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../@vue-flow/core/dist/vue-flow-core.mjs"], + "sourcesContent": ["import { getCurrentScope, onScopeDispose, isRef, reactive, unref, toRefs as toRefs$1, customRef, ref, readonly, watch, getCurrentInstance, nextTick, computed, toValue as toValue$1, shallowRef, markRaw, inject, effectScope, toRef, onBeforeMount, defineComponent, createPropsRestProxy, onMounted, openBlock, createElementBlock, normalizeClass, renderSlot, h, Fragment, normalizeStyle, createCommentVNode, createElementVNode, mergeProps, createBlock, resolveDynamicComponent, createTextVNode, toDisplayString, useAttrs, provide, onBeforeUnmount, createVNode, withCtx, resolveComponent, renderList, Teleport, isMemoSame, useSlots, onUnmounted } from \"vue\";\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isDef$1 = (val) => typeof val !== \"undefined\";\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst noop$2 = () => {\n};\nfunction createFilterWrapper(filter2, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter2(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter2,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter2);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout: timeout2, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout2 != null) {\n promises.push(\n promiseTimeout(timeout2, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout: timeout2, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout2 != null) {\n promises.push(\n promiseTimeout(timeout2, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array2 = Array.from(v);\n return array2.includes(value) || array2.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\nconst defaultWindow = isClient ? window : void 0;\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop$2;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\nfunction createKeyPredicate$1(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate$1(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef$1(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\nvar noop$1 = { value: () => {\n} };\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || t in _ || /[\\s.]/.test(t))\n throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\nfunction Dispatch(_) {\n this._ = _;\n}\nfunction parseTypenames$1(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0)\n name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t))\n throw new Error(\"unknown type: \" + t);\n return { type: t, name };\n });\n}\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._, T = parseTypenames$1(typename + \"\", _), t, i = -1, n = T.length;\n if (arguments.length < 2) {\n while (++i < n)\n if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name)))\n return t;\n return;\n }\n if (callback != null && typeof callback !== \"function\")\n throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type)\n _[t] = set$1(_[t], typename.name, callback);\n else if (callback == null)\n for (t in _)\n _[t] = set$1(_[t], typename.name, null);\n }\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _)\n copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0)\n for (var args = new Array(n), i = 0, n, t; i < n; ++i)\n args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type))\n throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i)\n t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type))\n throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i)\n t[i].value.apply(that, args);\n }\n};\nfunction get$1(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\nfunction set$1(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop$1, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null)\n type.push({ name, value: callback });\n return type;\n}\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\nconst namespaces = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction namespace(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\")\n name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix], local: name } : name;\n}\nfunction creatorInherit(name) {\n return function() {\n var document2 = this.ownerDocument, uri = this.namespaceURI;\n return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name);\n };\n}\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\nfunction creator(name) {\n var fullname = namespace(name);\n return (fullname.local ? creatorFixed : creatorInherit)(fullname);\n}\nfunction none() {\n}\nfunction selector(selector2) {\n return selector2 == null ? none : function() {\n return this.querySelector(selector2);\n };\n}\nfunction selection_select(select2) {\n if (typeof select2 !== \"function\")\n select2 = selector(select2);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node)\n subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n return new Selection$1(subgroups, this._parents);\n}\nfunction array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\nfunction empty() {\n return [];\n}\nfunction selectorAll(selector2) {\n return selector2 == null ? empty : function() {\n return this.querySelectorAll(selector2);\n };\n}\nfunction arrayAll(select2) {\n return function() {\n return array(select2.apply(this, arguments));\n };\n}\nfunction selection_selectAll(select2) {\n if (typeof select2 === \"function\")\n select2 = arrayAll(select2);\n else\n select2 = selectorAll(select2);\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select2.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n return new Selection$1(subgroups, parents);\n}\nfunction matcher(selector2) {\n return function() {\n return this.matches(selector2);\n };\n}\nfunction childMatcher(selector2) {\n return function(node) {\n return node.matches(selector2);\n };\n}\nvar find = Array.prototype.find;\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\nfunction childFirst() {\n return this.firstElementChild;\n}\nfunction selection_selectChild(match) {\n return this.select(match == null ? childFirst : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\nvar filter = Array.prototype.filter;\nfunction children() {\n return Array.from(this.children);\n}\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\nfunction selection_selectChildren(match) {\n return this.selectAll(match == null ? children : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\nfunction selection_filter(match) {\n if (typeof match !== \"function\")\n match = matcher(match);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n return new Selection$1(subgroups, this._parents);\n}\nfunction sparse(update) {\n return new Array(update.length);\n}\nfunction selection_enter() {\n return new Selection$1(this._enter || this._groups.map(sparse), this._parents);\n}\nfunction EnterNode(parent, datum2) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum2;\n}\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) {\n return this._parent.insertBefore(child, this._next);\n },\n insertBefore: function(child, next) {\n return this._parent.insertBefore(child, next);\n },\n querySelector: function(selector2) {\n return this._parent.querySelector(selector2);\n },\n querySelectorAll: function(selector2) {\n return this._parent.querySelectorAll(selector2);\n }\n};\nfunction constant$3(x) {\n return function() {\n return x;\n };\n}\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0, node, groupLength = group.length, dataLength = data.length;\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {\n exit[i] = node;\n }\n }\n}\nfunction datum(node) {\n return node.__data__;\n}\nfunction selection_data(value, key) {\n if (!arguments.length)\n return Array.from(this, datum);\n var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;\n if (typeof value !== \"function\")\n value = constant$3(value);\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1)\n i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength)\n ;\n previous._next = next || null;\n }\n }\n }\n update = new Selection$1(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data ? data : Array.from(data);\n}\nfunction selection_exit() {\n return new Selection$1(this._exit || this._groups.map(sparse), this._parents);\n}\nfunction selection_join(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter)\n enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update)\n update = update.selection();\n }\n if (onexit == null)\n exit.remove();\n else\n onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\nfunction selection_merge(context) {\n var selection2 = context.selection ? context.selection() : context;\n for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n return new Selection$1(merges, this._parents);\n}\nfunction selection_order() {\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4)\n next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n return this;\n}\nfunction selection_sort(compare) {\n if (!compare)\n compare = ascending;\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n return new Selection$1(sortgroups, this._parents).order();\n}\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\nfunction selection_call() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\nfunction selection_nodes() {\n return Array.from(this);\n}\nfunction selection_node() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node)\n return node;\n }\n }\n return null;\n}\nfunction selection_size() {\n let size = 0;\n for (const node of this)\n ++size;\n return size;\n}\nfunction selection_empty() {\n return !this.node();\n}\nfunction selection_each(callback) {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i])\n callback.call(node, node.__data__, i, group);\n }\n }\n return this;\n}\nfunction attrRemove$1(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\nfunction attrRemoveNS$1(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\nfunction attrConstant$1(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\nfunction attrConstantNS$1(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\nfunction attrFunction$1(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null)\n this.removeAttribute(name);\n else\n this.setAttribute(name, v);\n };\n}\nfunction attrFunctionNS$1(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null)\n this.removeAttributeNS(fullname.space, fullname.local);\n else\n this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\nfunction selection_attr(name, value) {\n var fullname = namespace(name);\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);\n }\n return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === \"function\" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));\n}\nfunction defaultView(node) {\n return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;\n}\nfunction styleRemove$1(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\nfunction styleConstant$1(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\nfunction styleFunction$1(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null)\n this.style.removeProperty(name);\n else\n this.style.setProperty(name, v, priority);\n };\n}\nfunction selection_style(name, value, priority) {\n return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === \"function\" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? \"\" : priority)) : styleValue(this.node(), name);\n}\nfunction styleValue(node, name) {\n return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\nfunction propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null)\n delete this[name];\n else\n this[name] = v;\n };\n}\nfunction selection_property(name, value) {\n return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === \"function\" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];\n}\nfunction classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n)\n list.add(names[i]);\n}\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n)\n list.remove(names[i]);\n}\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\nfunction selection_classed(name, value) {\n var names = classArray(name + \"\");\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n)\n if (!list.contains(names[i]))\n return false;\n return true;\n }\n return this.each((typeof value === \"function\" ? classedFunction : value ? classedTrue : classedFalse)(names, value));\n}\nfunction textRemove() {\n this.textContent = \"\";\n}\nfunction textConstant$1(value) {\n return function() {\n this.textContent = value;\n };\n}\nfunction textFunction$1(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\nfunction selection_text(value) {\n return arguments.length ? this.each(value == null ? textRemove : (typeof value === \"function\" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;\n}\nfunction htmlRemove() {\n this.innerHTML = \"\";\n}\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\nfunction selection_html(value) {\n return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === \"function\" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;\n}\nfunction raise() {\n if (this.nextSibling)\n this.parentNode.appendChild(this);\n}\nfunction selection_raise() {\n return this.each(raise);\n}\nfunction lower() {\n if (this.previousSibling)\n this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction selection_lower() {\n return this.each(lower);\n}\nfunction selection_append(name) {\n var create2 = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create2.apply(this, arguments));\n });\n}\nfunction constantNull() {\n return null;\n}\nfunction selection_insert(name, before) {\n var create2 = typeof name === \"function\" ? name : creator(name), select2 = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create2.apply(this, arguments), select2.apply(this, arguments) || null);\n });\n}\nfunction remove() {\n var parent = this.parentNode;\n if (parent)\n parent.removeChild(this);\n}\nfunction selection_remove() {\n return this.each(remove);\n}\nfunction selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\nfunction selection_clone(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\nfunction selection_datum(value) {\n return arguments.length ? this.property(\"__data__\", value) : this.node().__data__;\n}\nfunction contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0)\n name = t.slice(i + 1), t = t.slice(0, i);\n return { type: t, name };\n });\n}\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on)\n return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i)\n on.length = i;\n else\n delete this.__on;\n };\n}\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on)\n for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = { type: typename.type, name: typename.name, value, listener, options };\n if (!on)\n this.__on = [o];\n else\n on.push(o);\n };\n}\nfunction selection_on(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on)\n for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i)\n this.each(on(typenames[i], value, options));\n return this;\n}\nfunction dispatchEvent(node, type, params) {\n var window2 = defaultView(node), event = window2.CustomEvent;\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window2.document.createEvent(\"Event\");\n if (params)\n event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else\n event.initEvent(type, false, false);\n }\n node.dispatchEvent(event);\n}\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\nfunction selection_dispatch(type, params) {\n return this.each((typeof params === \"function\" ? dispatchFunction : dispatchConstant)(type, params));\n}\nfunction* selection_iterator() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i])\n yield node;\n }\n }\n}\nvar root = [null];\nfunction Selection$1(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\nfunction selection() {\n return new Selection$1([[document.documentElement]], root);\n}\nfunction selection_selection() {\n return this;\n}\nSelection$1.prototype = selection.prototype = {\n constructor: Selection$1,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\nfunction select(selector2) {\n return typeof selector2 === \"string\" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root);\n}\nfunction sourceEvent(event) {\n let sourceEvent2;\n while (sourceEvent2 = event.sourceEvent)\n event = sourceEvent2;\n return event;\n}\nfunction pointer(event, node) {\n event = sourceEvent(event);\n if (node === void 0)\n node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\nconst nonpassive = { passive: false };\nconst nonpassivecapture = { capture: true, passive: false };\nfunction nopropagation$1(event) {\n event.stopImmediatePropagation();\n}\nfunction noevent$1(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\nfunction dragDisable(view) {\n var root2 = view.document.documentElement, selection2 = select(view).on(\"dragstart.drag\", noevent$1, nonpassivecapture);\n if (\"onselectstart\" in root2) {\n selection2.on(\"selectstart.drag\", noevent$1, nonpassivecapture);\n } else {\n root2.__noselect = root2.style.MozUserSelect;\n root2.style.MozUserSelect = \"none\";\n }\n}\nfunction yesdrag(view, noclick) {\n var root2 = view.document.documentElement, selection2 = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection2.on(\"click.drag\", noevent$1, nonpassivecapture);\n setTimeout(function() {\n selection2.on(\"click.drag\", null);\n }, 0);\n }\n if (\"onselectstart\" in root2) {\n selection2.on(\"selectstart.drag\", null);\n } else {\n root2.style.MozUserSelect = root2.__noselect;\n delete root2.__noselect;\n }\n}\nconst constant$2 = (x) => () => x;\nfunction DragEvent(type, {\n sourceEvent: sourceEvent2,\n subject,\n target,\n identifier,\n active,\n x,\n y,\n dx,\n dy,\n dispatch: dispatch2\n}) {\n Object.defineProperties(this, {\n type: { value: type, enumerable: true, configurable: true },\n sourceEvent: { value: sourceEvent2, enumerable: true, configurable: true },\n subject: { value: subject, enumerable: true, configurable: true },\n target: { value: target, enumerable: true, configurable: true },\n identifier: { value: identifier, enumerable: true, configurable: true },\n active: { value: active, enumerable: true, configurable: true },\n x: { value: x, enumerable: true, configurable: true },\n y: { value: y, enumerable: true, configurable: true },\n dx: { value: dx, enumerable: true, configurable: true },\n dy: { value: dy, enumerable: true, configurable: true },\n _: { value: dispatch2 }\n });\n}\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\nfunction defaultFilter$1(event) {\n return !event.ctrlKey && !event.button;\n}\nfunction defaultContainer() {\n return this.parentNode;\n}\nfunction defaultSubject(event, d) {\n return d == null ? { x: event.x, y: event.y } : d;\n}\nfunction defaultTouchable$1() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction drag() {\n var filter2 = defaultFilter$1, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable$1, gestures = {}, listeners = dispatch(\"start\", \"drag\", \"end\"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0;\n function drag2(selection2) {\n selection2.on(\"mousedown.drag\", mousedowned).filter(touchable).on(\"touchstart.drag\", touchstarted).on(\"touchmove.drag\", touchmoved, nonpassive).on(\"touchend.drag touchcancel.drag\", touchended).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function mousedowned(event, d) {\n if (touchending || !filter2.call(this, event, d))\n return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture)\n return;\n select(event.view).on(\"mousemove.drag\", mousemoved, nonpassivecapture).on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n dragDisable(event.view);\n nopropagation$1(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n function mousemoved(event) {\n noevent$1(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent$1(event);\n gestures.mouse(\"end\", event);\n }\n function touchstarted(event, d) {\n if (!filter2.call(this, event, d))\n return;\n var touches = event.changedTouches, c = container.call(this, event, d), n = touches.length, i, gesture;\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation$1(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n function touchmoved(event) {\n var touches = event.changedTouches, n = touches.length, i, gesture;\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent$1(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n function touchended(event) {\n var touches = event.changedTouches, n = touches.length, i, gesture;\n if (touchending)\n clearTimeout(touchending);\n touchending = setTimeout(function() {\n touchending = null;\n }, 500);\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation$1(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n function beforestart(that, container2, event, d, identifier, touch) {\n var dispatch2 = listeners.copy(), p = pointer(touch || event, container2), dx, dy, s;\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag2,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch: dispatch2\n }), d)) == null)\n return;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return function gesture(type, event2, touch2) {\n var p0 = p, n;\n switch (type) {\n case \"start\":\n gestures[identifier] = gesture, n = active++;\n break;\n case \"end\":\n delete gestures[identifier], --active;\n case \"drag\":\n p = pointer(touch2 || event2, container2), n = active;\n break;\n }\n dispatch2.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event2,\n subject: s,\n target: drag2,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch: dispatch2\n }),\n d\n );\n };\n }\n drag2.filter = function(_) {\n return arguments.length ? (filter2 = typeof _ === \"function\" ? _ : constant$2(!!_), drag2) : filter2;\n };\n drag2.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant$2(_), drag2) : container;\n };\n drag2.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant$2(_), drag2) : subject;\n };\n drag2.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant$2(!!_), drag2) : touchable;\n };\n drag2.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag2 : value;\n };\n drag2.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag2) : Math.sqrt(clickDistance2);\n };\n return drag2;\n}\nfunction define(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\nfunction extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition)\n prototype[key] = definition[key];\n return prototype;\n}\nfunction Color() {\n}\nvar darker = 0.7;\nvar brighter = 1 / darker;\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\", reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`), reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`), reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`), reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`), reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`), reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\nvar named = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor(), this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\nfunction color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0) : null;\n}\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);\n}\nfunction rgba(r, g, b, a) {\n if (a <= 0)\n r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\nfunction rgbConvert(o) {\n if (!(o instanceof Color))\n o = color(o);\n if (!o)\n return new Rgb();\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\nfunction rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\nfunction Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\nfunction hsla(h2, s, l, a) {\n if (a <= 0)\n h2 = s = l = NaN;\n else if (l <= 0 || l >= 1)\n h2 = s = NaN;\n else if (s <= 0)\n h2 = NaN;\n return new Hsl(h2, s, l, a);\n}\nfunction hslConvert(o) {\n if (o instanceof Hsl)\n return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color))\n o = color(o);\n if (!o)\n return new Hsl();\n if (o instanceof Hsl)\n return o;\n o = o.rgb();\n var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h2 = NaN, s = max - min, l = (max + min) / 2;\n if (s) {\n if (r === max)\n h2 = (g - b) / s + (g < b) * 6;\n else if (g === max)\n h2 = (b - r) / s + 2;\n else\n h2 = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h2 *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h2;\n }\n return new Hsl(h2, s, l, o.opacity);\n}\nfunction hsl(h2, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h2) : new Hsl(h2, s, l, opacity == null ? 1 : opacity);\n}\nfunction Hsl(h2, s, l, opacity) {\n this.h = +h2;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h2 = this.h % 360 + (this.h < 0) * 360, s = isNaN(h2) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h2 >= 240 ? h2 - 240 : h2 + 120, m1, m2),\n hsl2rgb(h2, m1, m2),\n hsl2rgb(h2 < 120 ? h2 + 240 : h2 - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\nfunction hsl2rgb(h2, m1, m2) {\n return (h2 < 60 ? m1 + (m2 - m1) * h2 / 60 : h2 < 180 ? m2 : h2 < 240 ? m1 + (m2 - m1) * (240 - h2) / 60 : m1) * 255;\n}\nconst constant$1 = (x) => () => x;\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\nfunction gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant$1(isNaN(a) ? b : a);\n };\n}\nfunction nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant$1(isNaN(a) ? b : a);\n}\nconst interpolateRgb = function rgbGamma(y) {\n var color2 = gamma(y);\n function rgb$1(start2, end) {\n var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);\n return function(t) {\n start2.r = r(t);\n start2.g = g(t);\n start2.b = b(t);\n start2.opacity = opacity(t);\n return start2 + \"\";\n };\n }\n rgb$1.gamma = rgbGamma;\n return rgb$1;\n}(1);\nfunction numberArray(a, b) {\n if (!b)\n b = [];\n var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;\n return function(t) {\n for (i = 0; i < n; ++i)\n c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\nfunction isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\nfunction genericArray(a, b) {\n var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;\n for (i = 0; i < na; ++i)\n x[i] = interpolate$1(a[i], b[i]);\n for (; i < nb; ++i)\n c[i] = b[i];\n return function(t) {\n for (i = 0; i < na; ++i)\n c[i] = x[i](t);\n return c;\n };\n}\nfunction date(a, b) {\n var d = /* @__PURE__ */ new Date();\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\nfunction interpolateNumber(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\nfunction object(a, b) {\n var i = {}, c = {}, k;\n if (a === null || typeof a !== \"object\")\n a = {};\n if (b === null || typeof b !== \"object\")\n b = {};\n for (k in b) {\n if (k in a) {\n i[k] = interpolate$1(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n return function(t) {\n for (k in i)\n c[k] = i[k](t);\n return c;\n };\n}\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, reB = new RegExp(reA.source, \"g\");\nfunction zero(b) {\n return function() {\n return b;\n };\n}\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\nfunction interpolateString(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];\n a = a + \"\", b = b + \"\";\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n bs = b.slice(bi, bs);\n if (s[i])\n s[i] += bs;\n else\n s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) {\n if (s[i])\n s[i] += bm;\n else\n s[++i] = bm;\n } else {\n s[++i] = null;\n q.push({ i, x: interpolateNumber(am, bm) });\n }\n bi = reB.lastIndex;\n }\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i])\n s[i] += bs;\n else\n s[++i] = bs;\n }\n return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {\n for (var i2 = 0, o; i2 < b; ++i2)\n s[(o = q[i2]).i] = o.x(t);\n return s.join(\"\");\n });\n}\nfunction interpolate$1(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant$1(b) : (t === \"number\" ? interpolateNumber : t === \"string\" ? (c = color(b)) ? (b = c, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : interpolateNumber)(a, b);\n}\nvar degrees = 180 / Math.PI;\nvar identity$1 = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction decompose(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b))\n a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d)\n c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d))\n c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c)\n a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX,\n scaleY\n };\n}\nvar svgNode;\nfunction parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity$1 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\nfunction parseSvg(value) {\n if (value == null)\n return identity$1;\n if (!svgNode)\n svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate()))\n return identity$1;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) });\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180)\n b += 360;\n else if (b - a > 180)\n a += 360;\n q.push({ i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: interpolateNumber(a, b) });\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({ i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: interpolateNumber(a, b) });\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) });\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n return function(a, b) {\n var s = [], q = [];\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null;\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n)\n s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\nvar interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\nvar epsilon2 = 1e-12;\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\nconst interpolateZoom = function zoomRho(rho, rho2, rho4) {\n function zoom2(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n };\n } else {\n var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n };\n }\n i.duration = S * 1e3 * rho / Math.SQRT2;\n return i;\n }\n zoom2.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n return zoom2;\n}(Math.SQRT2, 2, 4);\nvar frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance === \"object\" && performance.now ? performance : Date, setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {\n setTimeout(f, 17);\n};\nfunction now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\nfunction clearNow() {\n clockNow = 0;\n}\nfunction Timer() {\n this._call = this._time = this._next = null;\n}\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\")\n throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail)\n taskTail._next = this;\n else\n taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\nfunction timer(callback, delay, time) {\n var t = new Timer();\n t.restart(callback, delay, time);\n return t;\n}\nfunction timerFlush() {\n now();\n ++frame;\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0)\n t._call.call(void 0, e);\n t = t._next;\n }\n --frame;\n}\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout$1 = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\nfunction poke() {\n var now2 = clock.now(), delay = now2 - clockLast;\n if (delay > pokeDelay)\n clockSkew -= delay, clockLast = now2;\n}\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time)\n time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\nfunction sleep(time) {\n if (frame)\n return;\n if (timeout$1)\n timeout$1 = clearTimeout(timeout$1);\n var delay = time - clockNow;\n if (delay > 24) {\n if (time < Infinity)\n timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval)\n interval = clearInterval(interval);\n } else {\n if (!interval)\n clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\nfunction timeout(callback, delay, time) {\n var t = new Timer();\n delay = delay == null ? 0 : +delay;\n t.restart((elapsed) => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\nfunction schedule(node, name, id2, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules)\n node.__transition = {};\n else if (id2 in schedules)\n return;\n create(node, id2, {\n name,\n index,\n // For context during callback.\n group,\n // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\nfunction init(node, id2) {\n var schedule2 = get(node, id2);\n if (schedule2.state > CREATED)\n throw new Error(\"too late; already scheduled\");\n return schedule2;\n}\nfunction set(node, id2) {\n var schedule2 = get(node, id2);\n if (schedule2.state > STARTED)\n throw new Error(\"too late; already running\");\n return schedule2;\n}\nfunction get(node, id2) {\n var schedule2 = node.__transition;\n if (!schedule2 || !(schedule2 = schedule2[id2]))\n throw new Error(\"transition not found\");\n return schedule2;\n}\nfunction create(node, id2, self) {\n var schedules = node.__transition, tween;\n schedules[id2] = self;\n self.timer = timer(schedule2, 0, self.time);\n function schedule2(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start2, self.delay, self.time);\n if (self.delay <= elapsed)\n start2(elapsed - self.delay);\n }\n function start2(elapsed) {\n var i, j, n, o;\n if (self.state !== SCHEDULED)\n return stop();\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name)\n continue;\n if (o.state === STARTED)\n return timeout(start2);\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n } else if (+i < id2) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING)\n return;\n self.state = STARTED;\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length;\n while (++i < n) {\n tween[i].call(node, t);\n }\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id2];\n for (var i in schedules)\n return;\n delete node.__transition;\n }\n}\nfunction interrupt(node, name) {\n var schedules = node.__transition, schedule2, active, empty2 = true, i;\n if (!schedules)\n return;\n name = name == null ? null : name + \"\";\n for (i in schedules) {\n if ((schedule2 = schedules[i]).name !== name) {\n empty2 = false;\n continue;\n }\n active = schedule2.state > STARTING && schedule2.state < ENDING;\n schedule2.state = ENDED;\n schedule2.timer.stop();\n schedule2.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule2.index, schedule2.group);\n delete schedules[i];\n }\n if (empty2)\n delete node.__transition;\n}\nfunction selection_interrupt(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\nfunction tweenRemove(id2, name) {\n var tween0, tween1;\n return function() {\n var schedule2 = set(this, id2), tween = schedule2.tween;\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n schedule2.tween = tween1;\n };\n}\nfunction tweenFunction(id2, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\")\n throw new Error();\n return function() {\n var schedule2 = set(this, id2), tween = schedule2.tween;\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n)\n tween1.push(t);\n }\n schedule2.tween = tween1;\n };\n}\nfunction transition_tween(name, value) {\n var id2 = this._id;\n name += \"\";\n if (arguments.length < 2) {\n var tween = get(this.node(), id2).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n return this.each((value == null ? tweenRemove : tweenFunction)(id2, name, value));\n}\nfunction tweenValue(transition, name, value) {\n var id2 = transition._id;\n transition.each(function() {\n var schedule2 = set(this, id2);\n (schedule2.value || (schedule2.value = {}))[name] = value.apply(this, arguments);\n });\n return function(node) {\n return get(node, id2).value[name];\n };\n}\nfunction interpolate(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b);\n}\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\nfunction attrConstant(name, interpolate2, value1) {\n var string00, string1 = value1 + \"\", interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);\n };\n}\nfunction attrConstantNS(fullname, interpolate2, value1) {\n var string00, string1 = value1 + \"\", interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);\n };\n}\nfunction attrFunction(name, interpolate2, value) {\n var string00, string10, interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null)\n return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));\n };\n}\nfunction attrFunctionNS(fullname, interpolate2, value) {\n var string00, string10, interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null)\n return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));\n };\n}\nfunction transition_attr(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransformSvg : interpolate;\n return this.attrTween(name, typeof value === \"function\" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0)\n t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0)\n t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nfunction transition_attrTween(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2)\n return (key = this.tween(key)) && key._value;\n if (value == null)\n return this.tween(key, null);\n if (typeof value !== \"function\")\n throw new Error();\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\nfunction delayFunction(id2, value) {\n return function() {\n init(this, id2).delay = +value.apply(this, arguments);\n };\n}\nfunction delayConstant(id2, value) {\n return value = +value, function() {\n init(this, id2).delay = value;\n };\n}\nfunction transition_delay(value) {\n var id2 = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? delayFunction : delayConstant)(id2, value)) : get(this.node(), id2).delay;\n}\nfunction durationFunction(id2, value) {\n return function() {\n set(this, id2).duration = +value.apply(this, arguments);\n };\n}\nfunction durationConstant(id2, value) {\n return value = +value, function() {\n set(this, id2).duration = value;\n };\n}\nfunction transition_duration(value) {\n var id2 = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? durationFunction : durationConstant)(id2, value)) : get(this.node(), id2).duration;\n}\nfunction easeConstant(id2, value) {\n if (typeof value !== \"function\")\n throw new Error();\n return function() {\n set(this, id2).ease = value;\n };\n}\nfunction transition_ease(value) {\n var id2 = this._id;\n return arguments.length ? this.each(easeConstant(id2, value)) : get(this.node(), id2).ease;\n}\nfunction easeVarying(id2, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\")\n throw new Error();\n set(this, id2).ease = v;\n };\n}\nfunction transition_easeVarying(value) {\n if (typeof value !== \"function\")\n throw new Error();\n return this.each(easeVarying(this._id, value));\n}\nfunction transition_filter(match) {\n if (typeof match !== \"function\")\n match = matcher(match);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\nfunction transition_merge(transition) {\n if (transition._id !== this._id)\n throw new Error();\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n return new Transition(merges, this._parents, this._name, this._id);\n}\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0)\n t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\nfunction onFunction(id2, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule2 = sit(this, id2), on = schedule2.on;\n if (on !== on0)\n (on1 = (on0 = on).copy()).on(name, listener);\n schedule2.on = on1;\n };\n}\nfunction transition_on(name, listener) {\n var id2 = this._id;\n return arguments.length < 2 ? get(this.node(), id2).on.on(name) : this.each(onFunction(id2, name, listener));\n}\nfunction removeFunction(id2) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition)\n if (+i !== id2)\n return;\n if (parent)\n parent.removeChild(this);\n };\n}\nfunction transition_remove() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\nfunction transition_select(select2) {\n var name = this._name, id2 = this._id;\n if (typeof select2 !== \"function\")\n select2 = selector(select2);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select2.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node)\n subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id2, i, subgroup, get(node, id2));\n }\n }\n }\n return new Transition(subgroups, this._parents, name, id2);\n}\nfunction transition_selectAll(select2) {\n var name = this._name, id2 = this._id;\n if (typeof select2 !== \"function\")\n select2 = selectorAll(select2);\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children2 = select2.call(node, node.__data__, i, group), child, inherit2 = get(node, id2), k = 0, l = children2.length; k < l; ++k) {\n if (child = children2[k]) {\n schedule(child, name, id2, k, children2, inherit2);\n }\n }\n subgroups.push(children2);\n parents.push(node);\n }\n }\n }\n return new Transition(subgroups, parents, name, id2);\n}\nvar Selection = selection.prototype.constructor;\nfunction transition_selection() {\n return new Selection(this._groups, this._parents);\n}\nfunction styleNull(name, interpolate2) {\n var string00, string10, interpolate0;\n return function() {\n var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1);\n };\n}\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\nfunction styleConstant(name, interpolate2, value1) {\n var string00, string1 = value1 + \"\", interpolate0;\n return function() {\n var string0 = styleValue(this, name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);\n };\n}\nfunction styleFunction(name, interpolate2, value) {\n var string00, string10, interpolate0;\n return function() {\n var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + \"\";\n if (value1 == null)\n string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));\n };\n}\nfunction styleMaybeRemove(id2, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove2;\n return function() {\n var schedule2 = set(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove(name)) : void 0;\n if (on !== on0 || listener0 !== listener)\n (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n schedule2.on = on1;\n };\n}\nfunction transition_style(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransformCss : interpolate;\n return value == null ? this.styleTween(name, styleNull(name, i)).on(\"end.style.\" + name, styleRemove(name)) : typeof value === \"function\" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on(\"end.style.\" + name, null);\n}\nfunction styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0)\n t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\nfunction transition_styleTween(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2)\n return (key = this.tween(key)) && key._value;\n if (value == null)\n return this.tween(key, null);\n if (typeof value !== \"function\")\n throw new Error();\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\nfunction transition_text(value) {\n return this.tween(\"text\", typeof value === \"function\" ? textFunction(tweenValue(this, \"text\", value)) : textConstant(value == null ? \"\" : value + \"\"));\n}\nfunction textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0)\n t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nfunction transition_textTween(value) {\n var key = \"text\";\n if (arguments.length < 1)\n return (key = this.tween(key)) && key._value;\n if (value == null)\n return this.tween(key, null);\n if (typeof value !== \"function\")\n throw new Error();\n return this.tween(key, textTween(value));\n}\nfunction transition_transition() {\n var name = this._name, id0 = this._id, id1 = newId();\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit2 = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit2.time + inherit2.delay + inherit2.duration,\n delay: 0,\n duration: inherit2.duration,\n ease: inherit2.ease\n });\n }\n }\n }\n return new Transition(groups, this._parents, name, id1);\n}\nfunction transition_end() {\n var on0, on1, that = this, id2 = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = { value: reject }, end = { value: function() {\n if (--size === 0)\n resolve();\n } };\n that.each(function() {\n var schedule2 = set(this, id2), on = schedule2.on;\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n schedule2.on = on1;\n });\n if (size === 0)\n resolve();\n });\n}\nvar id = 0;\nfunction Transition(groups, parents, name, id2) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id2;\n}\nfunction newId() {\n return ++id;\n}\nvar selection_prototype = selection.prototype;\nTransition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\nfunction cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\nvar defaultTiming = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: cubicInOut\n};\nfunction inherit(node, id2) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id2])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id2} not found`);\n }\n }\n return timing;\n}\nfunction selection_transition(name) {\n var id2, timing;\n if (name instanceof Transition) {\n id2 = name._id, name = name._name;\n } else {\n id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id2, i, group, timing || inherit(node, id2));\n }\n }\n }\n return new Transition(groups, this._parents, name, id2);\n}\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\nconst constant = (x) => () => x;\nfunction ZoomEvent(type, {\n sourceEvent: sourceEvent2,\n target,\n transform,\n dispatch: dispatch2\n}) {\n Object.defineProperties(this, {\n type: { value: type, enumerable: true, configurable: true },\n sourceEvent: { value: sourceEvent2, enumerable: true, configurable: true },\n target: { value: target, enumerable: true, configurable: true },\n transform: { value: transform, enumerable: true, configurable: true },\n _: { value: dispatch2 }\n });\n}\nfunction Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar identity = new Transform(1, 0, 0);\nTransform.prototype;\nfunction nopropagation(event) {\n event.stopImmediatePropagation();\n}\nfunction noevent(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === \"wheel\") && !event.button;\n}\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * (event.ctrlKey ? 10 : 1);\n}\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\nfunction zoom() {\n var filter2 = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate2 = interpolateZoom, listeners = dispatch(\"start\", \"zoom\", \"end\"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;\n function zoom2(selection2) {\n selection2.property(\"__zoom\", defaultTransform).on(\"wheel.zoom\", wheeled, { passive: false }).on(\"mousedown.zoom\", mousedowned).on(\"dblclick.zoom\", dblclicked).filter(touchable).on(\"touchstart.zoom\", touchstarted).on(\"touchmove.zoom\", touchmoved).on(\"touchend.zoom touchcancel.zoom\", touchended).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n zoom2.transform = function(collection, transform, point, event) {\n var selection2 = collection.selection ? collection.selection() : collection;\n selection2.property(\"__zoom\", defaultTransform);\n if (collection !== selection2) {\n schedule2(collection, transform, point, event);\n } else {\n selection2.interrupt().each(function() {\n gesture(this, arguments).event(event).start().zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform).end();\n });\n }\n };\n zoom2.scaleBy = function(selection2, k, p, event) {\n zoom2.scaleTo(selection2, function() {\n var k0 = this.__zoom.k, k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n zoom2.scaleTo = function(selection2, k, p, event) {\n zoom2.transform(selection2, function() {\n var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n zoom2.translateBy = function(selection2, x, y, event) {\n zoom2.transform(selection2, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n zoom2.translateTo = function(selection2, x, y, p, event) {\n zoom2.transform(selection2, function() {\n var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n function centroid(extent2) {\n return [(+extent2[0][0] + +extent2[1][0]) / 2, (+extent2[0][1] + +extent2[1][1]) / 2];\n }\n function schedule2(transition, transform, point, event) {\n transition.on(\"start.zoom\", function() {\n gesture(this, arguments).event(event).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n gesture(this, arguments).event(event).end();\n }).tween(\"zoom\", function() {\n var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === \"function\" ? transform.apply(that, args) : transform, i = interpolate2(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1)\n t = b;\n else {\n var l = i(t), k = w / l[2];\n t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);\n }\n g.zoom(null, t);\n };\n });\n }\n function gesture(that, args, clean) {\n return !clean && that.__zooming || new Gesture(that, args);\n }\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n Gesture.prototype = {\n event: function(event) {\n if (event)\n this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\")\n this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\")\n this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\")\n this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom2,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n function wheeled(event, ...args) {\n if (!filter2.apply(this, arguments))\n return;\n var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta2.apply(this, arguments)))), p = pointer(event);\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n } else if (t.k === k)\n return;\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n function mousedowned(event, ...args) {\n if (touchending || !filter2.apply(this, arguments))\n return;\n var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true), p = pointer(event, currentTarget), x0 = event.clientX, y0 = event.clientY;\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n function mousemoved(event2) {\n noevent(event2);\n if (!g.moved) {\n var dx = event2.clientX - x0, dy = event2.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event2).zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event2, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n function mouseupped(event2) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n yesdrag(event2.view, g.moved);\n noevent(event2);\n g.event(event2).end();\n }\n }\n function dblclicked(event, ...args) {\n if (!filter2.apply(this, arguments))\n return;\n var t0 = this.__zoom, p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n noevent(event);\n if (duration > 0)\n select(this).transition().duration(duration).call(schedule2, t1, p0, event);\n else\n select(this).call(zoom2.transform, t1, p0, event);\n }\n function touchstarted(event, ...args) {\n if (!filter2.apply(this, arguments))\n return;\n var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0)\n g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2])\n g.touch1 = p, g.taps = 0;\n }\n if (touchstarting)\n touchstarting = clearTimeout(touchstarting);\n if (started) {\n if (g.taps < 2)\n touchfirst = p[0], touchstarting = setTimeout(function() {\n touchstarting = null;\n }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n function touchmoved(event, ...args) {\n if (!this.__zooming)\n return;\n var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier)\n g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier)\n g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n } else if (g.touch0)\n p = g.touch0[0], l = g.touch0[1];\n else\n return;\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n function touchended(event, ...args) {\n if (!this.__zooming)\n return;\n var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;\n nopropagation(event);\n if (touchending)\n clearTimeout(touchending);\n touchending = setTimeout(function() {\n touchending = null;\n }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier)\n delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier)\n delete g.touch1;\n }\n if (g.touch1 && !g.touch0)\n g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0)\n g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p)\n p.apply(this, arguments);\n }\n }\n }\n }\n zoom2.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta2 = typeof _ === \"function\" ? _ : constant(+_), zoom2) : wheelDelta2;\n };\n zoom2.filter = function(_) {\n return arguments.length ? (filter2 = typeof _ === \"function\" ? _ : constant(!!_), zoom2) : filter2;\n };\n zoom2.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom2) : touchable;\n };\n zoom2.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom2) : extent;\n };\n zoom2.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom2) : [scaleExtent[0], scaleExtent[1]];\n };\n zoom2.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom2) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n zoom2.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom2) : constrain;\n };\n zoom2.duration = function(_) {\n return arguments.length ? (duration = +_, zoom2) : duration;\n };\n zoom2.interpolate = function(_) {\n return arguments.length ? (interpolate2 = _, zoom2) : interpolate2;\n };\n zoom2.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom2 : value;\n };\n zoom2.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom2) : Math.sqrt(clickDistance2);\n };\n zoom2.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom2) : tapDistance;\n };\n return zoom2;\n}\nvar Position = /* @__PURE__ */ ((Position2) => {\n Position2[\"Left\"] = \"left\";\n Position2[\"Top\"] = \"top\";\n Position2[\"Right\"] = \"right\";\n Position2[\"Bottom\"] = \"bottom\";\n return Position2;\n})(Position || {});\nvar SelectionMode = /* @__PURE__ */ ((SelectionMode2) => {\n SelectionMode2[\"Partial\"] = \"partial\";\n SelectionMode2[\"Full\"] = \"full\";\n return SelectionMode2;\n})(SelectionMode || {});\nvar ConnectionLineType = /* @__PURE__ */ ((ConnectionLineType2) => {\n ConnectionLineType2[\"Bezier\"] = \"default\";\n ConnectionLineType2[\"SimpleBezier\"] = \"simple-bezier\";\n ConnectionLineType2[\"Straight\"] = \"straight\";\n ConnectionLineType2[\"Step\"] = \"step\";\n ConnectionLineType2[\"SmoothStep\"] = \"smoothstep\";\n return ConnectionLineType2;\n})(ConnectionLineType || {});\nvar ConnectionMode = /* @__PURE__ */ ((ConnectionMode2) => {\n ConnectionMode2[\"Strict\"] = \"strict\";\n ConnectionMode2[\"Loose\"] = \"loose\";\n return ConnectionMode2;\n})(ConnectionMode || {});\nvar MarkerType = /* @__PURE__ */ ((MarkerType2) => {\n MarkerType2[\"Arrow\"] = \"arrow\";\n MarkerType2[\"ArrowClosed\"] = \"arrowclosed\";\n return MarkerType2;\n})(MarkerType || {});\nvar PanOnScrollMode = /* @__PURE__ */ ((PanOnScrollMode2) => {\n PanOnScrollMode2[\"Free\"] = \"free\";\n PanOnScrollMode2[\"Vertical\"] = \"vertical\";\n PanOnScrollMode2[\"Horizontal\"] = \"horizontal\";\n return PanOnScrollMode2;\n})(PanOnScrollMode || {});\nvar PanelPosition = /* @__PURE__ */ ((PanelPosition2) => {\n PanelPosition2[\"TopLeft\"] = \"top-left\";\n PanelPosition2[\"TopCenter\"] = \"top-center\";\n PanelPosition2[\"TopRight\"] = \"top-right\";\n PanelPosition2[\"BottomLeft\"] = \"bottom-left\";\n PanelPosition2[\"BottomCenter\"] = \"bottom-center\";\n PanelPosition2[\"BottomRight\"] = \"bottom-right\";\n return PanelPosition2;\n})(PanelPosition || {});\nconst inputTags = [\"INPUT\", \"SELECT\", \"TEXTAREA\"];\nconst defaultDoc = typeof document !== \"undefined\" ? document : null;\nfunction isInputDOMNode(event) {\n var _a, _b;\n const target = ((_b = (_a = event.composedPath) == null ? void 0 : _a.call(event)) == null ? void 0 : _b[0]) || event.target;\n const hasAttribute = typeof (target == null ? void 0 : target.hasAttribute) === \"function\" ? target.hasAttribute(\"contenteditable\") : false;\n const closest = typeof (target == null ? void 0 : target.closest) === \"function\" ? target.closest(\".nokey\") : null;\n return inputTags.includes(target == null ? void 0 : target.nodeName) || hasAttribute || !!closest;\n}\nfunction wasModifierPressed(event) {\n return event.ctrlKey || event.metaKey || event.shiftKey || event.altKey;\n}\nfunction isKeyMatch(pressedKey, keyToMatch, pressedKeys, isKeyUp) {\n const keyCombination = keyToMatch.replace(\"+\", \"\\n\").replace(\"\\n\\n\", \"\\n+\").split(\"\\n\").map((k) => k.trim().toLowerCase());\n if (keyCombination.length === 1) {\n return pressedKey.toLowerCase() === keyToMatch.toLowerCase();\n }\n if (!isKeyUp) {\n pressedKeys.add(pressedKey.toLowerCase());\n }\n const isMatch = keyCombination.every(\n (key, index) => pressedKeys.has(key) && Array.from(pressedKeys.values())[index] === keyCombination[index]\n );\n if (isKeyUp) {\n pressedKeys.delete(pressedKey.toLowerCase());\n }\n return isMatch;\n}\nfunction createKeyPredicate(keyFilter, pressedKeys) {\n return (event) => {\n if (!event.code && !event.key) {\n return false;\n }\n const keyOrCode = useKeyOrCode(event.code, keyFilter);\n if (Array.isArray(keyFilter)) {\n return keyFilter.some((key) => isKeyMatch(event[keyOrCode], key, pressedKeys, event.type === \"keyup\"));\n }\n return isKeyMatch(event[keyOrCode], keyFilter, pressedKeys, event.type === \"keyup\");\n };\n}\nfunction useKeyOrCode(code, keysToWatch) {\n return keysToWatch.includes(code) ? \"code\" : \"key\";\n}\nfunction useKeyPress(keyFilter, options) {\n const target = computed(() => toValue$1(options == null ? void 0 : options.target) ?? defaultDoc);\n const isPressed = shallowRef(toValue$1(keyFilter) === true);\n let modifierPressed = false;\n const pressedKeys = /* @__PURE__ */ new Set();\n let currentFilter = createKeyFilterFn(toValue$1(keyFilter));\n watch(\n () => toValue$1(keyFilter),\n (nextKeyFilter, previousKeyFilter) => {\n if (typeof previousKeyFilter === \"boolean\" && typeof nextKeyFilter !== \"boolean\") {\n reset();\n }\n currentFilter = createKeyFilterFn(nextKeyFilter);\n },\n {\n immediate: true\n }\n );\n useEventListener([\"blur\", \"contextmenu\"], reset);\n onKeyStroke(\n (...args) => currentFilter(...args),\n (e) => {\n var _a, _b;\n const actInsideInputWithModifier = toValue$1(options == null ? void 0 : options.actInsideInputWithModifier) ?? true;\n const preventDefault = toValue$1(options == null ? void 0 : options.preventDefault) ?? false;\n modifierPressed = wasModifierPressed(e);\n const preventAction = (!modifierPressed || modifierPressed && !actInsideInputWithModifier) && isInputDOMNode(e);\n if (preventAction) {\n return;\n }\n const target2 = ((_b = (_a = e.composedPath) == null ? void 0 : _a.call(e)) == null ? void 0 : _b[0]) || e.target;\n const isInteractiveElement = (target2 == null ? void 0 : target2.nodeName) === \"BUTTON\" || (target2 == null ? void 0 : target2.nodeName) === \"A\";\n if (!preventDefault && (modifierPressed || !isInteractiveElement)) {\n e.preventDefault();\n }\n isPressed.value = true;\n },\n { eventName: \"keydown\", target }\n );\n onKeyStroke(\n (...args) => currentFilter(...args),\n (e) => {\n const actInsideInputWithModifier = toValue$1(options == null ? void 0 : options.actInsideInputWithModifier) ?? true;\n if (isPressed.value) {\n const preventAction = (!modifierPressed || modifierPressed && !actInsideInputWithModifier) && isInputDOMNode(e);\n if (preventAction) {\n return;\n }\n modifierPressed = false;\n isPressed.value = false;\n }\n },\n { eventName: \"keyup\", target }\n );\n function reset() {\n modifierPressed = false;\n pressedKeys.clear();\n isPressed.value = toValue$1(keyFilter) === true;\n }\n function createKeyFilterFn(keyFilter2) {\n if (keyFilter2 === null) {\n reset();\n return () => false;\n }\n if (typeof keyFilter2 === \"boolean\") {\n reset();\n isPressed.value = keyFilter2;\n return () => false;\n }\n if (Array.isArray(keyFilter2) || typeof keyFilter2 === \"string\") {\n return createKeyPredicate(keyFilter2, pressedKeys);\n }\n return keyFilter2;\n }\n return isPressed;\n}\nconst ARIA_NODE_DESC_KEY = \"vue-flow__node-desc\";\nconst ARIA_EDGE_DESC_KEY = \"vue-flow__edge-desc\";\nconst ARIA_LIVE_MESSAGE = \"vue-flow__aria-live\";\nconst elementSelectionKeys = [\"Enter\", \" \", \"Escape\"];\nconst arrowKeyDiffs = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction nodeToRect(node) {\n return {\n ...node.computedPosition || { x: 0, y: 0 },\n width: node.dimensions.width || 0,\n height: node.dimensions.height || 0\n };\n}\nfunction getOverlappingArea(rectA, rectB) {\n const xOverlap = Math.max(0, Math.min(rectA.x + rectA.width, rectB.x + rectB.width) - Math.max(rectA.x, rectB.x));\n const yOverlap = Math.max(0, Math.min(rectA.y + rectA.height, rectB.y + rectB.height) - Math.max(rectA.y, rectB.y));\n return Math.ceil(xOverlap * yOverlap);\n}\nfunction getDimensions(node) {\n return {\n width: node.offsetWidth,\n height: node.offsetHeight\n };\n}\nfunction clamp(val, min = 0, max = 1) {\n return Math.min(Math.max(val, min), max);\n}\nfunction clampPosition(position, extent) {\n return {\n x: clamp(position.x, extent[0][0], extent[1][0]),\n y: clamp(position.y, extent[0][1], extent[1][1])\n };\n}\nfunction getHostForElement(element) {\n const doc = element.getRootNode();\n if (\"elementFromPoint\" in doc) {\n return doc;\n }\n return window.document;\n}\nfunction isEdge(element) {\n return element && typeof element === \"object\" && \"id\" in element && \"source\" in element && \"target\" in element;\n}\nfunction isGraphEdge(element) {\n return isEdge(element) && \"sourceNode\" in element && \"targetNode\" in element;\n}\nfunction isNode(element) {\n return element && typeof element === \"object\" && \"id\" in element && \"position\" in element && !isEdge(element);\n}\nfunction isGraphNode(element) {\n return isNode(element) && \"computedPosition\" in element;\n}\nfunction isNumeric(n) {\n return !Number.isNaN(n) && Number.isFinite(n);\n}\nfunction isRect(obj) {\n return isNumeric(obj.width) && isNumeric(obj.height) && isNumeric(obj.x) && isNumeric(obj.y);\n}\nfunction parseNode(node, existingNode, parentNode) {\n const initialState = {\n id: node.id.toString(),\n type: node.type ?? \"default\",\n dimensions: markRaw({\n width: 0,\n height: 0\n }),\n computedPosition: markRaw({\n z: 0,\n ...node.position\n }),\n // todo: shouldn't be defined initially, as we want to use handleBounds to check if a node was actually initialized or not\n handleBounds: {\n source: [],\n target: []\n },\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: false,\n dragging: false,\n resizing: false,\n initialized: false,\n isParent: false,\n position: {\n x: 0,\n y: 0\n },\n data: isDef(node.data) ? node.data : {},\n events: markRaw(isDef(node.events) ? node.events : {})\n };\n return Object.assign(existingNode ?? initialState, node, { id: node.id.toString(), parentNode });\n}\nfunction parseEdge(edge, existingEdge, defaultEdgeOptions) {\n var _a, _b;\n const initialState = {\n id: edge.id.toString(),\n type: edge.type ?? (existingEdge == null ? void 0 : existingEdge.type) ?? \"default\",\n source: edge.source.toString(),\n target: edge.target.toString(),\n sourceHandle: (_a = edge.sourceHandle) == null ? void 0 : _a.toString(),\n targetHandle: (_b = edge.targetHandle) == null ? void 0 : _b.toString(),\n updatable: edge.updatable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.updatable),\n selectable: edge.selectable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.selectable),\n focusable: edge.focusable ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.focusable),\n data: isDef(edge.data) ? edge.data : {},\n events: markRaw(isDef(edge.events) ? edge.events : {}),\n label: edge.label ?? \"\",\n interactionWidth: edge.interactionWidth ?? (defaultEdgeOptions == null ? void 0 : defaultEdgeOptions.interactionWidth),\n ...defaultEdgeOptions ?? {}\n };\n return Object.assign(existingEdge ?? initialState, edge, { id: edge.id.toString() });\n}\nfunction getConnectedElements(nodeOrId, nodes, edges, dir) {\n const id2 = typeof nodeOrId === \"string\" ? nodeOrId : nodeOrId.id;\n const connectedIds = /* @__PURE__ */ new Set();\n const origin = dir === \"source\" ? \"target\" : \"source\";\n for (const edge of edges) {\n if (edge[origin] === id2) {\n connectedIds.add(edge[dir]);\n }\n }\n return nodes.filter((n) => connectedIds.has(n.id));\n}\nfunction getOutgoers(...args) {\n if (args.length === 3) {\n const [nodeOrId2, nodes, edges] = args;\n return getConnectedElements(nodeOrId2, nodes, edges, \"target\");\n }\n const [nodeOrId, elements] = args;\n const nodeId = typeof nodeOrId === \"string\" ? nodeOrId : nodeOrId.id;\n const outgoers = elements.filter((el) => isEdge(el) && el.source === nodeId);\n return outgoers.map((edge) => elements.find((el) => isNode(el) && el.id === edge.target));\n}\nfunction getIncomers(...args) {\n if (args.length === 3) {\n const [nodeOrId2, nodes, edges] = args;\n return getConnectedElements(nodeOrId2, nodes, edges, \"source\");\n }\n const [nodeOrId, elements] = args;\n const nodeId = typeof nodeOrId === \"string\" ? nodeOrId : nodeOrId.id;\n const incomers = elements.filter((el) => isEdge(el) && el.target === nodeId);\n return incomers.map((edge) => elements.find((el) => isNode(el) && el.id === edge.source));\n}\nfunction getEdgeId({ source, sourceHandle, target, targetHandle }) {\n return `vueflow__edge-${source}${sourceHandle ?? \"\"}-${target}${targetHandle ?? \"\"}`;\n}\nfunction connectionExists(edge, elements) {\n return elements.some(\n (el) => isEdge(el) && el.source === edge.source && el.target === edge.target && (el.sourceHandle === edge.sourceHandle || !el.sourceHandle && !edge.sourceHandle) && (el.targetHandle === edge.targetHandle || !el.targetHandle && !edge.targetHandle)\n );\n}\nfunction addEdge(edgeParams, elements, defaults) {\n if (!edgeParams.source || !edgeParams.target) {\n warn(\"Can't create edge. An edge needs a source and a target.\");\n return elements;\n }\n let edge;\n if (isEdge(edgeParams)) {\n edge = { ...edgeParams };\n } else {\n edge = {\n ...edgeParams,\n id: getEdgeId(edgeParams)\n };\n }\n edge = parseEdge(edge, void 0, defaults);\n if (connectionExists(edge, elements)) {\n return elements;\n }\n elements.push(edge);\n return elements;\n}\nfunction updateEdge(oldEdge, newConnection, elements) {\n if (!newConnection.source || !newConnection.target) {\n warn(\"Can't create new edge. An edge needs a source and a target.\");\n return elements;\n }\n const foundEdge = elements.find((e) => isEdge(e) && e.id === oldEdge.id);\n if (!foundEdge) {\n warn(`The old edge with id=${oldEdge.id} does not exist.`);\n return elements;\n }\n const edge = {\n ...oldEdge,\n id: getEdgeId(newConnection),\n source: newConnection.source,\n target: newConnection.target,\n sourceHandle: newConnection.sourceHandle,\n targetHandle: newConnection.targetHandle\n };\n elements.splice(elements.indexOf(foundEdge), 1, edge);\n return elements.filter((e) => e.id !== oldEdge.id);\n}\nfunction rendererPointToPoint({ x, y }, { x: tx, y: ty, zoom: tScale }) {\n return {\n x: x * tScale + tx,\n y: y * tScale + ty\n };\n}\nfunction pointToRendererPoint({ x, y }, { x: tx, y: ty, zoom: tScale }, snapToGrid = false, snapGrid = [1, 1]) {\n const position = {\n x: (x - tx) / tScale,\n y: (y - ty) / tScale\n };\n return snapToGrid ? snapPosition(position, snapGrid) : position;\n}\nfunction getBoundsOfBoxes(box1, box2) {\n return {\n x: Math.min(box1.x, box2.x),\n y: Math.min(box1.y, box2.y),\n x2: Math.max(box1.x2, box2.x2),\n y2: Math.max(box1.y2, box2.y2)\n };\n}\nfunction rectToBox({ x, y, width, height }) {\n return {\n x,\n y,\n x2: x + width,\n y2: y + height\n };\n}\nfunction boxToRect({ x, y, x2, y2 }) {\n return {\n x,\n y,\n width: x2 - x,\n height: y2 - y\n };\n}\nfunction getBoundsofRects(rect1, rect2) {\n return boxToRect(getBoundsOfBoxes(rectToBox(rect1), rectToBox(rect2)));\n}\nfunction getRectOfNodes(nodes) {\n let box = {\n x: Number.POSITIVE_INFINITY,\n y: Number.POSITIVE_INFINITY,\n x2: Number.NEGATIVE_INFINITY,\n y2: Number.NEGATIVE_INFINITY\n };\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n box = getBoundsOfBoxes(\n box,\n rectToBox({\n ...node.computedPosition,\n ...node.dimensions\n })\n );\n }\n return boxToRect(box);\n}\nfunction getNodesInside(nodes, rect, viewport = { x: 0, y: 0, zoom: 1 }, partially = false, excludeNonSelectableNodes = false) {\n const paneRect = {\n ...pointToRendererPoint(rect, viewport),\n width: rect.width / viewport.zoom,\n height: rect.height / viewport.zoom\n };\n const visibleNodes = [];\n for (const node of nodes) {\n const { dimensions, selectable = true, hidden = false } = node;\n const width = dimensions.width ?? node.width ?? null;\n const height = dimensions.height ?? node.height ?? null;\n if (excludeNonSelectableNodes && !selectable || hidden) {\n continue;\n }\n const overlappingArea = getOverlappingArea(paneRect, nodeToRect(node));\n const notInitialized = width === null || height === null;\n const partiallyVisible = partially && overlappingArea > 0;\n const area = (width ?? 0) * (height ?? 0);\n const isVisible = notInitialized || partiallyVisible || overlappingArea >= area;\n if (isVisible || node.dragging) {\n visibleNodes.push(node);\n }\n }\n return visibleNodes;\n}\nfunction getConnectedEdges(nodesOrId, edges) {\n const nodeIds = /* @__PURE__ */ new Set();\n if (typeof nodesOrId === \"string\") {\n nodeIds.add(nodesOrId);\n } else if (nodesOrId.length >= 1) {\n for (const n of nodesOrId) {\n nodeIds.add(n.id);\n }\n }\n return edges.filter((edge) => nodeIds.has(edge.source) || nodeIds.has(edge.target));\n}\nfunction getTransformForBounds(bounds, width, height, minZoom, maxZoom, padding = 0.1, offset = { x: 0, y: 0 }) {\n const xZoom = width / (bounds.width * (1 + padding));\n const yZoom = height / (bounds.height * (1 + padding));\n const zoom2 = Math.min(xZoom, yZoom);\n const clampedZoom = clamp(zoom2, minZoom, maxZoom);\n const boundsCenterX = bounds.x + bounds.width / 2;\n const boundsCenterY = bounds.y + bounds.height / 2;\n const x = width / 2 - boundsCenterX * clampedZoom + (offset.x ?? 0);\n const y = height / 2 - boundsCenterY * clampedZoom + (offset.y ?? 0);\n return { x, y, zoom: clampedZoom };\n}\nfunction getXYZPos(parentPos, computedPosition) {\n return {\n x: computedPosition.x + parentPos.x,\n y: computedPosition.y + parentPos.y,\n z: (parentPos.z > computedPosition.z ? parentPos.z : computedPosition.z) + 1\n };\n}\nfunction isParentSelected(node, findNode) {\n if (!node.parentNode) {\n return false;\n }\n const parent = findNode(node.parentNode);\n if (!parent) {\n return false;\n }\n if (parent.selected) {\n return true;\n }\n return isParentSelected(parent, findNode);\n}\nfunction getMarkerId(marker, vueFlowId) {\n if (typeof marker === \"undefined\") {\n return \"\";\n }\n if (typeof marker === \"string\") {\n return marker;\n }\n const idPrefix = vueFlowId ? `${vueFlowId}__` : \"\";\n return `${idPrefix}${Object.keys(marker).sort().map((key) => `${key}=${marker[key]}`).join(\"&\")}`;\n}\nfunction wheelDelta(event) {\n const factor = event.ctrlKey && isMacOs() ? 10 : 1;\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * factor;\n}\nfunction calcAutoPanVelocity(value, min, max) {\n if (value < min) {\n return clamp(Math.abs(value - min), 1, min) / min;\n }\n if (value > max) {\n return -clamp(Math.abs(value - max), 1, min) / min;\n }\n return 0;\n}\nfunction calcAutoPan(pos, bounds, speed = 15, distance2 = 40) {\n const xMovement = calcAutoPanVelocity(pos.x, distance2, bounds.width - distance2) * speed;\n const yMovement = calcAutoPanVelocity(pos.y, distance2, bounds.height - distance2) * speed;\n return [xMovement, yMovement];\n}\nfunction handleParentExpand(updateItem, parent) {\n if (parent) {\n const extendWidth = updateItem.position.x + updateItem.dimensions.width - parent.dimensions.width;\n const extendHeight = updateItem.position.y + updateItem.dimensions.height - parent.dimensions.height;\n if (extendWidth > 0 || extendHeight > 0 || updateItem.position.x < 0 || updateItem.position.y < 0) {\n let parentStyles = {};\n if (typeof parent.style === \"function\") {\n parentStyles = { ...parent.style(parent) };\n } else if (parent.style) {\n parentStyles = { ...parent.style };\n }\n parentStyles.width = parentStyles.width ?? `${parent.dimensions.width}px`;\n parentStyles.height = parentStyles.height ?? `${parent.dimensions.height}px`;\n if (extendWidth > 0) {\n if (typeof parentStyles.width === \"string\") {\n const currWidth = Number(parentStyles.width.replace(\"px\", \"\"));\n parentStyles.width = `${currWidth + extendWidth}px`;\n } else {\n parentStyles.width += extendWidth;\n }\n }\n if (extendHeight > 0) {\n if (typeof parentStyles.height === \"string\") {\n const currWidth = Number(parentStyles.height.replace(\"px\", \"\"));\n parentStyles.height = `${currWidth + extendHeight}px`;\n } else {\n parentStyles.height += extendHeight;\n }\n }\n if (updateItem.position.x < 0) {\n const xDiff = Math.abs(updateItem.position.x);\n parent.position.x = parent.position.x - xDiff;\n if (typeof parentStyles.width === \"string\") {\n const currWidth = Number(parentStyles.width.replace(\"px\", \"\"));\n parentStyles.width = `${currWidth + xDiff}px`;\n } else {\n parentStyles.width += xDiff;\n }\n updateItem.position.x = 0;\n }\n if (updateItem.position.y < 0) {\n const yDiff = Math.abs(updateItem.position.y);\n parent.position.y = parent.position.y - yDiff;\n if (typeof parentStyles.height === \"string\") {\n const currWidth = Number(parentStyles.height.replace(\"px\", \"\"));\n parentStyles.height = `${currWidth + yDiff}px`;\n } else {\n parentStyles.height += yDiff;\n }\n updateItem.position.y = 0;\n }\n parent.dimensions.width = Number(parentStyles.width.toString().replace(\"px\", \"\"));\n parent.dimensions.height = Number(parentStyles.height.toString().replace(\"px\", \"\"));\n if (typeof parent.style === \"function\") {\n parent.style = (p) => {\n const styleFunc = parent.style;\n return {\n ...styleFunc(p),\n ...parentStyles\n };\n };\n } else {\n parent.style = {\n ...parent.style,\n ...parentStyles\n };\n }\n }\n }\n}\nfunction applyChanges(changes, elements) {\n var _a, _b;\n const addRemoveChanges = changes.filter((c) => c.type === \"add\" || c.type === \"remove\");\n for (const change of addRemoveChanges) {\n if (change.type === \"add\") {\n const index = elements.findIndex((el) => el.id === change.item.id);\n if (index === -1) {\n elements.push(change.item);\n }\n } else if (change.type === \"remove\") {\n const index = elements.findIndex((el) => el.id === change.id);\n if (index !== -1) {\n elements.splice(index, 1);\n }\n }\n }\n const elementIds = elements.map((el) => el.id);\n for (const element of elements) {\n for (const currentChange of changes) {\n if (currentChange.id !== element.id) {\n continue;\n }\n switch (currentChange.type) {\n case \"select\":\n element.selected = currentChange.selected;\n break;\n case \"position\":\n if (isGraphNode(element)) {\n if (typeof currentChange.position !== \"undefined\") {\n element.position = currentChange.position;\n }\n if (typeof currentChange.dragging !== \"undefined\") {\n element.dragging = currentChange.dragging;\n }\n if (element.expandParent && element.parentNode) {\n const parent = elements[elementIds.indexOf(element.parentNode)];\n if (parent && isGraphNode(parent)) {\n handleParentExpand(element, parent);\n }\n }\n }\n break;\n case \"dimensions\":\n if (isGraphNode(element)) {\n if (typeof currentChange.dimensions !== \"undefined\") {\n element.dimensions = currentChange.dimensions;\n }\n if (typeof currentChange.updateStyle !== \"undefined\" && currentChange.updateStyle) {\n element.style = {\n ...element.style || {},\n width: `${(_a = currentChange.dimensions) == null ? void 0 : _a.width}px`,\n height: `${(_b = currentChange.dimensions) == null ? void 0 : _b.height}px`\n };\n }\n if (typeof currentChange.resizing !== \"undefined\") {\n element.resizing = currentChange.resizing;\n }\n if (element.expandParent && element.parentNode) {\n const parent = elements[elementIds.indexOf(element.parentNode)];\n if (parent && isGraphNode(parent)) {\n const parentInit = !!parent.dimensions.width && !!parent.dimensions.height;\n if (!parentInit) {\n nextTick(() => {\n handleParentExpand(element, parent);\n });\n } else {\n handleParentExpand(element, parent);\n }\n }\n }\n }\n break;\n }\n }\n }\n return elements;\n}\nfunction applyEdgeChanges(changes, edges) {\n return applyChanges(changes, edges);\n}\nfunction applyNodeChanges(changes, nodes) {\n return applyChanges(changes, nodes);\n}\nfunction createSelectionChange(id2, selected) {\n return {\n id: id2,\n type: \"select\",\n selected\n };\n}\nfunction createAdditionChange(item) {\n return {\n item,\n type: \"add\"\n };\n}\nfunction createNodeRemoveChange(id2) {\n return {\n id: id2,\n type: \"remove\"\n };\n}\nfunction createEdgeRemoveChange(id2, source, target, sourceHandle, targetHandle) {\n return {\n id: id2,\n source,\n target,\n sourceHandle: sourceHandle || null,\n targetHandle: targetHandle || null,\n type: \"remove\"\n };\n}\nfunction getSelectionChanges(items, selectedIds = /* @__PURE__ */ new Set(), mutateItem = false) {\n const changes = [];\n for (const [id2, item] of items) {\n const willBeSelected = selectedIds.has(id2);\n if (!(item.selected === void 0 && !willBeSelected) && item.selected !== willBeSelected) {\n if (mutateItem) {\n item.selected = willBeSelected;\n }\n changes.push(createSelectionChange(item.id, willBeSelected));\n }\n }\n return changes;\n}\nfunction createExtendedEventHook(defaultHandler) {\n const fns = /* @__PURE__ */ new Set();\n let hasDefaultHandler = false;\n const hasListeners = () => fns.size > 0;\n if (defaultHandler) {\n hasDefaultHandler = true;\n fns.add(defaultHandler);\n }\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n if (defaultHandler && hasDefaultHandler) {\n fns.delete(defaultHandler);\n }\n fns.add(fn);\n const offFn = () => {\n off(fn);\n if (defaultHandler && hasDefaultHandler) {\n fns.add(defaultHandler);\n }\n };\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => fn(param)));\n };\n return {\n on,\n off,\n trigger,\n hasListeners,\n fns\n };\n}\nfunction hasSelector(target, selector2, node) {\n let current = target;\n do {\n if (current && current.matches(selector2)) {\n return true;\n } else if (current === node) {\n return false;\n }\n current = current.parentElement;\n } while (current);\n return false;\n}\nfunction getDragItems(nodes, nodesDraggable, mousePos, findNode, nodeId) {\n var _a, _b;\n const dragItems = [];\n for (const node of nodes) {\n if ((node.selected || node.id === nodeId) && (!node.parentNode || !isParentSelected(node, findNode)) && (node.draggable || nodesDraggable && typeof node.draggable === \"undefined\")) {\n dragItems.push(\n markRaw({\n id: node.id,\n position: node.position || { x: 0, y: 0 },\n distance: {\n x: mousePos.x - ((_a = node.computedPosition) == null ? void 0 : _a.x) || 0,\n y: mousePos.y - ((_b = node.computedPosition) == null ? void 0 : _b.y) || 0\n },\n from: node.computedPosition,\n extent: node.extent,\n parentNode: node.parentNode,\n dimensions: node.dimensions,\n expandParent: node.expandParent\n })\n );\n }\n }\n return dragItems;\n}\nfunction getEventHandlerParams({\n id: id2,\n dragItems,\n findNode\n}) {\n const extendedDragItems = [];\n for (const dragItem of dragItems) {\n const node = findNode(dragItem.id);\n if (node) {\n extendedDragItems.push(node);\n }\n }\n return [id2 ? extendedDragItems.find((n) => n.id === id2) : extendedDragItems[0], extendedDragItems];\n}\nfunction getExtentPadding(padding) {\n if (Array.isArray(padding)) {\n switch (padding.length) {\n case 1:\n return [padding[0], padding[0], padding[0], padding[0]];\n case 2:\n return [padding[0], padding[1], padding[0], padding[1]];\n case 3:\n return [padding[0], padding[1], padding[2], padding[1]];\n case 4:\n return padding;\n default:\n return [0, 0, 0, 0];\n }\n }\n return [padding, padding, padding, padding];\n}\nfunction getParentExtent(currentExtent, node, parent) {\n const [top, right, bottom, left] = typeof currentExtent !== \"string\" ? getExtentPadding(currentExtent.padding) : [0, 0, 0, 0];\n if (parent && typeof parent.computedPosition.x !== \"undefined\" && typeof parent.computedPosition.y !== \"undefined\" && typeof parent.dimensions.width !== \"undefined\" && typeof parent.dimensions.height !== \"undefined\") {\n return [\n [parent.computedPosition.x + left, parent.computedPosition.y + top],\n [\n parent.computedPosition.x + parent.dimensions.width - right,\n parent.computedPosition.y + parent.dimensions.height - bottom\n ]\n ];\n }\n return false;\n}\nfunction getExtent(item, triggerError, extent, parent) {\n let currentExtent = item.extent || extent;\n if ((currentExtent === \"parent\" || !Array.isArray(currentExtent) && (currentExtent == null ? void 0 : currentExtent.range) === \"parent\") && !item.expandParent) {\n if (item.parentNode && parent && item.dimensions.width && item.dimensions.height) {\n const parentExtent = getParentExtent(currentExtent, item, parent);\n if (parentExtent) {\n currentExtent = parentExtent;\n }\n } else {\n triggerError(new VueFlowError(ErrorCode.NODE_EXTENT_INVALID, item.id));\n currentExtent = extent;\n }\n } else if (Array.isArray(currentExtent)) {\n const parentX = (parent == null ? void 0 : parent.computedPosition.x) || 0;\n const parentY = (parent == null ? void 0 : parent.computedPosition.y) || 0;\n currentExtent = [\n [currentExtent[0][0] + parentX, currentExtent[0][1] + parentY],\n [currentExtent[1][0] + parentX, currentExtent[1][1] + parentY]\n ];\n } else if (currentExtent !== \"parent\" && (currentExtent == null ? void 0 : currentExtent.range) && Array.isArray(currentExtent.range)) {\n const [top, right, bottom, left] = getExtentPadding(currentExtent.padding);\n const parentX = (parent == null ? void 0 : parent.computedPosition.x) || 0;\n const parentY = (parent == null ? void 0 : parent.computedPosition.y) || 0;\n currentExtent = [\n [currentExtent.range[0][0] + parentX + left, currentExtent.range[0][1] + parentY + top],\n [currentExtent.range[1][0] + parentX - right, currentExtent.range[1][1] + parentY - bottom]\n ];\n }\n return currentExtent === \"parent\" ? [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ] : currentExtent;\n}\nfunction clampNodeExtent({ width, height }, extent) {\n return [extent[0], [extent[1][0] - (width || 0), extent[1][1] - (height || 0)]];\n}\nfunction calcNextPosition(node, nextPosition, triggerError, nodeExtent, parentNode) {\n const extent = clampNodeExtent(node.dimensions, getExtent(node, triggerError, nodeExtent, parentNode));\n const clampedPos = clampPosition(nextPosition, extent);\n return {\n position: {\n x: clampedPos.x - ((parentNode == null ? void 0 : parentNode.computedPosition.x) || 0),\n y: clampedPos.y - ((parentNode == null ? void 0 : parentNode.computedPosition.y) || 0)\n },\n computedPosition: clampedPos\n };\n}\nfunction getHandlePosition(node, handle, fallbackPosition = Position.Left, center = false) {\n const x = ((handle == null ? void 0 : handle.x) ?? 0) + node.computedPosition.x;\n const y = ((handle == null ? void 0 : handle.y) ?? 0) + node.computedPosition.y;\n const { width, height } = handle ?? getNodeDimensions(node);\n if (center) {\n return { x: x + width / 2, y: y + height / 2 };\n }\n const position = (handle == null ? void 0 : handle.position) ?? fallbackPosition;\n switch (position) {\n case Position.Top:\n return { x: x + width / 2, y };\n case Position.Right:\n return { x: x + width, y: y + height / 2 };\n case Position.Bottom:\n return { x: x + width / 2, y: y + height };\n case Position.Left:\n return { x, y: y + height / 2 };\n }\n}\nfunction getEdgeHandle(bounds, handleId) {\n if (!bounds) {\n return null;\n }\n return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null;\n}\nfunction isEdgeVisible({\n sourcePos,\n targetPos,\n sourceWidth,\n sourceHeight,\n targetWidth,\n targetHeight,\n width,\n height,\n viewport\n}) {\n const edgeBox = {\n x: Math.min(sourcePos.x, targetPos.x),\n y: Math.min(sourcePos.y, targetPos.y),\n x2: Math.max(sourcePos.x + sourceWidth, targetPos.x + targetWidth),\n y2: Math.max(sourcePos.y + sourceHeight, targetPos.y + targetHeight)\n };\n if (edgeBox.x === edgeBox.x2) {\n edgeBox.x2 += 1;\n }\n if (edgeBox.y === edgeBox.y2) {\n edgeBox.y2 += 1;\n }\n const viewBox = rectToBox({\n x: (0 - viewport.x) / viewport.zoom,\n y: (0 - viewport.y) / viewport.zoom,\n width: width / viewport.zoom,\n height: height / viewport.zoom\n });\n const xOverlap = Math.max(0, Math.min(viewBox.x2, edgeBox.x2) - Math.max(viewBox.x, edgeBox.x));\n const yOverlap = Math.max(0, Math.min(viewBox.y2, edgeBox.y2) - Math.max(viewBox.y, edgeBox.y));\n const overlappingArea = Math.ceil(xOverlap * yOverlap);\n return overlappingArea > 0;\n}\nfunction getEdgeZIndex(edge, findNode, elevateEdgesOnSelect = false) {\n const hasZIndex = typeof edge.zIndex === \"number\";\n let z = hasZIndex ? edge.zIndex : 0;\n const source = findNode(edge.source);\n const target = findNode(edge.target);\n if (!source || !target) {\n return 0;\n }\n if (elevateEdgesOnSelect) {\n z = hasZIndex ? edge.zIndex : Math.max(source.computedPosition.z || 0, target.computedPosition.z || 0);\n }\n return z;\n}\nvar ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {\n ErrorCode2[\"MISSING_STYLES\"] = \"MISSING_STYLES\";\n ErrorCode2[\"MISSING_VIEWPORT_DIMENSIONS\"] = \"MISSING_VIEWPORT_DIMENSIONS\";\n ErrorCode2[\"NODE_INVALID\"] = \"NODE_INVALID\";\n ErrorCode2[\"NODE_NOT_FOUND\"] = \"NODE_NOT_FOUND\";\n ErrorCode2[\"NODE_MISSING_PARENT\"] = \"NODE_MISSING_PARENT\";\n ErrorCode2[\"NODE_TYPE_MISSING\"] = \"NODE_TYPE_MISSING\";\n ErrorCode2[\"NODE_EXTENT_INVALID\"] = \"NODE_EXTENT_INVALID\";\n ErrorCode2[\"EDGE_INVALID\"] = \"EDGE_INVALID\";\n ErrorCode2[\"EDGE_NOT_FOUND\"] = \"EDGE_NOT_FOUND\";\n ErrorCode2[\"EDGE_SOURCE_MISSING\"] = \"EDGE_SOURCE_MISSING\";\n ErrorCode2[\"EDGE_TARGET_MISSING\"] = \"EDGE_TARGET_MISSING\";\n ErrorCode2[\"EDGE_TYPE_MISSING\"] = \"EDGE_TYPE_MISSING\";\n ErrorCode2[\"EDGE_SOURCE_TARGET_SAME\"] = \"EDGE_SOURCE_TARGET_SAME\";\n ErrorCode2[\"EDGE_SOURCE_TARGET_MISSING\"] = \"EDGE_SOURCE_TARGET_MISSING\";\n ErrorCode2[\"EDGE_ORPHANED\"] = \"EDGE_ORPHANED\";\n ErrorCode2[\"USEVUEFLOW_OPTIONS\"] = \"USEVUEFLOW_OPTIONS\";\n return ErrorCode2;\n})(ErrorCode || {});\nconst messages = {\n [\n \"MISSING_STYLES\"\n /* MISSING_STYLES */\n ]: () => `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`,\n [\n \"MISSING_VIEWPORT_DIMENSIONS\"\n /* MISSING_VIEWPORT_DIMENSIONS */\n ]: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n [\n \"NODE_INVALID\"\n /* NODE_INVALID */\n ]: (id2) => `Node is invalid\nNode: ${id2}`,\n [\n \"NODE_NOT_FOUND\"\n /* NODE_NOT_FOUND */\n ]: (id2) => `Node not found\nNode: ${id2}`,\n [\n \"NODE_MISSING_PARENT\"\n /* NODE_MISSING_PARENT */\n ]: (id2, parentId) => `Node is missing a parent\nNode: ${id2}\nParent: ${parentId}`,\n [\n \"NODE_TYPE_MISSING\"\n /* NODE_TYPE_MISSING */\n ]: (type) => `Node type is missing\nType: ${type}`,\n [\n \"NODE_EXTENT_INVALID\"\n /* NODE_EXTENT_INVALID */\n ]: (id2) => `Only child nodes can use a parent extent\nNode: ${id2}`,\n [\n \"EDGE_INVALID\"\n /* EDGE_INVALID */\n ]: (id2) => `An edge needs a source and a target\nEdge: ${id2}`,\n [\n \"EDGE_SOURCE_MISSING\"\n /* EDGE_SOURCE_MISSING */\n ]: (id2, source) => `Edge source is missing\nEdge: ${id2} \nSource: ${source}`,\n [\n \"EDGE_TARGET_MISSING\"\n /* EDGE_TARGET_MISSING */\n ]: (id2, target) => `Edge target is missing\nEdge: ${id2} \nTarget: ${target}`,\n [\n \"EDGE_TYPE_MISSING\"\n /* EDGE_TYPE_MISSING */\n ]: (type) => `Edge type is missing\nType: ${type}`,\n [\n \"EDGE_SOURCE_TARGET_SAME\"\n /* EDGE_SOURCE_TARGET_SAME */\n ]: (id2, source, target) => `Edge source and target are the same\nEdge: ${id2} \nSource: ${source} \nTarget: ${target}`,\n [\n \"EDGE_SOURCE_TARGET_MISSING\"\n /* EDGE_SOURCE_TARGET_MISSING */\n ]: (id2, source, target) => `Edge source or target is missing\nEdge: ${id2} \nSource: ${source} \nTarget: ${target}`,\n [\n \"EDGE_ORPHANED\"\n /* EDGE_ORPHANED */\n ]: (id2) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${id2}`,\n [\n \"EDGE_NOT_FOUND\"\n /* EDGE_NOT_FOUND */\n ]: (id2) => `Edge not found\nEdge: ${id2}`,\n // deprecation errors\n [\n \"USEVUEFLOW_OPTIONS\"\n /* USEVUEFLOW_OPTIONS */\n ]: () => `The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead`\n};\nclass VueFlowError extends Error {\n constructor(code, ...args) {\n var _a;\n super((_a = messages[code]) == null ? void 0 : _a.call(messages, ...args));\n this.name = \"VueFlowError\";\n this.code = code;\n this.args = args;\n }\n}\nfunction isErrorOfType(error, code) {\n return error.code === code;\n}\nfunction isMouseEvent(event) {\n return \"clientX\" in event;\n}\nfunction isUseDragEvent(event) {\n return \"sourceEvent\" in event;\n}\nfunction getEventPosition(event, bounds) {\n const isMouse = isMouseEvent(event);\n let evtX;\n let evtY;\n if (isMouse) {\n evtX = event.clientX;\n evtY = event.clientY;\n } else if (\"touches\" in event && event.touches.length > 0) {\n evtX = event.touches[0].clientX;\n evtY = event.touches[0].clientY;\n } else if (\"changedTouches\" in event && event.changedTouches.length > 0) {\n evtX = event.changedTouches[0].clientX;\n evtY = event.changedTouches[0].clientY;\n } else {\n evtX = 0;\n evtY = 0;\n }\n return {\n x: evtX - ((bounds == null ? void 0 : bounds.left) ?? 0),\n y: evtY - ((bounds == null ? void 0 : bounds.top) ?? 0)\n };\n}\nconst isMacOs = () => {\n var _a;\n return typeof navigator !== \"undefined\" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.indexOf(\"Mac\")) >= 0;\n};\nfunction getNodeDimensions(node) {\n var _a, _b;\n return {\n width: ((_a = node.dimensions) == null ? void 0 : _a.width) ?? node.width ?? 0,\n height: ((_b = node.dimensions) == null ? void 0 : _b.height) ?? node.height ?? 0\n };\n}\nfunction snapPosition(position, snapGrid = [1, 1]) {\n return {\n x: snapGrid[0] * Math.round(position.x / snapGrid[0]),\n y: snapGrid[1] * Math.round(position.y / snapGrid[1])\n };\n}\nconst alwaysValid$1 = () => true;\nfunction resetRecentHandle(handleDomNode) {\n handleDomNode == null ? void 0 : handleDomNode.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction getNodesWithinDistance(position, nodeLookup, distance2) {\n const nodes = [];\n const rect = {\n x: position.x - distance2,\n y: position.y - distance2,\n width: distance2 * 2,\n height: distance2 * 2\n };\n for (const node of nodeLookup.values()) {\n if (getOverlappingArea(rect, nodeToRect(node)) > 0) {\n nodes.push(node);\n }\n }\n return nodes;\n}\nconst ADDITIONAL_DISTANCE = 250;\nfunction getClosestHandle(position, connectionRadius, nodeLookup, fromHandle) {\n var _a, _b;\n let closestHandles = [];\n let minDistance = Number.POSITIVE_INFINITY;\n const closeNodes = getNodesWithinDistance(position, nodeLookup, connectionRadius + ADDITIONAL_DISTANCE);\n for (const node of closeNodes) {\n const allHandles = [...((_a = node.handleBounds) == null ? void 0 : _a.source) ?? [], ...((_b = node.handleBounds) == null ? void 0 : _b.target) ?? []];\n for (const handle of allHandles) {\n if (fromHandle.nodeId === handle.nodeId && fromHandle.type === handle.type && fromHandle.id === handle.id) {\n continue;\n }\n const { x, y } = getHandlePosition(node, handle, handle.position, true);\n const distance2 = Math.sqrt((x - position.x) ** 2 + (y - position.y) ** 2);\n if (distance2 > connectionRadius) {\n continue;\n }\n if (distance2 < minDistance) {\n closestHandles = [{ ...handle, x, y }];\n minDistance = distance2;\n } else if (distance2 === minDistance) {\n closestHandles.push({ ...handle, x, y });\n }\n }\n }\n if (!closestHandles.length) {\n return null;\n }\n if (closestHandles.length > 1) {\n const oppositeHandleType = fromHandle.type === \"source\" ? \"target\" : \"source\";\n return closestHandles.find((handle) => handle.type === oppositeHandleType) ?? closestHandles[0];\n }\n return closestHandles[0];\n}\nfunction isValidHandle(event, {\n handle,\n connectionMode,\n fromNodeId,\n fromHandleId,\n fromType,\n doc,\n lib,\n flowId,\n isValidConnection = alwaysValid$1\n}, edges, nodes, findNode) {\n const isTarget = fromType === \"target\";\n const handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id=\"${flowId}-${handle == null ? void 0 : handle.nodeId}-${handle == null ? void 0 : handle.id}-${handle == null ? void 0 : handle.type}\"]`) : null;\n const { x, y } = getEventPosition(event);\n const handleBelow = doc.elementFromPoint(x, y);\n const handleToCheck = (handleBelow == null ? void 0 : handleBelow.classList.contains(`${lib}-flow__handle`)) ? handleBelow : handleDomNode;\n const result = {\n handleDomNode: handleToCheck,\n isValid: false,\n connection: null,\n toHandle: null\n };\n if (handleToCheck) {\n const handleType = getHandleType(void 0, handleToCheck);\n const handleNodeId = handleToCheck.getAttribute(\"data-nodeid\");\n const handleId = handleToCheck.getAttribute(\"data-handleid\");\n const connectable = handleToCheck.classList.contains(\"connectable\");\n const connectableEnd = handleToCheck.classList.contains(\"connectableend\");\n if (!handleNodeId || !handleType) {\n return result;\n }\n const connection = {\n source: isTarget ? handleNodeId : fromNodeId,\n sourceHandle: isTarget ? handleId : fromHandleId,\n target: isTarget ? fromNodeId : handleNodeId,\n targetHandle: isTarget ? fromHandleId : handleId\n };\n result.connection = connection;\n const isConnectable = connectable && connectableEnd;\n const isValid = isConnectable && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === \"source\" || !isTarget && handleType === \"target\" : handleNodeId !== fromNodeId || handleId !== fromHandleId);\n result.isValid = isValid && isValidConnection(connection, {\n nodes,\n edges,\n sourceNode: findNode(connection.source),\n targetNode: findNode(connection.target)\n });\n result.toHandle = handle;\n }\n return result;\n}\nfunction getHandleType(edgeUpdaterType, handleDomNode) {\n if (edgeUpdaterType) {\n return edgeUpdaterType;\n } else if (handleDomNode == null ? void 0 : handleDomNode.classList.contains(\"target\")) {\n return \"target\";\n } else if (handleDomNode == null ? void 0 : handleDomNode.classList.contains(\"source\")) {\n return \"source\";\n }\n return null;\n}\nfunction getConnectionStatus(isInsideConnectionRadius, isHandleValid) {\n let connectionStatus = null;\n if (isHandleValid) {\n connectionStatus = \"valid\";\n } else if (isInsideConnectionRadius && !isHandleValid) {\n connectionStatus = \"invalid\";\n }\n return connectionStatus;\n}\nfunction isConnectionValid(isInsideConnectionRadius, isHandleValid) {\n let isValid = null;\n if (isHandleValid) {\n isValid = true;\n } else if (isInsideConnectionRadius && !isHandleValid) {\n isValid = false;\n }\n return isValid;\n}\nfunction getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode, withAbsolutePosition = false) {\n var _a, _b, _c;\n const node = nodeLookup.get(nodeId);\n if (!node) {\n return null;\n }\n const handles = connectionMode === ConnectionMode.Strict ? (_a = node.handleBounds) == null ? void 0 : _a[handleType] : [...((_b = node.handleBounds) == null ? void 0 : _b.source) ?? [], ...((_c = node.handleBounds) == null ? void 0 : _c.target) ?? []];\n const handle = (handleId ? handles == null ? void 0 : handles.find((h2) => h2.id === handleId) : handles == null ? void 0 : handles[0]) ?? null;\n return handle && withAbsolutePosition ? { ...handle, ...getHandlePosition(node, handle, handle.position, true) } : handle;\n}\nconst oppositePosition = {\n [Position.Left]: Position.Right,\n [Position.Right]: Position.Left,\n [Position.Top]: Position.Bottom,\n [Position.Bottom]: Position.Top\n};\nconst productionEnvs = [\"production\", \"prod\"];\nfunction warn(message, ...args) {\n if (isDev()) {\n console.warn(`[Vue Flow]: ${message}`, ...args);\n }\n}\nfunction isDev() {\n return !productionEnvs.includes(process.env.NODE_ENV || \"\");\n}\nfunction getHandleBounds(type, nodeElement, nodeBounds, zoom2, nodeId) {\n const handles = nodeElement.querySelectorAll(`.vue-flow__handle.${type}`);\n if (!(handles == null ? void 0 : handles.length)) {\n return null;\n }\n return Array.from(handles).map((handle) => {\n const handleBounds = handle.getBoundingClientRect();\n return {\n id: handle.getAttribute(\"data-handleid\"),\n type,\n nodeId,\n position: handle.getAttribute(\"data-handlepos\"),\n x: (handleBounds.left - nodeBounds.left) / zoom2,\n y: (handleBounds.top - nodeBounds.top) / zoom2,\n ...getDimensions(handle)\n };\n });\n}\nfunction handleNodeClick(node, multiSelectionActive, addSelectedNodes, removeSelectedNodes, nodesSelectionActive, unselect = false, nodeEl) {\n nodesSelectionActive.value = false;\n if (!node.selected) {\n addSelectedNodes([node]);\n } else if (unselect || node.selected && multiSelectionActive) {\n removeSelectedNodes([node]);\n nextTick(() => {\n nodeEl.blur();\n });\n }\n}\nfunction isDef(val) {\n const unrefVal = unref(val);\n return typeof unrefVal !== \"undefined\";\n}\nfunction addEdgeToStore(edgeParams, edges, triggerError, defaultEdgeOptions) {\n if (!edgeParams || !edgeParams.source || !edgeParams.target) {\n triggerError(new VueFlowError(ErrorCode.EDGE_INVALID, (edgeParams == null ? void 0 : edgeParams.id) ?? `[ID UNKNOWN]`));\n return false;\n }\n let edge;\n if (isEdge(edgeParams)) {\n edge = edgeParams;\n } else {\n edge = {\n ...edgeParams,\n id: getEdgeId(edgeParams)\n };\n }\n edge = parseEdge(edge, void 0, defaultEdgeOptions);\n if (connectionExists(edge, edges)) {\n return false;\n }\n return edge;\n}\nfunction updateEdgeAction(edge, newConnection, prevEdge, shouldReplaceId, triggerError) {\n if (!newConnection.source || !newConnection.target) {\n triggerError(new VueFlowError(ErrorCode.EDGE_INVALID, edge.id));\n return false;\n }\n if (!prevEdge) {\n triggerError(new VueFlowError(ErrorCode.EDGE_NOT_FOUND, edge.id));\n return false;\n }\n const { id: id2, ...rest } = edge;\n return {\n ...rest,\n id: shouldReplaceId ? getEdgeId(newConnection) : id2,\n source: newConnection.source,\n target: newConnection.target,\n sourceHandle: newConnection.sourceHandle,\n targetHandle: newConnection.targetHandle\n };\n}\nfunction createGraphNodes(nodes, findNode, triggerError) {\n const parentNodes = {};\n const nextNodes = [];\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n if (!isNode(node)) {\n triggerError(\n new VueFlowError(ErrorCode.NODE_INVALID, node == null ? void 0 : node.id) || `[ID UNKNOWN|INDEX ${i}]`\n );\n continue;\n }\n const parsed = parseNode(node, findNode(node.id), node.parentNode);\n if (node.parentNode) {\n parentNodes[node.parentNode] = true;\n }\n nextNodes[i] = parsed;\n }\n for (const node of nextNodes) {\n const parentNode = findNode(node.parentNode) || nextNodes.find((n) => n.id === node.parentNode);\n if (node.parentNode && !parentNode) {\n triggerError(new VueFlowError(ErrorCode.NODE_MISSING_PARENT, node.id, node.parentNode));\n }\n if (node.parentNode || parentNodes[node.id]) {\n if (parentNodes[node.id]) {\n node.isParent = true;\n }\n if (parentNode) {\n parentNode.isParent = true;\n }\n }\n }\n return nextNodes;\n}\nfunction addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {\n let key = nodeId;\n const nodeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();\n connectionLookup.set(key, nodeMap.set(connectionKey, connection));\n key = `${nodeId}-${type}`;\n const typeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();\n connectionLookup.set(key, typeMap.set(connectionKey, connection));\n if (handleId) {\n key = `${nodeId}-${type}-${handleId}`;\n const handleMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();\n connectionLookup.set(key, handleMap.set(connectionKey, connection));\n }\n}\nfunction updateConnectionLookup(connectionLookup, edgeLookup, edges) {\n connectionLookup.clear();\n for (const edge of edges) {\n const { source: sourceNode, target: targetNode, sourceHandle = null, targetHandle = null } = edge;\n const connection = { edgeId: edge.id, source: sourceNode, target: targetNode, sourceHandle, targetHandle };\n const sourceKey = `${sourceNode}-${sourceHandle}--${targetNode}-${targetHandle}`;\n const targetKey = `${targetNode}-${targetHandle}--${sourceNode}-${sourceHandle}`;\n addConnectionToLookup(\"source\", connection, targetKey, connectionLookup, sourceNode, sourceHandle);\n addConnectionToLookup(\"target\", connection, sourceKey, connectionLookup, targetNode, targetHandle);\n }\n}\nfunction handleConnectionChange(a, b, cb) {\n if (!cb) {\n return;\n }\n const diff = [];\n for (const key of a.keys()) {\n if (!b.has(key)) {\n diff.push(a.get(key));\n }\n }\n if (diff.length) {\n cb(diff);\n }\n}\nfunction areConnectionMapsEqual(a, b) {\n if (!a && !b) {\n return true;\n }\n if (!a || !b || a.size !== b.size) {\n return false;\n }\n if (!a.size && !b.size) {\n return true;\n }\n for (const key of a.keys()) {\n if (!b.has(key)) {\n return false;\n }\n }\n return true;\n}\nfunction areSetsEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n}\nfunction createGraphEdges(nextEdges, isValidConnection, findNode, findEdge, onError, defaultEdgeOptions, nodes, edges) {\n const validEdges = [];\n for (const edgeOrConnection of nextEdges) {\n const edge = isEdge(edgeOrConnection) ? edgeOrConnection : addEdgeToStore(edgeOrConnection, edges, onError, defaultEdgeOptions);\n if (!edge) {\n continue;\n }\n const sourceNode = findNode(edge.source);\n const targetNode = findNode(edge.target);\n if (!sourceNode || !targetNode) {\n onError(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.id, edge.source, edge.target));\n continue;\n }\n if (!sourceNode) {\n onError(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.id, edge.source));\n continue;\n }\n if (!targetNode) {\n onError(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.id, edge.target));\n continue;\n }\n if (isValidConnection) {\n const isValid = isValidConnection(edge, {\n edges,\n nodes,\n sourceNode,\n targetNode\n });\n if (!isValid) {\n onError(new VueFlowError(ErrorCode.EDGE_INVALID, edge.id));\n continue;\n }\n }\n const existingEdge = findEdge(edge.id);\n validEdges.push({\n ...parseEdge(edge, existingEdge, defaultEdgeOptions),\n sourceNode,\n targetNode\n });\n }\n return validEdges;\n}\nconst VueFlow = Symbol(\"vueFlow\");\nconst NodeId = Symbol(\"nodeId\");\nconst NodeRef = Symbol(\"nodeRef\");\nconst EdgeId = Symbol(\"edgeId\");\nconst EdgeRef = Symbol(\"edgeRef\");\nconst Slots = Symbol(\"slots\");\nfunction useDrag(params) {\n const {\n vueFlowRef,\n snapToGrid,\n snapGrid,\n noDragClassName,\n nodes,\n nodeExtent,\n nodeDragThreshold,\n viewport,\n autoPanOnNodeDrag,\n autoPanSpeed,\n nodesDraggable,\n panBy,\n findNode,\n multiSelectionActive,\n nodesSelectionActive,\n selectNodesOnDrag,\n removeSelectedElements,\n addSelectedNodes,\n updateNodePositions,\n emits\n } = useVueFlow();\n const { onStart, onDrag, onStop, onClick, el, disabled, id: id2, selectable, dragHandle } = params;\n const dragging = shallowRef(false);\n let dragItems = [];\n let dragHandler;\n let containerBounds = null;\n let lastPos = { x: void 0, y: void 0 };\n let mousePosition = { x: 0, y: 0 };\n let dragEvent = null;\n let dragStarted = false;\n let autoPanId = 0;\n let autoPanStarted = false;\n const getPointerPosition = useGetPointerPosition();\n const updateNodes = ({ x, y }) => {\n lastPos = { x, y };\n let hasChange = false;\n dragItems = dragItems.map((n) => {\n const nextPosition = { x: x - n.distance.x, y: y - n.distance.y };\n const { computedPosition } = calcNextPosition(\n n,\n snapToGrid.value ? snapPosition(nextPosition, snapGrid.value) : nextPosition,\n emits.error,\n nodeExtent.value,\n n.parentNode ? findNode(n.parentNode) : void 0\n );\n hasChange = hasChange || n.position.x !== computedPosition.x || n.position.y !== computedPosition.y;\n n.position = computedPosition;\n return n;\n });\n if (!hasChange) {\n return;\n }\n updateNodePositions(dragItems, true, true);\n dragging.value = true;\n if (dragEvent) {\n const [currentNode, nodes2] = getEventHandlerParams({\n id: id2,\n dragItems,\n findNode\n });\n onDrag({ event: dragEvent, node: currentNode, nodes: nodes2 });\n }\n };\n const autoPan = () => {\n if (!containerBounds) {\n return;\n }\n const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed.value);\n if (xMovement !== 0 || yMovement !== 0) {\n const nextPos = {\n x: (lastPos.x ?? 0) - xMovement / viewport.value.zoom,\n y: (lastPos.y ?? 0) - yMovement / viewport.value.zoom\n };\n if (panBy({ x: xMovement, y: yMovement })) {\n updateNodes(nextPos);\n }\n }\n autoPanId = requestAnimationFrame(autoPan);\n };\n const startDrag = (event, nodeEl) => {\n dragStarted = true;\n const node = findNode(id2);\n if (!selectNodesOnDrag.value && !multiSelectionActive.value && node) {\n if (!node.selected) {\n removeSelectedElements();\n }\n }\n if (node && toValue$1(selectable) && selectNodesOnDrag.value) {\n handleNodeClick(\n node,\n multiSelectionActive.value,\n addSelectedNodes,\n removeSelectedElements,\n nodesSelectionActive,\n false,\n nodeEl\n );\n }\n const pointerPos = getPointerPosition(event.sourceEvent);\n lastPos = pointerPos;\n dragItems = getDragItems(nodes.value, nodesDraggable.value, pointerPos, findNode, id2);\n if (dragItems.length) {\n const [currentNode, nodes2] = getEventHandlerParams({\n id: id2,\n dragItems,\n findNode\n });\n onStart({ event: event.sourceEvent, node: currentNode, nodes: nodes2 });\n }\n };\n const eventStart = (event, nodeEl) => {\n var _a;\n if (event.sourceEvent.type === \"touchmove\" && event.sourceEvent.touches.length > 1) {\n return;\n }\n if (nodeDragThreshold.value === 0) {\n startDrag(event, nodeEl);\n }\n lastPos = getPointerPosition(event.sourceEvent);\n containerBounds = ((_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect()) || null;\n mousePosition = getEventPosition(event.sourceEvent, containerBounds);\n };\n const eventDrag = (event, nodeEl) => {\n const pointerPos = getPointerPosition(event.sourceEvent);\n if (!autoPanStarted && dragStarted && autoPanOnNodeDrag.value) {\n autoPanStarted = true;\n autoPan();\n }\n if (!dragStarted) {\n const x = pointerPos.xSnapped - (lastPos.x ?? 0);\n const y = pointerPos.ySnapped - (lastPos.y ?? 0);\n const distance2 = Math.sqrt(x * x + y * y);\n if (distance2 > nodeDragThreshold.value) {\n startDrag(event, nodeEl);\n }\n }\n if ((lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems.length && dragStarted) {\n dragEvent = event.sourceEvent;\n mousePosition = getEventPosition(event.sourceEvent, containerBounds);\n updateNodes(pointerPos);\n }\n };\n const eventEnd = (event) => {\n let isClick = false;\n if (!dragStarted && !dragging.value && !multiSelectionActive.value) {\n const evt = event.sourceEvent;\n const pointerPos = getPointerPosition(evt);\n const x = pointerPos.xSnapped - (lastPos.x ?? 0);\n const y = pointerPos.ySnapped - (lastPos.y ?? 0);\n const distance2 = Math.sqrt(x * x + y * y);\n if (distance2 !== 0 && distance2 <= nodeDragThreshold.value) {\n onClick == null ? void 0 : onClick(evt);\n isClick = true;\n }\n }\n if (dragItems.length && !isClick) {\n updateNodePositions(dragItems, false, false);\n const [currentNode, nodes2] = getEventHandlerParams({\n id: id2,\n dragItems,\n findNode\n });\n onStop({ event: event.sourceEvent, node: currentNode, nodes: nodes2 });\n }\n dragItems = [];\n dragging.value = false;\n autoPanStarted = false;\n dragStarted = false;\n lastPos = { x: void 0, y: void 0 };\n cancelAnimationFrame(autoPanId);\n };\n watch([() => toValue$1(disabled), el], ([isDisabled, nodeEl], _, onCleanup) => {\n if (nodeEl) {\n const selection2 = select(nodeEl);\n if (!isDisabled) {\n dragHandler = drag().on(\"start\", (event) => eventStart(event, nodeEl)).on(\"drag\", (event) => eventDrag(event, nodeEl)).on(\"end\", (event) => eventEnd(event)).filter((event) => {\n const target = event.target;\n const unrefDragHandle = toValue$1(dragHandle);\n return !event.button && (!noDragClassName.value || !hasSelector(target, `.${noDragClassName.value}`, nodeEl) && (!unrefDragHandle || hasSelector(target, unrefDragHandle, nodeEl)));\n });\n selection2.call(dragHandler);\n }\n onCleanup(() => {\n selection2.on(\".drag\", null);\n if (dragHandler) {\n dragHandler.on(\"start\", null);\n dragHandler.on(\"drag\", null);\n dragHandler.on(\"end\", null);\n }\n });\n }\n });\n return dragging;\n}\nfunction useEdge(id2) {\n const edgeId = id2 ?? inject(EdgeId, \"\");\n const edgeEl = inject(EdgeRef, ref(null));\n const { findEdge, emits } = useVueFlow();\n const edge = findEdge(edgeId);\n if (!edge) {\n emits.error(new VueFlowError(ErrorCode.EDGE_NOT_FOUND, edgeId));\n }\n return {\n id: edgeId,\n edge,\n edgeEl\n };\n}\nfunction createEdgeHooks() {\n return {\n doubleClick: createExtendedEventHook(),\n click: createExtendedEventHook(),\n mouseEnter: createExtendedEventHook(),\n mouseMove: createExtendedEventHook(),\n mouseLeave: createExtendedEventHook(),\n contextMenu: createExtendedEventHook(),\n updateStart: createExtendedEventHook(),\n update: createExtendedEventHook(),\n updateEnd: createExtendedEventHook()\n };\n}\nfunction useEdgeHooks(edge, emits) {\n const edgeHooks = createEdgeHooks();\n edgeHooks.doubleClick.on((event) => {\n var _a, _b;\n emits.edgeDoubleClick(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.doubleClick) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.click.on((event) => {\n var _a, _b;\n emits.edgeClick(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.click) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.mouseEnter.on((event) => {\n var _a, _b;\n emits.edgeMouseEnter(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.mouseEnter) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.mouseMove.on((event) => {\n var _a, _b;\n emits.edgeMouseMove(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.mouseMove) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.mouseLeave.on((event) => {\n var _a, _b;\n emits.edgeMouseLeave(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.mouseLeave) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.contextMenu.on((event) => {\n var _a, _b;\n emits.edgeContextMenu(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.contextMenu) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.updateStart.on((event) => {\n var _a, _b;\n emits.edgeUpdateStart(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.updateStart) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.update.on((event) => {\n var _a, _b;\n emits.edgeUpdate(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a, event);\n });\n edgeHooks.updateEnd.on((event) => {\n var _a, _b;\n emits.edgeUpdateEnd(event);\n (_b = (_a = edge.events) == null ? void 0 : _a.updateEnd) == null ? void 0 : _b.call(_a, event);\n });\n return Object.entries(edgeHooks).reduce(\n (hooks, [key, value]) => {\n hooks.emit[key] = value.trigger;\n hooks.on[key] = value.on;\n return hooks;\n },\n { emit: {}, on: {} }\n );\n}\nfunction useGetPointerPosition() {\n const { viewport, snapGrid, snapToGrid, vueFlowRef } = useVueFlow();\n return (event) => {\n var _a;\n const containerBounds = ((_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect()) ?? { left: 0, top: 0 };\n const evt = isUseDragEvent(event) ? event.sourceEvent : event;\n const { x, y } = getEventPosition(evt, containerBounds);\n const pointerPos = pointToRendererPoint({ x, y }, viewport.value);\n const { x: xSnapped, y: ySnapped } = snapToGrid.value ? snapPosition(pointerPos, snapGrid.value) : pointerPos;\n return {\n xSnapped,\n ySnapped,\n ...pointerPos\n };\n };\n}\nfunction alwaysValid() {\n return true;\n}\nfunction useHandle({\n handleId,\n nodeId,\n type,\n isValidConnection,\n edgeUpdaterType,\n onEdgeUpdate,\n onEdgeUpdateEnd\n}) {\n const {\n id: flowId,\n vueFlowRef,\n connectionMode,\n connectionRadius,\n connectOnClick,\n connectionClickStartHandle,\n nodesConnectable,\n autoPanOnConnect,\n autoPanSpeed,\n findNode,\n panBy,\n startConnection,\n updateConnection,\n endConnection,\n emits,\n viewport,\n edges,\n nodes,\n isValidConnection: isValidConnectionProp,\n nodeLookup\n } = useVueFlow();\n let connection = null;\n let isValid = false;\n let handleDomNode = null;\n function handlePointerDown(event) {\n var _a;\n const isTarget = toValue$1(type) === \"target\";\n const isMouseTriggered = isMouseEvent(event);\n const doc = getHostForElement(event.target);\n const clickedHandle = event.currentTarget;\n if (clickedHandle && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) {\n let onPointerMove = function(event2) {\n connectionPosition = getEventPosition(event2, containerBounds);\n closestHandle = getClosestHandle(\n pointToRendererPoint(connectionPosition, viewport.value, false, [1, 1]),\n connectionRadius.value,\n nodeLookup.value,\n fromHandle\n );\n if (!autoPanStarted) {\n autoPan();\n autoPanStarted = true;\n }\n const result = isValidHandle(\n event2,\n {\n handle: closestHandle,\n connectionMode: connectionMode.value,\n fromNodeId: toValue$1(nodeId),\n fromHandleId: toValue$1(handleId),\n fromType: isTarget ? \"target\" : \"source\",\n isValidConnection: isValidConnectionHandler,\n doc,\n lib: \"vue\",\n flowId,\n nodeLookup: nodeLookup.value\n },\n edges.value,\n nodes.value,\n findNode\n );\n handleDomNode = result.handleDomNode;\n connection = result.connection;\n isValid = isConnectionValid(!!closestHandle, result.isValid);\n const newConnection2 = {\n // from stays the same\n ...previousConnection,\n isValid,\n to: result.toHandle && isValid ? rendererPointToPoint({ x: result.toHandle.x, y: result.toHandle.y }, viewport.value) : connectionPosition,\n toHandle: result.toHandle,\n toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],\n toNode: result.toHandle ? nodeLookup.value.get(result.toHandle.nodeId) : null\n };\n if (isValid && closestHandle && (previousConnection == null ? void 0 : previousConnection.toHandle) && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id && previousConnection.to.x === newConnection2.to.x && previousConnection.to.y === newConnection2.to.y) {\n return;\n }\n updateConnection(\n closestHandle && isValid ? rendererPointToPoint(\n {\n x: closestHandle.x,\n y: closestHandle.y\n },\n viewport.value\n ) : connectionPosition,\n result.toHandle,\n getConnectionStatus(!!closestHandle, isValid)\n );\n previousConnection = newConnection2;\n if (!closestHandle && !isValid && !handleDomNode) {\n return resetRecentHandle(prevActiveHandle);\n }\n if (connection && connection.source !== connection.target && handleDomNode) {\n resetRecentHandle(prevActiveHandle);\n prevActiveHandle = handleDomNode;\n handleDomNode.classList.add(\"connecting\", \"vue-flow__handle-connecting\");\n handleDomNode.classList.toggle(\"valid\", !!isValid);\n handleDomNode.classList.toggle(\"vue-flow__handle-valid\", !!isValid);\n }\n }, onPointerUp = function(event2) {\n if ((closestHandle || handleDomNode) && connection && isValid) {\n if (!onEdgeUpdate) {\n emits.connect(connection);\n } else {\n onEdgeUpdate(event2, connection);\n }\n }\n emits.connectEnd(event2);\n if (edgeUpdaterType) {\n onEdgeUpdateEnd == null ? void 0 : onEdgeUpdateEnd(event2);\n }\n resetRecentHandle(prevActiveHandle);\n cancelAnimationFrame(autoPanId);\n endConnection(event2);\n autoPanStarted = false;\n isValid = false;\n connection = null;\n handleDomNode = null;\n doc.removeEventListener(\"mousemove\", onPointerMove);\n doc.removeEventListener(\"mouseup\", onPointerUp);\n doc.removeEventListener(\"touchmove\", onPointerMove);\n doc.removeEventListener(\"touchend\", onPointerUp);\n };\n const node = findNode(toValue$1(nodeId));\n let isValidConnectionHandler = toValue$1(isValidConnection) || isValidConnectionProp.value || alwaysValid;\n if (!isValidConnectionHandler && node) {\n isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid;\n }\n let closestHandle;\n let autoPanId = 0;\n const { x, y } = getEventPosition(event);\n const handleType = getHandleType(toValue$1(edgeUpdaterType), clickedHandle);\n const containerBounds = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect();\n if (!containerBounds || !handleType) {\n return;\n }\n const fromHandleInternal = getHandle(toValue$1(nodeId), handleType, toValue$1(handleId), nodeLookup.value, connectionMode.value);\n if (!fromHandleInternal) {\n return;\n }\n let prevActiveHandle;\n let connectionPosition = getEventPosition(event, containerBounds);\n let autoPanStarted = false;\n const autoPan = () => {\n if (!autoPanOnConnect.value) {\n return;\n }\n const [xMovement, yMovement] = calcAutoPan(connectionPosition, containerBounds, autoPanSpeed.value);\n panBy({ x: xMovement, y: yMovement });\n autoPanId = requestAnimationFrame(autoPan);\n };\n const fromHandle = {\n ...fromHandleInternal,\n nodeId: toValue$1(nodeId),\n type: handleType,\n position: fromHandleInternal.position\n };\n const fromNodeInternal = nodeLookup.value.get(toValue$1(nodeId));\n const from = getHandlePosition(fromNodeInternal, fromHandle, Position.Left, true);\n const newConnection = {\n inProgress: true,\n isValid: null,\n from,\n fromHandle,\n fromPosition: fromHandle.position,\n fromNode: fromNodeInternal,\n to: connectionPosition,\n toHandle: null,\n toPosition: oppositePosition[fromHandle.position],\n toNode: null\n };\n startConnection(\n {\n nodeId: toValue$1(nodeId),\n id: toValue$1(handleId),\n type: handleType,\n position: (clickedHandle == null ? void 0 : clickedHandle.getAttribute(\"data-handlepos\")) || Position.Top,\n ...connectionPosition\n },\n {\n x: x - containerBounds.left,\n y: y - containerBounds.top\n }\n );\n emits.connectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId), handleType });\n let previousConnection = newConnection;\n doc.addEventListener(\"mousemove\", onPointerMove);\n doc.addEventListener(\"mouseup\", onPointerUp);\n doc.addEventListener(\"touchmove\", onPointerMove);\n doc.addEventListener(\"touchend\", onPointerUp);\n }\n }\n function handleClick(event) {\n var _a, _b;\n if (!connectOnClick.value) {\n return;\n }\n const isTarget = toValue$1(type) === \"target\";\n if (!connectionClickStartHandle.value) {\n emits.clickConnectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId) });\n startConnection(\n {\n nodeId: toValue$1(nodeId),\n type: toValue$1(type),\n id: toValue$1(handleId),\n position: Position.Top,\n ...getEventPosition(event)\n },\n void 0,\n true\n );\n return;\n }\n let isValidConnectionHandler = toValue$1(isValidConnection) || isValidConnectionProp.value || alwaysValid;\n const node = findNode(toValue$1(nodeId));\n if (!isValidConnectionHandler && node) {\n isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid;\n }\n if (node && (typeof node.connectable === \"undefined\" ? nodesConnectable.value : node.connectable) === false) {\n return;\n }\n const doc = getHostForElement(event.target);\n const result = isValidHandle(\n event,\n {\n handle: {\n nodeId: toValue$1(nodeId),\n id: toValue$1(handleId),\n type: toValue$1(type),\n position: Position.Top,\n ...getEventPosition(event)\n },\n connectionMode: connectionMode.value,\n fromNodeId: connectionClickStartHandle.value.nodeId,\n fromHandleId: connectionClickStartHandle.value.id ?? null,\n fromType: connectionClickStartHandle.value.type,\n isValidConnection: isValidConnectionHandler,\n doc,\n lib: \"vue\",\n flowId,\n nodeLookup: nodeLookup.value\n },\n edges.value,\n nodes.value,\n findNode\n );\n const isOwnHandle = ((_a = result.connection) == null ? void 0 : _a.source) === ((_b = result.connection) == null ? void 0 : _b.target);\n if (result.isValid && result.connection && !isOwnHandle) {\n emits.connect(result.connection);\n }\n emits.clickConnectEnd(event);\n endConnection(event, true);\n }\n return {\n handlePointerDown,\n handleClick\n };\n}\nfunction useNodeId() {\n return inject(NodeId, \"\");\n}\nfunction useNode(id2) {\n const nodeId = id2 ?? useNodeId() ?? \"\";\n const nodeEl = inject(NodeRef, ref(null));\n const { findNode, edges, emits } = useVueFlow();\n const node = findNode(nodeId);\n if (!node) {\n emits.error(new VueFlowError(ErrorCode.NODE_NOT_FOUND, nodeId));\n }\n return {\n id: nodeId,\n nodeEl,\n node,\n parentNode: computed(() => findNode(node.parentNode)),\n connectedEdges: computed(() => getConnectedEdges([node], edges.value))\n };\n}\nfunction createNodeHooks() {\n return {\n doubleClick: createExtendedEventHook(),\n click: createExtendedEventHook(),\n mouseEnter: createExtendedEventHook(),\n mouseMove: createExtendedEventHook(),\n mouseLeave: createExtendedEventHook(),\n contextMenu: createExtendedEventHook(),\n dragStart: createExtendedEventHook(),\n drag: createExtendedEventHook(),\n dragStop: createExtendedEventHook()\n };\n}\nfunction useNodeHooks(node, emits) {\n const nodeHooks = createNodeHooks();\n nodeHooks.doubleClick.on((event) => {\n var _a, _b;\n emits.nodeDoubleClick(event);\n (_b = (_a = node.events) == null ? void 0 : _a.doubleClick) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.click.on((event) => {\n var _a, _b;\n emits.nodeClick(event);\n (_b = (_a = node.events) == null ? void 0 : _a.click) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.mouseEnter.on((event) => {\n var _a, _b;\n emits.nodeMouseEnter(event);\n (_b = (_a = node.events) == null ? void 0 : _a.mouseEnter) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.mouseMove.on((event) => {\n var _a, _b;\n emits.nodeMouseMove(event);\n (_b = (_a = node.events) == null ? void 0 : _a.mouseMove) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.mouseLeave.on((event) => {\n var _a, _b;\n emits.nodeMouseLeave(event);\n (_b = (_a = node.events) == null ? void 0 : _a.mouseLeave) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.contextMenu.on((event) => {\n var _a, _b;\n emits.nodeContextMenu(event);\n (_b = (_a = node.events) == null ? void 0 : _a.contextMenu) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.dragStart.on((event) => {\n var _a, _b;\n emits.nodeDragStart(event);\n (_b = (_a = node.events) == null ? void 0 : _a.dragStart) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.drag.on((event) => {\n var _a, _b;\n emits.nodeDrag(event);\n (_b = (_a = node.events) == null ? void 0 : _a.drag) == null ? void 0 : _b.call(_a, event);\n });\n nodeHooks.dragStop.on((event) => {\n var _a, _b;\n emits.nodeDragStop(event);\n (_b = (_a = node.events) == null ? void 0 : _a.dragStop) == null ? void 0 : _b.call(_a, event);\n });\n return Object.entries(nodeHooks).reduce(\n (hooks, [key, value]) => {\n hooks.emit[key] = value.trigger;\n hooks.on[key] = value.on;\n return hooks;\n },\n { emit: {}, on: {} }\n );\n}\nfunction useUpdateNodePositions() {\n const { getSelectedNodes, nodeExtent, updateNodePositions, findNode, snapGrid, snapToGrid, nodesDraggable, emits } = useVueFlow();\n return (positionDiff, isShiftPressed = false) => {\n const xVelo = snapToGrid.value ? snapGrid.value[0] : 5;\n const yVelo = snapToGrid.value ? snapGrid.value[1] : 5;\n const factor = isShiftPressed ? 4 : 1;\n const positionDiffX = positionDiff.x * xVelo * factor;\n const positionDiffY = positionDiff.y * yVelo * factor;\n const nodeUpdates = [];\n for (const node of getSelectedNodes.value) {\n if (node.draggable || nodesDraggable && typeof node.draggable === \"undefined\") {\n const nextPosition = { x: node.computedPosition.x + positionDiffX, y: node.computedPosition.y + positionDiffY };\n const { computedPosition } = calcNextPosition(\n node,\n nextPosition,\n emits.error,\n nodeExtent.value,\n node.parentNode ? findNode(node.parentNode) : void 0\n );\n nodeUpdates.push({\n id: node.id,\n position: computedPosition,\n from: node.position,\n distance: { x: positionDiff.x, y: positionDiff.y },\n dimensions: node.dimensions\n });\n }\n }\n updateNodePositions(nodeUpdates, true, false);\n };\n}\nconst DEFAULT_PADDING = 0.1;\nconst defaultEase = (t) => ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\nfunction noop() {\n warn(\"Viewport not initialized yet.\");\n return Promise.resolve(false);\n}\nconst initialViewportHelper = {\n zoomIn: noop,\n zoomOut: noop,\n zoomTo: noop,\n fitView: noop,\n setCenter: noop,\n fitBounds: noop,\n project: (position) => position,\n screenToFlowCoordinate: (position) => position,\n flowToScreenCoordinate: (position) => position,\n setViewport: noop,\n setTransform: noop,\n getViewport: () => ({ x: 0, y: 0, zoom: 1 }),\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n viewportInitialized: false\n};\nfunction useViewportHelper(state) {\n function zoom2(scale, transitionOptions) {\n return new Promise((resolve) => {\n if (state.d3Selection && state.d3Zoom) {\n state.d3Zoom.interpolate((transitionOptions == null ? void 0 : transitionOptions.interpolate) === \"linear\" ? interpolate$1 : interpolateZoom).scaleBy(\n getD3Transition(state.d3Selection, transitionOptions == null ? void 0 : transitionOptions.duration, transitionOptions == null ? void 0 : transitionOptions.ease, () => {\n resolve(true);\n }),\n scale\n );\n } else {\n resolve(false);\n }\n });\n }\n function transformViewport(x, y, zoom22, transitionOptions) {\n return new Promise((resolve) => {\n var _a;\n const { x: clampedX, y: clampedY } = clampPosition({ x: -x, y: -y }, state.translateExtent);\n const nextTransform = identity.translate(-clampedX, -clampedY).scale(zoom22);\n if (state.d3Selection && state.d3Zoom) {\n (_a = state.d3Zoom) == null ? void 0 : _a.interpolate((transitionOptions == null ? void 0 : transitionOptions.interpolate) === \"linear\" ? interpolate$1 : interpolateZoom).transform(\n getD3Transition(state.d3Selection, transitionOptions == null ? void 0 : transitionOptions.duration, transitionOptions == null ? void 0 : transitionOptions.ease, () => {\n resolve(true);\n }),\n nextTransform\n );\n } else {\n resolve(false);\n }\n });\n }\n return computed(() => {\n const isInitialized = state.d3Zoom && state.d3Selection && state.dimensions.width && state.dimensions.height;\n if (!isInitialized) {\n return initialViewportHelper;\n }\n return {\n viewportInitialized: true,\n // todo: allow passing scale as option\n zoomIn: (options) => {\n return zoom2(1.2, options);\n },\n zoomOut: (options) => {\n return zoom2(1 / 1.2, options);\n },\n zoomTo: (zoomLevel, options) => {\n return new Promise((resolve) => {\n if (state.d3Selection && state.d3Zoom) {\n state.d3Zoom.interpolate((options == null ? void 0 : options.interpolate) === \"linear\" ? interpolate$1 : interpolateZoom).scaleTo(\n getD3Transition(state.d3Selection, options == null ? void 0 : options.duration, options == null ? void 0 : options.ease, () => {\n resolve(true);\n }),\n zoomLevel\n );\n } else {\n resolve(false);\n }\n });\n },\n setViewport: (transform, options) => {\n return transformViewport(transform.x, transform.y, transform.zoom, options);\n },\n setTransform: (transform, options) => {\n return transformViewport(transform.x, transform.y, transform.zoom, options);\n },\n getViewport: () => ({\n x: state.viewport.x,\n y: state.viewport.y,\n zoom: state.viewport.zoom\n }),\n getTransform: () => {\n return {\n x: state.viewport.x,\n y: state.viewport.y,\n zoom: state.viewport.zoom\n };\n },\n fitView: (options = {\n padding: DEFAULT_PADDING,\n includeHiddenNodes: false,\n duration: 0\n }) => {\n var _a, _b;\n const nodesToFit = [];\n for (const node of state.nodes) {\n const isVisible = node.dimensions.width && node.dimensions.height && ((options == null ? void 0 : options.includeHiddenNodes) || !node.hidden);\n if (isVisible) {\n if (!((_a = options.nodes) == null ? void 0 : _a.length) || ((_b = options.nodes) == null ? void 0 : _b.length) && options.nodes.includes(node.id)) {\n nodesToFit.push(node);\n }\n }\n }\n if (!nodesToFit.length) {\n return Promise.resolve(false);\n }\n const bounds = getRectOfNodes(nodesToFit);\n const { x, y, zoom: zoom22 } = getTransformForBounds(\n bounds,\n state.dimensions.width,\n state.dimensions.height,\n options.minZoom ?? state.minZoom,\n options.maxZoom ?? state.maxZoom,\n options.padding ?? DEFAULT_PADDING,\n options.offset\n );\n return transformViewport(x, y, zoom22, options);\n },\n setCenter: (x, y, options) => {\n const nextZoom = typeof (options == null ? void 0 : options.zoom) !== \"undefined\" ? options.zoom : state.maxZoom;\n const centerX = state.dimensions.width / 2 - x * nextZoom;\n const centerY = state.dimensions.height / 2 - y * nextZoom;\n return transformViewport(centerX, centerY, nextZoom, options);\n },\n fitBounds: (bounds, options = { padding: DEFAULT_PADDING }) => {\n const { x, y, zoom: zoom22 } = getTransformForBounds(\n bounds,\n state.dimensions.width,\n state.dimensions.height,\n state.minZoom,\n state.maxZoom,\n options.padding\n );\n return transformViewport(x, y, zoom22, options);\n },\n project: (position) => pointToRendererPoint(position, state.viewport, state.snapToGrid, state.snapGrid),\n screenToFlowCoordinate: (position) => {\n if (state.vueFlowRef) {\n const { x: domX, y: domY } = state.vueFlowRef.getBoundingClientRect();\n const correctedPosition = {\n x: position.x - domX,\n y: position.y - domY\n };\n return pointToRendererPoint(correctedPosition, state.viewport, state.snapToGrid, state.snapGrid);\n }\n return { x: 0, y: 0 };\n },\n flowToScreenCoordinate: (position) => {\n if (state.vueFlowRef) {\n const { x: domX, y: domY } = state.vueFlowRef.getBoundingClientRect();\n const correctedPosition = {\n x: position.x + domX,\n y: position.y + domY\n };\n return rendererPointToPoint(correctedPosition, state.viewport);\n }\n return { x: 0, y: 0 };\n }\n };\n });\n}\nfunction getD3Transition(selection2, duration = 0, ease = defaultEase, onEnd = () => {\n}) {\n const hasDuration = typeof duration === \"number\" && duration > 0;\n if (!hasDuration) {\n onEnd();\n }\n return hasDuration ? selection2.transition().duration(duration).ease(ease).on(\"end\", onEnd) : selection2;\n}\nfunction useWatchProps(models, props, store) {\n const scope = effectScope(true);\n scope.run(() => {\n const watchModelValue = () => {\n scope.run(() => {\n let pauseModel;\n let pauseStore;\n let immediateStore = !!(store.nodes.value.length || store.edges.value.length);\n pauseModel = watchPausable([models.modelValue, () => {\n var _a, _b;\n return (_b = (_a = models.modelValue) == null ? void 0 : _a.value) == null ? void 0 : _b.length;\n }], ([elements]) => {\n if (elements && Array.isArray(elements)) {\n pauseStore == null ? void 0 : pauseStore.pause();\n store.setElements(elements);\n if (!pauseStore && !immediateStore && elements.length) {\n immediateStore = true;\n } else {\n pauseStore == null ? void 0 : pauseStore.resume();\n }\n }\n });\n pauseStore = watchPausable(\n [store.nodes, store.edges, () => store.edges.value.length, () => store.nodes.value.length],\n ([nodes, edges]) => {\n var _a;\n if (((_a = models.modelValue) == null ? void 0 : _a.value) && Array.isArray(models.modelValue.value)) {\n pauseModel == null ? void 0 : pauseModel.pause();\n models.modelValue.value = [...nodes, ...edges];\n nextTick(() => {\n pauseModel == null ? void 0 : pauseModel.resume();\n });\n }\n },\n { immediate: immediateStore }\n );\n onScopeDispose(() => {\n pauseModel == null ? void 0 : pauseModel.stop();\n pauseStore == null ? void 0 : pauseStore.stop();\n });\n });\n };\n const watchNodesValue = () => {\n scope.run(() => {\n let pauseModel;\n let pauseStore;\n let immediateStore = !!store.nodes.value.length;\n pauseModel = watchPausable([models.nodes, () => {\n var _a, _b;\n return (_b = (_a = models.nodes) == null ? void 0 : _a.value) == null ? void 0 : _b.length;\n }], ([nodes]) => {\n if (nodes && Array.isArray(nodes)) {\n pauseStore == null ? void 0 : pauseStore.pause();\n store.setNodes(nodes);\n if (!pauseStore && !immediateStore && nodes.length) {\n immediateStore = true;\n } else {\n pauseStore == null ? void 0 : pauseStore.resume();\n }\n }\n });\n pauseStore = watchPausable(\n [store.nodes, () => store.nodes.value.length],\n ([nodes]) => {\n var _a;\n if (((_a = models.nodes) == null ? void 0 : _a.value) && Array.isArray(models.nodes.value)) {\n pauseModel == null ? void 0 : pauseModel.pause();\n models.nodes.value = [...nodes];\n nextTick(() => {\n pauseModel == null ? void 0 : pauseModel.resume();\n });\n }\n },\n { immediate: immediateStore }\n );\n onScopeDispose(() => {\n pauseModel == null ? void 0 : pauseModel.stop();\n pauseStore == null ? void 0 : pauseStore.stop();\n });\n });\n };\n const watchEdgesValue = () => {\n scope.run(() => {\n let pauseModel;\n let pauseStore;\n let immediateStore = !!store.edges.value.length;\n pauseModel = watchPausable([models.edges, () => {\n var _a, _b;\n return (_b = (_a = models.edges) == null ? void 0 : _a.value) == null ? void 0 : _b.length;\n }], ([edges]) => {\n if (edges && Array.isArray(edges)) {\n pauseStore == null ? void 0 : pauseStore.pause();\n store.setEdges(edges);\n if (!pauseStore && !immediateStore && edges.length) {\n immediateStore = true;\n } else {\n pauseStore == null ? void 0 : pauseStore.resume();\n }\n }\n });\n pauseStore = watchPausable(\n [store.edges, () => store.edges.value.length],\n ([edges]) => {\n var _a;\n if (((_a = models.edges) == null ? void 0 : _a.value) && Array.isArray(models.edges.value)) {\n pauseModel == null ? void 0 : pauseModel.pause();\n models.edges.value = [...edges];\n nextTick(() => {\n pauseModel == null ? void 0 : pauseModel.resume();\n });\n }\n },\n { immediate: immediateStore }\n );\n onScopeDispose(() => {\n pauseModel == null ? void 0 : pauseModel.stop();\n pauseStore == null ? void 0 : pauseStore.stop();\n });\n });\n };\n const watchMaxZoom = () => {\n scope.run(() => {\n watch(\n () => props.maxZoom,\n () => {\n if (props.maxZoom && isDef(props.maxZoom)) {\n store.setMaxZoom(props.maxZoom);\n }\n },\n {\n immediate: true\n }\n );\n });\n };\n const watchMinZoom = () => {\n scope.run(() => {\n watch(\n () => props.minZoom,\n () => {\n if (props.minZoom && isDef(props.minZoom)) {\n store.setMinZoom(props.minZoom);\n }\n },\n { immediate: true }\n );\n });\n };\n const watchTranslateExtent = () => {\n scope.run(() => {\n watch(\n () => props.translateExtent,\n () => {\n if (props.translateExtent && isDef(props.translateExtent)) {\n store.setTranslateExtent(props.translateExtent);\n }\n },\n {\n immediate: true\n }\n );\n });\n };\n const watchNodeExtent = () => {\n scope.run(() => {\n watch(\n () => props.nodeExtent,\n () => {\n if (props.nodeExtent && isDef(props.nodeExtent)) {\n store.setNodeExtent(props.nodeExtent);\n }\n },\n {\n immediate: true\n }\n );\n });\n };\n const watchApplyDefault = () => {\n scope.run(() => {\n watch(\n () => props.applyDefault,\n () => {\n if (isDef(props.applyDefault)) {\n store.applyDefault.value = props.applyDefault;\n }\n },\n {\n immediate: true\n }\n );\n });\n };\n const watchAutoConnect = () => {\n scope.run(() => {\n const autoConnector = async (params) => {\n let connection = params;\n if (typeof props.autoConnect === \"function\") {\n connection = await props.autoConnect(params);\n }\n if (connection !== false) {\n store.addEdges([connection]);\n }\n };\n watch(\n () => props.autoConnect,\n () => {\n if (isDef(props.autoConnect)) {\n store.autoConnect.value = props.autoConnect;\n }\n },\n { immediate: true }\n );\n watch(\n store.autoConnect,\n (autoConnectEnabled, _, onCleanup) => {\n if (autoConnectEnabled) {\n store.onConnect(autoConnector);\n } else {\n store.hooks.value.connect.off(autoConnector);\n }\n onCleanup(() => {\n store.hooks.value.connect.off(autoConnector);\n });\n },\n { immediate: true }\n );\n });\n };\n const watchRest = () => {\n const skip = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n for (const key of Object.keys(props)) {\n const propKey = key;\n if (!skip.includes(propKey)) {\n const propValue = toRef(() => props[propKey]);\n const storeRef = store[propKey];\n if (isRef(storeRef)) {\n scope.run(() => {\n watch(\n propValue,\n (nextValue) => {\n if (isDef(nextValue)) {\n storeRef.value = nextValue;\n }\n },\n { immediate: true }\n );\n });\n }\n }\n }\n };\n const runAll = () => {\n watchModelValue();\n watchNodesValue();\n watchEdgesValue();\n watchMinZoom();\n watchMaxZoom();\n watchTranslateExtent();\n watchNodeExtent();\n watchApplyDefault();\n watchAutoConnect();\n watchRest();\n };\n runAll();\n });\n return () => scope.stop();\n}\nfunction useZoomPanHelper(vueFlowId) {\n const state = useVueFlow({ id: vueFlowId });\n const viewportHelper = useViewportHelper(toReactive(state));\n return {\n fitView: (params) => viewportHelper.value.fitView(params),\n zoomIn: (transitionOpts) => viewportHelper.value.zoomIn(transitionOpts),\n zoomOut: (transitionOpts) => viewportHelper.value.zoomOut(transitionOpts),\n zoomTo: (zoomLevel, transitionOpts) => viewportHelper.value.zoomTo(zoomLevel, transitionOpts),\n setViewport: (params, transitionOpts) => viewportHelper.value.setViewport(params, transitionOpts),\n setTransform: (params, transitionOpts) => viewportHelper.value.setTransform(params, transitionOpts),\n getViewport: () => viewportHelper.value.getViewport(),\n getTransform: () => viewportHelper.value.getTransform(),\n setCenter: (x, y, opts) => viewportHelper.value.setCenter(x, y, opts),\n fitBounds: (params, opts) => viewportHelper.value.fitBounds(params, opts),\n project: (params) => viewportHelper.value.project(params)\n };\n}\nfunction createHooks() {\n return {\n edgesChange: createExtendedEventHook(),\n nodesChange: createExtendedEventHook(),\n nodeDoubleClick: createExtendedEventHook(),\n nodeClick: createExtendedEventHook(),\n nodeMouseEnter: createExtendedEventHook(),\n nodeMouseMove: createExtendedEventHook(),\n nodeMouseLeave: createExtendedEventHook(),\n nodeContextMenu: createExtendedEventHook(),\n nodeDragStart: createExtendedEventHook(),\n nodeDrag: createExtendedEventHook(),\n nodeDragStop: createExtendedEventHook(),\n nodesInitialized: createExtendedEventHook(),\n miniMapNodeClick: createExtendedEventHook(),\n miniMapNodeDoubleClick: createExtendedEventHook(),\n miniMapNodeMouseEnter: createExtendedEventHook(),\n miniMapNodeMouseMove: createExtendedEventHook(),\n miniMapNodeMouseLeave: createExtendedEventHook(),\n connect: createExtendedEventHook(),\n connectStart: createExtendedEventHook(),\n connectEnd: createExtendedEventHook(),\n clickConnectStart: createExtendedEventHook(),\n clickConnectEnd: createExtendedEventHook(),\n paneReady: createExtendedEventHook(),\n init: createExtendedEventHook(),\n move: createExtendedEventHook(),\n moveStart: createExtendedEventHook(),\n moveEnd: createExtendedEventHook(),\n selectionDragStart: createExtendedEventHook(),\n selectionDrag: createExtendedEventHook(),\n selectionDragStop: createExtendedEventHook(),\n selectionContextMenu: createExtendedEventHook(),\n selectionStart: createExtendedEventHook(),\n selectionEnd: createExtendedEventHook(),\n viewportChangeStart: createExtendedEventHook(),\n viewportChange: createExtendedEventHook(),\n viewportChangeEnd: createExtendedEventHook(),\n paneScroll: createExtendedEventHook(),\n paneClick: createExtendedEventHook(),\n paneContextMenu: createExtendedEventHook(),\n paneMouseEnter: createExtendedEventHook(),\n paneMouseMove: createExtendedEventHook(),\n paneMouseLeave: createExtendedEventHook(),\n edgeContextMenu: createExtendedEventHook(),\n edgeMouseEnter: createExtendedEventHook(),\n edgeMouseMove: createExtendedEventHook(),\n edgeMouseLeave: createExtendedEventHook(),\n edgeDoubleClick: createExtendedEventHook(),\n edgeClick: createExtendedEventHook(),\n edgeUpdateStart: createExtendedEventHook(),\n edgeUpdate: createExtendedEventHook(),\n edgeUpdateEnd: createExtendedEventHook(),\n updateNodeInternals: createExtendedEventHook(),\n error: createExtendedEventHook((err) => warn(err.message))\n };\n}\nfunction useHooks(emit, hooks) {\n onBeforeMount(() => {\n for (const [key, value] of Object.entries(hooks.value)) {\n const listener = (data) => {\n emit(key, data);\n };\n value.fns.add(listener);\n tryOnScopeDispose(() => {\n value.off(listener);\n });\n }\n });\n}\nfunction useState() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n connectionLookup: /* @__PURE__ */ new Map(),\n nodeTypes: {},\n edgeTypes: {},\n initialized: false,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: SelectionMode.Full,\n paneDragging: false,\n preventScrolling: true,\n zoomOnScroll: true,\n zoomOnPinch: true,\n zoomOnDoubleClick: true,\n panOnScroll: false,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: PanOnScrollMode.Free,\n paneClickDistance: 0,\n panOnDrag: true,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: false,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: false,\n userSelectionActive: false,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: ConnectionLineType.Bezier,\n style: {}\n },\n connectionMode: ConnectionMode.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: Number.NaN, y: Number.NaN },\n connectionRadius: 20,\n connectOnClick: true,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: false,\n edgesUpdatable: false,\n edgesFocusable: true,\n nodesFocusable: true,\n nodesConnectable: true,\n nodesDraggable: true,\n nodeDragThreshold: 1,\n elementsSelectable: true,\n selectNodesOnDrag: true,\n multiSelectionActive: false,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: isMacOs() ? \"Meta\" : \"Control\",\n zoomActivationKeyCode: isMacOs() ? \"Meta\" : \"Control\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: createHooks(),\n applyDefault: true,\n autoConnect: false,\n fitViewOnInit: false,\n fitViewOnInitDone: false,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: false,\n elevateNodesOnSelect: true,\n autoPanOnNodeDrag: true,\n autoPanOnConnect: true,\n autoPanSpeed: 15,\n disableKeyboardA11y: false,\n ariaLiveMessage: \"\"\n };\n}\nconst storeOptionsToSkip = [\n \"id\",\n \"vueFlowRef\",\n \"viewportRef\",\n \"initialized\",\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n];\nfunction useActions(state, nodeLookup, edgeLookup) {\n const viewportHelper = useViewportHelper(state);\n const updateNodeInternals = (ids) => {\n const updateIds = ids ?? [];\n state.hooks.updateNodeInternals.trigger(updateIds);\n };\n const getIncomers$1 = (nodeOrId) => {\n return getIncomers(nodeOrId, state.nodes, state.edges);\n };\n const getOutgoers$1 = (nodeOrId) => {\n return getOutgoers(nodeOrId, state.nodes, state.edges);\n };\n const getConnectedEdges$1 = (nodesOrId) => {\n return getConnectedEdges(nodesOrId, state.edges);\n };\n const getHandleConnections = ({ id: id2, type, nodeId }) => {\n var _a;\n const handleSuffix = id2 ? `-${type}-${id2}` : `-${type}`;\n return Array.from(((_a = state.connectionLookup.get(`${nodeId}${handleSuffix}`)) == null ? void 0 : _a.values()) ?? []);\n };\n const findNode = (id2) => {\n if (!id2) {\n return;\n }\n return nodeLookup.value.get(id2);\n };\n const findEdge = (id2) => {\n if (!id2) {\n return;\n }\n return edgeLookup.value.get(id2);\n };\n const updateNodePositions = (dragItems, changed, dragging) => {\n var _a, _b;\n const changes = [];\n for (const node of dragItems) {\n const change = {\n id: node.id,\n type: \"position\",\n dragging,\n from: node.from\n };\n if (changed) {\n change.position = node.position;\n if (node.parentNode) {\n const parentNode = findNode(node.parentNode);\n change.position = {\n x: change.position.x - (((_a = parentNode == null ? void 0 : parentNode.computedPosition) == null ? void 0 : _a.x) ?? 0),\n y: change.position.y - (((_b = parentNode == null ? void 0 : parentNode.computedPosition) == null ? void 0 : _b.y) ?? 0)\n };\n }\n }\n changes.push(change);\n }\n if (changes == null ? void 0 : changes.length) {\n state.hooks.nodesChange.trigger(changes);\n }\n };\n const updateNodeDimensions = (updates) => {\n if (!state.vueFlowRef) {\n return;\n }\n const viewportNode = state.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!viewportNode) {\n return;\n }\n const style = window.getComputedStyle(viewportNode);\n const { m22: zoom2 } = new window.DOMMatrixReadOnly(style.transform);\n const changes = [];\n for (const element of updates) {\n const update = element;\n const node = findNode(update.id);\n if (node) {\n const dimensions = getDimensions(update.nodeElement);\n const doUpdate = !!(dimensions.width && dimensions.height && (node.dimensions.width !== dimensions.width || node.dimensions.height !== dimensions.height || update.forceUpdate));\n if (doUpdate) {\n const nodeBounds = update.nodeElement.getBoundingClientRect();\n node.dimensions = dimensions;\n node.handleBounds.source = getHandleBounds(\"source\", update.nodeElement, nodeBounds, zoom2, node.id);\n node.handleBounds.target = getHandleBounds(\"target\", update.nodeElement, nodeBounds, zoom2, node.id);\n changes.push({\n id: node.id,\n type: \"dimensions\",\n dimensions\n });\n }\n }\n }\n if (!state.fitViewOnInitDone && state.fitViewOnInit) {\n viewportHelper.value.fitView().then(() => {\n state.fitViewOnInitDone = true;\n });\n }\n if (changes.length) {\n state.hooks.nodesChange.trigger(changes);\n }\n };\n const elementSelectionHandler = (elements, selected) => {\n const nodeIds = /* @__PURE__ */ new Set();\n const edgeIds = /* @__PURE__ */ new Set();\n for (const element of elements) {\n if (isNode(element)) {\n nodeIds.add(element.id);\n } else if (isEdge(element)) {\n edgeIds.add(element.id);\n }\n }\n const changedNodes = getSelectionChanges(nodeLookup.value, nodeIds, true);\n const changedEdges = getSelectionChanges(edgeLookup.value, edgeIds);\n if (state.multiSelectionActive) {\n for (const nodeId of nodeIds) {\n changedNodes.push(createSelectionChange(nodeId, selected));\n }\n for (const edgeId of edgeIds) {\n changedEdges.push(createSelectionChange(edgeId, selected));\n }\n }\n if (changedNodes.length) {\n state.hooks.nodesChange.trigger(changedNodes);\n }\n if (changedEdges.length) {\n state.hooks.edgesChange.trigger(changedEdges);\n }\n };\n const addSelectedNodes = (nodes) => {\n if (state.multiSelectionActive) {\n const nodeChanges = nodes.map((node) => createSelectionChange(node.id, true));\n state.hooks.nodesChange.trigger(nodeChanges);\n return;\n }\n state.hooks.nodesChange.trigger(getSelectionChanges(nodeLookup.value, new Set(nodes.map((n) => n.id)), true));\n state.hooks.edgesChange.trigger(getSelectionChanges(edgeLookup.value));\n };\n const addSelectedEdges = (edges) => {\n if (state.multiSelectionActive) {\n const changedEdges = edges.map((edge) => createSelectionChange(edge.id, true));\n state.hooks.edgesChange.trigger(changedEdges);\n return;\n }\n state.hooks.edgesChange.trigger(getSelectionChanges(edgeLookup.value, new Set(edges.map((e) => e.id))));\n state.hooks.nodesChange.trigger(getSelectionChanges(nodeLookup.value, /* @__PURE__ */ new Set(), true));\n };\n const addSelectedElements = (elements) => {\n elementSelectionHandler(elements, true);\n };\n const removeSelectedNodes = (nodes) => {\n const nodesToUnselect = nodes || state.nodes;\n const nodeChanges = nodesToUnselect.map((n) => {\n n.selected = false;\n return createSelectionChange(n.id, false);\n });\n state.hooks.nodesChange.trigger(nodeChanges);\n };\n const removeSelectedEdges = (edges) => {\n const edgesToUnselect = edges || state.edges;\n const edgeChanges = edgesToUnselect.map((e) => {\n e.selected = false;\n return createSelectionChange(e.id, false);\n });\n state.hooks.edgesChange.trigger(edgeChanges);\n };\n const removeSelectedElements = (elements) => {\n if (!elements || !elements.length) {\n return elementSelectionHandler([], false);\n }\n const changes = elements.reduce(\n (changes2, curr) => {\n const selectionChange = createSelectionChange(curr.id, false);\n if (isNode(curr)) {\n changes2.nodes.push(selectionChange);\n } else {\n changes2.edges.push(selectionChange);\n }\n return changes2;\n },\n { nodes: [], edges: [] }\n );\n if (changes.nodes.length) {\n state.hooks.nodesChange.trigger(changes.nodes);\n }\n if (changes.edges.length) {\n state.hooks.edgesChange.trigger(changes.edges);\n }\n };\n const setMinZoom = (minZoom) => {\n var _a;\n (_a = state.d3Zoom) == null ? void 0 : _a.scaleExtent([minZoom, state.maxZoom]);\n state.minZoom = minZoom;\n };\n const setMaxZoom = (maxZoom) => {\n var _a;\n (_a = state.d3Zoom) == null ? void 0 : _a.scaleExtent([state.minZoom, maxZoom]);\n state.maxZoom = maxZoom;\n };\n const setTranslateExtent = (translateExtent) => {\n var _a;\n (_a = state.d3Zoom) == null ? void 0 : _a.translateExtent(translateExtent);\n state.translateExtent = translateExtent;\n };\n const setNodeExtent = (nodeExtent) => {\n state.nodeExtent = nodeExtent;\n updateNodeInternals();\n };\n const setPaneClickDistance = (clickDistance) => {\n var _a;\n (_a = state.d3Zoom) == null ? void 0 : _a.clickDistance(clickDistance);\n };\n const setInteractive = (isInteractive) => {\n state.nodesDraggable = isInteractive;\n state.nodesConnectable = isInteractive;\n state.elementsSelectable = isInteractive;\n };\n const setNodes = (nodes) => {\n const nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes;\n if (!state.initialized && !nextNodes.length) {\n return;\n }\n state.nodes = createGraphNodes(nextNodes, findNode, state.hooks.error.trigger);\n };\n const setEdges = (edges) => {\n const nextEdges = edges instanceof Function ? edges(state.edges) : edges;\n if (!state.initialized && !nextEdges.length) {\n return;\n }\n const validEdges = createGraphEdges(\n nextEdges,\n state.isValidConnection,\n findNode,\n findEdge,\n state.hooks.error.trigger,\n state.defaultEdgeOptions,\n state.nodes,\n state.edges\n );\n updateConnectionLookup(state.connectionLookup, edgeLookup.value, validEdges);\n state.edges = validEdges;\n };\n const setElements = (elements) => {\n const nextElements = elements instanceof Function ? elements([...state.nodes, ...state.edges]) : elements;\n if (!state.initialized && !nextElements.length) {\n return;\n }\n setNodes(nextElements.filter(isNode));\n setEdges(nextElements.filter(isEdge));\n };\n const addNodes = (nodes) => {\n let nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes;\n nextNodes = Array.isArray(nextNodes) ? nextNodes : [nextNodes];\n const graphNodes = createGraphNodes(nextNodes, findNode, state.hooks.error.trigger);\n const changes = [];\n for (const node of graphNodes) {\n changes.push(createAdditionChange(node));\n }\n if (changes.length) {\n state.hooks.nodesChange.trigger(changes);\n }\n };\n const addEdges = (params) => {\n let nextEdges = params instanceof Function ? params(state.edges) : params;\n nextEdges = Array.isArray(nextEdges) ? nextEdges : [nextEdges];\n const validEdges = createGraphEdges(\n nextEdges,\n state.isValidConnection,\n findNode,\n findEdge,\n state.hooks.error.trigger,\n state.defaultEdgeOptions,\n state.nodes,\n state.edges\n );\n const changes = [];\n for (const edge of validEdges) {\n changes.push(createAdditionChange(edge));\n }\n if (changes.length) {\n state.hooks.edgesChange.trigger(changes);\n }\n };\n const removeNodes = (nodes, removeConnectedEdges = true, removeChildren = false) => {\n const nextNodes = nodes instanceof Function ? nodes(state.nodes) : nodes;\n const nodesToRemove = Array.isArray(nextNodes) ? nextNodes : [nextNodes];\n const nodeChanges = [];\n const edgeChanges = [];\n function createEdgeRemovalChanges(nodes2) {\n const connectedEdges = getConnectedEdges$1(nodes2);\n for (const edge of connectedEdges) {\n if (isDef(edge.deletable) ? edge.deletable : true) {\n edgeChanges.push(createEdgeRemoveChange(edge.id, edge.source, edge.target, edge.sourceHandle, edge.targetHandle));\n }\n }\n }\n function createChildrenRemovalChanges(id2) {\n const children2 = [];\n for (const node of state.nodes) {\n if (node.parentNode === id2) {\n children2.push(node);\n }\n }\n if (children2.length) {\n for (const child of children2) {\n nodeChanges.push(createNodeRemoveChange(child.id));\n }\n if (removeConnectedEdges) {\n createEdgeRemovalChanges(children2);\n }\n for (const child of children2) {\n createChildrenRemovalChanges(child.id);\n }\n }\n }\n for (const item of nodesToRemove) {\n const currNode = typeof item === \"string\" ? findNode(item) : item;\n if (!currNode) {\n continue;\n }\n if (isDef(currNode.deletable) && !currNode.deletable) {\n continue;\n }\n nodeChanges.push(createNodeRemoveChange(currNode.id));\n if (removeConnectedEdges) {\n createEdgeRemovalChanges([currNode]);\n }\n if (removeChildren) {\n createChildrenRemovalChanges(currNode.id);\n }\n }\n if (edgeChanges.length) {\n state.hooks.edgesChange.trigger(edgeChanges);\n }\n if (nodeChanges.length) {\n state.hooks.nodesChange.trigger(nodeChanges);\n }\n };\n const removeEdges = (edges) => {\n const nextEdges = edges instanceof Function ? edges(state.edges) : edges;\n const edgesToRemove = Array.isArray(nextEdges) ? nextEdges : [nextEdges];\n const changes = [];\n for (const item of edgesToRemove) {\n const currEdge = typeof item === \"string\" ? findEdge(item) : item;\n if (!currEdge) {\n continue;\n }\n if (isDef(currEdge.deletable) && !currEdge.deletable) {\n continue;\n }\n changes.push(\n createEdgeRemoveChange(\n typeof item === \"string\" ? item : item.id,\n currEdge.source,\n currEdge.target,\n currEdge.sourceHandle,\n currEdge.targetHandle\n )\n );\n }\n state.hooks.edgesChange.trigger(changes);\n };\n const updateEdge2 = (oldEdge, newConnection, shouldReplaceId = true) => {\n const prevEdge = findEdge(oldEdge.id);\n if (!prevEdge) {\n return false;\n }\n const prevEdgeIndex = state.edges.indexOf(prevEdge);\n const newEdge = updateEdgeAction(oldEdge, newConnection, prevEdge, shouldReplaceId, state.hooks.error.trigger);\n if (newEdge) {\n const [validEdge] = createGraphEdges(\n [newEdge],\n state.isValidConnection,\n findNode,\n findEdge,\n state.hooks.error.trigger,\n state.defaultEdgeOptions,\n state.nodes,\n state.edges\n );\n state.edges = state.edges.map((edge, index) => index === prevEdgeIndex ? validEdge : edge);\n updateConnectionLookup(state.connectionLookup, edgeLookup.value, [validEdge]);\n return validEdge;\n }\n return false;\n };\n const updateEdgeData = (id2, dataUpdate, options = { replace: false }) => {\n const edge = findEdge(id2);\n if (!edge) {\n return;\n }\n const nextData = typeof dataUpdate === \"function\" ? dataUpdate(edge) : dataUpdate;\n edge.data = options.replace ? nextData : { ...edge.data, ...nextData };\n };\n const applyNodeChanges2 = (changes) => {\n return applyChanges(changes, state.nodes);\n };\n const applyEdgeChanges2 = (changes) => {\n const changedEdges = applyChanges(changes, state.edges);\n updateConnectionLookup(state.connectionLookup, edgeLookup.value, changedEdges);\n return changedEdges;\n };\n const updateNode = (id2, nodeUpdate, options = { replace: false }) => {\n const node = findNode(id2);\n if (!node) {\n return;\n }\n const nextNode = typeof nodeUpdate === \"function\" ? nodeUpdate(node) : nodeUpdate;\n if (options.replace) {\n state.nodes.splice(state.nodes.indexOf(node), 1, nextNode);\n } else {\n Object.assign(node, nextNode);\n }\n };\n const updateNodeData = (id2, dataUpdate, options = { replace: false }) => {\n const node = findNode(id2);\n if (!node) {\n return;\n }\n const nextData = typeof dataUpdate === \"function\" ? dataUpdate(node) : dataUpdate;\n node.data = options.replace ? nextData : { ...node.data, ...nextData };\n };\n const startConnection = (startHandle, position, isClick = false) => {\n if (isClick) {\n state.connectionClickStartHandle = startHandle;\n } else {\n state.connectionStartHandle = startHandle;\n }\n state.connectionEndHandle = null;\n state.connectionStatus = null;\n if (position) {\n state.connectionPosition = position;\n }\n };\n const updateConnection = (position, result = null, status = null) => {\n if (state.connectionStartHandle) {\n state.connectionPosition = position;\n state.connectionEndHandle = result;\n state.connectionStatus = status;\n }\n };\n const endConnection = (event, isClick) => {\n state.connectionPosition = { x: Number.NaN, y: Number.NaN };\n state.connectionEndHandle = null;\n state.connectionStatus = null;\n if (isClick) {\n state.connectionClickStartHandle = null;\n } else {\n state.connectionStartHandle = null;\n }\n };\n const getNodeRect = (nodeOrRect) => {\n const isRectObj = isRect(nodeOrRect);\n const node = isRectObj ? null : isGraphNode(nodeOrRect) ? nodeOrRect : findNode(nodeOrRect.id);\n if (!isRectObj && !node) {\n return [null, null, isRectObj];\n }\n const nodeRect = isRectObj ? nodeOrRect : nodeToRect(node);\n return [nodeRect, node, isRectObj];\n };\n const getIntersectingNodes = (nodeOrRect, partially = true, nodes = state.nodes) => {\n const [nodeRect, node, isRect2] = getNodeRect(nodeOrRect);\n if (!nodeRect) {\n return [];\n }\n const intersections = [];\n for (const n of nodes || state.nodes) {\n if (!isRect2 && (n.id === node.id || !n.computedPosition)) {\n continue;\n }\n const currNodeRect = nodeToRect(n);\n const overlappingArea = getOverlappingArea(currNodeRect, nodeRect);\n const partiallyVisible = partially && overlappingArea > 0;\n if (partiallyVisible || overlappingArea >= currNodeRect.width * currNodeRect.height || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)) {\n intersections.push(n);\n }\n }\n return intersections;\n };\n const isNodeIntersecting = (nodeOrRect, area, partially = true) => {\n const [nodeRect] = getNodeRect(nodeOrRect);\n if (!nodeRect) {\n return false;\n }\n const overlappingArea = getOverlappingArea(nodeRect, area);\n const partiallyVisible = partially && overlappingArea > 0;\n return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height);\n };\n const panBy = (delta) => {\n const { viewport, dimensions, d3Zoom, d3Selection, translateExtent } = state;\n if (!d3Zoom || !d3Selection || !delta.x && !delta.y) {\n return false;\n }\n const nextTransform = identity.translate(viewport.x + delta.x, viewport.y + delta.y).scale(viewport.zoom);\n const extent = [\n [0, 0],\n [dimensions.width, dimensions.height]\n ];\n const constrainedTransform = d3Zoom.constrain()(nextTransform, extent, translateExtent);\n const transformChanged = state.viewport.x !== constrainedTransform.x || state.viewport.y !== constrainedTransform.y || state.viewport.zoom !== constrainedTransform.k;\n d3Zoom.transform(d3Selection, constrainedTransform);\n return transformChanged;\n };\n const setState = (options) => {\n const opts = options instanceof Function ? options(state) : options;\n const exclude = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n if (isDef(opts.defaultEdgeOptions)) {\n state.defaultEdgeOptions = opts.defaultEdgeOptions;\n }\n const elements = opts.modelValue || opts.nodes || opts.edges ? [] : void 0;\n if (elements) {\n if (opts.modelValue) {\n elements.push(...opts.modelValue);\n }\n if (opts.nodes) {\n elements.push(...opts.nodes);\n }\n if (opts.edges) {\n elements.push(...opts.edges);\n }\n setElements(elements);\n }\n const setSkippedOptions = () => {\n if (isDef(opts.maxZoom)) {\n setMaxZoom(opts.maxZoom);\n }\n if (isDef(opts.minZoom)) {\n setMinZoom(opts.minZoom);\n }\n if (isDef(opts.translateExtent)) {\n setTranslateExtent(opts.translateExtent);\n }\n };\n for (const o of Object.keys(opts)) {\n const key = o;\n const option = opts[key];\n if (![...storeOptionsToSkip, ...exclude].includes(key) && isDef(option)) {\n state[key] = option;\n }\n }\n until(() => state.d3Zoom).not.toBeNull().then(setSkippedOptions);\n if (!state.initialized) {\n state.initialized = true;\n }\n };\n const toObject = () => {\n const nodes = [];\n const edges = [];\n for (const node of state.nodes) {\n const {\n computedPosition: _,\n handleBounds: __,\n selected: ___,\n dimensions: ____,\n isParent: _____,\n resizing: ______,\n dragging: _______,\n events: _________,\n ...rest\n } = node;\n nodes.push(rest);\n }\n for (const edge of state.edges) {\n const { selected: _, sourceNode: __, targetNode: ___, events: ____, ...rest } = edge;\n edges.push(rest);\n }\n return JSON.parse(\n JSON.stringify({\n nodes,\n edges,\n position: [state.viewport.x, state.viewport.y],\n zoom: state.viewport.zoom,\n viewport: state.viewport\n })\n );\n };\n const fromObject = (obj) => {\n return new Promise((resolve) => {\n const { nodes, edges, position, zoom: zoom2, viewport } = obj;\n if (nodes) {\n setNodes(nodes);\n }\n if (edges) {\n setEdges(edges);\n }\n if ((viewport == null ? void 0 : viewport.x) && (viewport == null ? void 0 : viewport.y) || position) {\n const x = (viewport == null ? void 0 : viewport.x) || position[0];\n const y = (viewport == null ? void 0 : viewport.y) || position[1];\n const nextZoom = (viewport == null ? void 0 : viewport.zoom) || zoom2 || state.viewport.zoom;\n return until(() => viewportHelper.value.viewportInitialized).toBe(true).then(() => {\n viewportHelper.value.setViewport({\n x,\n y,\n zoom: nextZoom\n }).then(() => {\n resolve(true);\n });\n });\n } else {\n resolve(true);\n }\n });\n };\n const $reset = () => {\n const resetState = useState();\n state.edges = [];\n state.nodes = [];\n if (state.d3Zoom && state.d3Selection) {\n const updatedTransform = identity.translate(resetState.defaultViewport.x ?? 0, resetState.defaultViewport.y ?? 0).scale(clamp(resetState.defaultViewport.zoom ?? 1, resetState.minZoom, resetState.maxZoom));\n const bbox = state.viewportRef.getBoundingClientRect();\n const extent = [\n [0, 0],\n [bbox.width, bbox.height]\n ];\n const constrainedTransform = state.d3Zoom.constrain()(updatedTransform, extent, resetState.translateExtent);\n state.d3Zoom.transform(state.d3Selection, constrainedTransform);\n }\n setState(resetState);\n };\n return {\n updateNodePositions,\n updateNodeDimensions,\n setElements,\n setNodes,\n setEdges,\n addNodes,\n addEdges,\n removeNodes,\n removeEdges,\n findNode,\n findEdge,\n updateEdge: updateEdge2,\n updateEdgeData,\n updateNode,\n updateNodeData,\n applyEdgeChanges: applyEdgeChanges2,\n applyNodeChanges: applyNodeChanges2,\n addSelectedElements,\n addSelectedNodes,\n addSelectedEdges,\n setMinZoom,\n setMaxZoom,\n setTranslateExtent,\n setNodeExtent,\n setPaneClickDistance,\n removeSelectedElements,\n removeSelectedNodes,\n removeSelectedEdges,\n startConnection,\n updateConnection,\n endConnection,\n setInteractive,\n setState,\n getIntersectingNodes,\n getIncomers: getIncomers$1,\n getOutgoers: getOutgoers$1,\n getConnectedEdges: getConnectedEdges$1,\n getHandleConnections,\n isNodeIntersecting,\n panBy,\n fitView: (params) => viewportHelper.value.fitView(params),\n zoomIn: (transitionOpts) => viewportHelper.value.zoomIn(transitionOpts),\n zoomOut: (transitionOpts) => viewportHelper.value.zoomOut(transitionOpts),\n zoomTo: (zoomLevel, transitionOpts) => viewportHelper.value.zoomTo(zoomLevel, transitionOpts),\n setViewport: (params, transitionOpts) => viewportHelper.value.setViewport(params, transitionOpts),\n setTransform: (params, transitionOpts) => viewportHelper.value.setTransform(params, transitionOpts),\n getViewport: () => viewportHelper.value.getViewport(),\n getTransform: () => viewportHelper.value.getTransform(),\n setCenter: (x, y, opts) => viewportHelper.value.setCenter(x, y, opts),\n fitBounds: (params, opts) => viewportHelper.value.fitBounds(params, opts),\n project: (params) => viewportHelper.value.project(params),\n screenToFlowCoordinate: (params) => viewportHelper.value.screenToFlowCoordinate(params),\n flowToScreenCoordinate: (params) => viewportHelper.value.flowToScreenCoordinate(params),\n toObject,\n fromObject,\n updateNodeInternals,\n viewportHelper,\n $reset,\n $destroy: () => {\n }\n };\n}\nconst _hoisted_1$9 = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"];\nconst __default__$f = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$f = /* @__PURE__ */ defineComponent({\n ...__default__$f,\n props: {\n id: { default: null },\n type: {},\n position: { default: () => Position.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, Number, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: true },\n connectableEnd: { type: Boolean, default: true }\n },\n setup(__props, { expose: __expose }) {\n const props = createPropsRestProxy(__props, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\"]);\n const type = toRef(() => props.type ?? \"source\");\n const isValidConnection = toRef(() => props.isValidConnection ?? null);\n const {\n id: flowId,\n connectionStartHandle,\n connectionClickStartHandle,\n connectionEndHandle,\n vueFlowRef,\n nodesConnectable,\n noDragClassName,\n noPanClassName\n } = useVueFlow();\n const { id: nodeId, node, nodeEl, connectedEdges } = useNode();\n const handle = ref();\n const isConnectableStart = toRef(() => typeof __props.connectableStart !== \"undefined\" ? __props.connectableStart : true);\n const isConnectableEnd = toRef(() => typeof __props.connectableEnd !== \"undefined\" ? __props.connectableEnd : true);\n const isConnecting = toRef(\n () => {\n var _a, _b, _c, _d, _e, _f;\n return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionStartHandle.value) == null ? void 0 : _c.type) === type.value || ((_d = connectionEndHandle.value) == null ? void 0 : _d.nodeId) === nodeId && ((_e = connectionEndHandle.value) == null ? void 0 : _e.id) === __props.id && ((_f = connectionEndHandle.value) == null ? void 0 : _f.type) === type.value;\n }\n );\n const isClickConnecting = toRef(\n () => {\n var _a, _b, _c;\n return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionClickStartHandle.value) == null ? void 0 : _c.type) === type.value;\n }\n );\n const { handlePointerDown, handleClick } = useHandle({\n nodeId,\n handleId: __props.id,\n isValidConnection,\n type\n });\n const isConnectable = computed(() => {\n if (typeof __props.connectable === \"string\" && __props.connectable === \"single\") {\n return !connectedEdges.value.some((edge) => {\n const id2 = edge[`${type.value}Handle`];\n if (edge[type.value] !== nodeId) {\n return false;\n }\n return id2 ? id2 === __props.id : true;\n });\n }\n if (typeof __props.connectable === \"number\") {\n return connectedEdges.value.filter((edge) => {\n const id2 = edge[`${type.value}Handle`];\n if (edge[type.value] !== nodeId) {\n return false;\n }\n return id2 ? id2 === __props.id : true;\n }).length < __props.connectable;\n }\n if (typeof __props.connectable === \"function\") {\n return __props.connectable(node, connectedEdges.value);\n }\n return isDef(__props.connectable) ? __props.connectable : nodesConnectable.value;\n });\n onMounted(() => {\n var _a;\n if (!node.dimensions.width || !node.dimensions.height) {\n return;\n }\n const existingBounds = (_a = node.handleBounds[type.value]) == null ? void 0 : _a.find((b) => b.id === __props.id);\n if (!vueFlowRef.value || existingBounds) {\n return;\n }\n const viewportNode = vueFlowRef.value.querySelector(\".vue-flow__transformationpane\");\n if (!nodeEl.value || !handle.value || !viewportNode || !__props.id) {\n return;\n }\n const nodeBounds = nodeEl.value.getBoundingClientRect();\n const handleBounds = handle.value.getBoundingClientRect();\n const style = window.getComputedStyle(viewportNode);\n const { m22: zoom2 } = new window.DOMMatrixReadOnly(style.transform);\n const nextBounds = {\n id: __props.id,\n position: __props.position,\n x: (handleBounds.left - nodeBounds.left) / zoom2,\n y: (handleBounds.top - nodeBounds.top) / zoom2,\n type: type.value,\n nodeId,\n ...getDimensions(handle.value)\n };\n node.handleBounds[type.value] = [...node.handleBounds[type.value] ?? [], nextBounds];\n });\n function onPointerDown(event) {\n const isMouseTriggered = isMouseEvent(event);\n if (isConnectable.value && isConnectableStart.value && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) {\n handlePointerDown(event);\n }\n }\n function onClick(event) {\n if (!nodeId || !connectionClickStartHandle.value && !isConnectableStart.value) {\n return;\n }\n if (isConnectable.value) {\n handleClick(event);\n }\n }\n __expose({\n handleClick,\n handlePointerDown,\n onClick,\n onPointerDown\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"handle\",\n ref: handle,\n \"data-id\": `${unref(flowId)}-${unref(nodeId)}-${__props.id}-${type.value}`,\n \"data-handleid\": __props.id,\n \"data-nodeid\": unref(nodeId),\n \"data-handlepos\": _ctx.position,\n class: normalizeClass([\"vue-flow__handle\", [\n `vue-flow__handle-${_ctx.position}`,\n `vue-flow__handle-${__props.id}`,\n unref(noDragClassName),\n unref(noPanClassName),\n type.value,\n {\n connectable: isConnectable.value,\n connecting: isClickConnecting.value,\n connectablestart: isConnectableStart.value,\n connectableend: isConnectableEnd.value,\n connectionindicator: isConnectable.value && (isConnectableStart.value && !isConnecting.value || isConnectableEnd.value && isConnecting.value)\n }\n ]]),\n onMousedown: onPointerDown,\n onTouchstartPassive: onPointerDown,\n onClick\n }, [\n renderSlot(_ctx.$slots, \"default\", { id: _ctx.id })\n ], 42, _hoisted_1$9);\n };\n }\n});\nconst DefaultNode = function({\n sourcePosition = Position.Bottom,\n targetPosition = Position.Top,\n label: _label,\n connectable = true,\n isValidTargetPos,\n isValidSourcePos,\n data\n}) {\n const label = data.label ?? _label;\n return [\n h(_sfc_main$f, { type: \"target\", position: targetPosition, connectable, isValidConnection: isValidTargetPos }),\n typeof label !== \"string\" && label ? h(label) : h(Fragment, [label]),\n h(_sfc_main$f, { type: \"source\", position: sourcePosition, connectable, isValidConnection: isValidSourcePos })\n ];\n};\nDefaultNode.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\", \"data\"];\nDefaultNode.inheritAttrs = false;\nDefaultNode.compatConfig = { MODE: 3 };\nconst DefaultNode$1 = DefaultNode;\nconst OutputNode = function({\n targetPosition = Position.Top,\n label: _label,\n connectable = true,\n isValidTargetPos,\n data\n}) {\n const label = data.label ?? _label;\n return [\n h(_sfc_main$f, { type: \"target\", position: targetPosition, connectable, isValidConnection: isValidTargetPos }),\n typeof label !== \"string\" && label ? h(label) : h(Fragment, [label])\n ];\n};\nOutputNode.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\", \"data\"];\nOutputNode.inheritAttrs = false;\nOutputNode.compatConfig = { MODE: 3 };\nconst OutputNode$1 = OutputNode;\nconst InputNode = function({\n sourcePosition = Position.Bottom,\n label: _label,\n connectable = true,\n isValidSourcePos,\n data\n}) {\n const label = data.label ?? _label;\n return [\n typeof label !== \"string\" && label ? h(label) : h(Fragment, [label]),\n h(_sfc_main$f, { type: \"source\", position: sourcePosition, connectable, isValidConnection: isValidSourcePos })\n ];\n};\nInputNode.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\", \"data\"];\nInputNode.inheritAttrs = false;\nInputNode.compatConfig = { MODE: 3 };\nconst InputNode$1 = InputNode;\nconst _hoisted_1$8 = [\"transform\"];\nconst _hoisted_2$2 = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"];\nconst _hoisted_3$1 = [\"y\"];\nconst __default__$e = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$e = /* @__PURE__ */ defineComponent({\n ...__default__$e,\n props: {\n x: {},\n y: {},\n label: {},\n labelStyle: { default: () => ({}) },\n labelShowBg: { type: Boolean, default: true },\n labelBgStyle: { default: () => ({}) },\n labelBgPadding: { default: () => [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(__props) {\n const box = ref({ x: 0, y: 0, width: 0, height: 0 });\n const el = ref(null);\n const transform = computed(() => `translate(${__props.x - box.value.width / 2} ${__props.y - box.value.height / 2})`);\n onMounted(getBox);\n watch([() => __props.x, () => __props.y, el, () => __props.label], getBox);\n function getBox() {\n if (!el.value) {\n return;\n }\n const nextBox = el.value.getBBox();\n if (nextBox.width !== box.value.width || nextBox.height !== box.value.height) {\n box.value = nextBox;\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"g\", {\n transform: transform.value,\n class: \"vue-flow__edge-textwrapper\"\n }, [\n _ctx.labelShowBg ? (openBlock(), createElementBlock(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${box.value.width + 2 * _ctx.labelBgPadding[0]}px`,\n height: `${box.value.height + 2 * _ctx.labelBgPadding[1]}px`,\n x: -_ctx.labelBgPadding[0],\n y: -_ctx.labelBgPadding[1],\n style: normalizeStyle(_ctx.labelBgStyle),\n rx: _ctx.labelBgBorderRadius,\n ry: _ctx.labelBgBorderRadius\n }, null, 12, _hoisted_2$2)) : createCommentVNode(\"\", true),\n createElementVNode(\"text\", mergeProps(_ctx.$attrs, {\n ref_key: \"el\",\n ref: el,\n class: \"vue-flow__edge-text\",\n y: box.value.height / 2,\n dy: \"0.3em\",\n style: _ctx.labelStyle\n }), [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n typeof _ctx.label !== \"string\" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.label), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n createTextVNode(toDisplayString(_ctx.label), 1)\n ], 64))\n ])\n ], 16, _hoisted_3$1)\n ], 8, _hoisted_1$8);\n };\n }\n});\nconst _hoisted_1$7 = [\"id\", \"d\", \"marker-end\", \"marker-start\"];\nconst _hoisted_2$1 = [\"d\", \"stroke-width\"];\nconst __default__$d = {\n name: \"BaseEdge\",\n inheritAttrs: false,\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$d = /* @__PURE__ */ defineComponent({\n ...__default__$d,\n props: {\n id: {},\n labelX: {},\n labelY: {},\n path: {},\n label: {},\n markerStart: {},\n markerEnd: {},\n interactionWidth: { default: 20 },\n labelStyle: {},\n labelShowBg: { type: Boolean },\n labelBgStyle: {},\n labelBgPadding: {},\n labelBgBorderRadius: {}\n },\n setup(__props, { expose: __expose }) {\n const pathEl = ref(null);\n const interactionEl = ref(null);\n const labelEl = ref(null);\n const attrs = useAttrs();\n __expose({\n pathEl,\n interactionEl,\n labelEl\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createElementVNode(\"path\", mergeProps(unref(attrs), {\n id: _ctx.id,\n ref_key: \"pathEl\",\n ref: pathEl,\n d: _ctx.path,\n class: \"vue-flow__edge-path\",\n \"marker-end\": _ctx.markerEnd,\n \"marker-start\": _ctx.markerStart\n }), null, 16, _hoisted_1$7),\n _ctx.interactionWidth ? (openBlock(), createElementBlock(\"path\", {\n key: 0,\n ref_key: \"interactionEl\",\n ref: interactionEl,\n fill: \"none\",\n d: _ctx.path,\n \"stroke-width\": _ctx.interactionWidth,\n \"stroke-opacity\": 0,\n class: \"vue-flow__edge-interaction\"\n }, null, 8, _hoisted_2$1)) : createCommentVNode(\"\", true),\n _ctx.label && _ctx.labelX && _ctx.labelY ? (openBlock(), createBlock(_sfc_main$e, {\n key: 1,\n ref_key: \"labelEl\",\n ref: labelEl,\n x: _ctx.labelX,\n y: _ctx.labelY,\n label: _ctx.label,\n \"label-show-bg\": _ctx.labelShowBg,\n \"label-bg-style\": _ctx.labelBgStyle,\n \"label-bg-padding\": _ctx.labelBgPadding,\n \"label-bg-border-radius\": _ctx.labelBgBorderRadius,\n \"label-style\": _ctx.labelStyle\n }, null, 8, [\"x\", \"y\", \"label\", \"label-show-bg\", \"label-bg-style\", \"label-bg-padding\", \"label-bg-border-radius\", \"label-style\"])) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\nfunction getSimpleEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY\n}) {\n const xOffset = Math.abs(targetX - sourceX) / 2;\n const centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset;\n const yOffset = Math.abs(targetY - sourceY) / 2;\n const centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;\n return [centerX, centerY, xOffset, yOffset];\n}\nfunction getBezierEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceControlX,\n sourceControlY,\n targetControlX,\n targetControlY\n}) {\n const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125;\n const centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125;\n const offsetX = Math.abs(centerX - sourceX);\n const offsetY = Math.abs(centerY - sourceY);\n return [centerX, centerY, offsetX, offsetY];\n}\nfunction calculateControlOffset(distance2, curvature) {\n if (distance2 >= 0) {\n return 0.5 * distance2;\n } else {\n return curvature * 25 * Math.sqrt(-distance2);\n }\n}\nfunction getControlWithCurvature({ pos, x1, y1, x2, y2, c }) {\n let ctX, ctY;\n switch (pos) {\n case Position.Left:\n ctX = x1 - calculateControlOffset(x1 - x2, c);\n ctY = y1;\n break;\n case Position.Right:\n ctX = x1 + calculateControlOffset(x2 - x1, c);\n ctY = y1;\n break;\n case Position.Top:\n ctX = x1;\n ctY = y1 - calculateControlOffset(y1 - y2, c);\n break;\n case Position.Bottom:\n ctX = x1;\n ctY = y1 + calculateControlOffset(y2 - y1, c);\n break;\n }\n return [ctX, ctY];\n}\nfunction getBezierPath(bezierPathParams) {\n const {\n sourceX,\n sourceY,\n sourcePosition = Position.Bottom,\n targetX,\n targetY,\n targetPosition = Position.Top,\n curvature = 0.25\n } = bezierPathParams;\n const [sourceControlX, sourceControlY] = getControlWithCurvature({\n pos: sourcePosition,\n x1: sourceX,\n y1: sourceY,\n x2: targetX,\n y2: targetY,\n c: curvature\n });\n const [targetControlX, targetControlY] = getControlWithCurvature({\n pos: targetPosition,\n x1: targetX,\n y1: targetY,\n x2: sourceX,\n y2: sourceY,\n c: curvature\n });\n const [labelX, labelY, offsetX, offsetY] = getBezierEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceControlX,\n sourceControlY,\n targetControlX,\n targetControlY\n });\n return [\n `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`,\n labelX,\n labelY,\n offsetX,\n offsetY\n ];\n}\nfunction getControl({ pos, x1, y1, x2, y2 }) {\n let ctX, ctY;\n switch (pos) {\n case Position.Left:\n case Position.Right:\n ctX = 0.5 * (x1 + x2);\n ctY = y1;\n break;\n case Position.Top:\n case Position.Bottom:\n ctX = x1;\n ctY = 0.5 * (y1 + y2);\n break;\n }\n return [ctX, ctY];\n}\nfunction getSimpleBezierPath(simpleBezierPathParams) {\n const {\n sourceX,\n sourceY,\n sourcePosition = Position.Bottom,\n targetX,\n targetY,\n targetPosition = Position.Top\n } = simpleBezierPathParams;\n const [sourceControlX, sourceControlY] = getControl({\n pos: sourcePosition,\n x1: sourceX,\n y1: sourceY,\n x2: targetX,\n y2: targetY\n });\n const [targetControlX, targetControlY] = getControl({\n pos: targetPosition,\n x1: targetX,\n y1: targetY,\n x2: sourceX,\n y2: sourceY\n });\n const [centerX, centerY, offsetX, offsetY] = getBezierEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceControlX,\n sourceControlY,\n targetControlX,\n targetControlY\n });\n return [\n `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`,\n centerX,\n centerY,\n offsetX,\n offsetY\n ];\n}\nconst handleDirections = {\n [Position.Left]: { x: -1, y: 0 },\n [Position.Right]: { x: 1, y: 0 },\n [Position.Top]: { x: 0, y: -1 },\n [Position.Bottom]: { x: 0, y: 1 }\n};\nfunction getDirection({\n source,\n sourcePosition = Position.Bottom,\n target\n}) {\n if (sourcePosition === Position.Left || sourcePosition === Position.Right) {\n return source.x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 };\n }\n return source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction distance(a, b) {\n return Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2);\n}\nfunction getPoints({\n source,\n sourcePosition = Position.Bottom,\n target,\n targetPosition = Position.Top,\n center,\n offset\n}) {\n const sourceDir = handleDirections[sourcePosition];\n const targetDir = handleDirections[targetPosition];\n const sourceGapped = { x: source.x + sourceDir.x * offset, y: source.y + sourceDir.y * offset };\n const targetGapped = { x: target.x + targetDir.x * offset, y: target.y + targetDir.y * offset };\n const dir = getDirection({\n source: sourceGapped,\n sourcePosition,\n target: targetGapped\n });\n const dirAccessor = dir.x !== 0 ? \"x\" : \"y\";\n const currDir = dir[dirAccessor];\n let points;\n let centerX, centerY;\n const sourceGapOffset = { x: 0, y: 0 };\n const targetGapOffset = { x: 0, y: 0 };\n const [defaultCenterX, defaultCenterY, defaultOffsetX, defaultOffsetY] = getSimpleEdgeCenter({\n sourceX: source.x,\n sourceY: source.y,\n targetX: target.x,\n targetY: target.y\n });\n if (sourceDir[dirAccessor] * targetDir[dirAccessor] === -1) {\n centerX = center.x ?? defaultCenterX;\n centerY = center.y ?? defaultCenterY;\n const verticalSplit = [\n { x: centerX, y: sourceGapped.y },\n { x: centerX, y: targetGapped.y }\n ];\n const horizontalSplit = [\n { x: sourceGapped.x, y: centerY },\n { x: targetGapped.x, y: centerY }\n ];\n if (sourceDir[dirAccessor] === currDir) {\n points = dirAccessor === \"x\" ? verticalSplit : horizontalSplit;\n } else {\n points = dirAccessor === \"x\" ? horizontalSplit : verticalSplit;\n }\n } else {\n const sourceTarget = [{ x: sourceGapped.x, y: targetGapped.y }];\n const targetSource = [{ x: targetGapped.x, y: sourceGapped.y }];\n if (dirAccessor === \"x\") {\n points = sourceDir.x === currDir ? targetSource : sourceTarget;\n } else {\n points = sourceDir.y === currDir ? sourceTarget : targetSource;\n }\n if (sourcePosition === targetPosition) {\n const diff = Math.abs(source[dirAccessor] - target[dirAccessor]);\n if (diff <= offset) {\n const gapOffset = Math.min(offset - 1, offset - diff);\n if (sourceDir[dirAccessor] === currDir) {\n sourceGapOffset[dirAccessor] = (sourceGapped[dirAccessor] > source[dirAccessor] ? -1 : 1) * gapOffset;\n } else {\n targetGapOffset[dirAccessor] = (targetGapped[dirAccessor] > target[dirAccessor] ? -1 : 1) * gapOffset;\n }\n }\n }\n if (sourcePosition !== targetPosition) {\n const dirAccessorOpposite = dirAccessor === \"x\" ? \"y\" : \"x\";\n const isSameDir = sourceDir[dirAccessor] === targetDir[dirAccessorOpposite];\n const sourceGtTargetOppo = sourceGapped[dirAccessorOpposite] > targetGapped[dirAccessorOpposite];\n const sourceLtTargetOppo = sourceGapped[dirAccessorOpposite] < targetGapped[dirAccessorOpposite];\n const flipSourceTarget = sourceDir[dirAccessor] === 1 && (!isSameDir && sourceGtTargetOppo || isSameDir && sourceLtTargetOppo) || sourceDir[dirAccessor] !== 1 && (!isSameDir && sourceLtTargetOppo || isSameDir && sourceGtTargetOppo);\n if (flipSourceTarget) {\n points = dirAccessor === \"x\" ? sourceTarget : targetSource;\n }\n }\n const sourceGapPoint = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y };\n const targetGapPoint = { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y };\n const maxXDistance = Math.max(Math.abs(sourceGapPoint.x - points[0].x), Math.abs(targetGapPoint.x - points[0].x));\n const maxYDistance = Math.max(Math.abs(sourceGapPoint.y - points[0].y), Math.abs(targetGapPoint.y - points[0].y));\n if (maxXDistance >= maxYDistance) {\n centerX = (sourceGapPoint.x + targetGapPoint.x) / 2;\n centerY = points[0].y;\n } else {\n centerX = points[0].x;\n centerY = (sourceGapPoint.y + targetGapPoint.y) / 2;\n }\n }\n const pathPoints = [\n source,\n { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y },\n ...points,\n { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y },\n target\n ];\n return [pathPoints, centerX, centerY, defaultOffsetX, defaultOffsetY];\n}\nfunction getBend(a, b, c, size) {\n const bendSize = Math.min(distance(a, b) / 2, distance(b, c) / 2, size);\n const { x, y } = b;\n if (a.x === x && x === c.x || a.y === y && y === c.y) {\n return `L${x} ${y}`;\n }\n if (a.y === y) {\n const xDir2 = a.x < c.x ? -1 : 1;\n const yDir2 = a.y < c.y ? 1 : -1;\n return `L ${x + bendSize * xDir2},${y}Q ${x},${y} ${x},${y + bendSize * yDir2}`;\n }\n const xDir = a.x < c.x ? 1 : -1;\n const yDir = a.y < c.y ? -1 : 1;\n return `L ${x},${y + bendSize * yDir}Q ${x},${y} ${x + bendSize * xDir},${y}`;\n}\nfunction getSmoothStepPath(smoothStepPathParams) {\n const {\n sourceX,\n sourceY,\n sourcePosition = Position.Bottom,\n targetX,\n targetY,\n targetPosition = Position.Top,\n borderRadius = 5,\n centerX,\n centerY,\n offset = 20\n } = smoothStepPathParams;\n const [points, labelX, labelY, offsetX, offsetY] = getPoints({\n source: { x: sourceX, y: sourceY },\n sourcePosition,\n target: { x: targetX, y: targetY },\n targetPosition,\n center: { x: centerX, y: centerY },\n offset\n });\n const path = points.reduce((res, p, i) => {\n let segment;\n if (i > 0 && i < points.length - 1) {\n segment = getBend(points[i - 1], p, points[i + 1], borderRadius);\n } else {\n segment = `${i === 0 ? \"M\" : \"L\"}${p.x} ${p.y}`;\n }\n res += segment;\n return res;\n }, \"\");\n return [path, labelX, labelY, offsetX, offsetY];\n}\nfunction getStraightPath(straightEdgeParams) {\n const { sourceX, sourceY, targetX, targetY } = straightEdgeParams;\n const [centerX, centerY, offsetX, offsetY] = getSimpleEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY\n });\n return [`M ${sourceX},${sourceY}L ${targetX},${targetY}`, centerX, centerY, offsetX, offsetY];\n}\nconst StraightEdge = defineComponent({\n name: \"StraightEdge\",\n props: [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n ],\n compatConfig: { MODE: 3 },\n setup(props, { attrs }) {\n return () => {\n const [path, labelX, labelY] = getStraightPath(props);\n return h(_sfc_main$d, {\n path,\n labelX,\n labelY,\n ...attrs,\n ...props\n });\n };\n }\n});\nconst StraightEdge$1 = StraightEdge;\nconst SmoothStepEdge = defineComponent({\n name: \"SmoothStepEdge\",\n props: [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n ],\n compatConfig: { MODE: 3 },\n setup(props, { attrs }) {\n return () => {\n const [path, labelX, labelY] = getSmoothStepPath({\n ...props,\n sourcePosition: props.sourcePosition ?? Position.Bottom,\n targetPosition: props.targetPosition ?? Position.Top\n });\n return h(_sfc_main$d, {\n path,\n labelX,\n labelY,\n ...attrs,\n ...props\n });\n };\n }\n});\nconst SmoothStepEdge$1 = SmoothStepEdge;\nconst StepEdge = defineComponent({\n name: \"StepEdge\",\n props: [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n ],\n setup(props, { attrs }) {\n return () => h(SmoothStepEdge$1, { ...props, ...attrs, borderRadius: 0 });\n }\n});\nconst StepEdge$1 = StepEdge;\nconst BezierEdge = defineComponent({\n name: \"BezierEdge\",\n props: [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n ],\n compatConfig: { MODE: 3 },\n setup(props, { attrs }) {\n return () => {\n const [path, labelX, labelY] = getBezierPath({\n ...props,\n sourcePosition: props.sourcePosition ?? Position.Bottom,\n targetPosition: props.targetPosition ?? Position.Top\n });\n return h(_sfc_main$d, {\n path,\n labelX,\n labelY,\n ...attrs,\n ...props\n });\n };\n }\n});\nconst BezierEdge$1 = BezierEdge;\nconst SimpleBezierEdge = defineComponent({\n name: \"SimpleBezierEdge\",\n props: [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n ],\n compatConfig: { MODE: 3 },\n setup(props, { attrs }) {\n return () => {\n const [path, labelX, labelY] = getSimpleBezierPath({\n ...props,\n sourcePosition: props.sourcePosition ?? Position.Bottom,\n targetPosition: props.targetPosition ?? Position.Top\n });\n return h(_sfc_main$d, {\n path,\n labelX,\n labelY,\n ...attrs,\n ...props\n });\n };\n }\n});\nconst SimpleBezierEdge$1 = SimpleBezierEdge;\nconst defaultNodeTypes = {\n input: InputNode$1,\n default: DefaultNode$1,\n output: OutputNode$1\n};\nconst defaultEdgeTypes = {\n default: BezierEdge$1,\n straight: StraightEdge$1,\n step: StepEdge$1,\n smoothstep: SmoothStepEdge$1,\n simplebezier: SimpleBezierEdge$1\n};\nfunction useGetters(state, nodeLookup, edgeLookup) {\n const getNode = computed(() => (id2) => nodeLookup.value.get(id2));\n const getEdge = computed(() => (id2) => edgeLookup.value.get(id2));\n const getEdgeTypes = computed(() => {\n const edgeTypes = {\n ...defaultEdgeTypes,\n ...state.edgeTypes\n };\n const keys = Object.keys(edgeTypes);\n for (const e of state.edges) {\n e.type && !keys.includes(e.type) && (edgeTypes[e.type] = e.type);\n }\n return edgeTypes;\n });\n const getNodeTypes = computed(() => {\n const nodeTypes = {\n ...defaultNodeTypes,\n ...state.nodeTypes\n };\n const keys = Object.keys(nodeTypes);\n for (const n of state.nodes) {\n n.type && !keys.includes(n.type) && (nodeTypes[n.type] = n.type);\n }\n return nodeTypes;\n });\n const getNodes = computed(() => {\n if (state.onlyRenderVisibleElements) {\n return getNodesInside(\n state.nodes,\n {\n x: 0,\n y: 0,\n width: state.dimensions.width,\n height: state.dimensions.height\n },\n state.viewport,\n true\n );\n }\n return state.nodes;\n });\n const getEdges = computed(() => {\n if (state.onlyRenderVisibleElements) {\n const visibleEdges = [];\n for (const edge of state.edges) {\n const source = nodeLookup.value.get(edge.source);\n const target = nodeLookup.value.get(edge.target);\n if (isEdgeVisible({\n sourcePos: source.computedPosition || { x: 0, y: 0 },\n targetPos: target.computedPosition || { x: 0, y: 0 },\n sourceWidth: source.dimensions.width,\n sourceHeight: source.dimensions.height,\n targetWidth: target.dimensions.width,\n targetHeight: target.dimensions.height,\n width: state.dimensions.width,\n height: state.dimensions.height,\n viewport: state.viewport\n })) {\n visibleEdges.push(edge);\n }\n }\n return visibleEdges;\n }\n return state.edges;\n });\n const getElements = computed(() => [...getNodes.value, ...getEdges.value]);\n const getSelectedNodes = computed(() => {\n const selectedNodes = [];\n for (const node of state.nodes) {\n if (node.selected) {\n selectedNodes.push(node);\n }\n }\n return selectedNodes;\n });\n const getSelectedEdges = computed(() => {\n const selectedEdges = [];\n for (const edge of state.edges) {\n if (edge.selected) {\n selectedEdges.push(edge);\n }\n }\n return selectedEdges;\n });\n const getSelectedElements = computed(() => [\n ...getSelectedNodes.value,\n ...getSelectedEdges.value\n ]);\n const getNodesInitialized = computed(() => {\n const initializedNodes = [];\n for (const node of state.nodes) {\n if (!!node.dimensions.width && !!node.dimensions.height && node.handleBounds !== void 0) {\n initializedNodes.push(node);\n }\n }\n return initializedNodes;\n });\n const areNodesInitialized = computed(\n () => getNodes.value.length > 0 && getNodesInitialized.value.length === getNodes.value.length\n );\n return {\n getNode,\n getEdge,\n getElements,\n getEdgeTypes,\n getNodeTypes,\n getEdges,\n getNodes,\n getSelectedElements,\n getSelectedNodes,\n getSelectedEdges,\n getNodesInitialized,\n areNodesInitialized\n };\n}\nclass Storage {\n constructor() {\n this.currentId = 0;\n this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n var _a;\n const vueApp = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;\n const existingInstance = (vueApp == null ? void 0 : vueApp.config.globalProperties.$vueFlowStorage) ?? Storage.instance;\n Storage.instance = existingInstance ?? new Storage();\n if (vueApp) {\n vueApp.config.globalProperties.$vueFlowStorage = Storage.instance;\n }\n return Storage.instance;\n }\n set(id2, flow) {\n return this.flows.set(id2, flow);\n }\n get(id2) {\n return this.flows.get(id2);\n }\n remove(id2) {\n return this.flows.delete(id2);\n }\n create(id2, preloadedState) {\n const state = useState();\n const reactiveState = reactive(state);\n const hooksOn = {};\n for (const [n, h2] of Object.entries(reactiveState.hooks)) {\n const name = `on${n.charAt(0).toUpperCase() + n.slice(1)}`;\n hooksOn[name] = h2.on;\n }\n const emits = {};\n for (const [n, h2] of Object.entries(reactiveState.hooks)) {\n emits[n] = h2.trigger;\n }\n const nodeLookup = computed(() => {\n const nodesMap = /* @__PURE__ */ new Map();\n for (const node of reactiveState.nodes) {\n nodesMap.set(node.id, node);\n }\n return nodesMap;\n });\n const edgeLookup = computed(() => {\n const edgesMap = /* @__PURE__ */ new Map();\n for (const edge of reactiveState.edges) {\n edgesMap.set(edge.id, edge);\n }\n return edgesMap;\n });\n const getters = useGetters(reactiveState, nodeLookup, edgeLookup);\n const actions = useActions(reactiveState, nodeLookup, edgeLookup);\n actions.setState({ ...reactiveState, ...preloadedState });\n const flow = {\n ...hooksOn,\n ...getters,\n ...actions,\n ...toRefs(reactiveState),\n nodeLookup,\n edgeLookup,\n emits,\n id: id2,\n vueFlowVersion: \"1.46.0\",\n $destroy: () => {\n this.remove(id2);\n }\n };\n this.set(id2, flow);\n return flow;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nfunction useVueFlow(idOrOpts) {\n const storage = Storage.getInstance();\n const scope = getCurrentScope();\n const isOptsObj = typeof idOrOpts === \"object\";\n const options = isOptsObj ? idOrOpts : { id: idOrOpts };\n const id2 = options.id;\n const vueFlowId = id2 ?? (scope == null ? void 0 : scope.vueFlowId);\n let vueFlow;\n if (scope) {\n const injectedState = inject(VueFlow, null);\n if (typeof injectedState !== \"undefined\" && injectedState !== null && (!vueFlowId || injectedState.id === vueFlowId)) {\n vueFlow = injectedState;\n }\n }\n if (!vueFlow) {\n if (vueFlowId) {\n vueFlow = storage.get(vueFlowId);\n }\n }\n if (!vueFlow || vueFlowId && vueFlow.id !== vueFlowId) {\n const name = id2 ?? storage.getId();\n const state = storage.create(name, options);\n vueFlow = state;\n const vfScope = scope ?? effectScope(true);\n vfScope.run(() => {\n watch(\n state.applyDefault,\n (shouldApplyDefault, __, onCleanup) => {\n const nodesChangeHandler = (changes) => {\n state.applyNodeChanges(changes);\n };\n const edgesChangeHandler = (changes) => {\n state.applyEdgeChanges(changes);\n };\n if (shouldApplyDefault) {\n state.onNodesChange(nodesChangeHandler);\n state.onEdgesChange(edgesChangeHandler);\n } else {\n state.hooks.value.nodesChange.off(nodesChangeHandler);\n state.hooks.value.edgesChange.off(edgesChangeHandler);\n }\n onCleanup(() => {\n state.hooks.value.nodesChange.off(nodesChangeHandler);\n state.hooks.value.edgesChange.off(edgesChangeHandler);\n });\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n if (vueFlow) {\n const storedInstance = storage.get(vueFlow.id);\n if (storedInstance) {\n storedInstance.$destroy();\n } else {\n warn(`No store instance found for id ${vueFlow.id} in storage.`);\n }\n }\n });\n });\n } else {\n if (isOptsObj) {\n vueFlow.setState(options);\n }\n }\n if (scope) {\n provide(VueFlow, vueFlow);\n scope.vueFlowId = vueFlow.id;\n }\n if (isOptsObj) {\n const instance = getCurrentInstance();\n if ((instance == null ? void 0 : instance.type.name) !== \"VueFlow\") {\n vueFlow.emits.error(new VueFlowError(ErrorCode.USEVUEFLOW_OPTIONS));\n }\n }\n return vueFlow;\n}\nfunction useResizeHandler(viewportEl) {\n const { emits, dimensions } = useVueFlow();\n let resizeObserver;\n onMounted(() => {\n const rendererNode = viewportEl.value;\n const updateDimensions = () => {\n if (!rendererNode) {\n return;\n }\n const size = getDimensions(rendererNode);\n if (size.width === 0 || size.height === 0) {\n emits.error(new VueFlowError(ErrorCode.MISSING_VIEWPORT_DIMENSIONS));\n }\n dimensions.value = { width: size.width || 500, height: size.height || 500 };\n };\n updateDimensions();\n window.addEventListener(\"resize\", updateDimensions);\n if (rendererNode) {\n resizeObserver = new ResizeObserver(() => updateDimensions());\n resizeObserver.observe(rendererNode);\n }\n onBeforeUnmount(() => {\n window.removeEventListener(\"resize\", updateDimensions);\n if (resizeObserver && rendererNode) {\n resizeObserver.unobserve(rendererNode);\n }\n });\n });\n}\nconst __default__$c = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$c = /* @__PURE__ */ defineComponent({\n ...__default__$c,\n props: {\n userSelectionRect: {}\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: normalizeStyle({\n width: `${_ctx.userSelectionRect.width}px`,\n height: `${_ctx.userSelectionRect.height}px`,\n transform: `translate(${_ctx.userSelectionRect.x}px, ${_ctx.userSelectionRect.y}px)`\n })\n }, null, 4);\n };\n }\n});\nconst _hoisted_1$6 = [\"tabIndex\"];\nconst __default__$b = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$b = /* @__PURE__ */ defineComponent({\n ...__default__$b,\n setup(__props) {\n const { emits, viewport, getSelectedNodes, noPanClassName, disableKeyboardA11y, userSelectionActive } = useVueFlow();\n const updatePositions = useUpdateNodePositions();\n const el = ref(null);\n const dragging = useDrag({\n el,\n onStart(args) {\n emits.selectionDragStart(args);\n emits.nodeDragStart(args);\n },\n onDrag(args) {\n emits.selectionDrag(args);\n emits.nodeDrag(args);\n },\n onStop(args) {\n emits.selectionDragStop(args);\n emits.nodeDragStop(args);\n }\n });\n onMounted(() => {\n var _a;\n if (!disableKeyboardA11y.value) {\n (_a = el.value) == null ? void 0 : _a.focus({ preventScroll: true });\n }\n });\n const selectedNodesBBox = computed(() => getRectOfNodes(getSelectedNodes.value));\n const innerStyle = computed(() => ({\n width: `${selectedNodesBBox.value.width}px`,\n height: `${selectedNodesBBox.value.height}px`,\n top: `${selectedNodesBBox.value.y}px`,\n left: `${selectedNodesBBox.value.x}px`\n }));\n function onContextMenu(event) {\n emits.selectionContextMenu({ event, nodes: getSelectedNodes.value });\n }\n function onKeyDown(event) {\n if (disableKeyboardA11y) {\n return;\n }\n if (arrowKeyDiffs[event.key]) {\n event.preventDefault();\n updatePositions(\n {\n x: arrowKeyDiffs[event.key].x,\n y: arrowKeyDiffs[event.key].y\n },\n event.shiftKey\n );\n }\n }\n return (_ctx, _cache) => {\n return !unref(userSelectionActive) && selectedNodesBBox.value.width && selectedNodesBBox.value.height ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n class: normalizeClass([\"vue-flow__nodesselection vue-flow__container\", unref(noPanClassName)]),\n style: normalizeStyle({ transform: `translate(${unref(viewport).x}px,${unref(viewport).y}px) scale(${unref(viewport).zoom})` })\n }, [\n createElementVNode(\"div\", {\n ref_key: \"el\",\n ref: el,\n class: normalizeClass([{ dragging: unref(dragging) }, \"vue-flow__nodesselection-rect\"]),\n style: normalizeStyle(innerStyle.value),\n tabIndex: unref(disableKeyboardA11y) ? void 0 : -1,\n onContextmenu: onContextMenu,\n onKeydown: onKeyDown\n }, null, 46, _hoisted_1$6)\n ], 6)) : createCommentVNode(\"\", true);\n };\n }\n});\nfunction getMousePosition(event, containerBounds) {\n return {\n x: event.clientX - containerBounds.left,\n y: event.clientY - containerBounds.top\n };\n}\nconst __default__$a = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$a = /* @__PURE__ */ defineComponent({\n ...__default__$a,\n props: {\n isSelecting: { type: Boolean },\n selectionKeyPressed: { type: Boolean }\n },\n setup(__props) {\n const {\n vueFlowRef,\n nodes,\n viewport,\n emits,\n userSelectionActive,\n removeSelectedElements,\n userSelectionRect,\n elementsSelectable,\n nodesSelectionActive,\n getSelectedEdges,\n getSelectedNodes,\n removeNodes,\n removeEdges,\n selectionMode,\n deleteKeyCode,\n multiSelectionKeyCode,\n multiSelectionActive,\n edgeLookup,\n nodeLookup,\n connectionLookup,\n defaultEdgeOptions,\n connectionStartHandle\n } = useVueFlow();\n const container = ref(null);\n const selectedNodeIds = ref(/* @__PURE__ */ new Set());\n const selectedEdgeIds = ref(/* @__PURE__ */ new Set());\n const containerBounds = ref();\n const hasActiveSelection = toRef(() => elementsSelectable.value && (__props.isSelecting || userSelectionActive.value));\n const connectionInProgress = toRef(() => connectionStartHandle.value !== null);\n let selectionInProgress = false;\n let selectionStarted = false;\n const deleteKeyPressed = useKeyPress(deleteKeyCode, { actInsideInputWithModifier: false });\n const multiSelectKeyPressed = useKeyPress(multiSelectionKeyCode);\n watch(deleteKeyPressed, (isKeyPressed) => {\n if (!isKeyPressed) {\n return;\n }\n removeNodes(getSelectedNodes.value);\n removeEdges(getSelectedEdges.value);\n nodesSelectionActive.value = false;\n });\n watch(multiSelectKeyPressed, (isKeyPressed) => {\n multiSelectionActive.value = isKeyPressed;\n });\n function wrapHandler(handler, containerRef) {\n return (event) => {\n if (event.target !== containerRef) {\n return;\n }\n handler == null ? void 0 : handler(event);\n };\n }\n function onClick(event) {\n if (selectionInProgress || connectionInProgress.value) {\n selectionInProgress = false;\n return;\n }\n emits.paneClick(event);\n removeSelectedElements();\n nodesSelectionActive.value = false;\n }\n function onContextMenu(event) {\n event.preventDefault();\n event.stopPropagation();\n emits.paneContextMenu(event);\n }\n function onWheel(event) {\n emits.paneScroll(event);\n }\n function onPointerDown(event) {\n var _a, _b, _c;\n containerBounds.value = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect();\n if (!elementsSelectable.value || !__props.isSelecting || event.button !== 0 || event.target !== container.value || !containerBounds.value) {\n return;\n }\n (_c = (_b = event.target) == null ? void 0 : _b.setPointerCapture) == null ? void 0 : _c.call(_b, event.pointerId);\n const { x, y } = getMousePosition(event, containerBounds.value);\n selectionStarted = true;\n selectionInProgress = false;\n removeSelectedElements();\n userSelectionRect.value = {\n width: 0,\n height: 0,\n startX: x,\n startY: y,\n x,\n y\n };\n emits.selectionStart(event);\n }\n function onPointerMove(event) {\n var _a;\n if (!containerBounds.value || !userSelectionRect.value) {\n return;\n }\n selectionInProgress = true;\n const { x: mouseX, y: mouseY } = getEventPosition(event, containerBounds.value);\n const { startX = 0, startY = 0 } = userSelectionRect.value;\n const nextUserSelectRect = {\n startX,\n startY,\n x: mouseX < startX ? mouseX : startX,\n y: mouseY < startY ? mouseY : startY,\n width: Math.abs(mouseX - startX),\n height: Math.abs(mouseY - startY)\n };\n const prevSelectedNodeIds = selectedNodeIds.value;\n const prevSelectedEdgeIds = selectedEdgeIds.value;\n selectedNodeIds.value = new Set(\n getNodesInside(nodes.value, nextUserSelectRect, viewport.value, selectionMode.value === SelectionMode.Partial, true).map(\n (node) => node.id\n )\n );\n selectedEdgeIds.value = /* @__PURE__ */ new Set();\n const edgesSelectable = ((_a = defaultEdgeOptions.value) == null ? void 0 : _a.selectable) ?? true;\n for (const nodeId of selectedNodeIds.value) {\n const connections = connectionLookup.value.get(nodeId);\n if (!connections) {\n continue;\n }\n for (const { edgeId } of connections.values()) {\n const edge = edgeLookup.value.get(edgeId);\n if (edge && (edge.selectable ?? edgesSelectable)) {\n selectedEdgeIds.value.add(edgeId);\n }\n }\n }\n if (!areSetsEqual(prevSelectedNodeIds, selectedNodeIds.value)) {\n const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds.value, true);\n emits.nodesChange(changes);\n }\n if (!areSetsEqual(prevSelectedEdgeIds, selectedEdgeIds.value)) {\n const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds.value);\n emits.edgesChange(changes);\n }\n userSelectionRect.value = nextUserSelectRect;\n userSelectionActive.value = true;\n nodesSelectionActive.value = false;\n }\n function onPointerUp(event) {\n var _a;\n if (event.button !== 0 || !selectionStarted) {\n return;\n }\n (_a = event.target) == null ? void 0 : _a.releasePointerCapture(event.pointerId);\n if (!userSelectionActive.value && userSelectionRect.value && event.target === container.value) {\n onClick(event);\n }\n userSelectionActive.value = false;\n userSelectionRect.value = null;\n nodesSelectionActive.value = selectedNodeIds.value.size > 0;\n emits.selectionEnd(event);\n if (__props.selectionKeyPressed) {\n selectionInProgress = false;\n }\n selectionStarted = false;\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"container\",\n ref: container,\n class: normalizeClass([\"vue-flow__pane vue-flow__container\", { selection: _ctx.isSelecting }]),\n onClick: _cache[0] || (_cache[0] = (event) => hasActiveSelection.value ? void 0 : wrapHandler(onClick, container.value)(event)),\n onContextmenu: _cache[1] || (_cache[1] = ($event) => wrapHandler(onContextMenu, container.value)($event)),\n onWheelPassive: _cache[2] || (_cache[2] = ($event) => wrapHandler(onWheel, container.value)($event)),\n onPointerenter: _cache[3] || (_cache[3] = (event) => hasActiveSelection.value ? void 0 : unref(emits).paneMouseEnter(event)),\n onPointerdown: _cache[4] || (_cache[4] = (event) => hasActiveSelection.value ? onPointerDown(event) : unref(emits).paneMouseMove(event)),\n onPointermove: _cache[5] || (_cache[5] = (event) => hasActiveSelection.value ? onPointerMove(event) : unref(emits).paneMouseMove(event)),\n onPointerup: _cache[6] || (_cache[6] = (event) => hasActiveSelection.value ? onPointerUp(event) : void 0),\n onPointerleave: _cache[7] || (_cache[7] = ($event) => unref(emits).paneMouseLeave($event))\n }, [\n renderSlot(_ctx.$slots, \"default\"),\n unref(userSelectionActive) && unref(userSelectionRect) ? (openBlock(), createBlock(_sfc_main$c, {\n key: 0,\n \"user-selection-rect\": unref(userSelectionRect)\n }, null, 8, [\"user-selection-rect\"])) : createCommentVNode(\"\", true),\n unref(nodesSelectionActive) && unref(getSelectedNodes).length ? (openBlock(), createBlock(_sfc_main$b, { key: 1 })) : createCommentVNode(\"\", true)\n ], 34);\n };\n }\n});\nconst __default__$9 = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$9 = /* @__PURE__ */ defineComponent({\n ...__default__$9,\n setup(__props) {\n const { viewport, fitViewOnInit, fitViewOnInitDone } = useVueFlow();\n const isHidden = computed(() => {\n if (fitViewOnInit.value) {\n return !fitViewOnInitDone.value;\n }\n return false;\n });\n const transform = computed(() => `translate(${viewport.value.x}px,${viewport.value.y}px) scale(${viewport.value.zoom})`);\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: normalizeStyle({ transform: transform.value, opacity: isHidden.value ? 0 : void 0 })\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 4);\n };\n }\n});\nconst __default__$8 = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$8 = /* @__PURE__ */ defineComponent({\n ...__default__$8,\n setup(__props) {\n const {\n minZoom,\n maxZoom,\n defaultViewport,\n translateExtent,\n zoomActivationKeyCode,\n selectionKeyCode,\n panActivationKeyCode,\n panOnScroll,\n panOnScrollMode,\n panOnScrollSpeed,\n panOnDrag,\n zoomOnDoubleClick,\n zoomOnPinch,\n zoomOnScroll,\n preventScrolling,\n noWheelClassName,\n noPanClassName,\n emits,\n connectionStartHandle,\n userSelectionActive,\n paneDragging,\n d3Zoom: storeD3Zoom,\n d3Selection: storeD3Selection,\n d3ZoomHandler: storeD3ZoomHandler,\n viewport,\n viewportRef,\n paneClickDistance\n } = useVueFlow();\n useResizeHandler(viewportRef);\n const isZoomingOrPanning = shallowRef(false);\n const isPanScrolling = shallowRef(false);\n let panScrollTimeout = null;\n let zoomedWithRightMouseButton = false;\n let mouseButton = 0;\n let prevTransform = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const panKeyPressed = useKeyPress(panActivationKeyCode);\n const selectionKeyPressed = useKeyPress(selectionKeyCode);\n const zoomKeyPressed = useKeyPress(zoomActivationKeyCode);\n const shouldPanOnDrag = toRef(\n () => (!selectionKeyPressed.value || selectionKeyPressed.value && selectionKeyCode.value === true) && (panKeyPressed.value || panOnDrag.value)\n );\n const shouldPanOnScroll = toRef(() => panKeyPressed.value || panOnScroll.value);\n const isSelecting = toRef(() => selectionKeyPressed.value || selectionKeyCode.value === true && shouldPanOnDrag.value !== true);\n onMounted(() => {\n if (!viewportRef.value) {\n warn(\"Viewport element is missing\");\n return;\n }\n const viewportElement = viewportRef.value;\n const bbox = viewportElement.getBoundingClientRect();\n const d3Zoom = zoom().clickDistance(paneClickDistance.value).scaleExtent([minZoom.value, maxZoom.value]).translateExtent(translateExtent.value);\n const d3Selection = select(viewportElement).call(d3Zoom);\n const d3ZoomHandler = d3Selection.on(\"wheel.zoom\");\n const updatedTransform = identity.translate(defaultViewport.value.x ?? 0, defaultViewport.value.y ?? 0).scale(clamp(defaultViewport.value.zoom ?? 1, minZoom.value, maxZoom.value));\n const extent = [\n [0, 0],\n [bbox.width, bbox.height]\n ];\n const constrainedTransform = d3Zoom.constrain()(updatedTransform, extent, translateExtent.value);\n d3Zoom.transform(d3Selection, constrainedTransform);\n d3Zoom.wheelDelta(wheelDelta);\n storeD3Zoom.value = d3Zoom;\n storeD3Selection.value = d3Selection;\n storeD3ZoomHandler.value = d3ZoomHandler;\n viewport.value = { x: constrainedTransform.x, y: constrainedTransform.y, zoom: constrainedTransform.k };\n d3Zoom.on(\"start\", (event) => {\n var _a;\n if (!event.sourceEvent) {\n return null;\n }\n mouseButton = event.sourceEvent.button;\n isZoomingOrPanning.value = true;\n const flowTransform = eventToFlowTransform(event.transform);\n if (((_a = event.sourceEvent) == null ? void 0 : _a.type) === \"mousedown\") {\n paneDragging.value = true;\n }\n prevTransform = flowTransform;\n emits.viewportChangeStart(flowTransform);\n emits.moveStart({ event, flowTransform });\n });\n d3Zoom.on(\"end\", (event) => {\n if (!event.sourceEvent) {\n return null;\n }\n isZoomingOrPanning.value = false;\n paneDragging.value = false;\n if (isRightClickPan(shouldPanOnDrag.value, mouseButton ?? 0) && !zoomedWithRightMouseButton) {\n emits.paneContextMenu(event.sourceEvent);\n }\n zoomedWithRightMouseButton = false;\n if (viewChanged(prevTransform, event.transform)) {\n const flowTransform = eventToFlowTransform(event.transform);\n prevTransform = flowTransform;\n emits.viewportChangeEnd(flowTransform);\n emits.moveEnd({ event, flowTransform });\n }\n });\n d3Zoom.filter((event) => {\n var _a;\n const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value;\n const pinchZoom = zoomOnPinch.value && event.ctrlKey;\n const eventButton = event.button;\n if (eventButton === 1 && event.type === \"mousedown\" && (isWrappedWithClass(event, \"vue-flow__node\") || isWrappedWithClass(event, \"vue-flow__edge\"))) {\n return true;\n }\n if (!shouldPanOnDrag.value && !zoomScroll && !shouldPanOnScroll.value && !zoomOnDoubleClick.value && !zoomOnPinch.value) {\n return false;\n }\n if (userSelectionActive.value) {\n return false;\n }\n if (!zoomOnDoubleClick.value && event.type === \"dblclick\") {\n return false;\n }\n if (isWrappedWithClass(event, noWheelClassName.value) && event.type === \"wheel\") {\n return false;\n }\n if (isWrappedWithClass(event, noPanClassName.value) && (event.type !== \"wheel\" || shouldPanOnScroll.value && event.type === \"wheel\" && !zoomKeyPressed.value)) {\n return false;\n }\n if (!zoomOnPinch.value && event.ctrlKey && event.type === \"wheel\") {\n return false;\n }\n if (!zoomScroll && !shouldPanOnScroll.value && !pinchZoom && event.type === \"wheel\") {\n return false;\n }\n if (!zoomOnPinch && event.type === \"touchstart\" && ((_a = event.touches) == null ? void 0 : _a.length) > 1) {\n event.preventDefault();\n return false;\n }\n if (!shouldPanOnDrag.value && (event.type === \"mousedown\" || event.type === \"touchstart\")) {\n return false;\n }\n if (selectionKeyCode.value === true && Array.isArray(panOnDrag.value) && panOnDrag.value.includes(0) && eventButton === 0) {\n return false;\n }\n if (Array.isArray(panOnDrag.value) && !panOnDrag.value.includes(eventButton) && (event.type === \"mousedown\" || event.type === \"touchstart\")) {\n return false;\n }\n const buttonAllowed = Array.isArray(panOnDrag.value) && panOnDrag.value.includes(eventButton) || selectionKeyCode.value === true && Array.isArray(panOnDrag.value) && !panOnDrag.value.includes(0) || !eventButton || eventButton <= 1;\n return (!event.ctrlKey || panKeyPressed.value || event.type === \"wheel\") && buttonAllowed;\n });\n watch(\n [userSelectionActive, shouldPanOnDrag],\n () => {\n if (userSelectionActive.value && !isZoomingOrPanning.value) {\n d3Zoom.on(\"zoom\", null);\n } else if (!userSelectionActive.value) {\n d3Zoom.on(\"zoom\", (event) => {\n viewport.value = { x: event.transform.x, y: event.transform.y, zoom: event.transform.k };\n const flowTransform = eventToFlowTransform(event.transform);\n zoomedWithRightMouseButton = isRightClickPan(shouldPanOnDrag.value, mouseButton ?? 0);\n emits.viewportChange(flowTransform);\n emits.move({ event, flowTransform });\n });\n }\n },\n { immediate: true }\n );\n watch(\n [userSelectionActive, shouldPanOnScroll, panOnScrollMode, zoomKeyPressed, zoomOnPinch, preventScrolling, noWheelClassName],\n () => {\n if (shouldPanOnScroll.value && !zoomKeyPressed.value && !userSelectionActive.value) {\n d3Selection.on(\n \"wheel.zoom\",\n (event) => {\n if (isWrappedWithClass(event, noWheelClassName.value)) {\n return false;\n }\n const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value;\n const pinchZoom = zoomOnPinch.value && event.ctrlKey;\n const scrollEventEnabled = !preventScrolling.value || shouldPanOnScroll.value || zoomScroll || pinchZoom;\n if (!scrollEventEnabled) {\n return false;\n }\n event.preventDefault();\n event.stopImmediatePropagation();\n const currentZoom = d3Selection.property(\"__zoom\").k || 1;\n const _isMacOs = isMacOs();\n if (!panKeyPressed.value && event.ctrlKey && zoomOnPinch.value && _isMacOs) {\n const point = pointer(event);\n const pinchDelta = wheelDelta(event);\n const zoom2 = currentZoom * 2 ** pinchDelta;\n d3Zoom.scaleTo(d3Selection, zoom2, point, event);\n return;\n }\n const deltaNormalize = event.deltaMode === 1 ? 20 : 1;\n let deltaX = panOnScrollMode.value === PanOnScrollMode.Vertical ? 0 : event.deltaX * deltaNormalize;\n let deltaY = panOnScrollMode.value === PanOnScrollMode.Horizontal ? 0 : event.deltaY * deltaNormalize;\n if (!_isMacOs && event.shiftKey && panOnScrollMode.value !== PanOnScrollMode.Vertical && !deltaX && deltaY) {\n deltaX = deltaY;\n deltaY = 0;\n }\n d3Zoom.translateBy(\n d3Selection,\n -(deltaX / currentZoom) * panOnScrollSpeed.value,\n -(deltaY / currentZoom) * panOnScrollSpeed.value\n );\n const nextViewport = eventToFlowTransform(d3Selection.property(\"__zoom\"));\n if (panScrollTimeout) {\n clearTimeout(panScrollTimeout);\n }\n if (!isPanScrolling.value) {\n isPanScrolling.value = true;\n emits.moveStart({ event, flowTransform: nextViewport });\n emits.viewportChangeStart(nextViewport);\n } else {\n emits.move({ event, flowTransform: nextViewport });\n emits.viewportChange(nextViewport);\n panScrollTimeout = setTimeout(() => {\n emits.moveEnd({ event, flowTransform: nextViewport });\n emits.viewportChangeEnd(nextViewport);\n isPanScrolling.value = false;\n }, 150);\n }\n },\n { passive: false }\n );\n } else if (typeof d3ZoomHandler !== \"undefined\") {\n d3Selection.on(\n \"wheel.zoom\",\n function(event, d) {\n const invalidEvent = !preventScrolling.value && event.type === \"wheel\" && !event.ctrlKey;\n const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value;\n const pinchZoom = zoomOnPinch.value && event.ctrlKey;\n const scrollEventsDisabled = !zoomScroll && !panOnScroll.value && !pinchZoom && event.type === \"wheel\";\n if (scrollEventsDisabled || invalidEvent || isWrappedWithClass(event, noWheelClassName.value)) {\n return null;\n }\n event.preventDefault();\n d3ZoomHandler.call(this, event, d);\n },\n { passive: false }\n );\n }\n },\n { immediate: true }\n );\n });\n function isRightClickPan(pan, usedButton) {\n return usedButton === 2 && Array.isArray(pan) && pan.includes(2);\n }\n function viewChanged(prevViewport, eventTransform) {\n return prevViewport.x !== eventTransform.x && !Number.isNaN(eventTransform.x) || prevViewport.y !== eventTransform.y && !Number.isNaN(eventTransform.y) || prevViewport.zoom !== eventTransform.k && !Number.isNaN(eventTransform.k);\n }\n function eventToFlowTransform(eventTransform) {\n return {\n x: eventTransform.x,\n y: eventTransform.y,\n zoom: eventTransform.k\n };\n }\n function isWrappedWithClass(event, className) {\n return event.target.closest(`.${className}`);\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"viewportRef\",\n ref: viewportRef,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n createVNode(_sfc_main$a, {\n \"is-selecting\": isSelecting.value,\n \"selection-key-pressed\": unref(selectionKeyPressed),\n class: normalizeClass({\n connecting: !!unref(connectionStartHandle),\n dragging: unref(paneDragging),\n draggable: unref(panOnDrag) === true || Array.isArray(unref(panOnDrag)) && unref(panOnDrag).includes(0)\n })\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$9, null, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"selection-key-pressed\", \"class\"])\n ], 512);\n };\n }\n});\nconst _hoisted_1$5 = [\"id\"];\nconst _hoisted_2 = [\"id\"];\nconst _hoisted_3 = [\"id\"];\nconst __default__$7 = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$7 = /* @__PURE__ */ defineComponent({\n ...__default__$7,\n setup(__props) {\n const { id: id2, disableKeyboardA11y, ariaLiveMessage } = useVueFlow();\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createElementVNode(\"div\", {\n id: `${unref(ARIA_NODE_DESC_KEY)}-${unref(id2)}`,\n style: { \"display\": \"none\" }\n }, \" Press enter or space to select a node. \" + toDisplayString(!unref(disableKeyboardA11y) ? \"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, _hoisted_1$5),\n createElementVNode(\"div\", {\n id: `${unref(ARIA_EDGE_DESC_KEY)}-${unref(id2)}`,\n style: { \"display\": \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, _hoisted_2),\n !unref(disableKeyboardA11y) ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n id: `${unref(ARIA_LIVE_MESSAGE)}-${unref(id2)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n 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%)\" }\n }, toDisplayString(unref(ariaLiveMessage)), 9, _hoisted_3)) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\nfunction useOnInitHandler() {\n const vfInstance = useVueFlow();\n watch(\n () => vfInstance.viewportHelper.value.viewportInitialized,\n (isInitialized) => {\n if (isInitialized) {\n setTimeout(() => {\n vfInstance.emits.init(vfInstance);\n vfInstance.emits.paneReady(vfInstance);\n }, 1);\n }\n }\n );\n}\nfunction shiftX(x, shift, position) {\n if (position === Position.Left) {\n return x - shift;\n }\n if (position === Position.Right) {\n return x + shift;\n }\n return x;\n}\nfunction shiftY(y, shift, position) {\n if (position === Position.Top) {\n return y - shift;\n }\n if (position === Position.Bottom) {\n return y + shift;\n }\n return y;\n}\nconst EdgeAnchor = function({\n radius = 10,\n centerX = 0,\n centerY = 0,\n position = Position.Top,\n type\n}) {\n return h(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${type}`,\n cx: shiftX(centerX, radius, position),\n cy: shiftY(centerY, radius, position),\n r: radius,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\nEdgeAnchor.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\nEdgeAnchor.compatConfig = { MODE: 3 };\nconst EdgeAnchor$1 = EdgeAnchor;\nconst EdgeWrapper = defineComponent({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"id\"],\n setup(props) {\n const {\n id: vueFlowId,\n addSelectedEdges,\n connectionMode,\n edgeUpdaterRadius,\n emits,\n nodesSelectionActive,\n noPanClassName,\n getEdgeTypes,\n removeSelectedEdges,\n findEdge,\n findNode,\n isValidConnection,\n multiSelectionActive,\n disableKeyboardA11y,\n elementsSelectable,\n edgesUpdatable,\n edgesFocusable,\n hooks\n } = useVueFlow();\n const edge = computed(() => findEdge(props.id));\n const { emit, on } = useEdgeHooks(edge.value, emits);\n const slots = inject(Slots);\n const instance = getCurrentInstance();\n const mouseOver = ref(false);\n const updating = ref(false);\n const nodeId = ref(\"\");\n const handleId = ref(null);\n const edgeUpdaterType = ref(\"source\");\n const edgeEl = ref(null);\n const isSelectable = toRef(\n () => typeof edge.value.selectable === \"undefined\" ? elementsSelectable.value : edge.value.selectable\n );\n const isUpdatable = toRef(() => typeof edge.value.updatable === \"undefined\" ? edgesUpdatable.value : edge.value.updatable);\n const isFocusable = toRef(() => typeof edge.value.focusable === \"undefined\" ? edgesFocusable.value : edge.value.focusable);\n provide(EdgeId, props.id);\n provide(EdgeRef, edgeEl);\n const edgeClass = computed(() => edge.value.class instanceof Function ? edge.value.class(edge.value) : edge.value.class);\n const edgeStyle = computed(() => edge.value.style instanceof Function ? edge.value.style(edge.value) : edge.value.style);\n const edgeCmp = computed(() => {\n const name = edge.value.type || \"default\";\n const slot = slots == null ? void 0 : slots[`edge-${name}`];\n if (slot) {\n return slot;\n }\n let edgeType = edge.value.template ?? getEdgeTypes.value[name];\n if (typeof edgeType === \"string\") {\n if (instance) {\n const components = Object.keys(instance.appContext.components);\n if (components && components.includes(name)) {\n edgeType = resolveComponent(name, false);\n }\n }\n }\n if (edgeType && typeof edgeType !== \"string\") {\n return edgeType;\n }\n emits.error(new VueFlowError(ErrorCode.EDGE_TYPE_MISSING, edgeType));\n return false;\n });\n const { handlePointerDown } = useHandle({\n nodeId,\n handleId,\n type: edgeUpdaterType,\n isValidConnection,\n edgeUpdaterType,\n onEdgeUpdate,\n onEdgeUpdateEnd\n });\n return () => {\n const sourceNode = findNode(edge.value.source);\n const targetNode = findNode(edge.value.target);\n const pathOptions = \"pathOptions\" in edge.value ? edge.value.pathOptions : {};\n if (!sourceNode && !targetNode) {\n emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target));\n return null;\n }\n if (!sourceNode) {\n emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source));\n return null;\n }\n if (!targetNode) {\n emits.error(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target));\n return null;\n }\n if (!edge.value || edge.value.hidden || sourceNode.hidden || targetNode.hidden) {\n return null;\n }\n let sourceNodeHandles;\n if (connectionMode.value === ConnectionMode.Strict) {\n sourceNodeHandles = sourceNode.handleBounds.source;\n } else {\n sourceNodeHandles = [...sourceNode.handleBounds.source || [], ...sourceNode.handleBounds.target || []];\n }\n const sourceHandle = getEdgeHandle(sourceNodeHandles, edge.value.sourceHandle);\n let targetNodeHandles;\n if (connectionMode.value === ConnectionMode.Strict) {\n targetNodeHandles = targetNode.handleBounds.target;\n } else {\n targetNodeHandles = [...targetNode.handleBounds.target || [], ...targetNode.handleBounds.source || []];\n }\n const targetHandle = getEdgeHandle(targetNodeHandles, edge.value.targetHandle);\n const sourcePosition = (sourceHandle == null ? void 0 : sourceHandle.position) || Position.Bottom;\n const targetPosition = (targetHandle == null ? void 0 : targetHandle.position) || Position.Top;\n const { x: sourceX, y: sourceY } = getHandlePosition(sourceNode, sourceHandle, sourcePosition);\n const { x: targetX, y: targetY } = getHandlePosition(targetNode, targetHandle, targetPosition);\n edge.value.sourceX = sourceX;\n edge.value.sourceY = sourceY;\n edge.value.targetX = targetX;\n edge.value.targetY = targetY;\n return h(\n \"g\",\n {\n \"ref\": edgeEl,\n \"key\": props.id,\n \"data-id\": props.id,\n \"class\": [\n \"vue-flow__edge\",\n `vue-flow__edge-${edgeCmp.value === false ? \"default\" : edge.value.type || \"default\"}`,\n noPanClassName.value,\n edgeClass.value,\n {\n updating: mouseOver.value,\n selected: edge.value.selected,\n animated: edge.value.animated,\n inactive: !isSelectable.value && !hooks.value.edgeClick.hasListeners()\n }\n ],\n \"tabIndex\": isFocusable.value ? 0 : void 0,\n \"aria-label\": edge.value.ariaLabel === null ? void 0 : edge.value.ariaLabel ?? `Edge from ${edge.value.source} to ${edge.value.target}`,\n \"aria-describedby\": isFocusable.value ? `${ARIA_EDGE_DESC_KEY}-${vueFlowId}` : void 0,\n \"aria-roledescription\": \"edge\",\n \"role\": isFocusable.value ? \"group\" : \"img\",\n ...edge.value.domAttributes,\n \"onClick\": onEdgeClick,\n \"onContextmenu\": onEdgeContextMenu,\n \"onDblclick\": onDoubleClick,\n \"onMouseenter\": onEdgeMouseEnter,\n \"onMousemove\": onEdgeMouseMove,\n \"onMouseleave\": onEdgeMouseLeave,\n \"onKeyDown\": isFocusable.value ? onKeyDown : void 0\n },\n [\n updating.value ? null : h(edgeCmp.value === false ? getEdgeTypes.value.default : edgeCmp.value, {\n id: props.id,\n sourceNode,\n targetNode,\n source: edge.value.source,\n target: edge.value.target,\n type: edge.value.type,\n updatable: isUpdatable.value,\n selected: edge.value.selected,\n animated: edge.value.animated,\n label: edge.value.label,\n labelStyle: edge.value.labelStyle,\n labelShowBg: edge.value.labelShowBg,\n labelBgStyle: edge.value.labelBgStyle,\n labelBgPadding: edge.value.labelBgPadding,\n labelBgBorderRadius: edge.value.labelBgBorderRadius,\n data: edge.value.data,\n events: { ...edge.value.events, ...on },\n style: edgeStyle.value,\n markerStart: `url('#${getMarkerId(edge.value.markerStart, vueFlowId)}')`,\n markerEnd: `url('#${getMarkerId(edge.value.markerEnd, vueFlowId)}')`,\n sourcePosition,\n targetPosition,\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceHandleId: edge.value.sourceHandle,\n targetHandleId: edge.value.targetHandle,\n interactionWidth: edge.value.interactionWidth,\n ...pathOptions\n }),\n [\n isUpdatable.value === \"source\" || isUpdatable.value === true ? [\n h(\n \"g\",\n {\n onMousedown: onEdgeUpdaterSourceMouseDown,\n onMouseenter: onEdgeUpdaterMouseEnter,\n onMouseout: onEdgeUpdaterMouseOut\n },\n h(EdgeAnchor$1, {\n \"position\": sourcePosition,\n \"centerX\": sourceX,\n \"centerY\": sourceY,\n \"radius\": edgeUpdaterRadius.value,\n \"type\": \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n isUpdatable.value === \"target\" || isUpdatable.value === true ? [\n h(\n \"g\",\n {\n onMousedown: onEdgeUpdaterTargetMouseDown,\n onMouseenter: onEdgeUpdaterMouseEnter,\n onMouseout: onEdgeUpdaterMouseOut\n },\n h(EdgeAnchor$1, {\n \"position\": targetPosition,\n \"centerX\": targetX,\n \"centerY\": targetY,\n \"radius\": edgeUpdaterRadius.value,\n \"type\": \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function onEdgeUpdaterMouseEnter() {\n mouseOver.value = true;\n }\n function onEdgeUpdaterMouseOut() {\n mouseOver.value = false;\n }\n function onEdgeUpdate(event, connection) {\n emit.update({ event, edge: edge.value, connection });\n }\n function onEdgeUpdateEnd(event) {\n emit.updateEnd({ event, edge: edge.value });\n updating.value = false;\n }\n function handleEdgeUpdater(event, isSourceHandle) {\n if (event.button !== 0) {\n return;\n }\n updating.value = true;\n nodeId.value = isSourceHandle ? edge.value.target : edge.value.source;\n handleId.value = (isSourceHandle ? edge.value.targetHandle : edge.value.sourceHandle) ?? null;\n edgeUpdaterType.value = isSourceHandle ? \"target\" : \"source\";\n emit.updateStart({ event, edge: edge.value });\n handlePointerDown(event);\n }\n function onEdgeClick(event) {\n var _a;\n const data = { event, edge: edge.value };\n if (isSelectable.value) {\n nodesSelectionActive.value = false;\n if (edge.value.selected && multiSelectionActive.value) {\n removeSelectedEdges([edge.value]);\n (_a = edgeEl.value) == null ? void 0 : _a.blur();\n } else {\n addSelectedEdges([edge.value]);\n }\n }\n emit.click(data);\n }\n function onEdgeContextMenu(event) {\n emit.contextMenu({ event, edge: edge.value });\n }\n function onDoubleClick(event) {\n emit.doubleClick({ event, edge: edge.value });\n }\n function onEdgeMouseEnter(event) {\n emit.mouseEnter({ event, edge: edge.value });\n }\n function onEdgeMouseMove(event) {\n emit.mouseMove({ event, edge: edge.value });\n }\n function onEdgeMouseLeave(event) {\n emit.mouseLeave({ event, edge: edge.value });\n }\n function onEdgeUpdaterSourceMouseDown(event) {\n handleEdgeUpdater(event, true);\n }\n function onEdgeUpdaterTargetMouseDown(event) {\n handleEdgeUpdater(event, false);\n }\n function onKeyDown(event) {\n var _a;\n if (!disableKeyboardA11y.value && elementSelectionKeys.includes(event.key) && isSelectable.value) {\n const unselect = event.key === \"Escape\";\n if (unselect) {\n (_a = edgeEl.value) == null ? void 0 : _a.blur();\n removeSelectedEdges([findEdge(props.id)]);\n } else {\n addSelectedEdges([findEdge(props.id)]);\n }\n }\n }\n }\n});\nconst EdgeWrapper$1 = EdgeWrapper;\nconst ConnectionLine = defineComponent({\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 },\n setup() {\n var _a;\n const {\n id: id2,\n connectionMode,\n connectionStartHandle,\n connectionEndHandle,\n connectionPosition,\n connectionLineType,\n connectionLineStyle,\n connectionLineOptions,\n connectionStatus,\n viewport,\n findNode\n } = useVueFlow();\n const connectionLineComponent = (_a = inject(Slots)) == null ? void 0 : _a[\"connection-line\"];\n const fromNode = computed(() => {\n var _a2;\n return findNode((_a2 = connectionStartHandle.value) == null ? void 0 : _a2.nodeId);\n });\n const toNode = computed(() => {\n var _a2;\n return findNode((_a2 = connectionEndHandle.value) == null ? void 0 : _a2.nodeId) ?? null;\n });\n const toXY = computed(() => {\n return {\n x: (connectionPosition.value.x - viewport.value.x) / viewport.value.zoom,\n y: (connectionPosition.value.y - viewport.value.y) / viewport.value.zoom\n };\n });\n const markerStart = computed(\n () => connectionLineOptions.value.markerStart ? `url(#${getMarkerId(connectionLineOptions.value.markerStart, id2)})` : \"\"\n );\n const markerEnd = computed(\n () => connectionLineOptions.value.markerEnd ? `url(#${getMarkerId(connectionLineOptions.value.markerEnd, id2)})` : \"\"\n );\n return () => {\n var _a2, _b, _c;\n if (!fromNode.value || !connectionStartHandle.value) {\n return null;\n }\n const startHandleId = connectionStartHandle.value.id;\n const handleType = connectionStartHandle.value.type;\n const fromHandleBounds = fromNode.value.handleBounds;\n let handleBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType]) ?? [];\n if (connectionMode.value === ConnectionMode.Loose) {\n const oppositeBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType === \"source\" ? \"target\" : \"source\"]) ?? [];\n handleBounds = [...handleBounds, ...oppositeBounds];\n }\n if (!handleBounds) {\n return null;\n }\n const fromHandle = (startHandleId ? handleBounds.find((d) => d.id === startHandleId) : handleBounds[0]) ?? null;\n const fromPosition = (fromHandle == null ? void 0 : fromHandle.position) ?? Position.Top;\n const { x: fromX, y: fromY } = getHandlePosition(fromNode.value, fromHandle, fromPosition);\n let toHandle = null;\n if (toNode.value) {\n if (connectionMode.value === ConnectionMode.Strict) {\n toHandle = ((_a2 = toNode.value.handleBounds[handleType === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : _a2.find(\n (d) => {\n var _a3;\n return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);\n }\n )) || null;\n } else {\n toHandle = ((_b = [...toNode.value.handleBounds.source ?? [], ...toNode.value.handleBounds.target ?? []]) == null ? void 0 : _b.find(\n (d) => {\n var _a3;\n return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);\n }\n )) || null;\n }\n }\n const toPosition = ((_c = connectionEndHandle.value) == null ? void 0 : _c.position) ?? (fromPosition ? oppositePosition[fromPosition] : null);\n if (!fromPosition || !toPosition) {\n return null;\n }\n const type = connectionLineType.value ?? connectionLineOptions.value.type ?? ConnectionLineType.Bezier;\n let dAttr = \"\";\n const pathParams = {\n sourceX: fromX,\n sourceY: fromY,\n sourcePosition: fromPosition,\n targetX: toXY.value.x,\n targetY: toXY.value.y,\n targetPosition: toPosition\n };\n if (type === ConnectionLineType.Bezier) {\n [dAttr] = getBezierPath(pathParams);\n } else if (type === ConnectionLineType.Step) {\n [dAttr] = getSmoothStepPath({\n ...pathParams,\n borderRadius: 0\n });\n } else if (type === ConnectionLineType.SmoothStep) {\n [dAttr] = getSmoothStepPath(pathParams);\n } else if (type === ConnectionLineType.SimpleBezier) {\n [dAttr] = getSimpleBezierPath(pathParams);\n } else {\n dAttr = `M${fromX},${fromY} ${toXY.value.x},${toXY.value.y}`;\n }\n return h(\n \"svg\",\n { class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\" },\n h(\n \"g\",\n { class: \"vue-flow__connection\" },\n connectionLineComponent ? h(connectionLineComponent, {\n sourceX: fromX,\n sourceY: fromY,\n sourcePosition: fromPosition,\n targetX: toXY.value.x,\n targetY: toXY.value.y,\n targetPosition: toPosition,\n sourceNode: fromNode.value,\n sourceHandle: fromHandle,\n targetNode: toNode.value,\n targetHandle: toHandle,\n markerEnd: markerEnd.value,\n markerStart: markerStart.value,\n connectionStatus: connectionStatus.value\n }) : h(\"path\", {\n \"d\": dAttr,\n \"class\": [connectionLineOptions.value.class, connectionStatus, \"vue-flow__connection-path\"],\n \"style\": {\n ...connectionLineStyle.value,\n ...connectionLineOptions.value.style\n },\n \"marker-end\": markerEnd.value,\n \"marker-start\": markerStart.value\n })\n )\n );\n };\n }\n});\nconst ConnectionLine$1 = ConnectionLine;\nconst _hoisted_1$4 = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"];\nconst __default__$6 = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$6 = /* @__PURE__ */ defineComponent({\n ...__default__$6,\n props: {\n id: {},\n type: {},\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"marker\", {\n id: _ctx.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${_ctx.width}`,\n markerHeight: `${_ctx.height}`,\n markerUnits: _ctx.markerUnits,\n orient: _ctx.orient\n }, [\n _ctx.type === unref(MarkerType).ArrowClosed ? (openBlock(), createElementBlock(\"polyline\", {\n key: 0,\n style: normalizeStyle({\n stroke: _ctx.color,\n fill: _ctx.color,\n strokeWidth: _ctx.strokeWidth\n }),\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 4)) : createCommentVNode(\"\", true),\n _ctx.type === unref(MarkerType).Arrow ? (openBlock(), createElementBlock(\"polyline\", {\n key: 1,\n style: normalizeStyle({\n stroke: _ctx.color,\n strokeWidth: _ctx.strokeWidth\n }),\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 4)) : createCommentVNode(\"\", true)\n ], 8, _hoisted_1$4);\n };\n }\n});\nconst _hoisted_1$3 = {\n class: \"vue-flow__marker vue-flow__container\",\n \"aria-hidden\": \"true\"\n};\nconst __default__$5 = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$5 = /* @__PURE__ */ defineComponent({\n ...__default__$5,\n setup(__props) {\n const { id: vueFlowId, edges, connectionLineOptions, defaultMarkerColor: defaultColor } = useVueFlow();\n const markers = computed(() => {\n const ids = /* @__PURE__ */ new Set();\n const markers2 = [];\n const createMarkers = (marker) => {\n if (marker) {\n const markerId = getMarkerId(marker, vueFlowId);\n if (!ids.has(markerId)) {\n if (typeof marker === \"object\") {\n markers2.push({ ...marker, id: markerId, color: marker.color || defaultColor.value });\n } else {\n markers2.push({ id: markerId, color: defaultColor.value, type: marker });\n }\n ids.add(markerId);\n }\n }\n };\n for (const marker of [connectionLineOptions.value.markerEnd, connectionLineOptions.value.markerStart]) {\n createMarkers(marker);\n }\n for (const edge of edges.value) {\n for (const marker of [edge.markerStart, edge.markerEnd]) {\n createMarkers(marker);\n }\n }\n return markers2.sort((a, b) => a.id.localeCompare(b.id));\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1$3, [\n createElementVNode(\"defs\", null, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(markers.value, (marker) => {\n return openBlock(), createBlock(_sfc_main$6, {\n id: marker.id,\n key: marker.id,\n type: marker.type,\n color: marker.color,\n width: marker.width,\n height: marker.height,\n markerUnits: marker.markerUnits,\n \"stroke-width\": marker.strokeWidth,\n orient: marker.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]);\n }), 128))\n ])\n ]);\n };\n }\n});\nconst __default__$4 = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$4 = /* @__PURE__ */ defineComponent({\n ...__default__$4,\n setup(__props) {\n const { findNode, getEdges, elevateEdgesOnSelect } = useVueFlow();\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createVNode(_sfc_main$5),\n (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getEdges), (edge) => {\n return openBlock(), createElementBlock(\"svg\", {\n key: edge.id,\n class: \"vue-flow__edges vue-flow__container\",\n style: normalizeStyle({ zIndex: unref(getEdgeZIndex)(edge, unref(findNode), unref(elevateEdgesOnSelect)) })\n }, [\n createVNode(unref(EdgeWrapper$1), {\n id: edge.id\n }, null, 8, [\"id\"])\n ], 4);\n }), 128)),\n createVNode(unref(ConnectionLine$1))\n ], 64);\n };\n }\n});\nconst NodeWrapper = defineComponent({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"id\", \"resizeObserver\"],\n setup(props) {\n const {\n id: vueFlowId,\n noPanClassName,\n selectNodesOnDrag,\n nodesSelectionActive,\n multiSelectionActive,\n emits,\n removeSelectedNodes,\n addSelectedNodes,\n updateNodeDimensions,\n onUpdateNodeInternals,\n getNodeTypes,\n nodeExtent,\n elevateNodesOnSelect,\n disableKeyboardA11y,\n ariaLiveMessage,\n snapToGrid,\n snapGrid,\n nodeDragThreshold,\n nodesDraggable,\n elementsSelectable,\n nodesConnectable,\n nodesFocusable,\n hooks\n } = useVueFlow();\n const nodeElement = ref(null);\n provide(NodeRef, nodeElement);\n provide(NodeId, props.id);\n const slots = inject(Slots);\n const instance = getCurrentInstance();\n const updateNodePositions = useUpdateNodePositions();\n const { node, parentNode } = useNode(props.id);\n const { emit, on } = useNodeHooks(node, emits);\n const isDraggable = toRef(() => typeof node.draggable === \"undefined\" ? nodesDraggable.value : node.draggable);\n const isSelectable = toRef(() => typeof node.selectable === \"undefined\" ? elementsSelectable.value : node.selectable);\n const isConnectable = toRef(() => typeof node.connectable === \"undefined\" ? nodesConnectable.value : node.connectable);\n const isFocusable = toRef(() => typeof node.focusable === \"undefined\" ? nodesFocusable.value : node.focusable);\n const hasPointerEvents = computed(\n () => isSelectable.value || isDraggable.value || hooks.value.nodeClick.hasListeners() || hooks.value.nodeDoubleClick.hasListeners() || hooks.value.nodeMouseEnter.hasListeners() || hooks.value.nodeMouseMove.hasListeners() || hooks.value.nodeMouseLeave.hasListeners()\n );\n const isInit = toRef(() => !!node.dimensions.width && !!node.dimensions.height);\n const nodeCmp = computed(() => {\n const name = node.type || \"default\";\n const slot = slots == null ? void 0 : slots[`node-${name}`];\n if (slot) {\n return slot;\n }\n let nodeType = node.template || getNodeTypes.value[name];\n if (typeof nodeType === \"string\") {\n if (instance) {\n const components = Object.keys(instance.appContext.components);\n if (components && components.includes(name)) {\n nodeType = resolveComponent(name, false);\n }\n }\n }\n if (nodeType && typeof nodeType !== \"string\") {\n return nodeType;\n }\n emits.error(new VueFlowError(ErrorCode.NODE_TYPE_MISSING, nodeType));\n return false;\n });\n const dragging = useDrag({\n id: props.id,\n el: nodeElement,\n disabled: () => !isDraggable.value,\n selectable: isSelectable,\n dragHandle: () => node.dragHandle,\n onStart(event) {\n emit.dragStart(event);\n },\n onDrag(event) {\n emit.drag(event);\n },\n onStop(event) {\n emit.dragStop(event);\n },\n onClick(event) {\n onSelectNode(event);\n }\n });\n const getClass = computed(() => node.class instanceof Function ? node.class(node) : node.class);\n const getStyle = computed(() => {\n const styles = (node.style instanceof Function ? node.style(node) : node.style) || {};\n const width = node.width instanceof Function ? node.width(node) : node.width;\n const height = node.height instanceof Function ? node.height(node) : node.height;\n if (!styles.width && width) {\n styles.width = typeof width === \"string\" ? width : `${width}px`;\n }\n if (!styles.height && height) {\n styles.height = typeof height === \"string\" ? height : `${height}px`;\n }\n return styles;\n });\n const zIndex = toRef(() => Number(node.zIndex ?? getStyle.value.zIndex ?? 0));\n onUpdateNodeInternals((updateIds) => {\n if (updateIds.includes(props.id) || !updateIds.length) {\n updateInternals();\n }\n });\n onMounted(() => {\n watch(\n () => node.hidden,\n (isHidden = false, _, onCleanup) => {\n if (!isHidden && nodeElement.value) {\n props.resizeObserver.observe(nodeElement.value);\n onCleanup(() => {\n if (nodeElement.value) {\n props.resizeObserver.unobserve(nodeElement.value);\n }\n });\n }\n },\n { immediate: true, flush: \"post\" }\n );\n });\n watch([() => node.type, () => node.sourcePosition, () => node.targetPosition], () => {\n nextTick(() => {\n updateNodeDimensions([{ id: props.id, nodeElement: nodeElement.value, forceUpdate: true }]);\n });\n });\n watch(\n [\n () => node.position.x,\n () => node.position.y,\n () => {\n var _a;\n return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.x;\n },\n () => {\n var _a;\n return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.y;\n },\n () => {\n var _a;\n return (_a = parentNode.value) == null ? void 0 : _a.computedPosition.z;\n },\n zIndex,\n () => node.selected,\n () => node.dimensions.height,\n () => node.dimensions.width,\n () => {\n var _a;\n return (_a = parentNode.value) == null ? void 0 : _a.dimensions.height;\n },\n () => {\n var _a;\n return (_a = parentNode.value) == null ? void 0 : _a.dimensions.width;\n }\n ],\n ([newX, newY, parentX, parentY, parentZ, nodeZIndex]) => {\n const xyzPos = {\n x: newX,\n y: newY,\n z: nodeZIndex + (elevateNodesOnSelect.value ? node.selected ? 1e3 : 0 : 0)\n };\n if (typeof parentX !== \"undefined\" && typeof parentY !== \"undefined\") {\n node.computedPosition = getXYZPos({ x: parentX, y: parentY, z: parentZ }, xyzPos);\n } else {\n node.computedPosition = xyzPos;\n }\n },\n { flush: \"post\", immediate: true }\n );\n watch([() => node.extent, nodeExtent], ([nodeExtent2, globalExtent], [oldNodeExtent, oldGlobalExtent]) => {\n if (nodeExtent2 !== oldNodeExtent || globalExtent !== oldGlobalExtent) {\n clampPosition2();\n }\n });\n if (node.extent === \"parent\" || typeof node.extent === \"object\" && \"range\" in node.extent && node.extent.range === \"parent\") {\n until(() => isInit).toBe(true).then(clampPosition2);\n } else {\n clampPosition2();\n }\n return () => {\n if (node.hidden) {\n return null;\n }\n return h(\n \"div\",\n {\n \"ref\": nodeElement,\n \"data-id\": node.id,\n \"class\": [\n \"vue-flow__node\",\n `vue-flow__node-${nodeCmp.value === false ? \"default\" : node.type || \"default\"}`,\n {\n [noPanClassName.value]: isDraggable.value,\n dragging: dragging == null ? void 0 : dragging.value,\n draggable: isDraggable.value,\n selected: node.selected,\n selectable: isSelectable.value,\n parent: node.isParent\n },\n getClass.value\n ],\n \"style\": {\n visibility: isInit.value ? \"visible\" : \"hidden\",\n zIndex: node.computedPosition.z ?? zIndex.value,\n transform: `translate(${node.computedPosition.x}px,${node.computedPosition.y}px)`,\n pointerEvents: hasPointerEvents.value ? \"all\" : \"none\",\n ...getStyle.value\n },\n \"tabIndex\": isFocusable.value ? 0 : void 0,\n \"role\": isFocusable.value ? \"group\" : void 0,\n \"aria-describedby\": disableKeyboardA11y.value ? void 0 : `${ARIA_NODE_DESC_KEY}-${vueFlowId}`,\n \"aria-label\": node.ariaLabel,\n \"aria-roledescription\": \"node\",\n ...node.domAttributes,\n \"onMouseenter\": onMouseEnter,\n \"onMousemove\": onMouseMove,\n \"onMouseleave\": onMouseLeave,\n \"onContextmenu\": onContextMenu,\n \"onClick\": onSelectNode,\n \"onDblclick\": onDoubleClick,\n \"onKeydown\": onKeyDown\n },\n [\n h(nodeCmp.value === false ? getNodeTypes.value.default : nodeCmp.value, {\n id: node.id,\n type: node.type,\n data: node.data,\n events: { ...node.events, ...on },\n selected: node.selected,\n resizing: node.resizing,\n dragging: dragging.value,\n connectable: isConnectable.value,\n position: node.computedPosition,\n dimensions: node.dimensions,\n isValidTargetPos: node.isValidTargetPos,\n isValidSourcePos: node.isValidSourcePos,\n parent: node.parentNode,\n parentNodeId: node.parentNode,\n zIndex: node.computedPosition.z ?? zIndex.value,\n targetPosition: node.targetPosition,\n sourcePosition: node.sourcePosition,\n label: node.label,\n dragHandle: node.dragHandle,\n onUpdateNodeInternals: updateInternals\n })\n ]\n );\n };\n function clampPosition2() {\n const nextPosition = node.computedPosition;\n const { computedPosition, position } = calcNextPosition(\n node,\n snapToGrid.value ? snapPosition(nextPosition, snapGrid.value) : nextPosition,\n emits.error,\n nodeExtent.value,\n parentNode.value\n );\n if (node.computedPosition.x !== computedPosition.x || node.computedPosition.y !== computedPosition.y) {\n node.computedPosition = { ...node.computedPosition, ...computedPosition };\n }\n if (node.position.x !== position.x || node.position.y !== position.y) {\n node.position = position;\n }\n }\n function updateInternals() {\n if (nodeElement.value) {\n updateNodeDimensions([{ id: props.id, nodeElement: nodeElement.value, forceUpdate: true }]);\n }\n }\n function onMouseEnter(event) {\n if (!(dragging == null ? void 0 : dragging.value)) {\n emit.mouseEnter({ event, node });\n }\n }\n function onMouseMove(event) {\n if (!(dragging == null ? void 0 : dragging.value)) {\n emit.mouseMove({ event, node });\n }\n }\n function onMouseLeave(event) {\n if (!(dragging == null ? void 0 : dragging.value)) {\n emit.mouseLeave({ event, node });\n }\n }\n function onContextMenu(event) {\n return emit.contextMenu({ event, node });\n }\n function onDoubleClick(event) {\n return emit.doubleClick({ event, node });\n }\n function onSelectNode(event) {\n if (isSelectable.value && (!selectNodesOnDrag.value || !isDraggable.value || nodeDragThreshold.value > 0)) {\n handleNodeClick(\n node,\n multiSelectionActive.value,\n addSelectedNodes,\n removeSelectedNodes,\n nodesSelectionActive,\n false,\n nodeElement.value\n );\n }\n emit.click({ event, node });\n }\n function onKeyDown(event) {\n if (isInputDOMNode(event) || disableKeyboardA11y.value) {\n return;\n }\n if (elementSelectionKeys.includes(event.key) && isSelectable.value) {\n const unselect = event.key === \"Escape\";\n handleNodeClick(\n node,\n multiSelectionActive.value,\n addSelectedNodes,\n removeSelectedNodes,\n nodesSelectionActive,\n unselect,\n nodeElement.value\n );\n } else if (isDraggable.value && node.selected && arrowKeyDiffs[event.key]) {\n event.preventDefault();\n ariaLiveMessage.value = `Moved selected node ${event.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~node.position.x}, y: ${~~node.position.y}`;\n updateNodePositions(\n {\n x: arrowKeyDiffs[event.key].x,\n y: arrowKeyDiffs[event.key].y\n },\n event.shiftKey\n );\n }\n }\n }\n});\nconst NodeWrapper$1 = NodeWrapper;\nconst _hoisted_1$2 = {\n height: \"0\",\n width: \"0\"\n};\nconst __default__$3 = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$3 = /* @__PURE__ */ defineComponent({\n ...__default__$3,\n setup(__props) {\n const { viewportRef } = useVueFlow();\n const teleportTarget = toRef(() => {\n var _a;\n return (_a = viewportRef.value) == null ? void 0 : _a.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"svg\", null, [\n (openBlock(), createElementBlock(\"foreignObject\", _hoisted_1$2, [\n (openBlock(), createBlock(Teleport, {\n to: teleportTarget.value,\n disabled: !teleportTarget.value\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]);\n };\n }\n});\nfunction useNodesInitialized(options = { includeHiddenNodes: false }) {\n const { nodes } = useVueFlow();\n return computed(() => {\n if (nodes.value.length === 0) {\n return false;\n }\n for (const node of nodes.value) {\n if (options.includeHiddenNodes || !node.hidden) {\n if ((node == null ? void 0 : node.handleBounds) === void 0 || node.dimensions.width === 0 || node.dimensions.height === 0) {\n return false;\n }\n }\n }\n return true;\n });\n}\nconst _hoisted_1$1 = { class: \"vue-flow__nodes vue-flow__container\" };\nconst __default__$2 = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$2 = /* @__PURE__ */ defineComponent({\n ...__default__$2,\n setup(__props) {\n const { getNodes, updateNodeDimensions, emits } = useVueFlow();\n const nodesInitialized = useNodesInitialized();\n const resizeObserver = ref();\n watch(\n nodesInitialized,\n (isInit) => {\n if (isInit) {\n nextTick(() => {\n emits.nodesInitialized(getNodes.value);\n });\n }\n },\n { immediate: true }\n );\n onMounted(() => {\n resizeObserver.value = new ResizeObserver((entries) => {\n const updates = entries.map((entry) => {\n const id2 = entry.target.getAttribute(\"data-id\");\n return {\n id: id2,\n nodeElement: entry.target,\n forceUpdate: true\n };\n });\n nextTick(() => updateNodeDimensions(updates));\n });\n });\n onBeforeUnmount(() => {\n var _a;\n return (_a = resizeObserver.value) == null ? void 0 : _a.disconnect();\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", _hoisted_1$1, [\n resizeObserver.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(getNodes), (node, __, ___, _cached) => {\n const _memo = [node.id];\n if (_cached && _cached.key === node.id && isMemoSame(_cached, _memo))\n return _cached;\n const _item = (openBlock(), createBlock(unref(NodeWrapper$1), {\n id: node.id,\n key: node.id,\n \"resize-observer\": resizeObserver.value\n }, null, 8, [\"id\", \"resize-observer\"]));\n _item.memo = _memo;\n return _item;\n }, _cache, 0), 128)) : createCommentVNode(\"\", true)\n ]);\n };\n }\n});\nfunction useStylesLoadedWarning() {\n const { emits } = useVueFlow();\n onMounted(() => {\n if (isDev()) {\n const pane = document.querySelector(\".vue-flow__pane\");\n if (pane && !(window.getComputedStyle(pane).zIndex === \"1\")) {\n emits.error(new VueFlowError(ErrorCode.MISSING_STYLES));\n }\n }\n });\n}\nconst _hoisted_1 = /* @__PURE__ */ createElementVNode(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1);\nconst __default__$1 = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main$1 = /* @__PURE__ */ defineComponent({\n ...__default__$1,\n props: {\n id: {},\n modelValue: {},\n nodes: {},\n edges: {},\n edgeTypes: {},\n nodeTypes: {},\n connectionMode: {},\n connectionLineType: {},\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: {},\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: { default: void 0 },\n selectionKeyCode: { type: [Boolean, null], default: void 0 },\n multiSelectionKeyCode: { default: void 0 },\n zoomActivationKeyCode: { default: void 0 },\n panActivationKeyCode: { default: void 0 },\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: {},\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n nodeDragThreshold: {},\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: {},\n maxZoom: {},\n defaultViewport: {},\n translateExtent: {},\n nodeExtent: {},\n defaultMarkerColor: {},\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: {},\n panOnScrollMode: {},\n paneClickDistance: {},\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: {},\n edgeUpdaterRadius: {},\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: {},\n noWheelClassName: {},\n noPanClassName: {},\n defaultEdgeOptions: {},\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n autoPanSpeed: {}\n },\n 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\"],\n setup(__props, { expose: __expose, emit }) {\n const props = __props;\n const slots = useSlots();\n const modelValue = useVModel(props, \"modelValue\", emit);\n const modelNodes = useVModel(props, \"nodes\", emit);\n const modelEdges = useVModel(props, \"edges\", emit);\n const instance = useVueFlow(props);\n const dispose = useWatchProps({ modelValue, nodes: modelNodes, edges: modelEdges }, props, instance);\n useHooks(emit, instance.hooks);\n useOnInitHandler();\n useStylesLoadedWarning();\n provide(Slots, slots);\n onUnmounted(() => {\n dispose();\n });\n __expose(instance);\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref: unref(instance).vueFlowRef,\n class: \"vue-flow\"\n }, [\n createVNode(_sfc_main$8, null, {\n default: withCtx(() => [\n createVNode(_sfc_main$4),\n _hoisted_1,\n createVNode(_sfc_main$2),\n renderSlot(_ctx.$slots, \"zoom-pane\")\n ]),\n _: 3\n }),\n renderSlot(_ctx.$slots, \"default\"),\n createVNode(_sfc_main$7)\n ], 512);\n };\n }\n});\nconst __default__ = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...__default__,\n props: {\n position: {}\n },\n setup(__props) {\n const props = __props;\n const { userSelectionActive } = useVueFlow();\n const positionClasses = computed(() => `${props.position}`.split(\"-\"));\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\"vue-flow__panel\", positionClasses.value]),\n style: normalizeStyle({ pointerEvents: unref(userSelectionActive) ? \"none\" : \"all\" })\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 6);\n };\n }\n});\nfunction useConnection() {\n const {\n connectionStartHandle: startHandle,\n connectionEndHandle: endHandle,\n connectionStatus: status,\n connectionPosition: position\n } = useVueFlow();\n return {\n startHandle,\n endHandle,\n status,\n position\n };\n}\nfunction useHandleConnections(params) {\n const { type, id: id2, nodeId, onConnect, onDisconnect } = params;\n const { connectionLookup } = useVueFlow();\n const _nodeId = useNodeId();\n const currentNodeId = toRef(() => toValue$1(nodeId) ?? _nodeId);\n const handleType = toRef(() => toValue$1(type));\n const handleId = toRef(() => toValue$1(id2) ?? null);\n const prevConnections = ref(null);\n const connections = ref();\n watch(\n () => connectionLookup.value.get(`${currentNodeId.value}-${handleType.value}-${handleId.value}`),\n (nextConnections) => {\n if (areConnectionMapsEqual(connections.value, nextConnections)) {\n return;\n }\n connections.value = nextConnections;\n },\n { immediate: true }\n );\n watch(\n [connections, () => typeof onConnect !== \"undefined\", () => typeof onDisconnect !== \"undefined\"],\n ([currentConnections = /* @__PURE__ */ new Map()]) => {\n if (prevConnections.value && prevConnections.value !== currentConnections) {\n handleConnectionChange(prevConnections.value, currentConnections, onDisconnect);\n handleConnectionChange(currentConnections, prevConnections.value, onConnect);\n }\n prevConnections.value = currentConnections;\n },\n { immediate: true }\n );\n return computed(() => {\n if (!connections.value) {\n return [];\n }\n return Array.from(connections.value.values());\n });\n}\nfunction useNodeConnections(params = {}) {\n const { handleType, handleId, nodeId, onConnect, onDisconnect } = params;\n const { connectionLookup } = useVueFlow();\n const _nodeId = useNodeId();\n const prevConnections = ref(null);\n const connections = ref();\n const lookupKey = computed(() => {\n const currNodeId = toValue$1(nodeId) ?? _nodeId;\n const currentHandleType = toValue$1(handleType);\n const currHandleId = toValue$1(handleId);\n let handleSuffix = \"\";\n if (currentHandleType) {\n handleSuffix = currHandleId ? `-${currentHandleType}-${currHandleId}` : `-${currentHandleType}`;\n }\n return `${currNodeId}${handleSuffix}`;\n });\n watch(\n () => connectionLookup.value.get(lookupKey.value),\n (nextConnections) => {\n if (areConnectionMapsEqual(connections.value, nextConnections)) {\n return;\n }\n connections.value = nextConnections;\n },\n { immediate: true }\n );\n watch(\n [connections, () => typeof onConnect !== \"undefined\", () => typeof onDisconnect !== \"undefined\"],\n ([currentConnections = /* @__PURE__ */ new Map()]) => {\n if (prevConnections.value && prevConnections.value !== currentConnections) {\n handleConnectionChange(prevConnections.value, currentConnections, onDisconnect);\n handleConnectionChange(currentConnections, prevConnections.value, onConnect);\n }\n prevConnections.value = currentConnections;\n },\n { immediate: true }\n );\n return computed(() => {\n if (!connections.value) {\n return [];\n }\n return Array.from(connections.value.values());\n });\n}\nfunction useNodesData(_nodeIds) {\n const { findNode } = useVueFlow();\n return computed({\n get() {\n const nodeIds = toValue$1(_nodeIds);\n if (!Array.isArray(nodeIds)) {\n const node = findNode(nodeIds);\n if (node) {\n return {\n id: node.id,\n type: node.type,\n data: node.data\n };\n }\n return null;\n }\n const data = [];\n for (const nodeId of nodeIds) {\n const node = findNode(nodeId);\n if (node) {\n data.push({\n id: node.id,\n type: node.type,\n data: node.data\n });\n }\n }\n return data;\n },\n set() {\n warn(\"You are trying to set node data via useNodesData. This is not supported.\");\n }\n });\n}\nfunction useEdgesData(_edgeIds) {\n const { findEdge } = useVueFlow();\n return computed({\n get() {\n const edgeIds = toValue$1(_edgeIds);\n if (!Array.isArray(edgeIds)) {\n const edge = findEdge(edgeIds);\n if (edge) {\n return {\n id: edge.id,\n type: edge.type,\n data: edge.data ?? null\n };\n }\n return null;\n }\n const data = [];\n for (const edgeId of edgeIds) {\n const edge = findEdge(edgeId);\n if (edge) {\n data.push({\n id: edge.id,\n type: edge.type,\n data: edge.data ?? null\n });\n }\n }\n return data;\n },\n set() {\n warn(\"You are trying to set edge data via useEdgesData. This is not supported.\");\n }\n });\n}\nexport {\n _sfc_main$d as BaseEdge,\n BezierEdge$1 as BezierEdge,\n ConnectionLineType,\n ConnectionMode,\n _sfc_main$3 as EdgeLabelRenderer,\n _sfc_main$e as EdgeText,\n ErrorCode,\n _sfc_main$f as Handle,\n MarkerType,\n NodeId as NodeIdInjection,\n PanOnScrollMode,\n _sfc_main as Panel,\n PanelPosition,\n Position,\n SelectionMode,\n SimpleBezierEdge$1 as SimpleBezierEdge,\n SmoothStepEdge$1 as SmoothStepEdge,\n StepEdge$1 as StepEdge,\n StraightEdge$1 as StraightEdge,\n _sfc_main$1 as VueFlow,\n VueFlowError,\n VueFlow as VueFlowInjection,\n addEdge,\n applyChanges,\n applyEdgeChanges,\n applyNodeChanges,\n clamp,\n connectionExists,\n defaultEdgeTypes,\n defaultNodeTypes,\n getBezierEdgeCenter,\n getBezierPath,\n getBoundsofRects,\n getConnectedEdges,\n getIncomers,\n getMarkerId,\n getNodesInside,\n getOutgoers,\n getRectOfNodes,\n getSimpleBezierPath,\n getSimpleEdgeCenter,\n getSmoothStepPath,\n getStraightPath,\n getTransformForBounds,\n rendererPointToPoint as graphPosToZoomedPos,\n isEdge,\n isErrorOfType,\n isGraphEdge,\n isGraphNode,\n isMacOs,\n isNode,\n pointToRendererPoint,\n rendererPointToPoint,\n updateEdge,\n useConnection,\n useEdge,\n useEdgesData,\n useGetPointerPosition,\n useHandle,\n useHandleConnections,\n useKeyPress,\n useNode,\n useNodeConnections,\n useNodeId,\n useNodesData,\n useNodesInitialized,\n useVueFlow,\n useZo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/@types/web-bluetooth/LICENSE new file mode 100644 index 00000000..9e841e7a --- /dev/null +++ b/node_modules/@types/web-bluetooth/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/web-bluetooth/README.md b/node_modules/@types/web-bluetooth/README.md new file mode 100644 index 00000000..dc3ec125 --- /dev/null +++ b/node_modules/@types/web-bluetooth/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/web-bluetooth` + +# Summary +This package contains type definitions for web-bluetooth (https://webbluetoothcg.github.io/web-bluetooth/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: none + +# Credits +These definitions were written by [Uri Shaked](https://github.com/urish), [Xavier Lozinguez](https://github.com/xlozinguez), [Rob Moran](https://github.com/thegecko), and [David Bjerremose](https://github.com/DaBs). diff --git a/node_modules/@types/web-bluetooth/index.d.ts b/node_modules/@types/web-bluetooth/index.d.ts new file mode 100644 index 00000000..3d1c05b7 --- /dev/null +++ b/node_modules/@types/web-bluetooth/index.d.ts @@ -0,0 +1,193 @@ +type BluetoothServiceUUID = number | string; +type BluetoothCharacteristicUUID = number | string; +type BluetoothDescriptorUUID = number | string; + +type BluetoothManufacturerData = Map; +type BluetoothServiceData = Map; + +interface BluetoothDataFilter { + readonly dataPrefix?: BufferSource | undefined; + readonly mask?: BufferSource | undefined; +} + +interface BluetoothManufacturerDataFilter extends BluetoothDataFilter { + companyIdentifier: number; +} + +interface BluetoothServiceDataFilter extends BluetoothDataFilter { + service: BluetoothServiceUUID; +} + +interface BluetoothLEScanFilter { + readonly name?: string | undefined; + readonly namePrefix?: string | undefined; + readonly services?: BluetoothServiceUUID[] | undefined; + readonly manufacturerData?: BluetoothManufacturerDataFilter[] | undefined; + readonly serviceData?: BluetoothServiceDataFilter[] | undefined; +} + +interface BluetoothLEScanOptions { + readonly filters?: BluetoothLEScanFilter[] | undefined; + readonly keepRepeatedDevices?: boolean | undefined; + readonly acceptAllAdvertisements?: boolean | undefined; +} + +interface BluetoothLEScan extends BluetoothLEScanOptions { + active: boolean; + stop: () => void; +} + +type RequestDeviceOptions = { + filters: BluetoothLEScanFilter[]; + optionalServices?: BluetoothServiceUUID[] | undefined; + optionalManufacturerData?: number[] | undefined; +} | { + acceptAllDevices: boolean; + optionalServices?: BluetoothServiceUUID[] | undefined; + optionalManufacturerData?: number[] | undefined; +}; + +interface BluetoothAdvertisingEvent extends Event { + readonly device: BluetoothDevice; + readonly uuids: BluetoothServiceUUID[]; + readonly manufacturerData: BluetoothManufacturerData; + readonly serviceData: BluetoothServiceData; + readonly name?: string | undefined; + readonly appearance?: number | undefined; + readonly rssi?: number | undefined; + readonly txPower?: number | undefined; +} + +interface BluetoothRemoteGATTDescriptor { + readonly characteristic: BluetoothRemoteGATTCharacteristic; + readonly uuid: string; + readonly value?: DataView | undefined; + readValue(): Promise; + writeValue(value: BufferSource): Promise; +} + +interface BluetoothCharacteristicProperties { + readonly broadcast: boolean; + readonly read: boolean; + readonly writeWithoutResponse: boolean; + readonly write: boolean; + readonly notify: boolean; + readonly indicate: boolean; + readonly authenticatedSignedWrites: boolean; + readonly reliableWrite: boolean; + readonly writableAuxiliaries: boolean; +} + +interface CharacteristicEventHandlers { + oncharacteristicvaluechanged: (this: this, ev: Event) => any; +} + +interface BluetoothRemoteGATTCharacteristic extends EventTarget, CharacteristicEventHandlers { + readonly service: BluetoothRemoteGATTService; + readonly uuid: string; + readonly properties: BluetoothCharacteristicProperties; + readonly value?: DataView | undefined; + getDescriptor(descriptor: BluetoothDescriptorUUID): Promise; + getDescriptors(descriptor?: BluetoothDescriptorUUID): Promise; + readValue(): Promise; + writeValue(value: BufferSource): Promise; + writeValueWithResponse(value: BufferSource): Promise; + writeValueWithoutResponse(value: BufferSource): Promise; + startNotifications(): Promise; + stopNotifications(): Promise; + addEventListener( + type: "characteristicvaluechanged", + listener: (this: this, ev: Event) => any, + useCapture?: boolean, + ): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +interface ServiceEventHandlers { + onserviceadded: (this: this, ev: Event) => any; + onservicechanged: (this: this, ev: Event) => any; + onserviceremoved: (this: this, ev: Event) => any; +} + +interface BluetoothRemoteGATTService extends EventTarget, CharacteristicEventHandlers, ServiceEventHandlers { + readonly device: BluetoothDevice; + readonly uuid: string; + readonly isPrimary: boolean; + getCharacteristic(characteristic: BluetoothCharacteristicUUID): Promise; + getCharacteristics(characteristic?: BluetoothCharacteristicUUID): Promise; + getIncludedService(service: BluetoothServiceUUID): Promise; + getIncludedServices(service?: BluetoothServiceUUID): Promise; + addEventListener(type: "serviceadded", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "servicechanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "serviceremoved", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +interface BluetoothRemoteGATTServer { + readonly device: BluetoothDevice; + readonly connected: boolean; + connect(): Promise; + disconnect(): void; + getPrimaryService(service: BluetoothServiceUUID): Promise; + getPrimaryServices(service?: BluetoothServiceUUID): Promise; +} + +interface BluetoothDeviceEventHandlers { + onadvertisementreceived: (this: this, ev: BluetoothAdvertisingEvent) => any; + ongattserverdisconnected: (this: this, ev: Event) => any; +} + +interface WatchAdvertisementsOptions { + signal?: AbortSignal; +} + +interface BluetoothDevice + extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers +{ + readonly id: string; + readonly name?: string | undefined; + readonly gatt?: BluetoothRemoteGATTServer | undefined; + forget(): Promise; + watchAdvertisements(options?: WatchAdvertisementsOptions): Promise; + readonly watchingAdvertisements: boolean; + addEventListener( + type: "gattserverdisconnected", + listener: (this: this, ev: Event) => any, + useCapture?: boolean, + ): void; + addEventListener( + type: "advertisementreceived", + listener: (this: this, ev: BluetoothAdvertisingEvent) => any, + useCapture?: boolean, + ): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +interface Bluetooth + extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers +{ + getDevices(): Promise; + getAvailability(): Promise; + onavailabilitychanged: (this: this, ev: Event) => any; + readonly referringDevice?: BluetoothDevice | undefined; + requestDevice(options?: RequestDeviceOptions): Promise; + requestLEScan(options?: BluetoothLEScanOptions): Promise; + addEventListener(type: "availabilitychanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; + addEventListener( + type: "advertisementreceived", + listener: (this: this, ev: BluetoothAdvertisingEvent) => any, + useCapture?: boolean, + ): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare namespace BluetoothUUID { + function getService(name: string | number): string; + function getCharacteristic(name: string | number): string; + function getDescriptor(name: string | number): string; + function canonicalUUID(alias: string | number): string; +} + +interface Navigator { + bluetooth: Bluetooth; +} diff --git a/node_modules/@types/web-bluetooth/package.json b/node_modules/@types/web-bluetooth/package.json new file mode 100644 index 00000000..3242a373 --- /dev/null +++ b/node_modules/@types/web-bluetooth/package.json @@ -0,0 +1,40 @@ +{ + "name": "@types/web-bluetooth", + "version": "0.0.20", + "description": "TypeScript definitions for web-bluetooth", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth", + "license": "MIT", + "contributors": [ + { + "name": "Uri Shaked", + "githubUsername": "urish", + "url": "https://github.com/urish" + }, + { + "name": "Xavier Lozinguez", + "githubUsername": "xlozinguez", + "url": "https://github.com/xlozinguez" + }, + { + "name": "Rob Moran", + "githubUsername": "thegecko", + "url": "https://github.com/thegecko" + }, + { + "name": "David Bjerremose", + "githubUsername": "DaBs", + "url": "https://github.com/DaBs" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/web-bluetooth" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "6a130e3db86a1d977ddff03e84f9f150c142902343c9fa383d3e8d4f19180d98", + "typeScriptVersion": "4.5" +} \ No newline at end of file diff --git a/node_modules/@vue-flow/background/LICENSE b/node_modules/@vue-flow/background/LICENSE new file mode 100644 index 00000000..7db36e12 --- /dev/null +++ b/node_modules/@vue-flow/background/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2019-2024 webkid GmbH +Copyright (c) 2021-2024 Burak Cakmakoglu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@vue-flow/background/README.md b/node_modules/@vue-flow/background/README.md new file mode 100644 index 00000000..177b637c --- /dev/null +++ b/node_modules/@vue-flow/background/README.md @@ -0,0 +1,33 @@ +# Vue Flow: Background Component + +This is a background component for Vue Flow. +It can be used to create a background in your canvas. + +## 🛠 Setup + +```bash +# install +$ yarn add @vue-flow/background + +# or +$ npm i --save @vue-flow/background +``` + +## 🎮 Quickstart + +```vue + + + +``` diff --git a/node_modules/@vue-flow/background/dist/Background.vue.d.ts b/node_modules/@vue-flow/background/dist/Background.vue.d.ts new file mode 100644 index 00000000..594bb29f --- /dev/null +++ b/node_modules/@vue-flow/background/dist/Background.vue.d.ts @@ -0,0 +1,112 @@ +import type { BackgroundVariant } from './types' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + variant: { + type: import('vue').PropType<'lines' | 'dots' | BackgroundVariant> + } + gap: { + type: import('vue').PropType + } + size: { + type: import('vue').PropType + } + lineWidth: { + type: import('vue').PropType + } + patternColor: { + type: import('vue').PropType + } + color: { + type: import('vue').PropType + } + bgColor: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + x: { + type: import('vue').PropType + } + y: { + type: import('vue').PropType + } + offset: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + variant: { + type: import('vue').PropType<'lines' | 'dots' | BackgroundVariant> + } + gap: { + type: import('vue').PropType + } + size: { + type: import('vue').PropType + } + lineWidth: { + type: import('vue').PropType + } + patternColor: { + type: import('vue').PropType + } + color: { + type: import('vue').PropType + } + bgColor: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + x: { + type: import('vue').PropType + } + y: { + type: import('vue').PropType + } + offset: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + 'pattern-container'?(_: { id: string }): any + pattern?(_: {}): any + default?(_: { id: string }): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/background/dist/index.d.ts b/node_modules/@vue-flow/background/dist/index.d.ts new file mode 100644 index 00000000..e7aaa4b7 --- /dev/null +++ b/node_modules/@vue-flow/background/dist/index.d.ts @@ -0,0 +1,2 @@ +export { default as Background } from './Background.vue' +export * from './types' diff --git a/node_modules/@vue-flow/background/dist/patterns.d.ts b/node_modules/@vue-flow/background/dist/patterns.d.ts new file mode 100644 index 00000000..3868df15 --- /dev/null +++ b/node_modules/@vue-flow/background/dist/patterns.d.ts @@ -0,0 +1,20 @@ +import type { FunctionalComponent } from 'vue' +import type { BackgroundVariant } from './types' + +interface LinePatternProps { + dimensions: [number, number] + size?: number + color: string +} +export declare const LinePattern: FunctionalComponent +interface DotPatternProps { + radius: number + color: string +} +export declare const DotPattern: FunctionalComponent +export declare const Patterns: { + lines: FunctionalComponent + dots: FunctionalComponent +} +export declare const DefaultBgColors: Record +export {} diff --git a/node_modules/@vue-flow/background/dist/types.d.ts b/node_modules/@vue-flow/background/dist/types.d.ts new file mode 100644 index 00000000..70ba789a --- /dev/null +++ b/node_modules/@vue-flow/background/dist/types.d.ts @@ -0,0 +1,40 @@ +/** + * @deprecated - will be removed in the next major version. You can use simple string values for `variant` prop instead, i.e. `lines` or `dots` + */ +export declare enum BackgroundVariant { + Lines = 'lines', + Dots = 'dots', +} +export type BackgroundVariantType = Lowercase +export interface BackgroundProps { + id?: string + /** The background pattern variant */ + variant?: BackgroundVariant | BackgroundVariantType + /** Background pattern gap */ + gap?: number | number[] + /** Background pattern size */ + size?: number + lineWidth?: number + /** + * @deprecated - will be removed in the next major version. Use `color` instead + * Background pattern color + */ + patternColor?: string + /** Background pattern color */ + color?: string + /** + * @deprecated - will be removed in the next major version. You can assign a bg color to `` directly instead. + * Background color + */ + bgColor?: string + /** @deprecated Background height */ + height?: number + /** @deprecated Background width */ + width?: number + /** Background x-coordinate (offset x) */ + x?: number + /** Background y-coordinate (offset y) */ + y?: number + /** Background offset */ + offset?: number | [number, number] +} diff --git a/node_modules/@vue-flow/background/dist/vue-flow-background.iife.js b/node_modules/@vue-flow/background/dist/vue-flow-background.iife.js new file mode 100644 index 00000000..3db9ba88 --- /dev/null +++ b/node_modules/@vue-flow/background/dist/vue-flow-background.iife.js @@ -0,0 +1,127 @@ +var VueFlowBackground = function(exports, vue, core) { + "use strict"; + var BackgroundVariant = /* @__PURE__ */ ((BackgroundVariant2) => { + BackgroundVariant2["Lines"] = "lines"; + BackgroundVariant2["Dots"] = "dots"; + return BackgroundVariant2; + })(BackgroundVariant || {}); + const LinePattern = function({ dimensions, size, color }) { + return vue.h("path", { + "stroke": color, + "stroke-width": size, + "d": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` + }); + }; + const DotPattern = function({ radius, color }) { + return vue.h("circle", { cx: radius, cy: radius, r: radius, fill: color }); + }; + ({ + [BackgroundVariant.Lines]: LinePattern, + [BackgroundVariant.Dots]: DotPattern + }); + const DefaultBgColors = { + [BackgroundVariant.Dots]: "#81818a", + [BackgroundVariant.Lines]: "#eee" + }; + const _hoisted_1 = ["id", "x", "y", "width", "height", "patternTransform"]; + const _hoisted_2 = { + key: 2, + height: "100", + width: "100" + }; + const _hoisted_3 = ["fill"]; + const _hoisted_4 = ["x", "y", "fill"]; + const __default__ = { + name: "Background", + compatConfig: { MODE: 3 } + }; + const _sfc_main = /* @__PURE__ */ vue.defineComponent({ + ...__default__, + props: { + id: {}, + variant: { default: () => BackgroundVariant.Dots }, + gap: { default: 20 }, + size: { default: 1 }, + lineWidth: { default: 1 }, + patternColor: {}, + color: {}, + bgColor: {}, + height: { default: 100 }, + width: { default: 100 }, + x: { default: 0 }, + y: { default: 0 }, + offset: { default: 0 } + }, + setup(__props) { + const { id: vueFlowId, viewport } = core.useVueFlow(); + const background = vue.computed(() => { + const zoom = viewport.value.zoom; + const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap]; + const scaledGap = [gapX * zoom || 1, gapY * zoom || 1]; + const scaledSize = __props.size * zoom; + const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset]; + const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2]; + return { + scaledGap, + offset: scaledOffset, + size: scaledSize + }; + }); + const patternId = vue.toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : ""}`); + const patternColor = vue.toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]); + return (_ctx, _cache) => { + return vue.openBlock(), vue.createElementBlock("svg", { + class: "vue-flow__background vue-flow__container", + style: vue.normalizeStyle({ + height: `${_ctx.height > 100 ? 100 : _ctx.height}%`, + width: `${_ctx.width > 100 ? 100 : _ctx.width}%` + }) + }, [ + vue.renderSlot(_ctx.$slots, "pattern-container", { id: patternId.value }, () => [ + vue.createElementVNode("pattern", { + id: patternId.value, + x: vue.unref(viewport).x % background.value.scaledGap[0], + y: vue.unref(viewport).y % background.value.scaledGap[1], + width: background.value.scaledGap[0], + height: background.value.scaledGap[1], + patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`, + patternUnits: "userSpaceOnUse" + }, [ + vue.renderSlot(_ctx.$slots, "pattern", {}, () => [ + _ctx.variant === vue.unref(BackgroundVariant).Lines ? (vue.openBlock(), vue.createBlock(vue.unref(LinePattern), { + key: 0, + size: _ctx.lineWidth, + color: patternColor.value, + dimensions: background.value.scaledGap + }, null, 8, ["size", "color", "dimensions"])) : _ctx.variant === vue.unref(BackgroundVariant).Dots ? (vue.openBlock(), vue.createBlock(vue.unref(DotPattern), { + key: 1, + color: patternColor.value, + radius: background.value.size / 2 + }, null, 8, ["color", "radius"])) : vue.createCommentVNode("", true), + _ctx.bgColor ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2, [ + vue.createElementVNode("rect", { + width: "100%", + height: "100%", + fill: _ctx.bgColor + }, null, 8, _hoisted_3) + ])) : vue.createCommentVNode("", true) + ]) + ], 8, _hoisted_1) + ]), + vue.createElementVNode("rect", { + x: _ctx.x, + y: _ctx.y, + width: "100%", + height: "100%", + fill: `url(#${patternId.value})` + }, null, 8, _hoisted_4), + vue.renderSlot(_ctx.$slots, "default", { id: patternId.value }) + ], 4); + }; + } + }); + exports.Background = _sfc_main; + exports.BackgroundVariant = BackgroundVariant; + Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); + return exports; +}({}, Vue, VueFlowCore); diff --git a/node_modules/@vue-flow/background/dist/vue-flow-background.js b/node_modules/@vue-flow/background/dist/vue-flow-background.js new file mode 100644 index 00000000..f99b0c14 --- /dev/null +++ b/node_modules/@vue-flow/background/dist/vue-flow-background.js @@ -0,0 +1,126 @@ +"use strict"; +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const vue = require("vue"); +const core = require("@vue-flow/core"); +var BackgroundVariant = /* @__PURE__ */ ((BackgroundVariant2) => { + BackgroundVariant2["Lines"] = "lines"; + BackgroundVariant2["Dots"] = "dots"; + return BackgroundVariant2; +})(BackgroundVariant || {}); +const LinePattern = function({ dimensions, size, color }) { + return vue.h("path", { + "stroke": color, + "stroke-width": size, + "d": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` + }); +}; +const DotPattern = function({ radius, color }) { + return vue.h("circle", { cx: radius, cy: radius, r: radius, fill: color }); +}; +({ + [BackgroundVariant.Lines]: LinePattern, + [BackgroundVariant.Dots]: DotPattern +}); +const DefaultBgColors = { + [BackgroundVariant.Dots]: "#81818a", + [BackgroundVariant.Lines]: "#eee" +}; +const _hoisted_1 = ["id", "x", "y", "width", "height", "patternTransform"]; +const _hoisted_2 = { + key: 2, + height: "100", + width: "100" +}; +const _hoisted_3 = ["fill"]; +const _hoisted_4 = ["x", "y", "fill"]; +const __default__ = { + name: "Background", + compatConfig: { MODE: 3 } +}; +const _sfc_main = /* @__PURE__ */ vue.defineComponent({ + ...__default__, + props: { + id: {}, + variant: { default: () => BackgroundVariant.Dots }, + gap: { default: 20 }, + size: { default: 1 }, + lineWidth: { default: 1 }, + patternColor: {}, + color: {}, + bgColor: {}, + height: { default: 100 }, + width: { default: 100 }, + x: { default: 0 }, + y: { default: 0 }, + offset: { default: 0 } + }, + setup(__props) { + const { id: vueFlowId, viewport } = core.useVueFlow(); + const background = vue.computed(() => { + const zoom = viewport.value.zoom; + const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap]; + const scaledGap = [gapX * zoom || 1, gapY * zoom || 1]; + const scaledSize = __props.size * zoom; + const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset]; + const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2]; + return { + scaledGap, + offset: scaledOffset, + size: scaledSize + }; + }); + const patternId = vue.toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : ""}`); + const patternColor = vue.toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]); + return (_ctx, _cache) => { + return vue.openBlock(), vue.createElementBlock("svg", { + class: "vue-flow__background vue-flow__container", + style: vue.normalizeStyle({ + height: `${_ctx.height > 100 ? 100 : _ctx.height}%`, + width: `${_ctx.width > 100 ? 100 : _ctx.width}%` + }) + }, [ + vue.renderSlot(_ctx.$slots, "pattern-container", { id: patternId.value }, () => [ + vue.createElementVNode("pattern", { + id: patternId.value, + x: vue.unref(viewport).x % background.value.scaledGap[0], + y: vue.unref(viewport).y % background.value.scaledGap[1], + width: background.value.scaledGap[0], + height: background.value.scaledGap[1], + patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`, + patternUnits: "userSpaceOnUse" + }, [ + vue.renderSlot(_ctx.$slots, "pattern", {}, () => [ + _ctx.variant === vue.unref(BackgroundVariant).Lines ? (vue.openBlock(), vue.createBlock(vue.unref(LinePattern), { + key: 0, + size: _ctx.lineWidth, + color: patternColor.value, + dimensions: background.value.scaledGap + }, null, 8, ["size", "color", "dimensions"])) : _ctx.variant === vue.unref(BackgroundVariant).Dots ? (vue.openBlock(), vue.createBlock(vue.unref(DotPattern), { + key: 1, + color: patternColor.value, + radius: background.value.size / 2 + }, null, 8, ["color", "radius"])) : vue.createCommentVNode("", true), + _ctx.bgColor ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2, [ + vue.createElementVNode("rect", { + width: "100%", + height: "100%", + fill: _ctx.bgColor + }, null, 8, _hoisted_3) + ])) : vue.createCommentVNode("", true) + ]) + ], 8, _hoisted_1) + ]), + vue.createElementVNode("rect", { + x: _ctx.x, + y: _ctx.y, + width: "100%", + height: "100%", + fill: `url(#${patternId.value})` + }, null, 8, _hoisted_4), + vue.renderSlot(_ctx.$slots, "default", { id: patternId.value }) + ], 4); + }; + } +}); +exports.Background = _sfc_main; +exports.BackgroundVariant = BackgroundVariant; diff --git a/node_modules/@vue-flow/background/dist/vue-flow-background.mjs b/node_modules/@vue-flow/background/dist/vue-flow-background.mjs new file mode 100644 index 00000000..77570b7a --- /dev/null +++ b/node_modules/@vue-flow/background/dist/vue-flow-background.mjs @@ -0,0 +1,126 @@ +import { h, defineComponent, computed, toRef, openBlock, createElementBlock, normalizeStyle, renderSlot, createElementVNode, unref, createBlock, createCommentVNode } from "vue"; +import { useVueFlow } from "@vue-flow/core"; +var BackgroundVariant = /* @__PURE__ */ ((BackgroundVariant2) => { + BackgroundVariant2["Lines"] = "lines"; + BackgroundVariant2["Dots"] = "dots"; + return BackgroundVariant2; +})(BackgroundVariant || {}); +const LinePattern = function({ dimensions, size, color }) { + return h("path", { + "stroke": color, + "stroke-width": size, + "d": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` + }); +}; +const DotPattern = function({ radius, color }) { + return h("circle", { cx: radius, cy: radius, r: radius, fill: color }); +}; +({ + [BackgroundVariant.Lines]: LinePattern, + [BackgroundVariant.Dots]: DotPattern +}); +const DefaultBgColors = { + [BackgroundVariant.Dots]: "#81818a", + [BackgroundVariant.Lines]: "#eee" +}; +const _hoisted_1 = ["id", "x", "y", "width", "height", "patternTransform"]; +const _hoisted_2 = { + key: 2, + height: "100", + width: "100" +}; +const _hoisted_3 = ["fill"]; +const _hoisted_4 = ["x", "y", "fill"]; +const __default__ = { + name: "Background", + compatConfig: { MODE: 3 } +}; +const _sfc_main = /* @__PURE__ */ defineComponent({ + ...__default__, + props: { + id: {}, + variant: { default: () => BackgroundVariant.Dots }, + gap: { default: 20 }, + size: { default: 1 }, + lineWidth: { default: 1 }, + patternColor: {}, + color: {}, + bgColor: {}, + height: { default: 100 }, + width: { default: 100 }, + x: { default: 0 }, + y: { default: 0 }, + offset: { default: 0 } + }, + setup(__props) { + const { id: vueFlowId, viewport } = useVueFlow(); + const background = computed(() => { + const zoom = viewport.value.zoom; + const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap]; + const scaledGap = [gapX * zoom || 1, gapY * zoom || 1]; + const scaledSize = __props.size * zoom; + const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset]; + const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2]; + return { + scaledGap, + offset: scaledOffset, + size: scaledSize + }; + }); + const patternId = toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : ""}`); + const patternColor = toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("svg", { + class: "vue-flow__background vue-flow__container", + style: normalizeStyle({ + height: `${_ctx.height > 100 ? 100 : _ctx.height}%`, + width: `${_ctx.width > 100 ? 100 : _ctx.width}%` + }) + }, [ + renderSlot(_ctx.$slots, "pattern-container", { id: patternId.value }, () => [ + createElementVNode("pattern", { + id: patternId.value, + x: unref(viewport).x % background.value.scaledGap[0], + y: unref(viewport).y % background.value.scaledGap[1], + width: background.value.scaledGap[0], + height: background.value.scaledGap[1], + patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`, + patternUnits: "userSpaceOnUse" + }, [ + renderSlot(_ctx.$slots, "pattern", {}, () => [ + _ctx.variant === unref(BackgroundVariant).Lines ? (openBlock(), createBlock(unref(LinePattern), { + key: 0, + size: _ctx.lineWidth, + color: patternColor.value, + dimensions: background.value.scaledGap + }, null, 8, ["size", "color", "dimensions"])) : _ctx.variant === unref(BackgroundVariant).Dots ? (openBlock(), createBlock(unref(DotPattern), { + key: 1, + color: patternColor.value, + radius: background.value.size / 2 + }, null, 8, ["color", "radius"])) : createCommentVNode("", true), + _ctx.bgColor ? (openBlock(), createElementBlock("svg", _hoisted_2, [ + createElementVNode("rect", { + width: "100%", + height: "100%", + fill: _ctx.bgColor + }, null, 8, _hoisted_3) + ])) : createCommentVNode("", true) + ]) + ], 8, _hoisted_1) + ]), + createElementVNode("rect", { + x: _ctx.x, + y: _ctx.y, + width: "100%", + height: "100%", + fill: `url(#${patternId.value})` + }, null, 8, _hoisted_4), + renderSlot(_ctx.$slots, "default", { id: patternId.value }) + ], 4); + }; + } +}); +export { + _sfc_main as Background, + BackgroundVariant +}; diff --git a/node_modules/@vue-flow/background/package.json b/node_modules/@vue-flow/background/package.json new file mode 100644 index 00000000..c7b772a4 --- /dev/null +++ b/node_modules/@vue-flow/background/package.json @@ -0,0 +1,73 @@ +{ + "name": "@vue-flow/background", + "version": "1.3.2", + "private": false, + "license": "MIT", + "author": "Burak Cakmakoglu<78412429+bcakmakoglu@users.noreply.github.com>", + "repository": { + "type": "git", + "url": "git+https://github.com/bcakmakoglu/vue-flow/packages/plugins/background" + }, + "homepage": "https://github.com/bcakmakoglu/vue-flow#readme", + "bugs": { + "url": "https://github.com/bcakmakoglu/vue-flow/issues" + }, + "keywords": [ + "vue", + "flow", + "diagram", + "editor", + "graph", + "node", + "link", + "port", + "slot", + "vue3", + "composition-api", + "vue-flow", + "vueflow", + "typescript" + ], + "main": "./dist/vue-flow-background.js", + "module": "./dist/vue-flow-background.mjs", + "types": "./dist/index.d.ts", + "unpkg": "./dist/vue-flow-background.iife.js", + "jsdelivr": "./dist/vue-flow-background.iife.js", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/vue-flow-background.mjs", + "require": "./dist/vue-flow-background.js" + } + }, + "files": [ + "dist", + "*.d.ts" + ], + "sideEffects": false, + "peerDependencies": { + "@vue-flow/core": "^1.23.0", + "vue": "^3.3.0" + }, + "devDependencies": { + "vue-tsc": "^1.8.16", + "@tooling/eslint-config": "0.0.0", + "@tooling/tsconfig": "0.0.0", + "@tooling/vite-config": "0.0.0", + "@vue-flow/core": "1.41.5" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "dev": "pnpm types:watch & pnpm build:watch", + "build": "vite build", + "build:watch": "vite build --watch", + "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", + "types:watch": "vue-tsc --declaration --emitDeclarationOnly --watch", + "lint": "eslint --ext .js,.ts,.vue ./", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", + "test": "exit 0" + } +} \ No newline at end of file diff --git a/node_modules/@vue-flow/controls/LICENSE b/node_modules/@vue-flow/controls/LICENSE new file mode 100644 index 00000000..aa043dbf --- /dev/null +++ b/node_modules/@vue-flow/controls/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2019-2025 webkid GmbH +Copyright (c) 2021-2025 Burak Cakmakoglu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@vue-flow/controls/README.md b/node_modules/@vue-flow/controls/README.md new file mode 100644 index 00000000..4cac4d97 --- /dev/null +++ b/node_modules/@vue-flow/controls/README.md @@ -0,0 +1,38 @@ +# Vue Flow: Controls Component + +This is a control component for Vue Flow. +It can be used to control the canvas interactions, like zooming in, zooming out, fitting the view and locking interactions. + +## 🛠 Setup + +```bash +# install +$ yarn add @vue-flow/controls + +# or +$ npm i --save @vue-flow/controls +``` + +## 🎮 Quickstart + +```vue + + + +``` diff --git a/node_modules/@vue-flow/controls/dist/ControlButton.vue.d.ts b/node_modules/@vue-flow/controls/dist/ControlButton.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/ControlButton.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/controls/dist/Controls.vue.d.ts b/node_modules/@vue-flow/controls/dist/Controls.vue.d.ts new file mode 100644 index 00000000..53b9cc0f --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/Controls.vue.d.ts @@ -0,0 +1,82 @@ +import type { PanelPosition } from '@vue-flow/core' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + showZoom: { + type: import('vue').PropType + } + showFitView: { + type: import('vue').PropType + } + showInteractive: { + type: import('vue').PropType + } + fitViewParams: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + { + zoomIn: () => void + zoomOut: () => void + fitView: () => void + interactionChange: (active: boolean) => void + }, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + showZoom: { + type: import('vue').PropType + } + showFitView: { + type: import('vue').PropType + } + showInteractive: { + type: import('vue').PropType + } + fitViewParams: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + }> + > & { + onZoomIn?: (() => any) | undefined + onZoomOut?: (() => any) | undefined + onFitView?: (() => any) | undefined + onInteractionChange?: ((active: boolean) => any) | undefined + }, + {}, + {} + >, + { + top?(_: {}): any + 'control-zoom-in'?(_: {}): any + 'icon-zoom-in'?(_: {}): any + 'control-zoom-out'?(_: {}): any + 'icon-zoom-out'?(_: {}): any + 'control-fit-view'?(_: {}): any + 'icon-fit-view'?(_: {}): any + 'control-interactive'?(_: {}): any + 'icon-unlock'?(_: {}): any + 'icon-lock'?(_: {}): any + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/controls/dist/index.d.ts b/node_modules/@vue-flow/controls/dist/index.d.ts new file mode 100644 index 00000000..d8ff7486 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/index.d.ts @@ -0,0 +1,5 @@ +import './style.css' + +export { default as Controls } from './Controls.vue' +export { default as ControlButton } from './ControlButton.vue' +export * from './types' diff --git a/node_modules/@vue-flow/controls/dist/style.css b/node_modules/@vue-flow/controls/dist/style.css new file mode 100644 index 00000000..2845c781 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/style.css @@ -0,0 +1,37 @@ +.vue-flow__controls { + box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08); +} + +.vue-flow__controls-button { + background: #fefefe; + border: none; + border-bottom: 1px solid #eee; + box-sizing: content-box; + display: flex; + justify-content: center; + align-items: center; + width: 16px; + height: 16px; + cursor: pointer; + user-select: none; + padding: 5px; +} + +.vue-flow__controls-button svg { + width: 100%; + max-width: 12px; + max-height: 12px; +} + +.vue-flow__controls-button:hover { + background: #f4f4f4; +} + + +.vue-flow__controls-button:disabled { + pointer-events: none; +} + +.vue-flow__controls-button:disabled svg { + fill-opacity: 0.4; +} diff --git a/node_modules/@vue-flow/controls/dist/types.d.ts b/node_modules/@vue-flow/controls/dist/types.d.ts new file mode 100644 index 00000000..048ca62e --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/types.d.ts @@ -0,0 +1,14 @@ +import type { FitViewParams, PanelPosition, PanelPositionType } from '@vue-flow/core' + +export interface ControlProps { + /** Show the zoom icon */ + showZoom?: boolean + /** Show the fit-view icon */ + showFitView?: boolean + /** Show the interactive icon */ + showInteractive?: boolean + /** Params to use on fitView */ + fitViewParams?: FitViewParams + /** Position of the controls {@link PanelPosition} */ + position?: PanelPositionType | PanelPosition +} diff --git a/node_modules/@vue-flow/controls/dist/vue-flow-controls.iife.js b/node_modules/@vue-flow/controls/dist/vue-flow-controls.iife.js new file mode 100644 index 00000000..3894c747 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/vue-flow-controls.iife.js @@ -0,0 +1,208 @@ +var VueFlowControls = function(exports, vue, core) { + "use strict"; + const _sfc_main$1 = { + name: "ControlButton", + compatConfig: { MODE: 3 } + }; + const _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; + }; + const _hoisted_1$5 = { + type: "button", + class: "vue-flow__controls-button" + }; + function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return vue.openBlock(), vue.createElementBlock("button", _hoisted_1$5, [ + vue.renderSlot(_ctx.$slots, "default") + ]); + } + const ControlButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]); + const _hoisted_1$4 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 32" + }; + const _hoisted_2$4 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1); + const _hoisted_3$4 = [ + _hoisted_2$4 + ]; + function render$4(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, _hoisted_3$4); + } + const PlusIcon = { render: render$4 }; + const _hoisted_1$3 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 5" + }; + const _hoisted_2$3 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M0 0h32v4.2H0z" }, null, -1); + const _hoisted_3$3 = [ + _hoisted_2$3 + ]; + function render$3(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$3, _hoisted_3$3); + } + const MinusIcon = { render: render$3 }; + const _hoisted_1$2 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 30" + }; + const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1); + const _hoisted_3$2 = [ + _hoisted_2$2 + ]; + function render$2(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2); + } + const FitView = { render: render$2 }; + const _hoisted_1$1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" + }; + const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1); + const _hoisted_3$1 = [ + _hoisted_2$1 + ]; + function render$1(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1); + } + const Lock = { render: render$1 }; + const _hoisted_1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" + }; + const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1); + const _hoisted_3 = [ + _hoisted_2 + ]; + function render(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_3); + } + const Unlock = { render }; + const __default__ = { + name: "Controls", + compatConfig: { MODE: 3 } + }; + const _sfc_main = /* @__PURE__ */ vue.defineComponent({ + ...__default__, + props: { + showZoom: { type: Boolean, default: true }, + showFitView: { type: Boolean, default: true }, + showInteractive: { type: Boolean, default: true }, + fitViewParams: {}, + position: { default: () => core.PanelPosition.BottomLeft } + }, + emits: ["zoomIn", "zoomOut", "fitView", "interactionChange"], + setup(__props, { emit }) { + const { + nodesDraggable, + nodesConnectable, + elementsSelectable, + setInteractive, + zoomIn, + zoomOut, + fitView, + viewport, + minZoom, + maxZoom + } = core.useVueFlow(); + const isInteractive = vue.toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value); + const minZoomReached = vue.toRef(() => viewport.value.zoom <= minZoom.value); + const maxZoomReached = vue.toRef(() => viewport.value.zoom >= maxZoom.value); + function onZoomInHandler() { + zoomIn(); + emit("zoomIn"); + } + function onZoomOutHandler() { + zoomOut(); + emit("zoomOut"); + } + function onFitViewHandler() { + fitView(__props.fitViewParams); + emit("fitView"); + } + function onInteractiveChangeHandler() { + setInteractive(!isInteractive.value); + emit("interactionChange", !isInteractive.value); + } + return (_ctx, _cache) => { + return vue.openBlock(), vue.createBlock(vue.unref(core.Panel), { + class: "vue-flow__controls", + position: _ctx.position + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "top"), + _ctx.showZoom ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [ + vue.renderSlot(_ctx.$slots, "control-zoom-in", {}, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-zoomin", + disabled: maxZoomReached.value, + onClick: onZoomInHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-zoom-in", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(PlusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]), + vue.renderSlot(_ctx.$slots, "control-zoom-out", {}, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-zoomout", + disabled: minZoomReached.value, + onClick: onZoomOutHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-zoom-out", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(MinusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]) + ], 64)) : vue.createCommentVNode("", true), + _ctx.showFitView ? vue.renderSlot(_ctx.$slots, "control-fit-view", { key: 1 }, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-fitview", + onClick: onFitViewHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-fit-view", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(FitView)))) + ]) + ]), + _: 3 + }) + ]) : vue.createCommentVNode("", true), + _ctx.showInteractive ? vue.renderSlot(_ctx.$slots, "control-interactive", { key: 2 }, () => [ + _ctx.showInteractive ? (vue.openBlock(), vue.createBlock(ControlButton, { + key: 0, + class: "vue-flow__controls-interactive", + onClick: onInteractiveChangeHandler + }, { + default: vue.withCtx(() => [ + isInteractive.value ? vue.renderSlot(_ctx.$slots, "icon-unlock", { key: 0 }, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Unlock)))) + ]) : vue.createCommentVNode("", true), + !isInteractive.value ? vue.renderSlot(_ctx.$slots, "icon-lock", { key: 1 }, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Lock)))) + ]) : vue.createCommentVNode("", true) + ]), + _: 3 + })) : vue.createCommentVNode("", true) + ]) : vue.createCommentVNode("", true), + vue.renderSlot(_ctx.$slots, "default") + ]), + _: 3 + }, 8, ["position"]); + }; + } + }); + exports.ControlButton = ControlButton; + exports.Controls = _sfc_main; + Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); + return exports; +}({}, Vue, VueFlowCore); diff --git a/node_modules/@vue-flow/controls/dist/vue-flow-controls.js b/node_modules/@vue-flow/controls/dist/vue-flow-controls.js new file mode 100644 index 00000000..89a4eaa2 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/vue-flow-controls.js @@ -0,0 +1,207 @@ +"use strict"; +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const vue = require("vue"); +const core = require("@vue-flow/core"); +const _sfc_main$1 = { + name: "ControlButton", + compatConfig: { MODE: 3 } +}; +const _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; +}; +const _hoisted_1$5 = { + type: "button", + class: "vue-flow__controls-button" +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return vue.openBlock(), vue.createElementBlock("button", _hoisted_1$5, [ + vue.renderSlot(_ctx.$slots, "default") + ]); +} +const ControlButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]); +const _hoisted_1$4 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 32" +}; +const _hoisted_2$4 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1); +const _hoisted_3$4 = [ + _hoisted_2$4 +]; +function render$4(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, _hoisted_3$4); +} +const PlusIcon = { render: render$4 }; +const _hoisted_1$3 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 5" +}; +const _hoisted_2$3 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M0 0h32v4.2H0z" }, null, -1); +const _hoisted_3$3 = [ + _hoisted_2$3 +]; +function render$3(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$3, _hoisted_3$3); +} +const MinusIcon = { render: render$3 }; +const _hoisted_1$2 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 30" +}; +const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1); +const _hoisted_3$2 = [ + _hoisted_2$2 +]; +function render$2(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2); +} +const FitView = { render: render$2 }; +const _hoisted_1$1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1); +const _hoisted_3$1 = [ + _hoisted_2$1 +]; +function render$1(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1); +} +const Lock = { render: render$1 }; +const _hoisted_1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1); +const _hoisted_3 = [ + _hoisted_2 +]; +function render(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_3); +} +const Unlock = { render }; +const __default__ = { + name: "Controls", + compatConfig: { MODE: 3 } +}; +const _sfc_main = /* @__PURE__ */ vue.defineComponent({ + ...__default__, + props: { + showZoom: { type: Boolean, default: true }, + showFitView: { type: Boolean, default: true }, + showInteractive: { type: Boolean, default: true }, + fitViewParams: {}, + position: { default: () => core.PanelPosition.BottomLeft } + }, + emits: ["zoomIn", "zoomOut", "fitView", "interactionChange"], + setup(__props, { emit }) { + const { + nodesDraggable, + nodesConnectable, + elementsSelectable, + setInteractive, + zoomIn, + zoomOut, + fitView, + viewport, + minZoom, + maxZoom + } = core.useVueFlow(); + const isInteractive = vue.toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value); + const minZoomReached = vue.toRef(() => viewport.value.zoom <= minZoom.value); + const maxZoomReached = vue.toRef(() => viewport.value.zoom >= maxZoom.value); + function onZoomInHandler() { + zoomIn(); + emit("zoomIn"); + } + function onZoomOutHandler() { + zoomOut(); + emit("zoomOut"); + } + function onFitViewHandler() { + fitView(__props.fitViewParams); + emit("fitView"); + } + function onInteractiveChangeHandler() { + setInteractive(!isInteractive.value); + emit("interactionChange", !isInteractive.value); + } + return (_ctx, _cache) => { + return vue.openBlock(), vue.createBlock(vue.unref(core.Panel), { + class: "vue-flow__controls", + position: _ctx.position + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "top"), + _ctx.showZoom ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [ + vue.renderSlot(_ctx.$slots, "control-zoom-in", {}, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-zoomin", + disabled: maxZoomReached.value, + onClick: onZoomInHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-zoom-in", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(PlusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]), + vue.renderSlot(_ctx.$slots, "control-zoom-out", {}, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-zoomout", + disabled: minZoomReached.value, + onClick: onZoomOutHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-zoom-out", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(MinusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]) + ], 64)) : vue.createCommentVNode("", true), + _ctx.showFitView ? vue.renderSlot(_ctx.$slots, "control-fit-view", { key: 1 }, () => [ + vue.createVNode(ControlButton, { + class: "vue-flow__controls-fitview", + onClick: onFitViewHandler + }, { + default: vue.withCtx(() => [ + vue.renderSlot(_ctx.$slots, "icon-fit-view", {}, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(FitView)))) + ]) + ]), + _: 3 + }) + ]) : vue.createCommentVNode("", true), + _ctx.showInteractive ? vue.renderSlot(_ctx.$slots, "control-interactive", { key: 2 }, () => [ + _ctx.showInteractive ? (vue.openBlock(), vue.createBlock(ControlButton, { + key: 0, + class: "vue-flow__controls-interactive", + onClick: onInteractiveChangeHandler + }, { + default: vue.withCtx(() => [ + isInteractive.value ? vue.renderSlot(_ctx.$slots, "icon-unlock", { key: 0 }, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Unlock)))) + ]) : vue.createCommentVNode("", true), + !isInteractive.value ? vue.renderSlot(_ctx.$slots, "icon-lock", { key: 1 }, () => [ + (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Lock)))) + ]) : vue.createCommentVNode("", true) + ]), + _: 3 + })) : vue.createCommentVNode("", true) + ]) : vue.createCommentVNode("", true), + vue.renderSlot(_ctx.$slots, "default") + ]), + _: 3 + }, 8, ["position"]); + }; + } +}); +exports.ControlButton = ControlButton; +exports.Controls = _sfc_main; diff --git a/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs b/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs new file mode 100644 index 00000000..08cb4000 --- /dev/null +++ b/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs @@ -0,0 +1,207 @@ +import { openBlock, createElementBlock, renderSlot, createElementVNode, defineComponent, toRef, createBlock, unref, withCtx, Fragment, createVNode, resolveDynamicComponent, createCommentVNode } from "vue"; +import { PanelPosition, useVueFlow, Panel } from "@vue-flow/core"; +const _sfc_main$1 = { + name: "ControlButton", + compatConfig: { MODE: 3 } +}; +const _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; +}; +const _hoisted_1$5 = { + type: "button", + class: "vue-flow__controls-button" +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("button", _hoisted_1$5, [ + renderSlot(_ctx.$slots, "default") + ]); +} +const ControlButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]); +const _hoisted_1$4 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 32" +}; +const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1); +const _hoisted_3$4 = [ + _hoisted_2$4 +]; +function render$4(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$4); +} +const PlusIcon = { render: render$4 }; +const _hoisted_1$3 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 5" +}; +const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("path", { d: "M0 0h32v4.2H0z" }, null, -1); +const _hoisted_3$3 = [ + _hoisted_2$3 +]; +function render$3(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3); +} +const MinusIcon = { render: render$3 }; +const _hoisted_1$2 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 32 30" +}; +const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1); +const _hoisted_3$2 = [ + _hoisted_2$2 +]; +function render$2(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2); +} +const FitView = { render: render$2 }; +const _hoisted_1$1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1); +const _hoisted_3$1 = [ + _hoisted_2$1 +]; +function render$1(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1); +} +const Lock = { render: render$1 }; +const _hoisted_1 = { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 25 32" +}; +const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1); +const _hoisted_3 = [ + _hoisted_2 +]; +function render(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3); +} +const Unlock = { render }; +const __default__ = { + name: "Controls", + compatConfig: { MODE: 3 } +}; +const _sfc_main = /* @__PURE__ */ defineComponent({ + ...__default__, + props: { + showZoom: { type: Boolean, default: true }, + showFitView: { type: Boolean, default: true }, + showInteractive: { type: Boolean, default: true }, + fitViewParams: {}, + position: { default: () => PanelPosition.BottomLeft } + }, + emits: ["zoomIn", "zoomOut", "fitView", "interactionChange"], + setup(__props, { emit }) { + const { + nodesDraggable, + nodesConnectable, + elementsSelectable, + setInteractive, + zoomIn, + zoomOut, + fitView, + viewport, + minZoom, + maxZoom + } = useVueFlow(); + const isInteractive = toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value); + const minZoomReached = toRef(() => viewport.value.zoom <= minZoom.value); + const maxZoomReached = toRef(() => viewport.value.zoom >= maxZoom.value); + function onZoomInHandler() { + zoomIn(); + emit("zoomIn"); + } + function onZoomOutHandler() { + zoomOut(); + emit("zoomOut"); + } + function onFitViewHandler() { + fitView(__props.fitViewParams); + emit("fitView"); + } + function onInteractiveChangeHandler() { + setInteractive(!isInteractive.value); + emit("interactionChange", !isInteractive.value); + } + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(Panel), { + class: "vue-flow__controls", + position: _ctx.position + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "top"), + _ctx.showZoom ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ + renderSlot(_ctx.$slots, "control-zoom-in", {}, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-zoomin", + disabled: maxZoomReached.value, + onClick: onZoomInHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-zoom-in", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(PlusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]), + renderSlot(_ctx.$slots, "control-zoom-out", {}, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-zoomout", + disabled: minZoomReached.value, + onClick: onZoomOutHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-zoom-out", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(MinusIcon)))) + ]) + ]), + _: 3 + }, 8, ["disabled"]) + ]) + ], 64)) : createCommentVNode("", true), + _ctx.showFitView ? renderSlot(_ctx.$slots, "control-fit-view", { key: 1 }, () => [ + createVNode(ControlButton, { + class: "vue-flow__controls-fitview", + onClick: onFitViewHandler + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "icon-fit-view", {}, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(FitView)))) + ]) + ]), + _: 3 + }) + ]) : createCommentVNode("", true), + _ctx.showInteractive ? renderSlot(_ctx.$slots, "control-interactive", { key: 2 }, () => [ + _ctx.showInteractive ? (openBlock(), createBlock(ControlButton, { + key: 0, + class: "vue-flow__controls-interactive", + onClick: onInteractiveChangeHandler + }, { + default: withCtx(() => [ + isInteractive.value ? renderSlot(_ctx.$slots, "icon-unlock", { key: 0 }, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(Unlock)))) + ]) : createCommentVNode("", true), + !isInteractive.value ? renderSlot(_ctx.$slots, "icon-lock", { key: 1 }, () => [ + (openBlock(), createBlock(resolveDynamicComponent(unref(Lock)))) + ]) : createCommentVNode("", true) + ]), + _: 3 + })) : createCommentVNode("", true) + ]) : createCommentVNode("", true), + renderSlot(_ctx.$slots, "default") + ]), + _: 3 + }, 8, ["position"]); + }; + } +}); +export { + ControlButton, + _sfc_main as Controls +}; diff --git a/node_modules/@vue-flow/controls/package.json b/node_modules/@vue-flow/controls/package.json new file mode 100644 index 00000000..d44311f6 --- /dev/null +++ b/node_modules/@vue-flow/controls/package.json @@ -0,0 +1,77 @@ +{ + "name": "@vue-flow/controls", + "version": "1.1.3", + "private": false, + "license": "MIT", + "author": "Burak Cakmakoglu<78412429+bcakmakoglu@users.noreply.github.com>", + "repository": { + "type": "git", + "url": "git+https://github.com/bcakmakoglu/vue-flow/packages/plugins/controls" + }, + "homepage": "https://github.com/bcakmakoglu/vue-flow#readme", + "bugs": { + "url": "https://github.com/bcakmakoglu/vue-flow/issues" + }, + "keywords": [ + "vue", + "flow", + "diagram", + "editor", + "graph", + "node", + "link", + "port", + "slot", + "vue3", + "composition-api", + "vue-flow", + "vueflow", + "typescript" + ], + "main": "./dist/vue-flow-controls.js", + "module": "./dist/vue-flow-controls.mjs", + "types": "./dist/index.d.ts", + "unpkg": "./dist/vue-flow-controls.iife.js", + "jsdelivr": "./dist/vue-flow-controls.iife.js", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/vue-flow-controls.mjs", + "require": "./dist/vue-flow-controls.js" + }, + "./dist/style.css": "./dist/style.css" + }, + "files": [ + "dist", + "*.d.ts" + ], + "sideEffects": [ + "*.css" + ], + "peerDependencies": { + "@vue-flow/core": "^1.23.0", + "vue": "^3.3.0" + }, + "devDependencies": { + "vite-svg-loader": "^4.0.0", + "vue-tsc": "^1.8.16", + "@tooling/eslint-config": "0.0.0", + "@tooling/tsconfig": "0.0.0", + "@tooling/vite-config": "0.0.0", + "@vue-flow/core": "1.45.1" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "scripts": { + "dev": "pnpm types:watch & pnpm build:watch", + "build": "vite build", + "build:watch": "vite build --watch", + "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", + "types:watch": "vue-tsc --declaration --emitDeclarationOnly --watch", + "lint": "eslint --ext .js,.ts,.vue ./", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", + "test": "exit 0" + } +} \ No newline at end of file diff --git a/node_modules/@vue-flow/core/LICENSE b/node_modules/@vue-flow/core/LICENSE new file mode 100644 index 00000000..aa043dbf --- /dev/null +++ b/node_modules/@vue-flow/core/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2019-2025 webkid GmbH +Copyright (c) 2021-2025 Burak Cakmakoglu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@vue-flow/core/README.md b/node_modules/@vue-flow/core/README.md new file mode 100644 index 00000000..0054e36a --- /dev/null +++ b/node_modules/@vue-flow/core/README.md @@ -0,0 +1,174 @@ +# Vue Flow 🌊 + +[![Vue flow](vue-flow.gif)](https://vueflow.dev/) +![top-language](https://img.shields.io/github/languages/top/bcakmakoglu/vue-flow) +![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bcakmakoglu/vue-flow) +![GitHub last commit](https://img.shields.io/github/last-commit/bcakmakoglu/vue-flow) + +__Vue Flow: A highly customizable Vue 3 Flowchart component.__ + +You can find a detailed explanation on how to get started [here](https://vueflow.dev/guide/) +or jump right into the [examples](https://vueflow.dev/examples/). + +## Table of contents + +* [⭐️ Features](#-features) + +* [🛠 Setup](#-setup) + +* [🎮 Quickstart](#-quickstart) + + + [🪴 Vue 2](#-vue-2) + +* [🧪 Development](#-development) + + + [🐳 Dev Container](#-dev-container) + +* [![discord logo](https://api.iconify.design/logos:discord-icon.svg) Discord](#-discord) + +* [💝 Special Thanks](#-special-thanks) + +* [⭐ Stargazers](#-stargazers) + +## ⭐️ Features + +- 👶 __Easy setup__: Get started hassle-free - Built-in zoom- & pan features, element dragging, selection and much more + +- 🎨 __Customizable__: Use your custom nodes, edges and connection lines and expand on Vue Flows' functionality + +- 🚀 __Fast__: Tracks changes reactively and only re-renders the appropriate elements + +- 🧲 __Utils & Composition__: Comes with graph helper and state composable functions for advanced uses + +- 📦 __Additional Components__: + + - 🖼 Background: With two built-in patterns and some configuration options like height, width or color. + + - 🧭 Minimap: Shows current nodes in a small map shape in the bottom right corner + + - 🕹 Controls: Control zoom behavior from a panel on the bottom left + + - 🤖 And (many) more to come... + +- 🦾 __Reliable__: Fully written in TypeScript + +## 🛠 Setup + +```bash +$ npm i @vue-flow/core + +# or +$ pnpm i @vue-flow/core + +# or +$ yarn add @vue-flow/core +``` + +## 🎮 Quickstart + +In Vue Flow, an application structure consists of __nodes__ and __edges__, all of which are categorised as __elements__. + +__Each element requires a unique id.__ + +Nodes additionally need an __XY-position__, while edges require a __source__ and a __target__, both represented by node ids. + +```vue + + + + +``` + +⚠️ __Make sure to import the necessary styles:__ + +```css +/* import the required styles */ +@import "@vue-flow/core/dist/style.css"; + +/* import the default theme (optional) */ +@import "@vue-flow/core/dist/theme-default.css"; +``` + +Do __not__ scope these styles with `scoped` in your component. + +### 🪴 Vue 2 + +**_This library doesn't work with Vue 2._** + +Vue Flow uses features that are exclusive to Vue 3, therefore +there is no support for Vue 2, nor will there be any support in the future, sorry. + +## 🧪 Development + +### Prerequisites + +- [Node.js v20+](https://nodejs.org/) +- [pnpm v9+](https://pnpm.io/) + +```bash +# install pnpm if you haven't already +$ npm i -g pnpm + +# start examples +$ pnpm dev + +# build all packages +$ pnpm build +``` + +### 🐳 Dev Container + +To start using development containers, install the `Docker` extension +for VSCode. +After installing the extension, open the connection menu either +on the bottom left or open it via the commands tab. +Select the `Open Folder in Container` option to mount the project. + +The development container will spin up all packages example apps and forward +the ports to your machine. + +## ![discord logo](https://api.iconify.design/logos:discord-icon.svg) Discord + +[Join the Vue Flow Discord server!](https://discord.gg/rwt6CBk4b5) + +Here you can ask questions to the community, propose ideas for new features +or share your work that you have built with Vue Flow. + +## 💝 Special Thanks + +This project is built with + +- [React Flow](https://reactflow.dev/) + - Vue flow is heavily based on [webkids'](https://webkid.io/) [ReactFlow](https://reactflow.dev/). I wholeheartedly + thank them for their amazing work! Without them VueFlow would not exist. + Please consider [donating](https://github.com/sponsors/wbkd) or subscribing to [ReactFlow Pro](https://reactflow.dev/pro). + +- [D3.js](https://d3js.org/) + - D3 makes all the zoom and pan actions in Vue Flow possible. + +- [VueUse](https://vueuse.org/) + - VueUse is a collection of essential vue composition utilities + +## ⭐ Stargazers + +Many thanks to the kind individuals who leave a star. +Your support is much appreciated! + +[![Stargazers for @vue-flow/core](https://reporoster.com/stars/bcakmakoglu/vue-flow)](https://github.com/bcakmakoglu/vue-flow/stargazers) diff --git a/node_modules/@vue-flow/core/dist/addons/Background/Background.vue.d.ts b/node_modules/@vue-flow/core/dist/addons/Background/Background.vue.d.ts new file mode 100644 index 00000000..aca46a68 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/addons/Background/Background.vue.d.ts @@ -0,0 +1,108 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + color: { + type: import('vue').PropType + } + id: { + type: import('vue').PropType + } + x: { + type: import('vue').PropType + default: number + } + y: { + type: import('vue').PropType + default: number + } + size: { + type: import('vue').PropType + default: number + } + gap: { + type: import('vue').PropType + default: number + } + offset: { + type: import('vue').PropType + default: number + } + variant: { + type: import('vue').PropType + default: string + } + lineWidth: { + type: import('vue').PropType + default: number + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + color: { + type: import('vue').PropType + } + id: { + type: import('vue').PropType + } + x: { + type: import('vue').PropType + default: number + } + y: { + type: import('vue').PropType + default: number + } + size: { + type: import('vue').PropType + default: number + } + gap: { + type: import('vue').PropType + default: number + } + offset: { + type: import('vue').PropType + default: number + } + variant: { + type: import('vue').PropType + default: string + } + lineWidth: { + type: import('vue').PropType + default: number + } + }> + >, + { + x: number + y: number + size: number + gap: number | number[] + offset: number + variant: import('./types').BackgroundVariant + lineWidth: number + }, + {} + >, + { + 'pattern-container'?(_: { id: string }): any + pattern?(_: {}): any + default?(_: { id: string }): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/addons/Background/index.d.ts b/node_modules/@vue-flow/core/dist/addons/Background/index.d.ts new file mode 100644 index 00000000..e7aaa4b7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/addons/Background/index.d.ts @@ -0,0 +1,2 @@ +export { default as Background } from './Background.vue' +export * from './types' diff --git a/node_modules/@vue-flow/core/dist/addons/Background/patterns.d.ts b/node_modules/@vue-flow/core/dist/addons/Background/patterns.d.ts new file mode 100644 index 00000000..3868df15 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/addons/Background/patterns.d.ts @@ -0,0 +1,20 @@ +import type { FunctionalComponent } from 'vue' +import type { BackgroundVariant } from './types' + +interface LinePatternProps { + dimensions: [number, number] + size?: number + color: string +} +export declare const LinePattern: FunctionalComponent +interface DotPatternProps { + radius: number + color: string +} +export declare const DotPattern: FunctionalComponent +export declare const Patterns: { + lines: FunctionalComponent + dots: FunctionalComponent +} +export declare const DefaultBgColors: Record +export {} diff --git a/node_modules/@vue-flow/core/dist/addons/Background/types.d.ts b/node_modules/@vue-flow/core/dist/addons/Background/types.d.ts new file mode 100644 index 00000000..8f9f5299 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/addons/Background/types.d.ts @@ -0,0 +1,66 @@ +/** + * The Background can be either a dotted one or a lined one + * + * @default 'dots' + */ +export type BackgroundVariant = 'dots' | 'lines' +export interface BackgroundProps { + /** + * `` component id + * + * This is necessary when you have multiple flows with backgrounds visible at the same time. + * If no id is explicitly assigned, an auto-generated one is used. + * + * @default `pattern-${vueFlowId}${id ? `-${id}` : ''}` + */ + id?: string + /** + * The background pattern variant {@link BackgroundVariant} + * + * @default 'dots' + */ + variant?: BackgroundVariant + /** + * The background pattern gap + * + * Can be either a number or [xGap: number, yGap: number], defining the gap on the X and Y axis respectively + * + * @default 20 + */ + gap?: number | number[] + /** + * Background pattern size + * + * @default 1 + */ + size?: number + /** + * @default 1 + */ + lineWidth?: number + /** + * The background pattern color + * + * This only changes the color of the *pattern*, not the background color itself. + * + * If you want to change the background color itself, you can apply a bg-color to the `` element instead + */ + color?: string + /** + * Background x-coordinate (offset x) + * + * @default 0 + */ + x?: number + /** + * Background y-coordinate (offset y) + * @default 0 + */ + y?: number + /** + * Background pattern offset + * + * @default 2 + */ + offset?: number +} diff --git a/node_modules/@vue-flow/core/dist/components/A11y/A11yDescriptions.vue.d.ts b/node_modules/@vue-flow/core/dist/components/A11y/A11yDescriptions.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/A11y/A11yDescriptions.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/components/Background/Background.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Background/Background.vue.d.ts new file mode 100644 index 00000000..414a891e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Background/Background.vue.d.ts @@ -0,0 +1,108 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + size: { + type: import('vue').PropType + default: number + } + color: { + type: import('vue').PropType + } + id: { + type: import('vue').PropType + } + variant: { + type: import('vue').PropType + default: string + } + gap: { + type: import('vue').PropType + default: number + } + lineWidth: { + type: import('vue').PropType + default: number + } + x: { + type: import('vue').PropType + default: number + } + y: { + type: import('vue').PropType + default: number + } + offset: { + type: import('vue').PropType + default: number + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + size: { + type: import('vue').PropType + default: number + } + color: { + type: import('vue').PropType + } + id: { + type: import('vue').PropType + } + variant: { + type: import('vue').PropType + default: string + } + gap: { + type: import('vue').PropType + default: number + } + lineWidth: { + type: import('vue').PropType + default: number + } + x: { + type: import('vue').PropType + default: number + } + y: { + type: import('vue').PropType + default: number + } + offset: { + type: import('vue').PropType + default: number + } + }> + >, + { + size: number + variant: import('./types').BackgroundVariant + gap: number | number[] + lineWidth: number + x: number + y: number + offset: number + }, + {} + >, + { + 'pattern-container'?(_: { id: string }): any + pattern?(_: {}): any + default?(_: { id: string }): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/Background/index.d.ts b/node_modules/@vue-flow/core/dist/components/Background/index.d.ts new file mode 100644 index 00000000..e7aaa4b7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Background/index.d.ts @@ -0,0 +1,2 @@ +export { default as Background } from './Background.vue' +export * from './types' diff --git a/node_modules/@vue-flow/core/dist/components/Background/patterns.d.ts b/node_modules/@vue-flow/core/dist/components/Background/patterns.d.ts new file mode 100644 index 00000000..3868df15 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Background/patterns.d.ts @@ -0,0 +1,20 @@ +import type { FunctionalComponent } from 'vue' +import type { BackgroundVariant } from './types' + +interface LinePatternProps { + dimensions: [number, number] + size?: number + color: string +} +export declare const LinePattern: FunctionalComponent +interface DotPatternProps { + radius: number + color: string +} +export declare const DotPattern: FunctionalComponent +export declare const Patterns: { + lines: FunctionalComponent + dots: FunctionalComponent +} +export declare const DefaultBgColors: Record +export {} diff --git a/node_modules/@vue-flow/core/dist/components/Background/types.d.ts b/node_modules/@vue-flow/core/dist/components/Background/types.d.ts new file mode 100644 index 00000000..8f9f5299 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Background/types.d.ts @@ -0,0 +1,66 @@ +/** + * The Background can be either a dotted one or a lined one + * + * @default 'dots' + */ +export type BackgroundVariant = 'dots' | 'lines' +export interface BackgroundProps { + /** + * `` component id + * + * This is necessary when you have multiple flows with backgrounds visible at the same time. + * If no id is explicitly assigned, an auto-generated one is used. + * + * @default `pattern-${vueFlowId}${id ? `-${id}` : ''}` + */ + id?: string + /** + * The background pattern variant {@link BackgroundVariant} + * + * @default 'dots' + */ + variant?: BackgroundVariant + /** + * The background pattern gap + * + * Can be either a number or [xGap: number, yGap: number], defining the gap on the X and Y axis respectively + * + * @default 20 + */ + gap?: number | number[] + /** + * Background pattern size + * + * @default 1 + */ + size?: number + /** + * @default 1 + */ + lineWidth?: number + /** + * The background pattern color + * + * This only changes the color of the *pattern*, not the background color itself. + * + * If you want to change the background color itself, you can apply a bg-color to the `` element instead + */ + color?: string + /** + * Background x-coordinate (offset x) + * + * @default 0 + */ + x?: number + /** + * Background y-coordinate (offset y) + * @default 0 + */ + y?: number + /** + * Background pattern offset + * + * @default 2 + */ + offset?: number +} diff --git a/node_modules/@vue-flow/core/dist/components/ConnectionLine/ConnectionLine.vue.d.ts b/node_modules/@vue-flow/core/dist/components/ConnectionLine/ConnectionLine.vue.d.ts new file mode 100644 index 00000000..fe2f5006 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/ConnectionLine/ConnectionLine.vue.d.ts @@ -0,0 +1,36 @@ +import type { GraphNode } from '../../types' + +declare const _default: import('vue').DefineComponent< + __VLS_TypePropsToRuntimeProps<{ + sourceNode: GraphNode + }>, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes< + __VLS_TypePropsToRuntimeProps<{ + sourceNode: GraphNode + }> + > + >, + {} +> +export default _default +type __VLS_NonUndefinedable = T extends undefined ? never : T +type __VLS_TypePropsToRuntimeProps = { + [K in keyof T]-?: {} extends Pick + ? { + type: import('vue').PropType<__VLS_NonUndefinedable> + } + : { + type: import('vue').PropType + required: true + } +} diff --git a/node_modules/@vue-flow/core/dist/components/ConnectionLine/index.d.ts b/node_modules/@vue-flow/core/dist/components/ConnectionLine/index.d.ts new file mode 100644 index 00000000..a0919b81 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/ConnectionLine/index.d.ts @@ -0,0 +1,24 @@ +declare const ConnectionLine: import('vue').DefineComponent< + {}, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default ConnectionLine diff --git a/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.d.ts new file mode 100644 index 00000000..85121f8e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { BaseEdgeProps } from '../../types' + +/** + * The base edge is a simple wrapper for svg path + * You can use the base edge in your custom edges and just pass down the necessary props + */ +declare const BaseEdge: FunctionalComponent +export default BaseEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.vue.d.ts new file mode 100644 index 00000000..d4a9702e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/BaseEdge.vue.d.ts @@ -0,0 +1,108 @@ +declare const _default: import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + label: { + type: import('vue').PropType + } + markerStart: { + type: import('vue').PropType + } + markerEnd: { + type: import('vue').PropType + } + interactionWidth: { + type: import('vue').PropType + default: number + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + path: { + type: import('vue').PropType + required: true + } + labelX: { + type: import('vue').PropType + } + labelY: { + type: import('vue').PropType + } + }, + { + pathEl: import('vue').Ref + interactionEl: import('vue').Ref + labelEl: import('vue').Ref + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + label: { + type: import('vue').PropType + } + markerStart: { + type: import('vue').PropType + } + markerEnd: { + type: import('vue').PropType + } + interactionWidth: { + type: import('vue').PropType + default: number + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + path: { + type: import('vue').PropType + required: true + } + labelX: { + type: import('vue').PropType + } + labelY: { + type: import('vue').PropType + } + }> + >, + { + interactionWidth: number + }, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/components/Edges/BezierEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/BezierEdge.d.ts new file mode 100644 index 00000000..7aa8e701 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/BezierEdge.d.ts @@ -0,0 +1,20 @@ +import type { BezierEdgeProps } from '../../types' + +declare const BezierEdge: import('vue').DefineComponent< + BezierEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default BezierEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/EdgeAnchor.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/EdgeAnchor.d.ts new file mode 100644 index 00000000..3216d88c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/EdgeAnchor.d.ts @@ -0,0 +1,12 @@ +import type { FunctionalComponent, HTMLAttributes } from 'vue' +import type { Position } from '../../types' + +interface Props extends HTMLAttributes { + position: Position + centerX: number + centerY: number + radius?: number + type: string +} +declare const EdgeAnchor: FunctionalComponent +export default EdgeAnchor diff --git a/node_modules/@vue-flow/core/dist/components/Edges/EdgeLabelRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/EdgeLabelRenderer.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/EdgeLabelRenderer.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/Edges/EdgeText.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/EdgeText.vue.d.ts new file mode 100644 index 00000000..ae72aa8e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/EdgeText.vue.d.ts @@ -0,0 +1,102 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + x: { + type: import('vue').PropType + required: true + } + y: { + type: import('vue').PropType + required: true + } + label: { + type: import('vue').PropType< + | string + | object + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + > + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + x: { + type: import('vue').PropType + required: true + } + y: { + type: import('vue').PropType + required: true + } + label: { + type: import('vue').PropType< + | string + | object + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + > + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/Edges/EdgeWrapper.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/EdgeWrapper.d.ts new file mode 100644 index 00000000..8f31bd68 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/EdgeWrapper.d.ts @@ -0,0 +1,34 @@ +declare const EdgeWrapper: import('vue').DefineComponent< + Readonly<{ + id?: any + }>, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes< + Readonly<{ + id?: any + }> + > + >, + { + readonly id?: any + }, + {} +> +export default EdgeWrapper diff --git a/node_modules/@vue-flow/core/dist/components/Edges/SimpleBezierEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/SimpleBezierEdge.d.ts new file mode 100644 index 00000000..7a23ae9e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/SimpleBezierEdge.d.ts @@ -0,0 +1,20 @@ +import type { SimpleBezierEdgeProps } from '../../types' + +declare const SimpleBezierEdge: import('vue').DefineComponent< + SimpleBezierEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default SimpleBezierEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/SmoothStepEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/SmoothStepEdge.d.ts new file mode 100644 index 00000000..0fe85fec --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/SmoothStepEdge.d.ts @@ -0,0 +1,20 @@ +import type { SmoothStepEdgeProps } from '../../types' + +declare const SmoothStepEdge: import('vue').DefineComponent< + SmoothStepEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default SmoothStepEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/StepEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/StepEdge.d.ts new file mode 100644 index 00000000..46e16bc4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/StepEdge.d.ts @@ -0,0 +1,20 @@ +import type { StepEdgeProps } from '../../types' + +declare const StepEdge: import('vue').DefineComponent< + StepEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default StepEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/StraightEdge.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/StraightEdge.d.ts new file mode 100644 index 00000000..268be619 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/StraightEdge.d.ts @@ -0,0 +1,20 @@ +import type { StraightEdgeProps } from '../../types' + +declare const StraightEdge: import('vue').DefineComponent< + StraightEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default StraightEdge diff --git a/node_modules/@vue-flow/core/dist/components/Edges/index.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/index.d.ts new file mode 100644 index 00000000..e81e8ac7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/index.d.ts @@ -0,0 +1,10 @@ +export { default as BaseEdge } from './BaseEdge.vue' +export { default as BezierEdge } from './BezierEdge' +export { default as SimpleBezierEdge } from './SimpleBezierEdge' +export { default as StepEdge } from './StepEdge' +export { default as SmoothStepEdge } from './SmoothStepEdge' +export { default as StraightEdge } from './StraightEdge' +export { default as EdgeAnchor } from './EdgeAnchor' +export { default as EdgeText } from './EdgeText.vue' +export { default as EdgeWrapper } from './EdgeWrapper' +export { default as EdgeLabelRenderer } from './EdgeLabelRenderer.vue' diff --git a/node_modules/@vue-flow/core/dist/components/Edges/simple-bezier.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/simple-bezier.d.ts new file mode 100644 index 00000000..c46974e5 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/simple-bezier.d.ts @@ -0,0 +1,31 @@ +import type { Position } from '../../types' + +export interface GetSimpleBezierPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position +} +/** + * Get a simple bezier path from source to target handle (no curvature) + * @public + * + * @param simpleBezierPathParams + * @param simpleBezierPathParams.sourceX - The x position of the source handle + * @param simpleBezierPathParams.sourceY - The y position of the source handle + * @param simpleBezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param simpleBezierPathParams.targetX - The x position of the target handle + * @param simpleBezierPathParams.targetY - The y position of the target handle + * @param simpleBezierPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getSimpleBezierPath({ + sourceX, + sourceY, + sourcePosition, + targetX, + targetY, + targetPosition, +}: GetSimpleBezierPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/bezier.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/bezier.d.ts new file mode 100644 index 00000000..fad43895 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/bezier.d.ts @@ -0,0 +1,27 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetBezierPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position + curvature?: number +} +/** + * Get a bezier path from source to target handle + * @public + * + * @param bezierPathParams + * @param bezierPathParams.sourceX - The x position of the source handle + * @param bezierPathParams.sourceY - The y position of the source handle + * @param bezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param bezierPathParams.targetX - The x position of the target handle + * @param bezierPathParams.targetY - The y position of the target handle + * @param bezierPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @param bezierPathParams.curvature - The curvature of the edge (default: 0.25) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getBezierPath(bezierPathParams: GetBezierPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/general.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/general.d.ts new file mode 100644 index 00000000..e1429b5a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/general.d.ts @@ -0,0 +1,31 @@ +export type EdgePathParams = [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] +export declare function getSimpleEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, +}: { + sourceX: number + sourceY: number + targetX: number + targetY: number +}): [number, number, number, number] +export declare function getBezierEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, + sourceControlX, + sourceControlY, + targetControlX, + targetControlY, +}: { + sourceX: number + sourceY: number + targetX: number + targetY: number + sourceControlX: number + sourceControlY: number + targetControlX: number + targetControlY: number +}): [number, number, number, number] diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/index.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/index.d.ts new file mode 100644 index 00000000..5993032a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/index.d.ts @@ -0,0 +1,5 @@ +export * from './bezier' +export * from './general' +export * from './simple-bezier' +export * from './smoothstep' +export * from './straight' diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/simple-bezier.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/simple-bezier.d.ts new file mode 100644 index 00000000..18e01bdb --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/simple-bezier.d.ts @@ -0,0 +1,25 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetSimpleBezierPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position +} +/** + * Get a simple bezier path from source to target handle (no curvature) + * @public + * + * @param simpleBezierPathParams + * @param simpleBezierPathParams.sourceX - The x position of the source handle + * @param simpleBezierPathParams.sourceY - The y position of the source handle + * @param simpleBezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param simpleBezierPathParams.targetX - The x position of the target handle + * @param simpleBezierPathParams.targetY - The y position of the target handle + * @param simpleBezierPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getSimpleBezierPath(simpleBezierPathParams: GetSimpleBezierPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/smoothstep.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/smoothstep.d.ts new file mode 100644 index 00000000..412d335d --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/smoothstep.d.ts @@ -0,0 +1,30 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetSmoothStepPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position + borderRadius?: number + centerX?: number + centerY?: number + offset?: number +} +/** + * Get a smooth step path from source to target handle + * @public + * + * @param smoothStepPathParams + * @param smoothStepPathParams.sourceX - The x position of the source handle + * @param smoothStepPathParams.sourceY - The y position of the source handle + * @param smoothStepPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param smoothStepPathParams.targetX - The x position of the target handle + * @param smoothStepPathParams.targetY - The y position of the target handle + * @param smoothStepPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @param smoothStepPathParams.borderRadius - The border radius of the edge (default: 5) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getSmoothStepPath(smoothStepPathParams: GetSmoothStepPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/components/Edges/utils/straight.d.ts b/node_modules/@vue-flow/core/dist/components/Edges/utils/straight.d.ts new file mode 100644 index 00000000..35b77b9f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Edges/utils/straight.d.ts @@ -0,0 +1,20 @@ +import type { EdgePathParams } from './general' + +export interface GetStraightPathParams { + sourceX: number + sourceY: number + targetX: number + targetY: number +} +/** + * Get a straight path from source to target handle + * @public + * + * @param straightEdgeParams + * @param straightEdgeParams.sourceX - The x position of the source handle + * @param straightEdgeParams.sourceY - The y position of the source handle + * @param straightEdgeParams.targetX - The x position of the target handle + * @param straightEdgeParams.targetY - The y position of the target handle + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getStraightPath(straightEdgeParams: GetStraightPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/components/Handle/Handle.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Handle/Handle.vue.d.ts new file mode 100644 index 00000000..e6d92138 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Handle/Handle.vue.d.ts @@ -0,0 +1,79 @@ +import type { Position } from '../../types' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + type: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + } + connectable: { + type: import('vue').PropType + } + connectableStart: { + type: import('vue').PropType + } + connectableEnd: { + type: import('vue').PropType + } + }, + { + handleClick: (event: MouseEvent) => void + handlePointerDown: (event: import('../../types').MouseTouchEvent) => void + onClick: (event: MouseEvent) => void + onPointerDown: (event: MouseEvent | TouchEvent) => void + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + type: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + } + connectable: { + type: import('vue').PropType + } + connectableStart: { + type: import('vue').PropType + } + connectableEnd: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + default?(_: { id: string | undefined }): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/Nodes/DefaultNode.d.ts b/node_modules/@vue-flow/core/dist/components/Nodes/DefaultNode.d.ts new file mode 100644 index 00000000..bf8e0b86 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Nodes/DefaultNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const DefaultNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default DefaultNode diff --git a/node_modules/@vue-flow/core/dist/components/Nodes/InputNode.d.ts b/node_modules/@vue-flow/core/dist/components/Nodes/InputNode.d.ts new file mode 100644 index 00000000..547adb38 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Nodes/InputNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const InputNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default InputNode diff --git a/node_modules/@vue-flow/core/dist/components/Nodes/NodeWrapper.d.ts b/node_modules/@vue-flow/core/dist/components/Nodes/NodeWrapper.d.ts new file mode 100644 index 00000000..3dfd1955 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Nodes/NodeWrapper.d.ts @@ -0,0 +1,37 @@ +declare const NodeWrapper: import('vue').DefineComponent< + Readonly<{ + id?: any + resizeObserver?: any + }>, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes< + Readonly<{ + id?: any + resizeObserver?: any + }> + > + >, + { + readonly id?: any + readonly resizeObserver?: any + }, + {} +> +export default NodeWrapper diff --git a/node_modules/@vue-flow/core/dist/components/Nodes/OutputNode.d.ts b/node_modules/@vue-flow/core/dist/components/Nodes/OutputNode.d.ts new file mode 100644 index 00000000..cc358cdd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Nodes/OutputNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const OutputNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default OutputNode diff --git a/node_modules/@vue-flow/core/dist/components/Nodes/index.d.ts b/node_modules/@vue-flow/core/dist/components/Nodes/index.d.ts new file mode 100644 index 00000000..107f8846 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Nodes/index.d.ts @@ -0,0 +1,4 @@ +export { default as DefaultNode } from './DefaultNode' +export { default as InputNode } from './InputNode' +export { default as OutputNode } from './OutputNode' +export { default as NodeWrapper } from './NodeWrapper' diff --git a/node_modules/@vue-flow/core/dist/components/NodesSelection/NodesSelection.vue.d.ts b/node_modules/@vue-flow/core/dist/components/NodesSelection/NodesSelection.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/NodesSelection/NodesSelection.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/components/Panel/Panel.vue.d.ts b/node_modules/@vue-flow/core/dist/components/Panel/Panel.vue.d.ts new file mode 100644 index 00000000..3608cf12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/Panel/Panel.vue.d.ts @@ -0,0 +1,38 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + position: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + position: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/UserSelection/UserSelection.vue.d.ts b/node_modules/@vue-flow/core/dist/components/UserSelection/UserSelection.vue.d.ts new file mode 100644 index 00000000..da75dbe6 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/UserSelection/UserSelection.vue.d.ts @@ -0,0 +1,30 @@ +import type { SelectionRect } from '../../types' + +declare const _default: import('vue').DefineComponent< + { + userSelectionRect: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + userSelectionRect: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/components/VueFlowProvider/VueFlowProvider.vue.d.ts b/node_modules/@vue-flow/core/dist/components/VueFlowProvider/VueFlowProvider.vue.d.ts new file mode 100644 index 00000000..398a044f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/VueFlowProvider/VueFlowProvider.vue.d.ts @@ -0,0 +1,48 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + initialNodes: { + type: import('vue').PropType[]> + } + initialEdges: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + initialNodes: { + type: import('vue').PropType[]> + } + initialEdges: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/components/index.d.ts b/node_modules/@vue-flow/core/dist/components/index.d.ts new file mode 100644 index 00000000..a441f7e8 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/components/index.d.ts @@ -0,0 +1,6 @@ +export * from './Nodes' +export * from './Edges' +export { default as ConnectionLine } from './ConnectionLine' +export { default as Handle } from './Handle/Handle.vue' +export { default as NodesSelection } from './NodesSelection/NodesSelection.vue' +export { default as UserSelection } from './UserSelection/UserSelection.vue' diff --git a/node_modules/@vue-flow/core/dist/composables/index.d.ts b/node_modules/@vue-flow/core/dist/composables/index.d.ts new file mode 100644 index 00000000..5f6ba8c3 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/index.d.ts @@ -0,0 +1,13 @@ +export * from './useDrag' +export * from './useEdge' +export * from './useEdgeHooks' +export * from './useGetPointerPosition' +export * from './useHandle' +export * from './useKeyPress' +export * from './useNode' +export * from './useNodeHooks' +export * from './useUpdateNodePositions' +export * from './useViewportHelper' +export * from './useVueFlow' +export * from './useWatchProps' +export * from './useZoomPanHelper' diff --git a/node_modules/@vue-flow/core/dist/composables/useConnection.d.ts b/node_modules/@vue-flow/core/dist/composables/useConnection.d.ts new file mode 100644 index 00000000..2090cd16 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useConnection.d.ts @@ -0,0 +1,12 @@ +/** + * Composable for accessing the currently ongoing connection. + * + * @public + * @returns current connection: startHandle, endHandle, status, position + */ +export declare function useConnection(): { + startHandle: import('vue').Ref + endHandle: import('vue').Ref + status: import('vue').Ref + position: import('vue').Ref +} diff --git a/node_modules/@vue-flow/core/dist/composables/useDrag.d.ts b/node_modules/@vue-flow/core/dist/composables/useDrag.d.ts new file mode 100644 index 00000000..c129f183 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useDrag.d.ts @@ -0,0 +1,24 @@ +import type { D3DragEvent, SubjectPosition } from 'd3-drag' +import type { MaybeRefOrGetter, Ref } from 'vue' +import type { MouseTouchEvent, NodeDragEvent } from '../types' + +export type UseDragEvent = D3DragEvent +interface UseDragParams { + onStart: (event: NodeDragEvent) => void + onDrag: (event: NodeDragEvent) => void + onStop: (event: NodeDragEvent) => void + onClick?: (event: MouseTouchEvent) => void + el: Ref + disabled?: MaybeRefOrGetter + selectable?: MaybeRefOrGetter + dragHandle?: MaybeRefOrGetter + id?: string +} +/** + * Composable that provides drag behavior for nodes + * + * @internal + * @param params + */ +export declare function useDrag(params: UseDragParams): import('vue').ShallowRef +export {} diff --git a/node_modules/@vue-flow/core/dist/composables/useEdge.d.ts b/node_modules/@vue-flow/core/dist/composables/useEdge.d.ts new file mode 100644 index 00000000..4ffceca0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useEdge.d.ts @@ -0,0 +1,20 @@ +import type { CustomEvent, ElementData } from '../types' + +/** + * Composable that provides access to an edge object and it's dom element + * + * If no edge id is provided, the edge id is injected from context + * + * If you do not provide an id, this composable has to be called in a child of your custom edge component, or it will throw + * + * @public + * @param id - The id of the edge to access + * @returns the edge id, the edge and the edge dom element + */ +export declare function useEdge = any>( + id?: string, +): { + id: string + edge: import('../types').GraphEdge + edgeEl: import('vue').Ref +} diff --git a/node_modules/@vue-flow/core/dist/composables/useEdgeHooks.d.ts b/node_modules/@vue-flow/core/dist/composables/useEdgeHooks.d.ts new file mode 100644 index 00000000..4bda43c4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useEdgeHooks.d.ts @@ -0,0 +1,14 @@ +import type { EdgeEventsEmit, EdgeEventsOn, GraphEdge, VueFlowStore } from '../types' + +/** + * Composable for handling edge events + * + * @internal + */ +export declare function useEdgeHooks( + edge: GraphEdge, + emits: VueFlowStore['emits'], +): { + emit: EdgeEventsEmit + on: EdgeEventsOn +} diff --git a/node_modules/@vue-flow/core/dist/composables/useEdgesData.d.ts b/node_modules/@vue-flow/core/dist/composables/useEdgesData.d.ts new file mode 100644 index 00000000..d024fa11 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useEdgesData.d.ts @@ -0,0 +1,27 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { Edge, GraphEdge } from '../types' + +interface EdgeData { + id: string + type: EdgeType['type'] + data: NonNullable | null +} +/** + * Composable for receiving data of one or multiple nodes + * + * @public + * @param edgeId - The id (or ids) of the node to get the data from + * @param guard - Optional guard function to narrow down the node type + * @returns An array of data objects + */ +export declare function useEdgesData( + edgeId: MaybeRefOrGetter, +): ComputedRef | null> +export declare function useEdgesData( + edgeIds: MaybeRefOrGetter, +): ComputedRef[]> +export declare function useEdgesData( + edgeIds: MaybeRefOrGetter, + guard: (node: Edge) => node is EdgeType, +): ComputedRef[]> +export {} diff --git a/node_modules/@vue-flow/core/dist/composables/useGetPointerPosition.d.ts b/node_modules/@vue-flow/core/dist/composables/useGetPointerPosition.d.ts new file mode 100644 index 00000000..bffdd4c0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useGetPointerPosition.d.ts @@ -0,0 +1,14 @@ +import type { MouseTouchEvent } from '../types' +import type { UseDragEvent } from './useDrag' + +/** + * Composable that returns a function to get the pointer position + * + * @internal + */ +export declare function useGetPointerPosition(): (event: UseDragEvent | MouseTouchEvent) => { + x: number + y: number + xSnapped: number + ySnapped: number +} diff --git a/node_modules/@vue-flow/core/dist/composables/useHandle.d.ts b/node_modules/@vue-flow/core/dist/composables/useHandle.d.ts new file mode 100644 index 00000000..6f1cff4a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useHandle.d.ts @@ -0,0 +1,31 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { Connection, HandleType, MouseTouchEvent, ValidConnectionFunc } from '../types' + +export interface UseHandleProps { + handleId: MaybeRefOrGetter + nodeId: MaybeRefOrGetter + type: MaybeRefOrGetter + isValidConnection?: MaybeRefOrGetter + edgeUpdaterType?: MaybeRefOrGetter + onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void + onEdgeUpdateEnd?: (event: MouseTouchEvent) => void +} +/** + * This composable provides listeners for handle events + * + * Generally it's recommended to use the `` component instead of this composable. + * + * @public + */ +export declare function useHandle({ + handleId, + nodeId, + type, + isValidConnection, + edgeUpdaterType, + onEdgeUpdate, + onEdgeUpdateEnd, +}: UseHandleProps): { + handlePointerDown: (event: MouseTouchEvent) => void + handleClick: (event: MouseEvent) => void +} diff --git a/node_modules/@vue-flow/core/dist/composables/useHandleConnections.d.ts b/node_modules/@vue-flow/core/dist/composables/useHandleConnections.d.ts new file mode 100644 index 00000000..737a300c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useHandleConnections.d.ts @@ -0,0 +1,25 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { HandleConnection, HandleType } from '../types' + +export interface UseHandleConnectionsParams { + type: MaybeRefOrGetter + id?: MaybeRefOrGetter + nodeId?: MaybeRefOrGetter + onConnect?: (connections: HandleConnection[]) => void + onDisconnect?: (connections: HandleConnection[]) => void +} +/** + * Composable that returns existing connections of a ``. + * + * @deprecated use `useNodeConnections` instead + * @public + * @param params + * @param params.type - handle type `source` or `target` + * @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used + * @param params.id - the handle id (this is required if the node has multiple handles of the same type) + * @param params.onConnect - gets called when a connection is created + * @param params.onDisconnect - gets called when a connection is removed + * + * @returns An array of connections + */ +export declare function useHandleConnections(params: UseHandleConnectionsParams): ComputedRef diff --git a/node_modules/@vue-flow/core/dist/composables/useKeyPress.d.ts b/node_modules/@vue-flow/core/dist/composables/useKeyPress.d.ts new file mode 100644 index 00000000..93f14f80 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useKeyPress.d.ts @@ -0,0 +1,20 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { KeyFilter } from '@vueuse/core' + +export interface UseKeyPressOptions { + target?: MaybeRefOrGetter + actInsideInputWithModifier?: MaybeRefOrGetter + preventDefault?: MaybeRefOrGetter +} +export declare function isInputDOMNode(event: KeyboardEvent): boolean +/** + * Composable that returns a boolean value if a key is pressed + * + * @public + * @param keyFilter - Can be a boolean, a string, an array of strings or a function that returns a boolean. If it's a boolean, it will act as if the key is always pressed. If it's a string, it will return true if a key matching that string is pressed. If it's an array of strings, it will return true if any of the strings match a key being pressed, or a combination (e.g. ['ctrl+a', 'ctrl+b']) + * @param options - Options object + */ +export declare function useKeyPress( + keyFilter: MaybeRefOrGetter, + options?: UseKeyPressOptions, +): import('vue').ShallowRef diff --git a/node_modules/@vue-flow/core/dist/composables/useNode.d.ts b/node_modules/@vue-flow/core/dist/composables/useNode.d.ts new file mode 100644 index 00000000..923aca34 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNode.d.ts @@ -0,0 +1,22 @@ +import type { CustomEvent, ElementData } from '../types' + +/** + * Composable that provides access to a node object, parent node object, connected edges and it's dom element + * + * If no node id is provided, the node id is injected from context + * + * If you do not provide an id, this composable has to be called in a child of your custom node component, or it will throw + * + * @public + * @param id - The id of the node to access + * @returns the node id, the node, the node dom element, it's parent and connected edges + */ +export declare function useNode = any>( + id?: string, +): { + id: string + nodeEl: import('vue').Ref + node: import('../types').GraphNode + parentNode: import('vue').ComputedRef | undefined> + connectedEdges: import('vue').ComputedRef +} diff --git a/node_modules/@vue-flow/core/dist/composables/useNodeConnections.d.ts b/node_modules/@vue-flow/core/dist/composables/useNodeConnections.d.ts new file mode 100644 index 00000000..bf49bd0f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNodeConnections.d.ts @@ -0,0 +1,24 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { HandleType, NodeConnection } from '../types' + +export interface UseNodeConnectionsParams { + handleType?: MaybeRefOrGetter + handleId?: MaybeRefOrGetter + nodeId?: MaybeRefOrGetter + onConnect?: (connections: NodeConnection[]) => void + onDisconnect?: (connections: NodeConnection[]) => void +} +/** + * Hook to retrieve all edges connected to a node. Can be filtered by handle type and id. + * + * @public + * @param params + * @param params.handleType - handle type `source` or `target` + * @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used + * @param params.handleId - the handle id (this is required if the node has multiple handles of the same type) + * @param params.onConnect - gets called when a connection is created + * @param params.onDisconnect - gets called when a connection is removed + * + * @returns An array of connections + */ +export declare function useNodeConnections(params?: UseNodeConnectionsParams): import('vue').ComputedRef diff --git a/node_modules/@vue-flow/core/dist/composables/useNodeHooks.d.ts b/node_modules/@vue-flow/core/dist/composables/useNodeHooks.d.ts new file mode 100644 index 00000000..78a2c93f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNodeHooks.d.ts @@ -0,0 +1,14 @@ +import type { GraphNode, NodeEventsEmit, NodeEventsOn, VueFlowStore } from '../types' + +/** + * Composable for handling node events + * + * @internal + */ +export declare function useNodeHooks( + node: GraphNode, + emits: VueFlowStore['emits'], +): { + emit: NodeEventsEmit + on: NodeEventsOn +} diff --git a/node_modules/@vue-flow/core/dist/composables/useNodeId.d.ts b/node_modules/@vue-flow/core/dist/composables/useNodeId.d.ts new file mode 100644 index 00000000..4f19d691 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNodeId.d.ts @@ -0,0 +1,9 @@ +/** + * This composable returns the current node id from the ctx. + * + * It should be used inside a (custom-)node components ctx as the id is provided by the internal `NodeWrapper` component. + * + * @public + * @returns the current node id + */ +export declare function useNodeId(): string diff --git a/node_modules/@vue-flow/core/dist/composables/useNodesData.d.ts b/node_modules/@vue-flow/core/dist/composables/useNodesData.d.ts new file mode 100644 index 00000000..6b5628bc --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNodesData.d.ts @@ -0,0 +1,27 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { GraphNode, Node } from '../types' + +interface NodeData { + id: string + type: NodeType['type'] + data: NonNullable +} +/** + * Composable for receiving data of one or multiple nodes + * + * @public + * @param nodeId - The id (or ids) of the node to get the data from + * @param guard - Optional guard function to narrow down the node type + * @returns An array of data objects + */ +export declare function useNodesData( + nodeId: MaybeRefOrGetter, +): ComputedRef | null> +export declare function useNodesData( + nodeIds: MaybeRefOrGetter, +): ComputedRef[]> +export declare function useNodesData( + nodeIds: MaybeRefOrGetter, + guard: (node: Node) => node is NodeType, +): ComputedRef[]> +export {} diff --git a/node_modules/@vue-flow/core/dist/composables/useNodesInitialized.d.ts b/node_modules/@vue-flow/core/dist/composables/useNodesInitialized.d.ts new file mode 100644 index 00000000..adb1338a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useNodesInitialized.d.ts @@ -0,0 +1,15 @@ +export interface UseNodesInitializedOptions { + includeHiddenNodes?: boolean +} +/** + * Composable for getting the initialized state of all nodes. + * + * When a new node is added to the graph, it is not immediately initialized. + * That's because the node's bounds are not yet known. + * This composable will return false and then true when all nodes are initialized, i.e. when their bounds are known. + * + * @public + * @param options - Options + * @returns boolean indicating whether all nodes are initialized + */ +export declare function useNodesInitialized(options?: UseNodesInitializedOptions): import('vue').ComputedRef diff --git a/node_modules/@vue-flow/core/dist/composables/useOnInitHandler.d.ts b/node_modules/@vue-flow/core/dist/composables/useOnInitHandler.d.ts new file mode 100644 index 00000000..16589336 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useOnInitHandler.d.ts @@ -0,0 +1,6 @@ +/** + * Composable that handles the initialization of the viewport. + * + * @internal + */ +export declare function useOnInitHandler(): void diff --git a/node_modules/@vue-flow/core/dist/composables/useResizeHandler.d.ts b/node_modules/@vue-flow/core/dist/composables/useResizeHandler.d.ts new file mode 100644 index 00000000..53633240 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useResizeHandler.d.ts @@ -0,0 +1,9 @@ +import type { Ref } from 'vue' + +/** + * Composable that handles the resize of the viewport. + * + * @internal + * @param viewportEl + */ +export declare function useResizeHandler(viewportEl: Ref): void diff --git a/node_modules/@vue-flow/core/dist/composables/useStylesLoadedWarning.d.ts b/node_modules/@vue-flow/core/dist/composables/useStylesLoadedWarning.d.ts new file mode 100644 index 00000000..69bf1ef8 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useStylesLoadedWarning.d.ts @@ -0,0 +1 @@ +export declare function useStylesLoadedWarning(): void diff --git a/node_modules/@vue-flow/core/dist/composables/useUpdateNodePositions.d.ts b/node_modules/@vue-flow/core/dist/composables/useUpdateNodePositions.d.ts new file mode 100644 index 00000000..3a62a006 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useUpdateNodePositions.d.ts @@ -0,0 +1,8 @@ +import type { XYPosition } from '../types' + +/** + * Composable for updating the position of nodes. + * + * @internal + */ +export declare function useUpdateNodePositions(): (positionDiff: XYPosition, isShiftPressed?: boolean) => void diff --git a/node_modules/@vue-flow/core/dist/composables/useViewport.d.ts b/node_modules/@vue-flow/core/dist/composables/useViewport.d.ts new file mode 100644 index 00000000..764fe7b4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useViewport.d.ts @@ -0,0 +1,8 @@ +import type { ComputedGetters, Project, State, ViewportFunctions } from '../types' + +export interface ViewportHelper extends ViewportFunctions { + viewportInitialized: boolean + screenToFlowCoordinate: Project + flowToScreenCoordinate: Project +} +export declare function useViewport(state: State, getters: ComputedGetters): import('vue').ComputedRef diff --git a/node_modules/@vue-flow/core/dist/composables/useViewportHelper.d.ts b/node_modules/@vue-flow/core/dist/composables/useViewportHelper.d.ts new file mode 100644 index 00000000..4ef7a656 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useViewportHelper.d.ts @@ -0,0 +1,20 @@ +import type { D3Selection, Project, State, ViewportFunctions } from '../types' + +export interface ViewportHelper extends ViewportFunctions { + viewportInitialized: boolean + screenToFlowCoordinate: Project + flowToScreenCoordinate: Project +} +/** + * Composable that provides viewport helper functions. + * + * @internal + * @param state + */ +export declare function useViewportHelper(state: State): import('vue').ComputedRef +export declare function getD3Transition( + selection: D3Selection, + duration?: number, + ease?: (t: number) => number, + onEnd?: () => void, +): D3Selection | import('d3-transition').Transition diff --git a/node_modules/@vue-flow/core/dist/composables/useVueFlow.d.ts b/node_modules/@vue-flow/core/dist/composables/useVueFlow.d.ts new file mode 100644 index 00000000..80075ae0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useVueFlow.d.ts @@ -0,0 +1,15 @@ +import type { FlowOptions, VueFlowStore } from '../types' + +/** + * Composable that provides access to a store instance + * + * If no id is provided, the store instance is injected from context + * + * If no store instance is found in context, a new store instance is created and registered in storage + * + * @public + * @returns a vue flow store instance + * @param idOrOpts - id of the store instance or options to create a new store instance + */ +export declare function useVueFlow(id?: string): VueFlowStore +export declare function useVueFlow(options?: FlowOptions): VueFlowStore diff --git a/node_modules/@vue-flow/core/dist/composables/useWatchProps.d.ts b/node_modules/@vue-flow/core/dist/composables/useWatchProps.d.ts new file mode 100644 index 00000000..fcbe1b1f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useWatchProps.d.ts @@ -0,0 +1,16 @@ +import type { ToRefs } from 'vue' +import type { FlowProps, VueFlowStore } from '../types' + +/** + * Watches props and updates the store accordingly + * + * @internal + * @param models + * @param props + * @param store + */ +export declare function useWatchProps( + models: ToRefs>, + props: FlowProps, + store: VueFlowStore, +): () => void diff --git a/node_modules/@vue-flow/core/dist/composables/useWindow.d.ts b/node_modules/@vue-flow/core/dist/composables/useWindow.d.ts new file mode 100644 index 00000000..a9dfe27b --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useWindow.d.ts @@ -0,0 +1,11 @@ +type UseWindow = Window & + typeof globalThis & { + chrome?: any + } +/** + * Returns the window object + * + * @internal + */ +export declare function useWindow(): UseWindow +export {} diff --git a/node_modules/@vue-flow/core/dist/composables/useXYDrag.d.ts b/node_modules/@vue-flow/core/dist/composables/useXYDrag.d.ts new file mode 100644 index 00000000..0f8dda60 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useXYDrag.d.ts @@ -0,0 +1,24 @@ +import type { Ref } from 'vue' + +interface UseDragParams { + nodeElement: Ref + disabled?: Ref + noDragClassName?: Ref + handleSelector?: Ref + nodeId?: Ref + isSelectable?: Ref +} +/** + * Hook for calling XYDrag helper from @xyflow/system. + * + * @internal + */ +export declare function useDrag({ + nodeElement, + disabled, + noDragClassName, + handleSelector, + nodeId, + isSelectable, +}: UseDragParams): Ref +export {} diff --git a/node_modules/@vue-flow/core/dist/composables/useZoomPanHelper.d.ts b/node_modules/@vue-flow/core/dist/composables/useZoomPanHelper.d.ts new file mode 100644 index 00000000..2dcb3189 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/composables/useZoomPanHelper.d.ts @@ -0,0 +1,6 @@ +import type { ViewportFunctions } from '../types' + +/** + * @deprecated use {@link useVueFlow} instead (all viewport functions are also available in {@link useVueFlow}) + */ +export declare function useZoomPanHelper(vueFlowId?: string): ViewportFunctions diff --git a/node_modules/@vue-flow/core/dist/container/EdgeRenderer/EdgeRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/EdgeRenderer.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/EdgeRenderer.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/container/EdgeRenderer/Marker.vue.d.ts b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/Marker.vue.d.ts new file mode 100644 index 00000000..522bc44c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/Marker.vue.d.ts @@ -0,0 +1,28 @@ +import type { MarkerProps } from '../../types/edge' + +declare const _default: import('vue').DefineComponent< + __VLS_TypePropsToRuntimeProps, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>>, + {} +> +export default _default +type __VLS_NonUndefinedable = T extends undefined ? never : T +type __VLS_TypePropsToRuntimeProps = { + [K in keyof T]-?: {} extends Pick + ? { + type: import('vue').PropType<__VLS_NonUndefinedable> + } + : { + type: import('vue').PropType + required: true + } +} diff --git a/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerDefinitions.vue.d.ts b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerDefinitions.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerDefinitions.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerSymbols.vue.d.ts b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerSymbols.vue.d.ts new file mode 100644 index 00000000..2b3f4bb2 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/EdgeRenderer/MarkerSymbols.vue.d.ts @@ -0,0 +1,72 @@ +declare const _default: import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + required: true + } + type: { + type: import('vue').PropType + required: true + } + color: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + markerUnits: { + type: import('vue').PropType + } + orient: { + type: import('vue').PropType + } + strokeWidth: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + required: true + } + type: { + type: import('vue').PropType + required: true + } + color: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + markerUnits: { + type: import('vue').PropType + } + orient: { + type: import('vue').PropType + } + strokeWidth: { + type: import('vue').PropType + } + }> + >, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/container/NodeRenderer/NodeRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/container/NodeRenderer/NodeRenderer.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/NodeRenderer/NodeRenderer.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/container/Pane/Pane.vue.d.ts b/node_modules/@vue-flow/core/dist/container/Pane/Pane.vue.d.ts new file mode 100644 index 00000000..05370d9c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/Pane/Pane.vue.d.ts @@ -0,0 +1,46 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + isSelecting: { + type: import('vue').PropType + required: true + } + selectionKeyPressed: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + isSelecting: { + type: import('vue').PropType + required: true + } + selectionKeyPressed: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/Pane/utils.d.ts b/node_modules/@vue-flow/core/dist/container/Pane/utils.d.ts new file mode 100644 index 00000000..6cf790eb --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/Pane/utils.d.ts @@ -0,0 +1,3 @@ +import type { XYPosition } from '../../types' + +export declare function getMousePosition(event: MouseEvent, containerBounds: DOMRect): XYPosition diff --git a/node_modules/@vue-flow/core/dist/container/Viewport/Transform.vue.d.ts b/node_modules/@vue-flow/core/dist/container/Viewport/Transform.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/Viewport/Transform.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/Viewport/Viewport.vue.d.ts b/node_modules/@vue-flow/core/dist/container/Viewport/Viewport.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/Viewport/Viewport.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/Viewport/XYViewport.vue.d.ts b/node_modules/@vue-flow/core/dist/container/Viewport/XYViewport.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/Viewport/XYViewport.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/VueFlow/VueFlow.vue.d.ts b/node_modules/@vue-flow/core/dist/container/VueFlow/VueFlow.vue.d.ts new file mode 100644 index 00000000..2ca8af1f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/VueFlow/VueFlow.vue.d.ts @@ -0,0 +1,1135 @@ +import type { FlowSlots, VueFlowStore } from '../../types' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + nodes: { + type: import('vue').PropType[]> + } + edges: { + type: import('vue').PropType + } + modelValue: { + type: import('vue').PropType> + } + edgeTypes: { + type: import('vue').PropType + } + nodeTypes: { + type: import('vue').PropType + } + connectionMode: { + type: import('vue').PropType + } + connectionLineType: { + type: import('vue').PropType + } + connectionLineStyle: { + type: import('vue').PropType + default: undefined + } + connectionLineOptions: { + type: import('vue').PropType + default: undefined + } + connectionRadius: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + default: undefined + } + deleteKeyCode: { + type: import('vue').PropType + default: undefined + } + selectionKeyCode: { + type: import('vue').PropType + default: undefined + } + multiSelectionKeyCode: { + type: import('vue').PropType + default: undefined + } + zoomActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + panActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + snapToGrid: { + type: import('vue').PropType + default: undefined + } + snapGrid: { + type: import('vue').PropType + } + onlyRenderVisibleElements: { + type: import('vue').PropType + default: undefined + } + edgesUpdatable: { + type: import('vue').PropType + default: undefined + } + nodesDraggable: { + type: import('vue').PropType + default: undefined + } + nodesConnectable: { + type: import('vue').PropType + default: undefined + } + nodeDragThreshold: { + type: import('vue').PropType + } + elementsSelectable: { + type: import('vue').PropType + default: undefined + } + selectNodesOnDrag: { + type: import('vue').PropType + default: undefined + } + panOnDrag: { + type: import('vue').PropType + default: undefined + } + minZoom: { + type: import('vue').PropType + } + maxZoom: { + type: import('vue').PropType + } + defaultViewport: { + type: import('vue').PropType> + } + translateExtent: { + type: import('vue').PropType + } + nodeExtent: { + type: import('vue').PropType + } + defaultMarkerColor: { + type: import('vue').PropType + } + zoomOnScroll: { + type: import('vue').PropType + default: undefined + } + zoomOnPinch: { + type: import('vue').PropType + default: undefined + } + panOnScroll: { + type: import('vue').PropType + default: undefined + } + panOnScrollSpeed: { + type: import('vue').PropType + } + panOnScrollMode: { + type: import('vue').PropType + } + paneClickDistance: { + type: import('vue').PropType + } + zoomOnDoubleClick: { + type: import('vue').PropType + default: undefined + } + preventScrolling: { + type: import('vue').PropType + default: undefined + } + selectionMode: { + type: import('vue').PropType + } + edgeUpdaterRadius: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + default: undefined + } + connectOnClick: { + type: import('vue').PropType + default: undefined + } + applyDefault: { + type: import('vue').PropType + default: undefined + } + autoConnect: { + type: import('vue').PropType + default: undefined + } + noDragClassName: { + type: import('vue').PropType + } + noWheelClassName: { + type: import('vue').PropType + } + noPanClassName: { + type: import('vue').PropType + } + defaultEdgeOptions: { + type: import('vue').PropType + } + elevateEdgesOnSelect: { + type: import('vue').PropType + default: undefined + } + elevateNodesOnSelect: { + type: import('vue').PropType + default: undefined + } + disableKeyboardA11y: { + type: import('vue').PropType + default: undefined + } + edgesFocusable: { + type: import('vue').PropType + default: undefined + } + nodesFocusable: { + type: import('vue').PropType + default: undefined + } + autoPanOnConnect: { + type: import('vue').PropType + default: undefined + } + autoPanOnNodeDrag: { + type: import('vue').PropType + default: undefined + } + autoPanSpeed: { + type: import('vue').PropType + } + }, + { + id: string + emits: Readonly<{ + nodesChange: import('@vueuse/shared').EventHookTrigger + edgesChange: import('@vueuse/shared').EventHookTrigger + nodeDoubleClick: import('@vueuse/shared').EventHookTrigger + nodeClick: import('@vueuse/shared').EventHookTrigger + nodeMouseEnter: import('@vueuse/shared').EventHookTrigger + nodeMouseMove: import('@vueuse/shared').EventHookTrigger + nodeMouseLeave: import('@vueuse/shared').EventHookTrigger + nodeContextMenu: import('@vueuse/shared').EventHookTrigger + nodeDragStart: import('@vueuse/shared').EventHookTrigger + nodeDrag: import('@vueuse/shared').EventHookTrigger + nodeDragStop: import('@vueuse/shared').EventHookTrigger + nodesInitialized: import('@vueuse/shared').EventHookTrigger[]> + updateNodeInternals: import('@vueuse/shared').EventHookTrigger + miniMapNodeClick: import('@vueuse/shared').EventHookTrigger + miniMapNodeDoubleClick: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseEnter: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseMove: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseLeave: import('@vueuse/shared').EventHookTrigger + connect: import('@vueuse/shared').EventHookTrigger + connectStart: import('@vueuse/shared').EventHookTrigger< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + connectEnd: import('@vueuse/shared').EventHookTrigger + clickConnectStart: import('@vueuse/shared').EventHookTrigger< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + clickConnectEnd: import('@vueuse/shared').EventHookTrigger + paneReady: import('@vueuse/shared').EventHookTrigger + init: import('@vueuse/shared').EventHookTrigger + move: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveStart: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveEnd: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + selectionDragStart: import('@vueuse/shared').EventHookTrigger + selectionDrag: import('@vueuse/shared').EventHookTrigger + selectionDragStop: import('@vueuse/shared').EventHookTrigger + selectionContextMenu: import('@vueuse/shared').EventHookTrigger<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + selectionStart: import('@vueuse/shared').EventHookTrigger + selectionEnd: import('@vueuse/shared').EventHookTrigger + viewportChangeStart: import('@vueuse/shared').EventHookTrigger + viewportChange: import('@vueuse/shared').EventHookTrigger + viewportChangeEnd: import('@vueuse/shared').EventHookTrigger + paneScroll: import('@vueuse/shared').EventHookTrigger + paneClick: import('@vueuse/shared').EventHookTrigger + paneContextMenu: import('@vueuse/shared').EventHookTrigger + paneMouseEnter: import('@vueuse/shared').EventHookTrigger + paneMouseMove: import('@vueuse/shared').EventHookTrigger + paneMouseLeave: import('@vueuse/shared').EventHookTrigger + edgeContextMenu: import('@vueuse/shared').EventHookTrigger + edgeMouseEnter: import('@vueuse/shared').EventHookTrigger + edgeMouseMove: import('@vueuse/shared').EventHookTrigger + edgeMouseLeave: import('@vueuse/shared').EventHookTrigger + edgeDoubleClick: import('@vueuse/shared').EventHookTrigger + edgeClick: import('@vueuse/shared').EventHookTrigger + edgeUpdateStart: import('@vueuse/shared').EventHookTrigger + edgeUpdate: import('@vueuse/shared').EventHookTrigger + edgeUpdateEnd: import('@vueuse/shared').EventHookTrigger + error: import('@vueuse/shared').EventHookTrigger< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + }> + nodeLookup: import('vue').ComputedRef + edgeLookup: import('vue').ComputedRef + vueFlowVersion: string + onNodesChange: import('@vueuse/shared').EventHookOn + onEdgesChange: import('@vueuse/shared').EventHookOn + onNodeDoubleClick: import('@vueuse/shared').EventHookOn + onNodeClick: import('@vueuse/shared').EventHookOn + onNodeMouseEnter: import('@vueuse/shared').EventHookOn + onNodeMouseMove: import('@vueuse/shared').EventHookOn + onNodeMouseLeave: import('@vueuse/shared').EventHookOn + onNodeContextMenu: import('@vueuse/shared').EventHookOn + onNodeDragStart: import('@vueuse/shared').EventHookOn + onNodeDrag: import('@vueuse/shared').EventHookOn + onNodeDragStop: import('@vueuse/shared').EventHookOn + onNodesInitialized: import('@vueuse/shared').EventHookOn[]> + onUpdateNodeInternals: import('@vueuse/shared').EventHookOn + onMiniMapNodeClick: import('@vueuse/shared').EventHookOn + onMiniMapNodeDoubleClick: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseEnter: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseMove: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseLeave: import('@vueuse/shared').EventHookOn + onConnect: import('@vueuse/shared').EventHookOn + onConnectStart: import('@vueuse/shared').EventHookOn< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + onConnectEnd: import('@vueuse/shared').EventHookOn + onClickConnectStart: import('@vueuse/shared').EventHookOn< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + onClickConnectEnd: import('@vueuse/shared').EventHookOn + onPaneReady: import('@vueuse/shared').EventHookOn + onInit: import('@vueuse/shared').EventHookOn + onMove: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onMoveStart: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onMoveEnd: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onSelectionDragStart: import('@vueuse/shared').EventHookOn + onSelectionDrag: import('@vueuse/shared').EventHookOn + onSelectionDragStop: import('@vueuse/shared').EventHookOn + onSelectionContextMenu: import('@vueuse/shared').EventHookOn<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + onSelectionStart: import('@vueuse/shared').EventHookOn + onSelectionEnd: import('@vueuse/shared').EventHookOn + onViewportChangeStart: import('@vueuse/shared').EventHookOn + onViewportChange: import('@vueuse/shared').EventHookOn + onViewportChangeEnd: import('@vueuse/shared').EventHookOn + onPaneScroll: import('@vueuse/shared').EventHookOn + onPaneClick: import('@vueuse/shared').EventHookOn + onPaneContextMenu: import('@vueuse/shared').EventHookOn + onPaneMouseEnter: import('@vueuse/shared').EventHookOn + onPaneMouseMove: import('@vueuse/shared').EventHookOn + onPaneMouseLeave: import('@vueuse/shared').EventHookOn + onEdgeContextMenu: import('@vueuse/shared').EventHookOn + onEdgeMouseEnter: import('@vueuse/shared').EventHookOn + onEdgeMouseMove: import('@vueuse/shared').EventHookOn + onEdgeMouseLeave: import('@vueuse/shared').EventHookOn + onEdgeDoubleClick: import('@vueuse/shared').EventHookOn + onEdgeClick: import('@vueuse/shared').EventHookOn + onEdgeUpdateStart: import('@vueuse/shared').EventHookOn + onEdgeUpdate: import('@vueuse/shared').EventHookOn + onEdgeUpdateEnd: import('@vueuse/shared').EventHookOn + onError: import('@vueuse/shared').EventHookOn< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + vueFlowRef: import('vue').Ref + viewportRef: import('vue').Ref + hooks: import('vue').Ref< + Readonly<{ + nodesChange: import('../../utils').EventHookExtended + edgesChange: import('../../utils').EventHookExtended + nodeDoubleClick: import('../../utils').EventHookExtended + nodeClick: import('../../utils').EventHookExtended + nodeMouseEnter: import('../../utils').EventHookExtended + nodeMouseMove: import('../../utils').EventHookExtended + nodeMouseLeave: import('../../utils').EventHookExtended + nodeContextMenu: import('../../utils').EventHookExtended + nodeDragStart: import('../../utils').EventHookExtended + nodeDrag: import('../../utils').EventHookExtended + nodeDragStop: import('../../utils').EventHookExtended + nodesInitialized: import('../../utils').EventHookExtended[]> + updateNodeInternals: import('../../utils').EventHookExtended + miniMapNodeClick: import('../../utils').EventHookExtended + miniMapNodeDoubleClick: import('../../utils').EventHookExtended + miniMapNodeMouseEnter: import('../../utils').EventHookExtended + miniMapNodeMouseMove: import('../../utils').EventHookExtended + miniMapNodeMouseLeave: import('../../utils').EventHookExtended + connect: import('../../utils').EventHookExtended + connectStart: import('../../utils').EventHookExtended< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + connectEnd: import('../../utils').EventHookExtended + clickConnectStart: import('../../utils').EventHookExtended< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + clickConnectEnd: import('../../utils').EventHookExtended + paneReady: import('../../utils').EventHookExtended + init: import('../../utils').EventHookExtended + move: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveStart: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveEnd: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + selectionDragStart: import('../../utils').EventHookExtended + selectionDrag: import('../../utils').EventHookExtended + selectionDragStop: import('../../utils').EventHookExtended + selectionContextMenu: import('../../utils').EventHookExtended<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + selectionStart: import('../../utils').EventHookExtended + selectionEnd: import('../../utils').EventHookExtended + viewportChangeStart: import('../../utils').EventHookExtended + viewportChange: import('../../utils').EventHookExtended + viewportChangeEnd: import('../../utils').EventHookExtended + paneScroll: import('../../utils').EventHookExtended + paneClick: import('../../utils').EventHookExtended + paneContextMenu: import('../../utils').EventHookExtended + paneMouseEnter: import('../../utils').EventHookExtended + paneMouseMove: import('../../utils').EventHookExtended + paneMouseLeave: import('../../utils').EventHookExtended + edgeContextMenu: import('../../utils').EventHookExtended + edgeMouseEnter: import('../../utils').EventHookExtended + edgeMouseMove: import('../../utils').EventHookExtended + edgeMouseLeave: import('../../utils').EventHookExtended + edgeDoubleClick: import('../../utils').EventHookExtended + edgeClick: import('../../utils').EventHookExtended + edgeUpdateStart: import('../../utils').EventHookExtended + edgeUpdate: import('../../utils').EventHookExtended + edgeUpdateEnd: import('../../utils').EventHookExtended + error: import('../../utils').EventHookExtended< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + }> + > + nodes: import('vue').Ref[]> + edges: import('vue').Ref + connectionLookup: import('vue').Ref + d3Zoom: import('vue').Ref + d3Selection: import('vue').Ref + d3ZoomHandler: import('vue').Ref + minZoom: import('vue').Ref + maxZoom: import('vue').Ref + defaultViewport: import('vue').Ref> + translateExtent: import('vue').Ref + nodeExtent: import('vue').Ref + dimensions: import('vue').Ref + viewport: import('vue').Ref + onlyRenderVisibleElements: import('vue').Ref + nodesSelectionActive: import('vue').Ref + userSelectionActive: import('vue').Ref + multiSelectionActive: import('vue').Ref + deleteKeyCode: import('vue').Ref + selectionKeyCode: import('vue').Ref + multiSelectionKeyCode: import('vue').Ref + zoomActivationKeyCode: import('vue').Ref + panActivationKeyCode: import('vue').Ref + connectionMode: import('vue').Ref + connectionLineOptions: import('vue').Ref + connectionLineType: import('vue').Ref + connectionLineStyle: import('vue').Ref + connectionStartHandle: import('vue').Ref + connectionEndHandle: import('vue').Ref + connectionClickStartHandle: import('vue').Ref + connectionPosition: import('vue').Ref + connectionRadius: import('vue').Ref + connectionStatus: import('vue').Ref + isValidConnection: import('vue').Ref + connectOnClick: import('vue').Ref + edgeUpdaterRadius: import('vue').Ref + snapToGrid: import('vue').Ref + snapGrid: import('vue').Ref + defaultMarkerColor: import('vue').Ref + edgesUpdatable: import('vue').Ref + edgesFocusable: import('vue').Ref + nodesFocusable: import('vue').Ref + nodesDraggable: import('vue').Ref + nodesConnectable: import('vue').Ref + nodeDragThreshold: import('vue').Ref + elementsSelectable: import('vue').Ref + selectNodesOnDrag: import('vue').Ref + userSelectionRect: import('vue').Ref + selectionMode: import('vue').Ref + panOnDrag: import('vue').Ref + zoomOnScroll: import('vue').Ref + zoomOnPinch: import('vue').Ref + panOnScroll: import('vue').Ref + panOnScrollSpeed: import('vue').Ref + panOnScrollMode: import('vue').Ref + paneClickDistance: import('vue').Ref + zoomOnDoubleClick: import('vue').Ref + preventScrolling: import('vue').Ref + paneDragging: import('vue').Ref + initialized: import('vue').Ref + applyDefault: import('vue').Ref + autoConnect: import('vue').Ref + fitViewOnInit: import('vue').Ref + fitViewOnInitDone: import('vue').Ref + noDragClassName: import('vue').Ref + noWheelClassName: import('vue').Ref + noPanClassName: import('vue').Ref + defaultEdgeOptions: import('vue').Ref + elevateEdgesOnSelect: import('vue').Ref + elevateNodesOnSelect: import('vue').Ref + autoPanOnConnect: import('vue').Ref + autoPanOnNodeDrag: import('vue').Ref + autoPanSpeed: import('vue').Ref + disableKeyboardA11y: import('vue').Ref + ariaLiveMessage: import('vue').Ref + edgeTypes?: import('vue').Ref | undefined + nodeTypes?: import('vue').Ref | undefined + getEdgeTypes: import('vue').ComputedRef> + getNodeTypes: import('vue').ComputedRef> + getElements: import('vue').ComputedRef + getNodes: import('vue').ComputedRef[]> + getEdges: import('vue').ComputedRef + getNode: import('vue').ComputedRef<(id: string) => import('../../types').GraphNode | undefined> + getEdge: import('vue').ComputedRef<(id: string) => import('../../types').GraphEdge | undefined> + getSelectedElements: import('vue').ComputedRef + getSelectedNodes: import('vue').ComputedRef[]> + getSelectedEdges: import('vue').ComputedRef + getNodesInitialized: import('vue').ComputedRef[]> + areNodesInitialized: import('vue').ComputedRef + setElements: import('../../types').SetElements + setNodes: import('../../types').SetNodes + setEdges: import('../../types').SetEdges + addNodes: import('../../types').AddNodes + addEdges: import('../../types').AddEdges + removeNodes: import('../../types').RemoveNodes + removeEdges: import('../../types').RemoveEdges + findNode: import('../../types').FindNode + findEdge: import('../../types').FindEdge + updateEdge: import('../../types').UpdateEdge + updateEdgeData: import('../../types').UpdateEdgeData + updateNode: import('../../types').UpdateNode + updateNodeData: import('../../types').UpdateNodeData + applyEdgeChanges: (changes: import('../../types').EdgeChange[]) => import('../../types').GraphEdge[] + applyNodeChanges: (changes: import('../../types').NodeChange[]) => import('../../types').GraphNode[] + addSelectedElements: (elements: import('../../types').FlowElements) => void + addSelectedEdges: (edges: import('../../types').GraphEdge[]) => void + addSelectedNodes: (nodes: import('../../types').GraphNode[]) => void + removeSelectedEdges: (edges: import('../../types').GraphEdge[]) => void + removeSelectedNodes: (nodes: import('../../types').GraphNode[]) => void + removeSelectedElements: (elements?: import('../../types').Elements | undefined) => void + setMinZoom: (zoom: number) => void + setMaxZoom: (zoom: number) => void + setTranslateExtent: (translateExtent: import('../../types').CoordinateExtent) => void + setNodeExtent: (nodeExtent: import('../../types').CoordinateExtent | import('../../types').CoordinateExtentRange) => void + setPaneClickDistance: (distance: number) => void + setInteractive: (isInteractive: boolean) => void + setState: import('../../types').SetState + toObject: () => import('../../types').FlowExportObject + fromObject: (obj: import('../../types').FlowExportObject) => Promise + updateNodeInternals: import('../../types').UpdateNodeInternals + startConnection: ( + startHandle: import('../../types').ConnectingHandle, + position?: import('../../types').XYPosition | undefined, + isClick?: boolean | undefined, + ) => void + updateConnection: ( + position: import('../../types').XYPosition, + result?: import('../../types').ConnectingHandle | null | undefined, + status?: import('../../types').ConnectionStatus | null | undefined, + ) => void + endConnection: (event?: MouseEvent | TouchEvent | undefined, isClick?: boolean | undefined) => void + updateNodePositions: import('../../types').UpdateNodePosition + updateNodeDimensions: import('../../types').UpdateNodeDimensions + getIntersectingNodes: import('../../types').GetIntersectingNodes + isNodeIntersecting: import('../../types').IsNodeIntersecting + getIncomers: ( + nodeOrId: string | import('../../types').Node, + ) => import('../../types').GraphNode[] + getOutgoers: ( + nodeOrId: string | import('../../types').Node, + ) => import('../../types').GraphNode[] + getConnectedEdges: (nodesOrId: string | import('../../types').Node[]) => import('../../types').GraphEdge[] + getHandleConnections: ({ + id, + type, + nodeId, + }: { + id?: string | null | undefined + type: import('../../types').HandleType + nodeId: string + }) => import('../../types').HandleConnection[] + panBy: (delta: import('../../types').XYPosition) => boolean + viewportHelper: import('vue').ComputedRef + $reset: () => void + $destroy: () => void + screenToFlowCoordinate: import('../../types').Project + flowToScreenCoordinate: import('../../types').Project + zoomIn: import('../../types').ZoomInOut + zoomOut: import('../../types').ZoomInOut + zoomTo: import('../../types').ZoomTo + setViewport: import('../../types').SetViewport + setTransform: import('../../types').SetViewport + getViewport: import('../../types').GetViewport + getTransform: import('../../types').GetViewport + fitView: import('../../types').FitView + setCenter: import('../../types').SetCenter + fitBounds: import('../../types').FitBounds + project: import('../../types').Project + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + { + 'nodesChange': (changes: import('../../types').NodeChange[]) => void + 'edgesChange': (changes: import('../../types').EdgeChange[]) => void + 'nodesInitialized': () => void + 'paneReady': (paneEvent: VueFlowStore) => void + 'init': (paneEvent: VueFlowStore) => void + 'updateNodeInternals': () => void + 'error': ( + error: import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + >, + ) => void + 'connect': (connectionEvent: import('../../types').Connection) => void + 'connectStart': ( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => void + 'connectEnd': (connectionEvent?: MouseEvent | undefined) => void + 'clickConnectStart': ( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => void + 'clickConnectEnd': (connectionEvent?: MouseEvent | undefined) => void + 'moveStart': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'move': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'moveEnd': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'selectionDragStart': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionDrag': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionDragStop': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionContextMenu': (selectionEvent: { + event: MouseEvent + nodes: import('../../types').GraphNode[] + }) => void + 'selectionStart': (selectionEvent: MouseEvent) => void + 'selectionEnd': (selectionEvent: MouseEvent) => void + 'viewportChangeStart': (viewport: import('../../types').ViewportTransform) => void + 'viewportChange': (viewport: import('../../types').ViewportTransform) => void + 'viewportChangeEnd': (viewport: import('../../types').ViewportTransform) => void + 'paneScroll': (paneScrollEvent: WheelEvent | undefined) => void + 'paneClick': (paneMouseEvent: MouseEvent) => void + 'paneContextMenu': (paneMouseEvent: MouseEvent) => void + 'paneMouseEnter': (paneMouseEvent: MouseEvent) => void + 'paneMouseMove': (paneMouseEvent: MouseEvent) => void + 'paneMouseLeave': (paneMouseEvent: MouseEvent) => void + 'edgeUpdate': (edgeUpdateEvent: import('../../types').EdgeUpdateEvent) => void + 'edgeContextMenu': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseEnter': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseMove': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseLeave': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeDoubleClick': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeClick': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeUpdateStart': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeUpdateEnd': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'nodeDoubleClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseEnter': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseMove': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseLeave': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeContextMenu': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeDragStart': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'nodeDrag': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'nodeDragStop': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'miniMapNodeClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeDoubleClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseEnter': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseMove': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseLeave': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'update:modelValue': (value: import('../../types').FlowElements) => void + 'update:nodes': (value: import('../../types').GraphNode[]) => void + 'update:edges': (value: import('../../types').GraphEdge[]) => void + }, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + nodes: { + type: import('vue').PropType[]> + } + edges: { + type: import('vue').PropType + } + modelValue: { + type: import('vue').PropType> + } + edgeTypes: { + type: import('vue').PropType + } + nodeTypes: { + type: import('vue').PropType + } + connectionMode: { + type: import('vue').PropType + } + connectionLineType: { + type: import('vue').PropType + } + connectionLineStyle: { + type: import('vue').PropType + default: undefined + } + connectionLineOptions: { + type: import('vue').PropType + default: undefined + } + connectionRadius: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + default: undefined + } + deleteKeyCode: { + type: import('vue').PropType + default: undefined + } + selectionKeyCode: { + type: import('vue').PropType + default: undefined + } + multiSelectionKeyCode: { + type: import('vue').PropType + default: undefined + } + zoomActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + panActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + snapToGrid: { + type: import('vue').PropType + default: undefined + } + snapGrid: { + type: import('vue').PropType + } + onlyRenderVisibleElements: { + type: import('vue').PropType + default: undefined + } + edgesUpdatable: { + type: import('vue').PropType + default: undefined + } + nodesDraggable: { + type: import('vue').PropType + default: undefined + } + nodesConnectable: { + type: import('vue').PropType + default: undefined + } + nodeDragThreshold: { + type: import('vue').PropType + } + elementsSelectable: { + type: import('vue').PropType + default: undefined + } + selectNodesOnDrag: { + type: import('vue').PropType + default: undefined + } + panOnDrag: { + type: import('vue').PropType + default: undefined + } + minZoom: { + type: import('vue').PropType + } + maxZoom: { + type: import('vue').PropType + } + defaultViewport: { + type: import('vue').PropType> + } + translateExtent: { + type: import('vue').PropType + } + nodeExtent: { + type: import('vue').PropType + } + defaultMarkerColor: { + type: import('vue').PropType + } + zoomOnScroll: { + type: import('vue').PropType + default: undefined + } + zoomOnPinch: { + type: import('vue').PropType + default: undefined + } + panOnScroll: { + type: import('vue').PropType + default: undefined + } + panOnScrollSpeed: { + type: import('vue').PropType + } + panOnScrollMode: { + type: import('vue').PropType + } + paneClickDistance: { + type: import('vue').PropType + } + zoomOnDoubleClick: { + type: import('vue').PropType + default: undefined + } + preventScrolling: { + type: import('vue').PropType + default: undefined + } + selectionMode: { + type: import('vue').PropType + } + edgeUpdaterRadius: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + default: undefined + } + connectOnClick: { + type: import('vue').PropType + default: undefined + } + applyDefault: { + type: import('vue').PropType + default: undefined + } + autoConnect: { + type: import('vue').PropType + default: undefined + } + noDragClassName: { + type: import('vue').PropType + } + noWheelClassName: { + type: import('vue').PropType + } + noPanClassName: { + type: import('vue').PropType + } + defaultEdgeOptions: { + type: import('vue').PropType + } + elevateEdgesOnSelect: { + type: import('vue').PropType + default: undefined + } + elevateNodesOnSelect: { + type: import('vue').PropType + default: undefined + } + disableKeyboardA11y: { + type: import('vue').PropType + default: undefined + } + edgesFocusable: { + type: import('vue').PropType + default: undefined + } + nodesFocusable: { + type: import('vue').PropType + default: undefined + } + autoPanOnConnect: { + type: import('vue').PropType + default: undefined + } + autoPanOnNodeDrag: { + type: import('vue').PropType + default: undefined + } + autoPanSpeed: { + type: import('vue').PropType + } + }> + > & { + 'onError'?: + | (( + error: import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + >, + ) => any) + | undefined + 'onMove'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onNodesChange'?: ((changes: import('../../types').NodeChange[]) => any) | undefined + 'onEdgesChange'?: ((changes: import('../../types').EdgeChange[]) => any) | undefined + 'onNodeDoubleClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseEnter'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseMove'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseLeave'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeContextMenu'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeDragStart'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodeDrag'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodeDragStop'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodesInitialized'?: (() => any) | undefined + 'onUpdateNodeInternals'?: (() => any) | undefined + 'onMiniMapNodeClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeDoubleClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseEnter'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseMove'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseLeave'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onConnect'?: ((connectionEvent: import('../../types').Connection) => any) | undefined + 'onConnectStart'?: + | (( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => any) + | undefined + 'onConnectEnd'?: ((connectionEvent?: MouseEvent | undefined) => any) | undefined + 'onClickConnectStart'?: + | (( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => any) + | undefined + 'onClickConnectEnd'?: ((connectionEvent?: MouseEvent | undefined) => any) | undefined + 'onPaneReady'?: ((paneEvent: VueFlowStore) => any) | undefined + 'onInit'?: ((paneEvent: VueFlowStore) => any) | undefined + 'onMoveStart'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onMoveEnd'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onSelectionDragStart'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionDrag'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionDragStop'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionContextMenu'?: + | ((selectionEvent: { event: MouseEvent; nodes: import('../../types').GraphNode[] }) => any) + | undefined + 'onSelectionStart'?: ((selectionEvent: MouseEvent) => any) | undefined + 'onSelectionEnd'?: ((selectionEvent: MouseEvent) => any) | undefined + 'onViewportChangeStart'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onViewportChange'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onViewportChangeEnd'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onPaneScroll'?: ((paneScrollEvent: WheelEvent | undefined) => any) | undefined + 'onPaneClick'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneContextMenu'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseEnter'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseMove'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseLeave'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onEdgeContextMenu'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseEnter'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseMove'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseLeave'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeDoubleClick'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeClick'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeUpdateStart'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeUpdate'?: ((edgeUpdateEvent: import('../../types').EdgeUpdateEvent) => any) | undefined + 'onEdgeUpdateEnd'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onUpdate:modelValue'?: ((value: import('../../types').FlowElements) => any) | undefined + 'onUpdate:nodes'?: ((value: import('../../types').GraphNode[]) => any) | undefined + 'onUpdate:edges'?: ((value: import('../../types').GraphEdge[]) => any) | undefined + }, + { + connectionLineStyle: import('vue').CSSProperties | null + connectionLineOptions: import('../../types').ConnectionLineOptions + isValidConnection: import('../../types').ValidConnectionFunc | null + deleteKeyCode: import('@vueuse/core').KeyFilter | null + selectionKeyCode: false | import('@vueuse/core').KeyFilter | null + multiSelectionKeyCode: import('@vueuse/core').KeyFilter | null + zoomActivationKeyCode: import('@vueuse/core').KeyFilter | null + panActivationKeyCode: import('@vueuse/core').KeyFilter | null + snapToGrid: boolean + onlyRenderVisibleElements: boolean + edgesUpdatable: import('../../types').EdgeUpdatable + nodesDraggable: boolean + nodesConnectable: boolean + elementsSelectable: boolean + selectNodesOnDrag: boolean + panOnDrag: boolean | number[] + zoomOnScroll: boolean + zoomOnPinch: boolean + panOnScroll: boolean + zoomOnDoubleClick: boolean + preventScrolling: boolean + fitViewOnInit: boolean + connectOnClick: boolean + applyDefault: boolean + autoConnect: boolean | import('../../types').Connector + elevateEdgesOnSelect: boolean + elevateNodesOnSelect: boolean + disableKeyboardA11y: boolean + edgesFocusable: boolean + nodesFocusable: boolean + autoPanOnConnect: boolean + autoPanOnNodeDrag: boolean + }, + {} + >, + Readonly +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/ZoomPane/XYViewport.vue.d.ts b/node_modules/@vue-flow/core/dist/container/ZoomPane/XYViewport.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/ZoomPane/XYViewport.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/ZoomPane/ZoomPane.vue.d.ts b/node_modules/@vue-flow/core/dist/container/ZoomPane/ZoomPane.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/ZoomPane/ZoomPane.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/container/index.d.ts b/node_modules/@vue-flow/core/dist/container/index.d.ts new file mode 100644 index 00000000..fdae6716 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/container/index.d.ts @@ -0,0 +1,6 @@ +export { default as VueFlow } from './VueFlow/VueFlow.vue' +export { default as EdgeRenderer } from './EdgeRenderer/EdgeRenderer.vue' +export { default as Marker } from './EdgeRenderer/Marker.vue' +export { default as MarkerDefinitions } from './EdgeRenderer/MarkerDefinitions.vue' +export { default as NodeRenderer } from './NodeRenderer/NodeRenderer.vue' +export { default as Viewport } from './Viewport/Viewport.vue' diff --git a/node_modules/@vue-flow/core/dist/context/VueFlowProvider.vue.d.ts b/node_modules/@vue-flow/core/dist/context/VueFlowProvider.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/context/VueFlowProvider.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/context/index.d.ts b/node_modules/@vue-flow/core/dist/context/index.d.ts new file mode 100644 index 00000000..75658971 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/context/index.d.ts @@ -0,0 +1,9 @@ +import type { InjectionKey, Ref } from 'vue' +import type { FlowSlots, VueFlowStore } from '../types' + +export declare const VueFlow: InjectionKey +export declare const NodeId: InjectionKey +export declare const NodeRef: InjectionKey> +export declare const EdgeId: InjectionKey +export declare const EdgeRef: InjectionKey> +export declare const Slots: InjectionKey> diff --git a/node_modules/@vue-flow/core/dist/index.d.ts b/node_modules/@vue-flow/core/dist/index.d.ts new file mode 100644 index 00000000..3bb78a4d --- /dev/null +++ b/node_modules/@vue-flow/core/dist/index.d.ts @@ -0,0 +1,71 @@ +/** + * Vue Flow + * @module vue-flow + */ +export { default as VueFlow } from './container/VueFlow/VueFlow.vue' +export { default as Handle } from './components/Handle/Handle.vue' +export { default as Panel } from './components/Panel/Panel.vue' +export { default as StraightEdge } from './components/Edges/StraightEdge' +export { default as StepEdge } from './components/Edges/StepEdge' +export { default as BezierEdge } from './components/Edges/BezierEdge' +export { default as SimpleBezierEdge } from './components/Edges/SimpleBezierEdge' +export { default as SmoothStepEdge } from './components/Edges/SmoothStepEdge' +export { default as BaseEdge } from './components/Edges/BaseEdge.vue' +export { default as EdgeText } from './components/Edges/EdgeText.vue' +export { default as EdgeLabelRenderer } from './components/Edges/EdgeLabelRenderer.vue' +export { + getBezierPath, + getSimpleBezierPath, + getSmoothStepPath, + getStraightPath, + getSimpleEdgeCenter, + getBezierEdgeCenter, +} from './components/Edges/utils' +export { + isNode, + isEdge, + isGraphNode, + isGraphEdge, + addEdge, + updateEdge, + getOutgoers, + getIncomers, + getConnectedEdges, + getTransformForBounds, + getRectOfNodes, + pointToRendererPoint, + rendererPointToPoint, + /** @deprecated - will be removed in the next major version, use `rendererPointToPoint` instead */ + rendererPointToPoint as graphPosToZoomedPos, + getNodesInside, + getMarkerId, + getBoundsofRects, + connectionExists, + clamp, + wheelDelta, +} from './utils/graph' +export { isMacOs } from './utils/general' +/** + * @deprecated - Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead + * Intended for options API + * In composition API you can access apply utilities from `useVueFlow` + */ +export { applyChanges, applyEdgeChanges, applyNodeChanges } from './utils/changes' +export { defaultEdgeTypes, defaultNodeTypes } from './utils/defaultNodesEdges' +export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context' +export { useZoomPanHelper } from './composables/useZoomPanHelper' +export { useVueFlow } from './composables/useVueFlow' +export { useHandle } from './composables/useHandle' +export { useNode } from './composables/useNode' +export { useEdge } from './composables/useEdge' +export { useGetPointerPosition } from './composables/useGetPointerPosition' +export { useNodeId } from './composables/useNodeId' +export { useConnection } from './composables/useConnection' +export { useHandleConnections } from './composables/useHandleConnections' +export { useNodeConnections } from './composables/useNodeConnections' +export { useNodesData } from './composables/useNodesData' +export { useEdgesData } from './composables/useEdgesData' +export { useNodesInitialized } from './composables/useNodesInitialized' +export { useKeyPress } from './composables/useKeyPress' +export { VueFlowError, ErrorCode, isErrorOfType } from './utils/errors' +export * from './types' diff --git a/node_modules/@vue-flow/core/dist/src/components/A11y/A11yDescriptions.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/A11y/A11yDescriptions.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/A11y/A11yDescriptions.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/components/ConnectionLine/index.d.ts b/node_modules/@vue-flow/core/dist/src/components/ConnectionLine/index.d.ts new file mode 100644 index 00000000..a0919b81 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/ConnectionLine/index.d.ts @@ -0,0 +1,24 @@ +declare const ConnectionLine: import('vue').DefineComponent< + {}, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default ConnectionLine diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/BaseEdge.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/BaseEdge.vue.d.ts new file mode 100644 index 00000000..d4a9702e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/BaseEdge.vue.d.ts @@ -0,0 +1,108 @@ +declare const _default: import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + label: { + type: import('vue').PropType + } + markerStart: { + type: import('vue').PropType + } + markerEnd: { + type: import('vue').PropType + } + interactionWidth: { + type: import('vue').PropType + default: number + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + path: { + type: import('vue').PropType + required: true + } + labelX: { + type: import('vue').PropType + } + labelY: { + type: import('vue').PropType + } + }, + { + pathEl: import('vue').Ref + interactionEl: import('vue').Ref + labelEl: import('vue').Ref + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + label: { + type: import('vue').PropType + } + markerStart: { + type: import('vue').PropType + } + markerEnd: { + type: import('vue').PropType + } + interactionWidth: { + type: import('vue').PropType + default: number + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + path: { + type: import('vue').PropType + required: true + } + labelX: { + type: import('vue').PropType + } + labelY: { + type: import('vue').PropType + } + }> + >, + { + interactionWidth: number + }, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/BezierEdge.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/BezierEdge.d.ts new file mode 100644 index 00000000..7aa8e701 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/BezierEdge.d.ts @@ -0,0 +1,20 @@ +import type { BezierEdgeProps } from '../../types' + +declare const BezierEdge: import('vue').DefineComponent< + BezierEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default BezierEdge diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeAnchor.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeAnchor.d.ts new file mode 100644 index 00000000..3216d88c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeAnchor.d.ts @@ -0,0 +1,12 @@ +import type { FunctionalComponent, HTMLAttributes } from 'vue' +import type { Position } from '../../types' + +interface Props extends HTMLAttributes { + position: Position + centerX: number + centerY: number + radius?: number + type: string +} +declare const EdgeAnchor: FunctionalComponent +export default EdgeAnchor diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeLabelRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeLabelRenderer.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeLabelRenderer.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeText.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeText.vue.d.ts new file mode 100644 index 00000000..ae72aa8e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeText.vue.d.ts @@ -0,0 +1,102 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + x: { + type: import('vue').PropType + required: true + } + y: { + type: import('vue').PropType + required: true + } + label: { + type: import('vue').PropType< + | string + | object + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + > + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + x: { + type: import('vue').PropType + required: true + } + y: { + type: import('vue').PropType + required: true + } + label: { + type: import('vue').PropType< + | string + | object + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + > + } + labelStyle: { + type: import('vue').PropType + } + labelShowBg: { + type: import('vue').PropType + } + labelBgStyle: { + type: import('vue').PropType + } + labelBgPadding: { + type: import('vue').PropType<[number, number]> + } + labelBgBorderRadius: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeWrapper.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeWrapper.d.ts new file mode 100644 index 00000000..8f31bd68 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/EdgeWrapper.d.ts @@ -0,0 +1,34 @@ +declare const EdgeWrapper: import('vue').DefineComponent< + Readonly<{ + id?: any + }>, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes< + Readonly<{ + id?: any + }> + > + >, + { + readonly id?: any + }, + {} +> +export default EdgeWrapper diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/SimpleBezierEdge.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/SimpleBezierEdge.d.ts new file mode 100644 index 00000000..7a23ae9e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/SimpleBezierEdge.d.ts @@ -0,0 +1,20 @@ +import type { SimpleBezierEdgeProps } from '../../types' + +declare const SimpleBezierEdge: import('vue').DefineComponent< + SimpleBezierEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default SimpleBezierEdge diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/SmoothStepEdge.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/SmoothStepEdge.d.ts new file mode 100644 index 00000000..0fe85fec --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/SmoothStepEdge.d.ts @@ -0,0 +1,20 @@ +import type { SmoothStepEdgeProps } from '../../types' + +declare const SmoothStepEdge: import('vue').DefineComponent< + SmoothStepEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default SmoothStepEdge diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/StepEdge.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/StepEdge.d.ts new file mode 100644 index 00000000..46e16bc4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/StepEdge.d.ts @@ -0,0 +1,20 @@ +import type { StepEdgeProps } from '../../types' + +declare const StepEdge: import('vue').DefineComponent< + StepEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default StepEdge diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/StraightEdge.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/StraightEdge.d.ts new file mode 100644 index 00000000..268be619 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/StraightEdge.d.ts @@ -0,0 +1,20 @@ +import type { StraightEdgeProps } from '../../types' + +declare const StraightEdge: import('vue').DefineComponent< + StraightEdgeProps, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly, + { + label?: any + }, + {} +> +export default StraightEdge diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/index.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/index.d.ts new file mode 100644 index 00000000..e81e8ac7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/index.d.ts @@ -0,0 +1,10 @@ +export { default as BaseEdge } from './BaseEdge.vue' +export { default as BezierEdge } from './BezierEdge' +export { default as SimpleBezierEdge } from './SimpleBezierEdge' +export { default as StepEdge } from './StepEdge' +export { default as SmoothStepEdge } from './SmoothStepEdge' +export { default as StraightEdge } from './StraightEdge' +export { default as EdgeAnchor } from './EdgeAnchor' +export { default as EdgeText } from './EdgeText.vue' +export { default as EdgeWrapper } from './EdgeWrapper' +export { default as EdgeLabelRenderer } from './EdgeLabelRenderer.vue' diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/bezier.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/bezier.d.ts new file mode 100644 index 00000000..fad43895 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/bezier.d.ts @@ -0,0 +1,27 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetBezierPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position + curvature?: number +} +/** + * Get a bezier path from source to target handle + * @public + * + * @param bezierPathParams + * @param bezierPathParams.sourceX - The x position of the source handle + * @param bezierPathParams.sourceY - The y position of the source handle + * @param bezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param bezierPathParams.targetX - The x position of the target handle + * @param bezierPathParams.targetY - The y position of the target handle + * @param bezierPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @param bezierPathParams.curvature - The curvature of the edge (default: 0.25) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getBezierPath(bezierPathParams: GetBezierPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/general.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/general.d.ts new file mode 100644 index 00000000..e1429b5a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/general.d.ts @@ -0,0 +1,31 @@ +export type EdgePathParams = [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] +export declare function getSimpleEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, +}: { + sourceX: number + sourceY: number + targetX: number + targetY: number +}): [number, number, number, number] +export declare function getBezierEdgeCenter({ + sourceX, + sourceY, + targetX, + targetY, + sourceControlX, + sourceControlY, + targetControlX, + targetControlY, +}: { + sourceX: number + sourceY: number + targetX: number + targetY: number + sourceControlX: number + sourceControlY: number + targetControlX: number + targetControlY: number +}): [number, number, number, number] diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/index.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/index.d.ts new file mode 100644 index 00000000..5993032a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/index.d.ts @@ -0,0 +1,5 @@ +export * from './bezier' +export * from './general' +export * from './simple-bezier' +export * from './smoothstep' +export * from './straight' diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/simple-bezier.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/simple-bezier.d.ts new file mode 100644 index 00000000..18e01bdb --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/simple-bezier.d.ts @@ -0,0 +1,25 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetSimpleBezierPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position +} +/** + * Get a simple bezier path from source to target handle (no curvature) + * @public + * + * @param simpleBezierPathParams + * @param simpleBezierPathParams.sourceX - The x position of the source handle + * @param simpleBezierPathParams.sourceY - The y position of the source handle + * @param simpleBezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param simpleBezierPathParams.targetX - The x position of the target handle + * @param simpleBezierPathParams.targetY - The y position of the target handle + * @param simpleBezierPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getSimpleBezierPath(simpleBezierPathParams: GetSimpleBezierPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/smoothstep.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/smoothstep.d.ts new file mode 100644 index 00000000..412d335d --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/smoothstep.d.ts @@ -0,0 +1,30 @@ +import type { Position } from '../../../types' +import type { EdgePathParams } from './general' + +export interface GetSmoothStepPathParams { + sourceX: number + sourceY: number + sourcePosition?: Position + targetX: number + targetY: number + targetPosition?: Position + borderRadius?: number + centerX?: number + centerY?: number + offset?: number +} +/** + * Get a smooth step path from source to target handle + * @public + * + * @param smoothStepPathParams + * @param smoothStepPathParams.sourceX - The x position of the source handle + * @param smoothStepPathParams.sourceY - The y position of the source handle + * @param smoothStepPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) + * @param smoothStepPathParams.targetX - The x position of the target handle + * @param smoothStepPathParams.targetY - The y position of the target handle + * @param smoothStepPathParams.targetPosition - The position of the target handle (default: Position.Top) + * @param smoothStepPathParams.borderRadius - The border radius of the edge (default: 5) + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getSmoothStepPath(smoothStepPathParams: GetSmoothStepPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/src/components/Edges/utils/straight.d.ts b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/straight.d.ts new file mode 100644 index 00000000..35b77b9f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Edges/utils/straight.d.ts @@ -0,0 +1,20 @@ +import type { EdgePathParams } from './general' + +export interface GetStraightPathParams { + sourceX: number + sourceY: number + targetX: number + targetY: number +} +/** + * Get a straight path from source to target handle + * @public + * + * @param straightEdgeParams + * @param straightEdgeParams.sourceX - The x position of the source handle + * @param straightEdgeParams.sourceY - The y position of the source handle + * @param straightEdgeParams.targetX - The x position of the target handle + * @param straightEdgeParams.targetY - The y position of the target handle + * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label + */ +export declare function getStraightPath(straightEdgeParams: GetStraightPathParams): EdgePathParams diff --git a/node_modules/@vue-flow/core/dist/src/components/Handle/Handle.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/Handle/Handle.vue.d.ts new file mode 100644 index 00000000..e6d92138 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Handle/Handle.vue.d.ts @@ -0,0 +1,79 @@ +import type { Position } from '../../types' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + type: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + } + connectable: { + type: import('vue').PropType + } + connectableStart: { + type: import('vue').PropType + } + connectableEnd: { + type: import('vue').PropType + } + }, + { + handleClick: (event: MouseEvent) => void + handlePointerDown: (event: import('../../types').MouseTouchEvent) => void + onClick: (event: MouseEvent) => void + onPointerDown: (event: MouseEvent | TouchEvent) => void + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + type: { + type: import('vue').PropType + } + position: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + } + connectable: { + type: import('vue').PropType + } + connectableStart: { + type: import('vue').PropType + } + connectableEnd: { + type: import('vue').PropType + } + }> + >, + {}, + {} + >, + { + default?(_: { id: string | undefined }): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/components/Nodes/DefaultNode.d.ts b/node_modules/@vue-flow/core/dist/src/components/Nodes/DefaultNode.d.ts new file mode 100644 index 00000000..bf8e0b86 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Nodes/DefaultNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const DefaultNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default DefaultNode diff --git a/node_modules/@vue-flow/core/dist/src/components/Nodes/InputNode.d.ts b/node_modules/@vue-flow/core/dist/src/components/Nodes/InputNode.d.ts new file mode 100644 index 00000000..547adb38 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Nodes/InputNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const InputNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default InputNode diff --git a/node_modules/@vue-flow/core/dist/src/components/Nodes/NodeWrapper.d.ts b/node_modules/@vue-flow/core/dist/src/components/Nodes/NodeWrapper.d.ts new file mode 100644 index 00000000..3dfd1955 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Nodes/NodeWrapper.d.ts @@ -0,0 +1,37 @@ +declare const NodeWrapper: import('vue').DefineComponent< + Readonly<{ + id?: any + resizeObserver?: any + }>, + () => + | import('vue').VNode< + import('vue').RendererNode, + import('vue').RendererElement, + { + [key: string]: any + } + > + | null, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes< + Readonly<{ + id?: any + resizeObserver?: any + }> + > + >, + { + readonly id?: any + readonly resizeObserver?: any + }, + {} +> +export default NodeWrapper diff --git a/node_modules/@vue-flow/core/dist/src/components/Nodes/OutputNode.d.ts b/node_modules/@vue-flow/core/dist/src/components/Nodes/OutputNode.d.ts new file mode 100644 index 00000000..cc358cdd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Nodes/OutputNode.d.ts @@ -0,0 +1,9 @@ +import type { FunctionalComponent } from 'vue' +import type { NodeProps } from '../../types' + +declare const OutputNode: FunctionalComponent< + NodeProps<{ + label: any + }> +> +export default OutputNode diff --git a/node_modules/@vue-flow/core/dist/src/components/Nodes/index.d.ts b/node_modules/@vue-flow/core/dist/src/components/Nodes/index.d.ts new file mode 100644 index 00000000..107f8846 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Nodes/index.d.ts @@ -0,0 +1,4 @@ +export { default as DefaultNode } from './DefaultNode' +export { default as InputNode } from './InputNode' +export { default as OutputNode } from './OutputNode' +export { default as NodeWrapper } from './NodeWrapper' diff --git a/node_modules/@vue-flow/core/dist/src/components/NodesSelection/NodesSelection.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/NodesSelection/NodesSelection.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/NodesSelection/NodesSelection.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/components/Panel/Panel.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/Panel/Panel.vue.d.ts new file mode 100644 index 00000000..3608cf12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/Panel/Panel.vue.d.ts @@ -0,0 +1,38 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + position: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + position: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/components/UserSelection/UserSelection.vue.d.ts b/node_modules/@vue-flow/core/dist/src/components/UserSelection/UserSelection.vue.d.ts new file mode 100644 index 00000000..da75dbe6 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/UserSelection/UserSelection.vue.d.ts @@ -0,0 +1,30 @@ +import type { SelectionRect } from '../../types' + +declare const _default: import('vue').DefineComponent< + { + userSelectionRect: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + userSelectionRect: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/components/index.d.ts b/node_modules/@vue-flow/core/dist/src/components/index.d.ts new file mode 100644 index 00000000..a441f7e8 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/components/index.d.ts @@ -0,0 +1,6 @@ +export * from './Nodes' +export * from './Edges' +export { default as ConnectionLine } from './ConnectionLine' +export { default as Handle } from './Handle/Handle.vue' +export { default as NodesSelection } from './NodesSelection/NodesSelection.vue' +export { default as UserSelection } from './UserSelection/UserSelection.vue' diff --git a/node_modules/@vue-flow/core/dist/src/composables/index.d.ts b/node_modules/@vue-flow/core/dist/src/composables/index.d.ts new file mode 100644 index 00000000..5f6ba8c3 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/index.d.ts @@ -0,0 +1,13 @@ +export * from './useDrag' +export * from './useEdge' +export * from './useEdgeHooks' +export * from './useGetPointerPosition' +export * from './useHandle' +export * from './useKeyPress' +export * from './useNode' +export * from './useNodeHooks' +export * from './useUpdateNodePositions' +export * from './useViewportHelper' +export * from './useVueFlow' +export * from './useWatchProps' +export * from './useZoomPanHelper' diff --git a/node_modules/@vue-flow/core/dist/src/composables/useConnection.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useConnection.d.ts new file mode 100644 index 00000000..2090cd16 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useConnection.d.ts @@ -0,0 +1,12 @@ +/** + * Composable for accessing the currently ongoing connection. + * + * @public + * @returns current connection: startHandle, endHandle, status, position + */ +export declare function useConnection(): { + startHandle: import('vue').Ref + endHandle: import('vue').Ref + status: import('vue').Ref + position: import('vue').Ref +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useDrag.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useDrag.d.ts new file mode 100644 index 00000000..ea42f69e --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useDrag.d.ts @@ -0,0 +1,24 @@ +import type { D3DragEvent, SubjectPosition } from 'd3-drag' +import type { MaybeRefOrGetter, Ref } from 'vue' +import type { MouseTouchEvent, NodeDragEvent } from '../types' + +export type UseDragEvent = D3DragEvent +interface UseDragParams { + onStart: (event: NodeDragEvent) => void + onDrag: (event: NodeDragEvent) => void + onStop: (event: NodeDragEvent) => void + onClick?: (event: MouseTouchEvent) => void + el: Ref + disabled?: MaybeRefOrGetter + selectable?: MaybeRefOrGetter + dragHandle?: MaybeRefOrGetter + id?: string +} +/** + * Composable that provides drag behavior for nodes + * + * @internal + * @param params + */ +export declare function useDrag(params: UseDragParams): Ref +export {} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useEdge.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useEdge.d.ts new file mode 100644 index 00000000..4ffceca0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useEdge.d.ts @@ -0,0 +1,20 @@ +import type { CustomEvent, ElementData } from '../types' + +/** + * Composable that provides access to an edge object and it's dom element + * + * If no edge id is provided, the edge id is injected from context + * + * If you do not provide an id, this composable has to be called in a child of your custom edge component, or it will throw + * + * @public + * @param id - The id of the edge to access + * @returns the edge id, the edge and the edge dom element + */ +export declare function useEdge = any>( + id?: string, +): { + id: string + edge: import('../types').GraphEdge + edgeEl: import('vue').Ref +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useEdgeHooks.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useEdgeHooks.d.ts new file mode 100644 index 00000000..4bda43c4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useEdgeHooks.d.ts @@ -0,0 +1,14 @@ +import type { EdgeEventsEmit, EdgeEventsOn, GraphEdge, VueFlowStore } from '../types' + +/** + * Composable for handling edge events + * + * @internal + */ +export declare function useEdgeHooks( + edge: GraphEdge, + emits: VueFlowStore['emits'], +): { + emit: EdgeEventsEmit + on: EdgeEventsOn +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useEdgesData.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useEdgesData.d.ts new file mode 100644 index 00000000..d024fa11 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useEdgesData.d.ts @@ -0,0 +1,27 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { Edge, GraphEdge } from '../types' + +interface EdgeData { + id: string + type: EdgeType['type'] + data: NonNullable | null +} +/** + * Composable for receiving data of one or multiple nodes + * + * @public + * @param edgeId - The id (or ids) of the node to get the data from + * @param guard - Optional guard function to narrow down the node type + * @returns An array of data objects + */ +export declare function useEdgesData( + edgeId: MaybeRefOrGetter, +): ComputedRef | null> +export declare function useEdgesData( + edgeIds: MaybeRefOrGetter, +): ComputedRef[]> +export declare function useEdgesData( + edgeIds: MaybeRefOrGetter, + guard: (node: Edge) => node is EdgeType, +): ComputedRef[]> +export {} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useGetPointerPosition.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useGetPointerPosition.d.ts new file mode 100644 index 00000000..bffdd4c0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useGetPointerPosition.d.ts @@ -0,0 +1,14 @@ +import type { MouseTouchEvent } from '../types' +import type { UseDragEvent } from './useDrag' + +/** + * Composable that returns a function to get the pointer position + * + * @internal + */ +export declare function useGetPointerPosition(): (event: UseDragEvent | MouseTouchEvent) => { + x: number + y: number + xSnapped: number + ySnapped: number +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useHandle.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useHandle.d.ts new file mode 100644 index 00000000..6f1cff4a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useHandle.d.ts @@ -0,0 +1,31 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { Connection, HandleType, MouseTouchEvent, ValidConnectionFunc } from '../types' + +export interface UseHandleProps { + handleId: MaybeRefOrGetter + nodeId: MaybeRefOrGetter + type: MaybeRefOrGetter + isValidConnection?: MaybeRefOrGetter + edgeUpdaterType?: MaybeRefOrGetter + onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void + onEdgeUpdateEnd?: (event: MouseTouchEvent) => void +} +/** + * This composable provides listeners for handle events + * + * Generally it's recommended to use the `` component instead of this composable. + * + * @public + */ +export declare function useHandle({ + handleId, + nodeId, + type, + isValidConnection, + edgeUpdaterType, + onEdgeUpdate, + onEdgeUpdateEnd, +}: UseHandleProps): { + handlePointerDown: (event: MouseTouchEvent) => void + handleClick: (event: MouseEvent) => void +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useHandleConnections.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useHandleConnections.d.ts new file mode 100644 index 00000000..737a300c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useHandleConnections.d.ts @@ -0,0 +1,25 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { HandleConnection, HandleType } from '../types' + +export interface UseHandleConnectionsParams { + type: MaybeRefOrGetter + id?: MaybeRefOrGetter + nodeId?: MaybeRefOrGetter + onConnect?: (connections: HandleConnection[]) => void + onDisconnect?: (connections: HandleConnection[]) => void +} +/** + * Composable that returns existing connections of a ``. + * + * @deprecated use `useNodeConnections` instead + * @public + * @param params + * @param params.type - handle type `source` or `target` + * @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used + * @param params.id - the handle id (this is required if the node has multiple handles of the same type) + * @param params.onConnect - gets called when a connection is created + * @param params.onDisconnect - gets called when a connection is removed + * + * @returns An array of connections + */ +export declare function useHandleConnections(params: UseHandleConnectionsParams): ComputedRef diff --git a/node_modules/@vue-flow/core/dist/src/composables/useKeyPress.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useKeyPress.d.ts new file mode 100644 index 00000000..93f14f80 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useKeyPress.d.ts @@ -0,0 +1,20 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { KeyFilter } from '@vueuse/core' + +export interface UseKeyPressOptions { + target?: MaybeRefOrGetter + actInsideInputWithModifier?: MaybeRefOrGetter + preventDefault?: MaybeRefOrGetter +} +export declare function isInputDOMNode(event: KeyboardEvent): boolean +/** + * Composable that returns a boolean value if a key is pressed + * + * @public + * @param keyFilter - Can be a boolean, a string, an array of strings or a function that returns a boolean. If it's a boolean, it will act as if the key is always pressed. If it's a string, it will return true if a key matching that string is pressed. If it's an array of strings, it will return true if any of the strings match a key being pressed, or a combination (e.g. ['ctrl+a', 'ctrl+b']) + * @param options - Options object + */ +export declare function useKeyPress( + keyFilter: MaybeRefOrGetter, + options?: UseKeyPressOptions, +): import('vue').ShallowRef diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNode.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNode.d.ts new file mode 100644 index 00000000..923aca34 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNode.d.ts @@ -0,0 +1,22 @@ +import type { CustomEvent, ElementData } from '../types' + +/** + * Composable that provides access to a node object, parent node object, connected edges and it's dom element + * + * If no node id is provided, the node id is injected from context + * + * If you do not provide an id, this composable has to be called in a child of your custom node component, or it will throw + * + * @public + * @param id - The id of the node to access + * @returns the node id, the node, the node dom element, it's parent and connected edges + */ +export declare function useNode = any>( + id?: string, +): { + id: string + nodeEl: import('vue').Ref + node: import('../types').GraphNode + parentNode: import('vue').ComputedRef | undefined> + connectedEdges: import('vue').ComputedRef +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNodeConnections.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNodeConnections.d.ts new file mode 100644 index 00000000..bf49bd0f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNodeConnections.d.ts @@ -0,0 +1,24 @@ +import type { MaybeRefOrGetter } from 'vue' +import type { HandleType, NodeConnection } from '../types' + +export interface UseNodeConnectionsParams { + handleType?: MaybeRefOrGetter + handleId?: MaybeRefOrGetter + nodeId?: MaybeRefOrGetter + onConnect?: (connections: NodeConnection[]) => void + onDisconnect?: (connections: NodeConnection[]) => void +} +/** + * Hook to retrieve all edges connected to a node. Can be filtered by handle type and id. + * + * @public + * @param params + * @param params.handleType - handle type `source` or `target` + * @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used + * @param params.handleId - the handle id (this is required if the node has multiple handles of the same type) + * @param params.onConnect - gets called when a connection is created + * @param params.onDisconnect - gets called when a connection is removed + * + * @returns An array of connections + */ +export declare function useNodeConnections(params?: UseNodeConnectionsParams): import('vue').ComputedRef diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNodeHooks.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNodeHooks.d.ts new file mode 100644 index 00000000..78a2c93f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNodeHooks.d.ts @@ -0,0 +1,14 @@ +import type { GraphNode, NodeEventsEmit, NodeEventsOn, VueFlowStore } from '../types' + +/** + * Composable for handling node events + * + * @internal + */ +export declare function useNodeHooks( + node: GraphNode, + emits: VueFlowStore['emits'], +): { + emit: NodeEventsEmit + on: NodeEventsOn +} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNodeId.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNodeId.d.ts new file mode 100644 index 00000000..4f19d691 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNodeId.d.ts @@ -0,0 +1,9 @@ +/** + * This composable returns the current node id from the ctx. + * + * It should be used inside a (custom-)node components ctx as the id is provided by the internal `NodeWrapper` component. + * + * @public + * @returns the current node id + */ +export declare function useNodeId(): string diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNodesData.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNodesData.d.ts new file mode 100644 index 00000000..6b5628bc --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNodesData.d.ts @@ -0,0 +1,27 @@ +import type { ComputedRef, MaybeRefOrGetter } from 'vue' +import type { GraphNode, Node } from '../types' + +interface NodeData { + id: string + type: NodeType['type'] + data: NonNullable +} +/** + * Composable for receiving data of one or multiple nodes + * + * @public + * @param nodeId - The id (or ids) of the node to get the data from + * @param guard - Optional guard function to narrow down the node type + * @returns An array of data objects + */ +export declare function useNodesData( + nodeId: MaybeRefOrGetter, +): ComputedRef | null> +export declare function useNodesData( + nodeIds: MaybeRefOrGetter, +): ComputedRef[]> +export declare function useNodesData( + nodeIds: MaybeRefOrGetter, + guard: (node: Node) => node is NodeType, +): ComputedRef[]> +export {} diff --git a/node_modules/@vue-flow/core/dist/src/composables/useNodesInitialized.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useNodesInitialized.d.ts new file mode 100644 index 00000000..adb1338a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useNodesInitialized.d.ts @@ -0,0 +1,15 @@ +export interface UseNodesInitializedOptions { + includeHiddenNodes?: boolean +} +/** + * Composable for getting the initialized state of all nodes. + * + * When a new node is added to the graph, it is not immediately initialized. + * That's because the node's bounds are not yet known. + * This composable will return false and then true when all nodes are initialized, i.e. when their bounds are known. + * + * @public + * @param options - Options + * @returns boolean indicating whether all nodes are initialized + */ +export declare function useNodesInitialized(options?: UseNodesInitializedOptions): import('vue').ComputedRef diff --git a/node_modules/@vue-flow/core/dist/src/composables/useOnInitHandler.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useOnInitHandler.d.ts new file mode 100644 index 00000000..16589336 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useOnInitHandler.d.ts @@ -0,0 +1,6 @@ +/** + * Composable that handles the initialization of the viewport. + * + * @internal + */ +export declare function useOnInitHandler(): void diff --git a/node_modules/@vue-flow/core/dist/src/composables/useResizeHandler.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useResizeHandler.d.ts new file mode 100644 index 00000000..53633240 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useResizeHandler.d.ts @@ -0,0 +1,9 @@ +import type { Ref } from 'vue' + +/** + * Composable that handles the resize of the viewport. + * + * @internal + * @param viewportEl + */ +export declare function useResizeHandler(viewportEl: Ref): void diff --git a/node_modules/@vue-flow/core/dist/src/composables/useStylesLoadedWarning.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useStylesLoadedWarning.d.ts new file mode 100644 index 00000000..69bf1ef8 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useStylesLoadedWarning.d.ts @@ -0,0 +1 @@ +export declare function useStylesLoadedWarning(): void diff --git a/node_modules/@vue-flow/core/dist/src/composables/useUpdateNodePositions.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useUpdateNodePositions.d.ts new file mode 100644 index 00000000..3a62a006 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useUpdateNodePositions.d.ts @@ -0,0 +1,8 @@ +import type { XYPosition } from '../types' + +/** + * Composable for updating the position of nodes. + * + * @internal + */ +export declare function useUpdateNodePositions(): (positionDiff: XYPosition, isShiftPressed?: boolean) => void diff --git a/node_modules/@vue-flow/core/dist/src/composables/useViewportHelper.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useViewportHelper.d.ts new file mode 100644 index 00000000..4ef7a656 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useViewportHelper.d.ts @@ -0,0 +1,20 @@ +import type { D3Selection, Project, State, ViewportFunctions } from '../types' + +export interface ViewportHelper extends ViewportFunctions { + viewportInitialized: boolean + screenToFlowCoordinate: Project + flowToScreenCoordinate: Project +} +/** + * Composable that provides viewport helper functions. + * + * @internal + * @param state + */ +export declare function useViewportHelper(state: State): import('vue').ComputedRef +export declare function getD3Transition( + selection: D3Selection, + duration?: number, + ease?: (t: number) => number, + onEnd?: () => void, +): D3Selection | import('d3-transition').Transition diff --git a/node_modules/@vue-flow/core/dist/src/composables/useVueFlow.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useVueFlow.d.ts new file mode 100644 index 00000000..80075ae0 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useVueFlow.d.ts @@ -0,0 +1,15 @@ +import type { FlowOptions, VueFlowStore } from '../types' + +/** + * Composable that provides access to a store instance + * + * If no id is provided, the store instance is injected from context + * + * If no store instance is found in context, a new store instance is created and registered in storage + * + * @public + * @returns a vue flow store instance + * @param idOrOpts - id of the store instance or options to create a new store instance + */ +export declare function useVueFlow(id?: string): VueFlowStore +export declare function useVueFlow(options?: FlowOptions): VueFlowStore diff --git a/node_modules/@vue-flow/core/dist/src/composables/useWatchProps.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useWatchProps.d.ts new file mode 100644 index 00000000..fcbe1b1f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useWatchProps.d.ts @@ -0,0 +1,16 @@ +import type { ToRefs } from 'vue' +import type { FlowProps, VueFlowStore } from '../types' + +/** + * Watches props and updates the store accordingly + * + * @internal + * @param models + * @param props + * @param store + */ +export declare function useWatchProps( + models: ToRefs>, + props: FlowProps, + store: VueFlowStore, +): () => void diff --git a/node_modules/@vue-flow/core/dist/src/composables/useZoomPanHelper.d.ts b/node_modules/@vue-flow/core/dist/src/composables/useZoomPanHelper.d.ts new file mode 100644 index 00000000..2dcb3189 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/composables/useZoomPanHelper.d.ts @@ -0,0 +1,6 @@ +import type { ViewportFunctions } from '../types' + +/** + * @deprecated use {@link useVueFlow} instead (all viewport functions are also available in {@link useVueFlow}) + */ +export declare function useZoomPanHelper(vueFlowId?: string): ViewportFunctions diff --git a/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/EdgeRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/EdgeRenderer.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/EdgeRenderer.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerDefinitions.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerDefinitions.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerDefinitions.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerSymbols.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerSymbols.vue.d.ts new file mode 100644 index 00000000..2b3f4bb2 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/EdgeRenderer/MarkerSymbols.vue.d.ts @@ -0,0 +1,72 @@ +declare const _default: import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + required: true + } + type: { + type: import('vue').PropType + required: true + } + color: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + markerUnits: { + type: import('vue').PropType + } + orient: { + type: import('vue').PropType + } + strokeWidth: { + type: import('vue').PropType + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + required: true + } + type: { + type: import('vue').PropType + required: true + } + color: { + type: import('vue').PropType + } + width: { + type: import('vue').PropType + } + height: { + type: import('vue').PropType + } + markerUnits: { + type: import('vue').PropType + } + orient: { + type: import('vue').PropType + } + strokeWidth: { + type: import('vue').PropType + } + }> + >, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/container/NodeRenderer/NodeRenderer.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/NodeRenderer/NodeRenderer.vue.d.ts new file mode 100644 index 00000000..b1b7fb12 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/NodeRenderer/NodeRenderer.vue.d.ts @@ -0,0 +1,16 @@ +declare const _default: import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} +> +export default _default diff --git a/node_modules/@vue-flow/core/dist/src/container/Pane/Pane.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/Pane/Pane.vue.d.ts new file mode 100644 index 00000000..05370d9c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/Pane/Pane.vue.d.ts @@ -0,0 +1,46 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + isSelecting: { + type: import('vue').PropType + required: true + } + selectionKeyPressed: { + type: import('vue').PropType + required: true + } + }, + {}, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + isSelecting: { + type: import('vue').PropType + required: true + } + selectionKeyPressed: { + type: import('vue').PropType + required: true + } + }> + >, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/container/Pane/utils.d.ts b/node_modules/@vue-flow/core/dist/src/container/Pane/utils.d.ts new file mode 100644 index 00000000..6cf790eb --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/Pane/utils.d.ts @@ -0,0 +1,3 @@ +import type { XYPosition } from '../../types' + +export declare function getMousePosition(event: MouseEvent, containerBounds: DOMRect): XYPosition diff --git a/node_modules/@vue-flow/core/dist/src/container/Viewport/Transform.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/Viewport/Transform.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/Viewport/Transform.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/container/Viewport/Viewport.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/Viewport/Viewport.vue.d.ts new file mode 100644 index 00000000..5a78a2dd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/Viewport/Viewport.vue.d.ts @@ -0,0 +1,26 @@ +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + {}, + {}, + {}, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + {}, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly>, + {}, + {} + >, + { + default?(_: {}): any + } +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/container/VueFlow/VueFlow.vue.d.ts b/node_modules/@vue-flow/core/dist/src/container/VueFlow/VueFlow.vue.d.ts new file mode 100644 index 00000000..ecbfa1b9 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/VueFlow/VueFlow.vue.d.ts @@ -0,0 +1,1135 @@ +import type { FlowSlots, VueFlowStore } from '../../types' + +declare const _default: __VLS_WithTemplateSlots< + import('vue').DefineComponent< + { + id: { + type: import('vue').PropType + } + nodes: { + type: import('vue').PropType[]> + } + edges: { + type: import('vue').PropType + } + modelValue: { + type: import('vue').PropType> + } + edgeTypes: { + type: import('vue').PropType + } + nodeTypes: { + type: import('vue').PropType + } + connectionMode: { + type: import('vue').PropType + } + connectionLineType: { + type: import('vue').PropType + } + connectionLineStyle: { + type: import('vue').PropType + default: undefined + } + connectionLineOptions: { + type: import('vue').PropType + default: undefined + } + connectionRadius: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + default: undefined + } + deleteKeyCode: { + type: import('vue').PropType + default: undefined + } + selectionKeyCode: { + type: import('vue').PropType + default: undefined + } + multiSelectionKeyCode: { + type: import('vue').PropType + default: undefined + } + zoomActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + panActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + snapToGrid: { + type: import('vue').PropType + default: undefined + } + snapGrid: { + type: import('vue').PropType + } + onlyRenderVisibleElements: { + type: import('vue').PropType + default: undefined + } + edgesUpdatable: { + type: import('vue').PropType + default: undefined + } + nodesDraggable: { + type: import('vue').PropType + default: undefined + } + nodesConnectable: { + type: import('vue').PropType + default: undefined + } + nodeDragThreshold: { + type: import('vue').PropType + } + elementsSelectable: { + type: import('vue').PropType + default: undefined + } + selectNodesOnDrag: { + type: import('vue').PropType + default: undefined + } + panOnDrag: { + type: import('vue').PropType + default: undefined + } + minZoom: { + type: import('vue').PropType + } + maxZoom: { + type: import('vue').PropType + } + defaultViewport: { + type: import('vue').PropType> + } + translateExtent: { + type: import('vue').PropType + } + nodeExtent: { + type: import('vue').PropType + } + defaultMarkerColor: { + type: import('vue').PropType + } + zoomOnScroll: { + type: import('vue').PropType + default: undefined + } + zoomOnPinch: { + type: import('vue').PropType + default: undefined + } + panOnScroll: { + type: import('vue').PropType + default: undefined + } + panOnScrollSpeed: { + type: import('vue').PropType + } + panOnScrollMode: { + type: import('vue').PropType + } + paneClickDistance: { + type: import('vue').PropType + } + zoomOnDoubleClick: { + type: import('vue').PropType + default: undefined + } + preventScrolling: { + type: import('vue').PropType + default: undefined + } + selectionMode: { + type: import('vue').PropType + } + edgeUpdaterRadius: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + default: undefined + } + connectOnClick: { + type: import('vue').PropType + default: undefined + } + applyDefault: { + type: import('vue').PropType + default: undefined + } + autoConnect: { + type: import('vue').PropType + default: undefined + } + noDragClassName: { + type: import('vue').PropType + } + noWheelClassName: { + type: import('vue').PropType + } + noPanClassName: { + type: import('vue').PropType + } + defaultEdgeOptions: { + type: import('vue').PropType + } + elevateEdgesOnSelect: { + type: import('vue').PropType + default: undefined + } + elevateNodesOnSelect: { + type: import('vue').PropType + default: undefined + } + disableKeyboardA11y: { + type: import('vue').PropType + default: undefined + } + edgesFocusable: { + type: import('vue').PropType + default: undefined + } + nodesFocusable: { + type: import('vue').PropType + default: undefined + } + autoPanOnConnect: { + type: import('vue').PropType + default: undefined + } + autoPanOnNodeDrag: { + type: import('vue').PropType + default: undefined + } + autoPanSpeed: { + type: import('vue').PropType + } + }, + { + id: string + emits: Readonly<{ + nodesChange: import('@vueuse/shared').EventHookTrigger + edgesChange: import('@vueuse/shared').EventHookTrigger + nodeDoubleClick: import('@vueuse/shared').EventHookTrigger + nodeClick: import('@vueuse/shared').EventHookTrigger + nodeMouseEnter: import('@vueuse/shared').EventHookTrigger + nodeMouseMove: import('@vueuse/shared').EventHookTrigger + nodeMouseLeave: import('@vueuse/shared').EventHookTrigger + nodeContextMenu: import('@vueuse/shared').EventHookTrigger + nodeDragStart: import('@vueuse/shared').EventHookTrigger + nodeDrag: import('@vueuse/shared').EventHookTrigger + nodeDragStop: import('@vueuse/shared').EventHookTrigger + nodesInitialized: import('@vueuse/shared').EventHookTrigger[]> + updateNodeInternals: import('@vueuse/shared').EventHookTrigger + miniMapNodeClick: import('@vueuse/shared').EventHookTrigger + miniMapNodeDoubleClick: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseEnter: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseMove: import('@vueuse/shared').EventHookTrigger + miniMapNodeMouseLeave: import('@vueuse/shared').EventHookTrigger + connect: import('@vueuse/shared').EventHookTrigger + connectStart: import('@vueuse/shared').EventHookTrigger< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + connectEnd: import('@vueuse/shared').EventHookTrigger + clickConnectStart: import('@vueuse/shared').EventHookTrigger< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + clickConnectEnd: import('@vueuse/shared').EventHookTrigger + paneReady: import('@vueuse/shared').EventHookTrigger + init: import('@vueuse/shared').EventHookTrigger + move: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveStart: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveEnd: import('@vueuse/shared').EventHookTrigger<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + selectionDragStart: import('@vueuse/shared').EventHookTrigger + selectionDrag: import('@vueuse/shared').EventHookTrigger + selectionDragStop: import('@vueuse/shared').EventHookTrigger + selectionContextMenu: import('@vueuse/shared').EventHookTrigger<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + selectionStart: import('@vueuse/shared').EventHookTrigger + selectionEnd: import('@vueuse/shared').EventHookTrigger + viewportChangeStart: import('@vueuse/shared').EventHookTrigger + viewportChange: import('@vueuse/shared').EventHookTrigger + viewportChangeEnd: import('@vueuse/shared').EventHookTrigger + paneScroll: import('@vueuse/shared').EventHookTrigger + paneClick: import('@vueuse/shared').EventHookTrigger + paneContextMenu: import('@vueuse/shared').EventHookTrigger + paneMouseEnter: import('@vueuse/shared').EventHookTrigger + paneMouseMove: import('@vueuse/shared').EventHookTrigger + paneMouseLeave: import('@vueuse/shared').EventHookTrigger + edgeContextMenu: import('@vueuse/shared').EventHookTrigger + edgeMouseEnter: import('@vueuse/shared').EventHookTrigger + edgeMouseMove: import('@vueuse/shared').EventHookTrigger + edgeMouseLeave: import('@vueuse/shared').EventHookTrigger + edgeDoubleClick: import('@vueuse/shared').EventHookTrigger + edgeClick: import('@vueuse/shared').EventHookTrigger + edgeUpdateStart: import('@vueuse/shared').EventHookTrigger + edgeUpdate: import('@vueuse/shared').EventHookTrigger + edgeUpdateEnd: import('@vueuse/shared').EventHookTrigger + error: import('@vueuse/shared').EventHookTrigger< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + }> + nodeLookup: import('vue').ComputedRef + edgeLookup: import('vue').ComputedRef + vueFlowVersion: string + onNodesChange: import('@vueuse/shared').EventHookOn + onEdgesChange: import('@vueuse/shared').EventHookOn + onNodeDoubleClick: import('@vueuse/shared').EventHookOn + onNodeClick: import('@vueuse/shared').EventHookOn + onNodeMouseEnter: import('@vueuse/shared').EventHookOn + onNodeMouseMove: import('@vueuse/shared').EventHookOn + onNodeMouseLeave: import('@vueuse/shared').EventHookOn + onNodeContextMenu: import('@vueuse/shared').EventHookOn + onNodeDragStart: import('@vueuse/shared').EventHookOn + onNodeDrag: import('@vueuse/shared').EventHookOn + onNodeDragStop: import('@vueuse/shared').EventHookOn + onNodesInitialized: import('@vueuse/shared').EventHookOn[]> + onUpdateNodeInternals: import('@vueuse/shared').EventHookOn + onMiniMapNodeClick: import('@vueuse/shared').EventHookOn + onMiniMapNodeDoubleClick: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseEnter: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseMove: import('@vueuse/shared').EventHookOn + onMiniMapNodeMouseLeave: import('@vueuse/shared').EventHookOn + onConnect: import('@vueuse/shared').EventHookOn + onConnectStart: import('@vueuse/shared').EventHookOn< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + onConnectEnd: import('@vueuse/shared').EventHookOn + onClickConnectStart: import('@vueuse/shared').EventHookOn< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + onClickConnectEnd: import('@vueuse/shared').EventHookOn + onPaneReady: import('@vueuse/shared').EventHookOn + onInit: import('@vueuse/shared').EventHookOn + onMove: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onMoveStart: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onMoveEnd: import('@vueuse/shared').EventHookOn<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + onSelectionDragStart: import('@vueuse/shared').EventHookOn + onSelectionDrag: import('@vueuse/shared').EventHookOn + onSelectionDragStop: import('@vueuse/shared').EventHookOn + onSelectionContextMenu: import('@vueuse/shared').EventHookOn<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + onSelectionStart: import('@vueuse/shared').EventHookOn + onSelectionEnd: import('@vueuse/shared').EventHookOn + onViewportChangeStart: import('@vueuse/shared').EventHookOn + onViewportChange: import('@vueuse/shared').EventHookOn + onViewportChangeEnd: import('@vueuse/shared').EventHookOn + onPaneScroll: import('@vueuse/shared').EventHookOn + onPaneClick: import('@vueuse/shared').EventHookOn + onPaneContextMenu: import('@vueuse/shared').EventHookOn + onPaneMouseEnter: import('@vueuse/shared').EventHookOn + onPaneMouseMove: import('@vueuse/shared').EventHookOn + onPaneMouseLeave: import('@vueuse/shared').EventHookOn + onEdgeContextMenu: import('@vueuse/shared').EventHookOn + onEdgeMouseEnter: import('@vueuse/shared').EventHookOn + onEdgeMouseMove: import('@vueuse/shared').EventHookOn + onEdgeMouseLeave: import('@vueuse/shared').EventHookOn + onEdgeDoubleClick: import('@vueuse/shared').EventHookOn + onEdgeClick: import('@vueuse/shared').EventHookOn + onEdgeUpdateStart: import('@vueuse/shared').EventHookOn + onEdgeUpdate: import('@vueuse/shared').EventHookOn + onEdgeUpdateEnd: import('@vueuse/shared').EventHookOn + onError: import('@vueuse/shared').EventHookOn< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + vueFlowRef: import('vue').Ref + viewportRef: import('vue').Ref + hooks: import('vue').Ref< + Readonly<{ + nodesChange: import('../../utils').EventHookExtended + edgesChange: import('../../utils').EventHookExtended + nodeDoubleClick: import('../../utils').EventHookExtended + nodeClick: import('../../utils').EventHookExtended + nodeMouseEnter: import('../../utils').EventHookExtended + nodeMouseMove: import('../../utils').EventHookExtended + nodeMouseLeave: import('../../utils').EventHookExtended + nodeContextMenu: import('../../utils').EventHookExtended + nodeDragStart: import('../../utils').EventHookExtended + nodeDrag: import('../../utils').EventHookExtended + nodeDragStop: import('../../utils').EventHookExtended + nodesInitialized: import('../../utils').EventHookExtended[]> + updateNodeInternals: import('../../utils').EventHookExtended + miniMapNodeClick: import('../../utils').EventHookExtended + miniMapNodeDoubleClick: import('../../utils').EventHookExtended + miniMapNodeMouseEnter: import('../../utils').EventHookExtended + miniMapNodeMouseMove: import('../../utils').EventHookExtended + miniMapNodeMouseLeave: import('../../utils').EventHookExtended + connect: import('../../utils').EventHookExtended + connectStart: import('../../utils').EventHookExtended< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + connectEnd: import('../../utils').EventHookExtended + clickConnectStart: import('../../utils').EventHookExtended< + { + event?: MouseEvent | TouchEvent | undefined + } & import('../../types').OnConnectStartParams + > + clickConnectEnd: import('../../utils').EventHookExtended + paneReady: import('../../utils').EventHookExtended + init: import('../../utils').EventHookExtended + move: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveStart: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + moveEnd: import('../../utils').EventHookExtended<{ + event: WheelEvent | import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }> + selectionDragStart: import('../../utils').EventHookExtended + selectionDrag: import('../../utils').EventHookExtended + selectionDragStop: import('../../utils').EventHookExtended + selectionContextMenu: import('../../utils').EventHookExtended<{ + event: MouseEvent + nodes: import('../../types').GraphNode[] + }> + selectionStart: import('../../utils').EventHookExtended + selectionEnd: import('../../utils').EventHookExtended + viewportChangeStart: import('../../utils').EventHookExtended + viewportChange: import('../../utils').EventHookExtended + viewportChangeEnd: import('../../utils').EventHookExtended + paneScroll: import('../../utils').EventHookExtended + paneClick: import('../../utils').EventHookExtended + paneContextMenu: import('../../utils').EventHookExtended + paneMouseEnter: import('../../utils').EventHookExtended + paneMouseMove: import('../../utils').EventHookExtended + paneMouseLeave: import('../../utils').EventHookExtended + edgeContextMenu: import('../../utils').EventHookExtended + edgeMouseEnter: import('../../utils').EventHookExtended + edgeMouseMove: import('../../utils').EventHookExtended + edgeMouseLeave: import('../../utils').EventHookExtended + edgeDoubleClick: import('../../utils').EventHookExtended + edgeClick: import('../../utils').EventHookExtended + edgeUpdateStart: import('../../utils').EventHookExtended + edgeUpdate: import('../../utils').EventHookExtended + edgeUpdateEnd: import('../../utils').EventHookExtended + error: import('../../utils').EventHookExtended< + import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + > + > + }> + > + nodes: import('vue').Ref[]> + edges: import('vue').Ref + connectionLookup: import('vue').Ref + d3Zoom: import('vue').Ref + d3Selection: import('vue').Ref + d3ZoomHandler: import('vue').Ref + minZoom: import('vue').Ref + maxZoom: import('vue').Ref + defaultViewport: import('vue').Ref> + translateExtent: import('vue').Ref + nodeExtent: import('vue').Ref + dimensions: import('vue').Ref + viewport: import('vue').Ref + onlyRenderVisibleElements: import('vue').Ref + nodesSelectionActive: import('vue').Ref + userSelectionActive: import('vue').Ref + multiSelectionActive: import('vue').Ref + deleteKeyCode: import('vue').Ref + selectionKeyCode: import('vue').Ref + multiSelectionKeyCode: import('vue').Ref + zoomActivationKeyCode: import('vue').Ref + panActivationKeyCode: import('vue').Ref + connectionMode: import('vue').Ref + connectionLineOptions: import('vue').Ref + connectionLineType: import('vue').Ref + connectionLineStyle: import('vue').Ref + connectionStartHandle: import('vue').Ref + connectionEndHandle: import('vue').Ref + connectionClickStartHandle: import('vue').Ref + connectionPosition: import('vue').Ref + connectionRadius: import('vue').Ref + connectionStatus: import('vue').Ref + isValidConnection: import('vue').Ref + connectOnClick: import('vue').Ref + edgeUpdaterRadius: import('vue').Ref + snapToGrid: import('vue').Ref + snapGrid: import('vue').Ref + defaultMarkerColor: import('vue').Ref + edgesUpdatable: import('vue').Ref + edgesFocusable: import('vue').Ref + nodesFocusable: import('vue').Ref + nodesDraggable: import('vue').Ref + nodesConnectable: import('vue').Ref + nodeDragThreshold: import('vue').Ref + elementsSelectable: import('vue').Ref + selectNodesOnDrag: import('vue').Ref + userSelectionRect: import('vue').Ref + selectionMode: import('vue').Ref + panOnDrag: import('vue').Ref + zoomOnScroll: import('vue').Ref + zoomOnPinch: import('vue').Ref + panOnScroll: import('vue').Ref + panOnScrollSpeed: import('vue').Ref + panOnScrollMode: import('vue').Ref + paneClickDistance: import('vue').Ref + zoomOnDoubleClick: import('vue').Ref + preventScrolling: import('vue').Ref + paneDragging: import('vue').Ref + initialized: import('vue').Ref + applyDefault: import('vue').Ref + autoConnect: import('vue').Ref + fitViewOnInit: import('vue').Ref + fitViewOnInitDone: import('vue').Ref + noDragClassName: import('vue').Ref + noWheelClassName: import('vue').Ref + noPanClassName: import('vue').Ref + defaultEdgeOptions: import('vue').Ref + elevateEdgesOnSelect: import('vue').Ref + elevateNodesOnSelect: import('vue').Ref + autoPanOnConnect: import('vue').Ref + autoPanOnNodeDrag: import('vue').Ref + autoPanSpeed: import('vue').Ref + disableKeyboardA11y: import('vue').Ref + ariaLiveMessage: import('vue').Ref + edgeTypes?: import('vue').Ref | undefined + nodeTypes?: import('vue').Ref | undefined + getEdgeTypes: import('vue').ComputedRef> + getNodeTypes: import('vue').ComputedRef> + getElements: import('vue').ComputedRef + getNodes: import('vue').ComputedRef[]> + getEdges: import('vue').ComputedRef + getNode: import('vue').ComputedRef<(id: string) => import('../../types').GraphNode | undefined> + getEdge: import('vue').ComputedRef<(id: string) => import('../../types').GraphEdge | undefined> + getSelectedElements: import('vue').ComputedRef + getSelectedNodes: import('vue').ComputedRef[]> + getSelectedEdges: import('vue').ComputedRef + getNodesInitialized: import('vue').ComputedRef[]> + areNodesInitialized: import('vue').ComputedRef + setElements: import('../../types').SetElements + setNodes: import('../../types').SetNodes + setEdges: import('../../types').SetEdges + addNodes: import('../../types').AddNodes + addEdges: import('../../types').AddEdges + removeNodes: import('../../types').RemoveNodes + removeEdges: import('../../types').RemoveEdges + findNode: import('../../types').FindNode + findEdge: import('../../types').FindEdge + updateEdge: import('../../types').UpdateEdge + updateEdgeData: import('../../types').UpdateEdgeData + updateNode: import('../../types').UpdateNode + updateNodeData: import('../../types').UpdateNodeData + applyEdgeChanges: (changes: import('../../types').EdgeChange[]) => import('../../types').GraphEdge[] + applyNodeChanges: (changes: import('../../types').NodeChange[]) => import('../../types').GraphNode[] + addSelectedElements: (elements: import('../../types').FlowElements) => void + addSelectedEdges: (edges: import('../../types').GraphEdge[]) => void + addSelectedNodes: (nodes: import('../../types').GraphNode[]) => void + removeSelectedEdges: (edges: import('../../types').GraphEdge[]) => void + removeSelectedNodes: (nodes: import('../../types').GraphNode[]) => void + removeSelectedElements: (elements?: import('../../types').Elements | undefined) => void + setMinZoom: (zoom: number) => void + setMaxZoom: (zoom: number) => void + setTranslateExtent: (translateExtent: import('../../types').CoordinateExtent) => void + setNodeExtent: (nodeExtent: import('../../types').CoordinateExtent | import('../../types').CoordinateExtentRange) => void + setPaneClickDistance: (distance: number) => void + setInteractive: (isInteractive: boolean) => void + setState: import('../../types').SetState + toObject: () => import('../../types').FlowExportObject + fromObject: (obj: import('../../types').FlowExportObject) => Promise + updateNodeInternals: import('../../types').UpdateNodeInternals + startConnection: ( + startHandle: import('../../types').ConnectingHandle, + position?: import('../../types').XYPosition | undefined, + isClick?: boolean | undefined, + ) => void + updateConnection: ( + position: import('../../types').XYPosition, + result?: import('../../types').ConnectingHandle | null | undefined, + status?: import('../../types').ConnectionStatus | null | undefined, + ) => void + endConnection: (event?: MouseEvent | TouchEvent | undefined, isClick?: boolean | undefined) => void + updateNodePositions: import('../../types').UpdateNodePosition + updateNodeDimensions: import('../../types').UpdateNodeDimensions + getIntersectingNodes: import('../../types').GetIntersectingNodes + isNodeIntersecting: import('../../types').IsNodeIntersecting + getIncomers: ( + nodeOrId: string | import('../../types').Node, + ) => import('../../types').GraphNode[] + getOutgoers: ( + nodeOrId: string | import('../../types').Node, + ) => import('../../types').GraphNode[] + getConnectedEdges: (nodesOrId: string | import('../../types').Node[]) => import('../../types').GraphEdge[] + getHandleConnections: ({ + id, + type, + nodeId, + }: { + id?: string | null | undefined + type: import('../../types').HandleType + nodeId: string + }) => import('../../types').HandleConnection[] + panBy: (delta: import('../../types').XYPosition) => boolean + viewportHelper: import('vue').ComputedRef + $reset: () => void + $destroy: () => void + screenToFlowCoordinate: import('../../types').Project + flowToScreenCoordinate: import('../../types').Project + zoomIn: import('../../types').ZoomInOut + zoomOut: import('../../types').ZoomInOut + zoomTo: import('../../types').ZoomTo + setViewport: import('../../types').SetViewport + setTransform: import('../../types').SetViewport + getViewport: import('../../types').GetViewport + getTransform: import('../../types').GetViewport + fitView: import('../../types').FitView + setCenter: import('../../types').SetCenter + fitBounds: import('../../types').FitBounds + project: import('../../types').Project + }, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + { + 'nodesChange': (changes: import('../../types').NodeChange[]) => void + 'edgesChange': (changes: import('../../types').EdgeChange[]) => void + 'nodesInitialized': () => void + 'paneReady': (paneEvent: VueFlowStore) => void + 'init': (paneEvent: VueFlowStore) => void + 'updateNodeInternals': () => void + 'error': ( + error: import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + >, + ) => void + 'connect': (connectionEvent: import('../../types').Connection) => void + 'connectStart': ( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => void + 'connectEnd': (connectionEvent?: MouseEvent | undefined) => void + 'clickConnectStart': ( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => void + 'clickConnectEnd': (connectionEvent?: MouseEvent | undefined) => void + 'moveStart': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'move': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'moveEnd': (moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => void + 'selectionDragStart': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionDrag': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionDragStop': (selectionEvent: import('../../types').NodeDragEvent) => void + 'selectionContextMenu': (selectionEvent: { + event: MouseEvent + nodes: import('../../types').GraphNode[] + }) => void + 'selectionStart': (selectionEvent: MouseEvent) => void + 'selectionEnd': (selectionEvent: MouseEvent) => void + 'viewportChangeStart': (viewport: import('../../types').ViewportTransform) => void + 'viewportChange': (viewport: import('../../types').ViewportTransform) => void + 'viewportChangeEnd': (viewport: import('../../types').ViewportTransform) => void + 'paneScroll': (paneScrollEvent: WheelEvent | undefined) => void + 'paneClick': (paneMouseEvent: MouseEvent) => void + 'paneContextMenu': (paneMouseEvent: MouseEvent) => void + 'paneMouseEnter': (paneMouseEvent: MouseEvent) => void + 'paneMouseMove': (paneMouseEvent: MouseEvent) => void + 'paneMouseLeave': (paneMouseEvent: MouseEvent) => void + 'edgeUpdate': (edgeUpdateEvent: import('../../types').EdgeUpdateEvent) => void + 'edgeContextMenu': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseEnter': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseMove': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeMouseLeave': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeDoubleClick': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeClick': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeUpdateStart': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'edgeUpdateEnd': (edgeMouseEvent: import('../../types').EdgeMouseEvent) => void + 'nodeDoubleClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseEnter': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseMove': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeMouseLeave': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeContextMenu': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'nodeDragStart': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'nodeDrag': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'nodeDragStop': (nodeDragEvent: import('../../types').NodeDragEvent) => void + 'miniMapNodeClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeDoubleClick': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseEnter': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseMove': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'miniMapNodeMouseLeave': (nodeMouseEvent: import('../../types').NodeMouseEvent) => void + 'update:modelValue': (value: import('../../types').FlowElements) => void + 'update:nodes': (value: import('../../types').GraphNode[]) => void + 'update:edges': (value: import('../../types').GraphEdge[]) => void + }, + string, + import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + id: { + type: import('vue').PropType + } + nodes: { + type: import('vue').PropType[]> + } + edges: { + type: import('vue').PropType + } + modelValue: { + type: import('vue').PropType> + } + edgeTypes: { + type: import('vue').PropType + } + nodeTypes: { + type: import('vue').PropType + } + connectionMode: { + type: import('vue').PropType + } + connectionLineType: { + type: import('vue').PropType + } + connectionLineStyle: { + type: import('vue').PropType + default: undefined + } + connectionLineOptions: { + type: import('vue').PropType + default: undefined + } + connectionRadius: { + type: import('vue').PropType + } + isValidConnection: { + type: import('vue').PropType + default: undefined + } + deleteKeyCode: { + type: import('vue').PropType + default: undefined + } + selectionKeyCode: { + type: import('vue').PropType + default: undefined + } + multiSelectionKeyCode: { + type: import('vue').PropType + default: undefined + } + zoomActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + panActivationKeyCode: { + type: import('vue').PropType + default: undefined + } + snapToGrid: { + type: import('vue').PropType + default: undefined + } + snapGrid: { + type: import('vue').PropType + } + onlyRenderVisibleElements: { + type: import('vue').PropType + default: undefined + } + edgesUpdatable: { + type: import('vue').PropType + default: undefined + } + nodesDraggable: { + type: import('vue').PropType + default: undefined + } + nodesConnectable: { + type: import('vue').PropType + default: undefined + } + nodeDragThreshold: { + type: import('vue').PropType + } + elementsSelectable: { + type: import('vue').PropType + default: undefined + } + selectNodesOnDrag: { + type: import('vue').PropType + default: undefined + } + panOnDrag: { + type: import('vue').PropType + default: undefined + } + minZoom: { + type: import('vue').PropType + } + maxZoom: { + type: import('vue').PropType + } + defaultViewport: { + type: import('vue').PropType> + } + translateExtent: { + type: import('vue').PropType + } + nodeExtent: { + type: import('vue').PropType + } + defaultMarkerColor: { + type: import('vue').PropType + } + zoomOnScroll: { + type: import('vue').PropType + default: undefined + } + zoomOnPinch: { + type: import('vue').PropType + default: undefined + } + panOnScroll: { + type: import('vue').PropType + default: undefined + } + panOnScrollSpeed: { + type: import('vue').PropType + } + panOnScrollMode: { + type: import('vue').PropType + } + paneClickDistance: { + type: import('vue').PropType + } + zoomOnDoubleClick: { + type: import('vue').PropType + default: undefined + } + preventScrolling: { + type: import('vue').PropType + default: undefined + } + selectionMode: { + type: import('vue').PropType + } + edgeUpdaterRadius: { + type: import('vue').PropType + } + fitViewOnInit: { + type: import('vue').PropType + default: undefined + } + connectOnClick: { + type: import('vue').PropType + default: undefined + } + applyDefault: { + type: import('vue').PropType + default: undefined + } + autoConnect: { + type: import('vue').PropType + default: undefined + } + noDragClassName: { + type: import('vue').PropType + } + noWheelClassName: { + type: import('vue').PropType + } + noPanClassName: { + type: import('vue').PropType + } + defaultEdgeOptions: { + type: import('vue').PropType + } + elevateEdgesOnSelect: { + type: import('vue').PropType + default: undefined + } + elevateNodesOnSelect: { + type: import('vue').PropType + default: undefined + } + disableKeyboardA11y: { + type: import('vue').PropType + default: undefined + } + edgesFocusable: { + type: import('vue').PropType + default: undefined + } + nodesFocusable: { + type: import('vue').PropType + default: undefined + } + autoPanOnConnect: { + type: import('vue').PropType + default: undefined + } + autoPanOnNodeDrag: { + type: import('vue').PropType + default: undefined + } + autoPanSpeed: { + type: import('vue').PropType + } + }> + > & { + 'onMove'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onNodesChange'?: ((changes: import('../../types').NodeChange[]) => any) | undefined + 'onEdgesChange'?: ((changes: import('../../types').EdgeChange[]) => any) | undefined + 'onNodeDoubleClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseEnter'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseMove'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeMouseLeave'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeContextMenu'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onNodeDragStart'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodeDrag'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodeDragStop'?: ((nodeDragEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onNodesInitialized'?: (() => any) | undefined + 'onUpdateNodeInternals'?: (() => any) | undefined + 'onMiniMapNodeClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeDoubleClick'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseEnter'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseMove'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onMiniMapNodeMouseLeave'?: ((nodeMouseEvent: import('../../types').NodeMouseEvent) => any) | undefined + 'onConnect'?: ((connectionEvent: import('../../types').Connection) => any) | undefined + 'onConnectStart'?: + | (( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => any) + | undefined + 'onConnectEnd'?: ((connectionEvent?: MouseEvent | undefined) => any) | undefined + 'onClickConnectStart'?: + | (( + connectionEvent: { + event?: MouseEvent | undefined + } & import('../../types').OnConnectStartParams, + ) => any) + | undefined + 'onClickConnectEnd'?: ((connectionEvent?: MouseEvent | undefined) => any) | undefined + 'onPaneReady'?: ((paneEvent: VueFlowStore) => any) | undefined + 'onInit'?: ((paneEvent: VueFlowStore) => any) | undefined + 'onMoveStart'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onMoveEnd'?: + | ((moveEvent: { + event: import('d3-zoom').D3ZoomEvent + flowTransform: import('../../types').ViewportTransform + }) => any) + | undefined + 'onSelectionDragStart'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionDrag'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionDragStop'?: ((selectionEvent: import('../../types').NodeDragEvent) => any) | undefined + 'onSelectionContextMenu'?: + | ((selectionEvent: { event: MouseEvent; nodes: import('../../types').GraphNode[] }) => any) + | undefined + 'onSelectionStart'?: ((selectionEvent: MouseEvent) => any) | undefined + 'onSelectionEnd'?: ((selectionEvent: MouseEvent) => any) | undefined + 'onViewportChangeStart'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onViewportChange'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onViewportChangeEnd'?: ((viewport: import('../../types').ViewportTransform) => any) | undefined + 'onPaneScroll'?: ((paneScrollEvent: WheelEvent | undefined) => any) | undefined + 'onPaneClick'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneContextMenu'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseEnter'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseMove'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onPaneMouseLeave'?: ((paneMouseEvent: MouseEvent) => any) | undefined + 'onEdgeContextMenu'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseEnter'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseMove'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeMouseLeave'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeDoubleClick'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeClick'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeUpdateStart'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onEdgeUpdate'?: ((edgeUpdateEvent: import('../../types').EdgeUpdateEvent) => any) | undefined + 'onEdgeUpdateEnd'?: ((edgeMouseEvent: import('../../types').EdgeMouseEvent) => any) | undefined + 'onError'?: + | (( + error: import('../..').VueFlowError< + import('../..').ErrorCode, + | [] + | [id?: string | undefined] + | [id: string | null] + | [id: string, parentId: string] + | [type: string] + | [id: string] + | [id: string] + | [id: string, source: string] + | [id: string, target: string] + | [type: string] + | [id: string, source: string, target: string] + | [id: string, source: string, target: string] + | [id: string] + | [id: string] + >, + ) => any) + | undefined + 'onUpdate:modelValue'?: ((value: import('../../types').FlowElements) => any) | undefined + 'onUpdate:nodes'?: ((value: import('../../types').GraphNode[]) => any) | undefined + 'onUpdate:edges'?: ((value: import('../../types').GraphEdge[]) => any) | undefined + }, + { + connectionLineStyle: import('vue').CSSProperties | null + connectionLineOptions: import('../../types').ConnectionLineOptions + isValidConnection: import('../../types').ValidConnectionFunc | null + deleteKeyCode: import('@vueuse/core').KeyFilter | null + selectionKeyCode: false | import('@vueuse/core').KeyFilter | null + multiSelectionKeyCode: import('@vueuse/core').KeyFilter | null + zoomActivationKeyCode: import('@vueuse/core').KeyFilter | null + panActivationKeyCode: import('@vueuse/core').KeyFilter | null + snapToGrid: boolean + onlyRenderVisibleElements: boolean + edgesUpdatable: import('../../types').EdgeUpdatable + nodesDraggable: boolean + nodesConnectable: boolean + elementsSelectable: boolean + selectNodesOnDrag: boolean + panOnDrag: boolean | number[] + zoomOnScroll: boolean + zoomOnPinch: boolean + panOnScroll: boolean + zoomOnDoubleClick: boolean + preventScrolling: boolean + fitViewOnInit: boolean + connectOnClick: boolean + applyDefault: boolean + autoConnect: boolean | import('../../types').Connector + elevateEdgesOnSelect: boolean + elevateNodesOnSelect: boolean + disableKeyboardA11y: boolean + edgesFocusable: boolean + nodesFocusable: boolean + autoPanOnConnect: boolean + autoPanOnNodeDrag: boolean + }, + {} + >, + Readonly +> +export default _default +type __VLS_WithTemplateSlots = T & { + new (): { + $slots: S + } +} diff --git a/node_modules/@vue-flow/core/dist/src/container/index.d.ts b/node_modules/@vue-flow/core/dist/src/container/index.d.ts new file mode 100644 index 00000000..fdae6716 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/container/index.d.ts @@ -0,0 +1,6 @@ +export { default as VueFlow } from './VueFlow/VueFlow.vue' +export { default as EdgeRenderer } from './EdgeRenderer/EdgeRenderer.vue' +export { default as Marker } from './EdgeRenderer/Marker.vue' +export { default as MarkerDefinitions } from './EdgeRenderer/MarkerDefinitions.vue' +export { default as NodeRenderer } from './NodeRenderer/NodeRenderer.vue' +export { default as Viewport } from './Viewport/Viewport.vue' diff --git a/node_modules/@vue-flow/core/dist/src/context/index.d.ts b/node_modules/@vue-flow/core/dist/src/context/index.d.ts new file mode 100644 index 00000000..75658971 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/context/index.d.ts @@ -0,0 +1,9 @@ +import type { InjectionKey, Ref } from 'vue' +import type { FlowSlots, VueFlowStore } from '../types' + +export declare const VueFlow: InjectionKey +export declare const NodeId: InjectionKey +export declare const NodeRef: InjectionKey> +export declare const EdgeId: InjectionKey +export declare const EdgeRef: InjectionKey> +export declare const Slots: InjectionKey> diff --git a/node_modules/@vue-flow/core/dist/src/index.d.ts b/node_modules/@vue-flow/core/dist/src/index.d.ts new file mode 100644 index 00000000..637d9f6c --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/index.d.ts @@ -0,0 +1,69 @@ +/** + * Vue Flow + * @module vue-flow + */ +export { default as VueFlow } from './container/VueFlow/VueFlow.vue' +export { default as Handle } from './components/Handle/Handle.vue' +export { default as Panel } from './components/Panel/Panel.vue' +export { default as StraightEdge } from './components/Edges/StraightEdge' +export { default as StepEdge } from './components/Edges/StepEdge' +export { default as BezierEdge } from './components/Edges/BezierEdge' +export { default as SimpleBezierEdge } from './components/Edges/SimpleBezierEdge' +export { default as SmoothStepEdge } from './components/Edges/SmoothStepEdge' +export { default as BaseEdge } from './components/Edges/BaseEdge.vue' +export { default as EdgeText } from './components/Edges/EdgeText.vue' +export { default as EdgeLabelRenderer } from './components/Edges/EdgeLabelRenderer.vue' +export { + getBezierPath, + getSimpleBezierPath, + getSmoothStepPath, + getStraightPath, + getSimpleEdgeCenter, + getBezierEdgeCenter, +} from './components/Edges/utils' +export { + isNode, + isEdge, + isGraphNode, + isGraphEdge, + addEdge, + updateEdge, + getOutgoers, + getIncomers, + getConnectedEdges, + getTransformForBounds, + getRectOfNodes, + pointToRendererPoint, + rendererPointToPoint, + /** @deprecated - will be removed in the next major version, use `rendererPointToPoint` instead */ + rendererPointToPoint as graphPosToZoomedPos, + getNodesInside, + getMarkerId, + getBoundsofRects, + connectionExists, + clamp, +} from './utils/graph' +/** + * @deprecated - Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead + * Intended for options API + * In composition API you can access apply utilities from `useVueFlow` + */ +export { applyChanges, applyEdgeChanges, applyNodeChanges } from './utils/changes' +export { defaultEdgeTypes, defaultNodeTypes } from './utils/defaultNodesEdges' +export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context' +export { useZoomPanHelper } from './composables/useZoomPanHelper' +export { useVueFlow } from './composables/useVueFlow' +export { useHandle } from './composables/useHandle' +export { useNode } from './composables/useNode' +export { useEdge } from './composables/useEdge' +export { useGetPointerPosition } from './composables/useGetPointerPosition' +export { useNodeId } from './composables/useNodeId' +export { useConnection } from './composables/useConnection' +export { useHandleConnections } from './composables/useHandleConnections' +export { useNodeConnections } from './composables/useNodeConnections' +export { useNodesData } from './composables/useNodesData' +export { useEdgesData } from './composables/useEdgesData' +export { useNodesInitialized } from './composables/useNodesInitialized' +export { useKeyPress } from './composables/useKeyPress' +export { VueFlowError, ErrorCode, isErrorOfType } from './utils/errors' +export * from './types' diff --git a/node_modules/@vue-flow/core/dist/src/store/actions.d.ts b/node_modules/@vue-flow/core/dist/src/store/actions.d.ts new file mode 100644 index 00000000..0769965a --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/store/actions.d.ts @@ -0,0 +1,8 @@ +import type { ComputedRef } from 'vue' +import type { Actions, EdgeLookup, NodeLookup, State } from '../types' + +export declare function useActions( + state: State, + nodeLookup: ComputedRef, + edgeLookup: ComputedRef, +): Actions diff --git a/node_modules/@vue-flow/core/dist/src/store/getters.d.ts b/node_modules/@vue-flow/core/dist/src/store/getters.d.ts new file mode 100644 index 00000000..25b1784f --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/store/getters.d.ts @@ -0,0 +1,8 @@ +import type { ComputedRef } from 'vue' +import type { ComputedGetters, EdgeLookup, NodeLookup, State } from '../types' + +export declare function useGetters( + state: State, + nodeLookup: ComputedRef, + edgeLookup: ComputedRef, +): ComputedGetters diff --git a/node_modules/@vue-flow/core/dist/src/store/hooks.d.ts b/node_modules/@vue-flow/core/dist/src/store/hooks.d.ts new file mode 100644 index 00000000..07b765e7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/store/hooks.d.ts @@ -0,0 +1,5 @@ +import type { Ref } from 'vue' +import type { FlowHooks } from '../types' + +export declare function createHooks(): FlowHooks +export declare function useHooks(emit: (...args: any[]) => void, hooks: Ref): void diff --git a/node_modules/@vue-flow/core/dist/src/store/index.d.ts b/node_modules/@vue-flow/core/dist/src/store/index.d.ts new file mode 100644 index 00000000..489b29f3 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/store/index.d.ts @@ -0,0 +1,4 @@ +export * from './actions' +export * from './getters' +export * from './hooks' +export * from './state' diff --git a/node_modules/@vue-flow/core/dist/src/store/state.d.ts b/node_modules/@vue-flow/core/dist/src/store/state.d.ts new file mode 100644 index 00000000..3ace59f4 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/store/state.d.ts @@ -0,0 +1,4 @@ +import type { FlowOptions, State } from '../types' + +export declare function useState(): State +export declare const storeOptionsToSkip: (keyof Partial>)[] diff --git a/node_modules/@vue-flow/core/dist/src/types/changes.d.ts b/node_modules/@vue-flow/core/dist/src/types/changes.d.ts new file mode 100644 index 00000000..17cdd3b7 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/types/changes.d.ts @@ -0,0 +1,56 @@ +import type { Dimensions, ElementData, XYPosition } from './flow' +import type { GraphNode, Node, NodeHandleBounds } from './node' +import type { GraphEdge } from './edge' + +export interface NodeDragItem { + id: string + position: XYPosition + distance: XYPosition + dimensions: Dimensions + from: XYPosition + extent?: Node['extent'] + parentNode?: string + expandParent?: boolean +} +export interface NodeDimensionChange { + id: string + type: 'dimensions' + dimensions?: Dimensions + handleBounds?: NodeHandleBounds + updateStyle?: boolean + resizing?: boolean +} +export interface NodePositionChange { + id: string + type: 'position' + position: XYPosition + from: XYPosition + dragging?: boolean +} +export interface NodeSelectionChange { + id: string + type: 'select' + selected: boolean +} +export interface NodeRemoveChange { + id: string + type: 'remove' +} +export interface NodeAddChange { + item: GraphNode + type: 'add' +} +export type NodeChange = NodeDimensionChange | NodePositionChange | NodeSelectionChange | NodeRemoveChange | NodeAddChange +export type EdgeSelectionChange = NodeSelectionChange +export interface EdgeRemoveChange extends NodeRemoveChange { + source: string + target: string + sourceHandle: string | null + targetHandle: string | null +} +export interface EdgeAddChange { + item: GraphEdge + type: 'add' +} +export type EdgeChange = EdgeSelectionChange | EdgeRemoveChange | EdgeAddChange +export type ElementChange = NodeChange | EdgeChange diff --git a/node_modules/@vue-flow/core/dist/src/types/components.d.ts b/node_modules/@vue-flow/core/dist/src/types/components.d.ts new file mode 100644 index 00000000..a26a3526 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/types/components.d.ts @@ -0,0 +1,39 @@ +import type { CSSProperties, Component, DefineComponent, VNode } from 'vue' +import type { BezierEdge, SimpleBezierEdge, SmoothStepEdge, StepEdge, StraightEdge } from '../components' +import type { NodeProps } from './node' +import type { EdgeProps } from './edge' + +/** Global component names are components registered to the vue instance and are "autoloaded" by their string name */ +type GlobalComponentName = string +/** Node Components can either be a component definition or a string name */ +export type NodeComponent = Component | DefineComponent | GlobalComponentName +export type NodeTypesObject = { + [key in keyof DefaultNodeTypes]?: NodeComponent +} & Record +export type EdgeTypesObject = { + [key in keyof DefaultEdgeTypes]?: EdgeComponent +} & Record +/** Edge Components can either be a component definition or a string name */ +export type EdgeComponent = Component | DefineComponent | GlobalComponentName +export interface DefaultEdgeTypes { + default: typeof BezierEdge + straight: typeof StraightEdge + simplebezier: typeof SimpleBezierEdge + step: typeof StepEdge + smoothstep: typeof SmoothStepEdge +} +export type DefaultNodeTypes = { + [key in 'input' | 'output' | 'default']: NodeComponent +} +/** these props are passed to edge texts */ +export interface EdgeTextProps { + x: number + y: number + label?: string | VNode | object + labelStyle?: CSSProperties + labelShowBg?: boolean + labelBgStyle?: CSSProperties + labelBgPadding?: [number, number] + labelBgBorderRadius?: number +} +export {} diff --git a/node_modules/@vue-flow/core/dist/src/types/connection.d.ts b/node_modules/@vue-flow/core/dist/src/types/connection.d.ts new file mode 100644 index 00000000..300020cd --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/types/connection.d.ts @@ -0,0 +1,90 @@ +import type { CSSProperties } from 'vue' +import type { Position } from './flow' +import type { GraphNode } from './node' +import type { HandleElement, HandleType } from './handle' +import type { Edge, EdgeMarkerType } from './edge' + +/** Connection line types (same as default edge types */ +export declare enum ConnectionLineType { + Bezier = 'default', + SimpleBezier = 'simple-bezier', + Straight = 'straight', + Step = 'step', + SmoothStep = 'smoothstep', +} +export interface ConnectionLineOptions { + type?: ConnectionLineType + style?: CSSProperties + class?: string + markerEnd?: EdgeMarkerType + markerStart?: EdgeMarkerType +} +/** Connection params that are passed when onConnect is called */ +export interface Connection { + /** Source node id */ + source: string + /** Target node id */ + target: string + /** Source handle id */ + sourceHandle?: string | null + /** Target handle id */ + targetHandle?: string | null +} +/** + * Connection with edge id + * @deprecated + * todo: remove in next major release + */ +export interface HandleConnection extends Connection { + edgeId: string +} +export type NodeConnection = Connection & { + edgeId: string +} +export type Connector = ( + params: Connection, +) => Promise<(Connection & Partial) | false> | ((Connection & Partial) | false) +export type ConnectionStatus = 'valid' | 'invalid' +/** The source nodes params when connection is initiated */ +export interface OnConnectStartParams { + /** Source node id */ + nodeId?: string + /** Source handle id */ + handleId: string | null + /** Source handle type */ + handleType?: HandleType +} +/** Connection modes, when set to loose all handles are treated as source */ +export declare enum ConnectionMode { + Strict = 'strict', + Loose = 'loose', +} +export interface ConnectionLineProps { + /** Source X position of the connection line */ + sourceX: number + /** Source Y position of the connection line */ + sourceY: number + /** Source position of the connection line */ + sourcePosition: Position + /** Target X position of the connection line */ + targetX: number + /** Target Y position of the connection line */ + targetY: number + /** Target position of the connection line */ + targetPosition: Position + /** The source node of the connection line */ + sourceNode: GraphNode + /** The source handle element (not the DOM element) of the connection line */ + sourceHandle: HandleElement | null + /** The target node of the connection line */ + targetNode: GraphNode | null + /** The target handle element (not the DOM element) of the connection line */ + targetHandle: HandleElement | null + /** marker url */ + markerStart: string + /** marker url */ + markerEnd: string + /** status of the connection (valid, invalid) */ + connectionStatus: ConnectionStatus | null +} +export type ConnectionLookup = Map> diff --git a/node_modules/@vue-flow/core/dist/src/types/edge.d.ts b/node_modules/@vue-flow/core/dist/src/types/edge.d.ts new file mode 100644 index 00000000..133b0df8 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/types/edge.d.ts @@ -0,0 +1,208 @@ +import type { CSSProperties, Component, VNode } from 'vue' +import type { ClassFunc, ElementData, Position, StyleFunc, Styles } from './flow' +import type { GraphNode } from './node' +import type { EdgeComponent, EdgeTextProps } from './components' +import type { CustomEvent, EdgeEventsHandler, EdgeEventsOn } from './hooks' + +/** Edge markers */ +export declare enum MarkerType { + Arrow = 'arrow', + ArrowClosed = 'arrowclosed', +} +/** Edge marker definition */ +export interface EdgeMarker { + /** Unique marker id */ + id?: string + /** Marker type */ + type: MarkerType + /** Marker color */ + color?: string + /** Marker width */ + width?: number + /** Marker height */ + height?: number + /** Marker units */ + markerUnits?: string + /** Marker orientation */ + orient?: string + /** Marker stroke width */ + strokeWidth?: number +} +export interface MarkerProps { + id: string + type: MarkerType | string + color?: string + width?: number + height?: number + markerUnits?: string + orient?: string + strokeWidth?: number +} +export type EdgeMarkerType = string | MarkerType | EdgeMarker +export type EdgeUpdatable = boolean | 'target' | 'source' +export interface EdgeLabelOptions { + /** Label styles (CSSProperties) */ + labelStyle?: CSSProperties + /** Show label bg */ + labelShowBg?: boolean + /** Label Bg styles (CSSProperties) */ + labelBgStyle?: CSSProperties + /** Label Bg padding */ + labelBgPadding?: [number, number] + /** Label Bg border radius */ + labelBgBorderRadius?: number +} +export interface DefaultEdge< + Data = ElementData, + CustomEvents extends Record = any, + Type extends string = string, +> extends EdgeLabelOptions { + /** Unique edge id */ + id: string + /** An edge label */ + label?: string | VNode | Component + /** Edge type, can be a default type or a custom type */ + type?: Type + /** Source node id */ + source: string + /** Target node id */ + target: string + /** Source handle id */ + sourceHandle?: string | null + /** Target handle id */ + targetHandle?: string | null + /** Animated edge */ + animated?: boolean + /** EdgeMarker */ + markerStart?: EdgeMarkerType + /** EdgeMarker */ + markerEnd?: EdgeMarkerType + /** Disable/enable updating edge */ + updatable?: EdgeUpdatable + /** Disable/enable selecting edge */ + selectable?: boolean + /** Disable/enable focusing edge (a11y) */ + focusable?: boolean + /** Disable/enable deleting edge */ + deletable?: boolean + /** Additional class names, can be a string or a callback returning a string (receives current flow element) */ + class?: string | string[] | Record | ClassFunc> + /** Additional styles, can be an object or a callback returning an object (receives current flow element) */ + style?: Styles | StyleFunc> + /** Is edge hidden */ + hidden?: boolean + /** Radius of mouse event triggers (to ease selecting edges), defaults to 2 */ + interactionWidth?: number + /** Overwrites current edge type */ + template?: EdgeComponent + /** Additional data that is passed to your custom components */ + data?: Data + /** @deprecated will be removed in the next major version */ + events?: Partial> + /** Aria label for edge (a11y) */ + zIndex?: number + ariaLabel?: string | null +} +export interface SmoothStepPathOptions { + offset?: number + borderRadius?: number +} +export type SmoothStepEdgeType = any> = DefaultEdge< + Data, + CustomEvents +> & { + type: 'smoothstep' + pathOptions?: SmoothStepPathOptions +} +export interface BezierPathOptions { + curvature?: number +} +export type BezierEdgeType = any> = DefaultEdge< + Data, + CustomEvents +> & { + type: 'default' + pathOptions?: BezierPathOptions +} +export type Edge = any, Type extends string = string> = + | DefaultEdge + | SmoothStepEdgeType + | BezierEdgeType +export type DefaultEdgeOptions = Omit +export interface EdgePositions { + sourceX: number + sourceY: number + targetX: number + targetY: number +} +/** Internal edge type */ +export type GraphEdge< + Data = ElementData, + CustomEvents extends Record = any, + Type extends string = string, +> = Edge & { + selected: boolean + sourceNode: GraphNode + targetNode: GraphNode + data: Data + /** @deprecated will be removed in the next major version */ + events: Partial> + type: Type +} & EdgePositions +/** these props are passed to edge components */ +export interface EdgeProps + extends EdgeLabelOptions, + EdgePositions { + id: string + sourceNode: GraphNode + targetNode: GraphNode + source: string + target: string + type: Type + label?: string | VNode | Component | object + style?: CSSProperties + selected?: boolean + sourcePosition: Position + targetPosition: Position + sourceHandleId?: string + targetHandleId?: string + animated?: boolean + updatable?: boolean + markerStart: string + markerEnd: string + curvature?: number + interactionWidth?: number + data: Data + /** contextual and custom events of edge */ + events: EdgeEventsOn +} +export interface BaseEdgeProps extends EdgeLabelOptions { + id?: string + labelX?: number + labelY?: number + path: string + label?: any + markerStart?: string + markerEnd?: string + interactionWidth?: number +} +export type BezierEdgeProps = EdgePositions & + BezierPathOptions & + Omit & + Pick +export type SimpleBezierEdgeProps = EdgePositions & + Omit & + Pick +export type StraightEdgeProps = EdgePositions & Omit +export type StepEdgeProps = EdgePositions & + Omit & + Pick +export type SmoothStepEdgeProps = EdgePositions & + Omit & + Pick & + SmoothStepPathOptions +export type ToGraphEdge = GraphEdge< + T extends Edge ? Data : never, + T extends Edge ? CustomEvents : never, + T extends Edge ? Type : never +> diff --git a/node_modules/@vue-flow/core/dist/src/types/flow.d.ts b/node_modules/@vue-flow/core/dist/src/types/flow.d.ts new file mode 100644 index 00000000..ac336bd9 --- /dev/null +++ b/node_modules/@vue-flow/core/dist/src/types/flow.d.ts @@ -0,0 +1,322 @@ +import type { CSSProperties } from 'vue' +import type { KeyFilter } from '@vueuse/core' +import type { D3ZoomEvent } from 'd3-zoom' +import type { VueFlowError } from '../utils' +import type { DefaultEdgeOptions, Edge, EdgeProps, EdgeUpdatable, GraphEdge } from './edge' +import type { CoordinateExtent, CoordinateExtentRange, GraphNode, Node, NodeProps } from './node' +import type { + Connection, + ConnectionLineOptions, + ConnectionLineProps, + ConnectionLineType, + ConnectionMode, + Connector, + OnConnectStartParams, +} from './connection' +import type { PanOnScrollMode, ViewportTransform } from './zoom' +import type { EdgeTypesObject, NodeTypesObject } from './components' +import type { CustomEvent, EdgeMouseEvent, EdgeUpdateEvent, NodeDragEvent, NodeMouseEvent } from './hooks' +import type { ValidConnectionFunc } from './handle' +import type { EdgeChange, NodeChange } from './changes' +import type { VueFlowStore } from './store' + +export type ElementData = any +/** + * @deprecated - will be removed in the next major version + * A flow element (after parsing into state) + */ +export type FlowElement< + NodeData = ElementData, + EdgeData = ElementData, + NodeEvents extends Record = any, + EdgeEvents extends Record = any, +> = GraphNode | GraphEdge +/** + * @deprecated - will be removed in the next major version + * An array of flow elements (after parsing into state) + */ +export type FlowElements< + NodeData = ElementData, + EdgeData = ElementData, + NodeEvents extends Record = any, + EdgeEvents extends Record = any, +> = FlowElement[] +/** Initial elements (before parsing into state) */ +export type Element< + NodeData = ElementData, + EdgeData = ElementData, + NodeEvents extends Record = any, + EdgeEvents extends Record = any, +> = Node | Edge +export type Elements< + NodeData = ElementData, + EdgeData = ElementData, + NodeEvents extends Record = any, + EdgeEvents extends Record = any, +> = Element[] +export type MaybeElement = Node | Edge | Connection | FlowElement | Element +export interface CustomThemeVars { + [key: string]: string | number | undefined +} +export type CSSVars = + | '--vf-node-color' + | '--vf-box-shadow' + | '--vf-node-bg' + | '--vf-node-text' + | '--vf-connection-path' + | '--vf-handle' +export type ThemeVars = { + [key in CSSVars]?: CSSProperties['color'] +} +export type Styles = CSSProperties & ThemeVars & CustomThemeVars +/** @deprecated will be removed in the next major version */ +export type ClassFunc = (element: ElementType) => string | void +/** @deprecated will be removed in the next major version */ +export type StyleFunc = (element: ElementType) => Styles | void +/** Handle Positions */ +export declare enum Position { + Left = 'left', + Top = 'top', + Right = 'right', + Bottom = 'bottom', +} +export interface XYPosition { + x: number + y: number +} +export type XYZPosition = XYPosition & { + z: number +} +export interface Dimensions { + width: number + height: number +} +export interface Box extends XYPosition { + x2: number + y2: number +} +export interface Rect extends Dimensions, XYPosition {} +export type SnapGrid = [x: number, y: number] +export interface SelectionRect extends Rect { + startX: number + startY: number +} +export declare enum SelectionMode { + Partial = 'partial', + Full = 'full', +} +export interface FlowExportObject { + /** exported nodes */ + nodes: Node[] + /** exported edges */ + edges: Edge[] + /** + * exported viewport position + * @deprecated use {@link FlowExportObject.viewport} instead + */ + position: [x: number, y: number] + /** + * exported zoom level + * @deprecated use {@link FlowExportObject.viewport} instead + */ + zoom: number + /** exported viewport (position + zoom) */ + viewport: ViewportTransform +} +export interface FlowProps { + id?: string + /** + * all elements (nodes + edges) + * @deprecated use {@link FlowProps.nodes} & {@link FlowProps.nodes} instead + */ + modelValue?: Elements + nodes?: Node[] + edges?: Edge[] + /** either use the edgeTypes prop to define your edge-types or use slots (