gp-designer 1.0.31 → 1.0.33

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,4 +1,4 @@
1
- import { defineComponent as ze, computed as At, ref as G, watch as nt, resolveComponent as Qu, openBlock as L, createElementBlock as M, Fragment as Zt, createBlock as Ct, resolveDynamicComponent as ju, mergeProps as zu, withModifiers as Le, withCtx as Ya, createTextVNode as Ei, toDisplayString as Ne, renderList as Fi, unref as de, createElementVNode as x, createCommentVNode as Y, toRaw as hn, Transition as Ku, normalizeClass as fn, renderSlot as Jt, reactive as Zu, createApp as Ju, h as Es, withDirectives as tt, vModelSelect as er, vModelText as Tt, createVNode as ut, toRefs as tr, normalizeStyle as Ts } from "vue";
1
+ import { defineComponent as Ke, computed as At, ref as $, watch as qe, resolveComponent as Qu, openBlock as v, createElementBlock as R, Fragment as Zt, createBlock as Ct, resolveDynamicComponent as ju, mergeProps as zu, withModifiers as ye, withCtx as Ya, createTextVNode as Ei, toDisplayString as Ce, renderList as Fi, unref as de, createElementVNode as x, createCommentVNode as H, toRaw as hn, Transition as Ku, normalizeClass as fn, renderSlot as Jt, reactive as Zu, createApp as Ju, h as Es, withDirectives as at, vModelSelect as er, vModelText as Tt, createVNode as ut, toRefs as tr, normalizeStyle as Ts } from "vue";
2
2
  var K;
3
3
  (function(e) {
4
4
  e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
@@ -173,13 +173,13 @@ class $i extends Vi {
173
173
  });
174
174
  }
175
175
  }
