vue3-network-graph 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +2 -1
- package/README.md +2 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +440 -428
- package/dist/index.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -190,12 +190,14 @@ var b = {
|
|
|
190
190
|
"y",
|
|
191
191
|
"width",
|
|
192
192
|
"height",
|
|
193
|
+
"rx",
|
|
193
194
|
"fill"
|
|
194
195
|
], ut = [
|
|
195
196
|
"x",
|
|
196
197
|
"y",
|
|
197
198
|
"width",
|
|
198
199
|
"height",
|
|
200
|
+
"rx",
|
|
199
201
|
"stroke",
|
|
200
202
|
"stroke-width",
|
|
201
203
|
"stroke-dasharray"
|
|
@@ -204,6 +206,7 @@ var b = {
|
|
|
204
206
|
"y",
|
|
205
207
|
"width",
|
|
206
208
|
"height",
|
|
209
|
+
"rx",
|
|
207
210
|
"stroke"
|
|
208
211
|
], ft = ["fill"], pt = [
|
|
209
212
|
"transform",
|
|
@@ -235,7 +238,7 @@ var b = {
|
|
|
235
238
|
"y",
|
|
236
239
|
"width",
|
|
237
240
|
"height"
|
|
238
|
-
], Dt = 6, Ot = 14, kt = 3,
|
|
241
|
+
], Dt = 6, Ot = 14, kt = 3, x = 60, At = .2, jt = 5, Mt = 160, Nt = 140, Pt = 12, Ft = 4e3, It = 12, Lt = 4e3, Rt = {
|
|
239
242
|
__name: "Topology",
|
|
240
243
|
props: {
|
|
241
244
|
nodes: {
|
|
@@ -293,9 +296,9 @@ var b = {
|
|
|
293
296
|
"node-resize-end"
|
|
294
297
|
],
|
|
295
298
|
setup(_, { expose: te, emit: ne }) {
|
|
296
|
-
let v = _, y = ne,
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
+
let v = _, y = ne, Rt = 0, zt = () => {
|
|
300
|
+
Rt++;
|
|
301
|
+
}, S = (e) => e && typeof e == "object" ? {
|
|
299
302
|
text: e.text,
|
|
300
303
|
rotation: e.rotation || 0,
|
|
301
304
|
fontSize: e.fontSize,
|
|
@@ -305,28 +308,28 @@ var b = {
|
|
|
305
308
|
rotation: 0,
|
|
306
309
|
fontSize: void 0,
|
|
307
310
|
color: void 0
|
|
308
|
-
},
|
|
309
|
-
|
|
311
|
+
}, Bt = (e, t = 11) => e.fontSize || t, Vt = (e) => e.fontColor || "#000000", Ht = (e, t = 500) => e.fontWeight || t, C = (e, t) => e.fontSize || S(t).fontSize || 8, w = (e, t) => e.fontColor || S(t).color || "#000000", T = d(v.nodes.map((e) => ({ ...e }))), Ut = null, E = () => {
|
|
312
|
+
Ut = T.value, y("update:nodes", T.value);
|
|
310
313
|
};
|
|
311
314
|
h(() => v.nodes, (e) => {
|
|
312
315
|
let t = Array.isArray(e) ? e : [];
|
|
313
|
-
if (t ===
|
|
316
|
+
if (t === Ut) return;
|
|
314
317
|
let n = null, r = null;
|
|
315
318
|
try {
|
|
316
|
-
n = JSON.stringify(t), r = JSON.stringify(
|
|
319
|
+
n = JSON.stringify(t), r = JSON.stringify(T.value);
|
|
317
320
|
} catch {
|
|
318
321
|
n = null;
|
|
319
322
|
}
|
|
320
|
-
(n === null || n !== r) && (
|
|
323
|
+
(n === null || n !== r) && (zt(), T.value = t.map((e) => ({ ...e })));
|
|
321
324
|
}, { deep: !0 });
|
|
322
|
-
let
|
|
325
|
+
let Wt = d(v.lineMode);
|
|
323
326
|
h(() => v.lineMode, (e) => {
|
|
324
|
-
|
|
327
|
+
Wt.value = e;
|
|
325
328
|
});
|
|
326
|
-
let
|
|
327
|
-
get: () =>
|
|
329
|
+
let Gt = t({
|
|
330
|
+
get: () => Wt.value,
|
|
328
331
|
set: (e) => {
|
|
329
|
-
|
|
332
|
+
Wt.value = e, y("update:lineMode", e);
|
|
330
333
|
}
|
|
331
334
|
}), D = d(null), O = d(null), Kt = d({
|
|
332
335
|
x: 0,
|
|
@@ -342,13 +345,13 @@ var b = {
|
|
|
342
345
|
...e,
|
|
343
346
|
...r.get(e.id)
|
|
344
347
|
} : e));
|
|
345
|
-
let i = new Set(
|
|
348
|
+
let i = new Set(T.value.map((e) => e.id)), a = j.value;
|
|
346
349
|
return n.filter((e) => !a.has(e.id) && i.has(e.from) && i.has(e.to));
|
|
347
350
|
}), Zt = t(() => v.config.watchDataChanges === !0), Qt = d({
|
|
348
351
|
nodes: [],
|
|
349
352
|
edges: []
|
|
350
353
|
}), $t = "", N = null, en = () => JSON.parse(JSON.stringify({
|
|
351
|
-
nodes:
|
|
354
|
+
nodes: T.value,
|
|
352
355
|
edges: M.value
|
|
353
356
|
})), tn = (e, t) => {
|
|
354
357
|
let n = new Map(e.map((e) => [e.id, e])), r = new Map(t.map((e) => [e.id, e]));
|
|
@@ -376,7 +379,7 @@ var b = {
|
|
|
376
379
|
N &&= (clearTimeout(N), null), Qt.value = en(), $t = "";
|
|
377
380
|
};
|
|
378
381
|
h([
|
|
379
|
-
|
|
382
|
+
T,
|
|
380
383
|
k,
|
|
381
384
|
j,
|
|
382
385
|
A
|
|
@@ -386,23 +389,23 @@ var b = {
|
|
|
386
389
|
Zt.value && on();
|
|
387
390
|
});
|
|
388
391
|
let sn = () => en(), cn = () => {
|
|
389
|
-
let e = new Set(
|
|
392
|
+
let e = new Set(z.value), t = new Set(B.value), n = T.value.filter((t) => e.has(t.id)), r = M.value.filter((n) => t.has(n.id) || e.has(n.from) || e.has(n.to));
|
|
390
393
|
return !n.length && !r.length ? {
|
|
391
394
|
nodes: [],
|
|
392
395
|
edges: []
|
|
393
|
-
} : (n.length && (
|
|
396
|
+
} : (n.length && (T.value = T.value.filter((t) => !e.has(t.id)), E()), r.length && (j.value = /* @__PURE__ */ new Set([...j.value, ...r.map((e) => e.id)]), k.value = k.value.filter((e) => !j.value.has(e.id)), y("edge-remove", r.map((e) => JSON.parse(JSON.stringify(e))))), z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V(), JSON.parse(JSON.stringify({
|
|
394
397
|
nodes: n,
|
|
395
398
|
edges: r
|
|
396
399
|
})));
|
|
397
400
|
}, ln = (e) => {
|
|
398
|
-
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(
|
|
401
|
+
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(T.value.map((e) => e.id)), r = [];
|
|
399
402
|
for (let e of t) {
|
|
400
403
|
let t = JSON.parse(JSON.stringify(e));
|
|
401
404
|
if (t.id == null) t.id = re();
|
|
402
405
|
else if (n.has(t.id)) continue;
|
|
403
406
|
n.add(t.id), r.push(t);
|
|
404
407
|
}
|
|
405
|
-
return r.length ? (
|
|
408
|
+
return r.length ? (T.value = [...T.value, ...r], E(), JSON.parse(JSON.stringify(r))) : [];
|
|
406
409
|
}, un = (e) => {
|
|
407
410
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(M.value.map((e) => e.id)), r = [];
|
|
408
411
|
for (let e of t) {
|
|
@@ -433,7 +436,7 @@ var b = {
|
|
|
433
436
|
});
|
|
434
437
|
}
|
|
435
438
|
let r = [];
|
|
436
|
-
return
|
|
439
|
+
return T.value = T.value.map((e) => {
|
|
437
440
|
let t = n.get(e.id);
|
|
438
441
|
if (!t) return e;
|
|
439
442
|
let i = {
|
|
@@ -441,7 +444,7 @@ var b = {
|
|
|
441
444
|
...t
|
|
442
445
|
};
|
|
443
446
|
return r.push(i), i;
|
|
444
|
-
}), r.length ? (
|
|
447
|
+
}), r.length ? (E(), JSON.parse(JSON.stringify(r))) : [];
|
|
445
448
|
}, fn = (e) => {
|
|
446
449
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && e.id != null);
|
|
447
450
|
if (!t.length) return [];
|
|
@@ -465,10 +468,10 @@ var b = {
|
|
|
465
468
|
return i.length ? (A.value = r, y("edge-update", JSON.parse(JSON.stringify(i))), JSON.parse(JSON.stringify(i))) : [];
|
|
466
469
|
}, pn = (e) => {
|
|
467
470
|
let t = e && typeof e == "object" ? e : null;
|
|
468
|
-
return k.value = [], j.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (
|
|
471
|
+
return k.value = [], j.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (T.value = JSON.parse(JSON.stringify(t.nodes)), E()) : (T.value = (Array.isArray(v.nodes) ? v.nodes : []).map((e) => ({ ...e })), Ut = T.value), z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V(), on(), en();
|
|
469
472
|
};
|
|
470
473
|
h(() => v.edges, (e) => {
|
|
471
|
-
|
|
474
|
+
zt();
|
|
472
475
|
let t = Array.isArray(e) ? e : [], n = new Set(t.map((e) => e.id));
|
|
473
476
|
if (k.value.length) {
|
|
474
477
|
let e = k.value.filter((e) => !n.has(e.id));
|
|
@@ -483,7 +486,7 @@ var b = {
|
|
|
483
486
|
r && (A.value = e);
|
|
484
487
|
}
|
|
485
488
|
}, { deep: !0 });
|
|
486
|
-
let
|
|
489
|
+
let P = t(() => {
|
|
487
490
|
let e = {};
|
|
488
491
|
M.value.forEach((t) => {
|
|
489
492
|
let n = [t.from, t.to].sort().join("__");
|
|
@@ -521,32 +524,36 @@ var b = {
|
|
|
521
524
|
};
|
|
522
525
|
});
|
|
523
526
|
}), t;
|
|
524
|
-
}),
|
|
527
|
+
}), mn = t(() => {
|
|
525
528
|
let e = /* @__PURE__ */ new Map();
|
|
526
|
-
for (let t of
|
|
529
|
+
for (let t of T.value) e.set(t.id, t);
|
|
527
530
|
return e;
|
|
528
|
-
}),
|
|
531
|
+
}), F = (e) => mn.value.get(e), I = (e) => e.state != "none" && b[e.state] && b[e.state].color || "#00f0ff", hn = (e) => b[e.state] || b.normal, gn = (e) => e.type === "text", _n = (e, t) => {
|
|
529
532
|
let n = Number(e);
|
|
530
533
|
return Number.isFinite(n) && n > 0 ? n : t;
|
|
531
|
-
},
|
|
532
|
-
let t =
|
|
534
|
+
}, vn = (e) => {
|
|
535
|
+
let t = _n(e.width, x), n = _n(e.height, x);
|
|
533
536
|
return {
|
|
534
|
-
sx: t /
|
|
535
|
-
sy: n /
|
|
537
|
+
sx: t / x,
|
|
538
|
+
sy: n / x
|
|
536
539
|
};
|
|
537
|
-
},
|
|
538
|
-
let { sx: t, sy: n } =
|
|
540
|
+
}, yn = (e) => {
|
|
541
|
+
let { sx: t, sy: n } = vn(e);
|
|
539
542
|
return t === 1 && n === 1 ? "" : `scale(${t}, ${n})`;
|
|
540
|
-
},
|
|
541
|
-
let { w: t, h: n } =
|
|
543
|
+
}, bn = (e) => {
|
|
544
|
+
let { w: t, h: n } = L(e), r = Math.min(10, t * .3), i = Math.min(10, n * .3);
|
|
542
545
|
return `translate(${t / 2 - r}, ${-(n / 2 - i)})`;
|
|
543
|
-
},
|
|
544
|
-
let
|
|
545
|
-
return
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
546
|
+
}, xn = t(() => {
|
|
547
|
+
let e = Number(v.config.labelGap);
|
|
548
|
+
return Number.isFinite(e) && e >= 0 ? e : 18;
|
|
549
|
+
}), Sn = (e) => {
|
|
550
|
+
if (gn(e)) return 4;
|
|
551
|
+
let { h: t } = L(e);
|
|
552
|
+
return e.labelPosition === "top" ? -(t / 2 + xn.value) : e.labelPosition === "center" ? 0 : t / 2 + xn.value;
|
|
553
|
+
}, Cn = (e) => {
|
|
554
|
+
let t = R(e);
|
|
555
|
+
if (gn(e) || !e.label) return t;
|
|
556
|
+
let n = Bt(e), r = Sn(e);
|
|
550
557
|
if (e.labelPosition === "top") {
|
|
551
558
|
let e = r - n - 4;
|
|
552
559
|
e < t.y && (t.height += t.y - e, t.y = e);
|
|
@@ -555,123 +562,123 @@ var b = {
|
|
|
555
562
|
i > t.y + t.height && (t.height = i - t.y);
|
|
556
563
|
}
|
|
557
564
|
return t;
|
|
558
|
-
},
|
|
559
|
-
let t =
|
|
565
|
+
}, wn = (e) => e.borderColor !== void 0 || e.borderWidth !== void 0 || e.borderStyle !== void 0, L = (e) => {
|
|
566
|
+
let t = gn(e);
|
|
560
567
|
return {
|
|
561
|
-
w:
|
|
562
|
-
h:
|
|
568
|
+
w: _n(e.width, t ? Math.max(60, String(e.label).length * 7 + 16) : x),
|
|
569
|
+
h: _n(e.height, t ? 26 : x)
|
|
563
570
|
};
|
|
564
|
-
},
|
|
565
|
-
let { w: t, h: n } =
|
|
571
|
+
}, R = (e) => {
|
|
572
|
+
let { w: t, h: n } = L(e);
|
|
566
573
|
return {
|
|
567
574
|
x: -t / 2,
|
|
568
575
|
y: -n / 2,
|
|
569
576
|
width: t,
|
|
570
577
|
height: n
|
|
571
578
|
};
|
|
572
|
-
},
|
|
573
|
-
t(() =>
|
|
574
|
-
let
|
|
579
|
+
}, Tn = (e) => wn(e) ? R(e) : null, En = (e) => e.background && e.background !== "none" ? e.background : null, z = d([]), B = d([]);
|
|
580
|
+
t(() => z.value.length === 1 ? z.value[0] : null), t(() => B.value.length === 1 ? B.value[0] : null);
|
|
581
|
+
let Dn = (e) => z.value.includes(e.id), On = (e) => B.value.includes(e.id), V = () => {
|
|
575
582
|
y("selection-change", {
|
|
576
|
-
nodes:
|
|
577
|
-
edges: M.value.filter((e) =>
|
|
583
|
+
nodes: T.value.filter((e) => z.value.includes(e.id)),
|
|
584
|
+
edges: M.value.filter((e) => B.value.includes(e.id))
|
|
578
585
|
});
|
|
579
|
-
},
|
|
586
|
+
}, kn = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 ? Math.floor(e) : Infinity : typeof e == "string" && /^\d+$/.test(e.trim()) ? parseInt(e.trim(), 10) : Infinity, An = t(() => kn(v.config.maxSelectNodes)), jn = t(() => kn(v.config.maxSelectEdges)), H = (e, t, n) => {
|
|
580
587
|
let r = new Set(e), i = [];
|
|
581
588
|
for (let e of t) r.has(e) || (r.add(e), i.push(e));
|
|
582
589
|
if (n === Infinity) return [...e, ...i];
|
|
583
590
|
let a = Math.max(0, n - e.length);
|
|
584
591
|
return [...e, ...i.slice(0, a)];
|
|
585
592
|
};
|
|
586
|
-
h([
|
|
593
|
+
h([An, jn], ([e, t]) => {
|
|
587
594
|
let n = !1;
|
|
588
|
-
|
|
595
|
+
z.value.length > e && (z.value = z.value.slice(0, e), n = !0), B.value.length > t && (B.value = B.value.slice(0, t), n = !0), n && V();
|
|
589
596
|
});
|
|
590
|
-
let
|
|
591
|
-
if (!
|
|
597
|
+
let Mn = t(() => v.config.selectedBorderColor || "#fbbf24"), Nn = (e, t) => {
|
|
598
|
+
if (!Rn()) {
|
|
592
599
|
if (t && (t.ctrlKey || t.metaKey)) {
|
|
593
|
-
let t =
|
|
594
|
-
t >= 0 ?
|
|
600
|
+
let t = z.value.indexOf(e.id);
|
|
601
|
+
t >= 0 ? z.value.splice(t, 1) : z.value = H(z.value, [e.id], An.value);
|
|
595
602
|
} else {
|
|
596
|
-
let t =
|
|
597
|
-
|
|
603
|
+
let t = z.value.length === 1 && z.value[0] === e.id;
|
|
604
|
+
z.value = t ? [] : H([], [e.id], An.value), B.value = [];
|
|
598
605
|
}
|
|
599
|
-
y("node-click", e), y("node-select",
|
|
606
|
+
y("node-click", e), y("node-select", Dn(e) ? e : null), V();
|
|
600
607
|
}
|
|
601
|
-
},
|
|
602
|
-
if (
|
|
603
|
-
let n =
|
|
604
|
-
let t =
|
|
608
|
+
}, Pn = t(() => v.config.selectedLineColor || "#fbbf24"), Fn = (e, t) => {
|
|
609
|
+
if (Rn()) return;
|
|
610
|
+
let n = P.value[e.id], r = !!(n && n.merged && n.representative), i = r ? M.value.filter((e) => {
|
|
611
|
+
let t = P.value[e.id];
|
|
605
612
|
return t && t.key === n.key;
|
|
606
613
|
}) : null, a = r ? i.map((e) => e.id) : [e.id], o = r ? {
|
|
607
614
|
...e,
|
|
608
615
|
bundleEdges: i
|
|
609
616
|
} : e;
|
|
610
|
-
if (t && (t.ctrlKey || t.metaKey)) a.every((e) =>
|
|
617
|
+
if (t && (t.ctrlKey || t.metaKey)) a.every((e) => B.value.includes(e)) ? B.value = B.value.filter((e) => !a.includes(e)) : B.value = H(B.value, a, jn.value);
|
|
611
618
|
else {
|
|
612
|
-
let e = a.length ===
|
|
613
|
-
|
|
619
|
+
let e = a.length === B.value.length && a.every((e) => B.value.includes(e));
|
|
620
|
+
B.value = e ? [] : H([], a, jn.value), z.value = [];
|
|
614
621
|
}
|
|
615
|
-
y("edge-select",
|
|
616
|
-
},
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
|
|
620
|
-
},
|
|
621
|
-
if (
|
|
622
|
+
y("edge-select", On(e) ? o : null), V();
|
|
623
|
+
}, In = 0, Ln = (e = 200) => {
|
|
624
|
+
In = performance.now() + e;
|
|
625
|
+
}, Rn = () => performance.now() < In, zn = () => {
|
|
626
|
+
z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V();
|
|
627
|
+
}, Bn = (e) => {
|
|
628
|
+
if (Rn()) return;
|
|
622
629
|
let t = e.target;
|
|
623
|
-
t && t.closest && (t.closest(".topology-node") || t.closest(".node-resize-layer") || t.closest(".node-handles")) ||
|
|
624
|
-
},
|
|
630
|
+
t && t.closest && (t.closest(".topology-node") || t.closest(".node-resize-layer") || t.closest(".node-handles")) || zn();
|
|
631
|
+
}, Vn = d({
|
|
625
632
|
width: 1e3,
|
|
626
633
|
height: 650
|
|
627
|
-
}),
|
|
634
|
+
}), Hn = d(1), Un = d(0), Wn = d(0), Gn = t(() => -qn.value / 2 + Un.value), Kn = t(() => -Jn.value / 2 + Wn.value), qn = t(() => v.width ?? Vn.value.width), Jn = t(() => v.height ?? Vn.value.height), Yn = null;
|
|
628
635
|
l(() => {
|
|
629
636
|
let e = O.value;
|
|
630
637
|
if (e) {
|
|
631
638
|
let t = e.getBoundingClientRect();
|
|
632
|
-
t.width > 0 && t.height > 0 && (
|
|
639
|
+
t.width > 0 && t.height > 0 && (Vn.value = {
|
|
633
640
|
width: t.width,
|
|
634
641
|
height: t.height
|
|
635
642
|
});
|
|
636
643
|
}
|
|
637
|
-
e && typeof ResizeObserver < "u" && (
|
|
644
|
+
e && typeof ResizeObserver < "u" && (Yn = new ResizeObserver(() => {
|
|
638
645
|
let t = e.getBoundingClientRect();
|
|
639
|
-
t.width > 0 && t.height > 0 && (
|
|
646
|
+
t.width > 0 && t.height > 0 && (Vn.value = {
|
|
640
647
|
width: t.width,
|
|
641
648
|
height: t.height
|
|
642
649
|
});
|
|
643
|
-
}),
|
|
650
|
+
}), Yn.observe(e));
|
|
644
651
|
}), c(() => {
|
|
645
|
-
|
|
652
|
+
Yn &&= (Yn.disconnect(), null), Lr &&= (cancelAnimationFrame(Lr), 0), J &&= (cancelAnimationFrame(J), 0), ti &&= (cancelAnimationFrame(ti), 0), ci(), mr();
|
|
646
653
|
});
|
|
647
|
-
let
|
|
648
|
-
x0:
|
|
649
|
-
y0:
|
|
650
|
-
x1:
|
|
651
|
-
y1:
|
|
652
|
-
})),
|
|
653
|
-
let e =
|
|
654
|
-
return
|
|
655
|
-
let { w: n, h: r } =
|
|
654
|
+
let U = t(() => qn.value / Hn.value), W = t(() => Jn.value / Hn.value), Xn = t(() => ({
|
|
655
|
+
x0: Gn.value - Mt,
|
|
656
|
+
y0: Kn.value - Mt,
|
|
657
|
+
x1: Gn.value + U.value + Mt,
|
|
658
|
+
y1: Kn.value + W.value + Mt
|
|
659
|
+
})), Zn = t(() => {
|
|
660
|
+
let e = Xn.value;
|
|
661
|
+
return T.value.filter((t) => {
|
|
662
|
+
let { w: n, h: r } = L(t);
|
|
656
663
|
return t.x + n / 2 >= e.x0 && t.x - n / 2 <= e.x1 && t.y + r / 2 >= e.y0 && t.y - r / 2 <= e.y1;
|
|
657
664
|
});
|
|
658
|
-
}),
|
|
659
|
-
let e =
|
|
665
|
+
}), G = t(() => {
|
|
666
|
+
let e = Xn.value;
|
|
660
667
|
return M.value.filter((t) => {
|
|
661
|
-
if (!
|
|
662
|
-
let n =
|
|
668
|
+
if (!wi(t)) return !1;
|
|
669
|
+
let n = F(t.from), r = F(t.to);
|
|
663
670
|
if (!n || !r) return !1;
|
|
664
|
-
let i =
|
|
665
|
-
return Math.min(n.x - i, r.x - o) -
|
|
671
|
+
let i = L(n).w / 2, a = L(n).h / 2, o = L(r).w / 2, s = L(r).h / 2;
|
|
672
|
+
return Math.min(n.x - i, r.x - o) - Nt <= e.x1 && Math.max(n.x + i, r.x + o) + Nt >= e.x0 && Math.min(n.y - a, r.y - s) - Nt <= e.y1 && Math.max(n.y + a, r.y + s) + Nt >= e.y0;
|
|
666
673
|
});
|
|
667
|
-
}),
|
|
674
|
+
}), Qn = (e) => {
|
|
668
675
|
if (v.config.enableZoom === !1) return;
|
|
669
676
|
e.preventDefault();
|
|
670
|
-
let t = O.value.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = n / t.width, a = r / t.height, o =
|
|
671
|
-
|
|
672
|
-
},
|
|
677
|
+
let t = O.value.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = n / t.width, a = r / t.height, o = U.value, s = W.value, c = e.deltaY > 0 ? .9 : 1.1, l = Math.min(jt, Math.max(At, Hn.value * c)), u = qn.value / l, d = Jn.value / l;
|
|
678
|
+
Un.value += (o - u) * i, Wn.value += (s - d) * a, Hn.value = l;
|
|
679
|
+
}, K = d(null), q = d(null), $n = (e) => {
|
|
673
680
|
let t = O.value, n = t ? t.getBoundingClientRect() : null;
|
|
674
|
-
|
|
681
|
+
K.value = {
|
|
675
682
|
startX: e.clientX,
|
|
676
683
|
startY: e.clientY,
|
|
677
684
|
lastX: e.clientX,
|
|
@@ -679,9 +686,9 @@ var b = {
|
|
|
679
686
|
moved: !1,
|
|
680
687
|
rectWidth: n && n.width ? n.width : 0,
|
|
681
688
|
rectHeight: n && n.height ? n.height : 0
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
|
-
let t =
|
|
689
|
+
}, pr();
|
|
690
|
+
}, er = (e) => {
|
|
691
|
+
let t = K.value, n = O.value;
|
|
685
692
|
if (!t || !n) return;
|
|
686
693
|
let r = t.rectWidth, i = t.rectHeight;
|
|
687
694
|
if (!r || !i) return;
|
|
@@ -691,13 +698,13 @@ var b = {
|
|
|
691
698
|
return;
|
|
692
699
|
}
|
|
693
700
|
let a = e.clientX - t.lastX, o = e.clientY - t.lastY;
|
|
694
|
-
t.lastX = e.clientX, t.lastY = e.clientY,
|
|
695
|
-
},
|
|
696
|
-
let e =
|
|
697
|
-
|
|
698
|
-
},
|
|
699
|
-
let t =
|
|
700
|
-
|
|
701
|
+
t.lastX = e.clientX, t.lastY = e.clientY, Un.value -= a * (U.value / r), Wn.value -= o * (W.value / i);
|
|
702
|
+
}, tr = () => {
|
|
703
|
+
let e = K.value;
|
|
704
|
+
K.value = null, e && e.moved && Ln(), hr();
|
|
705
|
+
}, nr = (e) => {
|
|
706
|
+
let t = Z(e);
|
|
707
|
+
q.value = {
|
|
701
708
|
start: {
|
|
702
709
|
x: t.x,
|
|
703
710
|
y: t.y
|
|
@@ -709,17 +716,17 @@ var b = {
|
|
|
709
716
|
startClientX: e.clientX,
|
|
710
717
|
startClientY: e.clientY,
|
|
711
718
|
moved: !1
|
|
712
|
-
},
|
|
713
|
-
},
|
|
714
|
-
let t =
|
|
719
|
+
}, pr();
|
|
720
|
+
}, rr = (e) => {
|
|
721
|
+
let t = q.value;
|
|
715
722
|
if (!t) return;
|
|
716
|
-
let n =
|
|
723
|
+
let n = Z(e);
|
|
717
724
|
t.current = {
|
|
718
725
|
x: n.x,
|
|
719
726
|
y: n.y
|
|
720
727
|
}, !t.moved && Math.hypot(e.clientX - t.startClientX, e.clientY - t.startClientY) > 3 && (t.moved = !0);
|
|
721
|
-
},
|
|
722
|
-
let e =
|
|
728
|
+
}, ir = t(() => {
|
|
729
|
+
let e = q.value;
|
|
723
730
|
return e ? {
|
|
724
731
|
x: Math.min(e.start.x, e.current.x),
|
|
725
732
|
y: Math.min(e.start.y, e.current.y),
|
|
@@ -731,62 +738,62 @@ var b = {
|
|
|
731
738
|
width: 0,
|
|
732
739
|
height: 0
|
|
733
740
|
};
|
|
734
|
-
}),
|
|
735
|
-
let e =
|
|
736
|
-
if (
|
|
741
|
+
}), ar = () => {
|
|
742
|
+
let e = q.value;
|
|
743
|
+
if (q.value = null, e && e.moved) {
|
|
737
744
|
let t = {
|
|
738
745
|
x: Math.min(e.start.x, e.current.x),
|
|
739
746
|
y: Math.min(e.start.y, e.current.y),
|
|
740
747
|
w: Math.abs(e.current.x - e.start.x),
|
|
741
748
|
h: Math.abs(e.current.y - e.start.y)
|
|
742
|
-
}, n =
|
|
743
|
-
let n =
|
|
749
|
+
}, n = T.value.filter((e) => {
|
|
750
|
+
let n = R(e), r = e.x + n.x, i = e.y + n.y;
|
|
744
751
|
return !(r + n.width < t.x || r > t.x + t.w || i + n.height < t.y || i > t.y + t.h);
|
|
745
752
|
});
|
|
746
|
-
n.length && (
|
|
753
|
+
n.length && (z.value = H(z.value, n.map((e) => e.id), An.value), V()), Ln();
|
|
747
754
|
}
|
|
748
|
-
|
|
749
|
-
},
|
|
755
|
+
hr();
|
|
756
|
+
}, or = (e) => !e || typeof e.closest != "function" ? !1 : !!(e.closest(".topology-node") || e.closest(".node-handles") || e.closest(".node-resize-layer")), sr = (e) => {
|
|
750
757
|
if (O.value) {
|
|
751
758
|
if (e.button === 1) {
|
|
752
759
|
if (v.config.enablePan === !1) return;
|
|
753
|
-
e.preventDefault(),
|
|
760
|
+
e.preventDefault(), $n(e);
|
|
754
761
|
return;
|
|
755
762
|
}
|
|
756
|
-
if (e.button === 0 && !
|
|
763
|
+
if (e.button === 0 && !or(e.target)) {
|
|
757
764
|
if (e.ctrlKey || e.metaKey) {
|
|
758
765
|
if (v.config.enableMarquee === !1) return;
|
|
759
|
-
e.preventDefault(),
|
|
766
|
+
e.preventDefault(), nr(e);
|
|
760
767
|
return;
|
|
761
768
|
}
|
|
762
|
-
v.config.enablePan !== !1 && (e.preventDefault(),
|
|
769
|
+
v.config.enablePan !== !1 && (e.preventDefault(), $n(e));
|
|
763
770
|
}
|
|
764
771
|
}
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
let e =
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
|
|
772
|
+
}, cr = !1, J = 0, lr = null, ur = () => {
|
|
773
|
+
J = 0;
|
|
774
|
+
let e = lr;
|
|
775
|
+
lr = null, e && (K.value ? er(e) : q.value && rr(e));
|
|
776
|
+
}, dr = (e) => {
|
|
777
|
+
lr = e, J ||= requestAnimationFrame(ur);
|
|
778
|
+
}, fr = () => {
|
|
779
|
+
J && (cancelAnimationFrame(J), ur()), K.value && tr(), q.value && ar();
|
|
771
780
|
}, pr = () => {
|
|
772
|
-
|
|
781
|
+
cr || (cr = !0, window.addEventListener("mousemove", dr, !0), window.addEventListener("mouseup", fr, !0));
|
|
773
782
|
}, mr = () => {
|
|
774
|
-
|
|
783
|
+
cr && (cr = !1, window.removeEventListener("mousemove", dr, !0), window.removeEventListener("mouseup", fr, !0));
|
|
775
784
|
}, hr = () => {
|
|
776
|
-
|
|
777
|
-
}, gr = () => {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
if (
|
|
781
|
-
|
|
782
|
-
if (G.value && G.value.moved) return { cursor: "grabbing" };
|
|
783
|
-
}), vr = t(() => v.config.showGrid !== !1), yr = t(() => v.config.gridColor || "#1a2240"), br = t(() => {
|
|
785
|
+
!K.value && !q.value && mr();
|
|
786
|
+
}, gr = t(() => {
|
|
787
|
+
if (Y.value && Y.value.side) return { cursor: Gr(Y.value.side) };
|
|
788
|
+
if (q.value) return { cursor: "crosshair" };
|
|
789
|
+
if (K.value && K.value.moved) return { cursor: "grabbing" };
|
|
790
|
+
}), _r = t(() => v.config.showGrid !== !1), vr = t(() => v.config.gridColor || "#1a2240"), yr = t(() => {
|
|
784
791
|
let e = Number(v.config.gridStep);
|
|
785
|
-
return (Number.isFinite(e) && e > 0 ? e : 40) /
|
|
786
|
-
}),
|
|
792
|
+
return (Number.isFinite(e) && e > 0 ? e : 40) / Hn.value;
|
|
793
|
+
}), br = t(() => {
|
|
787
794
|
let e = Number(v.config.gridOpacity);
|
|
788
795
|
return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .5;
|
|
789
|
-
}),
|
|
796
|
+
}), xr = t(() => {
|
|
790
797
|
let e = v.config.radialGradient && typeof v.config.radialGradient == "object" ? v.config.radialGradient : {}, t = Array.isArray(e.stops) && e.stops.length ? e.stops.filter((e) => e && e.color).map((e, t) => ({
|
|
791
798
|
offset: e.offset == null ? t === 0 ? "0%" : "100%" : e.offset,
|
|
792
799
|
color: e.color,
|
|
@@ -806,32 +813,37 @@ var b = {
|
|
|
806
813
|
r: e.r || "60%",
|
|
807
814
|
stops: n
|
|
808
815
|
};
|
|
809
|
-
}),
|
|
816
|
+
}), Sr = t(() => v.config.showCenterPoint === !0), Cr = t(() => v.config.showEdgeTextBg === !0), wr = t(() => v.config.edgeTextBgColor || "#0a0e1a"), Tr = t(() => v.config.showNodeHandles === !0), Er = t(() => v.config.showStatusDot !== !1), Dr = (e, t) => {
|
|
810
817
|
let n = Number(e);
|
|
811
818
|
return Number.isFinite(n) && n >= 0 ? n : t;
|
|
812
|
-
},
|
|
819
|
+
}, Or = t(() => {
|
|
813
820
|
let e = v.config.motionFx ?? v.config.fx;
|
|
814
|
-
return typeof e == "boolean" ? e : M.value.length <=
|
|
815
|
-
}),
|
|
821
|
+
return typeof e == "boolean" ? e : M.value.length <= Dr(v.config.fxMotionMaxEdges, 200);
|
|
822
|
+
}), kr = t(() => {
|
|
816
823
|
let e = v.config.glowFx ?? v.config.fx;
|
|
817
|
-
return typeof e == "boolean" ? e : M.value.length <=
|
|
818
|
-
}),
|
|
824
|
+
return typeof e == "boolean" ? e : M.value.length <= Dr(v.config.fxGlowMaxEdges, 500);
|
|
825
|
+
}), Ar = t(() => {
|
|
819
826
|
let e = v.config.breatheFx ?? v.config.fx;
|
|
820
|
-
return typeof e == "boolean" ? e :
|
|
821
|
-
}),
|
|
827
|
+
return typeof e == "boolean" ? e : T.value.length <= Dr(v.config.fxBreatheMaxNodes, 300);
|
|
828
|
+
}), jr = (e) => e.animated !== !1, Mr = (e) => e.borderColor || I(e) || "#94a3b8", Nr = (e) => e.borderWidth || 0, Pr = (e) => e.borderStyle === "dashed" ? "8 5" : void 0, Fr = (e) => {
|
|
829
|
+
let t = e.borderRadius;
|
|
830
|
+
if (t == null || t === "") return 6;
|
|
831
|
+
let n = Number(t);
|
|
832
|
+
return Number.isFinite(n) && n >= 0 ? n : 6;
|
|
833
|
+
}, Ir = (e, t) => {
|
|
822
834
|
if (e.button !== 0 || !v.editable || v.config.nodeDraggable === !1) return;
|
|
823
835
|
e.stopPropagation();
|
|
824
|
-
let n =
|
|
836
|
+
let n = F(t), r = Z(e);
|
|
825
837
|
if (Kt.value = {
|
|
826
838
|
x: r.x - n.x,
|
|
827
839
|
y: r.y - n.y
|
|
828
840
|
}, Jt = {
|
|
829
841
|
x: e.clientX,
|
|
830
842
|
y: e.clientY
|
|
831
|
-
}, Yt = !1, Xt = !!(e.ctrlKey || e.metaKey),
|
|
843
|
+
}, Yt = !1, Xt = !!(e.ctrlKey || e.metaKey), z.value.length > 1 && z.value.includes(t)) {
|
|
832
844
|
let e = {};
|
|
833
|
-
|
|
834
|
-
let n =
|
|
845
|
+
z.value.forEach((t) => {
|
|
846
|
+
let n = F(t);
|
|
835
847
|
n && (e[t] = {
|
|
836
848
|
x: n.x,
|
|
837
849
|
y: n.y
|
|
@@ -850,40 +862,40 @@ var b = {
|
|
|
850
862
|
let e = Rr;
|
|
851
863
|
Rr = null, e && Vr(e);
|
|
852
864
|
}, Br = (e) => {
|
|
853
|
-
(
|
|
865
|
+
(Y.value || D.value) && (Rr = {
|
|
854
866
|
clientX: e.clientX,
|
|
855
867
|
clientY: e.clientY
|
|
856
868
|
}, Lr ||= requestAnimationFrame(zr));
|
|
857
869
|
}, Vr = (e) => {
|
|
858
|
-
if (
|
|
870
|
+
if (Y.value) {
|
|
859
871
|
qr(e);
|
|
860
872
|
return;
|
|
861
873
|
}
|
|
862
874
|
if (!D.value) return;
|
|
863
|
-
let t =
|
|
864
|
-
!Yt && Jt && Math.hypot(e.clientX - Jt.x, e.clientY - Jt.y) > kt && (Yt = !0, !Xt && !
|
|
875
|
+
let t = Z(e);
|
|
876
|
+
!Yt && Jt && Math.hypot(e.clientX - Jt.x, e.clientY - Jt.y) > kt && (Yt = !0, !Xt && !z.value.includes(D.value) && (z.value = H([], [D.value], An.value), B.value = [], y("node-select", z.value.includes(D.value) ? F(D.value) : null), V()));
|
|
865
877
|
let n = qt.value;
|
|
866
878
|
if (n) {
|
|
867
879
|
let e = t.x - n.start.x, r = t.y - n.start.y;
|
|
868
|
-
|
|
880
|
+
T.value = T.value.map((t) => n.origins[t.id] ? {
|
|
869
881
|
...t,
|
|
870
882
|
x: n.origins[t.id].x + e,
|
|
871
883
|
y: n.origins[t.id].y + r
|
|
872
884
|
} : t);
|
|
873
|
-
} else
|
|
885
|
+
} else T.value = T.value.map((e) => e.id === D.value ? {
|
|
874
886
|
...e,
|
|
875
887
|
x: t.x - Kt.value.x,
|
|
876
888
|
y: t.y - Kt.value.y
|
|
877
889
|
} : e);
|
|
878
|
-
|
|
890
|
+
E();
|
|
879
891
|
}, Hr = () => {
|
|
880
|
-
if (Lr && (cancelAnimationFrame(Lr), zr()),
|
|
892
|
+
if (Lr && (cancelAnimationFrame(Lr), zr()), Y.value) {
|
|
881
893
|
Jr();
|
|
882
894
|
return;
|
|
883
895
|
}
|
|
884
|
-
D.value && (Yt &&
|
|
885
|
-
},
|
|
886
|
-
let t =
|
|
896
|
+
D.value && (Yt && Ln(), D.value = null, qt.value = null, Jt = null, Yt = !1, y("node-drag-end"));
|
|
897
|
+
}, Y = d(null), Ur = (e, t, n) => Math.min(n, Math.max(t, e)), Wr = (e) => {
|
|
898
|
+
let t = R(e), n = t.x, r = t.y, i = t.x + t.width, a = t.y + t.height;
|
|
887
899
|
return [
|
|
888
900
|
{
|
|
889
901
|
side: "nw",
|
|
@@ -928,8 +940,8 @@ var b = {
|
|
|
928
940
|
];
|
|
929
941
|
}, Gr = (e) => e === "nw" || e === "se" ? "nwse-resize" : e === "ne" || e === "sw" ? "nesw-resize" : e === "n" || e === "s" ? "ns-resize" : "ew-resize", Kr = (e, t, n) => {
|
|
930
942
|
if (!v.editable || v.config.nodeResizable === !1 || !t) return;
|
|
931
|
-
let { w: r, h: i } =
|
|
932
|
-
|
|
943
|
+
let { w: r, h: i } = L(t);
|
|
944
|
+
Y.value = {
|
|
933
945
|
id: t.id,
|
|
934
946
|
side: n,
|
|
935
947
|
anchorX: n.includes("e") ? t.x - r / 2 : n.includes("w") ? t.x + r / 2 : null,
|
|
@@ -938,35 +950,35 @@ var b = {
|
|
|
938
950
|
startH: i
|
|
939
951
|
}, y("node-resize-start", t);
|
|
940
952
|
}, qr = (e) => {
|
|
941
|
-
let t =
|
|
953
|
+
let t = Y.value;
|
|
942
954
|
if (!t) return;
|
|
943
|
-
let n =
|
|
955
|
+
let n = F(t.id);
|
|
944
956
|
if (!n) return;
|
|
945
|
-
let r =
|
|
957
|
+
let r = Z(e), i = t.startW, a = t.startH, o = n.x, s = n.y;
|
|
946
958
|
if (t.anchorX !== null) {
|
|
947
959
|
let e = t.side.includes("e");
|
|
948
|
-
i = Ur(e ? r.x - t.anchorX : t.anchorX - r.x,
|
|
960
|
+
i = Ur(e ? r.x - t.anchorX : t.anchorX - r.x, Pt, Ft), o = e ? t.anchorX + i / 2 : t.anchorX - i / 2;
|
|
949
961
|
}
|
|
950
962
|
if (t.anchorY !== null) {
|
|
951
963
|
let e = t.side.includes("s");
|
|
952
|
-
a = Ur(e ? r.y - t.anchorY : t.anchorY - r.y,
|
|
964
|
+
a = Ur(e ? r.y - t.anchorY : t.anchorY - r.y, It, Lt), s = e ? t.anchorY + a / 2 : t.anchorY - a / 2;
|
|
953
965
|
}
|
|
954
|
-
|
|
966
|
+
T.value = T.value.map((e) => e.id === t.id ? {
|
|
955
967
|
...e,
|
|
956
968
|
x: o,
|
|
957
969
|
y: s,
|
|
958
970
|
width: i,
|
|
959
971
|
height: a
|
|
960
|
-
} : e),
|
|
972
|
+
} : e), E();
|
|
961
973
|
}, Jr = () => {
|
|
962
|
-
let e =
|
|
963
|
-
|
|
974
|
+
let e = Y.value;
|
|
975
|
+
Y.value = null, e && (Ln(), y("node-resize-end", F(e.id) || null));
|
|
964
976
|
}, Yr = t(() => v.editable && v.config.nodeResizable !== !1), Xr = t(() => {
|
|
965
977
|
if (!Yr.value) return null;
|
|
966
|
-
let e =
|
|
967
|
-
return e.length === 1 &&
|
|
968
|
-
}),
|
|
969
|
-
let t =
|
|
978
|
+
let e = z.value;
|
|
979
|
+
return e.length === 1 && F(e[0]) || null;
|
|
980
|
+
}), X = d(null), Zr = (e) => {
|
|
981
|
+
let t = R(e);
|
|
970
982
|
return [
|
|
971
983
|
{
|
|
972
984
|
side: "top",
|
|
@@ -1015,14 +1027,14 @@ var b = {
|
|
|
1015
1027
|
x: a.x,
|
|
1016
1028
|
y: a.y
|
|
1017
1029
|
};
|
|
1018
|
-
},
|
|
1030
|
+
}, Z = (e) => Qr(e) ?? {
|
|
1019
1031
|
x: 0,
|
|
1020
1032
|
y: 0
|
|
1021
1033
|
}, ei = (e, t, n) => {
|
|
1022
|
-
let r =
|
|
1034
|
+
let r = F(t);
|
|
1023
1035
|
if (!r || !O.value) return;
|
|
1024
|
-
let i =
|
|
1025
|
-
|
|
1036
|
+
let i = Z(e);
|
|
1037
|
+
X.value = {
|
|
1026
1038
|
fromId: t,
|
|
1027
1039
|
side: n.side,
|
|
1028
1040
|
ax: r.x + n.x,
|
|
@@ -1034,42 +1046,42 @@ var b = {
|
|
|
1034
1046
|
try {
|
|
1035
1047
|
e.target.setPointerCapture?.(e.pointerId);
|
|
1036
1048
|
} catch {}
|
|
1037
|
-
|
|
1038
|
-
},
|
|
1039
|
-
|
|
1040
|
-
let e =
|
|
1041
|
-
|
|
1042
|
-
},
|
|
1043
|
-
|
|
1049
|
+
si();
|
|
1050
|
+
}, ti = 0, ni = null, ri = () => {
|
|
1051
|
+
ti = 0;
|
|
1052
|
+
let e = ni;
|
|
1053
|
+
ni = null, e && X.value && ui(e);
|
|
1054
|
+
}, ii = (e) => {
|
|
1055
|
+
X.value && (ni = {
|
|
1044
1056
|
clientX: e.clientX,
|
|
1045
1057
|
clientY: e.clientY
|
|
1046
|
-
},
|
|
1047
|
-
},
|
|
1048
|
-
|
|
1049
|
-
},
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1052
|
-
|
|
1053
|
-
},
|
|
1054
|
-
let r =
|
|
1058
|
+
}, ti ||= requestAnimationFrame(ri));
|
|
1059
|
+
}, ai = () => {
|
|
1060
|
+
ti && (cancelAnimationFrame(ti), ri()), X.value && di();
|
|
1061
|
+
}, oi = !1, si = () => {
|
|
1062
|
+
oi || (oi = !0, window.addEventListener("mousemove", ii, !0), window.addEventListener("mouseup", ai, !0));
|
|
1063
|
+
}, ci = () => {
|
|
1064
|
+
oi && (oi = !1, window.removeEventListener("mousemove", ii, !0), window.removeEventListener("mouseup", ai, !0));
|
|
1065
|
+
}, li = (e, t, n) => {
|
|
1066
|
+
let r = T.value;
|
|
1055
1067
|
for (let i = r.length - 1; i >= 0; i--) {
|
|
1056
1068
|
let a = r[i];
|
|
1057
1069
|
if (a.id === n) continue;
|
|
1058
|
-
let o =
|
|
1070
|
+
let o = R(a);
|
|
1059
1071
|
if (e >= a.x + o.x - 2 && e <= a.x + o.x + o.width + 2 && t >= a.y + o.y - 2 && t <= a.y + o.y + o.height + 2) return a;
|
|
1060
1072
|
}
|
|
1061
1073
|
return null;
|
|
1062
|
-
},
|
|
1063
|
-
let t =
|
|
1074
|
+
}, ui = (e) => {
|
|
1075
|
+
let t = X.value;
|
|
1064
1076
|
if (!t) return;
|
|
1065
|
-
let n =
|
|
1077
|
+
let n = Z(e);
|
|
1066
1078
|
t.px = n.x, t.py = n.y;
|
|
1067
|
-
let r =
|
|
1079
|
+
let r = li(n.x, n.y, t.fromId);
|
|
1068
1080
|
t.overId = r ? r.id : null;
|
|
1069
|
-
},
|
|
1070
|
-
|
|
1071
|
-
let e =
|
|
1072
|
-
if (
|
|
1081
|
+
}, di = () => {
|
|
1082
|
+
ci();
|
|
1083
|
+
let e = X.value;
|
|
1084
|
+
if (X.value = null, !e || !e.overId || e.overId === e.fromId) return;
|
|
1073
1085
|
let t = {
|
|
1074
1086
|
id: `${re()}`,
|
|
1075
1087
|
from: e.fromId,
|
|
@@ -1079,8 +1091,8 @@ var b = {
|
|
|
1079
1091
|
toAnchor: "edge"
|
|
1080
1092
|
};
|
|
1081
1093
|
k.value.push(t), y("edge-create", t);
|
|
1082
|
-
},
|
|
1083
|
-
let r = e.x, i = e.y, a = t.x - r, o = t.y - i, { w: s, h: c } =
|
|
1094
|
+
}, fi = (e, t, n) => {
|
|
1095
|
+
let r = e.x, i = e.y, a = t.x - r, o = t.y - i, { w: s, h: c } = L(e);
|
|
1084
1096
|
if (!n || n === "center" || a === 0 && o === 0) return {
|
|
1085
1097
|
x: r,
|
|
1086
1098
|
y: i
|
|
@@ -1090,20 +1102,20 @@ var b = {
|
|
|
1090
1102
|
x: r + a * p,
|
|
1091
1103
|
y: i + o * p
|
|
1092
1104
|
};
|
|
1093
|
-
},
|
|
1105
|
+
}, pi = t(() => {
|
|
1094
1106
|
let e = /* @__PURE__ */ new Map();
|
|
1095
1107
|
M.value.forEach((t) => {
|
|
1096
|
-
let n =
|
|
1108
|
+
let n = P.value[t.id];
|
|
1097
1109
|
n && !n.hidden && (e.has(n.key) || e.set(n.key, []), e.get(n.key).push(t));
|
|
1098
1110
|
});
|
|
1099
1111
|
let t = {};
|
|
1100
1112
|
return e.forEach((e, n) => {
|
|
1101
|
-
let [r, i] = n.split("__"), a =
|
|
1113
|
+
let [r, i] = n.split("__"), a = F(r), o = F(i);
|
|
1102
1114
|
if (!a || !o) return;
|
|
1103
1115
|
let s = o.x - a.x, c = o.y - a.y, l = Math.sqrt(s * s + c * c) || 1, u = s / l, d = c / l, f = -d, p = u, m = e.length, ee = Ot;
|
|
1104
1116
|
if (m > 1) {
|
|
1105
1117
|
let e = (m - 1) / 2 * Ot, t = (e) => {
|
|
1106
|
-
let { w: t, h: n } =
|
|
1118
|
+
let { w: t, h: n } = L(e);
|
|
1107
1119
|
return Math.max(4, (Math.abs(f) * t + Math.abs(p) * n) / 2 - 6);
|
|
1108
1120
|
}, n = Math.min(1, t(a) / e, t(o) / e);
|
|
1109
1121
|
ee = Ot * Math.max(.35, n);
|
|
@@ -1122,12 +1134,12 @@ var b = {
|
|
|
1122
1134
|
bulge: Math.min(l * .15, 50)
|
|
1123
1135
|
};
|
|
1124
1136
|
}), t;
|
|
1125
|
-
}),
|
|
1126
|
-
let t =
|
|
1137
|
+
}), mi = (e) => {
|
|
1138
|
+
let t = P.value[e.id], n = t && pi.value[t.key];
|
|
1127
1139
|
if (!n) return null;
|
|
1128
|
-
let r =
|
|
1140
|
+
let r = F(e.from), i = F(e.to);
|
|
1129
1141
|
if (!r || !i) return null;
|
|
1130
|
-
let a = n.slots[e.id] || 0, o = a * n.gap, s =
|
|
1142
|
+
let a = n.slots[e.id] || 0, o = a * n.gap, s = fi(r, i, e.fromAnchor), c = fi(i, r, e.toAnchor);
|
|
1131
1143
|
return {
|
|
1132
1144
|
frame: n,
|
|
1133
1145
|
slot: a,
|
|
@@ -1140,12 +1152,12 @@ var b = {
|
|
|
1140
1152
|
y: c.y + n.ny * o
|
|
1141
1153
|
}
|
|
1142
1154
|
};
|
|
1143
|
-
},
|
|
1144
|
-
let t =
|
|
1155
|
+
}, hi = (e) => {
|
|
1156
|
+
let t = mi(e);
|
|
1145
1157
|
if (!t) return "";
|
|
1146
1158
|
let { from: n, to: r, frame: i, slot: a } = t, o = a * i.gap;
|
|
1147
|
-
if (
|
|
1148
|
-
if (
|
|
1159
|
+
if (Gt.value === "straight") return `M ${n.x} ${n.y} L ${r.x} ${r.y}`;
|
|
1160
|
+
if (Gt.value === "polyline") {
|
|
1149
1161
|
if (i.dominant === "v") {
|
|
1150
1162
|
let e = (n.y + r.y) / 2 + o;
|
|
1151
1163
|
return `M ${n.x} ${n.y} L ${n.x} ${e} L ${r.x} ${e} L ${r.x} ${r.y}`;
|
|
@@ -1155,18 +1167,18 @@ var b = {
|
|
|
1155
1167
|
}
|
|
1156
1168
|
let s = (n.x + r.x) / 2 + i.nx * i.bulge, c = (n.y + r.y) / 2 + i.ny * i.bulge;
|
|
1157
1169
|
return `M ${n.x} ${n.y} Q ${s} ${c} ${r.x} ${r.y}`;
|
|
1158
|
-
},
|
|
1159
|
-
let n =
|
|
1170
|
+
}, gi = (e, t) => {
|
|
1171
|
+
let n = mi(e);
|
|
1160
1172
|
if (!n) return {
|
|
1161
1173
|
x: 0,
|
|
1162
1174
|
y: 0
|
|
1163
1175
|
};
|
|
1164
1176
|
let { from: r, to: i, frame: a, slot: o } = n, s = o * a.gap;
|
|
1165
|
-
if (
|
|
1177
|
+
if (Gt.value === "straight") return {
|
|
1166
1178
|
x: r.x + (i.x - r.x) * t,
|
|
1167
1179
|
y: r.y + (i.y - r.y) * t
|
|
1168
1180
|
};
|
|
1169
|
-
if (
|
|
1181
|
+
if (Gt.value === "polyline") {
|
|
1170
1182
|
if (a.dominant === "v") {
|
|
1171
1183
|
let e = (r.y + i.y) / 2 + s, n = Math.abs(e - r.y), a = Math.abs(i.x - r.x), o = Math.abs(i.y - e), c = t * (n + a + o || 1);
|
|
1172
1184
|
return c <= n ? {
|
|
@@ -1197,29 +1209,29 @@ var b = {
|
|
|
1197
1209
|
x: (1 - t) * (1 - t) * r.x + 2 * (1 - t) * t * c + t * t * i.x,
|
|
1198
1210
|
y: (1 - t) * (1 - t) * r.y + 2 * (1 - t) * t * l + t * t * i.y
|
|
1199
1211
|
};
|
|
1200
|
-
},
|
|
1201
|
-
let e =
|
|
1212
|
+
}, _i = t(() => X.value ? F(X.value.fromId) : null), vi = t(() => X.value && X.value.overId ? F(X.value.overId) : null), yi = t(() => _i.value ? I(_i.value) : "#00f0ff"), bi = t(() => {
|
|
1213
|
+
let e = X.value;
|
|
1202
1214
|
if (!e) return {
|
|
1203
1215
|
x: 0,
|
|
1204
1216
|
y: 0
|
|
1205
1217
|
};
|
|
1206
|
-
let t =
|
|
1207
|
-
return t &&
|
|
1218
|
+
let t = vi.value;
|
|
1219
|
+
return t && _i.value ? fi(t, _i.value, "edge") : {
|
|
1208
1220
|
x: e.px,
|
|
1209
1221
|
y: e.py
|
|
1210
1222
|
};
|
|
1211
|
-
}),
|
|
1212
|
-
let e =
|
|
1223
|
+
}), xi = t(() => {
|
|
1224
|
+
let e = vi.value;
|
|
1213
1225
|
if (!e) return null;
|
|
1214
|
-
let t =
|
|
1226
|
+
let t = R(e);
|
|
1215
1227
|
return {
|
|
1216
1228
|
x: e.x + t.x - 4,
|
|
1217
1229
|
y: e.y + t.y - 4,
|
|
1218
1230
|
w: t.width + 8,
|
|
1219
1231
|
h: t.height + 8
|
|
1220
1232
|
};
|
|
1221
|
-
}),
|
|
1222
|
-
let t = e.nodeIds.map((e) =>
|
|
1233
|
+
}), Si = (e) => {
|
|
1234
|
+
let t = e.nodeIds.map((e) => F(e)).filter(Boolean);
|
|
1223
1235
|
if (t.length === 0) return null;
|
|
1224
1236
|
let n = e.padding, r = Math.min(...t.map((e) => e.x)) - n, i = Math.min(...t.map((e) => e.y)) - n, a = Math.max(...t.map((e) => e.x)) + n, o = Math.max(...t.map((e) => e.y)) + n;
|
|
1225
1237
|
return {
|
|
@@ -1228,73 +1240,73 @@ var b = {
|
|
|
1228
1240
|
width: a - r,
|
|
1229
1241
|
height: o - i
|
|
1230
1242
|
};
|
|
1231
|
-
},
|
|
1243
|
+
}, Ci = t(() => v.groups.map((e) => ({
|
|
1232
1244
|
...e,
|
|
1233
|
-
rect:
|
|
1234
|
-
})).filter((e) => e.rect)), Q = (e) =>
|
|
1235
|
-
let t =
|
|
1245
|
+
rect: Si(e)
|
|
1246
|
+
})).filter((e) => e.rect)), Q = (e) => On(e) ? Pn.value : (F(e.from), e.centerText && e.centerText.color || "#00f0ff"), wi = (e) => {
|
|
1247
|
+
let t = P.value[e.id];
|
|
1236
1248
|
return !!t && !t.hidden;
|
|
1237
|
-
},
|
|
1249
|
+
}, Ti = t(() => [...new Set(M.value.map(Q))].map((e) => ({
|
|
1238
1250
|
key: String(e).replace("#", ""),
|
|
1239
1251
|
color: e
|
|
1240
|
-
}))),
|
|
1252
|
+
}))), Ei = (e) => {
|
|
1241
1253
|
let t = e.endMarker;
|
|
1242
1254
|
if (!t || t === "none") return "";
|
|
1243
1255
|
let n = Q(e) || "#00f0ff", r = String(n).replace("#", "");
|
|
1244
1256
|
return `url(#${t === "dot" ? "edge-dot" : "edge-arrow"}-${r})`;
|
|
1245
|
-
},
|
|
1257
|
+
}, Di = /* @__PURE__ */ new Map(), Oi = {
|
|
1246
1258
|
nodes: null,
|
|
1247
1259
|
edges: null,
|
|
1248
1260
|
mode: null,
|
|
1249
1261
|
epoch: -1
|
|
1250
|
-
},
|
|
1251
|
-
let e =
|
|
1252
|
-
(e.nodes !==
|
|
1253
|
-
nodes:
|
|
1262
|
+
}, ki = () => {
|
|
1263
|
+
let e = Oi;
|
|
1264
|
+
(e.nodes !== T.value || e.edges !== M.value || e.mode !== Gt.value || e.epoch !== Rt) && (Oi = {
|
|
1265
|
+
nodes: T.value,
|
|
1254
1266
|
edges: M.value,
|
|
1255
|
-
mode:
|
|
1256
|
-
epoch:
|
|
1257
|
-
},
|
|
1267
|
+
mode: Gt.value,
|
|
1268
|
+
epoch: Rt
|
|
1269
|
+
}, Di = /* @__PURE__ */ new Map());
|
|
1258
1270
|
}, $ = (e) => {
|
|
1259
|
-
|
|
1260
|
-
let t =
|
|
1261
|
-
return t === void 0 && (t =
|
|
1262
|
-
},
|
|
1271
|
+
ki();
|
|
1272
|
+
let t = Di.get(e.id);
|
|
1273
|
+
return t === void 0 && (t = hi(e), Di.set(e.id, t)), t;
|
|
1274
|
+
}, Ai = (e, t = 1) => `${2 / e.speed * t}s`, ji = (e) => `${3 / e.speed}s`, Mi = (e) => S(e).text, Ni = (e) => !!e && String(S(e).text ?? "").trim() !== "", Pi = (e, t) => {
|
|
1263
1275
|
if (!e) return null;
|
|
1264
|
-
let n =
|
|
1276
|
+
let n = S(e), r = Number(t.fontSize) || Number(n.fontSize) || 8, i = String(n.text ?? ""), a = 0;
|
|
1265
1277
|
for (let e of i) a += e.charCodeAt(0) > 11904 ? 1 : .62;
|
|
1266
1278
|
return {
|
|
1267
1279
|
w: Math.max(14, a * r + 8),
|
|
1268
1280
|
h: Math.max(12, r + 6)
|
|
1269
1281
|
};
|
|
1270
|
-
},
|
|
1271
|
-
let n =
|
|
1282
|
+
}, Fi = (e, t) => {
|
|
1283
|
+
let n = gi(e, Math.max(0, t - .005)), r = gi(e, Math.min(1, t + .005));
|
|
1272
1284
|
return Math.atan2(r.y - n.y, r.x - n.x) * 180 / Math.PI;
|
|
1273
|
-
},
|
|
1285
|
+
}, Ii = (e) => {
|
|
1274
1286
|
let t = e % 180;
|
|
1275
1287
|
return t > 90 && (t -= 180), t < -90 && (t += 180), t;
|
|
1276
|
-
},
|
|
1288
|
+
}, Li = (e, t, n) => `translate(${t.x}, ${t.y}) rotate(${(S(e).rotation || 0) + (n || 0)})`, Ri = t(() => {
|
|
1277
1289
|
let e = [];
|
|
1278
|
-
for (let t of
|
|
1279
|
-
let n =
|
|
1290
|
+
for (let t of G.value) {
|
|
1291
|
+
let n = P.value[t.id];
|
|
1280
1292
|
if (!n) continue;
|
|
1281
1293
|
let r = n.merged && n.representative, i = !n.merged && (t.fromText || t.centerText || t.toText);
|
|
1282
1294
|
if (!r && !i) continue;
|
|
1283
|
-
let a =
|
|
1295
|
+
let a = F(t.from), o = F(t.to);
|
|
1284
1296
|
a && o && e.push({
|
|
1285
1297
|
id: t.id,
|
|
1286
1298
|
edge: t,
|
|
1287
1299
|
info: n,
|
|
1288
1300
|
color: a && ie[a.type] || "#00f0ff",
|
|
1289
|
-
start:
|
|
1290
|
-
center:
|
|
1291
|
-
end:
|
|
1292
|
-
startAngle: Fi(
|
|
1293
|
-
centerAngle: Fi(
|
|
1294
|
-
endAngle: Fi(
|
|
1295
|
-
fromBox:
|
|
1296
|
-
centerBox:
|
|
1297
|
-
toBox:
|
|
1301
|
+
start: gi(t, .28),
|
|
1302
|
+
center: gi(t, .5),
|
|
1303
|
+
end: gi(t, .72),
|
|
1304
|
+
startAngle: Ii(Fi(t, .28)),
|
|
1305
|
+
centerAngle: Ii(Fi(t, .5)),
|
|
1306
|
+
endAngle: Ii(Fi(t, .72)),
|
|
1307
|
+
fromBox: Pi(t.fromText, t),
|
|
1308
|
+
centerBox: Pi(t.centerText, t),
|
|
1309
|
+
toBox: Pi(t.toText, t)
|
|
1298
1310
|
});
|
|
1299
1311
|
}
|
|
1300
1312
|
return e;
|
|
@@ -1314,23 +1326,23 @@ var b = {
|
|
|
1314
1326
|
ref_key: "svgRef",
|
|
1315
1327
|
ref: O,
|
|
1316
1328
|
class: "topology-svg",
|
|
1317
|
-
style: s(
|
|
1318
|
-
viewBox: `${
|
|
1319
|
-
onMousedown:
|
|
1329
|
+
style: s(gr.value),
|
|
1330
|
+
viewBox: `${Gn.value} ${Kn.value} ${U.value} ${W.value}`,
|
|
1331
|
+
onMousedown: sr,
|
|
1320
1332
|
onMousemove: Br,
|
|
1321
1333
|
onMouseup: Hr,
|
|
1322
1334
|
onMouseleave: Hr,
|
|
1323
|
-
onClick:
|
|
1324
|
-
onWheel: g(
|
|
1335
|
+
onClick: Bn,
|
|
1336
|
+
onWheel: g(Qn, ["prevent"])
|
|
1325
1337
|
}, [
|
|
1326
1338
|
i("defs", null, [
|
|
1327
1339
|
c[3] ||= a("<filter id=\"glow-core\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"3\" result=\"blur\"></feGaussianBlur><feMerge><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter><filter id=\"glow-strong\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"6\" result=\"blur\"></feGaussianBlur><feMerge><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter>", 2),
|
|
1328
1340
|
i("radialGradient", {
|
|
1329
1341
|
id: "bg-grid",
|
|
1330
|
-
cx:
|
|
1331
|
-
cy:
|
|
1332
|
-
r:
|
|
1333
|
-
}, [(u(!0), r(e, null, f(
|
|
1342
|
+
cx: xr.value.cx,
|
|
1343
|
+
cy: xr.value.cy,
|
|
1344
|
+
r: xr.value.r
|
|
1345
|
+
}, [(u(!0), r(e, null, f(xr.value.stops, (e, t) => (u(), r("stop", {
|
|
1334
1346
|
key: `bg-stop-${t}`,
|
|
1335
1347
|
offset: e.offset,
|
|
1336
1348
|
"stop-color": e.color,
|
|
@@ -1357,7 +1369,7 @@ var b = {
|
|
|
1357
1369
|
}, null, 8, de)
|
|
1358
1370
|
], 8, ce))), 128)),
|
|
1359
1371
|
c[4] ||= a("<linearGradient id=\"flow-grad-1\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0%\" stop-color=\"#00f0ff\" stop-opacity=\"0\"></stop><stop offset=\"40%\" stop-color=\"#00f0ff\" stop-opacity=\"1\"></stop><stop offset=\"60%\" stop-color=\"#00f0ff\" stop-opacity=\"1\"></stop><stop offset=\"100%\" stop-color=\"#00f0ff\" stop-opacity=\"0\"></stop></linearGradient>", 1),
|
|
1360
|
-
(u(!0), r(e, null, f(
|
|
1372
|
+
(u(!0), r(e, null, f(Ti.value, (e) => (u(), r("marker", {
|
|
1361
1373
|
key: `m-arrow-${e.key}`,
|
|
1362
1374
|
id: `edge-arrow-${e.key}`,
|
|
1363
1375
|
viewBox: "0 0 10 10",
|
|
@@ -1371,7 +1383,7 @@ var b = {
|
|
|
1371
1383
|
d: "M1,2.5 L9,5 L1,7.5 Z",
|
|
1372
1384
|
fill: e.color
|
|
1373
1385
|
}, null, 8, pe)], 8, fe))), 128)),
|
|
1374
|
-
(u(!0), r(e, null, f(
|
|
1386
|
+
(u(!0), r(e, null, f(Ti.value, (e) => (u(), r("marker", {
|
|
1375
1387
|
key: `m-dot-${e.key}`,
|
|
1376
1388
|
id: `edge-dot-${e.key}`,
|
|
1377
1389
|
viewBox: "0 0 10 10",
|
|
@@ -1389,31 +1401,31 @@ var b = {
|
|
|
1389
1401
|
}, null, 8, he)], 8, me))), 128))
|
|
1390
1402
|
]),
|
|
1391
1403
|
i("rect", {
|
|
1392
|
-
width:
|
|
1393
|
-
height:
|
|
1394
|
-
x:
|
|
1395
|
-
y:
|
|
1404
|
+
width: U.value,
|
|
1405
|
+
height: W.value,
|
|
1406
|
+
x: Gn.value,
|
|
1407
|
+
y: Kn.value,
|
|
1396
1408
|
fill: "url(#bg-grid)"
|
|
1397
1409
|
}, null, 8, ge),
|
|
1398
|
-
|
|
1410
|
+
_r.value ? (u(), r(e, { key: 0 }, [i("pattern", {
|
|
1399
1411
|
id: "grid",
|
|
1400
|
-
width:
|
|
1401
|
-
height:
|
|
1412
|
+
width: yr.value,
|
|
1413
|
+
height: yr.value,
|
|
1402
1414
|
patternUnits: "userSpaceOnUse"
|
|
1403
1415
|
}, [i("path", {
|
|
1404
|
-
d: `M ${
|
|
1416
|
+
d: `M ${yr.value} 0 L 0 0 0 ${yr.value}`,
|
|
1405
1417
|
fill: "none",
|
|
1406
|
-
stroke:
|
|
1418
|
+
stroke: vr.value,
|
|
1407
1419
|
"stroke-width": "0.5"
|
|
1408
1420
|
}, null, 8, ve)], 8, _e), i("rect", {
|
|
1409
|
-
width:
|
|
1410
|
-
height:
|
|
1411
|
-
x:
|
|
1412
|
-
y:
|
|
1421
|
+
width: U.value,
|
|
1422
|
+
height: W.value,
|
|
1423
|
+
x: Gn.value,
|
|
1424
|
+
y: Kn.value,
|
|
1413
1425
|
fill: "url(#grid)",
|
|
1414
|
-
opacity:
|
|
1426
|
+
opacity: br.value
|
|
1415
1427
|
}, null, 8, ye)], 64)) : n("", !0),
|
|
1416
|
-
|
|
1428
|
+
Sr.value ? (u(), r("g", be, [...c[5] ||= [
|
|
1417
1429
|
i("line", {
|
|
1418
1430
|
x1: "-22",
|
|
1419
1431
|
y1: "0",
|
|
@@ -1445,7 +1457,7 @@ var b = {
|
|
|
1445
1457
|
opacity: "0.8"
|
|
1446
1458
|
}, null, -1)
|
|
1447
1459
|
]])) : n("", !0),
|
|
1448
|
-
(u(!0), r(e, null, f(
|
|
1460
|
+
(u(!0), r(e, null, f(Ci.value, (e) => (u(), r("g", { key: e.id }, [
|
|
1449
1461
|
i("rect", {
|
|
1450
1462
|
x: e.rect.x,
|
|
1451
1463
|
y: e.rect.y,
|
|
@@ -1507,16 +1519,16 @@ var b = {
|
|
|
1507
1519
|
"letter-spacing": "0.5"
|
|
1508
1520
|
}, m(e.label), 9, De)
|
|
1509
1521
|
]))), 128)),
|
|
1510
|
-
(u(!0), r(e, null, f(
|
|
1522
|
+
(u(!0), r(e, null, f(G.value, (e) => (u(), r("path", {
|
|
1511
1523
|
key: `base-${e.id}`,
|
|
1512
1524
|
d: $(e),
|
|
1513
1525
|
fill: "none",
|
|
1514
1526
|
stroke: "#1a2744",
|
|
1515
1527
|
"stroke-width": "2",
|
|
1516
1528
|
"stroke-linecap": "round",
|
|
1517
|
-
"marker-end":
|
|
1529
|
+
"marker-end": Ei(e)
|
|
1518
1530
|
}, null, 8, Oe))), 128)),
|
|
1519
|
-
(u(!0), r(e, null, f(
|
|
1531
|
+
(u(!0), r(e, null, f(G.value, (t) => (u(), r(e, { key: `glow-${t.id}` }, [kr.value ? (u(), r("path", {
|
|
1520
1532
|
key: 0,
|
|
1521
1533
|
d: $(t),
|
|
1522
1534
|
fill: "none",
|
|
@@ -1526,16 +1538,16 @@ var b = {
|
|
|
1526
1538
|
opacity: "0.15",
|
|
1527
1539
|
filter: "url(#glow-strong)"
|
|
1528
1540
|
}, null, 8, ke)) : n("", !0)], 64))), 128)),
|
|
1529
|
-
(u(!0), r(e, null, f(
|
|
1541
|
+
(u(!0), r(e, null, f(G.value, (t) => (u(), r(e, { key: `sel-${t.id}` }, [On(t) ? (u(), r("path", {
|
|
1530
1542
|
key: 0,
|
|
1531
1543
|
d: $(t),
|
|
1532
1544
|
fill: "none",
|
|
1533
|
-
stroke:
|
|
1545
|
+
stroke: Pn.value,
|
|
1534
1546
|
"stroke-width": "4",
|
|
1535
1547
|
opacity: "0.35",
|
|
1536
1548
|
filter: "url(#glow-strong)"
|
|
1537
1549
|
}, null, 8, Ae)) : n("", !0)], 64))), 128)),
|
|
1538
|
-
(u(!0), r(e, null, f(
|
|
1550
|
+
(u(!0), r(e, null, f(G.value, (t) => (u(), r(e, { key: `flow-${t.id}` }, [Or.value && jr(t) ? (u(), r("g", je, [
|
|
1539
1551
|
i("path", {
|
|
1540
1552
|
d: $(t),
|
|
1541
1553
|
fill: "none",
|
|
@@ -1548,7 +1560,7 @@ var b = {
|
|
|
1548
1560
|
attributeName: "stroke-dashoffset",
|
|
1549
1561
|
from: "0",
|
|
1550
1562
|
to: "-52",
|
|
1551
|
-
dur:
|
|
1563
|
+
dur: Ai(t),
|
|
1552
1564
|
repeatCount: "indefinite"
|
|
1553
1565
|
}, null, 8, Ne)], 8, Me),
|
|
1554
1566
|
i("path", {
|
|
@@ -1563,7 +1575,7 @@ var b = {
|
|
|
1563
1575
|
attributeName: "stroke-dashoffset",
|
|
1564
1576
|
from: "-30",
|
|
1565
1577
|
to: "-82",
|
|
1566
|
-
dur:
|
|
1578
|
+
dur: Ai(t, 1.3),
|
|
1567
1579
|
repeatCount: "indefinite"
|
|
1568
1580
|
}, null, 8, Fe)], 8, Pe),
|
|
1569
1581
|
i("path", {
|
|
@@ -1579,18 +1591,18 @@ var b = {
|
|
|
1579
1591
|
attributeName: "stroke-dashoffset",
|
|
1580
1592
|
from: "0",
|
|
1581
1593
|
to: "-84",
|
|
1582
|
-
dur:
|
|
1594
|
+
dur: Ai(t, .8),
|
|
1583
1595
|
repeatCount: "indefinite"
|
|
1584
1596
|
}, null, 8, Le)], 8, Ie)
|
|
1585
1597
|
])) : n("", !0)], 64))), 128)),
|
|
1586
|
-
(u(!0), r(e, null, f(
|
|
1598
|
+
(u(!0), r(e, null, f(G.value, (t) => (u(), r(e, { key: `particle-${t.id}` }, [Or.value && jr(t) ? (u(), r("g", Re, [i("circle", {
|
|
1587
1599
|
r: "3",
|
|
1588
1600
|
fill: Q(t),
|
|
1589
1601
|
opacity: "0.9",
|
|
1590
1602
|
filter: "url(#glow-core)"
|
|
1591
1603
|
}, [i("animateMotion", {
|
|
1592
1604
|
path: $(t),
|
|
1593
|
-
dur:
|
|
1605
|
+
dur: ji(t),
|
|
1594
1606
|
repeatCount: "indefinite"
|
|
1595
1607
|
}, null, 8, Be)], 8, ze), i("circle", {
|
|
1596
1608
|
r: "8",
|
|
@@ -1599,17 +1611,17 @@ var b = {
|
|
|
1599
1611
|
filter: "url(#glow-strong)"
|
|
1600
1612
|
}, [i("animateMotion", {
|
|
1601
1613
|
path: $(t),
|
|
1602
|
-
dur:
|
|
1614
|
+
dur: ji(t),
|
|
1603
1615
|
repeatCount: "indefinite"
|
|
1604
1616
|
}, null, 8, He)], 8, Ve)])) : n("", !0)], 64))), 128)),
|
|
1605
|
-
(u(!0), r(e, null, f(
|
|
1617
|
+
(u(!0), r(e, null, f(Ri.value, (t) => (u(), r(e, { key: `text-${t.id}` }, [t.info.merged && t.info.representative ? (u(), r("g", {
|
|
1606
1618
|
key: 0,
|
|
1607
1619
|
transform: `translate(${t.center.x}, ${t.center.y}) rotate(${t.centerAngle})`
|
|
1608
1620
|
}, [i("rect", {
|
|
1609
1621
|
x: "-7",
|
|
1610
|
-
y: -
|
|
1622
|
+
y: -C(t.edge, null) / 2,
|
|
1611
1623
|
width: 14,
|
|
1612
|
-
height:
|
|
1624
|
+
height: C(t.edge, null),
|
|
1613
1625
|
rx: "2",
|
|
1614
1626
|
fill: "#FFFFFF",
|
|
1615
1627
|
opacity: "0.9",
|
|
@@ -1619,121 +1631,121 @@ var b = {
|
|
|
1619
1631
|
y: "0",
|
|
1620
1632
|
"dominant-baseline": "central",
|
|
1621
1633
|
"text-anchor": "middle",
|
|
1622
|
-
"font-size":
|
|
1623
|
-
fill:
|
|
1634
|
+
"font-size": C(t.edge, null),
|
|
1635
|
+
fill: w(t.edge, null),
|
|
1624
1636
|
"font-family": "'SF Mono', monospace",
|
|
1625
1637
|
opacity: "1"
|
|
1626
1638
|
}, m(t.info.count), 9, Ge)], 8, Ue)) : t.info.merged ? n("", !0) : (u(), r("g", Ke, [
|
|
1627
|
-
|
|
1639
|
+
Ni(t.edge.fromText) ? (u(), r("g", {
|
|
1628
1640
|
key: 0,
|
|
1629
|
-
transform:
|
|
1630
|
-
}, [
|
|
1641
|
+
transform: Li(t.edge.fromText, t.start, t.startAngle)
|
|
1642
|
+
}, [Cr.value ? (u(), r("rect", {
|
|
1631
1643
|
key: 0,
|
|
1632
1644
|
x: -t.fromBox.w / 2,
|
|
1633
1645
|
y: -t.fromBox.h / 2,
|
|
1634
1646
|
width: t.fromBox.w,
|
|
1635
1647
|
height: t.fromBox.h,
|
|
1636
1648
|
rx: "3",
|
|
1637
|
-
fill:
|
|
1649
|
+
fill: wr.value,
|
|
1638
1650
|
opacity: "0.92",
|
|
1639
|
-
stroke:
|
|
1651
|
+
stroke: w(t.edge, t.edge.fromText),
|
|
1640
1652
|
"stroke-opacity": "0.35",
|
|
1641
1653
|
"stroke-width": "0.6"
|
|
1642
1654
|
}, null, 8, Je)) : n("", !0), i("text", {
|
|
1643
1655
|
y: "0",
|
|
1644
1656
|
"dominant-baseline": "central",
|
|
1645
1657
|
"text-anchor": "middle",
|
|
1646
|
-
"font-size":
|
|
1647
|
-
fill:
|
|
1658
|
+
"font-size": C(t.edge, t.edge.fromText),
|
|
1659
|
+
fill: w(t.edge, t.edge.fromText),
|
|
1648
1660
|
"font-family": "'SF Mono', monospace",
|
|
1649
1661
|
"font-weight": "500",
|
|
1650
1662
|
opacity: "0.9"
|
|
1651
|
-
}, m(
|
|
1652
|
-
|
|
1663
|
+
}, m(Mi(t.edge.fromText)), 9, Ye)], 8, qe)) : n("", !0),
|
|
1664
|
+
Ni(t.edge.centerText) ? (u(), r("g", {
|
|
1653
1665
|
key: 1,
|
|
1654
|
-
transform:
|
|
1655
|
-
}, [
|
|
1666
|
+
transform: Li(t.edge.centerText, t.center, t.centerAngle)
|
|
1667
|
+
}, [Cr.value ? (u(), r("rect", {
|
|
1656
1668
|
key: 0,
|
|
1657
1669
|
x: -t.centerBox.w / 2,
|
|
1658
1670
|
y: -t.centerBox.h / 2,
|
|
1659
1671
|
width: t.centerBox.w,
|
|
1660
1672
|
height: t.centerBox.h,
|
|
1661
1673
|
rx: "3",
|
|
1662
|
-
fill:
|
|
1674
|
+
fill: wr.value,
|
|
1663
1675
|
opacity: "0.92",
|
|
1664
|
-
stroke:
|
|
1676
|
+
stroke: w(t.edge, t.edge.centerText),
|
|
1665
1677
|
"stroke-opacity": "0.35",
|
|
1666
1678
|
"stroke-width": "0.6"
|
|
1667
1679
|
}, null, 8, Ze)) : n("", !0), i("text", {
|
|
1668
1680
|
y: "0",
|
|
1669
1681
|
"dominant-baseline": "central",
|
|
1670
1682
|
"text-anchor": "middle",
|
|
1671
|
-
"font-size":
|
|
1672
|
-
fill:
|
|
1683
|
+
"font-size": C(t.edge, t.edge.centerText),
|
|
1684
|
+
fill: w(t.edge, t.edge.centerText),
|
|
1673
1685
|
"font-family": "'SF Mono', monospace",
|
|
1674
1686
|
"font-weight": "600",
|
|
1675
1687
|
opacity: "1"
|
|
1676
|
-
}, m(
|
|
1677
|
-
|
|
1688
|
+
}, m(Mi(t.edge.centerText)), 9, Qe)], 8, Xe)) : n("", !0),
|
|
1689
|
+
Ni(t.edge.toText) ? (u(), r("g", {
|
|
1678
1690
|
key: 2,
|
|
1679
|
-
transform:
|
|
1680
|
-
}, [
|
|
1691
|
+
transform: Li(t.edge.toText, t.end, t.endAngle)
|
|
1692
|
+
}, [Cr.value ? (u(), r("rect", {
|
|
1681
1693
|
key: 0,
|
|
1682
1694
|
x: -t.toBox.w / 2,
|
|
1683
1695
|
y: -t.toBox.h / 2,
|
|
1684
1696
|
width: t.toBox.w,
|
|
1685
1697
|
height: t.toBox.h,
|
|
1686
1698
|
rx: "3",
|
|
1687
|
-
fill:
|
|
1699
|
+
fill: wr.value,
|
|
1688
1700
|
opacity: "0.92",
|
|
1689
|
-
stroke:
|
|
1701
|
+
stroke: w(t.edge, t.edge.toText),
|
|
1690
1702
|
"stroke-opacity": "0.35",
|
|
1691
1703
|
"stroke-width": "0.6"
|
|
1692
1704
|
}, null, 8, et)) : n("", !0), i("text", {
|
|
1693
1705
|
y: "0",
|
|
1694
1706
|
"dominant-baseline": "central",
|
|
1695
1707
|
"text-anchor": "middle",
|
|
1696
|
-
"font-size":
|
|
1697
|
-
fill:
|
|
1708
|
+
"font-size": C(t.edge, t.edge.toText),
|
|
1709
|
+
fill: w(t.edge, t.edge.toText),
|
|
1698
1710
|
"font-family": "'SF Mono', monospace",
|
|
1699
1711
|
"font-weight": "500",
|
|
1700
1712
|
opacity: "0.9"
|
|
1701
|
-
}, m(
|
|
1713
|
+
}, m(Mi(t.edge.toText)), 9, tt)], 8, $e)) : n("", !0)
|
|
1702
1714
|
]))], 64))), 128)),
|
|
1703
|
-
|
|
1715
|
+
X.value ? (u(), r("g", nt, [
|
|
1704
1716
|
i("line", {
|
|
1705
|
-
x1:
|
|
1706
|
-
y1:
|
|
1707
|
-
x2:
|
|
1708
|
-
y2:
|
|
1709
|
-
stroke:
|
|
1717
|
+
x1: X.value.ax,
|
|
1718
|
+
y1: X.value.ay,
|
|
1719
|
+
x2: bi.value.x,
|
|
1720
|
+
y2: bi.value.y,
|
|
1721
|
+
stroke: yi.value,
|
|
1710
1722
|
"stroke-width": "2",
|
|
1711
1723
|
"stroke-dasharray": "6 6",
|
|
1712
1724
|
"stroke-linecap": "round",
|
|
1713
1725
|
opacity: "0.9"
|
|
1714
1726
|
}, null, 8, rt),
|
|
1715
1727
|
i("circle", {
|
|
1716
|
-
cx:
|
|
1717
|
-
cy:
|
|
1728
|
+
cx: X.value.px,
|
|
1729
|
+
cy: X.value.py,
|
|
1718
1730
|
r: "3.5",
|
|
1719
|
-
fill:
|
|
1731
|
+
fill: yi.value,
|
|
1720
1732
|
opacity: "0.9"
|
|
1721
1733
|
}, null, 8, it),
|
|
1722
|
-
|
|
1734
|
+
X.value.overId && xi.value ? (u(), r("rect", {
|
|
1723
1735
|
key: 0,
|
|
1724
|
-
x:
|
|
1725
|
-
y:
|
|
1726
|
-
width:
|
|
1727
|
-
height:
|
|
1736
|
+
x: xi.value.x,
|
|
1737
|
+
y: xi.value.y,
|
|
1738
|
+
width: xi.value.w,
|
|
1739
|
+
height: xi.value.h,
|
|
1728
1740
|
rx: "6",
|
|
1729
1741
|
fill: "none",
|
|
1730
|
-
stroke:
|
|
1742
|
+
stroke: yi.value,
|
|
1731
1743
|
"stroke-width": "1.5",
|
|
1732
1744
|
"stroke-dasharray": "6 4",
|
|
1733
1745
|
opacity: "0.9"
|
|
1734
1746
|
}, null, 8, at)) : n("", !0)
|
|
1735
1747
|
])) : n("", !0),
|
|
1736
|
-
(u(!0), r(e, null, f(
|
|
1748
|
+
(u(!0), r(e, null, f(G.value, (e) => (u(), r("path", {
|
|
1737
1749
|
key: `hit-${e.id}`,
|
|
1738
1750
|
d: $(e),
|
|
1739
1751
|
fill: "none",
|
|
@@ -1743,85 +1755,85 @@ var b = {
|
|
|
1743
1755
|
"pointer-events": "stroke",
|
|
1744
1756
|
cursor: "pointer"
|
|
1745
1757
|
},
|
|
1746
|
-
onClick: g((t) =>
|
|
1758
|
+
onClick: g((t) => Fn(e, t), ["stop"])
|
|
1747
1759
|
}, null, 8, ot))), 128)),
|
|
1748
|
-
(u(!0), r(e, null, f(
|
|
1760
|
+
(u(!0), r(e, null, f(Zn.value, (a) => (u(), r("g", {
|
|
1749
1761
|
key: a.id,
|
|
1750
1762
|
transform: `translate(${a.x}, ${a.y})`,
|
|
1751
1763
|
class: o(["topology-node", D.value === a.id ? "dragging" : ""]),
|
|
1752
1764
|
onMousedown: (e) => Ir(e, a.id),
|
|
1753
|
-
onClick: (e) =>
|
|
1765
|
+
onClick: (e) => Nn(a, e),
|
|
1754
1766
|
style: s({
|
|
1755
1767
|
cursor: v.editable && v.config.nodeDraggable !== !1 ? "grab" : "default",
|
|
1756
|
-
color:
|
|
1768
|
+
color: I(a)
|
|
1757
1769
|
})
|
|
1758
1770
|
}, [
|
|
1759
1771
|
i("rect", {
|
|
1760
1772
|
class: "node-hit-area",
|
|
1761
|
-
x:
|
|
1762
|
-
y:
|
|
1763
|
-
width:
|
|
1764
|
-
height:
|
|
1773
|
+
x: Cn(a).x,
|
|
1774
|
+
y: Cn(a).y,
|
|
1775
|
+
width: Cn(a).width,
|
|
1776
|
+
height: Cn(a).height,
|
|
1765
1777
|
fill: "transparent",
|
|
1766
1778
|
"pointer-events": "all"
|
|
1767
1779
|
}, null, 8, ct),
|
|
1768
|
-
|
|
1780
|
+
En(a) && _.viewMode !== "3d" ? (u(), r("rect", {
|
|
1769
1781
|
key: 0,
|
|
1770
|
-
x:
|
|
1771
|
-
y:
|
|
1772
|
-
width:
|
|
1773
|
-
height:
|
|
1774
|
-
rx:
|
|
1775
|
-
fill:
|
|
1782
|
+
x: R(a).x,
|
|
1783
|
+
y: R(a).y,
|
|
1784
|
+
width: R(a).width,
|
|
1785
|
+
height: R(a).height,
|
|
1786
|
+
rx: Fr(a),
|
|
1787
|
+
fill: En(a),
|
|
1776
1788
|
opacity: "0.15"
|
|
1777
1789
|
}, null, 8, lt)) : n("", !0),
|
|
1778
|
-
|
|
1790
|
+
Tn(a) && _.viewMode !== "3d" ? (u(), r("rect", {
|
|
1779
1791
|
key: 1,
|
|
1780
|
-
x:
|
|
1781
|
-
y:
|
|
1782
|
-
width:
|
|
1783
|
-
height:
|
|
1784
|
-
rx:
|
|
1792
|
+
x: Tn(a).x,
|
|
1793
|
+
y: Tn(a).y,
|
|
1794
|
+
width: Tn(a).width,
|
|
1795
|
+
height: Tn(a).height,
|
|
1796
|
+
rx: Fr(a),
|
|
1785
1797
|
fill: "none",
|
|
1786
|
-
stroke:
|
|
1787
|
-
"stroke-width":
|
|
1788
|
-
"stroke-dasharray":
|
|
1798
|
+
stroke: Mr(a),
|
|
1799
|
+
"stroke-width": Nr(a),
|
|
1800
|
+
"stroke-dasharray": Pr(a),
|
|
1789
1801
|
opacity: "0.8"
|
|
1790
1802
|
}, null, 8, ut)) : n("", !0),
|
|
1791
|
-
|
|
1803
|
+
Dn(a) && _.viewMode !== "3d" ? (u(), r("rect", {
|
|
1792
1804
|
key: 2,
|
|
1793
|
-
x:
|
|
1794
|
-
y:
|
|
1795
|
-
width:
|
|
1796
|
-
height:
|
|
1797
|
-
rx:
|
|
1805
|
+
x: R(a).x,
|
|
1806
|
+
y: R(a).y,
|
|
1807
|
+
width: R(a).width,
|
|
1808
|
+
height: R(a).height,
|
|
1809
|
+
rx: Fr(a),
|
|
1798
1810
|
fill: "none",
|
|
1799
|
-
stroke:
|
|
1811
|
+
stroke: Mn.value,
|
|
1800
1812
|
"stroke-width": "2.5",
|
|
1801
1813
|
transform: "scale(1.1)",
|
|
1802
1814
|
style: { "pointer-events": "none" }
|
|
1803
1815
|
}, null, 8, dt)) : n("", !0),
|
|
1804
|
-
|
|
1816
|
+
gn(a) ? (u(), r(e, { key: 3 }, [i("rect", {
|
|
1805
1817
|
x: "-4",
|
|
1806
1818
|
y: "-10",
|
|
1807
1819
|
width: "8",
|
|
1808
1820
|
height: "20",
|
|
1809
|
-
fill:
|
|
1821
|
+
fill: hn(a).color,
|
|
1810
1822
|
opacity: "0.06"
|
|
1811
1823
|
}, null, 8, ft), i("text", {
|
|
1812
1824
|
y: "4",
|
|
1813
1825
|
transform: `rotate(${a.rotation || 0} 0 4)`,
|
|
1814
1826
|
"text-anchor": "middle",
|
|
1815
|
-
fill:
|
|
1816
|
-
"font-size":
|
|
1827
|
+
fill: Vt(a) || I(a) || hn(a).color,
|
|
1828
|
+
"font-size": Bt(a, 12),
|
|
1817
1829
|
"font-family": "'SF Mono', 'Cascadia Code', 'Consolas', monospace",
|
|
1818
1830
|
"font-weight": "600"
|
|
1819
1831
|
}, m(a.label), 9, pt)], 64)) : (u(), r(e, { key: 4 }, [
|
|
1820
|
-
i("g", { transform:
|
|
1832
|
+
i("g", { transform: yn(a) }, [a.state !== "none" && Ar.value ? (u(), r("circle", {
|
|
1821
1833
|
key: 0,
|
|
1822
1834
|
r: "30",
|
|
1823
1835
|
fill: "none",
|
|
1824
|
-
stroke:
|
|
1836
|
+
stroke: hn(a).color,
|
|
1825
1837
|
"stroke-width": "2.5",
|
|
1826
1838
|
opacity: "0"
|
|
1827
1839
|
}, [...c[6] ||= [i("animate", {
|
|
@@ -1836,7 +1848,7 @@ var b = {
|
|
|
1836
1848
|
repeatCount: "indefinite"
|
|
1837
1849
|
}, null, -1)]], 8, ht)) : n("", !0), i("g", gt, [p(t.$slots, "node-icon", {
|
|
1838
1850
|
node: a,
|
|
1839
|
-
color:
|
|
1851
|
+
color: I(a),
|
|
1840
1852
|
viewMode: _.viewMode
|
|
1841
1853
|
}, () => [i("rect", {
|
|
1842
1854
|
x: "-18",
|
|
@@ -1844,25 +1856,25 @@ var b = {
|
|
|
1844
1856
|
width: "36",
|
|
1845
1857
|
height: "36",
|
|
1846
1858
|
rx: "6",
|
|
1847
|
-
fill:
|
|
1859
|
+
fill: I(a),
|
|
1848
1860
|
opacity: "0.9"
|
|
1849
1861
|
}, null, 8, _t)])])], 8, mt),
|
|
1850
|
-
|
|
1862
|
+
Er.value ? (u(), r("g", {
|
|
1851
1863
|
key: 0,
|
|
1852
|
-
transform:
|
|
1864
|
+
transform: bn(a)
|
|
1853
1865
|
}, [i("circle", {
|
|
1854
1866
|
r: "4",
|
|
1855
|
-
fill:
|
|
1867
|
+
fill: hn(a).color,
|
|
1856
1868
|
stroke: "#0a0e1a",
|
|
1857
1869
|
"stroke-width": "2"
|
|
1858
1870
|
}, null, 8, yt)], 8, vt)) : n("", !0),
|
|
1859
1871
|
i("text", {
|
|
1860
|
-
y:
|
|
1861
|
-
transform: `rotate(${a.rotation || 0} 0 ${
|
|
1872
|
+
y: Sn(a),
|
|
1873
|
+
transform: `rotate(${a.rotation || 0} 0 ${Sn(a)})`,
|
|
1862
1874
|
"text-anchor": "middle",
|
|
1863
|
-
fill:
|
|
1864
|
-
"font-size":
|
|
1865
|
-
"font-weight":
|
|
1875
|
+
fill: Vt(a),
|
|
1876
|
+
"font-size": Bt(a),
|
|
1877
|
+
"font-weight": Ht(a),
|
|
1866
1878
|
"font-family": "'Segoe UI', system-ui, sans-serif",
|
|
1867
1879
|
opacity: "0.9"
|
|
1868
1880
|
}, [(u(!0), r(e, null, f(String(a.label ?? "").split("\n"), (e, t) => (u(), r("tspan", {
|
|
@@ -1871,20 +1883,20 @@ var b = {
|
|
|
1871
1883
|
dy: t === 0 ? 0 : "1.2em"
|
|
1872
1884
|
}, m(e), 9, xt))), 128))], 8, bt)
|
|
1873
1885
|
], 64)),
|
|
1874
|
-
|
|
1886
|
+
Tr.value ? (u(), r("g", St, [(u(!0), r(e, null, f(Zr(a), (e) => (u(), r("circle", {
|
|
1875
1887
|
key: e.side,
|
|
1876
1888
|
cx: e.x,
|
|
1877
1889
|
cy: e.y,
|
|
1878
1890
|
r: "4.5",
|
|
1879
1891
|
class: "node-handle",
|
|
1880
1892
|
fill: "#0a0e1a",
|
|
1881
|
-
stroke:
|
|
1893
|
+
stroke: I(a),
|
|
1882
1894
|
"stroke-width": "1.5",
|
|
1883
1895
|
onPointerdown: g((t) => ei(t, a.id, e), ["stop", "prevent"]),
|
|
1884
|
-
onPointermove: g(
|
|
1885
|
-
onPointerup: g(
|
|
1886
|
-
onPointercancel: g(
|
|
1887
|
-
onLostpointercapture:
|
|
1896
|
+
onPointermove: g(ui, ["stop"]),
|
|
1897
|
+
onPointerup: g(di, ["stop"]),
|
|
1898
|
+
onPointercancel: g(di, ["stop"]),
|
|
1899
|
+
onLostpointercapture: di,
|
|
1888
1900
|
onMousedown: c[0] ||= g(() => {}, ["stop", "prevent"]),
|
|
1889
1901
|
onClick: c[1] ||= g(() => {}, ["stop"])
|
|
1890
1902
|
}, null, 40, Ct))), 128))])) : n("", !0)
|
|
@@ -1900,20 +1912,20 @@ var b = {
|
|
|
1900
1912
|
onMousedown: g((t) => Kr(t, Xr.value, e.side), ["stop", "prevent"]),
|
|
1901
1913
|
onClick: c[2] ||= g(() => {}, ["stop"])
|
|
1902
1914
|
}, null, 42, Tt))), 128))])) : n("", !0),
|
|
1903
|
-
|
|
1915
|
+
q.value ? (u(), r("rect", {
|
|
1904
1916
|
key: 4,
|
|
1905
1917
|
class: "marquee-box",
|
|
1906
|
-
x:
|
|
1907
|
-
y:
|
|
1908
|
-
width:
|
|
1909
|
-
height:
|
|
1918
|
+
x: ir.value.x,
|
|
1919
|
+
y: ir.value.y,
|
|
1920
|
+
width: ir.value.width,
|
|
1921
|
+
height: ir.value.height,
|
|
1910
1922
|
rx: "2",
|
|
1911
1923
|
"vector-effect": "non-scaling-stroke"
|
|
1912
1924
|
}, null, 8, Et)) : n("", !0)
|
|
1913
1925
|
], 44, ae));
|
|
1914
1926
|
}
|
|
1915
|
-
},
|
|
1916
|
-
e.component("Topology",
|
|
1927
|
+
}, zt = { install(e) {
|
|
1928
|
+
e.component("Topology", Rt);
|
|
1917
1929
|
} };
|
|
1918
1930
|
//#endregion
|
|
1919
|
-
export {
|
|
1931
|
+
export { Rt as Topology, zt as default, ie as nodeColors, b as nodeStates };
|