flow-mindmap 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  var Cl = Object.defineProperty;
2
2
  var Nl = (e, n, t) => n in e ? Cl(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var Be = (e, n, t) => Nl(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { defineComponent as Jt, openBlock as k, createElementBlock as x, Fragment as te, createElementVNode as u, createStaticVNode as Ft, createCommentVNode as K, ref as G, reactive as yi, onMounted as ki, onBeforeUnmount as Un, computed as se, withModifiers as pe, normalizeStyle as Ge, createVNode as ie, toDisplayString as ae, normalizeClass as Ae, renderList as Xe, unref as ue, Transition as Uo, withCtx as Wt, renderSlot as ao, createBlock as Xo, nextTick as Ve, withDirectives as zt, vModelText as Xt, resolveComponent as Rl, vShow as tr, createTextVNode as Kn, watch as _t, withKeys as Fi } from "vue";
5
- const Ml = ["width", "height", "stroke-width"], Il = {
4
+ import { defineComponent as Jt, openBlock as k, createElementBlock as x, Fragment as te, createElementVNode as u, createStaticVNode as Ft, createCommentVNode as K, ref as G, reactive as yi, onMounted as ki, onBeforeUnmount as Un, computed as se, withModifiers as pe, normalizeStyle as Ge, createVNode as ie, toDisplayString as ae, normalizeClass as Ae, renderList as Xe, unref as ue, Transition as Uo, withCtx as Wt, renderSlot as ao, createBlock as Xo, nextTick as Ve, withDirectives as zt, vModelText as Xt, resolveComponent as Ml, vShow as tr, createTextVNode as Kn, watch as _t, withKeys as Fi } from "vue";
5
+ const Rl = ["width", "height", "stroke-width"], Il = {
6
6
  key: 4,
7
7
  points: "6 9 12 15 18 9"
8
8
  }, Ol = {
9
9
  key: 5,
10
10
  points: "9 6 15 12 9 18"
11
- }, Me = /* @__PURE__ */ Jt({
11
+ }, Re = /* @__PURE__ */ Jt({
12
12
  __name: "Icon",
13
13
  props: {
14
14
  name: {},
@@ -301,7 +301,7 @@ const Ml = ["width", "height", "stroke-width"], Il = {
301
301
  t[73] || (t[73] = u("polyline", { points: "8 14 6 16 8 18" }, null, -1)),
302
302
  t[74] || (t[74] = u("polyline", { points: "14 14 16 16 14 18" }, null, -1))
303
303
  ], 64)) : K("", !0)
304
- ], 8, Ml));
304
+ ], 8, Rl));
305
305
  }
306
306
  }), Xr = "data:image/svg+xml,%3csvg%20t='1780822312364'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7459'%20width='200'%20height='200'%3e%3cpath%20d='M329.16%20292.571h658.286V512H329.16zM329.16%200h658.286v219.429H329.16z'%20fill='%239AA1A2'%20p-id='7460'%3e%3c/path%3e%3cpath%20d='M44.927%20146.286a46.519%2046.519%200%200%201%2038.107-73.143h319.269v73.143H109.73V791.99l-48.713%205.705-24.43-651.41h8.339z'%20fill='%239AA1A2'%20p-id='7461'%3e%3c/path%3e%3cpath%20d='M363.83%20877.714H179.51c-78.775%200-142.921-66.12-142.921-147.31V112.787c0-21.943%2017.188-39.643%2038.473-39.643%2021.211%200%2033.5%2017.774%2033.5%2039.643v617.619c0%2037.522%2028.013%2076.58%2064.438%2076.58h190.903c21.211%200%2038.766%2013.97%2038.766%2035.84%200%2021.943-17.555%2034.89-38.766%2034.89z'%20fill='%239AA1A2'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M432.95%20438.857H179.51c-78.775%200-81.043-18.578-81.043-62.903l10.094-90.624c0%2020.48%2013.458%2080.677%2049.884%2080.677h210.139c21.211%200%20120.613%204.023%20120.613%2016.018%200%2011.922-35.036%2056.832-56.32%2056.832zM640.017%20749.714V640a54.857%2054.857%200%200%201%20109.714%200v109.714h109.715a54.857%2054.857%200%200%201%200%20109.715H749.73v109.714a54.857%2054.857%200%200%201-109.714%200V859.429H530.303a54.857%2054.857%200%200%201%200-109.715h109.714z'%20fill='%239AA1A2'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e", Zr = "data:image/svg+xml,%3csvg%20t='1780822464335'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8457'%20width='200'%20height='200'%3e%3cpath%20d='M512%20804.571h512V1024H512V804.571zM0%200h658.286v219.429H0V0z'%20fill='%239AA1A2'%20p-id='8458'%3e%3c/path%3e%3cpath%20d='M619.813%20950.857h-184.32c-78.775%200-142.922-66.121-142.922-147.31V185.93c0-21.943%2017.189-39.643%2038.474-39.643%2021.211%200%2033.353%2017.773%2033.353%2039.643v617.618c0%2037.523%2034.743%2073.728%2071.095%2073.728h184.32c21.211%200%2038.473%2012.069%2038.473%2033.939%200%2021.943-17.189%2039.643-38.473%2039.643z'%20fill='%239AA1A2'%20p-id='8459'%3e%3c/path%3e%3cpath%20d='M676.571%20457.143V347.429a54.857%2054.857%200%200%201%20109.715%200v109.714H896a54.857%2054.857%200%200%201%200%20109.714H786.286v109.714a54.857%2054.857%200%200%201-109.715%200V566.857H566.857a54.857%2054.857%200%200%201%200-109.714h109.714z'%20fill='%239AA1A2'%20p-id='8460'%3e%3c/path%3e%3c/svg%3e", Jr = [22, 15, 13, 12], nr = [700, 600, 500, 400], zl = [46, 36, 30, 26], Ll = [120, 80, 60, 44], $l = [0.8, 0.8, 0.8, 0.8], Dl = 1, Pl = Jr.length - 1;
