mind-elixir 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,7 +90,7 @@ function yt(e, t, n, s) {
90
90
  function et() {
91
91
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
92
92
  }
93
- const Tt = function() {
93
+ const $t = function() {
94
94
  const e = et();
95
95
  return {
96
96
  topic: this.newTopicName,
@@ -124,7 +124,7 @@ const Tt = function() {
124
124
  this.moved = !1, this.mousedown = !1, this.lastX = 0, this.lastY = 0;
125
125
  }
126
126
  }, ot = (e) => e.tagName === "ME-TPC";
127
- function Nt(e) {
127
+ function Tt(e) {
128
128
  e.map.addEventListener("click", (t) => {
129
129
  if (N.moved) {
130
130
  N.clear();
@@ -151,9 +151,11 @@ function Nt(e) {
151
151
  console.log(t.button), t.button === 2 && N.clear();
152
152
  }), e.map.addEventListener("mouseup", (t) => {
153
153
  t.button === 2 && N.clear();
154
+ }), e.map.addEventListener("contextmenu", (t) => {
155
+ t.preventDefault();
154
156
  });
155
157
  }
156
- const At = {
158
+ const Nt = {
157
159
  create() {
158
160
  return {
159
161
  handlers: {},
@@ -182,11 +184,11 @@ const At = {
182
184
  }
183
185
  };
184
186
  }
185
- }, K = document, Dt = function() {
187
+ }, U = document, At = function() {
186
188
  console.time("layout"), this.nodes.innerHTML = "";
187
189
  const e = this.createTopic(this.nodeData);
188
190
  bt(e, this.nodeData), e.draggable = !1;
189
- const t = K.createElement("me-root");
191
+ const t = U.createElement("me-root");
190
192
  t.appendChild(e);
191
193
  const n = this.nodeData.children || [];
192
194
  if (this.direction === J) {
@@ -195,19 +197,19 @@ const At = {
195
197
  o.direction === q ? s += 1 : o.direction === Z ? i += 1 : s <= i ? (o.direction = q, s += 1) : (o.direction = Z, i += 1);
196
198
  });
197
199
  }
198
- Ht(this, n, t), console.timeEnd("layout");
199
- }, Ht = function(e, t, n) {
200
- const s = K.createElement("me-main");
200
+ Dt(this, n, t), console.timeEnd("layout");
201
+ }, Dt = function(e, t, n) {
202
+ const s = U.createElement("me-main");
201
203
  s.className = "lhs";
202
- const i = K.createElement("me-main");
204
+ const i = U.createElement("me-main");
203
205
  i.className = "rhs";
204
206
  for (let o = 0; o < t.length; o++) {
205
207
  const r = t[o], { grp: l } = e.createWrapper(r);
206
208
  e.direction === J ? r.direction === q ? s.appendChild(l) : i.appendChild(l) : e.direction === q ? s.appendChild(l) : i.appendChild(l);
207
209
  }
208
210
  e.nodes.appendChild(s), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
209
- }, Pt = function(e, t) {
210
- const n = K.createElement("me-children");
211
+ }, Ht = function(e, t) {
212
+ const n = U.createElement("me-children");
211
213
  for (let s = 0; s < t.length; s++) {
212
214
  const i = t[s], { grp: o } = e.createWrapper(i);
213
215
  n.appendChild(o);
@@ -236,23 +238,23 @@ const At = {
236
238
  n.className = "tags", n.innerHTML = t.tags.map((s) => `<span>${it(s)}</span>`).join(""), e.appendChild(n), e.tags = n;
237
239
  }
238
240
  t.branchColor && (e.style.borderColor = t.branchColor);
239
- }, zt = function(e, t) {
241
+ }, Pt = function(e, t) {
240
242
  const n = E.createElement("me-wrapper"), { p: s, tpc: i } = this.createParent(e);
241
243
  if (n.appendChild(s), !t && e.children && e.children.length > 0) {
242
- const o = Rt(e.expanded);
244
+ const o = Vt(e.expanded);
243
245
  if (s.appendChild(o), e.expanded !== !1) {
244
- const r = Pt(this, e.children);
246
+ const r = Ht(this, e.children);
245
247
  n.appendChild(r);
246
248
  }
247
249
  }
248
250
  return { grp: n, top: s, tpc: i };
249
- }, Bt = function(e) {
251
+ }, zt = function(e) {
250
252
  const t = E.createElement("me-parent"), n = this.createTopic(e);
251
253
  return bt(n, e), t.appendChild(n), { p: t, tpc: n };
252
- }, Ot = function(e) {
254
+ }, Bt = function(e) {
253
255
  const t = E.createElement("me-children");
254
256
  return t.append(...e), t;
255
- }, qt = function(e) {
257
+ }, Ot = function(e) {
256
258
  const t = E.createElement("me-tpc");
257
259
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
258
260
  };
@@ -262,7 +264,7 @@ function xt(e) {
262
264
  const n = window.getSelection();
263
265
  n && (n.removeAllRanges(), n.addRange(t));
264
266
  }
265
- const Vt = function(e) {
267
+ const qt = function(e) {
266
268
  if (console.time("editTopic"), !e)
267
269
  return;
268
270
  const t = E.createElement("div"), n = e.childNodes[0].textContent;
@@ -288,10 +290,10 @@ const Vt = function(e) {
288
290
  origin: n
289
291
  }));
290
292
  }), console.timeEnd("editTopic");
291
- }, Rt = function(e) {
293
+ }, Vt = function(e) {
292
294
  const t = E.createElement("me-epd");
293
295
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
294
- }, H = document, P = "http://www.w3.org/2000/svg", jt = function(e, t) {
296
+ }, H = document, P = "http://www.w3.org/2000/svg", Rt = function(e, t) {
295
297
  const n = H.createElementNS(P, "path");
296
298
  return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
297
299
  }, W = function(e) {
@@ -300,10 +302,10 @@ const Vt = function(e) {
300
302
  }, rt = function() {
301
303
  const e = H.createElementNS(P, "line");
302
304
  return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
303
- }, Wt = function(e, t) {
305
+ }, jt = function(e, t) {
304
306
  const n = H.createElementNS(P, "path");
305
307
  return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
306
- }, Xt = function(e, t) {
308
+ }, Wt = function(e, t) {
307
309
  const n = {
308
310
  stroke: "rgb(235, 95, 82)",
309
311
  fill: "none",
@@ -341,12 +343,12 @@ const Vt = function(e) {
341
343
  }), console.timeEnd("editSummary");
342
344
  };
343
345
  let _t = Ct;
344
- const Yt = function(e) {
346
+ const Xt = function(e) {
345
347
  console.time("linkDiv");
346
348
  const t = this.map.querySelector("me-root");
347
349
  this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
348
350
  const n = this.map.querySelectorAll("me-main > me-wrapper");
349
- this.lines.innerHTML = "", _t = this.subLinkStyle === 2 ? Gt : Ct;
351
+ this.lines.innerHTML = "", _t = this.subLinkStyle === 2 ? It : Ct;
350
352
  for (let s = 0; s < n.length; s++) {
351
353
  const i = n[s], o = i.querySelector("me-tpc"), r = i.firstChild, l = i.parentNode.className;
352
354
  let c = t.offsetLeft + t.offsetWidth / 2;
@@ -357,18 +359,18 @@ const Yt = function(e) {
357
359
  const m = g + r.offsetHeight / 2;
358
360
  let p = "";
359
361
  if (this.mainLinkStyle === 2)
360
- this.direction === J && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), p = Ft({ x1: c, y1: u, x2: h, y2: m });
362
+ this.direction === J && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), p = Yt({ x1: c, y1: u, x2: h, y2: m });
361
363
  else {
362
364
  const w = (1 - Math.abs(m - i.parentElement.offsetTop - i.parentElement.offsetHeight / 2) / i.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
363
- l === "lhs" ? c = c - t.offsetWidth / 10 - w : c = c + t.offsetWidth / 10 + w, p = It({ x1: c, y1: u, x2: h, y2: m });
365
+ l === "lhs" ? c = c - t.offsetWidth / 10 - w : c = c + t.offsetWidth / 10 + w, p = Ft({ x1: c, y1: u, x2: h, y2: m });
364
366
  }
365
- this.lines.appendChild(jt(p, a));
367
+ this.lines.appendChild(Rt(p, a));
366
368
  const v = i.children[0].children[1];
367
369
  if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== i) && i.childElementCount) {
368
370
  const x = W("subLines"), w = i.lastChild;
369
371
  w.tagName === "svg" && w.remove(), i.appendChild(x);
370
- const _ = i.firstChild, M = i.children[1].children, X = Et(M, _, l, !0);
371
- x.appendChild(Wt(X, a));
372
+ const _ = i.firstChild, k = i.children[1].children, X = Et(k, _, l, !0);
373
+ x.appendChild(jt(X, a));
372
374
  }
373
375
  }
374
376
  this.renderCustomLink(), this.renderSummary(), console.timeEnd("linkDiv");
@@ -389,13 +391,13 @@ const Yt = function(e) {
389
391
  }
390
392
  return i;
391
393
  };
392
- function Ft({ x1: e, y1: t, x2: n, y2: s }) {
394
+ function Yt({ x1: e, y1: t, x2: n, y2: s }) {
393
395
  return `M ${e} ${t} V ${s > t ? s - 20 : s + 20} C ${e} ${s} ${e} ${s} ${n > e ? e + 20 : e - 20} ${s} H ${n}`;
394
396
  }
395
- function It({ x1: e, y1: t, x2: n, y2: s }) {
397
+ function Ft({ x1: e, y1: t, x2: n, y2: s }) {
396
398
  return `M ${e} ${t} Q ${e} ${s} ${n} ${s}`;
397
399
  }
398
- function Gt({ pT: e, pL: t, pW: n, pH: s, cT: i, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
400
+ function It({ pT: e, pL: t, pW: n, pH: s, cT: i, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
399
401
  let h;
400
402
  u ? h = e + s / 2 : h = e + s;
401
403
  const d = i + l;
@@ -416,7 +418,7 @@ const D = (e, t) => {
416
418
  <use xlink:href="#icon-${t}"></use>
417
419
  </svg>`, n;
418
420
  };
419
- function Kt(e) {
421
+ function Gt(e) {
420
422
  const t = document.createElement("div"), n = D("fullscreen", "full"), s = D("toCenter", "living"), i = D("zoomout", "move"), o = D("zoomin", "add"), r = document.createElement("span");
421
423
  return r.innerText = "100%", t.appendChild(n), t.appendChild(s), t.appendChild(i), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
422
424
  e.container.requestFullscreen();
@@ -438,12 +440,12 @@ function Ut(e) {
438
440
  e.initSide();
439
441
  }, t;
440
442
  }
441
- function Jt(e) {
442
- e.container.append(Kt(e)), e.container.append(Ut(e));
443
+ function Kt(e) {
444
+ e.container.append(Gt(e)), e.container.append(Ut(e));
443
445
  }
444
446
  /*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
445
- var Qt = Object.defineProperty, Zt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => (Zt(e, typeof t != "symbol" ? t + "" : t, n), n);
446
- class te {
447
+ var Jt = Object.defineProperty, Qt = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => (Qt(e, typeof t != "symbol" ? t + "" : t, n), n);
448
+ class Zt {
447
449
  constructor() {
448
450
  y(this, "_listeners", /* @__PURE__ */ new Map()), y(this, "on", this.addEventListener), y(this, "off", this.removeEventListener), y(this, "emit", this.dispatchEvent);
449
451
  }
@@ -508,7 +510,7 @@ function B(e, t = document) {
508
510
  }
509
511
  return s;
510
512
  }
511
- const ee = () => matchMedia("(hover: none), (pointer: coarse)").matches, ne = () => "safari" in window, se = (e) => {
513
+ const te = () => matchMedia("(hover: none), (pointer: coarse)").matches, ee = () => "safari" in window, ne = (e) => {
512
514
  let t, n = -1, s = !1;
513
515
  return {
514
516
  next(...i) {
@@ -521,7 +523,7 @@ const ee = () => matchMedia("(hover: none), (pointer: coarse)").matches, ne = ()
521
523
  }
522
524
  };
523
525
  }, { abs: A, max: at, min: ht, ceil: dt } = Math;
524
- class St extends te {
526
+ class se extends Zt {
525
527
  constructor(t) {
526
528
  var n, s, i, o, r;
527
529
  super(), y(this, "_options"), y(this, "_selection", {
@@ -585,7 +587,7 @@ class St extends te {
585
587
  // https://stackoverflow.com/a/38268846
586
588
  pointerEvents: "none",
587
589
  zIndex: "1"
588
- }), this._frame = se((h) => {
590
+ }), this._frame = ne((h) => {
589
591
  this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
590
592
  }), this.enable();
591
593
  }
@@ -691,7 +693,7 @@ class St extends te {
691
693
  }
692
694
  _handleMoveEvent(t) {
693
695
  const { features: n } = this._options;
694
- (n.touch && ee() || this._scrollAvailable && ne()) && t.preventDefault();
696
+ (n.touch && te() || this._scrollAvailable && ee()) && t.preventDefault();
695
697
  }
696
698
  _onScroll() {
697
699
  const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: s, scrollLeft: i } = n.scrollingElement ?? n.body;
@@ -706,8 +708,8 @@ class St extends te {
706
708
  let { x2: m, y2: p } = n;
707
709
  const { behaviour: { scrolling: { startScrollMargins: v } } } = o;
708
710
  m < a.left + v.x ? (t.x = u ? -A(a.left - m + v.x) : 0, m = m < a.left ? a.left : m) : m > a.right - v.x ? (t.x = h - u - d ? A(a.left + a.width - m - v.x) : 0, m = m > a.right ? a.right : m) : t.x = 0, p < a.top + v.y ? (t.y = r ? -A(a.top - p + v.y) : 0, p = p < a.top ? a.top : p) : p > a.bottom - v.y ? (t.y = l - r - c ? A(a.top + a.height - p - v.y) : 0, p = p > a.bottom ? a.bottom : p) : t.y = 0;
709
- const x = ht(f, m), w = ht(g, p), _ = at(f, m), M = at(g, p);
710
- s.x = x, s.y = w, s.width = _ - x, s.height = M - w;
711
+ const x = ht(f, m), w = ht(g, p), _ = at(f, m), k = at(g, p);
712
+ s.x = x, s.y = w, s.width = _ - x, s.height = k - w;
711
713
  }
712
714
  _redrawSelectionArea() {
713
715
  const { x: t, y: n, width: s, height: i } = this._areaRect, { style: o } = this._area;
@@ -861,48 +863,8 @@ class St extends te {
861
863
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
862
864
  }
863
865
  }
864
- y(St, "version", "3.3.1");
865
- function ie(e) {
866
- const t = new St({
867
- selectables: [".map-container me-tpc"],
868
- boundaries: [".map-container"],
869
- container: ".map-container",
870
- behaviour: {
871
- // Scroll configuration.
872
- scrolling: {
873
- // On scrollable areas the number on px per frame is devided by this amount.
874
- // Default is 10 to provide a enjoyable scroll experience.
875
- speedDivider: 10,
876
- // Browsers handle mouse-wheel events differently, this number will be used as
877
- // numerator to calculate the mount of px while scrolling manually: manualScrollSpeed / scrollSpeedDivider.
878
- manualSpeed: 750,
879
- // This property defines the virtual inset margins from the borders of the container
880
- // component that, when crossed by the mouse/touch, trigger the scrolling. Useful for
881
- // fullscreen containers.
882
- startScrollMargins: { x: 10, y: 10 }
883
- }
884
- }
885
- }).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box" || n.target.className === "circle")).on("start", ({ event: n }) => {
886
- !n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
887
- }).on(
888
- "move",
889
- ({
890
- store: {
891
- changed: { added: n, removed: s }
892
- }
893
- }) => {
894
- N.moved = !0;
895
- for (const i of n)
896
- i.classList.add("selected");
897
- for (const i of s)
898
- i.classList.remove("selected");
899
- }
900
- ).on("stop", ({ store: { stored: n } }) => {
901
- console.log(n, "stored"), e.selectNodes(n);
902
- });
903
- console.log(t, "selection");
904
- }
905
- const oe = function(e, t = !0) {
866
+ y(se, "version", "3.3.1");
867
+ const ie = function(e, t = !0) {
906
868
  this.theme = e;
907
869
  const n = this.theme.cssVar, s = Object.keys(n);
908
870
  for (let i = 0; i < s.length; i++) {
@@ -911,7 +873,7 @@ const oe = function(e, t = !0) {
911
873
  }
912
874
  t && this.refresh();
913
875
  };
914
- function Mt(e) {
876
+ function St(e) {
915
877
  return {
916
878
  nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
917
879
  linkData: e.linkData,
@@ -920,7 +882,7 @@ function Mt(e) {
920
882
  theme: e.theme
921
883
  };
922
884
  }
923
- const re = function(e, t, n) {
885
+ const oe = function(e, t, n) {
924
886
  if (e) {
925
887
  if (console.time("selectNode"), typeof e == "string") {
926
888
  const s = C(e);
@@ -928,9 +890,9 @@ const re = function(e, t, n) {
928
890
  }
929
891
  this.currentNode && (this.currentNode.className = ""), 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), console.timeEnd("selectNode");
930
892
  }
931
- }, le = function() {
893
+ }, re = function() {
932
894
  this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
933
- }, ce = function(e) {
895
+ }, le = function(e) {
934
896
  if (e) {
935
897
  console.time("selectNodes");
936
898
  for (const t of e)
@@ -940,12 +902,12 @@ const re = function(e, t, n) {
940
902
  e.map((t) => t.nodeObj)
941
903
  ), console.timeEnd("selectNodes");
942
904
  }
943
- }, ae = function() {
905
+ }, ce = function() {
944
906
  if (this.currentNodes)
945
907
  for (const e of this.currentNodes)
946
908
  e.classList.remove("selected");
947
909
  this.currentNodes = null, this.bus.fire("unselectNodes");
948
- }, he = function() {
910
+ }, ae = function() {
949
911
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
950
912
  return !1;
951
913
  const e = this.currentNode.parentElement.parentElement.nextSibling;
@@ -955,7 +917,7 @@ const re = function(e, t, n) {
955
917
  else
956
918
  return !1;
957
919
  return this.selectNode(t), !0;
958
- }, de = function() {
920
+ }, he = function() {
959
921
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
960
922
  return !1;
961
923
  const e = this.currentNode.parentElement.parentElement.previousSibling;
@@ -965,7 +927,7 @@ const re = function(e, t, n) {
965
927
  else
966
928
  return !1;
967
929
  return this.selectNode(t), !0;
968
- }, ue = function() {
930
+ }, de = function() {
969
931
  if (!this.currentNode)
970
932
  return;
971
933
  const e = this.currentNode.parentElement.nextSibling;
@@ -973,7 +935,7 @@ const re = function(e, t, n) {
973
935
  const t = e.firstChild.firstChild.firstChild;
974
936
  this.selectNode(t);
975
937
  }
976
- }, fe = function() {
938
+ }, ue = function() {
977
939
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
978
940
  return;
979
941
  const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
@@ -981,16 +943,16 @@ const re = function(e, t, n) {
981
943
  const t = e.firstChild;
982
944
  this.selectNode(t);
983
945
  }
984
- }, pe = function() {
985
- const e = Mt(this);
946
+ }, fe = function() {
947
+ const e = St(this);
986
948
  return JSON.stringify(e, (t, n) => {
987
949
  if (!(t === "parent" && typeof n != "string"))
988
950
  return n;
989
951
  });
990
- }, me = function() {
952
+ }, pe = function() {
991
953
  return JSON.parse(this.getDataString());
992
- }, ge = function() {
993
- const e = Mt(this).nodeData;
954
+ }, me = function() {
955
+ const e = St(this).nodeData;
994
956
  let t = "# " + e.topic + `
995
957
 
996
958
  `;
@@ -1002,60 +964,60 @@ const re = function(e, t, n) {
1002
964
  `, s[o].children && n(s[o].children || [], i + 1);
1003
965
  }
1004
966
  return n(e.children || [], 2), t;
1005
- }, ve = function() {
967
+ }, ge = function() {
1006
968
  this.editable = !0;
1007
- }, ye = function() {
969
+ }, ve = function() {
1008
970
  this.editable = !1;
1009
- }, be = function(e) {
971
+ }, ye = function(e) {
1010
972
  this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
1011
- }, xe = function() {
973
+ }, be = function() {
1012
974
  this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
1013
- }, we = function(e) {
975
+ }, xe = function(e) {
1014
976
  e(this);
1015
- }, _e = function(e) {
977
+ }, we = function(e) {
1016
978
  e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
1017
- }, Ee = function() {
979
+ }, _e = function() {
1018
980
  this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
1019
- }, Ce = function() {
981
+ }, Ee = function() {
1020
982
  this.direction = 0, this.refresh();
1021
- }, Le = function() {
983
+ }, Ce = function() {
1022
984
  this.direction = 1, this.refresh();
1023
- }, Se = function() {
985
+ }, Le = function() {
1024
986
  this.direction = 2, this.refresh();
1025
- }, Me = function(e) {
987
+ }, Se = function(e) {
1026
988
  this.locale = e, this.refresh();
1027
989
  }, ke = function(e, t) {
1028
990
  const n = e.nodeObj;
1029
991
  typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
1030
- }, $e = function(e) {
992
+ }, Me = function(e) {
1031
993
  e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), tt(this.nodeData), this.layout(), this.linkDiv();
1032
- }, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
994
+ }, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1033
995
  __proto__: null,
1034
- cancelFocus: Ee,
1035
- disableEdit: ye,
1036
- enableEdit: ve,
996
+ cancelFocus: _e,
997
+ disableEdit: ve,
998
+ enableEdit: ge,
1037
999
  expandNode: ke,
1038
- focusNode: _e,
1039
- getData: me,
1040
- getDataMd: ge,
1041
- getDataString: pe,
1042
- initLeft: Ce,
1043
- initRight: Le,
1044
- initSide: Se,
1045
- install: we,
1046
- refresh: $e,
1047
- scale: be,
1048
- selectFirstChild: ue,
1049
- selectNextSibling: he,
1050
- selectNode: re,
1051
- selectNodes: ce,
1052
- selectParent: fe,
1053
- selectPrevSibling: de,
1054
- setLocale: Me,
1055
- toCenter: xe,
1056
- unselectNode: le,
1057
- unselectNodes: ae
1058
- }, Symbol.toStringTag, { value: "Module" })), Ne = function(e) {
1000
+ focusNode: we,
1001
+ getData: pe,
1002
+ getDataMd: me,
1003
+ getDataString: fe,
1004
+ initLeft: Ee,
1005
+ initRight: Ce,
1006
+ initSide: Le,
1007
+ install: xe,
1008
+ refresh: Me,
1009
+ scale: ye,
1010
+ selectFirstChild: de,
1011
+ selectNextSibling: ae,
1012
+ selectNode: oe,
1013
+ selectNodes: le,
1014
+ selectParent: ue,
1015
+ selectPrevSibling: he,
1016
+ setLocale: Se,
1017
+ toCenter: be,
1018
+ unselectNode: re,
1019
+ unselectNodes: ce
1020
+ }, Symbol.toStringTag, { value: "Module" })), Te = function(e) {
1059
1021
  return {
1060
1022
  dom: e,
1061
1023
  mousedown: !1,
@@ -1089,9 +1051,9 @@ const re = function(e, t, n) {
1089
1051
  }
1090
1052
  };
1091
1053
  }, ut = {
1092
- create: Ne
1054
+ create: Te
1093
1055
  };
1094
- function U(e, t, n) {
1056
+ function K(e, t, n) {
1095
1057
  const { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = t.offsetWidth, r = t.offsetHeight, l = s + o / 2, c = i + r / 2, u = l + n.x, h = c + n.y;
1096
1058
  return {
1097
1059
  w: o,
@@ -1110,7 +1072,7 @@ function O(e) {
1110
1072
  y: n
1111
1073
  };
1112
1074
  }
1113
- const Ae = function(e, t, n, s) {
1075
+ const Ne = function(e, t, n, s) {
1114
1076
  const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
1115
1077
  return b(i, {
1116
1078
  "text-anchor": "middle",
@@ -1118,19 +1080,19 @@ const Ae = function(e, t, n, s) {
1118
1080
  y: n + "",
1119
1081
  fill: s || "#666"
1120
1082
  }), i.dataset.type = "custom-link", i.innerHTML = e, i;
1121
- }, De = function(e, t, n, s) {
1083
+ }, Ae = function(e, t, n, s) {
1122
1084
  if (!e || !t)
1123
1085
  return;
1124
1086
  const i = performance.now();
1125
1087
  this.hideLinkController();
1126
- const o = U(this, e, n.delta1), r = U(this, t, n.delta2), { x: l, y: c } = O(o), { ctrlX: u, ctrlY: h } = o, { ctrlX: d, ctrlY: a } = r, { x: f, y: g } = O(r), m = yt(d, a, f, g), p = Xt(
1088
+ const o = K(this, e, n.delta1), r = K(this, t, n.delta2), { x: l, y: c } = O(o), { ctrlX: u, ctrlY: h } = o, { ctrlX: d, ctrlY: a } = r, { x: f, y: g } = O(r), m = yt(d, a, f, g), p = Wt(
1127
1089
  `M ${l} ${c} C ${u} ${h} ${d} ${a} ${f} ${g}`,
1128
1090
  `M ${m.x1} ${m.y1} L ${f} ${g} L ${m.x2} ${m.y2}`
1129
- ), v = l / 8 + u * 3 / 8 + d * 3 / 8 + f / 8, x = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, w = Ae(n.label, v, x, this.theme.cssVar["--color"]);
1091
+ ), v = l / 8 + u * 3 / 8 + d * 3 / 8 + f / 8, x = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, w = Ne(n.label, v, x, this.theme.cssVar["--color"]);
1130
1092
  p.appendChild(w), p.linkObj = n, p.dataset.linkid = n.id, this.linkSvgGroup.appendChild(p), s || (this.linkData[n.id] = n, this.currentLink = p, this.showLinkController(n, o, r));
1131
1093
  const _ = performance.now();
1132
1094
  console.log(`DrawCustomLink Execution time: ${_ - i} ms`);
1133
- }, He = function(e, t) {
1095
+ }, De = function(e, t) {
1134
1096
  const n = {
1135
1097
  id: et(),
1136
1098
  label: "Custom Link",
@@ -1146,20 +1108,20 @@ const Ae = function(e, t, n, s) {
1146
1108
  }
1147
1109
  };
1148
1110
  this.drawCustomLink(e, t, n);
1149
- }, Pe = function(e) {
1111
+ }, He = function(e) {
1150
1112
  let t;
1151
1113
  if (e ? t = e : t = this.currentLink, !t)
1152
1114
  return;
1153
1115
  this.hideLinkController();
1154
1116
  const n = t.linkObj.id;
1155
1117
  delete this.linkData[n], t.remove(), t = null;
1156
- }, ze = function(e) {
1118
+ }, Pe = function(e) {
1157
1119
  this.currentLink = e;
1158
- const t = e.linkObj, n = C(t.from), s = C(t.to), i = U(this, n, t.delta1), o = U(this, s, t.delta2);
1120
+ const t = e.linkObj, n = C(t.from), s = C(t.to), i = K(this, n, t.delta1), o = K(this, s, t.delta2);
1159
1121
  this.showLinkController(t, i, o);
1160
- }, Be = function() {
1122
+ }, ze = function() {
1161
1123
  this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
1162
- }, Oe = function(e, t, n) {
1124
+ }, Be = function(e, t, n) {
1163
1125
  this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial", this.nodes.appendChild(this.linkController), this.nodes.appendChild(this.P2), this.nodes.appendChild(this.P3);
1164
1126
  let { x: s, y: i } = O(t), { ctrlX: o, ctrlY: r } = t, { ctrlX: l, ctrlY: c } = n, { x: u, y: h } = O(n);
1165
1127
  this.P2.style.cssText = `top:${r}px;left:${o}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`, b(this.line1, {
@@ -1204,7 +1166,7 @@ const Ae = function(e, t, n, s) {
1204
1166
  }), e.delta2.x = l - n.cx, e.delta2.y = c - n.cy;
1205
1167
  });
1206
1168
  };
1207
- function qe() {
1169
+ function Oe() {
1208
1170
  this.linkSvgGroup.innerHTML = "";
1209
1171
  for (const e in this.linkData) {
1210
1172
  const t = this.linkData[e];
@@ -1212,7 +1174,7 @@ function qe() {
1212
1174
  }
1213
1175
  this.nodes.appendChild(this.linkSvgGroup);
1214
1176
  }
1215
- function Ve(e) {
1177
+ function qe(e) {
1216
1178
  if (console.time("editSummary"), !e)
1217
1179
  return;
1218
1180
  const t = e.children[2];
@@ -1222,17 +1184,17 @@ function Ve(e) {
1222
1184
  i === "" ? s.label = origin : s.label = i, n.remove(), i !== origin && (t.innerHTML = s.label, this.linkDiv());
1223
1185
  }), console.timeEnd("editSummary");
1224
1186
  }
1225
- const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1187
+ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1226
1188
  __proto__: null,
1227
- createLink: He,
1228
- drawCustomLink: De,
1229
- editCutsomLinkLabel: Ve,
1230
- hideLinkController: Be,
1231
- removeLink: Pe,
1232
- renderCustomLink: qe,
1233
- selectLink: ze,
1234
- showLinkController: Oe
1235
- }, Symbol.toStringTag, { value: "Module" })), je = function(e) {
1189
+ createLink: De,
1190
+ drawCustomLink: Ae,
1191
+ editCutsomLinkLabel: qe,
1192
+ hideLinkController: ze,
1193
+ removeLink: He,
1194
+ renderCustomLink: Oe,
1195
+ selectLink: Pe,
1196
+ showLinkController: Be
1197
+ }, Symbol.toStringTag, { value: "Module" })), Re = function(e) {
1236
1198
  var c, u;
1237
1199
  if (e.length === 0)
1238
1200
  throw new Error("No selected node.");
@@ -1275,7 +1237,7 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1275
1237
  start: o,
1276
1238
  end: r
1277
1239
  };
1278
- }, We = function(e) {
1240
+ }, je = function(e) {
1279
1241
  const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1280
1242
  return t.setAttribute("id", e), t;
1281
1243
  }, ft = function(e, t) {
@@ -1295,37 +1257,37 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
1257
  y: n + "",
1296
1258
  fill: i || "#666"
1297
1259
  }), o.innerHTML = e, o;
1298
- }, Xe = (e) => C(e).parentElement.parentElement, Ye = function({ parent: e, start: t }) {
1260
+ }, We = (e) => C(e).parentElement.parentElement, Xe = function({ parent: e, start: t }) {
1299
1261
  var o, r;
1300
1262
  const n = C(e), s = n.nodeObj;
1301
1263
  let i;
1302
1264
  return s.root === !0 ? i = (o = C(s.children[t].id).closest("me-main")) == null ? void 0 : o.className : i = (r = n.closest("me-main")) == null ? void 0 : r.className, i;
1303
1265
  }, kt = function(e, t) {
1304
1266
  var X;
1305
- const { id: n, text: s, parent: i, start: o, end: r } = t, l = e.nodes, u = C(i).nodeObj, h = Ye(t);
1267
+ const { id: n, text: s, parent: i, start: o, end: r } = t, l = e.nodes, u = C(i).nodeObj, h = Xe(t);
1306
1268
  let d = 1 / 0, a = 0, f = 0, g = 0;
1307
1269
  for (let R = o; R <= r; R++) {
1308
1270
  const nt = (X = u.children) == null ? void 0 : X[R];
1309
1271
  if (!nt)
1310
1272
  return console.warn("Child not found"), e.removeSummary(n), null;
1311
- const Y = Xe(nt.id), { offsetLeft: F, offsetTop: st } = V(l, Y);
1273
+ const Y = We(nt.id), { offsetLeft: F, offsetTop: st } = V(l, Y);
1312
1274
  R === o && (f = st), R === r && (g = st + Y.offsetHeight), F < d && (d = F), Y.offsetWidth + F > a && (a = Y.offsetWidth + F);
1313
1275
  }
1314
1276
  let m, p;
1315
1277
  const v = f + 10, x = g + 10, w = (v + x) / 2, _ = e.theme.cssVar["--color"];
1316
1278
  h === "lhs" ? (m = ft(`M ${d + 10} ${v} c -5 0 -10 5 -10 10 L ${d} ${x - 10} c 0 5 5 10 10 10 M ${d} ${w} h -10`, _), p = pt(s, d - 20, w + 6, "end", _)) : (m = ft(`M ${a - 10} ${v} c 5 0 10 5 10 10 L ${a} ${x - 10} c 0 5 -5 10 -10 10 M ${a} ${w} h 10`, _), p = pt(s, a + 20, w + 6, "start", _));
1317
- const M = We("s-" + n);
1318
- return M.appendChild(m), M.appendChild(p), M.summaryObj = t, e.summarySvg.appendChild(M), M;
1319
- }, Fe = function() {
1279
+ const k = je("s-" + n);
1280
+ return k.appendChild(m), k.appendChild(p), k.summaryObj = t, e.summarySvg.appendChild(k), k;
1281
+ }, Ye = function() {
1320
1282
  let e = [];
1321
1283
  this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
1322
- const { parent: t, start: n, end: s } = je(e), i = { id: et(), parent: t, start: n, end: s, text: "summary" }, o = kt(this, i);
1284
+ const { parent: t, start: n, end: s } = Re(e), i = { id: et(), parent: t, start: n, end: s, text: "summary" }, o = kt(this, i);
1323
1285
  this.summaries.push(i), this.editSummary(o);
1324
- }, Ie = function(e) {
1286
+ }, Fe = function(e) {
1325
1287
  var n;
1326
1288
  const t = this.summaries.findIndex((s) => s.id === e);
1327
1289
  t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
1328
- }, Ge = function(e) {
1290
+ }, Ie = function(e) {
1329
1291
  const t = e.children[1].getBBox(), n = 6, s = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1330
1292
  b(i, {
1331
1293
  x: t.x - n + "",
@@ -1337,14 +1299,14 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1337
1299
  "stroke-width": "2",
1338
1300
  fill: "none"
1339
1301
  }), i.classList.add("selected"), e.appendChild(i), this.currentSummary = e;
1340
- }, Ke = function() {
1302
+ }, Ge = function() {
1341
1303
  var e, t;
1342
1304
  (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
1343
1305
  }, Ue = function() {
1344
1306
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
1345
1307
  kt(this, e);
1346
1308
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
1347
- }, Je = function(e) {
1309
+ }, Ke = function(e) {
1348
1310
  if (console.time("editSummary"), !e)
1349
1311
  return;
1350
1312
  const t = e.childNodes[1];
@@ -1357,16 +1319,16 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1357
1319
  origin
1358
1320
  }));
