vue3-network-graph 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,35 +1,35 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createStaticVNode as a, getCurrentInstance as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as ee, watch as g, watchEffect as te, withModifiers as _ } from "vue";
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createStaticVNode as a, getCurrentInstance as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as ee, watch as te, watchEffect as ne, withModifiers as g } from "vue";
2
2
  //#region node_modules/uuid/dist/stringify.js
3
- var v = [];
4
- for (let e = 0; e < 256; ++e) v.push((e + 256).toString(16).slice(1));
5
- function ne(e, t = 0) {
6
- return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
3
+ var _ = [];
4
+ for (let e = 0; e < 256; ++e) _.push((e + 256).toString(16).slice(1));
5
+ function re(e, t = 0) {
6
+ return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
7
7
  }
8
8
  //#endregion
9
9
  //#region node_modules/uuid/dist/rng.js
10
- var re = /* @__PURE__ */ new Uint8Array(16);
11
- function y() {
12
- return crypto.getRandomValues(re);
10
+ var ie = /* @__PURE__ */ new Uint8Array(16);
11
+ function v() {
12
+ return crypto.getRandomValues(ie);
13
13
  }
14
14
  //#endregion
15
15
  //#region node_modules/uuid/dist/v4.js
16
- function ie(e, t, n) {
17
- return !t && !e && crypto.randomUUID ? crypto.randomUUID() : b(e, t, n);
16
+ function ae(e, t, n) {
17
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : y(e, t, n);
18
18
  }
19
- function b(e, t, n) {
19
+ function y(e, t, n) {
20
20
  e ||= {};
21
- let r = e.random ?? e.rng?.() ?? y();
21
+ let r = e.random ?? e.rng?.() ?? v();
22
22
  if (r.length < 16) throw Error("Random bytes length must be >= 16");
23
23
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
24
24
  if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
25
25
  for (let e = 0; e < 16; ++e) t[n + e] = r[e];
26
26
  return t;
27
27
  }
28
- return ne(r);
28
+ return re(r);
29
29
  }
30
30
  //#endregion
31
31
  //#region src/components/topology-data.js
32
- var x = {
32
+ var b = {
33
33
  normal: {
34
34
  color: "#4ade80",
35
35
  label: "Running"
@@ -70,7 +70,7 @@ var x = {
70
70
  color: "#64748b",
71
71
  label: "Idle"
72
72
  }
73
- }, ae = {
73
+ }, oe = {
74
74
  core: "#00f0ff",
75
75
  firewall: "#ff6b35",
76
76
  loadbalancer: "#a855f7",
@@ -80,44 +80,40 @@ var x = {
80
80
  cache: "#f43f5e",
81
81
  queue: "#fb923c",
82
82
  text: "#94a3b8"
83
- }, oe = ["viewBox"], se = [
83
+ }, se = ["viewBox"], ce = [
84
84
  "cx",
85
85
  "cy",
86
86
  "r"
87
- ], ce = [
87
+ ], le = [
88
88
  "offset",
89
89
  "stop-color",
90
90
  "stop-opacity"
91
- ], le = ["id"], ue = ["stop-color"], de = ["stop-color"], fe = ["stop-color"], pe = ["id"], me = ["fill"], he = ["id"], ge = ["fill"], _e = [
91
+ ], ue = ["id"], de = ["stop-color"], fe = ["stop-color"], pe = ["stop-color"], me = ["id"], he = ["fill"], ge = ["id"], _e = ["fill"], ve = [
92
92
  "width",
93
93
  "height",
94
94
  "x",
95
95
  "y"
96
- ], ve = ["width", "height"], ye = ["d", "stroke"], be = [
96
+ ], ye = ["width", "height"], be = ["d", "stroke"], xe = [
97
97
  "width",
98
98
  "height",
99
99
  "x",
100
100
  "y",
101
101
  "opacity"
102
- ], xe = {
102
+ ], Se = {
103
103
  key: 1,
104
104
  class: "center-crosshair"
105
- }, Se = [
105
+ }, Ce = [
106
106
  "x",
107
107
  "y",
108
108
  "width",
109
109
  "height",
110
110
  "fill"
111
- ], Ce = [
111
+ ], we = [
112
112
  "x",
113
113
  "y",
114
114
  "width",
115
115
  "height",
116
116
  "stroke"
117
- ], we = [
118
- "cx",
119
- "cy",
120
- "fill"
121
117
  ], Te = [
122
118
  "cx",
123
119
  "cy",
@@ -131,22 +127,26 @@ var x = {
131
127
  "cy",
132
128
  "fill"
133
129
  ], Oe = [
130
+ "cx",
131
+ "cy",
132
+ "fill"
133
+ ], ke = [
134
134
  "x",
135
135
  "y",
136
136
  "transform",
137
137
  "fill"
138
- ], ke = {
138
+ ], Ae = {
139
139
  key: 2,
140
140
  class: "node-base-layer",
141
141
  "pointer-events": "none"
142
- }, Ae = ["transform"], je = [
142
+ }, je = ["transform"], Me = [
143
143
  "x",
144
144
  "y",
145
145
  "width",
146
146
  "height",
147
147
  "rx",
148
148
  "fill"
149
- ], Me = [
149
+ ], Ne = [
150
150
  "x",
151
151
  "y",
152
152
  "width",
@@ -155,71 +155,91 @@ var x = {
155
155
  "stroke",
156
156
  "stroke-width",
157
157
  "stroke-dasharray"
158
- ], Ne = ["d", "marker-end"], Pe = ["d", "stroke"], Fe = ["d", "stroke"], Ie = { key: 0 }, Le = ["d", "stroke"], Re = ["dur"], ze = ["d", "stroke"], Be = ["dur"], Ve = ["d", "stroke"], He = ["dur"], Ue = { key: 0 }, We = ["fill"], Ge = ["path", "dur"], Ke = ["fill"], qe = ["path", "dur"], Je = ["transform"], Ye = [
158
+ ], Pe = [
159
+ "d",
160
+ "stroke",
161
+ "opacity",
162
+ "marker-end"
163
+ ], Fe = ["d", "stroke"], Ie = ["d", "stroke"], Le = { key: 0 }, Re = ["d", "stroke"], ze = ["dur"], Be = ["d", "stroke"], Ve = ["dur"], He = ["d", "stroke"], Ue = ["dur"], We = [
164
+ "d",
165
+ "stroke",
166
+ "stroke-width",
167
+ "stroke-dasharray",
168
+ "marker-end"
169
+ ], Ge = ["to", "dur"], Ke = { key: 0 }, qe = ["fill"], Je = ["path", "dur"], Ye = ["fill"], Xe = ["path", "dur"], Ze = ["transform"], Qe = [
159
170
  "y",
160
171
  "height",
161
172
  "stroke"
162
- ], Xe = ["font-size", "fill"], Ze = { key: 1 }, Qe = ["transform"], $e = [
173
+ ], $e = ["font-size", "fill"], et = { key: 1 }, tt = ["transform"], nt = [
163
174
  "x",
164
175
  "y",
165
176
  "width",
166
177
  "height",
167
178
  "fill",
168
- "stroke"
169
- ], et = ["font-size", "fill"], tt = ["transform"], nt = [
179
+ "opacity",
180
+ "stroke",
181
+ "stroke-opacity",
182
+ "stroke-dasharray"
183
+ ], rt = ["font-size", "fill"], it = ["transform"], at = [
170
184
  "x",
171
185
  "y",
172
186
  "width",
173
187
  "height",
174
188
  "fill",
175
- "stroke"
176
- ], rt = ["font-size", "fill"], it = ["transform"], at = [
189
+ "opacity",
190
+ "stroke",
191
+ "stroke-opacity",
192
+ "stroke-dasharray"
193
+ ], ot = ["font-size", "fill"], st = ["transform"], ct = [
177
194
  "x",
178
195
  "y",
179
196
  "width",
180
197
  "height",
181
198
  "fill",
182
- "stroke"
183
- ], ot = ["font-size", "fill"], st = { key: 3 }, ct = [
199
+ "opacity",
200
+ "stroke",
201
+ "stroke-opacity",
202
+ "stroke-dasharray"
203
+ ], lt = ["font-size", "fill"], ut = { key: 3 }, dt = [
184
204
  "x1",
185
205
  "y1",
186
206
  "x2",
187
207
  "y2",
188
208
  "stroke"
189
- ], lt = [
209
+ ], ft = [
190
210
  "cx",
191
211
  "cy",
192
212
  "fill"
193
- ], ut = [
213
+ ], pt = [
194
214
  "x",
195
215
  "y",
196
216
  "width",
197
217
  "height",
198
218
  "stroke"
199
- ], dt = ["d", "onClick"], ft = [
219
+ ], mt = ["d", "onClick"], ht = [
200
220
  "transform",
201
221
  "onMousedown",
202
222
  "onClick"
203
- ], pt = [
223
+ ], gt = [
204
224
  "x",
205
225
  "y",
206
226
  "width",
207
227
  "height",
208
228
  "rx",
209
229
  "stroke-width"
210
- ], mt = [
230
+ ], _t = [
211
231
  "x",
212
232
  "y",
213
233
  "width",
214
234
  "height"
215
- ], ht = [
235
+ ], vt = [
216
236
  "x",
217
237
  "y",
218
238
  "width",
219
239
  "height",
220
240
  "rx",
221
241
  "fill"
222
- ], gt = [
242
+ ], yt = [
223
243
  "x",
224
244
  "y",
225
245
  "width",
@@ -228,63 +248,63 @@ var x = {
228
248
  "stroke",
229
249
  "stroke-width",
230
250
  "stroke-dasharray"
231
- ], _t = [
251
+ ], bt = [
232
252
  "x",
233
253
  "y",
234
254
  "width",
235
255
  "height",
236
256
  "rx",
237
257
  "stroke"
238
- ], vt = [
258
+ ], xt = [
239
259
  "transform",
240
260
  "fill",
241
261
  "font-size"
242
- ], yt = ["dy"], bt = ["r", "stroke"], xt = ["values"], St = [
262
+ ], St = ["dy"], Ct = ["r", "stroke"], wt = ["values"], Tt = [
243
263
  "x",
244
264
  "y",
245
265
  "width",
246
266
  "height",
247
267
  "preserveAspectRatio"
248
- ], Ct = [
268
+ ], Et = [
249
269
  "href",
250
270
  "x",
251
271
  "y",
252
272
  "width",
253
273
  "height"
254
- ], wt = ["transform"], Tt = ["fill"], Et = ["transform"], Dt = ["fill"], Ot = [
274
+ ], Dt = ["transform"], Ot = ["fill"], kt = ["transform"], At = ["fill"], jt = [
255
275
  "y",
256
276
  "transform",
257
277
  "fill",
258
278
  "font-size",
259
279
  "font-weight"
260
- ], kt = ["dy"], At = {
280
+ ], Mt = ["dy"], Nt = {
261
281
  key: 8,
262
282
  class: "node-handles"
263
- }, jt = [
283
+ }, Pt = [
264
284
  "cx",
265
285
  "cy",
266
286
  "stroke",
267
287
  "onPointerdown"
268
- ], Mt = {
288
+ ], Ft = {
269
289
  key: 4,
270
290
  class: "node-resize-layer"
271
- }, Nt = [
291
+ }, It = [
272
292
  "x",
273
293
  "y",
274
294
  "onMousedown"
275
- ], Pt = {
295
+ ], Lt = {
276
296
  key: 0,
277
297
  "pointer-events": "none"
278
- }, Ft = ["d", "stroke"], It = [
298
+ }, Rt = [
279
299
  "d",
280
300
  "stroke",
281
301
  "marker-end"
282
- ], Lt = [
302
+ ], zt = [
283
303
  "x",
284
304
  "y",
285
305
  "width",
286
306
  "height"
287
- ], Rt = 6, zt = 14, Bt = 3, S = 60, Vt = .2, Ht = 5, Ut = 160, Wt = 140, Gt = 12, Kt = 4e3, qt = 12, Jt = 4e3, Yt = {
307
+ ], Bt = 6, Vt = 14, Ht = 3, x = 60, Ut = .2, Wt = 5, Gt = 160, Kt = 140, qt = 12, Jt = 4e3, Yt = 12, Xt = 4e3, Zt = {
288
308
  __name: "Topology",
289
309
  props: {
290
310
  nodes: {
@@ -342,10 +362,10 @@ var x = {
342
362
  "node-resize-end",
343
363
  "delete-request"
344
364
  ],
345
- setup(v, { expose: ne, emit: re }) {
346
- let y = v, b = re, Yt = 0, Xt = () => {
347
- Yt++;
348
- }, Zt = (e) => e && typeof e == "object" ? {
365
+ setup(_, { expose: re, emit: ie }) {
366
+ let v = _, y = ie, Zt = 0, Qt = () => {
367
+ Zt++;
368
+ }, $t = (e) => e && typeof e == "object" ? {
349
369
  text: e.text,
350
370
  rotation: e.rotation || 0,
351
371
  fontSize: e.fontSize,
@@ -355,147 +375,147 @@ var x = {
355
375
  rotation: 0,
356
376
  fontSize: void 0,
357
377
  color: void 0
358
- }, Qt = (e, t = 11) => e.fontSize || t, $t = (e) => e.fontColor || "#000000", en = (e, t = 500) => e.fontWeight || t, tn = (e, t) => e.fontSize || Zt(t).fontSize || 8, C = (e, t) => e.fontColor || Zt(t).color || "#000000", w = f(y.nodes.map((e) => ({ ...e }))), nn = null, T = () => {
359
- nn = w.value, b("update:nodes", w.value);
378
+ }, en = (e, t = 11) => e.fontSize || t, tn = (e) => e.fontColor || "#000000", nn = (e, t = 500) => e.fontWeight || t, rn = (e, t) => e.fontSize || $t(t).fontSize || 8, an = (e, t) => e.fontColor || $t(t).color || t != null && t === e.centerText && hi.value || "#000000", S = f(v.nodes.map((e) => ({ ...e }))), on = null, C = () => {
379
+ on = S.value, y("update:nodes", S.value);
360
380
  };
361
- g(() => y.nodes, (e) => {
381
+ te(() => v.nodes, (e) => {
362
382
  let t = Array.isArray(e) ? e : [];
363
- if (t === nn) return;
383
+ if (t === on) return;
364
384
  let n = null, r = null;
365
385
  try {
366
- n = JSON.stringify(t), r = JSON.stringify(w.value);
386
+ n = JSON.stringify(t), r = JSON.stringify(S.value);
367
387
  } catch {
368
388
  n = null;
369
389
  }
370
- (n === null || n !== r) && (Xt(), w.value = t.map((e) => ({ ...e })));
390
+ (n === null || n !== r) && (Qt(), S.value = t.map((e) => ({ ...e })));
371
391
  }, { deep: !0 });
372
- let rn = f(y.lineMode);
373
- g(() => y.lineMode, (e) => {
374
- rn.value = e;
392
+ let sn = f(v.lineMode);
393
+ te(() => v.lineMode, (e) => {
394
+ sn.value = e;
375
395
  });
376
- let E = t({
377
- get: () => rn.value,
396
+ let w = t({
397
+ get: () => sn.value,
378
398
  set: (e) => {
379
- rn.value = e, b("update:lineMode", e);
399
+ sn.value = e, y("update:lineMode", e);
380
400
  }
381
- }), D = f(null), O = f(null), an = f({
401
+ }), T = f(null), E = f(null), cn = f({
382
402
  x: 0,
383
403
  y: 0
384
- }), on = f(null), sn = null, cn = !1, ln = !1, k = f([]), A = f(/* @__PURE__ */ new Map()), j = f(/* @__PURE__ */ new Set()), M = t(() => {
385
- let e = y.edges, t = [];
386
- if (k.value.length) {
404
+ }), ln = f(null), un = null, dn = !1, fn = !1, D = f([]), O = f(/* @__PURE__ */ new Map()), k = f(/* @__PURE__ */ new Set()), A = t(() => {
405
+ let e = v.edges, t = [];
406
+ if (D.value.length) {
387
407
  let n = new Set(e.map((e) => e.id));
388
- t = k.value.filter((e) => !n.has(e.id));
408
+ t = D.value.filter((e) => !n.has(e.id));
389
409
  }
390
- let n = t.length ? [...e, ...t] : e, r = A.value;
410
+ let n = t.length ? [...e, ...t] : e, r = O.value;
391
411
  r.size && (n = n.map((e) => r.has(e.id) ? {
392
412
  ...e,
393
413
  ...r.get(e.id)
394
414
  } : e));
395
- let i = new Set(w.value.map((e) => e.id)), a = j.value;
415
+ let i = new Set(S.value.map((e) => e.id)), a = k.value;
396
416
  return n.filter((e) => !a.has(e.id) && i.has(e.from) && i.has(e.to));
397
- }), un = t(() => y.config.watchDataChanges === !0), dn = f({
417
+ }), pn = t(() => v.config.watchDataChanges === !0), mn = f({
398
418
  nodes: [],
399
419
  edges: []
400
- }), fn = "", N = null, pn = () => JSON.parse(JSON.stringify({
401
- nodes: w.value,
402
- edges: M.value
403
- })), mn = (e, t) => {
420
+ }), hn = "", j = null, gn = () => JSON.parse(JSON.stringify({
421
+ nodes: S.value,
422
+ edges: A.value
423
+ })), _n = (e, t) => {
404
424
  let n = new Map(e.map((e) => [e.id, e])), r = new Map(t.map((e) => [e.id, e]));
405
425
  return {
406
426
  added: t.filter((e) => !n.has(e.id)).map((e) => e.id),
407
427
  removed: e.filter((e) => !r.has(e.id)).map((e) => e.id),
408
428
  updated: t.filter((e) => n.has(e.id) && JSON.stringify(n.get(e.id)) !== JSON.stringify(e)).map((e) => e.id)
409
429
  };
410
- }, hn = (e) => ({
411
- nodes: mn(dn.value.nodes, e.nodes),
412
- edges: mn(dn.value.edges, e.edges)
413
- }), gn = () => {
414
- if (N = null, !un.value) return;
415
- let e = pn(), t = JSON.stringify(e);
416
- if (t === fn) return;
417
- let n = hn(e), r = n.nodes.added.length + n.nodes.removed.length + n.nodes.updated.length + n.edges.added.length + n.edges.removed.length + n.edges.updated.length;
418
- fn = t, r && b("data-change", {
430
+ }, vn = (e) => ({
431
+ nodes: _n(mn.value.nodes, e.nodes),
432
+ edges: _n(mn.value.edges, e.edges)
433
+ }), yn = () => {
434
+ if (j = null, !pn.value) return;
435
+ let e = gn(), t = JSON.stringify(e);
436
+ if (t === hn) return;
437
+ let n = vn(e), r = n.nodes.added.length + n.nodes.removed.length + n.nodes.updated.length + n.edges.added.length + n.edges.removed.length + n.edges.updated.length;
438
+ hn = t, r && y("data-change", {
419
439
  nodes: e.nodes,
420
440
  edges: e.edges,
421
441
  summary: n
422
442
  });
423
- }, _n = () => {
424
- un.value && (N && clearTimeout(N), N = setTimeout(gn, 300));
425
- }, vn = () => {
426
- N &&= (clearTimeout(N), null), dn.value = pn(), fn = "";
443
+ }, bn = () => {
444
+ pn.value && (j && clearTimeout(j), j = setTimeout(yn, 300));
445
+ }, xn = () => {
446
+ j &&= (clearTimeout(j), null), mn.value = gn(), hn = "";
427
447
  };
428
- g([
429
- w,
448
+ te([
449
+ S,
450
+ D,
430
451
  k,
431
- j,
432
- A
433
- ], () => _n(), { deep: !0 }), g(un, (e) => {
434
- e ? vn() : N &&= (clearTimeout(N), null);
452
+ O
453
+ ], () => bn(), { deep: !0 }), te(pn, (e) => {
454
+ e ? xn() : j &&= (clearTimeout(j), null);
435
455
  }), u(() => {
436
- un.value && vn();
456
+ pn.value && xn();
437
457
  });
438
- let yn = () => pn(), bn = () => {
458
+ let Sn = () => gn(), Cn = () => {
439
459
  let e = new Set(z.value), t = new Set(B.value);
440
460
  return {
441
461
  nodeIds: e,
442
- nodes: w.value.filter((t) => e.has(t.id)),
443
- edges: M.value.filter((n) => t.has(n.id) || e.has(n.from) || e.has(n.to))
462
+ nodes: S.value.filter((t) => e.has(t.id)),
463
+ edges: A.value.filter((n) => t.has(n.id) || e.has(n.from) || e.has(n.to))
444
464
  };
445
- }, xn = () => {
446
- let { nodeIds: e, nodes: t, edges: n } = bn();
465
+ }, wn = () => {
466
+ let { nodeIds: e, nodes: t, edges: n } = Cn();
447
467
  return !t.length && !n.length ? {
448
468
  nodes: [],
449
469
  edges: []
450
- } : (t.length && (w.value = w.value.filter((t) => !e.has(t.id)), T()), n.length && (j.value = /* @__PURE__ */ new Set([...j.value, ...n.map((e) => e.id)]), k.value = k.value.filter((e) => !j.value.has(e.id)), b("edge-remove", n.map((e) => JSON.parse(JSON.stringify(e))))), z.value = [], B.value = [], b("node-select", null), b("edge-select", null), V(), JSON.parse(JSON.stringify({
470
+ } : (t.length && (S.value = S.value.filter((t) => !e.has(t.id)), C()), n.length && (k.value = /* @__PURE__ */ new Set([...k.value, ...n.map((e) => e.id)]), D.value = D.value.filter((e) => !k.value.has(e.id)), y("edge-remove", n.map((e) => JSON.parse(JSON.stringify(e))))), z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V(), JSON.parse(JSON.stringify({
451
471
  nodes: t,
452
472
  edges: n
453
473
  })));
454
- }, Sn = (e) => {
474
+ }, Tn = (e) => {
455
475
  let t = e.target;
456
476
  if (!t || t === document.body) return !1;
457
477
  let n = String(t.tagName || "").toLowerCase();
458
478
  return n === "input" || n === "textarea" || n === "select" || t.isContentEditable;
459
- }, Cn = o(), wn = () => {
460
- let e = Cn?.vnode?.props;
479
+ }, En = o(), Dn = () => {
480
+ let e = En?.vnode?.props;
461
481
  return !!e && "onDeleteRequest" in e;
462
- }, Tn = () => {
463
- let { nodes: e, edges: t } = bn();
464
- b("delete-request", JSON.parse(JSON.stringify({
482
+ }, On = () => {
483
+ let { nodes: e, edges: t } = Cn();
484
+ y("delete-request", JSON.parse(JSON.stringify({
465
485
  nodes: e,
466
486
  edges: t
467
487
  })));
468
- }, En = (e) => {
469
- (e.key === "Delete" || e.key === "Backspace") && (e.isComposing || e.ctrlKey || e.metaKey || e.altKey || y.config?.enableDeleteKey !== !1 && y.editable && (Sn(e) || (z.value.length || B.value.length) && (D.value || Y.value || X.value || (e.preventDefault(), wn() ? Tn() : xn()))));
488
+ }, kn = (e) => {
489
+ (e.key === "Delete" || e.key === "Backspace") && (e.isComposing || e.ctrlKey || e.metaKey || e.altKey || v.config?.enableDeleteKey !== !1 && v.editable && (Tn(e) || (z.value.length || B.value.length) && (T.value || J.value || Y.value || (e.preventDefault(), Dn() ? On() : wn()))));
470
490
  };
471
- u(() => window.addEventListener("keydown", En)), l(() => window.removeEventListener("keydown", En));
472
- let Dn = (e) => {
473
- let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(w.value.map((e) => e.id)), r = [];
491
+ u(() => window.addEventListener("keydown", kn)), l(() => window.removeEventListener("keydown", kn));
492
+ let An = (e) => {
493
+ let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(S.value.map((e) => e.id)), r = [];
474
494
  for (let e of t) {
475
495
  let t = JSON.parse(JSON.stringify(e));
476
- if (t.id == null) t.id = ie();
496
+ if (t.id == null) t.id = ae();
477
497
  else if (n.has(t.id)) continue;
478
498
  n.add(t.id), r.push(t);
479
499
  }
480
- return r.length ? (w.value = [...w.value, ...r], T(), JSON.parse(JSON.stringify(r))) : [];
481
- }, On = (e) => {
482
- let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(M.value.map((e) => e.id)), r = [];
500
+ return r.length ? (S.value = [...S.value, ...r], C(), JSON.parse(JSON.stringify(r))) : [];
501
+ }, jn = (e) => {
502
+ let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(A.value.map((e) => e.id)), r = [];
483
503
  for (let e of t) {
484
504
  let t = JSON.parse(JSON.stringify(e));
485
505
  if (t.from != null && t.to != null) {
486
- if (t.id == null) t.id = ie();
506
+ if (t.id == null) t.id = ae();
487
507
  else if (n.has(t.id)) continue;
488
508
  n.add(t.id), r.push(t);
489
509
  }
490
510
  }
491
511
  if (!r.length) return [];
492
- let i = r.filter((e) => j.value.has(e.id));
512
+ let i = r.filter((e) => k.value.has(e.id));
493
513
  if (i.length) {
494
514
  let e = new Set(i.map((e) => e.id));
495
- j.value = new Set([...j.value].filter((t) => !e.has(t)));
515
+ k.value = new Set([...k.value].filter((t) => !e.has(t)));
496
516
  }
497
- return k.value = [...k.value, ...r], r.forEach((e) => b("edge-create", JSON.parse(JSON.stringify(e)))), JSON.parse(JSON.stringify(r));
498
- }, kn = (e) => {
517
+ return D.value = [...D.value, ...r], r.forEach((e) => y("edge-create", JSON.parse(JSON.stringify(e)))), JSON.parse(JSON.stringify(r));
518
+ }, Mn = (e) => {
499
519
  let t = (Array.isArray(e) ? e : [e]).filter((e) => e && e.id != null);
500
520
  if (!t.length) return [];
501
521
  let n = /* @__PURE__ */ new Map();
@@ -508,7 +528,7 @@ var x = {
508
528
  });
509
529
  }
510
530
  let r = [];
511
- return w.value = w.value.map((e) => {
531
+ return S.value = S.value.map((e) => {
512
532
  let t = n.get(e.id);
513
533
  if (!t) return e;
514
534
  let i = {
@@ -516,11 +536,11 @@ var x = {
516
536
  ...t
517
537
  };
518
538
  return r.push(i), i;
519
- }), r.length ? (T(), JSON.parse(JSON.stringify(r))) : [];
520
- }, An = (e) => {
539
+ }), r.length ? (C(), JSON.parse(JSON.stringify(r))) : [];
540
+ }, Nn = (e) => {
521
541
  let t = (Array.isArray(e) ? e : [e]).filter((e) => e && e.id != null);
522
542
  if (!t.length) return [];
523
- let n = new Set(M.value.map((e) => e.id)), r = new Map(A.value), i = [];
543
+ let n = new Set(A.value.map((e) => e.id)), r = new Map(O.value), i = [];
524
544
  for (let e of t) {
525
545
  let { id: t, ...a } = e;
526
546
  if (!n.has(t)) continue;
@@ -531,43 +551,43 @@ var x = {
531
551
  ...o
532
552
  };
533
553
  r.set(t, s);
534
- let c = M.value.find((e) => e.id === t);
554
+ let c = A.value.find((e) => e.id === t);
535
555
  i.push({
536
556
  ...c,
537
557
  ...s
538
558
  });
539
559
  }
540
- return i.length ? (A.value = r, b("edge-update", JSON.parse(JSON.stringify(i))), JSON.parse(JSON.stringify(i))) : [];
541
- }, jn = (e) => {
560
+ return i.length ? (O.value = r, y("edge-update", JSON.parse(JSON.stringify(i))), JSON.parse(JSON.stringify(i))) : [];
561
+ }, Pn = (e) => {
542
562
  let t = e && typeof e == "object" ? e : null;
543
- return k.value = [], j.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (w.value = JSON.parse(JSON.stringify(t.nodes)), T()) : (w.value = (Array.isArray(y.nodes) ? y.nodes : []).map((e) => ({ ...e })), nn = w.value), z.value = [], B.value = [], b("node-select", null), b("edge-select", null), V(), vn(), pn();
563
+ return D.value = [], k.value = /* @__PURE__ */ new Set(), O.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (S.value = JSON.parse(JSON.stringify(t.nodes)), C()) : (S.value = (Array.isArray(v.nodes) ? v.nodes : []).map((e) => ({ ...e })), on = S.value), z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V(), xn(), gn();
544
564
  };
545
- g(() => y.edges, (e) => {
546
- Xt();
565
+ te(() => v.edges, (e) => {
566
+ Qt();
547
567
  let t = Array.isArray(e) ? e : [], n = new Set(t.map((e) => e.id));
548
- if (k.value.length) {
549
- let e = k.value.filter((e) => !n.has(e.id));
550
- e.length !== k.value.length && (k.value = e);
568
+ if (D.value.length) {
569
+ let e = D.value.filter((e) => !n.has(e.id));
570
+ e.length !== D.value.length && (D.value = e);
551
571
  }
552
- if (A.value.size) {
553
- let e = new Map(A.value), n = new Set(k.value.map((e) => e.id)), r = !1;
572
+ if (O.value.size) {
573
+ let e = new Map(O.value), n = new Set(D.value.map((e) => e.id)), r = !1;
554
574
  for (let [i, a] of e) {
555
575
  let o = t.find((e) => e.id === i);
556
576
  o ? Object.entries(a).every(([e, t]) => JSON.stringify(o[e] ?? null) === JSON.stringify(t ?? null)) && (e.delete(i), r = !0) : n.has(i) || (e.delete(i), r = !0);
557
577
  }
558
- r && (A.value = e);
578
+ r && (O.value = e);
559
579
  }
560
580
  }, { deep: !0 });
561
- let Mn = t(() => {
581
+ let Fn = t(() => {
562
582
  let e = {};
563
- M.value.forEach((t) => {
583
+ A.value.forEach((t) => {
564
584
  let n = [t.from, t.to].sort().join("__");
565
585
  e[n] || (e[n] = []), e[n].push(t);
566
586
  });
567
587
  let t = {};
568
588
  return Object.entries(e).forEach(([e, n]) => {
569
589
  let r = n.length;
570
- r > Rt ? n.forEach((n, i) => {
590
+ r > Bt ? n.forEach((n, i) => {
571
591
  t[n.id] = i === 0 ? {
572
592
  key: e,
573
593
  index: 0,
@@ -596,44 +616,44 @@ var x = {
596
616
  };
597
617
  });
598
618
  }), t;
599
- }), Nn = t(() => {
619
+ }), In = t(() => {
600
620
  let e = /* @__PURE__ */ new Map();
601
- for (let t of w.value) e.set(t.id, t);
621
+ for (let t of S.value) e.set(t.id, t);
602
622
  return e;
603
- }), P = (e) => Nn.value.get(e), F = (e) => e.state != "none" && x[e.state] && x[e.state].color || "#00f0ff", Pn = (e) => x[e.state] || x.normal, Fn = (e) => e.nodeType === "text", In = (e) => e.nodeType === "border-only", Ln = [
623
+ }), M = (e) => In.value.get(e), N = (e) => e.state != "none" && b[e.state] && b[e.state].color || "#00f0ff", Ln = (e) => b[e.state] || b.normal, Rn = (e) => e.nodeType === "text", zn = (e) => e.nodeType === "border-only", Bn = [
604
624
  "image",
605
625
  "img",
606
626
  "picture"
607
- ], Rn = (e) => {
627
+ ], P = (e) => {
608
628
  if (!e) return "";
609
629
  let t = e.image ?? e.src ?? e.img ?? e.imageUrl;
610
630
  return typeof t == "string" && t.trim() ? t.trim() : "";
611
- }, zn = (e) => e ? Ln.includes(String(e.nodeType ?? "").toLowerCase()) ? !0 : (y.config?.imageNodeBySource || !e.nodeType) && !!Rn(e) : !1, Bn = t(() => y.config?.imageFit === "cover" ? "cover" : "contain"), Vn = t(() => Bn.value === "contain" ? "xMidYMid meet" : "xMidYMid slice"), Hn = `-30 -30 ${S} ${S}`, Un = /* @__PURE__ */ new Map(), Wn = f(0), Gn = (e) => {
612
- if (!e || Un.has(e) || typeof Image > "u") return;
613
- Un.set(e, null);
631
+ }, Vn = (e) => e ? Bn.includes(String(e.nodeType ?? "").toLowerCase()) ? !0 : (v.config?.imageNodeBySource || !e.nodeType) && !!P(e) : !1, Hn = t(() => v.config?.imageFit === "cover" ? "cover" : "contain"), Un = t(() => Hn.value === "contain" ? "xMidYMid meet" : "xMidYMid slice"), Wn = `-30 -30 ${x} ${x}`, Gn = /* @__PURE__ */ new Map(), Kn = f(0), qn = (e) => {
632
+ if (!e || Gn.has(e) || typeof Image > "u") return;
633
+ Gn.set(e, null);
614
634
  let t = new Image();
615
635
  t.onload = () => {
616
- Un.set(e, {
636
+ Gn.set(e, {
617
637
  w: t.naturalWidth || 1,
618
638
  h: t.naturalHeight || 1
619
- }), Wn.value++;
639
+ }), Kn.value++;
620
640
  }, t.onerror = () => {
621
- Un.set(e, {
641
+ Gn.set(e, {
622
642
  w: 1,
623
643
  h: 1
624
- }), Wn.value++;
644
+ }), Kn.value++;
625
645
  }, t.src = e;
626
- }, Kn = (e) => {
627
- Wn.value;
628
- let t = Rn(e), n = t ? Un.get(t) : null, { w: r, h: i } = I(e);
646
+ }, F = (e) => {
647
+ Kn.value;
648
+ let t = P(e), n = t ? Gn.get(t) : null, { w: r, h: i } = I(e);
629
649
  if (!n) return {
630
650
  w: r,
631
651
  h: i
632
652
  };
633
653
  let a = n.w, o = n.h, s;
634
- if (Bn.value === "contain") s = Math.min(S / a, S / o);
654
+ if (Hn.value === "contain") s = Math.min(x / a, x / o);
635
655
  else {
636
- let e = Math.max(r, i) / S;
656
+ let e = Math.max(r, i) / x;
637
657
  s = Math.max(r / e / a, i / e / o);
638
658
  }
639
659
  return {
@@ -641,38 +661,38 @@ var x = {
641
661
  h: o * s
642
662
  };
643
663
  };
644
- te(() => {
645
- for (let e of w.value) zn(e) && Gn(Rn(e));
664
+ ne(() => {
665
+ for (let e of S.value) Vn(e) && qn(P(e));
646
666
  });
647
- let qn = (e, t) => {
667
+ let Jn = (e, t) => {
648
668
  let n = Number(e);
649
669
  return Number.isFinite(n) && n > 0 ? n : t;
650
- }, Jn = (e) => {
651
- let t = qn(e.width, S), n = qn(e.height, S);
670
+ }, Yn = (e) => {
671
+ let t = Jn(e.width, x), n = Jn(e.height, x);
652
672
  return {
653
- sx: t / S,
654
- sy: n / S
673
+ sx: t / x,
674
+ sy: n / x
655
675
  };
656
- }, Yn = (e) => {
676
+ }, Xn = (e) => {
657
677
  let t = Math.max(e.width, e.height);
658
678
  return isNaN(t) ? 30 : t / 2;
659
- }, Xn = (e) => {
660
- let { sx: t, sy: n } = Jn(e);
661
- return t === 1 && n === 1 ? "" : `scale(${t}, ${n})`;
662
679
  }, Zn = (e) => {
680
+ let { sx: t, sy: n } = Yn(e);
681
+ return t === 1 && n === 1 ? "" : `scale(${t}, ${n})`;
682
+ }, Qn = (e) => {
663
683
  let { w: t, h: n } = I(e), r = Math.min(10, t * .3), i = Math.min(10, n * .3);
664
684
  return `translate(${t / 2 - r}, ${-(n / 2 - i)})`;
665
- }, Qn = t(() => {
666
- let e = Number(y.config.labelGap);
685
+ }, $n = t(() => {
686
+ let e = Number(v.config.labelGap);
667
687
  return Number.isFinite(e) && e >= 0 ? e : 18;
668
- }), $n = (e) => {
669
- if (Fn(e)) return 4;
688
+ }), er = (e) => {
689
+ if (Rn(e)) return 4;
670
690
  let { h: t } = I(e);
671
- return e.labelPosition === "top" ? -(t / 2 + Qn.value) : e.labelPosition === "center" ? 0 : t / 2 + Qn.value;
672
- }, er = (e) => {
691
+ return e.labelPosition === "top" ? -(t / 2 + $n.value) : e.labelPosition === "center" ? 0 : t / 2 + $n.value;
692
+ }, tr = (e) => {
673
693
  let t = L(e);
674
- if (Fn(e) || !e.label) return t;
675
- let n = Qt(e), r = $n(e);
694
+ if (Rn(e) || !e.label) return t;
695
+ let n = en(e), r = er(e);
676
696
  if (e.labelPosition === "top") {
677
697
  let e = r - n - 4;
678
698
  e < t.y && (t.height += t.y - e, t.y = e);
@@ -681,11 +701,11 @@ var x = {
681
701
  i > t.y + t.height && (t.height = i - t.y);
682
702
  }
683
703
  return t;
684
- }, tr = (e) => e.borderStyle !== "none" && (e.borderColor !== void 0 || e.borderWidth !== void 0 || e.borderStyle !== void 0), I = (e) => {
685
- let t = Fn(e), n = In(e);
704
+ }, nr = (e) => e.borderStyle !== "none" && (e.borderColor !== void 0 || e.borderWidth !== void 0 || e.borderStyle !== void 0), I = (e) => {
705
+ let t = Rn(e), n = zn(e);
686
706
  return {
687
- w: qn(e.width, t ? Math.max(60, String(e.label).length * 7 + 16) : n ? Math.max(80, String(e.label).length * 8 + 24) : S),
688
- h: qn(e.height, t ? 26 : n ? 40 : S)
707
+ w: Jn(e.width, t ? Math.max(60, String(e.label).length * 7 + 16) : n ? Math.max(80, String(e.label).length * 8 + 24) : x),
708
+ h: Jn(e.height, t ? 26 : n ? 40 : x)
689
709
  };
690
710
  }, L = (e) => {
691
711
  let { w: t, h: n } = I(e);
@@ -695,133 +715,133 @@ var x = {
695
715
  width: t,
696
716
  height: n
697
717
  };
698
- }, R = (e) => tr(e) ? L(e) : null, nr = (e) => e.background && e.background !== "none" ? e.background : null, z = f([]), B = f([]);
718
+ }, R = (e) => nr(e) ? L(e) : null, rr = (e) => e.background && e.background !== "none" ? e.background : null, z = f([]), B = f([]);
699
719
  t(() => z.value.length === 1 ? z.value[0] : null), t(() => B.value.length === 1 ? B.value[0] : null);
700
- let rr = (e) => z.value.includes(e.id), ir = (e) => B.value.includes(e.id), V = () => {
701
- b("selection-change", {
702
- nodes: w.value.filter((e) => z.value.includes(e.id)),
703
- edges: M.value.filter((e) => B.value.includes(e.id))
720
+ let ir = (e) => z.value.includes(e.id), ar = (e) => B.value.includes(e.id), V = () => {
721
+ y("selection-change", {
722
+ nodes: S.value.filter((e) => z.value.includes(e.id)),
723
+ edges: A.value.filter((e) => B.value.includes(e.id))
704
724
  });
705
- }, ar = (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, or = t(() => ar(y.config.maxSelectNodes)), sr = t(() => ar(y.config.maxSelectEdges)), cr = (e, t, n) => {
725
+ }, or = (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, sr = t(() => or(v.config.maxSelectNodes)), cr = t(() => or(v.config.maxSelectEdges)), H = (e, t, n) => {
706
726
  let r = new Set(e), i = [];
707
727
  for (let e of t) r.has(e) || (r.add(e), i.push(e));
708
728
  if (n === Infinity) return [...e, ...i];
709
729
  let a = Math.max(0, n - e.length);
710
730
  return [...e, ...i.slice(0, a)];
711
731
  };
712
- g([or, sr], ([e, t]) => {
732
+ te([sr, cr], ([e, t]) => {
713
733
  let n = !1;
714
734
  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();
715
735
  });
716
- let lr = t(() => y.config.selectedBorderColor || "#fbbf24"), ur = t(() => y.config?.edgeLayer !== "below"), dr = t(() => y.config?.highlightEdgeOnTop !== !1), fr = t(() => y.config?.edgeCasingColor || "#0a0e1a"), pr = (e, t) => {
717
- if (!Cr()) {
736
+ let lr = t(() => v.config.selectedBorderColor || "#fbbf24"), ur = t(() => v.config?.edgeLayer !== "below"), dr = t(() => v.config?.highlightEdgeOnTop !== !1), fr = (e, t) => {
737
+ if (!Sr()) {
718
738
  if (t && (t.ctrlKey || t.metaKey)) {
719
739
  let t = z.value.indexOf(e.id);
720
- t >= 0 ? z.value.splice(t, 1) : z.value = cr(z.value, [e.id], or.value);
740
+ t >= 0 ? z.value.splice(t, 1) : z.value = H(z.value, [e.id], sr.value);
721
741
  } else {
722
742
  let t = z.value.length === 1 && z.value[0] === e.id;
723
- z.value = t ? [] : cr([], [e.id], or.value), B.value = [];
743
+ z.value = t ? [] : H([], [e.id], sr.value), B.value = [];
724
744
  }
725
- b("node-click", e), b("node-select", rr(e) ? e : null), V();
745
+ y("node-click", e), y("node-select", ir(e) ? e : null), V();
726
746
  }
727
- }, mr = (e) => {
728
- let t = w.value.find((t) => t.id === e);
729
- if (!t || y.config.enableZOrder === !1) return !1;
730
- let n = t.zIndex ?? 0, r = w.value.filter((e) => (e.zIndex ?? 0) > n);
747
+ }, pr = (e) => {
748
+ let t = S.value.find((t) => t.id === e);
749
+ if (!t || v.config.enableZOrder === !1) return !1;
750
+ let n = t.zIndex ?? 0, r = S.value.filter((e) => (e.zIndex ?? 0) > n);
731
751
  return r.length !== 0 && (t.zIndex = Math.min(...r.map((e) => e.zIndex ?? 0)), !0);
732
- }, hr = (e) => {
733
- let t = w.value.find((t) => t.id === e);
734
- if (!t || y.config.enableZOrder === !1) return !1;
735
- let n = t.zIndex ?? 0, r = w.value.filter((e) => (e.zIndex ?? 0) < n);
752
+ }, mr = (e) => {
753
+ let t = S.value.find((t) => t.id === e);
754
+ if (!t || v.config.enableZOrder === !1) return !1;
755
+ let n = t.zIndex ?? 0, r = S.value.filter((e) => (e.zIndex ?? 0) < n);
736
756
  return r.length !== 0 && (t.zIndex = Math.max(...r.map((e) => e.zIndex ?? 0)), !0);
757
+ }, hr = (e) => {
758
+ let t = S.value.find((t) => t.id === e);
759
+ return !t || v.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.max(...S.value.map((e) => e.zIndex ?? 0), 0) + 1, !0);
737
760
  }, gr = (e) => {
738
- let t = w.value.find((t) => t.id === e);
739
- return !t || y.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.max(...w.value.map((e) => e.zIndex ?? 0), 0) + 1, !0);
740
- }, _r = (e) => {
741
- let t = w.value.find((t) => t.id === e);
742
- return !t || y.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.min(...w.value.map((e) => e.zIndex ?? 0), 0) - 1, !0);
743
- }, vr = () => {
744
- if (!O.value) return;
745
- let e = O.value.cloneNode(!0);
746
- e.querySelectorAll("animate, animateMotion, animateTransform, set").forEach((e) => e.remove()), e.querySelectorAll(".center-crosshair").forEach((e) => e.remove()), e.setAttribute("width", H.value || "800"), e.setAttribute("height", U.value || "600");
761
+ let t = S.value.find((t) => t.id === e);
762
+ return !t || v.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.min(...S.value.map((e) => e.zIndex ?? 0), 0) - 1, !0);
763
+ }, _r = () => {
764
+ if (!E.value) return;
765
+ let e = E.value.cloneNode(!0);
766
+ e.querySelectorAll("animate, animateMotion, animateTransform, set").forEach((e) => e.remove()), e.querySelectorAll(".center-crosshair").forEach((e) => e.remove()), e.setAttribute("width", U.value || "800"), e.setAttribute("height", W.value || "600");
747
767
  let t = new XMLSerializer().serializeToString(e);
748
768
  t = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + t;
749
769
  let n = new Blob([t], { type: "image/svg+xml;charset=utf-8" }), r = URL.createObjectURL(n), i = document.createElement("a");
750
770
  i.href = r, i.download = `topology-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.svg`, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
751
- }, yr = t(() => y.config.selectedLineColor || "#fbbf24"), br = (e, t) => {
752
- if (Cr()) return;
753
- let n = Mn.value[e.id], r = !!(n && n.merged && n.representative), i = r ? M.value.filter((e) => {
754
- let t = Mn.value[e.id];
771
+ }, vr = t(() => v.config.selectedLineColor || "#fbbf24"), yr = (e, t) => {
772
+ if (Sr()) return;
773
+ let n = Fn.value[e.id], r = !!(n && n.merged && n.representative), i = r ? A.value.filter((e) => {
774
+ let t = Fn.value[e.id];
755
775
  return t && t.key === n.key;
756
776
  }) : null, a = r ? i.map((e) => e.id) : [e.id], o = r ? {
757
777
  ...e,
758
778
  bundleEdges: i
759
779
  } : e;
760
- if (t && (t.ctrlKey || t.metaKey)) a.every((e) => B.value.includes(e)) ? B.value = B.value.filter((e) => !a.includes(e)) : B.value = cr(B.value, a, sr.value);
780
+ 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, cr.value);
761
781
  else {
762
782
  let e = a.length === B.value.length && a.every((e) => B.value.includes(e));
763
- B.value = e ? [] : cr([], a, sr.value), z.value = [];
783
+ B.value = e ? [] : H([], a, cr.value), z.value = [];
764
784
  }
765
- b("edge-select", ir(e) ? o : null), V();
766
- }, xr = 0, Sr = (e = 200) => {
767
- xr = performance.now() + e;
768
- }, Cr = () => performance.now() < xr, wr = () => {
769
- z.value = [], B.value = [], b("node-select", null), b("edge-select", null), V();
770
- }, Tr = (e) => {
771
- if (Cr()) return;
785
+ y("edge-select", ar(e) ? o : null), V();
786
+ }, br = 0, xr = (e = 200) => {
787
+ br = performance.now() + e;
788
+ }, Sr = () => performance.now() < br, Cr = () => {
789
+ z.value = [], B.value = [], y("node-select", null), y("edge-select", null), V();
790
+ }, wr = (e) => {
791
+ if (Sr()) return;
772
792
  let t = e.target;
773
- t && t.closest && (t.closest(".topology-node") || t.closest(".node-resize-layer") || t.closest(".node-handles")) || wr();
774
- }, Er = f({
793
+ t && t.closest && (t.closest(".topology-node") || t.closest(".node-resize-layer") || t.closest(".node-handles")) || Cr();
794
+ }, Tr = f({
775
795
  width: 1e3,
776
796
  height: 650
777
- }), Dr = f(1), Or = f(0), kr = f(0), Ar = t(() => -Mr.value / 2 + Or.value), jr = t(() => -Nr.value / 2 + kr.value), Mr = t(() => y.width ?? Er.value.width), Nr = t(() => y.height ?? Er.value.height), Pr = null;
797
+ }), Er = f(1), Dr = f(0), Or = f(0), kr = t(() => -jr.value / 2 + Dr.value), Ar = t(() => -Mr.value / 2 + Or.value), jr = t(() => v.width ?? Tr.value.width), Mr = t(() => v.height ?? Tr.value.height), Nr = null;
778
798
  u(() => {
779
- let e = O.value;
799
+ let e = E.value;
780
800
  if (e) {
781
801
  let t = e.getBoundingClientRect();
782
- t.width > 0 && t.height > 0 && (Er.value = {
802
+ t.width > 0 && t.height > 0 && (Tr.value = {
783
803
  width: t.width,
784
804
  height: t.height
785
805
  });
786
806
  }
787
- e && typeof ResizeObserver < "u" && (Pr = new ResizeObserver(() => {
807
+ e && typeof ResizeObserver < "u" && (Nr = new ResizeObserver(() => {
788
808
  let t = e.getBoundingClientRect();
789
- t.width > 0 && t.height > 0 && (Er.value = {
809
+ t.width > 0 && t.height > 0 && (Tr.value = {
790
810
  width: t.width,
791
811
  height: t.height
792
812
  });
793
- }), Pr.observe(e));
813
+ }), Nr.observe(e));
794
814
  }), l(() => {
795
- Pr &&= (Pr.disconnect(), null), xi &&= (cancelAnimationFrame(xi), 0), q &&= (cancelAnimationFrame(q), 0), zi &&= (cancelAnimationFrame(zi), 0), Ki(), $r();
815
+ Nr &&= (Nr.disconnect(), null), Oi &&= (cancelAnimationFrame(Oi), 0), qr &&= (cancelAnimationFrame(qr), 0), Z &&= (cancelAnimationFrame(Z), 0), Qi(), $r();
796
816
  });
797
- let H = t(() => Mr.value / Dr.value), U = t(() => Nr.value / Dr.value), Fr = t(() => ({
798
- x0: Ar.value - Ut,
799
- y0: jr.value - Ut,
800
- x1: Ar.value + H.value + Ut,
801
- y1: jr.value + U.value + Ut
802
- })), Ir = t(() => {
803
- let e = Fr.value, t = w.value.filter((t) => {
817
+ let U = t(() => jr.value / Er.value), W = t(() => Mr.value / Er.value), Pr = t(() => ({
818
+ x0: kr.value - Gt,
819
+ y0: Ar.value - Gt,
820
+ x1: kr.value + U.value + Gt,
821
+ y1: Ar.value + W.value + Gt
822
+ })), Fr = t(() => {
823
+ let e = Pr.value, t = S.value.filter((t) => {
804
824
  let { w: n, h: r } = I(t);
805
825
  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;
806
826
  });
807
- return y.config.enableZOrder !== !1 && t.sort((e, t) => (e.zIndex ?? 0) - (t.zIndex ?? 0)), t;
808
- }), W = t(() => {
809
- let e = Fr.value;
810
- return M.value.filter((t) => {
811
- if (!ca(t)) return !1;
812
- let n = P(t.from), r = P(t.to);
827
+ return v.config.enableZOrder !== !1 && t.sort((e, t) => (e.zIndex ?? 0) - (t.zIndex ?? 0)), t;
828
+ }), G = t(() => {
829
+ let e = Pr.value;
830
+ return A.value.filter((t) => {
831
+ if (!ma(t)) return !1;
832
+ let n = M(t.from), r = M(t.to);
813
833
  if (!n || !r) return !1;
814
834
  let i = I(n).w / 2, a = I(n).h / 2, o = I(r).w / 2, s = I(r).h / 2;
815
- return Math.min(n.x - i, r.x - o) - Wt <= e.x1 && Math.max(n.x + i, r.x + o) + Wt >= e.x0 && Math.min(n.y - a, r.y - s) - Wt <= e.y1 && Math.max(n.y + a, r.y + s) + Wt >= e.y0;
835
+ return Math.min(n.x - i, r.x - o) - Kt <= e.x1 && Math.max(n.x + i, r.x + o) + Kt >= e.x0 && Math.min(n.y - a, r.y - s) - Kt <= e.y1 && Math.max(n.y + a, r.y + s) + Kt >= e.y0;
816
836
  });
817
- }), Lr = (e) => {
818
- if (y.config.enableZoom === !1) return;
837
+ }), Ir = (e) => {
838
+ if (v.config.enableZoom === !1) return;
819
839
  e.preventDefault();
820
- let t = O.value.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = n / t.width, a = r / t.height, o = H.value, s = U.value, c = e.deltaY > 0 ? .9 : 1.1, l = Math.min(Ht, Math.max(Vt, Dr.value * c)), u = Mr.value / l, d = Nr.value / l;
821
- Or.value += (o - u) * i, kr.value += (s - d) * a, Dr.value = l;
822
- }, G = f(null), K = f(null), Rr = (e) => {
823
- let t = O.value, n = t ? t.getBoundingClientRect() : null;
824
- G.value = {
840
+ let t = E.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(Wt, Math.max(Ut, Er.value * c)), u = jr.value / l, d = Mr.value / l;
841
+ Dr.value += (o - u) * i, Or.value += (s - d) * a, Er.value = l;
842
+ }, K = f(null), q = f(null), Lr = (e) => {
843
+ let t = E.value, n = t ? t.getBoundingClientRect() : null;
844
+ K.value = {
825
845
  startX: e.clientX,
826
846
  startY: e.clientY,
827
847
  lastX: e.clientX,
@@ -830,8 +850,8 @@ var x = {
830
850
  rectWidth: n && n.width ? n.width : 0,
831
851
  rectHeight: n && n.height ? n.height : 0
832
852
  }, Qr();
833
- }, zr = (e) => {
834
- let t = G.value, n = O.value;
853
+ }, Rr = (e) => {
854
+ let t = K.value, n = E.value;
835
855
  if (!t || !n) return;
836
856
  let r = t.rectWidth, i = t.rectHeight;
837
857
  if (!r || !i) return;
@@ -841,13 +861,13 @@ var x = {
841
861
  return;
842
862
  }
843
863
  let a = e.clientX - t.lastX, o = e.clientY - t.lastY;
844
- t.lastX = e.clientX, t.lastY = e.clientY, Or.value -= a * (H.value / r), kr.value -= o * (U.value / i);
845
- }, Br = () => {
846
- let e = G.value;
847
- G.value = null, e && e.moved && Sr(), ei();
848
- }, Vr = (e) => {
849
- let t = Z(e);
850
- K.value = {
864
+ t.lastX = e.clientX, t.lastY = e.clientY, Dr.value -= a * (U.value / r), Or.value -= o * (W.value / i);
865
+ }, zr = () => {
866
+ let e = K.value;
867
+ K.value = null, e && e.moved && xr(), ei();
868
+ }, Br = (e) => {
869
+ let t = X(e);
870
+ q.value = {
851
871
  start: {
852
872
  x: t.x,
853
873
  y: t.y
@@ -860,16 +880,16 @@ var x = {
860
880
  startClientY: e.clientY,
861
881
  moved: !1
862
882
  }, Qr();
863
- }, Hr = (e) => {
864
- let t = K.value;
883
+ }, Vr = (e) => {
884
+ let t = q.value;
865
885
  if (!t) return;
866
- let n = Z(e);
886
+ let n = X(e);
867
887
  t.current = {
868
888
  x: n.x,
869
889
  y: n.y
870
890
  }, !t.moved && Math.hypot(e.clientX - t.startClientX, e.clientY - t.startClientY) > 3 && (t.moved = !0);
871
- }, Ur = t(() => {
872
- let e = K.value;
891
+ }, Hr = t(() => {
892
+ let e = q.value;
873
893
  return e ? {
874
894
  x: Math.min(e.start.x, e.current.x),
875
895
  y: Math.min(e.start.y, e.current.y),
@@ -881,63 +901,63 @@ var x = {
881
901
  width: 0,
882
902
  height: 0
883
903
  };
884
- }), Wr = () => {
885
- let e = K.value;
886
- if (K.value = null, e && e.moved) {
904
+ }), Ur = () => {
905
+ let e = q.value;
906
+ if (q.value = null, e && e.moved) {
887
907
  let t = {
888
908
  x: Math.min(e.start.x, e.current.x),
889
909
  y: Math.min(e.start.y, e.current.y),
890
910
  w: Math.abs(e.current.x - e.start.x),
891
911
  h: Math.abs(e.current.y - e.start.y)
892
- }, n = w.value.filter((e) => {
912
+ }, n = S.value.filter((e) => {
893
913
  let n = L(e), r = e.x + n.x, i = e.y + n.y;
894
914
  return !(r + n.width < t.x || r > t.x + t.w || i + n.height < t.y || i > t.y + t.h);
895
915
  });
896
- n.length && (z.value = cr(z.value, n.map((e) => e.id), or.value), V()), Sr();
916
+ n.length && (z.value = H(z.value, n.map((e) => e.id), sr.value), V()), xr();
897
917
  }
898
918
  ei();
899
- }, Gr = (e) => !e || typeof e.closest != "function" ? !1 : !!(e.closest(".topology-node") || e.closest(".node-handles") || e.closest(".node-resize-layer")), Kr = (e) => {
900
- if (O.value) {
919
+ }, Wr = (e) => !e || typeof e.closest != "function" ? !1 : !!(e.closest(".topology-node") || e.closest(".node-handles") || e.closest(".node-resize-layer")), Gr = (e) => {
920
+ if (E.value) {
901
921
  if (e.button === 1) {
902
- if (y.config.enablePan === !1) return;
903
- e.preventDefault(), Rr(e);
922
+ if (v.config.enablePan === !1) return;
923
+ e.preventDefault(), Lr(e);
904
924
  return;
905
925
  }
906
- if (e.button === 0 && !Gr(e.target)) {
926
+ if (e.button === 0 && !Wr(e.target)) {
907
927
  if (e.ctrlKey || e.metaKey) {
908
- if (y.config.enableMarquee === !1) return;
909
- e.preventDefault(), Vr(e);
928
+ if (v.config.enableMarquee === !1) return;
929
+ e.preventDefault(), Br(e);
910
930
  return;
911
931
  }
912
- y.config.enablePan !== !1 && (e.preventDefault(), Rr(e));
932
+ v.config.enablePan !== !1 && (e.preventDefault(), Lr(e));
913
933
  }
914
934
  }
915
- }, qr = !1, q = 0, Jr = null, Yr = () => {
916
- q = 0;
935
+ }, Kr = !1, qr = 0, Jr = null, Yr = () => {
936
+ qr = 0;
917
937
  let e = Jr;
918
- Jr = null, e && (G.value ? zr(e) : K.value && Hr(e));
938
+ Jr = null, e && (K.value ? Rr(e) : q.value && Vr(e));
919
939
  }, Xr = (e) => {
920
- Jr = e, q ||= requestAnimationFrame(Yr);
940
+ Jr = e, qr ||= requestAnimationFrame(Yr);
921
941
  }, Zr = () => {
922
- q && (cancelAnimationFrame(q), Yr()), G.value && Br(), K.value && Wr();
942
+ qr && (cancelAnimationFrame(qr), Yr()), K.value && zr(), q.value && Ur();
923
943
  }, Qr = () => {
924
- qr || (qr = !0, window.addEventListener("mousemove", Xr, !0), window.addEventListener("mouseup", Zr, !0));
944
+ Kr || (Kr = !0, window.addEventListener("mousemove", Xr, !0), window.addEventListener("mouseup", Zr, !0));
925
945
  }, $r = () => {
926
- qr && (qr = !1, window.removeEventListener("mousemove", Xr, !0), window.removeEventListener("mouseup", Zr, !0));
946
+ Kr && (Kr = !1, window.removeEventListener("mousemove", Xr, !0), window.removeEventListener("mouseup", Zr, !0));
927
947
  }, ei = () => {
928
- !G.value && !K.value && $r();
948
+ !K.value && !q.value && $r();
929
949
  }, ti = t(() => {
930
- if (Y.value && Y.value.side) return { cursor: ki(Y.value.side) };
931
- if (K.value) return { cursor: "crosshair" };
932
- if (G.value && G.value.moved) return { cursor: "grabbing" };
933
- }), ni = t(() => y.config.showGrid !== !1), ri = t(() => y.config.gridColor || "#1a2240"), ii = t(() => {
934
- let e = Number(y.config.gridStep);
935
- return (Number.isFinite(e) && e > 0 ? e : 40) / Dr.value;
950
+ if (J.value && J.value.side) return { cursor: Ii(J.value.side) };
951
+ if (q.value) return { cursor: "crosshair" };
952
+ if (K.value && K.value.moved) return { cursor: "grabbing" };
953
+ }), ni = t(() => v.config.showGrid !== !1), ri = t(() => v.config.gridColor || "#1a2240"), ii = t(() => {
954
+ let e = Number(v.config.gridStep);
955
+ return (Number.isFinite(e) && e > 0 ? e : 40) / Er.value;
936
956
  }), ai = t(() => {
937
- let e = Number(y.config.gridOpacity);
957
+ let e = Number(v.config.gridOpacity);
938
958
  return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .5;
939
959
  }), oi = t(() => {
940
- let e = y.config.radialGradient && typeof y.config.radialGradient == "object" ? y.config.radialGradient : {}, t = Array.isArray(e.stops) && e.stops.length ? e.stops.filter((e) => e && e.color).map((e, t) => ({
960
+ 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) => ({
941
961
  offset: e.offset == null ? t === 0 ? "0%" : "100%" : e.offset,
942
962
  color: e.color,
943
963
  opacity: e.opacity
@@ -956,99 +976,109 @@ var x = {
956
976
  r: e.r || "60%",
957
977
  stops: n
958
978
  };
959
- }), si = t(() => y.config.showCenterPoint === !0), ci = t(() => y.config.showEdgeTextBg === !0), li = t(() => y.config.edgeTextBgColor || "#0a0e1a"), ui = t(() => y.config.showNodeHandles === !0), di = t(() => y.config.showStatusDot !== !1), fi = (e, t) => {
979
+ }), si = t(() => v.config.showCenterPoint === !0), ci = t(() => v.config.showEdgeTextBg === !0), li = t(() => v.config.edgeTextBgColor || "#0a0e1a"), ui = t(() => {
980
+ let e = Number(v.config.edgeTextBgOpacity);
981
+ return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .92;
982
+ }), di = t(() => v.config.edgeColor || v.config.defaultEdgeColor || null), fi = t(() => v.config.edgeBaseColor || null), pi = (e) => e.baseColor ? e.baseColor : fi.value ? fi.value : e.color || di.value ? Q(e) : "#1a2744", mi = (e) => {
983
+ let t = e.baseDimOpacity ?? v.config.edgeBaseDimOpacity;
984
+ if (t != null) {
985
+ let e = Number(t);
986
+ return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 1;
987
+ }
988
+ return yi.value === "none" || Si(e) === "none" ? 1 : .45;
989
+ }, hi = t(() => v.config.edgeCenterTextColor || null), gi = t(() => v.config.showNodeHandles === !0), _i = t(() => v.config.showStatusDot !== !1), vi = (e, t) => {
960
990
  let n = Number(e);
961
991
  return Number.isFinite(n) && n >= 0 ? n : t;
962
- }, pi = t(() => {
963
- let e = y.config.motionFx ?? y.config.fx;
992
+ }, yi = t(() => {
993
+ let e = v.config.motionFx ?? v.config.fx;
964
994
  return typeof e == "boolean" ? e ? "all" : "none" : [
965
995
  "none",
966
996
  "flow",
967
997
  "particle",
968
998
  "all"
969
- ].includes(e) ? e : M.value.length <= fi(y.config.fxMotionMaxEdges, 200) ? "all" : "none";
970
- }), mi = t(() => {
971
- let e = y.config.glowFx ?? y.config.fx;
972
- return typeof e == "boolean" ? e : M.value.length <= fi(y.config.fxGlowMaxEdges, 500);
973
- }), hi = t(() => {
974
- let e = y.config.breatheFx ?? y.config.fx;
975
- return typeof e == "boolean" ? e : w.value.length <= fi(y.config.fxBreatheMaxNodes, 300);
976
- }), gi = (e) => {
999
+ ].includes(e) ? e : A.value.length <= vi(v.config.fxMotionMaxEdges, 200) ? "all" : "none";
1000
+ }), bi = t(() => {
1001
+ let e = v.config.glowFx ?? v.config.fx;
1002
+ return typeof e == "boolean" ? e : A.value.length <= vi(v.config.fxGlowMaxEdges, 500);
1003
+ }), xi = t(() => {
1004
+ let e = v.config.breatheFx ?? v.config.fx;
1005
+ return typeof e == "boolean" ? e : S.value.length <= vi(v.config.fxBreatheMaxNodes, 300);
1006
+ }), Si = (e) => {
977
1007
  if (e.animatedMode !== void 0) {
978
1008
  let t = e.animatedMode;
979
- return !t || t === "all" ? pi.value : t === "none" ? "none" : t;
1009
+ return !t || t === "all" ? yi.value : t === "none" ? "none" : t;
980
1010
  }
981
- return e.animated === void 0 || e.animated ? pi.value : "none";
982
- }, _i = (e) => e.borderColor || F(e) || "#94a3b8", vi = (e) => e.borderWidth || 0, yi = (e) => e.borderStyle === "dashed" ? "8 5" : void 0, J = (e) => {
1011
+ return e.animated === void 0 || e.animated ? yi.value : "none";
1012
+ }, Ci = (e) => e.borderColor || N(e) || "#94a3b8", wi = (e) => e.borderWidth || 0, Ti = (e) => e.borderStyle === "dashed" ? "8 5" : void 0, Ei = (e) => {
983
1013
  let t = e.borderRadius;
984
1014
  if (t == null || t === "") return 6;
985
1015
  let n = Number(t);
986
1016
  return Number.isFinite(n) && n >= 0 ? n : 6;
987
- }, bi = (e, t) => {
988
- if (e.button !== 0 || !y.editable || y.config.nodeDraggable === !1) return;
1017
+ }, Di = (e, t) => {
1018
+ if (e.button !== 0 || !v.editable || v.config.nodeDraggable === !1) return;
989
1019
  e.stopPropagation();
990
- let n = P(t), r = Z(e);
991
- if (an.value = {
1020
+ let n = M(t), r = X(e);
1021
+ if (cn.value = {
992
1022
  x: r.x - n.x,
993
1023
  y: r.y - n.y
994
- }, sn = {
1024
+ }, un = {
995
1025
  x: e.clientX,
996
1026
  y: e.clientY
997
- }, cn = !1, ln = !!(e.ctrlKey || e.metaKey), z.value.length > 1 && z.value.includes(t)) {
1027
+ }, dn = !1, fn = !!(e.ctrlKey || e.metaKey), z.value.length > 1 && z.value.includes(t)) {
998
1028
  let e = {};
999
1029
  z.value.forEach((t) => {
1000
- let n = P(t);
1030
+ let n = M(t);
1001
1031
  n && (e[t] = {
1002
1032
  x: n.x,
1003
1033
  y: n.y
1004
1034
  });
1005
- }), on.value = {
1035
+ }), ln.value = {
1006
1036
  origins: e,
1007
1037
  start: {
1008
1038
  x: r.x,
1009
1039
  y: r.y
1010
1040
  }
1011
1041
  };
1012
- } else on.value = null;
1013
- D.value = t, b("node-drag-start", n);
1014
- }, xi = 0, Si = null, Ci = () => {
1015
- xi = 0;
1016
- let e = Si;
1017
- Si = null, e && Ti(e);
1018
- }, wi = (e) => {
1019
- (Y.value || D.value) && (Si = {
1042
+ } else ln.value = null;
1043
+ T.value = t, y("node-drag-start", n);
1044
+ }, Oi = 0, ki = null, Ai = () => {
1045
+ Oi = 0;
1046
+ let e = ki;
1047
+ ki = null, e && Mi(e);
1048
+ }, ji = (e) => {
1049
+ (J.value || T.value) && (ki = {
1020
1050
  clientX: e.clientX,
1021
1051
  clientY: e.clientY
1022
- }, xi ||= requestAnimationFrame(Ci));
1023
- }, Ti = (e) => {
1024
- if (Y.value) {
1025
- ji(e);
1052
+ }, Oi ||= requestAnimationFrame(Ai));
1053
+ }, Mi = (e) => {
1054
+ if (J.value) {
1055
+ Ri(e);
1026
1056
  return;
1027
1057
  }
1028
- if (!D.value) return;
1029
- let t = Z(e);
1030
- !cn && sn && Math.hypot(e.clientX - sn.x, e.clientY - sn.y) > Bt && (cn = !0, !ln && !z.value.includes(D.value) && (z.value = cr([], [D.value], or.value), B.value = [], b("node-select", z.value.includes(D.value) ? P(D.value) : null), V()));
1031
- let n = on.value;
1058
+ if (!T.value) return;
1059
+ let t = X(e);
1060
+ !dn && un && Math.hypot(e.clientX - un.x, e.clientY - un.y) > Ht && (dn = !0, !fn && !z.value.includes(T.value) && (z.value = H([], [T.value], sr.value), B.value = [], y("node-select", z.value.includes(T.value) ? M(T.value) : null), V()));
1061
+ let n = ln.value;
1032
1062
  if (n) {
1033
1063
  let e = t.x - n.start.x, r = t.y - n.start.y;
1034
- w.value = w.value.map((t) => n.origins[t.id] ? {
1064
+ S.value = S.value.map((t) => n.origins[t.id] ? {
1035
1065
  ...t,
1036
1066
  x: n.origins[t.id].x + e,
1037
1067
  y: n.origins[t.id].y + r
1038
1068
  } : t);
1039
- } else w.value = w.value.map((e) => e.id === D.value ? {
1069
+ } else S.value = S.value.map((e) => e.id === T.value ? {
1040
1070
  ...e,
1041
- x: t.x - an.value.x,
1042
- y: t.y - an.value.y
1071
+ x: t.x - cn.value.x,
1072
+ y: t.y - cn.value.y
1043
1073
  } : e);
1044
- T();
1045
- }, Ei = () => {
1046
- if (xi && (cancelAnimationFrame(xi), Ci()), Y.value) {
1047
- Mi();
1074
+ C();
1075
+ }, Ni = () => {
1076
+ if (Oi && (cancelAnimationFrame(Oi), Ai()), J.value) {
1077
+ zi();
1048
1078
  return;
1049
1079
  }
1050
- D.value && (cn && Sr(), D.value = null, on.value = null, sn = null, cn = !1, b("node-drag-end"));
1051
- }, Y = f(null), Di = (e, t, n) => Math.min(n, Math.max(t, e)), Oi = (e) => {
1080
+ T.value && (dn && xr(), T.value = null, ln.value = null, un = null, dn = !1, y("node-drag-end"));
1081
+ }, J = f(null), Pi = (e, t, n) => Math.min(n, Math.max(t, e)), Fi = (e) => {
1052
1082
  let t = L(e), n = t.x, r = t.y, i = t.x + t.width, a = t.y + t.height;
1053
1083
  return [
1054
1084
  {
@@ -1092,46 +1122,46 @@ var x = {
1092
1122
  y: 0
1093
1123
  }
1094
1124
  ];
1095
- }, ki = (e) => e === "nw" || e === "se" ? "nwse-resize" : e === "ne" || e === "sw" ? "nesw-resize" : e === "n" || e === "s" ? "ns-resize" : "ew-resize", Ai = (e, t, n) => {
1096
- if (!y.editable || y.config.nodeResizable === !1 || !t) return;
1125
+ }, Ii = (e) => e === "nw" || e === "se" ? "nwse-resize" : e === "ne" || e === "sw" ? "nesw-resize" : e === "n" || e === "s" ? "ns-resize" : "ew-resize", Li = (e, t, n) => {
1126
+ if (!v.editable || v.config.nodeResizable === !1 || !t) return;
1097
1127
  let { w: r, h: i } = I(t);
1098
- Y.value = {
1128
+ J.value = {
1099
1129
  id: t.id,
1100
1130
  side: n,
1101
1131
  anchorX: n.includes("e") ? t.x - r / 2 : n.includes("w") ? t.x + r / 2 : null,
1102
1132
  anchorY: n.includes("s") ? t.y - i / 2 : n.includes("n") ? t.y + i / 2 : null,
1103
1133
  startW: r,
1104
1134
  startH: i
1105
- }, b("node-resize-start", t);
1106
- }, ji = (e) => {
1107
- let t = Y.value;
1135
+ }, y("node-resize-start", t);
1136
+ }, Ri = (e) => {
1137
+ let t = J.value;
1108
1138
  if (!t) return;
1109
- let n = P(t.id);
1139
+ let n = M(t.id);
1110
1140
  if (!n) return;
1111
- let r = Z(e), i = t.startW, a = t.startH, o = n.x, s = n.y;
1141
+ let r = X(e), i = t.startW, a = t.startH, o = n.x, s = n.y;
1112
1142
  if (t.anchorX !== null) {
1113
1143
  let e = t.side.includes("e");
1114
- i = Di(e ? r.x - t.anchorX : t.anchorX - r.x, Gt, Kt), o = e ? t.anchorX + i / 2 : t.anchorX - i / 2;
1144
+ i = Pi(e ? r.x - t.anchorX : t.anchorX - r.x, qt, Jt), o = e ? t.anchorX + i / 2 : t.anchorX - i / 2;
1115
1145
  }
1116
1146
  if (t.anchorY !== null) {
1117
1147
  let e = t.side.includes("s");
1118
- a = Di(e ? r.y - t.anchorY : t.anchorY - r.y, qt, Jt), s = e ? t.anchorY + a / 2 : t.anchorY - a / 2;
1148
+ a = Pi(e ? r.y - t.anchorY : t.anchorY - r.y, Yt, Xt), s = e ? t.anchorY + a / 2 : t.anchorY - a / 2;
1119
1149
  }
1120
- w.value = w.value.map((e) => e.id === t.id ? {
1150
+ S.value = S.value.map((e) => e.id === t.id ? {
1121
1151
  ...e,
1122
1152
  x: o,
1123
1153
  y: s,
1124
1154
  width: i,
1125
1155
  height: a
1126
- } : e), T();
1127
- }, Mi = () => {
1128
- let e = Y.value;
1129
- Y.value = null, e && (Sr(), b("node-resize-end", P(e.id) || null));
1130
- }, Ni = t(() => y.editable && y.config.nodeResizable !== !1), Pi = t(() => {
1131
- if (!Ni.value) return null;
1156
+ } : e), C();
1157
+ }, zi = () => {
1158
+ let e = J.value;
1159
+ J.value = null, e && (xr(), y("node-resize-end", M(e.id) || null));
1160
+ }, Bi = t(() => v.editable && v.config.nodeResizable !== !1), Vi = t(() => {
1161
+ if (!Bi.value) return null;
1132
1162
  let e = z.value;
1133
- return e.length === 1 && P(e[0]) || null;
1134
- }), X = f(null), Fi = (e) => {
1163
+ return e.length === 1 && M(e[0]) || null;
1164
+ }), Y = f(null), Hi = (e) => {
1135
1165
  let t = L(e);
1136
1166
  return [
1137
1167
  {
@@ -1155,8 +1185,8 @@ var x = {
1155
1185
  y: 0
1156
1186
  }
1157
1187
  ];
1158
- }, Ii = (e, t) => {
1159
- let n = O.value;
1188
+ }, Ui = (e, t) => {
1189
+ let n = E.value;
1160
1190
  if (!n) return null;
1161
1191
  let r = e, i = t;
1162
1192
  if (e && typeof e == "object" && (r = e.clientX, i = e.clientY), r == null || i == null) return null;
@@ -1169,8 +1199,8 @@ var x = {
1169
1199
  x: s.x,
1170
1200
  y: s.y
1171
1201
  };
1172
- }, Li = (e, t) => {
1173
- let n = O.value;
1202
+ }, Wi = (e, t) => {
1203
+ let n = E.value;
1174
1204
  if (!n) return null;
1175
1205
  let r = n.createSVGPoint();
1176
1206
  r.x = Number(e) || 0, r.y = Number(t) || 0;
@@ -1181,14 +1211,14 @@ var x = {
1181
1211
  x: a.x,
1182
1212
  y: a.y
1183
1213
  };
1184
- }, Z = (e) => Ii(e) ?? {
1214
+ }, X = (e) => Ui(e) ?? {
1185
1215
  x: 0,
1186
1216
  y: 0
1187
- }, Ri = (e, t, n) => {
1188
- let r = P(t);
1189
- if (!r || !O.value) return;
1190
- let i = Z(e);
1191
- X.value = {
1217
+ }, Gi = (e, t, n) => {
1218
+ let r = M(t);
1219
+ if (!r || !E.value) return;
1220
+ let i = X(e);
1221
+ Y.value = {
1192
1222
  fromId: t,
1193
1223
  side: n.side,
1194
1224
  ax: r.x + n.x,
@@ -1200,24 +1230,24 @@ var x = {
1200
1230
  try {
1201
1231
  e.target.setPointerCapture?.(e.pointerId);
1202
1232
  } catch {}
1203
- Gi();
1204
- }, zi = 0, Bi = null, Vi = () => {
1205
- zi = 0;
1206
- let e = Bi;
1207
- Bi = null, e && X.value && Ji(e);
1208
- }, Hi = (e) => {
1209
- X.value && (Bi = {
1233
+ Zi();
1234
+ }, Z = 0, Ki = null, qi = () => {
1235
+ Z = 0;
1236
+ let e = Ki;
1237
+ Ki = null, e && Y.value && ea(e);
1238
+ }, Ji = (e) => {
1239
+ Y.value && (Ki = {
1210
1240
  clientX: e.clientX,
1211
1241
  clientY: e.clientY
1212
- }, zi ||= requestAnimationFrame(Vi));
1213
- }, Ui = () => {
1214
- zi && (cancelAnimationFrame(zi), Vi()), X.value && Yi();
1215
- }, Wi = !1, Gi = () => {
1216
- Wi || (Wi = !0, window.addEventListener("mousemove", Hi, !0), window.addEventListener("mouseup", Ui, !0));
1217
- }, Ki = () => {
1218
- Wi && (Wi = !1, window.removeEventListener("mousemove", Hi, !0), window.removeEventListener("mouseup", Ui, !0));
1219
- }, qi = (e, t, n) => {
1220
- let r = w.value;
1242
+ }, Z ||= requestAnimationFrame(qi));
1243
+ }, Yi = () => {
1244
+ Z && (cancelAnimationFrame(Z), qi()), Y.value && ta();
1245
+ }, Xi = !1, Zi = () => {
1246
+ Xi || (Xi = !0, window.addEventListener("mousemove", Ji, !0), window.addEventListener("mouseup", Yi, !0));
1247
+ }, Qi = () => {
1248
+ Xi && (Xi = !1, window.removeEventListener("mousemove", Ji, !0), window.removeEventListener("mouseup", Yi, !0));
1249
+ }, $i = (e, t, n) => {
1250
+ let r = S.value;
1221
1251
  for (let i = r.length - 1; i >= 0; i--) {
1222
1252
  let a = r[i];
1223
1253
  if (a.id === n) continue;
@@ -1225,27 +1255,27 @@ var x = {
1225
1255
  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;
1226
1256
  }
1227
1257
  return null;
1228
- }, Ji = (e) => {
1229
- let t = X.value;
1258
+ }, ea = (e) => {
1259
+ let t = Y.value;
1230
1260
  if (!t) return;
1231
- let n = Z(e);
1261
+ let n = X(e);
1232
1262
  t.px = n.x, t.py = n.y;
1233
- let r = qi(n.x, n.y, t.fromId);
1263
+ let r = $i(n.x, n.y, t.fromId);
1234
1264
  t.overId = r ? r.id : null;
1235
- }, Yi = () => {
1236
- Ki();
1237
- let e = X.value;
1238
- if (X.value = null, !e || !e.overId || e.overId === e.fromId) return;
1265
+ }, ta = () => {
1266
+ Qi();
1267
+ let e = Y.value;
1268
+ if (Y.value = null, !e || !e.overId || e.overId === e.fromId) return;
1239
1269
  let t = {
1240
- id: `${ie()}`,
1270
+ id: `${ae()}`,
1241
1271
  from: e.fromId,
1242
1272
  to: e.overId,
1243
1273
  speed: 1,
1244
1274
  fromAnchor: "edge",
1245
1275
  toAnchor: "edge"
1246
1276
  };
1247
- k.value.push(t), b("edge-create", t);
1248
- }, Xi = (e, t, n) => {
1277
+ D.value.push(t), y("edge-create", t);
1278
+ }, na = (e, t, n) => {
1249
1279
  let r = e.x, i = e.y, a = t.x - r, o = t.y - i, { w: s, h: c } = I(e);
1250
1280
  if (!n || n === "center" || a === 0 && o === 0) return {
1251
1281
  x: r,
@@ -1256,23 +1286,23 @@ var x = {
1256
1286
  x: r + a * p,
1257
1287
  y: i + o * p
1258
1288
  };
1259
- }, Zi = t(() => {
1289
+ }, ra = t(() => {
1260
1290
  let e = /* @__PURE__ */ new Map();
1261
- M.value.forEach((t) => {
1262
- let n = Mn.value[t.id];
1291
+ A.value.forEach((t) => {
1292
+ let n = Fn.value[t.id];
1263
1293
  n && !n.hidden && (e.has(n.key) || e.set(n.key, []), e.get(n.key).push(t));
1264
1294
  });
1265
1295
  let t = {};
1266
1296
  return e.forEach((e, n) => {
1267
- let [r, i] = n.split("__"), a = P(r), o = P(i);
1297
+ let [r, i] = n.split("__"), a = M(r), o = M(i);
1268
1298
  if (!a || !o) return;
1269
- 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, h = zt;
1299
+ 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, h = Vt;
1270
1300
  if (m > 1) {
1271
- let e = (m - 1) / 2 * zt, t = (e) => {
1301
+ let e = (m - 1) / 2 * Vt, t = (e) => {
1272
1302
  let { w: t, h: n } = I(e);
1273
1303
  return Math.max(4, (Math.abs(f) * t + Math.abs(p) * n) / 2 - 6);
1274
1304
  }, n = Math.min(1, t(a) / e, t(o) / e);
1275
- h = zt * Math.max(.35, n);
1305
+ h = Vt * Math.max(.35, n);
1276
1306
  }
1277
1307
  let ee = {};
1278
1308
  e.forEach((e, t) => {
@@ -1288,12 +1318,12 @@ var x = {
1288
1318
  bulge: Math.min(l * .15, 50)
1289
1319
  };
1290
1320
  }), t;
1291
- }), Qi = (e) => {
1292
- let t = Mn.value[e.id], n = t && Zi.value[t.key];
1321
+ }), ia = (e) => {
1322
+ let t = Fn.value[e.id], n = t && ra.value[t.key];
1293
1323
  if (!n) return null;
1294
- let r = P(e.from), i = P(e.to);
1324
+ let r = M(e.from), i = M(e.to);
1295
1325
  if (!r || !i) return null;
1296
- let a = n.slots[e.id] || 0, o = a * n.gap, s = Xi(r, i, e.fromAnchor), c = Xi(i, r, e.toAnchor);
1326
+ let a = n.slots[e.id] || 0, o = a * n.gap, s = na(r, i, e.fromAnchor), c = na(i, r, e.toAnchor);
1297
1327
  return {
1298
1328
  frame: n,
1299
1329
  slot: a,
@@ -1306,12 +1336,12 @@ var x = {
1306
1336
  y: c.y + n.ny * o
1307
1337
  }
1308
1338
  };
1309
- }, $i = (e) => {
1310
- let t = Qi(e);
1339
+ }, aa = (e) => {
1340
+ let t = ia(e);
1311
1341
  if (!t) return "";
1312
1342
  let { from: n, to: r, frame: i, slot: a } = t, o = a * i.gap;
1313
- if (E.value === "straight") return `M ${n.x} ${n.y} L ${r.x} ${r.y}`;
1314
- if (E.value === "polyline") {
1343
+ if (w.value === "straight") return `M ${n.x} ${n.y} L ${r.x} ${r.y}`;
1344
+ if (w.value === "polyline") {
1315
1345
  if (i.dominant === "v") {
1316
1346
  let e = (n.y + r.y) / 2 + o;
1317
1347
  return `M ${n.x} ${n.y} L ${n.x} ${e} L ${r.x} ${e} L ${r.x} ${r.y}`;
@@ -1321,18 +1351,18 @@ var x = {
1321
1351
  }
1322
1352
  let s = (n.x + r.x) / 2 + i.nx * i.bulge, c = (n.y + r.y) / 2 + i.ny * i.bulge;
1323
1353
  return `M ${n.x} ${n.y} Q ${s} ${c} ${r.x} ${r.y}`;
1324
- }, ea = (e, t) => {
1325
- let n = Qi(e);
1354
+ }, oa = (e, t) => {
1355
+ let n = ia(e);
1326
1356
  if (!n) return {
1327
1357
  x: 0,
1328
1358
  y: 0
1329
1359
  };
1330
1360
  let { from: r, to: i, frame: a, slot: o } = n, s = o * a.gap;
1331
- if (E.value === "straight") return {
1361
+ if (w.value === "straight") return {
1332
1362
  x: r.x + (i.x - r.x) * t,
1333
1363
  y: r.y + (i.y - r.y) * t
1334
1364
  };
1335
- if (E.value === "polyline") {
1365
+ if (w.value === "polyline") {
1336
1366
  if (a.dominant === "v") {
1337
1367
  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);
1338
1368
  return c <= n ? {
@@ -1363,19 +1393,19 @@ var x = {
1363
1393
  x: (1 - t) * (1 - t) * r.x + 2 * (1 - t) * t * c + t * t * i.x,
1364
1394
  y: (1 - t) * (1 - t) * r.y + 2 * (1 - t) * t * l + t * t * i.y
1365
1395
  };
1366
- }, ta = t(() => X.value ? P(X.value.fromId) : null), na = t(() => X.value && X.value.overId ? P(X.value.overId) : null), ra = t(() => ta.value ? F(ta.value) : "#00f0ff"), ia = t(() => {
1367
- let e = X.value;
1396
+ }, sa = t(() => Y.value ? M(Y.value.fromId) : null), ca = t(() => Y.value && Y.value.overId ? M(Y.value.overId) : null), la = t(() => sa.value ? N(sa.value) : "#00f0ff"), ua = t(() => {
1397
+ let e = Y.value;
1368
1398
  if (!e) return {
1369
1399
  x: 0,
1370
1400
  y: 0
1371
1401
  };
1372
- let t = na.value;
1373
- return t && ta.value ? Xi(t, ta.value, "edge") : {
1402
+ let t = ca.value;
1403
+ return t && sa.value ? na(t, sa.value, "edge") : {
1374
1404
  x: e.px,
1375
1405
  y: e.py
1376
1406
  };
1377
- }), aa = t(() => {
1378
- let e = na.value;
1407
+ }), da = t(() => {
1408
+ let e = ca.value;
1379
1409
  if (!e) return null;
1380
1410
  let t = L(e);
1381
1411
  return {
@@ -1384,8 +1414,8 @@ var x = {
1384
1414
  w: t.width + 8,
1385
1415
  h: t.height + 8
1386
1416
  };
1387
- }), oa = (e) => {
1388
- let t = e.nodeIds.map((e) => P(e)).filter(Boolean);
1417
+ }), fa = (e) => {
1418
+ let t = e.nodeIds.map((e) => M(e)).filter(Boolean);
1389
1419
  if (t.length === 0) return null;
1390
1420
  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;
1391
1421
  return {
@@ -1394,111 +1424,142 @@ var x = {
1394
1424
  width: a - r,
1395
1425
  height: o - i
1396
1426
  };
1397
- }, sa = t(() => y.groups.map((e) => ({
1427
+ }, pa = t(() => v.groups.map((e) => ({
1398
1428
  ...e,
1399
- rect: oa(e)
1400
- })).filter((e) => e.rect)), Q = (e) => ir(e) ? yr.value : (P(e.from), e.centerText && e.centerText.color || "#00f0ff"), ca = (e) => {
1401
- let t = Mn.value[e.id];
1429
+ rect: fa(e)
1430
+ })).filter((e) => e.rect)), Q = (e) => ar(e) ? vr.value : e.color ? e.color : di.value ? di.value : e.centerText && e.centerText.color || "#00f0ff", ma = (e) => {
1431
+ let t = Fn.value[e.id];
1402
1432
  return !!t && !t.hidden;
1403
- }, la = t(() => [...new Set(M.value.map(Q))].map((e) => ({
1433
+ }, ha = t(() => [...new Set(A.value.map(Q))].map((e) => ({
1404
1434
  key: String(e).replace("#", ""),
1405
1435
  color: e
1406
- }))), ua = (e) => {
1436
+ }))), ga = (e) => {
1407
1437
  let t = e.endMarker;
1408
1438
  if (!t || t === "none") return "";
1409
1439
  let n = Q(e) || "#00f0ff", r = String(n).replace("#", "");
1410
1440
  return `url(#${t === "dot" ? "edge-dot" : "edge-arrow"}-${r})`;
1411
- }, da = /* @__PURE__ */ new Map(), fa = {
1441
+ }, _a = /* @__PURE__ */ new Map(), va = {
1412
1442
  nodes: null,
1413
1443
  edges: null,
1414
1444
  mode: null,
1415
1445
  epoch: -1
1416
- }, pa = () => {
1417
- let e = fa;
1418
- (e.nodes !== w.value || e.edges !== M.value || e.mode !== E.value || e.epoch !== Yt) && (fa = {
1419
- nodes: w.value,
1420
- edges: M.value,
1421
- mode: E.value,
1422
- epoch: Yt
1423
- }, da = /* @__PURE__ */ new Map());
1446
+ }, ya = () => {
1447
+ let e = va;
1448
+ (e.nodes !== S.value || e.edges !== A.value || e.mode !== w.value || e.epoch !== Zt) && (va = {
1449
+ nodes: S.value,
1450
+ edges: A.value,
1451
+ mode: w.value,
1452
+ epoch: Zt
1453
+ }, _a = /* @__PURE__ */ new Map());
1424
1454
  }, $ = (e) => {
1425
- pa();
1426
- let t = da.get(e.id);
1427
- return t === void 0 && (t = $i(e), da.set(e.id, t)), t;
1428
- }, ma = (e, t = 1) => `${2 / e.speed * t}s`, ha = (e) => `${3 / e.speed}s`, ga = (e) => {
1429
- let t = gi(e);
1455
+ ya();
1456
+ let t = _a.get(e.id);
1457
+ return t === void 0 && (t = aa(e), _a.set(e.id, t)), t;
1458
+ }, ba = (e, t = 1) => `${2 / e.speed * t}s`, xa = (e) => `${3 / e.speed}s`, Sa = t(() => v.config.edgeDashFlow === !0), Ca = t(() => {
1459
+ let e = v.config.edgeDashPattern, t = null;
1460
+ return typeof e == "string" && e.trim() ? t = e.trim().split(/\s+/).map(Number).filter((e) => Number.isFinite(e) && e > 0) : Array.isArray(e) && (t = e.map(Number).filter((e) => Number.isFinite(e) && e > 0)), t && t.length ? t : [10, 8];
1461
+ }), wa = t(() => Ca.value.join(" ")), Ta = t(() => Ca.value.reduce((e, t) => e + t, 0)), Ea = (e) => {
1462
+ let t = Number(e.dashFlowWidth ?? v.config.edgeDashFlowWidth);
1463
+ return Number.isFinite(t) && t > 0 ? t : 2;
1464
+ }, Da = (e) => {
1465
+ let t = Number(e.speed);
1466
+ return `${1.2 / (Number.isFinite(t) && t > 0 ? t : 1)}s`;
1467
+ }, Oa = (e) => e.animated === !1 ? !1 : e.dashFlow === !0 || e.dashFlow !== !1 && Sa.value, ka = (e) => {
1468
+ let t = Si(e);
1430
1469
  return t === "flow" || t === "all";
1431
- }, _a = (e) => {
1432
- let t = gi(e);
1470
+ }, Aa = (e) => {
1471
+ let t = Si(e);
1433
1472
  return t === "particle" || t === "all";
1434
- }, va = (e) => Zt(e).text, ya = (e) => !!e && String(Zt(e).text ?? "").trim() !== "", ba = (e, t) => {
1473
+ }, ja = (e) => $t(e).text, Ma = (e) => !!e && String($t(e).text ?? "").trim() !== "", Na = (e, t) => {
1435
1474
  if (!e) return null;
1436
- let n = Zt(e), r = Number(t.fontSize) || Number(n.fontSize) || 8, i = String(n.text ?? ""), a = 0;
1475
+ let n = $t(e), r = Number(t.fontSize) || Number(n.fontSize) || 8, i = String(n.text ?? ""), a = 0;
1437
1476
  for (let e of i) a += e.charCodeAt(0) > 11904 ? 1 : .62;
1438
1477
  return {
1439
1478
  w: Math.max(14, a * r + 8),
1440
1479
  h: Math.max(12, r + 6)
1441
1480
  };
1442
- }, xa = (e, t) => {
1443
- let n = ea(e, Math.max(0, t - .005)), r = ea(e, Math.min(1, t + .005));
1481
+ }, Pa = (e, t) => {
1482
+ let n = t && typeof t == "object" ? t : {}, r = n.showBg === void 0 ? ci.value : !!n.showBg, i = n.bgColor || li.value, a = ui.value;
1483
+ if (n.bgOpacity !== void 0 && n.bgOpacity !== null) {
1484
+ let e = Number(n.bgOpacity);
1485
+ Number.isFinite(e) && (a = Math.min(1, Math.max(0, e)));
1486
+ }
1487
+ let o = [
1488
+ "solid",
1489
+ "dashed",
1490
+ "none"
1491
+ ].includes(n.borderStyle) ? n.borderStyle : "solid", s = n.borderColor || an(e, t), c = n.borderColor ? 1 : .35;
1492
+ return {
1493
+ show: r,
1494
+ fill: i,
1495
+ opacity: a,
1496
+ borderStyle: o,
1497
+ borderColor: s,
1498
+ borderOpacity: c
1499
+ };
1500
+ }, Fa = (e, t) => {
1501
+ let n = oa(e, Math.max(0, t - .005)), r = oa(e, Math.min(1, t + .005));
1444
1502
  return Math.atan2(r.y - n.y, r.x - n.x) * 180 / Math.PI;
1445
- }, Sa = (e) => {
1503
+ }, Ia = (e) => {
1446
1504
  let t = e % 180;
1447
1505
  return t > 90 && (t -= 180), t < -90 && (t += 180), t;
1448
- }, Ca = (e, t, n) => `translate(${t.x}, ${t.y}) rotate(${(Zt(e).rotation || 0) + (n || 0)})`, wa = t(() => {
1506
+ }, La = (e, t, n) => `translate(${t.x}, ${t.y}) rotate(${($t(e).rotation || 0) + (n || 0)})`, Ra = t(() => {
1449
1507
  let e = [];
1450
- for (let t of W.value) {
1451
- let n = Mn.value[t.id];
1508
+ for (let t of G.value) {
1509
+ let n = Fn.value[t.id];
1452
1510
  if (!n) continue;
1453
1511
  let r = n.merged && n.representative, i = !n.merged && (t.fromText || t.centerText || t.toText);
1454
1512
  if (!r && !i) continue;
1455
- let a = P(t.from), o = P(t.to);
1513
+ let a = M(t.from), o = M(t.to);
1456
1514
  a && o && e.push({
1457
1515
  id: t.id,
1458
1516
  edge: t,
1459
1517
  info: n,
1460
- color: a && ae[a.nodeType] || "#00f0ff",
1461
- start: ea(t, .28),
1462
- center: ea(t, .5),
1463
- end: ea(t, .72),
1464
- startAngle: Sa(xa(t, .28)),
1465
- centerAngle: Sa(xa(t, .5)),
1466
- endAngle: Sa(xa(t, .72)),
1467
- fromBox: ba(t.fromText, t),
1468
- centerBox: ba(t.centerText, t),
1469
- toBox: ba(t.toText, t)
1518
+ color: a && oe[a.nodeType] || "#00f0ff",
1519
+ start: oa(t, .28),
1520
+ center: oa(t, .5),
1521
+ end: oa(t, .72),
1522
+ startAngle: Ia(Fa(t, .28)),
1523
+ centerAngle: Ia(Fa(t, .5)),
1524
+ endAngle: Ia(Fa(t, .72)),
1525
+ fromBox: Na(t.fromText, t),
1526
+ centerBox: Na(t.centerText, t),
1527
+ toBox: Na(t.toText, t),
1528
+ fromPlate: Pa(t, t.fromText),
1529
+ centerPlate: Pa(t, t.centerText),
1530
+ toPlate: Pa(t, t.toText)
1470
1531
  });
1471
1532
  }
1472
1533
  return e;
1473
1534
  });
1474
- return ne({
1475
- resetDataBaseline: vn,
1476
- getData: yn,
1477
- setData: jn,
1478
- removeSelected: xn,
1479
- addNodes: Dn,
1480
- addEdges: On,
1481
- updateNodes: kn,
1482
- updateEdges: An,
1483
- clientToSvg: Ii,
1484
- svgToClient: Li,
1485
- moveLayerUp: mr,
1486
- moveLayerDown: hr,
1487
- moveToFront: gr,
1488
- moveToBack: _r,
1489
- downloadSVG: vr
1535
+ return re({
1536
+ resetDataBaseline: xn,
1537
+ getData: Sn,
1538
+ setData: Pn,
1539
+ removeSelected: wn,
1540
+ addNodes: An,
1541
+ addEdges: jn,
1542
+ updateNodes: Mn,
1543
+ updateEdges: Nn,
1544
+ clientToSvg: Ui,
1545
+ svgToClient: Wi,
1546
+ moveLayerUp: pr,
1547
+ moveLayerDown: mr,
1548
+ moveToFront: hr,
1549
+ moveToBack: gr,
1550
+ downloadSVG: _r
1490
1551
  }), (t, o) => (d(), r("svg", {
1491
1552
  ref_key: "svgRef",
1492
- ref: O,
1553
+ ref: E,
1493
1554
  class: "topology-svg",
1494
1555
  style: c(ti.value),
1495
- viewBox: `${Ar.value} ${jr.value} ${H.value} ${U.value}`,
1496
- onMousedown: Kr,
1497
- onMousemove: wi,
1498
- onMouseup: Ei,
1499
- onMouseleave: Ei,
1500
- onClick: Tr,
1501
- onWheel: _(Lr, ["prevent"])
1556
+ viewBox: `${kr.value} ${Ar.value} ${U.value} ${W.value}`,
1557
+ onMousedown: Gr,
1558
+ onMousemove: ji,
1559
+ onMouseup: Ni,
1560
+ onMouseleave: Ni,
1561
+ onClick: wr,
1562
+ onWheel: g(Ir, ["prevent"])
1502
1563
  }, [
1503
1564
  i("defs", null, [
1504
1565
  o[3] ||= a("<linearGradient id=\"glassHighlight\" x1=\"0%\" y1=\"0%\" x2=\"60%\" y2=\"100%\"><stop offset=\"0%\" stop-color=\"rgba(255,255,255,0.9)\"></stop><stop offset=\"30%\" stop-color=\"rgba(255,255,255,0.25)\"></stop><stop offset=\"100%\" stop-color=\"rgba(255,255,255,0)\"></stop></linearGradient><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>", 3),
@@ -1512,8 +1573,8 @@ var x = {
1512
1573
  offset: e.offset,
1513
1574
  "stop-color": e.color,
1514
1575
  "stop-opacity": e.opacity
1515
- }, null, 8, ce))), 128))], 8, se),
1516
- (d(!0), r(e, null, p(ee(x), (e, t) => (d(), r("radialGradient", {
1576
+ }, null, 8, le))), 128))], 8, ce),
1577
+ (d(!0), r(e, null, p(ee(b), (e, t) => (d(), r("radialGradient", {
1517
1578
  key: `breath-${t}`,
1518
1579
  id: `breath-grad-${t}`
1519
1580
  }, [
@@ -1521,20 +1582,20 @@ var x = {
1521
1582
  offset: "0%",
1522
1583
  "stop-color": e.color,
1523
1584
  "stop-opacity": "1"
1524
- }, null, 8, ue),
1585
+ }, null, 8, de),
1525
1586
  i("stop", {
1526
1587
  offset: "40%",
1527
1588
  "stop-color": e.color,
1528
1589
  "stop-opacity": "0.5"
1529
- }, null, 8, de),
1590
+ }, null, 8, fe),
1530
1591
  i("stop", {
1531
1592
  offset: "100%",
1532
1593
  "stop-color": e.color,
1533
1594
  "stop-opacity": "0"
1534
- }, null, 8, fe)
1535
- ], 8, le))), 128)),
1595
+ }, null, 8, pe)
1596
+ ], 8, ue))), 128)),
1536
1597
  o[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),
1537
- (d(!0), r(e, null, p(la.value, (e) => (d(), r("marker", {
1598
+ (d(!0), r(e, null, p(ha.value, (e) => (d(), r("marker", {
1538
1599
  key: `m-arrow-${e.key}`,
1539
1600
  id: `edge-arrow-${e.key}`,
1540
1601
  viewBox: "0 0 10 10",
@@ -1547,8 +1608,8 @@ var x = {
1547
1608
  }, [i("path", {
1548
1609
  d: "M1,2.5 L9,5 L1,7.5 Z",
1549
1610
  fill: e.color
1550
- }, null, 8, me)], 8, pe))), 128)),
1551
- (d(!0), r(e, null, p(la.value, (e) => (d(), r("marker", {
1611
+ }, null, 8, he)], 8, me))), 128)),
1612
+ (d(!0), r(e, null, p(ha.value, (e) => (d(), r("marker", {
1552
1613
  key: `m-dot-${e.key}`,
1553
1614
  id: `edge-dot-${e.key}`,
1554
1615
  viewBox: "0 0 10 10",
@@ -1563,15 +1624,15 @@ var x = {
1563
1624
  cy: "5",
1564
1625
  r: "4",
1565
1626
  fill: e.color
1566
- }, null, 8, ge)], 8, he))), 128))
1627
+ }, null, 8, _e)], 8, ge))), 128))
1567
1628
  ]),
1568
1629
  i("rect", {
1569
- width: H.value,
1570
- height: U.value,
1571
- x: Ar.value,
1572
- y: jr.value,
1630
+ width: U.value,
1631
+ height: W.value,
1632
+ x: kr.value,
1633
+ y: Ar.value,
1573
1634
  fill: "url(#bg-grid)"
1574
- }, null, 8, _e),
1635
+ }, null, 8, ve),
1575
1636
  ni.value ? (d(), r(e, { key: 0 }, [i("pattern", {
1576
1637
  id: "grid",
1577
1638
  width: ii.value,
@@ -1582,15 +1643,15 @@ var x = {
1582
1643
  fill: "none",
1583
1644
  stroke: ri.value,
1584
1645
  "stroke-width": "0.5"
1585
- }, null, 8, ye)], 8, ve), i("rect", {
1586
- width: H.value,
1587
- height: U.value,
1588
- x: Ar.value,
1589
- y: jr.value,
1646
+ }, null, 8, be)], 8, ye), i("rect", {
1647
+ width: U.value,
1648
+ height: W.value,
1649
+ x: kr.value,
1650
+ y: Ar.value,
1590
1651
  fill: "url(#grid)",
1591
1652
  opacity: ai.value
1592
- }, null, 8, be)], 64)) : n("", !0),
1593
- si.value ? (d(), r("g", xe, [...o[5] ||= [
1653
+ }, null, 8, xe)], 64)) : n("", !0),
1654
+ si.value ? (d(), r("g", Se, [...o[5] ||= [
1594
1655
  i("line", {
1595
1656
  x1: "-22",
1596
1657
  y1: "0",
@@ -1622,7 +1683,7 @@ var x = {
1622
1683
  opacity: "0.8"
1623
1684
  }, null, -1)
1624
1685
  ]])) : n("", !0),
1625
- (d(!0), r(e, null, p(sa.value, (e) => (d(), r("g", { key: e.id }, [
1686
+ (d(!0), r(e, null, p(pa.value, (e) => (d(), r("g", { key: e.id }, [
1626
1687
  i("rect", {
1627
1688
  x: e.rect.x,
1628
1689
  y: e.rect.y,
@@ -1631,7 +1692,7 @@ var x = {
1631
1692
  rx: "16",
1632
1693
  fill: e.color,
1633
1694
  opacity: "0.03"
1634
- }, null, 8, Se),
1695
+ }, null, 8, Ce),
1635
1696
  i("rect", {
1636
1697
  x: e.rect.x,
1637
1698
  y: e.rect.y,
@@ -1643,35 +1704,35 @@ var x = {
1643
1704
  "stroke-width": "1.5",
1644
1705
  "stroke-dasharray": "8 5",
1645
1706
  opacity: "0.35"
1646
- }, null, 8, Ce),
1707
+ }, null, 8, we),
1647
1708
  i("circle", {
1648
1709
  cx: e.rect.x + 4,
1649
1710
  cy: e.rect.y + 4,
1650
1711
  r: "3",
1651
1712
  fill: e.color,
1652
1713
  opacity: "0.5"
1653
- }, null, 8, we),
1714
+ }, null, 8, Te),
1654
1715
  i("circle", {
1655
1716
  cx: e.rect.x + e.rect.width - 4,
1656
1717
  cy: e.rect.y + 4,
1657
1718
  r: "3",
1658
1719
  fill: e.color,
1659
1720
  opacity: "0.5"
1660
- }, null, 8, Te),
1721
+ }, null, 8, Ee),
1661
1722
  i("circle", {
1662
1723
  cx: e.rect.x + 4,
1663
1724
  cy: e.rect.y + e.rect.height - 4,
1664
1725
  r: "3",
1665
1726
  fill: e.color,
1666
1727
  opacity: "0.5"
1667
- }, null, 8, Ee),
1728
+ }, null, 8, De),
1668
1729
  i("circle", {
1669
1730
  cx: e.rect.x + e.rect.width - 4,
1670
1731
  cy: e.rect.y + e.rect.height - 4,
1671
1732
  r: "3",
1672
1733
  fill: e.color,
1673
1734
  opacity: "0.5"
1674
- }, null, 8, De),
1735
+ }, null, 8, Oe),
1675
1736
  i("text", {
1676
1737
  x: e.rect.x + 14,
1677
1738
  y: e.rect.y + 20,
@@ -1682,43 +1743,44 @@ var x = {
1682
1743
  "font-weight": "600",
1683
1744
  opacity: "0.7",
1684
1745
  "letter-spacing": "0.5"
1685
- }, h(e.label), 9, Oe)
1746
+ }, h(e.label), 9, ke)
1686
1747
  ]))), 128)),
1687
- ur.value ? (d(), r("g", ke, [(d(!0), r(e, null, p(Ir.value, (e) => (d(), r("g", {
1748
+ ur.value ? (d(), r("g", Ae, [(d(!0), r(e, null, p(Fr.value, (e) => (d(), r("g", {
1688
1749
  key: `node-base-${e.id}`,
1689
1750
  transform: `translate(${e.x}, ${e.y})`
1690
- }, [nr(e) && v.viewMode !== "3d" ? (d(), r("rect", {
1751
+ }, [rr(e) && _.viewMode !== "3d" ? (d(), r("rect", {
1691
1752
  key: 0,
1692
1753
  x: L(e).x,
1693
1754
  y: L(e).y,
1694
1755
  width: L(e).width,
1695
1756
  height: L(e).height,
1696
- rx: J(e),
1697
- fill: nr(e),
1757
+ rx: Ei(e),
1758
+ fill: rr(e),
1698
1759
  opacity: "0.15"
1699
- }, null, 8, je)) : n("", !0), R(e) && v.viewMode !== "3d" ? (d(), r("rect", {
1760
+ }, null, 8, Me)) : n("", !0), R(e) && _.viewMode !== "3d" ? (d(), r("rect", {
1700
1761
  key: 1,
1701
1762
  x: R(e).x,
1702
1763
  y: R(e).y,
1703
1764
  width: R(e).width,
1704
1765
  height: R(e).height,
1705
- rx: J(e),
1766
+ rx: Ei(e),
1706
1767
  fill: "none",
1707
- stroke: _i(e),
1708
- "stroke-width": vi(e),
1709
- "stroke-dasharray": yi(e),
1768
+ stroke: Ci(e),
1769
+ "stroke-width": wi(e),
1770
+ "stroke-dasharray": Ti(e),
1710
1771
  opacity: "0.8"
1711
- }, null, 8, Me)) : n("", !0)], 8, Ae))), 128))])) : n("", !0),
1712
- (d(!0), r(e, null, p(W.value, (e) => (d(), r("path", {
1713
- key: `base-${e.id}`,
1714
- d: $(e),
1772
+ }, null, 8, Ne)) : n("", !0)], 8, je))), 128))])) : n("", !0),
1773
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `base-${t.id}` }, [Oa(t) ? n("", !0) : (d(), r("path", {
1774
+ key: 0,
1775
+ d: $(t),
1715
1776
  fill: "none",
1716
- stroke: "#1a2744",
1777
+ stroke: pi(t),
1778
+ opacity: mi(t),
1717
1779
  "stroke-width": "2",
1718
1780
  "stroke-linecap": "round",
1719
- "marker-end": ua(e)
1720
- }, null, 8, Ne))), 128)),
1721
- (d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `glow-${t.id}` }, [mi.value ? (d(), r("path", {
1781
+ "marker-end": ga(t)
1782
+ }, null, 8, Pe))], 64))), 128)),
1783
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `glow-${t.id}` }, [bi.value ? (d(), r("path", {
1722
1784
  key: 0,
1723
1785
  d: $(t),
1724
1786
  fill: "none",
@@ -1727,17 +1789,17 @@ var x = {
1727
1789
  "stroke-linecap": "round",
1728
1790
  opacity: "0.15",
1729
1791
  filter: "url(#glow-strong)"
1730
- }, null, 8, Pe)) : n("", !0)], 64))), 128)),
1731
- (d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `sel-${t.id}` }, [ir(t) ? (d(), r("path", {
1792
+ }, null, 8, Fe)) : n("", !0)], 64))), 128)),
1793
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `sel-${t.id}` }, [ar(t) ? (d(), r("path", {
1732
1794
  key: 0,
1733
1795
  d: $(t),
1734
1796
  fill: "none",
1735
- stroke: yr.value,
1797
+ stroke: vr.value,
1736
1798
  "stroke-width": "4",
1737
1799
  opacity: "0.35",
1738
1800
  filter: "url(#glow-strong)"
1739
- }, null, 8, Fe)) : n("", !0)], 64))), 128)),
1740
- (d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `flow-${t.id}` }, [ga(t) ? (d(), r("g", Ie, [
1801
+ }, null, 8, Ie)) : n("", !0)], 64))), 128)),
1802
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `flow-${t.id}` }, [ka(t) ? (d(), r("g", Le, [
1741
1803
  i("path", {
1742
1804
  d: $(t),
1743
1805
  fill: "none",
@@ -1750,9 +1812,9 @@ var x = {
1750
1812
  attributeName: "stroke-dashoffset",
1751
1813
  from: "0",
1752
1814
  to: "-52",
1753
- dur: ma(t),
1815
+ dur: ba(t),
1754
1816
  repeatCount: "indefinite"
1755
- }, null, 8, Re)], 8, Le),
1817
+ }, null, 8, ze)], 8, Re),
1756
1818
  i("path", {
1757
1819
  d: $(t),
1758
1820
  fill: "none",
@@ -1765,9 +1827,9 @@ var x = {
1765
1827
  attributeName: "stroke-dashoffset",
1766
1828
  from: "-30",
1767
1829
  to: "-82",
1768
- dur: ma(t, 1.3),
1830
+ dur: ba(t, 1.3),
1769
1831
  repeatCount: "indefinite"
1770
- }, null, 8, Be)], 8, ze),
1832
+ }, null, 8, Ve)], 8, Be),
1771
1833
  i("path", {
1772
1834
  d: $(t),
1773
1835
  fill: "none",
@@ -1781,161 +1843,181 @@ var x = {
1781
1843
  attributeName: "stroke-dashoffset",
1782
1844
  from: "0",
1783
1845
  to: "-84",
1784
- dur: ma(t, .8),
1846
+ dur: ba(t, .8),
1785
1847
  repeatCount: "indefinite"
1786
- }, null, 8, He)], 8, Ve)
1848
+ }, null, 8, Ue)], 8, He)
1787
1849
  ])) : n("", !0)], 64))), 128)),
1788
- (d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `particle-${t.id}` }, [_a(t) ? (d(), r("g", Ue, [i("circle", {
1850
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `dash-${t.id}` }, [Oa(t) ? (d(), r("path", {
1851
+ key: 0,
1852
+ d: $(t),
1853
+ fill: "none",
1854
+ stroke: Q(t),
1855
+ "stroke-width": Ea(t),
1856
+ "stroke-linecap": "round",
1857
+ "stroke-dasharray": wa.value,
1858
+ "marker-end": ga(t),
1859
+ opacity: "0.9"
1860
+ }, [i("animate", {
1861
+ attributeName: "stroke-dashoffset",
1862
+ from: "0",
1863
+ to: `${-Ta.value}`,
1864
+ dur: Da(t),
1865
+ repeatCount: "indefinite"
1866
+ }, null, 8, Ge)], 8, We)) : n("", !0)], 64))), 128)),
1867
+ (d(!0), r(e, null, p(G.value, (t) => (d(), r(e, { key: `particle-${t.id}` }, [Aa(t) ? (d(), r("g", Ke, [i("circle", {
1789
1868
  r: "3",
1790
1869
  fill: Q(t),
1791
1870
  opacity: "0.9",
1792
1871
  filter: "url(#glow-core)"
1793
1872
  }, [i("animateMotion", {
1794
1873
  path: $(t),
1795
- dur: ha(t),
1874
+ dur: xa(t),
1796
1875
  repeatCount: "indefinite"
1797
- }, null, 8, Ge)], 8, We), i("circle", {
1876
+ }, null, 8, Je)], 8, qe), i("circle", {
1798
1877
  r: "8",
1799
1878
  fill: Q(t),
1800
1879
  opacity: "0.2",
1801
1880
  filter: "url(#glow-strong)"
1802
1881
  }, [i("animateMotion", {
1803
1882
  path: $(t),
1804
- dur: ha(t),
1883
+ dur: xa(t),
1805
1884
  repeatCount: "indefinite"
1806
- }, null, 8, qe)], 8, Ke)])) : n("", !0)], 64))), 128)),
1807
- (d(!0), r(e, null, p(wa.value, (t) => (d(), r(e, { key: `text-${t.id}` }, [t.info.merged && t.info.representative ? (d(), r("g", {
1885
+ }, null, 8, Xe)], 8, Ye)])) : n("", !0)], 64))), 128)),
1886
+ (d(!0), r(e, null, p(Ra.value, (t) => (d(), r(e, { key: `text-${t.id}` }, [t.info.merged && t.info.representative ? (d(), r("g", {
1808
1887
  key: 0,
1809
1888
  transform: `translate(${t.center.x}, ${t.center.y}) rotate(${t.centerAngle})`
1810
1889
  }, [i("rect", {
1811
1890
  x: "-7",
1812
- y: -tn(t.edge, null) / 2,
1891
+ y: -rn(t.edge, null) / 2,
1813
1892
  width: 14,
1814
- height: tn(t.edge, null),
1893
+ height: rn(t.edge, null),
1815
1894
  rx: "2",
1816
1895
  fill: "#FFFFFF",
1817
1896
  opacity: "0.9",
1818
1897
  stroke: t.color,
1819
1898
  "stroke-width": "0.6"
1820
- }, null, 8, Ye), i("text", {
1899
+ }, null, 8, Qe), i("text", {
1821
1900
  y: "0",
1822
1901
  "dominant-baseline": "central",
1823
1902
  "text-anchor": "middle",
1824
- "font-size": tn(t.edge, null),
1825
- fill: C(t.edge, null),
1903
+ "font-size": rn(t.edge, null),
1904
+ fill: an(t.edge, null),
1826
1905
  "font-family": "'SF Mono', monospace",
1827
1906
  opacity: "1"
1828
- }, h(t.info.count), 9, Xe)], 8, Je)) : t.info.merged ? n("", !0) : (d(), r("g", Ze, [
1829
- ya(t.edge.fromText) ? (d(), r("g", {
1907
+ }, h(t.info.count), 9, $e)], 8, Ze)) : t.info.merged ? n("", !0) : (d(), r("g", et, [
1908
+ Ma(t.edge.fromText) ? (d(), r("g", {
1830
1909
  key: 0,
1831
- transform: Ca(t.edge.fromText, t.start, t.startAngle)
1832
- }, [ci.value ? (d(), r("rect", {
1910
+ transform: La(t.edge.fromText, t.start, t.startAngle)
1911
+ }, [t.fromPlate.show ? (d(), r("rect", {
1833
1912
  key: 0,
1834
1913
  x: -t.fromBox.w / 2,
1835
1914
  y: -t.fromBox.h / 2,
1836
1915
  width: t.fromBox.w,
1837
1916
  height: t.fromBox.h,
1838
1917
  rx: "3",
1839
- fill: li.value,
1840
- opacity: "0.92",
1841
- stroke: C(t.edge, t.edge.fromText),
1842
- "stroke-opacity": "0.35",
1843
- "stroke-width": "0.6"
1844
- }, null, 8, $e)) : n("", !0), i("text", {
1918
+ fill: t.fromPlate.fill,
1919
+ opacity: t.fromPlate.opacity,
1920
+ stroke: t.fromPlate.borderStyle === "none" ? "none" : t.fromPlate.borderColor,
1921
+ "stroke-width": "0.6",
1922
+ "stroke-opacity": t.fromPlate.borderOpacity,
1923
+ "stroke-dasharray": t.fromPlate.borderStyle === "dashed" ? "3 2" : void 0
1924
+ }, null, 8, nt)) : n("", !0), i("text", {
1845
1925
  y: "0",
1846
1926
  "dominant-baseline": "central",
1847
1927
  "text-anchor": "middle",
1848
- "font-size": tn(t.edge, t.edge.fromText),
1849
- fill: C(t.edge, t.edge.fromText),
1928
+ "font-size": rn(t.edge, t.edge.fromText),
1929
+ fill: an(t.edge, t.edge.fromText),
1850
1930
  "font-family": "'SF Mono', monospace",
1851
1931
  "font-weight": "500",
1852
1932
  opacity: "0.9"
1853
- }, h(va(t.edge.fromText)), 9, et)], 8, Qe)) : n("", !0),
1854
- ya(t.edge.centerText) ? (d(), r("g", {
1933
+ }, h(ja(t.edge.fromText)), 9, rt)], 8, tt)) : n("", !0),
1934
+ Ma(t.edge.centerText) ? (d(), r("g", {
1855
1935
  key: 1,
1856
- transform: Ca(t.edge.centerText, t.center, t.centerAngle)
1857
- }, [ci.value ? (d(), r("rect", {
1936
+ transform: La(t.edge.centerText, t.center, t.centerAngle)
1937
+ }, [t.centerPlate.show ? (d(), r("rect", {
1858
1938
  key: 0,
1859
1939
  x: -t.centerBox.w / 2,
1860
1940
  y: -t.centerBox.h / 2,
1861
1941
  width: t.centerBox.w,
1862
1942
  height: t.centerBox.h,
1863
1943
  rx: "3",
1864
- fill: li.value,
1865
- opacity: "0.92",
1866
- stroke: C(t.edge, t.edge.centerText),
1867
- "stroke-opacity": "0.35",
1868
- "stroke-width": "0.6"
1869
- }, null, 8, nt)) : n("", !0), i("text", {
1944
+ fill: t.centerPlate.fill,
1945
+ opacity: t.centerPlate.opacity,
1946
+ stroke: t.centerPlate.borderStyle === "none" ? "none" : t.centerPlate.borderColor,
1947
+ "stroke-width": "0.6",
1948
+ "stroke-opacity": t.centerPlate.borderOpacity,
1949
+ "stroke-dasharray": t.centerPlate.borderStyle === "dashed" ? "3 2" : void 0
1950
+ }, null, 8, at)) : n("", !0), i("text", {
1870
1951
  y: "0",
1871
1952
  "dominant-baseline": "central",
1872
1953
  "text-anchor": "middle",
1873
- "font-size": tn(t.edge, t.edge.centerText),
1874
- fill: C(t.edge, t.edge.centerText),
1954
+ "font-size": rn(t.edge, t.edge.centerText),
1955
+ fill: an(t.edge, t.edge.centerText),
1875
1956
  "font-family": "'SF Mono', monospace",
1876
1957
  "font-weight": "600",
1877
1958
  opacity: "1"
1878
- }, h(va(t.edge.centerText)), 9, rt)], 8, tt)) : n("", !0),
1879
- ya(t.edge.toText) ? (d(), r("g", {
1959
+ }, h(ja(t.edge.centerText)), 9, ot)], 8, it)) : n("", !0),
1960
+ Ma(t.edge.toText) ? (d(), r("g", {
1880
1961
  key: 2,
1881
- transform: Ca(t.edge.toText, t.end, t.endAngle)
1882
- }, [ci.value ? (d(), r("rect", {
1962
+ transform: La(t.edge.toText, t.end, t.endAngle)
1963
+ }, [t.toPlate.show ? (d(), r("rect", {
1883
1964
  key: 0,
1884
1965
  x: -t.toBox.w / 2,
1885
1966
  y: -t.toBox.h / 2,
1886
1967
  width: t.toBox.w,
1887
1968
  height: t.toBox.h,
1888
1969
  rx: "3",
1889
- fill: li.value,
1890
- opacity: "0.92",
1891
- stroke: C(t.edge, t.edge.toText),
1892
- "stroke-opacity": "0.35",
1893
- "stroke-width": "0.6"
1894
- }, null, 8, at)) : n("", !0), i("text", {
1970
+ fill: t.toPlate.fill,
1971
+ opacity: t.toPlate.opacity,
1972
+ stroke: t.toPlate.borderStyle === "none" ? "none" : t.toPlate.borderColor,
1973
+ "stroke-width": "0.6",
1974
+ "stroke-opacity": t.toPlate.borderOpacity,
1975
+ "stroke-dasharray": t.toPlate.borderStyle === "dashed" ? "3 2" : void 0
1976
+ }, null, 8, ct)) : n("", !0), i("text", {
1895
1977
  y: "0",
1896
1978
  "dominant-baseline": "central",
1897
1979
  "text-anchor": "middle",
1898
- "font-size": tn(t.edge, t.edge.toText),
1899
- fill: C(t.edge, t.edge.toText),
1980
+ "font-size": rn(t.edge, t.edge.toText),
1981
+ fill: an(t.edge, t.edge.toText),
1900
1982
  "font-family": "'SF Mono', monospace",
1901
1983
  "font-weight": "500",
1902
1984
  opacity: "0.9"
1903
- }, h(va(t.edge.toText)), 9, ot)], 8, it)) : n("", !0)
1985
+ }, h(ja(t.edge.toText)), 9, lt)], 8, st)) : n("", !0)
1904
1986
  ]))], 64))), 128)),
1905
- X.value ? (d(), r("g", st, [
1987
+ Y.value ? (d(), r("g", ut, [
1906
1988
  i("line", {
1907
- x1: X.value.ax,
1908
- y1: X.value.ay,
1909
- x2: ia.value.x,
1910
- y2: ia.value.y,
1911
- stroke: ra.value,
1989
+ x1: Y.value.ax,
1990
+ y1: Y.value.ay,
1991
+ x2: ua.value.x,
1992
+ y2: ua.value.y,
1993
+ stroke: la.value,
1912
1994
  "stroke-width": "2",
1913
1995
  "stroke-dasharray": "6 6",
1914
1996
  "stroke-linecap": "round",
1915
1997
  opacity: "0.9"
1916
- }, null, 8, ct),
1998
+ }, null, 8, dt),
1917
1999
  i("circle", {
1918
- cx: X.value.px,
1919
- cy: X.value.py,
2000
+ cx: Y.value.px,
2001
+ cy: Y.value.py,
1920
2002
  r: "3.5",
1921
- fill: ra.value,
2003
+ fill: la.value,
1922
2004
  opacity: "0.9"
1923
- }, null, 8, lt),
1924
- X.value.overId && aa.value ? (d(), r("rect", {
2005
+ }, null, 8, ft),
2006
+ Y.value.overId && da.value ? (d(), r("rect", {
1925
2007
  key: 0,
1926
- x: aa.value.x,
1927
- y: aa.value.y,
1928
- width: aa.value.w,
1929
- height: aa.value.h,
2008
+ x: da.value.x,
2009
+ y: da.value.y,
2010
+ width: da.value.w,
2011
+ height: da.value.h,
1930
2012
  rx: "6",
1931
2013
  fill: "none",
1932
- stroke: ra.value,
2014
+ stroke: la.value,
1933
2015
  "stroke-width": "1.5",
1934
2016
  "stroke-dasharray": "6 4",
1935
2017
  opacity: "0.9"
1936
- }, null, 8, ut)) : n("", !0)
2018
+ }, null, 8, pt)) : n("", !0)
1937
2019
  ])) : n("", !0),
1938
- (d(!0), r(e, null, p(W.value, (e) => (d(), r("path", {
2020
+ (d(!0), r(e, null, p(G.value, (e) => (d(), r("path", {
1939
2021
  key: `hit-${e.id}`,
1940
2022
  d: $(e),
1941
2023
  fill: "none",
@@ -1945,146 +2027,146 @@ var x = {
1945
2027
  "pointer-events": "stroke",
1946
2028
  cursor: "pointer"
1947
2029
  },
1948
- onClick: _((t) => br(e, t), ["stop"])
1949
- }, null, 8, dt))), 128)),
1950
- (d(!0), r(e, null, p(Ir.value, (a) => (d(), r("g", {
2030
+ onClick: g((t) => yr(e, t), ["stop"])
2031
+ }, null, 8, mt))), 128)),
2032
+ (d(!0), r(e, null, p(Fr.value, (a) => (d(), r("g", {
1951
2033
  key: a.id,
1952
2034
  transform: `translate(${a.x}, ${a.y})`,
1953
- class: s(["topology-node", D.value === a.id ? "dragging" : ""]),
1954
- onMousedown: (e) => bi(e, a.id),
1955
- onClick: (e) => pr(a, e),
2035
+ class: s(["topology-node", T.value === a.id ? "dragging" : ""]),
2036
+ onMousedown: (e) => Di(e, a.id),
2037
+ onClick: (e) => fr(a, e),
1956
2038
  style: c({
1957
- cursor: y.editable && y.config.nodeDraggable !== !1 ? "grab" : "default",
1958
- color: F(a)
2039
+ cursor: v.editable && v.config.nodeDraggable !== !1 ? "grab" : "default",
2040
+ color: N(a)
1959
2041
  })
1960
2042
  }, [
1961
- In(a) ? (d(), r("rect", {
2043
+ zn(a) ? (d(), r("rect", {
1962
2044
  key: 0,
1963
2045
  class: "node-hit-area node-hit-frame",
1964
2046
  x: L(a).x,
1965
2047
  y: L(a).y,
1966
2048
  width: L(a).width,
1967
2049
  height: L(a).height,
1968
- rx: J(a),
2050
+ rx: Ei(a),
1969
2051
  fill: "none",
1970
2052
  stroke: "transparent",
1971
- "stroke-width": Math.max(vi(a), 12),
2053
+ "stroke-width": Math.max(wi(a), 12),
1972
2054
  "pointer-events": "stroke"
1973
- }, null, 8, pt)) : (d(), r("rect", {
2055
+ }, null, 8, gt)) : (d(), r("rect", {
1974
2056
  key: 1,
1975
2057
  class: "node-hit-area",
1976
- x: er(a).x,
1977
- y: er(a).y,
1978
- width: er(a).width,
1979
- height: er(a).height,
2058
+ x: tr(a).x,
2059
+ y: tr(a).y,
2060
+ width: tr(a).width,
2061
+ height: tr(a).height,
1980
2062
  fill: "transparent",
1981
2063
  "pointer-events": "all"
1982
- }, null, 8, mt)),
1983
- !ur.value && nr(a) && v.viewMode !== "3d" ? (d(), r("rect", {
2064
+ }, null, 8, _t)),
2065
+ !ur.value && rr(a) && _.viewMode !== "3d" ? (d(), r("rect", {
1984
2066
  key: 2,
1985
2067
  x: L(a).x,
1986
2068
  y: L(a).y,
1987
2069
  width: L(a).width,
1988
2070
  height: L(a).height,
1989
- rx: J(a),
1990
- fill: nr(a),
2071
+ rx: Ei(a),
2072
+ fill: rr(a),
1991
2073
  opacity: "0.15"
1992
- }, null, 8, ht)) : n("", !0),
1993
- !ur.value && R(a) && v.viewMode !== "3d" ? (d(), r("rect", {
2074
+ }, null, 8, vt)) : n("", !0),
2075
+ !ur.value && R(a) && _.viewMode !== "3d" ? (d(), r("rect", {
1994
2076
  key: 3,
1995
2077
  x: R(a).x,
1996
2078
  y: R(a).y,
1997
2079
  width: R(a).width,
1998
2080
  height: R(a).height,
1999
- rx: J(a),
2081
+ rx: Ei(a),
2000
2082
  fill: "none",
2001
- stroke: _i(a),
2002
- "stroke-width": vi(a),
2003
- "stroke-dasharray": yi(a),
2083
+ stroke: Ci(a),
2084
+ "stroke-width": wi(a),
2085
+ "stroke-dasharray": Ti(a),
2004
2086
  opacity: "0.8"
2005
- }, null, 8, gt)) : n("", !0),
2006
- rr(a) && v.viewMode !== "3d" ? (d(), r("rect", {
2087
+ }, null, 8, yt)) : n("", !0),
2088
+ ir(a) && _.viewMode !== "3d" ? (d(), r("rect", {
2007
2089
  key: 4,
2008
2090
  x: L(a).x,
2009
2091
  y: L(a).y,
2010
2092
  width: L(a).width,
2011
2093
  height: L(a).height,
2012
- rx: J(a),
2094
+ rx: Ei(a),
2013
2095
  fill: "none",
2014
2096
  stroke: lr.value,
2015
2097
  "stroke-width": "2.5",
2016
2098
  transform: "scale(1.1)",
2017
2099
  style: { "pointer-events": "none" }
2018
- }, null, 8, _t)) : n("", !0),
2019
- Fn(a) ? (d(), r("text", {
2100
+ }, null, 8, bt)) : n("", !0),
2101
+ Rn(a) ? (d(), r("text", {
2020
2102
  key: 5,
2021
2103
  y: "4",
2022
2104
  transform: `rotate(${a.rotation || 0} 0 4)`,
2023
2105
  "text-anchor": "middle",
2024
- fill: $t(a) || F(a) || Pn(a).color,
2025
- "font-size": Qt(a, 12),
2106
+ fill: tn(a) || N(a) || Ln(a).color,
2107
+ "font-size": en(a, 12),
2026
2108
  "font-family": "'SF Mono', monospace",
2027
2109
  "font-weight": "600"
2028
2110
  }, [(d(!0), r(e, null, p(String(a.label ?? "").split("\n"), (e, t) => (d(), r("tspan", {
2029
2111
  key: t,
2030
2112
  x: "0",
2031
2113
  dy: t === 0 ? 0 : "1.2em"
2032
- }, h(e), 9, yt))), 128))], 8, vt)) : In(a) ? (d(), r(e, { key: 6 }, [], 64)) : (d(), r(e, { key: 7 }, [
2033
- a.state !== "none" && hi.value ? (d(), r("circle", {
2114
+ }, h(e), 9, St))), 128))], 8, xt)) : zn(a) ? (d(), r(e, { key: 6 }, [], 64)) : (d(), r(e, { key: 7 }, [
2115
+ a.state !== "none" && xi.value ? (d(), r("circle", {
2034
2116
  key: 0,
2035
- r: Yn(a),
2117
+ r: Xn(a),
2036
2118
  fill: "none",
2037
- stroke: Pn(a).color,
2119
+ stroke: Ln(a).color,
2038
2120
  "stroke-width": "2.5",
2039
2121
  opacity: "0"
2040
2122
  }, [i("animate", {
2041
2123
  attributeName: "r",
2042
- values: `${Yn(a)};${Yn(a) * 1.6};${Yn(a)}`,
2124
+ values: `${Xn(a)};${Xn(a) * 1.6};${Xn(a)}`,
2043
2125
  dur: "2s",
2044
2126
  repeatCount: "indefinite"
2045
- }, null, 8, xt), o[6] ||= i("animate", {
2127
+ }, null, 8, wt), o[6] ||= i("animate", {
2046
2128
  attributeName: "opacity",
2047
2129
  values: "0.4;0.05;0.4",
2048
2130
  dur: "2s",
2049
2131
  repeatCount: "indefinite"
2050
- }, null, -1)], 8, bt)) : n("", !0),
2051
- zn(a) ? (d(), r("svg", {
2132
+ }, null, -1)], 8, Ct)) : n("", !0),
2133
+ Vn(a) ? (d(), r("svg", {
2052
2134
  key: 1,
2053
2135
  class: "node-icon",
2054
2136
  x: L(a).x,
2055
2137
  y: L(a).y,
2056
2138
  width: L(a).width,
2057
2139
  height: L(a).height,
2058
- viewBox: Hn,
2059
- preserveAspectRatio: Vn.value
2140
+ viewBox: Wn,
2141
+ preserveAspectRatio: Un.value
2060
2142
  }, [m(t.$slots, "node-icon", {
2061
2143
  node: a,
2062
- color: F(a),
2063
- viewMode: v.viewMode,
2144
+ color: N(a),
2145
+ viewMode: _.viewMode,
2064
2146
  isImage: !0,
2065
- image: Rn(a),
2066
- fit: Bn.value,
2067
- imageWidth: Kn(a).w,
2068
- imageHeight: Kn(a).h,
2147
+ image: P(a),
2148
+ fit: Hn.value,
2149
+ imageWidth: F(a).w,
2150
+ imageHeight: F(a).h,
2069
2151
  width: L(a).width,
2070
2152
  height: L(a).height
2071
2153
  }, () => [i("image", {
2072
- href: Rn(a),
2073
- x: -Kn(a).w / 2,
2074
- y: -Kn(a).h / 2,
2075
- width: Kn(a).w,
2076
- height: Kn(a).h
2077
- }, null, 8, Ct)])], 8, St)) : (d(), r("g", {
2154
+ href: P(a),
2155
+ x: -F(a).w / 2,
2156
+ y: -F(a).h / 2,
2157
+ width: F(a).w,
2158
+ height: F(a).h
2159
+ }, null, 8, Et)])], 8, Tt)) : (d(), r("g", {
2078
2160
  key: 2,
2079
2161
  class: "node-icon",
2080
- transform: Xn(a)
2162
+ transform: Zn(a)
2081
2163
  }, [m(t.$slots, "node-icon", {
2082
2164
  node: a,
2083
- color: F(a),
2084
- viewMode: v.viewMode,
2165
+ color: N(a),
2166
+ viewMode: _.viewMode,
2085
2167
  isImage: !1,
2086
- image: Rn(a),
2087
- fit: Bn.value,
2168
+ image: P(a),
2169
+ fit: Hn.value,
2088
2170
  width: L(a).width,
2089
2171
  height: L(a).height
2090
2172
  }, () => [i("rect", {
@@ -2093,91 +2175,84 @@ var x = {
2093
2175
  width: "36",
2094
2176
  height: "36",
2095
2177
  rx: "6",
2096
- fill: F(a),
2178
+ fill: N(a),
2097
2179
  opacity: "0.9"
2098
- }, null, 8, Tt)])], 8, wt)),
2099
- di.value ? (d(), r("g", {
2180
+ }, null, 8, Ot)])], 8, Dt)),
2181
+ _i.value ? (d(), r("g", {
2100
2182
  key: 3,
2101
- transform: Zn(a)
2183
+ transform: Qn(a)
2102
2184
  }, [i("circle", {
2103
2185
  r: "4",
2104
- fill: Pn(a).color,
2186
+ fill: Ln(a).color,
2105
2187
  stroke: "#0a0e1a",
2106
2188
  "stroke-width": "2"
2107
- }, null, 8, Dt)], 8, Et)) : n("", !0),
2189
+ }, null, 8, At)], 8, kt)) : n("", !0),
2108
2190
  i("text", {
2109
- y: $n(a),
2110
- transform: `rotate(${a.rotation || 0} 0 ${$n(a)})`,
2191
+ y: er(a),
2192
+ transform: `rotate(${a.rotation || 0} 0 ${er(a)})`,
2111
2193
  "text-anchor": "middle",
2112
- fill: $t(a),
2113
- "font-size": Qt(a),
2114
- "font-weight": en(a),
2194
+ fill: tn(a),
2195
+ "font-size": en(a),
2196
+ "font-weight": nn(a),
2115
2197
  "font-family": "'Segoe UI', system-ui, sans-serif",
2116
2198
  opacity: "0.9"
2117
2199
  }, [(d(!0), r(e, null, p(String(a.label ?? "").split("\n"), (e, t) => (d(), r("tspan", {
2118
2200
  key: t,
2119
2201
  x: "0",
2120
2202
  dy: t === 0 ? 0 : "1.2em"
2121
- }, h(e), 9, kt))), 128))], 8, Ot)
2203
+ }, h(e), 9, Mt))), 128))], 8, jt)
2122
2204
  ], 64)),
2123
- ui.value ? (d(), r("g", At, [(d(!0), r(e, null, p(Fi(a), (e) => (d(), r("circle", {
2205
+ gi.value ? (d(), r("g", Nt, [(d(!0), r(e, null, p(Hi(a), (e) => (d(), r("circle", {
2124
2206
  key: e.side,
2125
2207
  cx: e.x,
2126
2208
  cy: e.y,
2127
2209
  r: "4.5",
2128
2210
  class: "node-handle",
2129
2211
  fill: "#0a0e1a",
2130
- stroke: F(a),
2212
+ stroke: N(a),
2131
2213
  "stroke-width": "1.5",
2132
- onPointerdown: _((t) => Ri(t, a.id, e), ["stop", "prevent"]),
2133
- onPointermove: _(Ji, ["stop"]),
2134
- onPointerup: _(Yi, ["stop"]),
2135
- onPointercancel: _(Yi, ["stop"]),
2136
- onLostpointercapture: Yi,
2137
- onMousedown: o[0] ||= _(() => {}, ["stop", "prevent"]),
2138
- onClick: o[1] ||= _(() => {}, ["stop"])
2139
- }, null, 40, jt))), 128))])) : n("", !0)
2140
- ], 46, ft))), 128)),
2141
- Pi.value ? (d(), r("g", Mt, [(d(!0), r(e, null, p(Oi(Pi.value), (e) => (d(), r("rect", {
2214
+ onPointerdown: g((t) => Gi(t, a.id, e), ["stop", "prevent"]),
2215
+ onPointermove: g(ea, ["stop"]),
2216
+ onPointerup: g(ta, ["stop"]),
2217
+ onPointercancel: g(ta, ["stop"]),
2218
+ onLostpointercapture: ta,
2219
+ onMousedown: o[0] ||= g(() => {}, ["stop", "prevent"]),
2220
+ onClick: o[1] ||= g(() => {}, ["stop"])
2221
+ }, null, 40, Pt))), 128))])) : n("", !0)
2222
+ ], 46, ht))), 128)),
2223
+ Vi.value ? (d(), r("g", Ft, [(d(!0), r(e, null, p(Fi(Vi.value), (e) => (d(), r("rect", {
2142
2224
  key: e.side,
2143
- x: Pi.value.x + e.x - 4.5,
2144
- y: Pi.value.y + e.y - 4.5,
2225
+ x: Vi.value.x + e.x - 4.5,
2226
+ y: Vi.value.y + e.y - 4.5,
2145
2227
  width: "9",
2146
2228
  height: "9",
2147
2229
  rx: "2",
2148
2230
  class: s(["node-resize-handle", `rt-${e.side}`]),
2149
- onMousedown: _((t) => Ai(t, Pi.value, e.side), ["stop", "prevent"]),
2150
- onClick: o[2] ||= _(() => {}, ["stop"])
2151
- }, null, 42, Nt))), 128))])) : n("", !0),
2152
- dr.value ? (d(!0), r(e, { key: 5 }, p(W.value, (t) => (d(), r(e, { key: `front-${t.id}` }, [ir(t) ? (d(), r("g", Pt, [i("path", {
2153
- d: $(t),
2154
- fill: "none",
2155
- stroke: fr.value,
2156
- "stroke-width": "7",
2157
- "stroke-linecap": "round",
2158
- opacity: "0.9"
2159
- }, null, 8, Ft), i("path", {
2231
+ onMousedown: g((t) => Li(t, Vi.value, e.side), ["stop", "prevent"]),
2232
+ onClick: o[2] ||= g(() => {}, ["stop"])
2233
+ }, null, 42, It))), 128))])) : n("", !0),
2234
+ dr.value ? (d(!0), r(e, { key: 5 }, p(G.value, (t) => (d(), r(e, { key: `front-${t.id}` }, [ar(t) ? (d(), r("g", Lt, [i("path", {
2160
2235
  d: $(t),
2161
2236
  fill: "none",
2162
2237
  stroke: Q(t),
2163
2238
  "stroke-width": "2.5",
2164
2239
  "stroke-linecap": "round",
2165
- "marker-end": ua(t)
2166
- }, null, 8, It)])) : n("", !0)], 64))), 128)) : n("", !0),
2167
- K.value ? (d(), r("rect", {
2240
+ "marker-end": ga(t)
2241
+ }, null, 8, Rt)])) : n("", !0)], 64))), 128)) : n("", !0),
2242
+ q.value ? (d(), r("rect", {
2168
2243
  key: 6,
2169
2244
  class: "marquee-box",
2170
- x: Ur.value.x,
2171
- y: Ur.value.y,
2172
- width: Ur.value.width,
2173
- height: Ur.value.height,
2245
+ x: Hr.value.x,
2246
+ y: Hr.value.y,
2247
+ width: Hr.value.width,
2248
+ height: Hr.value.height,
2174
2249
  rx: "2",
2175
2250
  "vector-effect": "non-scaling-stroke"
2176
- }, null, 8, Lt)) : n("", !0)
2177
- ], 44, oe));
2251
+ }, null, 8, zt)) : n("", !0)
2252
+ ], 44, se));
2178
2253
  }
2179
- }, Xt = { install(e) {
2180
- e.component("Topology", Yt);
2254
+ }, Qt = { install(e) {
2255
+ e.component("Topology", Zt);
2181
2256
  } };
2182
2257
  //#endregion
2183
- export { Yt as Topology, Xt as default, ae as nodeColors, x as nodeStates };
2258
+ export { Zt as Topology, Qt as default, oe as nodeColors, b as nodeStates };