176
- function U(e) {
176
+ function B(e) {
177
177
  return ar(e);
178
178
  }
179
179
  function qa(e) {
180
180
  return e.type === K.CDATA;
181
181
  }
182
- function Xe(e) {
182
+ function Qe(e) {
183
183
  return e.type === K.Text;
184
184
  }
185
185
  function Va(e) {
@@ -196,11 +196,11 @@ function Te(e) {
196
196
  }
197
197
  function oa(e, t = !1) {
198
198
  let a;
199
- if (Xe(e))
199
+ if (Qe(e))
200
200
  a = new ra(e.data);
201
201
  else if (Va(e))
202
202
  a = new Yi(e.data);
203
- else if (U(e)) {
203
+ else if (B(e)) {
204
204
  const i = t ? ai(e.children) : [], s = new $i(e.name, { ...e.attribs }, i);
205
205
  i.forEach((u) => u.parent = s), e.namespace != null && (s.namespace = e.namespace), e["x-attribsNamespace"] && (s["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (s["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), a = s;
206
206
  } else if (qa(e)) {
@@ -862,14 +862,14 @@ function kr(e, t) {
862
862
  return Te(e) ? e.children.map((a) => Nn(a, t)).join("") : "";
863
863
  }
864
864
  function Oa(e) {
865
- return Array.isArray(e) ? e.map(Oa).join("") : U(e) ? e.name === "br" ? `
866
- ` : Oa(e.children) : qa(e) ? Oa(e.children) : Xe(e) ? e.data : "";
865
+ return Array.isArray(e) ? e.map(Oa).join("") : B(e) ? e.name === "br" ? `
866
+ ` : Oa(e.children) : qa(e) ? Oa(e.children) : Qe(e) ? e.data : "";
867
867
  }
868
868
  function Bt(e) {
869
- return Array.isArray(e) ? e.map(Bt).join("") : Te(e) && !Va(e) ? Bt(e.children) : Xe(e) ? e.data : "";
869
+ return Array.isArray(e) ? e.map(Bt).join("") : Te(e) && !Va(e) ? Bt(e.children) : Qe(e) ? e.data : "";
870
870
  }
871
871
  function va(e) {
872
- return Array.isArray(e) ? e.map(va).join("") : Te(e) && (e.type === K.Tag || qa(e)) ? va(e.children) : Xe(e) ? e.data : "";
872
+ return Array.isArray(e) ? e.map(va).join("") : Te(e) && (e.type === K.Tag || qa(e)) ? va(e.children) : Qe(e) ? e.data : "";
873
873
  }
874
874
  function Wa(e) {
875
875
  return Te(e) ? e.children : [];
@@ -901,13 +901,13 @@ function Ur(e) {
901
901
  }
902
902
  function Xi(e) {
903
903
  let { next: t } = e;
904
- for (; t !== null && !U(t); )
904
+ for (; t !== null && !B(t); )
905
905
  ({ next: t } = t);
906
906
  return t;
907
907
  }
908
908
  function Qi(e) {
909
909
  let { prev: t } = e;
910
- for (; t !== null && !U(t); )
910
+ for (; t !== null && !B(t); )
911
911
  ({ prev: t } = t);
912
912
  return t;
913
913
  }
@@ -987,14 +987,14 @@ function zi(e, t, a = !0) {
987
987
  let i = null;
988
988
  for (let s = 0; s < t.length && !i; s++) {
989
989
  const u = t[s];
990
- if (U(u))
990
+ if (B(u))
991
991
  e(u) ? i = u : a && u.children.length > 0 && (i = zi(e, u.children, !0));
992
992
  else continue;
993
993
  }
994
994
  return i;
995
995
  }
996
996
  function Sn(e, t) {
997
- return t.some((a) => U(a) && (e(a) || Sn(e, a.children)));
997
+ return t.some((a) => B(a) && (e(a) || Sn(e, a.children)));
998
998
  }
999
999
  function Wr(e, t) {
1000
1000
  const a = [], i = [t], s = [0];
@@ -1006,22 +1006,22 @@ function Wr(e, t) {
1006
1006
  continue;
1007
1007
  }
1008
1008
  const u = i[0][s[0]++];
1009
- U(u) && (e(u) && a.push(u), u.children.length > 0 && (s.unshift(0), i.unshift(u.children)));
1009
+ B(u) && (e(u) && a.push(u), u.children.length > 0 && (s.unshift(0), i.unshift(u.children)));
1010
1010
  }
1011
1011
  }
1012
1012
  const La = {
1013
1013
  tag_name(e) {
1014
- return typeof e == "function" ? (t) => U(t) && e(t.name) : e === "*" ? U : (t) => U(t) && t.name === e;
1014
+ return typeof e == "function" ? (t) => B(t) && e(t.name) : e === "*" ? B : (t) => B(t) && t.name === e;
1015
1015
  },
1016
1016
  tag_type(e) {
1017
1017
  return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
1018
1018
  },
1019
1019
  tag_contains(e) {
1020
- return typeof e == "function" ? (t) => Xe(t) && e(t.data) : (t) => Xe(t) && t.data === e;
1020
+ return typeof e == "function" ? (t) => Qe(t) && e(t.data) : (t) => Qe(t) && t.data === e;
1021
1021
  }
1022
1022
  };
1023
1023
  function xn(e, t) {
1024
- return typeof t == "function" ? (a) => U(a) && t(a.attribs[e]) : (a) => U(a) && a.attribs[e] === t;
1024
+ return typeof t == "function" ? (a) => B(a) && t(a.attribs[e]) : (a) => B(a) && a.attribs[e] === t;
1025
1025
  }
1026
1026
  function Gr(e, t) {
1027
1027
  return (a) => e(a) || t(a);
@@ -1205,8 +1205,8 @@ const Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1205
1205
  isCDATA: qa,
1206
1206
  isComment: Va,
1207
1207
  isDocument: dt,
1208
- isTag: U,
1209
- isText: Xe,
1208
+ isTag: B,
1209
+ isText: Qe,
1210
1210
  nextElementSibling: Xi,
1211
1211
  prepend: Vr,
1212
1212
  prependChild: qr,
@@ -1306,7 +1306,7 @@ const fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1306
1306
  text: ca,
1307
1307
  xml: ro
1308
1308
  }, Symbol.toStringTag, { value: "Module" }));
1309
- function et(e) {
1309
+ function tt(e) {
1310
1310
  return e.cheerio != null;
1311
1311
  }
1312
1312
  function mo(e) {
@@ -1335,7 +1335,7 @@ function _i(e) {
1335
1335
  const la = Object.prototype.hasOwnProperty, da = /\s+/, Ai = "data-", Ki = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, To = /^{[^]*}$|^\[[^]*]$/;
1336
1336
  function Ra(e, t, a) {
1337
1337
  var i;
1338
- if (!(!e || !U(e))) {
1338
+ if (!(!e || !B(e))) {
1339
1339
  if ((i = e.attribs) !== null && i !== void 0 || (e.attribs = {}), !t)
1340
1340
  return e.attribs;
1341
1341
  if (la.call(e.attribs, t))
@@ -1355,11 +1355,11 @@ function po(e, t) {
1355
1355
  if (typeof e != "string")
1356
1356
  throw new Error("Bad combination of arguments.");
1357
1357
  return re(this, (a, i) => {
1358
- U(a) && Mt(a, e, t.call(a, i, a.attribs[e]));
1358
+ B(a) && Mt(a, e, t.call(a, i, a.attribs[e]));
1359
1359
  });
1360
1360
  }
1361
1361
  return re(this, (a) => {
1362
- if (U(a))
1362
+ if (B(a))
1363
1363
  if (typeof e == "object")
1364
1364
  for (const i of Object.keys(e)) {
1365
1365
  const s = e[i];
@@ -1384,7 +1384,7 @@ function bo(e, t) {
1384
1384
  var a;
1385
1385
  if (typeof e == "string" && t === void 0) {
1386
1386
  const i = this[0];
1387
- if (!i || !U(i))
1387
+ if (!i || !B(i))
1388
1388
  return;
1389
1389
  switch (e) {
1390
1390
  case "style": {
@@ -1418,11 +1418,11 @@ function bo(e, t) {
1418
1418
  if (typeof e == "object")
1419
1419
  throw new TypeError("Bad combination of arguments.");
1420
1420
  return re(this, (i, s) => {
1421
- U(i) && si(i, e, t.call(i, s, As(i, e, this.options.xmlMode)), this.options.xmlMode);
1421
+ B(i) && si(i, e, t.call(i, s, As(i, e, this.options.xmlMode)), this.options.xmlMode);
1422
1422
  });
1423
1423
  }
1424
1424
  return re(this, (i) => {
1425
- if (U(i))
1425
+ if (B(i))
1426
1426
  if (typeof e == "object")
1427
1427
  for (const s of Object.keys(e)) {
1428
1428
  const u = e[s];
@@ -1473,16 +1473,16 @@ function Rn(e) {
1473
1473
  function Ao(e, t) {
1474
1474
  var a;
1475
1475
  const i = this[0];
1476
- if (!i || !U(i))
1476
+ if (!i || !B(i))
1477
1477
  return;
1478
1478
  const s = i;
1479
1479
  return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? go(s) : typeof e == "object" || t !== void 0 ? (re(this, (u) => {
1480
- U(u) && (typeof e == "object" ? Ns(u, e) : Ns(u, e, t));
1480
+ B(u) && (typeof e == "object" ? Ns(u, e) : Ns(u, e, t));
1481
1481
  }), this) : _o(s, e);
1482
1482
  }
1483
1483
  function No(e) {
1484
1484
  const t = arguments.length === 0, a = this[0];
1485
- if (!a || !U(a))
1485
+ if (!a || !B(a))
1486
1486
  return t ? void 0 : this;
1487
1487
  switch (a.name) {
1488
1488
  case "textarea":
@@ -1515,13 +1515,13 @@ function Co(e) {
1515
1515
  const t = Ma(e);
1516
1516
  for (const a of t)
1517
1517
  re(this, (i) => {
1518
- U(i) && Mn(i, a);
1518
+ B(i) && Mn(i, a);
1519
1519
  });
1520
1520
  return this;
1521
1521
  }
1522
1522
  function Io(e) {
1523
1523
  return this.toArray().some((t) => {
1524
- const a = U(t) && t.attribs.class;
1524
+ const a = B(t) && t.attribs.class;
1525
1525
  let i = -1;
1526
1526
  if (a && e.length > 0)
1527
1527
  for (; (i = a.indexOf(e, i + 1)) > -1; ) {
@@ -1535,7 +1535,7 @@ function Io(e) {
1535
1535
  function Pn(e) {
1536
1536
  if (typeof e == "function")
1537
1537
  return re(this, (i, s) => {
1538
- if (U(i)) {
1538
+ if (B(i)) {
1539
1539
  const u = i.attribs.class || "";
1540
1540
  Pn.call([i], e.call(i, s, u));
1541
1541
  }
@@ -1545,7 +1545,7 @@ function Pn(e) {
1545
1545
  const t = e.split(da), a = this.length;
1546
1546
  for (let i = 0; i < a; i++) {
1547
1547
  const s = this[i];
1548
- if (!U(s))
1548
+ if (!B(s))
1549
1549
  continue;
1550
1550
  const u = Ra(s, "class", !1);
1551
1551
  if (u) {
@@ -1563,11 +1563,11 @@ function Pn(e) {
1563
1563
  function kn(e) {
1564
1564
  if (typeof e == "function")
1565
1565
  return re(this, (s, u) => {
1566
- U(s) && kn.call([s], e.call(s, u, s.attribs.class || ""));
1566
+ B(s) && kn.call([s], e.call(s, u, s.attribs.class || ""));
1567
1567
  });
1568
1568
  const t = Ma(e), a = t.length, i = arguments.length === 0;
1569
1569
  return re(this, (s) => {
1570
- if (U(s))
1570
+ if (B(s))
1571
1571
  if (i)
1572
1572
  s.attribs.class = "";
1573
1573
  else {
@@ -1584,14 +1584,14 @@ function kn(e) {
1584
1584
  function wn(e, t) {
1585
1585
  if (typeof e == "function")
1586
1586
  return re(this, (r, o) => {
1587
- U(r) && wn.call([r], e.call(r, o, r.attribs.class || "", t), t);
1587
+ B(r) && wn.call([r], e.call(r, o, r.attribs.class || "", t), t);
1588
1588
  });
1589
1589
  if (!e || typeof e != "string")
1590
1590
  return this;
1591
1591
  const a = e.split(da), i = a.length, s = typeof t == "boolean" ? t ? 1 : -1 : 0, u = this.length;
1592
1592
  for (let r = 0; r < u; r++) {
1593
1593
  const o = this[r];
1594
- if (!U(o))
1594
+ if (!B(o))
1595
1595
  continue;
1596
1596
  const c = Ma(o.attribs.class);
1597
1597
  for (let d = 0; d < i; d++) {
@@ -1614,10 +1614,10 @@ const So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1614
1614
  toggleClass: wn,
1615
1615
  val: No
1616
1616
  }, Symbol.toStringTag, { value: "Module" }));
1617
- var R;
1617
+ var M;
1618
1618
  (function(e) {
1619
1619
  e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
1620
- })(R || (R = {}));
1620
+ })(M || (M = {}));
1621
1621
  var he;
1622
1622
  (function(e) {
1623
1623
  e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
@@ -1640,12 +1640,12 @@ const Cs = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, xo = /\\(
1640
1640
  ]);
1641
1641
  function ea(e) {
1642
1642
  switch (e.type) {
1643
- case R.Adjacent:
1644
- case R.Child:
1645
- case R.Descendant:
1646
- case R.Parent:
1647
- case R.Sibling:
1648
- case R.ColumnCombinator:
1643
+ case M.Adjacent:
1644
+ case M.Child:
1645
+ case M.Descendant:
1646
+ case M.Parent:
1647
+ case M.Sibling:
1648
+ case M.ColumnCombinator:
1649
1649
  return !0;
1650
1650
  default:
1651
1651
  return !1;
@@ -1711,7 +1711,7 @@ function Bn(e, t, a) {
1711
1711
  throw new Error("Did not expect successive traversals.");
1712
1712
  }
1713
1713
  function d(T) {
1714
- if (i.length > 0 && i[i.length - 1].type === R.Descendant) {
1714
+ if (i.length > 0 && i[i.length - 1].type === M.Descendant) {
1715
1715
  i[i.length - 1].type = T;
1716
1716
  return;
1717
1717
  }
@@ -1719,7 +1719,7 @@ function Bn(e, t, a) {
1719
1719
  }
1720
1720
  function f(T, g) {
1721
1721
  i.push({
1722
- type: R.Attribute,
1722
+ type: M.Attribute,
1723
1723
  name: T,
1724
1724
  action: g,
1725
1725
  value: s(1),
@@ -1728,7 +1728,7 @@ function Bn(e, t, a) {
1728
1728
  });
1729
1729
  }
1730
1730
  function E() {
1731
- if (i.length && i[i.length - 1].type === R.Descendant && i.pop(), i.length === 0)
1731
+ if (i.length && i[i.length - 1].type === M.Descendant && i.pop(), i.length === 0)
1732
1732
  throw new Error("Empty sub-selector");
1733
1733
  e.push(i);
1734
1734
  }
@@ -1742,23 +1742,23 @@ function Bn(e, t, a) {
1742
1742
  case 10:
1743
1743
  case 12:
1744
1744
  case 13: {
1745
- (i.length === 0 || i[0].type !== R.Descendant) && (c(), i.push({ type: R.Descendant })), u(1);
1745
+ (i.length === 0 || i[0].type !== M.Descendant) && (c(), i.push({ type: M.Descendant })), u(1);
1746
1746
  break;
1747
1747
  }
1748
1748
  case 62: {
1749
- d(R.Child), u(1);
1749
+ d(M.Child), u(1);
1750
1750
  break;
1751
1751
  }
1752
1752
  case 60: {
1753
- d(R.Parent), u(1);
1753
+ d(M.Parent), u(1);
1754
1754
  break;
1755
1755
  }
1756
1756
  case 126: {
1757
- d(R.Sibling), u(1);
1757
+ d(M.Sibling), u(1);
1758
1758
  break;
1759
1759
  }
1760
1760
  case 43: {
1761
- d(R.Adjacent), u(1);
1761
+ d(M.Adjacent), u(1);
1762
1762
  break;
1763
1763
  }
1764
1764
  case 46: {
@@ -1773,51 +1773,51 @@ function Bn(e, t, a) {
1773
1773
  u(1);
1774
1774
  let g, C = null;
1775
1775
  t.charCodeAt(a) === 124 ? g = s(1) : t.startsWith("*|", a) ? (C = "*", g = s(2)) : (g = s(0), t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 61 && (C = g, g = s(1))), u(0);
1776
- let D = he.Exists;
1776
+ let L = he.Exists;
1777
1777
  const y = Oo.get(t.charCodeAt(a));
1778
1778
  if (y) {
1779
- if (D = y, t.charCodeAt(a + 1) !== 61)
1779
+ if (L = y, t.charCodeAt(a + 1) !== 61)
1780
1780
  throw new Error("Expected `=`");
1781
1781
  u(2);
1782
- } else t.charCodeAt(a) === 61 && (D = he.Equals, u(1));
1783
- let q = "", w = null;
1784
- if (D !== "exists") {
1782
+ } else t.charCodeAt(a) === 61 && (L = he.Equals, u(1));
1783
+ let V = "", F = null;
1784
+ if (L !== "exists") {
1785
1785
  if (ni(t.charCodeAt(a))) {
1786
- const H = t.charCodeAt(a);
1786
+ const q = t.charCodeAt(a);
1787
1787
  let _ = a + 1;
1788
- for (; _ < t.length && (t.charCodeAt(_) !== H || o(_)); )
1788
+ for (; _ < t.length && (t.charCodeAt(_) !== q || o(_)); )
1789
1789
  _ += 1;
1790
- if (t.charCodeAt(_) !== H)
1790
+ if (t.charCodeAt(_) !== q)
1791
1791
  throw new Error("Attribute value didn't end");
1792
- q = Vt(t.slice(a + 1, _)), a = _ + 1;
1792
+ V = Vt(t.slice(a + 1, _)), a = _ + 1;
1793
1793
  } else {
1794
- const H = a;
1794
+ const q = a;
1795
1795
  for (; a < t.length && (!Is(t.charCodeAt(a)) && t.charCodeAt(a) !== 93 || o(a)); )
1796
1796
  a += 1;
1797
- q = Vt(t.slice(H, a));
1797
+ V = Vt(t.slice(q, a));
1798
1798
  }
1799
1799
  u(0);
1800
1800
  const ee = t.charCodeAt(a) | 32;
1801
- ee === 115 ? (w = !1, u(1)) : ee === 105 && (w = !0, u(1));
1801
+ ee === 115 ? (F = !1, u(1)) : ee === 105 && (F = !0, u(1));
1802
1802
  }
1803
1803
  if (t.charCodeAt(a) !== 93)
1804
1804
  throw new Error("Attribute selector didn't terminate");
1805
1805
  a += 1;
1806
- const $ = {
1807
- type: R.Attribute,
1806
+ const Y = {
1807
+ type: M.Attribute,
1808
1808
  name: g,
1809
- action: D,
1810
- value: q,
1809
+ action: L,
1810
+ value: V,
1811
1811
  namespace: C,
1812
- ignoreCase: w
1812
+ ignoreCase: F
1813
1813
  };
1814
- i.push($);
1814
+ i.push(Y);
1815
1815
  break;
1816
1816
  }
1817
1817
  case 58: {
1818
1818
  if (t.charCodeAt(a + 1) === 58) {
1819
1819
  i.push({
1820
- type: R.PseudoElement,
1820
+ type: M.PseudoElement,
1821
1821
  name: s(2).toLowerCase(),
1822
1822
  data: t.charCodeAt(a) === 40 ? r() : null
1823
1823
  });
@@ -1834,12 +1834,12 @@ function Bn(e, t, a) {
1834
1834
  a += 1;
1835
1835
  } else {
1836
1836
  if (C = r(), vo.has(g)) {
1837
- const D = C.charCodeAt(0);
1838
- D === C.charCodeAt(C.length - 1) && ni(D) && (C = C.slice(1, -1));
1837
+ const L = C.charCodeAt(0);
1838
+ L === C.charCodeAt(C.length - 1) && ni(L) && (C = C.slice(1, -1));
1839
1839
  }
1840
1840
  C = Vt(C);
1841
1841
  }
1842
- i.push({ type: R.Pseudo, name: g, data: C });
1842
+ i.push({ type: M.Pseudo, name: g, data: C });
1843
1843
  break;
1844
1844
  }
1845
1845
  case 44: {
@@ -1848,10 +1848,10 @@ function Bn(e, t, a) {
1848
1848
  }
1849
1849
  default: {
1850
1850
  if (t.startsWith("/*", a)) {
1851
- const D = t.indexOf("*/", a + 2);
1852
- if (D < 0)
1851
+ const L = t.indexOf("*/", a + 2);
1852
+ if (L < 0)
1853
1853
  throw new Error("Comment was not terminated");
1854
- a = D + 2, i.length === 0 && u(0);
1854
+ a = L + 2, i.length === 0 && u(0);
1855
1855
  break;
1856
1856
  }
1857
1857
  let g = null, C;
@@ -1859,14 +1859,14 @@ function Bn(e, t, a) {
1859
1859
  a += 1, C = "*";
1860
1860
  else if (T === 124) {
1861
1861
  if (C = "", t.charCodeAt(a + 1) === 124) {
1862
- d(R.ColumnCombinator), u(2);
1862
+ d(M.ColumnCombinator), u(2);
1863
1863
  break;
1864
1864
  }
1865
1865
  } else if (Cs.test(t.slice(a)))
1866
1866
  C = s(0);
1867
1867
  else
1868
1868
  break e;
1869
- t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (g = C, t.charCodeAt(a + 1) === 42 ? (C = "*", a += 2) : C = s(1)), i.push(C === "*" ? { type: R.Universal, namespace: g } : { type: R.Tag, name: C, namespace: g });
1869
+ t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (g = C, t.charCodeAt(a + 1) === 42 ? (C = "*", a += 2) : C = s(1)), i.push(C === "*" ? { type: M.Universal, namespace: g } : { type: M.Tag, name: C, namespace: g });
1870
1870
  }
1871
1871
  }
1872
1872
  }
@@ -1883,11 +1883,11 @@ var Pa = {
1883
1883
  return !1;
1884
1884
  }
1885
1885
  };
1886
- const V = /* @__PURE__ */ yo(Pa), Un = /* @__PURE__ */ new Map([
1887
- [R.Universal, 50],
1888
- [R.Tag, 30],
1889
- [R.Attribute, 1],
1890
- [R.Pseudo, 0]
1886
+ const W = /* @__PURE__ */ yo(Pa), Un = /* @__PURE__ */ new Map([
1887
+ [M.Universal, 50],
1888
+ [M.Tag, 30],
1889
+ [M.Attribute, 1],
1890
+ [M.Pseudo, 0]
1891
1891
  ]);
1892
1892
  function Zi(e) {
1893
1893
  return !Un.has(e.type);
@@ -1914,7 +1914,7 @@ function Mo(e) {
1914
1914
  function Fn(e) {
1915
1915
  var t, a;
1916
1916
  let i = (t = Un.get(e.type)) !== null && t !== void 0 ? t : -1;
1917
- return e.type === R.Attribute ? (i = (a = Ro.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === he.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === R.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? i = 0 : Array.isArray(e.data) ? (i = Math.min(...e.data.map((s) => Math.min(...s.map(Fn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1917
+ return e.type === M.Attribute ? (i = (a = Ro.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === he.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === M.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? i = 0 : Array.isArray(e.data) ? (i = Math.min(...e.data.map((s) => Math.min(...s.map(Fn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1918
1918
  }
1919
1919
  const Po = /[-[\]{}()*+?.,\\^$|#\s]/g;
1920
1920
  function Ss(e) {
@@ -1995,7 +1995,7 @@ const wo = {
1995
1995
  element(e, t, a) {
1996
1996
  const { adapter: i } = a, { name: s, value: u } = t;
1997
1997
  if (/\s/.test(u))
1998
- return V.falseFunc;
1998
+ return W.falseFunc;
1999
1999
  const r = new RegExp(`(?:^|\\s)${Ss(u)}(?:$|\\s)`, pt(t, a) ? "i" : "");
2000
2000
  return function(c) {
2001
2001
  const d = i.getAttributeValue(c, s);
@@ -2009,7 +2009,7 @@ const wo = {
2009
2009
  const { adapter: i } = a, { name: s } = t;
2010
2010
  let { value: u } = t;
2011
2011
  const r = u.length;
2012
- return r === 0 ? V.falseFunc : pt(t, a) ? (u = u.toLowerCase(), (o) => {
2012
+ return r === 0 ? W.falseFunc : pt(t, a) ? (u = u.toLowerCase(), (o) => {
2013
2013
  const c = i.getAttributeValue(o, s);
2014
2014
  return c != null && c.length >= r && c.substr(0, r).toLowerCase() === u && e(o);
2015
2015
  }) : (o) => {
@@ -2021,7 +2021,7 @@ const wo = {
2021
2021
  const { adapter: i } = a, { name: s } = t;
2022
2022
  let { value: u } = t;
2023
2023
  const r = -u.length;
2024
- return r === 0 ? V.falseFunc : pt(t, a) ? (u = u.toLowerCase(), (o) => {
2024
+ return r === 0 ? W.falseFunc : pt(t, a) ? (u = u.toLowerCase(), (o) => {
2025
2025
  var c;
2026
2026
  return ((c = i.getAttributeValue(o, s)) === null || c === void 0 ? void 0 : c.substr(r).toLowerCase()) === u && e(o);
2027
2027
  }) : (o) => {
@@ -2032,7 +2032,7 @@ const wo = {
2032
2032
  any(e, t, a) {
2033
2033
  const { adapter: i } = a, { name: s, value: u } = t;
2034
2034
  if (u === "")
2035
- return V.falseFunc;
2035
+ return W.falseFunc;
2036
2036
  if (pt(t, a)) {
2037
2037
  const r = new RegExp(Ss(u), "i");
2038
2038
  return function(c) {
@@ -2081,13 +2081,13 @@ function Fo(e) {
2081
2081
  function Ho(e) {
2082
2082
  const t = e[0], a = e[1] - 1;
2083
2083
  if (a < 0 && t <= 0)
2084
- return V.falseFunc;
2084
+ return W.falseFunc;
2085
2085
  if (t === -1)
2086
2086
  return (u) => u <= a;
2087
2087
  if (t === 0)
2088
2088
  return (u) => u === a;
2089
2089
  if (t === 1)
2090
- return a < 0 ? V.trueFunc : (u) => u >= a;
2090
+ return a < 0 ? W.trueFunc : (u) => u >= a;
2091
2091
  const i = Math.abs(t), s = (a % i + i) % i;
2092
2092
  return t > 1 ? (u) => u >= a && u % i === s : (u) => u <= a && u % i === s;
2093
2093
  }
@@ -2115,7 +2115,7 @@ const Ni = {
2115
2115
  // Location specific methods
2116
2116
  "nth-child"(e, t, { adapter: a, equals: i }) {
2117
2117
  const s = Aa(t);
2118
- return s === V.falseFunc ? V.falseFunc : s === V.trueFunc ? Na(e, a) : function(r) {
2118
+ return s === W.falseFunc ? W.falseFunc : s === W.trueFunc ? Na(e, a) : function(r) {
2119
2119
  const o = a.getSiblings(r);
2120
2120
  let c = 0;
2121
2121
  for (let d = 0; d < o.length && !i(r, o[d]); d++)
@@ -2125,7 +2125,7 @@ const Ni = {
2125
2125
  },
2126
2126
  "nth-last-child"(e, t, { adapter: a, equals: i }) {
2127
2127
  const s = Aa(t);
2128
- return s === V.falseFunc ? V.falseFunc : s === V.trueFunc ? Na(e, a) : function(r) {
2128
+ return s === W.falseFunc ? W.falseFunc : s === W.trueFunc ? Na(e, a) : function(r) {
2129
2129
  const o = a.getSiblings(r);
2130
2130
  let c = 0;
2131
2131
  for (let d = o.length - 1; d >= 0 && !i(r, o[d]); d--)
@@ -2135,7 +2135,7 @@ const Ni = {
2135
2135
  },
2136
2136
  "nth-of-type"(e, t, { adapter: a, equals: i }) {
2137
2137
  const s = Aa(t);
2138
- return s === V.falseFunc ? V.falseFunc : s === V.trueFunc ? Na(e, a) : function(r) {
2138
+ return s === W.falseFunc ? W.falseFunc : s === W.trueFunc ? Na(e, a) : function(r) {
2139
2139
  const o = a.getSiblings(r);
2140
2140
  let c = 0;
2141
2141
  for (let d = 0; d < o.length; d++) {
@@ -2149,7 +2149,7 @@ const Ni = {
2149
2149
  },
2150
2150
  "nth-last-of-type"(e, t, { adapter: a, equals: i }) {
2151
2151
  const s = Aa(t);
2152
- return s === V.falseFunc ? V.falseFunc : s === V.trueFunc ? Na(e, a) : function(r) {
2152
+ return s === W.falseFunc ? W.falseFunc : s === W.trueFunc ? Na(e, a) : function(r) {
2153
2153
  const o = a.getSiblings(r);
2154
2154
  let c = 0;
2155
2155
  for (let d = o.length - 1; d >= 0; d--) {
@@ -2179,7 +2179,7 @@ const Ni = {
2179
2179
  function ui(e) {
2180
2180
  return function(a, i, { adapter: s }) {
2181
2181
  const u = s[e];
2182
- return typeof u != "function" ? V.falseFunc : function(o) {
2182
+ return typeof u != "function" ? W.falseFunc : function(o) {
2183
2183
  return u(o) && a(o);
2184
2184
  };
2185
2185
  };
@@ -2276,7 +2276,7 @@ const Yo = {
2276
2276
  text: "input:is(:not([type!='']), [type=text])"
2277
2277
  }, Hn = {};
2278
2278
  function qo(e, t) {
2279
- return e === V.falseFunc ? V.falseFunc : (a) => t.isTag(a) && e(a);
2279
+ return e === W.falseFunc ? W.falseFunc : (a) => t.isTag(a) && e(a);
2280
2280
  }
2281
2281
  function Yn(e, t) {
2282
2282
  const a = t.getSiblings(e);
@@ -2299,7 +2299,7 @@ function Ci(e) {
2299
2299
  }
2300
2300
  const ri = (e, t, a, i, s) => {
2301
2301
  const u = s(t, Ci(a), i);
2302
- return u === V.trueFunc ? e : u === V.falseFunc ? V.falseFunc : (r) => u(r) && e(r);
2302
+ return u === W.trueFunc ? e : u === W.falseFunc ? W.falseFunc : (r) => u(r) && e(r);
2303
2303
  }, oi = {
2304
2304
  is: ri,
2305
2305
  /**
@@ -2309,7 +2309,7 @@ const ri = (e, t, a, i, s) => {
2309
2309
  where: ri,
2310
2310
  not(e, t, a, i, s) {
2311
2311
  const u = s(t, Ci(a), i);
2312
- return u === V.falseFunc ? e : u === V.trueFunc ? V.falseFunc : (r) => !u(r) && e(r);
2312
+ return u === W.falseFunc ? e : u === W.trueFunc ? W.falseFunc : (r) => !u(r) && e(r);
2313
2313
  },
2314
2314
  has(e, t, a, i, s) {
2315
2315
  const { adapter: u } = a, r = Ci(a);
@@ -2318,10 +2318,10 @@ const ri = (e, t, a, i, s) => {
2318
2318
  // Used as a placeholder. Will be replaced with the actual element.
2319
2319
  [Hn]
2320
2320
  ) : void 0, c = s(t, r, o);
2321
- if (c === V.falseFunc)
2322
- return V.falseFunc;
2321
+ if (c === W.falseFunc)
2322
+ return W.falseFunc;
2323
2323
  const d = qo(c, u);
2324
- if (o && c !== V.trueFunc) {
2324
+ if (o && c !== W.trueFunc) {
2325
2325
  const { shouldTestNextSiblings: f = !1 } = c;
2326
2326
  return (E) => {
2327
2327
  if (!e(E))
@@ -2366,18 +2366,18 @@ function ci(e, t) {
2366
2366
  function $o(e, t, a, i, s) {
2367
2367
  const { adapter: u, equals: r } = a;
2368
2368
  switch (t.type) {
2369
- case R.PseudoElement:
2369
+ case M.PseudoElement:
2370
2370
  throw new Error("Pseudo-elements are not supported by css-select");
2371
- case R.ColumnCombinator:
2371
+ case M.ColumnCombinator:
2372
2372
  throw new Error("Column combinators are not yet supported by css-select");
2373
- case R.Attribute: {
2373
+ case M.Attribute: {
2374
2374
  if (t.namespace != null)
2375
2375
  throw new Error("Namespaced attributes are not yet supported by css-select");
2376
2376
  return (!a.xmlMode || a.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()), wo[t.action](e, t, a);
2377
2377
  }
2378
- case R.Pseudo:
2378
+ case M.Pseudo:
2379
2379
  return Vo(e, t, a, i, s);
2380
- case R.Tag: {
2380
+ case M.Tag: {
2381
2381
  if (t.namespace != null)
2382
2382
  throw new Error("Namespaced tag names are not yet supported by css-select");
2383
2383
  let { name: o } = t;
@@ -2385,7 +2385,7 @@ function $o(e, t, a, i, s) {
2385
2385
  return u.getName(d) === o && e(d);
2386
2386
  };
2387
2387
  }
2388
- case R.Descendant: {
2388
+ case M.Descendant: {
2389
2389
  if (a.cacheResults === !1 || typeof WeakSet > "u")
2390
2390
  return function(d) {
2391
2391
  let f = d;
@@ -2415,16 +2415,16 @@ function $o(e, t, a, i, s) {
2415
2415
  while (d = ci(d, u));
2416
2416
  return !1;
2417
2417
  };
2418
- case R.Parent:
2418
+ case M.Parent:
2419
2419
  return function(c) {
2420
2420
  return u.getChildren(c).some((d) => u.isTag(d) && e(d));
2421
2421
  };
2422
- case R.Child:
2422
+ case M.Child:
2423
2423
  return function(c) {
2424
2424
  const d = u.getParent(c);
2425
2425
  return d != null && u.isTag(d) && e(d);
2426
2426
  };
2427
- case R.Sibling:
2427
+ case M.Sibling:
2428
2428
  return function(c) {
2429
2429
  const d = u.getSiblings(c);
2430
2430
  for (let f = 0; f < d.length; f++) {
@@ -2436,7 +2436,7 @@ function $o(e, t, a, i, s) {
2436
2436
  }
2437
2437
  return !1;
2438
2438
  };
2439
- case R.Adjacent:
2439
+ case M.Adjacent:
2440
2440
  return u.prevElementSibling ? function(c) {
2441
2441
  const d = u.prevElementSibling(c);
2442
2442
  return d != null && e(d);
@@ -2451,7 +2451,7 @@ function $o(e, t, a, i, s) {
2451
2451
  }
2452
2452
  return !!f && e(f);
2453
2453
  };
2454
- case R.Universal: {
2454
+ case M.Universal: {
2455
2455
  if (t.namespace != null && t.namespace !== "*")
2456
2456
  throw new Error("Namespaced universal selectors are not yet supported by css-select");
2457
2457
  return e;
@@ -2459,12 +2459,12 @@ function $o(e, t, a, i, s) {
2459
2459
  }
2460
2460
  }
2461
2461
  function qn(e) {
2462
- return e.type === R.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(qn)));
2462
+ return e.type === M.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(qn)));
2463
2463
  }
2464
- const Wo = { type: R.Descendant }, Go = {
2464
+ const Wo = { type: M.Descendant }, Go = {
2465
2465
  type: "_flexibleDescendant"
2466
2466
  }, Xo = {
2467
- type: R.Pseudo,
2467
+ type: M.Pseudo,
2468
2468
  name: "scope",
2469
2469
  data: null
2470
2470
  };
@@ -2474,7 +2474,7 @@ function Qo(e, { adapter: t }, a) {
2474
2474
  return s === Hn || u && t.isTag(u);
2475
2475
  }));
2476
2476
  for (const s of e) {
2477
- if (!(s.length > 0 && Zi(s[0]) && s[0].type !== R.Descendant)) if (i && !s.some(qn))
2477
+ if (!(s.length > 0 && Zi(s[0]) && s[0].type !== M.Descendant)) if (i && !s.some(qn))
2478
2478
  s.unshift(Wo);
2479
2479
  else
2480
2480
  continue;
@@ -2493,18 +2493,18 @@ function Vn(e, t, a) {
2493
2493
  const o = e.map((c) => {
2494
2494
  if (c.length >= 2) {
2495
2495
  const [d, f] = c;
2496
- d.type !== R.Pseudo || d.name !== "scope" || (s && f.type === R.Descendant ? c[1] = Go : (f.type === R.Adjacent || f.type === R.Sibling) && (r = !0));
2496
+ d.type !== M.Pseudo || d.name !== "scope" || (s && f.type === M.Descendant ? c[1] = Go : (f.type === M.Adjacent || f.type === M.Sibling) && (r = !0));
2497
2497
  }
2498
2498
  return jo(c, t, u);
2499
- }).reduce(zo, V.falseFunc);
2499
+ }).reduce(zo, W.falseFunc);
2500
2500
  return o.shouldTestNextSiblings = r, o;
2501
2501
  }
2502
2502
  function jo(e, t, a) {
2503
2503
  var i;
2504
- return e.reduce((s, u) => s === V.falseFunc ? V.falseFunc : $o(s, u, t, a, Vn), (i = t.rootFunc) !== null && i !== void 0 ? i : V.trueFunc);
2504
+ return e.reduce((s, u) => s === W.falseFunc ? W.falseFunc : $o(s, u, t, a, Vn), (i = t.rootFunc) !== null && i !== void 0 ? i : W.trueFunc);
2505
2505
  }
2506
2506
  function zo(e, t) {
2507
- return t === V.falseFunc || e === V.trueFunc ? e : e === V.falseFunc || t === V.trueFunc ? t : function(i) {
2507
+ return t === W.falseFunc || e === W.trueFunc ? e : e === W.falseFunc || t === W.trueFunc ? t : function(i) {
2508
2508
  return e(i) || t(i);
2509
2509
  };
2510
2510
  }
@@ -2581,10 +2581,10 @@ function es(e) {
2581
2581
  return [a, t];
2582
2582
  }
2583
2583
  const sc = {
2584
- type: R.Universal,
2584
+ type: M.Universal,
2585
2585
  namespace: null
2586
2586
  }, nc = {
2587
- type: R.Pseudo,
2587
+ type: M.Pseudo,
2588
2588
  name: "scope",
2589
2589
  data: null
2590
2590
  };
@@ -2636,7 +2636,7 @@ function jn(e, t, a) {
2636
2636
  }
2637
2637
  for (let r = 0; r < s.length && (u == null ? void 0 : u.size) !== t.length; r++) {
2638
2638
  const o = s[r];
2639
- if ((u ? t.filter((f) => U(f) && !u.has(f)) : t).length === 0)
2639
+ if ((u ? t.filter((f) => B(f) && !u.has(f)) : t).length === 0)
2640
2640
  break;
2641
2641
  const d = zn(o, t, a);
2642
2642
  if (d.length)
@@ -2671,15 +2671,15 @@ function wa(e, t, a, i, s) {
2671
2671
  const u = t.findIndex(ka), r = t.slice(0, u), o = t[u], c = t.length - 1 === u ? s : 1 / 0, d = ac(o.name, o.data, c);
2672
2672
  if (d === 0)
2673
2673
  return [];
2674
- const E = (r.length === 0 && !Array.isArray(e) ? Wa(e).filter(U) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(U) : i || r.some(ea) ? Ii(e, [r], a, d) : Si(e, [r], a)).slice(0, d);
2674
+ const E = (r.length === 0 && !Array.isArray(e) ? Wa(e).filter(B) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(B) : i || r.some(ea) ? Ii(e, [r], a, d) : Si(e, [r], a)).slice(0, d);
2675
2675
  let T = uc(o.name, E, o.data, a);
2676
2676
  if (T.length === 0 || t.length === u + 1)
2677
2677
  return T;
2678
2678
  const g = t.slice(u + 1), C = g.some(ea);
2679
2679
  if (C) {
2680
2680
  if (ea(g[0])) {
2681
- const { type: D } = g[0];
2682
- (D === R.Sibling || D === R.Adjacent) && (T = Wn(T, Xa, !0)), g.unshift(sc);
2681
+ const { type: L } = g[0];
2682
+ (L === M.Sibling || L === M.Adjacent) && (T = Wn(T, Xa, !0)), g.unshift(sc);
2683
2683
  }
2684
2684
  a = {
2685
2685
  ...a,
@@ -2689,7 +2689,7 @@ function wa(e, t, a, i, s) {
2689
2689
  * Add a custom root func, to make sure traversals don't match elements
2690
2690
  * that aren't a part of the considered tree.
2691
2691
  */
2692
- rootFunc: (D) => T.includes(D)
2692
+ rootFunc: (L) => T.includes(L)
2693
2693
  };
2694
2694
  } else a.rootFunc && a.rootFunc !== Pa.trueFunc && (a = { ...a, rootFunc: Pa.trueFunc });
2695
2695
  return g.some(ka) ? wa(T, g, a, !1, s) : C ? (
@@ -2706,10 +2706,10 @@ function Ii(e, t, a, i) {
2706
2706
  }
2707
2707
  function Kn(e, t, a = 1 / 0) {
2708
2708
  const i = Wn(e, Xa, t.shouldTestNextSiblings);
2709
- return ji((s) => U(s) && t(s), i, !0, a);
2709
+ return ji((s) => B(s) && t(s), i, !0, a);
2710
2710
  }
2711
2711
  function Si(e, t, a) {
2712
- const i = (Array.isArray(e) ? e : [e]).filter(U);
2712
+ const i = (Array.isArray(e) ? e : [e]).filter(B);
2713
2713
  if (i.length === 0)
2714
2714
  return i;
2715
2715
  const s = Ji(t, a);
@@ -2720,7 +2720,7 @@ function cc(e) {
2720
2720
  if (!e)
2721
2721
  return this._make([]);
2722
2722
  if (typeof e != "string") {
2723
- const t = et(e) ? e.toArray() : [e], a = this.toArray();
2723
+ const t = tt(e) ? e.toArray() : [e], a = this.toArray();
2724
2724
  return this._make(t.filter((i) => a.some((s) => yn(s, i))));
2725
2725
  }
2726
2726
  return this._findBySelector(e, Number.POSITIVE_INFINITY);
@@ -2800,7 +2800,7 @@ function mc(e) {
2800
2800
  root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
2801
2801
  }, s = typeof e == "string" ? (u) => Gn(u, e, i) : Ta(e);
2802
2802
  return re(this, (u) => {
2803
- for (u && !dt(u) && !U(u) && (u = u.parent); u && U(u); ) {
2803
+ for (u && !dt(u) && !B(u) && (u = u.parent); u && B(u); ) {
2804
2804
  if (s(u, 0)) {
2805
2805
  a.includes(u) || a.push(u);
2806
2806
  break;
@@ -2812,14 +2812,14 @@ function mc(e) {
2812
2812
  const Ec = as((e) => Xi(e)), Tc = Ea((e) => {
2813
2813
  const t = [];
2814
2814
  for (; e.next; )
2815
- e = e.next, U(e) && t.push(e);
2815
+ e = e.next, B(e) && t.push(e);
2816
2816
  return t;
2817
2817
  }, Yt), pc = is((e) => Xi(e), Yt), bc = as((e) => Qi(e)), gc = Ea((e) => {
2818
2818
  const t = [];
2819
2819
  for (; e.prev; )
2820
- e = e.prev, U(e) && t.push(e);
2820
+ e = e.prev, B(e) && t.push(e);
2821
2821
  return t;
2822
- }, Yt), _c = is((e) => Qi(e), Yt), Ac = Ea((e) => In(e).filter((t) => U(t) && t !== e), Ht), Nc = Ea((e) => Wa(e).filter(U), Yt);
2822
+ }, Yt), _c = is((e) => Qi(e), Yt), Ac = Ea((e) => In(e).filter((t) => B(t) && t !== e), Ht), Nc = Ea((e) => Wa(e).filter(B), Yt);
2823
2823
  function Cc() {
2824
2824
  const e = this.toArray().reduce((t, a) => Te(a) ? t.concat(a.children) : t, []);
2825
2825
  return this._make(e);
@@ -2840,7 +2840,7 @@ function Sc(e) {
2840
2840
  return this._make(t);
2841
2841
  }
2842
2842
  function Ta(e) {
2843
- return typeof e == "function" ? (t, a) => e.call(t, a, t) : et(e) ? (t) => Array.prototype.includes.call(e, t) : function(t) {
2843
+ return typeof e == "function" ? (t, a) => e.call(t, a, t) : tt(e) ? (t) => Array.prototype.includes.call(e, t) : function(t) {
2844
2844
  return e === t;
2845
2845
  };
2846
2846
  }
@@ -2853,7 +2853,7 @@ function ss(e, t, a, i) {
2853
2853
  }
2854
2854
  function Oc(e) {
2855
2855
  const t = this.toArray();
2856
- return typeof e == "string" ? Xn(t.filter(U), e, this.options) : e ? t.some(Ta(e)) : !1;
2856
+ return typeof e == "string" ? Xn(t.filter(B), e, this.options) : e ? t.some(Ta(e)) : !1;
2857
2857
  }
2858
2858
  function Dc(e) {
2859
2859
  let t = this.toArray();
@@ -2890,7 +2890,7 @@ function Pc() {
2890
2890
  }
2891
2891
  function kc(e) {
2892
2892
  let t, a;
2893
- return e == null ? (t = this.parent().children(), a = this[0]) : typeof e == "string" ? (t = this._make(e), a = this[0]) : (t = this, a = et(e) ? e[0] : e), Array.prototype.indexOf.call(t, a);
2893
+ return e == null ? (t = this.parent().children(), a = this[0]) : typeof e == "string" ? (t = this._make(e), a = this[0]) : (t = this, a = tt(e) ? e[0] : e), Array.prototype.indexOf.call(t, a);
2894
2894
  }
2895
2895
  function wc(e, t) {
2896
2896
  return this._make(Array.prototype.slice.call(this, e, t));
@@ -3015,10 +3015,10 @@ function ht(e, t, a, i, s) {
3015
3015
  return c && (c.next = i[0]), d && (d.prev = i[i.length - 1]), e.splice(...o);
3016
3016
  }
3017
3017
  function Vc(e) {
3018
- return (et(e) ? e : this._make(e)).append(this), this;
3018
+ return (tt(e) ? e : this._make(e)).append(this), this;
3019
3019
  }
3020
3020
  function $c(e) {
3021
- return (et(e) ? e : this._make(e)).prepend(this), this;
3021
+ return (tt(e) ? e : this._make(e)).prepend(this), this;
3022
3022
  }
3023
3023
  const Wc = Zn((e, t, a) => {
3024
3024
  ht(t, t.length, 0, e, a);
@@ -3035,7 +3035,7 @@ function Jn(e) {
3035
3035
  let c = o, d = 0;
3036
3036
  for (; d < c.children.length; ) {
3037
3037
  const f = c.children[d];
3038
- U(f) ? (c = f, d = 0) : d++;
3038
+ B(f) ? (c = f, d = 0) : d++;
3039
3039
  }
3040
3040
  e(u, c, [o]);
3041
3041
  }
@@ -3156,7 +3156,7 @@ function sl(e) {
3156
3156
  return;
3157
3157
  for (const i of t.children)
3158
3158
  i.next = i.prev = i.parent = null;
3159
- const a = et(e) ? e.toArray() : this._parse(`${e}`, this.options, !1, t).children;
3159
+ const a = tt(e) ? e.toArray() : this._parse(`${e}`, this.options, !1, t).children;
3160
3160
  St(a, t);
3161
3161
  });
3162
3162
  }
@@ -3206,7 +3206,7 @@ function cl(e, t) {
3206
3206
  if (e != null && t != null || // When `prop` is a "plain" object
3207
3207
  typeof e == "object" && !Array.isArray(e))
3208
3208
  return re(this, (a, i) => {
3209
- U(a) && eu(a, e, t, i);
3209
+ B(a) && eu(a, e, t, i);
3210
3210
  });
3211
3211
  if (this.length !== 0)
3212
3212
  return tu(this[0], e);
@@ -3224,7 +3224,7 @@ function eu(e, t, a, i) {
3224
3224
  }
3225
3225
  }
3226
3226
  function tu(e, t) {
3227
- if (!e || !U(e))
3227
+ if (!e || !B(e))
3228
3228
  return;
3229
3229
  const a = dl(e.attribs.style);
3230
3230
  if (typeof t == "string")
@@ -3265,7 +3265,7 @@ function ml() {
3265
3265
  function El() {
3266
3266
  return this.map((e, t) => {
3267
3267
  const a = this._make(t);
3268
- return U(t) && t.name === "form" ? a.find(vs).toArray() : a.filter(vs).toArray();
3268
+ return B(t) && t.name === "form" ? a.find(vs).toArray() : a.filter(vs).toArray();
3269
3269
  }).filter(
3270
3270
  // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)
3271
3271
  '[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))'
@@ -3352,12 +3352,12 @@ function _l(e, t) {
3352
3352
  }
3353
3353
  }
3354
3354
  function d(f, E, T = o, g) {
3355
- if (f && et(f))
3355
+ if (f && tt(f))
3356
3356
  return f;
3357
- const C = gi(g, r), D = typeof T == "string" ? [e(T, C, !1, null)] : "length" in T ? T : [T], y = et(D) ? D : new c(D, null, C);
3357
+ const C = gi(g, r), L = typeof T == "string" ? [e(T, C, !1, null)] : "length" in T ? T : [T], y = tt(L) ? L : new c(L, null, C);
3358
3358
  if (y._root = y, !f)
3359
3359
  return new c(void 0, y, C);
3360
- const q = typeof f == "string" && _i(f) ? (
3360
+ const V = typeof f == "string" && _i(f) ? (
3361
3361
  // $(<html>)
3362
3362
  e(f, C, !1, null).children
3363
3363
  ) : Al(f) ? (
@@ -3366,12 +3366,12 @@ function _l(e, t) {
3366
3366
  ) : Array.isArray(f) ? (
3367
3367
  // $([dom])
3368
3368
  f
3369
- ) : void 0, w = new c(q, y, C);
3370
- if (q)
3371
- return w;
3369
+ ) : void 0, F = new c(V, y, C);
3370
+ if (V)
3371
+ return F;
3372
3372
  if (typeof f != "string")
3373
3373
  throw new TypeError("Unexpected type of selector");
3374
- let $ = f;
3374
+ let Y = f;
3375
3375
  const ee = E ? (
3376
3376
  // If we don't have a context, maybe we have a root, from loading
3377
3377
  typeof E == "string" ? _i(E) ? (
@@ -3379,8 +3379,8 @@ function _l(e, t) {
3379
3379
  new c([e(E, C, !1, null)], y, C)
3380
3380
  ) : (
3381
3381
  // $('li', 'ul')
3382
- ($ = `${E} ${$}`, y)
3383
- ) : et(E) ? (
3382
+ (Y = `${E} ${Y}`, y)
3383
+ ) : tt(E) ? (
3384
3384
  // $('li', $)
3385
3385
  E
3386
3386
  ) : (
@@ -3388,7 +3388,7 @@ function _l(e, t) {
3388
3388
  new c(Array.isArray(E) ? E : [E], y, C)
3389
3389
  )
3390
3390
  ) : y;
3391
- return ee ? ee.find($) : w;
3391
+ return ee ? ee.find(Y) : F;
3392
3392
  }
3393
3393
  return Object.assign(d, fo, {
3394
3394
  load: a,
@@ -3573,10 +3573,10 @@ var Nt;
3573
3573
  (function(e) {
3574
3574
  e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
3575
3575
  })(Nt || (Nt = {}));
3576
- var ye;
3576
+ var Re;
3577
3577
  (function(e) {
3578
3578
  e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
3579
- })(ye || (ye = {}));
3579
+ })(Re || (Re = {}));
3580
3580
  var p;
3581
3581
  (function(e) {
3582
3582
  e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
@@ -3836,11 +3836,11 @@ function Kt(e) {
3836
3836
  function Rl(e) {
3837
3837
  return e >= l.LATIN_SMALL_A && e <= l.LATIN_SMALL_Z;
3838
3838
  }
3839
- function it(e) {
3839
+ function st(e) {
3840
3840
  return Rl(e) || Kt(e);
3841
3841
  }
3842
3842
  function ys(e) {
3843
- return it(e) || yl(e);
3843
+ return st(e) || yl(e);
3844
3844
  }
3845
3845
  function Ca(e) {
3846
3846
  return e + 32;
@@ -4477,7 +4477,7 @@ let Pl = class {
4477
4477
  // Tag open state
4478
4478
  //------------------------------------------------------------------
4479
4479
  _stateTagOpen(t) {
4480
- if (it(t))
4480
+ if (st(t))
4481
4481
  this._createStartTagToken(), this.state = h.TAG_NAME, this._stateTagName(t);
4482
4482
  else
4483
4483
  switch (t) {
@@ -4504,7 +4504,7 @@ let Pl = class {
4504
4504
  // End tag open state
4505
4505
  //------------------------------------------------------------------
4506
4506
  _stateEndTagOpen(t) {
4507
- if (it(t))
4507
+ if (st(t))
4508
4508
  this._createEndTagToken(), this.state = h.TAG_NAME, this._stateTagName(t);
4509
4509
  else
4510
4510
  switch (t) {
@@ -4560,7 +4560,7 @@ let Pl = class {
4560
4560
  // RCDATA end tag open state
4561
4561
  //------------------------------------------------------------------
4562
4562
  _stateRcdataEndTagOpen(t) {
4563
- it(t) ? (this.state = h.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(t)) : (this._emitChars("</"), this.state = h.RCDATA, this._stateRcdata(t));
4563
+ st(t) ? (this.state = h.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(t)) : (this._emitChars("</"), this.state = h.RCDATA, this._stateRcdata(t));
4564
4564
  }
4565
4565
  handleSpecialEndTag(t) {
4566
4566
  if (!this.preprocessor.startsWith(this.lastStartTagName, !1))
@@ -4594,7 +4594,7 @@ let Pl = class {
4594
4594
  // RAWTEXT end tag open state
4595
4595
  //------------------------------------------------------------------
4596
4596
  _stateRawtextEndTagOpen(t) {
4597
- it(t) ? (this.state = h.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(t)) : (this._emitChars("</"), this.state = h.RAWTEXT, this._stateRawtext(t));
4597
+ st(t) ? (this.state = h.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(t)) : (this._emitChars("</"), this.state = h.RAWTEXT, this._stateRawtext(t));
4598
4598
  }
4599
4599
  // RAWTEXT end tag name state
4600
4600
  //------------------------------------------------------------------
@@ -4620,7 +4620,7 @@ let Pl = class {
4620
4620
  // Script data end tag open state
4621
4621
  //------------------------------------------------------------------
4622
4622
  _stateScriptDataEndTagOpen(t) {
4623
- it(t) ? (this.state = h.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(t)) : (this._emitChars("</"), this.state = h.SCRIPT_DATA, this._stateScriptData(t));
4623
+ st(t) ? (this.state = h.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(t)) : (this._emitChars("</"), this.state = h.SCRIPT_DATA, this._stateScriptData(t));
4624
4624
  }
4625
4625
  // Script data end tag name state
4626
4626
  //------------------------------------------------------------------
@@ -4716,12 +4716,12 @@ let Pl = class {
4716
4716
  // Script data escaped less-than sign state
4717
4717
  //------------------------------------------------------------------
4718
4718
  _stateScriptDataEscapedLessThanSign(t) {
4719
- t === l.SOLIDUS ? this.state = h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : it(t) ? (this._emitChars("<"), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(t)) : (this._emitChars("<"), this.state = h.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
4719
+ t === l.SOLIDUS ? this.state = h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : st(t) ? (this._emitChars("<"), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(t)) : (this._emitChars("<"), this.state = h.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
4720
4720
  }
4721
4721
  // Script data escaped end tag open state
4722
4722
  //------------------------------------------------------------------
4723
4723
  _stateScriptDataEscapedEndTagOpen(t) {
4724
- it(t) ? (this.state = h.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(t)) : (this._emitChars("</"), this.state = h.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
4724
+ st(t) ? (this.state = h.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(t)) : (this._emitChars("</"), this.state = h.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
4725
4725
  }
4726
4726
  // Script data escaped end tag name state
4727
4727
  //------------------------------------------------------------------
@@ -5981,11 +5981,11 @@ class Yl {
5981
5981
  }
5982
5982
  }
5983
5983
  const li = 3;
5984
- var We;
5984
+ var Ge;
5985
5985
  (function(e) {
5986
5986
  e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element";
5987
- })(We || (We = {}));
5988
- const ws = { type: We.Marker };
5987
+ })(Ge || (Ge = {}));
5988
+ const ws = { type: Ge.Marker };
5989
5989
  class ql {
5990
5990
  constructor(t) {
5991
5991
  this.treeAdapter = t, this.entries = [], this.bookmark = null;
@@ -5997,7 +5997,7 @@ class ql {
5997
5997
  const i = [], s = a.length, u = this.treeAdapter.getTagName(t), r = this.treeAdapter.getNamespaceURI(t);
5998
5998
  for (let o = 0; o < this.entries.length; o++) {
5999
5999
  const c = this.entries[o];
6000
- if (c.type === We.Marker)
6000
+ if (c.type === Ge.Marker)
6001
6001
  break;
6002
6002
  const { element: d } = c;
6003
6003
  if (this.treeAdapter.getTagName(d) === u && this.treeAdapter.getNamespaceURI(d) === r) {
@@ -6026,7 +6026,7 @@ class ql {
6026
6026
  }
6027
6027
  pushElement(t, a) {
6028
6028
  this._ensureNoahArkCondition(t), this.entries.unshift({
6029
- type: We.Element,
6029
+ type: Ge.Element,
6030
6030
  element: t,
6031
6031
  token: a
6032
6032
  });
@@ -6034,7 +6034,7 @@ class ql {
6034
6034
  insertElementAfterBookmark(t, a) {
6035
6035
  const i = this.entries.indexOf(this.bookmark);
6036
6036
  this.entries.splice(i, 0, {
6037
- type: We.Element,
6037
+ type: Ge.Element,
6038
6038
  element: t,
6039
6039
  token: a
6040
6040
  });
@@ -6054,19 +6054,19 @@ class ql {
6054
6054
  }
6055
6055
  //Search
6056
6056
  getElementEntryInScopeWithTagName(t) {
6057
- const a = this.entries.find((i) => i.type === We.Marker || this.treeAdapter.getTagName(i.element) === t);
6058
- return a && a.type === We.Element ? a : null;
6057
+ const a = this.entries.find((i) => i.type === Ge.Marker || this.treeAdapter.getTagName(i.element) === t);
6058
+ return a && a.type === Ge.Element ? a : null;
6059
6059
  }
6060
6060
  getElementEntry(t) {
6061
- return this.entries.find((a) => a.type === We.Element && a.element === t);
6061
+ return this.entries.find((a) => a.type === Ge.Element && a.element === t);
6062
6062
  }
6063
6063
  }
6064
- const Je = {
6064
+ const et = {
6065
6065
  //Node construction
6066
6066
  createDocument() {
6067
6067
  return {
6068
6068
  nodeName: "#document",
6069
- mode: ye.NO_QUIRKS,
6069
+ mode: Re.NO_QUIRKS,
6070
6070
  childNodes: []
6071
6071
  };
6072
6072
  },
@@ -6126,7 +6126,7 @@ const Je = {
6126
6126
  systemId: i,
6127
6127
  parentNode: null
6128
6128
  };
6129
- Je.appendChild(e, u);
6129
+ et.appendChild(e, u);
6130
6130
  }
6131
6131
  },
6132
6132
  setDocumentMode(e, t) {
@@ -6144,16 +6144,16 @@ const Je = {
6144
6144
  insertText(e, t) {
6145
6145
  if (e.childNodes.length > 0) {
6146
6146
  const a = e.childNodes[e.childNodes.length - 1];
6147
- if (Je.isTextNode(a)) {
6147
+ if (et.isTextNode(a)) {
6148
6148
  a.value += t;
6149
6149
  return;
6150
6150
  }
6151
6151
  }
6152
- Je.appendChild(e, Je.createTextNode(t));
6152
+ et.appendChild(e, et.createTextNode(t));
6153
6153
  },
6154
6154
  insertTextBefore(e, t, a) {
6155
6155
  const i = e.childNodes[e.childNodes.indexOf(a) - 1];
6156
- i && Je.isTextNode(i) ? i.value += t : Je.insertBefore(e, Je.createTextNode(t), a);
6156
+ i && et.isTextNode(i) ? i.value += t : et.insertBefore(e, et.createTextNode(t), a);
6157
6157
  },
6158
6158
  adoptAttributes(e, t) {
6159
6159
  const a = new Set(e.attrs.map((i) => i.name));
@@ -6295,21 +6295,21 @@ function Ql(e) {
6295
6295
  }
6296
6296
  function jl(e) {
6297
6297
  if (e.name !== ou)
6298
- return ye.QUIRKS;
6298
+ return Re.QUIRKS;
6299
6299
  const { systemId: t } = e;
6300
6300
  if (t && t.toLowerCase() === $l)
6301
- return ye.QUIRKS;
6301
+ return Re.QUIRKS;
6302
6302
  let { publicId: a } = e;
6303
6303
  if (a !== null) {
6304
6304
  if (a = a.toLowerCase(), Gl.has(a))
6305
- return ye.QUIRKS;
6305
+ return Re.QUIRKS;
6306
6306
  let i = t === null ? Wl : cu;
6307
6307
  if (Bs(a, i))
6308
- return ye.QUIRKS;
6308
+ return Re.QUIRKS;
6309
6309
  if (i = t === null ? lu : Xl, Bs(a, i))
6310
- return ye.LIMITED_QUIRKS;
6310
+ return Re.LIMITED_QUIRKS;
6311
6311
  }
6312
- return ye.NO_QUIRKS;
6312
+ return Re.NO_QUIRKS;
6313
6313
  }
6314
6314
  const Us = {
6315
6315
  TEXT_HTML: "text/html",
@@ -6526,7 +6526,7 @@ const l0 = {
6526
6526
  }, fu = /* @__PURE__ */ new Set([n.TABLE, n.TBODY, n.TFOOT, n.THEAD, n.TR]), Fs = {
6527
6527
  scriptingEnabled: !0,
6528
6528
  sourceCodeLocationInfo: !1,
6529
- treeAdapter: Je,
6529
+ treeAdapter: et,
6530
6530
  onParseError: null
6531
6531
  };
6532
6532
  let mu = class {
@@ -6794,7 +6794,7 @@ let mu = class {
6794
6794
  _reconstructActiveFormattingElements() {
6795
6795
  const t = this.activeFormattingElements.entries.length;
6796
6796
  if (t) {
6797
- const a = this.activeFormattingElements.entries.findIndex((s) => s.type === We.Marker || this.openElements.contains(s.element)), i = a < 0 ? t - 1 : a - 1;
6797
+ const a = this.activeFormattingElements.entries.findIndex((s) => s.type === Ge.Marker || this.openElements.contains(s.element)), i = a < 0 ? t - 1 : a - 1;
6798
6798
  for (let s = i; s >= 0; s--) {
6799
6799
  const u = this.activeFormattingElements.entries[s];
6800
6800
  this._insertElement(u.token, this.treeAdapter.getNamespaceURI(u.element)), u.element = this.openElements.current;
@@ -7147,7 +7147,7 @@ let mu = class {
7147
7147
  break;
7148
7148
  }
7149
7149
  case m.IN_HEAD: {
7150
- qe(this, t);
7150
+ Ve(this, t);
7151
7151
  break;
7152
7152
  }
7153
7153
  case m.IN_HEAD_NO_SCRIPT: {
@@ -7507,11 +7507,11 @@ function rs(e, t) {
7507
7507
  }
7508
7508
  function g0(e, t) {
7509
7509
  e._setDocumentType(t);
7510
- const a = t.forceQuirks ? ye.QUIRKS : jl(t);
7510
+ const a = t.forceQuirks ? Re.QUIRKS : jl(t);
7511
7511
  Ql(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, a), e.insertionMode = m.BEFORE_HTML;
7512
7512
  }
7513
7513
  function $t(e, t) {
7514
- e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, ye.QUIRKS), e.insertionMode = m.BEFORE_HTML, e._processToken(t);
7514
+ e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Re.QUIRKS), e.insertionMode = m.BEFORE_HTML, e._processToken(t);
7515
7515
  }
7516
7516
  function _0(e, t) {
7517
7517
  t.tagID === n.HTML ? (e._insertElement(t, N.HTML), e.insertionMode = m.BEFORE_HEAD) : ta(e, t);
@@ -7544,7 +7544,7 @@ function C0(e, t) {
7544
7544
  function aa(e, t) {
7545
7545
  e._insertFakeElement(p.HEAD, n.HEAD), e.headElement = e.openElements.current, e.insertionMode = m.IN_HEAD, e._processToken(t);
7546
7546
  }
7547
- function qe(e, t) {
7547
+ function Ve(e, t) {
7548
7548
  switch (t.tagID) {
7549
7549
  case n.HTML: {
7550
7550
  ge(e, t);
@@ -7626,7 +7626,7 @@ function S0(e, t) {
7626
7626
  case n.META:
7627
7627
  case n.NOFRAMES:
7628
7628
  case n.STYLE: {
7629
- qe(e, t);
7629
+ Ve(e, t);
7630
7630
  break;
7631
7631
  }
7632
7632
  case n.NOSCRIPT: {
@@ -7679,7 +7679,7 @@ function O0(e, t) {
7679
7679
  case n.STYLE:
7680
7680
  case n.TEMPLATE:
7681
7681
  case n.TITLE: {
7682
- e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, n.HEAD), qe(e, t), e.openElements.remove(e.headElement);
7682
+ e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, n.HEAD), Ve(e, t), e.openElements.remove(e.headElement);
7683
7683
  break;
7684
7684
  }
7685
7685
  case n.HEAD: {
@@ -7801,7 +7801,7 @@ function q0(e, t) {
7801
7801
  e._reconstructActiveFormattingElements(), e._insertElement(t, N.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
7802
7802
  }
7803
7803
  function V0(e, t) {
7804
- e.treeAdapter.getDocumentMode(e.document) !== ye.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, N.HTML), e.framesetOk = !1, e.insertionMode = m.IN_TABLE;
7804
+ e.treeAdapter.getDocumentMode(e.document) !== Re.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, N.HTML), e.framesetOk = !1, e.insertionMode = m.IN_TABLE;
7805
7805
  }
7806
7806
  function pu(e, t) {
7807
7807
  e._reconstructActiveFormattingElements(), e._appendElement(t, N.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
@@ -7968,7 +7968,7 @@ function ge(e, t) {
7968
7968
  case n.BGSOUND:
7969
7969
  case n.BASEFONT:
7970
7970
  case n.TEMPLATE: {
7971
- qe(e, t);
7971
+ Ve(e, t);
7972
7972
  break;
7973
7973
  }
7974
7974
  case n.BODY: {
@@ -8275,7 +8275,7 @@ function Ut(e, t) {
8275
8275
  case n.STYLE:
8276
8276
  case n.SCRIPT:
8277
8277
  case n.TEMPLATE: {
8278
- qe(e, t);
8278
+ Ve(e, t);
8279
8279
  break;
8280
8280
  }
8281
8281
  case n.COL: {
@@ -8397,7 +8397,7 @@ function os(e, t) {
8397
8397
  break;
8398
8398
  }
8399
8399
  case n.TEMPLATE: {
8400
- qe(e, t);
8400
+ Ve(e, t);
8401
8401
  break;
8402
8402
  }
8403
8403
  default:
@@ -8579,7 +8579,7 @@ function Su(e, t) {
8579
8579
  }
8580
8580
  case n.SCRIPT:
8581
8581
  case n.TEMPLATE: {
8582
- qe(e, t);
8582
+ Ve(e, t);
8583
8583
  break;
8584
8584
  }
8585
8585
  }
@@ -8624,7 +8624,7 @@ function Ld(e, t) {
8624
8624
  case n.STYLE:
8625
8625
  case n.TEMPLATE:
8626
8626
  case n.TITLE: {
8627
- qe(e, t);
8627
+ Ve(e, t);
8628
8628
  break;
8629
8629
  }
8630
8630
  case n.CAPTION:
@@ -8690,7 +8690,7 @@ function Md(e, t) {
8690
8690
  break;
8691
8691
  }
8692
8692
  case n.NOFRAMES: {
8693
- qe(e, t);
8693
+ Ve(e, t);
8694
8694
  break;
8695
8695
  }
8696
8696
  }
@@ -8705,7 +8705,7 @@ function kd(e, t) {
8705
8705
  break;
8706
8706
  }
8707
8707
  case n.NOFRAMES: {
8708
- qe(e, t);
8708
+ Ve(e, t);
8709
8709
  break;
8710
8710
  }
8711
8711
  }
@@ -8726,7 +8726,7 @@ function Ud(e, t) {
8726
8726
  break;
8727
8727
  }
8728
8728
  case n.NOFRAMES: {
8729
- qe(e, t);
8729
+ Ve(e, t);
8730
8730
  break;
8731
8731
  }
8732
8732
  }
@@ -8790,7 +8790,7 @@ const Vd = /* @__PURE__ */ new Set([
8790
8790
  function $d(e, t) {
8791
8791
  return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === N.HTML && Vd.has(t.treeAdapter.getTagName(e));
8792
8792
  }
8793
- const Wd = { treeAdapter: Je, scriptingEnabled: !0 };
8793
+ const Wd = { treeAdapter: et, scriptingEnabled: !0 };
8794
8794
  function Gd(e, t) {
8795
8795
  const a = { ...Wd, ...t };
8796
8796
  return Lu(e, a);
@@ -8862,15 +8862,15 @@ function th(e, t, a) {
8862
8862
  let i = "!DOCTYPE ";
8863
8863
  return e && (i += e), t ? i += ` PUBLIC ${qs(t)}` : a && (i += " SYSTEM"), a && (i += ` ${qs(a)}`), i;
8864
8864
  }
8865
- const st = {
8865
+ const nt = {
8866
8866
  // Re-exports from domhandler
8867
8867
  isCommentNode: Va,
8868
- isElementNode: U,
8869
- isTextNode: Xe,
8868
+ isElementNode: B,
8869
+ isTextNode: Qe,
8870
8870
  //Node construction
8871
8871
  createDocument() {
8872
8872
  const e = new It([]);
8873
- return e["x-mode"] = ye.NO_QUIRKS, e;
8873
+ return e["x-mode"] = Re.NO_QUIRKS, e;
8874
8874
  },
8875
8875
  createDocumentFragment() {
8876
8876
  return new It([]);
@@ -8900,7 +8900,7 @@ const st = {
8900
8900
  s && (s.next = t, t.prev = s), a.prev = t, t.next = a, e.children.splice(i, 0, t), t.parent = e;
8901
8901
  },
8902
8902
  setTemplateContent(e, t) {
8903
- st.appendChild(e, t);
8903
+ nt.appendChild(e, t);
8904
8904
  },
8905
8905
  getTemplateContent(e) {
8906
8906
  return e.children[0];
@@ -8908,7 +8908,7 @@ const st = {
8908
8908
  setDocumentType(e, t, a, i) {
8909
8909
  const s = th(t, a, i);
8910
8910
  let u = e.children.find((r) => Ti(r) && r.name === "!doctype");
8911
- u ? u.data = s ?? null : (u = new qi("!doctype", s), st.appendChild(e, u)), u["x-name"] = t, u["x-publicId"] = a, u["x-systemId"] = i;
8911
+ u ? u.data = s ?? null : (u = new qi("!doctype", s), nt.appendChild(e, u)), u["x-name"] = t, u["x-publicId"] = a, u["x-systemId"] = i;
8912
8912
  },
8913
8913
  setDocumentMode(e, t) {
8914
8914
  e["x-mode"] = t;
@@ -8924,11 +8924,11 @@ const st = {
8924
8924
  },
8925
8925
  insertText(e, t) {
8926
8926
  const a = e.children[e.children.length - 1];
8927
- a && Xe(a) ? a.data += t : st.appendChild(e, st.createTextNode(t));
8927
+ a && Qe(a) ? a.data += t : nt.appendChild(e, nt.createTextNode(t));
8928
8928
  },
8929
8929
  insertTextBefore(e, t, a) {
8930
8930
  const i = e.children[e.children.indexOf(a) - 1];
8931
- i && Xe(i) ? i.data += t : st.insertBefore(e, st.createTextNode(t), a);
8931
+ i && Qe(i) ? i.data += t : nt.insertBefore(e, nt.createTextNode(t), a);
8932
8932
  },
8933
8933
  adoptAttributes(e, t) {
8934
8934
  for (let a = 0; a < t.length; a++) {
@@ -8994,9 +8994,9 @@ const st = {
8994
8994
  };
8995
8995
  function ah(e, t, a, i) {
8996
8996
  var s;
8997
- return (s = t.treeAdapter) !== null && s !== void 0 || (t.treeAdapter = st), t.scriptingEnabled !== !1 && (t.scriptingEnabled = !0), a ? Jd(e, t) : eh(i, e, t);
8997
+ return (s = t.treeAdapter) !== null && s !== void 0 || (t.treeAdapter = nt), t.scriptingEnabled !== !1 && (t.scriptingEnabled = !0), a ? Jd(e, t) : eh(i, e, t);
8998
8998
  }
8999
- const ih = { treeAdapter: st };
8999
+ const ih = { treeAdapter: nt };
9000
9000
  function sh(e) {
9001
9001
  const t = "length" in e ? e : [e];
9002
9002
  for (let i = 0; i < t.length; i += 1) {
@@ -9018,19 +9018,19 @@ var I;
9018
9018
  (function(e) {
9019
9019
  e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
9020
9020
  })(I || (I = {}));
9021
- function Ze(e) {
9021
+ function Je(e) {
9022
9022
  return e === k.Space || e === k.NewLine || e === k.Tab || e === k.FormFeed || e === k.CarriageReturn;
9023
9023
  }
9024
9024
  function Ia(e) {
9025
- return e === k.Slash || e === k.Gt || Ze(e);
9025
+ return e === k.Slash || e === k.Gt || Je(e);
9026
9026
  }
9027
9027
  function nh(e) {
9028
9028
  return e >= k.LowerA && e <= k.LowerZ || e >= k.UpperA && e <= k.UpperZ;
9029
9029
  }
9030
- var Ge;
9030
+ var Xe;
9031
9031
  (function(e) {
9032
9032
  e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
9033
- })(Ge || (Ge = {}));
9033
+ })(Xe || (Xe = {}));
9034
9034
  const pe = {
9035
9035
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
9036
9036
  // CDATA[
@@ -9099,7 +9099,7 @@ class uh {
9099
9099
  /** Look for an end tag. For <title> tags, also decode entities. */
9100
9100
  stateInSpecialTag(t) {
9101
9101
  if (this.sequenceIndex === this.currentSequence.length) {
9102
- if (t === k.Gt || Ze(t)) {
9102
+ if (t === k.Gt || Je(t)) {
9103
9103
  const a = this.index - this.currentSequence.length;
9104
9104
  if (this.sectionStart < a) {
9105
9105
  const i = this.index;
@@ -9164,31 +9164,31 @@ class uh {
9164
9164
  Ia(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
9165
9165
  }
9166
9166
  stateBeforeClosingTagName(t) {
9167
- Ze(t) || (t === k.Gt ? this.state = I.Text : (this.state = this.isTagStartChar(t) ? I.InClosingTagName : I.InSpecialComment, this.sectionStart = this.index));
9167
+ Je(t) || (t === k.Gt ? this.state = I.Text : (this.state = this.isTagStartChar(t) ? I.InClosingTagName : I.InSpecialComment, this.sectionStart = this.index));
9168
9168
  }
9169
9169
  stateInClosingTagName(t) {
9170
- (t === k.Gt || Ze(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.AfterClosingTagName, this.stateAfterClosingTagName(t));
9170
+ (t === k.Gt || Je(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.AfterClosingTagName, this.stateAfterClosingTagName(t));
9171
9171
  }
9172
9172
  stateAfterClosingTagName(t) {
9173
9173
  (t === k.Gt || this.fastForwardTo(k.Gt)) && (this.state = I.Text, this.sectionStart = this.index + 1);
9174
9174
  }
9175
9175
  stateBeforeAttributeName(t) {
9176
- t === k.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = I.InSpecialTag, this.sequenceIndex = 0) : this.state = I.Text, this.sectionStart = this.index + 1) : t === k.Slash ? this.state = I.InSelfClosingTag : Ze(t) || (this.state = I.InAttributeName, this.sectionStart = this.index);
9176
+ t === k.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = I.InSpecialTag, this.sequenceIndex = 0) : this.state = I.Text, this.sectionStart = this.index + 1) : t === k.Slash ? this.state = I.InSelfClosingTag : Je(t) || (this.state = I.InAttributeName, this.sectionStart = this.index);
9177
9177
  }
9178
9178
  stateInSelfClosingTag(t) {
9179
- t === k.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = I.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : Ze(t) || (this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
9179
+ t === k.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = I.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : Je(t) || (this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
9180
9180
  }
9181
9181
  stateInAttributeName(t) {
9182
9182
  (t === k.Eq || Ia(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = I.AfterAttributeName, this.stateAfterAttributeName(t));
9183
9183
  }
9184
9184
  stateAfterAttributeName(t) {
9185
- t === k.Eq ? this.state = I.BeforeAttributeValue : t === k.Slash || t === k.Gt ? (this.cbs.onattribend(Ge.NoValue, this.sectionStart), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : Ze(t) || (this.cbs.onattribend(Ge.NoValue, this.sectionStart), this.state = I.InAttributeName, this.sectionStart = this.index);
9185
+ t === k.Eq ? this.state = I.BeforeAttributeValue : t === k.Slash || t === k.Gt ? (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : Je(t) || (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.state = I.InAttributeName, this.sectionStart = this.index);
9186
9186
  }
9187
9187
  stateBeforeAttributeValue(t) {
9188
- t === k.DoubleQuote ? (this.state = I.InAttributeValueDq, this.sectionStart = this.index + 1) : t === k.SingleQuote ? (this.state = I.InAttributeValueSq, this.sectionStart = this.index + 1) : Ze(t) || (this.sectionStart = this.index, this.state = I.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
9188
+ t === k.DoubleQuote ? (this.state = I.InAttributeValueDq, this.sectionStart = this.index + 1) : t === k.SingleQuote ? (this.state = I.InAttributeValueSq, this.sectionStart = this.index + 1) : Je(t) || (this.sectionStart = this.index, this.state = I.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
9189
9189
  }
9190
9190
  handleInAttributeValue(t, a) {
9191
- t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === k.DoubleQuote ? Ge.Double : Ge.Single, this.index + 1), this.state = I.BeforeAttributeName) : this.decodeEntities && t === k.Amp && this.startEntity();
9191
+ t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === k.DoubleQuote ? Xe.Double : Xe.Single, this.index + 1), this.state = I.BeforeAttributeName) : this.decodeEntities && t === k.Amp && this.startEntity();
9192
9192
  }
9193
9193
  stateInAttributeValueDoubleQuotes(t) {
9194
9194
  this.handleInAttributeValue(t, k.DoubleQuote);
@@ -9197,7 +9197,7 @@ class uh {
9197
9197
  this.handleInAttributeValue(t, k.SingleQuote);
9198
9198
  }
9199
9199
  stateInAttributeValueNoQuotes(t) {
9200
- Ze(t) || t === k.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Ge.Unquoted, this.index), this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === k.Amp && this.startEntity();
9200
+ Je(t) || t === k.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Xe.Unquoted, this.index), this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === k.Amp && this.startEntity();
9201
9201
  }
9202
9202
  stateBeforeDeclaration(t) {
9203
9203
  t === k.OpeningSquareBracket ? (this.state = I.CDATASequence, this.sequenceIndex = 0) : this.state = t === k.Dash ? I.BeforeComment : I.InDeclaration;
@@ -9548,7 +9548,7 @@ class lh {
9548
9548
  /** @internal */
9549
9549
  onattribend(t, a) {
9550
9550
  var i, s;
9551
- this.endIndex = a, (s = (i = this.cbs).onattribute) === null || s === void 0 || s.call(i, this.attribname, this.attribvalue, t === Ge.Double ? '"' : t === Ge.Single ? "'" : t === Ge.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
9551
+ this.endIndex = a, (s = (i = this.cbs).onattribute) === null || s === void 0 || s.call(i, this.attribname, this.attribvalue, t === Xe.Double ? '"' : t === Xe.Single ? "'" : t === Xe.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
9552
9552
  }
9553
9553
  getInstructionName(t) {
9554
9554
  const a = t.search(ch);
@@ -9694,7 +9694,7 @@ const fh = {
9694
9694
  "date-action": "1",
9695
9695
  contenteditable: "false",
9696
9696
  class: "text-red-500 text-xs mt-1"
9697
- }, mh = /* @__PURE__ */ ze({
9697
+ }, mh = /* @__PURE__ */ Ke({
9698
9698
  __name: "ElementRenderer",
9699
9699
  props: {
9700
9700
  /**
@@ -9769,43 +9769,43 @@ const fh = {
9769
9769
  "addIcon"
9770
9770
  ],
9771
9771
  setup(e, { emit: t }) {
9772
- const a = e, i = t, s = At(() => a.selectedElement === a.element), u = At(() => a.hoveredElement === a.element), r = G(!1), o = G(!1), c = G(""), d = At(() => a.element.rule.minText || 0), f = At(() => a.element.rule.maxText || 1 / 0);
9773
- nt(
9772
+ const a = e, i = t, s = At(() => a.selectedElement === a.element), u = At(() => a.hoveredElement === a.element), r = $(!1), o = $(!1), c = $(""), d = At(() => a.element.rule.minText || 0), f = At(() => a.element.rule.maxText || 1 / 0);
9773
+ qe(
9774
9774
  () => a.r,
9775
9775
  () => {
9776
- i("contentUpdated", q());
9776
+ i("contentUpdated", V());
9777
9777
  },
9778
9778
  { immediate: !0 }
9779
9779
  );
9780
- function E(v) {
9781
- v.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? v.type === z.Text && i("selectElement", v) : i("selectElement", v), !v.rule.isReadOnly && v.type === z.Text && (r.value = !0));
9780
+ function E(D) {
9781
+ D.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? D.type === z.Text && i("selectElement", D) : i("selectElement", D), !D.rule.isReadOnly && D.type === z.Text && (r.value = !0));
9782
9782
  }
9783
- function T(v) {
9784
- i("selectElement", v);
9783
+ function T(D) {
9784
+ i("selectElement", D);
9785
9785
  }
9786
- function g(v, W) {
9787
- i("hoverElement", v, W);
9786
+ function g(D, G) {
9787
+ i("hoverElement", D, G);
9788
9788
  }
9789
- function C(v) {
9790
- i("hoverElement", v);
9789
+ function C(D) {
9790
+ i("hoverElement", D);
9791
9791
  }
9792
- function D(v) {
9793
- v.currentTarget.contains(v.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
9792
+ function L(D) {
9793
+ D.currentTarget.contains(D.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
9794
9794
  }
9795
9795
  function y() {
9796
- r.value = !1, i("contentUpdated", q());
9796
+ r.value = !1, i("contentUpdated", V());
9797
9797
  }
9798
- function q() {
9799
- function v(ne) {
9800
- const _e = Object.entries(ne.attrs || {}).map(([Fe, Et]) => `${Fe}="${Et}"`).join(" "), Ie = `<${ne.tag}${_e ? " " + _e : ""}>`, Ke = `</${ne.tag}>`, mt = (ne.children || []).map((Fe) => v(Fe)).join("");
9801
- return `${Ie}${ne.editText || ne.text || ""}${mt}${Ke}`;
9798
+ function V() {
9799
+ function D(ne) {
9800
+ const Ae = Object.entries(ne.attrs || {}).map(([Fe, Et]) => `${Fe}="${Et}"`).join(" "), Ie = `<${ne.tag}${Ae ? " " + Ae : ""}>`, Ze = `</${ne.tag}>`, mt = (ne.children || []).map((Fe) => D(Fe)).join("");
9801
+ return `${Ie}${ne.editText || ne.text || ""}${mt}${Ze}`;
9802
9802
  }
9803
- return v(a.element);
9803
+ return D(a.element);
9804
9804
  }
9805
- function w(v) {
9805
+ function F(D) {
9806
9806
  var Ie;
9807
- v.stopPropagation();
9808
- const W = v.target, ne = ((Ie = W.firstChild) == null ? void 0 : Ie.nodeType) === Node.TEXT_NODE && W.firstChild.nodeValue || "";
9807
+ D.stopPropagation();
9808
+ const G = D.target, ne = ((Ie = G.firstChild) == null ? void 0 : Ie.nodeType) === Node.TEXT_NODE && G.firstChild.nodeValue || "";
9809
9809
  if (ne.length < d.value) {
9810
9810
  o.value = !0, c.value = `最少输入 ${d.value} 个字符`;
9811
9811
  return;
@@ -9814,48 +9814,62 @@ const fh = {
9814
9814
  return;
9815
9815
  } else
9816
9816
  o.value = !1, c.value = "";
9817
- i("updateText", { element: a.element, newText: ne }), i("contentUpdated", q());
9818
- const _e = hn(a.element);
9819
- _e.editText = ne;
9817
+ i("updateText", { element: a.element, newText: ne }), i("contentUpdated", V());
9818
+ const Ae = hn(a.element);
9819
+ Ae.editText = ne;
9820
9820
  }
9821
- function $(v) {
9822
- i("updateText", v), i("contentUpdated", q());
9821
+ function Y(D) {
9822
+ i("updateText", D), i("contentUpdated", V());
9823
9823
  }
9824
9824
  function ee() {
9825
- const v = { ...a.element };
9826
- i("blockAction", { action: "add", element: a.element, newBlock: v });
9825
+ const D = { ...a.element };
9826
+ i("blockAction", { action: "add", element: a.element, newBlock: D });
9827
9827
  }
9828
- function H() {
9828
+ function q() {
9829
9829
  _(a.element), i("blockAction", { action: "moveUp", element: a.element });
9830
9830
  }
9831
- function _(v) {
9832
- v.children && v.children.length > 0 && v.children.forEach((W) => {
9833
- W.type == z.Text && (W.text !== W.editText && (W.text = W.editText), _(W));
9831
+ function _(D) {
9832
+ D.children && D.children.length > 0 && D.children.forEach((G) => {
9833
+ G.type == z.Text && (G.text !== G.editText && (G.text = G.editText), _(G));
9834
9834
  });
9835
9835
  }
9836
- function B() {
9836
+ function w() {
9837
9837
  _(a.element), i("blockAction", { action: "moveDown", element: a.element });
9838
9838
  }
9839
9839
  function Q() {
9840
9840
  i("blockAction", { action: "delete", element: a.element });
9841
9841
  }
9842
- function se(v) {
9843
- i("blockAction", v), i("contentUpdated", q());
9842
+ function se(D) {
9843
+ i("blockAction", D), i("contentUpdated", V());
9844
9844
  }
9845
- function be(v) {
9846
- Re.value.openModal(v);
9845
+ function be(D) {
9846
+ Le.value.openModal(D);
9847
9847
  }
9848
- function Be(v) {
9849
- Ce.value.openModal(v);
9848
+ function Be(D) {
9849
+ _e.value.openModal(D);
9850
9850
  }
9851
- function Ue(v, W) {
9852
- i("addIcon", v, W), i("contentUpdated", q());
9851
+ function Ue(D, G) {
9852
+ i("addIcon", D, G), i("contentUpdated", V());
9853
9853
  }
9854
- const Re = G(a.icon), Ce = G(a.upload);
9855
- return (v, W) => {
9854
+ const Le = $(a.icon);
9855
+ qe(
9856
+ () => a.icon,
9857
+ (D) => {
9858
+ Le.value = D;
9859
+ },
9860
+ { immediate: !0 }
9861
+ );
9862
+ const _e = $(a.upload);
9863
+ return qe(
9864
+ () => a.upload,
9865
+ (D) => {
9866
+ _e.value = D;
9867
+ },
9868
+ { immediate: !0 }
9869
+ ), (D, G) => {
9856
9870
  const ne = Qu("ElementRenderer", !0);
9857
- return L(), M(Zt, null, [
9858
- (L(), Ct(ju(a.element.tag), zu({
9871
+ return v(), R(Zt, null, [
9872
+ (v(), Ct(ju(a.element.tag), zu({
9859
9873
  class: [
9860
9874
  "relative",
9861
9875
  // 注意:这里使用了 relative 布局,可能会影响到样式
@@ -9872,21 +9886,21 @@ const fh = {
9872
9886
  ]
9873
9887
  }, a.element.attrs, {
9874
9888
  contenteditable: r.value,
9875
- onClick: W[2] || (W[2] = Le(() => E(a.element), ["stop"])),
9876
- onMouseenter: W[3] || (W[3] = () => C(a.element)),
9877
- onMouseleave: D,
9889
+ onClick: G[2] || (G[2] = ye(() => E(a.element), ["stop"])),
9890
+ onMouseenter: G[3] || (G[3] = () => C(a.element)),
9891
+ onMouseleave: L,
9878
9892
  onBlur: y,
9879
- onInput: w
9893
+ onInput: F
9880
9894
  }), {
9881
9895
  default: Ya(() => [
9882
- Ei(Ne(a.element.text), 1),
9883
- a.element.children && a.element.children.length ? (L(), M(Zt, { key: 0 }, [
9884
- (L(!0), M(Zt, null, Fi(a.element.children, (_e, Ie) => (L(), Ct(ne, {
9896
+ Ei(Ce(a.element.text), 1),
9897
+ a.element.children && a.element.children.length ? (v(), R(Zt, { key: 0 }, [
9898
+ (v(!0), R(Zt, null, Fi(a.element.children, (Ae, Ie) => (v(), Ct(ne, {
9885
9899
  key: Ie,
9886
9900
  r: e.r,
9887
9901
  mode: e.mode,
9888
9902
  icons: e.icons,
9889
- element: _e,
9903
+ element: Ae,
9890
9904
  selectedElement: a.selectedElement,
9891
9905
  hoveredElement: a.hoveredElement,
9892
9906
  cropper: e.cropper,
@@ -9895,58 +9909,58 @@ const fh = {
9895
9909
  "upload-by-file": e.uploadByFile,
9896
9910
  onSelectElement: T,
9897
9911
  onHoverElement: g,
9898
- onUpdateText: $,
9912
+ onUpdateText: Y,
9899
9913
  onBlockAction: se,
9900
9914
  onAddIcon: Ue
9901
9915
  }, null, 8, ["r", "mode", "icons", "element", "selectedElement", "hoveredElement", "cropper", "icon", "upload", "upload-by-file"]))), 128)),
9902
- a.element.type === de(z).Block ? (L(), M("div", {
9916
+ a.element.type === de(z).Block ? (v(), R("div", {
9903
9917
  key: 0,
9904
9918
  "date-action": "1",
9905
9919
  contenteditable: "false",
9906
- onClick: W[0] || (W[0] = Le(() => {
9920
+ onClick: G[0] || (G[0] = ye(() => {
9907
9921
  }, ["stop"])),
9908
9922
  class: "z-10 flex space-x-1 flex-none flex-nowrap overflow-visible absolute top-2"
9909
9923
  }, [
9910
9924
  x("button", {
9911
9925
  class: "flex-none px-2 py-1 bg-blue-500 text-white rounded",
9912
- onClick: Le(ee, ["stop"])
9926
+ onClick: ye(ee, ["stop"])
9913
9927
  }, " + "),
9914
9928
  x("button", {
9915
9929
  class: "flex-none px-2 py-1 bg-gray-300 text-white rounded",
9916
- onClick: Le(H, ["stop"])
9930
+ onClick: ye(q, ["stop"])
9917
9931
  }, " ⬅️ "),
9918
9932
  x("button", {
9919
9933
  class: "flex-none px-2 py-1 bg-gray-300 text-white rounded",
9920
- onClick: Le(B, ["stop"])
9934
+ onClick: ye(w, ["stop"])
9921
9935
  }, " ➡️ "),
9922
9936
  x("button", {
9923
9937
  class: "flex-none px-2 py-1 bg-red-500 text-white rounded",
9924
- onClick: Le(Q, ["stop"])
9938
+ onClick: ye(Q, ["stop"])
9925
9939
  }, " ✖ ")
9926
- ])) : Y("", !0)
9927
- ], 64)) : Y("", !0),
9928
- a.element.type === de(z).Icon ? (L(), M("div", {
9940
+ ])) : H("", !0)
9941
+ ], 64)) : H("", !0),
9942
+ a.element.type === de(z).Icon ? (v(), R("div", {
9929
9943
  key: 1,
9930
9944
  class: "cursor-pointer rounded-sm w-5 h-5 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",
9931
9945
  contenteditable: "false",
9932
- onClick: W[1] || (W[1] = Le(() => be(a.element), ["stop"]))
9933
- }, " ↑ ")) : Y("", !0)
9946
+ onClick: G[1] || (G[1] = ye(() => be(a.element), ["stop"]))
9947
+ }, " ↑ ")) : H("", !0)
9934
9948
  ]),
9935
9949
  _: 1
9936
9950
  }, 16, ["class", "contenteditable"])),
9937
- a.element.type == de(z).Text && o.value ? (L(), M("div", fh, Ne(c.value), 1)) : Y("", !0),
9938
- a.element.type === de(z).Image ? (L(), M("div", {
9951
+ a.element.type == de(z).Text && o.value ? (v(), R("div", fh, Ce(c.value), 1)) : H("", !0),
9952
+ a.element.type === de(z).Image ? (v(), R("div", {
9939
9953
  key: 1,
9940
9954
  class: "cursor-pointer rounded-sm flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",
9941
- onClick: W[5] || (W[5] = Le(() => {
9955
+ onClick: G[5] || (G[5] = ye(() => {
9942
9956
  }, ["stop"])),
9943
9957
  contenteditable: "false"
9944
9958
  }, [
9945
9959
  x("div", {
9946
9960
  class: "p-2",
9947
- onClick: W[4] || (W[4] = Le(() => Be(a.element), ["stop"]))
9961
+ onClick: G[4] || (G[4] = ye(() => Be(a.element), ["stop"]))
9948
9962
  }, "上传")
9949
- ])) : Y("", !0)
9963
+ ])) : H("", !0)
9950
9964
  ], 64);
9951
9965
  };
9952
9966
  }
@@ -9955,7 +9969,7 @@ const fh = {
9955
9969
  for (const [i, s] of t)
9956
9970
  a[i] = s;
9957
9971
  return a;
9958
- }, Eh = /* @__PURE__ */ ft(mh, [["__scopeId", "data-v-822cc702"]]), Th = ze({
9972
+ }, Eh = /* @__PURE__ */ ft(mh, [["__scopeId", "data-v-a46039f1"]]), Th = Ke({
9959
9973
  name: "GpCheckbox",
9960
9974
  props: {
9961
9975
  modelValue: {
@@ -9977,7 +9991,7 @@ const fh = {
9977
9991
  }
9978
9992
  }), ph = { class: "form-group" }, bh = { class: "flex items-center space-x-2 cursor-pointer" }, gh = ["checked", "aria-checked"], _h = { class: "checkbox-label text-sm text-gray-700" };
9979
9993
  function Ah(e, t, a, i, s, u) {
9980
- return L(), M("div", ph, [
9994
+ return v(), R("div", ph, [
9981
9995
  x("label", bh, [
9982
9996
  x("input", {
9983
9997
  type: "checkbox",
@@ -9986,11 +10000,11 @@ function Ah(e, t, a, i, s, u) {
9986
10000
  class: "custom-checkbox",
9987
10001
  "aria-checked": e.modelValue
9988
10002
  }, null, 40, gh),
9989
- x("span", _h, Ne(e.label), 1)
10003
+ x("span", _h, Ce(e.label), 1)
9990
10004
  ])
9991
10005
  ]);
9992
10006
  }
9993
- const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f276"]]), Nh = ze({
10007
+ const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f276"]]), Nh = Ke({
9994
10008
  name: "GpMessage",
9995
10009
  props: {
9996
10010
  message: {
@@ -10019,7 +10033,7 @@ const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f27
10019
10033
  }
10020
10034
  },
10021
10035
  setup(e) {
10022
- const t = G(!1), a = At(
10036
+ const t = $(!1), a = At(
10023
10037
  () => ({
10024
10038
  success: "bg-green-100 text-green-800",
10025
10039
  error: "bg-red-100 text-red-800",
@@ -10057,27 +10071,27 @@ const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f27
10057
10071
  class: "text-yellow-500"
10058
10072
  };
10059
10073
  function vh(e, t, a, i, s, u) {
10060
- return L(), Ct(Ku, { name: "fade" }, {
10074
+ return v(), Ct(Ku, { name: "fade" }, {
10061
10075
  default: Ya(() => [
10062
- e.visible ? (L(), M("div", Ch, [
10076
+ e.visible ? (v(), R("div", Ch, [
10063
10077
  x("div", {
10064
10078
  class: fn([e.typeClass, "message-content"])
10065
10079
  }, [
10066
- e.icon ? (L(), M("span", Ih, [
10080
+ e.icon ? (v(), R("span", Ih, [
10067
10081
  Jt(e.$slots, "icon", {}, () => [
10068
- e.type === "success" ? (L(), M("span", Sh, "✔")) : Y("", !0),
10069
- e.type === "error" ? (L(), M("span", xh, "✖")) : Y("", !0),
10070
- e.type === "info" ? (L(), M("span", Oh, "ℹ")) : Y("", !0),
10071
- e.type === "warning" ? (L(), M("span", Dh, "⚠")) : Y("", !0)
10082
+ e.type === "success" ? (v(), R("span", Sh, "✔")) : H("", !0),
10083
+ e.type === "error" ? (v(), R("span", xh, "✖")) : H("", !0),
10084
+ e.type === "info" ? (v(), R("span", Oh, "ℹ")) : H("", !0),
10085
+ e.type === "warning" ? (v(), R("span", Dh, "⚠")) : H("", !0)
10072
10086
  ], !0)
10073
- ])) : Y("", !0),
10074
- x("span", null, Ne(e.message), 1),
10087
+ ])) : H("", !0),
10088
+ x("span", null, Ce(e.message), 1),
10075
10089
  x("button", {
10076
10090
  class: "close-btn hover:text-gray-800 font-bold",
10077
10091
  onClick: t[0] || (t[0] = (...r) => e.closeMessage && e.closeMessage(...r))
10078
10092
  }, " × ")
10079
10093
  ], 2)
10080
- ])) : Y("", !0)
10094
+ ])) : H("", !0)
10081
10095
  ]),
10082
10096
  _: 3
10083
10097
  });
@@ -10170,15 +10184,15 @@ Z.warning = (e, t = 3e3, a = !0) => {
10170
10184
  icon: a
10171
10185
  } : { ...e, type: "warning" });
10172
10186
  };
10173
- const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh = { class: "text-gray-500 my-2" }, Uh = { key: 1 }, Fh = { key: 2 }, Hh = { key: 3 }, Yh = { key: 4 }, qh = { key: 5 }, Vh = { key: 6 }, $h = { key: 7 }, Wh = { key: 8 }, Gh = { key: 9 }, Xh = { key: 10 }, Qh = /* @__PURE__ */ ze({
10187
+ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh = { class: "text-gray-500 my-2" }, Uh = { key: 1 }, Fh = { key: 2 }, Hh = { key: 3 }, Yh = { key: 4 }, qh = { key: 5 }, Vh = { key: 6 }, $h = { key: 7 }, Wh = { key: 8 }, Gh = { key: 9 }, Xh = { key: 10 }, Qh = /* @__PURE__ */ Ke({
10174
10188
  __name: "EditorPanel",
10175
10189
  props: {
10176
10190
  element: Object
10177
10191
  },
10178
10192
  emits: ["updateElement"],
10179
10193
  setup(e, { emit: t }) {
10180
- const a = e, i = t, s = G({ rule: {}, ...a.element });
10181
- nt(
10194
+ const a = e, i = t, s = $({ rule: {}, ...a.element });
10195
+ qe(
10182
10196
  () => a.element,
10183
10197
  (r) => {
10184
10198
  s.value = { rule: {}, ...r };
@@ -10228,19 +10242,19 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10228
10242
  }
10229
10243
  i("updateElement", s.value);
10230
10244
  }
10231
- return (r, o) => (L(), M("div", null, [
10232
- s.value ? (L(), M("div", Ph, [
10233
- s.value.text !== void 0 ? (L(), M("div", kh, [
10245
+ return (r, o) => (v(), R("div", null, [
10246
+ s.value ? (v(), R("div", Ph, [
10247
+ s.value.text !== void 0 ? (v(), R("div", kh, [
10234
10248
  o[13] || (o[13] = x("label", { class: "block" }, "内容", -1)),
10235
- x("div", wh, Ne(s.value.text || "-"), 1)
10236
- ])) : Y("", !0),
10249
+ x("div", wh, Ce(s.value.text || "-"), 1)
10250
+ ])) : H("", !0),
10237
10251
  x("div", null, [
10238
10252
  o[14] || (o[14] = x("label", { class: "block mt-4" }, "节点", -1)),
10239
- x("div", Bh, Ne(s.value.xpath), 1)
10253
+ x("div", Bh, Ce(s.value.xpath), 1)
10240
10254
  ]),
10241
10255
  x("div", null, [
10242
10256
  o[16] || (o[16] = x("label", { class: "block mt-4" }, "类型", -1)),
10243
- tt(x("select", {
10257
+ at(x("select", {
10244
10258
  "onUpdate:modelValue": o[0] || (o[0] = (c) => s.value.type = c),
10245
10259
  class: "border rounded p-1 w-full"
10246
10260
  }, o[15] || (o[15] = [
@@ -10256,25 +10270,25 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10256
10270
  [er, s.value.type]
10257
10271
  ])
10258
10272
  ]),
10259
- s.value.type == de(z).Text ? (L(), M("div", Uh, [
10273
+ s.value.type == de(z).Text ? (v(), R("div", Uh, [
10260
10274
  o[17] || (o[17] = x("label", { class: "block mt-4" }, "最小文本长度", -1)),
10261
- tt(x("input", {
10275
+ at(x("input", {
10262
10276
  "onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
10263
10277
  class: "border rounded p-1 w-full"
10264
10278
  }, null, 512), [
10265
10279
  [Tt, s.value.rule.minText]
10266
10280
  ])
10267
- ])) : Y("", !0),
10268
- s.value.type == de(z).Text ? (L(), M("div", Fh, [
10281
+ ])) : H("", !0),
10282
+ s.value.type == de(z).Text ? (v(), R("div", Fh, [
10269
10283
  o[18] || (o[18] = x("label", { class: "block mt-4" }, "最大文本长度", -1)),
10270
- tt(x("input", {
10284
+ at(x("input", {
10271
10285
  "onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
10272
10286
  class: "border rounded p-1 w-full"
10273
10287
  }, null, 512), [
10274
10288
  [Tt, s.value.rule.maxText]
10275
10289
  ])
10276
- ])) : Y("", !0),
10277
- s.value.type == de(z).Image ? (L(), M("div", Hh, [
10290
+ ])) : H("", !0),
10291
+ s.value.type == de(z).Image ? (v(), R("div", Hh, [
10278
10292
  o[19] || (o[19] = x("label", { class: "block mt-4" }, "是否裁剪", -1)),
10279
10293
  ut(Gt, {
10280
10294
  class: "py-2",
@@ -10282,44 +10296,44 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10282
10296
  "onUpdate:modelValue": o[3] || (o[3] = (c) => s.value.rule.crop = c),
10283
10297
  label: "是"
10284
10298
  }, null, 8, ["modelValue"])
10285
- ])) : Y("", !0),
10286
- s.value.type == de(z).Image ? (L(), M("div", Yh, [
10299
+ ])) : H("", !0),
10300
+ s.value.type == de(z).Image ? (v(), R("div", Yh, [
10287
10301
  o[20] || (o[20] = x("label", { class: "block mt-4" }, "图片宽度", -1)),
10288
- tt(x("input", {
10302
+ at(x("input", {
10289
10303
  "onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
10290
10304
  class: "border rounded p-1 w-full"
10291
10305
  }, null, 512), [
10292
10306
  [Tt, s.value.rule.minImageWidth]
10293
10307
  ])
10294
- ])) : Y("", !0),
10295
- s.value.type == de(z).Image ? (L(), M("div", qh, [
10308
+ ])) : H("", !0),
10309
+ s.value.type == de(z).Image ? (v(), R("div", qh, [
10296
10310
  o[21] || (o[21] = x("label", { class: "block mt-4" }, "图片高度", -1)),
10297
- tt(x("input", {
10311
+ at(x("input", {
10298
10312
  "onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
10299
10313
  class: "border rounded p-1 w-full"
10300
10314
  }, null, 512), [
10301
10315
  [Tt, s.value.rule.maxImageHeight]
10302
10316
  ])
10303
- ])) : Y("", !0),
10304
- s.value.type == de(z).Block ? (L(), M("div", Vh, [
10317
+ ])) : H("", !0),
10318
+ s.value.type == de(z).Block ? (v(), R("div", Vh, [
10305
10319
  o[22] || (o[22] = x("label", { class: "block mt-4" }, "块最小数量", -1)),
10306
- tt(x("input", {
10320
+ at(x("input", {
10307
10321
  "onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
10308
10322
  class: "border rounded p-1 w-full"
10309
10323
  }, null, 512), [
10310
10324
  [Tt, s.value.rule.minBlock]
10311
10325
  ])
10312
- ])) : Y("", !0),
10313
- s.value.type == de(z).Block ? (L(), M("div", $h, [
10326
+ ])) : H("", !0),
10327
+ s.value.type == de(z).Block ? (v(), R("div", $h, [
10314
10328
  o[23] || (o[23] = x("label", { class: "block mt-4" }, "块最大数量", -1)),
10315
- tt(x("input", {
10329
+ at(x("input", {
10316
10330
  "onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
10317
10331
  class: "border rounded p-1 w-full"
10318
10332
  }, null, 512), [
10319
10333
  [Tt, s.value.rule.maxBlock]
10320
10334
  ])
10321
- ])) : Y("", !0),
10322
- s.value.type == de(z).Text || s.value.type == de(z).Icon || s.value.type == de(z).Button ? (L(), M("div", Wh, [
10335
+ ])) : H("", !0),
10336
+ s.value.type == de(z).Text || s.value.type == de(z).Icon || s.value.type == de(z).Button ? (v(), R("div", Wh, [
10323
10337
  o[24] || (o[24] = x("label", { class: "block mt-4" }, "主题色", -1)),
10324
10338
  ut(Gt, {
10325
10339
  class: "py-2",
@@ -10327,7 +10341,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10327
10341
  "onUpdate:modelValue": o[8] || (o[8] = (c) => s.value.rule.isThemeColor = c),
10328
10342
  label: "是"
10329
10343
  }, null, 8, ["modelValue"])
10330
- ])) : Y("", !0),
10344
+ ])) : H("", !0),
10331
10345
  x("div", null, [
10332
10346
  o[25] || (o[25] = x("label", { class: "block mt-4" }, "是否必填", -1)),
10333
10347
  ut(Gt, {
@@ -10346,7 +10360,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10346
10360
  label: "是"
10347
10361
  }, null, 8, ["modelValue"])
10348
10362
  ]),
10349
- s.value.type == de(z).Link || s.value.type == de(z).Button ? (L(), M("div", Gh, [
10363
+ s.value.type == de(z).Link || s.value.type == de(z).Button ? (v(), R("div", Gh, [
10350
10364
  o[27] || (o[27] = x("label", { class: "block mt-4" }, "打开美洽", -1)),
10351
10365
  ut(Gt, {
10352
10366
  class: "py-2",
@@ -10354,17 +10368,17 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
10354
10368
  "onUpdate:modelValue": o[11] || (o[11] = (c) => s.value.rule.openMeiqia = c),
10355
10369
  label: "是"
10356
10370
  }, null, 8, ["modelValue"])
10357
- ])) : Y("", !0),
10358
- s.value.type == de(z).Link || s.value.type == de(z).Button ? (L(), M("div", Xh, [
10371
+ ])) : H("", !0),
10372
+ s.value.type == de(z).Link || s.value.type == de(z).Button ? (v(), R("div", Xh, [
10359
10373
  o[28] || (o[28] = x("label", { class: "block mt-4" }, "链接", -1)),
10360
- tt(x("input", {
10374
+ at(x("input", {
10361
10375
  "onUpdate:modelValue": o[12] || (o[12] = (c) => s.value.rule.linkUrl = c),
10362
10376
  class: "border rounded p-1 w-full"
10363
10377
  }, null, 512), [
10364
10378
  [Tt, s.value.rule.linkUrl]
10365
10379
  ])
10366
- ])) : Y("", !0)
10367
- ])) : Y("", !0),
10380
+ ])) : H("", !0)
10381
+ ])) : H("", !0),
10368
10382
  x("button", {
10369
10383
  onClick: u,
10370
10384
  class: "mt-4 p-2 bg-green-500 text-white rounded"
@@ -10473,7 +10487,7 @@ function sf() {
10473
10487
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
10474
10488
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
10475
10489
  }
10476
- var ei = typeof window < "u" && typeof window.document < "u", je = ei ? window : {}, cs = ei && je.document.documentElement ? "ontouchstart" in je.document.documentElement : !1, ls = ei ? "PointerEvent" in je : !1, ae = "cropper", ds = "all", ku = "crop", wu = "move", Bu = "zoom", bt = "e", gt = "w", Lt = "s", at = "n", Xt = "ne", Qt = "nw", jt = "se", zt = "sw", yi = "".concat(ae, "-crop"), Ks = "".concat(ae, "-disabled"), De = "".concat(ae, "-hidden"), Zs = "".concat(ae, "-hide"), nf = "".concat(ae, "-invisible"), Ha = "".concat(ae, "-modal"), Ri = "".concat(ae, "-move"), fa = "".concat(ae, "Action"), Sa = "".concat(ae, "Preview"), hs = "crop", Uu = "move", Fu = "none", Mi = "crop", Pi = "cropend", ki = "cropmove", wi = "cropstart", Js = "dblclick", uf = cs ? "touchstart" : "mousedown", rf = cs ? "touchmove" : "mousemove", of = cs ? "touchend touchcancel" : "mouseup", en = ls ? "pointerdown" : uf, tn = ls ? "pointermove" : rf, an = ls ? "pointerup pointercancel" : of, sn = "ready", nn = "resize", un = "wheel", Bi = "zoom", rn = "image/jpeg", cf = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, lf = /^data:/, df = /^data:image\/jpeg;base64,/, hf = /^img|canvas$/i, Hu = 200, Yu = 100, on = {
10490
+ var ei = typeof window < "u" && typeof window.document < "u", ze = ei ? window : {}, cs = ei && ze.document.documentElement ? "ontouchstart" in ze.document.documentElement : !1, ls = ei ? "PointerEvent" in ze : !1, ae = "cropper", ds = "all", ku = "crop", wu = "move", Bu = "zoom", bt = "e", gt = "w", Lt = "s", it = "n", Xt = "ne", Qt = "nw", jt = "se", zt = "sw", yi = "".concat(ae, "-crop"), Ks = "".concat(ae, "-disabled"), De = "".concat(ae, "-hidden"), Zs = "".concat(ae, "-hide"), nf = "".concat(ae, "-invisible"), Ha = "".concat(ae, "-modal"), Ri = "".concat(ae, "-move"), fa = "".concat(ae, "Action"), Sa = "".concat(ae, "Preview"), hs = "crop", Uu = "move", Fu = "none", Mi = "crop", Pi = "cropend", ki = "cropmove", wi = "cropstart", Js = "dblclick", uf = cs ? "touchstart" : "mousedown", rf = cs ? "touchmove" : "mousemove", of = cs ? "touchend touchcancel" : "mouseup", en = ls ? "pointerdown" : uf, tn = ls ? "pointermove" : rf, an = ls ? "pointerup pointercancel" : of, sn = "ready", nn = "resize", un = "wheel", Bi = "zoom", rn = "image/jpeg", cf = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, lf = /^data:/, df = /^data:image\/jpeg;base64,/, hf = /^img|canvas$/i, Hu = 200, Yu = 100, on = {
10477
10491
  // Define the view mode of the cropper
10478
10492
  viewMode: 0,
10479
10493
  // 0, 1, 2, 3
@@ -10544,7 +10558,7 @@ var ei = typeof window < "u" && typeof window.document < "u", je = ei ? window :
10544
10558
  cropend: null,
10545
10559
  crop: null,
10546
10560
  zoom: null
10547
- }, ff = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', mf = Number.isNaN || je.isNaN;
10561
+ }, ff = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', mf = Number.isNaN || ze.isNaN;
10548
10562
  function X(e) {
10549
10563
  return typeof e == "number" && !mf(e);
10550
10564
  }
@@ -10621,11 +10635,11 @@ function me(e, t) {
10621
10635
  a ? a.indexOf(t) < 0 && (e.className = "".concat(a, " ").concat(t)) : e.className = t;
10622
10636
  }
10623
10637
  }
10624
- function Qe(e, t) {
10638
+ function je(e, t) {
10625
10639
  if (t) {
10626
10640
  if (X(e.length)) {
10627
10641
  ce(e, function(a) {
10628
- Qe(a, t);
10642
+ je(a, t);
10629
10643
  });
10630
10644
  return;
10631
10645
  }
@@ -10644,7 +10658,7 @@ function Rt(e, t, a) {
10644
10658
  });
10645
10659
  return;
10646
10660
  }
10647
- a ? me(e, t) : Qe(e, t);
10661
+ a ? me(e, t) : je(e, t);
10648
10662
  }
10649
10663
  }
10650
10664
  var _f = /([a-z\d])([A-Z])/g;
@@ -10690,7 +10704,7 @@ var Vu = /\s\s*/, $u = function() {
10690
10704
  t = u;
10691
10705
  }
10692
10706
  });
10693
- je.addEventListener("test", a, i), je.removeEventListener("test", a, i);
10707
+ ze.addEventListener("test", a, i), ze.removeEventListener("test", a, i);
10694
10708
  }
10695
10709
  return e;
10696
10710
  }();
@@ -10734,7 +10748,7 @@ function Wu(e) {
10734
10748
  top: t.top + (window.pageYOffset - document.documentElement.clientTop)
10735
10749
  };
10736
10750
  }
10737
- var mi = je.location, Nf = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
10751
+ var mi = ze.location, Nf = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
10738
10752
  function ln(e) {
10739
10753
  var t = e.match(Nf);
10740
10754
  return t !== null && (t[1] !== mi.protocol || t[2] !== mi.hostname || t[3] !== mi.port);
@@ -10810,26 +10824,26 @@ function Sf(e) {
10810
10824
  };
10811
10825
  }
10812
10826
  function xf(e, t, a, i) {
10813
- var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, d = t.scaleX, f = d === void 0 ? 1 : d, E = t.scaleY, T = E === void 0 ? 1 : E, g = a.aspectRatio, C = a.naturalWidth, D = a.naturalHeight, y = i.fillColor, q = y === void 0 ? "transparent" : y, w = i.imageSmoothingEnabled, $ = w === void 0 ? !0 : w, ee = i.imageSmoothingQuality, H = ee === void 0 ? "low" : ee, _ = i.maxWidth, B = _ === void 0 ? 1 / 0 : _, Q = i.maxHeight, se = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Be = be === void 0 ? 0 : be, Ue = i.minHeight, Re = Ue === void 0 ? 0 : Ue, Ce = document.createElement("canvas"), v = Ce.getContext("2d"), W = lt({
10827
+ var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, d = t.scaleX, f = d === void 0 ? 1 : d, E = t.scaleY, T = E === void 0 ? 1 : E, g = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, y = i.fillColor, V = y === void 0 ? "transparent" : y, F = i.imageSmoothingEnabled, Y = F === void 0 ? !0 : F, ee = i.imageSmoothingQuality, q = ee === void 0 ? "low" : ee, _ = i.maxWidth, w = _ === void 0 ? 1 / 0 : _, Q = i.maxHeight, se = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Be = be === void 0 ? 0 : be, Ue = i.minHeight, Le = Ue === void 0 ? 0 : Ue, _e = document.createElement("canvas"), D = _e.getContext("2d"), G = lt({
10814
10828
  aspectRatio: g,
10815
- width: B,
10829
+ width: w,
10816
10830
  height: se
10817
10831
  }), ne = lt({
10818
10832
  aspectRatio: g,
10819
10833
  width: Be,
10820
- height: Re
10821
- }, "cover"), _e = Math.min(W.width, Math.max(ne.width, C)), Ie = Math.min(W.height, Math.max(ne.height, D)), Ke = lt({
10834
+ height: Le
10835
+ }, "cover"), Ae = Math.min(G.width, Math.max(ne.width, C)), Ie = Math.min(G.height, Math.max(ne.height, L)), Ze = lt({
10822
10836
  aspectRatio: s,
10823
- width: B,
10837
+ width: w,
10824
10838
  height: se
10825
10839
  }), mt = lt({
10826
10840
  aspectRatio: s,
10827
10841
  width: Be,
10828
- height: Re
10829
- }, "cover"), Fe = Math.min(Ke.width, Math.max(mt.width, u)), Et = Math.min(Ke.height, Math.max(mt.height, r)), ga = [-Fe / 2, -Et / 2, Fe, Et];
10830
- return Ce.width = kt(_e), Ce.height = kt(Ie), v.fillStyle = q, v.fillRect(0, 0, _e, Ie), v.save(), v.translate(_e / 2, Ie / 2), v.rotate(c * Math.PI / 180), v.scale(f, T), v.imageSmoothingEnabled = $, v.imageSmoothingQuality = H, v.drawImage.apply(v, [e].concat(Pu(ga.map(function(_a) {
10842
+ height: Le
10843
+ }, "cover"), Fe = Math.min(Ze.width, Math.max(mt.width, u)), Et = Math.min(Ze.height, Math.max(mt.height, r)), ga = [-Fe / 2, -Et / 2, Fe, Et];
10844
+ return _e.width = kt(Ae), _e.height = kt(Ie), D.fillStyle = V, D.fillRect(0, 0, Ae, Ie), D.save(), D.translate(Ae / 2, Ie / 2), D.rotate(c * Math.PI / 180), D.scale(f, T), D.imageSmoothingEnabled = Y, D.imageSmoothingQuality = q, D.drawImage.apply(D, [e].concat(Pu(ga.map(function(_a) {
10831
10845
  return Math.floor(kt(_a));
10832
- })))), v.restore(), Ce;
10846
+ })))), D.restore(), _e;
10833
10847
  }
10834
10848
  var Gu = String.fromCharCode;
10835
10849
  function Of(e, t, a) {
@@ -10923,7 +10937,7 @@ var Mf = {
10923
10937
  },
10924
10938
  initContainer: function() {
10925
10939
  var t = this.element, a = this.options, i = this.container, s = this.cropper, u = Number(a.minContainerWidth), r = Number(a.minContainerHeight);
10926
- me(s, De), Qe(t, De);
10940
+ me(s, De), je(t, De);
10927
10941
  var o = {
10928
10942
  width: Math.max(i.offsetWidth, u >= 0 ? u : Hu),
10929
10943
  height: Math.max(i.offsetHeight, r >= 0 ? r : Yu)
@@ -10931,7 +10945,7 @@ var Mf = {
10931
10945
  this.containerData = o, ct(s, {
10932
10946
  width: o.width,
10933
10947
  height: o.height
10934
- }), me(t, De), Qe(s, De);
10948
+ }), me(t, De), je(s, De);
10935
10949
  },
10936
10950
  // Canvas (image wrapper)
10937
10951
  initCanvas: function() {
@@ -11059,10 +11073,10 @@ var Mf = {
11059
11073
  translateX: -c,
11060
11074
  translateY: -d
11061
11075
  }, t)))), ce(this.previews, function(f) {
11062
- var E = Ui(f, Sa), T = E.width, g = E.height, C = T, D = g, y = 1;
11063
- s && (y = T / s, D = u * y), u && D > g && (y = g / u, C = s * y, D = g), ct(f, {
11076
+ var E = Ui(f, Sa), T = E.width, g = E.height, C = T, L = g, y = 1;
11077
+ s && (y = T / s, L = u * y), u && L > g && (y = g / u, C = s * y, L = g), ct(f, {
11064
11078
  width: C,
11065
- height: D
11079
+ height: L
11066
11080
  }), ct(f.getElementsByTagName("img")[0], ie({
11067
11081
  width: r * y,
11068
11082
  height: o * y
@@ -11148,24 +11162,24 @@ var Mf = {
11148
11162
  }
11149
11163
  }, Bf = {
11150
11164
  change: function(t) {
11151
- var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, d = u.left, f = u.top, E = u.width, T = u.height, g = d + E, C = f + T, D = 0, y = 0, q = s.width, w = s.height, $ = !0, ee;
11152
- !c && t.shiftKey && (c = E && T ? E / T : 1), this.limited && (D = u.minLeft, y = u.minTop, q = D + Math.min(s.width, i.width, i.left + i.width), w = y + Math.min(s.height, i.height, i.top + i.height));
11153
- var H = r[Object.keys(r)[0]], _ = {
11154
- x: H.endX - H.startX,
11155
- y: H.endY - H.startY
11156
- }, B = function(se) {
11165
+ var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, d = u.left, f = u.top, E = u.width, T = u.height, g = d + E, C = f + T, L = 0, y = 0, V = s.width, F = s.height, Y = !0, ee;
11166
+ !c && t.shiftKey && (c = E && T ? E / T : 1), this.limited && (L = u.minLeft, y = u.minTop, V = L + Math.min(s.width, i.width, i.left + i.width), F = y + Math.min(s.height, i.height, i.top + i.height));
11167
+ var q = r[Object.keys(r)[0]], _ = {
11168
+ x: q.endX - q.startX,
11169
+ y: q.endY - q.startY
11170
+ }, w = function(se) {
11157
11171
  switch (se) {
11158
11172
  case bt:
11159
- g + _.x > q && (_.x = q - g);
11173
+ g + _.x > V && (_.x = V - g);
11160
11174
  break;
11161
11175
  case gt:
11162
- d + _.x < D && (_.x = D - d);
11176
+ d + _.x < L && (_.x = L - d);
11163
11177
  break;
11164
- case at:
11178
+ case it:
11165
11179
  f + _.y < y && (_.y = y - f);
11166
11180
  break;
11167
11181
  case Lt:
11168
- C + _.y > w && (_.y = w - C);
11182
+ C + _.y > F && (_.y = F - C);
11169
11183
  break;
11170
11184
  }
11171
11185
  };
@@ -11174,99 +11188,99 @@ var Mf = {
11174
11188
  d += _.x, f += _.y;
11175
11189
  break;
11176
11190
  case bt:
11177
- if (_.x >= 0 && (g >= q || c && (f <= y || C >= w))) {
11178
- $ = !1;
11191
+ if (_.x >= 0 && (g >= V || c && (f <= y || C >= F))) {
11192
+ Y = !1;
11179
11193
  break;
11180
11194
  }
11181
- B(bt), E += _.x, E < 0 && (o = gt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11195
+ w(bt), E += _.x, E < 0 && (o = gt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11182
11196
  break;
11183
- case at:
11184
- if (_.y <= 0 && (f <= y || c && (d <= D || g >= q))) {
11185
- $ = !1;
11197
+ case it:
11198
+ if (_.y <= 0 && (f <= y || c && (d <= L || g >= V))) {
11199
+ Y = !1;
11186
11200
  break;
11187
11201
  }
11188
- B(at), T -= _.y, f += _.y, T < 0 && (o = Lt, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11202
+ w(it), T -= _.y, f += _.y, T < 0 && (o = Lt, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11189
11203
  break;
11190
11204
  case gt:
11191
- if (_.x <= 0 && (d <= D || c && (f <= y || C >= w))) {
11192
- $ = !1;
11205
+ if (_.x <= 0 && (d <= L || c && (f <= y || C >= F))) {
11206
+ Y = !1;
11193
11207
  break;
11194
11208
  }
11195
- B(gt), E -= _.x, d += _.x, E < 0 && (o = bt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11209
+ w(gt), E -= _.x, d += _.x, E < 0 && (o = bt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11196
11210
  break;
11197
11211
  case Lt:
11198
- if (_.y >= 0 && (C >= w || c && (d <= D || g >= q))) {
11199
- $ = !1;
11212
+ if (_.y >= 0 && (C >= F || c && (d <= L || g >= V))) {
11213
+ Y = !1;
11200
11214
  break;
11201
11215
  }
11202
- B(Lt), T += _.y, T < 0 && (o = at, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11216
+ w(Lt), T += _.y, T < 0 && (o = it, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11203
11217
  break;
11204
11218
  case Xt:
11205
11219
  if (c) {
11206
- if (_.y <= 0 && (f <= y || g >= q)) {
11207
- $ = !1;
11220
+ if (_.y <= 0 && (f <= y || g >= V)) {
11221
+ Y = !1;
11208
11222
  break;
11209
11223
  }
11210
- B(at), T -= _.y, f += _.y, E = T * c;
11224
+ w(it), T -= _.y, f += _.y, E = T * c;
11211
11225
  } else
11212
- B(at), B(bt), _.x >= 0 ? g < q ? E += _.x : _.y <= 0 && f <= y && ($ = !1) : E += _.x, _.y <= 0 ? f > y && (T -= _.y, f += _.y) : (T -= _.y, f += _.y);
11226
+ w(it), w(bt), _.x >= 0 ? g < V ? E += _.x : _.y <= 0 && f <= y && (Y = !1) : E += _.x, _.y <= 0 ? f > y && (T -= _.y, f += _.y) : (T -= _.y, f += _.y);
11213
11227
  E < 0 && T < 0 ? (o = zt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = Qt, E = -E, d -= E) : T < 0 && (o = jt, T = -T, f -= T);
11214
11228
  break;
11215
11229
  case Qt:
11216
11230
  if (c) {
11217
- if (_.y <= 0 && (f <= y || d <= D)) {
11218
- $ = !1;
11231
+ if (_.y <= 0 && (f <= y || d <= L)) {
11232
+ Y = !1;
11219
11233
  break;
11220
11234
  }
11221
- B(at), T -= _.y, f += _.y, E = T * c, d += u.width - E;
11235
+ w(it), T -= _.y, f += _.y, E = T * c, d += u.width - E;
11222
11236
  } else
11223
- B(at), B(gt), _.x <= 0 ? d > D ? (E -= _.x, d += _.x) : _.y <= 0 && f <= y && ($ = !1) : (E -= _.x, d += _.x), _.y <= 0 ? f > y && (T -= _.y, f += _.y) : (T -= _.y, f += _.y);
11237
+ w(it), w(gt), _.x <= 0 ? d > L ? (E -= _.x, d += _.x) : _.y <= 0 && f <= y && (Y = !1) : (E -= _.x, d += _.x), _.y <= 0 ? f > y && (T -= _.y, f += _.y) : (T -= _.y, f += _.y);
11224
11238
  E < 0 && T < 0 ? (o = jt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = Xt, E = -E, d -= E) : T < 0 && (o = zt, T = -T, f -= T);
11225
11239
  break;
11226
11240
  case zt:
11227
11241
  if (c) {
11228
- if (_.x <= 0 && (d <= D || C >= w)) {
11229
- $ = !1;
11242
+ if (_.x <= 0 && (d <= L || C >= F)) {
11243
+ Y = !1;
11230
11244
  break;
11231
11245
  }
11232
- B(gt), E -= _.x, d += _.x, T = E / c;
11246
+ w(gt), E -= _.x, d += _.x, T = E / c;
11233
11247
  } else
11234
- B(Lt), B(gt), _.x <= 0 ? d > D ? (E -= _.x, d += _.x) : _.y >= 0 && C >= w && ($ = !1) : (E -= _.x, d += _.x), _.y >= 0 ? C < w && (T += _.y) : T += _.y;
11248
+ w(Lt), w(gt), _.x <= 0 ? d > L ? (E -= _.x, d += _.x) : _.y >= 0 && C >= F && (Y = !1) : (E -= _.x, d += _.x), _.y >= 0 ? C < F && (T += _.y) : T += _.y;
11235
11249
  E < 0 && T < 0 ? (o = Xt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = jt, E = -E, d -= E) : T < 0 && (o = Qt, T = -T, f -= T);
11236
11250
  break;
11237
11251
  case jt:
11238
11252
  if (c) {
11239
- if (_.x >= 0 && (g >= q || C >= w)) {
11240
- $ = !1;
11253
+ if (_.x >= 0 && (g >= V || C >= F)) {
11254
+ Y = !1;
11241
11255
  break;
11242
11256
  }
11243
- B(bt), E += _.x, T = E / c;
11257
+ w(bt), E += _.x, T = E / c;
11244
11258
  } else
11245
- B(Lt), B(bt), _.x >= 0 ? g < q ? E += _.x : _.y >= 0 && C >= w && ($ = !1) : E += _.x, _.y >= 0 ? C < w && (T += _.y) : T += _.y;
11259
+ w(Lt), w(bt), _.x >= 0 ? g < V ? E += _.x : _.y >= 0 && C >= F && (Y = !1) : E += _.x, _.y >= 0 ? C < F && (T += _.y) : T += _.y;
11246
11260
  E < 0 && T < 0 ? (o = Qt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = zt, E = -E, d -= E) : T < 0 && (o = Xt, T = -T, f -= T);
11247
11261
  break;
11248
11262
  case wu:
11249
- this.move(_.x, _.y), $ = !1;
11263
+ this.move(_.x, _.y), Y = !1;
11250
11264
  break;
11251
11265
  case Bu:
11252
- this.zoom(Cf(r), t), $ = !1;
11266
+ this.zoom(Cf(r), t), Y = !1;
11253
11267
  break;
11254
11268
  case ku:
11255
11269
  if (!_.x || !_.y) {
11256
- $ = !1;
11270
+ Y = !1;
11257
11271
  break;
11258
11272
  }
11259
- ee = Wu(this.cropper), d = H.startX - ee.left, f = H.startY - ee.top, E = u.minWidth, T = u.minHeight, _.x > 0 ? o = _.y > 0 ? jt : Xt : _.x < 0 && (d -= E, o = _.y > 0 ? zt : Qt), _.y < 0 && (f -= T), this.cropped || (Qe(this.cropBox, De), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
11273
+ ee = Wu(this.cropper), d = q.startX - ee.left, f = q.startY - ee.top, E = u.minWidth, T = u.minHeight, _.x > 0 ? o = _.y > 0 ? jt : Xt : _.x < 0 && (d -= E, o = _.y > 0 ? zt : Qt), _.y < 0 && (f -= T), this.cropped || (je(this.cropBox, De), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
11260
11274
  break;
11261
11275
  }
11262
- $ && (u.width = E, u.height = T, u.left = d, u.top = f, this.action = o, this.renderCropBox()), ce(r, function(Q) {
11276
+ Y && (u.width = E, u.height = T, u.left = d, u.top = f, this.action = o, this.renderCropBox()), ce(r, function(Q) {
11263
11277
  Q.startX = Q.endX, Q.startY = Q.endY;
11264
11278
  });
11265
11279
  }
11266
11280
  }, Uf = {
11267
11281
  // Show the crop box manually
11268
11282
  crop: function() {
11269
- return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && me(this.dragBox, Ha), Qe(this.cropBox, De), this.setCropBoxData(this.initialCropBoxData)), this;
11283
+ return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && me(this.dragBox, Ha), je(this.cropBox, De), this.setCropBoxData(this.initialCropBoxData)), this;
11270
11284
  },
11271
11285
  // Reset the image and crop box to their initial states
11272
11286
  reset: function() {
@@ -11279,7 +11293,7 @@ var Mf = {
11279
11293
  top: 0,
11280
11294
  width: 0,
11281
11295
  height: 0
11282
- }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Qe(this.dragBox, Ha), me(this.cropBox, De)), this;
11296
+ }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), je(this.dragBox, Ha), me(this.cropBox, De)), this;
11283
11297
  },
11284
11298
  /**
11285
11299
  * Replace the image's src and rebuild the cropper
@@ -11295,7 +11309,7 @@ var Mf = {
11295
11309
  },
11296
11310
  // Enable (unfreeze) the cropper
11297
11311
  enable: function() {
11298
- return this.ready && this.disabled && (this.disabled = !1, Qe(this.cropper, Ks)), this;
11312
+ return this.ready && this.disabled && (this.disabled = !1, je(this.cropper, Ks)), this;
11299
11313
  },
11300
11314
  // Disable (freeze) the cropper
11301
11315
  disable: function() {
@@ -11537,20 +11551,20 @@ var Mf = {
11537
11551
  aspectRatio: f,
11538
11552
  width: t.width || (d !== 1 ? i.width : o),
11539
11553
  height: t.height || (d !== 1 ? i.height : c)
11540
- }), C = g.width, D = g.height;
11541
- C = Math.min(E.width, Math.max(T.width, C)), D = Math.min(E.height, Math.max(T.height, D));
11542
- var y = document.createElement("canvas"), q = y.getContext("2d");
11543
- y.width = kt(C), y.height = kt(D), q.fillStyle = t.fillColor || "transparent", q.fillRect(0, 0, C, D);
11544
- var w = t.imageSmoothingEnabled, $ = w === void 0 ? !0 : w, ee = t.imageSmoothingQuality;
11545
- q.imageSmoothingEnabled = $, ee && (q.imageSmoothingQuality = ee);
11546
- var H = i.width, _ = i.height, B = u, Q = r, se, be, Be, Ue, Re, Ce;
11547
- B <= -o || B > H ? (B = 0, se = 0, Be = 0, Re = 0) : B <= 0 ? (Be = -B, B = 0, se = Math.min(H, o + B), Re = se) : B <= H && (Be = 0, se = Math.min(o, H - B), Re = se), se <= 0 || Q <= -c || Q > _ ? (Q = 0, be = 0, Ue = 0, Ce = 0) : Q <= 0 ? (Ue = -Q, Q = 0, be = Math.min(_, c + Q), Ce = be) : Q <= _ && (Ue = 0, be = Math.min(c, _ - Q), Ce = be);
11548
- var v = [B, Q, se, be];
11549
- if (Re > 0 && Ce > 0) {
11550
- var W = C / o;
11551
- v.push(Be * W, Ue * W, Re * W, Ce * W);
11552
- }
11553
- return q.drawImage.apply(q, [i].concat(Pu(v.map(function(ne) {
11554
+ }), C = g.width, L = g.height;
11555
+ C = Math.min(E.width, Math.max(T.width, C)), L = Math.min(E.height, Math.max(T.height, L));
11556
+ var y = document.createElement("canvas"), V = y.getContext("2d");
11557
+ y.width = kt(C), y.height = kt(L), V.fillStyle = t.fillColor || "transparent", V.fillRect(0, 0, C, L);
11558
+ var F = t.imageSmoothingEnabled, Y = F === void 0 ? !0 : F, ee = t.imageSmoothingQuality;
11559
+ V.imageSmoothingEnabled = Y, ee && (V.imageSmoothingQuality = ee);
11560
+ var q = i.width, _ = i.height, w = u, Q = r, se, be, Be, Ue, Le, _e;
11561
+ w <= -o || w > q ? (w = 0, se = 0, Be = 0, Le = 0) : w <= 0 ? (Be = -w, w = 0, se = Math.min(q, o + w), Le = se) : w <= q && (Be = 0, se = Math.min(o, q - w), Le = se), se <= 0 || Q <= -c || Q > _ ? (Q = 0, be = 0, Ue = 0, _e = 0) : Q <= 0 ? (Ue = -Q, Q = 0, be = Math.min(_, c + Q), _e = be) : Q <= _ && (Ue = 0, be = Math.min(c, _ - Q), _e = be);
11562
+ var D = [w, Q, se, be];
11563
+ if (Le > 0 && _e > 0) {
11564
+ var G = C / o;
11565
+ D.push(Be * G, Ue * G, Le * G, _e * G);
11566
+ }
11567
+ return V.drawImage.apply(V, [i].concat(Pu(D.map(function(ne) {
11554
11568
  return Math.floor(kt(ne));
11555
11569
  })))), y;
11556
11570
  },
@@ -11576,7 +11590,7 @@ var Mf = {
11576
11590
  }
11577
11591
  return this;
11578
11592
  }
11579
- }, Ff = je.Cropper, Xu = /* @__PURE__ */ function() {
11593
+ }, Ff = ze.Cropper, Xu = /* @__PURE__ */ function() {
11580
11594
  function e(t) {
11581
11595
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
11582
11596
  if (Kh(this, e), !t || !hf.test(t.tagName))
@@ -11645,7 +11659,7 @@ var Mf = {
11645
11659
  value: function() {
11646
11660
  var a = this, i = this.image;
11647
11661
  i.onload = null, i.onerror = null, this.sizing = !0;
11648
- var s = je.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(je.navigator.userAgent), u = function(d, f) {
11662
+ var s = ze.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ze.navigator.userAgent), u = function(d, f) {
11649
11663
  ie(a.imageData, {
11650
11664
  naturalWidth: d,
11651
11665
  naturalHeight: f,
@@ -11674,7 +11688,7 @@ var Mf = {
11674
11688
  var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
11675
11689
  r.innerHTML = ff;
11676
11690
  var o = r.querySelector(".".concat(ae, "-container")), c = o.querySelector(".".concat(ae, "-canvas")), d = o.querySelector(".".concat(ae, "-drag-box")), f = o.querySelector(".".concat(ae, "-crop-box")), E = f.querySelector(".".concat(ae, "-face"));
11677
- this.container = u, this.cropper = o, this.canvas = c, this.dragBox = d, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = E, c.appendChild(s), me(a, De), u.insertBefore(o, a.nextSibling), Qe(s, Zs), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, me(f, De), i.guides || me(f.getElementsByClassName("".concat(ae, "-dashed")), De), i.center || me(f.getElementsByClassName("".concat(ae, "-center")), De), i.background && me(o, "".concat(ae, "-bg")), i.highlight || me(E, nf), i.cropBoxMovable && (me(E, Ri), ma(E, fa, ds)), i.cropBoxResizable || (me(f.getElementsByClassName("".concat(ae, "-line")), De), me(f.getElementsByClassName("".concat(ae, "-point")), De)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), xe(i.ready) && Pe(a, sn, i.ready, {
11691
+ this.container = u, this.cropper = o, this.canvas = c, this.dragBox = d, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = E, c.appendChild(s), me(a, De), u.insertBefore(o, a.nextSibling), je(s, Zs), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, me(f, De), i.guides || me(f.getElementsByClassName("".concat(ae, "-dashed")), De), i.center || me(f.getElementsByClassName("".concat(ae, "-center")), De), i.background && me(o, "".concat(ae, "-bg")), i.highlight || me(E, nf), i.cropBoxMovable && (me(E, Ri), ma(E, fa, ds)), i.cropBoxResizable || (me(f.getElementsByClassName("".concat(ae, "-line")), De), me(f.getElementsByClassName("".concat(ae, "-point")), De)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), xe(i.ready) && Pe(a, sn, i.ready, {
11678
11692
  once: !0
11679
11693
  }), wt(a, sn);
11680
11694
  }
@@ -11685,7 +11699,7 @@ var Mf = {
11685
11699
  if (this.ready) {
11686
11700
  this.ready = !1, this.unbind(), this.resetPreview();
11687
11701
  var a = this.cropper.parentNode;
11688
- a && a.removeChild(this.cropper), Qe(this.element, De);
11702
+ a && a.removeChild(this.cropper), je(this.element, De);
11689
11703
  }
11690
11704
  }
11691
11705
  }, {
@@ -11740,11 +11754,11 @@ const qf = {
11740
11754
  }, a1 = ["src"], i1 = {
11741
11755
  class: "flex flex-col items-center",
11742
11756
  style: { width: "300px", height: "300px" }
11743
- }, s1 = { class: "text-[#999] mt-05 flex justify-center mt-4" }, n1 = { class: "w-full flex justify-end space-x-5 mt-5 px-6" }, u1 = ["loading"], r1 = /* @__PURE__ */ ze({
11757
+ }, s1 = { class: "text-[#999] mt-05 flex justify-center mt-4" }, n1 = { class: "w-full flex justify-end space-x-5 mt-5 px-6" }, u1 = ["loading"], r1 = /* @__PURE__ */ Ke({
11744
11758
  __name: "index",
11745
11759
  emits: ["cancel", "ok"],
11746
11760
  setup(e, { expose: t, emit: a }) {
11747
- const i = a, s = G({
11761
+ const i = a, s = $({
11748
11762
  coverUrl: "",
11749
11763
  // 封面url
11750
11764
  inputValue: "",
@@ -11755,7 +11769,7 @@ const qf = {
11755
11769
  // 视频前缀
11756
11770
  videoUrl: ""
11757
11771
  // 视频url
11758
- }), u = G(), r = G({
11772
+ }), u = $(), r = $({
11759
11773
  // 允许自裁
11760
11774
  autoCrop: !0,
11761
11775
  // 设置图片是否可以拖拽功能
@@ -11791,49 +11805,49 @@ const qf = {
11791
11805
  // crop: (e) => {
11792
11806
  // console.log(e.detail);
11793
11807
  // }
11794
- }), o = G(!1), c = G({
11808
+ }), o = $(!1), c = $({
11795
11809
  // 裁剪后的图片
11796
11810
  afterImg: "",
11797
11811
  // 裁剪前的图片
11798
11812
  image: null,
11799
11813
  myCropper: null
11800
- }), d = G("image/jpeg"), f = (H) => {
11801
- console.log(H);
11802
- const _ = H.target.files[0];
11814
+ }), d = $("image/jpeg"), f = (q) => {
11815
+ console.log(q);
11816
+ const _ = q.target.files[0];
11803
11817
  if (_) {
11804
11818
  _.name && (s.value.inputValue = _.name);
11805
- const B = new FileReader();
11806
- B.onload = (Q) => {
11819
+ const w = new FileReader();
11820
+ w.onload = (Q) => {
11807
11821
  var se, be;
11808
11822
  console.log("e?.target?.result", (se = Q == null ? void 0 : Q.target) == null ? void 0 : se.result), E((be = Q == null ? void 0 : Q.target) == null ? void 0 : be.result);
11809
- }, B.readAsDataURL(_);
11823
+ }, w.readAsDataURL(_);
11810
11824
  }
11811
11825
  };
11812
- async function E(H) {
11813
- if (!H)
11826
+ async function E(q) {
11827
+ if (!q)
11814
11828
  return;
11815
11829
  await ee();
11816
- const _ = H;
11830
+ const _ = q;
11817
11831
  c.value.image = _, c.value.image && T();
11818
11832
  }
11819
11833
  function T() {
11820
- const H = document.querySelector("#imgId");
11821
- H && H.addEventListener("load", () => {
11822
- $(), c.value.myCropper = new Xu(
11823
- H,
11834
+ const q = document.querySelector("#imgId");
11835
+ q && q.addEventListener("load", () => {
11836
+ Y(), c.value.myCropper = new Xu(
11837
+ q,
11824
11838
  r.value
11825
11839
  );
11826
11840
  });
11827
11841
  }
11828
- const g = G(!1), C = G();
11829
- function D(H, _, B, Q) {
11830
- C.value = Q, u.value = H, H && H.aspectRatio && (r.value.aspectRatio = H.aspectRatio), B && (s.value.inputValue = B), g.value = !0, _ && E(_);
11842
+ const g = $(!1), C = $();
11843
+ function L(q, _, w, Q) {
11844
+ C.value = Q, u.value = q, q && q.aspectRatio && (r.value.aspectRatio = q.aspectRatio), w && (s.value.inputValue = w), g.value = !0, _ && E(_);
11831
11845
  }
11832
11846
  function y() {
11833
11847
  g.value = !1;
11834
11848
  }
11835
- const q = () => {
11836
- var _, B;
11849
+ const V = () => {
11850
+ var _, w;
11837
11851
  if (!c.value.myCropper)
11838
11852
  return;
11839
11853
  o.value = !0, c.value.afterImg = c.value.myCropper.getCroppedCanvas({
@@ -11841,33 +11855,33 @@ const qf = {
11841
11855
  // 高
11842
11856
  imageSmoothingQuality: "high",
11843
11857
  // 图片质量
11844
- width: (B = u.value) == null ? void 0 : B.width
11858
+ width: (w = u.value) == null ? void 0 : w.width
11845
11859
  // 输出图片的宽
11846
11860
  }).toDataURL(d.value);
11847
- const H = Yf(
11861
+ const q = Yf(
11848
11862
  c.value.afterImg,
11849
11863
  s.value.inputValue
11850
11864
  );
11851
- i("ok", { options: H, element: C.value }), o.value = !1, ee(), $(), y();
11865
+ i("ok", { options: q, element: C.value }), o.value = !1, ee(), Y(), y();
11852
11866
  };
11853
- function w() {
11854
- ee(), $(), y(), i("cancel");
11867
+ function F() {
11868
+ ee(), Y(), y(), i("cancel");
11855
11869
  }
11856
- function $() {
11870
+ function Y() {
11857
11871
  c.value.myCropper && c.value.myCropper.destroy();
11858
11872
  }
11859
11873
  function ee() {
11860
11874
  c.value.image = "";
11861
11875
  }
11862
- return t({ handleCloseCropper: y, handleOpenCropper: D }), (H, _) => {
11863
- var B, Q, se;
11864
- return g.value ? (L(), M("div", qf, [
11876
+ return t({ handleCloseCropper: y, handleOpenCropper: L }), (q, _) => {
11877
+ var w, Q, se;
11878
+ return g.value ? (v(), R("div", qf, [
11865
11879
  x("div", Vf, [
11866
11880
  x("div", $f, [
11867
11881
  _[1] || (_[1] = x("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
11868
11882
  x("span", {
11869
11883
  class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
11870
- onClick: Le(w, ["stop"])
11884
+ onClick: ye(F, ["stop"])
11871
11885
  })
11872
11886
  ]),
11873
11887
  x("div", Wf, [
@@ -11880,7 +11894,7 @@ const qf = {
11880
11894
  x("input", {
11881
11895
  type: "file",
11882
11896
  accept: "image/*",
11883
- onClick: _[0] || (_[0] = Le(() => {
11897
+ onClick: _[0] || (_[0] = ye(() => {
11884
11898
  }, ["stop"])),
11885
11899
  contenteditable: "false",
11886
11900
  ref: "fileInput",
@@ -11897,7 +11911,7 @@ const qf = {
11897
11911
  x("div", Zf, [
11898
11912
  x("div", Jf, [
11899
11913
  x("div", e1, [
11900
- c.value.image ? Y("", !0) : (L(), M("div", t1, " 请上传图片 ")),
11914
+ c.value.image ? H("", !0) : (v(), R("div", t1, " 请上传图片 ")),
11901
11915
  x("img", {
11902
11916
  id: "imgId",
11903
11917
  src: c.value.image,
@@ -11907,7 +11921,7 @@ const qf = {
11907
11921
  ]),
11908
11922
  x("div", i1, [
11909
11923
  _[4] || (_[4] = x("div", { class: "before w-[270px] h-[200px] pr-[70px] border" }, null, -1)),
11910
- x("div", s1, " 预览画像 " + Ne(((B = u.value) == null ? void 0 : B.width) || "") + " " + Ne((Q = u.value) != null && Q.width ? "x" : "") + " " + Ne(((se = u.value) == null ? void 0 : se.height) || ""), 1)
11924
+ x("div", s1, " 预览画像 " + Ce(((w = u.value) == null ? void 0 : w.width) || "") + " " + Ce((Q = u.value) != null && Q.width ? "x" : "") + " " + Ce(((se = u.value) == null ? void 0 : se.height) || ""), 1)
11911
11925
  ])
11912
11926
  ])
11913
11927
  ])
@@ -11919,19 +11933,19 @@ const qf = {
11919
11933
  loading: o.value,
11920
11934
  class: "!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",
11921
11935
  type: "primary",
11922
- onClick: q
11936
+ onClick: V
11923
11937
  }, " 确认 ", 8, u1),
11924
11938
  x("span", {
11925
11939
  class: "!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",
11926
- onClick: w
11940
+ onClick: F
11927
11941
  }, "取消")
11928
11942
  ])
11929
11943
  ])
11930
11944
  ])
11931
- ])) : Y("", !0);
11945
+ ])) : H("", !0);
11932
11946
  };
11933
11947
  }
11934
- }), o1 = ze({
11948
+ }), o1 = Ke({
11935
11949
  name: "CustomIcon",
11936
11950
  props: {
11937
11951
  iconName: {
@@ -11946,12 +11960,12 @@ const qf = {
11946
11960
  }
11947
11961
  });
11948
11962
  function c1(e, t, a, i, s, u) {
11949
- return L(), M("span", {
11963
+ return v(), R("span", {
11950
11964
  style: { position: "unset", color: "unset", top: "unset", left: "unset", right: "unset", transform: "unset", "font-size": "unset" },
11951
11965
  class: fn(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
11952
11966
  }, null, 2);
11953
11967
  }
11954
- const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 = ze({
11968
+ const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 = Ke({
11955
11969
  name: "GpModal",
11956
11970
  props: {
11957
11971
  visible: {
@@ -12010,16 +12024,16 @@ const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 = ze({
12010
12024
  class: "p-4 border-t border-gray-200 flex justify-end space-x-2"
12011
12025
  };
12012
12026
  function p1(e, t, a, i, s, u) {
12013
- return e.visible ? (L(), M("div", {
12027
+ return e.visible ? (v(), R("div", {
12014
12028
  key: 0,
12015
12029
  class: "fixed inset-0 z-[99999] flex items-center justify-center bg-gray-900 bg-opacity-50",
12016
- onClick: t[3] || (t[3] = Le((...r) => e.onClose && e.onClose(...r), ["self"]))
12030
+ onClick: t[3] || (t[3] = ye((...r) => e.onClose && e.onClose(...r), ["self"]))
12017
12031
  }, [
12018
12032
  x("div", h1, [
12019
12033
  x("div", f1, [
12020
- e.title ? (L(), M("h3", m1, Ne(e.title), 1)) : Y("", !0),
12034
+ e.title ? (v(), R("h3", m1, Ce(e.title), 1)) : H("", !0),
12021
12035
  Jt(e.$slots, "header"),
12022
- e.showCloseButton ? (L(), M("button", {
12036
+ e.showCloseButton ? (v(), R("button", {
12023
12037
  key: 1,
12024
12038
  class: "text-gray-400 hover:text-gray-600",
12025
12039
  onClick: t[0] || (t[0] = (...r) => e.onClose && e.onClose(...r)),
@@ -12037,29 +12051,29 @@ function p1(e, t, a, i, s, u) {
12037
12051
  "clip-rule": "evenodd"
12038
12052
  })
12039
12053
  ], -1)
12040
- ]))) : Y("", !0)
12054
+ ]))) : H("", !0)
12041
12055
  ]),
12042
12056
  x("div", E1, [
12043
12057
  Jt(e.$slots, "default")
12044
12058
  ]),
12045
- e.showCancelButton || e.showOkButton ? (L(), M("div", T1, [
12059
+ e.showCancelButton || e.showOkButton ? (v(), R("div", T1, [
12046
12060
  Jt(e.$slots, "footer", {}, () => [
12047
- e.showCancelButton ? (L(), M("button", {
12061
+ e.showCancelButton ? (v(), R("button", {
12048
12062
  key: 0,
12049
12063
  class: "px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",
12050
12064
  onClick: t[1] || (t[1] = (...r) => e.onCancel && e.onCancel(...r))
12051
- }, Ne(e.cancelText), 1)) : Y("", !0),
12052
- e.showOkButton ? (L(), M("button", {
12065
+ }, Ce(e.cancelText), 1)) : H("", !0),
12066
+ e.showOkButton ? (v(), R("button", {
12053
12067
  key: 1,
12054
12068
  class: "px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",
12055
12069
  onClick: t[2] || (t[2] = (...r) => e.onOk && e.onOk(...r))
12056
- }, Ne(e.okText), 1)) : Y("", !0)
12070
+ }, Ce(e.okText), 1)) : H("", !0)
12057
12071
  ])
12058
- ])) : Y("", !0)
12072
+ ])) : H("", !0)
12059
12073
  ])
12060
- ])) : Y("", !0);
12074
+ ])) : H("", !0);
12061
12075
  }
12062
- const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, _1 = /* @__PURE__ */ ze({
12076
+ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, _1 = /* @__PURE__ */ Ke({
12063
12077
  __name: "IconModal",
12064
12078
  props: {
12065
12079
  // 图标库
@@ -12070,15 +12084,15 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
12070
12084
  },
12071
12085
  emits: ["ok"],
12072
12086
  setup(e, { expose: t, emit: a }) {
12073
- const i = e, s = G(i.icons || []);
12074
- nt(
12087
+ const i = e, s = $(i.icons || []);
12088
+ qe(
12075
12089
  () => i.icons,
12076
12090
  (E) => {
12077
12091
  s.value = E || [];
12078
12092
  },
12079
12093
  { immediate: !0 }
12080
12094
  );
12081
- const u = a, r = G(!1), o = G();
12095
+ const u = a, r = $(!1), o = $();
12082
12096
  function c(E) {
12083
12097
  r.value = !0, o.value = E;
12084
12098
  }
@@ -12088,7 +12102,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
12088
12102
  function f() {
12089
12103
  r.value = !1;
12090
12104
  }
12091
- return t({ openModal: c, closeModal: f }), (E, T) => (L(), Ct(b1, {
12105
+ return t({ openModal: c, closeModal: f }), (E, T) => (v(), Ct(b1, {
12092
12106
  visible: r.value,
12093
12107
  "onUpdate:visible": T[0] || (T[0] = (g) => r.value = g),
12094
12108
  title: "选择图标",
@@ -12099,11 +12113,11 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
12099
12113
  }, {
12100
12114
  default: Ya(() => [
12101
12115
  x("div", g1, [
12102
- (L(!0), M(Zt, null, Fi(s.value, (g) => (L(), Ct(l1, {
12116
+ (v(!0), R(Zt, null, Fi(s.value, (g) => (v(), Ct(l1, {
12103
12117
  key: g,
12104
12118
  class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
12105
12119
  iconName: g,
12106
- onClick: Le((C) => d(g), ["stop"]),
12120
+ onClick: ye((C) => d(g), ["stop"]),
12107
12121
  title: g
12108
12122
  }, null, 8, ["iconName", "onClick", "title"]))), 128))
12109
12123
  ])
@@ -12111,7 +12125,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
12111
12125
  _: 1
12112
12126
  }, 8, ["visible"]));
12113
12127
  }
12114
- }), A1 = ze({
12128
+ }), A1 = Ke({
12115
12129
  name: "GpImageUpload",
12116
12130
  props: {
12117
12131
  accept: {
@@ -12134,60 +12148,74 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
12134
12148
  showList: {
12135
12149
  type: Boolean,
12136
12150
  default: !1
12151
+ },
12152
+ show: {
12153
+ type: Boolean,
12154
+ default: !0
12137
12155
  }
12138
12156
  },
12139
12157
  setup(e, { emit: t }) {
12140
- const a = G(null), i = G([]), s = G(), u = () => {
12141
- var d;
12142
- (d = a.value) == null || d.click();
12143
- }, r = async (d) => {
12144
- var g;
12145
- const E = d.target.files;
12146
- if (!E) return;
12147
- const T = [];
12148
- for (let C = 0; C < E.length; C++) {
12149
- const D = E[C];
12150
- if (e.beforeUpload && await e.beforeUpload(D) === !1)
12158
+ const a = $(null), i = $([]), s = $(), u = $(e.show);
12159
+ qe(
12160
+ () => e.show,
12161
+ (f) => {
12162
+ u.value = f;
12163
+ },
12164
+ { immediate: !0 }
12165
+ );
12166
+ const r = () => {
12167
+ var f;
12168
+ (f = a.value) == null || f.click();
12169
+ }, o = async (f) => {
12170
+ var C;
12171
+ const T = f.target.files;
12172
+ if (!T) return;
12173
+ const g = [];
12174
+ for (let L = 0; L < T.length; L++) {
12175
+ const y = T[L];
12176
+ if (e.beforeUpload && await e.beforeUpload(y) === !1)
12151
12177
  continue;
12152
- const y = `${Date.now()}-${D.name}`, q = URL.createObjectURL(D), w = document.createElement("img");
12153
- w.src = q, document.body.appendChild(w), await new Promise((H) => {
12154
- w.onload = H;
12178
+ const V = `${Date.now()}-${y.name}`, F = URL.createObjectURL(y), Y = document.createElement("img");
12179
+ Y.src = F, document.body.appendChild(Y), await new Promise((_) => {
12180
+ Y.onload = _;
12155
12181
  });
12156
- const $ = w.width, ee = w.height;
12157
- document.body.removeChild(w), T.push({
12158
- uid: y,
12159
- name: D.name,
12182
+ const ee = Y.width, q = Y.height;
12183
+ document.body.removeChild(Y), g.push({
12184
+ uid: V,
12185
+ name: y.name,
12160
12186
  status: "uploading",
12161
- thumbUrl: q,
12162
- file: D,
12163
- width: $,
12164
- height: ee
12187
+ thumbUrl: F,
12188
+ file: y,
12189
+ width: ee,
12190
+ height: q
12165
12191
  });
12166
12192
  }
12167
- e.maxCount && i.value.length + T.length > e.maxCount && T.splice(e.maxCount - i.value.length), e.multiple ? i.value = [...i.value, ...T] : i.value = T.slice(0, 1), (g = e.onChange) == null || g.call(e, i.value, s.value), t("update:fileList", i.value), a.value && (a.value.value = "");
12168
- }, o = (d) => {
12169
- var f;
12170
- i.value = i.value.filter((E) => E.uid !== d), (f = e.onChange) == null || f.call(e, i.value, s.value);
12193
+ e.maxCount && i.value.length + g.length > e.maxCount && g.splice(e.maxCount - i.value.length), e.multiple ? i.value = [...i.value, ...g] : i.value = g.slice(0, 1), (C = e.onChange) == null || C.call(e, i.value, s.value), t("update:fileList", i.value), a.value && (a.value.value = "");
12194
+ }, c = (f) => {
12195
+ var E;
12196
+ i.value = i.value.filter((T) => T.uid !== f), (E = e.onChange) == null || E.call(e, i.value, s.value);
12171
12197
  };
12172
- function c(d) {
12173
- s.value = d, u();
12198
+ function d(f) {
12199
+ s.value = f, r();
12174
12200
  }
12175
12201
  return {
12176
- openModal: c,
12202
+ isShow: u,
12203
+ openModal: d,
12177
12204
  inputRef: a,
12178
12205
  fileList: i,
12179
- triggerInput: u,
12180
- handleChange: r,
12181
- removeFile: o
12206
+ triggerInput: r,
12207
+ handleChange: o,
12208
+ removeFile: c
12182
12209
  };
12183
12210
  }
12184
12211
  }), N1 = { class: "upload-wrapper" }, C1 = ["accept", "multiple"], I1 = {
12185
- key: 0,
12212
+ key: 1,
12186
12213
  class: "file-list mt-4"
12187
12214
  }, S1 = { class: "flex items-center space-x-4" }, x1 = ["src"], O1 = ["onClick"];
12188
12215
  function D1(e, t, a, i, s, u) {
12189
- return L(), M("div", N1, [
12190
- x("div", {
12216
+ return v(), R("div", N1, [
12217
+ e.isShow ? (v(), R("div", {
12218
+ key: 0,
12191
12219
  class: "",
12192
12220
  onClick: t[0] || (t[0] = (...r) => e.triggerInput && e.triggerInput(...r))
12193
12221
  }, [
@@ -12196,7 +12224,7 @@ function D1(e, t, a, i, s, u) {
12196
12224
  x("div", { class: "text-gray-400 text-lg text-center" }, " 点击或拖拽上传图片 ")
12197
12225
  ], -1))
12198
12226
  ], !0)
12199
- ]),
12227
+ ])) : H("", !0),
12200
12228
  x("input", {
12201
12229
  type: "file",
12202
12230
  ref: "inputRef",
@@ -12205,19 +12233,19 @@ function D1(e, t, a, i, s, u) {
12205
12233
  multiple: e.multiple,
12206
12234
  onChange: t[1] || (t[1] = (...r) => e.handleChange && e.handleChange(...r))
12207
12235
  }, null, 40, C1),
12208
- e.showList ? (L(), M("div", I1, [
12209
- (L(!0), M(Zt, null, Fi(e.fileList, (r) => (L(), M("div", {
12236
+ e.showList ? (v(), R("div", I1, [
12237
+ (v(!0), R(Zt, null, Fi(e.fileList, (r) => (v(), R("div", {
12210
12238
  key: r.uid,
12211
12239
  class: "file-item flex items-center justify-between p-2 border rounded mb-2"
12212
12240
  }, [
12213
12241
  x("div", S1, [
12214
- r.thumbUrl ? (L(), M("img", {
12242
+ r.thumbUrl ? (v(), R("img", {
12215
12243
  key: 0,
12216
12244
  src: r.thumbUrl,
12217
12245
  alt: "preview",
12218
12246
  class: "w-12 h-12 object-cover rounded"
12219
- }, null, 8, x1)) : Y("", !0),
12220
- x("span", null, Ne(r.name), 1)
12247
+ }, null, 8, x1)) : H("", !0),
12248
+ x("span", null, Ce(r.name), 1)
12221
12249
  ]),
12222
12250
  x("div", null, [
12223
12251
  x("button", {
@@ -12226,10 +12254,10 @@ function D1(e, t, a, i, s, u) {
12226
12254
  }, " 删除 ", 8, O1)
12227
12255
  ])
12228
12256
  ]))), 128))
12229
- ])) : Y("", !0)
12257
+ ])) : H("", !0)
12230
12258
  ]);
12231
12259
  }
12232
- const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179d"]]), L1 = { class: "flex" }, y1 = {
12260
+ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf8"]]), L1 = { class: "flex" }, y1 = {
12233
12261
  key: 0,
12234
12262
  class: "text-lg font-bold border-b p-2"
12235
12263
  }, R1 = { class: "text-sm font-thin text-gray-500" }, M1 = ["innerHTML"], P1 = ["innerHTML"], k1 = { class: "flex-1" }, w1 = {
@@ -12238,7 +12266,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12238
12266
  }, B1 = { class: "p-2" }, U1 = {
12239
12267
  key: 0,
12240
12268
  class: "text-lg font-bold border-b p-2"
12241
- }, F1 = { class: "text-sm font-thin text-gray-500" }, H1 = { class: "p-2" }, Y1 = /* @__PURE__ */ ze({
12269
+ }, F1 = { class: "text-sm font-thin text-gray-500" }, H1 = { class: "p-2" }, Y1 = /* @__PURE__ */ Ke({
12242
12270
  __name: "Designer",
12243
12271
  props: {
12244
12272
  mode: { default: "design" },
@@ -12253,22 +12281,22 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12253
12281
  },
12254
12282
  emits: ["update:modelValue", "update:element"],
12255
12283
  setup(e, { emit: t }) {
12256
- const a = e, i = t, s = G(a.template), u = G();
12284
+ const a = e, i = t, s = $(a.template), u = $();
12257
12285
  let r = Qs("", {}, !1);
12258
- const o = G("");
12259
- nt(
12286
+ const o = $("");
12287
+ qe(
12260
12288
  () => a.template,
12261
12289
  (A) => {
12262
12290
  s.value = A;
12263
12291
  },
12264
12292
  { immediate: !0 }
12265
- ), nt(
12293
+ ), qe(
12266
12294
  () => s.value,
12267
12295
  (A) => {
12268
12296
  A && (u.value = _(A));
12269
12297
  },
12270
12298
  { immediate: !0 }
12271
- ), nt(
12299
+ ), qe(
12272
12300
  () => a.css,
12273
12301
  (A) => {
12274
12302
  A.forEach((O) => {
@@ -12279,61 +12307,61 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12279
12307
  },
12280
12308
  { immediate: !0 }
12281
12309
  );
12282
- const c = G(a.mode);
12283
- nt(
12310
+ const c = $(a.mode);
12311
+ qe(
12284
12312
  () => u.value,
12285
12313
  (A) => {
12286
12314
  A && i("update:element", A);
12287
12315
  },
12288
12316
  { immediate: !0 }
12289
12317
  );
12290
- const d = G("");
12291
- nt(
12318
+ const d = $("");
12319
+ qe(
12292
12320
  () => o.value,
12293
12321
  (A) => {
12294
12322
  i("update:modelValue", A);
12295
12323
  },
12296
12324
  { immediate: !0 }
12297
12325
  );
12298
- const f = G(), E = G(), T = G(), g = G(), C = G(), D = G("");
12326
+ const f = $(), E = $(), T = $(), g = $(), C = $(), L = $("");
12299
12327
  function y(A) {
12300
12328
  g.value = A;
12301
12329
  }
12302
- function q(A, O = "") {
12330
+ function V(A, O = "") {
12303
12331
  if (O) {
12304
- const P = w(u.value, O);
12332
+ const P = F(u.value, O);
12305
12333
  P ? C.value = P : C.value = A;
12306
12334
  } else
12307
12335
  C.value = A;
12308
12336
  }
12309
- function w(A, O) {
12337
+ function F(A, O) {
12310
12338
  if (A.xpath === O)
12311
12339
  return A;
12312
12340
  if (A.children && A.children.length)
12313
12341
  for (const P of A.children) {
12314
- const F = w(P, O);
12315
- if (F)
12316
- return F;
12342
+ const U = F(P, O);
12343
+ if (U)
12344
+ return U;
12317
12345
  }
12318
12346
  }
12319
- function $(A, O) {
12320
- var P, F;
12347
+ function Y(A, O) {
12348
+ var P, U;
12321
12349
  return A.tag === O.tag && // 标签一致
12322
- ((P = A.children) == null ? void 0 : P.length) === ((F = O.children) == null ? void 0 : F.length);
12350
+ ((P = A.children) == null ? void 0 : P.length) === ((U = O.children) == null ? void 0 : U.length);
12323
12351
  }
12324
12352
  function ee(A) {
12325
- var P, F, ue, Ae, Me, le, oe, Ve, qt, ti;
12353
+ var P, U, ue, Ne, Me, le, oe, $e, qt, ti;
12326
12354
  if (g.value.xpath == A.xpath) {
12327
12355
  if (g.value) {
12328
12356
  if (A.type === z.Block) {
12329
12357
  var O = !0;
12330
- const $e = w(
12358
+ const We = F(
12331
12359
  u.value,
12332
12360
  g.value.parentxpath || ""
12333
12361
  );
12334
- if ($e && $e.children && $e.children.forEach((He) => {
12362
+ if (We && We.children && We.children.forEach((He) => {
12335
12363
  if (He.tag != g.value.tag || // 检查标签一致
12336
- !$(He, g.value)) {
12364
+ !Y(He, g.value)) {
12337
12365
  O = !1;
12338
12366
  return;
12339
12367
  }
@@ -12342,18 +12370,18 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12342
12370
  return;
12343
12371
  }
12344
12372
  }
12345
- if (g.value.rule = A.rule, g.value.type = A.type, (P = A.rule) != null && P.isThemeColor ? (A.type === 1 && ((!A.attrs.class || A.attrs.class && (!((F = A.attrs.class) != null && F.includes("theme_text")) || !((ue = A.attrs.class) != null && ue.includes(" theme_text")))) && (A.attrs.class += " theme_text"), (Ae = A.attrs.class) != null && Ae.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), A.type === 6 && (!((Me = A.attrs.class) != null && Me.includes("theme_bg")) && !((le = A.attrs.class) != null && le.includes(" theme_bg")) && (A.attrs.class += " theme_bg"), (oe = A.attrs.class) != null && oe.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")))) : (A.type === 1 && (Ve = A.attrs.class) != null && Ve.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")), A.type === 6 && (qt = A.attrs.class) != null && qt.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), g.value.type === z.Block) {
12346
- const $e = w(
12373
+ if (g.value.rule = A.rule, g.value.type = A.type, (P = A.rule) != null && P.isThemeColor ? (A.type === 1 && ((!A.attrs.class || A.attrs.class && (!((U = A.attrs.class) != null && U.includes("theme_text")) || !((ue = A.attrs.class) != null && ue.includes(" theme_text")))) && (A.attrs.class += " theme_text"), (Ne = A.attrs.class) != null && Ne.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), A.type === 6 && (!((Me = A.attrs.class) != null && Me.includes("theme_bg")) && !((le = A.attrs.class) != null && le.includes(" theme_bg")) && (A.attrs.class += " theme_bg"), (oe = A.attrs.class) != null && oe.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")))) : (A.type === 1 && ($e = A.attrs.class) != null && $e.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")), A.type === 6 && (qt = A.attrs.class) != null && qt.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), g.value.type === z.Block) {
12374
+ const We = F(
12347
12375
  u.value,
12348
12376
  g.value.parentxpath || ""
12349
12377
  );
12350
- $e && $e.children && ($e.children.forEach((He) => {
12378
+ We && We.children && (We.children.forEach((He) => {
12351
12379
  if (He.tag != g.value.tag || // 检查标签一致
12352
- !$(He, g.value)) {
12380
+ !Y(He, g.value)) {
12353
12381
  Z.error("同级结构不一致,无法配置为块类型");
12354
12382
  return;
12355
12383
  }
12356
- }), $e.children.forEach((He) => {
12384
+ }), We.children.forEach((He) => {
12357
12385
  var ms;
12358
12386
  He.tag === g.value.tag && (He.rule = A.rule, He.type = A.type, (ms = He.attrs.class) != null && ms.includes(" mb40 relative") || (He.attrs.class += " mb40 relative"));
12359
12387
  }));
@@ -12363,54 +12391,54 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12363
12391
  d.value = (/* @__PURE__ */ new Date()).getTime().toString(), Z.success("保存成功");
12364
12392
  }
12365
12393
  }
12366
- function H(A) {
12394
+ function q(A) {
12367
12395
  o.value = A;
12368
12396
  }
12369
12397
  function _(A) {
12370
12398
  r = Qs(A);
12371
- const O = r("body").children().toArray().map((P) => B(r(P)));
12399
+ const O = r("body").children().toArray().map((P) => w(r(P)));
12372
12400
  return o.value = r("body").html() || "", O[0];
12373
12401
  }
12374
- function B(A, O = "") {
12402
+ function w(A, O = "") {
12375
12403
  var Me;
12376
12404
  function P(le) {
12377
12405
  if (!le || !le[0]) return "";
12378
12406
  const oe = [];
12379
- let Ve = le;
12380
- for (; Ve.length && Ve[0].tagName !== "html"; ) {
12381
- const qt = Ve[0].tagName, $e = Ve.parent().children(qt).index(Ve) + 1;
12382
- oe.unshift(`${qt}[${$e}]`), Ve = Ve.parent();
12407
+ let $e = le;
12408
+ for (; $e.length && $e[0].tagName !== "html"; ) {
12409
+ const qt = $e[0].tagName, We = $e.parent().children(qt).index($e) + 1;
12410
+ oe.unshift(`${qt}[${We}]`), $e = $e.parent();
12383
12411
  }
12384
12412
  return "/html/" + oe.join("/");
12385
12413
  }
12386
- const F = P(A).replace("/html/body[1]", ""), ue = A.children().toArray().map((le) => B(r(le), F)), Ae = (Me = a.rules) == null ? void 0 : Me.find((le) => le.xpath === F);
12414
+ const U = P(A).replace("/html/body[1]", ""), ue = A.children().toArray().map((le) => w(r(le), U)), Ne = (Me = a.rules) == null ? void 0 : Me.find((le) => le.xpath === U);
12387
12415
  return {
12388
12416
  tag: A[0].tagName,
12389
12417
  text: A.contents().not(A.children()).text().trim(),
12390
12418
  attrs: A[0].attribs,
12391
12419
  children: ue,
12392
- xpath: F,
12420
+ xpath: U,
12393
12421
  parentxpath: O,
12394
- type: (Ae == null ? void 0 : Ae.type) || z.None,
12395
- rule: (Ae == null ? void 0 : Ae.rule) || {}
12422
+ type: (Ne == null ? void 0 : Ne.type) || z.None,
12423
+ rule: (Ne == null ? void 0 : Ne.rule) || {}
12396
12424
  };
12397
12425
  }
12398
12426
  function Q(A) {
12399
12427
  console.log("更新子节点的文本", A);
12400
- const O = w(u.value, A.element.xpath);
12428
+ const O = F(u.value, A.element.xpath);
12401
12429
  if (O) {
12402
12430
  const P = hn(O);
12403
12431
  P.editText = A.newText;
12404
12432
  }
12405
12433
  }
12406
12434
  function se(A, O = "") {
12407
- function P(F, ue) {
12435
+ function P(U, ue) {
12408
12436
  var le;
12409
- const Me = (ue ? ((le = w(u.value, ue)) == null ? void 0 : le.children) || [] : [u.value]).filter((oe) => oe.tag === F.tag).indexOf(F) + 1;
12410
- return `${ue}/${F.tag}[${Me}]`;
12437
+ const Me = (ue ? ((le = F(u.value, ue)) == null ? void 0 : le.children) || [] : [u.value]).filter((oe) => oe.tag === U.tag).indexOf(U) + 1;
12438
+ return `${ue}/${U.tag}[${Me}]`;
12411
12439
  }
12412
12440
  A.xpath = P(A, O), A.parentxpath = O, (A.children || []).forEach(
12413
- (F) => se(F, A.xpath)
12441
+ (U) => se(U, A.xpath)
12414
12442
  );
12415
12443
  }
12416
12444
  function be({
@@ -12419,18 +12447,18 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12419
12447
  newBlock: P
12420
12448
  }) {
12421
12449
  console.log("块操作", A, O, P);
12422
- const F = w(
12450
+ const U = F(
12423
12451
  u.value,
12424
12452
  O.parentxpath || ""
12425
12453
  );
12426
- if (!F || !F.children) return;
12427
- const ue = F.children.findIndex(
12454
+ if (!U || !U.children) return;
12455
+ const ue = U.children.findIndex(
12428
12456
  (oe) => oe === O
12429
12457
  );
12430
12458
  if (ue === -1) return;
12431
- const Ae = F.children.length, { minBlock: Me, maxBlock: le } = O.rule;
12432
- if ((A === "add" || A === "copy") && Ae >= (le || 1 / 0)) {
12433
- D.value = `无法添加更多块。最大块数量为 ${le}`, Z.error(D.value);
12459
+ const Ne = U.children.length, { minBlock: Me, maxBlock: le } = O.rule;
12460
+ if ((A === "add" || A === "copy") && Ne >= (le || 1 / 0)) {
12461
+ L.value = `无法添加更多块。最大块数量为 ${le}`, Z.error(L.value);
12434
12462
  return;
12435
12463
  }
12436
12464
  switch (A) {
@@ -12441,7 +12469,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12441
12469
  xpath: "",
12442
12470
  children: JSON.parse(JSON.stringify(P.children))
12443
12471
  };
12444
- F.children.splice(ue + 1, 0, oe);
12472
+ U.children.splice(ue + 1, 0, oe);
12445
12473
  }
12446
12474
  break;
12447
12475
  case "copy":
@@ -12451,61 +12479,61 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12451
12479
  xpath: "",
12452
12480
  children: JSON.parse(JSON.stringify(P.children))
12453
12481
  };
12454
- F.children.splice(ue + 1, 0, oe);
12482
+ U.children.splice(ue + 1, 0, oe);
12455
12483
  }
12456
12484
  break;
12457
12485
  case "moveUp":
12458
12486
  if (ue > 0) {
12459
- const [oe] = F.children.splice(ue, 1);
12460
- F.children.splice(ue - 1, 0, oe);
12487
+ const [oe] = U.children.splice(ue, 1);
12488
+ U.children.splice(ue - 1, 0, oe);
12461
12489
  }
12462
12490
  break;
12463
12491
  case "moveDown":
12464
- if (ue < F.children.length - 1) {
12465
- const [oe] = F.children.splice(ue, 1);
12466
- F.children.splice(ue + 1, 0, oe);
12492
+ if (ue < U.children.length - 1) {
12493
+ const [oe] = U.children.splice(ue, 1);
12494
+ U.children.splice(ue + 1, 0, oe);
12467
12495
  }
12468
12496
  break;
12469
12497
  case "delete":
12470
- if (Ae <= (Me || 0)) {
12471
- D.value = `无法删除更多块。最小块数量为 ${Me}`, Z.error(D.value);
12498
+ if (Ne <= (Me || 0)) {
12499
+ L.value = `无法删除更多块。最小块数量为 ${Me}`, Z.error(L.value);
12472
12500
  return;
12473
12501
  }
12474
- F.children.splice(ue, 1);
12502
+ U.children.splice(ue, 1);
12475
12503
  break;
12476
12504
  }
12477
- D.value = "", se(u.value);
12505
+ L.value = "", se(u.value);
12478
12506
  }
12479
12507
  function Be(A, O) {
12480
12508
  let P = O.attrs.class.replace(/icon-\S+/g, `icon-${A}`);
12481
12509
  O.attrs.class = P;
12482
12510
  }
12483
12511
  function Ue(A) {
12484
- const O = w(u.value, A.element.xpath), P = A.options;
12512
+ const O = F(u.value, A.element.xpath), P = A.options;
12485
12513
  if (typeof P == "object")
12486
12514
  if (a.uploadByFile)
12487
- a.uploadByFile(P).then((F) => {
12488
- F.success && (O.attrs.src = F.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12515
+ a.uploadByFile(P).then((U) => {
12516
+ U.success && (O.attrs.src = U.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12489
12517
  });
12490
12518
  else {
12491
12519
  O.attrs.alt = P.name;
12492
- const F = new FileReader();
12493
- F.onload = (ue) => {
12520
+ const U = new FileReader();
12521
+ U.onload = (ue) => {
12494
12522
  var oe;
12495
- let Ae = (oe = ue == null ? void 0 : ue.target) == null ? void 0 : oe.result, Me = Hf(Ae), le = URL.createObjectURL(Me);
12523
+ let Ne = (oe = ue == null ? void 0 : ue.target) == null ? void 0 : oe.result, Me = Hf(Ne), le = URL.createObjectURL(Me);
12496
12524
  console.log("url", le), O.attrs.src = le, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12497
- }, F.readAsDataURL(P);
12525
+ }, U.readAsDataURL(P);
12498
12526
  }
12499
12527
  else
12500
12528
  O.attrs.src = P, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12501
12529
  }
12502
- function Re(A) {
12503
- const { icon: O } = A, P = w(u.value, A.element.xpath);
12504
- let F = P.attrs.class.replace(/icon-\S+/g, `icon-${O}`);
12505
- P.attrs.class = F, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12530
+ function Le(A) {
12531
+ const { icon: O } = A, P = F(u.value, A.element.xpath);
12532
+ let U = P.attrs.class.replace(/icon-\S+/g, `icon-${O}`);
12533
+ P.attrs.class = U, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12506
12534
  }
12507
- const Ce = (A) => A.type.startsWith("image/") ? !0 : (Z.error("只能上传图片文件"), !1), v = G({});
12508
- function W(A, O) {
12535
+ const _e = (A) => A.type.startsWith("image/") ? !0 : (Z.error("只能上传图片文件"), !1), D = $({});
12536
+ function G(A, O) {
12509
12537
  if (!A || A.length === 0)
12510
12538
  return;
12511
12539
  const P = A[0];
@@ -12519,62 +12547,62 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12519
12547
  return;
12520
12548
  }
12521
12549
  }
12522
- if (O.rule.minImageWidth && O.rule.maxImageHeight ? (v.value.width = O.rule.minImageWidth, v.value.height = O.rule.maxImageHeight, v.value.aspectRatio = O.rule.minImageWidth / O.rule.maxImageHeight) : v.value = {}, P)
12550
+ if (O.rule.minImageWidth && O.rule.maxImageHeight ? (D.value.width = O.rule.minImageWidth, D.value.height = O.rule.maxImageHeight, D.value.aspectRatio = O.rule.minImageWidth / O.rule.maxImageHeight) : D.value = {}, P)
12523
12551
  if (O.rule.crop) {
12524
- const F = P.thumbUrl;
12552
+ const U = P.thumbUrl;
12525
12553
  f.value.handleOpenCropper(
12526
- v.value,
12527
- F,
12554
+ D.value,
12555
+ U,
12528
12556
  P.name,
12529
12557
  O
12530
12558
  );
12531
12559
  } else
12532
- a.uploadByFile ? a.uploadByFile(P.file).then((F) => {
12533
- F.success && (O.attrs.src = F.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12560
+ a.uploadByFile ? a.uploadByFile(P.file).then((U) => {
12561
+ U.success && (O.attrs.src = U.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12534
12562
  }) : (O.attrs.src = P.thumbUrl, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12535
12563
  }
12536
- const ne = G(a.previewWidth), _e = G(375);
12537
- let Ie = G(!1), Ke = G(""), mt = 0, Fe = 0;
12564
+ const ne = $(a.previewWidth), Ae = $(375);
12565
+ let Ie = $(!1), Ze = $(""), mt = 0, Fe = 0;
12538
12566
  function Et(A) {
12539
- Ke.value = A, Ie.value = !0, mt = event.clientX, A === "preview" ? Fe = ne.value : A === "structure" && (Fe = _e.value), window.addEventListener("mousemove", ga), window.addEventListener("mouseup", _a);
12567
+ Ze.value = A, Ie.value = !0, mt = event.clientX, A === "preview" ? Fe = ne.value : A === "structure" && (Fe = Ae.value), window.addEventListener("mousemove", ga), window.addEventListener("mouseup", _a);
12540
12568
  }
12541
12569
  function ga(A) {
12542
12570
  if (!Ie.value) return;
12543
12571
  const O = A.clientX - mt;
12544
- Ke.value === "preview" ? ne.value = Math.max(200, Fe + O) : Ke.value === "structure" && (_e.value = Math.max(200, Fe - O));
12572
+ Ze.value === "preview" ? ne.value = Math.max(200, Fe + O) : Ze.value === "structure" && (Ae.value = Math.max(200, Fe - O));
12545
12573
  }
12546
12574
  function _a() {
12547
- Ie.value = !1, Ke.value = "", window.removeEventListener("mousemove", ga), window.removeEventListener("mouseup", _a);
12575
+ Ie.value = !1, Ze.value = "", window.removeEventListener("mousemove", ga), window.removeEventListener("mouseup", _a);
12548
12576
  }
12549
- return (A, O) => (L(), M("div", L1, [
12550
- A.preview ? (L(), M("div", {
12577
+ return (A, O) => (v(), R("div", L1, [
12578
+ A.preview ? (v(), R("div", {
12551
12579
  key: 0,
12552
12580
  class: "border-l overflow-auto resize-area",
12553
12581
  style: Ts({ width: ne.value + "px" })
12554
12582
  }, [
12555
- A.showTitle ? (L(), M("h2", y1, [
12583
+ A.showTitle ? (v(), R("h2", y1, [
12556
12584
  O[2] || (O[2] = Ei(" 实时预览 ")),
12557
- x("span", R1, Ne(ne.value) + "px", 1)
12558
- ])) : Y("", !0),
12585
+ x("span", R1, Ce(ne.value) + "px", 1)
12586
+ ])) : H("", !0),
12559
12587
  x("div", null, [
12560
- o.value ? (L(), M("div", {
12588
+ o.value ? (v(), R("div", {
12561
12589
  key: 0,
12562
12590
  innerHTML: o.value
12563
- }, null, 8, M1)) : (L(), M("div", {
12591
+ }, null, 8, M1)) : (v(), R("div", {
12564
12592
  key: 1,
12565
12593
  innerHTML: de(r)("body").html()
12566
12594
  }, null, 8, P1))
12567
12595
  ])
12568
- ], 4)) : Y("", !0),
12569
- A.preview ? (L(), M("div", {
12596
+ ], 4)) : H("", !0),
12597
+ A.preview ? (v(), R("div", {
12570
12598
  key: 1,
12571
12599
  class: "resizer",
12572
12600
  onMousedown: O[0] || (O[0] = (P) => Et("preview"))
12573
- }, null, 32)) : Y("", !0),
12601
+ }, null, 32)) : H("", !0),
12574
12602
  x("div", k1, [
12575
- A.showTitle ? (L(), M("h2", w1, "结构渲染")) : Y("", !0),
12603
+ A.showTitle ? (v(), R("h2", w1, "结构渲染")) : H("", !0),
12576
12604
  x("div", B1, [
12577
- u.value ? (L(), Ct(Eh, {
12605
+ u.value ? (v(), Ct(Eh, {
12578
12606
  key: 0,
12579
12607
  "upload-by-file": A.uploadByFile,
12580
12608
  cropper: f.value,
@@ -12587,36 +12615,36 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12587
12615
  selectedElement: g.value,
12588
12616
  hoveredElement: C.value,
12589
12617
  onSelectElement: y,
12590
- onHoverElement: q,
12591
- onContentUpdated: H,
12618
+ onHoverElement: V,
12619
+ onContentUpdated: q,
12592
12620
  onUpdateText: Q,
12593
12621
  onBlockAction: be,
12594
12622
  onAddIcon: Be
12595
- }, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "element", "selectedElement", "hoveredElement"])) : Y("", !0)
12623
+ }, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "element", "selectedElement", "hoveredElement"])) : H("", !0)
12596
12624
  ])
12597
12625
  ]),
12598
- c.value == "design" ? (L(), M("div", {
12626
+ c.value == "design" ? (v(), R("div", {
12599
12627
  key: 2,
12600
12628
  class: "resizer",
12601
12629
  onMousedown: O[1] || (O[1] = (P) => Et("structure"))
12602
- }, null, 32)) : Y("", !0),
12603
- c.value == "design" ? (L(), M("div", {
12630
+ }, null, 32)) : H("", !0),
12631
+ c.value == "design" ? (v(), R("div", {
12604
12632
  key: 3,
12605
12633
  class: "resize-area overflow-auto",
12606
- style: Ts({ width: _e.value + "px" })
12634
+ style: Ts({ width: Ae.value + "px" })
12607
12635
  }, [
12608
- A.showTitle ? (L(), M("h2", U1, [
12636
+ A.showTitle ? (v(), R("h2", U1, [
12609
12637
  O[3] || (O[3] = Ei(" 节点属性 ")),
12610
- x("span", F1, Ne(_e.value) + "px", 1)
12611
- ])) : Y("", !0),
12638
+ x("span", F1, Ce(Ae.value) + "px", 1)
12639
+ ])) : H("", !0),
12612
12640
  x("div", H1, [
12613
- g.value ? (L(), Ct(jh, {
12641
+ g.value ? (v(), Ct(jh, {
12614
12642
  key: 0,
12615
12643
  element: g.value,
12616
12644
  onUpdateElement: ee
12617
- }, null, 8, ["element"])) : Y("", !0)
12645
+ }, null, 8, ["element"])) : H("", !0)
12618
12646
  ])
12619
- ], 4)) : Y("", !0),
12647
+ ], 4)) : H("", !0),
12620
12648
  ut(r1, {
12621
12649
  ref_key: "cropperRef",
12622
12650
  ref: f,
@@ -12626,14 +12654,15 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12626
12654
  icons: A.icons,
12627
12655
  ref_key: "iconRef",
12628
12656
  ref: E,
12629
- onOk: Re
12657
+ onOk: Le
12630
12658
  }, null, 8, ["icons"]),
12631
12659
  ut(v1, {
12632
12660
  ref_key: "uploadRef",
12633
12661
  ref: T,
12634
12662
  multiple: !1,
12635
- beforeUpload: Ce,
12636
- onChange: W
12663
+ show: !1,
12664
+ beforeUpload: _e,
12665
+ onChange: G
12637
12666
  }, {
12638
12667
  "upload-icon": Ya(() => O[4] || (O[4] = [
12639
12668
  x("div", { class: "p-2" }, "上传", -1)
@@ -12642,7 +12671,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-41db179
12642
12671
  }, 512)
12643
12672
  ]));
12644
12673
  }
12645
- }), q1 = /* @__PURE__ */ ft(Y1, [["__scopeId", "data-v-f0ec2cf1"]]), X1 = {
12674
+ }), q1 = /* @__PURE__ */ ft(Y1, [["__scopeId", "data-v-59e33596"]]), X1 = {
12646
12675
  install(e) {
12647
12676
  e.component("Designer", q1);
12648
12677
  }