mind-elixir 4.2.4 → 4.3.0

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.
@@ -10,12 +10,12 @@
10
10
  } catch {
11
11
  }
12
12
  }
13
- function h() {
13
+ function u() {
14
14
  i || (i = !0, o());
15
15
  }
16
16
  t = function() {
17
- var d, a, f, g;
18
- (g = document.createElement("div")).innerHTML = c, c = null, (f = g.getElementsByTagName("svg")[0]) && (f.setAttribute("aria-hidden", "true"), f.style.position = "absolute", f.style.width = 0, f.style.height = 0, f.style.overflow = "hidden", d = f, (a = document.body).firstChild ? (g = d, (f = a.firstChild).parentNode.insertBefore(g, f)) : a.appendChild(d));
17
+ var d, a, p, g;
18
+ (g = document.createElement("div")).innerHTML = c, c = null, (p = g.getElementsByTagName("svg")[0]) && (p.setAttribute("aria-hidden", "true"), p.style.position = "absolute", p.style.width = 0, p.style.height = 0, p.style.overflow = "hidden", d = p, (a = document.body).firstChild ? (g = d, (p = a.firstChild).parentNode.insertBefore(g, p)) : a.appendChild(d));
19
19
  }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
20
20
  document.removeEventListener("DOMContentLoaded", n, !1), t();
21
21
  }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
@@ -24,15 +24,16 @@
24
24
  } catch {
25
25
  return void setTimeout(r, 50);
26
26
  }
27
- h();
27
+ u();
28
28
  })(), s.onreadystatechange = function() {
29
- s.readyState == "complete" && (s.onreadystatechange = null, h());
29
+ s.readyState == "complete" && (s.onreadystatechange = null, u());
30
30
  });
31
31
  })(window);