1359
1321
  }), console.timeEnd("editSummary");
1360
- }, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1322
+ }, Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1361
1323
  __proto__: null,
1362
- createSummary: Fe,
1363
- editSummary: Je,
1364
- removeSummary: Ie,
1324
+ createSummary: Ye,
1325
+ editSummary: Ke,
1326
+ removeSummary: Fe,
1365
1327
  renderSummary: Ue,
1366
- selectSummary: Ge,
1367
- unselectSummary: Ke
1328
+ selectSummary: Ie,
1329
+ unselectSummary: Ge
1368
1330
  }, Symbol.toStringTag, { value: "Module" }));
1369
- function Ze(e, t) {
1331
+ function Qe(e, t) {
1370
1332
  const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1371
1333
  return b(n, {
1372
1334
  version: "1.1",
@@ -1375,17 +1337,17 @@ function Ze(e, t) {
1375
1337
  width: t
1376
1338
  }), n;
1377
1339
  }
1378
- function tn(e, t) {
1340
+ function Ze(e, t) {
1379
1341
  return (parseInt(e) - parseInt(t)) / 2;
1380
1342
  }
1381
- function en(e, t, n, s) {
1343
+ function tn(e, t, n, s) {
1382
1344
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
1383
1345
  return e.childNodes[0].textContent.split(`
1384
1346
  `).forEach((l, c) => {
1385
1347
  const u = document.createElementNS("http://www.w3.org/2000/svg", "text");
1386
1348
  b(u, {
1387
1349
  x: n + parseInt(t.paddingLeft) + "",
1388
- y: s + parseInt(t.paddingTop) + tn(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
1350
+ y: s + parseInt(t.paddingTop) + Ze(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
1389
1351
  "text-anchor": "start",
1390
1352
  "font-family": t.fontFamily,
1391
1353
  "font-size": `${t.fontSize}`,
@@ -1394,7 +1356,7 @@ function en(e, t, n, s) {
1394
1356
  }), u.innerHTML = l, i.appendChild(u);
1395
1357
  }), i;
1396
1358
  }
1397
- function nn(e, t, n, s) {
1359
+ function en(e, t, n, s) {
1398
1360
  const i = e.childNodes[0].textContent, o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
1399
1361
  b(o, {
1400
1362
  x: n + parseInt(t.paddingLeft) + "",
@@ -1424,9 +1386,9 @@ function Q(e, t, n = !1) {
1424
1386
  const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
1425
1387
  l.appendChild(r);
1426
1388
  let c;
1427
- return n ? c = nn(t, s, i, o) : c = en(t, s, i, o), l.appendChild(c), l;
1389
+ return n ? c = en(t, s, i, o) : c = tn(t, s, i, o), l.appendChild(c), l;
1428
1390
  }
1429
- function sn(e, t) {
1391
+ function nn(e, t) {
1430
1392
  const n = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1431
1393
  return b(r, {
1432
1394
  x: s + "",
@@ -1438,9 +1400,9 @@ function sn(e, t) {
1438
1400
  fill: `${n.color}`
1439
1401
  }), r.innerHTML = t.textContent, o.appendChild(r), o.setAttribute("href", t.href), o;
1440
1402
  }
1441
- const G = 100, on = '<?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">', $t = (e) => {
1403
+ const G = 100, sn = '<?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">', Mt = (e) => {
1442
1404
  var h, d, a;
1443
- const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i = Ze(n + "px", s + "px"), o = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1405
+ const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i = Qe(n + "px", s + "px"), o = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1444
1406
  b(r, {
1445
1407
  x: "0",
1446
1408
  y: "0",
@@ -1463,14 +1425,14 @@ const G = 100, on = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
1463
1425
  }), t.querySelectorAll(".icons > span").forEach((f) => {
1464
1426
  o.appendChild(Q(e, f));
1465
1427
  }), t.querySelectorAll(".hyper-link").forEach((f) => {
1466
- o.appendChild(sn(e, f));
1428
+ o.appendChild(nn(e, f));
1467
1429
  }), b(o, {
1468
1430
  x: G + "",
1469
1431
  y: G + "",
1470
1432
  overflow: "visible"
1471
- }), i.appendChild(o), on + i.outerHTML;
1433
+ }), i.appendChild(o), sn + i.outerHTML;
1472
1434
  };
1473
- function rn(e) {
1435
+ function on(e) {
1474
1436
  return new Promise((t, n) => {
1475
1437
  const s = new FileReader();
1476
1438
  s.onload = (i) => {
@@ -1480,11 +1442,11 @@ function rn(e) {
1480
1442
  }, s.readAsDataURL(e);
1481
1443
  });
1482
1444
  }
1483
- const ln = function() {
1484
- const e = $t(this);
1445
+ const rn = function() {
1446
+ const e = Mt(this);
1485
1447
  return new Blob([e], { type: "image/svg+xml" });
1486
- }, cn = async function() {
1487
- const e = $t(this), t = new Blob([e], { type: "image/svg+xml" }), n = await rn(t);
1448
+ }, ln = async function() {
1449
+ const e = Mt(this), t = new Blob([e], { type: "image/svg+xml" }), n = await on(t);
1488
1450
  return new Promise((s, i) => {
1489
1451
  const o = new Image();
1490
1452
  o.setAttribute("crossOrigin", "anonymous"), o.onload = () => {
@@ -1492,34 +1454,34 @@ const ln = function() {
1492
1454
  r.width = o.width, r.height = o.height, r.getContext("2d").drawImage(o, 0, 0), r.toBlob(s, "image/png", 1);
1493
1455
  }, o.src = n, o.onerror = i;
1494
1456
  });
1495
- }, an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1457
+ }, cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1496
1458
  __proto__: null,
1497
- exportPng: cn,
1498
- exportSvg: ln
1499
- }, Symbol.toStringTag, { value: "Module" })), hn = {}, dn = {
1459
+ exportPng: ln,
1460
+ exportSvg: rn
1461
+ }, Symbol.toStringTag, { value: "Module" })), an = {}, hn = {
1500
1462
  getObjById: vt,
1501
- generateNewObj: Tt,
1502
- layout: Dt,
1503
- linkDiv: Yt,
1504
- editTopic: Vt,
1505
- createWrapper: zt,
1506
- createParent: Bt,
1507
- createChildren: Ot,
1508
- createTopic: qt,
1463
+ generateNewObj: $t,
1464
+ layout: At,
1465
+ linkDiv: Xt,
1466
+ editTopic: qt,
1467
+ createWrapper: Pt,
1468
+ createParent: zt,
1469
+ createChildren: Bt,
1470
+ createTopic: Ot,
1509
1471
  findEle: C,
1510
- changeTheme: oe,
1511
- ...Te,
1512
- ...hn,
1513
- ...Re,
1514
- ...Qe,
1472
+ changeTheme: ie,
1473
+ ...$e,
1515
1474
  ...an,
1475
+ ...Ve,
1476
+ ...Je,
1477
+ ...cn,
1516
1478
  init(e) {
1517
1479
  if (!e || !e.nodeData)
1518
1480
  return new Error("MindElixir: `data` is required");
1519
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, tt(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Jt(this), ie(this), this.toCenter(), this.layout(), this.linkDiv();
1481
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, tt(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Kt(this), this.toCenter(), this.layout(), this.linkDiv();
1520
1482
  }
1521
1483
  }, j = document;
1522
- function k({
1484
+ function M({
1523
1485
  el: e,
1524
1486
  direction: t,
1525
1487
  locale: n,
@@ -1538,25 +1500,25 @@ function k({
1538
1500
  mobileMenu: m,
1539
1501
  theme: p
1540
1502
  }) {
1541
- console.log("ME_version " + k.version, this);
1503
+ console.log("ME_version " + M.version, this);
1542
1504
  let v = null;
1543
1505
  const x = Object.prototype.toString.call(e);
1544
1506
  if (x === "[object HTMLDivElement]" ? v = e : x === "[object String]" && (v = document.querySelector(e)), !v)
1545
1507
  throw new Error("MindElixir: el is not a valid element");
1546
- v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = s === void 0 ? !0 : s, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus = At.create(), this.container = j.createElement("div"), this.container.className = "map-container";
1508
+ v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = s === void 0 ? !0 : s, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus = Nt.create(), this.container = j.createElement("div"), this.container.className = "map-container";
1547
1509
  const w = window.matchMedia("(prefers-color-scheme: dark)");
1548
1510
  this.theme = p || (w.matches ? gt : mt);
1549
1511
  const _ = j.createElement("div");
1550
- _.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Nt(this);
1512
+ _.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Tt(this);
1551
1513
  }
1552
- k.prototype = dn;
1553
- k.LEFT = q;
1554
- k.RIGHT = Z;
1555
- k.SIDE = J;
1556
- k.THEME = mt;
1557
- k.DARK_THEME = gt;
1558
- k.version = "3.2.0";
1559
- k.E = C;
1514
+ M.prototype = hn;
1515
+ M.LEFT = q;
1516
+ M.RIGHT = Z;
1517
+ M.SIDE = J;
1518
+ M.THEME = mt;
1519
+ M.DARK_THEME = gt;
1520
+ M.version = "3.2.1";
1521
+ M.E = C;
1560
1522
  export {
1561
- k as default
1523
+ M as default
1562
1524
  };