mind-elixir 5.0.4 → 5.0.6

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.
@@ -1,7 +1,7 @@
1
1
  var at = Object.defineProperty;
2
2
  var dt = (e, t, n) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var z = (e, t, n) => (dt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- const ge = {
3
+ var V = (e, t, n) => (dt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ const me = {
5
5
  name: "Latte",
6
6
  type: "light",
7
7
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
@@ -26,7 +26,7 @@ const ge = {
26
26
  "--panel-border-color": "#eaeaea",
27
27
  "--map-padding": "50px"
28
28
  }
29
- }, me = {
29
+ }, ve = {
30
30
  name: "Dark",
31
31
  type: "dark",
32
32
  palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
@@ -67,26 +67,26 @@ const oe = function(e, t) {
67
67
  return null;
68
68
  } else
69
69
  return null;
70
- }, $ = (e, t) => {
70
+ }, j = (e, t) => {
71
71
  if (e.parent = t, e.children)
72
72
  for (let n = 0; n < e.children.length; n++)
73
- $(e.children[n], e);
74
- }, V = (e, t, n) => {
73
+ j(e.children[n], e);
74
+ }, q = (e, t, n) => {
75
75
  if (e.expanded = t, e.children)
76
76
  if (n === void 0 || n > 0) {
77
77
  const o = n !== void 0 ? n - 1 : void 0;
78
78
  e.children.forEach((i) => {
79
- V(i, t, o);
79
+ q(i, t, o);
80
80
  });
81
81
  } else
82
82
  e.children.forEach((o) => {
83
- V(o, !1);
83
+ q(o, !1);
84
84
  });
85
85
  };
86
- function ve(e) {
86
+ function be(e) {
87
87
  if (e.id = K(), e.children)
88
88
  for (let t = 0; t < e.children.length; t++)
89
- ve(e.children[t]);
89
+ be(e.children[t]);
90
90
  }
91
91
  function ie(e, t, n, o) {
92
92
  const i = o - t, s = e - n;
@@ -94,12 +94,12 @@ function ie(e, t, n, o) {
94
94
  if (isNaN(r))
95
95
  return;
96
96
  s < 0 && i > 0 && (r = 180 - r), s < 0 && i < 0 && (r = 180 + r), s > 0 && i < 0 && (r = 360 - r);
97
- const l = 12, d = 30, a = r + d, f = r - d;
97
+ const c = 12, l = 30, d = r + l, f = r - l;
98
98
  return {
99
- x1: n + Math.cos(Math.PI * a / 180) * l,
100
- y1: o - Math.sin(Math.PI * a / 180) * l,
101
- x2: n + Math.cos(Math.PI * f / 180) * l,
102
- y2: o - Math.sin(Math.PI * f / 180) * l
99
+ x1: n + Math.cos(Math.PI * d / 180) * c,
100
+ y1: o - Math.sin(Math.PI * d / 180) * c,
101
+ x2: n + Math.cos(Math.PI * f / 180) * c,
102
+ y2: o - Math.sin(Math.PI * f / 180) * c
103
103
  };
104
104
  }
105
105
  function K() {
@@ -112,7 +112,7 @@ const ht = function() {
112
112
  id: e
113
113
  };
114
114
  };
115
- function be(e) {
115
+ function ye(e) {
116
116
  return JSON.parse(
117
117
  JSON.stringify(e, (n, o) => {
118
118
  if (n !== "parent")
@@ -125,10 +125,10 @@ const H = (e, t) => {
125
125
  for (; t && t !== e; )
126
126
  n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
127
127
  return { offsetLeft: n, offsetTop: o };
128
- }, S = (e, t) => {
128
+ }, N = (e, t) => {
129
129
  for (const n in t)
130
130
  e.setAttribute(n, t[n]);
131
- }, he = (e) => e ? e.tagName === "ME-TPC" : !1, ce = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
131
+ }, he = (e) => e ? e.tagName === "ME-TPC" : !1, le = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
132
132
  for (let i = 0; i < o.length; i++) {
133
133
  if (t === o[i])
134
134
  continue;
@@ -140,7 +140,7 @@ const H = (e, t) => {
140
140
  }), Ge = (e) => {
141
141
  const t = /translate\(([^,]+),\s*([^)]+)\)/, n = e.match(t);
142
142
  return n ? { x: parseFloat(n[1]), y: parseFloat(n[2]) } : { x: 0, y: 0 };
143
- }, ye = function(e) {
143
+ }, we = function(e) {
144
144
  for (let t = 0; t < e.length; t++) {
145
145
  const { dom: n, evt: o, func: i } = e[t];
146
146
  n.addEventListener(o, i);
@@ -173,14 +173,14 @@ const ut = (e) => {
173
173
  const o = n.firstChild.firstChild.firstChild;
174
174
  e.selectNode(o);
175
175
  }
176
- }, _e = function(e, t) {
176
+ }, Te = function(e, t) {
177
177
  var s, r;
178
178
  const n = e.currentNode || ((s = e.currentNodes) == null ? void 0 : s[0]);
179
179
  if (!n)
180
180
  return;
181
181
  const o = n.nodeObj, i = n.offsetParent.offsetParent.parentElement;
182
182
  o.parent ? i.className === t ? mt(e, n) : (r = o.parent) != null && r.parent ? gt(e, n) : pt(e) : t === M.LHS ? ut(e) : ft(e);
183
- }, Te = function(e, t) {
183
+ }, Le = function(e, t) {
184
184
  const n = e.currentNode;
185
185
  if (!n || !n.nodeObj.parent)
186
186
  return;
@@ -202,21 +202,21 @@ function vt(e, t) {
202
202
  e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNodes && e.removeNodes(e.currentNodes);
203
203
  };
204
204
  let o = !1, i = null;
205
- const s = (l) => {
206
- const d = e.nodeData;
207
- if (l.key === "0")
208
- for (const a of d.children)
209
- V(a, !1);
210
- if (l.key === "=")
211
- for (const a of d.children)
212
- V(a, !0);
213
- if (["1", "2", "3", "4", "5", "6", "7", "8", "9"].includes(l.key))
214
- for (const a of d.children)
215
- V(a, !0, Number(l.key) - 1);
205
+ const s = (c) => {
206
+ const l = e.nodeData;
207
+ if (c.key === "0")
208
+ for (const d of l.children)
209
+ q(d, !1);
210
+ if (c.key === "=")
211
+ for (const d of l.children)
212
+ q(d, !0);
213
+ if (["1", "2", "3", "4", "5", "6", "7", "8", "9"].includes(c.key))
214
+ for (const d of l.children)
215
+ q(d, !0, Number(c.key) - 1);
216
216
  e.refresh(), e.toCenter(), o = !1, i && (clearTimeout(i), i = null, e.container.removeEventListener("keydown", s));
217
217
  }, r = {
218
- Enter: (l) => {
219
- l.shiftKey ? e.insertSibling("before") : l.ctrlKey ? e.insertParent() : e.insertSibling("after");
218
+ Enter: (c) => {
219
+ c.shiftKey ? e.insertSibling("before") : c.ctrlKey || c.metaKey ? e.insertParent() : e.insertSibling("after");
220
220
  },
221
221
  Tab: () => {
222
222
  e.addChild();
@@ -227,56 +227,56 @@ function vt(e, t) {
227
227
  F2: () => {
228
228
  e.beginEdit();
229
229
  },
230
- ArrowUp: (l) => {
231
- if (l.altKey)
230
+ ArrowUp: (c) => {
231
+ if (c.altKey)
232
232
  e.moveUpNode();
233
233
  else {
234
- if (l.metaKey || l.ctrlKey)
234
+ if (c.metaKey || c.ctrlKey)
235
235
  return e.initSide();
236
- Te(e, "previous");
236
+ Le(e, "previous");
237
237
  }
238
238
  },
239
- ArrowDown: (l) => {
240
- l.altKey ? e.moveDownNode() : Te(e, "next");
239
+ ArrowDown: (c) => {
240
+ c.altKey ? e.moveDownNode() : Le(e, "next");
241
241
  },
242
- ArrowLeft: (l) => {
243
- if (l.metaKey || l.ctrlKey)
242
+ ArrowLeft: (c) => {
243
+ if (c.metaKey || c.ctrlKey)
244
244
  return e.initLeft();
245
- _e(e, M.LHS);
245
+ Te(e, M.LHS);
246
246
  },
247
- ArrowRight: (l) => {
248
- if (l.metaKey || l.ctrlKey)
247
+ ArrowRight: (c) => {
248
+ if (c.metaKey || c.ctrlKey)
249
249
  return e.initRight();
250
- _e(e, M.RHS);
250
+ Te(e, M.RHS);
251
251
  },
252
252
  PageUp: () => e.moveUpNode(),
253
253
  PageDown: () => {
254
254
  e.moveDownNode();
255
255
  },
256
- c: (l) => {
257
- (l.metaKey || l.ctrlKey) && (e.waitCopy = e.currentNodes);
256
+ c: (c) => {
257
+ (c.metaKey || c.ctrlKey) && (e.waitCopy = e.currentNodes);
258
258
  },
259
- x: (l) => {
260
- (l.metaKey || l.ctrlKey) && (e.waitCopy = e.currentNodes, n());
259
+ x: (c) => {
260
+ (c.metaKey || c.ctrlKey) && (e.waitCopy = e.currentNodes, n());
261
261
  },
262
- v: (l) => {
263
- !e.waitCopy || !e.currentNode || (l.metaKey || l.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
262
+ v: (c) => {
263
+ !e.waitCopy || !e.currentNode || (c.metaKey || c.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
264
264
  },
265
- "=": (l) => {
266
- (l.metaKey || l.ctrlKey) && se(e, "in");
265
+ "=": (c) => {
266
+ (c.metaKey || c.ctrlKey) && se(e, "in");
267
267
  },
268
- "-": (l) => {
269
- (l.metaKey || l.ctrlKey) && se(e, "out");
268
+ "-": (c) => {
269
+ (c.metaKey || c.ctrlKey) && se(e, "out");
270
270
  },
271
- 0: (l) => {
272
- if (l.metaKey || l.ctrlKey) {
271
+ 0: (c) => {
272
+ if (c.metaKey || c.ctrlKey) {
273
273
  if (o)
274
274
  return;
275
275
  e.scale(1);
276
276
  }
277
277
  },
278
- k: (l) => {
279
- (l.metaKey || l.ctrlKey) && (o = !0, i && (clearTimeout(i), e.container.removeEventListener("keydown", s)), i = window.setTimeout(() => {
278
+ k: (c) => {
279
+ (c.metaKey || c.ctrlKey) && (o = !0, i && (clearTimeout(i), e.container.removeEventListener("keydown", s)), i = window.setTimeout(() => {
280
280
  o = !1, i = null;
281
281
  }, 2e3), e.container.addEventListener("keydown", s));
282
282
  },
@@ -284,17 +284,17 @@ function vt(e, t) {
284
284
  Backspace: n,
285
285
  ...t
286
286
  };
287
- e.container.onkeydown = (l) => {
288
- if (l.preventDefault(), !e.editable)
287
+ e.container.onkeydown = (c) => {
288
+ if (c.preventDefault(), !e.editable)
289
289
  return;
290
- const d = r[l.key];
291
- d && d(l);
290
+ const l = r[c.key];
291
+ l && l(c);
292
292
  };
293
293
  }
294
294
  function bt(e) {
295
- const { dragMoveHelper: t } = e, n = (h) => {
295
+ const { dragMoveHelper: t } = e, n = (u) => {
296
296
  var m, v, b;
297
- if (h.button !== 0)
297
+ if (u.button !== 0)
298
298
  return;
299
299
  if ((m = e.helper1) != null && m.moved) {
300
300
  e.helper1.clear();
@@ -308,69 +308,69 @@ function bt(e) {
308
308
  t.clear();
309
309
  return;
310
310
  }
311
- const c = h.target;
312
- if (c.tagName === "ME-EPD")
313
- h.ctrlKey || h.metaKey ? e.expandNodeAll(c.previousSibling) : e.expandNode(c.previousSibling);
314
- else if (c.tagName === "ME-TPC" && e.currentNodes.length > 1)
315
- e.selectNode(c);
311
+ const a = u.target;
312
+ if (a.tagName === "ME-EPD")
313
+ u.ctrlKey || u.metaKey ? e.expandNodeAll(a.previousSibling) : e.expandNode(a.previousSibling);
314
+ else if (a.tagName === "ME-TPC" && e.currentNodes.length > 1)
315
+ e.selectNode(a);
316
316
  else if (!e.editable)
317
317
  return;
318
- const p = (b = c.parentElement) == null ? void 0 : b.parentElement;
319
- p.getAttribute("class") === "topiclinks" ? e.selectArrow(c.parentElement) : p.getAttribute("class") === "summary" && e.selectSummary(c.parentElement);
320
- }, o = (h) => {
318
+ const p = (b = a.parentElement) == null ? void 0 : b.parentElement;
319
+ p.getAttribute("class") === "topiclinks" ? e.selectArrow(a.parentElement) : p.getAttribute("class") === "summary" && e.selectSummary(a.parentElement);
320
+ }, o = (u) => {
321
321
  var m;
322
322
  if (!e.editable)
323
323
  return;
324
- const c = h.target;
325
- he(c) && e.beginEdit(c);
326
- const p = (m = c.parentElement) == null ? void 0 : m.parentElement;
327
- p.getAttribute("class") === "topiclinks" ? e.editArrowLabel(c.parentElement) : p.getAttribute("class") === "summary" && e.editSummary(c.parentElement);
324
+ const a = u.target;
325
+ he(a) && e.beginEdit(a);
326
+ const p = (m = a.parentElement) == null ? void 0 : m.parentElement;
327
+ p.getAttribute("class") === "topiclinks" ? e.editArrowLabel(a.parentElement) : p.getAttribute("class") === "summary" && e.editSummary(a.parentElement);
328
328
  };
329
329
  let i = 0;
330
- const s = (h) => {
331
- if (h.pointerType === "mouse")
330
+ const s = (u) => {
331
+ if (u.pointerType === "mouse")
332
332
  return;
333
- const c = (/* @__PURE__ */ new Date()).getTime(), p = c - i;
334
- p < 300 && p > 0 && o(h), i = c;
335
- }, r = (h) => {
333
+ const a = (/* @__PURE__ */ new Date()).getTime(), p = a - i;
334
+ p < 300 && p > 0 && o(u), i = a;
335
+ }, r = (u) => {
336
336
  t.moved = !1;
337
- const c = e.mouseSelectionButton === 0 ? 2 : 0;
338
- if (h.button !== c && h.pointerType === "mouse")
337
+ const a = e.mouseSelectionButton === 0 ? 2 : 0;
338
+ if (u.button !== a && u.pointerType === "mouse")
339
339
  return;
340
- t.x = h.clientX, t.y = h.clientY;
341
- const p = h.target;
342
- p.className !== "circle" && p.contentEditable !== "plaintext-only" && (t.mousedown = !0, e.map.style.transition = "none", p.setPointerCapture(h.pointerId));
343
- }, l = (h) => {
344
- if (h.target.contentEditable !== "plaintext-only") {
345
- const c = h.clientX - t.x, p = h.clientY - t.y;
346
- t.onMove(c, p);
340
+ t.x = u.clientX, t.y = u.clientY;
341
+ const p = u.target;
342
+ p.className !== "circle" && p.contentEditable !== "plaintext-only" && (t.mousedown = !0, p.setPointerCapture(u.pointerId));
343
+ }, c = (u) => {
344
+ if (u.target.contentEditable !== "plaintext-only") {
345
+ const a = u.clientX - t.x, p = u.clientY - t.y;
346
+ t.onMove(a, p);
347
347
  }
348
- t.x = h.clientX, t.y = h.clientY;
349
- }, d = (h) => {
350
- const c = e.mouseSelectionButton === 0 ? 2 : 0;
351
- if (h.button !== c && h.pointerType === "mouse")
348
+ t.x = u.clientX, t.y = u.clientY;
349
+ }, l = (u) => {
350
+ const a = e.mouseSelectionButton === 0 ? 2 : 0;
351
+ if (u.button !== a && u.pointerType === "mouse")
352
352
  return;
353
- const p = h.target;
354
- p.hasPointerCapture && p.hasPointerCapture(h.pointerId) && p.releasePointerCapture(h.pointerId), t.clear();
355
- }, a = (h) => {
356
- if (h.preventDefault(), h.button !== 2 || !e.editable)
353
+ const p = u.target;
354
+ p.hasPointerCapture && p.hasPointerCapture(u.pointerId) && p.releasePointerCapture(u.pointerId), t.clear();
355
+ }, d = (u) => {
356
+ if (u.preventDefault(), u.button !== 2 || !e.editable)
357
357
  return;
358
- const c = h.target;
359
- he(c) && !c.classList.contains("selected") && e.selectNode(c), setTimeout(() => {
360
- e.dragMoveHelper.moved || e.bus.fire("showContextMenu", h);
358
+ const a = u.target;
359
+ he(a) && !a.classList.contains("selected") && e.selectNode(a), setTimeout(() => {
360
+ e.dragMoveHelper.moved || e.bus.fire("showContextMenu", u);
361
361
  }, 200);
362
- }, f = (h) => {
363
- h.stopPropagation(), h.preventDefault(), h.ctrlKey || h.metaKey ? h.deltaY < 0 ? se(e, "in", e.dragMoveHelper) : e.scaleVal - e.scaleSensitivity > 0 && se(e, "out", e.dragMoveHelper) : h.shiftKey ? e.move(-h.deltaY, 0) : (e.map.style.transition = "none", e.move(-h.deltaX, -h.deltaY), e.map.style.transition = "transform 0.3s");
364
- }, { container: u } = e;
365
- return ye([
366
- { dom: u, evt: "pointerdown", func: r },
367
- { dom: u, evt: "pointermove", func: l },
368
- { dom: u, evt: "pointerup", func: d },
369
- { dom: u, evt: "pointerup", func: s },
370
- { dom: u, evt: "click", func: n },
371
- { dom: u, evt: "dblclick", func: o },
372
- { dom: u, evt: "contextmenu", func: a },
373
- { dom: u, evt: "wheel", func: typeof e.handleWheel == "function" ? e.handleWheel : f }
362
+ }, f = (u) => {
363
+ u.stopPropagation(), u.preventDefault(), u.ctrlKey || u.metaKey ? u.deltaY < 0 ? se(e, "in", e.dragMoveHelper) : e.scaleVal - e.scaleSensitivity > 0 && se(e, "out", e.dragMoveHelper) : u.shiftKey ? e.move(-u.deltaY, 0) : e.move(-u.deltaX, -u.deltaY);
364
+ }, { container: h } = e;
365
+ return we([
366
+ { dom: h, evt: "pointerdown", func: r },
367
+ { dom: h, evt: "pointermove", func: c },
368
+ { dom: h, evt: "pointerup", func: l },
369
+ { dom: h, evt: "pointerup", func: s },
370
+ { dom: h, evt: "click", func: n },
371
+ { dom: h, evt: "dblclick", func: o },
372
+ { dom: h, evt: "contextmenu", func: d },
373
+ { dom: h, evt: "wheel", func: typeof e.handleWheel == "function" ? e.handleWheel : f }
374
374
  ]);
375
375
  }
376
376
  function yt() {
@@ -401,7 +401,7 @@ function yt() {
401
401
  const re = document, wt = function() {
402
402
  this.nodes.innerHTML = "";
403
403
  const e = this.createTopic(this.nodeData);
404
- we(e, this.nodeData), e.draggable = !1;
404
+ xe(e, this.nodeData), e.draggable = !1;
405
405
  const t = re.createElement("me-root");
406
406
  t.appendChild(e);
407
407
  const n = this.nodeData.children || [];
@@ -418,8 +418,8 @@ const re = document, wt = function() {
418
418
  const i = re.createElement("me-main");
419
419
  i.className = M.RHS;
420
420
  for (let s = 0; s < t.length; s++) {
421
- const r = t[s], { grp: l } = e.createWrapper(r);
422
- e.direction === 2 ? r.direction === 0 ? o.appendChild(l) : i.appendChild(l) : e.direction === 0 ? o.appendChild(l) : i.appendChild(l);
421
+ const r = t[s], { grp: c } = e.createWrapper(r);
422
+ e.direction === 2 ? r.direction === 0 ? o.appendChild(c) : i.appendChild(c) : e.direction === 0 ? o.appendChild(c) : i.appendChild(c);
423
423
  }
424
424
  e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
425
425
  }, Et = function(e, t) {
@@ -429,12 +429,12 @@ const re = document, wt = function() {
429
429
  n.appendChild(s);
430
430
  }
431
431
  return n;
432
- }, L = document, Ve = function(e, t) {
432
+ }, T = document, qe = function(e, t) {
433
433
  const o = (this != null && this.el ? this.el : t || document).querySelector(`[data-nodeid="me${e}"]`);
434
434
  if (!o)
435
435
  throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
436
436
  return o;
437
- }, we = function(e, t) {
437
+ }, xe = function(e, t) {
438
438
  if (e.innerHTML = "", t.style) {
439
439
  const n = t.style;
440
440
  for (const o in n)
@@ -447,34 +447,34 @@ const re = document, wt = function() {
447
447
  if (t.image) {
448
448
  const n = t.image;
449
449
  if (n.url && n.width && n.height) {
450
- const o = L.createElement("img");
450
+ const o = T.createElement("img");
451
451
  o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit), e.appendChild(o), e.image = o;
452
452
  }
453
453
  } else
454
454
  e.image && (e.image = void 0);
455
455
  {
456
- const n = L.createElement("span");
456
+ const n = T.createElement("span");
457
457
  n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
458
458
  }
459
459
  if (t.hyperLink) {
460
- const n = L.createElement("a");
460
+ const n = T.createElement("a");
461
461
  n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.link = n;
462
462
  } else
463
463
  e.link && (e.link = void 0);
464
464
  if (t.icons && t.icons.length) {
465
- const n = L.createElement("span");
465
+ const n = T.createElement("span");
466
466
  n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
467
467
  } else
468
468
  e.icons && (e.icons = void 0);
469
469
  if (t.tags && t.tags.length) {
470
- const n = L.createElement("div");
470
+ const n = T.createElement("div");
471
471
  n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
472
472
  } else
473
473
  e.tags && (e.tags = void 0);
474
474
  }, Ct = function(e, t) {
475
- const n = L.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
475
+ const n = T.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
476
476
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
477
- const s = xe(e.expanded);
477
+ const s = Ee(e.expanded);
478
478
  if (o.appendChild(s), e.expanded !== !1) {
479
479
  const r = Et(this, e.children);
480
480
  n.appendChild(r);
@@ -482,17 +482,17 @@ const re = document, wt = function() {
482
482
  }
483
483
  return { grp: n, top: o, tpc: i };
484
484
  }, St = function(e) {
485
- const t = L.createElement("me-parent"), n = this.createTopic(e);
486
- return we(n, e), t.appendChild(n), { p: t, tpc: n };
485
+ const t = T.createElement("me-parent"), n = this.createTopic(e);
486
+ return xe(n, e), t.appendChild(n), { p: t, tpc: n };
487
487
  }, Nt = function(e) {
488
- const t = L.createElement("me-children");
488
+ const t = T.createElement("me-children");
489
489
  return t.append(...e), t;
490
490
  }, kt = function(e) {
491
- const t = L.createElement("me-tpc");
491
+ const t = T.createElement("me-tpc");
492
492
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
493
493
  };
494
- function qe(e) {
495
- const t = L.createRange();
494
+ function ze(e) {
495
+ const t = T.createRange();
496
496
  t.selectNodeContents(e);
497
497
  const n = window.getSelection();
498
498
  n && (n.removeAllRanges(), n.addRange(t));
@@ -500,7 +500,7 @@ function qe(e) {
500
500
  const _t = function(e) {
501
501
  if (!e)
502
502
  return;
503
- const t = L.createElement("div"), n = e.text.textContent;
503
+ const t = T.createElement("div"), n = e.text.textContent;
504
504
  e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "plaintext-only", t.spellcheck = !1;
505
505
  const o = getComputedStyle(e);
506
506
  t.style.cssText = `min-width:${e.offsetWidth - 8}px;
@@ -509,7 +509,7 @@ const _t = function(e) {
509
509
  margin:${o.margin};
510
510
  font:${o.font};
511
511
  background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
512
- border-radius:${o.borderRadius};`, this.direction === 0 && (t.style.right = "0"), qe(t), this.bus.fire("operation", {
512
+ border-radius:${o.borderRadius};`, this.direction === 0 && (t.style.right = "0"), ze(t), this.bus.fire("operation", {
513
513
  name: "beginEdit",
514
514
  obj: e.nodeObj
515
515
  }), t.addEventListener("keydown", (i) => {
@@ -531,25 +531,33 @@ const _t = function(e) {
531
531
  origin: n
532
532
  }));
533
533
  });
534
- }, xe = function(e) {
535
- const t = L.createElement("me-epd");
534
+ }, Ee = function(e) {
535
+ const t = T.createElement("me-epd");
536
536
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
537
- }, W = document, _ = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
538
- const o = W.createElementNS(_, "path");
539
- return S(o, {
537
+ }, I = document, L = "http://www.w3.org/2000/svg", ue = function(e, t, n, o = {}) {
538
+ const { anchor: i = "middle", color: s, dataType: r } = o, c = document.createElementNS(L, "text");
539
+ return N(c, {
540
+ "text-anchor": i,
541
+ x: t + "",
542
+ y: n + "",
543
+ fill: s || (i === "middle" ? "rgb(235, 95, 82)" : "#666")
544
+ }), r && (c.dataset.type = r), c.innerHTML = e, c;
545
+ }, Ve = function(e, t, n) {
546
+ const o = I.createElementNS(L, "path");
547
+ return N(o, {
540
548
  d: e,
541
549
  stroke: t || "#666",
542
550
  fill: "none",
543
551
  "stroke-width": n
544
552
  }), o;
545
553
  }, X = function(e) {
546
- const t = W.createElementNS(_, "svg");
554
+ const t = I.createElementNS(L, "svg");
547
555
  return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
548
- }, Le = function() {
549
- const e = W.createElementNS(_, "line");
556
+ }, Ae = function() {
557
+ const e = I.createElementNS(L, "line");
550
558
  return e.setAttribute("stroke", "#4dc4ff"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e.setAttribute("opacity", "0.45"), e;
551
559
  }, Tt = function(e, t, n, o) {
552
- const i = W.createElementNS(_, "g");
560
+ const i = I.createElementNS(L, "g");
553
561
  return [
554
562
  {
555
563
  name: "line",
@@ -563,27 +571,27 @@ const _t = function(e) {
563
571
  name: "arrow2",
564
572
  d: n
565
573
  }
566
- ].forEach((r, l) => {
567
- const d = r.d, a = W.createElementNS(_, "path"), f = {
568
- d,
574
+ ].forEach((r, c) => {
575
+ const l = r.d, d = I.createElementNS(L, "path"), f = {
576
+ d: l,
569
577
  stroke: (o == null ? void 0 : o.stroke) || "rgb(235, 95, 82)",
570
578
  fill: "none",
571
579
  "stroke-linecap": (o == null ? void 0 : o.strokeLinecap) || "cap",
572
580
  "stroke-width": String((o == null ? void 0 : o.strokeWidth) || "2")
573
581
  };
574
- (o == null ? void 0 : o.opacity) !== void 0 && (f.opacity = String(o.opacity)), S(a, f), l === 0 && a.setAttribute("stroke-dasharray", (o == null ? void 0 : o.strokeDasharray) || "8,2");
575
- const u = W.createElementNS(_, "path");
576
- S(u, {
577
- d,
582
+ (o == null ? void 0 : o.opacity) !== void 0 && (f.opacity = String(o.opacity)), N(d, f), c === 0 && d.setAttribute("stroke-dasharray", (o == null ? void 0 : o.strokeDasharray) || "8,2");
583
+ const h = I.createElementNS(L, "path");
584
+ N(h, {
585
+ d: l,
578
586
  stroke: "transparent",
579
587
  fill: "none",
580
588
  "stroke-width": "15"
581
- }), i.appendChild(u), i.appendChild(a), i[r.name] = a;
589
+ }), i.appendChild(h), i.appendChild(d), i[r.name] = d;
582
590
  }), i;
583
591
  }, Ue = function(e, t, n) {
584
592
  if (!t)
585
593
  return;
586
- const o = W.createElement("div");
594
+ const o = I.createElement("div");
587
595
  e.nodes.appendChild(o);
588
596
  const i = t.innerHTML;
589
597
  o.id = "input-box", o.textContent = i, o.contentEditable = "plaintext-only", o.spellcheck = !1;
@@ -595,19 +603,19 @@ const _t = function(e) {
595
603
  top:${s.y}px;
596
604
  padding: 2px 4px;
597
605
  margin: -2px -4px;
598
- `, qe(o), e.scrollIntoView(o), o.addEventListener("keydown", (r) => {
606
+ `, ze(o), e.scrollIntoView(o), o.addEventListener("keydown", (r) => {
599
607
  r.stopPropagation();
600
- const l = r.key;
601
- if (l === "Enter" || l === "Tab") {
608
+ const c = r.key;
609
+ if (c === "Enter" || c === "Tab") {
602
610
  if (r.shiftKey)
603
611
  return;
604
612
  r.preventDefault(), o.blur(), e.container.focus();
605
613
  }
606
614
  }), o.addEventListener("blur", () => {
607
- var l;
615
+ var c;
608
616
  if (!o)
609
617
  return;
610
- const r = ((l = o.textContent) == null ? void 0 : l.trim()) || "";
618
+ const r = ((c = o.textContent) == null ? void 0 : c.trim()) || "";
611
619
  r === "" ? n.label = i : n.label = r, o.remove(), r !== i && (t.innerHTML = n.label, e.linkDiv(), "parent" in n ? e.bus.fire("operation", {
612
620
  name: "finishEditSummary",
613
621
  obj: n
@@ -619,31 +627,31 @@ const _t = function(e) {
619
627
  }, Lt = function(e) {
620
628
  const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, i = t.offsetWidth, s = t.offsetHeight, r = this.map.querySelectorAll("me-main > me-wrapper");
621
629
  this.lines.innerHTML = "";
622
- for (let l = 0; l < r.length; l++) {
623
- const d = r[l], a = d.querySelector("me-tpc"), { offsetLeft: f, offsetTop: u } = H(this.nodes, a), g = a.offsetWidth, h = a.offsetHeight, c = d.parentNode.className, p = this.generateMainBranch({ pT: n, pL: o, pW: i, pH: s, cT: u, cL: f, cW: g, cH: h, direction: c, containerHeight: this.nodes.offsetHeight }), m = this.theme.palette, v = a.nodeObj.branchColor || m[l % m.length];
624
- if (a.style.borderColor = v, this.lines.appendChild(ze(p, v, "3")), e && e !== d)
630
+ for (let c = 0; c < r.length; c++) {
631
+ const l = r[c], d = l.querySelector("me-tpc"), { offsetLeft: f, offsetTop: h } = H(this.nodes, d), g = d.offsetWidth, u = d.offsetHeight, a = l.parentNode.className, p = this.generateMainBranch({ pT: n, pL: o, pW: i, pH: s, cT: h, cL: f, cW: g, cH: u, direction: a, containerHeight: this.nodes.offsetHeight }), m = this.theme.palette, v = d.nodeObj.branchColor || m[c % m.length];
632
+ if (d.style.borderColor = v, this.lines.appendChild(Ve(p, v, "3")), e && e !== l)
625
633
  continue;
626
- const b = X("subLines"), x = d.lastChild;
627
- x.tagName === "svg" && x.remove(), d.appendChild(b), Xe(this, b, v, d, c, !0);
634
+ const b = X("subLines"), x = l.lastChild;
635
+ x.tagName === "svg" && x.remove(), l.appendChild(b), Xe(this, b, v, l, a, !0);
628
636
  }
629
637
  this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
630
638
  }, Xe = function(e, t, n, o, i, s) {
631
- const r = o.firstChild, l = o.children[1].children;
632
- if (l.length === 0)
639
+ const r = o.firstChild, c = o.children[1].children;
640
+ if (c.length === 0)
633
641
  return;
634
- const d = r.offsetTop, a = r.offsetLeft, f = r.offsetWidth, u = r.offsetHeight;
635
- for (let g = 0; g < l.length; g++) {
636
- const h = l[g], c = h.firstChild, p = c.offsetTop, m = c.offsetLeft, v = c.offsetWidth, b = c.offsetHeight, x = c.firstChild.nodeObj.branchColor || n, N = e.generateSubBranch({ pT: d, pL: a, pW: f, pH: u, cT: p, cL: m, cW: v, cH: b, direction: i, isFirst: s });
637
- t.appendChild(ze(N, x, "2"));
638
- const k = c.children[1];
642
+ const l = r.offsetTop, d = r.offsetLeft, f = r.offsetWidth, h = r.offsetHeight;
643
+ for (let g = 0; g < c.length; g++) {
644
+ const u = c[g], a = u.firstChild, p = a.offsetTop, m = a.offsetLeft, v = a.offsetWidth, b = a.offsetHeight, x = a.firstChild.nodeObj.branchColor || n, C = e.generateSubBranch({ pT: l, pL: d, pW: f, pH: h, cT: p, cL: m, cW: v, cH: b, direction: i, isFirst: s });
645
+ t.appendChild(Ve(C, x, "2"));
646
+ const k = a.children[1];
639
647
  if (k) {
640
648
  if (!k.expanded)
641
649
  continue;
642
650
  } else
643
651
  continue;
644
- Xe(e, t, x, h, i);
652
+ Xe(e, t, x, u, i);
645
653
  }
646
- }, Ae = {
654
+ }, Me = {
647
655
  addChild: "插入子节点",
648
656
  addParent: "插入父节点",
649
657
  addSibling: "插入同级节点",
@@ -656,9 +664,9 @@ const _t = function(e) {
656
664
  linkBidirectional: "双向连接",
657
665
  clickTips: "请点击目标节点",
658
666
  summary: "摘要"
659
- }, Me = {
660
- cn: Ae,
661
- zh_CN: Ae,
667
+ }, De = {
668
+ cn: Me,
669
+ zh_CN: Me,
662
670
  zh_TW: {
663
671
  addChild: "插入子節點",
664
672
  addParent: "插入父節點",
@@ -795,44 +803,44 @@ function At(e, t) {
795
803
  const w = document.createElement("div");
796
804
  return w.innerText = y, w.className = "tips", w;
797
805
  }, o = (y, w, E) => {
798
- const C = document.createElement("li");
799
- return C.id = y, C.innerHTML = `<span>${ne(w)}</span><span ${E ? 'class="key"' : ""}>${ne(E)}</span>`, C;
800
- }, i = Me[e.locale] ? e.locale : "en", s = Me[i], r = o("cm-add_child", s.addChild, "Tab"), l = o("cm-add_parent", s.addParent, "Ctrl + Enter"), d = o("cm-add_sibling", s.addSibling, "Enter"), a = o("cm-remove_child", s.removeNode, "Delete"), f = o("cm-fucus", s.focus, ""), u = o("cm-unfucus", s.cancelFocus, ""), g = o("cm-up", s.moveUp, "PgUp"), h = o("cm-down", s.moveDown, "Pgdn"), c = o("cm-link", s.link, ""), p = o("cm-link-bidirectional", s.linkBidirectional, ""), m = o("cm-summary", s.summary, ""), v = document.createElement("ul");
801
- if (v.className = "menu-list", v.appendChild(r), v.appendChild(l), v.appendChild(d), v.appendChild(a), t.focus && (v.appendChild(f), v.appendChild(u)), v.appendChild(g), v.appendChild(h), v.appendChild(m), t.link && (v.appendChild(c), v.appendChild(p)), t && t.extend)
806
+ const S = document.createElement("li");
807
+ return S.id = y, S.innerHTML = `<span>${ne(w)}</span><span ${E ? 'class="key"' : ""}>${ne(E)}</span>`, S;
808
+ }, i = De[e.locale] ? e.locale : "en", s = De[i], r = o("cm-add_child", s.addChild, "Tab"), c = o("cm-add_parent", s.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", s.addSibling, "Enter"), d = o("cm-remove_child", s.removeNode, "Delete"), f = o("cm-fucus", s.focus, ""), h = o("cm-unfucus", s.cancelFocus, ""), g = o("cm-up", s.moveUp, "PgUp"), u = o("cm-down", s.moveDown, "Pgdn"), a = o("cm-link", s.link, ""), p = o("cm-link-bidirectional", s.linkBidirectional, ""), m = o("cm-summary", s.summary, ""), v = document.createElement("ul");
809
+ if (v.className = "menu-list", v.appendChild(r), v.appendChild(c), v.appendChild(l), v.appendChild(d), t.focus && (v.appendChild(f), v.appendChild(h)), v.appendChild(g), v.appendChild(u), v.appendChild(m), t.link && (v.appendChild(a), v.appendChild(p)), t && t.extend)
802
810
  for (let y = 0; y < t.extend.length; y++) {
803
811
  const w = t.extend[y], E = o(w.name, w.name, w.key || "");
804
- v.appendChild(E), E.onclick = (C) => {
805
- w.onclick(C);
812
+ v.appendChild(E), E.onclick = (S) => {
813
+ w.onclick(S);
806
814
  };
807
815
  }
808
816
  const b = document.createElement("div");
809
817
  b.className = "context-menu", b.appendChild(v), b.hidden = !0, e.container.append(b);
810
818
  let x = !0;
811
- const N = (y) => {
819
+ const C = (y) => {
812
820
  const w = y.target;
813
821
  if (he(w)) {
814
- w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (f.className = "disabled", g.className = "disabled", h.className = "disabled", l.className = "disabled", d.className = "disabled", a.className = "disabled") : (f.className = "", g.className = "", h.className = "", l.className = "", d.className = "", a.className = ""), b.hidden = !1, v.style.top = "", v.style.bottom = "", v.style.left = "", v.style.right = "";
815
- const E = v.getBoundingClientRect(), C = v.offsetHeight, O = v.offsetWidth, B = y.clientY - E.top, R = y.clientX - E.left;
816
- C + B > window.innerHeight ? (v.style.top = "", v.style.bottom = "0px") : (v.style.bottom = "", v.style.top = B + 15 + "px"), O + R > window.innerWidth ? (v.style.left = "", v.style.right = "0px") : (v.style.right = "", v.style.left = R + 10 + "px");
822
+ w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (f.className = "disabled", g.className = "disabled", u.className = "disabled", c.className = "disabled", l.className = "disabled", d.className = "disabled") : (f.className = "", g.className = "", u.className = "", c.className = "", l.className = "", d.className = ""), b.hidden = !1, v.style.top = "", v.style.bottom = "", v.style.left = "", v.style.right = "";
823
+ const E = v.getBoundingClientRect(), S = v.offsetHeight, P = v.offsetWidth, B = y.clientY - E.top, R = y.clientX - E.left;
824
+ S + B > window.innerHeight ? (v.style.top = "", v.style.bottom = "0px") : (v.style.bottom = "", v.style.top = B + 15 + "px"), P + R > window.innerWidth ? (v.style.left = "", v.style.right = "0px") : (v.style.right = "", v.style.left = R + 10 + "px");
817
825
  }
818
826
  };
819
- e.bus.addListener("showContextMenu", N), b.onclick = (y) => {
827
+ e.bus.addListener("showContextMenu", C), b.onclick = (y) => {
820
828
  y.target === b && (b.hidden = !0);
821
829
  }, r.onclick = () => {
822
830
  e.addChild(), b.hidden = !0;
823
- }, l.onclick = () => {
831
+ }, c.onclick = () => {
824
832
  e.insertParent(), b.hidden = !0;
825
- }, d.onclick = () => {
833
+ }, l.onclick = () => {
826
834
  x || (e.insertSibling("after"), b.hidden = !0);
827
- }, a.onclick = () => {
835
+ }, d.onclick = () => {
828
836
  x || (e.removeNodes(e.currentNodes || []), b.hidden = !0);
829
837
  }, f.onclick = () => {
830
838
  x || (e.focusNode(e.currentNode), b.hidden = !0);
831
- }, u.onclick = () => {
839
+ }, h.onclick = () => {
832
840
  e.cancelFocus(), b.hidden = !0;
833
841
  }, g.onclick = () => {
834
842
  x || (e.moveUpNode(), b.hidden = !0);
835
- }, h.onclick = () => {
843
+ }, u.onclick = () => {
836
844
  x || (e.moveDownNode(), b.hidden = !0);
837
845
  };
838
846
  const k = (y) => {
@@ -840,35 +848,35 @@ function At(e, t) {
840
848
  const w = e.currentNode, E = n(s.clickTips);
841
849
  e.container.appendChild(E), e.map.addEventListener(
842
850
  "click",
843
- (C) => {
844
- C.preventDefault(), E.remove();
845
- const O = C.target;
846
- (O.parentElement.tagName === "ME-PARENT" || O.parentElement.tagName === "ME-ROOT") && e.createArrow(w, O, y);
851
+ (S) => {
852
+ S.preventDefault(), E.remove();
853
+ const P = S.target;
854
+ (P.parentElement.tagName === "ME-PARENT" || P.parentElement.tagName === "ME-ROOT") && e.createArrow(w, P, y);
847
855
  },
848
856
  {
849
857
  once: !0
850
858
  }
851
859
  );
852
860
  };
853
- return c.onclick = () => k(), p.onclick = () => k({ bidirectional: !0 }), m.onclick = () => {
861
+ return a.onclick = () => k(), p.onclick = () => k({ bidirectional: !0 }), m.onclick = () => {
854
862
  b.hidden = !0, e.createSummary(), e.unselectNodes(e.currentNodes);
855
863
  }, () => {
856
- r.onclick = null, l.onclick = null, d.onclick = null, a.onclick = null, f.onclick = null, u.onclick = null, g.onclick = null, h.onclick = null, c.onclick = null, m.onclick = null, b.onclick = null, e.container.oncontextmenu = null;
864
+ r.onclick = null, c.onclick = null, l.onclick = null, d.onclick = null, f.onclick = null, h.onclick = null, g.onclick = null, u.onclick = null, a.onclick = null, m.onclick = null, b.onclick = null, e.container.oncontextmenu = null;
857
865
  };
858
866
  }
859
- const ue = document, Mt = function(e, t) {
867
+ const fe = document, Mt = function(e, t) {
860
868
  if (!t)
861
- return fe(e), e;
869
+ return pe(e), e;
862
870
  let n = e.querySelector(".insert-preview");
863
871
  const o = `insert-preview ${t} show`;
864
- return n || (n = ue.createElement("div"), e.appendChild(n)), n.className = o, e;
865
- }, fe = function(e) {
872
+ return n || (n = fe.createElement("div"), e.appendChild(n)), n.className = o, e;
873
+ }, pe = function(e) {
866
874
  if (!e)
867
875
  return;
868
876
  const t = e.querySelectorAll(".insert-preview");
869
877
  for (const n of t || [])
870
878
  n.remove();
871
- }, De = function(e, t) {
879
+ }, Pe = function(e, t) {
872
880
  for (const n of t) {
873
881
  const o = n.parentElement.parentElement.contains(e);
874
882
  if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent))
@@ -879,12 +887,12 @@ const ue = document, Mt = function(e, t) {
879
887
  const t = document.createElement("div");
880
888
  return t.className = "mind-elixir-ghost", e.container.appendChild(t), t;
881
889
  };
882
- class Ot {
890
+ class Pt {
883
891
  constructor(t) {
884
- z(this, "mind");
885
- z(this, "isMoving", !1);
886
- z(this, "interval", null);
887
- z(this, "speed", 20);
892
+ V(this, "mind");
893
+ V(this, "isMoving", !1);
894
+ V(this, "interval", null);
895
+ V(this, "speed", 20);
888
896
  this.mind = t;
889
897
  }
890
898
  move(t, n) {
@@ -896,59 +904,59 @@ class Ot {
896
904
  this.isMoving = !1, clearInterval(this.interval);
897
905
  }
898
906
  }
899
- function jt(e) {
907
+ function $t(e) {
900
908
  let t = null, n = null;
901
- const o = Dt(e), i = new Ot(e), s = (a) => {
909
+ const o = Dt(e), i = new Pt(e), s = (d) => {
902
910
  e.selection.cancel();
903
- const f = a.target;
911
+ const f = d.target;
904
912
  if ((f == null ? void 0 : f.tagName) !== "ME-TPC") {
905
- a.preventDefault();
913
+ d.preventDefault();
906
914
  return;
907
915
  }
908
- let u = e.currentNodes;
909
- u != null && u.includes(f) || (e.selectNode(f), u = e.currentNodes), e.dragged = u, u.length > 1 ? o.innerHTML = u.length + "" : o.innerHTML = f.innerHTML;
910
- for (const g of u)
916
+ let h = e.currentNodes;
917
+ h != null && h.includes(f) || (e.selectNode(f), h = e.currentNodes), e.dragged = h, h.length > 1 ? o.innerHTML = h.length + "" : o.innerHTML = f.innerHTML;
918
+ for (const g of h)
911
919
  g.parentElement.parentElement.style.opacity = "0.5";
912
- a.dataTransfer.setDragImage(o, 0, 0), a.dataTransfer.dropEffect = "move", e.dragMoveHelper.clear();
913
- }, r = (a) => {
920
+ d.dataTransfer.setDragImage(o, 0, 0), d.dataTransfer.dropEffect = "move", e.dragMoveHelper.clear();
921
+ }, r = (d) => {
914
922
  const { dragged: f } = e;
915
923
  if (!f)
916
924
  return;
917
925
  i.stop();
918
926
  for (const g of f)
919
927
  g.parentElement.parentElement.style.opacity = "1";
920
- const u = a.target;
921
- u.style.opacity = "", n && (fe(n), t === "before" ? e.moveNodeBefore(f, n) : t === "after" ? e.moveNodeAfter(f, n) : t === "in" && e.moveNodeIn(f, n), e.dragged = null);
922
- }, l = (a) => {
923
- a.preventDefault();
924
- const f = 12 * e.scaleVal, { dragged: u } = e;
925
- if (!u)
928
+ const h = d.target;
929
+ h.style.opacity = "", n && (pe(n), t === "before" ? e.moveNodeBefore(f, n) : t === "after" ? e.moveNodeAfter(f, n) : t === "in" && e.moveNodeIn(f, n), e.dragged = null, o.innerHTML = "");
930
+ }, c = (d) => {
931
+ d.preventDefault();
932
+ const f = 12 * e.scaleVal, { dragged: h } = e;
933
+ if (!h)
926
934
  return;
927
935
  const g = e.container.getBoundingClientRect();
928
- a.clientX < g.x + 50 ? i.move(1, 0) : a.clientX > g.x + g.width - 50 ? i.move(-1, 0) : a.clientY < g.y + 50 ? i.move(0, 1) : a.clientY > g.y + g.height - 50 ? i.move(0, -1) : i.stop(), fe(n);
929
- const h = ue.elementFromPoint(a.clientX, a.clientY - f);
930
- if (De(h, u)) {
931
- n = h;
932
- const c = h.getBoundingClientRect(), p = c.y;
933
- a.clientY > p + c.height ? t = "after" : t = "in";
936
+ d.clientX < g.x + 50 ? i.move(1, 0) : d.clientX > g.x + g.width - 50 ? i.move(-1, 0) : d.clientY < g.y + 50 ? i.move(0, 1) : d.clientY > g.y + g.height - 50 ? i.move(0, -1) : i.stop(), pe(n);
937
+ const u = fe.elementFromPoint(d.clientX, d.clientY - f);
938
+ if (Pe(u, h)) {
939
+ n = u;
940
+ const a = u.getBoundingClientRect(), p = a.y;
941
+ d.clientY > p + a.height ? t = "after" : t = "in";
934
942
  } else {
935
- const c = ue.elementFromPoint(a.clientX, a.clientY + f), p = c.getBoundingClientRect();
936
- if (De(c, u)) {
937
- n = c;
943
+ const a = fe.elementFromPoint(d.clientX, d.clientY + f), p = a.getBoundingClientRect();
944
+ if (Pe(a, h)) {
945
+ n = a;
938
946
  const m = p.y;
939
- a.clientY < m ? t = "before" : t = "in";
947
+ d.clientY < m ? t = "before" : t = "in";
940
948
  } else
941
949
  t = n = null;
942
950
  }
943
951
  n && Mt(n, t);
944
952
  };
945
- return ye([
953
+ return we([
946
954
  { dom: e.map, evt: "dragstart", func: s },
947
955
  { dom: e.map, evt: "dragend", func: r },
948
- { dom: e.map, evt: "dragover", func: l }
956
+ { dom: e.map, evt: "dragover", func: c }
949
957
  ]);
950
958
  }
951
- const Pt = function(e) {
959
+ const Ot = function(e) {
952
960
  return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
953
961
  type: "summary",
954
962
  value: e.obj.id
@@ -959,18 +967,18 @@ const Pt = function(e) {
959
967
  type: "nodes",
960
968
  value: e.objs.map((t) => t.id)
961
969
  } : {
962
- type: "node",
963
- value: e.obj.id
970
+ type: "nodes",
971
+ value: [e.obj.id]
964
972
  };
965
973
  };
966
- function $t(e) {
967
- let t = [], n = -1, o = e.getData();
974
+ function jt(e) {
975
+ let t = [], n = -1, o = e.getData(), i = [];
968
976
  e.undo = function() {
969
977
  if (n > -1) {
970
- const r = t[n];
971
- o = r.prev, e.refresh(r.prev);
978
+ const l = t[n];
979
+ o = l.prev, e.refresh(l.prev);
972
980
  try {
973
- r.currentObject.type === "node" ? e.selectNode(this.findEle(r.currentObject.value)) : r.currentObject.type === "nodes" && e.selectNodes(r.currentObject.value.map((l) => this.findEle(l)));
981
+ l.currentTarget.type === "nodes" && (l.operation === "removeNodes" ? e.selectNodes(l.currentTarget.value.map((d) => this.findEle(d))) : e.selectNodes(l.currentSelected.map((d) => this.findEle(d))));
974
982
  } catch {
975
983
  } finally {
976
984
  n--;
@@ -979,38 +987,50 @@ function $t(e) {
979
987
  }, e.redo = function() {
980
988
  if (n < t.length - 1) {
981
989
  n++;
982
- const r = t[n];
983
- o = r.next, e.refresh(r.next), r.currentObject.type === "node" ? e.selectNode(this.findEle(r.currentObject.value)) : r.currentObject.type === "nodes" && (e.unselectNodes(this.currentNodes), e.selectNodes(r.currentObject.value.map((l) => this.findEle(l))));
990
+ const l = t[n];
991
+ o = l.next, e.refresh(l.next);
992
+ try {
993
+ l.currentTarget.type === "nodes" && (l.operation === "removeNodes" ? e.selectNodes(l.currentSelected.map((d) => this.findEle(d))) : e.selectNodes(l.currentTarget.value.map((d) => this.findEle(d))));
994
+ } catch {
995
+ }
984
996
  }
985
997
  };
986
- const i = function(r) {
987
- if (r.name === "beginEdit")
998
+ const s = function(l) {
999
+ if (l.name === "beginEdit")
988
1000
  return;
989
1001
  t = t.slice(0, n + 1);
990
- const l = e.getData();
991
- t.push({ prev: o, currentObject: Pt(r), next: l }), o = l, n = t.length - 1;
992
- }, s = function(r) {
993
- (r.metaKey || r.ctrlKey) && (r.shiftKey && r.key === "Z" || r.key === "y") ? e.redo() : (r.metaKey || r.ctrlKey) && r.key === "z" && e.undo();
1002
+ const d = e.getData(), f = {
1003
+ prev: o,
1004
+ operation: l.name,
1005
+ currentSelected: i.map((h) => h.id),
1006
+ currentTarget: Ot(l),
1007
+ next: d
1008
+ };
1009
+ t.push(f), o = d, n = t.length - 1;
1010
+ }, r = function(l) {
1011
+ (l.metaKey || l.ctrlKey) && (l.shiftKey && l.key === "Z" || l.key === "y") ? e.redo() : (l.metaKey || l.ctrlKey) && l.key === "z" && e.undo();
1012
+ }, c = function(l) {
1013
+ i = e.currentNodes.map((d) => d.nodeObj);
994
1014
  };
995
- return e.bus.addListener("operation", i), e.map.addEventListener("keydown", s), () => {
996
- e.bus.removeListener("operation", i), e.map.removeEventListener("keydown", s);
1015
+ return e.bus.addListener("operation", s), e.bus.addListener("selectNodes", c), e.container.addEventListener("keydown", r), () => {
1016
+ e.bus.removeListener("operation", s), e.bus.removeListener("selectNodes", c), e.container.removeEventListener("keydown", r);
997
1017
  };
998
1018
  }
999
- const Ht = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Bt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Rt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Ft = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', It = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Wt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', Kt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>';
1019
+ const Ht = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Bt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Rt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Ft = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', Wt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', It = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', Kt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>';
1000
1020
  const Yt = {
1001
1021
  side: Ht,
1002
1022
  left: Bt,
1003
1023
  right: Rt,
1004
1024
  full: Ft,
1005
- living: It,
1006
- zoomin: Wt,
1025
+ living: Wt,
1026
+ zoomin: It,
1007
1027
  zoomout: Kt
1008
- }, I = (e, t) => {
1028
+ }, W = (e, t) => {
1009
1029
  const n = document.createElement("span");
1010
1030
  return n.id = e, n.innerHTML = Yt[t], n;
1011
1031
  };
1012
1032
  function Gt(e) {
1013
- const t = document.createElement("div"), n = I("fullscreen", "full"), o = I("toCenter", "living"), i = I("zoomout", "zoomout"), s = I("zoomin", "zoomin"), r = document.createElement("span");
1033
+ const t = document.createElement("div"), n = W("fullscreen", "full"), o = W("toCenter", "living"), i = W("zoomout", "zoomout"), s = W("zoomin", "zoomin"), r = document.createElement("span");
1014
1034
  return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
1015
1035
  document.fullscreenElement === e.el ? document.exitFullscreen() : e.el.requestFullscreen();
1016
1036
  }, o.onclick = () => {
@@ -1021,8 +1041,8 @@ function Gt(e) {
1021
1041
  e.scale(e.scaleVal + e.scaleSensitivity);
1022
1042
  }, t;
1023
1043
  }
1024
- function Vt(e) {
1025
- const t = document.createElement("div"), n = I("tbltl", "left"), o = I("tbltr", "right"), i = I("tblts", "side");
1044
+ function qt(e) {
1045
+ const t = document.createElement("div"), n = W("tbltl", "left"), o = W("tbltr", "right"), i = W("tblts", "side");
1026
1046
  return t.appendChild(n), t.appendChild(o), t.appendChild(i), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
1027
1047
  e.initLeft();
1028
1048
  }, o.onclick = () => {
@@ -1031,11 +1051,11 @@ function Vt(e) {
1031
1051
  e.initSide();
1032
1052
  }, t;
1033
1053
  }
1034
- function qt(e) {
1035
- e.container.append(Gt(e)), e.container.append(Vt(e));
1054
+ function zt(e) {
1055
+ e.container.append(Gt(e)), e.container.append(qt(e));
1036
1056
  }
1037
1057
  /*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
1038
- class zt {
1058
+ class Vt {
1039
1059
  constructor() {
1040
1060
  this._listeners = /* @__PURE__ */ new Map(), this.on = this.addEventListener, this.off = this.removeEventListener, this.emit = this.dispatchEvent;
1041
1061
  }
@@ -1057,13 +1077,13 @@ class zt {
1057
1077
  this._listeners.clear();
1058
1078
  }
1059
1079
  }
1060
- const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e }, t, n) => {
1080
+ const $e = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e }, t, n) => {
1061
1081
  if (typeof t == "object")
1062
1082
  for (const [o, i] of Object.entries(t))
1063
- i !== void 0 && (e[o] = Oe(i));
1083
+ i !== void 0 && (e[o] = $e(i));
1064
1084
  else
1065
- n !== void 0 && (e[t] = Oe(n));
1066
- }, je = (e = 0, t = 0, n = 0, o = 0) => {
1085
+ n !== void 0 && (e[t] = $e(n));
1086
+ }, Oe = (e = 0, t = 0, n = 0, o = 0) => {
1067
1087
  const i = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
1068
1088
  return { ...i, toJSON: () => JSON.stringify(i) };
1069
1089
  }, Ut = (e) => {
@@ -1078,7 +1098,7 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1078
1098
  cancelAnimationFrame(n), o = !1;
1079
1099
  }
1080
1100
  };
1081
- }, Pe = (e, t, n = "touch") => {
1101
+ }, je = (e, t, n = "touch") => {
1082
1102
  switch (n) {
1083
1103
  case "center": {
1084
1104
  const o = t.left + t.width / 2, i = t.top + t.height / 2;
@@ -1089,17 +1109,17 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1089
1109
  case "touch":
1090
1110
  return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
1091
1111
  }
1092
- }, Xt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Jt = () => "safari" in window, pe = (e) => Array.isArray(e) ? e : [e], Je = (e) => (t, n, o, i = {}) => {
1093
- (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = pe(n), t = pe(t);
1112
+ }, Xt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Jt = () => "safari" in window, ge = (e) => Array.isArray(e) ? e : [e], Je = (e) => (t, n, o, i = {}) => {
1113
+ (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = ge(n), t = ge(t);
1094
1114
  for (const s of t)
1095
1115
  if (s)
1096
1116
  for (const r of n)
1097
1117
  s[e](r, o, { capture: !1, ...i });
1098
- }, P = Je("addEventListener"), A = Je("removeEventListener"), Z = (e) => {
1118
+ }, O = Je("addEventListener"), A = Je("removeEventListener"), Z = (e) => {
1099
1119
  var t;
1100
1120
  const { clientX: n, clientY: o, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
1101
1121
  return { x: n, y: o, target: i };
1102
- }, Y = (e, t = document) => pe(e).map(
1122
+ }, Y = (e, t = document) => ge(e).map(
1103
1123
  (n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null
1104
1124
  ).flat().filter(Boolean), Zt = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1105
1125
  switch (o) {
@@ -1110,15 +1130,15 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1110
1130
  case "shift":
1111
1131
  return e.shiftKey;
1112
1132
  }
1113
- }) : !1), { abs: F, max: $e, min: He, ceil: Be } = Math, Re = (e = []) => ({
1133
+ }) : !1), { abs: F, max: He, min: Be, ceil: Re } = Math, Fe = (e = []) => ({
1114
1134
  stored: e,
1115
1135
  selected: [],
1116
1136
  touched: [],
1117
1137
  changed: { added: [], removed: [] }
1118
- }), Ze = class extends zt {
1138
+ }), Ze = class extends Vt {
1119
1139
  constructor(t) {
1120
1140
  var n, o, i, s, r;
1121
- super(), this._selection = Re(), this._targetBoundaryScrolled = !0, this._selectables = [], this._areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 }, this._areaRect = je(), this._singleClick = !0, this._scrollAvailable = !0, this._scrollingActive = !1, this._scrollSpeed = { x: 0, y: 0 }, this._scrollDelta = { x: 0, y: 0 }, this._lastMousePosition = { x: 0, y: 0 }, this.enable = this._toggleStartEvents, this.disable = this._toggleStartEvents.bind(this, !1), this._options = {
1141
+ super(), this._selection = Fe(), this._targetBoundaryScrolled = !0, this._selectables = [], this._areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 }, this._areaRect = Oe(), this._singleClick = !0, this._scrollAvailable = !0, this._scrollingActive = !1, this._scrollSpeed = { x: 0, y: 0 }, this._scrollDelta = { x: 0, y: 0 }, this._lastMousePosition = { x: 0, y: 0 }, this.enable = this._toggleStartEvents, this.disable = this._toggleStartEvents.bind(this, !1), this._options = {
1122
1142
  selectionAreaClass: "selection-area",
1123
1143
  selectionContainerClass: void 0,
1124
1144
  selectables: [],
@@ -1158,13 +1178,13 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1158
1178
  };
1159
1179
  for (const f of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
1160
1180
  typeof this[f] == "function" && (this[f] = this[f].bind(this));
1161
- const { document: l, selectionAreaClass: d, selectionContainerClass: a } = this._options;
1162
- this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(d), a && this._clippingElement.classList.add(a), j(this._area, {
1181
+ const { document: c, selectionAreaClass: l, selectionContainerClass: d } = this._options;
1182
+ this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), d && this._clippingElement.classList.add(d), $(this._area, {
1163
1183
  willChange: "top, left, bottom, right, width, height",
1164
1184
  top: 0,
1165
1185
  left: 0,
1166
1186
  position: "fixed"
1167
- }), j(this._clippingElement, {
1187
+ }), $(this._clippingElement, {
1168
1188
  overflow: "hidden",
1169
1189
  position: "fixed",
1170
1190
  transform: "translate3d(0, 0, 0)",
@@ -1176,23 +1196,23 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1176
1196
  }), this.enable();
1177
1197
  }
1178
1198
  _toggleStartEvents(t = !0) {
1179
- const { document: n, features: o } = this._options, i = t ? P : A;
1199
+ const { document: n, features: o } = this._options, i = t ? O : A;
1180
1200
  i(n, "mousedown", this._onTapStart), o.touch && i(n, "touchstart", this._onTapStart, { passive: !1 });
1181
1201
  }
1182
1202
  _onTapStart(t, n = !1) {
1183
- const { x: o, y: i, target: s } = Z(t), { document: r, startAreas: l, boundaries: d, features: a, behaviour: f } = this._options, u = s.getBoundingClientRect();
1203
+ const { x: o, y: i, target: s } = Z(t), { document: r, startAreas: c, boundaries: l, features: d, behaviour: f } = this._options, h = s.getBoundingClientRect();
1184
1204
  if (t instanceof MouseEvent && !Zt(t, f.triggers))
1185
1205
  return;
1186
- const g = Y(l, r), h = Y(d, r);
1187
- this._targetElement = h.find(
1188
- (v) => Pe(v.getBoundingClientRect(), u)
1206
+ const g = Y(c, r), u = Y(l, r);
1207
+ this._targetElement = u.find(
1208
+ (v) => je(v.getBoundingClientRect(), h)
1189
1209
  );
1190
- const c = t.composedPath(), p = g.find((v) => c.includes(v));
1191
- if (this._targetBoundary = h.find((v) => c.includes(v)), !this._targetElement || !p || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1210
+ const a = t.composedPath(), p = g.find((v) => a.includes(v));
1211
+ if (this._targetBoundary = u.find((v) => a.includes(v)), !this._targetElement || !p || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1192
1212
  return;
1193
1213
  this._areaLocation = { x1: o, y1: i, x2: 0, y2: 0 };
1194
1214
  const m = r.scrollingElement ?? r.body;
1195
- this._scrollDelta = { x: m.scrollLeft, y: m.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), P(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), P(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), P(r, "scroll", this._onScroll), a.deselectOnBlur && (this._targetBoundaryScrolled = !1, P(this._targetBoundary, "scroll", this._onStartAreaScroll));
1215
+ this._scrollDelta = { x: m.scrollLeft, y: m.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), O(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), O(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), O(r, "scroll", this._onScroll), d.deselectOnBlur && (this._targetBoundaryScrolled = !1, O(this._targetBoundary, "scroll", this._onStartAreaScroll));
1196
1216
  }
1197
1217
  _onSingleTap(t) {
1198
1218
  const { singleTap: { intersect: n }, range: o } = this._options.features, i = Z(t);
@@ -1201,10 +1221,10 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1201
1221
  s = i.target;
1202
1222
  else if (n === "touch") {
1203
1223
  this.resolveSelectables();
1204
- const { x: l, y: d } = i;
1205
- s = this._selectables.find((a) => {
1206
- const { right: f, left: u, top: g, bottom: h } = a.getBoundingClientRect();
1207
- return l < f && l > u && d < h && d > g;
1224
+ const { x: c, y: l } = i;
1225
+ s = this._selectables.find((d) => {
1226
+ const { right: f, left: h, top: g, bottom: u } = d.getBoundingClientRect();
1227
+ return c < f && c > h && l < u && l > g;
1208
1228
  });
1209
1229
  }
1210
1230
  if (!s)
@@ -1218,59 +1238,59 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1218
1238
  }
1219
1239
  const { stored: r } = this._selection;
1220
1240
  if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
1221
- const l = this._latestElement, [d, a] = l.compareDocumentPosition(s) & 4 ? [s, l] : [l, s], f = [...this._selectables.filter(
1222
- (u) => u.compareDocumentPosition(d) & 4 && u.compareDocumentPosition(a) & 2
1223
- ), d, a];
1224
- this.select(f), this._latestElement = l;
1241
+ const c = this._latestElement, [l, d] = c.compareDocumentPosition(s) & 4 ? [s, c] : [c, s], f = [...this._selectables.filter(
1242
+ (h) => h.compareDocumentPosition(l) & 4 && h.compareDocumentPosition(d) & 2
1243
+ ), l, d];
1244
+ this.select(f), this._latestElement = c;
1225
1245
  } else
1226
- r.includes(s) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(s) : (this.select(s), this._latestElement = s);
1246
+ r.includes(s) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(s) : (this.select(s), this._latestElement = s);
1227
1247
  }
1228
1248
  _delayedTapMove(t) {
1229
- const { container: n, document: o, behaviour: { startThreshold: i } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: l, y: d } = Z(t);
1249
+ const { container: n, document: o, behaviour: { startThreshold: i } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: c, y: l } = Z(t);
1230
1250
  if (
1231
1251
  // Single number for both coordinates
1232
- typeof i == "number" && F(l + d - (s + r)) >= i || // Different x and y threshold
1233
- typeof i == "object" && F(l - s) >= i.x || F(d - r) >= i.y
1252
+ typeof i == "number" && F(c + l - (s + r)) >= i || // Different x and y threshold
1253
+ typeof i == "object" && F(c - s) >= i.x || F(l - r) >= i.y
1234
1254
  ) {
1235
1255
  if (A(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
1236
1256
  A(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
1237
1257
  return;
1238
1258
  }
1239
- P(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), Y(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (P(this._targetElement, "wheel", this._wheelScroll, { passive: !1 }), P(this._options.document, "keydown", this._keyboardScroll, { passive: !1 }), this._selectables = this._selectables.filter((a) => this._targetElement.contains(a))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
1259
+ O(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), $(this._area, "display", "block"), Y(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (O(this._targetElement, "wheel", this._wheelScroll, { passive: !1 }), O(this._options.document, "keydown", this._keyboardScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
1240
1260
  }
1241
1261
  this._handleMoveEvent(t);
1242
1262
  }
1243
1263
  _setupSelectionArea() {
1244
1264
  const { _clippingElement: t, _targetElement: n, _area: o } = this, i = this._targetRect = n.getBoundingClientRect();
1245
- this._scrollAvailable ? (j(t, {
1265
+ this._scrollAvailable ? ($(t, {
1246
1266
  top: i.top,
1247
1267
  left: i.left,
1248
1268
  width: i.width,
1249
1269
  height: i.height
1250
- }), j(o, {
1270
+ }), $(o, {
1251
1271
  marginTop: -i.top,
1252
1272
  marginLeft: -i.left
1253
- })) : (j(t, {
1273
+ })) : ($(t, {
1254
1274
  top: 0,
1255
1275
  left: 0,
1256
1276
  width: "100%",
1257
1277
  height: "100%"
1258
- }), j(o, {
1278
+ }), $(o, {
1259
1279
  marginTop: 0,
1260
1280
  marginLeft: 0
1261
1281
  }));
1262
1282
  }
1263
1283
  _onTapMove(t) {
1264
- const { _scrollSpeed: n, _areaLocation: o, _options: i, _frame: s } = this, { speedDivider: r } = i.behaviour.scrolling, l = this._targetElement, { x: d, y: a } = Z(t);
1265
- if (o.x2 = d, o.y2 = a, this._lastMousePosition.x = d, this._lastMousePosition.y = a, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1284
+ const { _scrollSpeed: n, _areaLocation: o, _options: i, _frame: s } = this, { speedDivider: r } = i.behaviour.scrolling, c = this._targetElement, { x: l, y: d } = Z(t);
1285
+ if (o.x2 = l, o.y2 = d, this._lastMousePosition.x = l, this._lastMousePosition.y = d, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1266
1286
  this._scrollingActive = !0;
1267
1287
  const f = () => {
1268
1288
  if (!n.x && !n.y) {
1269
1289
  this._scrollingActive = !1;
1270
1290
  return;
1271
1291
  }
1272
- const { scrollTop: u, scrollLeft: g } = l;
1273
- n.y && (l.scrollTop += Be(n.y / r), o.y1 -= l.scrollTop - u), n.x && (l.scrollLeft += Be(n.x / r), o.x1 -= l.scrollLeft - g), s.next(t), requestAnimationFrame(f);
1292
+ const { scrollTop: h, scrollLeft: g } = c;
1293
+ n.y && (c.scrollTop += Re(n.y / r), o.y1 -= c.scrollTop - h), n.x && (c.scrollLeft += Re(n.x / r), o.x1 -= c.scrollLeft - g), s.next(t), requestAnimationFrame(f);
1274
1294
  };
1275
1295
  requestAnimationFrame(f);
1276
1296
  } else
@@ -1302,12 +1322,12 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1302
1322
  });
1303
1323
  }
1304
1324
  _recalculateSelectionAreaRect() {
1305
- const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: i } = this, { scrollTop: s, scrollHeight: r, clientHeight: l, scrollLeft: d, scrollWidth: a, clientWidth: f } = o, u = this._targetRect, { x1: g, y1: h } = n;
1306
- let { x2: c, y2: p } = n;
1325
+ const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: i } = this, { scrollTop: s, scrollHeight: r, clientHeight: c, scrollLeft: l, scrollWidth: d, clientWidth: f } = o, h = this._targetRect, { x1: g, y1: u } = n;
1326
+ let { x2: a, y2: p } = n;
1307
1327
  const { behaviour: { scrolling: { startScrollMargins: m } } } = i;
1308
- c < u.left + m.x ? (t.x = d ? -F(u.left - c + m.x) : 0, c = c < u.left ? u.left : c) : c > u.right - m.x ? (t.x = a - d - f ? F(u.left + u.width - c - m.x) : 0, c = c > u.right ? u.right : c) : t.x = 0, p < u.top + m.y ? (t.y = s ? -F(u.top - p + m.y) : 0, p = p < u.top ? u.top : p) : p > u.bottom - m.y ? (t.y = r - s - l ? F(u.top + u.height - p - m.y) : 0, p = p > u.bottom ? u.bottom : p) : t.y = 0;
1309
- const v = He(g, c), b = He(h, p), x = $e(g, c), N = $e(h, p);
1310
- this._areaRect = je(v, b, x - v, N - b);
1328
+ a < h.left + m.x ? (t.x = l ? -F(h.left - a + m.x) : 0, a = a < h.left ? h.left : a) : a > h.right - m.x ? (t.x = d - l - f ? F(h.left + h.width - a - m.x) : 0, a = a > h.right ? h.right : a) : t.x = 0, p < h.top + m.y ? (t.y = s ? -F(h.top - p + m.y) : 0, p = p < h.top ? h.top : p) : p > h.bottom - m.y ? (t.y = r - s - c ? F(h.top + h.height - p - m.y) : 0, p = p > h.bottom ? h.bottom : p) : t.y = 0;
1329
+ const v = Be(g, a), b = Be(u, p), x = He(g, a), C = He(u, p);
1330
+ this._areaRect = Oe(v, b, x - v, C - b);
1311
1331
  }
1312
1332
  _redrawSelectionArea() {
1313
1333
  const { x: t, y: n, width: o, height: i } = this._areaRect, { style: s } = this._area;
@@ -1316,32 +1336,32 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1316
1336
  _onTapStop(t, n) {
1317
1337
  var o;
1318
1338
  const { document: i, features: s } = this._options, { _singleClick: r } = this;
1319
- A(this._targetElement, "scroll", this._onStartAreaScroll), A(i, ["mousemove", "touchmove"], this._delayedTapMove), A(i, ["touchmove", "mousemove"], this._onTapMove), A(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), A(i, "scroll", this._onScroll), this._keepSelection(), t && r && s.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, A(this._targetElement, "wheel", this._wheelScroll, { passive: !0 }), A(this._options.document, "keydown", this._keyboardScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
1339
+ A(this._targetElement, "scroll", this._onStartAreaScroll), A(i, ["mousemove", "touchmove"], this._delayedTapMove), A(i, ["touchmove", "mousemove"], this._onTapMove), A(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), A(i, "scroll", this._onScroll), this._keepSelection(), t && r && s.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, A(this._targetElement, "wheel", this._wheelScroll, { passive: !0 }), A(this._options.document, "keydown", this._keyboardScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), $(this._area, "display", "none");
1320
1340
  }
1321
1341
  _updateElementSelection() {
1322
- const { _selectables: t, _options: n, _selection: o, _areaRect: i } = this, { stored: s, selected: r, touched: l } = o, { intersect: d, overlap: a } = n.behaviour, f = a === "invert", u = [], g = [], h = [];
1342
+ const { _selectables: t, _options: n, _selection: o, _areaRect: i } = this, { stored: s, selected: r, touched: c } = o, { intersect: l, overlap: d } = n.behaviour, f = d === "invert", h = [], g = [], u = [];
1323
1343
  for (let p = 0; p < t.length; p++) {
1324
1344
  const m = t[p];
1325
- if (Pe(i, m.getBoundingClientRect(), d)) {
1345
+ if (je(i, m.getBoundingClientRect(), l)) {
1326
1346
  if (r.includes(m))
1327
- s.includes(m) && !l.includes(m) && l.push(m);
1347
+ s.includes(m) && !c.includes(m) && c.push(m);
1328
1348
  else if (f && s.includes(m)) {
1329
- h.push(m);
1349
+ u.push(m);
1330
1350
  continue;
1331
1351
  } else
1332
1352
  g.push(m);
1333
- u.push(m);
1353
+ h.push(m);
1334
1354
  }
1335
1355
  }
1336
1356
  f && g.push(...s.filter((p) => !r.includes(p)));
1337
- const c = a === "keep";
1357
+ const a = d === "keep";
1338
1358
  for (let p = 0; p < r.length; p++) {
1339
1359
  const m = r[p];
1340
- !u.includes(m) && !// Check if the user wants to keep previously selected elements, e.g.,
1360
+ !h.includes(m) && !// Check if the user wants to keep previously selected elements, e.g.,
1341
1361
  // not make them part of the current selection as soon as they're touched.
1342
- (c && s.includes(m)) && h.push(m);
1362
+ (a && s.includes(m)) && u.push(m);
1343
1363
  }
1344
- o.selected = u, o.changed = { added: g, removed: h }, this._latestElement = void 0;
1364
+ o.selected = h, o.changed = { added: g, removed: u }, this._latestElement = void 0;
1345
1365
  }
1346
1366
  _emitEvent(t, n) {
1347
1367
  return this.emit(t, {
@@ -1351,20 +1371,20 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1351
1371
  });
1352
1372
  }
1353
1373
  _keepSelection() {
1354
- const { _options: t, _selection: n } = this, { selected: o, changed: i, touched: s, stored: r } = n, l = o.filter((d) => !r.includes(d));
1374
+ const { _options: t, _selection: n } = this, { selected: o, changed: i, touched: s, stored: r } = n, c = o.filter((l) => !r.includes(l));
1355
1375
  switch (t.behaviour.overlap) {
1356
1376
  case "drop": {
1357
1377
  n.stored = [
1358
- ...l,
1359
- ...r.filter((d) => !s.includes(d))
1378
+ ...c,
1379
+ ...r.filter((l) => !s.includes(l))
1360
1380
  // Elements not touched
1361
1381
  ];
1362
1382
  break;
1363
1383
  }
1364
1384
  case "invert": {
1365
1385
  n.stored = [
1366
- ...l,
1367
- ...r.filter((d) => !i.removed.includes(d))
1386
+ ...c,
1387
+ ...r.filter((l) => !i.removed.includes(l))
1368
1388
  // Elements not removed from selection
1369
1389
  ];
1370
1390
  break;
@@ -1372,7 +1392,7 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1372
1392
  case "keep": {
1373
1393
  n.stored = [
1374
1394
  ...r,
1375
- ...o.filter((d) => !r.includes(d))
1395
+ ...o.filter((l) => !r.includes(l))
1376
1396
  // Newly added
1377
1397
  ];
1378
1398
  break;
@@ -1404,7 +1424,7 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1404
1424
  s.added = [], s.removed.push(
1405
1425
  ...o,
1406
1426
  ...t ? i : []
1407
- ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Re(t ? [] : i);
1427
+ ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Fe(t ? [] : i);
1408
1428
  }
1409
1429
  /**
1410
1430
  * @returns {Array} Selected elements
@@ -1457,7 +1477,7 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1457
1477
  */
1458
1478
  select(t, n = !1) {
1459
1479
  const { changed: o, selected: i, stored: s } = this._selection, r = Y(t, this._options.document).filter(
1460
- (l) => !i.includes(l) && !s.includes(l)
1480
+ (c) => !i.includes(c) && !s.includes(c)
1461
1481
  );
1462
1482
  return s.push(...r), i.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
1463
1483
  }
@@ -1468,10 +1488,10 @@ const Oe = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1468
1488
  */
1469
1489
  deselect(t, n = !1) {
1470
1490
  const { selected: o, stored: i, changed: s } = this._selection, r = Y(t, this._options.document).filter(
1471
- (l) => o.includes(l) || i.includes(l)
1491
+ (c) => o.includes(c) || i.includes(c)
1472
1492
  );
1473
- this._selection.stored = i.filter((l) => !r.includes(l)), this._selection.selected = o.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
1474
- ...r.filter((l) => !s.removed.includes(l))
1493
+ this._selection.stored = i.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
1494
+ ...r.filter((c) => !s.removed.includes(c))
1475
1495
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null));
1476
1496
  }
1477
1497
  };
@@ -1544,7 +1564,7 @@ function en(e) {
1544
1564
  const tn = function(e, t = !0) {
1545
1565
  this.theme = e;
1546
1566
  const o = {
1547
- ...(e.type === "dark" ? me : ge).cssVar,
1567
+ ...(e.type === "dark" ? ve : me).cssVar,
1548
1568
  ...e.cssVar
1549
1569
  }, i = Object.keys(o);
1550
1570
  for (let s = 0; s < i.length; s++) {
@@ -1552,35 +1572,35 @@ const tn = function(e, t = !0) {
1552
1572
  this.container.style.setProperty(r, o[r]);
1553
1573
  }
1554
1574
  t && this.refresh();
1555
- }, q = (e) => {
1575
+ }, z = (e) => {
1556
1576
  var o;
1557
1577
  const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
1558
1578
  return { siblings: t, index: n };
1559
1579
  };
1560
1580
  function nn(e) {
1561
- const { siblings: t, index: n } = q(e);
1581
+ const { siblings: t, index: n } = z(e);
1562
1582
  if (t === void 0)
1563
1583
  return;
1564
1584
  const o = t[n];
1565
1585
  n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
1566
1586
  }
1567
1587
  function on(e) {
1568
- const { siblings: t, index: n } = q(e);
1588
+ const { siblings: t, index: n } = z(e);
1569
1589
  if (t === void 0)
1570
1590
  return;
1571
1591
  const o = t[n];
1572
1592
  n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
1573
1593
  }
1574
1594
  function Qe(e) {
1575
- const { siblings: t, index: n } = q(e);
1595
+ const { siblings: t, index: n } = z(e);
1576
1596
  return t === void 0 ? 0 : (t.splice(n, 1), t.length);
1577
1597
  }
1578
1598
  function sn(e, t, n) {
1579
- const { siblings: o, index: i } = q(n);
1599
+ const { siblings: o, index: i } = z(n);
1580
1600
  o !== void 0 && (t === "before" ? o.splice(i, 0, e) : o.splice(i + 1, 0, e));
1581
1601
  }
1582
1602
  function rn(e, t) {
1583
- const { siblings: n, index: o } = q(e);
1603
+ const { siblings: n, index: o } = z(e);
1584
1604
  n !== void 0 && (n[o] = t, t.children = [e]);
1585
1605
  }
1586
1606
  function et(e, t, n) {
@@ -1589,13 +1609,13 @@ function et(e, t, n) {
1589
1609
  n.children ? n.children.push(t) : n.children = [t];
1590
1610
  else {
1591
1611
  t.direction !== void 0 && (t.direction = n.direction);
1592
- const { siblings: i, index: s } = q(n);
1612
+ const { siblings: i, index: s } = z(n);
1593
1613
  if (i === void 0)
1594
1614
  return;
1595
1615
  e === "before" ? i.splice(s, 0, t) : i.splice(s + 1, 0, t);
1596
1616
  }
1597
1617
  }
1598
- const ln = function({ map: e, direction: t }, n) {
1618
+ const cn = function({ map: e, direction: t }, n) {
1599
1619
  var o, i;
1600
1620
  if (t === 0)
1601
1621
  return 0;
@@ -1612,13 +1632,13 @@ const ln = function({ map: e, direction: t }, n) {
1612
1632
  if (J(o), i.children[1])
1613
1633
  i.nextSibling.appendChild(n);
1614
1634
  else {
1615
- const l = e.createChildren([n]);
1616
- i.appendChild(xe(!0)), i.insertAdjacentElement("afterend", l);
1635
+ const c = e.createChildren([n]);
1636
+ i.appendChild(Ee(!0)), i.insertAdjacentElement("afterend", c);
1617
1637
  }
1618
1638
  e.linkDiv(n.offsetParent);
1619
1639
  } else
1620
- i.tagName === "ME-ROOT" && (ln(e, o.nodeObj) === 0 ? (s = e.container.querySelector(".lhs")) == null || s.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
1621
- }, cn = function(e, t) {
1640
+ i.tagName === "ME-ROOT" && (cn(e, o.nodeObj) === 0 ? (s = e.container.querySelector(".lhs")) == null || s.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
1641
+ }, ln = function(e, t) {
1622
1642
  const n = e.parentNode;
1623
1643
  if (t === 0) {
1624
1644
  const o = n.parentNode.parentNode;
@@ -1632,31 +1652,31 @@ const ln = function({ map: e, direction: t }, n) {
1632
1652
  const n = e.parentElement.parentElement.lastElementChild;
1633
1653
  (n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
1634
1654
  }, an = function(e, t) {
1635
- const n = e.nodeObj, o = be(n);
1655
+ const n = e.nodeObj, o = ye(n);
1636
1656
  o.style && t.style && (t.style = Object.assign(o.style, t.style));
1637
1657
  const i = Object.assign(n, t);
1638
- we(e, i), this.linkDiv(), this.bus.fire("operation", {
1658
+ xe(e, i), this.linkDiv(), this.bus.fire("operation", {
1639
1659
  name: "reshapeNode",
1640
1660
  obj: i,
1641
1661
  origin: o
1642
1662
  });
1643
- }, Ee = function(e, t, n) {
1663
+ }, Ce = function(e, t, n) {
1644
1664
  if (!t)
1645
1665
  return null;
1646
1666
  const o = t.nodeObj;
1647
1667
  o.expanded === !1 && (e.expandNode(t, !0), t = e.findEle(o.id));
1648
1668
  const i = n || e.generateNewObj();
1649
- o.children ? o.children.push(i) : o.children = [i], $(e.nodeData);
1669
+ o.children ? o.children.push(i) : o.children = [i], j(e.nodeData);
1650
1670
  const { grp: s, top: r } = e.createWrapper(i);
1651
1671
  return tt(e, t, s), { newTop: r, newNodeObj: i };
1652
1672
  }, dn = function(e, t, n) {
1653
- var a, f, u, g;
1673
+ var d, f, h, g;
1654
1674
  const o = t || this.currentNode;
1655
1675
  if (!o)
1656
1676
  return;
1657
1677
  const i = o.nodeObj;
1658
1678
  if (i.parent) {
1659
- if (!((a = i.parent) != null && a.parent) && ((u = (f = i.parent) == null ? void 0 : f.children) == null ? void 0 : u.length) === 1 && this.direction === 2) {
1679
+ if (!((d = i.parent) != null && d.parent) && ((h = (f = i.parent) == null ? void 0 : f.children) == null ? void 0 : h.length) === 1 && this.direction === 2) {
1660
1680
  this.addChild(this.findEle(i.parent.id), n);
1661
1681
  return;
1662
1682
  }
@@ -1666,16 +1686,16 @@ const ln = function({ map: e, direction: t }, n) {
1666
1686
  }
1667
1687
  const s = n || this.generateNewObj();
1668
1688
  if (!((g = i.parent) != null && g.parent)) {
1669
- const h = o.closest("me-main").className === M.LHS ? 0 : 1;
1670
- s.direction = h;
1689
+ const u = o.closest("me-main").className === M.LHS ? 0 : 1;
1690
+ s.direction = u;
1671
1691
  }
1672
- sn(s, e, i), $(this.nodeData);
1673
- const r = o.parentElement, { grp: l, top: d } = this.createWrapper(s);
1674
- r.parentElement.insertAdjacentElement(nt[e], l), this.linkDiv(l.offsetParent), n || this.editTopic(d.firstChild), this.selectNode(d.firstChild, !0), this.bus.fire("operation", {
1692
+ sn(s, e, i), j(this.nodeData);
1693
+ const r = o.parentElement, { grp: c, top: l } = this.createWrapper(s);
1694
+ r.parentElement.insertAdjacentElement(nt[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.bus.fire("operation", {
1675
1695
  name: "insertSibling",
1676
1696
  type: e,
1677
1697
  obj: s
1678
- });
1698
+ }), this.selectNode(l.firstChild, !0);
1679
1699
  }, hn = function(e, t) {
1680
1700
  const n = e || this.currentNode;
1681
1701
  if (!n)
@@ -1685,11 +1705,11 @@ const ln = function({ map: e, direction: t }, n) {
1685
1705
  if (!o.parent)
1686
1706
  return;
1687
1707
  const i = t || this.generateNewObj();
1688
- rn(o, i), $(this.nodeData);
1689
- const s = n.parentElement.parentElement, { grp: r, top: l } = this.createWrapper(i, !0);
1690
- l.appendChild(xe(!0)), s.insertAdjacentElement("afterend", r);
1691
- const d = this.createChildren([s]);
1692
- l.insertAdjacentElement("afterend", d), this.linkDiv(), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
1708
+ rn(o, i), j(this.nodeData);
1709
+ const s = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(i, !0);
1710
+ c.appendChild(Ee(!0)), s.insertAdjacentElement("afterend", r);
1711
+ const l = this.createChildren([s]);
1712
+ c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
1693
1713
  name: "insertParent",
1694
1714
  obj: i
1695
1715
  });
@@ -1697,7 +1717,7 @@ const ln = function({ map: e, direction: t }, n) {
1697
1717
  const n = e || this.currentNode;
1698
1718
  if (!n)
1699
1719
  return;
1700
- const o = Ee(this, n, t);
1720
+ const o = Ce(this, n, t);
1701
1721
  if (!o)
1702
1722
  return;
1703
1723
  const { newTop: i, newNodeObj: s } = o;
@@ -1706,9 +1726,9 @@ const ln = function({ map: e, direction: t }, n) {
1706
1726
  obj: s
1707
1727
  }), t || this.editTopic(i.firstChild), this.selectNode(i.firstChild, !0);
1708
1728
  }, fn = function(e, t) {
1709
- const n = be(e.nodeObj);
1710
- ve(n);
1711
- const o = Ee(this, t, n);
1729
+ const n = ye(e.nodeObj);
1730
+ be(n);
1731
+ const o = Ce(this, t, n);
1712
1732
  if (!o)
1713
1733
  return;
1714
1734
  const { newNodeObj: i } = o;
@@ -1717,16 +1737,16 @@ const ln = function({ map: e, direction: t }, n) {
1717
1737
  obj: i
1718
1738
  });
1719
1739
  }, pn = function(e, t) {
1720
- e = ce(e);
1740
+ e = le(e);
1721
1741
  const n = [];
1722
1742
  for (let o = 0; o < e.length; o++) {
1723
- const i = e[o], s = be(i.nodeObj);
1724
- ve(s);
1725
- const r = Ee(this, t, s);
1743
+ const i = e[o], s = ye(i.nodeObj);
1744
+ be(s);
1745
+ const r = Ce(this, t, s);
1726
1746
  if (!r)
1727
1747
  return;
1728
- const { newNodeObj: l } = r;
1729
- n.push(l);
1748
+ const { newNodeObj: c } = r;
1749
+ n.push(c);
1730
1750
  }
1731
1751
  this.unselectNodes(this.currentNodes), this.selectNodes(n.map((o) => this.findEle(o.id))), this.bus.fire("operation", {
1732
1752
  name: "copyNodes",
@@ -1757,10 +1777,10 @@ const ln = function({ map: e, direction: t }, n) {
1757
1777
  }, vn = function(e) {
1758
1778
  if (e.length === 0)
1759
1779
  return;
1760
- e = ce(e);
1780
+ e = le(e);
1761
1781
  for (const n of e) {
1762
1782
  const o = n.nodeObj, i = Qe(o);
1763
- cn(n, i);
1783
+ ln(n, i);
1764
1784
  }
1765
1785
  const t = e[e.length - 1];
1766
1786
  this.selectNode(this.findEle(t.nodeObj.parent.id)), this.linkDiv(), this.bus.fire("operation", {
@@ -1768,12 +1788,12 @@ const ln = function({ map: e, direction: t }, n) {
1768
1788
  objs: e.map((n) => n.nodeObj)
1769
1789
  });
1770
1790
  }, bn = function(e, t) {
1771
- e = ce(e);
1791
+ e = le(e);
1772
1792
  const n = t.nodeObj;
1773
1793
  n.expanded === !1 && (this.expandNode(t, !0), t = this.findEle(n.id));
1774
1794
  for (const o of e) {
1775
1795
  const i = o.nodeObj;
1776
- et("in", i, n), $(this.nodeData);
1796
+ et("in", i, n), j(this.nodeData);
1777
1797
  const s = o.parentElement;
1778
1798
  tt(this, t, s.parentElement);
1779
1799
  }
@@ -1783,13 +1803,13 @@ const ln = function({ map: e, direction: t }, n) {
1783
1803
  toObj: n
1784
1804
  });
1785
1805
  }, ot = (e, t, n, o) => {
1786
- e = ce(e), t === "after" && (e = e.reverse());
1806
+ e = le(e), t === "after" && (e = e.reverse());
1787
1807
  const i = n.nodeObj, s = [];
1788
1808
  for (const r of e) {
1789
- const l = r.nodeObj;
1790
- et(t, l, i), $(o.nodeData), J(r);
1791
- const d = r.parentElement.parentNode;
1792
- s.includes(d.parentElement) || s.push(d.parentElement), n.parentElement.parentNode.insertAdjacentElement(nt[t], d);
1809
+ const c = r.nodeObj;
1810
+ et(t, c, i), j(o.nodeData), J(r);
1811
+ const l = r.parentElement.parentNode;
1812
+ s.includes(l.parentElement) || s.push(l.parentElement), n.parentElement.parentNode.insertAdjacentElement(nt[t], l);
1793
1813
  }
1794
1814
  for (const r of s)
1795
1815
  r.childElementCount === 0 && r.tagName !== "ME-MAIN" && (r.previousSibling.children[1].remove(), r.remove());
@@ -1837,8 +1857,8 @@ function Cn(e) {
1837
1857
  const Sn = function(e) {
1838
1858
  const t = this.container, n = e.getBoundingClientRect(), o = t.getBoundingClientRect();
1839
1859
  if (n.top > o.bottom || n.bottom < o.top || n.left > o.right || n.right < o.left) {
1840
- const s = n.left + n.width / 2, r = n.top + n.height / 2, l = o.left + o.width / 2, d = o.top + o.height / 2, a = s - l, f = r - d;
1841
- this.move(-a, -f);
1860
+ const s = n.left + n.width / 2, r = n.top + n.height / 2, c = o.left + o.width / 2, l = o.top + o.height / 2, d = s - c, f = r - l;
1861
+ this.move(-d, -f, !0);
1842
1862
  }
1843
1863
  }, Nn = function(e, t, n) {
1844
1864
  this.clearSelection(), this.scrollIntoView(e), this.selection.select(e), t && this.bus.fire("selectNewNode", e.nodeObj);
@@ -1860,23 +1880,25 @@ const Sn = function(e) {
1860
1880
  this.editable = !0;
1861
1881
  }, Dn = function() {
1862
1882
  this.editable = !1;
1863
- }, On = function(e, t = { x: 0, y: 0 }) {
1883
+ }, Pn = function(e, t = { x: 0, y: 0 }) {
1864
1884
  if (e < this.scaleMin || e > this.scaleMax)
1865
1885
  return;
1866
- const n = this.container.getBoundingClientRect(), o = t.x ? t.x - n.left - n.width / 2 : 0, i = t.y ? t.y - n.top - n.height / 2 : 0, { dx: s, dy: r } = st(this), l = this.map.style.transform, { x: d, y: a } = Ge(l), f = d - s, u = a - r, g = this.scaleVal, h = (-o + f) * (1 - e / g), c = (-i + u) * (1 - e / g);
1867
- this.map.style.transform = `translate(${d - h}px, ${a - c}px) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
1868
- }, jn = function() {
1886
+ const n = this.container.getBoundingClientRect(), o = t.x ? t.x - n.left - n.width / 2 : 0, i = t.y ? t.y - n.top - n.height / 2 : 0, { dx: s, dy: r } = st(this), c = this.map.style.transform, { x: l, y: d } = Ge(c), f = l - s, h = d - r, g = this.scaleVal, u = (-o + f) * (1 - e / g), a = (-i + h) * (1 - e / g);
1887
+ this.map.style.transform = `translate(${l - u}px, ${d - a}px) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
1888
+ }, $n = function() {
1869
1889
  const e = this.nodes.offsetHeight / this.container.offsetHeight, t = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(e, t));
1870
1890
  this.scaleVal = n, this.map.style.transform = "scale(" + n + ")", this.bus.fire("scale", n);
1871
- }, Pn = function(e, t) {
1872
- const { map: n, scaleVal: o, bus: i } = this, s = n.style.transform;
1873
- let { x: r, y: l } = Ge(s);
1874
- r += e, l += t, n.style.transform = `translate(${r}px, ${l}px) scale(${o})`, i.fire("move", { dx: e, dy: t });
1891
+ }, On = function(e, t, n = !1) {
1892
+ const { map: o, scaleVal: i, bus: s } = this, r = o.style.transform;
1893
+ let { x: c, y: l } = Ge(r);
1894
+ c += e, l += t, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
1895
+ o.style.transition = "none";
1896
+ }, 300)), o.style.transform = `translate(${c}px, ${l}px) scale(${i})`, s.fire("move", { dx: e, dy: t });
1875
1897
  }, st = (e) => {
1876
- const { container: t, map: n, nodes: o } = e, i = n.querySelector("me-root"), s = i.offsetTop, r = i.offsetLeft, l = i.offsetWidth, d = i.offsetHeight;
1877
- let a, f;
1878
- return e.alignment === "root" ? (a = t.offsetWidth / 2 - r - l / 2, f = t.offsetHeight / 2 - s - d / 2, n.style.transformOrigin = `${r + l / 2}px 50%`) : (a = (t.offsetWidth - o.offsetWidth) / 2, f = (t.offsetHeight - o.offsetHeight) / 2, n.style.transformOrigin = "50% 50%"), { dx: a, dy: f };
1879
- }, $n = function() {
1898
+ const { container: t, map: n, nodes: o } = e, i = n.querySelector("me-root"), s = i.offsetTop, r = i.offsetLeft, c = i.offsetWidth, l = i.offsetHeight;
1899
+ let d, f;
1900
+ return e.alignment === "root" ? (d = t.offsetWidth / 2 - r - c / 2, f = t.offsetHeight / 2 - s - l / 2, n.style.transformOrigin = `${r + c / 2}px 50%`) : (d = (t.offsetWidth - o.offsetWidth) / 2, f = (t.offsetHeight - o.offsetHeight) / 2, n.style.transformOrigin = "50% 50%"), { dx: d, dy: f };
1901
+ }, jn = function() {
1880
1902
  const { map: e } = this, { dx: t, dy: n } = st(this);
1881
1903
  e.style.transform = `translate(${t}px, ${n}px) scale(${this.scaleVal})`;
1882
1904
  }, Hn = function(e) {
@@ -1887,32 +1909,46 @@ const Sn = function(e) {
1887
1909
  this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
1888
1910
  }, Fn = function() {
1889
1911
  this.direction = 0, this.refresh(), this.toCenter();
1890
- }, In = function() {
1891
- this.direction = 1, this.refresh(), this.toCenter();
1892
1912
  }, Wn = function() {
1913
+ this.direction = 1, this.refresh(), this.toCenter();
1914
+ }, In = function() {
1893
1915
  this.direction = 2, this.refresh(), this.toCenter();
1894
1916
  }, Kn = function(e) {
1895
1917
  this.locale = e, this.refresh();
1896
1918
  }, Yn = function(e, t) {
1897
1919
  const n = e.nodeObj;
1898
1920
  typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
1899
- const o = e.parentNode, i = o.children[1];
1900
- if (i.expanded = n.expanded, i.className = n.expanded ? "minus" : "", J(e), n.expanded) {
1901
- const d = this.createChildren(
1902
- n.children.map((a) => this.createWrapper(a).grp)
1921
+ const o = e.getBoundingClientRect(), i = {
1922
+ x: o.left,
1923
+ y: o.top
1924
+ }, s = e.parentNode, r = s.children[1];
1925
+ if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", J(e), n.expanded) {
1926
+ const h = this.createChildren(
1927
+ n.children.map((g) => this.createWrapper(g).grp)
1903
1928
  );
1904
- o.parentNode.appendChild(d);
1929
+ s.parentNode.appendChild(h);
1905
1930
  } else
1906
- o.parentNode.children[1].remove();
1931
+ s.parentNode.children[1].remove();
1907
1932
  this.linkDiv(e.closest("me-main > me-wrapper"));
1908
- const s = e.getBoundingClientRect(), r = this.container.getBoundingClientRect();
1909
- (s.bottom > r.bottom || s.top < r.top || s.right > r.right || s.left < r.left) && this.scrollIntoView(e), this.bus.fire("expandNode", n);
1933
+ const c = e.getBoundingClientRect(), l = {
1934
+ x: c.left,
1935
+ y: c.top
1936
+ }, d = i.x - l.x, f = i.y - l.y;
1937
+ this.move(d, f), this.bus.fire("expandNode", n);
1910
1938
  }, Gn = function(e, t) {
1911
- const n = e.nodeObj;
1912
- V(n, t ?? !n.expanded), this.refresh();
1913
- }, Vn = function(e) {
1914
- e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.theme && this.changeTheme(e.theme)), $(this.nodeData), this.layout(), this.linkDiv();
1915
- }, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1939
+ const n = e.nodeObj, o = e.getBoundingClientRect(), i = {
1940
+ x: o.left,
1941
+ y: o.top
1942
+ };
1943
+ q(n, t ?? !n.expanded), this.refresh();
1944
+ const s = this.findEle(n.id).getBoundingClientRect(), r = {
1945
+ x: s.left,
1946
+ y: s.top
1947
+ }, c = i.x - r.x, l = i.y - r.y;
1948
+ this.move(c, l);
1949
+ }, qn = function(e) {
1950
+ this.clearSelection(), e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.theme && this.changeTheme(e.theme)), j(this.nodeData), this.layout(), this.linkDiv();
1951
+ }, zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1916
1952
  __proto__: null,
1917
1953
  cancelFocus: Rn,
1918
1954
  clearSelection: Tn,
@@ -1924,20 +1960,20 @@ const Sn = function(e) {
1924
1960
  getData: An,
1925
1961
  getDataString: Ln,
1926
1962
  initLeft: Fn,
1927
- initRight: In,
1928
- initSide: Wn,
1963
+ initRight: Wn,
1964
+ initSide: In,
1929
1965
  install: Hn,
1930
- move: Pn,
1931
- refresh: Vn,
1932
- scale: On,
1933
- scaleFit: jn,
1966
+ move: On,
1967
+ refresh: qn,
1968
+ scale: Pn,
1969
+ scaleFit: $n,
1934
1970
  scrollIntoView: Sn,
1935
1971
  selectNode: Nn,
1936
1972
  selectNodes: kn,
1937
1973
  setLocale: Kn,
1938
- toCenter: $n,
1974
+ toCenter: jn,
1939
1975
  unselectNodes: _n
1940
- }, Symbol.toStringTag, { value: "Module" })), zn = function(e) {
1976
+ }, Symbol.toStringTag, { value: "Module" })), Vn = function(e) {
1941
1977
  return {
1942
1978
  dom: e,
1943
1979
  moved: !1,
@@ -1960,7 +1996,7 @@ const Sn = function(e) {
1960
1996
  },
1961
1997
  cb: null,
1962
1998
  init(t, n) {
1963
- this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = ye([
1999
+ this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = we([
1964
2000
  { dom: t, evt: "pointermove", func: this.handlePointerMove },
1965
2001
  { dom: t, evt: "pointerleave", func: this.handleClear },
1966
2002
  { dom: t, evt: "pointerup", func: this.handleClear },
@@ -1972,58 +2008,58 @@ const Sn = function(e) {
1972
2008
  this.moved = !1, this.pointerdown = !1;
1973
2009
  }
1974
2010
  };
1975
- }, Fe = {
1976
- create: zn
2011
+ }, We = {
2012
+ create: Vn
1977
2013
  }, Un = "#4dc4ff";
1978
- function rt(e, t, n, o, i, s, r, l) {
2014
+ function rt(e, t, n, o, i, s, r, c) {
1979
2015
  return {
1980
2016
  x: e / 8 + n * 3 / 8 + i * 3 / 8 + r / 8,
1981
- y: t / 8 + o * 3 / 8 + s * 3 / 8 + l / 8
2017
+ y: t / 8 + o * 3 / 8 + s * 3 / 8 + c / 8
1982
2018
  };
1983
2019
  }
1984
2020
  function Xn(e, t, n) {
1985
- S(e, {
2021
+ N(e, {
1986
2022
  x: t + "",
1987
2023
  y: n + ""
1988
2024
  });
1989
2025
  }
1990
2026
  function Q(e, t, n, o, i) {
1991
- S(e, {
2027
+ N(e, {
1992
2028
  x1: t + "",
1993
2029
  y1: n + "",
1994
2030
  x2: o + "",
1995
2031
  y2: i + ""
1996
2032
  });
1997
2033
  }
1998
- function Ie(e, t, n, o, i, s, r, l, d, a) {
1999
- var h;
2000
- if (e.line.setAttribute("d", `M ${t} ${n} C ${o} ${i} ${s} ${r} ${l} ${d}`), a.style) {
2001
- const c = a.style;
2002
- c.stroke && e.line.setAttribute("stroke", c.stroke), c.strokeWidth && e.line.setAttribute("stroke-width", String(c.strokeWidth)), c.strokeDasharray && e.line.setAttribute("stroke-dasharray", c.strokeDasharray), c.strokeLinecap && e.line.setAttribute("stroke-linecap", c.strokeLinecap), c.opacity !== void 0 && e.line.setAttribute("opacity", String(c.opacity));
2003
- }
2004
- const f = ie(s, r, l, d);
2005
- if (f && (e.arrow1.setAttribute("d", `M ${f.x1} ${f.y1} L ${l} ${d} L ${f.x2} ${f.y2}`), a.style)) {
2006
- const c = a.style;
2007
- c.stroke && e.arrow1.setAttribute("stroke", c.stroke), c.strokeWidth && e.arrow1.setAttribute("stroke-width", String(c.strokeWidth)), c.strokeLinecap && e.arrow1.setAttribute("stroke-linecap", c.strokeLinecap), c.opacity !== void 0 && e.arrow1.setAttribute("opacity", String(c.opacity));
2008
- }
2009
- if (a.bidirectional) {
2010
- const c = ie(o, i, t, n);
2011
- if (c && (e.arrow2.setAttribute("d", `M ${c.x1} ${c.y1} L ${t} ${n} L ${c.x2} ${c.y2}`), a.style)) {
2012
- const p = a.style;
2034
+ function Ie(e, t, n, o, i, s, r, c, l, d) {
2035
+ var u;
2036
+ if (e.line.setAttribute("d", `M ${t} ${n} C ${o} ${i} ${s} ${r} ${c} ${l}`), d.style) {
2037
+ const a = d.style;
2038
+ a.stroke && e.line.setAttribute("stroke", a.stroke), a.strokeWidth && e.line.setAttribute("stroke-width", String(a.strokeWidth)), a.strokeDasharray && e.line.setAttribute("stroke-dasharray", a.strokeDasharray), a.strokeLinecap && e.line.setAttribute("stroke-linecap", a.strokeLinecap), a.opacity !== void 0 && e.line.setAttribute("opacity", String(a.opacity));
2039
+ }
2040
+ const f = ie(s, r, c, l);
2041
+ if (f && (e.arrow1.setAttribute("d", `M ${f.x1} ${f.y1} L ${c} ${l} L ${f.x2} ${f.y2}`), d.style)) {
2042
+ const a = d.style;
2043
+ a.stroke && e.arrow1.setAttribute("stroke", a.stroke), a.strokeWidth && e.arrow1.setAttribute("stroke-width", String(a.strokeWidth)), a.strokeLinecap && e.arrow1.setAttribute("stroke-linecap", a.strokeLinecap), a.opacity !== void 0 && e.arrow1.setAttribute("opacity", String(a.opacity));
2044
+ }
2045
+ if (d.bidirectional) {
2046
+ const a = ie(o, i, t, n);
2047
+ if (a && (e.arrow2.setAttribute("d", `M ${a.x1} ${a.y1} L ${t} ${n} L ${a.x2} ${a.y2}`), d.style)) {
2048
+ const p = d.style;
2013
2049
  p.stroke && e.arrow2.setAttribute("stroke", p.stroke), p.strokeWidth && e.arrow2.setAttribute("stroke-width", String(p.strokeWidth)), p.strokeLinecap && e.arrow2.setAttribute("stroke-linecap", p.strokeLinecap), p.opacity !== void 0 && e.arrow2.setAttribute("opacity", String(p.opacity));
2014
2050
  }
2015
2051
  }
2016
- const { x: u, y: g } = rt(t, n, o, i, s, r, l, d);
2017
- Xn(e.label, u, g), (h = a.style) != null && h.labelColor && e.label.setAttribute("fill", a.style.labelColor), so(e);
2052
+ const { x: h, y: g } = rt(t, n, o, i, s, r, c, l);
2053
+ Xn(e.label, h, g), (u = d.style) != null && u.labelColor && e.label.setAttribute("fill", d.style.labelColor), io(e);
2018
2054
  }
2019
- function le(e, t, n) {
2020
- const { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, l = o + s / 2, d = i + r / 2, a = l + n.x, f = d + n.y;
2055
+ function ce(e, t, n) {
2056
+ const { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, c = o + s / 2, l = i + r / 2, d = c + n.x, f = l + n.y;
2021
2057
  return {
2022
2058
  w: s,
2023
2059
  h: r,
2024
- cx: l,
2025
- cy: d,
2026
- ctrlX: a,
2060
+ cx: c,
2061
+ cy: l,
2062
+ ctrlX: d,
2027
2063
  ctrlY: f
2028
2064
  };
2029
2065
  }
@@ -2035,32 +2071,28 @@ function G(e) {
2035
2071
  y: n
2036
2072
  };
2037
2073
  }
2038
- const Jn = function(e, t, n, o) {
2039
- const i = document.createElementNS(_, "text");
2040
- return S(i, {
2041
- "text-anchor": "middle",
2042
- x: t + "",
2043
- y: n + "",
2044
- fill: o || "rgb(235, 95, 82)"
2045
- }), i.dataset.type = "custom-link", i.innerHTML = e, i;
2046
- }, Ce = function(e, t, n, o, i) {
2074
+ const Se = function(e, t, n, o, i) {
2047
2075
  var w;
2048
2076
  if (!t || !n)
2049
2077
  return;
2050
- const s = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: l, y: d } = G(s), { ctrlX: a, ctrlY: f } = s, { ctrlX: u, ctrlY: g } = r, { x: h, y: c } = G(r), p = ie(u, g, h, c);
2078
+ const s = ce(e, t, o.delta1), r = ce(e, n, o.delta2), { x: c, y: l } = G(s), { ctrlX: d, ctrlY: f } = s, { ctrlX: h, ctrlY: g } = r, { x: u, y: a } = G(r), p = ie(h, g, u, a);
2051
2079
  if (!p)
2052
2080
  return;
2053
- const m = `M ${p.x1} ${p.y1} L ${h} ${c} L ${p.x2} ${p.y2}`;
2081
+ const m = `M ${p.x1} ${p.y1} L ${u} ${a} L ${p.x2} ${p.y2}`;
2054
2082
  let v = "";
2055
2083
  if (o.bidirectional) {
2056
- const E = ie(a, f, l, d);
2084
+ const E = ie(d, f, c, l);
2057
2085
  if (!E)
2058
2086
  return;
2059
- v = `M ${E.x1} ${E.y1} L ${l} ${d} L ${E.x2} ${E.y2}`;
2087
+ v = `M ${E.x1} ${E.y1} L ${c} ${l} L ${E.x2} ${E.y2}`;
2060
2088
  }
2061
- const b = Tt(`M ${l} ${d} C ${a} ${f} ${u} ${g} ${h} ${c}`, m, v, o.style), { x, y: N } = rt(l, d, a, f, u, g, h, c), k = (w = o.style) == null ? void 0 : w.labelColor, y = Jn(o.label, x, N, k);
2062
- b.appendChild(y), b.label = y, b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b), i || (e.arrows.push(o), e.currentArrow = b, lt(e, o, s, r));
2063
- }, Zn = function(e, t, n = {}) {
2089
+ const b = Tt(`M ${c} ${l} C ${d} ${f} ${h} ${g} ${u} ${a}`, m, v, o.style), { x, y: C } = rt(c, l, d, f, h, g, u, a), k = (w = o.style) == null ? void 0 : w.labelColor, y = ue(o.label, x, C, {
2090
+ anchor: "middle",
2091
+ color: k,
2092
+ dataType: "custom-link"
2093
+ });
2094
+ b.appendChild(y), b.label = y, b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b), i || (e.arrows.push(o), e.currentArrow = b, ct(e, o, s, r));
2095
+ }, Jn = function(e, t, n = {}) {
2064
2096
  const o = {
2065
2097
  id: K(),
2066
2098
  label: "Custom Link",
@@ -2076,18 +2108,18 @@ const Jn = function(e, t, n, o) {
2076
2108
  },
2077
2109
  ...n
2078
2110
  };
2079
- Ce(this, e, t, o), this.bus.fire("operation", {
2111
+ Se(this, e, t, o), this.bus.fire("operation", {
2080
2112
  name: "createArrow",
2081
2113
  obj: o
2082
2114
  });
2083
- }, Qn = function(e) {
2115
+ }, Zn = function(e) {
2084
2116
  ae(this);
2085
2117
  const t = { ...e, id: K() };
2086
- Ce(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2118
+ Se(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2087
2119
  name: "createArrow",
2088
2120
  obj: t
2089
2121
  });
2090
- }, eo = function(e) {
2122
+ }, Qn = function(e) {
2091
2123
  let t;
2092
2124
  if (e ? t = e : t = this.currentArrow, !t)
2093
2125
  return;
@@ -2099,15 +2131,15 @@ const Jn = function(e, t, n, o) {
2099
2131
  id: n
2100
2132
  }
2101
2133
  });
2102
- }, to = function(e) {
2134
+ }, eo = function(e) {
2103
2135
  this.currentArrow = e;
2104
- const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), i = le(this, n, t.delta1), s = le(this, o, t.delta2);
2105
- lt(this, t, i, s);
2106
- }, no = function() {
2136
+ const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), i = ce(this, n, t.delta1), s = ce(this, o, t.delta2);
2137
+ ct(this, t, i, s);
2138
+ }, to = function() {
2107
2139
  ae(this), this.currentArrow = null;
2108
2140
  }, de = function(e, t) {
2109
- const n = document.createElementNS(_, "path");
2110
- return S(n, {
2141
+ const n = document.createElementNS(L, "path");
2142
+ return N(n, {
2111
2143
  d: e,
2112
2144
  stroke: t,
2113
2145
  fill: "none",
@@ -2115,8 +2147,8 @@ const Jn = function(e, t, n, o) {
2115
2147
  "stroke-linecap": "round",
2116
2148
  "stroke-linejoin": "round"
2117
2149
  }), n;
2118
- }, oo = function(e, t) {
2119
- const n = document.createElementNS(_, "g");
2150
+ }, no = function(e, t) {
2151
+ const n = document.createElementNS(L, "g");
2120
2152
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
2121
2153
  const o = de(e.line.getAttribute("d"), t);
2122
2154
  n.appendChild(o);
@@ -2126,10 +2158,10 @@ const Jn = function(e, t, n, o) {
2126
2158
  n.appendChild(s);
2127
2159
  }
2128
2160
  e.insertBefore(n, e.firstChild);
2129
- }, io = function(e) {
2161
+ }, oo = function(e) {
2130
2162
  const t = e.querySelector(".arrow-highlight");
2131
2163
  t && t.remove();
2132
- }, so = function(e) {
2164
+ }, io = function(e) {
2133
2165
  const t = e.querySelector(".arrow-highlight");
2134
2166
  if (!t)
2135
2167
  return;
@@ -2137,35 +2169,35 @@ const Jn = function(e, t, n, o) {
2137
2169
  n.length >= 1 && n[0].setAttribute("d", e.line.getAttribute("d")), n.length >= 2 && n[1].setAttribute("d", e.arrow1.getAttribute("d")), n.length >= 3 && e.arrow2.getAttribute("d") && n[2].setAttribute("d", e.arrow2.getAttribute("d"));
2138
2170
  }, ae = function(e) {
2139
2171
  var t, n;
2140
- (t = e.helper1) == null || t.destroy(), (n = e.helper2) == null || n.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && io(e.currentArrow);
2141
- }, lt = function(e, t, n, o) {
2142
- const { linkController: i, P2: s, P3: r, line1: l, line2: d, nodes: a, map: f, currentArrow: u, bus: g } = e;
2143
- if (!u)
2172
+ (t = e.helper1) == null || t.destroy(), (n = e.helper2) == null || n.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && oo(e.currentArrow);
2173
+ }, ct = function(e, t, n, o) {
2174
+ const { linkController: i, P2: s, P3: r, line1: c, line2: l, nodes: d, map: f, currentArrow: h, bus: g } = e;
2175
+ if (!h)
2144
2176
  return;
2145
- i.style.display = "initial", s.style.display = "initial", r.style.display = "initial", a.appendChild(i), a.appendChild(s), a.appendChild(r), oo(u, Un);
2146
- let { x: h, y: c } = G(n), { ctrlX: p, ctrlY: m } = n, { ctrlX: v, ctrlY: b } = o, { x, y: N } = G(o);
2147
- s.style.cssText = `top:${m}px;left:${p}px;`, r.style.cssText = `top:${b}px;left:${v}px;`, Q(l, h, c, p, m), Q(d, v, b, x, N), e.helper1 = Fe.create(s), e.helper2 = Fe.create(r), e.helper1.init(f, (k, y) => {
2177
+ i.style.display = "initial", s.style.display = "initial", r.style.display = "initial", d.appendChild(i), d.appendChild(s), d.appendChild(r), no(h, Un);
2178
+ let { x: u, y: a } = G(n), { ctrlX: p, ctrlY: m } = n, { ctrlX: v, ctrlY: b } = o, { x, y: C } = G(o);
2179
+ s.style.cssText = `top:${m}px;left:${p}px;`, r.style.cssText = `top:${b}px;left:${v}px;`, Q(c, u, a, p, m), Q(l, v, b, x, C), e.helper1 = We.create(s), e.helper2 = We.create(r), e.helper1.init(f, (k, y) => {
2148
2180
  p = p + k / e.scaleVal, m = m + y / e.scaleVal;
2149
2181
  const w = G({ ...n, ctrlX: p, ctrlY: m });
2150
- h = w.x, c = w.y, s.style.top = m + "px", s.style.left = p + "px", Ie(u, h, c, p, m, v, b, x, N, t), Q(l, h, c, p, m), t.delta1.x = p - n.cx, t.delta1.y = m - n.cy, g.fire("updateArrowDelta", t);
2182
+ u = w.x, a = w.y, s.style.top = m + "px", s.style.left = p + "px", Ie(h, u, a, p, m, v, b, x, C, t), Q(c, u, a, p, m), t.delta1.x = p - n.cx, t.delta1.y = m - n.cy, g.fire("updateArrowDelta", t);
2151
2183
  }), e.helper2.init(f, (k, y) => {
2152
2184
  v = v + k / e.scaleVal, b = b + y / e.scaleVal;
2153
2185
  const w = G({ ...o, ctrlX: v, ctrlY: b });
2154
- x = w.x, N = w.y, r.style.top = b + "px", r.style.left = v + "px", Ie(u, h, c, p, m, v, b, x, N, t), Q(d, v, b, x, N), t.delta2.x = v - o.cx, t.delta2.y = b - o.cy, g.fire("updateArrowDelta", t);
2186
+ x = w.x, C = w.y, r.style.top = b + "px", r.style.left = v + "px", Ie(h, u, a, p, m, v, b, x, C, t), Q(l, v, b, x, C), t.delta2.x = v - o.cx, t.delta2.y = b - o.cy, g.fire("updateArrowDelta", t);
2155
2187
  });
2156
2188
  };
2157
- function ro() {
2189
+ function so() {
2158
2190
  this.linkSvgGroup.innerHTML = "";
2159
2191
  for (let e = 0; e < this.arrows.length; e++) {
2160
2192
  const t = this.arrows[e];
2161
2193
  try {
2162
- Ce(this, this.findEle(t.from), this.findEle(t.to), t, !0);
2194
+ Se(this, this.findEle(t.from), this.findEle(t.to), t, !0);
2163
2195
  } catch {
2164
2196
  }
2165
2197
  }
2166
2198
  this.nodes.appendChild(this.linkSvgGroup);
2167
2199
  }
2168
- function lo(e) {
2200
+ function ro(e) {
2169
2201
  if (ae(this), !e)
2170
2202
  return;
2171
2203
  const t = e.label;
@@ -2174,123 +2206,115 @@ function lo(e) {
2174
2206
  function co() {
2175
2207
  this.arrows = this.arrows.filter((e) => oe(e.from, this.nodeData) && oe(e.to, this.nodeData));
2176
2208
  }
2177
- const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2209
+ const lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2178
2210
  __proto__: null,
2179
- createArrow: Zn,
2180
- createArrowFrom: Qn,
2181
- editArrowLabel: lo,
2182
- removeArrow: eo,
2183
- renderArrow: ro,
2184
- selectArrow: to,
2211
+ createArrow: Jn,
2212
+ createArrowFrom: Zn,
2213
+ editArrowLabel: ro,
2214
+ removeArrow: Qn,
2215
+ renderArrow: so,
2216
+ selectArrow: eo,
2185
2217
  tidyArrow: co,
2186
- unselectArrow: no
2187
- }, Symbol.toStringTag, { value: "Module" })), ho = function(e) {
2188
- var d, a;
2218
+ unselectArrow: to
2219
+ }, Symbol.toStringTag, { value: "Module" })), ao = function(e) {
2220
+ var l, d;
2189
2221
  if (e.length === 0)
2190
2222
  throw new Error("No selected node.");
2191
2223
  if (e.length === 1) {
2192
- const f = e[0].nodeObj, u = e[0].nodeObj.parent;
2193
- if (!u)
2224
+ const f = e[0].nodeObj, h = e[0].nodeObj.parent;
2225
+ if (!h)
2194
2226
  throw new Error("Can not select root node.");
2195
- const g = u.children.findIndex((h) => f === h);
2227
+ const g = h.children.findIndex((u) => f === u);
2196
2228
  return {
2197
- parent: u.id,
2229
+ parent: h.id,
2198
2230
  start: g,
2199
2231
  end: g
2200
2232
  };
2201
2233
  }
2202
2234
  let t = 0;
2203
2235
  const n = e.map((f) => {
2204
- let u = f.nodeObj;
2236
+ let h = f.nodeObj;
2205
2237
  const g = [];
2206
- for (; u.parent; ) {
2207
- const h = u.parent, c = h.children, p = c == null ? void 0 : c.indexOf(u);
2208
- u = h, g.unshift({ node: u, index: p });
2238
+ for (; h.parent; ) {
2239
+ const u = h.parent, a = u.children, p = a == null ? void 0 : a.indexOf(h);
2240
+ h = u, g.unshift({ node: h, index: p });
2209
2241
  }
2210
2242
  return g.length > t && (t = g.length), g;
2211
2243
  });
2212
2244
  let o = 0;
2213
2245
  e:
2214
2246
  for (; o < t; o++) {
2215
- const f = (d = n[0][o]) == null ? void 0 : d.node;
2216
- for (let u = 1; u < n.length; u++)
2217
- if (((a = n[u][o]) == null ? void 0 : a.node) !== f)
2247
+ const f = (l = n[0][o]) == null ? void 0 : l.node;
2248
+ for (let h = 1; h < n.length; h++)
2249
+ if (((d = n[h][o]) == null ? void 0 : d.node) !== f)
2218
2250
  break e;
2219
2251
  }
2220
2252
  if (!o)
2221
2253
  throw new Error("Can not select root node.");
2222
- const i = n.map((f) => f[o - 1].index).sort(), s = i[0] || 0, r = i[i.length - 1] || 0, l = n[0][o - 1].node;
2223
- if (!l.parent)
2254
+ const i = n.map((f) => f[o - 1].index).sort(), s = i[0] || 0, r = i[i.length - 1] || 0, c = n[0][o - 1].node;
2255
+ if (!c.parent)
2224
2256
  throw new Error("Please select nodes in the same main topic.");
2225
2257
  return {
2226
- parent: l.id,
2258
+ parent: c.id,
2227
2259
  start: s,
2228
2260
  end: r
2229
2261
  };
2230
- }, uo = function(e) {
2231
- const t = document.createElementNS(_, "g");
2262
+ }, ho = function(e) {
2263
+ const t = document.createElementNS(L, "g");
2232
2264
  return t.setAttribute("id", e), t;
2233
- }, We = function(e, t) {
2234
- const n = document.createElementNS(_, "path");
2235
- return S(n, {
2265
+ }, Ke = function(e, t) {
2266
+ const n = document.createElementNS(L, "path");
2267
+ return N(n, {
2236
2268
  d: e,
2237
2269
  stroke: t || "#666",
2238
2270
  fill: "none",
2239
2271
  "stroke-linecap": "round",
2240
2272
  "stroke-width": "2"
2241
2273
  }), n;
2242
- }, Ke = function(e, t, n, o, i) {
2243
- const s = document.createElementNS(_, "text");
2244
- return S(s, {
2245
- "text-anchor": o,
2246
- x: t + "",
2247
- y: n + "",
2248
- fill: i || "#666"
2249
- }), s.innerHTML = e, s;
2250
- }, fo = (e) => e.parentElement.parentElement, po = function(e, { parent: t, start: n }) {
2274
+ }, uo = (e) => e.parentElement.parentElement, fo = function(e, { parent: t, start: n }) {
2251
2275
  const o = e.findEle(t), i = o.nodeObj;
2252
2276
  let s;
2253
2277
  return i.parent ? s = o.closest("me-main").className : s = e.findEle(i.children[n].id).closest("me-main").className, s;
2254
- }, Se = function(e, t) {
2278
+ }, Ne = function(e, t) {
2255
2279
  var E;
2256
- const { id: n, label: o, parent: i, start: s, end: r } = t, { nodes: l, theme: d, summarySvg: a } = e, u = e.findEle(i).nodeObj, g = po(e, t);
2257
- let h = 1 / 0, c = 0, p = 0, m = 0;
2258
- for (let C = s; C <= r; C++) {
2259
- const O = (E = u.children) == null ? void 0 : E[C];
2260
- if (!O)
2280
+ const { id: n, label: o, parent: i, start: s, end: r } = t, { nodes: c, theme: l, summarySvg: d } = e, h = e.findEle(i).nodeObj, g = fo(e, t);
2281
+ let u = 1 / 0, a = 0, p = 0, m = 0;
2282
+ for (let S = s; S <= r; S++) {
2283
+ const P = (E = h.children) == null ? void 0 : E[S];
2284
+ if (!P)
2261
2285
  return e.removeSummary(n), null;
2262
- const B = fo(e.findEle(O.id)), { offsetLeft: R, offsetTop: Ne } = H(l, B), ke = s === r ? 10 : 20;
2263
- C === s && (p = Ne + ke), C === r && (m = Ne + B.offsetHeight - ke), R < h && (h = R), B.offsetWidth + R > c && (c = B.offsetWidth + R);
2286
+ const B = uo(e.findEle(P.id)), { offsetLeft: R, offsetTop: ke } = H(c, B), _e = s === r ? 10 : 20;
2287
+ S === s && (p = ke + _e), S === r && (m = ke + B.offsetHeight - _e), R < u && (u = R), B.offsetWidth + R > a && (a = B.offsetWidth + R);
2264
2288
  }
2265
2289
  let v, b;
2266
- const x = p + 10, N = m + 10, k = (x + N) / 2, y = d.cssVar["--color"];
2267
- g === M.LHS ? (v = We(`M ${h + 10} ${x} c -5 0 -10 5 -10 10 L ${h} ${N - 10} c 0 5 5 10 10 10 M ${h} ${k} h -10`, y), b = Ke(o, h - 20, k + 6, "end", y)) : (v = We(`M ${c - 10} ${x} c 5 0 10 5 10 10 L ${c} ${N - 10} c 0 5 -5 10 -10 10 M ${c} ${k} h 10`, y), b = Ke(o, c + 20, k + 6, "start", y));
2268
- const w = uo("s-" + n);
2269
- return w.appendChild(v), w.appendChild(b), w.summaryObj = t, a.appendChild(w), w;
2270
- }, go = function() {
2290
+ const x = p + 10, C = m + 10, k = (x + C) / 2, y = l.cssVar["--color"];
2291
+ g === M.LHS ? (v = Ke(`M ${u + 10} ${x} c -5 0 -10 5 -10 10 L ${u} ${C - 10} c 0 5 5 10 10 10 M ${u} ${k} h -10`, y), b = ue(o, u - 20, k + 6, { anchor: "end", color: y })) : (v = Ke(`M ${a - 10} ${x} c 5 0 10 5 10 10 L ${a} ${C - 10} c 0 5 -5 10 -10 10 M ${a} ${k} h 10`, y), b = ue(o, a + 20, k + 6, { anchor: "start", color: y }));
2292
+ const w = ho("s-" + n);
2293
+ return w.appendChild(v), w.appendChild(b), w.summaryObj = t, d.appendChild(w), w;
2294
+ }, po = function() {
2271
2295
  if (!this.currentNodes)
2272
2296
  return;
2273
- const { currentNodes: e, summaries: t, bus: n } = this, { parent: o, start: i, end: s } = ho(e), r = { id: K(), parent: o, start: i, end: s, label: "summary" }, l = Se(this, r);
2274
- t.push(r), this.editSummary(l), n.fire("operation", {
2297
+ const { currentNodes: e, summaries: t, bus: n } = this, { parent: o, start: i, end: s } = ao(e), r = { id: K(), parent: o, start: i, end: s, label: "summary" }, c = Ne(this, r);
2298
+ t.push(r), this.editSummary(c), n.fire("operation", {
2275
2299
  name: "createSummary",
2276
2300
  obj: r
2277
2301
  });
2278
- }, mo = function(e) {
2302
+ }, go = function(e) {
2279
2303
  const t = K(), n = { ...e, id: t };
2280
- Se(this, n), this.summaries.push(n), this.bus.fire("operation", {
2304
+ Ne(this, n), this.summaries.push(n), this.bus.fire("operation", {
2281
2305
  name: "createSummary",
2282
2306
  obj: n
2283
2307
  });
2284
- }, vo = function(e) {
2308
+ }, mo = function(e) {
2285
2309
  var n;
2286
2310
  const t = this.summaries.findIndex((o) => o.id === e);
2287
2311
  t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
2288
2312
  name: "removeSummary",
2289
2313
  obj: { id: e }
2290
2314
  });
2291
- }, bo = function(e) {
2292
- const t = e.children[1].getBBox(), n = 6, o = 3, i = document.createElementNS(_, "rect");
2293
- S(i, {
2315
+ }, vo = function(e) {
2316
+ const t = e.children[1].getBBox(), n = 6, o = 3, i = document.createElementNS(L, "rect");
2317
+ N(i, {
2294
2318
  x: t.x - n + "",
2295
2319
  y: t.y - n + "",
2296
2320
  width: t.width + n * 2 + "",
@@ -2300,80 +2324,80 @@ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2300
2324
  "stroke-width": "2",
2301
2325
  fill: "none"
2302
2326
  }), e.appendChild(i), this.currentSummary = e;
2303
- }, yo = function() {
2327
+ }, bo = function() {
2304
2328
  var e, t;
2305
2329
  (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
2306
- }, wo = function() {
2330
+ }, yo = function() {
2307
2331
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
2308
2332
  try {
2309
- Se(this, e);
2333
+ Ne(this, e);
2310
2334
  } catch {
2311
2335
  }
2312
2336
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
2313
- }, xo = function(e) {
2337
+ }, wo = function(e) {
2314
2338
  if (!e)
2315
2339
  return;
2316
2340
  const t = e.childNodes[1];
2317
2341
  Ue(this, t, e.summaryObj);
2318
- }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2342
+ }, xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2319
2343
  __proto__: null,
2320
- createSummary: go,
2321
- createSummaryFrom: mo,
2322
- editSummary: xo,
2323
- removeSummary: vo,
2324
- renderSummary: wo,
2325
- selectSummary: bo,
2326
- unselectSummary: yo
2327
- }, Symbol.toStringTag, { value: "Module" })), T = "http://www.w3.org/2000/svg";
2328
- function Co(e, t) {
2329
- const n = document.createElementNS(T, "svg");
2330
- return S(n, {
2344
+ createSummary: po,
2345
+ createSummaryFrom: go,
2346
+ editSummary: wo,
2347
+ removeSummary: mo,
2348
+ renderSummary: yo,
2349
+ selectSummary: vo,
2350
+ unselectSummary: bo
2351
+ }, Symbol.toStringTag, { value: "Module" })), _ = "http://www.w3.org/2000/svg";
2352
+ function Eo(e, t) {
2353
+ const n = document.createElementNS(_, "svg");
2354
+ return N(n, {
2331
2355
  version: "1.1",
2332
- xmlns: T,
2356
+ xmlns: _,
2333
2357
  height: e,
2334
2358
  width: t
2335
2359
  }), n;
2336
2360
  }
2337
- function So(e, t) {
2361
+ function Co(e, t) {
2338
2362
  return (parseInt(e) - parseInt(t)) / 2;
2339
2363
  }
2340
- function No(e, t, n, o) {
2341
- const i = document.createElementNS(T, "g");
2364
+ function So(e, t, n, o) {
2365
+ const i = document.createElementNS(_, "g");
2342
2366
  let s = "";
2343
2367
  return e.text ? s = e.text.textContent : s = e.childNodes[0].textContent, s.split(`
2344
- `).forEach((l, d) => {
2345
- const a = document.createElementNS(T, "text");
2346
- S(a, {
2368
+ `).forEach((c, l) => {
2369
+ const d = document.createElementNS(_, "text");
2370
+ N(d, {
2347
2371
  x: n + parseInt(t.paddingLeft) + "",
2348
- y: o + parseInt(t.paddingTop) + So(t.lineHeight, t.fontSize) * (d + 1) + parseFloat(t.fontSize) * (d + 1) + "",
2372
+ y: o + parseInt(t.paddingTop) + Co(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
2349
2373
  "text-anchor": "start",
2350
2374
  "font-family": t.fontFamily,
2351
2375
  "font-size": `${t.fontSize}`,
2352
2376
  "font-weight": `${t.fontWeight}`,
2353
2377
  fill: `${t.color}`
2354
- }), a.innerHTML = l, i.appendChild(a);
2378
+ }), d.innerHTML = c, i.appendChild(d);
2355
2379
  }), i;
2356
2380
  }
2357
- function ko(e, t, n, o) {
2358
- var l;
2381
+ function No(e, t, n, o) {
2382
+ var c;
2359
2383
  let i = "";
2360
- (l = e.nodeObj) != null && l.dangerouslySetInnerHTML ? i = e.nodeObj.dangerouslySetInnerHTML : e.text ? i = e.text.textContent : i = e.childNodes[0].textContent;
2361
- const s = document.createElementNS(T, "foreignObject");
2362
- S(s, {
2384
+ (c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? i = e.nodeObj.dangerouslySetInnerHTML : e.text ? i = e.text.textContent : i = e.childNodes[0].textContent;
2385
+ const s = document.createElementNS(_, "foreignObject");
2386
+ N(s, {
2363
2387
  x: n + parseInt(t.paddingLeft) + "",
2364
2388
  y: o + parseInt(t.paddingTop) + "",
2365
2389
  width: t.width,
2366
2390
  height: t.height
2367
2391
  });
2368
2392
  const r = document.createElement("div");
2369
- return S(r, {
2393
+ return N(r, {
2370
2394
  xmlns: "http://www.w3.org/1999/xhtml",
2371
2395
  style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
2372
2396
  }), r.innerHTML = i, s.appendChild(r), s;
2373
2397
  }
2374
- function _o(e, t) {
2375
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(T, "rect");
2376
- return S(s, {
2398
+ function ko(e, t) {
2399
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(_, "rect");
2400
+ return N(s, {
2377
2401
  x: o + "",
2378
2402
  y: i + "",
2379
2403
  rx: n.borderRadius,
@@ -2386,8 +2410,8 @@ function _o(e, t) {
2386
2410
  }), s;
2387
2411
  }
2388
2412
  function ee(e, t, n = !1) {
2389
- const o = getComputedStyle(t), { offsetLeft: i, offsetTop: s } = H(e.nodes, t), r = document.createElementNS(T, "rect");
2390
- S(r, {
2413
+ const o = getComputedStyle(t), { offsetLeft: i, offsetTop: s } = H(e.nodes, t), r = document.createElementNS(_, "rect");
2414
+ N(r, {
2391
2415
  x: i + "",
2392
2416
  y: s + "",
2393
2417
  rx: o.borderRadius,
@@ -2398,14 +2422,14 @@ function ee(e, t, n = !1) {
2398
2422
  stroke: o.borderColor,
2399
2423
  "stroke-width": o.borderWidth
2400
2424
  });
2401
- const l = document.createElementNS(T, "g");
2402
- l.appendChild(r);
2403
- let d;
2404
- return n ? d = ko(t, o, i, s) : d = No(t, o, i, s), l.appendChild(d), l;
2425
+ const c = document.createElementNS(_, "g");
2426
+ c.appendChild(r);
2427
+ let l;
2428
+ return n ? l = No(t, o, i, s) : l = So(t, o, i, s), c.appendChild(l), c;
2405
2429
  }
2406
- function To(e, t) {
2407
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(T, "a"), r = document.createElementNS(T, "text");
2408
- return S(r, {
2430
+ function _o(e, t) {
2431
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(_, "a"), r = document.createElementNS(_, "text");
2432
+ return N(r, {
2409
2433
  x: o + "",
2410
2434
  y: i + parseInt(n.fontSize) + "",
2411
2435
  "text-anchor": "start",
@@ -2415,9 +2439,9 @@ function To(e, t) {
2415
2439
  fill: `${n.color}`
2416
2440
  }), r.innerHTML = t.textContent, s.appendChild(r), s.setAttribute("href", t.href), s;
2417
2441
  }
2418
- function Lo(e, t) {
2419
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(T, "image");
2420
- return S(s, {
2442
+ function To(e, t) {
2443
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = H(e.nodes, t), s = document.createElementNS(_, "image");
2444
+ return N(s, {
2421
2445
  x: o + "",
2422
2446
  y: i + "",
2423
2447
  width: n.width + "",
@@ -2425,41 +2449,41 @@ function Lo(e, t) {
2425
2449
  href: t.src
2426
2450
  }), s;
2427
2451
  }
2428
- const te = 100, Ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Mo = (e, t = !1) => {
2429
- var u, g, h;
2430
- const n = e.nodes, o = n.offsetHeight + te * 2, i = n.offsetWidth + te * 2, s = Co(o + "px", i + "px"), r = document.createElementNS(T, "svg"), l = document.createElementNS(T, "rect");
2431
- S(l, {
2452
+ const te = 100, Lo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Ao = (e, t = !1) => {
2453
+ var h, g, u;
2454
+ const n = e.nodes, o = n.offsetHeight + te * 2, i = n.offsetWidth + te * 2, s = Eo(o + "px", i + "px"), r = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2455
+ N(c, {
2432
2456
  x: "0",
2433
2457
  y: "0",
2434
2458
  width: `${i}`,
2435
2459
  height: `${o}`,
2436
2460
  fill: e.theme.cssVar["--bgcolor"]
2437
- }), s.appendChild(l), n.querySelectorAll(".subLines").forEach((c) => {
2438
- const p = c.cloneNode(!0), { offsetLeft: m, offsetTop: v } = H(n, c.parentElement);
2461
+ }), s.appendChild(c), n.querySelectorAll(".subLines").forEach((a) => {
2462
+ const p = a.cloneNode(!0), { offsetLeft: m, offsetTop: v } = H(n, a.parentElement);
2439
2463
  p.setAttribute("x", `${m}`), p.setAttribute("y", `${v}`), r.appendChild(p);
2440
2464
  });
2441
- const d = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
2465
+ const l = (h = n.querySelector(".lines")) == null ? void 0 : h.cloneNode(!0);
2466
+ l && r.appendChild(l);
2467
+ const d = (g = n.querySelector(".topiclinks")) == null ? void 0 : g.cloneNode(!0);
2442
2468
  d && r.appendChild(d);
2443
- const a = (g = n.querySelector(".topiclinks")) == null ? void 0 : g.cloneNode(!0);
2444
- a && r.appendChild(a);
2445
- const f = (h = n.querySelector(".summary")) == null ? void 0 : h.cloneNode(!0);
2446
- return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((c) => {
2447
- c.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ee(e, c, !t)) : (r.appendChild(_o(e, c)), r.appendChild(ee(e, c.text, !t)));
2448
- }), n.querySelectorAll(".tags > span").forEach((c) => {
2449
- r.appendChild(ee(e, c));
2450
- }), n.querySelectorAll(".icons > span").forEach((c) => {
2451
- r.appendChild(ee(e, c));
2452
- }), n.querySelectorAll(".hyper-link").forEach((c) => {
2453
- r.appendChild(To(e, c));
2454
- }), n.querySelectorAll("img").forEach((c) => {
2455
- r.appendChild(Lo(e, c));
2456
- }), S(r, {
2469
+ const f = (u = n.querySelector(".summary")) == null ? void 0 : u.cloneNode(!0);
2470
+ return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((a) => {
2471
+ a.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ee(e, a, !t)) : (r.appendChild(ko(e, a)), r.appendChild(ee(e, a.text, !t)));
2472
+ }), n.querySelectorAll(".tags > span").forEach((a) => {
2473
+ r.appendChild(ee(e, a));
2474
+ }), n.querySelectorAll(".icons > span").forEach((a) => {
2475
+ r.appendChild(ee(e, a));
2476
+ }), n.querySelectorAll(".hyper-link").forEach((a) => {
2477
+ r.appendChild(_o(e, a));
2478
+ }), n.querySelectorAll("img").forEach((a) => {
2479
+ r.appendChild(To(e, a));
2480
+ }), N(r, {
2457
2481
  x: te + "",
2458
2482
  y: te + "",
2459
2483
  overflow: "visible"
2460
2484
  }), s.appendChild(r), s;
2461
- }, Do = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Ao + e.outerHTML);
2462
- function Oo(e) {
2485
+ }, Mo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Lo + e.outerHTML);
2486
+ function Do(e) {
2463
2487
  return new Promise((t, n) => {
2464
2488
  const o = new FileReader();
2465
2489
  o.onload = (i) => {
@@ -2469,35 +2493,35 @@ function Oo(e) {
2469
2493
  }, o.readAsDataURL(e);
2470
2494
  });
2471
2495
  }
2472
- const jo = function(e = !1, t) {
2473
- const n = Mo(this, e), o = Do(n, t);
2496
+ const Po = function(e = !1, t) {
2497
+ const n = Ao(this, e), o = Mo(n, t);
2474
2498
  return new Blob([o], { type: "image/svg+xml" });
2475
- }, Po = async function(e = !1, t) {
2476
- const n = this.exportSvg(e, t), o = await Oo(n);
2499
+ }, $o = async function(e = !1, t) {
2500
+ const n = this.exportSvg(e, t), o = await Do(n);
2477
2501
  return new Promise((i, s) => {
2478
2502
  const r = new Image();
2479
2503
  r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
2480
- const l = document.createElement("canvas");
2481
- l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(i, "image/png", 1);
2504
+ const c = document.createElement("canvas");
2505
+ c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(i, "image/png", 1);
2482
2506
  }, r.src = o, r.onerror = s;
2483
2507
  });
2484
- }, $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2508
+ }, Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2485
2509
  __proto__: null,
2486
- exportPng: Po,
2487
- exportSvg: jo
2510
+ exportPng: $o,
2511
+ exportSvg: Po
2488
2512
  }, Symbol.toStringTag, { value: "Module" }));
2489
- function Ho(e, t) {
2513
+ function jo(e, t) {
2490
2514
  return async function(...n) {
2491
2515
  const o = this.before[t];
2492
2516
  o && !await o.apply(this, n) || e.apply(this, n);
2493
2517
  };
2494
2518
  }
2495
- const Ye = Object.keys(it), ct = {};
2519
+ const Ye = Object.keys(it), lt = {};
2496
2520
  for (let e = 0; e < Ye.length; e++) {
2497
2521
  const t = Ye[e];
2498
- ct[t] = Ho(it[t], t);
2522
+ lt[t] = jo(it[t], t);
2499
2523
  }
2500
- const Bo = {
2524
+ const Ho = {
2501
2525
  getObjById: oe,
2502
2526
  generateNewObj: ht,
2503
2527
  layout: wt,
@@ -2507,41 +2531,41 @@ const Bo = {
2507
2531
  createParent: St,
2508
2532
  createChildren: Nt,
2509
2533
  createTopic: kt,
2510
- findEle: Ve,
2534
+ findEle: qe,
2511
2535
  changeTheme: tn,
2512
- ...qn,
2513
- ...ct,
2514
- ...ao,
2515
- ...Eo,
2516
- ...$o,
2536
+ ...zn,
2537
+ ...lt,
2538
+ ...lo,
2539
+ ...xo,
2540
+ ...Oo,
2517
2541
  init(e) {
2518
2542
  if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData)
2519
2543
  return new Error("MindElixir: `data` is required");
2520
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && qt(this), this.keypress && vt(this, this.keypress), this.editable && en(this), this.contextMenu && this.disposable.push(At(this, this.contextMenu)), this.draggable && this.disposable.push(jt(this)), this.allowUndo && this.disposable.push($t(this)), this.layout(), this.linkDiv(), this.toCenter();
2544
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, j(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && zt(this), this.keypress && vt(this, this.keypress), this.editable && en(this), this.contextMenu && this.disposable.push(At(this, this.contextMenu)), this.draggable && this.disposable.push($t(this)), this.allowUndo && this.disposable.push(jt(this)), this.layout(), this.linkDiv(), this.toCenter();
2521
2545
  },
2522
2546
  destroy() {
2523
2547
  var e;
2524
2548
  this.disposable.forEach((t) => t()), this.el && (this.el.innerHTML = ""), this.el = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (e = this.selection) == null || e.destroy(), this.selection = void 0;
2525
2549
  }
2526
2550
  };
2527
- function Ro({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction: d, containerHeight: a }) {
2551
+ function Bo({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, containerHeight: d }) {
2528
2552
  let f = t + n / 2;
2529
- const u = e + o / 2;
2553
+ const h = e + o / 2;
2530
2554
  let g;
2531
- d === M.LHS ? g = s + r : g = s;
2532
- const h = i + l / 2, p = (1 - Math.abs(h - u) / a) * 0.25 * (n / 2);
2533
- return d === M.LHS ? f = f - n / 10 - p : f = f + n / 10 + p, `M ${f} ${u} Q ${f} ${h} ${g} ${h}`;
2555
+ l === M.LHS ? g = s + r : g = s;
2556
+ const u = i + c / 2, p = (1 - Math.abs(u - h) / d) * 0.25 * (n / 2);
2557
+ return l === M.LHS ? f = f - n / 10 - p : f = f + n / 10 + p, `M ${f} ${h} Q ${f} ${u} ${g} ${u}`;
2534
2558
  }
2535
- function Fo({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction: d, isFirst: a }) {
2559
+ function Ro({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, isFirst: d }) {
2536
2560
  const f = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
2537
- let u = 0, g = 0;
2538
- a ? u = e + o / 2 : u = e + o;
2539
- const h = i + l;
2540
- let c = 0, p = 0, m = 0;
2541
- const v = Math.abs(u - h) / 300 * f;
2542
- return d === M.LHS ? (m = t, c = m + f, p = m - f, g = s + f, `M ${c} ${u} C ${m} ${u} ${m + v} ${h} ${p} ${h} H ${g}`) : (m = t + n, c = m - f, p = m + f, g = s + r - f, `M ${c} ${u} C ${m} ${u} ${m - v} ${h} ${p} ${h} H ${g}`);
2561
+ let h = 0, g = 0;
2562
+ d ? h = e + o / 2 : h = e + o;
2563
+ const u = i + c;
2564
+ let a = 0, p = 0, m = 0;
2565
+ const v = Math.abs(h - u) / 300 * f;
2566
+ return l === M.LHS ? (m = t, a = m + f, p = m - f, g = s + f, `M ${a} ${h} C ${m} ${h} ${m + v} ${u} ${p} ${u} H ${g}`) : (m = t + n, a = m - f, p = m + f, g = s + r - f, `M ${a} ${h} C ${m} ${h} ${m - v} ${u} ${p} ${u} H ${g}`);
2543
2567
  }
2544
- const Io = "5.0.4";
2568
+ const Fo = "5.0.6";
2545
2569
  function Wo(e) {
2546
2570
  return {
2547
2571
  x: 0,
@@ -2553,7 +2577,7 @@ function Wo(e) {
2553
2577
  this.mousedown && (this.moved = !0, e.move(t, n));
2554
2578
  },
2555
2579
  clear() {
2556
- this.mousedown = !1, e.map.style.transition = "transform 0.3s";
2580
+ this.mousedown = !1;
2557
2581
  }
2558
2582
  };
2559
2583
  }
@@ -2566,35 +2590,33 @@ function D({
2566
2590
  editable: i,
2567
2591
  contextMenu: s,
2568
2592
  toolBar: r,
2569
- keypress: l,
2570
- mouseSelectionButton: d,
2571
- selectionContainer: a,
2593
+ keypress: c,
2594
+ mouseSelectionButton: l,
2595
+ selectionContainer: d,
2572
2596
  before: f,
2573
- newTopicName: u,
2597
+ newTopicName: h,
2574
2598
  allowUndo: g,
2575
- generateMainBranch: h,
2576
- generateSubBranch: c,
2599
+ generateMainBranch: u,
2600
+ generateSubBranch: a,
2577
2601
  overflowHidden: p,
2578
2602
  theme: m,
2579
2603
  alignment: v,
2580
2604
  scaleSensitivity: b,
2581
2605
  scaleMax: x,
2582
- scaleMin: N,
2606
+ scaleMin: C,
2583
2607
  handleWheel: k
2584
2608
  }) {
2585
2609
  let y = null;
2586
2610
  const w = Object.prototype.toString.call(e);
2587
2611
  if (w === "[object HTMLDivElement]" ? y = e : w === "[object String]" && (y = document.querySelector(e)), !y)
2588
2612
  throw new Error("MindElixir: el is not a valid element");
2589
- y.style.position = "relative", y.innerHTML = "", this.el = y, this.disposable = [], this.before = f || {}, this.locale = n || "en", this.newTopicName = u || "new node", this.contextMenu = s ?? !0, this.toolBar = r ?? !0, this.keypress = l ?? !0, this.mouseSelectionButton = d ?? 0, this.direction = t ?? 1, this.draggable = o ?? !0, this.editable = i ?? !0, this.allowUndo = g ?? !1, this.scaleSensitivity = b ?? 0.1, this.scaleMax = x ?? 1.4, this.scaleMin = N ?? 0.2, this.generateMainBranch = h || Ro, this.generateSubBranch = c || Fo, this.overflowHidden = p ?? !1, this.alignment = v ?? "root", this.handleWheel = k ?? !0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.dragMoveHelper = Wo(this), this.bus = yt(), this.container = U.createElement("div"), this.selectionContainer = a || this.container, this.container.className = "map-container";
2613
+ y.style.position = "relative", y.innerHTML = "", this.el = y, this.disposable = [], this.before = f || {}, this.locale = n || "en", this.newTopicName = h || "New Node", this.contextMenu = s ?? !0, this.toolBar = r ?? !0, this.keypress = c ?? !0, this.mouseSelectionButton = l ?? 0, this.direction = t ?? 1, this.draggable = o ?? !0, this.editable = i ?? !0, this.allowUndo = g ?? !0, this.scaleSensitivity = b ?? 0.1, this.scaleMax = x ?? 1.4, this.scaleMin = C ?? 0.2, this.generateMainBranch = u || Bo, this.generateSubBranch = a || Ro, this.overflowHidden = p ?? !1, this.alignment = v ?? "root", this.handleWheel = k ?? !0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.dragMoveHelper = Wo(this), this.bus = yt(), this.container = U.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
2590
2614
  const E = window.matchMedia("(prefers-color-scheme: dark)");
2591
- this.theme = m || (E.matches ? me : ge);
2592
- const C = U.createElement("div");
2593
- C.className = "map-canvas", setTimeout(() => {
2594
- C.style.transition = "all 0.3s";
2595
- }, 300), this.map = C, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = U.createElement("me-nodes"), this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = U.createElement("div"), this.P3 = U.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Le(), this.line2 = Le(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(bt(this));
2615
+ this.theme = m || (E.matches ? ve : me);
2616
+ const S = U.createElement("div");
2617
+ S.className = "map-canvas", this.map = S, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = U.createElement("me-nodes"), this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = U.createElement("div"), this.P3 = U.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ae(), this.line2 = Ae(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(bt(this));
2596
2618
  }
2597
- D.prototype = Bo;
2619
+ D.prototype = Ho;
2598
2620
  Object.defineProperty(D.prototype, "currentNode", {
2599
2621
  get() {
2600
2622
  return this.currentNodes[this.currentNodes.length - 1];
@@ -2604,10 +2626,10 @@ Object.defineProperty(D.prototype, "currentNode", {
2604
2626
  D.LEFT = 0;
2605
2627
  D.RIGHT = 1;
2606
2628
  D.SIDE = 2;
2607
- D.THEME = ge;
2608
- D.DARK_THEME = me;
2609
- D.version = Io;
2610
- D.E = Ve;
2629
+ D.THEME = me;
2630
+ D.DARK_THEME = ve;
2631
+ D.version = Fo;
2632
+ D.E = qe;
2611
2633
  D.new = (e) => ({
2612
2634
  nodeData: {
2613
2635
  id: K(),