307
307
  function Bl(e, n) {
@@ -357,16 +357,16 @@ function ql(e, n, t, i, s) {
357
357
  S += Math.max(1, Math.ceil(L / ar));
358
358
  }
359
359
  S = Math.max(1, S);
360
- const H = !!(e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) ? Math.ceil(a * 1.2) + 6 : Ul(n, t) + Math.ceil(a * 1.2 * (S - 1));
361
- let R = 0;
362
- if (e.link && (R += sr), e.note && (R += sr), R > 0) {
360
+ const H = !!(e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) ? Math.ceil(a * 1.2) + 6 + Math.ceil(a * 1.2 * (S - 1)) : Ul(n, t) + Math.ceil(a * 1.2 * (S - 1));
361
+ let M = 0;
362
+ if (e.link && (M += sr), e.note && (M += sr), M > 0) {
363
363
  const oe = (e.link ? 1 : 0) + (e.note ? 1 : 0);
364
- R += rr * oe;
364
+ M += rr * oe;
365
365
  }
366
366
  const F = 14, $ = 2;
367
367
  let C = 0;
368
368
  e.markers && e.markers.length > 0 && (C = e.markers.length * F + (e.markers.length - 1) * $ + rr);
369
- const E = 18, b = 4, f = e.tags && e.tags.length > 0 ? E : 0, O = h + R + C, w = (() => {
369
+ const E = 18, b = 4, f = e.tags && e.tags.length > 0 ? E : 0, O = h + M + C, w = (() => {
370
370
  const oe = Math.round(Ll[l] * t / 14);
371
371
  if (e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) {
372
372
  const L = s == null ? void 0 : s[e.id];
@@ -486,8 +486,8 @@ function ta(e, n, t, i, s, l, a, d) {
486
486
  if (e.collapsed) return h;
487
487
  const m = e.children.length, S = Math.ceil(m / 2);
488
488
  return h.children = e.children.map((A, H) => {
489
- const R = n === 0 ? H < S ? 1 : -1 : i;
490
- return ta(A, n + 1, h, R, s, l, a, d);
489
+ const M = n === 0 ? H < S ? 1 : -1 : i;
490
+ return ta(A, n + 1, h, M, s, l, a, d);
491
491
  }), h;
492
492
  }
493
493
  function Zl(e) {
@@ -825,7 +825,7 @@ const mo = "新节点";
825
825
  function Wi(e, n = "导入的导图") {
826
826
  const t = e.split(/\r?\n/), i = { id: Cn(), text: n, children: [] }, s = [i], l = [-1 / 0], a = [], d = /^(#{1,6})\s+(.+?)\s*#*\s*$/, c = /^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/, h = /^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/, m = /^(`{3,}|~{3,})\s*(\S+)?\s*$/;
827
827
  let S = !1, A = [], H = null;
828
- function R(C) {
828
+ function M(C) {
829
829
  A.push(C);
830
830
  }
831
831
  function F() {
@@ -845,7 +845,7 @@ function Wi(e, n = "导入的导图") {
845
845
  F();
846
846
  continue;
847
847
  }
848
- R(C);
848
+ M(C);
849
849
  continue;
850
850
  }
851
851
  const E = C.match(d);
@@ -952,8 +952,8 @@ function uc(e) {
952
952
  continue;
953
953
  }
954
954
  }
955
- const R = S.match(d), F = S.match(c);
956
- if (R || F) {
955
+ const M = S.match(d), F = S.match(c);
956
+ if (M || F) {
957
957
  let b = i;
958
958
  for (; b < n.length; ) {
959
959
  const f = n[b].match(d), O = n[b].match(c);
@@ -1032,9 +1032,9 @@ function dc(e) {
1032
1032
  width: 0,
1033
1033
  height: 0
1034
1034
  }), H = G(0);
1035
- let R = null;
1035
+ let M = null;
1036
1036
  function F(ee) {
1037
- R = ee;
1037
+ M = ee;
1038
1038
  }
1039
1039
  function $(ee) {
1040
1040
  ee.preventDefault();
@@ -1070,7 +1070,7 @@ function dc(e) {
1070
1070
  A.x = oe, A.y = L, A.width = N - oe, A.height = j - L, H.value++;
1071
1071
  }
1072
1072
  function Z() {
1073
- m.value = !1, window.removeEventListener("mousemove", le), window.removeEventListener("mouseup", Z), R && R();
1073
+ m.value = !1, window.removeEventListener("mousemove", le), window.removeEventListener("mouseup", Z), M && M();
1074
1074
  }
1075
1075
  function le(ee) {
1076
1076
  if (!m.value) return;
@@ -1394,7 +1394,7 @@ const Sc = {
1394
1394
  function H(E) {
1395
1395
  i("toggleMarker", E);
1396
1396
  }
1397
- function R(E) {
1397
+ function M(E) {
1398
1398
  const b = E.target;
1399
1399
  b && b.closest(".zm-node-menu") || i("close");
1400
1400
  }
@@ -1404,8 +1404,8 @@ const Sc = {
1404
1404
  function $() {
1405
1405
  i("close");
1406
1406
  }
1407
- window.addEventListener("mousedown", R, !0), window.addEventListener("keydown", F, !0), window.addEventListener("wheel", $, !0), window.addEventListener("scroll", $, !0), Un(() => {
1408
- window.removeEventListener("mousedown", R, !0), window.removeEventListener("keydown", F, !0), window.removeEventListener("wheel", $, !0), window.removeEventListener("scroll", $, !0);
1407
+ window.addEventListener("mousedown", M, !0), window.addEventListener("keydown", F, !0), window.addEventListener("wheel", $, !0), window.addEventListener("scroll", $, !0), Un(() => {
1408
+ window.removeEventListener("mousedown", M, !0), window.removeEventListener("keydown", F, !0), window.removeEventListener("wheel", $, !0), window.removeEventListener("scroll", $, !0);
1409
1409
  });
1410
1410
  function C(E) {
1411
1411
  E(), i("close");
@@ -1420,7 +1420,7 @@ const Sc = {
1420
1420
  class: "zm-node-menu-item",
1421
1421
  onClick: b[0] || (b[0] = pe((f) => C(() => i("pickImage")), ["stop"]))
1422
1422
  }, [
1423
- ie(Me, {
1423
+ ie(Re, {
1424
1424
  name: "image",
1425
1425
  size: 13
1426
1426
  }),
@@ -1431,7 +1431,7 @@ const Sc = {
1431
1431
  class: "zm-node-menu-item",
1432
1432
  onClick: b[1] || (b[1] = pe((f) => C(() => i("removeImage")), ["stop"]))
1433
1433
  }, [
1434
- ie(Me, {
1434
+ ie(Re, {
1435
1435
  name: "x",
1436
1436
  size: 13
1437
1437
  }),
@@ -1441,7 +1441,7 @@ const Sc = {
1441
1441
  class: "zm-node-menu-item",
1442
1442
  onClick: b[2] || (b[2] = pe((f) => C(() => i("setLink")), ["stop"]))
1443
1443
  }, [
1444
- ie(Me, {
1444
+ ie(Re, {
1445
1445
  name: "link",
1446
1446
  size: 13
1447
1447
  }),
@@ -1452,7 +1452,7 @@ const Sc = {
1452
1452
  class: "zm-node-menu-item",
1453
1453
  onClick: b[3] || (b[3] = pe((f) => C(() => i("removeLink")), ["stop"]))
1454
1454
  }, [
1455
- ie(Me, {
1455
+ ie(Re, {
1456
1456
  name: "x",
1457
1457
  size: 13
1458
1458
  }),
@@ -1473,7 +1473,7 @@ const Sc = {
1473
1473
  class: "zm-node-menu-item",
1474
1474
  onClick: b[5] || (b[5] = pe((f) => C(() => i("removeCode")), ["stop"]))
1475
1475
  }, [
1476
- ie(Me, {
1476
+ ie(Re, {
1477
1477
  name: "x",
1478
1478
  size: 13
1479
1479
  }),
@@ -1494,7 +1494,7 @@ const Sc = {
1494
1494
  class: "zm-node-menu-item",
1495
1495
  onClick: b[7] || (b[7] = pe((f) => C(() => i("removeTable")), ["stop"]))
1496
1496
  }, [
1497
- ie(Me, {
1497
+ ie(Re, {
1498
1498
  name: "x",
1499
1499
  size: 13
1500
1500
  }),
@@ -1504,7 +1504,7 @@ const Sc = {
1504
1504
  class: "zm-node-menu-item",
1505
1505
  onClick: b[8] || (b[8] = pe((f) => C(() => i("editNote")), ["stop"]))
1506
1506
  }, [
1507
- ie(Me, {
1507
+ ie(Re, {
1508
1508
  name: "note",
1509
1509
  size: 13
1510
1510
  }),
@@ -1515,7 +1515,7 @@ const Sc = {
1515
1515
  class: "zm-node-menu-item",
1516
1516
  onClick: b[9] || (b[9] = pe((f) => C(() => i("removeNote")), ["stop"]))
1517
1517
  }, [
1518
- ie(Me, {
1518
+ ie(Re, {
1519
1519
  name: "x",
1520
1520
  size: 13
1521
1521
  }),
@@ -1572,7 +1572,7 @@ const Sc = {
1572
1572
  class: "zm-node-menu-item",
1573
1573
  onClick: b[12] || (b[12] = pe((f) => C(() => i("removeTags")), ["stop"]))
1574
1574
  }, [
1575
- ie(Me, {
1575
+ ie(Re, {
1576
1576
  name: "x",
1577
1577
  size: 13
1578
1578
  }),
@@ -1623,14 +1623,14 @@ const Sc = {
1623
1623
  const E = C.target;
1624
1624
  E && E.closest(".zm-canvas-menu") || i("close");
1625
1625
  }
1626
- function R(C) {
1626
+ function M(C) {
1627
1627
  C.key === "Escape" && i("close");
1628
1628
  }
1629
1629
  function F() {
1630
1630
  i("close");
1631
1631
  }
1632
- window.addEventListener("mousedown", H, !0), window.addEventListener("keydown", R, !0), window.addEventListener("wheel", F, !0), window.addEventListener("scroll", F, !0), Un(() => {
1633
- window.removeEventListener("mousedown", H, !0), window.removeEventListener("keydown", R, !0), window.removeEventListener("wheel", F, !0), window.removeEventListener("scroll", F, !0);
1632
+ window.addEventListener("mousedown", H, !0), window.addEventListener("keydown", M, !0), window.addEventListener("wheel", F, !0), window.addEventListener("scroll", F, !0), Un(() => {
1633
+ window.removeEventListener("mousedown", H, !0), window.removeEventListener("keydown", M, !0), window.removeEventListener("wheel", F, !0), window.removeEventListener("scroll", F, !0);
1634
1634
  });
1635
1635
  function $(C) {
1636
1636
  C(), i("close");
@@ -1645,7 +1645,7 @@ const Sc = {
1645
1645
  class: "zm-canvas-menu-item",
1646
1646
  onClick: E[0] || (E[0] = pe((b) => $(() => i("openData")), ["stop"]))
1647
1647
  }, [
1648
- ie(Me, {
1648
+ ie(Re, {
1649
1649
  name: "database",
1650
1650
  size: 13,
1651
1651
  stroke: 1.6
@@ -1659,7 +1659,7 @@ const Sc = {
1659
1659
  onMouseenter: E[5] || (E[5] = (b) => S("import")),
1660
1660
  onMouseleave: A
1661
1661
  }, [
1662
- ie(Me, {
1662
+ ie(Re, {
1663
1663
  name: "import",
1664
1664
  size: 13,
1665
1665
  stroke: 1.6
@@ -1690,7 +1690,7 @@ const Sc = {
1690
1690
  class: "zm-canvas-menu-item",
1691
1691
  onClick: E[1] || (E[1] = pe((b) => $(() => i("openImport", "markdown")), ["stop"]))
1692
1692
  }, [
1693
- ie(Me, {
1693
+ ie(Re, {
1694
1694
  name: "markdown",
1695
1695
  size: 13,
1696
1696
  stroke: 1.6
@@ -1701,7 +1701,7 @@ const Sc = {
1701
1701
  class: "zm-canvas-menu-item",
1702
1702
  onClick: E[2] || (E[2] = pe((b) => $(() => i("openImport", "json")), ["stop"]))
1703
1703
  }, [
1704
- ie(Me, {
1704
+ ie(Re, {
1705
1705
  name: "json",
1706
1706
  size: 13,
1707
1707
  stroke: 1.6
@@ -1712,7 +1712,7 @@ const Sc = {
1712
1712
  class: "zm-canvas-menu-item",
1713
1713
  onClick: E[3] || (E[3] = pe((b) => $(() => i("openImport", "txt")), ["stop"]))
1714
1714
  }, [
1715
- ie(Me, {
1715
+ ie(Re, {
1716
1716
  name: "txt",
1717
1717
  size: 13,
1718
1718
  stroke: 1.6
@@ -1725,7 +1725,7 @@ const Sc = {
1725
1725
  class: "zm-canvas-menu-item",
1726
1726
  onClick: E[6] || (E[6] = pe((b) => $(() => i("openSettings")), ["stop"]))
1727
1727
  }, [
1728
- ie(Me, {
1728
+ ie(Re, {
1729
1729
  name: "settings",
1730
1730
  size: 13,
1731
1731
  stroke: 1.6
@@ -1740,7 +1740,7 @@ const Sc = {
1740
1740
  onMouseenter: E[10] || (E[10] = (b) => S("export")),
1741
1741
  onMouseleave: A
1742
1742
  }, [
1743
- ie(Me, {
1743
+ ie(Re, {
1744
1744
  name: "export",
1745
1745
  size: 13,
1746
1746
  stroke: 1.6
@@ -1771,7 +1771,7 @@ const Sc = {
1771
1771
  class: "zm-canvas-menu-item",
1772
1772
  onClick: E[7] || (E[7] = pe((b) => $(() => i("exportPng")), ["stop"]))
1773
1773
  }, [
1774
- ie(Me, {
1774
+ ie(Re, {
1775
1775
  name: "image",
1776
1776
  size: 13,
1777
1777
  stroke: 1.6
@@ -1782,7 +1782,7 @@ const Sc = {
1782
1782
  class: "zm-canvas-menu-item",
1783
1783
  onClick: E[8] || (E[8] = pe((b) => $(() => i("exportSvg")), ["stop"]))
1784
1784
  }, [
1785
- ie(Me, {
1785
+ ie(Re, {
1786
1786
  name: "svg-export",
1787
1787
  size: 13,
1788
1788
  stroke: 1.6
@@ -1793,7 +1793,7 @@ const Sc = {
1793
1793
  ], 34)
1794
1794
  ], 36));
1795
1795
  }
1796
- }), Rc = ["aria-hidden"], Mc = ["aria-hidden"], Ic = {
1796
+ }), Mc = ["aria-hidden"], Rc = ["aria-hidden"], Ic = {
1797
1797
  key: 0,
1798
1798
  class: "zm-drawer-header"
1799
1799
  }, Oc = {
@@ -1833,7 +1833,7 @@ const Sc = {
1833
1833
  class: "zm-drawer-canvas-backdrop",
1834
1834
  "aria-hidden": !e.open,
1835
1835
  onClick: a[0] || (a[0] = (d) => e.closeOnBackdrop && s())
1836
- }, null, 8, Rc)) : K("", !0)
1836
+ }, null, 8, Mc)) : K("", !0)
1837
1837
  ]),
1838
1838
  _: 1
1839
1839
  }),
@@ -1872,7 +1872,7 @@ const Sc = {
1872
1872
  u("div", zc, [
1873
1873
  ao(l.$slots, "default")
1874
1874
  ])
1875
- ], 14, Mc)) : K("", !0)
1875
+ ], 14, Rc)) : K("", !0)
1876
1876
  ]),
1877
1877
  _: 3
1878
1878
  }, 8, ["name"])
@@ -2039,12 +2039,12 @@ const Sc = {
2039
2039
  const g = h.value;
2040
2040
  g.length !== 0 && (a.value = (a.value + 1) % g.length, $(a.value));
2041
2041
  }
2042
- function R() {
2042
+ function M() {
2043
2043
  const g = h.value;
2044
2044
  g.length !== 0 && (a.value = (a.value - 1 + g.length) % g.length, $(a.value));
2045
2045
  }
2046
2046
  function F(g) {
2047
- g.key === "Enter" ? (g.preventDefault(), g.shiftKey ? R() : H()) : g.key === "Escape" && (g.preventDefault(), s.value = "", a.value = -1);
2047
+ g.key === "Enter" ? (g.preventDefault(), g.shiftKey ? M() : H()) : g.key === "Escape" && (g.preventDefault(), s.value = "", a.value = -1);
2048
2048
  }
2049
2049
  function $(g) {
2050
2050
  const P = h.value[g];
@@ -2358,7 +2358,7 @@ const Sc = {
2358
2358
  function H(E) {
2359
2359
  return n.query ? E.toLowerCase().includes(n.query.toLowerCase()) : !0;
2360
2360
  }
2361
- function R(E, b) {
2361
+ function M(E, b) {
2362
2362
  return !n.query || H(E) ? !0 : b === null || typeof b != "object" ? A(b) : !0;
2363
2363
  }
2364
2364
  function F(E) {
@@ -2376,7 +2376,7 @@ const Sc = {
2376
2376
  }
2377
2377
  return (E, b) => {
2378
2378
  var O, w, J, Z, le, ve;
2379
- const f = Rl("JsonTreeViewer", !0);
2379
+ const f = Ml("JsonTreeViewer", !0);
2380
2380
  return e.isRoot ? (k(), x("div", uu, [
2381
2381
  (k(!0), x(te, null, Xe(a.value, (ge) => zt((k(), x("div", {
2382
2382
  key: ge.key,
@@ -2392,7 +2392,7 @@ const Sc = {
2392
2392
  "is-root": !1
2393
2393
  }, null, 8, ["key-name", "value", "path", "depth", "query", "collapsed-paths"])
2394
2394
  ])), [
2395
- [tr, R(ge.key, ge.value)]
2395
+ [tr, M(ge.key, ge.value)]
2396
2396
  ])), 128))
2397
2397
  ])) : i.value || s.value ? (k(), x("div", {
2398
2398
  key: 1,
@@ -2428,7 +2428,7 @@ const Sc = {
2428
2428
  "is-root": !1
2429
2429
  }, null, 8, ["key-name", "value", "path", "depth", "query", "collapsed-paths"])
2430
2430
  ])), [
2431
- [tr, R(ge.key, ge.value)]
2431
+ [tr, M(ge.key, ge.value)]
2432
2432
  ])), 128))
2433
2433
  ])),
2434
2434
  !c.value && s.value ? (k(), x("div", {
@@ -2500,7 +2500,7 @@ const Sc = {
2500
2500
  "stroke-width": "2",
2501
2501
  "stroke-linecap": "round",
2502
2502
  "stroke-linejoin": "round"
2503
- }, Ru = {
2503
+ }, Mu = {
2504
2504
  key: 1,
2505
2505
  width: "13",
2506
2506
  height: "13",
@@ -2510,7 +2510,7 @@ const Sc = {
2510
2510
  "stroke-width": "2.4",
2511
2511
  "stroke-linecap": "round",
2512
2512
  "stroke-linejoin": "round"
2513
- }, Mu = {
2513
+ }, Ru = {
2514
2514
  key: 0,
2515
2515
  class: "zm-data-paste"
2516
2516
  }, Iu = { class: "zm-data-tabs" }, Ou = ["placeholder"], zu = {
@@ -2549,7 +2549,7 @@ const Sc = {
2549
2549
  const b = new Blob([s.value], { type: "application/json" }), f = URL.createObjectURL(b), O = document.createElement("a");
2550
2550
  O.href = f, O.download = `${t.data.text || "mindmap"}.json`, O.click(), URL.revokeObjectURL(f);
2551
2551
  }
2552
- function R() {
2552
+ function M() {
2553
2553
  a.value = null;
2554
2554
  const b = l.value.trim();
2555
2555
  if (b) {
@@ -2586,7 +2586,7 @@ const Sc = {
2586
2586
  if (!f) return;
2587
2587
  const O = new FileReader();
2588
2588
  O.onload = () => {
2589
- typeof O.result == "string" && (l.value = O.result, R());
2589
+ typeof O.result == "string" && (l.value = O.result, M());
2590
2590
  }, O.readAsText(f);
2591
2591
  }, b.click();
2592
2592
  }
@@ -2612,7 +2612,7 @@ const Sc = {
2612
2612
  rx: "2"
2613
2613
  }, null, -1),
2614
2614
  u("path", { d: "M5 15 H4 a2 2 0 0 1 -2 -2 V4 a2 2 0 0 1 2 -2 h9 a2 2 0 0 1 2 2 v1" }, null, -1)
2615
- ])])) : (k(), x("svg", Ru, [...f[10] || (f[10] = [
2615
+ ])])) : (k(), x("svg", Mu, [...f[10] || (f[10] = [
2616
2616
  u("polyline", { points: "5 12 10 17 19 7" }, null, -1)
2617
2617
  ])])),
2618
2618
  f[11] || (f[11] = u("span", { class: "zm-data-btn-label" }, "复制", -1))
@@ -2680,7 +2680,7 @@ const Sc = {
2680
2680
  }, "×")) : K("", !0)
2681
2681
  ], 2)
2682
2682
  ]),
2683
- d.value ? (k(), x("div", Mu, [
2683
+ d.value ? (k(), x("div", Ru, [
2684
2684
  u("div", Iu, [
2685
2685
  u("button", {
2686
2686
  class: Ae(["zm-data-tab", { "is-active": c.value === "json" }]),
@@ -2703,7 +2703,7 @@ const Sc = {
2703
2703
  u("button", {
2704
2704
  class: "zm-data-btn is-primary",
2705
2705
  disabled: !l.value,
2706
- onClick: R
2706
+ onClick: M
2707
2707
  }, "应用", 8, $u),
2708
2708
  u("button", {
2709
2709
  class: "zm-data-btn",
@@ -2838,7 +2838,7 @@ const Sc = {
2838
2838
  }, E.readAsText(C);
2839
2839
  }, $.click();
2840
2840
  }
2841
- function R() {
2841
+ function M() {
2842
2842
  const $ = new Blob([s.value], { type: "text/markdown;charset=utf-8" }), C = URL.createObjectURL($), E = document.createElement("a");
2843
2843
  E.href = C;
2844
2844
  const b = (t.data.text || "mindmap").trim() || "mindmap";
@@ -2876,7 +2876,7 @@ const Sc = {
2876
2876
  u("button", {
2877
2877
  class: "zm-md-btn",
2878
2878
  title: "把当前导图导出为 .md",
2879
- onClick: R
2879
+ onClick: M
2880
2880
  }, [...C[2] || (C[2] = [
2881
2881
  u("svg", {
2882
2882
  width: "12",
@@ -2980,7 +2980,7 @@ const Sc = {
2980
2980
  }, Ad = {
2981
2981
  key: 1,
2982
2982
  class: "zm-palette-custom-editor"
2983
- }, _d = ["value"], Cd = { class: "zm-palette-custom-actions" }, Nd = { class: "zm-settings-field" }, Rd = { class: "zm-settings-field" }, Md = { class: "zm-settings-preview" }, Id = {
2983
+ }, _d = ["value"], Cd = { class: "zm-palette-custom-actions" }, Nd = { class: "zm-settings-field" }, Md = { class: "zm-settings-field" }, Rd = { class: "zm-settings-preview" }, Id = {
2984
2984
  viewBox: "0 0 200 70",
2985
2985
  width: "100%",
2986
2986
  height: "70",
@@ -3073,7 +3073,7 @@ const Sc = {
3073
3073
  ...J !== t.settings.branchPaletteId ? { branchPaletteId: J } : {}
3074
3074
  }), delete h[O.id];
3075
3075
  }
3076
- const R = ["#f87171", "#fb923c", "#fbbf24", "#a3e635", "#34d399", "#22d3ee", "#818cf8", "#c084fc", "#1e2937", "#f8fafc", "#94a3b8"], F = ["#f8fafc", "#ffffff", "#e2e8f0", "#1e2937", "#0f172a", "#fef3c7", "#dbeafe", "#dcfce7", "#fce7f3", "#f1f5f9"], $ = [0, 1, 2, 3], C = ["#f87171", "#fb923c", "#34d399", "#818cf8"];
3076
+ const M = ["#f87171", "#fb923c", "#fbbf24", "#a3e635", "#34d399", "#22d3ee", "#818cf8", "#c084fc", "#1e2937", "#f8fafc", "#94a3b8"], F = ["#f8fafc", "#ffffff", "#e2e8f0", "#1e2937", "#0f172a", "#fef3c7", "#dbeafe", "#dcfce7", "#fce7f3", "#f1f5f9"], $ = [0, 1, 2, 3], C = ["#f87171", "#fb923c", "#34d399", "#818cf8"];
3077
3077
  function E(O, w, J, Z) {
3078
3078
  if (w <= 1) return J;
3079
3079
  const le = O / (w - 1);
@@ -3272,7 +3272,7 @@ const Sc = {
3272
3272
  u("span", { class: "zm-toggle-knob" }, null, -1)
3273
3273
  ])], 2)
3274
3274
  ]),
3275
- u("div", Rd, [
3275
+ u("div", Md, [
3276
3276
  w[33] || (w[33] = u("span", { class: "zm-settings-label" }, "显示节点序号", -1)),
3277
3277
  u("button", {
3278
3278
  class: Ae(["zm-toggle", { "is-on": e.settings.showOrderBadge }]),
@@ -3281,7 +3281,7 @@ const Sc = {
3281
3281
  u("span", { class: "zm-toggle-knob" }, null, -1)
3282
3282
  ])], 2)
3283
3283
  ]),
3284
- u("div", Md, [
3284
+ u("div", Rd, [
3285
3285
  (k(), x("svg", Id, [
3286
3286
  (k(!0), x(te, null, Xe(f.value, (L, N) => (k(), x("line", {
3287
3287
  key: N,
@@ -3312,7 +3312,7 @@ const Sc = {
3312
3312
  u("span", Pd, ae(((Z = e.nodeStyle) == null ? void 0 : Z.bg) || "默认"), 1)
3313
3313
  ]),
3314
3314
  u("div", Bd, [
3315
- (k(), x(te, null, Xe(R, (L) => {
3315
+ (k(), x(te, null, Xe(M, (L) => {
3316
3316
  var N;
3317
3317
  return u("button", {
3318
3318
  key: "bg-" + L,
@@ -3340,7 +3340,7 @@ const Sc = {
3340
3340
  u("span", Gd, ae(((ve = e.nodeStyle) == null ? void 0 : ve.textColor) || "默认"), 1)
3341
3341
  ]),
3342
3342
  u("div", jd, [
3343
- (k(), x(te, null, Xe(R, (L) => {
3343
+ (k(), x(te, null, Xe(M, (L) => {
3344
3344
  var N;
3345
3345
  return u("button", {
3346
3346
  key: "fg-" + L,
@@ -3812,11 +3812,11 @@ const vf = /\b\B/, la = "[a-zA-Z]\\w*", gs = "[a-zA-Z_]\\w*", ca = "\\b\\d+(\\.\
3812
3812
  contains: [Ki]
3813
3813
  }
3814
3814
  ]
3815
- }, Rf = {
3815
+ }, Mf = {
3816
3816
  scope: "title",
3817
3817
  begin: la,
3818
3818
  relevance: 0
3819
- }, Mf = {
3819
+ }, Rf = {
3820
3820
  scope: "title",
3821
3821
  begin: gs,
3822
3822
  relevance: 0
@@ -3862,9 +3862,9 @@ var lo = /* @__PURE__ */ Object.freeze({
3862
3862
  REGEXP_MODE: Nf,
3863
3863
  RE_STARTERS_RE: bf,
3864
3864
  SHEBANG: yf,
3865
- TITLE_MODE: Rf,
3865
+ TITLE_MODE: Mf,
3866
3866
  UNDERSCORE_IDENT_RE: gs,
3867
- UNDERSCORE_TITLE_MODE: Mf
3867
+ UNDERSCORE_TITLE_MODE: Rf
3868
3868
  });
3869
3869
  function zf(e, n) {
3870
3870
  e.input[e.index - 1] === "." && n.ignoreMatch();
@@ -4154,8 +4154,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), he = N, V = j), W ===
4154
4154
  ye += ze.substring(Y, ne.index);
4155
4155
  const _e = st.case_insensitive ? ne[0].toLowerCase() : ne[0], je = Oe(re, _e);
4156
4156
  if (je) {
4157
- const [ft, Rt] = je;
4158
- if (Le.addText(ye), ye = "", he[_e] = (he[_e] || 0) + 1, he[_e] <= Qf && (jt += Rt), ft.startsWith("_"))
4157
+ const [ft, Mt] = je;
4158
+ if (Le.addText(ye), ye = "", he[_e] = (he[_e] || 0) + 1, he[_e] <= Qf && (jt += Mt), ft.startsWith("_"))
4159
4159
  ye += ne[0];
4160
4160
  else {
4161
4161
  const Hn = st.classNameAliases[ft] || ft;
@@ -4360,7 +4360,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), he = N, V = j), W ===
4360
4360
  }), [Oe, De] = he, He = Oe;
4361
4361
  return He.secondBest = De, He;
4362
4362
  }
4363
- function R(N, j, W) {
4363
+ function M(N, j, W) {
4364
4364
  const V = j && t[j] || W;
4365
4365
  N.classList.add("hljs"), N.classList.add(`language-${V}`);
4366
4366
  }
@@ -4382,7 +4382,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), he = N, V = j), W ===
4382
4382
  );
4383
4383
  j = N;
4384
4384
  const V = j.textContent, he = W ? m(V, { language: W, ignoreIllegals: !0 }) : H(V);
4385
- N.innerHTML = he.value, N.dataset.highlighted = "yes", R(N, W, he.language), N.result = {
4385
+ N.innerHTML = he.value, N.dataset.highlighted = "yes", M(N, W, he.language), N.result = {
4386
4386
  language: he.language,
4387
4387
  // TODO: remove with version 11.0
4388
4388
  re: he.relevance,
@@ -4604,7 +4604,7 @@ function Go(e) {
4604
4604
  ], H = e.SHEBANG({
4605
4605
  binary: `(${A.join("|")})`,
4606
4606
  relevance: 10
4607
- }), R = {
4607
+ }), M = {
4608
4608
  className: "function",
4609
4609
  begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
4610
4610
  returnBegin: !0,
@@ -4872,7 +4872,7 @@ function Go(e) {
4872
4872
  // to catch known shells and boost relevancy
4873
4873
  e.SHEBANG(),
4874
4874
  // to catch unknown shells but still highlight the shebang
4875
- R,
4875
+ M,
4876
4876
  S,
4877
4877
  l,
4878
4878
  a,
@@ -6417,7 +6417,7 @@ function wr(e) {
6417
6417
  ],
6418
6418
  subLanguage: "xml"
6419
6419
  }
6420
- }, R = {
6420
+ }, M = {
6421
6421
  begin: ".?css`",
6422
6422
  end: "",
6423
6423
  starts: {
@@ -6498,7 +6498,7 @@ function wr(e) {
6498
6498
  e.APOS_STRING_MODE,
6499
6499
  e.QUOTE_STRING_MODE,
6500
6500
  H,
6501
- R,
6501
+ M,
6502
6502
  F,
6503
6503
  $,
6504
6504
  // Skip numbers when they are part of a variable name
@@ -6708,7 +6708,7 @@ function wr(e) {
6708
6708
  e.APOS_STRING_MODE,
6709
6709
  e.QUOTE_STRING_MODE,
6710
6710
  H,
6711
- R,
6711
+ M,
6712
6712
  F,
6713
6713
  $,
6714
6714
  E,
@@ -7319,7 +7319,7 @@ function Sr(e) {
7319
7319
  e.APOS_STRING_MODE,
7320
7320
  e.QUOTE_STRING_MODE
7321
7321
  ]
7322
- }, A = "[0-9](_?[0-9])*", H = `(\\b(${A}))?\\.(${A})|\\b(${A})\\.`, R = `\\b|${i.join("|")}`, F = {
7322
+ }, A = "[0-9](_?[0-9])*", H = `(\\b(${A}))?\\.(${A})|\\b(${A})\\.`, M = `\\b|${i.join("|")}`, F = {
7323
7323
  className: "number",
7324
7324
  relevance: 0,
7325
7325
  variants: [
@@ -7334,7 +7334,7 @@ function Sr(e) {
7334
7334
  // because both MUST contain a decimal point and so cannot be confused with
7335
7335
  // the interior part of an identifier
7336
7336
  {
7337
- begin: `(\\b(${A})|(${H}))[eE][+-]?(${A})[jJ]?(?=${R})`
7337
+ begin: `(\\b(${A})|(${H}))[eE][+-]?(${A})[jJ]?(?=${M})`
7338
7338
  },
7339
7339
  {
7340
7340
  begin: `(${H})[jJ]?`
@@ -7346,21 +7346,21 @@ function Sr(e) {
7346
7346
  // decinteger is optionally imaginary
7347
7347
  // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
7348
7348
  {
7349
- begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${R})`
7349
+ begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${M})`
7350
7350
  },
7351
7351
  {
7352
- begin: `\\b0[bB](_?[01])+[lL]?(?=${R})`
7352
+ begin: `\\b0[bB](_?[01])+[lL]?(?=${M})`
7353
7353
  },
7354
7354
  {
7355
- begin: `\\b0[oO](_?[0-7])+[lL]?(?=${R})`
7355
+ begin: `\\b0[oO](_?[0-7])+[lL]?(?=${M})`
7356
7356
  },
7357
7357
  {
7358
- begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${R})`
7358
+ begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${M})`
7359
7359
  },
7360
7360
  // imagnumber (digitpart-based)
7361
7361
  // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
7362
7362
  {
7363
- begin: `\\b(${A})[jJ](?=${R})`
7363
+ begin: `\\b(${A})[jJ](?=${M})`
7364
7364
  }
7365
7365
  ]
7366
7366
  }, $ = {
@@ -8340,7 +8340,7 @@ function mp(e) {
8340
8340
  "nulls last",
8341
8341
  "depth first",
8342
8342
  "breadth first"
8343
- ], H = m, R = [
8343
+ ], H = m, M = [
8344
8344
  ...h,
8345
8345
  ...c
8346
8346
  ].filter((O) => !m.includes(O)), F = {
@@ -8381,7 +8381,7 @@ function mp(e) {
8381
8381
  illegal: /[{}]|<\//,
8382
8382
  keywords: {
8383
8383
  $pattern: /\b[\w\.]+/,
8384
- keyword: f(R, { when: (O) => O.length < 3 }),
8384
+ keyword: f(M, { when: (O) => O.length < 3 }),
8385
8385
  literal: l,
8386
8386
  type: d,
8387
8387
  built_in: S
@@ -8630,7 +8630,7 @@ function vp(e) {
8630
8630
  ],
8631
8631
  subLanguage: "xml"
8632
8632
  }
8633
- }, R = {
8633
+ }, M = {
8634
8634
  begin: ".?css`",
8635
8635
  end: "",
8636
8636
  starts: {
@@ -8711,7 +8711,7 @@ function vp(e) {
8711
8711
  e.APOS_STRING_MODE,
8712
8712
  e.QUOTE_STRING_MODE,
8713
8713
  H,
8714
- R,
8714
+ M,
8715
8715
  F,
8716
8716
  $,
8717
8717
  // Skip numbers when they are part of a variable name
@@ -8921,7 +8921,7 @@ function vp(e) {
8921
8921
  e.APOS_STRING_MODE,
8922
8922
  e.QUOTE_STRING_MODE,
8923
8923
  H,
8924
- R,
8924
+ M,
8925
8925
  F,
8926
8926
  $,
8927
8927
  E,
@@ -9142,8 +9142,8 @@ function Ar(e) {
9142
9142
  H
9143
9143
  // Added for optional property assignment highlighting
9144
9144
  ]), S(t, "shebang", e.SHEBANG()), S(t, "use_strict", d);
9145
- const R = t.contains.find((F) => F.label === "func.def");
9146
- return R.relevance = 0, Object.assign(t, {
9145
+ const M = t.contains.find((F) => F.label === "func.def");
9146
+ return M.relevance = 0, Object.assign(t, {
9147
9147
  name: "TypeScript",
9148
9148
  aliases: [
9149
9149
  "ts",
@@ -9449,7 +9449,7 @@ function Cr(e) {
9449
9449
  excludeEnd: !0,
9450
9450
  keywords: n,
9451
9451
  relevance: 0
9452
- }, R = {
9452
+ }, M = {
9453
9453
  begin: /\{/,
9454
9454
  end: /\}/,
9455
9455
  contains: [H],
@@ -9537,7 +9537,7 @@ function Cr(e) {
9537
9537
  begin: e.C_NUMBER_RE + "\\b",
9538
9538
  relevance: 0
9539
9539
  },
9540
- R,
9540
+ M,
9541
9541
  F,
9542
9542
  l,
9543
9543
  a
@@ -9640,12 +9640,12 @@ var yp = ((e = "") => {
9640
9640
  } catch {
9641
9641
  return !1;
9642
9642
  }
9643
- })(), xt = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: fi((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: fi((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: fi((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: fi((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: fi((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: fi((e) => new RegExp(`^ {0,${e}}>`)) }, kp = /^(?:[ \t]*(?:\n|$))+/, xp = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wp = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ep = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, bs = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Na = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ra = Ie(Na).replace(/bull/g, bs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Sp = Ie(Na).replace(/bull/g, bs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ys = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Tp = /^[^\n]+/, ks = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ap = Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ks).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), _p = Ie(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, bs).getRegex(), Ao = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", xs = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Cp = Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", xs).replace("tag", Ao).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ma = Ie(ys).replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), Np = Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ma).getRegex(), ws = { blockquote: Np, code: xp, def: Ap, fences: wp, heading: Ep, hr: qi, html: Cp, lheading: Ra, list: _p, newline: kp, paragraph: Ma, table: Yn, text: Tp }, Nr = Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), Rp = { ...ws, lheading: Sp, table: Nr, paragraph: Ie(ys).replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Nr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex() }, Mp = { ...ws, html: Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", xs).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Yn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Ie(ys).replace("hr", qi).replace("heading", ` *#{1,6} *[^
9644
- ]`).replace("lheading", Ra).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ip = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Op = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ia = /^( {2,}|\\)\n(?!\s*$)/, zp = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ei = /[\p{P}\p{S}]/u, _o = /[\s\p{P}\p{S}]/u, Es = /[^\s\p{P}\p{S}]/u, Lp = Ie(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _o).getRegex(), Oa = /(?!~)[\p{P}\p{S}]/u, $p = /(?!~)[\s\p{P}\p{S}]/u, Dp = /(?:[^\s\p{P}\p{S}]|~)/u, Pp = Ie(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", yp ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), za = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Bp = Ie(za, "u").replace(/punct/g, Ei).getRegex(), Up = Ie(za, "u").replace(/punct/g, Oa).getRegex(), La = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hp = Ie(La, "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Fp = Ie(La, "gu").replace(/notPunctSpace/g, Dp).replace(/punctSpace/g, $p).replace(/punct/g, Oa).getRegex(), Wp = Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Gp = Ie(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ei).getRegex(), jp = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Kp = Ie(jp, "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Yp = Ie(/\\(punct)/, "gu").replace(/punct/g, Ei).getRegex(), qp = Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Vp = Ie(xs).replace("(?:-->|$)", "-->").getRegex(), Xp = Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Vp).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ko = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zp = Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ko).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), $a = Ie(/^!?\[(label)\]\[(ref)\]/).replace("label", ko).replace("ref", ks).getRegex(), Da = Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref", ks).getRegex(), Jp = Ie("reflink|nolink(?!\\()", "g").replace("reflink", $a).replace("nolink", Da).getRegex(), Rr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ss = { _backpedal: Yn, anyPunctuation: Yp, autolink: qp, blockSkip: Pp, br: Ia, code: Op, del: Yn, delLDelim: Yn, delRDelim: Yn, emStrongLDelim: Bp, emStrongRDelimAst: Hp, emStrongRDelimUnd: Wp, escape: Ip, link: Zp, nolink: Da, punctuation: Lp, reflink: $a, reflinkSearch: Jp, tag: Xp, text: zp, url: Yn }, Qp = { ...Ss, link: Ie(/^!?\[(label)\]\((.*?)\)/).replace("label", ko).getRegex(), reflink: Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ko).getRegex() }, ts = { ...Ss, emStrongRDelimAst: Fp, emStrongLDelim: Up, delLDelim: Gp, delRDelim: Kp, url: Ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Rr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Rr).getRegex() }, eg = { ...ts, br: Ie(Ia).replace("{2,}", "*").getRegex(), text: Ie(ts.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, fo = { normal: ws, gfm: Rp, pedantic: Mp }, Di = { normal: Ss, gfm: ts, breaks: eg, pedantic: Qp }, tg = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Mr = (e) => tg[e];
9643
+ })(), xt = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: fi((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: fi((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: fi((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: fi((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: fi((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: fi((e) => new RegExp(`^ {0,${e}}>`)) }, kp = /^(?:[ \t]*(?:\n|$))+/, xp = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wp = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ep = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, bs = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Na = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ma = Ie(Na).replace(/bull/g, bs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Sp = Ie(Na).replace(/bull/g, bs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ys = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Tp = /^[^\n]+/, ks = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ap = Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ks).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), _p = Ie(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, bs).getRegex(), Ao = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", xs = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Cp = Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", xs).replace("tag", Ao).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ra = Ie(ys).replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), Np = Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ra).getRegex(), ws = { blockquote: Np, code: xp, def: Ap, fences: wp, heading: Ep, hr: qi, html: Cp, lheading: Ma, list: _p, newline: kp, paragraph: Ra, table: Yn, text: Tp }, Nr = Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), Mp = { ...ws, lheading: Sp, table: Nr, paragraph: Ie(ys).replace("hr", qi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Nr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex() }, Rp = { ...ws, html: Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", xs).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Yn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Ie(ys).replace("hr", qi).replace("heading", ` *#{1,6} *[^
9644
+ ]`).replace("lheading", Ma).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ip = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Op = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ia = /^( {2,}|\\)\n(?!\s*$)/, zp = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ei = /[\p{P}\p{S}]/u, _o = /[\s\p{P}\p{S}]/u, Es = /[^\s\p{P}\p{S}]/u, Lp = Ie(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _o).getRegex(), Oa = /(?!~)[\p{P}\p{S}]/u, $p = /(?!~)[\s\p{P}\p{S}]/u, Dp = /(?:[^\s\p{P}\p{S}]|~)/u, Pp = Ie(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", yp ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), za = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Bp = Ie(za, "u").replace(/punct/g, Ei).getRegex(), Up = Ie(za, "u").replace(/punct/g, Oa).getRegex(), La = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hp = Ie(La, "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Fp = Ie(La, "gu").replace(/notPunctSpace/g, Dp).replace(/punctSpace/g, $p).replace(/punct/g, Oa).getRegex(), Wp = Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Gp = Ie(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ei).getRegex(), jp = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Kp = Ie(jp, "gu").replace(/notPunctSpace/g, Es).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), Yp = Ie(/\\(punct)/, "gu").replace(/punct/g, Ei).getRegex(), qp = Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Vp = Ie(xs).replace("(?:-->|$)", "-->").getRegex(), Xp = Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Vp).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ko = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zp = Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ko).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), $a = Ie(/^!?\[(label)\]\[(ref)\]/).replace("label", ko).replace("ref", ks).getRegex(), Da = Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref", ks).getRegex(), Jp = Ie("reflink|nolink(?!\\()", "g").replace("reflink", $a).replace("nolink", Da).getRegex(), Mr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ss = { _backpedal: Yn, anyPunctuation: Yp, autolink: qp, blockSkip: Pp, br: Ia, code: Op, del: Yn, delLDelim: Yn, delRDelim: Yn, emStrongLDelim: Bp, emStrongRDelimAst: Hp, emStrongRDelimUnd: Wp, escape: Ip, link: Zp, nolink: Da, punctuation: Lp, reflink: $a, reflinkSearch: Jp, tag: Xp, text: zp, url: Yn }, Qp = { ...Ss, link: Ie(/^!?\[(label)\]\((.*?)\)/).replace("label", ko).getRegex(), reflink: Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ko).getRegex() }, ts = { ...Ss, emStrongRDelimAst: Fp, emStrongLDelim: Up, delLDelim: Gp, delRDelim: Kp, url: Ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Mr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Mr).getRegex() }, eg = { ...ts, br: Ie(Ia).replace("{2,}", "*").getRegex(), text: Ie(ts.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, fo = { normal: ws, gfm: Mp, pedantic: Rp }, Di = { normal: Ss, gfm: ts, breaks: eg, pedantic: Qp }, tg = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Rr = (e) => tg[e];
9645
9645
  function mn(e, n) {
9646
9646
  if (n) {
9647
- if (xt.escapeTest.test(e)) return e.replace(xt.escapeReplace, Mr);
9648
- } else if (xt.escapeTestNoEncode.test(e)) return e.replace(xt.escapeReplaceNoEncode, Mr);
9647
+ if (xt.escapeTest.test(e)) return e.replace(xt.escapeReplace, Rr);
9648
+ } else if (xt.escapeTestNoEncode.test(e)) return e.replace(xt.escapeReplaceNoEncode, Rr);
9649
9649
  return e;
9650
9650
  }
9651
9651
  function Ir(e) {
@@ -9783,16 +9783,16 @@ ${m}` : m;
9783
9783
  let A = l.at(-1);
9784
9784
  if ((A == null ? void 0 : A.type) === "code") break;
9785
9785
  if ((A == null ? void 0 : A.type) === "blockquote") {
9786
- let H = A, R = H.raw + `
9786
+ let H = A, M = H.raw + `
9787
9787
  ` + t.join(`
9788
- `), F = this.blockquote(R);
9788
+ `), F = this.blockquote(M);
9789
9789
  l[l.length - 1] = F, i = i.substring(0, i.length - H.raw.length) + F.raw, s = s.substring(0, s.length - H.text.length) + F.text;
9790
9790
  break;
9791
9791
  } else if ((A == null ? void 0 : A.type) === "list") {
9792
- let H = A, R = H.raw + `
9792
+ let H = A, M = H.raw + `
9793
9793
  ` + t.join(`
9794
- `), F = this.list(R);
9795
- l[l.length - 1] = F, i = i.substring(0, i.length - A.raw.length) + F.raw, s = s.substring(0, s.length - H.raw.length) + F.raw, t = R.substring(l.at(-1).raw.length).split(`
9794
+ `), F = this.list(M);
9795
+ l[l.length - 1] = F, i = i.substring(0, i.length - A.raw.length) + F.raw, s = s.substring(0, s.length - H.raw.length) + F.raw, t = M.substring(l.at(-1).raw.length).split(`
9796
9796
  `);
9797
9797
  continue;
9798
9798
  }
@@ -9812,23 +9812,23 @@ ${m}` : m;
9812
9812
  h = n[0], e = e.substring(h.length);
9813
9813
  let S = ig(n[2].split(`
9814
9814
  `, 1)[0], n[1].length), A = e.split(`
9815
- `, 1)[0], H = !S.trim(), R = 0;
9816
- if (this.options.pedantic ? (R = 2, m = S.trimStart()) : H ? R = n[1].length + 1 : (R = S.search(this.rules.other.nonSpaceChar), R = R > 4 ? 1 : R, m = S.slice(R), R += n[1].length), H && this.rules.other.blankLine.test(A) && (h += A + `
9815
+ `, 1)[0], H = !S.trim(), M = 0;
9816
+ if (this.options.pedantic ? (M = 2, m = S.trimStart()) : H ? M = n[1].length + 1 : (M = S.search(this.rules.other.nonSpaceChar), M = M > 4 ? 1 : M, m = S.slice(M), M += n[1].length), H && this.rules.other.blankLine.test(A) && (h += A + `
9817
9817
  `, e = e.substring(A.length + 1), c = !0), !c) {
9818
- let F = this.rules.other.nextBulletRegex(R), $ = this.rules.other.hrRegex(R), C = this.rules.other.fencesBeginRegex(R), E = this.rules.other.headingBeginRegex(R), b = this.rules.other.htmlBeginRegex(R), f = this.rules.other.blockquoteBeginRegex(R);
9818
+ let F = this.rules.other.nextBulletRegex(M), $ = this.rules.other.hrRegex(M), C = this.rules.other.fencesBeginRegex(M), E = this.rules.other.headingBeginRegex(M), b = this.rules.other.htmlBeginRegex(M), f = this.rules.other.blockquoteBeginRegex(M);
9819
9819
  for (; e; ) {
9820
9820
  let O = e.split(`
9821
9821
  `, 1)[0], w;
9822
9822
  if (A = O, this.options.pedantic ? (A = A.replace(this.rules.other.listReplaceNesting, " "), w = A) : w = A.replace(this.rules.other.tabCharGlobal, " "), C.test(A) || E.test(A) || b.test(A) || f.test(A) || F.test(A) || $.test(A)) break;
9823
- if (w.search(this.rules.other.nonSpaceChar) >= R || !A.trim()) m += `
9824
- ` + w.slice(R);
9823
+ if (w.search(this.rules.other.nonSpaceChar) >= M || !A.trim()) m += `
9824
+ ` + w.slice(M);
9825
9825
  else {
9826
9826
  if (H || S.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || C.test(S) || E.test(S) || $.test(S)) break;
9827
9827
  m += `
9828
9828
  ` + A;
9829
9829
  }
9830
9830
  H = !A.trim(), h += O + `
9831
- `, e = e.substring(O.length + 1), S = w.slice(R);
9831
+ `, e = e.substring(O.length + 1), S = w.slice(M);
9832
9832
  }
9833
9833
  }
9834
9834
  s.loose || (a ? s.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (a = !0)), s.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(m), loose: !1, text: m, tokens: [] }), s.raw += h;
@@ -10176,8 +10176,8 @@ ${m}` : m;
10176
10176
  this.tokenizer.lexer = this;
10177
10177
  let i = n, s = null;
10178
10178
  if (this.tokens.links) {
10179
- let R = Object.keys(this.tokens.links);
10180
- if (R.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(i)) !== null; ) R.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (i = i.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
10179
+ let M = Object.keys(this.tokens.links);
10180
+ if (M.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(i)) !== null; ) M.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (i = i.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
10181
10181
  }
10182
10182
  for (; (s = this.tokenizer.rules.inline.anyPunctuation.exec(i)) !== null; ) i = i.slice(0, s.index) + "++" + i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
10183
10183
  let l;
@@ -10191,48 +10191,48 @@ ${m}` : m;
10191
10191
  break;
10192
10192
  }
10193
10193
  a || (d = ""), a = !1;
10194
- let R;
10195
- if ((A = (S = this.options.extensions) == null ? void 0 : S.inline) != null && A.some(($) => (R = $.call({ lexer: this }, n, t)) ? (n = n.substring(R.raw.length), t.push(R), !0) : !1)) continue;
10196
- if (R = this.tokenizer.escape(n)) {
10197
- n = n.substring(R.raw.length), t.push(R);
10194
+ let M;
10195
+ if ((A = (S = this.options.extensions) == null ? void 0 : S.inline) != null && A.some(($) => (M = $.call({ lexer: this }, n, t)) ? (n = n.substring(M.raw.length), t.push(M), !0) : !1)) continue;
10196
+ if (M = this.tokenizer.escape(n)) {
10197
+ n = n.substring(M.raw.length), t.push(M);
10198
10198
  continue;
10199
10199
  }
10200
- if (R = this.tokenizer.tag(n)) {
10201
- n = n.substring(R.raw.length), t.push(R);
10200
+ if (M = this.tokenizer.tag(n)) {
10201
+ n = n.substring(M.raw.length), t.push(M);
10202
10202
  continue;
10203
10203
  }
10204
- if (R = this.tokenizer.link(n)) {
10205
- n = n.substring(R.raw.length), t.push(R);
10204
+ if (M = this.tokenizer.link(n)) {
10205
+ n = n.substring(M.raw.length), t.push(M);
10206
10206
  continue;
10207
10207
  }
10208
- if (R = this.tokenizer.reflink(n, this.tokens.links)) {
10209
- n = n.substring(R.raw.length);
10208
+ if (M = this.tokenizer.reflink(n, this.tokens.links)) {
10209
+ n = n.substring(M.raw.length);
10210
10210
  let $ = t.at(-1);
10211
- R.type === "text" && ($ == null ? void 0 : $.type) === "text" ? ($.raw += R.raw, $.text += R.text) : t.push(R);
10211
+ M.type === "text" && ($ == null ? void 0 : $.type) === "text" ? ($.raw += M.raw, $.text += M.text) : t.push(M);
10212
10212
  continue;
10213
10213
  }
10214
- if (R = this.tokenizer.emStrong(n, i, d)) {
10215
- n = n.substring(R.raw.length), t.push(R);
10214
+ if (M = this.tokenizer.emStrong(n, i, d)) {
10215
+ n = n.substring(M.raw.length), t.push(M);
10216
10216
  continue;
10217
10217
  }
10218
- if (R = this.tokenizer.codespan(n)) {
10219
- n = n.substring(R.raw.length), t.push(R);
10218
+ if (M = this.tokenizer.codespan(n)) {
10219
+ n = n.substring(M.raw.length), t.push(M);
10220
10220
  continue;
10221
10221
  }
10222
- if (R = this.tokenizer.br(n)) {
10223
- n = n.substring(R.raw.length), t.push(R);
10222
+ if (M = this.tokenizer.br(n)) {
10223
+ n = n.substring(M.raw.length), t.push(M);
10224
10224
  continue;
10225
10225
  }
10226
- if (R = this.tokenizer.del(n, i, d)) {
10227
- n = n.substring(R.raw.length), t.push(R);
10226
+ if (M = this.tokenizer.del(n, i, d)) {
10227
+ n = n.substring(M.raw.length), t.push(M);
10228
10228
  continue;
10229
10229
  }
10230
- if (R = this.tokenizer.autolink(n)) {
10231
- n = n.substring(R.raw.length), t.push(R);
10230
+ if (M = this.tokenizer.autolink(n)) {
10231
+ n = n.substring(M.raw.length), t.push(M);
10232
10232
  continue;
10233
10233
  }
10234
- if (!this.state.inLink && (R = this.tokenizer.url(n))) {
10235
- n = n.substring(R.raw.length), t.push(R);
10234
+ if (!this.state.inLink && (M = this.tokenizer.url(n))) {
10235
+ n = n.substring(M.raw.length), t.push(M);
10236
10236
  continue;
10237
10237
  }
10238
10238
  let F = n;
@@ -10242,10 +10242,10 @@ ${m}` : m;
10242
10242
  E = b.call({ lexer: this }, C), typeof E == "number" && E >= 0 && ($ = Math.min($, E));
10243
10243
  }), $ < 1 / 0 && $ >= 0 && (F = n.substring(0, $ + 1));
10244
10244
  }
10245
- if (R = this.tokenizer.inlineText(F)) {
10246
- n = n.substring(R.raw.length), R.raw.slice(-1) !== "_" && (d = R.raw.slice(-1)), a = !0;
10245
+ if (M = this.tokenizer.inlineText(F)) {
10246
+ n = n.substring(M.raw.length), M.raw.slice(-1) !== "_" && (d = M.raw.slice(-1)), a = !0;
10247
10247
  let $ = t.at(-1);
10248
- ($ == null ? void 0 : $.type) === "text" ? ($.raw += R.raw, $.text += R.text) : t.push(R);
10248
+ ($ == null ? void 0 : $.type) === "text" ? ($.raw += M.raw, $.text += M.text) : t.push(M);
10249
10249
  continue;
10250
10250
  }
10251
10251
  if (n) {
@@ -10938,10 +10938,10 @@ function xg(e) {
10938
10938
  const Wr = Ct(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ko = Ct(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Yo = Ct(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), wg = Ct(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), qo = Ct(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Eg = Ct(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Gr = Ct(["#text"]), jr = Ct(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), Vo = Ct(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Kr = Ct(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), po = Ct(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Sg = Zt(/{{[\w\W]*|^[\w\W]*}}/g), Tg = Zt(/<%[\w\W]*|^[\w\W]*%>/g), Ag = Zt(/\${[\w\W]*/g), _g = Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Cg = Zt(/^aria-[\-\w]+$/), Yr = Zt(
10939
10939
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
10940
10940
  // eslint-disable-line no-useless-escape
10941
- ), Ng = Zt(/^(?:\w+script|data):/i), Rg = Zt(
10941
+ ), Ng = Zt(/^(?:\w+script|data):/i), Mg = Zt(
10942
10942
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
10943
10943
  // eslint-disable-line no-control-regex
10944
- ), Mg = Zt(/^html$/i), Ig = Zt(/^[a-z][.\w]*(-[.\w]+)+$/i), hn = {
10944
+ ), Rg = Zt(/^html$/i), Ig = Zt(/^[a-z][.\w]*(-[.\w]+)+$/i), hn = {
10945
10945
  element: 1,
10946
10946
  attribute: 2,
10947
10947
  text: 3,
@@ -11001,7 +11001,7 @@ function Ha() {
11001
11001
  e.DocumentFragment;
11002
11002
  const l = e.HTMLTemplateElement, a = e.Node, d = e.Element, c = e.NodeFilter, h = e.NamedNodeMap;
11003
11003
  h === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
11004
- const m = e.DOMParser, S = e.trustedTypes, A = d.prototype, H = vn(A, "cloneNode"), R = vn(A, "remove"), F = vn(A, "nextSibling"), $ = vn(A, "childNodes"), C = vn(A, "parentNode"), E = vn(A, "shadowRoot"), b = vn(A, "attributes"), f = a && a.prototype ? vn(a.prototype, "nodeType") : null, O = a && a.prototype ? vn(a.prototype, "nodeName") : null;
11004
+ const m = e.DOMParser, S = e.trustedTypes, A = d.prototype, H = vn(A, "cloneNode"), M = vn(A, "remove"), F = vn(A, "nextSibling"), $ = vn(A, "childNodes"), C = vn(A, "parentNode"), E = vn(A, "shadowRoot"), b = vn(A, "attributes"), f = a && a.prototype ? vn(a.prototype, "nodeType") : null, O = a && a.prototype ? vn(a.prototype, "nodeName") : null;
11005
11005
  if (typeof l == "function") {
11006
11006
  const z = t.createElement("template");
11007
11007
  z.content && z.content.ownerDocument && (t = z.content.ownerDocument);
@@ -11019,7 +11019,7 @@ function Ha() {
11019
11019
  }, ve = t, ge = ve.implementation, ee = ve.createNodeIterator, ce = ve.createDocumentFragment, oe = ve.getElementsByTagName, L = i.importNode;
11020
11020
  let N = qr();
11021
11021
  n.isSupported = typeof Ba == "function" && typeof C == "function" && ge && ge.createHTMLDocument !== void 0;
11022
- const j = Sg, W = Tg, V = Ag, he = _g, Oe = Cg, De = Ng, He = Rg, Ne = Ig;
11022
+ const j = Sg, W = Tg, V = Ag, he = _g, Oe = Cg, De = Ng, He = Mg, Ne = Ig;
11023
11023
  let y = Yr, g = null;
11024
11024
  const P = Ee({}, [...Wr, ...Ko, ...Yo, ...qo, ...Gr]);
11025
11025
  let U = null;
@@ -11060,7 +11060,7 @@ function Ha() {
11060
11060
  }));
11061
11061
  let ut = !0, st = !0, yn = !1, Gt = !0, re = !1, mt = !0, Le = !1, ze = !1, jt = !1, dt = !1, Nt = !1, wt = !1, Y = !0, ne = !1;
11062
11062
  const ye = "user-content-";
11063
- let _e = !0, je = !1, ft = {}, Rt = null;
11063
+ let _e = !0, je = !1, ft = {}, Mt = null;
11064
11064
  const Hn = Ee({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
11065
11065
  let Vi = null;
11066
11066
  const Xi = Ee({}, ["audio", "video", "img", "source", "image", "track"]);
@@ -11071,18 +11071,18 @@ function Ha() {
11071
11071
  let _i = Ee({}, ["mi", "mo", "mn", "ms", "mtext"]), Ci = Ee({}, ["annotation-xml"]);
11072
11072
  const No = Ee({}, ["title", "style", "font", "a", "script"]);
11073
11073
  let Fn = null;
11074
- const Ji = ["application/xhtml+xml", "text/html"], Ro = "text/html";
11075
- let Ke = null, Rn = null;
11074
+ const Ji = ["application/xhtml+xml", "text/html"], Mo = "text/html";
11075
+ let Ke = null, Mn = null;
11076
11076
  const Qi = t.createElement("form"), eo = function(v) {
11077
11077
  return v instanceof RegExp || v instanceof Function;
11078
11078
  }, ti = function() {
11079
11079
  let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11080
- if (Rn && Rn === v)
11080
+ if (Mn && Mn === v)
11081
11081
  return;
11082
11082
  (!v || typeof v != "object") && (v = {}), v = kt(v), Fn = // eslint-disable-next-line unicorn/prefer-includes
11083
- Ji.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Ro : v.PARSER_MEDIA_TYPE, Ke = Fn === "application/xhtml+xml" ? jo : Hi, g = tt(v, "ALLOWED_TAGS") && At(v.ALLOWED_TAGS) ? Ee({}, v.ALLOWED_TAGS, Ke) : P, U = tt(v, "ALLOWED_ATTR") && At(v.ALLOWED_ATTR) ? Ee({}, v.ALLOWED_ATTR, Ke) : Q, Ai = tt(v, "ALLOWED_NAMESPACES") && At(v.ALLOWED_NAMESPACES) ? Ee({}, v.ALLOWED_NAMESPACES, jo) : Co, Si = tt(v, "ADD_URI_SAFE_ATTR") && At(v.ADD_URI_SAFE_ATTR) ? Ee(kt(Zi), v.ADD_URI_SAFE_ATTR, Ke) : Zi, Vi = tt(v, "ADD_DATA_URI_TAGS") && At(v.ADD_DATA_URI_TAGS) ? Ee(kt(Xi), v.ADD_DATA_URI_TAGS, Ke) : Xi, Rt = tt(v, "FORBID_CONTENTS") && At(v.FORBID_CONTENTS) ? Ee({}, v.FORBID_CONTENTS, Ke) : Hn, Te = tt(v, "FORBID_TAGS") && At(v.FORBID_TAGS) ? Ee({}, v.FORBID_TAGS, Ke) : kt({}), ot = tt(v, "FORBID_ATTR") && At(v.FORBID_ATTR) ? Ee({}, v.FORBID_ATTR, Ke) : kt({}), ft = tt(v, "USE_PROFILES") ? v.USE_PROFILES && typeof v.USE_PROFILES == "object" ? kt(v.USE_PROFILES) : v.USE_PROFILES : !1, ut = v.ALLOW_ARIA_ATTR !== !1, st = v.ALLOW_DATA_ATTR !== !1, yn = v.ALLOW_UNKNOWN_PROTOCOLS || !1, Gt = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, re = v.SAFE_FOR_TEMPLATES || !1, mt = v.SAFE_FOR_XML !== !1, Le = v.WHOLE_DOCUMENT || !1, dt = v.RETURN_DOM || !1, Nt = v.RETURN_DOM_FRAGMENT || !1, wt = v.RETURN_TRUSTED_TYPE || !1, jt = v.FORCE_BODY || !1, Y = v.SANITIZE_DOM !== !1, ne = v.SANITIZE_NAMED_PROPS || !1, _e = v.KEEP_CONTENT !== !1, je = v.IN_PLACE || !1, y = xg(v.ALLOWED_URI_REGEXP) ? v.ALLOWED_URI_REGEXP : Yr, Nn = typeof v.NAMESPACE == "string" ? v.NAMESPACE : Kt, _i = tt(v, "MATHML_TEXT_INTEGRATION_POINTS") && v.MATHML_TEXT_INTEGRATION_POINTS && typeof v.MATHML_TEXT_INTEGRATION_POINTS == "object" ? kt(v.MATHML_TEXT_INTEGRATION_POINTS) : Ee({}, ["mi", "mo", "mn", "ms", "mtext"]), Ci = tt(v, "HTML_INTEGRATION_POINTS") && v.HTML_INTEGRATION_POINTS && typeof v.HTML_INTEGRATION_POINTS == "object" ? kt(v.HTML_INTEGRATION_POINTS) : Ee({}, ["annotation-xml"]);
11083
+ Ji.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Mo : v.PARSER_MEDIA_TYPE, Ke = Fn === "application/xhtml+xml" ? jo : Hi, g = tt(v, "ALLOWED_TAGS") && At(v.ALLOWED_TAGS) ? Ee({}, v.ALLOWED_TAGS, Ke) : P, U = tt(v, "ALLOWED_ATTR") && At(v.ALLOWED_ATTR) ? Ee({}, v.ALLOWED_ATTR, Ke) : Q, Ai = tt(v, "ALLOWED_NAMESPACES") && At(v.ALLOWED_NAMESPACES) ? Ee({}, v.ALLOWED_NAMESPACES, jo) : Co, Si = tt(v, "ADD_URI_SAFE_ATTR") && At(v.ADD_URI_SAFE_ATTR) ? Ee(kt(Zi), v.ADD_URI_SAFE_ATTR, Ke) : Zi, Vi = tt(v, "ADD_DATA_URI_TAGS") && At(v.ADD_DATA_URI_TAGS) ? Ee(kt(Xi), v.ADD_DATA_URI_TAGS, Ke) : Xi, Mt = tt(v, "FORBID_CONTENTS") && At(v.FORBID_CONTENTS) ? Ee({}, v.FORBID_CONTENTS, Ke) : Hn, Te = tt(v, "FORBID_TAGS") && At(v.FORBID_TAGS) ? Ee({}, v.FORBID_TAGS, Ke) : kt({}), ot = tt(v, "FORBID_ATTR") && At(v.FORBID_ATTR) ? Ee({}, v.FORBID_ATTR, Ke) : kt({}), ft = tt(v, "USE_PROFILES") ? v.USE_PROFILES && typeof v.USE_PROFILES == "object" ? kt(v.USE_PROFILES) : v.USE_PROFILES : !1, ut = v.ALLOW_ARIA_ATTR !== !1, st = v.ALLOW_DATA_ATTR !== !1, yn = v.ALLOW_UNKNOWN_PROTOCOLS || !1, Gt = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, re = v.SAFE_FOR_TEMPLATES || !1, mt = v.SAFE_FOR_XML !== !1, Le = v.WHOLE_DOCUMENT || !1, dt = v.RETURN_DOM || !1, Nt = v.RETURN_DOM_FRAGMENT || !1, wt = v.RETURN_TRUSTED_TYPE || !1, jt = v.FORCE_BODY || !1, Y = v.SANITIZE_DOM !== !1, ne = v.SANITIZE_NAMED_PROPS || !1, _e = v.KEEP_CONTENT !== !1, je = v.IN_PLACE || !1, y = xg(v.ALLOWED_URI_REGEXP) ? v.ALLOWED_URI_REGEXP : Yr, Nn = typeof v.NAMESPACE == "string" ? v.NAMESPACE : Kt, _i = tt(v, "MATHML_TEXT_INTEGRATION_POINTS") && v.MATHML_TEXT_INTEGRATION_POINTS && typeof v.MATHML_TEXT_INTEGRATION_POINTS == "object" ? kt(v.MATHML_TEXT_INTEGRATION_POINTS) : Ee({}, ["mi", "mo", "mn", "ms", "mtext"]), Ci = tt(v, "HTML_INTEGRATION_POINTS") && v.HTML_INTEGRATION_POINTS && typeof v.HTML_INTEGRATION_POINTS == "object" ? kt(v.HTML_INTEGRATION_POINTS) : Ee({}, ["annotation-xml"]);
11084
11084
  const D = tt(v, "CUSTOM_ELEMENT_HANDLING") && v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING == "object" ? kt(v.CUSTOM_ELEMENT_HANDLING) : bi(null);
11085
- if (be = bi(null), tt(D, "tagNameCheck") && eo(D.tagNameCheck) && (be.tagNameCheck = D.tagNameCheck), tt(D, "attributeNameCheck") && eo(D.attributeNameCheck) && (be.attributeNameCheck = D.attributeNameCheck), tt(D, "allowCustomizedBuiltInElements") && typeof D.allowCustomizedBuiltInElements == "boolean" && (be.allowCustomizedBuiltInElements = D.allowCustomizedBuiltInElements), re && (st = !1), Nt && (dt = !0), ft && (g = Ee({}, Gr), U = bi(null), ft.html === !0 && (Ee(g, Wr), Ee(U, jr)), ft.svg === !0 && (Ee(g, Ko), Ee(U, Vo), Ee(U, po)), ft.svgFilters === !0 && (Ee(g, Yo), Ee(U, Vo), Ee(U, po)), ft.mathMl === !0 && (Ee(g, qo), Ee(U, Kr), Ee(U, po))), Je.tagCheck = null, Je.attributeCheck = null, tt(v, "ADD_TAGS") && (typeof v.ADD_TAGS == "function" ? Je.tagCheck = v.ADD_TAGS : At(v.ADD_TAGS) && (g === P && (g = kt(g)), Ee(g, v.ADD_TAGS, Ke))), tt(v, "ADD_ATTR") && (typeof v.ADD_ATTR == "function" ? Je.attributeCheck = v.ADD_ATTR : At(v.ADD_ATTR) && (U === Q && (U = kt(U)), Ee(U, v.ADD_ATTR, Ke))), tt(v, "ADD_URI_SAFE_ATTR") && At(v.ADD_URI_SAFE_ATTR) && Ee(Si, v.ADD_URI_SAFE_ATTR, Ke), tt(v, "FORBID_CONTENTS") && At(v.FORBID_CONTENTS) && (Rt === Hn && (Rt = kt(Rt)), Ee(Rt, v.FORBID_CONTENTS, Ke)), tt(v, "ADD_FORBID_CONTENTS") && At(v.ADD_FORBID_CONTENTS) && (Rt === Hn && (Rt = kt(Rt)), Ee(Rt, v.ADD_FORBID_CONTENTS, Ke)), _e && (g["#text"] = !0), Le && Ee(g, ["html", "head", "body"]), g.table && (Ee(g, ["tbody"]), delete Te.tbody), v.TRUSTED_TYPES_POLICY) {
11085
+ if (be = bi(null), tt(D, "tagNameCheck") && eo(D.tagNameCheck) && (be.tagNameCheck = D.tagNameCheck), tt(D, "attributeNameCheck") && eo(D.attributeNameCheck) && (be.attributeNameCheck = D.attributeNameCheck), tt(D, "allowCustomizedBuiltInElements") && typeof D.allowCustomizedBuiltInElements == "boolean" && (be.allowCustomizedBuiltInElements = D.allowCustomizedBuiltInElements), re && (st = !1), Nt && (dt = !0), ft && (g = Ee({}, Gr), U = bi(null), ft.html === !0 && (Ee(g, Wr), Ee(U, jr)), ft.svg === !0 && (Ee(g, Ko), Ee(U, Vo), Ee(U, po)), ft.svgFilters === !0 && (Ee(g, Yo), Ee(U, Vo), Ee(U, po)), ft.mathMl === !0 && (Ee(g, qo), Ee(U, Kr), Ee(U, po))), Je.tagCheck = null, Je.attributeCheck = null, tt(v, "ADD_TAGS") && (typeof v.ADD_TAGS == "function" ? Je.tagCheck = v.ADD_TAGS : At(v.ADD_TAGS) && (g === P && (g = kt(g)), Ee(g, v.ADD_TAGS, Ke))), tt(v, "ADD_ATTR") && (typeof v.ADD_ATTR == "function" ? Je.attributeCheck = v.ADD_ATTR : At(v.ADD_ATTR) && (U === Q && (U = kt(U)), Ee(U, v.ADD_ATTR, Ke))), tt(v, "ADD_URI_SAFE_ATTR") && At(v.ADD_URI_SAFE_ATTR) && Ee(Si, v.ADD_URI_SAFE_ATTR, Ke), tt(v, "FORBID_CONTENTS") && At(v.FORBID_CONTENTS) && (Mt === Hn && (Mt = kt(Mt)), Ee(Mt, v.FORBID_CONTENTS, Ke)), tt(v, "ADD_FORBID_CONTENTS") && At(v.ADD_FORBID_CONTENTS) && (Mt === Hn && (Mt = kt(Mt)), Ee(Mt, v.ADD_FORBID_CONTENTS, Ke)), _e && (g["#text"] = !0), Le && Ee(g, ["html", "head", "body"]), g.table && (Ee(g, ["tbody"]), delete Te.tbody), v.TRUSTED_TYPES_POLICY) {
11086
11086
  if (typeof v.TRUSTED_TYPES_POLICY.createHTML != "function")
11087
11087
  throw hi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
11088
11088
  if (typeof v.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -11091,20 +11091,20 @@ function Ha() {
11091
11091
  w = v.TRUSTED_TYPES_POLICY;
11092
11092
  try {
11093
11093
  J = le("");
11094
- } catch (Re) {
11095
- throw w = q, Re;
11094
+ } catch (Me) {
11095
+ throw w = q, Me;
11096
11096
  }
11097
11097
  } else
11098
11098
  w === void 0 && v.TRUSTED_TYPES_POLICY !== null && (w = zg(S, s)), w && typeof J == "string" && (J = le(""));
11099
- (N.uponSanitizeElement.length > 0 || N.uponSanitizeAttribute.length > 0) && g === P && (g = kt(g)), N.uponSanitizeAttribute.length > 0 && U === Q && (U = kt(U)), Ct && Ct(v), Rn = v;
11100
- }, Ni = Ee({}, [...Ko, ...Yo, ...wg]), Mn = Ee({}, [...qo, ...Eg]), Mo = function(v) {
11099
+ (N.uponSanitizeElement.length > 0 || N.uponSanitizeAttribute.length > 0) && g === P && (g = kt(g)), N.uponSanitizeAttribute.length > 0 && U === Q && (U = kt(U)), Ct && Ct(v), Mn = v;
11100
+ }, Ni = Ee({}, [...Ko, ...Yo, ...wg]), Rn = Ee({}, [...qo, ...Eg]), Ro = function(v) {
11101
11101
  let D = C(v);
11102
11102
  (!D || !D.tagName) && (D = {
11103
11103
  namespaceURI: Nn,
11104
11104
  tagName: "template"
11105
11105
  });
11106
- const q = Hi(v.tagName), Re = Hi(D.tagName);
11107
- return Ai[v.namespaceURI] ? v.namespaceURI === ei ? D.namespaceURI === Kt ? q === "svg" : D.namespaceURI === Qn ? q === "svg" && (Re === "annotation-xml" || _i[Re]) : !!Ni[q] : v.namespaceURI === Qn ? D.namespaceURI === Kt ? q === "math" : D.namespaceURI === ei ? q === "math" && Ci[Re] : !!Mn[q] : v.namespaceURI === Kt ? D.namespaceURI === ei && !Ci[Re] || D.namespaceURI === Qn && !_i[Re] ? !1 : !Mn[q] && (No[q] || !Ni[q]) : !!(Fn === "application/xhtml+xml" && Ai[v.namespaceURI]) : !1;
11106
+ const q = Hi(v.tagName), Me = Hi(D.tagName);
11107
+ return Ai[v.namespaceURI] ? v.namespaceURI === ei ? D.namespaceURI === Kt ? q === "svg" : D.namespaceURI === Qn ? q === "svg" && (Me === "annotation-xml" || _i[Me]) : !!Ni[q] : v.namespaceURI === Qn ? D.namespaceURI === Kt ? q === "math" : D.namespaceURI === ei ? q === "math" && Ci[Me] : !!Rn[q] : v.namespaceURI === Kt ? D.namespaceURI === ei && !Ci[Me] || D.namespaceURI === Qn && !_i[Me] ? !1 : !Rn[q] && (No[q] || !Ni[q]) : !!(Fn === "application/xhtml+xml" && Ai[v.namespaceURI]) : !1;
11108
11108
  }, Lt = function(v) {
11109
11109
  pi(n.removed, {
11110
11110
  element: v
@@ -11112,7 +11112,7 @@ function Ha() {
11112
11112
  try {
11113
11113
  C(v).removeChild(v);
11114
11114
  } catch {
11115
- R(v);
11115
+ M(v);
11116
11116
  }
11117
11117
  }, un = function(v, D) {
11118
11118
  try {
@@ -11137,7 +11137,7 @@ function Ha() {
11137
11137
  D.setAttribute(v, "");
11138
11138
  } catch {
11139
11139
  }
11140
- }, Ri = function(v) {
11140
+ }, Mi = function(v) {
11141
11141
  let D = null, q = null;
11142
11142
  if (jt)
11143
11143
  v = "<remove></remove>" + v;
@@ -11146,16 +11146,16 @@ function Ha() {
11146
11146
  q = $e && $e[0];
11147
11147
  }
11148
11148
  Fn === "application/xhtml+xml" && Nn === Kt && (v = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + v + "</body></html>");
11149
- const Re = w ? le(v) : v;
11149
+ const Me = w ? le(v) : v;
11150
11150
  if (Nn === Kt)
11151
11151
  try {
11152
- D = new m().parseFromString(Re, Fn);
11152
+ D = new m().parseFromString(Me, Fn);
11153
11153
  } catch {
11154
11154
  }
11155
11155
  if (!D || !D.documentElement) {
11156
11156
  D = ge.createDocument(Nn, "template", null);
11157
11157
  try {
11158
- D.documentElement.innerHTML = Ti ? J : Re;
11158
+ D.documentElement.innerHTML = Ti ? J : Me;
11159
11159
  } catch {
11160
11160
  }
11161
11161
  }
@@ -11172,19 +11172,19 @@ function Ha() {
11172
11172
  }, Wn = function(v) {
11173
11173
  var D, q;
11174
11174
  v.normalize();
11175
- const Re = ee.call(
11175
+ const Me = ee.call(
11176
11176
  v.ownerDocument || v,
11177
11177
  v,
11178
11178
  // eslint-disable-next-line no-bitwise
11179
11179
  c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION,
11180
11180
  null
11181
11181
  );
11182
- let xe = Re.nextNode();
11182
+ let xe = Me.nextNode();
11183
11183
  for (; xe; ) {
11184
11184
  let Ye = xe.data;
11185
- Gn([j, W, V], (Mt) => {
11186
- Ye = gi(Ye, Mt, " ");
11187
- }), xe.data = Ye, xe = Re.nextNode();
11185
+ Gn([j, W, V], (Rt) => {
11186
+ Ye = gi(Ye, Rt, " ");
11187
+ }), xe.data = Ye, xe = Me.nextNode();
11188
11188
  }
11189
11189
  const $e = (D = (q = v.querySelectorAll) === null || q === void 0 ? void 0 : q.call(v, "template")) !== null && D !== void 0 ? D : [];
11190
11190
  Gn(Array.from($e), (Ye) => {
@@ -11235,7 +11235,7 @@ function Ha() {
11235
11235
  };
11236
11236
  function $t(z, v, D) {
11237
11237
  Gn(z, (q) => {
11238
- q.call(n, v, D, Rn);
11238
+ q.call(n, v, D, Mn);
11239
11239
  });
11240
11240
  }
11241
11241
  const si = function(v) {
@@ -11251,19 +11251,19 @@ function Ha() {
11251
11251
  if (Te[q] || !(Je.tagCheck instanceof Function && Je.tagCheck(q)) && !g[q]) {
11252
11252
  if (!Te[q] && Se(q) && (be.tagNameCheck instanceof RegExp && ht(be.tagNameCheck, q) || be.tagNameCheck instanceof Function && be.tagNameCheck(q)))
11253
11253
  return !1;
11254
- if (_e && !Rt[q]) {
11254
+ if (_e && !Mt[q]) {
11255
11255
  const xe = C(v), $e = $(v);
11256
11256
  if ($e && xe) {
11257
11257
  const Ye = $e.length;
11258
- for (let Mt = Ye - 1; Mt >= 0; --Mt) {
11259
- const It = H($e[Mt], !0);
11258
+ for (let Rt = Ye - 1; Rt >= 0; --Rt) {
11259
+ const It = H($e[Rt], !0);
11260
11260
  xe.insertBefore(It, F(v));
11261
11261
  }
11262
11262
  }
11263
11263
  }
11264
11264
  return Lt(v), !0;
11265
11265
  }
11266
- return (f ? f(v) : v.nodeType) === hn.element && !Mo(v) || (q === "noscript" || q === "noembed" || q === "noframes") && ht(/<\/no(script|embed|frames)/i, v.innerHTML) ? (Lt(v), !0) : (re && v.nodeType === hn.text && (D = v.textContent, Gn([j, W, V], (xe) => {
11266
+ return (f ? f(v) : v.nodeType) === hn.element && !Ro(v) || (q === "noscript" || q === "noembed" || q === "noframes") && ht(/<\/no(script|embed|frames)/i, v.innerHTML) ? (Lt(v), !0) : (re && v.nodeType === hn.text && (D = v.textContent, Gn([j, W, V], (xe) => {
11267
11267
  D = gi(D, xe, " ");
11268
11268
  }), v.textContent !== D && (pi(n.removed, {
11269
11269
  element: v.cloneNode()
@@ -11271,10 +11271,10 @@ function Ha() {
11271
11271
  }, Qt = function(v, D, q) {
11272
11272
  if (ot[D] || Y && (D === "id" || D === "name") && (q in t || q in Qi))
11273
11273
  return !1;
11274
- const Re = U[D] || Je.attributeCheck instanceof Function && Je.attributeCheck(D, v);
11274
+ const Me = U[D] || Je.attributeCheck instanceof Function && Je.attributeCheck(D, v);
11275
11275
  if (!(st && !ot[D] && ht(he, D))) {
11276
11276
  if (!(ut && ht(Oe, D))) {
11277
- if (!Re || ot[D]) {
11277
+ if (!Me || ot[D]) {
11278
11278
  if (
11279
11279
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
11280
11280
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
@@ -11310,9 +11310,9 @@ function Ha() {
11310
11310
  allowedAttributes: U,
11311
11311
  forceKeepAttr: void 0
11312
11312
  };
11313
- let Re = D.length;
11314
- for (; Re--; ) {
11315
- const xe = D[Re], $e = xe.name, Ye = xe.namespaceURI, Mt = xe.value, It = Ke($e), en = Mt;
11313
+ let Me = D.length;
11314
+ for (; Me--; ) {
11315
+ const xe = D[Me], $e = xe.name, Ye = xe.namespaceURI, Rt = xe.value, It = Ke($e), en = Rt;
11316
11316
  let nt = $e === "value" ? en : hg(en);
11317
11317
  if (q.attrName = It, q.attrValue = nt, q.keepAttr = !0, q.forceKeepAttr = void 0, $t(N.uponSanitizeAttribute, v, q), nt = q.attrValue, ne && (It === "id" || It === "name") && Ur(nt, ye) !== 0 && (un($e, v), nt = ye + nt), mt && ht(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, nt)) {
11318
11318
  un($e, v);
@@ -11335,13 +11335,13 @@ function Ha() {
11335
11335
  re && Gn([j, W, V], (kn) => {
11336
11336
  nt = gi(nt, kn, " ");
11337
11337
  });
11338
- const Mi = Ke(v.nodeName);
11339
- if (!Qt(Mi, It, nt)) {
11338
+ const Ri = Ke(v.nodeName);
11339
+ if (!Qt(Ri, It, nt)) {
11340
11340
  un($e, v);
11341
11341
  continue;
11342
11342
  }
11343
11343
  if (w && typeof S == "object" && typeof S.getAttributeType == "function" && !Ye)
11344
- switch (S.getAttributeType(Mi, It)) {
11344
+ switch (S.getAttributeType(Ri, It)) {
11345
11345
  case "TrustedHTML": {
11346
11346
  nt = le(nt);
11347
11347
  break;
@@ -11377,11 +11377,11 @@ function Ha() {
11377
11377
  const q = $ ? $(v) : v.childNodes;
11378
11378
  if (!q)
11379
11379
  return;
11380
- const Re = [];
11380
+ const Me = [];
11381
11381
  Gn(q, (xe) => {
11382
- pi(Re, xe);
11382
+ pi(Me, xe);
11383
11383
  });
11384
- for (const xe of Re)
11384
+ for (const xe of Me)
11385
11385
  dn(xe);
11386
11386
  if (D === hn.element) {
11387
11387
  const xe = O ? O(v) : null;
@@ -11392,15 +11392,15 @@ function Ha() {
11392
11392
  }
11393
11393
  };
11394
11394
  return n.sanitize = function(z) {
11395
- let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, D = null, q = null, Re = null, xe = null;
11395
+ let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, D = null, q = null, Me = null, xe = null;
11396
11396
  if (Ti = !z, Ti && (z = "<!-->"), typeof z != "string" && !oi(z) && (z = kg(z), typeof z != "string"))
11397
11397
  throw hi("dirty is not a string, aborting");
11398
11398
  if (!n.isSupported)
11399
11399
  return z;
11400
11400
  if (ze || ti(v), n.removed = [], typeof z == "string" && (je = !1), je) {
11401
- const Mt = O ? O(z) : z.nodeName;
11402
- if (typeof Mt == "string") {
11403
- const It = Ke(Mt);
11401
+ const Rt = O ? O(z) : z.nodeName;
11402
+ if (typeof Rt == "string") {
11403
+ const It = Ke(Rt);
11404
11404
  if (!g[It] || Te[It])
11405
11405
  throw hi("root node is forbidden and cannot be sanitized in-place");
11406
11406
  }
@@ -11408,18 +11408,18 @@ function Ha() {
11408
11408
  throw hi("root node is clobbered and cannot be sanitized in-place");
11409
11409
  dn(z);
11410
11410
  } else if (oi(z))
11411
- D = Ri("<!---->"), q = D.ownerDocument.importNode(z, !0), q.nodeType === hn.element && q.nodeName === "BODY" || q.nodeName === "HTML" ? D = q : D.appendChild(q), dn(q);
11411
+ D = Mi("<!---->"), q = D.ownerDocument.importNode(z, !0), q.nodeType === hn.element && q.nodeName === "BODY" || q.nodeName === "HTML" ? D = q : D.appendChild(q), dn(q);
11412
11412
  else {
11413
11413
  if (!dt && !re && !Le && // eslint-disable-next-line unicorn/prefer-includes
11414
11414
  z.indexOf("<") === -1)
11415
11415
  return w && wt ? le(z) : z;
11416
- if (D = Ri(z), !D)
11416
+ if (D = Mi(z), !D)
11417
11417
  return dt ? null : wt ? J : "";
11418
11418
  }
11419
11419
  D && jt && Lt(D.firstChild);
11420
11420
  const $e = ni(je ? z : D);
11421
- for (; Re = $e.nextNode(); )
11422
- si(Re), to(Re), In(Re.content) && pt(Re.content);
11421
+ for (; Me = $e.nextNode(); )
11422
+ si(Me), to(Me), In(Me.content) && pt(Me.content);
11423
11423
  if (je)
11424
11424
  return re && Wn(z), z;
11425
11425
  if (dt) {
@@ -11431,19 +11431,19 @@ function Ha() {
11431
11431
  return (U.shadowroot || U.shadowrootmode) && (xe = L.call(i, xe, !0)), xe;
11432
11432
  }
11433
11433
  let Ye = Le ? D.outerHTML : D.innerHTML;
11434
- return Le && g["!doctype"] && D.ownerDocument && D.ownerDocument.doctype && D.ownerDocument.doctype.name && ht(Mg, D.ownerDocument.doctype.name) && (Ye = "<!DOCTYPE " + D.ownerDocument.doctype.name + `>
11435
- ` + Ye), re && Gn([j, W, V], (Mt) => {
11436
- Ye = gi(Ye, Mt, " ");
11434
+ return Le && g["!doctype"] && D.ownerDocument && D.ownerDocument.doctype && D.ownerDocument.doctype.name && ht(Rg, D.ownerDocument.doctype.name) && (Ye = "<!DOCTYPE " + D.ownerDocument.doctype.name + `>
11435
+ ` + Ye), re && Gn([j, W, V], (Rt) => {
11436
+ Ye = gi(Ye, Rt, " ");
11437
11437
  }), w && wt ? le(Ye) : Ye;
11438
11438
  }, n.setConfig = function() {
11439
11439
  let z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11440
11440
  ti(z), ze = !0;
11441
11441
  }, n.clearConfig = function() {
11442
- Rn = null, ze = !1;
11442
+ Mn = null, ze = !1;
11443
11443
  }, n.isValidAttribute = function(z, v, D) {
11444
- Rn || ti({});
11445
- const q = Ke(z), Re = Ke(v);
11446
- return Qt(q, Re, D);
11444
+ Mn || ti({});
11445
+ const q = Ke(z), Me = Ke(v);
11446
+ return Qt(q, Me, D);
11447
11447
  }, n.addHook = function(z, v) {
11448
11448
  typeof v == "function" && pi(N[z], v);
11449
11449
  }, n.removeHook = function(z, v) {
@@ -11615,7 +11615,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11615
11615
  const H = se(() => {
11616
11616
  var y, g;
11617
11617
  return !!((g = (y = t.selectedNode) == null ? void 0 : y.link) != null && g.url);
11618
- }), R = se(() => {
11618
+ }), M = se(() => {
11619
11619
  var y, g;
11620
11620
  return !!((g = (y = t.selectedNode) == null ? void 0 : y.image) != null && g.src);
11621
11621
  }), F = se(() => {
@@ -11725,7 +11725,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11725
11725
  }
11726
11726
  const Ne = se(() => {
11727
11727
  const y = [];
11728
- return a.value || y.push(`${s.value.length} 字`), H.value && y.push("1 链接"), R.value && y.push("1 图片"), $.value && y.push("代码块"), C.value && y.push("表格"), y.length === 0 ? "节点没有额外内容" : y.join(" · ");
11728
+ return a.value || y.push(`${s.value.length} 字`), H.value && y.push("1 链接"), M.value && y.push("1 图片"), $.value && y.push("代码块"), C.value && y.push("表格"), y.length === 0 ? "节点没有额外内容" : y.join(" · ");
11729
11729
  });
11730
11730
  return (y, g) => {
11731
11731
  var P, U, Q, be;
@@ -11785,7 +11785,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11785
11785
  class: "zm-note-add-chip",
11786
11786
  onClick: g[1] || (g[1] = (Te) => E.value = !0)
11787
11787
  }, "+ 链接")) : K("", !0),
11788
- !R.value && !b.value ? (k(), x("button", {
11788
+ !M.value && !b.value ? (k(), x("button", {
11789
11789
  key: 1,
11790
11790
  class: "zm-note-add-chip",
11791
11791
  onClick: g[2] || (g[2] = (Te) => b.value = !0)
@@ -11825,7 +11825,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11825
11825
  title: (U = e.selectedNode.link) == null ? void 0 : U.url
11826
11826
  }, ae((Q = e.selectedNode.link) == null ? void 0 : Q.url), 9, sh)) : K("", !0)
11827
11827
  ])) : K("", !0),
11828
- R.value || b.value ? (k(), x("section", rh, [
11828
+ M.value || b.value ? (k(), x("section", rh, [
11829
11829
  g[16] || (g[16] = u("header", { class: "zm-note-section-head" }, [
11830
11830
  u("span", { class: "zm-note-section-title" }, "图片")
11831
11831
  ], -1)),
@@ -11840,7 +11840,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11840
11840
  }, null, 40, ah), [
11841
11841
  [Xt, Z.value]
11842
11842
  ]),
11843
- R.value ? (k(), x("img", {
11843
+ M.value ? (k(), x("img", {
11844
11844
  key: 0,
11845
11845
  class: "zm-note-image",
11846
11846
  src: (be = e.selectedNode.image) == null ? void 0 : be.src,
@@ -11924,10 +11924,10 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11924
11924
  }, _h = ["innerHTML"], Ch = {
11925
11925
  key: 1,
11926
11926
  class: "zm-rich-table"
11927
- }, Nh = ["onClick"], Rh = {
11927
+ }, Nh = ["onClick"], Mh = {
11928
11928
  class: "zm-rich-sort-mark",
11929
11929
  "aria-hidden": "true"
11930
- }, Mh = {
11930
+ }, Rh = {
11931
11931
  key: 2,
11932
11932
  class: "zm-text"
11933
11933
  }, Ih = {
@@ -11949,7 +11949,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
11949
11949
  },
11950
11950
  emits: ["change", "select", "edit-note", "markdownChange", "canvas-toggle-preview", "canvas-outline", "canvas-settings", "canvas-data", "canvas-import"],
11951
11951
  setup(e, { expose: n, emit: t }) {
11952
- const i = e, s = t, l = G(null), a = G(null), d = G(""), c = G(/* @__PURE__ */ new Set()), h = se(() => c.value.values().next().value ?? null), m = G(/* @__PURE__ */ new Set()), S = G(!1), A = G(null), H = G(0), R = G(0), F = G(null), $ = G(null), C = G(null), E = G(""), b = G(/* @__PURE__ */ new Map()), f = G(rn(i.data)), O = G({}), w = G({}), J = G(i.markdown !== void 0);
11952
+ const i = e, s = t, l = G(null), a = G(null), d = G(""), c = G(/* @__PURE__ */ new Set()), h = se(() => c.value.values().next().value ?? null), m = G(/* @__PURE__ */ new Set()), S = G(!1), A = G(null), H = G(0), M = G(0), F = G(null), $ = G(null), C = G(null), E = G(""), b = G(/* @__PURE__ */ new Map()), f = G(rn(i.data)), O = G({}), w = G({}), J = G(i.markdown !== void 0);
11953
11953
  let Z = !1;
11954
11954
  _t(
11955
11955
  () => i.markdown,
@@ -12004,11 +12004,11 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12004
12004
  T.onload = () => {
12005
12005
  const B = me(f.value, o);
12006
12006
  if (!B) return;
12007
- const M = T.naturalWidth && T.naturalHeight ? T.naturalWidth / T.naturalHeight : 1, X = j(
12007
+ const R = T.naturalWidth && T.naturalHeight ? T.naturalWidth / T.naturalHeight : 1, X = j(
12008
12008
  T.naturalWidth || Pn,
12009
12009
  jn,
12010
12010
  mi
12011
- ), de = Math.round(X / M);
12011
+ ), de = Math.round(X / R);
12012
12012
  B.image = {
12013
12013
  src: p,
12014
12014
  naturalW: T.naturalWidth || X,
@@ -12028,8 +12028,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12028
12028
  if (typeof p.result != "string") return;
12029
12029
  const I = p.result, T = new window.Image();
12030
12030
  T.onload = () => {
12031
- const B = T.naturalWidth || Pn, M = T.naturalHeight || Pn, X = j(B, jn, Pn), de = j(Math.round(M * X / B), jn, mi);
12032
- r({ src: I, naturalW: B, naturalH: M, width: X, height: de });
12031
+ const B = T.naturalWidth || Pn, R = T.naturalHeight || Pn, X = j(B, jn, Pn), de = j(Math.round(R * X / B), jn, mi);
12032
+ r({ src: I, naturalW: B, naturalH: R, width: X, height: de });
12033
12033
  }, T.onerror = () => {
12034
12034
  r({ src: I, naturalW: Pn, naturalH: Pn, width: Pn, height: Pn });
12035
12035
  }, T.src = I;
@@ -12127,7 +12127,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12127
12127
  const r = h.value;
12128
12128
  r && De(r, o);
12129
12129
  }
12130
- function Rt() {
12130
+ function Mt() {
12131
12131
  const o = h.value;
12132
12132
  o && He(o);
12133
12133
  }
@@ -12203,12 +12203,12 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12203
12203
  const o = (Ze = y.value) == null ? void 0 : Ze.nodeId;
12204
12204
  if (!o) return;
12205
12205
  const r = (_ = me(f.value, o)) == null ? void 0 : _.richContent, p = (r == null ? void 0 : r.kind) === "code" ? vo(r.raw) : "", I = (r == null ? void 0 : r.kind) === "code" && r.lang || "", T = I ? "```" + I + `
12206
- ` : "```\n", M = window.prompt(
12206
+ ` : "```\n", R = window.prompt(
12207
12207
  "输入代码块内容(用 ```lang 包裹;留空取消)",
12208
12208
  p ? T + p + (p.endsWith("```") ? "" : "\n```") : T + "// 你的代码" + "\n```"
12209
12209
  );
12210
- if (M === null) return;
12211
- const X = M.trim();
12210
+ if (R === null) return;
12211
+ const X = R.trim();
12212
12212
  if (!X) {
12213
12213
  Ne(o, null);
12214
12214
  return;
@@ -12216,14 +12216,14 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12216
12216
  const de = /^```([^\s`]*)/.exec(X), we = de ? de[1] : void 0;
12217
12217
  Ne(o, { kind: "code", raw: X, lang: we });
12218
12218
  }
12219
- function Ro() {
12219
+ function Mo() {
12220
12220
  var r;
12221
12221
  const o = (r = y.value) == null ? void 0 : r.nodeId;
12222
12222
  o && Ne(o, null);
12223
12223
  }
12224
12224
  function Ke() {
12225
- var M, X;
12226
- const o = (M = y.value) == null ? void 0 : M.nodeId;
12225
+ var R, X;
12226
+ const o = (R = y.value) == null ? void 0 : R.nodeId;
12227
12227
  if (!o) return;
12228
12228
  const r = (X = me(f.value, o)) == null ? void 0 : X.richContent, p = (r == null ? void 0 : r.kind) === "table" ? r.raw : "", T = window.prompt(
12229
12229
  "输入 markdown 表格(每行以 | 分隔;留空取消)",
@@ -12239,7 +12239,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12239
12239
  }
12240
12240
  Ne(o, { kind: "table", raw: B });
12241
12241
  }
12242
- function Rn() {
12242
+ function Mn() {
12243
12243
  var r;
12244
12244
  const o = (r = y.value) == null ? void 0 : r.nodeId;
12245
12245
  o && Ne(o, null);
@@ -12262,9 +12262,9 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12262
12262
  const I = (T = o.clipboardData) == null ? void 0 : T.items;
12263
12263
  if (I)
12264
12264
  for (let B = 0; B < I.length; B++) {
12265
- const M = I[B];
12266
- if (M.kind === "file" && M.type.startsWith("image/")) {
12267
- const X = M.getAsFile();
12265
+ const R = I[B];
12266
+ if (R.kind === "file" && R.type.startsWith("image/")) {
12267
+ const X = R.getAsFile();
12268
12268
  if (!X) continue;
12269
12269
  o.preventDefault();
12270
12270
  const de = me(f.value, p);
@@ -12288,15 +12288,15 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12288
12288
  o.preventDefault(), s("canvas-outline");
12289
12289
  }
12290
12290
  }
12291
- const Mn = G(null), Mo = se(() => {
12291
+ const Rn = G(null), Ro = se(() => {
12292
12292
  var o;
12293
- return ((o = Mn.value) == null ? void 0 : o.nodeId) ?? null;
12293
+ return ((o = Rn.value) == null ? void 0 : o.nodeId) ?? null;
12294
12294
  });
12295
12295
  function Lt(o, r) {
12296
12296
  if (!r.image) return;
12297
12297
  o.preventDefault(), o.stopPropagation();
12298
12298
  const p = r.image.naturalW || r.image.width, I = r.image.naturalH || r.image.height, T = I > 0 ? I / p : 1;
12299
- Mn.value = {
12299
+ Rn.value = {
12300
12300
  nodeId: r.id,
12301
12301
  startX: o.clientX,
12302
12302
  startY: o.clientY,
@@ -12307,26 +12307,26 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12307
12307
  ratio: T,
12308
12308
  pendingW: r.image.width,
12309
12309
  pendingH: r.image.height
12310
- }, window.addEventListener("mousemove", un), window.addEventListener("mouseup", Ri);
12310
+ }, window.addEventListener("mousemove", un), window.addEventListener("mouseup", Mi);
12311
12311
  }
12312
12312
  function un(o) {
12313
12313
  var de, we;
12314
- const r = Mn.value;
12314
+ const r = Rn.value;
12315
12315
  if (!r) return;
12316
12316
  const p = fe.scale.value || 1, I = o.clientX - r.startX, T = j(r.startW + I / p, jn, mi), B = j(T * r.ratio, jn, mi);
12317
12317
  r.pendingW = T, r.pendingH = B;
12318
- const M = (de = l.value) == null ? void 0 : de.querySelector(
12318
+ const R = (de = l.value) == null ? void 0 : de.querySelector(
12319
12319
  `[data-node-id="${r.nodeId}"] .zm-node-img`
12320
12320
  );
12321
- M && (M.style.width = `${T}px`, M.style.height = `${B}px`);
12321
+ R && (R.style.width = `${T}px`, R.style.height = `${B}px`);
12322
12322
  const X = (we = l.value) == null ? void 0 : we.querySelector(
12323
12323
  `[data-node-id="${r.nodeId}"]`
12324
12324
  );
12325
12325
  X && (X.style.minWidth = `${Math.max(80, Math.ceil(T + 28))}px`, X.style.height = `${Math.ceil(B + 8 + 30)}px`);
12326
12326
  }
12327
- function Ri() {
12328
- const o = Mn.value;
12329
- if (window.removeEventListener("mousemove", un), window.removeEventListener("mouseup", Ri), Mn.value = null, !o) return;
12327
+ function Mi() {
12328
+ const o = Rn.value;
12329
+ if (window.removeEventListener("mousemove", un), window.removeEventListener("mouseup", Mi), Rn.value = null, !o) return;
12330
12330
  const r = me(f.value, o.nodeId);
12331
12331
  !r || !r.image || (oe(o.nodeId, {
12332
12332
  src: r.image.src,
@@ -12349,7 +12349,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12349
12349
  if (!r.text || r.text.length < 14) return;
12350
12350
  const I = o.currentTarget.getBoundingClientRect(), T = (Dt = l.value) == null ? void 0 : Dt.getBoundingClientRect();
12351
12351
  if (!T) return;
12352
- const B = 10, M = 240, X = I.top - T.top > 60, de = I.left - T.left + I.width / 2, we = B + M / 2, Ze = T.width - M / 2 - B, _ = Math.max(we, Math.min(de, Ze)), rt = X ? I.top - T.top - 8 : I.bottom - T.top + 8;
12352
+ const B = 10, R = 240, X = I.top - T.top > 60, de = I.left - T.left + I.width / 2, we = B + R / 2, Ze = T.width - R / 2 - B, _ = Math.max(we, Math.min(de, Ze)), rt = X ? I.top - T.top - 8 : I.bottom - T.top + 8;
12353
12353
  $.value = { text: r.text, x: _, y: rt, above: X };
12354
12354
  }
12355
12355
  const $t = G(0), si = G(!1), Qt = gc(100);
@@ -12371,12 +12371,12 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12371
12371
  for (; T && !B; )
12372
12372
  B = T.getAttribute("data-node-id"), T = T.parentElement;
12373
12373
  if (!B) return;
12374
- const M = I.offsetHeight, X = I.scrollWidth, de = Math.round(M * 2) / 2, we = Math.round(X * 2) / 2;
12374
+ const R = I.offsetHeight, X = I.scrollWidth, de = Math.round(R * 2) / 2, we = Math.round(X * 2) / 2;
12375
12375
  r[B] = de, p[B] = we, O.value[B], w.value[B];
12376
12376
  }), O.value = r, w.value = p;
12377
12377
  }
12378
12378
  const pt = se(() => {
12379
- var o, r, p, I, T, B, M, X, de, we;
12379
+ var o, r, p, I, T, B, R, X, de, we;
12380
12380
  return {
12381
12381
  rootBg: ((o = i.theme) == null ? void 0 : o.rootBg) ?? "#1f2937",
12382
12382
  rootText: ((r = i.theme) == null ? void 0 : r.rootText) ?? "#ffffff",
@@ -12384,7 +12384,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12384
12384
  branchText: ((I = i.theme) == null ? void 0 : I.branchText) ?? "#1f2937",
12385
12385
  lineColor: ((T = i.theme) == null ? void 0 : T.lineColor) ?? "#94a3b8",
12386
12386
  bgColor: ((B = i.theme) == null ? void 0 : B.bgColor) ?? "#f8fafc",
12387
- fontSize: ((M = i.theme) == null ? void 0 : M.fontSize) ?? 14,
12387
+ fontSize: ((R = i.theme) == null ? void 0 : R.fontSize) ?? 14,
12388
12388
  lineWidthStart: ((X = i.theme) == null ? void 0 : X.lineWidthStart) ?? 2.2,
12389
12389
  lineWidthEnd: ((de = i.theme) == null ? void 0 : de.lineWidthEnd) ?? 0.8,
12390
12390
  rainbowBranch: ((we = i.theme) == null ? void 0 : we.rainbowBranch) ?? !1
@@ -12403,29 +12403,29 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12403
12403
  canvasBg: void 0
12404
12404
  });
12405
12405
  function v(o) {
12406
- return z.taperedEdge ? q(o) : Re(o);
12406
+ return z.taperedEdge ? q(o) : Me(o);
12407
12407
  }
12408
12408
  function D(o) {
12409
- return z.taperedEdge ? z.lineWidthEnd : Re(o);
12409
+ return z.taperedEdge ? z.lineWidthEnd : Me(o);
12410
12410
  }
12411
12411
  function q(o) {
12412
12412
  return o <= 0 ? z.lineWidthStart : o === 1 ? Math.max(1.5, z.lineWidthStart * 0.67) : o === 2 ? Math.max(0.8, z.lineWidthStart * 0.42) : z.lineWidthEnd;
12413
12413
  }
12414
- function Re(o) {
12414
+ function Me(o) {
12415
12415
  if (o <= 0) return z.lineWidthStart;
12416
12416
  if (o >= 3) return z.lineWidthEnd;
12417
12417
  const r = o / 3;
12418
12418
  return z.lineWidthStart + (z.lineWidthEnd - z.lineWidthStart) * r;
12419
12419
  }
12420
12420
  function xe(o, r, p, I) {
12421
- const T = 1 - o, B = T * T * T * r.x + 3 * T * T * o * p.x1 + 3 * T * o * o * p.x2 + o * o * o * I.x, M = T * T * T * r.y + 3 * T * T * o * p.y1 + 3 * T * o * o * p.y2 + o * o * o * I.y;
12422
- return { x: B, y: M };
12421
+ const T = 1 - o, B = T * T * T * r.x + 3 * T * T * o * p.x1 + 3 * T * o * o * p.x2 + o * o * o * I.x, R = T * T * T * r.y + 3 * T * T * o * p.y1 + 3 * T * o * o * p.y2 + o * o * o * I.y;
12422
+ return { x: B, y: R };
12423
12423
  }
12424
- function $e(o, r, p, I, T = 32, B = "curve", M = "right") {
12424
+ function $e(o, r, p, I, T = 32, B = "curve", R = "right") {
12425
12425
  if (B === "curve") {
12426
12426
  let Ot;
12427
- if (M === "right" || M === "left") {
12428
- const We = Math.abs(r.x - o.x) * 0.45, sn = M === "right" ? 1 : -1;
12427
+ if (R === "right" || R === "left") {
12428
+ const We = Math.abs(r.x - o.x) * 0.45, sn = R === "right" ? 1 : -1;
12429
12429
  Ot = { x1: o.x + sn * We, y1: o.y, x2: r.x - sn * We, y2: r.y };
12430
12430
  } else {
12431
12431
  const We = Math.abs(r.y - o.y) * 0.45;
@@ -12453,19 +12453,19 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12453
12453
  const Ze = -de / we, _ = X / we, rt = p / 2, Dt = I / 2, ke = { x: o.x + Ze * rt, y: o.y + _ * rt }, St = { x: o.x - Ze * rt, y: o.y - _ * rt }, En = { x: r.x - Ze * Dt, y: r.y - _ * Dt }, bt = { x: r.x + Ze * Dt, y: r.y + _ * Dt };
12454
12454
  return `M ${ke.x.toFixed(2)} ${ke.y.toFixed(2)} L ${bt.x.toFixed(2)} ${bt.y.toFixed(2)} L ${En.x.toFixed(2)} ${En.y.toFixed(2)} L ${St.x.toFixed(2)} ${St.y.toFixed(2)} Z`;
12455
12455
  }
12456
- const Ye = se(() => Et.value.root.children), Mt = _n[0].colors, It = se(
12456
+ const Ye = se(() => Et.value.root.children), Rt = _n[0].colors, It = se(
12457
12457
  () => Ql(z.branchPaletteId, z.customPalettes)
12458
12458
  ), en = se(() => {
12459
12459
  const o = /* @__PURE__ */ new Map();
12460
12460
  if (!z.rainbowBranch) return o;
12461
- const r = i.lineColors, p = r && r.length > 0 ? r : It.value.colors.length > 0 ? It.value.colors : Mt;
12461
+ const r = i.lineColors, p = r && r.length > 0 ? r : It.value.colors.length > 0 ? It.value.colors : Rt;
12462
12462
  for (let T = 0; T < Ye.value.length; T++) {
12463
12463
  const B = Ye.value[T];
12464
12464
  o.set(B.id, p[T % p.length]);
12465
12465
  }
12466
12466
  const I = (T, B) => {
12467
12467
  o.set(T.id, B);
12468
- for (const M of T.children) I(M, B);
12468
+ for (const R of T.children) I(R, B);
12469
12469
  };
12470
12470
  for (let T = 0; T < Ye.value.length; T++) {
12471
12471
  const B = Ye.value[T];
@@ -12476,7 +12476,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12476
12476
  function nt(o, r) {
12477
12477
  return z.rainbowBranch ? en.value.get(r.id) ?? pt.value.lineColor : pt.value.lineColor;
12478
12478
  }
12479
- function Mi(o) {
12479
+ function Ri(o) {
12480
12480
  const r = ce(o.id);
12481
12481
  if (r.bg) return r.bg;
12482
12482
  if (o.isRoot) return pt.value.rootBg;
@@ -12492,7 +12492,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12492
12492
  if (o.isRoot) return pt.value.rootText;
12493
12493
  if (z.rainbowBranch) {
12494
12494
  const p = en.value.get(o.id);
12495
- if (p) return Rs(p, 0.55);
12495
+ if (p) return Ms(p, 0.55);
12496
12496
  }
12497
12497
  return pt.value.branchText;
12498
12498
  }
@@ -12502,7 +12502,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12502
12502
  if (o.isRoot) return pt.value.rootBg;
12503
12503
  if (z.rainbowBranch) {
12504
12504
  const p = en.value.get(o.id);
12505
- if (p) return Rs(p, 0.3);
12505
+ if (p) return Ms(p, 0.3);
12506
12506
  }
12507
12507
  return pt.value.lineColor;
12508
12508
  }
@@ -12514,12 +12514,12 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12514
12514
  return ce(o.id).fontSize ?? o.fontSize ?? pt.value.fontSize;
12515
12515
  }
12516
12516
  function Fa(o, r) {
12517
- const p = o.replace("#", ""), I = p.length === 6 ? p : p.split("").map((X) => X + X).join(""), T = parseInt(I.slice(0, 2), 16), B = parseInt(I.slice(2, 4), 16), M = parseInt(I.slice(4, 6), 16);
12518
- return `rgba(${T}, ${B}, ${M}, ${r})`;
12517
+ const p = o.replace("#", ""), I = p.length === 6 ? p : p.split("").map((X) => X + X).join(""), T = parseInt(I.slice(0, 2), 16), B = parseInt(I.slice(2, 4), 16), R = parseInt(I.slice(4, 6), 16);
12518
+ return `rgba(${T}, ${B}, ${R}, ${r})`;
12519
12519
  }
12520
- function Rs(o, r) {
12521
- const p = o.replace("#", ""), I = p.length === 6 ? p : p.split("").map((X) => X + X).join(""), T = Math.round(parseInt(I.slice(0, 2), 16) * (1 - r)), B = Math.round(parseInt(I.slice(2, 4), 16) * (1 - r)), M = Math.round(parseInt(I.slice(4, 6), 16) * (1 - r));
12522
- return `rgb(${T}, ${B}, ${M})`;
12520
+ function Ms(o, r) {
12521
+ const p = o.replace("#", ""), I = p.length === 6 ? p : p.split("").map((X) => X + X).join(""), T = Math.round(parseInt(I.slice(0, 2), 16) * (1 - r)), B = Math.round(parseInt(I.slice(2, 4), 16) * (1 - r)), R = Math.round(parseInt(I.slice(4, 6), 16) * (1 - r));
12522
+ return `rgb(${T}, ${B}, ${R})`;
12523
12523
  }
12524
12524
  const fe = dc({ getContainer: () => l.value });
12525
12525
  fe.setOnMarqueeEnd(ll), pc({
@@ -12558,7 +12558,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12558
12558
  richHeights: O.value,
12559
12559
  richWidths: w.value
12560
12560
  });
12561
- }), Ms = G([]), ai = se(() => ($t.value, Ms.value));
12561
+ }), Rs = G([]), ai = se(() => ($t.value, Rs.value));
12562
12562
  _t(
12563
12563
  Et,
12564
12564
  (o) => {
@@ -12566,7 +12566,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12566
12566
  r.push(I);
12567
12567
  for (const T of I.children) p(T);
12568
12568
  };
12569
- p(o.root), Ms.value = r;
12569
+ p(o.root), Rs.value = r;
12570
12570
  },
12571
12571
  { immediate: !0 }
12572
12572
  );
@@ -12757,14 +12757,14 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12757
12757
  if (r === 1) {
12758
12758
  const B = bn(f.value, I.id);
12759
12759
  if (B) {
12760
- const M = B.children.findIndex((X) => X.id === I.id);
12761
- M >= 0 && M < B.children.length - 1 && (T = B.children[M + 1].id);
12760
+ const R = B.children.findIndex((X) => X.id === I.id);
12761
+ R >= 0 && R < B.children.length - 1 && (T = B.children[R + 1].id);
12762
12762
  }
12763
12763
  } else if (r === -1) {
12764
12764
  const B = bn(f.value, I.id);
12765
12765
  if (B) {
12766
- const M = B.children.findIndex((X) => X.id === I.id);
12767
- M > 0 && (T = B.children[M - 1].id);
12766
+ const R = B.children.findIndex((X) => X.id === I.id);
12767
+ R > 0 && (T = B.children[R - 1].id);
12768
12768
  }
12769
12769
  } else if (o === 1) {
12770
12770
  const B = bn(f.value, I.id);
@@ -12824,8 +12824,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12824
12824
  let I = null;
12825
12825
  for (const T of ai.value) {
12826
12826
  if (T.id === p) continue;
12827
- const B = T.width / 2, M = T.height / 2;
12828
- o >= T.x - B && o <= T.x + B && r >= T.y - M && r <= T.y + M && (I = T);
12827
+ const B = T.width / 2, R = T.height / 2;
12828
+ o >= T.x - B && o <= T.x + B && r >= T.y - R && r <= T.y + R && (I = T);
12829
12829
  }
12830
12830
  return I;
12831
12831
  }
@@ -12835,11 +12835,11 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12835
12835
  const p = o.target;
12836
12836
  if (p != null && p.closest(".zm-img-resize-handle")) return;
12837
12837
  o.stopPropagation();
12838
- const I = l.value.getBoundingClientRect(), T = r.x * fe.scale.value + fe.offsetX.value, B = r.y * fe.scale.value + fe.offsetY.value, M = o.clientX - I.left - T, X = o.clientY - I.top - B;
12838
+ const I = l.value.getBoundingClientRect(), T = r.x * fe.scale.value + fe.offsetX.value, B = r.y * fe.scale.value + fe.offsetY.value, R = o.clientX - I.left - T, X = o.clientY - I.top - B;
12839
12839
  tn = {
12840
12840
  srcId: r.id,
12841
12841
  srcText: r.text,
12842
- pointerOffsetX: M,
12842
+ pointerOffsetX: R,
12843
12843
  pointerOffsetY: X,
12844
12844
  startX: o.clientX,
12845
12845
  startY: o.clientY
@@ -12847,8 +12847,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12847
12847
  }
12848
12848
  function Ys(o) {
12849
12849
  if (tn) {
12850
- const M = o.clientX - tn.startX, X = o.clientY - tn.startY;
12851
- if (Math.abs(M) <= Vr && Math.abs(X) <= Vr)
12850
+ const R = o.clientX - tn.startX, X = o.clientY - tn.startY;
12851
+ if (Math.abs(R) <= Vr && Math.abs(X) <= Vr)
12852
12852
  return;
12853
12853
  A.value = {
12854
12854
  srcId: tn.srcId,
@@ -12861,7 +12861,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12861
12861
  const r = A.value;
12862
12862
  if (!r) return;
12863
12863
  const p = l.value.getBoundingClientRect();
12864
- H.value = o.clientX - p.left - r.pointerOffsetX, R.value = o.clientY - p.top - r.pointerOffsetY;
12864
+ H.value = o.clientX - p.left - r.pointerOffsetX, M.value = o.clientY - p.top - r.pointerOffsetY;
12865
12865
  const I = (o.clientX - p.left - fe.offsetX.value) / fe.scale.value, T = (o.clientY - p.top - fe.offsetY.value) / fe.scale.value, B = ol(I, T, r.srcId);
12866
12866
  r.currentTargetId = (B == null ? void 0 : B.id) ?? null;
12867
12867
  }
@@ -12871,7 +12871,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12871
12871
  return;
12872
12872
  }
12873
12873
  const r = A.value;
12874
- r && (r.currentTargetId && (Lo(r.srcId, r.currentTargetId, "child"), c.value = /* @__PURE__ */ new Set([r.srcId]), vt()), A.value = null, H.value = 0, R.value = 0, document.body.classList.remove("is-dragging"));
12874
+ r && (r.currentTargetId && (Lo(r.srcId, r.currentTargetId, "child"), c.value = /* @__PURE__ */ new Set([r.srcId]), vt()), A.value = null, H.value = 0, M.value = 0, document.body.classList.remove("is-dragging"));
12875
12875
  }
12876
12876
  let oo = !1;
12877
12877
  function rl(o) {
@@ -12900,9 +12900,9 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12900
12900
  if (o.width < 4 && o.height < 4)
12901
12901
  return;
12902
12902
  const r = o.x, p = o.y, I = o.x + o.width, T = o.y + o.height, B = [];
12903
- for (const M of ai.value) {
12904
- const X = M.width / 2, de = M.height / 2, we = M.x - X, Ze = M.x + X, _ = M.y - de, rt = M.y + de;
12905
- we <= I && Ze >= r && _ <= T && rt >= p && B.push(M.id);
12903
+ for (const R of ai.value) {
12904
+ const X = R.width / 2, de = R.height / 2, we = R.x - X, Ze = R.x + X, _ = R.y - de, rt = R.y + de;
12905
+ we <= I && Ze >= r && _ <= T && rt >= p && B.push(R.id);
12906
12906
  }
12907
12907
  c.value = o.shiftKey ? /* @__PURE__ */ new Set([...c.value, ...B]) : new Set(B), vt();
12908
12908
  }
@@ -12921,9 +12921,9 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12921
12921
  if (!me(f.value, o)) return 0;
12922
12922
  const I = [f.value];
12923
12923
  for (; I.length; ) {
12924
- const T = I.pop(), B = T.children.findIndex((M) => M.id === o);
12924
+ const T = I.pop(), B = T.children.findIndex((R) => R.id === o);
12925
12925
  if (B >= 0) return B;
12926
- for (const M of T.children) I.push(M);
12926
+ for (const R of T.children) I.push(R);
12927
12927
  }
12928
12928
  return 0;
12929
12929
  }
@@ -12932,8 +12932,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12932
12932
  return r === "out" ? { x: o.x, y: o.y + o.height / 2 } : { x: o.x, y: o.y - o.height / 2 };
12933
12933
  let B;
12934
12934
  r === "in" ? B = -o.side : p !== void 0 ? B = p : B = o.side;
12935
- const M = r === "in" ? o._richInsetX ?? 0 : 0;
12936
- return { x: o.x + B * (o.width / 2 - M), y: o.y };
12935
+ const R = r === "in" ? o._richInsetX ?? 0 : 0;
12936
+ return { x: o.x + B * (o.width / 2 - R), y: o.y };
12937
12937
  }
12938
12938
  function xn() {
12939
12939
  const o = Et.value;
@@ -12969,8 +12969,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12969
12969
  return;
12970
12970
  }
12971
12971
  const p = r.toLowerCase(), I = [], T = (B) => {
12972
- var M;
12973
- (B.text.toLowerCase().includes(p) || (M = B.note) != null && M.text && B.note.text.toLowerCase().includes(p)) && I.push(B.id);
12972
+ var R;
12973
+ (B.text.toLowerCase().includes(p) || (R = B.note) != null && R.text && B.note.text.toLowerCase().includes(p)) && I.push(B.id);
12974
12974
  for (const X of B.children) T(X);
12975
12975
  };
12976
12976
  T(f.value), wn.value = I, Oi.value = I.length > 0 ? 0 : -1, I.length > 0 && (vl(I), Ve(() => bl(0)));
@@ -12988,8 +12988,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
12988
12988
  if (o.length === 0) return;
12989
12989
  const r = new Set(o), p = /* @__PURE__ */ new Set(), I = (T) => {
12990
12990
  let B = r.has(T.id);
12991
- for (const M of T.children)
12992
- I(M) && (B = !0);
12991
+ for (const R of T.children)
12992
+ I(R) && (B = !0);
12993
12993
  return B && T.children.length > 0 && m.value.has(T.id) && p.add(T.id), B;
12994
12994
  };
12995
12995
  if (I(f.value), p.size > 0) {
@@ -13045,10 +13045,10 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13045
13045
  return r != null && r.tags ? [...r.tags] : [];
13046
13046
  }
13047
13047
  function Tl() {
13048
- var B, M;
13048
+ var B, R;
13049
13049
  const o = (B = y.value) == null ? void 0 : B.nodeId;
13050
13050
  if (!o) return;
13051
- const r = me(f.value, o), p = ((M = r == null ? void 0 : r.tags) == null ? void 0 : M.join(", ")) ?? "", I = window.prompt("输入标签(多个用逗号分隔)", p);
13051
+ const r = me(f.value, o), p = ((R = r == null ? void 0 : r.tags) == null ? void 0 : R.join(", ")) ?? "", I = window.prompt("输入标签(多个用逗号分隔)", p);
13052
13052
  if (I === null) return;
13053
13053
  const T = I.split(/[,,]/).map((X) => X.trim()).filter((X) => X.length > 0);
13054
13054
  Po(o, T), be();
@@ -13063,54 +13063,54 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13063
13063
  p.setAttribute("xmlns", r), p.setAttribute("viewBox", `${o.vbX} ${o.vbY} ${o.vbW} ${o.vbH}`), p.setAttribute("width", String(o.vbW)), p.setAttribute("height", String(o.vbH));
13064
13064
  const I = document.createElementNS(r, "rect");
13065
13065
  I.setAttribute("x", String(o.vbX)), I.setAttribute("y", String(o.vbY)), I.setAttribute("width", String(o.vbW)), I.setAttribute("height", String(o.vbH)), I.setAttribute("fill", dn.value), p.appendChild(I);
13066
- for (const M of Is.value) {
13066
+ for (const R of Is.value) {
13067
13067
  const X = document.createElementNS(r, "path");
13068
13068
  X.setAttribute(
13069
13069
  "d",
13070
13070
  $e(
13071
- so(M.from, "out", M.to.side, M.to),
13072
- so(M.to, "in"),
13073
- v(M.from.depth),
13074
- D(M.to.depth),
13071
+ so(R.from, "out", R.to.side, R.to),
13072
+ so(R.to, "in"),
13073
+ v(R.from.depth),
13074
+ D(R.to.depth),
13075
13075
  32,
13076
13076
  z.lineStyle,
13077
- M.to._dir
13077
+ R.to._dir
13078
13078
  )
13079
- ), X.setAttribute("fill", nt(M.from, M.to)), X.setAttribute("stroke", "none"), p.appendChild(X);
13079
+ ), X.setAttribute("fill", nt(R.from, R.to)), X.setAttribute("stroke", "none"), p.appendChild(X);
13080
13080
  }
13081
13081
  const T = "-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif";
13082
- function B(M, X) {
13082
+ function B(R, X) {
13083
13083
  let de = 0;
13084
- for (const we of M)
13084
+ for (const we of R)
13085
13085
  /[\u4e00-\u9fff\u3000-\u30ff\uff00-\uffef]/.test(we) ? de += X : de += X * 0.55;
13086
13086
  return de;
13087
13087
  }
13088
- for (const M of ai.value) {
13089
- const X = M.x - M.width / 2, de = M.y - M.height / 2, we = document.createElementNS(r, "rect");
13090
- we.setAttribute("x", String(X)), we.setAttribute("y", String(de)), we.setAttribute("width", String(M.width)), we.setAttribute("height", String(M.height)), we.setAttribute("rx", "8"), we.setAttribute("fill", Mi(M)), we.setAttribute("stroke", ri(M)), we.setAttribute("stroke-width", "1"), p.appendChild(we);
13091
- const Ze = !!(M.tags && M.tags.length > 0), _ = !!(M.markers && M.markers.length > 0), rt = !!M.image, Dt = !!(M.richContent && (M.richContent.kind === "code" || M.richContent.kind === "table"));
13088
+ for (const R of ai.value) {
13089
+ const X = R.x - R.width / 2, de = R.y - R.height / 2, we = document.createElementNS(r, "rect");
13090
+ we.setAttribute("x", String(X)), we.setAttribute("y", String(de)), we.setAttribute("width", String(R.width)), we.setAttribute("height", String(R.height)), we.setAttribute("rx", "8"), we.setAttribute("fill", Ri(R)), we.setAttribute("stroke", ri(R)), we.setAttribute("stroke-width", "1"), p.appendChild(we);
13091
+ const Ze = !!(R.tags && R.tags.length > 0), _ = !!(R.markers && R.markers.length > 0), rt = !!R.image, Dt = !!(R.richContent && (R.richContent.kind === "code" || R.richContent.kind === "table"));
13092
13092
  let ke = 0, St = 0;
13093
13093
  if (Dt) {
13094
- const at = M.richContent, lt = M.fontSize * 0.78 * 0.92, pn = 6, qe = 4, zn = 2, Ln = 6;
13094
+ const at = R.richContent, lt = R.fontSize * 0.78 * 0.92, pn = 6, qe = 4, zn = 2, Ln = 6;
13095
13095
  if (at.kind === "code") {
13096
13096
  const Bt = vo(at.raw), Tt = qn(at.raw), Ut = Bt.split(`
13097
13097
  `), gn = lt * 1.35;
13098
13098
  let Yt = 0;
13099
13099
  for (const Fe of Ut)
13100
13100
  Yt = Math.max(Yt, B(Fe, lt));
13101
- St = Math.min(Yt + pn * 2 + 4, M.width - 4), ke = Ut.length * gn + qe * 2 + zn;
13102
- const ct = M.x - St / 2;
13101
+ St = Math.min(Yt + pn * 2 + 4, R.width - 4), ke = Ut.length * gn + qe * 2 + zn;
13102
+ const ct = R.x - St / 2;
13103
13103
  let yt = de + 4;
13104
- rt && (yt = de + M.image.height + Ln);
13104
+ rt && (yt = de + R.image.height + Ln);
13105
13105
  const Ht = document.createElementNS(r, "rect");
13106
- if (Ht.setAttribute("x", String(ct)), Ht.setAttribute("y", String(yt)), Ht.setAttribute("width", String(St)), Ht.setAttribute("height", String(ke - zn)), Ht.setAttribute("rx", "6"), Ht.setAttribute("fill", "rgba(255,255,255,0.55)"), Ht.setAttribute("stroke", ri(M)), Ht.setAttribute("stroke-width", "1"), p.appendChild(Ht), Tt) {
13106
+ if (Ht.setAttribute("x", String(ct)), Ht.setAttribute("y", String(yt)), Ht.setAttribute("width", String(St)), Ht.setAttribute("height", String(ke - zn)), Ht.setAttribute("rx", "6"), Ht.setAttribute("fill", "rgba(255,255,255,0.55)"), Ht.setAttribute("stroke", ri(R)), Ht.setAttribute("stroke-width", "1"), p.appendChild(Ht), Tt) {
13107
13107
  const Fe = document.createElementNS(r, "text");
13108
- Fe.setAttribute("x", String(ct + St - pn)), Fe.setAttribute("y", String(yt + qe + 4)), Fe.setAttribute("text-anchor", "end"), Fe.setAttribute("fill", kn(M)), Fe.setAttribute("font-size", String(lt * 0.8)), Fe.setAttribute("font-family", T), Fe.setAttribute("opacity", "0.5"), Fe.textContent = Tt, p.appendChild(Fe);
13108
+ Fe.setAttribute("x", String(ct + St - pn)), Fe.setAttribute("y", String(yt + qe + 4)), Fe.setAttribute("text-anchor", "end"), Fe.setAttribute("fill", kn(R)), Fe.setAttribute("font-size", String(lt * 0.8)), Fe.setAttribute("font-family", T), Fe.setAttribute("opacity", "0.5"), Fe.textContent = Tt, p.appendChild(Fe);
13109
13109
  }
13110
13110
  const Li = "'JetBrains Mono','Fira Code',Consolas,monospace";
13111
13111
  for (let Fe = 0; Fe < Ut.length; Fe++) {
13112
13112
  const gt = document.createElementNS(r, "text");
13113
- gt.setAttribute("x", String(ct + pn)), gt.setAttribute("y", String(yt + qe + (Fe + 0.5) * gn + 2)), gt.setAttribute("dominant-baseline", "central"), gt.setAttribute("fill", kn(M)), gt.setAttribute("font-size", String(lt)), gt.setAttribute("font-family", Li);
13113
+ gt.setAttribute("x", String(ct + pn)), gt.setAttribute("y", String(yt + qe + (Fe + 0.5) * gn + 2)), gt.setAttribute("dominant-baseline", "central"), gt.setAttribute("fill", kn(R)), gt.setAttribute("font-size", String(lt)), gt.setAttribute("font-family", Li);
13114
13114
  let qt = Ut[Fe];
13115
13115
  const Qe = Math.floor((St - pn * 2) / (lt * 0.6));
13116
13116
  qt.length > Qe && (qt = qt.substring(0, Qe - 1) + "…"), gt.textContent = qt, p.appendChild(gt);
@@ -13125,16 +13125,16 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13125
13125
  Qe < $n.length && (Tn = Math.max(Tn, B($n[Qe], lt)));
13126
13126
  ct.push(Tn + Ut * 2);
13127
13127
  }
13128
- St = Math.min(ct.reduce((Qe, Tn) => Qe + Tn, 0), M.width - 4);
13128
+ St = Math.min(ct.reduce((Qe, Tn) => Qe + Tn, 0), R.width - 4);
13129
13129
  const yt = St / ct.reduce((Qe, Tn) => Qe + Tn, 0);
13130
13130
  for (let Qe = 0; Qe < Yt; Qe++)
13131
13131
  ct[Qe] *= yt;
13132
13132
  ke = Bt.length * (Tt + gn * 2) + zn;
13133
- const Ht = M.x - St / 2;
13133
+ const Ht = R.x - St / 2;
13134
13134
  let Li = de + 4;
13135
- rt && (Li = de + M.image.height + Ln);
13135
+ rt && (Li = de + R.image.height + Ln);
13136
13136
  const Fe = document.createElementNS(r, "rect");
13137
- Fe.setAttribute("x", String(Ht)), Fe.setAttribute("y", String(Li)), Fe.setAttribute("width", String(St)), Fe.setAttribute("height", String(ke - zn)), Fe.setAttribute("rx", "6"), Fe.setAttribute("fill", "rgba(255,255,255,0.55)"), Fe.setAttribute("stroke", ri(M)), Fe.setAttribute("stroke-width", "1"), p.appendChild(Fe);
13137
+ Fe.setAttribute("x", String(Ht)), Fe.setAttribute("y", String(Li)), Fe.setAttribute("width", String(St)), Fe.setAttribute("height", String(ke - zn)), Fe.setAttribute("rx", "6"), Fe.setAttribute("fill", "rgba(255,255,255,0.55)"), Fe.setAttribute("stroke", ri(R)), Fe.setAttribute("stroke-width", "1"), p.appendChild(Fe);
13138
13138
  let gt = Ht, qt = Li;
13139
13139
  for (let Qe = 0; Qe < Bt.length; Qe++) {
13140
13140
  const Tn = Bt[Qe], $n = Tt + gn * 2;
@@ -13143,18 +13143,18 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13143
13143
  const ui = ct[$i], _l = Tn[$i] || "";
13144
13144
  if ($i < Yt - 1) {
13145
13145
  const et = document.createElementNS(r, "line");
13146
- et.setAttribute("x1", String(gt + ui)), et.setAttribute("y1", String(qt)), et.setAttribute("x2", String(gt + ui)), et.setAttribute("y2", String(qt + $n)), et.setAttribute("stroke", ri(M)), et.setAttribute("stroke-width", "1"), p.appendChild(et);
13146
+ et.setAttribute("x1", String(gt + ui)), et.setAttribute("y1", String(qt)), et.setAttribute("x2", String(gt + ui)), et.setAttribute("y2", String(qt + $n)), et.setAttribute("stroke", ri(R)), et.setAttribute("stroke-width", "1"), p.appendChild(et);
13147
13147
  }
13148
13148
  if (Qe < Bt.length - 1) {
13149
13149
  const et = document.createElementNS(r, "line");
13150
- et.setAttribute("x1", String(gt)), et.setAttribute("y1", String(qt + $n)), et.setAttribute("x2", String(gt + ui)), et.setAttribute("y2", String(qt + $n)), et.setAttribute("stroke", ri(M)), et.setAttribute("stroke-width", "1"), p.appendChild(et);
13150
+ et.setAttribute("x1", String(gt)), et.setAttribute("y1", String(qt + $n)), et.setAttribute("x2", String(gt + ui)), et.setAttribute("y2", String(qt + $n)), et.setAttribute("stroke", ri(R)), et.setAttribute("stroke-width", "1"), p.appendChild(et);
13151
13151
  }
13152
13152
  if (Qe === 0) {
13153
13153
  const et = document.createElementNS(r, "rect");
13154
13154
  et.setAttribute("x", String(gt)), et.setAttribute("y", String(qt)), et.setAttribute("width", String(ui)), et.setAttribute("height", String($n)), et.setAttribute("fill", "rgba(255,255,255,0.4)"), p.appendChild(et);
13155
13155
  }
13156
13156
  const An = document.createElementNS(r, "text");
13157
- An.setAttribute("x", String(gt + Ut)), An.setAttribute("y", String(qt + gn + Tt / 2 + 2)), An.setAttribute("dominant-baseline", "central"), An.setAttribute("fill", kn(M)), An.setAttribute("font-size", String(lt)), An.setAttribute("font-family", T), Qe === 0 && An.setAttribute("font-weight", "600");
13157
+ An.setAttribute("x", String(gt + Ut)), An.setAttribute("y", String(qt + gn + Tt / 2 + 2)), An.setAttribute("dominant-baseline", "central"), An.setAttribute("fill", kn(R)), An.setAttribute("font-size", String(lt)), An.setAttribute("font-family", T), Qe === 0 && An.setAttribute("font-weight", "600");
13158
13158
  let ro = _l;
13159
13159
  const Bo = Math.floor((ui - Ut * 2) / (lt * 0.55));
13160
13160
  ro.length > Bo && Bo > 2 && (ro = ro.substring(0, Bo - 1) + "…"), An.textContent = ro, p.appendChild(An), gt += ui;
@@ -13166,20 +13166,20 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13166
13166
  }
13167
13167
  let En = 0;
13168
13168
  if (rt) {
13169
- const at = M.image, lt = de + 4, pn = M.x - at.width / 2, qe = document.createElementNS(r, "image");
13169
+ const at = R.image, lt = de + 4, pn = R.x - at.width / 2, qe = document.createElementNS(r, "image");
13170
13170
  qe.setAttribute("x", String(pn)), qe.setAttribute("y", String(lt)), qe.setAttribute("width", String(at.width)), qe.setAttribute("height", String(at.height)), qe.setAttribute("href", at.src), qe.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", at.src), qe.setAttribute("preserveAspectRatio", "xMidYMid meet"), p.appendChild(qe), En = at.height + 6;
13171
13171
  }
13172
- let bt = M.y;
13172
+ let bt = R.y;
13173
13173
  const Ot = En + ke;
13174
- Ot > 0 ? bt = de + Ot + (M.height - Ot) / 2 : Ze && (bt = M.y - 8);
13175
- const fn = 14, nn = 2, On = 4, on = _ ? M.markers.length : 0, Ce = on > 0 ? on * fn + (on - 1) * nn + On : 0, We = B(M.text, M.fontSize), sn = Ce + We, Sn = M.x - sn / 2;
13174
+ Ot > 0 ? bt = de + Ot + (R.height - Ot) / 2 : Ze && (bt = R.y - 8);
13175
+ const fn = 14, nn = 2, On = 4, on = _ ? R.markers.length : 0, Ce = on > 0 ? on * fn + (on - 1) * nn + On : 0, We = B(R.text, R.fontSize), sn = Ce + We, Sn = R.x - sn / 2;
13176
13176
  if (_) {
13177
13177
  let at = Sn;
13178
- for (const lt of M.markers) {
13178
+ for (const lt of R.markers) {
13179
13179
  const pn = Jo(lt);
13180
13180
  if (pn) {
13181
13181
  const qe = document.createElementNS(r, "svg");
13182
- qe.setAttribute("x", String(at)), qe.setAttribute("y", String(bt - fn / 2)), qe.setAttribute("width", String(fn)), qe.setAttribute("height", String(fn)), qe.setAttribute("viewBox", "0 0 24 24"), qe.setAttribute("color", kn(M));
13182
+ qe.setAttribute("x", String(at)), qe.setAttribute("y", String(bt - fn / 2)), qe.setAttribute("width", String(fn)), qe.setAttribute("height", String(fn)), qe.setAttribute("viewBox", "0 0 24 24"), qe.setAttribute("color", kn(R));
13183
13183
  const Ln = new DOMParser().parseFromString(
13184
13184
  `<svg xmlns="${r}">${pn}</svg>`,
13185
13185
  "image/svg+xml"
@@ -13192,12 +13192,12 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13192
13192
  at += fn + nn;
13193
13193
  }
13194
13194
  }
13195
- const ci = _ ? Sn + Ce + We / 2 : M.x, Pt = document.createElementNS(r, "text");
13196
- if (Pt.setAttribute("x", String(ci)), Pt.setAttribute("y", String(bt)), Pt.setAttribute("text-anchor", "middle"), Pt.setAttribute("dominant-baseline", "central"), Pt.setAttribute("fill", kn(M)), Pt.setAttribute("font-size", String(Ns(M))), Pt.setAttribute("font-weight", String(Cs(M))), Pt.setAttribute("font-family", T), Pt.textContent = M.text, p.appendChild(Pt), Ze) {
13197
- const qe = M.y + 10, zn = M.tags.map((Tt) => B(Tt, 10) + 12), Ln = zn.reduce((Tt, Ut) => Tt + Ut + 3, -3);
13198
- let Bt = M.x - Ln / 2;
13199
- for (let Tt = 0; Tt < M.tags.length; Tt++) {
13200
- const Ut = M.tags[Tt], gn = ur(Ut), Yt = zn[Tt], ct = document.createElementNS(r, "rect");
13195
+ const ci = _ ? Sn + Ce + We / 2 : R.x, Pt = document.createElementNS(r, "text");
13196
+ if (Pt.setAttribute("x", String(ci)), Pt.setAttribute("y", String(bt)), Pt.setAttribute("text-anchor", "middle"), Pt.setAttribute("dominant-baseline", "central"), Pt.setAttribute("fill", kn(R)), Pt.setAttribute("font-size", String(Ns(R))), Pt.setAttribute("font-weight", String(Cs(R))), Pt.setAttribute("font-family", T), Pt.textContent = R.text, p.appendChild(Pt), Ze) {
13197
+ const qe = R.y + 10, zn = R.tags.map((Tt) => B(Tt, 10) + 12), Ln = zn.reduce((Tt, Ut) => Tt + Ut + 3, -3);
13198
+ let Bt = R.x - Ln / 2;
13199
+ for (let Tt = 0; Tt < R.tags.length; Tt++) {
13200
+ const Ut = R.tags[Tt], gn = ur(Ut), Yt = zn[Tt], ct = document.createElementNS(r, "rect");
13201
13201
  ct.setAttribute("x", String(Bt)), ct.setAttribute("y", String(qe - 16 / 2)), ct.setAttribute("width", String(Yt)), ct.setAttribute("height", String(16)), ct.setAttribute("rx", String(16 / 2)), ct.setAttribute("fill", gn.background), ct.setAttribute("stroke", gn.borderColor), ct.setAttribute("stroke-width", "1"), p.appendChild(ct);
13202
13202
  const yt = document.createElementNS(r, "text");
13203
13203
  yt.setAttribute("x", String(Bt + Yt / 2)), yt.setAttribute("y", String(qe)), yt.setAttribute("text-anchor", "middle"), yt.setAttribute("dominant-baseline", "central"), yt.setAttribute("fill", gn.color), yt.setAttribute("font-size", String(10)), yt.setAttribute("font-family", T), yt.textContent = Ut, p.appendChild(yt), Bt += Yt + 3;
@@ -13219,16 +13219,16 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13219
13219
  let T = new XMLSerializer().serializeToString(r);
13220
13220
  T.startsWith("<?xml") || (T = `<?xml version="1.0" encoding="UTF-8"?>
13221
13221
  ` + T);
13222
- const B = new Blob([T], { type: "image/svg+xml;charset=utf-8" }), M = URL.createObjectURL(B), X = new window.Image();
13222
+ const B = new Blob([T], { type: "image/svg+xml;charset=utf-8" }), R = URL.createObjectURL(B), X = new window.Image();
13223
13223
  X.onload = () => {
13224
13224
  const de = document.createElement("canvas");
13225
13225
  de.width = Math.ceil(p.vbW * o), de.height = Math.ceil(p.vbH * o);
13226
13226
  const we = de.getContext("2d");
13227
13227
  if (!we) {
13228
- URL.revokeObjectURL(M);
13228
+ URL.revokeObjectURL(R);
13229
13229
  return;
13230
13230
  }
13231
- we.fillStyle = dn.value, we.fillRect(0, 0, de.width, de.height), we.drawImage(X, 0, 0, de.width, de.height), URL.revokeObjectURL(M);
13231
+ we.fillStyle = dn.value, we.fillRect(0, 0, de.width, de.height), we.drawImage(X, 0, 0, de.width, de.height), URL.revokeObjectURL(R);
13232
13232
  try {
13233
13233
  de.toBlob((Ze) => {
13234
13234
  if (!Ze) {
@@ -13242,8 +13242,8 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13242
13242
  console.warn("PNG export failed, falling back to SVG:", Ze), zi();
13243
13243
  }
13244
13244
  }, X.onerror = () => {
13245
- URL.revokeObjectURL(M), zi();
13246
- }, X.src = M;
13245
+ URL.revokeObjectURL(R), zi();
13246
+ }, X.src = R;
13247
13247
  }
13248
13248
  return n({
13249
13249
  addChild: (o) => li(o),
@@ -13366,7 +13366,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13366
13366
  ), ki(() => {
13367
13367
  Pe(), Ve(() => xn());
13368
13368
  }), (o, r) => {
13369
- var p, I, T, B, M, X, de, we, Ze;
13369
+ var p, I, T, B, R, X, de, we, Ze;
13370
13370
  return k(), x("div", {
13371
13371
  class: "zm-mindmap",
13372
13372
  style: Ge({ background: dn.value, fontSize: pt.value.fontSize + "px" })
@@ -13424,7 +13424,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13424
13424
  class: "zm-drag-ghost",
13425
13425
  style: Ge({
13426
13426
  left: H.value + "px",
13427
- top: R.value + "px",
13427
+ top: M.value + "px",
13428
13428
  transform: `scale(${ue(fe).scale.value})`,
13429
13429
  transformOrigin: "top left"
13430
13430
  })
@@ -13445,7 +13445,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13445
13445
  "is-selected-secondary": h.value !== _.id && c.value.has(_.id),
13446
13446
  "is-editing": a.value === _.id,
13447
13447
  "has-image": !!_.image,
13448
- "is-resizing": Mo.value === _.id,
13448
+ "is-resizing": Ro.value === _.id,
13449
13449
  "is-dragging-source": ((rt = A.value) == null ? void 0 : rt.srcId) === _.id,
13450
13450
  "is-drop-target": ((Dt = A.value) == null ? void 0 : Dt.currentTargetId) === _.id,
13451
13451
  "is-search-hit": gl(_.id),
@@ -13465,7 +13465,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13465
13465
  minWidth: _.width + "px",
13466
13466
  height: _.height + "px",
13467
13467
  fontSize: Ns(_) + "px",
13468
- background: Mi(_),
13468
+ background: Ri(_),
13469
13469
  color: kn(_),
13470
13470
  borderColor: ri(_),
13471
13471
  fontWeight: Cs(_),
@@ -13530,7 +13530,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13530
13530
  onClick: pe((Ce) => Va(_.id, bt), ["stop"])
13531
13531
  }, [
13532
13532
  u("span", null, ae(En), 1),
13533
- u("span", Rh, ae(Za(_.id, bt)), 1)
13533
+ u("span", Mh, ae(Za(_.id, bt)), 1)
13534
13534
  ], 10, Nh);
13535
13535
  }), 128)) : (k(!0), x(te, { key: 1 }, Xe(ke, (En, bt) => (k(), x("td", {
13536
13536
  key: `c${bt}`
@@ -13540,7 +13540,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13540
13540
  ])) : K("", !0)
13541
13541
  ], 64))
13542
13542
  ], 42, Th)) : K("", !0),
13543
- a.value !== _.id ? (k(), x("span", Mh, [
13543
+ a.value !== _.id ? (k(), x("span", Rh, [
13544
13544
  _.markers && _.markers.length > 0 ? (k(), x("span", Ih, [
13545
13545
  (k(!0), x(te, null, Xe(_.markers, (ke) => (k(), x("span", {
13546
13546
  key: ke,
@@ -13562,7 +13562,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13562
13562
  onMousedown: r[4] || (r[4] = pe(() => {
13563
13563
  }, ["stop"]))
13564
13564
  }, [
13565
- ie(Me, {
13565
+ ie(Re, {
13566
13566
  name: "link",
13567
13567
  size: 11,
13568
13568
  stroke: 2
@@ -13577,7 +13577,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13577
13577
  onMousedown: r[5] || (r[5] = pe(() => {
13578
13578
  }, ["stop"]))
13579
13579
  }, [
13580
- ie(Me, {
13580
+ ie(Re, {
13581
13581
  name: "note",
13582
13582
  size: 11,
13583
13583
  stroke: 2
@@ -13634,7 +13634,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13634
13634
  }, ["stop"])),
13635
13635
  onClick: pe((ke) => Ws(_.id), ["stop"])
13636
13636
  }, [
13637
- ie(Me, {
13637
+ ie(Re, {
13638
13638
  name: "minus",
13639
13639
  size: 10,
13640
13640
  stroke: 2.4
@@ -13654,7 +13654,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13654
13654
  }, ["stop"])),
13655
13655
  onClick: pe((ke) => L(_.id), ["stop"])
13656
13656
  }, [
13657
- ie(Me, {
13657
+ ie(Re, {
13658
13658
  name: "x",
13659
13659
  size: 9,
13660
13660
  stroke: 2.2
@@ -13676,7 +13676,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13676
13676
  "has-image": !!((p = ue(me)(f.value, y.value.nodeId)) != null && p.image),
13677
13677
  "has-link": !!((I = ue(me)(f.value, y.value.nodeId)) != null && I.link),
13678
13678
  "has-note": !!((T = ue(me)(f.value, y.value.nodeId)) != null && T.note),
13679
- "has-code": ((M = (B = ue(me)(f.value, y.value.nodeId)) == null ? void 0 : B.richContent) == null ? void 0 : M.kind) === "code",
13679
+ "has-code": ((R = (B = ue(me)(f.value, y.value.nodeId)) == null ? void 0 : B.richContent) == null ? void 0 : R.kind) === "code",
13680
13680
  "has-table": ((de = (X = ue(me)(f.value, y.value.nodeId)) == null ? void 0 : X.richContent) == null ? void 0 : de.kind) === "table",
13681
13681
  "node-markers": ((we = ue(me)(f.value, y.value.nodeId)) == null ? void 0 : we.markers) ?? [],
13682
13682
  "node-tags": ((Ze = ue(me)(f.value, y.value.nodeId)) == null ? void 0 : Ze.tags) ?? [],
@@ -13688,10 +13688,10 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13688
13688
  onRemoveNote: No,
13689
13689
  onAddCode: Ji,
13690
13690
  onEditCode: Ji,
13691
- onRemoveCode: Ro,
13691
+ onRemoveCode: Mo,
13692
13692
  onAddTable: Ke,
13693
13693
  onEditTable: Ke,
13694
- onRemoveTable: Rn,
13694
+ onRemoveTable: Mn,
13695
13695
  onToggleMarker: wl,
13696
13696
  onClearMarkers: El,
13697
13697
  onAddTag: Tl,
@@ -13715,7 +13715,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13715
13715
  title: i.previewMode ? "退出预览模式" : "进入预览模式",
13716
13716
  onClick: r[15] || (r[15] = (_) => s("canvas-toggle-preview"))
13717
13717
  }, [
13718
- ie(Me, {
13718
+ ie(Re, {
13719
13719
  name: i.previewMode ? "eye-off" : "eye",
13720
13720
  size: 16
13721
13721
  }, null, 8, ["name"])
@@ -13725,7 +13725,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13725
13725
  title: "显示大纲视图",
13726
13726
  onClick: Ti
13727
13727
  }, [
13728
- ie(Me, {
13728
+ ie(Re, {
13729
13729
  name: "outline",
13730
13730
  size: 16
13731
13731
  })
@@ -13740,7 +13740,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13740
13740
  onClick: r[16] || (r[16] = //@ts-ignore
13741
13741
  (..._) => ue(fe).zoomIn && ue(fe).zoomIn(..._))
13742
13742
  }, [
13743
- ie(Me, { name: "zoom-in" })
13743
+ ie(Re, { name: "zoom-in" })
13744
13744
  ]),
13745
13745
  u("button", {
13746
13746
  class: "zm-tb-btn",
@@ -13748,14 +13748,14 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13748
13748
  onClick: r[17] || (r[17] = //@ts-ignore
13749
13749
  (..._) => ue(fe).zoomOut && ue(fe).zoomOut(..._))
13750
13750
  }, [
13751
- ie(Me, { name: "zoom-out" })
13751
+ ie(Re, { name: "zoom-out" })
13752
13752
  ]),
13753
13753
  u("button", {
13754
13754
  class: "zm-tb-btn",
13755
13755
  title: "重置视图",
13756
13756
  onClick: xn
13757
13757
  }, [
13758
- ie(Me, { name: "reset" })
13758
+ ie(Re, { name: "reset" })
13759
13759
  ]),
13760
13760
  r[37] || (r[37] = u("span", { class: "zm-tb-divider" }, null, -1)),
13761
13761
  u("button", {
@@ -13763,28 +13763,28 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13763
13763
  title: "全部收起",
13764
13764
  onClick: tl
13765
13765
  }, [
13766
- ie(Me, { name: "collapse-all" })
13766
+ ie(Re, { name: "collapse-all" })
13767
13767
  ]),
13768
13768
  u("button", {
13769
13769
  class: "zm-tb-btn",
13770
13770
  title: "展开一级",
13771
13771
  onClick: r[18] || (r[18] = (_) => js(1))
13772
13772
  }, [
13773
- ie(Me, { name: "expand-level-1" })
13773
+ ie(Re, { name: "expand-level-1" })
13774
13774
  ]),
13775
13775
  u("button", {
13776
13776
  class: "zm-tb-btn",
13777
13777
  title: "展开二级",
13778
13778
  onClick: r[19] || (r[19] = (_) => js(2))
13779
13779
  }, [
13780
- ie(Me, { name: "expand-level-2" })
13780
+ ie(Re, { name: "expand-level-2" })
13781
13781
  ]),
13782
13782
  u("button", {
13783
13783
  class: "zm-tb-btn",
13784
13784
  title: "全部展开",
13785
13785
  onClick: nl
13786
13786
  }, [
13787
- ie(Me, { name: "expand-all" })
13787
+ ie(Re, { name: "expand-all" })
13788
13788
  ]),
13789
13789
  i.previewMode ? K("", !0) : (k(), x(te, { key: 0 }, [
13790
13790
  r[35] || (r[35] = u("span", { class: "zm-tb-divider" }, null, -1)),
@@ -13820,21 +13820,21 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13820
13820
  title: "思维导图布局 (中心辐射)",
13821
13821
  onClick: r[22] || (r[22] = (_) => Do("mindmap"))
13822
13822
  }, [
13823
- ie(Me, { name: "mindmap" })
13823
+ ie(Re, { name: "mindmap" })
13824
13824
  ], 2),
13825
13825
  u("button", {
13826
13826
  class: Ae(["zm-tb-btn", { active: z.layoutMode === "tree" }]),
13827
13827
  title: "树形布局 (向右展开)",
13828
13828
  onClick: r[23] || (r[23] = (_) => Do("tree"))
13829
13829
  }, [
13830
- ie(Me, { name: "tree" })
13830
+ ie(Re, { name: "tree" })
13831
13831
  ], 2),
13832
13832
  u("button", {
13833
13833
  class: Ae(["zm-tb-btn", { active: z.layoutMode === "org" }]),
13834
13834
  title: "组织结构布局 (向下展开)",
13835
13835
  onClick: r[24] || (r[24] = (_) => Do("org"))
13836
13836
  }, [
13837
- ie(Me, { name: "org" })
13837
+ ie(Re, { name: "org" })
13838
13838
  ], 2)
13839
13839
  ], 64))
13840
13840
  ], 2)
@@ -13910,7 +13910,7 @@ const Hg = { class: "zm-note-panel" }, Fg = {
13910
13910
  "selected-node": wt.value,
13911
13911
  "focus-tick": ze.value,
13912
13912
  onApply: ft,
13913
- onRemove: Rt,
13913
+ onRemove: Mt,
13914
13914
  onSetLink: Hn,
13915
13915
  onSetImage: Vi,
13916
13916
  onSetRich: Xi
@@ -14163,7 +14163,7 @@ function walk(n: Node) {
14163
14163
  y("s_r7", "右七")
14164
14164
  ];
14165
14165
  return { id: "root", text: "flow-mindmap 思维导图", children: [...g, ...P] };
14166
- })(), l = G(n), a = G(null), d = G(/* @__PURE__ */ new Set()), c = G(!1), h = G(!1), m = G(!1), S = G(!1), A = G(0), H = G(!1), R = G(!1), F = G(null);
14166
+ })(), l = G(n), a = G(null), d = G(/* @__PURE__ */ new Set()), c = G(!1), h = G(!1), m = G(!1), S = G(!1), A = G(0), H = G(!1), M = G(!1), F = G(null);
14167
14167
  function $() {
14168
14168
  l.value = t();
14169
14169
  }
@@ -14220,7 +14220,7 @@ function walk(n: Node) {
14220
14220
  H.value = !1, y.stopPropagation();
14221
14221
  return;
14222
14222
  }
14223
- R.value && (R.value = !1, y.stopPropagation());
14223
+ M.value && (M.value = !1, y.stopPropagation());
14224
14224
  }
14225
14225
  }
14226
14226
  ki(() => {
@@ -14336,11 +14336,11 @@ function walk(n: Node) {
14336
14336
  _: 1
14337
14337
  }, 8, ["open"]),
14338
14338
  u("main", qh, [
14339
- R.value ? (k(), x("button", {
14339
+ M.value ? (k(), x("button", {
14340
14340
  key: 0,
14341
14341
  class: "zm-app-preview-exit",
14342
14342
  title: "退出预览 (Esc)",
14343
- onClick: g[1] || (g[1] = (P) => R.value = !1)
14343
+ onClick: g[1] || (g[1] = (P) => M.value = !1)
14344
14344
  }, [...g[11] || (g[11] = [
14345
14345
  u("svg", {
14346
14346
  width: "14",
@@ -14366,7 +14366,7 @@ function walk(n: Node) {
14366
14366
  ref_key: "mindMapRef",
14367
14367
  ref: F,
14368
14368
  data: l.value,
14369
- "preview-mode": R.value,
14369
+ "preview-mode": M.value,
14370
14370
  "built-in-drawers": !1,
14371
14371
  onChange: le,
14372
14372
  onSelect: ve,
@@ -14374,7 +14374,7 @@ function walk(n: Node) {
14374
14374
  onCanvasSettings: g[2] || (g[2] = (P) => H.value = !0),
14375
14375
  onCanvasData: C,
14376
14376
  onCanvasImport: E,
14377
- onCanvasTogglePreview: g[3] || (g[3] = (P) => R.value = !R.value),
14377
+ onCanvasTogglePreview: g[3] || (g[3] = (P) => M.value = !M.value),
14378
14378
  onCanvasOutline: g[4] || (g[4] = (P) => c.value = !0)
14379
14379
  }, null, 8, ["data", "preview-mode"])
14380
14380
  ])
@@ -14382,7 +14382,7 @@ function walk(n: Node) {
14382
14382
  ie(cn, {
14383
14383
  side: "right",
14384
14384
  width: 360,
14385
- open: h.value && !R.value,
14385
+ open: h.value && !M.value,
14386
14386
  title: "数据",
14387
14387
  "onUpdate:open": g[6] || (g[6] = (P) => h.value = P)
14388
14388
  }, {
@@ -14397,7 +14397,7 @@ function walk(n: Node) {
14397
14397
  ie(cn, {
14398
14398
  side: "right",
14399
14399
  width: 420,
14400
- open: m.value && !R.value,
14400
+ open: m.value && !M.value,
14401
14401
  title: "Markdown",
14402
14402
  "onUpdate:open": g[8] || (g[8] = (P) => m.value = P)
14403
14403
  }, {
@@ -14412,7 +14412,7 @@ function walk(n: Node) {
14412
14412
  ie(cn, {
14413
14413
  side: "right",
14414
14414
  width: 360,
14415
- open: S.value && !R.value,
14415
+ open: S.value && !M.value,
14416
14416
  title: "节点内容",
14417
14417
  "onUpdate:open": g[9] || (g[9] = (P) => S.value = P)
14418
14418
  }, {
@@ -14433,7 +14433,7 @@ function walk(n: Node) {
14433
14433
  ie(cn, {
14434
14434
  side: "right",
14435
14435
  width: 340,
14436
- open: H.value && !R.value,
14436
+ open: H.value && !M.value,
14437
14437
  title: "设置",
14438
14438
  "onUpdate:open": g[10] || (g[10] = (P) => H.value = P)
14439
14439
  }, {
@@ -14455,7 +14455,7 @@ function walk(n: Node) {
14455
14455
  }, 8, ["open"])
14456
14456
  ]));
14457
14457
  }
14458
- }), nm = "0.5.2", im = {
14458
+ }), nm = "0.5.3", im = {
14459
14459
  install(e) {
14460
14460
  e.component("FlowMindMap", _s), e.component("FlowMindMapOutline", as), e.component("FlowMindMapDrawer", cn), e.component("FlowMindMapDataPanel", ls), e.component("FlowMindMapMarkdownPanel", cs), e.component("FlowMindMapSettingsPanel", us), e.component("FlowMindMapNotePanel", As), e.component("FlowMindMapApp", Xh);
14461
14461
  }