32
- const T = 0, R = 1, ce = 2, D = 30, Oe = {
32
+ const T = 0, z = 1, re = 2, $e = {
33
33
  name: "Latte",
34
34
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
35
35
  cssVar: {
36
+ "--gap": "30px",
36
37
  "--main-color": "#444446",
37
38
  "--main-bgcolor": "#ffffff",
38
39
  "--color": "#777777",
@@ -41,7 +42,7 @@ const T = 0, R = 1, ce = 2, D = 30, Oe = {
41
42
  "--panel-bgcolor": "#ffffff",
42
43
  "--panel-border-color": "#eaeaea"
43
44
  }
44
- }, Pe = {
45
+ }, Oe = {
45
46
  name: "Dark",
46
47
  palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
47
48
  cssVar: {
@@ -54,60 +55,60 @@ const T = 0, R = 1, ce = 2, D = 30, Oe = {
54
55
  "--panel-border-color": "#696969"
55
56
  }
56
57
  };
57
- function oe(e) {
58
+ function ne(e) {
58
59
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
59
60
  }
60
- const se = function(e, t) {
61
+ const oe = function(e, t) {
61
62
  if (t.id === e)
62
63
  return t;
63
64
  if (t.children && t.children.length) {
64
65
  for (let n = 0; n < t.children.length; n++) {
65
- const o = se(e, t.children[n]);
66
+ const o = oe(e, t.children[n]);
66
67
  if (o)
67
68
  return o;
68
69
  }
69
70
  return null;
70
71
  } else
71
72
  return null;
72
- }, $ = (e, t) => {
73
+ }, D = (e, t) => {
73
74
  if (e.parent = t, e.children)
74
75
  for (let n = 0; n < e.children.length; n++)
75
- $(e.children[n], e);
76
+ D(e.children[n], e);
76
77
  };
77
- function ue(e) {
78
- if (e.id = G(), e.children)
78
+ function he(e) {
79
+ if (e.id = X(), e.children)
79
80
  for (let t = 0; t < e.children.length; t++)
80
- ue(e.children[t]);
81
+ he(e.children[t]);
81
82
  }
82
- const nt = (e, t) => {
83
+ const tt = (e, t) => {
83
84
  let n = Date.now();
84
85
  return function(...o) {
85
86
  Date.now() - n < t || (e(...o), n = Date.now());
86
87
  };
87
88
  };
88
- function He(e, t, n, o) {
89
+ function Pe(e, t, n, o) {
89
90
  const s = o - t, i = e - n;
90
91
  let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
91
92
  i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
92
- const c = 15, l = 30, h = r + l, d = r - l;
93
+ const c = 15, l = 30, u = r + l, d = r - l;
93
94
  return {
94
- x1: n + Math.cos(Math.PI * h / 180) * c,
95
- y1: o - Math.sin(Math.PI * h / 180) * c,
95
+ x1: n + Math.cos(Math.PI * u / 180) * c,
96
+ y1: o - Math.sin(Math.PI * u / 180) * c,
96
97
  x2: n + Math.cos(Math.PI * d / 180) * c,
97
98
  y2: o - Math.sin(Math.PI * d / 180) * c
98
99
  };
99
100
  }
100
- function G() {
101
+ function X() {
101
102
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
102
103
  }
103
- const ot = function() {
104
- const e = G();
104
+ const nt = function() {
105
+ const e = X();
105
106
  return {
106
107
  topic: this.newTopicName,
107
108
  id: e
108
109
  };
109
110
  };
110
- function fe(e) {
111
+ function ue(e) {
111
112
  return JSON.parse(
112
113
  JSON.stringify(e, (n, o) => {
113
114
  if (n !== "parent")
@@ -115,7 +116,7 @@ function fe(e) {
115
116
  })
116
117
  );
117
118
  }
118
- const O = (e, t) => {
119
+ const $ = (e, t) => {
119
120
  let n = 0, o = 0;
120
121
  for (; t && t !== e; )
121
122
  n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
@@ -123,7 +124,7 @@ const O = (e, t) => {
123
124
  }, N = (e, t) => {
124
125
  for (const n in t)
125
126
  e.setAttribute(n, t[n]);
126
- }, ae = (e) => e ? e.tagName === "ME-TPC" : !1, le = (e) => e.filter((t) => {
127
+ }, le = (e) => e ? e.tagName === "ME-TPC" : !1, ce = (e) => e.filter((t) => {
127
128
  for (let n = 0; n < e.length; n++) {
128
129
  if (t === e[n])
129
130
  continue;
@@ -146,7 +147,7 @@ const O = (e, t) => {
146
147
  this.moved = !1, this.mousedown = !1;
147
148
  }
148
149
  };
149
- function st(e) {
150
+ function ot(e) {
150
151
  e.map.addEventListener("click", (t) => {
151
152
  var o, s;
152
153
  if (t.button !== 0)
@@ -167,7 +168,7 @@ function st(e) {
167
168
  const n = t.target;
168
169
  if (n.tagName === "ME-EPD")
169
170
  e.expandNode(n.previousSibling);
170
- else if (ae(n))
171
+ else if (le(n))
171
172
  e.selectNode(n, !1, t);
172
173
  else if (e.editable)
173
174
  n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectArrow(n.parentElement) : e.selectSummary(n.parentElement) : n.className;
@@ -177,7 +178,7 @@ function st(e) {
177
178
  if (!e.editable)
178
179
  return;
179
180
  const n = t.target;
180
- ae(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
181
+ le(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
181
182
  }), e.map.addEventListener("mousemove", (t) => {
182
183
  t.target.contentEditable !== "true" && k.onMove(t, e.container);
183
184
  }), e.map.addEventListener("mousedown", (t) => {
@@ -191,7 +192,7 @@ function st(e) {
191
192
  t.button === n && k.clear();
192
193
  });
193
194
  }
194
- const it = {
195
+ const st = {
195
196
  create() {
196
197
  return {
197
198
  handlers: {},
@@ -219,32 +220,32 @@ const it = {
219
220
  }
220
221
  };
221
222
  }
222
- }, ie = document, rt = function() {
223
+ }, se = document, it = function() {
223
224
  this.nodes.innerHTML = "";
224
225
  const e = this.createTopic(this.nodeData);
225
- pe(e, this.nodeData), e.draggable = !1;
226
- const t = ie.createElement("me-root");
226
+ fe(e, this.nodeData), e.draggable = !1;
227
+ const t = se.createElement("me-root");
227
228
  t.appendChild(e);
228
229
  const n = this.nodeData.children || [];
229
- if (this.direction === ce) {
230
+ if (this.direction === re) {
230
231
  let o = 0, s = 0;
231
232
  n.map((i) => {
232
- i.direction === T ? o += 1 : i.direction === R ? s += 1 : o <= s ? (i.direction = T, o += 1) : (i.direction = R, s += 1);
233
+ i.direction === T ? o += 1 : i.direction === z ? s += 1 : o <= s ? (i.direction = T, o += 1) : (i.direction = z, s += 1);
233
234
  });
234
235
  }
235
- ct(this, n, t);
236
- }, ct = function(e, t, n) {
237
- const o = ie.createElement("me-main");
236
+ rt(this, n, t);
237
+ }, rt = function(e, t, n) {
238
+ const o = se.createElement("me-main");
238
239
  o.className = "lhs";
239
- const s = ie.createElement("me-main");
240
+ const s = se.createElement("me-main");
240
241
  s.className = "rhs";
241
242
  for (let i = 0; i < t.length; i++) {
242
243
  const r = t[i], { grp: c } = e.createWrapper(r);
243
- e.direction === ce ? r.direction === T ? o.appendChild(c) : s.appendChild(c) : e.direction === T ? o.appendChild(c) : s.appendChild(c);
244
+ e.direction === re ? r.direction === T ? o.appendChild(c) : s.appendChild(c) : e.direction === T ? o.appendChild(c) : s.appendChild(c);
244
245
  }
245
246
  e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
246
- }, lt = function(e, t) {
247
- const n = ie.createElement("me-children");
247
+ }, ct = function(e, t) {
248
+ const n = se.createElement("me-children");
248
249
  for (let o = 0; o < t.length; o++) {
249
250
  const s = t[o], { grp: i } = e.createWrapper(s);
250
251
  n.appendChild(i);
@@ -255,7 +256,7 @@ const it = {
255
256
  if (!o)
256
257
  throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
257
258
  return o;
258
- }, pe = function(e, t) {
259
+ }, fe = function(e, t) {
259
260
  if (e.innerHTML = "", t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.dangerouslySetInnerHTML) {
260
261
  e.innerHTML = t.dangerouslySetInnerHTML;
261
262
  return;
@@ -279,31 +280,31 @@ const it = {
279
280
  e.linkContainer && (e.linkContainer = void 0);
280
281
  if (t.icons && t.icons.length) {
281
282
  const n = _.createElement("span");
282
- n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${oe(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
283
+ n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
283
284
  } else
284
285
  e.icons && (e.icons = void 0);
285
286
  if (t.tags && t.tags.length) {
286
287
  const n = _.createElement("div");
287
- n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${oe(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
288
+ n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
288
289
  } else
289
290
  e.tags && (e.tags = void 0);
290
- }, at = function(e, t) {
291
+ }, lt = function(e, t) {
291
292
  const n = _.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
292
293
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
293
- const i = me(e.expanded);
294
+ const i = pe(e.expanded);
294
295
  if (o.appendChild(i), e.expanded !== !1) {
295
- const r = lt(this, e.children);
296
+ const r = ct(this, e.children);
296
297
  n.appendChild(r);
297
298
  }
298
299
  }
299
300
  return { grp: n, top: o, tpc: s };
300
- }, dt = function(e) {
301
+ }, at = function(e) {
301
302
  const t = _.createElement("me-parent"), n = this.createTopic(e);
302
- return pe(n, e), t.appendChild(n), { p: t, tpc: n };
303
- }, ht = function(e) {
303
+ return fe(n, e), t.appendChild(n), { p: t, tpc: n };
304
+ }, dt = function(e) {
304
305
  const t = _.createElement("me-children");
305
306
  return t.append(...e), t;
306
- }, ut = function(e) {
307
+ }, ht = function(e) {
307
308
  const t = _.createElement("me-tpc");
308
309
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
309
310
  };
@@ -313,7 +314,7 @@ function Be(e) {
313
314
  const n = window.getSelection();
314
315
  n && (n.removeAllRanges(), n.addRange(t));
315
316
  }
316
- const ft = function(e) {
317
+ const ut = function(e) {
317
318
  if (!e)
318
319
  return;
319
320
  const t = _.createElement("div"), n = e.text.textContent;
@@ -347,30 +348,30 @@ const ft = function(e) {
347
348
  origin: n
348
349
  }));
349
350
  });
350
- }, me = function(e) {
351
+ }, pe = function(e) {
351
352
  const t = _.createElement("me-epd");
352
353
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
353
- }, K = document, V = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
354
- const o = K.createElementNS(V, "path");
354
+ }, I = document, K = "http://www.w3.org/2000/svg", He = function(e, t, n) {
355
+ const o = I.createElementNS(K, "path");
355
356
  return N(o, {
356
357
  d: e,
357
358
  stroke: t || "#666",
358
359
  fill: "none",
359
360
  "stroke-width": n
360
361
  }), o;
361
- }, X = function(e) {
362
- const t = K.createElementNS(V, "svg");
362
+ }, Y = function(e) {
363
+ const t = I.createElementNS(K, "svg");
363
364
  return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
364
- }, be = function() {
365
- const e = K.createElementNS(V, "line");
365
+ }, ye = function() {
366
+ const e = I.createElementNS(K, "line");
366
367
  return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
367
- }, pt = function(e, t) {
368
+ }, ft = function(e, t) {
368
369
  const n = {
369
370
  stroke: "rgb(235, 95, 82)",
370
371
  fill: "none",
371
372
  "stroke-linecap": "cap",
372
373
  "stroke-width": "2"
373
- }, o = K.createElementNS(V, "g"), s = K.createElementNS(V, "path"), i = K.createElementNS(V, "path");
374
+ }, o = I.createElementNS(K, "g"), s = I.createElementNS(K, "path"), i = I.createElementNS(K, "path");
374
375
  return N(i, {
375
376
  d: t,
376
377
  ...n
@@ -379,7 +380,7 @@ const ft = function(e) {
379
380
  ...n,
380
381
  "stroke-dasharray": "8,2"
381
382
  }), o.appendChild(s), o.appendChild(i), o;
382
- }, Re = function(e, t, n) {
383
+ }, ze = function(e, t, n) {
383
384
  if (!t)
384
385
  return;
385
386
  const o = document.createElement("div");
@@ -391,8 +392,8 @@ const ft = function(e) {
391
392
  const c = t.getAttribute("text-anchor");
392
393
  c === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : c === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), Be(o), o.addEventListener("keydown", (l) => {
393
394
  l.stopPropagation();
394
- const h = l.key;
395
- if (h === "Enter" || h === "Tab") {
395
+ const u = l.key;
396
+ if (u === "Enter" || u === "Tab") {
396
397
  if (l.shiftKey)
397
398
  return;
398
399
  l.preventDefault(), o.blur(), e.map.focus();
@@ -400,38 +401,38 @@ const ft = function(e) {
400
401
  }), o.addEventListener("blur", () => {
401
402
  o && n(o);
402
403
  });
403
- }, mt = function(e) {
404
+ }, pt = function(e) {
404
405
  const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight;
405
406
  this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - s / 2}px`;
406
407
  const r = this.map.querySelectorAll("me-main > me-wrapper");
407
408
  this.lines.innerHTML = "";
408
409
  for (let c = 0; c < r.length; c++) {
409
- const l = r[c], h = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } = O(this.nodes, h), f = h.offsetWidth, g = h.offsetHeight, p = l.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: a, cL: d, cW: f, cH: g, direction: p, containerHeight: this.nodes.offsetHeight }), u = this.theme.palette, v = h.nodeObj.branchColor || u[c % u.length];
410
- h.style.borderColor = v, this.lines.appendChild(ze(m, v, "3"));
410
+ const l = r[c], u = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } = $(this.nodes, u), p = u.offsetWidth, g = u.offsetHeight, f = l.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: a, cL: d, cW: p, cH: g, direction: f, containerHeight: this.nodes.offsetHeight }), h = this.theme.palette, v = u.nodeObj.branchColor || h[c % h.length];
411
+ u.style.borderColor = v, this.lines.appendChild(He(m, v, "3"));
411
412
  const y = l.children[0].children[1];
412
- if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p === "lhs" ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !== l)
413
+ if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", f === "lhs" ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !== l)
413
414
  continue;
414
- const b = X("subLines"), x = l.lastChild;
415
- x.tagName === "svg" && x.remove(), l.appendChild(b), Fe(this, b, v, l, p, !0);
415
+ const b = Y("subLines"), x = l.lastChild;
416
+ x.tagName === "svg" && x.remove(), l.appendChild(b), Re(this, b, v, l, f, !0);
416
417
  }
417
418
  this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
418
- }, Fe = function(e, t, n, o, s, i) {
419
+ }, Re = function(e, t, n, o, s, i) {
419
420
  const r = o.firstChild, c = o.children[1].children;
420
421
  if (c.length === 0)
421
422
  return;
422
- const l = r.offsetTop, h = r.offsetLeft, d = r.offsetWidth, a = r.offsetHeight;
423
- for (let f = 0; f < c.length; f++) {
424
- const g = c[f], p = g.firstChild, m = p.offsetTop, u = p.offsetLeft, v = p.offsetWidth, y = p.offsetHeight, b = p.firstChild.nodeObj.branchColor || n, x = e.generateSubBranch({ pT: l, pL: h, pW: d, pH: a, cT: m, cL: u, cW: v, cH: y, direction: s, isFirst: i });
425
- t.appendChild(ze(x, b, "2"));
426
- const w = p.children[1];
423
+ const l = r.offsetTop, u = r.offsetLeft, d = r.offsetWidth, a = r.offsetHeight;
424
+ for (let p = 0; p < c.length; p++) {
425
+ const g = c[p], f = g.firstChild, m = f.offsetTop, h = f.offsetLeft, v = f.offsetWidth, y = f.offsetHeight, b = f.firstChild.nodeObj.branchColor || n, x = e.generateSubBranch({ pT: l, pL: u, pW: d, pH: a, cT: m, cL: h, cW: v, cH: y, direction: s, isFirst: i });
426
+ t.appendChild(He(x, b, "2"));
427
+ const w = f.children[1];
427
428
  if (w) {
428
429
  if (w.style.bottom = -(w.offsetHeight / 2) + "px", s === "lhs" ? w.style.left = "10px" : s === "rhs" && (w.style.right = "10px"), !w.expanded)
429
430
  continue;
430
431
  } else
431
432
  continue;
432
- Fe(e, t, b, g, s);
433
+ Re(e, t, b, g, s);
433
434
  }
434
- }, xe = {
435
+ }, be = {
435
436
  addChild: "插入子节点",
436
437
  addParent: "插入父节点",
437
438
  addSibling: "插入同级节点",
@@ -443,9 +444,9 @@ const ft = function(e) {
443
444
  link: "连接",
444
445
  clickTips: "请点击目标节点",
445
446
  summary: "摘要"
446
- }, we = {
447
- cn: xe,
448
- zh_CN: xe,
447
+ }, xe = {
448
+ cn: be,
449
+ zh_CN: be,
449
450
  zh_TW: {
450
451
  addChild: "插入子節點",
451
452
  addParent: "插入父節點",
@@ -564,32 +565,32 @@ const ft = function(e) {
564
565
  summary: "요약"
565
566
  }
566
567
  };
567
- function gt(e, t) {
568
+ function mt(e, t) {
568
569
  const n = (b) => {
569
570
  const x = document.createElement("div");
570
571
  return x.innerText = b, x.className = "tips", x;
571
572
  }, o = (b, x, w) => {
572
573
  const S = document.createElement("li");
573
- return S.id = b, S.innerHTML = `<span>${oe(x)}</span><span ${w ? 'class="key"' : ""}>${oe(w)}</span>`, S;
574
- }, s = we[e.locale] ? e.locale : "en", i = we[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", i.addSibling, "Enter"), h = o("cm-remove_child", i.removeNode, "Delete"), d = o("cm-fucus", i.focus, ""), a = o("cm-unfucus", i.cancelFocus, ""), f = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), p = o("cm-link", i.link, ""), m = o("cm-summary", i.summary, ""), u = document.createElement("ul");
575
- if (u.className = "menu-list", u.appendChild(r), u.appendChild(c), u.appendChild(l), u.appendChild(h), (!t || t.focus) && (u.appendChild(d), u.appendChild(a)), u.appendChild(f), u.appendChild(g), u.appendChild(m), (!t || t.link) && u.appendChild(p), t && t.extend)
574
+ return S.id = b, S.innerHTML = `<span>${ne(x)}</span><span ${w ? 'class="key"' : ""}>${ne(w)}</span>`, S;
575
+ }, s = xe[e.locale] ? e.locale : "en", i = xe[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", i.addSibling, "Enter"), u = o("cm-remove_child", i.removeNode, "Delete"), d = o("cm-fucus", i.focus, ""), a = o("cm-unfucus", i.cancelFocus, ""), p = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), f = o("cm-link", i.link, ""), m = o("cm-summary", i.summary, ""), h = document.createElement("ul");
576
+ if (h.className = "menu-list", h.appendChild(r), h.appendChild(c), h.appendChild(l), h.appendChild(u), (!t || t.focus) && (h.appendChild(d), h.appendChild(a)), h.appendChild(p), h.appendChild(g), h.appendChild(m), (!t || t.link) && h.appendChild(f), t && t.extend)
576
577
  for (let b = 0; b < t.extend.length; b++) {
577
578
  const x = t.extend[b], w = o(x.name, x.name, x.key || "");
578
- u.appendChild(w), w.onclick = (S) => {
579
+ h.appendChild(w), w.onclick = (S) => {
579
580
  x.onclick(S);
580
581
  };
581
582
  }
582
583
  const v = document.createElement("div");
583
- v.className = "context-menu", v.appendChild(u), v.hidden = !0, e.container.append(v);
584
+ v.className = "context-menu", v.appendChild(h), v.hidden = !0, e.container.append(v);
584
585
  let y = !0;
585
586
  return e.container.oncontextmenu = function(b) {
586
587
  if (b.preventDefault(), !e.editable)
587
588
  return;
588
589
  const x = b.target;
589
- if (ae(x)) {
590
- x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled", c.className = "disabled", l.className = "disabled", h.className = "disabled") : (d.className = "", f.className = "", g.className = "", c.className = "", l.className = "", h.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, k.mousedown && (k.mousedown = !1), u.style.top = "", u.style.bottom = "", u.style.left = "", u.style.right = "";
591
- const w = u.getBoundingClientRect(), S = u.offsetHeight, P = u.offsetWidth, U = b.clientY - w.top, H = b.clientX - w.left;
592
- S + U > window.innerHeight ? (u.style.top = "", u.style.bottom = "0px") : (u.style.bottom = "", u.style.top = U + 15 + "px"), P + H > window.innerWidth ? (u.style.left = "", u.style.right = "0px") : (u.style.right = "", u.style.left = H + 10 + "px");
590
+ if (le(x)) {
591
+ x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", p.className = "disabled", g.className = "disabled", c.className = "disabled", l.className = "disabled", u.className = "disabled") : (d.className = "", p.className = "", g.className = "", c.className = "", l.className = "", u.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, k.mousedown && (k.mousedown = !1), h.style.top = "", h.style.bottom = "", h.style.left = "", h.style.right = "";
592
+ const w = h.getBoundingClientRect(), S = h.offsetHeight, O = h.offsetWidth, W = b.clientY - w.top, P = b.clientX - w.left;
593
+ S + W > window.innerHeight ? (h.style.top = "", h.style.bottom = "0px") : (h.style.bottom = "", h.style.top = W + 15 + "px"), O + P > window.innerWidth ? (h.style.left = "", h.style.right = "0px") : (h.style.right = "", h.style.left = P + 10 + "px");
593
594
  }
594
595
  }, v.onclick = (b) => {
595
596
  b.target === v && (v.hidden = !0);
@@ -599,17 +600,17 @@ function gt(e, t) {
599
600
  e.insertParent(), v.hidden = !0;
600
601
  }, l.onclick = () => {
601
602
  y || (e.insertSibling("after"), v.hidden = !0);
602
- }, h.onclick = () => {
603
+ }, u.onclick = () => {
603
604
  y || (e.removeNode(), v.hidden = !0);
604
605
  }, d.onclick = () => {
605
606
  y || (e.focusNode(e.currentNode), v.hidden = !0);
606
607
  }, a.onclick = () => {
607
608
  e.cancelFocus(), v.hidden = !0;
608
- }, f.onclick = () => {
609
+ }, p.onclick = () => {
609
610
  y || (e.moveUpNode(), v.hidden = !0);
610
611
  }, g.onclick = () => {
611
612
  y || (e.moveDownNode(), v.hidden = !0);
612
- }, p.onclick = () => {
613
+ }, f.onclick = () => {
613
614
  v.hidden = !0;
614
615
  const b = e.currentNode, x = n(i.clickTips);
615
616
  e.container.appendChild(x), e.map.addEventListener(
@@ -626,44 +627,44 @@ function gt(e, t) {
626
627
  }, m.onclick = () => {
627
628
  v.hidden = !0, e.createSummary(), e.unselectNodes();
628
629
  }, () => {
629
- r.onclick = null, c.onclick = null, l.onclick = null, h.onclick = null, d.onclick = null, a.onclick = null, f.onclick = null, g.onclick = null, p.onclick = null, m.onclick = null, v.onclick = null, e.container.oncontextmenu = null;
630
+ r.onclick = null, c.onclick = null, l.onclick = null, u.onclick = null, d.onclick = null, a.onclick = null, p.onclick = null, g.onclick = null, f.onclick = null, m.onclick = null, v.onclick = null, e.container.oncontextmenu = null;
630
631
  };
631
632
  }
632
- const vt = (e) => {
633
+ const gt = (e) => {
633
634
  const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
634
635
  e.selectNode(t[Math.ceil(t.length / 2) - 1]);
635
- }, yt = (e) => {
636
+ }, vt = (e) => {
636
637
  const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
637
638
  e.selectNode(t[Math.ceil(t.length / 2) - 1]);
638
- }, bt = (e) => {
639
+ }, yt = (e) => {
639
640
  e.selectNode(e.map.querySelector("me-root>me-tpc"));
640
- }, xt = function(e, t) {
641
+ }, bt = function(e, t) {
641
642
  const n = t.parentElement.parentElement.parentElement.previousSibling;
642
643
  if (n) {
643
644
  const o = n.firstChild;
644
645
  e.selectNode(o);
645
646
  }
646
- }, wt = function(e, t) {
647
+ }, xt = function(e, t) {
647
648
  const n = t.parentElement.nextSibling;
648
649
  if (n && n.firstChild) {
649
650
  const o = n.firstChild.firstChild.firstChild;
650
651
  e.selectNode(o);
651
652
  }
652
- }, Ee = function(e, t) {
653
+ }, we = function(e, t) {
653
654
  var i, r;
654
655
  const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
655
656
  if (!n)
656
657
  return;
657
658
  const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
658
- o.parent ? s.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : bt(e) : t === "lhs" ? vt(e) : yt(e);
659
- }, Ne = function(e, t) {
659
+ o.parent ? s.className === t ? xt(e, n) : (r = o.parent) != null && r.parent ? bt(e, n) : yt(e) : t === "lhs" ? gt(e) : vt(e);
660
+ }, Ee = function(e, t) {
660
661
  var r;
661
662
  const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
662
663
  if (!n || !n.nodeObj.parent)
663
664
  return;
664
665
  const s = t + "Sibling", i = n.parentElement.parentElement[s];
665
666
  i && e.selectNode(i.firstChild.firstChild);
666
- }, Q = function(e, t, n = 1) {
667
+ }, Z = function(e, t, n = 1) {
667
668
  switch (t) {
668
669
  case "in":
669
670
  if (e.scaleVal * n > 1.6)
@@ -676,7 +677,7 @@ const vt = (e) => {
676
677
  e.scale(e.scaleVal -= 0.2);
677
678
  }
678
679
  };
679
- function Et(e) {
680
+ function wt(e) {
680
681
  const t = () => {
681
682
  e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
682
683
  }, n = {
@@ -698,21 +699,21 @@ function Et(e) {
698
699
  else {
699
700
  if (o.metaKey || o.ctrlKey)
700
701
  return e.initSide();
701
- Ne(e, "previous");
702
+ Ee(e, "previous");
702
703
  }
703
704
  },
704
705
  ArrowDown: (o) => {
705
- o.altKey ? e.moveDownNode() : Ne(e, "next");
706
+ o.altKey ? e.moveDownNode() : Ee(e, "next");
706
707
  },
707
708
  ArrowLeft: (o) => {
708
709
  if (o.metaKey || o.ctrlKey)
709
710
  return e.initLeft();
710
- Ee(e, "lhs");
711
+ we(e, "lhs");
711
712
  },
712
713
  ArrowRight: (o) => {
713
714
  if (o.metaKey || o.ctrlKey)
714
715
  return e.initRight();
715
- Ee(e, "rhs");
716
+ we(e, "rhs");
716
717
  },
717
718
  PageUp: () => e.moveUpNode(),
718
719
  PageDown: () => {
@@ -728,10 +729,10 @@ function Et(e) {
728
729
  !e.waitCopy || !e.currentNode || (o.metaKey || o.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
729
730
  },
730
731
  "+": (o) => {
731
- (o.metaKey || o.ctrlKey) && Q(e, "in");
732
+ (o.metaKey || o.ctrlKey) && Z(e, "in");
732
733
  },
733
734
  "-": (o) => {
734
- (o.metaKey || o.ctrlKey) && Q(e, "out");
735
+ (o.metaKey || o.ctrlKey) && Z(e, "out");
735
736
  },
736
737
  0: (o) => {
737
738
  (o.metaKey || o.ctrlKey) && e.scale(1);
@@ -748,38 +749,38 @@ function Et(e) {
748
749
  if (o.ctrlKey || o.metaKey) {
749
750
  o.preventDefault();
750
751
  const s = Math.abs(o.deltaY / 100);
751
- o.deltaY < 0 ? Q(e, "in", s) : e.scaleVal - 0.2 > 0 && Q(e, "out", s), o.stopPropagation();
752
+ o.deltaY < 0 ? Z(e, "in", s) : e.scaleVal - 0.2 > 0 && Z(e, "out", s), o.stopPropagation();
752
753
  }
753
754
  };
754
755
  }
755
- const de = document, Nt = function(e, t) {
756
+ const ae = document, Et = function(e, t) {
756
757
  if (!t)
757
- return he(e), e;
758
+ return de(e), e;
758
759
  let n = e.querySelector(".insert-preview");
759
760
  const o = `insert-preview ${t} show`;
760
- return n || (n = de.createElement("div"), e.appendChild(n)), n.className = o, e;
761
- }, he = function(e) {
761
+ return n || (n = ae.createElement("div"), e.appendChild(n)), n.className = o, e;
762
+ }, de = function(e) {
762
763
  if (!e)
763
764
  return;
764
765
  const t = e.querySelectorAll(".insert-preview");
765
766
  for (const n of t || [])
766
767
  n.remove();
767
- }, Ce = function(e, t) {
768
+ }, Ne = function(e, t) {
768
769
  for (const n of t) {
769
770
  const o = n.parentElement.parentElement.contains(e);
770
771
  if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent))
771
772
  return !1;
772
773
  }
773
774
  return !0;
774
- }, Ct = function(e) {
775
+ }, Nt = function(e) {
775
776
  const t = document.createElement("div");
776
777
  return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
777
778
  };
778
- function St(e) {
779
+ function Ct(e) {
779
780
  let t = null, n = null, o = null;
780
- const s = Ct(e), i = 12;
781
+ const s = Nt(e), i = 12;
781
782
  e.map.addEventListener("dragstart", (r) => {
782
- var l, h;
783
+ var l, u;
783
784
  const c = r.target;
784
785
  if ((c == null ? void 0 : c.tagName) !== "ME-TPC") {
785
786
  r.preventDefault();
@@ -788,39 +789,39 @@ function St(e) {
788
789
  (l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes, s.innerHTML = e.currentNodes.length + " nodes") : (t = [c], s.innerHTML = c.innerHTML);
789
790
  for (const d of t)
790
791
  d.parentElement.parentElement.style.opacity = "0.5";
791
- (h = r.dataTransfer) == null || h.setDragImage(s, 0, 0), k.clear();
792
+ (u = r.dataTransfer) == null || u.setDragImage(s, 0, 0), k.clear();
792
793
  }), e.map.addEventListener("dragend", async (r) => {
793
794
  if (!t)
794
795
  return;
795
796
  for (const l of t)
796
797
  l.parentElement.parentElement.style.opacity = "1";
797
798
  const c = r.target;
798
- c.style.opacity = "", o && (he(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
799
+ c.style.opacity = "", o && (de(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
799
800
  }), e.map.addEventListener(
800
801
  "dragover",
801
- nt(function(r) {
802
+ tt(function(r) {
802
803
  if (!t)
803
804
  return;
804
- he(o);
805
- const c = de.elementFromPoint(r.clientX, r.clientY - i);
806
- if (Ce(c, t)) {
805
+ de(o);
806
+ const c = ae.elementFromPoint(r.clientX, r.clientY - i);
807
+ if (Ne(c, t)) {
807
808
  o = c;
808
809
  const l = c.getBoundingClientRect().y;
809
810
  r.clientY > l + c.clientHeight ? n = "after" : n = "in";
810
811
  } else {
811
- const l = de.elementFromPoint(r.clientX, r.clientY + i);
812
- if (Ce(l, t)) {
812
+ const l = ae.elementFromPoint(r.clientX, r.clientY + i);
813
+ if (Ne(l, t)) {
813
814
  o = l;
814
- const h = l.getBoundingClientRect().y;
815
- r.clientY < h ? n = "before" : n = "in";
815
+ const u = l.getBoundingClientRect().y;
816
+ r.clientY < u ? n = "before" : n = "in";
816
817
  } else
817
818
  n = o = null;
818
819
  }
819
- o && Nt(o, n);
820
+ o && Et(o, n);
820
821
  }, 100)
821
822
  );
822
823
  }
823
- const _t = function(e) {
824
+ const St = function(e) {
824
825
  return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
825
826
  type: "summary",
826
827
  value: e.obj.id
@@ -835,14 +836,14 @@ const _t = function(e) {
835
836
  value: e.obj.id
836
837
  };
837
838
  };
838
- function Mt(e) {
839
+ function _t(e) {
839
840
  let t = [], n = -1, o = e.getData();
840
841
  e.bus.addListener("operation", (s) => {
841
842
  if (s.name === "beginEdit")
842
843
  return;
843
844
  t = t.slice(0, n + 1);
844
845
  const i = e.getData();
845
- t.push({ prev: o, currentObject: _t(s), next: i }), o = i, n = t.length - 1;
846
+ t.push({ prev: o, currentObject: St(s), next: i }), o = i, n = t.length - 1;
846
847
  }), e.undo = function() {
847
848
  if (n > -1) {
848
849
  const s = t[n];
@@ -864,14 +865,14 @@ function Mt(e) {
864
865
  (s.metaKey || s.ctrlKey) && s.shiftKey && s.key === "Z" ? e.redo() : (s.metaKey || s.ctrlKey) && s.key === "z" && e.undo();
865
866
  });
866
867
  }
867
- const F = (e, t) => {
868
+ const R = (e, t) => {
868
869
  const n = document.createElement("span");
869
870
  return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
870
871
  <use xlink:href="#icon-${t}"></use>
871
872
  </svg>`, n;
872
873
  };
873
- function kt(e) {
874
- const t = document.createElement("div"), n = F("fullscreen", "full"), o = F("toCenter", "living"), s = F("zoomout", "move"), i = F("zoomin", "add"), r = document.createElement("span");
874
+ function Mt(e) {
875
+ const t = document.createElement("div"), n = R("fullscreen", "full"), o = R("toCenter", "living"), s = R("zoomout", "move"), i = R("zoomin", "add"), r = document.createElement("span");
875
876
  return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
876
877
  e.mindElixirBox.requestFullscreen();
877
878
  }, o.onclick = () => {
@@ -882,8 +883,8 @@ function kt(e) {
882
883
  e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
883
884
  }, t;
884
885
  }
885
- function Tt(e) {
886
- const t = document.createElement("div"), n = F("tbltl", "left"), o = F("tbltr", "right"), s = F("tblts", "side");
886
+ function kt(e) {
887
+ const t = document.createElement("div"), n = R("tbltl", "left"), o = R("tbltr", "right"), s = R("tblts", "side");
887
888
  return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
888
889
  e.initLeft();
889
890
  }, o.onclick = () => {
@@ -892,12 +893,12 @@ function Tt(e) {
892
893
  e.initSide();
893
894
  }, t;
894
895
  }
895
- function Lt(e) {
896
- e.container.append(kt(e)), e.container.append(Tt(e));
896
+ function Tt(e) {
897
+ e.container.append(Mt(e)), e.container.append(kt(e));
897
898
  }
898
899
  /*! @viselect/vanilla v3.6.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
899
- var At = Object.defineProperty, jt = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => jt(e, typeof t != "symbol" ? t + "" : t, n);
900
- class Dt {
900
+ var Lt = Object.defineProperty, At = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => At(e, typeof t != "symbol" ? t + "" : t, n);
901
+ class jt {
901
902
  constructor() {
902
903
  E(this, "_listeners", /* @__PURE__ */ new Map()), E(this, "on", this.addEventListener), E(this, "off", this.removeEventListener), E(this, "emit", this.dispatchEvent);
903
904
  }
@@ -919,27 +920,27 @@ class Dt {
919
920
  this._listeners.clear();
920
921
  }
921
922
  }
922
- const Se = (e, t = "px") => typeof e == "number" ? e + t : e;
923
+ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e;
923
924
  function j({ style: e }, t, n) {
924
925
  if (typeof t == "object")
925
926
  for (const [o, s] of Object.entries(t))
926
- s !== void 0 && (e[o] = Se(s));
927
+ s !== void 0 && (e[o] = Ce(s));
927
928
  else
928
- n !== void 0 && (e[t] = Se(n));
929
+ n !== void 0 && (e[t] = Ce(n));
929
930
  }
930
- const qe = (e) => (t, n, o, s = {}) => {
931
+ const Fe = (e) => (t, n, o, s = {}) => {
931
932
  t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
932
933
  for (const i of t)
933
934
  if (i)
934
935
  for (const r of n)
935
936
  i[e](r, o, { capture: !1, ...s });
936
937
  return [t, n, o, s];
937
- }, B = qe("addEventListener"), L = qe("removeEventListener"), ee = (e) => {
938
+ }, B = Fe("addEventListener"), L = Fe("removeEventListener"), Q = (e) => {
938
939
  var t;
939
940
  const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
940
941
  return { x: n, y: o, target: s };
941
942
  };
942
- function _e(e, t, n = "touch") {
943
+ function Se(e, t, n = "touch") {
943
944
  switch (n) {
944
945
  case "center": {
945
946
  const o = t.left + t.width / 2, s = t.top + t.height / 2;
@@ -951,7 +952,7 @@ function _e(e, t, n = "touch") {
951
952
  return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
952
953
  }
953
954
  }
954
- function q(e, t = document) {
955
+ function F(e, t = document) {
955
956
  const n = Array.isArray(e) ? e : [e];
956
957
  let o = [];
957
958
  for (let s = 0, i = n.length; s < i; s++) {
@@ -960,7 +961,7 @@ function q(e, t = document) {
960
961
  }
961
962
  return o;
962
963
  }
963
- const $t = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Pt = (e) => {
964
+ const Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, $t = () => "safari" in window, Ot = (e) => {
964
965
  let t, n = -1, o = !1;
965
966
  return {
966
967
  next(...s) {
@@ -973,7 +974,7 @@ const $t = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = ()
973
974
  }
974
975
  };
975
976
  };
976
- function Ht(e, t) {
977
+ function Pt(e, t) {
977
978
  for (const n of t) {
978
979
  if (typeof n == "number")
979
980
  return e.button === n;
@@ -993,16 +994,16 @@ function Ht(e, t) {
993
994
  }
994
995
  return !1;
995
996
  }
996
- const { abs: z, max: Me, min: ke, ceil: Te } = Math, Le = (e = []) => ({
997
+ const { abs: H, max: _e, min: Me, ceil: ke } = Math, Te = (e = []) => ({
997
998
  stored: e,
998
999
  selected: [],
999
1000
  touched: [],
1000
1001
  changed: { added: [], removed: [] }
1001
1002
  });
1002
- class Ie extends Dt {
1003
+ class qe extends jt {
1003
1004
  constructor(t) {
1004
1005
  var n, o, s, i, r;
1005
- super(), E(this, "_options"), E(this, "_selection", Le()), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetBoundary"), E(this, "_targetBoundaryScrolled", !0), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_areaRect", new DOMRect()), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._toggleStartEvents.bind(this, !1)), E(this, "enable", this._toggleStartEvents), this._options = {
1006
+ super(), E(this, "_options"), E(this, "_selection", Te()), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetBoundary"), E(this, "_targetBoundaryScrolled", !0), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_areaRect", new DOMRect()), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._toggleStartEvents.bind(this, !1)), E(this, "enable", this._toggleStartEvents), this._options = {
1006
1007
  selectionAreaClass: "selection-area",
1007
1008
  selectionContainerClass: void 0,
1008
1009
  selectables: [],
@@ -1042,8 +1043,8 @@ class Ie extends Dt {
1042
1043
  };
1043
1044
  for (const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
1044
1045
  typeof this[d] == "function" && (this[d] = this[d].bind(this));
1045
- const { document: c, selectionAreaClass: l, selectionContainerClass: h } = this._options;
1046
- this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), h && this._clippingElement.classList.add(h), j(this._area, {
1046
+ const { document: c, selectionAreaClass: l, selectionContainerClass: u } = this._options;
1047
+ this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), u && this._clippingElement.classList.add(u), j(this._area, {
1047
1048
  willChange: "top, left, bottom, right, width, height",
1048
1049
  top: 0,
1049
1050
  left: 0,
@@ -1055,7 +1056,7 @@ class Ie extends Dt {
1055
1056
  // https://stackoverflow.com/a/38268846
1056
1057
  pointerEvents: "none",
1057
1058
  zIndex: "1"
1058
- }), this._frame = Pt((d) => {
1059
+ }), this._frame = Ot((d) => {
1059
1060
  this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", d), this._redrawSelectionArea();
1060
1061
  }), this.enable();
1061
1062
  }
@@ -1064,31 +1065,31 @@ class Ie extends Dt {
1064
1065
  s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
1065
1066
  }
1066
1067
  _onTapStart(t, n = !1) {
1067
- const { x: o, y: s, target: i } = ee(t), { document: r, startAreas: c, boundaries: l, features: h, behaviour: d } = this._options, a = i.getBoundingClientRect();
1068
- if (t instanceof MouseEvent && !Ht(t, d.triggers))
1068
+ const { x: o, y: s, target: i } = Q(t), { document: r, startAreas: c, boundaries: l, features: u, behaviour: d } = this._options, a = i.getBoundingClientRect();
1069
+ if (t instanceof MouseEvent && !Pt(t, d.triggers))
1069
1070
  return;
1070
- const f = q(c, r), g = q(l, r);
1071
+ const p = F(c, r), g = F(l, r);
1071
1072
  this._targetElement = g.find(
1072
- (v) => _e(v.getBoundingClientRect(), a)
1073
+ (v) => Se(v.getBoundingClientRect(), a)
1073
1074
  );
1074
- const p = t.composedPath(), m = f.find((v) => p.includes(v));
1075
- if (this._targetBoundary = g.find((v) => p.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1075
+ const f = t.composedPath(), m = p.find((v) => f.includes(v));
1076
+ if (this._targetBoundary = g.find((v) => f.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1076
1077
  return;
1077
1078
  this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
1078
- const u = r.scrollingElement ?? r.body;
1079
- this._scrollDelta = { x: u.scrollLeft, y: u.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), B(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), B(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), B(r, "scroll", this._onScroll), h.deselectOnBlur && (this._targetBoundaryScrolled = !1, B(this._targetBoundary, "scroll", this._onStartAreaScroll));
1079
+ const h = r.scrollingElement ?? r.body;
1080
+ this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), B(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), B(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), B(r, "scroll", this._onScroll), u.deselectOnBlur && (this._targetBoundaryScrolled = !1, B(this._targetBoundary, "scroll", this._onStartAreaScroll));
1080
1081
  }
1081
1082
  _onSingleTap(t) {
1082
- const { singleTap: { intersect: n }, range: o } = this._options.features, s = ee(t);
1083
+ const { singleTap: { intersect: n }, range: o } = this._options.features, s = Q(t);
1083
1084
  let i;
1084
1085
  if (n === "native")
1085
1086
  i = s.target;
1086
1087
  else if (n === "touch") {
1087
1088
  this.resolveSelectables();
1088
1089
  const { x: c, y: l } = s;
1089
- i = this._selectables.find((h) => {
1090
- const { right: d, left: a, top: f, bottom: g } = h.getBoundingClientRect();
1091
- return c < d && c > a && l < g && l > f;
1090
+ i = this._selectables.find((u) => {
1091
+ const { right: d, left: a, top: p, bottom: g } = u.getBoundingClientRect();
1092
+ return c < d && c > a && l < g && l > p;
1092
1093
  });
1093
1094
  }
1094
1095
  if (!i)
@@ -1102,25 +1103,25 @@ class Ie extends Dt {
1102
1103
  }
1103
1104
  const { stored: r } = this._selection;
1104
1105
  if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
1105
- const c = this._latestElement, [l, h] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], d = [...this._selectables.filter(
1106
- (a) => a.compareDocumentPosition(l) & 4 && a.compareDocumentPosition(h) & 2
1107
- ), l, h];
1106
+ const c = this._latestElement, [l, u] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], d = [...this._selectables.filter(
1107
+ (a) => a.compareDocumentPosition(l) & 4 && a.compareDocumentPosition(u) & 2
1108
+ ), l, u];
1108
1109
  this.select(d), this._latestElement = c;
1109
1110
  } else
1110
1111
  r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
1111
1112
  }
1112
1113
  _delayedTapMove(t) {
1113
- const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: l } = ee(t);
1114
+ const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: l } = Q(t);
1114
1115
  if (
1115
1116
  // Single number for both coordinates
1116
- typeof s == "number" && z(c + l - (i + r)) >= s || // Different x and y threshold
1117
- typeof s == "object" && z(c - i) >= s.x || z(l - r) >= s.y
1117
+ typeof s == "number" && H(c + l - (i + r)) >= s || // Different x and y threshold
1118
+ typeof s == "object" && H(c - i) >= s.x || H(l - r) >= s.y
1118
1119
  ) {
1119
1120
  if (L(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
1120
1121
  L(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
1121
1122
  return;
1122
1123
  }
1123
- B(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), q(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 && (B(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((h) => this._targetElement.contains(h))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
1124
+ B(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), F(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 && (B(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
1124
1125
  }
1125
1126
  this._handleMoveEvent(t);
1126
1127
  }
@@ -1145,16 +1146,16 @@ class Ie extends Dt {
1145
1146
  }));
1146
1147
  }
1147
1148
  _onTapMove(t) {
1148
- const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, c = this._targetElement, { x: l, y: h } = ee(t);
1149
- if (o.x2 = l, o.y2 = h, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1149
+ const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, c = this._targetElement, { x: l, y: u } = Q(t);
1150
+ if (o.x2 = l, o.y2 = u, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1150
1151
  this._scrollingActive = !0;
1151
1152
  const d = () => {
1152
1153
  if (!n.x && !n.y) {
1153
1154
  this._scrollingActive = !1;
1154
1155
  return;
1155
1156
  }
1156
- const { scrollTop: a, scrollLeft: f } = c;
1157
- n.y && (c.scrollTop += Te(n.y / r), o.y1 -= c.scrollTop - a), n.x && (c.scrollLeft += Te(n.x / r), o.x1 -= c.scrollLeft - f), i.next(t), requestAnimationFrame(d);
1157
+ const { scrollTop: a, scrollLeft: p } = c;
1158
+ n.y && (c.scrollTop += ke(n.y / r), o.y1 -= c.scrollTop - a), n.x && (c.scrollLeft += ke(n.x / r), o.x1 -= c.scrollLeft - p), i.next(t), requestAnimationFrame(d);
1158
1159
  };
1159
1160
  requestAnimationFrame(d);
1160
1161
  } else
@@ -1163,7 +1164,7 @@ class Ie extends Dt {
1163
1164
  }
1164
1165
  _handleMoveEvent(t) {
1165
1166
  const { features: n } = this._options;
1166
- (n.touch && $t() || this._scrollAvailable && Ot()) && t.preventDefault();
1167
+ (n.touch && Dt() || this._scrollAvailable && $t()) && t.preventDefault();
1167
1168
  }
1168
1169
  _onScroll() {
1169
1170
  const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
@@ -1177,11 +1178,11 @@ class Ie extends Dt {
1177
1178
  this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
1178
1179
  }
1179
1180
  _recalculateSelectionAreaRect() {
1180
- const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: c, scrollLeft: l, scrollWidth: h, clientWidth: d } = o, a = this._targetRect, { x1: f, y1: g } = n;
1181
- let { x2: p, y2: m } = n;
1182
- const { behaviour: { scrolling: { startScrollMargins: u } } } = s;
1183
- p < a.left + u.x ? (t.x = l ? -z(a.left - p + u.x) : 0, p = p < a.left ? a.left : p) : p > a.right - u.x ? (t.x = h - l - d ? z(a.left + a.width - p - u.x) : 0, p = p > a.right ? a.right : p) : t.x = 0, m < a.top + u.y ? (t.y = i ? -z(a.top - m + u.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - u.y ? (t.y = r - i - c ? z(a.top + a.height - m - u.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
1184
- const v = ke(f, p), y = ke(g, m), b = Me(f, p), x = Me(g, m);
1181
+ const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: c, scrollLeft: l, scrollWidth: u, clientWidth: d } = o, a = this._targetRect, { x1: p, y1: g } = n;
1182
+ let { x2: f, y2: m } = n;
1183
+ const { behaviour: { scrolling: { startScrollMargins: h } } } = s;
1184
+ f < a.left + h.x ? (t.x = l ? -H(a.left - f + h.x) : 0, f = f < a.left ? a.left : f) : f > a.right - h.x ? (t.x = u - l - d ? H(a.left + a.width - f - h.x) : 0, f = f > a.right ? a.right : f) : t.x = 0, m < a.top + h.y ? (t.y = i ? -H(a.top - m + h.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - h.y ? (t.y = r - i - c ? H(a.top + a.height - m - h.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
1185
+ const v = Me(p, f), y = Me(g, m), b = _e(p, f), x = _e(g, m);
1185
1186
  this._areaRect = new DOMRect(v, y, b - v, x - y);
1186
1187
  }
1187
1188
  _redrawSelectionArea() {
@@ -1194,29 +1195,29 @@ class Ie extends Dt {
1194
1195
  L(this._targetElement, "scroll", this._onStartAreaScroll), L(s, ["mousemove", "touchmove"], this._delayedTapMove), L(s, ["touchmove", "mousemove"], this._onTapMove), L(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), L(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, L(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
1195
1196
  }
1196
1197
  _updateElementSelection() {
1197
- const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: h } = n.behaviour, d = h === "invert", a = [], f = [], g = [];
1198
+ const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: u } = n.behaviour, d = u === "invert", a = [], p = [], g = [];
1198
1199
  for (let m = 0; m < t.length; m++) {
1199
- const u = t[m];
1200
- if (_e(s, u.getBoundingClientRect(), l)) {
1201
- if (r.includes(u))
1202
- i.includes(u) && !c.includes(u) && c.push(u);
1203
- else if (d && i.includes(u)) {
1204
- g.push(u);
1200
+ const h = t[m];
1201
+ if (Se(s, h.getBoundingClientRect(), l)) {
1202
+ if (r.includes(h))
1203
+ i.includes(h) && !c.includes(h) && c.push(h);
1204
+ else if (d && i.includes(h)) {
1205
+ g.push(h);
1205
1206
  continue;
1206
1207
  } else
1207
- f.push(u);
1208
- a.push(u);
1208
+ p.push(h);
1209
+ a.push(h);
1209
1210
  }
1210
1211
  }
1211
- d && f.push(...i.filter((m) => !r.includes(m)));
1212
- const p = h === "keep";
1212
+ d && p.push(...i.filter((m) => !r.includes(m)));
1213
+ const f = u === "keep";
1213
1214
  for (let m = 0; m < r.length; m++) {
1214
- const u = r[m];
1215
- !a.includes(u) && !// Check if the user wants to keep previously selected elements, e.g.,
1215
+ const h = r[m];
1216
+ !a.includes(h) && !// Check if the user wants to keep previously selected elements, e.g.,
1216
1217
  // not make them part of the current selection as soon as they're touched.
1217
- (p && i.includes(u)) && g.push(u);
1218
+ (f && i.includes(h)) && g.push(h);
1218
1219
  }
1219
- o.selected = a, o.changed = { added: f, removed: g }, this._latestElement = void 0;
1220
+ o.selected = a, o.changed = { added: p, removed: g }, this._latestElement = void 0;
1220
1221
  }
1221
1222
  _emitEvent(t, n) {
1222
1223
  return this.emit(t, {
@@ -1267,7 +1268,7 @@ class Ie extends Dt {
1267
1268
  * Will update everything that can be selected.
1268
1269
  */
1269
1270
  resolveSelectables() {
1270
- this._selectables = q(this._options.selectables, this._options.document);
1271
+ this._selectables = F(this._options.selectables, this._options.document);
1271
1272
  }
1272
1273
  /**
1273
1274
  * Same as deselecting, but for all elements currently selected.
@@ -1279,7 +1280,7 @@ class Ie extends Dt {
1279
1280
  i.added = [], i.removed.push(
1280
1281
  ...o,
1281
1282
  ...t ? s : []
1282
- ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Le(t ? [] : s);
1283
+ ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Te(t ? [] : s);
1283
1284
  }
1284
1285
  /**
1285
1286
  * @returns {Array} Selected elements
@@ -1311,7 +1312,7 @@ class Ie extends Dt {
1311
1312
  * @param quiet - If this should not trigger the move event
1312
1313
  */
1313
1314
  select(t, n = !1) {
1314
- const { changed: o, selected: s, stored: i } = this._selection, r = q(t, this._options.document).filter(
1315
+ const { changed: o, selected: s, stored: i } = this._selection, r = F(t, this._options.document).filter(
1315
1316
  (c) => !s.includes(c) && !i.includes(c)
1316
1317
  );
1317
1318
  return i.push(...r), s.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
@@ -1322,7 +1323,7 @@ class Ie extends Dt {
1322
1323
  * @param quiet - If this should not trigger the move event
1323
1324
  */
1324
1325
  deselect(t, n = !1) {
1325
- const { selected: o, stored: s, changed: i } = this._selection, r = q(t, this._options.document).filter(
1326
+ const { selected: o, stored: s, changed: i } = this._selection, r = F(t, this._options.document).filter(
1326
1327
  (c) => o.includes(c) || s.includes(c)
1327
1328
  );
1328
1329
  r.length && (this._selection.stored = s.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
@@ -1330,9 +1331,9 @@ class Ie extends Dt {
1330
1331
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
1331
1332
  }
1332
1333
  }
1333
- E(Ie, "version", "3.6.0");
1334
+ E(qe, "version", "3.6.0");
1334
1335
  function Bt(e) {
1335
- const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new Ie({
1336
+ const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new qe({
1336
1337
  selectables: [".map-container me-tpc"],
1337
1338
  boundaries: [e.container],
1338
1339
  container: e.selectionContainer,
@@ -1377,118 +1378,119 @@ function Bt(e) {
1377
1378
  });
1378
1379
  e.selection = n;
1379
1380
  }
1380
- const zt = function(e, t = !0) {
1381
+ const Ht = function(e, t = !0) {
1381
1382
  this.theme = e;
1382
1383
  const n = this.theme.cssVar, o = Object.keys(n);
1384
+ this.mindElixirBox.style.cssText = "";
1383
1385
  for (let s = 0; s < o.length; s++) {
1384
1386
  const i = o[s];
1385
1387
  this.mindElixirBox.style.setProperty(i, n[i]);
1386
1388
  }
1387
- t && this.refresh();
1388
- }, W = (e) => {
1389
+ e.cssVar["--gap"] || this.mindElixirBox.style.setProperty("--gap", "30px"), t && this.refresh();
1390
+ }, V = (e) => {
1389
1391
  var o;
1390
1392
  const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
1391
1393
  return { siblings: t, index: n };
1392
1394
  };
1393
- function Rt(e) {
1394
- const { siblings: t, index: n } = W(e);
1395
+ function zt(e) {
1396
+ const { siblings: t, index: n } = V(e);
1395
1397
  if (t === void 0)
1396
1398
  return;
1397
1399
  const o = t[n];
1398
1400
  n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
1399
1401
  }
1400
- function Ft(e) {
1401
- const { siblings: t, index: n } = W(e);
1402
+ function Rt(e) {
1403
+ const { siblings: t, index: n } = V(e);
1402
1404
  if (t === void 0)
1403
1405
  return;
1404
1406
  const o = t[n];
1405
1407
  n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
1406
1408
  }
1407
- function ge(e) {
1408
- const { siblings: t, index: n } = W(e);
1409
+ function me(e) {
1410
+ const { siblings: t, index: n } = V(e);
1409
1411
  return t === void 0 ? 0 : (t.splice(n, 1), t.length);
1410
1412
  }
1411
- function qt(e, t, n) {
1412
- const { siblings: o, index: s } = W(n);
1413
+ function Ft(e, t, n) {
1414
+ const { siblings: o, index: s } = V(n);
1413
1415
  o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
1414
1416
  }
1415
- function It(e, t) {
1416
- const { siblings: n, index: o } = W(e);
1417
+ function qt(e, t) {
1418
+ const { siblings: n, index: o } = V(e);
1417
1419
  n !== void 0 && (n[o] = t, t.children = [e]);
1418
1420
  }
1419
- function Ke(e, t, n) {
1420
- if (ge(t), e === "in")
1421
+ function Ie(e, t, n) {
1422
+ if (me(t), e === "in")
1421
1423
  n.children ? n.children.push(t) : n.children = [t];
1422
1424
  else {
1423
1425
  t.direction !== void 0 && (t.direction = n.direction);
1424
- const { siblings: o, index: s } = W(n);
1426
+ const { siblings: o, index: s } = V(n);
1425
1427
  if (o === void 0)
1426
1428
  return;
1427
1429
  e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
1428
1430
  }
1429
1431
  }
1430
- const Kt = function(e, t) {
1432
+ const It = function(e, t) {
1431
1433
  var n, o;
1432
1434
  if (e === T)
1433
1435
  return T;
1434
- if (e === R)
1435
- return R;
1436
- if (e === ce) {
1436
+ if (e === z)
1437
+ return z;
1438
+ if (e === re) {
1437
1439
  const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
1438
- return s <= i ? (t.direction = T, T) : (t.direction = R, R);
1440
+ return s <= i ? (t.direction = T, T) : (t.direction = z, z);
1439
1441
  }
1440
- }, Ve = function(e, t, n) {
1442
+ }, Ke = function(e, t, n) {
1441
1443
  var i, r;
1442
1444
  const o = n.children[0].children[0], s = t.parentElement;
1443
1445
  if (s.tagName === "ME-PARENT") {
1444
- if (J(o), s.children[1])
1446
+ if (G(o), s.children[1])
1445
1447
  s.nextSibling.appendChild(n);
1446
1448
  else {
1447
1449
  const c = e.createChildren([n]);
1448
- s.appendChild(me(!0)), s.insertAdjacentElement("afterend", c);
1450
+ s.appendChild(pe(!0)), s.insertAdjacentElement("afterend", c);
1449
1451
  }
1450
1452
  e.linkDiv(n.offsetParent);
1451
1453
  } else
1452
- s.tagName === "ME-ROOT" && (Kt(e.direction, o.nodeObj) === T ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
1453
- }, We = function(e, t) {
1454
+ s.tagName === "ME-ROOT" && (It(e.direction, o.nodeObj) === T ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
1455
+ }, Ve = function(e, t) {
1454
1456
  const n = e.parentNode;
1455
1457
  if (t === 0) {
1456
1458
  const o = n.parentNode.parentNode;
1457
1459
  o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
1458
1460
  }
1459
1461
  n.parentNode.remove();
1460
- }, Ue = {
1462
+ }, We = {
1461
1463
  before: "beforebegin",
1462
1464
  after: "afterend"
1463
- }, J = function(e) {
1465
+ }, G = function(e) {
1464
1466
  const n = e.parentElement.parentElement.lastElementChild;
1465
1467
  (n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
1466
- }, Vt = function(e, t) {
1467
- const n = e.nodeObj, o = fe(n);
1468
+ }, Kt = function(e, t) {
1469
+ const n = e.nodeObj, o = ue(n);
1468
1470
  o.style && t.style && (t.style = Object.assign(o.style, t.style));
1469
1471
  const s = Object.assign(n, t);
1470
- pe(e, s), this.linkDiv(), this.bus.fire("operation", {
1472
+ fe(e, s), this.linkDiv(), this.bus.fire("operation", {
1471
1473
  name: "reshapeNode",
1472
1474
  obj: s,
1473
1475
  origin: o
1474
1476
  });
1475
- }, ve = function(e, t, n) {
1477
+ }, ge = function(e, t, n) {
1476
1478
  if (!t)
1477
1479
  return null;
1478
1480
  const o = t.nodeObj;
1479
1481
  o.expanded === !1 && (e.expandNode(t, !0), t = C(o.id));
1480
1482
  const s = n || e.generateNewObj();
1481
- o.children ? o.children.push(s) : o.children = [s], $(e.nodeData);
1483
+ o.children ? o.children.push(s) : o.children = [s], D(e.nodeData);
1482
1484
  const { grp: i, top: r } = e.createWrapper(s);
1483
- return Ve(e, t, i), { newTop: r, newNodeObj: s };
1484
- }, Wt = function(e, t, n) {
1485
- var h, d, a;
1485
+ return Ke(e, t, i), { newTop: r, newNodeObj: s };
1486
+ }, Vt = function(e, t, n) {
1487
+ var u, d, a;
1486
1488
  const o = t || this.currentNode;
1487
1489
  if (!o)
1488
1490
  return;
1489
1491
  const s = o.nodeObj;
1490
1492
  if (s.parent) {
1491
- if (!((h = s.parent) != null && h.parent) && ((a = (d = s.parent) == null ? void 0 : d.children) == null ? void 0 : a.length) === 1) {
1493
+ if (!((u = s.parent) != null && u.parent) && ((a = (d = s.parent) == null ? void 0 : d.children) == null ? void 0 : a.length) === 1) {
1492
1494
  this.addChild(C(s.parent.id), n);
1493
1495
  return;
1494
1496
  }
@@ -1497,35 +1499,35 @@ const Kt = function(e, t) {
1497
1499
  return;
1498
1500
  }
1499
1501
  const i = n || this.generateNewObj();
1500
- qt(i, e, s), $(this.nodeData);
1502
+ Ft(i, e, s), D(this.nodeData);
1501
1503
  const r = o.parentElement, { grp: c, top: l } = this.createWrapper(i);
1502
- r.parentElement.insertAdjacentElement(Ue[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
1504
+ r.parentElement.insertAdjacentElement(We[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
1503
1505
  name: "insertSibling",
1504
1506
  type: e,
1505
1507
  obj: i
1506
1508
  });
1507
- }, Ut = function(e, t) {
1509
+ }, Wt = function(e, t) {
1508
1510
  const n = e || this.currentNode;
1509
1511
  if (!n)
1510
1512
  return;
1511
- J(n);
1513
+ G(n);
1512
1514
  const o = n.nodeObj;
1513
1515
  if (!o.parent)
1514
1516
  return;
1515
1517
  const s = t || this.generateNewObj();
1516
- It(o, s), $(this.nodeData);
1518
+ qt(o, s), D(this.nodeData);
1517
1519
  const i = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(s, !0);
1518
- c.appendChild(me(!0)), i.insertAdjacentElement("afterend", r);
1520
+ c.appendChild(pe(!0)), i.insertAdjacentElement("afterend", r);
1519
1521
  const l = this.createChildren([i]);
1520
1522
  c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
1521
1523
  name: "insertParent",
1522
1524
  obj: s
1523
1525
  });
1524
- }, Yt = function(e, t) {
1526
+ }, Ut = function(e, t) {
1525
1527
  const n = e || this.currentNode;
1526
1528
  if (!n)
1527
1529
  return;
1528
- const o = ve(this, n, t);
1530
+ const o = ge(this, n, t);
1529
1531
  if (!o)
1530
1532
  return;
1531
1533
  const { newTop: s, newNodeObj: i } = o;
@@ -1533,10 +1535,10 @@ const Kt = function(e, t) {
1533
1535
  name: "addChild",
1534
1536
  obj: i
1535
1537
  }), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
1536
- }, Xt = function(e, t) {
1537
- const n = fe(e.nodeObj);
1538
- ue(n);
1539
- const o = ve(this, t, n);
1538
+ }, Yt = function(e, t) {
1539
+ const n = ue(e.nodeObj);
1540
+ he(n);
1541
+ const o = ge(this, t, n);
1540
1542
  if (!o)
1541
1543
  return;
1542
1544
  const { newNodeObj: s } = o;
@@ -1544,13 +1546,13 @@ const Kt = function(e, t) {
1544
1546
  name: "copyNode",
1545
1547
  obj: s
1546
1548
  });
1547
- }, Gt = function(e, t) {
1548
- e = le(e);
1549
+ }, Xt = function(e, t) {
1550
+ e = ce(e);
1549
1551
  const n = [];
1550
1552
  for (let o = 0; o < e.length; o++) {
1551
- const s = e[o], i = fe(s.nodeObj);
1552
- ue(i);
1553
- const r = ve(this, t, i);
1553
+ const s = e[o], i = ue(s.nodeObj);
1554
+ he(i);
1555
+ const r = ge(this, t, i);
1554
1556
  if (!r)
1555
1557
  return;
1556
1558
  const { newNodeObj: c } = r;
@@ -1560,29 +1562,29 @@ const Kt = function(e, t) {
1560
1562
  name: "copyNodes",
1561
1563
  objs: n
1562
1564
  });
1563
- }, Jt = function(e) {
1565
+ }, Gt = function(e) {
1564
1566
  const t = e || this.currentNode;
1565
1567
  if (!t)
1566
1568
  return;
1567
1569
  const n = t.nodeObj;
1568
- Rt(n);
1570
+ zt(n);
1569
1571
  const o = t.parentNode.parentNode;
1570
1572
  o.parentNode.insertBefore(o, o.previousSibling), this.linkDiv(), this.bus.fire("operation", {
1571
1573
  name: "moveUpNode",
1572
1574
  obj: n
1573
1575
  });
1574
- }, Zt = function(e) {
1576
+ }, Jt = function(e) {
1575
1577
  const t = e || this.currentNode;
1576
1578
  if (!t)
1577
1579
  return;
1578
1580
  const n = t.nodeObj;
1579
- Ft(n);
1581
+ Rt(n);
1580
1582
  const o = t.parentNode.parentNode;
1581
1583
  o.nextSibling ? o.nextSibling.insertAdjacentElement("afterend", o) : o.parentNode.prepend(o), this.linkDiv(), this.bus.fire("operation", {
1582
1584
  name: "moveDownNode",
1583
1585
  obj: n
1584
1586
  });
1585
- }, Qt = function(e) {
1587
+ }, Zt = function(e) {
1586
1588
  var r;
1587
1589
  const t = e || this.currentNode;
1588
1590
  if (!t)
@@ -1590,8 +1592,8 @@ const Kt = function(e, t) {
1590
1592
  const n = t.nodeObj;
1591
1593
  if (!n.parent)
1592
1594
  throw new Error("Can not remove root node");
1593
- const o = n.parent.children, s = o.findIndex((c) => c === n), i = ge(n);
1594
- if (We(t, i), o.length !== 0) {
1595
+ const o = n.parent.children, s = o.findIndex((c) => c === n), i = me(n);
1596
+ if (Ve(t, i), o.length !== 0) {
1595
1597
  const c = o[s] || o[s - 1];
1596
1598
  this.selectNode(C(c.id));
1597
1599
  } else
@@ -1602,77 +1604,77 @@ const Kt = function(e, t) {
1602
1604
  originIndex: s,
1603
1605
  originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
1604
1606
  });
1605
- }, en = function(e) {
1606
- e = le(e);
1607
+ }, Qt = function(e) {
1608
+ e = ce(e);
1607
1609
  for (const t of e) {
1608
1610
  const n = t.nodeObj;
1609
1611
  if (!n.parent)
1610
1612
  continue;
1611
- const o = ge(n);
1612
- We(t, o);
1613
+ const o = me(n);
1614
+ Ve(t, o);
1613
1615
  }
1614
1616
  this.linkDiv(), this.bus.fire("operation", {
1615
1617
  name: "removeNodes",
1616
1618
  objs: e.map((t) => t.nodeObj)
1617
1619
  });
1618
- }, tn = function(e, t) {
1619
- e = le(e);
1620
+ }, en = function(e, t) {
1621
+ e = ce(e);
1620
1622
  const n = t.nodeObj;
1621
1623
  n.expanded === !1 && (this.expandNode(t, !0), t = C(n.id));
1622
1624
  for (const o of e) {
1623
1625
  const s = o.nodeObj;
1624
- Ke("in", s, n), $(this.nodeData);
1626
+ Ie("in", s, n), D(this.nodeData);
1625
1627
  const i = o.parentElement;
1626
- Ve(this, t, i.parentElement);
1628
+ Ke(this, t, i.parentElement);
1627
1629
  }
1628
1630
  this.linkDiv(), this.bus.fire("operation", {
1629
1631
  name: "moveNodeIn",
1630
1632
  objs: e.map((o) => o.nodeObj),
1631
1633
  toObj: n
1632
1634
  });
1633
- }, Ye = (e, t, n, o) => {
1634
- e = le(e), t === "after" && (e = e.reverse());
1635
+ }, Ue = (e, t, n, o) => {
1636
+ e = ce(e), t === "after" && (e = e.reverse());
1635
1637
  const s = n.nodeObj;
1636
1638
  for (const i of e) {
1637
1639
  const r = i.nodeObj;
1638
- Ke(t, r, s), $(o.nodeData), J(i);
1640
+ Ie(t, r, s), D(o.nodeData), G(i);
1639
1641
  const c = i.parentElement.parentNode;
1640
- n.parentElement.parentNode.insertAdjacentElement(Ue[t], c);
1642
+ n.parentElement.parentNode.insertAdjacentElement(We[t], c);
1641
1643
  }
1642
1644
  o.linkDiv(), o.bus.fire("operation", {
1643
1645
  name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
1644
1646
  objs: e.map((i) => i.nodeObj),
1645
1647
  toObj: s
1646
1648
  });
1649
+ }, tn = function(e, t) {
1650
+ Ue(e, "before", t, this);
1647
1651
  }, nn = function(e, t) {
1648
- Ye(e, "before", t, this);
1649
- }, on = function(e, t) {
1650
- Ye(e, "after", t, this);
1651
- }, sn = function(e) {
1652
+ Ue(e, "after", t, this);
1653
+ }, on = function(e) {
1652
1654
  const t = e || this.currentNode;
1653
1655
  t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
1654
- }, rn = function(e, t) {
1656
+ }, sn = function(e, t) {
1655
1657
  e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
1656
- }, Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1658
+ }, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1657
1659
  __proto__: null,
1658
- addChild: Yt,
1659
- beginEdit: sn,
1660
- copyNode: Xt,
1661
- copyNodes: Gt,
1662
- insertParent: Ut,
1663
- insertSibling: Wt,
1664
- moveDownNode: Zt,
1665
- moveNodeAfter: on,
1666
- moveNodeBefore: nn,
1667
- moveNodeIn: tn,
1668
- moveUpNode: Jt,
1669
- removeNode: Qt,
1670
- removeNodes: en,
1671
- reshapeNode: Vt,
1672
- rmSubline: J,
1673
- setNodeTopic: rn
1660
+ addChild: Ut,
1661
+ beginEdit: on,
1662
+ copyNode: Yt,
1663
+ copyNodes: Xt,
1664
+ insertParent: Wt,
1665
+ insertSibling: Vt,
1666
+ moveDownNode: Jt,
1667
+ moveNodeAfter: nn,
1668
+ moveNodeBefore: tn,
1669
+ moveNodeIn: en,
1670
+ moveUpNode: Gt,
1671
+ removeNode: Zt,
1672
+ removeNodes: Qt,
1673
+ reshapeNode: Kt,
1674
+ rmSubline: G,
1675
+ setNodeTopic: sn
1674
1676
  }, Symbol.toStringTag, { value: "Module" }));
1675
- function Ge(e) {
1677
+ function Xe(e) {
1676
1678
  return {
1677
1679
  nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
1678
1680
  arrows: e.arrows,
@@ -1681,7 +1683,7 @@ function Ge(e) {
1681
1683
  theme: e.theme
1682
1684
  };
1683
1685
  }
1684
- const cn = function(e, t, n) {
1686
+ const rn = function(e, t, n) {
1685
1687
  if (e) {
1686
1688
  if (this.clearSelection(), typeof e == "string") {
1687
1689
  const o = C(e);
@@ -1689,9 +1691,9 @@ const cn = function(e, t, n) {
1689
1691
  }
1690
1692
  e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n);
1691
1693
  }
1692
- }, ln = function() {
1694
+ }, cn = function() {
1693
1695
  this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
1694
- }, an = function(e) {
1696
+ }, ln = function(e) {
1695
1697
  this.clearSelection();
1696
1698
  for (const t of e)
1697
1699
  t.className = "selected";
@@ -1699,23 +1701,23 @@ const cn = function(e, t, n) {
1699
1701
  "selectNodes",
1700
1702
  e.map((t) => t.nodeObj)
1701
1703
  );
1702
- }, dn = function() {
1704
+ }, an = function() {
1703
1705
  if (this.currentNodes)
1704
1706
  for (const e of this.currentNodes)
1705
1707
  e.classList.remove("selected");
1706
1708
  this.currentNodes = null, this.bus.fire("unselectNodes");
1707
- }, hn = function() {
1709
+ }, dn = function() {
1708
1710
  this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
1709
- }, un = function() {
1710
- const e = Ge(this);
1711
+ }, hn = function() {
1712
+ const e = Xe(this);
1711
1713
  return JSON.stringify(e, (t, n) => {
1712
1714
  if (!(t === "parent" && typeof n != "string"))
1713
1715
  return n;
1714
1716
  });
1715
- }, fn = function() {
1717
+ }, un = function() {
1716
1718
  return JSON.parse(this.getDataString());
1717
- }, pn = function() {
1718
- const e = Ge(this).nodeData;
1719
+ }, fn = function() {
1720
+ const e = Xe(this).nodeData;
1719
1721
  let t = "# " + e.topic + `
1720
1722
 
1721
1723
  `;
@@ -1727,33 +1729,33 @@ const cn = function(e, t, n) {
1727
1729
  `, o[i].children && n(o[i].children || [], s + 1);
1728
1730
  }
1729
1731
  return n(e.children || [], 2), t;
1730
- }, mn = function() {
1732
+ }, pn = function() {
1731
1733
  this.editable = !0;
1732
- }, gn = function() {
1734
+ }, mn = function() {
1733
1735
  this.editable = !1;
1734
- }, vn = function(e) {
1736
+ }, gn = function(e) {
1735
1737
  this.scaleVal = e, this.map.style.transform = "scale(" + e + ")", this.bus.fire("scale", e);
1736
- }, yn = function() {
1738
+ }, vn = function() {
1737
1739
  this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
1738
- }, bn = function(e) {
1740
+ }, yn = function(e) {
1739
1741
  e(this);
1740
- }, xn = function(e) {
1742
+ }, bn = function(e) {
1741
1743
  e.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
1742
- }, wn = function() {
1744
+ }, xn = function() {
1743
1745
  this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
1744
- }, En = function() {
1746
+ }, wn = function() {
1745
1747
  this.direction = 0, this.refresh();
1746
- }, Nn = function() {
1748
+ }, En = function() {
1747
1749
  this.direction = 1, this.refresh();
1748
- }, Cn = function() {
1750
+ }, Nn = function() {
1749
1751
  this.direction = 2, this.refresh();
1750
- }, Sn = function(e) {
1752
+ }, Cn = function(e) {
1751
1753
  this.locale = e, this.refresh();
1752
- }, _n = function(e, t) {
1754
+ }, Sn = function(e, t) {
1753
1755
  const n = e.nodeObj;
1754
1756
  typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
1755
1757
  const o = e.parentNode, s = o.children[1];
1756
- if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", J(e), n.expanded) {
1758
+ if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", G(e), n.expanded) {
1757
1759
  const i = this.createChildren(
1758
1760
  n.children.map((r) => this.createWrapper(r).grp)
1759
1761
  );
@@ -1761,32 +1763,32 @@ const cn = function(e, t, n) {
1761
1763
  } else
1762
1764
  o.parentNode.children[1].remove();
1763
1765
  this.linkDiv(), this.bus.fire("expandNode", n);
1764
- }, Mn = function(e) {
1765
- e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), $(this.nodeData), this.layout(), this.linkDiv();
1766
- }, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1766
+ }, _n = function(e) {
1767
+ e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), D(this.nodeData), this.layout(), this.linkDiv();
1768
+ }, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1767
1769
  __proto__: null,
1768
- cancelFocus: wn,
1769
- clearSelection: hn,
1770
- disableEdit: gn,
1771
- enableEdit: mn,
1772
- expandNode: _n,
1773
- focusNode: xn,
1774
- getData: fn,
1775
- getDataMd: pn,
1776
- getDataString: un,
1777
- initLeft: En,
1778
- initRight: Nn,
1779
- initSide: Cn,
1780
- install: bn,
1781
- refresh: Mn,
1782
- scale: vn,
1783
- selectNode: cn,
1784
- selectNodes: an,
1785
- setLocale: Sn,
1786
- toCenter: yn,
1787
- unselectNode: ln,
1788
- unselectNodes: dn
1789
- }, Symbol.toStringTag, { value: "Module" })), Tn = function(e) {
1770
+ cancelFocus: xn,
1771
+ clearSelection: dn,
1772
+ disableEdit: mn,
1773
+ enableEdit: pn,
1774
+ expandNode: Sn,
1775
+ focusNode: bn,
1776
+ getData: un,
1777
+ getDataMd: fn,
1778
+ getDataString: hn,
1779
+ initLeft: wn,
1780
+ initRight: En,
1781
+ initSide: Nn,
1782
+ install: yn,
1783
+ refresh: _n,
1784
+ scale: gn,
1785
+ selectNode: rn,
1786
+ selectNodes: ln,
1787
+ setLocale: Cn,
1788
+ toCenter: vn,
1789
+ unselectNode: cn,
1790
+ unselectNodes: an
1791
+ }, Symbol.toStringTag, { value: "Module" })), kn = function(e) {
1790
1792
  return {
1791
1793
  dom: e,
1792
1794
  moved: !1,
@@ -1812,21 +1814,21 @@ const cn = function(e, t, n) {
1812
1814
  this.moved = !1, this.mousedown = !1;
1813
1815
  }
1814
1816
  };
1815
- }, Ae = {
1816
- create: Tn
1817
+ }, Le = {
1818
+ create: kn
1817
1819
  };
1818
- function re(e, t, n) {
1819
- const { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, h = c + n.x, d = l + n.y;
1820
+ function ie(e, t, n) {
1821
+ const { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, u = c + n.x, d = l + n.y;
1820
1822
  return {
1821
1823
  w: i,
1822
1824
  h: r,
1823
1825
  cx: c,
1824
1826
  cy: l,
1825
- ctrlX: h,
1827
+ ctrlX: u,
1826
1828
  ctrlY: d
1827
1829
  };
1828
1830
  }
1829
- function I(e) {
1831
+ function q(e) {
1830
1832
  let t, n;
1831
1833
  const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
1832
1834
  return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
@@ -1834,7 +1836,7 @@ function I(e) {
1834
1836
  y: n
1835
1837
  };
1836
1838
  }
1837
- const Ln = function(e, t, n, o) {
1839
+ const Tn = function(e, t, n, o) {
1838
1840
  const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
1839
1841
  return N(s, {
1840
1842
  "text-anchor": "middle",
@@ -1842,18 +1844,18 @@ const Ln = function(e, t, n, o) {
1842
1844
  y: n + "",
1843
1845
  fill: o || "#666"
1844
1846
  }), s.dataset.type = "custom-link", s.innerHTML = e, s;
1845
- }, Je = function(e, t, n, o, s) {
1847
+ }, Ge = function(e, t, n, o, s) {
1846
1848
  if (!t || !n)
1847
1849
  return;
1848
1850
  performance.now();
1849
- const i = re(e, t, o.delta1), r = re(e, n, o.delta2), { x: c, y: l } = I(i), { ctrlX: h, ctrlY: d } = i, { ctrlX: a, ctrlY: f } = r, { x: g, y: p } = I(r), m = He(a, f, g, p), u = pt(
1850
- `M ${c} ${l} C ${h} ${d} ${a} ${f} ${g} ${p}`,
1851
- `M ${m.x1} ${m.y1} L ${g} ${p} L ${m.x2} ${m.y2}`
1852
- ), v = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, y = l / 8 + d * 3 / 8 + f * 3 / 8 + p / 8, b = Ln(o.label, v, y, e.theme.cssVar["--color"]);
1853
- u.appendChild(b), u.arrowObj = o, u.dataset.linkid = o.id, e.linkSvgGroup.appendChild(u), s || (e.arrows.push(o), e.currentArrow = u, Qe(e, o, i, r)), performance.now();
1854
- }, An = function(e, t) {
1851
+ const i = ie(e, t, o.delta1), r = ie(e, n, o.delta2), { x: c, y: l } = q(i), { ctrlX: u, ctrlY: d } = i, { ctrlX: a, ctrlY: p } = r, { x: g, y: f } = q(r), m = Pe(a, p, g, f), h = ft(
1852
+ `M ${c} ${l} C ${u} ${d} ${a} ${p} ${g} ${f}`,
1853
+ `M ${m.x1} ${m.y1} L ${g} ${f} L ${m.x2} ${m.y2}`
1854
+ ), v = c / 8 + u * 3 / 8 + a * 3 / 8 + g / 8, y = l / 8 + d * 3 / 8 + p * 3 / 8 + f / 8, b = Tn(o.label, v, y, e.theme.cssVar["--color"]);
1855
+ h.appendChild(b), h.arrowObj = o, h.dataset.linkid = o.id, e.linkSvgGroup.appendChild(h), s || (e.arrows.push(o), e.currentArrow = h, Ze(e, o, i, r)), performance.now();
1856
+ }, Ln = function(e, t) {
1855
1857
  const n = {
1856
- id: G(),
1858
+ id: X(),
1857
1859
  label: "Custom Link",
1858
1860
  from: e.nodeObj.id,
1859
1861
  to: t.nodeObj.id,
@@ -1866,15 +1868,15 @@ const Ln = function(e, t, n, o) {
1866
1868
  y: -200
1867
1869
  }
1868
1870
  };
1869
- Je(this, e, t, n), this.bus.fire("operation", {
1871
+ Ge(this, e, t, n), this.bus.fire("operation", {
1870
1872
  name: "createArrow",
1871
1873
  obj: n
1872
1874
  });
1873
- }, jn = function(e) {
1875
+ }, An = function(e) {
1874
1876
  let t;
1875
1877
  if (e ? t = e : t = this.currentArrow, !t)
1876
1878
  return;
1877
- Ze(this);
1879
+ Je(this);
1878
1880
  const n = t.arrowObj.id;
1879
1881
  this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
1880
1882
  name: "removeArrow",
@@ -1882,36 +1884,36 @@ const Ln = function(e, t, n, o) {
1882
1884
  id: n
1883
1885
  }
1884
1886
  });
1885
- }, Dn = function(e) {
1887
+ }, jn = function(e) {
1886
1888
  this.currentArrow = e;
1887
- const t = e.arrowObj, n = C(t.from), o = C(t.to), s = re(this, n, t.delta1), i = re(this, o, t.delta2);
1888
- Qe(this, t, s, i);
1889
- }, $n = function() {
1890
- this.currentArrow = null, Ze(this);
1891
- }, Ze = function(e) {
1889
+ const t = e.arrowObj, n = C(t.from), o = C(t.to), s = ie(this, n, t.delta1), i = ie(this, o, t.delta2);
1890
+ Ze(this, t, s, i);
1891
+ }, Dn = function() {
1892
+ this.currentArrow = null, Je(this);
1893
+ }, Je = function(e) {
1892
1894
  e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
1893
- }, Qe = function(e, t, n, o) {
1894
- var f;
1895
+ }, Ze = function(e, t, n, o) {
1896
+ var p;
1895
1897
  e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
1896
- let { x: s, y: i } = I(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: h } = o, { x: d, y: a } = I(o);
1897
- e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${h}px;left:${l}px;`, N(e.line1, {
1898
+ let { x: s, y: i } = q(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: u } = o, { x: d, y: a } = q(o);
1899
+ e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${u}px;left:${l}px;`, N(e.line1, {
1898
1900
  x1: s + "",
1899
1901
  y1: i + "",
1900
1902
  x2: r + "",
1901
1903
  y2: c + ""
1902
1904
  }), N(e.line2, {
1903
1905
  x1: l + "",
1904
- y1: h + "",
1906
+ y1: u + "",
1905
1907
  x2: d + "",
1906
1908
  y2: a + ""
1907
- }), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 = Ae.create(e.P2), e.helper2 = Ae.create(e.P3), e.helper1.init(e.map, (g, p) => {
1909
+ }), e.helper1 && (e.helper1.destory(e.map), (p = e.helper2) == null || p.destory(e.map)), e.helper1 = Le.create(e.P2), e.helper2 = Le.create(e.P3), e.helper1.init(e.map, (g, f) => {
1908
1910
  var y;
1909
- r = r + g / e.scaleVal, c = c + p / e.scaleVal;
1910
- const m = I({ ...n, ctrlX: r, ctrlY: c });
1911
+ r = r + g / e.scaleVal, c = c + f / e.scaleVal;
1912
+ const m = q({ ...n, ctrlX: r, ctrlY: c });
1911
1913
  s = m.x, i = m.y;
1912
- const u = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 + a / 8;
1913
- e.P2.style.top = c + "px", e.P2.style.left = r + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${d} ${a}`), N(e.currentArrow.children[2], {
1914
- x: u + "",
1914
+ const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8;
1915
+ e.P2.style.top = c + "px", e.P2.style.left = r + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${u} ${d} ${a}`), N(e.currentArrow.children[2], {
1916
+ x: h + "",
1915
1917
  y: v + ""
1916
1918
  }), N(e.line1, {
1917
1919
  x1: s + "",
@@ -1919,39 +1921,39 @@ const Ln = function(e, t, n, o) {
1919
1921
  x2: r + "",
1920
1922
  y2: c + ""
1921
1923
  }), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy;
1922
- }), e.helper2.init(e.map, (g, p) => {
1924
+ }), e.helper2.init(e.map, (g, f) => {
1923
1925
  var b, x;
1924
- l = l + g / e.scaleVal, h = h + p / e.scaleVal;
1925
- const m = I({ ...o, ctrlX: l, ctrlY: h });
1926
+ l = l + g / e.scaleVal, u = u + f / e.scaleVal;
1927
+ const m = q({ ...o, ctrlX: l, ctrlY: u });
1926
1928
  d = m.x, a = m.y;
1927
- const u = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 + a / 8, y = He(l, h, d, a);
1928
- e.P3.style.top = h + "px", e.P3.style.left = l + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${d} ${a}`), (x = e.currentArrow) == null || x.children[1].setAttribute("d", `M ${y.x1} ${y.y1} L ${d} ${a} L ${y.x2} ${y.y2}`), N(e.currentArrow.children[2], {
1929
- x: u + "",
1929
+ const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8, y = Pe(l, u, d, a);
1930
+ e.P3.style.top = u + "px", e.P3.style.left = l + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${u} ${d} ${a}`), (x = e.currentArrow) == null || x.children[1].setAttribute("d", `M ${y.x1} ${y.y1} L ${d} ${a} L ${y.x2} ${y.y2}`), N(e.currentArrow.children[2], {
1931
+ x: h + "",
1930
1932
  y: v + ""
1931
1933
  }), N(e.line2, {
1932
1934
  x1: l + "",
1933
- y1: h + "",
1935
+ y1: u + "",
1934
1936
  x2: d + "",
1935
1937
  y2: a + ""
1936
- }), t.delta2.x = l - o.cx, t.delta2.y = h - o.cy;
1938
+ }), t.delta2.x = l - o.cx, t.delta2.y = u - o.cy;
1937
1939
  });
1938
1940
  };
1939
- function On() {
1941
+ function $n() {
1940
1942
  this.linkSvgGroup.innerHTML = "";
1941
1943
  for (let e = 0; e < this.arrows.length; e++) {
1942
1944
  const t = this.arrows[e];
1943
1945
  try {
1944
- Je(this, C(t.from), C(t.to), t, !0);
1946
+ Ge(this, C(t.from), C(t.to), t, !0);
1945
1947
  } catch {
1946
1948
  }
1947
1949
  }
1948
1950
  this.nodes.appendChild(this.linkSvgGroup);
1949
1951
  }
1950
- function Pn(e) {
1952
+ function On(e) {
1951
1953
  if (!e)
1952
1954
  return;
1953
1955
  const t = e.children[2];
1954
- Re(this, t, (n) => {
1956
+ ze(this, t, (n) => {
1955
1957
  var i;
1956
1958
  const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
1957
1959
  s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
@@ -1960,49 +1962,49 @@ function Pn(e) {
1960
1962
  }));
1961
1963
  });
1962
1964
  }
1963
- function Hn() {
1964
- this.arrows = this.arrows.filter((e) => se(e.from, this.nodeData) && se(e.to, this.nodeData));
1965
+ function Pn() {
1966
+ this.arrows = this.arrows.filter((e) => oe(e.from, this.nodeData) && oe(e.to, this.nodeData));
1965
1967
  }
1966
1968
  const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1967
1969
  __proto__: null,
1968
- createArrow: An,
1969
- editArrowLabel: Pn,
1970
- removeArrow: jn,
1971
- renderArrow: On,
1972
- selectArrow: Dn,
1973
- tidyArrow: Hn,
1974
- unselectArrow: $n
1975
- }, Symbol.toStringTag, { value: "Module" })), zn = function(e) {
1976
- var l, h;
1970
+ createArrow: Ln,
1971
+ editArrowLabel: On,
1972
+ removeArrow: An,
1973
+ renderArrow: $n,
1974
+ selectArrow: jn,
1975
+ tidyArrow: Pn,
1976
+ unselectArrow: Dn
1977
+ }, Symbol.toStringTag, { value: "Module" })), Hn = function(e) {
1978
+ var l, u;
1977
1979
  if (e.length === 0)
1978
1980
  throw new Error("No selected node.");
1979
1981
  if (e.length === 1) {
1980
1982
  const d = e[0].nodeObj, a = e[0].nodeObj.parent;
1981
1983
  if (!a)
1982
1984
  throw new Error("Can not select root node.");
1983
- const f = a.children.findIndex((g) => d === g);
1985
+ const p = a.children.findIndex((g) => d === g);
1984
1986
  return {
1985
1987
  parent: a.id,
1986
- start: f,
1987
- end: f
1988
+ start: p,
1989
+ end: p
1988
1990
  };
1989
1991
  }
1990
1992
  let t = 0;
1991
1993
  const n = e.map((d) => {
1992
1994
  let a = d.nodeObj;
1993
- const f = [];
1995
+ const p = [];
1994
1996
  for (; a.parent; ) {
1995
- const g = a.parent, p = g.children, m = p == null ? void 0 : p.indexOf(a);
1996
- a = g, f.unshift({ node: a, index: m });
1997
+ const g = a.parent, f = g.children, m = f == null ? void 0 : f.indexOf(a);
1998
+ a = g, p.unshift({ node: a, index: m });
1997
1999
  }
1998
- return f.length > t && (t = f.length), f;
2000
+ return p.length > t && (t = p.length), p;
1999
2001
  });
2000
2002
  let o = 0;
2001
2003
  e:
2002
2004
  for (; o < t; o++) {
2003
2005
  const d = (l = n[0][o]) == null ? void 0 : l.node;
2004
2006
  for (let a = 1; a < n.length; a++)
2005
- if (((h = n[a][o]) == null ? void 0 : h.node) !== d)
2007
+ if (((u = n[a][o]) == null ? void 0 : u.node) !== d)
2006
2008
  break e;
2007
2009
  }
2008
2010
  if (!o)
@@ -2015,10 +2017,10 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2015
2017
  start: i,
2016
2018
  end: r
2017
2019
  };
2018
- }, Rn = function(e) {
2020
+ }, zn = function(e) {
2019
2021
  const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
2020
2022
  return t.setAttribute("id", e), t;
2021
- }, je = function(e, t) {
2023
+ }, Ae = function(e, t) {
2022
2024
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
2023
2025
  return N(n, {
2024
2026
  d: e,
@@ -2027,7 +2029,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2027
2029
  "stroke-linecap": "round",
2028
2030
  "stroke-width": "2"
2029
2031
  }), n;
2030
- }, De = function(e, t, n, o, s) {
2032
+ }, je = function(e, t, n, o, s) {
2031
2033
  const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
2032
2034
  return N(i, {
2033
2035
  "text-anchor": o,
@@ -2035,43 +2037,43 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2035
2037
  y: n + "",
2036
2038
  fill: s || "#666"
2037
2039
  }), i.innerHTML = e, i;
2038
- }, Fn = (e) => C(e).parentElement.parentElement, qn = function({ parent: e, start: t }) {
2040
+ }, Rn = (e) => C(e).parentElement.parentElement, Fn = function({ parent: e, start: t }) {
2039
2041
  var i, r;
2040
2042
  const n = C(e), o = n.nodeObj;
2041
2043
  let s;
2042
2044
  return o.parent ? s = (i = n.closest("me-main")) == null ? void 0 : i.className : s = (r = C(o.children[t].id).closest("me-main")) == null ? void 0 : r.className, s;
2043
- }, et = function(e, t) {
2045
+ }, Qe = function(e, t) {
2044
2046
  var S;
2045
- const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, h = C(s).nodeObj, d = qn(t);
2046
- let a = 1 / 0, f = 0, g = 0, p = 0;
2047
- for (let P = i; P <= r; P++) {
2048
- const U = (S = h.children) == null ? void 0 : S[P];
2049
- if (!U)
2047
+ const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, u = C(s).nodeObj, d = Fn(t);
2048
+ let a = 1 / 0, p = 0, g = 0, f = 0;
2049
+ for (let O = i; O <= r; O++) {
2050
+ const W = (S = u.children) == null ? void 0 : S[O];
2051
+ if (!W)
2050
2052
  return e.removeSummary(n), null;
2051
- const H = Fn(U.id), { offsetLeft: Z, offsetTop: ye } = O(c, H);
2052
- P === i && (g = ye + 20), P === r && (p = ye + H.offsetHeight - 20), Z < a && (a = Z), H.offsetWidth + Z > f && (f = H.offsetWidth + Z);
2053
- }
2054
- let m, u;
2055
- const v = g + 10, y = p + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
2056
- d === "lhs" ? (m = je(`M ${a + 10} ${v} c -5 0 -10 5 -10 10 L ${a} ${y - 10} c 0 5 5 10 10 10 M ${a} ${b} h -10`, x), u = De(o, a - 20, b + 6, "end", x)) : (m = je(`M ${f - 10} ${v} c 5 0 10 5 10 10 L ${f} ${y - 10} c 0 5 -5 10 -10 10 M ${f} ${b} h 10`, x), u = De(o, f + 20, b + 6, "start", x));
2057
- const w = Rn("s-" + n);
2058
- return w.appendChild(m), w.appendChild(u), w.summaryObj = t, e.summarySvg.appendChild(w), w;
2059
- }, In = function() {
2053
+ const P = Rn(W.id), { offsetLeft: J, offsetTop: ve } = $(c, P);
2054
+ O === i && (g = ve + 20), O === r && (f = ve + P.offsetHeight - 20), J < a && (a = J), P.offsetWidth + J > p && (p = P.offsetWidth + J);
2055
+ }
2056
+ let m, h;
2057
+ const v = g + 10, y = f + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
2058
+ d === "lhs" ? (m = Ae(`M ${a + 10} ${v} c -5 0 -10 5 -10 10 L ${a} ${y - 10} c 0 5 5 10 10 10 M ${a} ${b} h -10`, x), h = je(o, a - 20, b + 6, "end", x)) : (m = Ae(`M ${p - 10} ${v} c 5 0 10 5 10 10 L ${p} ${y - 10} c 0 5 -5 10 -10 10 M ${p} ${b} h 10`, x), h = je(o, p + 20, b + 6, "start", x));
2059
+ const w = zn("s-" + n);
2060
+ return w.appendChild(m), w.appendChild(h), w.summaryObj = t, e.summarySvg.appendChild(w), w;
2061
+ }, qn = function() {
2060
2062
  let e = [];
2061
2063
  this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
2062
- const { parent: t, start: n, end: o } = zn(e), s = { id: G(), parent: t, start: n, end: o, text: "summary" }, i = et(this, s);
2064
+ const { parent: t, start: n, end: o } = Hn(e), s = { id: X(), parent: t, start: n, end: o, text: "summary" }, i = Qe(this, s);
2063
2065
  this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
2064
2066
  name: "createSummary",
2065
2067
  obj: s
2066
2068
  });
2067
- }, Kn = function(e) {
2069
+ }, In = function(e) {
2068
2070
  var n;
2069
2071
  const t = this.summaries.findIndex((o) => o.id === e);
2070
2072
  t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
2071
2073
  name: "removeSummary",
2072
2074
  obj: { id: e }
2073
2075
  });
2074
- }, Vn = function(e) {
2076
+ }, Kn = function(e) {
2075
2077
  const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
2076
2078
  N(s, {
2077
2079
  x: t.x - n + "",
@@ -2083,21 +2085,21 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2083
2085
  "stroke-width": "2",
2084
2086
  fill: "none"
2085
2087
  }), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
2086
- }, Wn = function() {
2088
+ }, Vn = function() {
2087
2089
  var e, t;
2088
2090
  (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
2089
- }, Un = function() {
2091
+ }, Wn = function() {
2090
2092
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
2091
2093
  try {
2092
- et(this, e);
2094
+ Qe(this, e);
2093
2095
  } catch {
2094
2096
  }
2095
2097
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
2096
- }, Yn = function(e) {
2098
+ }, Un = function(e) {
2097
2099
  if (!e)
2098
2100
  return;
2099
2101
  const t = e.childNodes[1];
2100
- Re(this, t, (n) => {
2102
+ ze(this, t, (n) => {
2101
2103
  var i;
2102
2104
  const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
2103
2105
  s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
@@ -2105,16 +2107,16 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2105
2107
  obj: o
2106
2108
  }));
2107
2109
  });
2108
- }, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2110
+ }, Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2109
2111
  __proto__: null,
2110
- createSummary: In,
2111
- editSummary: Yn,
2112
- removeSummary: Kn,
2113
- renderSummary: Un,
2114
- selectSummary: Vn,
2115
- unselectSummary: Wn
2112
+ createSummary: qn,
2113
+ editSummary: Un,
2114
+ removeSummary: In,
2115
+ renderSummary: Wn,
2116
+ selectSummary: Kn,
2117
+ unselectSummary: Vn
2116
2118
  }, Symbol.toStringTag, { value: "Module" })), M = "http://www.w3.org/2000/svg";
2117
- function Gn(e, t) {
2119
+ function Xn(e, t) {
2118
2120
  const n = document.createElementNS(M, "svg");
2119
2121
  return N(n, {
2120
2122
  version: "1.1",
@@ -2123,27 +2125,27 @@ function Gn(e, t) {
2123
2125
  width: t
2124
2126
  }), n;
2125
2127
  }
2126
- function Jn(e, t) {
2128
+ function Gn(e, t) {
2127
2129
  return (parseInt(e) - parseInt(t)) / 2;
2128
2130
  }
2129
- function Zn(e, t, n, o) {
2131
+ function Jn(e, t, n, o) {
2130
2132
  const s = document.createElementNS(M, "g");
2131
2133
  let i = "";
2132
2134
  return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
2133
2135
  `).forEach((c, l) => {
2134
- const h = document.createElementNS(M, "text");
2135
- N(h, {
2136
+ const u = document.createElementNS(M, "text");
2137
+ N(u, {
2136
2138
  x: n + parseInt(t.paddingLeft) + "",
2137
- y: o + parseInt(t.paddingTop) + Jn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
2139
+ y: o + parseInt(t.paddingTop) + Gn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
2138
2140
  "text-anchor": "start",
2139
2141
  "font-family": t.fontFamily,
2140
2142
  "font-size": `${t.fontSize}`,
2141
2143
  "font-weight": `${t.fontWeight}`,
2142
2144
  fill: `${t.color}`
2143
- }), h.innerHTML = c, s.appendChild(h);
2145
+ }), u.innerHTML = c, s.appendChild(u);
2144
2146
  }), s;
2145
2147
  }
2146
- function Qn(e, t, n, o) {
2148
+ function Zn(e, t, n, o) {
2147
2149
  var c;
2148
2150
  let s = "";
2149
2151
  (c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
@@ -2160,8 +2162,8 @@ function Qn(e, t, n, o) {
2160
2162
  style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
2161
2163
  }), r.innerHTML = s, i.appendChild(r), i;
2162
2164
  }
2163
- function eo(e, t) {
2164
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "rect");
2165
+ function Qn(e, t) {
2166
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "rect");
2165
2167
  return N(i, {
2166
2168
  x: o + "",
2167
2169
  y: s + "",
@@ -2174,8 +2176,8 @@ function eo(e, t) {
2174
2176
  "stroke-width": n.borderWidth
2175
2177
  }), i;
2176
2178
  }
2177
- function te(e, t, n = !1) {
2178
- const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = O(e.nodes, t), r = document.createElementNS(M, "rect");
2179
+ function ee(e, t, n = !1) {
2180
+ const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = $(e.nodes, t), r = document.createElementNS(M, "rect");
2179
2181
  N(r, {
2180
2182
  x: s + "",
2181
2183
  y: i + "",
@@ -2190,10 +2192,10 @@ function te(e, t, n = !1) {
2190
2192
  const c = document.createElementNS(M, "g");
2191
2193
  c.appendChild(r);
2192
2194
  let l;
2193
- return n ? l = Qn(t, o, s, i) : l = Zn(t, o, s, i), c.appendChild(l), c;
2195
+ return n ? l = Zn(t, o, s, i) : l = Jn(t, o, s, i), c.appendChild(l), c;
2194
2196
  }
2195
- function to(e, t) {
2196
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "a"), r = document.createElementNS(M, "text");
2197
+ function eo(e, t) {
2198
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "a"), r = document.createElementNS(M, "text");
2197
2199
  return N(r, {
2198
2200
  x: o + "",
2199
2201
  y: s + parseInt(n.fontSize) + "",
@@ -2204,8 +2206,8 @@ function to(e, t) {
2204
2206
  fill: `${n.color}`
2205
2207
  }), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
2206
2208
  }
2207
- function no(e, t) {
2208
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "image");
2209
+ function to(e, t) {
2210
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "image");
2209
2211
  return N(i, {
2210
2212
  x: o + "",
2211
2213
  y: s + "",
@@ -2214,41 +2216,41 @@ function no(e, t) {
2214
2216
  href: t.src
2215
2217
  }), i;
2216
2218
  }
2217
- const ne = 100, oo = '<?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">', so = (e, t = !1) => {
2218
- var a, f, g;
2219
- const n = e.nodes, o = n.offsetHeight + ne * 2, s = n.offsetWidth + ne * 2, i = Gn(o + "px", s + "px"), r = document.createElementNS(M, "svg"), c = document.createElementNS(M, "rect");
2219
+ const te = 100, no = '<?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">', oo = (e, t = !1) => {
2220
+ var a, p, g;
2221
+ const n = e.nodes, o = n.offsetHeight + te * 2, s = n.offsetWidth + te * 2, i = Xn(o + "px", s + "px"), r = document.createElementNS(M, "svg"), c = document.createElementNS(M, "rect");
2220
2222
  N(c, {
2221
2223
  x: "0",
2222
2224
  y: "0",
2223
2225
  width: `${s}`,
2224
2226
  height: `${o}`,
2225
2227
  fill: e.theme.cssVar["--bgcolor"]
2226
- }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((p) => {
2227
- const m = p.cloneNode(!0), { offsetLeft: u, offsetTop: v } = O(n, p.parentElement);
2228
- m.setAttribute("x", `${u}`), m.setAttribute("y", `${v}`), r.appendChild(m);
2228
+ }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((f) => {
2229
+ const m = f.cloneNode(!0), { offsetLeft: h, offsetTop: v } = $(n, f.parentElement);
2230
+ m.setAttribute("x", `${h}`), m.setAttribute("y", `${v}`), r.appendChild(m);
2229
2231
  });
2230
2232
  const l = (a = n.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
2231
2233
  l && r.appendChild(l);
2232
- const h = (f = n.querySelector(".topiclinks")) == null ? void 0 : f.cloneNode(!0);
2233
- h && r.appendChild(h);
2234
+ const u = (p = n.querySelector(".topiclinks")) == null ? void 0 : p.cloneNode(!0);
2235
+ u && r.appendChild(u);
2234
2236
  const d = (g = n.querySelector(".summary")) == null ? void 0 : g.cloneNode(!0);
2235
- return d && r.appendChild(d), n.querySelectorAll("me-tpc").forEach((p) => {
2236
- p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(te(e, p, !t)) : (r.appendChild(eo(e, p)), r.appendChild(te(e, p.text, !t)));
2237
- }), n.querySelectorAll(".tags > span").forEach((p) => {
2238
- r.appendChild(te(e, p));
2239
- }), n.querySelectorAll(".icons > span").forEach((p) => {
2240
- r.appendChild(te(e, p));
2241
- }), n.querySelectorAll(".hyper-link").forEach((p) => {
2242
- r.appendChild(to(e, p));
2243
- }), n.querySelectorAll("img").forEach((p) => {
2244
- r.appendChild(no(e, p));
2237
+ return d && r.appendChild(d), n.querySelectorAll("me-tpc").forEach((f) => {
2238
+ f.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ee(e, f, !t)) : (r.appendChild(Qn(e, f)), r.appendChild(ee(e, f.text, !t)));
2239
+ }), n.querySelectorAll(".tags > span").forEach((f) => {
2240
+ r.appendChild(ee(e, f));
2241
+ }), n.querySelectorAll(".icons > span").forEach((f) => {
2242
+ r.appendChild(ee(e, f));
2243
+ }), n.querySelectorAll(".hyper-link").forEach((f) => {
2244
+ r.appendChild(eo(e, f));
2245
+ }), n.querySelectorAll("img").forEach((f) => {
2246
+ r.appendChild(to(e, f));
2245
2247
  }), N(r, {
2246
- x: ne + "",
2247
- y: ne + "",
2248
+ x: te + "",
2249
+ y: te + "",
2248
2250
  overflow: "visible"
2249
2251
  }), i.appendChild(r), i;
2250
- }, io = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), oo + e.outerHTML);
2251
- function ro(e) {
2252
+ }, so = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), no + e.outerHTML);
2253
+ function io(e) {
2252
2254
  return new Promise((t, n) => {
2253
2255
  const o = new FileReader();
2254
2256
  o.onload = (s) => {
@@ -2258,11 +2260,11 @@ function ro(e) {
2258
2260
  }, o.readAsDataURL(e);
2259
2261
  });
2260
2262
  }
2261
- const co = function(e = !1, t) {
2262
- const n = so(this, e), o = io(n, t);
2263
+ const ro = function(e = !1, t) {
2264
+ const n = oo(this, e), o = so(n, t);
2263
2265
  return new Blob([o], { type: "image/svg+xml" });
2264
- }, lo = async function(e = !1, t) {
2265
- const n = this.exportSvg(e, t), o = await ro(n);
2266
+ }, co = async function(e = !1, t) {
2267
+ const n = this.exportSvg(e, t), o = await io(n);
2266
2268
  return new Promise((s, i) => {
2267
2269
  const r = new Image();
2268
2270
  r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
@@ -2270,66 +2272,67 @@ const co = function(e = !1, t) {
2270
2272
  c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
2271
2273
  }, r.src = o, r.onerror = i;
2272
2274
  });
2273
- }, ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2275
+ }, lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2274
2276
  __proto__: null,
2275
- exportPng: lo,
2276
- exportSvg: co
2277
+ exportPng: co,
2278
+ exportSvg: ro
2277
2279
  }, Symbol.toStringTag, { value: "Module" }));
2278
- function ho(e, t) {
2280
+ function ao(e, t) {
2279
2281
  return async function(...n) {
2280
2282
  const o = this.before[t];
2281
2283
  o && !await o.apply(this, n) || e.apply(this, n);
2282
2284
  };
2283
2285
  }
2284
- const $e = Object.keys(Xe), tt = {};
2285
- for (let e = 0; e < $e.length; e++) {
2286
- const t = $e[e];
2287
- tt[t] = ho(Xe[t], t);
2286
+ const De = Object.keys(Ye), et = {};
2287
+ for (let e = 0; e < De.length; e++) {
2288
+ const t = De[e];
2289
+ et[t] = ao(Ye[t], t);
2288
2290
  }
2289
- const uo = {
2290
- getObjById: se,
2291
- generateNewObj: ot,
2292
- layout: rt,
2293
- linkDiv: mt,
2294
- editTopic: ft,
2295
- createWrapper: at,
2296
- createParent: dt,
2297
- createChildren: ht,
2298
- createTopic: ut,
2291
+ const ho = {
2292
+ getObjById: oe,
2293
+ generateNewObj: nt,
2294
+ layout: it,
2295
+ linkDiv: pt,
2296
+ editTopic: ut,
2297
+ createWrapper: lt,
2298
+ createParent: at,
2299
+ createChildren: dt,
2300
+ createTopic: ht,
2299
2301
  findEle: C,
2300
- changeTheme: zt,
2301
- ...kn,
2302
- ...tt,
2302
+ changeTheme: Ht,
2303
+ ...Mn,
2304
+ ...et,
2303
2305
  ...Bn,
2304
- ...Xn,
2305
- ...ao,
2306
+ ...Yn,
2307
+ ...lo,
2306
2308
  init(e) {
2307
2309
  if (!e || !e.nodeData)
2308
2310
  return new Error("MindElixir: `data` is required");
2309
- 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 && Lt(this), this.keypress && Et(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(gt(this, this.contextMenuOption)), this.draggable && St(this), this.allowUndo && Mt(this), this.toCenter(), this.layout(), this.linkDiv();
2311
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, D(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Tt(this), this.keypress && wt(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(mt(this, this.contextMenuOption)), this.draggable && Ct(this), this.allowUndo && _t(this), this.toCenter(), this.layout(), this.linkDiv();
2310
2312
  },
2311
2313
  destroy() {
2312
2314
  var e, t;
2313
2315
  this.disposable.forEach((n) => n()), (e = this.mindElixirBox) == null || e.remove(), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNode = 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, (t = this.selection) == null || t.destroy(), this.selection = void 0;
2314
2316
  }
2315
2317
  };
2316
- function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: h }) {
2318
+ function uo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: u }) {
2317
2319
  let d = t + n / 2;
2318
2320
  const a = e + o / 2;
2319
- let f;
2320
- l === "lhs" ? f = i + r : f = i;
2321
- const g = s + c / 2, m = (1 - Math.abs(g - a) / h) * 0.25 * (n / 2);
2322
- return l === "lhs" ? d = d - n / 10 - m : d = d + n / 10 + m, `M ${d} ${a} Q ${d} ${g} ${f} ${g}`;
2321
+ let p;
2322
+ l === "lhs" ? p = i + r : p = i;
2323
+ const g = s + c / 2, m = (1 - Math.abs(g - a) / u) * 0.25 * (n / 2);
2324
+ return l === "lhs" ? d = d - n / 10 - m : d = d + n / 10 + m, `M ${d} ${a} Q ${d} ${g} ${p} ${g}`;
2323
2325
  }
2324
- function po({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: h }) {
2325
- let d = 0, a = 0;
2326
- h ? d = e + o / 2 : d = e + o;
2327
- const f = s + c;
2328
- let g = 0, p = 0, m = 0;
2329
- const u = Math.abs(d - f) / 300 * D;
2330
- return l === "lhs" ? (m = t, g = m + D, p = m - D, a = i + D, `M ${g} ${d} C ${m} ${d} ${m + u} ${f} ${p} ${f} H ${a}`) : (m = t + n, g = m - D, p = m + D, a = i + r - D, `M ${g} ${d} C ${m} ${d} ${m - u} ${f} ${p} ${f} H ${a}`);
2326
+ function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: u }) {
2327
+ const d = parseInt(this.mindElixirBox.style.getPropertyValue("--gap"));
2328
+ let a = 0, p = 0;
2329
+ u ? a = e + o / 2 : a = e + o;
2330
+ const g = s + c;
2331
+ let f = 0, m = 0, h = 0;
2332
+ const v = Math.abs(a - g) / 300 * d;
2333
+ return l === "lhs" ? (h = t, f = h + d, m = h - d, p = i + d, `M ${f} ${a} C ${h} ${a} ${h + v} ${g} ${m} ${g} H ${p}`) : (h = t + n, f = h - d, m = h + d, p = i + r - d, `M ${f} ${a} C ${h} ${a} ${h - v} ${g} ${m} ${g} H ${p}`);
2331
2334
  }
2332
- const mo = "4.2.4", Y = document;
2335
+ const po = "4.3.0", U = document;
2333
2336
  function A({
2334
2337
  el: e,
2335
2338
  direction: t,
@@ -2340,37 +2343,37 @@ function A({
2340
2343
  contextMenuOption: r,
2341
2344
  toolBar: c,
2342
2345
  keypress: l,
2343
- mouseSelectionButton: h,
2346
+ mouseSelectionButton: u,
2344
2347
  selectionContainer: d,
2345
2348
  before: a,
2346
- newTopicName: f,
2349
+ newTopicName: p,
2347
2350
  allowUndo: g,
2348
- generateMainBranch: p,
2351
+ generateMainBranch: f,
2349
2352
  generateSubBranch: m,
2350
- overflowHidden: u,
2353
+ overflowHidden: h,
2351
2354
  theme: v
2352
2355
  }) {
2353
2356
  let y = null;
2354
2357
  const b = Object.prototype.toString.call(e);
2355
2358
  if (b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && (y = document.querySelector(e)), !y)
2356
2359
  throw new Error("MindElixir: el is not a valid element");
2357
- y.className += " mind-elixir", y.innerHTML = "", y.style.setProperty("--gap", D + "px"), this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = h || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = f || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = g === void 0 ? !1 : g, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = p || fo, this.generateSubBranch = m || po, this.overflowHidden = u || !1, this.bus = it.create(), this.container = Y.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
2360
+ y.className += " mind-elixir", y.innerHTML = "", this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = u || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = p || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = g === void 0 ? !1 : g, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = f || uo, this.generateSubBranch = m || fo, this.overflowHidden = h || !1, this.bus = st.create(), this.container = U.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
2358
2361
  const x = window.matchMedia("(prefers-color-scheme: dark)");
2359
- this.theme = v || (x.matches ? Pe : Oe);
2360
- const w = Y.createElement("div");
2361
- w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = be(), this.line2 = be(), 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" : st(this);
2362
+ this.theme = v || (x.matches ? Oe : $e);
2363
+ const w = U.createElement("div");
2364
+ w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = U.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = Y("lines"), this.summarySvg = Y("summary"), this.linkController = Y("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 = ye(), this.line2 = ye(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = Y("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : ot(this);
2362
2365
  }
2363
- A.prototype = uo;
2366
+ A.prototype = ho;
2364
2367
  A.LEFT = T;
2365
- A.RIGHT = R;
2366
- A.SIDE = ce;
2367
- A.THEME = Oe;
2368
- A.DARK_THEME = Pe;
2369
- A.version = mo;
2368
+ A.RIGHT = z;
2369
+ A.SIDE = re;
2370
+ A.THEME = $e;
2371
+ A.DARK_THEME = Oe;
2372
+ A.version = po;
2370
2373
  A.E = C;
2371
2374
  A.new = (e) => ({
2372
2375
  nodeData: {
2373
- id: G(),
2376
+ id: X(),
2374
2377
  topic: e || "new topic",
2375
2378
  children: []
2376
2379
  }