gp-designer 1.0.25 → 1.0.26

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 Ke, ref as G, openBlock as O, createElementBlock as R, createElementVNode as x, renderSlot as jt, Fragment as zt, renderList as Pi, createCommentVNode as H, toDisplayString as Se, computed as gt, createBlock as At, Transition as qu, withCtx as Sa, normalizeClass as un, reactive as Vu, createApp as $u, h as cs, watch as nt, resolveComponent as Wu, resolveDynamicComponent as Gu, mergeProps as Xu, withModifiers as Be, createTextVNode as li, unref as fe, createVNode as ut, toRaw as rn, withDirectives as tt, vModelSelect as Qu, vModelText as mt, toRefs as ju, normalizeStyle as ls } from "vue";
1
+ import { defineComponent as Ke, ref as Q, openBlock as D, createElementBlock as M, createElementVNode as x, renderSlot as jt, Fragment as zt, renderList as Pi, createCommentVNode as H, toDisplayString as Se, computed as gt, createBlock as At, Transition as qu, withCtx as Sa, normalizeClass as un, reactive as Vu, createApp as $u, h as cs, watch as nt, resolveComponent as Wu, resolveDynamicComponent as Gu, mergeProps as Xu, withModifiers as Be, createTextVNode as li, unref as fe, createVNode as ut, toRaw as rn, withDirectives as tt, vModelSelect as Qu, vModelText as mt, toRefs as ju, normalizeStyle as ls } 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";
@@ -1315,7 +1315,7 @@ function ro(e) {
1315
1315
  function oo(e) {
1316
1316
  return e.replace(/[A-Z]/g, "-$&").toLowerCase();
1317
1317
  }
1318
- function ne(e, t) {
1318
+ function ue(e, t) {
1319
1319
  const a = e.length;
1320
1320
  for (let i = 0; i < a; i++)
1321
1321
  t(e[i], i);
@@ -1354,11 +1354,11 @@ function lo(e, t) {
1354
1354
  if (typeof t == "function") {
1355
1355
  if (typeof e != "string")
1356
1356
  throw new Error("Bad combination of arguments.");
1357
- return ne(this, (a, i) => {
1357
+ return ue(this, (a, i) => {
1358
1358
  U(a) && yt(a, e, t.call(a, i, a.attribs[e]));
1359
1359
  });
1360
1360
  }
1361
- return ne(this, (a) => {
1361
+ return ue(this, (a) => {
1362
1362
  if (U(a))
1363
1363
  if (typeof e == "object")
1364
1364
  for (const i of Object.keys(e)) {
@@ -1417,11 +1417,11 @@ function ho(e, t) {
1417
1417
  if (typeof t == "function") {
1418
1418
  if (typeof e == "object")
1419
1419
  throw new TypeError("Bad combination of arguments.");
1420
- return ne(this, (i, s) => {
1420
+ return ue(this, (i, s) => {
1421
1421
  U(i) && Ja(i, e, t.call(i, s, Es(i, e, this.options.xmlMode)), this.options.xmlMode);
1422
1422
  });
1423
1423
  }
1424
- return ne(this, (i) => {
1424
+ return ue(this, (i) => {
1425
1425
  if (U(i))
1426
1426
  if (typeof e == "object")
1427
1427
  for (const s of Object.keys(e)) {
@@ -1476,7 +1476,7 @@ function Eo(e, t) {
1476
1476
  if (!i || !U(i))
1477
1477
  return;
1478
1478
  const s = i;
1479
- return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? fo(s) : typeof e == "object" || t !== void 0 ? (ne(this, (u) => {
1479
+ return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? fo(s) : typeof e == "object" || t !== void 0 ? (ue(this, (u) => {
1480
1480
  U(u) && (typeof e == "object" ? Ts(u, e) : Ts(u, e, t));
1481
1481
  }), this) : mo(s, e);
1482
1482
  }
@@ -1514,7 +1514,7 @@ function La(e) {
1514
1514
  function po(e) {
1515
1515
  const t = La(e);
1516
1516
  for (const a of t)
1517
- ne(this, (i) => {
1517
+ ue(this, (i) => {
1518
1518
  U(i) && On(i, a);
1519
1519
  });
1520
1520
  return this;
@@ -1534,7 +1534,7 @@ function bo(e) {
1534
1534
  }
1535
1535
  function Dn(e) {
1536
1536
  if (typeof e == "function")
1537
- return ne(this, (i, s) => {
1537
+ return ue(this, (i, s) => {
1538
1538
  if (U(i)) {
1539
1539
  const u = i.attribs.class || "";
1540
1540
  Dn.call([i], e.call(i, s, u));
@@ -1562,11 +1562,11 @@ function Dn(e) {
1562
1562
  }
1563
1563
  function vn(e) {
1564
1564
  if (typeof e == "function")
1565
- return ne(this, (s, u) => {
1565
+ return ue(this, (s, u) => {
1566
1566
  U(s) && vn.call([s], e.call(s, u, s.attribs.class || ""));
1567
1567
  });
1568
1568
  const t = La(e), a = t.length, i = arguments.length === 0;
1569
- return ne(this, (s) => {
1569
+ return ue(this, (s) => {
1570
1570
  if (U(s))
1571
1571
  if (i)
1572
1572
  s.attribs.class = "";
@@ -1583,7 +1583,7 @@ function vn(e) {
1583
1583
  }
1584
1584
  function Ln(e, t) {
1585
1585
  if (typeof e == "function")
1586
- return ne(this, (r, o) => {
1586
+ return ue(this, (r, o) => {
1587
1587
  U(r) && Ln.call([r], e.call(r, o, r.attribs.class || "", t), t);
1588
1588
  });
1589
1589
  if (!e || typeof e != "string")
@@ -1614,10 +1614,10 @@ const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1614
1614
  toggleClass: Ln,
1615
1615
  val: To
1616
1616
  }, Symbol.toStringTag, { value: "Module" }));
1617
- var y;
1617
+ var R;
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
- })(y || (y = {}));
1620
+ })(R || (R = {}));
1621
1621
  var me;
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 ps = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, _o = /\\(
1640
1640
  ]);
1641
1641
  function Kt(e) {
1642
1642
  switch (e.type) {
1643
- case y.Adjacent:
1644
- case y.Child:
1645
- case y.Descendant:
1646
- case y.Parent:
1647
- case y.Sibling:
1648
- case y.ColumnCombinator:
1643
+ case R.Adjacent:
1644
+ case R.Child:
1645
+ case R.Descendant:
1646
+ case R.Parent:
1647
+ case R.Sibling:
1648
+ case R.ColumnCombinator:
1649
1649
  return !0;
1650
1650
  default:
1651
1651
  return !1;
@@ -1711,7 +1711,7 @@ function yn(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 === y.Descendant) {
1714
+ if (i.length > 0 && i[i.length - 1].type === R.Descendant) {
1715
1715
  i[i.length - 1].type = T;
1716
1716
  return;
1717
1717
  }
@@ -1719,7 +1719,7 @@ function yn(e, t, a) {
1719
1719
  }
1720
1720
  function f(T, _) {
1721
1721
  i.push({
1722
- type: y.Attribute,
1722
+ type: R.Attribute,
1723
1723
  name: T,
1724
1724
  action: _,
1725
1725
  value: s(1),
@@ -1728,7 +1728,7 @@ function yn(e, t, a) {
1728
1728
  });
1729
1729
  }
1730
1730
  function E() {
1731
- if (i.length && i[i.length - 1].type === y.Descendant && i.pop(), i.length === 0)
1731
+ if (i.length && i[i.length - 1].type === R.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 yn(e, t, a) {
1742
1742
  case 10:
1743
1743
  case 12:
1744
1744
  case 13: {
1745
- (i.length === 0 || i[0].type !== y.Descendant) && (c(), i.push({ type: y.Descendant })), u(1);
1745
+ (i.length === 0 || i[0].type !== R.Descendant) && (c(), i.push({ type: R.Descendant })), u(1);
1746
1746
  break;
1747
1747
  }
1748
1748
  case 62: {
1749
- d(y.Child), u(1);
1749
+ d(R.Child), u(1);
1750
1750
  break;
1751
1751
  }
1752
1752
  case 60: {
1753
- d(y.Parent), u(1);
1753
+ d(R.Parent), u(1);
1754
1754
  break;
1755
1755
  }
1756
1756
  case 126: {
1757
- d(y.Sibling), u(1);
1757
+ d(R.Sibling), u(1);
1758
1758
  break;
1759
1759
  }
1760
1760
  case 43: {
1761
- d(y.Adjacent), u(1);
1761
+ d(R.Adjacent), u(1);
1762
1762
  break;
1763
1763
  }
1764
1764
  case 46: {
@@ -1773,15 +1773,15 @@ function yn(e, t, a) {
1773
1773
  u(1);
1774
1774
  let _, C = null;
1775
1775
  t.charCodeAt(a) === 124 ? _ = s(1) : t.startsWith("*|", a) ? (C = "*", _ = s(2)) : (_ = s(0), t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 61 && (C = _, _ = s(1))), u(0);
1776
- let L = me.Exists;
1777
- const M = Ao.get(t.charCodeAt(a));
1778
- if (M) {
1779
- if (L = M, t.charCodeAt(a + 1) !== 61)
1776
+ let y = me.Exists;
1777
+ const L = Ao.get(t.charCodeAt(a));
1778
+ if (L) {
1779
+ if (y = L, t.charCodeAt(a + 1) !== 61)
1780
1780
  throw new Error("Expected `=`");
1781
1781
  u(2);
1782
- } else t.charCodeAt(a) === 61 && (L = me.Equals, u(1));
1783
- let w = "", Q = null;
1784
- if (L !== "exists") {
1782
+ } else t.charCodeAt(a) === 61 && (y = me.Equals, u(1));
1783
+ let w = "", X = null;
1784
+ if (y !== "exists") {
1785
1785
  if (ei(t.charCodeAt(a))) {
1786
1786
  const q = t.charCodeAt(a);
1787
1787
  let g = a + 1;
@@ -1797,27 +1797,27 @@ function yn(e, t, a) {
1797
1797
  w = Ht(t.slice(q, a));
1798
1798
  }
1799
1799
  u(0);
1800
- const ie = t.charCodeAt(a) | 32;
1801
- ie === 115 ? (Q = !1, u(1)) : ie === 105 && (Q = !0, u(1));
1800
+ const se = t.charCodeAt(a) | 32;
1801
+ se === 115 ? (X = !1, u(1)) : se === 105 && (X = !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 X = {
1807
- type: y.Attribute,
1806
+ const $ = {
1807
+ type: R.Attribute,
1808
1808
  name: _,
1809
- action: L,
1809
+ action: y,
1810
1810
  value: w,
1811
1811
  namespace: C,
1812
- ignoreCase: Q
1812
+ ignoreCase: X
1813
1813
  };
1814
- i.push(X);
1814
+ i.push($);
1815
1815
  break;
1816
1816
  }
1817
1817
  case 58: {
1818
1818
  if (t.charCodeAt(a + 1) === 58) {
1819
1819
  i.push({
1820
- type: y.PseudoElement,
1820
+ type: R.PseudoElement,
1821
1821
  name: s(2).toLowerCase(),
1822
1822
  data: t.charCodeAt(a) === 40 ? r() : null
1823
1823
  });
@@ -1834,12 +1834,12 @@ function yn(e, t, a) {
1834
1834
  a += 1;
1835
1835
  } else {
1836
1836
  if (C = r(), Co.has(_)) {
1837
- const L = C.charCodeAt(0);
1838
- L === C.charCodeAt(C.length - 1) && ei(L) && (C = C.slice(1, -1));
1837
+ const y = C.charCodeAt(0);
1838
+ y === C.charCodeAt(C.length - 1) && ei(y) && (C = C.slice(1, -1));
1839
1839
  }
1840
1840
  C = Ht(C);
1841
1841
  }
1842
- i.push({ type: y.Pseudo, name: _, data: C });
1842
+ i.push({ type: R.Pseudo, name: _, data: C });
1843
1843
  break;
1844
1844
  }
1845
1845
  case 44: {
@@ -1848,10 +1848,10 @@ function yn(e, t, a) {
1848
1848
  }
1849
1849
  default: {
1850
1850
  if (t.startsWith("/*", a)) {
1851
- const L = t.indexOf("*/", a + 2);
1852
- if (L < 0)
1851
+ const y = t.indexOf("*/", a + 2);
1852
+ if (y < 0)
1853
1853
  throw new Error("Comment was not terminated");
1854
- a = L + 2, i.length === 0 && u(0);
1854
+ a = y + 2, i.length === 0 && u(0);
1855
1855
  break;
1856
1856
  }
1857
1857
  let _ = null, C;
@@ -1859,14 +1859,14 @@ function yn(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(y.ColumnCombinator), u(2);
1862
+ d(R.ColumnCombinator), u(2);
1863
1863
  break;
1864
1864
  }
1865
1865
  } else if (ps.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 && (_ = C, t.charCodeAt(a + 1) === 42 ? (C = "*", a += 2) : C = s(1)), i.push(C === "*" ? { type: y.Universal, namespace: _ } : { type: y.Tag, name: C, namespace: _ });
1869
+ t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (_ = C, t.charCodeAt(a + 1) === 42 ? (C = "*", a += 2) : C = s(1)), i.push(C === "*" ? { type: R.Universal, namespace: _ } : { type: R.Tag, name: C, namespace: _ });
1870
1870
  }
1871
1871
  }
1872
1872
  }
@@ -1884,10 +1884,10 @@ var ya = {
1884
1884
  }
1885
1885
  };
1886
1886
  const V = /* @__PURE__ */ So(ya), Rn = /* @__PURE__ */ new Map([
1887
- [y.Universal, 50],
1888
- [y.Tag, 30],
1889
- [y.Attribute, 1],
1890
- [y.Pseudo, 0]
1887
+ [R.Universal, 50],
1888
+ [R.Tag, 30],
1889
+ [R.Attribute, 1],
1890
+ [R.Pseudo, 0]
1891
1891
  ]);
1892
1892
  function Xi(e) {
1893
1893
  return !Rn.has(e.type);
@@ -1914,7 +1914,7 @@ function Oo(e) {
1914
1914
  function Mn(e) {
1915
1915
  var t, a;
1916
1916
  let i = (t = Rn.get(e.type)) !== null && t !== void 0 ? t : -1;
1917
- return e.type === y.Attribute ? (i = (a = xo.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === me.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === y.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(Mn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1917
+ return e.type === R.Attribute ? (i = (a = xo.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === me.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(Mn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1918
1918
  }
1919
1919
  const Do = /[-[\]{}()*+?.,\\^$|#\s]/g;
1920
1920
  function gs(e) {
@@ -2366,18 +2366,18 @@ function si(e, t) {
2366
2366
  function Uo(e, t, a, i, s) {
2367
2367
  const { adapter: u, equals: r } = a;
2368
2368
  switch (t.type) {
2369
- case y.PseudoElement:
2369
+ case R.PseudoElement:
2370
2370
  throw new Error("Pseudo-elements are not supported by css-select");
2371
- case y.ColumnCombinator:
2371
+ case R.ColumnCombinator:
2372
2372
  throw new Error("Column combinators are not yet supported by css-select");
2373
- case y.Attribute: {
2373
+ case R.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()), Lo[t.action](e, t, a);
2377
2377
  }
2378
- case y.Pseudo:
2378
+ case R.Pseudo:
2379
2379
  return Bo(e, t, a, i, s);
2380
- case y.Tag: {
2380
+ case R.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 Uo(e, t, a, i, s) {
2385
2385
  return u.getName(d) === o && e(d);
2386
2386
  };
2387
2387
  }
2388
- case y.Descendant: {
2388
+ case R.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 Uo(e, t, a, i, s) {
2415
2415
  while (d = si(d, u));
2416
2416
  return !1;
2417
2417
  };
2418
- case y.Parent:
2418
+ case R.Parent:
2419
2419
  return function(c) {
2420
2420
  return u.getChildren(c).some((d) => u.isTag(d) && e(d));
2421
2421
  };
2422
- case y.Child:
2422
+ case R.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 y.Sibling:
2427
+ case R.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 Uo(e, t, a, i, s) {
2436
2436
  }
2437
2437
  return !1;
2438
2438
  };
2439
- case y.Adjacent:
2439
+ case R.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 Uo(e, t, a, i, s) {
2451
2451
  }
2452
2452
  return !!f && e(f);
2453
2453
  };
2454
- case y.Universal: {
2454
+ case R.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 Uo(e, t, a, i, s) {
2459
2459
  }
2460
2460
  }
2461
2461
  function wn(e) {
2462
- return e.type === y.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(wn)));
2462
+ return e.type === R.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(wn)));
2463
2463
  }
2464
- const Fo = { type: y.Descendant }, Ho = {
2464
+ const Fo = { type: R.Descendant }, Ho = {
2465
2465
  type: "_flexibleDescendant"
2466
2466
  }, Yo = {
2467
- type: y.Pseudo,
2467
+ type: R.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 === Pn || u && t.isTag(u);
2475
2475
  }));
2476
2476
  for (const s of e) {
2477
- if (!(s.length > 0 && Xi(s[0]) && s[0].type !== y.Descendant)) if (i && !s.some(wn))
2477
+ if (!(s.length > 0 && Xi(s[0]) && s[0].type !== R.Descendant)) if (i && !s.some(wn))
2478
2478
  s.unshift(Fo);
2479
2479
  else
2480
2480
  continue;
@@ -2493,7 +2493,7 @@ function Bn(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 !== y.Pseudo || d.name !== "scope" || (s && f.type === y.Descendant ? c[1] = Ho : (f.type === y.Adjacent || f.type === y.Sibling) && (r = !0));
2496
+ d.type !== R.Pseudo || d.name !== "scope" || (s && f.type === R.Descendant ? c[1] = Ho : (f.type === R.Adjacent || f.type === R.Sibling) && (r = !0));
2497
2497
  }
2498
2498
  return Vo(c, t, u);
2499
2499
  }).reduce($o, V.falseFunc);
@@ -2581,10 +2581,10 @@ function ji(e) {
2581
2581
  return [a, t];
2582
2582
  }
2583
2583
  const Zo = {
2584
- type: y.Universal,
2584
+ type: R.Universal,
2585
2585
  namespace: null
2586
2586
  }, Jo = {
2587
- type: y.Pseudo,
2587
+ type: R.Pseudo,
2588
2588
  name: "scope",
2589
2589
  data: null
2590
2590
  };
@@ -2678,8 +2678,8 @@ function Ma(e, t, a, i, s) {
2678
2678
  const _ = t.slice(u + 1), C = _.some(Kt);
2679
2679
  if (C) {
2680
2680
  if (Kt(_[0])) {
2681
- const { type: L } = _[0];
2682
- (L === y.Sibling || L === y.Adjacent) && (T = Fn(T, Va, !0)), _.unshift(Zo);
2681
+ const { type: y } = _[0];
2682
+ (y === R.Sibling || y === R.Adjacent) && (T = Fn(T, Va, !0)), _.unshift(Zo);
2683
2683
  }
2684
2684
  a = {
2685
2685
  ...a,
@@ -2689,7 +2689,7 @@ function Ma(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: (L) => T.includes(L)
2692
+ rootFunc: (y) => T.includes(y)
2693
2693
  };
2694
2694
  } else a.rootFunc && a.rootFunc !== ya.trueFunc && (a = { ...a, rootFunc: ya.trueFunc });
2695
2695
  return _.some(Ra) ? Ma(T, _, a, !1, s) : C ? (
@@ -2770,7 +2770,7 @@ function Zi(e, ...t) {
2770
2770
  let a = null;
2771
2771
  const i = zi((s, u) => {
2772
2772
  const r = [];
2773
- return ne(u, (o) => {
2773
+ return ue(u, (o) => {
2774
2774
  for (let c; (c = s(o)) && !(a != null && a(c, r.length)); o = c)
2775
2775
  r.push(c);
2776
2776
  }), r;
@@ -2799,7 +2799,7 @@ function oc(e) {
2799
2799
  xmlMode: this.options.xmlMode,
2800
2800
  root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
2801
2801
  }, s = typeof e == "string" ? (u) => Hn(u, e, i) : fa(e);
2802
- return ne(this, (u) => {
2802
+ return ue(this, (u) => {
2803
2803
  for (u && !dt(u) && !U(u) && (u = u.parent); u && U(u); ) {
2804
2804
  if (s(u, 0)) {
2805
2805
  a.includes(u) || a.push(u);
@@ -2989,7 +2989,7 @@ function wc(e, t) {
2989
2989
  function Gn(e) {
2990
2990
  return function(...t) {
2991
2991
  const a = this.length - 1;
2992
- return ne(this, (i, s) => {
2992
+ return ue(this, (i, s) => {
2993
2993
  if (!ge(i))
2994
2994
  return;
2995
2995
  const u = typeof t[0] == "function" ? t[0].call(i, s, this._render(i.children)) : t, r = this._makeDomArray(u, s < a);
@@ -3074,7 +3074,7 @@ function $c(e) {
3074
3074
  }
3075
3075
  function Wc(...e) {
3076
3076
  const t = this.length - 1;
3077
- return ne(this, (a, i) => {
3077
+ return ue(this, (a, i) => {
3078
3078
  if (!ge(a) || !a.parent)
3079
3079
  return;
3080
3080
  const s = a.parent.children, u = s.indexOf(a);
@@ -3098,7 +3098,7 @@ function Gc(e) {
3098
3098
  }
3099
3099
  function Xc(...e) {
3100
3100
  const t = this.length - 1;
3101
- return ne(this, (a, i) => {
3101
+ return ue(this, (a, i) => {
3102
3102
  if (!ge(a) || !a.parent)
3103
3103
  return;
3104
3104
  const s = a.parent.children, u = s.indexOf(a);
@@ -3112,7 +3112,7 @@ function Qc(e) {
3112
3112
  const t = this._make(e);
3113
3113
  this.remove();
3114
3114
  const a = [];
3115
- return ne(t, (i) => {
3115
+ return ue(t, (i) => {
3116
3116
  const s = this.clone().toArray(), { parent: u } = i;
3117
3117
  if (!u)
3118
3118
  return;
@@ -3122,12 +3122,12 @@ function Qc(e) {
3122
3122
  }
3123
3123
  function jc(e) {
3124
3124
  const t = e ? this.filter(e) : this;
3125
- return ne(t, (a) => {
3125
+ return ue(t, (a) => {
3126
3126
  St(a), a.prev = a.next = a.parent = null;
3127
3127
  }), this;
3128
3128
  }
3129
3129
  function zc(e) {
3130
- return ne(this, (t, a) => {
3130
+ return ue(this, (t, a) => {
3131
3131
  const { parent: i } = t;
3132
3132
  if (!i)
3133
3133
  return;
@@ -3138,7 +3138,7 @@ function zc(e) {
3138
3138
  });
3139
3139
  }
3140
3140
  function Kc() {
3141
- return ne(this, (e) => {
3141
+ return ue(this, (e) => {
3142
3142
  if (ge(e)) {
3143
3143
  for (const t of e.children)
3144
3144
  t.next = t.prev = t.parent = null;
@@ -3151,7 +3151,7 @@ function Zc(e) {
3151
3151
  const t = this[0];
3152
3152
  return !t || !ge(t) ? null : this._render(t.children);
3153
3153
  }
3154
- return ne(this, (t) => {
3154
+ return ue(this, (t) => {
3155
3155
  if (!ge(t))
3156
3156
  return;
3157
3157
  for (const i of t.children)
@@ -3164,7 +3164,7 @@ function Jc() {
3164
3164
  return this._render(this);
3165
3165
  }
3166
3166
  function el(e) {
3167
- return e === void 0 ? ua(this) : typeof e == "function" ? ne(this, (t, a) => this._make(t).text(e.call(t, a, ua([t])))) : ne(this, (t) => {
3167
+ return e === void 0 ? ua(this) : typeof e == "function" ? ue(this, (t, a) => this._make(t).text(e.call(t, a, ua([t])))) : ue(this, (t) => {
3168
3168
  if (!ge(t))
3169
3169
  return;
3170
3170
  for (const i of t.children)
@@ -3205,7 +3205,7 @@ const al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3205
3205
  function il(e, t) {
3206
3206
  if (e != null && t != null || // When `prop` is a "plain" object
3207
3207
  typeof e == "object" && !Array.isArray(e))
3208
- return ne(this, (a, i) => {
3208
+ return ue(this, (a, i) => {
3209
3209
  U(a) && Qn(a, e, t, i);
3210
3210
  });
3211
3211
  if (this.length !== 0)
@@ -3354,9 +3354,9 @@ function ml(e, t) {
3354
3354
  function d(f, E, T = o, _) {
3355
3355
  if (f && et(f))
3356
3356
  return f;
3357
- const C = mi(_, r), L = typeof T == "string" ? [e(T, C, !1, null)] : "length" in T ? T : [T], M = et(L) ? L : new c(L, null, C);
3358
- if (M._root = M, !f)
3359
- return new c(void 0, M, C);
3357
+ const C = mi(_, r), y = typeof T == "string" ? [e(T, C, !1, null)] : "length" in T ? T : [T], L = et(y) ? y : new c(y, null, C);
3358
+ if (L._root = L, !f)
3359
+ return new c(void 0, L, C);
3360
3360
  const w = typeof f == "string" && Ei(f) ? (
3361
3361
  // $(<html>)
3362
3362
  e(f, C, !1, null).children
@@ -3366,29 +3366,29 @@ function ml(e, t) {
3366
3366
  ) : Array.isArray(f) ? (
3367
3367
  // $([dom])
3368
3368
  f
3369
- ) : void 0, Q = new c(w, M, C);
3369
+ ) : void 0, X = new c(w, L, C);
3370
3370
  if (w)
3371
- return Q;
3371
+ return X;
3372
3372
  if (typeof f != "string")
3373
3373
  throw new TypeError("Unexpected type of selector");
3374
- let X = f;
3375
- const ie = E ? (
3374
+ let $ = f;
3375
+ const se = E ? (
3376
3376
  // If we don't have a context, maybe we have a root, from loading
3377
3377
  typeof E == "string" ? Ei(E) ? (
3378
3378
  // $('li', '<ul>...</ul>')
3379
- new c([e(E, C, !1, null)], M, C)
3379
+ new c([e(E, C, !1, null)], L, C)
3380
3380
  ) : (
3381
3381
  // $('li', 'ul')
3382
- (X = `${E} ${X}`, M)
3382
+ ($ = `${E} ${$}`, L)
3383
3383
  ) : et(E) ? (
3384
3384
  // $('li', $)
3385
3385
  E
3386
3386
  ) : (
3387
3387
  // $('li', node), $('li', [nodes])
3388
- new c(Array.isArray(E) ? E : [E], M, C)
3388
+ new c(Array.isArray(E) ? E : [E], L, C)
3389
3389
  )
3390
- ) : M;
3391
- return ie ? ie.find(X) : Q;
3390
+ ) : L;
3391
+ return se ? se.find($) : X;
3392
3392
  }
3393
3393
  return Object.assign(d, uo, {
3394
3394
  load: a,
@@ -3440,7 +3440,7 @@ const Tl = /* @__PURE__ */ new Set([
3440
3440
  1048575,
3441
3441
  1114110,
3442
3442
  1114111
3443
- ]), ee = "�";
3443
+ ]), te = "�";
3444
3444
  var l;
3445
3445
  (function(e) {
3446
3446
  e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
@@ -4407,7 +4407,7 @@ let Dl = class {
4407
4407
  break;
4408
4408
  }
4409
4409
  case l.NULL: {
4410
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4410
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4411
4411
  break;
4412
4412
  }
4413
4413
  case l.EOF: {
@@ -4427,7 +4427,7 @@ let Dl = class {
4427
4427
  break;
4428
4428
  }
4429
4429
  case l.NULL: {
4430
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4430
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4431
4431
  break;
4432
4432
  }
4433
4433
  case l.EOF: {
@@ -4447,7 +4447,7 @@ let Dl = class {
4447
4447
  break;
4448
4448
  }
4449
4449
  case l.NULL: {
4450
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4450
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4451
4451
  break;
4452
4452
  }
4453
4453
  case l.EOF: {
@@ -4463,7 +4463,7 @@ let Dl = class {
4463
4463
  _statePlaintext(t) {
4464
4464
  switch (t) {
4465
4465
  case l.NULL: {
4466
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4466
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4467
4467
  break;
4468
4468
  }
4469
4469
  case l.EOF: {
@@ -4541,7 +4541,7 @@ let Dl = class {
4541
4541
  break;
4542
4542
  }
4543
4543
  case l.NULL: {
4544
- this._err(b.unexpectedNullCharacter), a.tagName += ee;
4544
+ this._err(b.unexpectedNullCharacter), a.tagName += te;
4545
4545
  break;
4546
4546
  }
4547
4547
  case l.EOF: {
@@ -4650,7 +4650,7 @@ let Dl = class {
4650
4650
  break;
4651
4651
  }
4652
4652
  case l.NULL: {
4653
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4653
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4654
4654
  break;
4655
4655
  }
4656
4656
  case l.EOF: {
@@ -4674,7 +4674,7 @@ let Dl = class {
4674
4674
  break;
4675
4675
  }
4676
4676
  case l.NULL: {
4677
- this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_ESCAPED, this._emitChars(ee);
4677
+ this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_ESCAPED, this._emitChars(te);
4678
4678
  break;
4679
4679
  }
4680
4680
  case l.EOF: {
@@ -4702,7 +4702,7 @@ let Dl = class {
4702
4702
  break;
4703
4703
  }
4704
4704
  case l.NULL: {
4705
- this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_ESCAPED, this._emitChars(ee);
4705
+ this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_ESCAPED, this._emitChars(te);
4706
4706
  break;
4707
4707
  }
4708
4708
  case l.EOF: {
@@ -4751,7 +4751,7 @@ let Dl = class {
4751
4751
  break;
4752
4752
  }
4753
4753
  case l.NULL: {
4754
- this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4754
+ this._err(b.unexpectedNullCharacter), this._emitChars(te);
4755
4755
  break;
4756
4756
  }
4757
4757
  case l.EOF: {
@@ -4775,7 +4775,7 @@ let Dl = class {
4775
4775
  break;
4776
4776
  }
4777
4777
  case l.NULL: {
4778
- this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(ee);
4778
+ this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(te);
4779
4779
  break;
4780
4780
  }
4781
4781
  case l.EOF: {
@@ -4803,7 +4803,7 @@ let Dl = class {
4803
4803
  break;
4804
4804
  }
4805
4805
  case l.NULL: {
4806
- this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(ee);
4806
+ this._err(b.unexpectedNullCharacter), this.state = h.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(te);
4807
4807
  break;
4808
4808
  }
4809
4809
  case l.EOF: {
@@ -4877,7 +4877,7 @@ let Dl = class {
4877
4877
  break;
4878
4878
  }
4879
4879
  case l.NULL: {
4880
- this._err(b.unexpectedNullCharacter), this.currentAttr.name += ee;
4880
+ this._err(b.unexpectedNullCharacter), this.currentAttr.name += te;
4881
4881
  break;
4882
4882
  }
4883
4883
  default:
@@ -4951,7 +4951,7 @@ let Dl = class {
4951
4951
  break;
4952
4952
  }
4953
4953
  case l.NULL: {
4954
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
4954
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
4955
4955
  break;
4956
4956
  }
4957
4957
  case l.EOF: {
@@ -4975,7 +4975,7 @@ let Dl = class {
4975
4975
  break;
4976
4976
  }
4977
4977
  case l.NULL: {
4978
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
4978
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
4979
4979
  break;
4980
4980
  }
4981
4981
  case l.EOF: {
@@ -5006,7 +5006,7 @@ let Dl = class {
5006
5006
  break;
5007
5007
  }
5008
5008
  case l.NULL: {
5009
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
5009
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
5010
5010
  break;
5011
5011
  }
5012
5012
  case l.QUOTATION_MARK:
@@ -5083,7 +5083,7 @@ let Dl = class {
5083
5083
  break;
5084
5084
  }
5085
5085
  case l.NULL: {
5086
- this._err(b.unexpectedNullCharacter), a.data += ee;
5086
+ this._err(b.unexpectedNullCharacter), a.data += te;
5087
5087
  break;
5088
5088
  }
5089
5089
  default:
@@ -5148,7 +5148,7 @@ let Dl = class {
5148
5148
  break;
5149
5149
  }
5150
5150
  case l.NULL: {
5151
- this._err(b.unexpectedNullCharacter), a.data += ee;
5151
+ this._err(b.unexpectedNullCharacter), a.data += te;
5152
5152
  break;
5153
5153
  }
5154
5154
  case l.EOF: {
@@ -5292,7 +5292,7 @@ let Dl = class {
5292
5292
  case l.FORM_FEED:
5293
5293
  break;
5294
5294
  case l.NULL: {
5295
- this._err(b.unexpectedNullCharacter), this._createDoctypeToken(ee), this.state = h.DOCTYPE_NAME;
5295
+ this._err(b.unexpectedNullCharacter), this._createDoctypeToken(te), this.state = h.DOCTYPE_NAME;
5296
5296
  break;
5297
5297
  }
5298
5298
  case l.GREATER_THAN_SIGN: {
@@ -5328,7 +5328,7 @@ let Dl = class {
5328
5328
  break;
5329
5329
  }
5330
5330
  case l.NULL: {
5331
- this._err(b.unexpectedNullCharacter), a.name += ee;
5331
+ this._err(b.unexpectedNullCharacter), a.name += te;
5332
5332
  break;
5333
5333
  }
5334
5334
  case l.EOF: {
@@ -5433,7 +5433,7 @@ let Dl = class {
5433
5433
  break;
5434
5434
  }
5435
5435
  case l.NULL: {
5436
- this._err(b.unexpectedNullCharacter), a.publicId += ee;
5436
+ this._err(b.unexpectedNullCharacter), a.publicId += te;
5437
5437
  break;
5438
5438
  }
5439
5439
  case l.GREATER_THAN_SIGN: {
@@ -5458,7 +5458,7 @@ let Dl = class {
5458
5458
  break;
5459
5459
  }
5460
5460
  case l.NULL: {
5461
- this._err(b.unexpectedNullCharacter), a.publicId += ee;
5461
+ this._err(b.unexpectedNullCharacter), a.publicId += te;
5462
5462
  break;
5463
5463
  }
5464
5464
  case l.GREATER_THAN_SIGN: {
@@ -5607,7 +5607,7 @@ let Dl = class {
5607
5607
  break;
5608
5608
  }
5609
5609
  case l.NULL: {
5610
- this._err(b.unexpectedNullCharacter), a.systemId += ee;
5610
+ this._err(b.unexpectedNullCharacter), a.systemId += te;
5611
5611
  break;
5612
5612
  }
5613
5613
  case l.GREATER_THAN_SIGN: {
@@ -5632,7 +5632,7 @@ let Dl = class {
5632
5632
  break;
5633
5633
  }
5634
5634
  case l.NULL: {
5635
- this._err(b.unexpectedNullCharacter), a.systemId += ee;
5635
+ this._err(b.unexpectedNullCharacter), a.systemId += te;
5636
5636
  break;
5637
5637
  }
5638
5638
  case l.GREATER_THAN_SIGN: {
@@ -8732,7 +8732,7 @@ function Rd(e, t) {
8732
8732
  }
8733
8733
  }
8734
8734
  function Md(e, t) {
8735
- t.chars = ee, e._insertCharacters(t);
8735
+ t.chars = te, e._insertCharacters(t);
8736
8736
  }
8737
8737
  function Pd(e, t) {
8738
8738
  e._insertCharacters(t), e.framesetOk = !1;
@@ -9010,22 +9010,22 @@ function Zd(e) {
9010
9010
  }
9011
9011
  return a;
9012
9012
  }
9013
- var P;
9013
+ var k;
9014
9014
  (function(e) {
9015
9015
  e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
9016
- })(P || (P = {}));
9016
+ })(k || (k = {}));
9017
9017
  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
9021
  function Ze(e) {
9022
- return e === P.Space || e === P.NewLine || e === P.Tab || e === P.FormFeed || e === P.CarriageReturn;
9022
+ return e === k.Space || e === k.NewLine || e === k.Tab || e === k.FormFeed || e === k.CarriageReturn;
9023
9023
  }
9024
9024
  function _a(e) {
9025
- return e === P.Slash || e === P.Gt || Ze(e);
9025
+ return e === k.Slash || e === k.Gt || Ze(e);
9026
9026
  }
9027
9027
  function Jd(e) {
9028
- return e >= P.LowerA && e <= P.LowerZ || e >= P.UpperA && e <= P.UpperZ;
9028
+ return e >= k.LowerA && e <= k.LowerZ || e >= k.UpperA && e <= k.UpperZ;
9029
9029
  }
9030
9030
  var Xe;
9031
9031
  (function(e) {
@@ -9078,7 +9078,7 @@ class eh {
9078
9078
  this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
9079
9079
  }
9080
9080
  stateText(t) {
9081
- t === P.Lt || !this.decodeEntities && this.fastForwardTo(P.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = I.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === P.Amp && this.startEntity();
9081
+ t === k.Lt || !this.decodeEntities && this.fastForwardTo(k.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = I.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === k.Amp && this.startEntity();
9082
9082
  }
9083
9083
  stateSpecialStartSequence(t) {
9084
9084
  const a = this.sequenceIndex === this.currentSequence.length;
@@ -9099,7 +9099,7 @@ class eh {
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 === P.Gt || Ze(t)) {
9102
+ if (t === k.Gt || Ze(t)) {
9103
9103
  const a = this.index - this.currentSequence.length;
9104
9104
  if (this.sectionStart < a) {
9105
9105
  const i = this.index;
@@ -9110,7 +9110,7 @@ class eh {
9110
9110
  }
9111
9111
  this.sequenceIndex = 0;
9112
9112
  }
9113
- (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === _e.TitleEnd ? this.decodeEntities && t === P.Amp && this.startEntity() : this.fastForwardTo(P.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === P.Lt);
9113
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === _e.TitleEnd ? this.decodeEntities && t === k.Amp && this.startEntity() : this.fastForwardTo(k.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === k.Lt);
9114
9114
  }
9115
9115
  stateCDATASequence(t) {
9116
9116
  t === _e.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === _e.Cdata.length && (this.state = I.InCommentLike, this.currentSequence = _e.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = I.InDeclaration, this.stateInDeclaration(t));
@@ -9151,68 +9151,68 @@ class eh {
9151
9151
  this.isSpecial = !0, this.currentSequence = t, this.sequenceIndex = a, this.state = I.SpecialStartSequence;
9152
9152
  }
9153
9153
  stateBeforeTagName(t) {
9154
- if (t === P.ExclamationMark)
9154
+ if (t === k.ExclamationMark)
9155
9155
  this.state = I.BeforeDeclaration, this.sectionStart = this.index + 1;
9156
- else if (t === P.Questionmark)
9156
+ else if (t === k.Questionmark)
9157
9157
  this.state = I.InProcessingInstruction, this.sectionStart = this.index + 1;
9158
9158
  else if (this.isTagStartChar(t)) {
9159
9159
  const a = t | 32;
9160
9160
  this.sectionStart = this.index, this.xmlMode ? this.state = I.InTagName : a === _e.ScriptEnd[2] ? this.state = I.BeforeSpecialS : a === _e.TitleEnd[2] ? this.state = I.BeforeSpecialT : this.state = I.InTagName;
9161
- } else t === P.Slash ? this.state = I.BeforeClosingTagName : (this.state = I.Text, this.stateText(t));
9161
+ } else t === k.Slash ? this.state = I.BeforeClosingTagName : (this.state = I.Text, this.stateText(t));
9162
9162
  }
9163
9163
  stateInTagName(t) {
9164
9164
  _a(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 === P.Gt ? this.state = I.Text : (this.state = this.isTagStartChar(t) ? I.InClosingTagName : I.InSpecialComment, this.sectionStart = this.index));
9167
+ Ze(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 === P.Gt || Ze(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.AfterClosingTagName, this.stateAfterClosingTagName(t));
9170
+ (t === k.Gt || Ze(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
- (t === P.Gt || this.fastForwardTo(P.Gt)) && (this.state = I.Text, this.sectionStart = this.index + 1);
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 === P.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 === P.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 : Ze(t) || (this.state = I.InAttributeName, this.sectionStart = this.index);
9177
9177
  }
9178
9178
  stateInSelfClosingTag(t) {
9179
- t === P.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) : Ze(t) || (this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
9180
9180
  }
9181
9181
  stateInAttributeName(t) {
9182
- (t === P.Eq || _a(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = I.AfterAttributeName, this.stateAfterAttributeName(t));
9182
+ (t === k.Eq || _a(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 === P.Eq ? this.state = I.BeforeAttributeValue : t === P.Slash || t === P.Gt ? (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : Ze(t) || (this.cbs.onattribend(Xe.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)) : Ze(t) || (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.state = I.InAttributeName, this.sectionStart = this.index);
9186
9186
  }
9187
9187
  stateBeforeAttributeValue(t) {
9188
- t === P.DoubleQuote ? (this.state = I.InAttributeValueDq, this.sectionStart = this.index + 1) : t === P.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) : Ze(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 === P.DoubleQuote ? Xe.Double : Xe.Single, this.index + 1), this.state = I.BeforeAttributeName) : this.decodeEntities && t === P.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
- this.handleInAttributeValue(t, P.DoubleQuote);
9194
+ this.handleInAttributeValue(t, k.DoubleQuote);
9195
9195
  }
9196
9196
  stateInAttributeValueSingleQuotes(t) {
9197
- this.handleInAttributeValue(t, P.SingleQuote);
9197
+ this.handleInAttributeValue(t, k.SingleQuote);
9198
9198
  }
9199
9199
  stateInAttributeValueNoQuotes(t) {
9200
- Ze(t) || t === P.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 === P.Amp && this.startEntity();
9200
+ Ze(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
- t === P.OpeningSquareBracket ? (this.state = I.CDATASequence, this.sequenceIndex = 0) : this.state = t === P.Dash ? I.BeforeComment : I.InDeclaration;
9203
+ t === k.OpeningSquareBracket ? (this.state = I.CDATASequence, this.sequenceIndex = 0) : this.state = t === k.Dash ? I.BeforeComment : I.InDeclaration;
9204
9204
  }
9205
9205
  stateInDeclaration(t) {
9206
- (t === P.Gt || this.fastForwardTo(P.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = I.Text, this.sectionStart = this.index + 1);
9206
+ (t === k.Gt || this.fastForwardTo(k.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = I.Text, this.sectionStart = this.index + 1);
9207
9207
  }
9208
9208
  stateInProcessingInstruction(t) {
9209
- (t === P.Gt || this.fastForwardTo(P.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = I.Text, this.sectionStart = this.index + 1);
9209
+ (t === k.Gt || this.fastForwardTo(k.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = I.Text, this.sectionStart = this.index + 1);
9210
9210
  }
9211
9211
  stateBeforeComment(t) {
9212
- t === P.Dash ? (this.state = I.InCommentLike, this.currentSequence = _e.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = I.InDeclaration;
9212
+ t === k.Dash ? (this.state = I.InCommentLike, this.currentSequence = _e.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = I.InDeclaration;
9213
9213
  }
9214
9214
  stateInSpecialComment(t) {
9215
- (t === P.Gt || this.fastForwardTo(P.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = I.Text, this.sectionStart = this.index + 1);
9215
+ (t === k.Gt || this.fastForwardTo(k.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = I.Text, this.sectionStart = this.index + 1);
9216
9216
  }
9217
9217
  stateBeforeSpecialS(t) {
9218
9218
  const a = t | 32;
@@ -9376,19 +9376,19 @@ const Ot = /* @__PURE__ */ new Set([
9376
9376
  "button",
9377
9377
  "datalist",
9378
9378
  "textarea"
9379
- ]), Z = /* @__PURE__ */ new Set(["p"]), Bs = /* @__PURE__ */ new Set(["thead", "tbody"]), Us = /* @__PURE__ */ new Set(["dd", "dt"]), Fs = /* @__PURE__ */ new Set(["rt", "rp"]), th = /* @__PURE__ */ new Map([
9379
+ ]), J = /* @__PURE__ */ new Set(["p"]), Bs = /* @__PURE__ */ new Set(["thead", "tbody"]), Us = /* @__PURE__ */ new Set(["dd", "dt"]), Fs = /* @__PURE__ */ new Set(["rt", "rp"]), th = /* @__PURE__ */ new Map([
9380
9380
  ["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
9381
9381
  ["th", /* @__PURE__ */ new Set(["th"])],
9382
9382
  ["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
9383
9383
  ["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
9384
9384
  ["li", /* @__PURE__ */ new Set(["li"])],
9385
- ["p", Z],
9386
- ["h1", Z],
9387
- ["h2", Z],
9388
- ["h3", Z],
9389
- ["h4", Z],
9390
- ["h5", Z],
9391
- ["h6", Z],
9385
+ ["p", J],
9386
+ ["h1", J],
9387
+ ["h2", J],
9388
+ ["h3", J],
9389
+ ["h4", J],
9390
+ ["h5", J],
9391
+ ["h6", J],
9392
9392
  ["select", Ot],
9393
9393
  ["input", Ot],
9394
9394
  ["output", Ot],
@@ -9399,27 +9399,27 @@ const Ot = /* @__PURE__ */ new Set([
9399
9399
  ["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
9400
9400
  ["dd", Us],
9401
9401
  ["dt", Us],
9402
- ["address", Z],
9403
- ["article", Z],
9404
- ["aside", Z],
9405
- ["blockquote", Z],
9406
- ["details", Z],
9407
- ["div", Z],
9408
- ["dl", Z],
9409
- ["fieldset", Z],
9410
- ["figcaption", Z],
9411
- ["figure", Z],
9412
- ["footer", Z],
9413
- ["form", Z],
9414
- ["header", Z],
9415
- ["hr", Z],
9416
- ["main", Z],
9417
- ["nav", Z],
9418
- ["ol", Z],
9419
- ["pre", Z],
9420
- ["section", Z],
9421
- ["table", Z],
9422
- ["ul", Z],
9402
+ ["address", J],
9403
+ ["article", J],
9404
+ ["aside", J],
9405
+ ["blockquote", J],
9406
+ ["details", J],
9407
+ ["div", J],
9408
+ ["dl", J],
9409
+ ["fieldset", J],
9410
+ ["figcaption", J],
9411
+ ["figure", J],
9412
+ ["footer", J],
9413
+ ["form", J],
9414
+ ["header", J],
9415
+ ["hr", J],
9416
+ ["main", J],
9417
+ ["nav", J],
9418
+ ["ol", J],
9419
+ ["pre", J],
9420
+ ["section", J],
9421
+ ["table", J],
9422
+ ["ul", J],
9423
9423
  ["rt", Fs],
9424
9424
  ["rp", Fs],
9425
9425
  ["tbody", Bs],
@@ -9715,7 +9715,7 @@ const rh = Ke({
9715
9715
  }
9716
9716
  },
9717
9717
  setup(e, { emit: t }) {
9718
- const a = G(null), i = G([]);
9718
+ const a = Q(null), i = Q([]);
9719
9719
  return {
9720
9720
  inputRef: a,
9721
9721
  fileList: i,
@@ -9732,13 +9732,19 @@ const rh = Ke({
9732
9732
  const _ = d[T];
9733
9733
  if (e.beforeUpload && await e.beforeUpload(_) === !1)
9734
9734
  continue;
9735
- const C = `${Date.now()}-${_.name}`, L = URL.createObjectURL(_);
9735
+ const C = `${Date.now()}-${_.name}`, y = URL.createObjectURL(_), L = document.createElement("img");
9736
+ L.src = y, document.body.appendChild(L), await new Promise(($) => {
9737
+ L.onload = $;
9738
+ });
9739
+ const w = L.width, X = L.height;
9736
9740
  f.push({
9737
9741
  uid: C,
9738
9742
  name: _.name,
9739
9743
  status: "uploading",
9740
- thumbUrl: L,
9741
- file: _
9744
+ thumbUrl: y,
9745
+ file: _,
9746
+ width: w,
9747
+ height: X
9742
9748
  });
9743
9749
  }
9744
9750
  e.maxCount && i.value.length + f.length > e.maxCount && f.splice(e.maxCount - i.value.length), e.multiple ? i.value = [...i.value, ...f] : i.value = f.slice(0, 1), (E = e.onChange) == null || E.call(e, i.value), t("update:fileList", i.value), a.value && (a.value.value = "");
@@ -9759,7 +9765,7 @@ const rh = Ke({
9759
9765
  class: "file-list mt-4"
9760
9766
  }, dh = { class: "flex items-center space-x-4" }, hh = ["src"], fh = ["onClick"];
9761
9767
  function mh(e, t, a, i, s, u) {
9762
- return O(), R("div", oh, [
9768
+ return D(), M("div", oh, [
9763
9769
  x("div", {
9764
9770
  class: "",
9765
9771
  onClick: t[0] || (t[0] = (...r) => e.triggerInput && e.triggerInput(...r))
@@ -9778,13 +9784,13 @@ function mh(e, t, a, i, s, u) {
9778
9784
  multiple: e.multiple,
9779
9785
  onChange: t[1] || (t[1] = (...r) => e.handleChange && e.handleChange(...r))
9780
9786
  }, null, 40, ch),
9781
- e.showList ? (O(), R("div", lh, [
9782
- (O(!0), R(zt, null, Pi(e.fileList, (r) => (O(), R("div", {
9787
+ e.showList ? (D(), M("div", lh, [
9788
+ (D(!0), M(zt, null, Pi(e.fileList, (r) => (D(), M("div", {
9783
9789
  key: r.uid,
9784
9790
  class: "file-item flex items-center justify-between p-2 border rounded mb-2"
9785
9791
  }, [
9786
9792
  x("div", dh, [
9787
- r.thumbUrl ? (O(), R("img", {
9793
+ r.thumbUrl ? (D(), M("img", {
9788
9794
  key: 0,
9789
9795
  src: r.thumbUrl,
9790
9796
  alt: "preview",
@@ -9802,7 +9808,7 @@ function mh(e, t, a, i, s, u) {
9802
9808
  ])) : H("", !0)
9803
9809
  ]);
9804
9810
  }
9805
- const Eh = /* @__PURE__ */ ft(rh, [["render", mh], ["__scopeId", "data-v-6bc2a0c5"]]), Th = Ke({
9811
+ const Eh = /* @__PURE__ */ ft(rh, [["render", mh], ["__scopeId", "data-v-fa0e69af"]]), Th = Ke({
9806
9812
  name: "GpMessage",
9807
9813
  props: {
9808
9814
  message: {
@@ -9831,7 +9837,7 @@ const Eh = /* @__PURE__ */ ft(rh, [["render", mh], ["__scopeId", "data-v-6bc2a0c
9831
9837
  }
9832
9838
  },
9833
9839
  setup(e) {
9834
- const t = G(!1), a = gt(
9840
+ const t = Q(!1), a = gt(
9835
9841
  () => ({
9836
9842
  success: "bg-green-100 text-green-800",
9837
9843
  error: "bg-red-100 text-red-800",
@@ -9869,18 +9875,18 @@ const Eh = /* @__PURE__ */ ft(rh, [["render", mh], ["__scopeId", "data-v-6bc2a0c
9869
9875
  class: "text-yellow-500"
9870
9876
  };
9871
9877
  function Ch(e, t, a, i, s, u) {
9872
- return O(), At(qu, { name: "fade" }, {
9878
+ return D(), At(qu, { name: "fade" }, {
9873
9879
  default: Sa(() => [
9874
- e.visible ? (O(), R("div", ph, [
9880
+ e.visible ? (D(), M("div", ph, [
9875
9881
  x("div", {
9876
9882
  class: un([e.typeClass, "message-content"])
9877
9883
  }, [
9878
- e.icon ? (O(), R("span", bh, [
9884
+ e.icon ? (D(), M("span", bh, [
9879
9885
  jt(e.$slots, "icon", {}, () => [
9880
- e.type === "success" ? (O(), R("span", gh, "✔")) : H("", !0),
9881
- e.type === "error" ? (O(), R("span", _h, "✖")) : H("", !0),
9882
- e.type === "info" ? (O(), R("span", Ah, "ℹ")) : H("", !0),
9883
- e.type === "warning" ? (O(), R("span", Nh, "⚠")) : H("", !0)
9886
+ e.type === "success" ? (D(), M("span", gh, "✔")) : H("", !0),
9887
+ e.type === "error" ? (D(), M("span", _h, "✖")) : H("", !0),
9888
+ e.type === "info" ? (D(), M("span", Ah, "ℹ")) : H("", !0),
9889
+ e.type === "warning" ? (D(), M("span", Nh, "⚠")) : H("", !0)
9884
9890
  ], !0)
9885
9891
  ])) : H("", !0),
9886
9892
  x("span", null, Se(e.message), 1),
@@ -9940,7 +9946,7 @@ const Sh = () => {
9940
9946
  t !== -1 && Rt.splice(t, 1);
9941
9947
  };
9942
9948
  let Oh = 0;
9943
- const J = (e) => {
9949
+ const Z = (e) => {
9944
9950
  xh();
9945
9951
  const t = Oh++;
9946
9952
  Rt.push({
@@ -9950,32 +9956,32 @@ const J = (e) => {
9950
9956
  Su(t);
9951
9957
  }, e.duration || 3e3);
9952
9958
  };
9953
- J.success = (e, t = 3e3, a = !0) => {
9954
- J(typeof e == "string" ? {
9959
+ Z.success = (e, t = 3e3, a = !0) => {
9960
+ Z(typeof e == "string" ? {
9955
9961
  message: e,
9956
9962
  type: "success",
9957
9963
  duration: t,
9958
9964
  icon: a
9959
9965
  } : { ...e, type: "success" });
9960
9966
  };
9961
- J.error = (e, t = 3e3, a = !0) => {
9962
- J(typeof e == "string" ? {
9967
+ Z.error = (e, t = 3e3, a = !0) => {
9968
+ Z(typeof e == "string" ? {
9963
9969
  message: e,
9964
9970
  type: "error",
9965
9971
  duration: t,
9966
9972
  icon: a
9967
9973
  } : { ...e, type: "error" });
9968
9974
  };
9969
- J.info = (e, t = 3e3, a = !0) => {
9970
- J(typeof e == "string" ? {
9975
+ Z.info = (e, t = 3e3, a = !0) => {
9976
+ Z(typeof e == "string" ? {
9971
9977
  message: e,
9972
9978
  type: "info",
9973
9979
  duration: t,
9974
9980
  icon: a
9975
9981
  } : { ...e, type: "info" });
9976
9982
  };
9977
- J.warning = (e, t = 3e3, a = !0) => {
9978
- J(typeof e == "string" ? {
9983
+ Z.warning = (e, t = 3e3, a = !0) => {
9984
+ Z(typeof e == "string" ? {
9979
9985
  message: e,
9980
9986
  type: "warning",
9981
9987
  duration: t,
@@ -10056,7 +10062,7 @@ const Dh = {
10056
10062
  "upload"
10057
10063
  ],
10058
10064
  setup(e, { emit: t }) {
10059
- const a = e, i = t, s = gt(() => a.selectedElement === a.element), u = gt(() => a.hoveredElement === a.element), r = G(!1), o = G(!1), c = G(""), d = gt(() => a.element.rule.minText || 0), f = gt(() => a.element.rule.maxText || 1 / 0);
10065
+ const a = e, i = t, s = gt(() => a.selectedElement === a.element), u = gt(() => a.hoveredElement === a.element), r = Q(!1), o = Q(!1), c = Q(""), d = gt(() => a.element.rule.minText || 0), f = gt(() => a.element.rule.maxText || 1 / 0);
10060
10066
  nt(
10061
10067
  () => a.r,
10062
10068
  () => {
@@ -10064,100 +10070,112 @@ const Dh = {
10064
10070
  },
10065
10071
  { immediate: !0 }
10066
10072
  );
10067
- function E(k) {
10068
- k.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? k.type === z.Text && i("selectElement", k) : i("selectElement", k), !k.rule.isReadOnly && k.type === z.Text && (r.value = !0));
10073
+ function E(P) {
10074
+ P.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? P.type === z.Text && i("selectElement", P) : i("selectElement", P), !P.rule.isReadOnly && P.type === z.Text && (r.value = !0));
10069
10075
  }
10070
- function T(k) {
10071
- i("selectElement", k);
10076
+ function T(P) {
10077
+ i("selectElement", P);
10072
10078
  }
10073
- function _(k, v) {
10074
- i("hoverElement", k, v);
10079
+ function _(P, O) {
10080
+ i("hoverElement", P, O);
10075
10081
  }
10076
- function C(k) {
10077
- i("hoverElement", k);
10082
+ function C(P) {
10083
+ i("hoverElement", P);
10078
10084
  }
10079
- function L(k) {
10080
- k.currentTarget.contains(k.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
10085
+ function y(P) {
10086
+ P.currentTarget.contains(P.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
10081
10087
  }
10082
- function M() {
10088
+ function L() {
10083
10089
  r.value = !1, i("contentUpdated", w());
10084
10090
  }
10085
10091
  function w() {
10086
- function k(v) {
10087
- const re = Object.entries(v.attrs || {}).map(([D, B]) => `${D}="${B}"`).join(" "), Ee = `<${v.tag}${re ? " " + re : ""}>`, Me = `</${v.tag}>`, N = (v.children || []).map((D) => k(D)).join("");
10088
- return `${Ee}${v.editText || v.text || ""}${N}${Me}`;
10092
+ function P(O) {
10093
+ const ee = Object.entries(O.attrs || {}).map(([v, B]) => `${v}="${B}"`).join(" "), Ee = `<${O.tag}${ee ? " " + ee : ""}>`, Me = `</${O.tag}>`, N = (O.children || []).map((v) => P(v)).join("");
10094
+ return `${Ee}${O.editText || O.text || ""}${N}${Me}`;
10089
10095
  }
10090
- return k(a.element);
10096
+ return P(a.element);
10091
10097
  }
10092
- function Q(k) {
10098
+ function X(P) {
10093
10099
  var Me;
10094
- k.stopPropagation();
10095
- const v = k.target, re = ((Me = v.firstChild) == null ? void 0 : Me.nodeType) === Node.TEXT_NODE && v.firstChild.nodeValue || "";
10096
- if (re.length < d.value) {
10100
+ P.stopPropagation();
10101
+ const O = P.target, ee = ((Me = O.firstChild) == null ? void 0 : Me.nodeType) === Node.TEXT_NODE && O.firstChild.nodeValue || "";
10102
+ if (ee.length < d.value) {
10097
10103
  o.value = !0, c.value = `最少输入 ${d.value} 个字符`;
10098
10104
  return;
10099
- } else if (re.length > f.value) {
10105
+ } else if (ee.length > f.value) {
10100
10106
  o.value = !0, c.value = `最多输入 ${f.value} 个字符`;
10101
10107
  return;
10102
10108
  } else
10103
10109
  o.value = !1, c.value = "";
10104
- i("updateText", { element: a.element, newText: re }), i("contentUpdated", w());
10110
+ i("updateText", { element: a.element, newText: ee }), i("contentUpdated", w());
10105
10111
  const Ee = rn(a.element);
10106
- Ee.editText = re;
10112
+ Ee.editText = ee;
10107
10113
  }
10108
- function X(k) {
10109
- i("updateText", k), i("contentUpdated", w());
10114
+ function $(P) {
10115
+ i("updateText", P), i("contentUpdated", w());
10110
10116
  }
10111
- function ie() {
10112
- const k = { ...a.element };
10113
- i("blockAction", { action: "add", element: a.element, newBlock: k });
10117
+ function se() {
10118
+ const P = { ...a.element };
10119
+ i("blockAction", { action: "add", element: a.element, newBlock: P });
10114
10120
  }
10115
10121
  function q() {
10116
10122
  g(a.element), i("blockAction", { action: "moveUp", element: a.element });
10117
10123
  }
10118
- function g(k) {
10119
- k.children && k.children.length > 0 && k.children.forEach((v) => {
10120
- v.type == z.Text && (v.text !== v.editText && (v.text = v.editText), g(v));
10124
+ function g(P) {
10125
+ P.children && P.children.length > 0 && P.children.forEach((O) => {
10126
+ O.type == z.Text && (O.text !== O.editText && (O.text = O.editText), g(O));
10121
10127
  });
10122
10128
  }
10123
10129
  function F() {
10124
10130
  g(a.element), i("blockAction", { action: "moveDown", element: a.element });
10125
10131
  }
10126
- function $() {
10132
+ function W() {
10127
10133
  i("blockAction", { action: "delete", element: a.element });
10128
10134
  }
10129
- function ue(k) {
10130
- i("blockAction", k), i("contentUpdated", w());
10135
+ function re(P) {
10136
+ i("blockAction", P), i("contentUpdated", w());
10131
10137
  }
10132
- function Ae(k) {
10133
- Ce.value.openModal(k);
10138
+ function Ae(P) {
10139
+ Ce.value.openModal(P);
10134
10140
  }
10135
- function He(k, v) {
10136
- i("addIcon", k, v), i("contentUpdated", w());
10141
+ function He(P, O) {
10142
+ i("addIcon", P, O), i("contentUpdated", w());
10137
10143
  }
10138
- const Ye = G(a.cropper), Ce = G(a.icon), oe = G({});
10139
- function ce(k, v) {
10140
- console.log("files", k, v);
10141
- const re = k[0];
10142
- if (v.rule.minImageWidth && v.rule.maxImageHeight ? (oe.value.width = v.rule.minImageWidth, oe.value.height = v.rule.maxImageHeight, oe.value.aspectRatio = v.rule.minImageWidth / v.rule.maxImageHeight) : oe.value = {}, re)
10143
- if (v.rule.crop) {
10144
- const Ee = re.thumbUrl;
10144
+ const Ye = Q(a.cropper), Ce = Q(a.icon), oe = Q({});
10145
+ function ce(P, O) {
10146
+ if (!P || P.length === 0)
10147
+ return;
10148
+ console.log("files", P, O);
10149
+ const ee = P[0];
10150
+ if (O.rule && (O.rule.minImageWidth || O.rule.maxImageHeight)) {
10151
+ if (O.rule.minImageWidth && ee.width < O.rule.minImageWidth) {
10152
+ Z.error(`图片宽度不能小于 ${O.rule.minImageWidth}px`);
10153
+ return;
10154
+ }
10155
+ if (O.rule.maxImageHeight && ee.height < O.rule.maxImageHeight) {
10156
+ Z.error(`图片高度不能小于 ${O.rule.maxImageHeight}px`);
10157
+ return;
10158
+ }
10159
+ }
10160
+ if (O.rule.minImageWidth && O.rule.maxImageHeight ? (oe.value.width = O.rule.minImageWidth, oe.value.height = O.rule.maxImageHeight, oe.value.aspectRatio = O.rule.minImageWidth / O.rule.maxImageHeight) : oe.value = {}, ee)
10161
+ if (O.rule.crop) {
10162
+ const Ee = ee.thumbUrl;
10145
10163
  Ye.value.handleOpenCropper(
10146
10164
  oe.value,
10147
10165
  Ee,
10148
- re.name,
10149
- v
10166
+ ee.name,
10167
+ O
10150
10168
  );
10151
10169
  } else
10152
- a.uploadByFile ? a.uploadByFile(re.file).then((Ee) => {
10153
- Ee.success && (v.attrs.src = Ee.file.url, i("contentUpdated", w()));
10154
- }) : (v.attrs.src = re.thumbUrl, i("contentUpdated", w()));
10155
- }
10156
- const xe = (k) => k.type.startsWith("image/") ? !0 : (J.error("只能上传图片文件"), !1);
10157
- return (k, v) => {
10158
- const re = Wu("ElementRenderer", !0);
10159
- return O(), R(zt, null, [
10160
- (O(), At(Gu(a.element.tag), Xu({
10170
+ a.uploadByFile ? a.uploadByFile(ee.file).then((Ee) => {
10171
+ Ee.success && (O.attrs.src = Ee.file.url, i("contentUpdated", w()));
10172
+ }) : (O.attrs.src = ee.thumbUrl, i("contentUpdated", w()));
10173
+ }
10174
+ const xe = (P) => P.type.startsWith("image/") ? !0 : (Z.error("只能上传图片文件"), !1);
10175
+ return (P, O) => {
10176
+ const ee = Wu("ElementRenderer", !0);
10177
+ return D(), M(zt, null, [
10178
+ (D(), At(Gu(a.element.tag), Xu({
10161
10179
  class: [
10162
10180
  "relative",
10163
10181
  // 注意:这里使用了 relative 布局,可能会影响到样式
@@ -10174,16 +10192,16 @@ const Dh = {
10174
10192
  ]
10175
10193
  }, a.element.attrs, {
10176
10194
  contenteditable: r.value,
10177
- onClick: v[2] || (v[2] = Be(() => E(a.element), ["stop"])),
10178
- onMouseenter: v[3] || (v[3] = () => C(a.element)),
10179
- onMouseleave: L,
10180
- onBlur: M,
10181
- onInput: Q
10195
+ onClick: O[2] || (O[2] = Be(() => E(a.element), ["stop"])),
10196
+ onMouseenter: O[3] || (O[3] = () => C(a.element)),
10197
+ onMouseleave: y,
10198
+ onBlur: L,
10199
+ onInput: X
10182
10200
  }), {
10183
10201
  default: Sa(() => [
10184
10202
  li(Se(a.element.text), 1),
10185
- a.element.children && a.element.children.length ? (O(), R(zt, { key: 0 }, [
10186
- (O(!0), R(zt, null, Pi(a.element.children, (Ee, Me) => (O(), At(re, {
10203
+ a.element.children && a.element.children.length ? (D(), M(zt, { key: 0 }, [
10204
+ (D(!0), M(zt, null, Pi(a.element.children, (Ee, Me) => (D(), At(ee, {
10187
10205
  key: Me,
10188
10206
  r: e.r,
10189
10207
  mode: e.mode,
@@ -10196,21 +10214,21 @@ const Dh = {
10196
10214
  "upload-by-file": e.uploadByFile,
10197
10215
  onSelectElement: T,
10198
10216
  onHoverElement: _,
10199
- onUpdateText: X,
10200
- onBlockAction: ue,
10217
+ onUpdateText: $,
10218
+ onBlockAction: re,
10201
10219
  onAddIcon: He
10202
10220
  }, null, 8, ["r", "mode", "icons", "element", "selectedElement", "hoveredElement", "cropper", "icon", "upload-by-file"]))), 128)),
10203
- a.element.type === fe(z).Block ? (O(), R("div", {
10221
+ a.element.type === fe(z).Block ? (D(), M("div", {
10204
10222
  key: 0,
10205
10223
  "date-action": "1",
10206
10224
  contenteditable: "false",
10207
- onClick: v[0] || (v[0] = Be(() => {
10225
+ onClick: O[0] || (O[0] = Be(() => {
10208
10226
  }, ["stop"])),
10209
10227
  class: "z-10 flex space-x-1 flex-none flex-nowrap overflow-visible absolute top-2"
10210
10228
  }, [
10211
10229
  x("button", {
10212
10230
  class: "flex-none px-2 py-1 bg-blue-500 text-white rounded",
10213
- onClick: Be(ie, ["stop"])
10231
+ onClick: Be(se, ["stop"])
10214
10232
  }, " + "),
10215
10233
  x("button", {
10216
10234
  class: "flex-none px-2 py-1 bg-gray-300 text-white rounded",
@@ -10222,33 +10240,33 @@ const Dh = {
10222
10240
  }, " ➡️ "),
10223
10241
  x("button", {
10224
10242
  class: "flex-none px-2 py-1 bg-red-500 text-white rounded",
10225
- onClick: Be($, ["stop"])
10243
+ onClick: Be(W, ["stop"])
10226
10244
  }, " ✖ ")
10227
10245
  ])) : H("", !0)
10228
10246
  ], 64)) : H("", !0),
10229
- a.element.type === fe(z).Icon ? (O(), R("div", {
10247
+ a.element.type === fe(z).Icon ? (D(), M("div", {
10230
10248
  key: 1,
10231
10249
  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",
10232
10250
  contenteditable: "false",
10233
- onClick: v[1] || (v[1] = Be(() => Ae(a.element), ["stop"]))
10251
+ onClick: O[1] || (O[1] = Be(() => Ae(a.element), ["stop"]))
10234
10252
  }, " ↑ ")) : H("", !0)
10235
10253
  ]),
10236
10254
  _: 1
10237
10255
  }, 16, ["class", "contenteditable"])),
10238
- a.element.type == fe(z).Text && o.value ? (O(), R("div", Dh, Se(c.value), 1)) : H("", !0),
10239
- a.element.type === fe(z).Image ? (O(), R("div", {
10256
+ a.element.type == fe(z).Text && o.value ? (D(), M("div", Dh, Se(c.value), 1)) : H("", !0),
10257
+ a.element.type === fe(z).Image ? (D(), M("div", {
10240
10258
  key: 1,
10241
10259
  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",
10242
- onClick: v[5] || (v[5] = Be(() => {
10260
+ onClick: O[5] || (O[5] = Be(() => {
10243
10261
  }, ["stop"])),
10244
10262
  contenteditable: "false"
10245
10263
  }, [
10246
10264
  ut(Eh, {
10247
10265
  multiple: !1,
10248
10266
  beforeUpload: xe,
10249
- onChange: v[4] || (v[4] = (Ee) => ce(Ee, a.element))
10267
+ onChange: O[4] || (O[4] = (Ee) => ce(Ee, a.element))
10250
10268
  }, {
10251
- "upload-icon": Sa(() => v[6] || (v[6] = [
10269
+ "upload-icon": Sa(() => O[6] || (O[6] = [
10252
10270
  x("div", { class: "p-2" }, "上传", -1)
10253
10271
  ])),
10254
10272
  _: 1
@@ -10257,7 +10275,7 @@ const Dh = {
10257
10275
  ], 64);
10258
10276
  };
10259
10277
  }
10260
- }), Lh = /* @__PURE__ */ ft(vh, [["__scopeId", "data-v-33946963"]]), yh = Ke({
10278
+ }), Lh = /* @__PURE__ */ ft(vh, [["__scopeId", "data-v-f92bee30"]]), yh = Ke({
10261
10279
  name: "GpCheckbox",
10262
10280
  props: {
10263
10281
  modelValue: {
@@ -10279,7 +10297,7 @@ const Dh = {
10279
10297
  }
10280
10298
  }), Rh = { class: "form-group" }, Mh = { class: "flex items-center space-x-2 cursor-pointer" }, Ph = ["checked", "aria-checked"], kh = { class: "checkbox-label text-sm text-gray-700" };
10281
10299
  function wh(e, t, a, i, s, u) {
10282
- return O(), R("div", Rh, [
10300
+ return D(), M("div", Rh, [
10283
10301
  x("label", Mh, [
10284
10302
  x("input", {
10285
10303
  type: "checkbox",
@@ -10299,7 +10317,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10299
10317
  },
10300
10318
  emits: ["updateElement"],
10301
10319
  setup(e, { emit: t }) {
10302
- const a = e, i = t, s = G({ rule: {}, ...a.element });
10320
+ const a = e, i = t, s = Q({ rule: {}, ...a.element });
10303
10321
  nt(
10304
10322
  () => a.element,
10305
10323
  (r) => {
@@ -10309,50 +10327,50 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10309
10327
  );
10310
10328
  function u() {
10311
10329
  if (s.value.type === z.Icon && !s.value.attrs.class.includes("iconfont")) {
10312
- J.error("图标仅支持 iconfont 图标");
10330
+ Z.error("图标仅支持 iconfont 图标");
10313
10331
  return;
10314
10332
  }
10315
10333
  if (s.value.type === z.Image && s.value.tag !== "img") {
10316
- J.error("节点类型错误");
10334
+ Z.error("节点类型错误");
10317
10335
  return;
10318
10336
  }
10319
10337
  if (s.value.type === z.Video && s.value.tag !== "video") {
10320
- J.error("节点类型错误");
10338
+ Z.error("节点类型错误");
10321
10339
  return;
10322
10340
  }
10323
10341
  if (s.value.type === z.Link && s.value.tag !== "a") {
10324
- J.error("节点类型错误");
10342
+ Z.error("节点类型错误");
10325
10343
  return;
10326
10344
  }
10327
10345
  if (s.value.type === z.Text) {
10328
10346
  if (s.value.rule.minText > s.value.rule.maxText) {
10329
- J.error("最小文本长度不能大于最大文本长度");
10347
+ Z.error("最小文本长度不能大于最大文本长度");
10330
10348
  return;
10331
10349
  }
10332
10350
  if (s.value.tag !== "p" && s.value.tag !== "div" && s.value.tag !== "span" && s.value.tag !== "h1" && s.value.tag !== "h2" && s.value.tag !== "h3" && s.value.tag !== "h4" && s.value.tag !== "h5" && s.value.tag !== "h6") {
10333
- J.error("节点类型错误");
10351
+ Z.error("节点类型错误");
10334
10352
  return;
10335
10353
  }
10336
10354
  }
10337
10355
  if (s.value.type === z.Block) {
10338
10356
  if (s.value.rule.minBlock > s.value.rule.maxBlock) {
10339
- J.error("最小块数量不能大于最大块数量");
10357
+ Z.error("最小块数量不能大于最大块数量");
10340
10358
  return;
10341
10359
  }
10342
10360
  if (s.value.tag !== "div" && s.value.tag !== "section" && s.value.tag !== "article" && s.value.tag !== "nav" && s.value.tag !== "header" && s.value.tag !== "footer" && s.value.tag !== "span" && s.value.tag !== "p" && s.value.tag !== "img") {
10343
- J.error("节点类型错误");
10361
+ Z.error("节点类型错误");
10344
10362
  return;
10345
10363
  }
10346
10364
  if (!s.value.children || s.value.children.length < 1) {
10347
- J.error("节点错误,必须包含子元素");
10365
+ Z.error("节点错误,必须包含子元素");
10348
10366
  return;
10349
10367
  }
10350
10368
  }
10351
10369
  i("updateElement", s.value);
10352
10370
  }
10353
- return (r, o) => (O(), R("div", null, [
10354
- s.value ? (O(), R("div", Bh, [
10355
- s.value.text !== void 0 ? (O(), R("div", Uh, [
10371
+ return (r, o) => (D(), M("div", null, [
10372
+ s.value ? (D(), M("div", Bh, [
10373
+ s.value.text !== void 0 ? (D(), M("div", Uh, [
10356
10374
  o[13] || (o[13] = x("label", { class: "block" }, "内容", -1)),
10357
10375
  x("div", Fh, Se(s.value.text || "-"), 1)
10358
10376
  ])) : H("", !0),
@@ -10378,7 +10396,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10378
10396
  [Qu, s.value.type]
10379
10397
  ])
10380
10398
  ]),
10381
- s.value.type == fe(z).Text ? (O(), R("div", Yh, [
10399
+ s.value.type == fe(z).Text ? (D(), M("div", Yh, [
10382
10400
  o[17] || (o[17] = x("label", { class: "block mt-4" }, "最小文本长度", -1)),
10383
10401
  tt(x("input", {
10384
10402
  "onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
@@ -10387,7 +10405,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10387
10405
  [mt, s.value.rule.minText]
10388
10406
  ])
10389
10407
  ])) : H("", !0),
10390
- s.value.type == fe(z).Text ? (O(), R("div", qh, [
10408
+ s.value.type == fe(z).Text ? (D(), M("div", qh, [
10391
10409
  o[18] || (o[18] = x("label", { class: "block mt-4" }, "最大文本长度", -1)),
10392
10410
  tt(x("input", {
10393
10411
  "onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
@@ -10396,7 +10414,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10396
10414
  [mt, s.value.rule.maxText]
10397
10415
  ])
10398
10416
  ])) : H("", !0),
10399
- s.value.type == fe(z).Image ? (O(), R("div", Vh, [
10417
+ s.value.type == fe(z).Image ? (D(), M("div", Vh, [
10400
10418
  o[19] || (o[19] = x("label", { class: "block mt-4" }, "是否裁剪", -1)),
10401
10419
  ut(Vt, {
10402
10420
  class: "py-2",
@@ -10405,7 +10423,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10405
10423
  label: "是"
10406
10424
  }, null, 8, ["modelValue"])
10407
10425
  ])) : H("", !0),
10408
- s.value.type == fe(z).Image ? (O(), R("div", $h, [
10426
+ s.value.type == fe(z).Image ? (D(), M("div", $h, [
10409
10427
  o[20] || (o[20] = x("label", { class: "block mt-4" }, "图片宽度", -1)),
10410
10428
  tt(x("input", {
10411
10429
  "onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
@@ -10414,7 +10432,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10414
10432
  [mt, s.value.rule.minImageWidth]
10415
10433
  ])
10416
10434
  ])) : H("", !0),
10417
- s.value.type == fe(z).Image ? (O(), R("div", Wh, [
10435
+ s.value.type == fe(z).Image ? (D(), M("div", Wh, [
10418
10436
  o[21] || (o[21] = x("label", { class: "block mt-4" }, "图片高度", -1)),
10419
10437
  tt(x("input", {
10420
10438
  "onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
@@ -10423,7 +10441,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10423
10441
  [mt, s.value.rule.maxImageHeight]
10424
10442
  ])
10425
10443
  ])) : H("", !0),
10426
- s.value.type == fe(z).Block ? (O(), R("div", Gh, [
10444
+ s.value.type == fe(z).Block ? (D(), M("div", Gh, [
10427
10445
  o[22] || (o[22] = x("label", { class: "block mt-4" }, "块最小数量", -1)),
10428
10446
  tt(x("input", {
10429
10447
  "onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
@@ -10432,7 +10450,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10432
10450
  [mt, s.value.rule.minBlock]
10433
10451
  ])
10434
10452
  ])) : H("", !0),
10435
- s.value.type == fe(z).Block ? (O(), R("div", Xh, [
10453
+ s.value.type == fe(z).Block ? (D(), M("div", Xh, [
10436
10454
  o[23] || (o[23] = x("label", { class: "block mt-4" }, "块最大数量", -1)),
10437
10455
  tt(x("input", {
10438
10456
  "onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
@@ -10441,7 +10459,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10441
10459
  [mt, s.value.rule.maxBlock]
10442
10460
  ])
10443
10461
  ])) : H("", !0),
10444
- s.value.type == fe(z).Text || s.value.type == fe(z).Icon || s.value.type == fe(z).Button ? (O(), R("div", Qh, [
10462
+ s.value.type == fe(z).Text || s.value.type == fe(z).Icon || s.value.type == fe(z).Button ? (D(), M("div", Qh, [
10445
10463
  o[24] || (o[24] = x("label", { class: "block mt-4" }, "主题色", -1)),
10446
10464
  ut(Vt, {
10447
10465
  class: "py-2",
@@ -10468,7 +10486,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10468
10486
  label: "是"
10469
10487
  }, null, 8, ["modelValue"])
10470
10488
  ]),
10471
- s.value.type == fe(z).Link || s.value.type == fe(z).Button ? (O(), R("div", jh, [
10489
+ s.value.type == fe(z).Link || s.value.type == fe(z).Button ? (D(), M("div", jh, [
10472
10490
  o[27] || (o[27] = x("label", { class: "block mt-4" }, "打开美洽", -1)),
10473
10491
  ut(Vt, {
10474
10492
  class: "py-2",
@@ -10477,7 +10495,7 @@ const Vt = /* @__PURE__ */ ft(yh, [["render", wh], ["__scopeId", "data-v-68b8f27
10477
10495
  label: "是"
10478
10496
  }, null, 8, ["modelValue"])
10479
10497
  ])) : H("", !0),
10480
- s.value.type == fe(z).Link || s.value.type == fe(z).Button ? (O(), R("div", zh, [
10498
+ s.value.type == fe(z).Link || s.value.type == fe(z).Button ? (D(), M("div", zh, [
10481
10499
  o[28] || (o[28] = x("label", { class: "block mt-4" }, "链接", -1)),
10482
10500
  tt(x("input", {
10483
10501
  "onUpdate:modelValue": o[12] || (o[12] = (c) => s.value.rule.linkUrl = c),
@@ -10595,7 +10613,7 @@ function rf() {
10595
10613
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
10596
10614
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
10597
10615
  }
10598
- var za = typeof window < "u" && typeof window.document < "u", ze = za ? window : {}, ss = za && ze.document.documentElement ? "ontouchstart" in ze.document.documentElement : !1, ns = za ? "PointerEvent" in ze : !1, te = "cropper", us = "all", vu = "crop", Lu = "move", yu = "zoom", Tt = "e", pt = "w", Dt = "s", at = "n", $t = "ne", Wt = "nw", Gt = "se", Xt = "sw", xi = "".concat(te, "-crop"), Ws = "".concat(te, "-disabled"), Le = "".concat(te, "-hidden"), Gs = "".concat(te, "-hide"), of = "".concat(te, "-invisible"), Ba = "".concat(te, "-modal"), Oi = "".concat(te, "-move"), la = "".concat(te, "Action"), Aa = "".concat(te, "Preview"), rs = "crop", Ru = "move", Mu = "none", Di = "crop", vi = "cropend", Li = "cropmove", yi = "cropstart", Xs = "dblclick", cf = ss ? "touchstart" : "mousedown", lf = ss ? "touchmove" : "mousemove", df = ss ? "touchend touchcancel" : "mouseup", Qs = ns ? "pointerdown" : cf, js = ns ? "pointermove" : lf, zs = ns ? "pointerup pointercancel" : df, Ks = "ready", Zs = "resize", Js = "wheel", Ri = "zoom", en = "image/jpeg", hf = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, ff = /^data:/, mf = /^data:image\/jpeg;base64,/, Ef = /^img|canvas$/i, Pu = 200, ku = 100, tn = {
10616
+ var za = typeof window < "u" && typeof window.document < "u", ze = za ? window : {}, ss = za && ze.document.documentElement ? "ontouchstart" in ze.document.documentElement : !1, ns = za ? "PointerEvent" in ze : !1, ae = "cropper", us = "all", vu = "crop", Lu = "move", yu = "zoom", Tt = "e", pt = "w", Dt = "s", at = "n", $t = "ne", Wt = "nw", Gt = "se", Xt = "sw", xi = "".concat(ae, "-crop"), Ws = "".concat(ae, "-disabled"), Le = "".concat(ae, "-hidden"), Gs = "".concat(ae, "-hide"), of = "".concat(ae, "-invisible"), Ba = "".concat(ae, "-modal"), Oi = "".concat(ae, "-move"), la = "".concat(ae, "Action"), Aa = "".concat(ae, "Preview"), rs = "crop", Ru = "move", Mu = "none", Di = "crop", vi = "cropend", Li = "cropmove", yi = "cropstart", Xs = "dblclick", cf = ss ? "touchstart" : "mousedown", lf = ss ? "touchmove" : "mousemove", df = ss ? "touchend touchcancel" : "mouseup", Qs = ns ? "pointerdown" : cf, js = ns ? "pointermove" : lf, zs = ns ? "pointerup pointercancel" : df, Ks = "ready", Zs = "resize", Js = "wheel", Ri = "zoom", en = "image/jpeg", hf = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, ff = /^data:/, mf = /^data:image\/jpeg;base64,/, Ef = /^img|canvas$/i, Pu = 200, ku = 100, tn = {
10599
10617
  // Define the view mode of the cropper
10600
10618
  viewMode: 0,
10601
10619
  // 0, 1, 2, 3
@@ -10667,7 +10685,7 @@ var za = typeof window < "u" && typeof window.document < "u", ze = za ? window :
10667
10685
  crop: null,
10668
10686
  zoom: null
10669
10687
  }, Tf = '<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>', pf = Number.isNaN || ze.isNaN;
10670
- function W(e) {
10688
+ function G(e) {
10671
10689
  return typeof e == "number" && !pf(e);
10672
10690
  }
10673
10691
  var an = function(t) {
@@ -10698,13 +10716,13 @@ function wu(e) {
10698
10716
  return Array.from ? Array.from(e) : gf.call(e);
10699
10717
  }
10700
10718
  function de(e, t) {
10701
- return e && De(t) && (Array.isArray(e) || W(e.length) ? wu(e).forEach(function(a, i) {
10719
+ return e && De(t) && (Array.isArray(e) || G(e.length) ? wu(e).forEach(function(a, i) {
10702
10720
  t.call(e, a, i, e);
10703
10721
  }) : It(e) && Object.keys(e).forEach(function(a) {
10704
10722
  t.call(e, e[a], a, e);
10705
10723
  })), e;
10706
10724
  }
10707
- var ae = Object.assign || function(t) {
10725
+ var ie = Object.assign || function(t) {
10708
10726
  for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
10709
10727
  i[s - 1] = arguments[s];
10710
10728
  return It(t) && i.length > 0 && i.forEach(function(u) {
@@ -10721,7 +10739,7 @@ var Af = /^width|height|left|top|marginLeft|marginTop$/;
10721
10739
  function ct(e, t) {
10722
10740
  var a = e.style;
10723
10741
  de(t, function(i, s) {
10724
- Af.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
10742
+ Af.test(s) && G(i) && (i = "".concat(i, "px")), a[s] = i;
10725
10743
  });
10726
10744
  }
10727
10745
  function Nf(e, t) {
@@ -10729,7 +10747,7 @@ function Nf(e, t) {
10729
10747
  }
10730
10748
  function pe(e, t) {
10731
10749
  if (t) {
10732
- if (W(e.length)) {
10750
+ if (G(e.length)) {
10733
10751
  de(e, function(i) {
10734
10752
  pe(i, t);
10735
10753
  });
@@ -10745,7 +10763,7 @@ function pe(e, t) {
10745
10763
  }
10746
10764
  function je(e, t) {
10747
10765
  if (t) {
10748
- if (W(e.length)) {
10766
+ if (G(e.length)) {
10749
10767
  de(e, function(a) {
10750
10768
  je(a, t);
10751
10769
  });
@@ -10760,7 +10778,7 @@ function je(e, t) {
10760
10778
  }
10761
10779
  function Lt(e, t, a) {
10762
10780
  if (t) {
10763
- if (W(e.length)) {
10781
+ if (G(e.length)) {
10764
10782
  de(e, function(i) {
10765
10783
  Lt(i, t, a);
10766
10784
  });
@@ -10867,7 +10885,7 @@ function nn(e) {
10867
10885
  }
10868
10886
  function ia(e) {
10869
10887
  var t = e.rotate, a = e.scaleX, i = e.scaleY, s = e.translateX, u = e.translateY, r = [];
10870
- W(s) && s !== 0 && r.push("translateX(".concat(s, "px)")), W(u) && u !== 0 && r.push("translateY(".concat(u, "px)")), W(t) && t !== 0 && r.push("rotate(".concat(t, "deg)")), W(a) && a !== 1 && r.push("scaleX(".concat(a, ")")), W(i) && i !== 1 && r.push("scaleY(".concat(i, ")"));
10888
+ G(s) && s !== 0 && r.push("translateX(".concat(s, "px)")), G(u) && u !== 0 && r.push("translateY(".concat(u, "px)")), G(t) && t !== 0 && r.push("rotate(".concat(t, "deg)")), G(a) && a !== 1 && r.push("scaleX(".concat(a, ")")), G(i) && i !== 1 && r.push("scaleY(".concat(i, ")"));
10871
10889
  var o = r.length ? r.join(" ") : "none";
10872
10890
  return {
10873
10891
  WebkitTransform: o,
@@ -10932,24 +10950,24 @@ function Df(e) {
10932
10950
  };
10933
10951
  }
10934
10952
  function vf(e, t, a, i) {
10935
- 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, _ = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, w = M === void 0 ? "transparent" : M, Q = i.imageSmoothingEnabled, X = Q === void 0 ? !0 : Q, ie = i.imageSmoothingQuality, q = ie === void 0 ? "low" : ie, g = i.maxWidth, F = g === void 0 ? 1 / 0 : g, $ = i.maxHeight, ue = $ === void 0 ? 1 / 0 : $, Ae = i.minWidth, He = Ae === void 0 ? 0 : Ae, Ye = i.minHeight, Ce = Ye === void 0 ? 0 : Ye, oe = document.createElement("canvas"), ce = oe.getContext("2d"), xe = lt({
10953
+ 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, _ = a.aspectRatio, C = a.naturalWidth, y = a.naturalHeight, L = i.fillColor, w = L === void 0 ? "transparent" : L, X = i.imageSmoothingEnabled, $ = X === void 0 ? !0 : X, se = i.imageSmoothingQuality, q = se === void 0 ? "low" : se, g = i.maxWidth, F = g === void 0 ? 1 / 0 : g, W = i.maxHeight, re = W === void 0 ? 1 / 0 : W, Ae = i.minWidth, He = Ae === void 0 ? 0 : Ae, Ye = i.minHeight, Ce = Ye === void 0 ? 0 : Ye, oe = document.createElement("canvas"), ce = oe.getContext("2d"), xe = lt({
10936
10954
  aspectRatio: _,
10937
10955
  width: F,
10938
- height: ue
10939
- }), k = lt({
10956
+ height: re
10957
+ }), P = lt({
10940
10958
  aspectRatio: _,
10941
10959
  width: He,
10942
10960
  height: Ce
10943
- }, "cover"), v = Math.min(xe.width, Math.max(k.width, C)), re = Math.min(xe.height, Math.max(k.height, L)), Ee = lt({
10961
+ }, "cover"), O = Math.min(xe.width, Math.max(P.width, C)), ee = Math.min(xe.height, Math.max(P.height, y)), Ee = lt({
10944
10962
  aspectRatio: s,
10945
10963
  width: F,
10946
- height: ue
10964
+ height: re
10947
10965
  }), Me = lt({
10948
10966
  aspectRatio: s,
10949
10967
  width: He,
10950
10968
  height: Ce
10951
- }, "cover"), N = Math.min(Ee.width, Math.max(Me.width, u)), D = Math.min(Ee.height, Math.max(Me.height, r)), B = [-N / 2, -D / 2, N, D];
10952
- return oe.width = Mt(v), oe.height = Mt(re), ce.fillStyle = w, ce.fillRect(0, 0, v, re), ce.save(), ce.translate(v / 2, re / 2), ce.rotate(c * Math.PI / 180), ce.scale(f, T), ce.imageSmoothingEnabled = X, ce.imageSmoothingQuality = q, ce.drawImage.apply(ce, [e].concat(Du(B.map(function(Y) {
10969
+ }, "cover"), N = Math.min(Ee.width, Math.max(Me.width, u)), v = Math.min(Ee.height, Math.max(Me.height, r)), B = [-N / 2, -v / 2, N, v];
10970
+ return oe.width = Mt(O), oe.height = Mt(ee), ce.fillStyle = w, ce.fillRect(0, 0, O, ee), ce.save(), ce.translate(O / 2, ee / 2), ce.rotate(c * Math.PI / 180), ce.scale(f, T), ce.imageSmoothingEnabled = $, ce.imageSmoothingQuality = q, ce.drawImage.apply(ce, [e].concat(Du(B.map(function(Y) {
10953
10971
  return Math.floor(Mt(Y));
10954
10972
  })))), ce.restore(), oe;
10955
10973
  }
@@ -11066,7 +11084,7 @@ var wf = {
11066
11084
  width: c,
11067
11085
  height: d
11068
11086
  };
11069
- this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ae({}, f);
11087
+ this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ie({}, f);
11070
11088
  },
11071
11089
  limitCanvas: function(t, a) {
11072
11090
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = i.viewMode, c = u.aspectRatio, d = this.cropped && r;
@@ -11097,7 +11115,7 @@ var wf = {
11097
11115
  }), r = u.width, o = u.height, c = i.width * (r / i.naturalWidth), d = i.height * (o / i.naturalHeight);
11098
11116
  i.left -= (c - i.width) / 2, i.top -= (d - i.height) / 2, i.width = c, i.height = d, i.aspectRatio = r / o, i.naturalWidth = r, i.naturalHeight = o, this.limitCanvas(!0, !1);
11099
11117
  }
11100
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, ct(this.canvas, ae({
11118
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, ct(this.canvas, ie({
11101
11119
  width: i.width,
11102
11120
  height: i.height
11103
11121
  }, ia({
@@ -11107,15 +11125,15 @@ var wf = {
11107
11125
  },
11108
11126
  renderImage: function(t) {
11109
11127
  var a = this.canvasData, i = this.imageData, s = i.naturalWidth * (a.width / a.naturalWidth), u = i.naturalHeight * (a.height / a.naturalHeight);
11110
- ae(i, {
11128
+ ie(i, {
11111
11129
  width: s,
11112
11130
  height: u,
11113
11131
  left: (a.width - s) / 2,
11114
11132
  top: (a.height - u) / 2
11115
- }), ct(this.image, ae({
11133
+ }), ct(this.image, ie({
11116
11134
  width: i.width,
11117
11135
  height: i.height
11118
- }, ia(ae({
11136
+ }, ia(ie({
11119
11137
  translateX: i.left,
11120
11138
  translateY: i.top
11121
11139
  }, i)))), t && this.output();
@@ -11125,7 +11143,7 @@ var wf = {
11125
11143
  width: a.width,
11126
11144
  height: a.height
11127
11145
  };
11128
- i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ae({}, u);
11146
+ i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ie({}, u);
11129
11147
  },
11130
11148
  limitCropBox: function(t, a) {
11131
11149
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = this.limited, c = i.aspectRatio;
@@ -11137,7 +11155,7 @@ var wf = {
11137
11155
  },
11138
11156
  renderCropBox: function() {
11139
11157
  var t = this.options, a = this.containerData, i = this.cropBoxData;
11140
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && da(this.face, la, i.width >= a.width && i.height >= a.height ? Lu : us), ct(this.cropBox, ae({
11158
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && da(this.face, la, i.width >= a.width && i.height >= a.height ? Lu : us), ct(this.cropBox, ie({
11141
11159
  width: i.width,
11142
11160
  height: i.height
11143
11161
  }, ia({
@@ -11174,23 +11192,23 @@ var wf = {
11174
11192
  },
11175
11193
  preview: function() {
11176
11194
  var t = this.imageData, a = this.canvasData, i = this.cropBoxData, s = i.width, u = i.height, r = t.width, o = t.height, c = i.left - a.left - t.left, d = i.top - a.top - t.top;
11177
- !this.cropped || this.disabled || (ct(this.viewBoxImage, ae({
11195
+ !this.cropped || this.disabled || (ct(this.viewBoxImage, ie({
11178
11196
  width: r,
11179
11197
  height: o
11180
- }, ia(ae({
11198
+ }, ia(ie({
11181
11199
  translateX: -c,
11182
11200
  translateY: -d
11183
11201
  }, t)))), de(this.previews, function(f) {
11184
- var E = Mi(f, Aa), T = E.width, _ = E.height, C = T, L = _, M = 1;
11185
- s && (M = T / s, L = u * M), u && L > _ && (M = _ / u, C = s * M, L = _), ct(f, {
11202
+ var E = Mi(f, Aa), T = E.width, _ = E.height, C = T, y = _, L = 1;
11203
+ s && (L = T / s, y = u * L), u && y > _ && (L = _ / u, C = s * L, y = _), ct(f, {
11186
11204
  width: C,
11187
- height: L
11188
- }), ct(f.getElementsByTagName("img")[0], ae({
11189
- width: r * M,
11190
- height: o * M
11191
- }, ia(ae({
11192
- translateX: -c * M,
11193
- translateY: -d * M
11205
+ height: y
11206
+ }), ct(f.getElementsByTagName("img")[0], ie({
11207
+ width: r * L,
11208
+ height: o * L
11209
+ }, ia(ie({
11210
+ translateX: -c * L,
11211
+ translateY: -d * L
11194
11212
  }, t))));
11195
11213
  }));
11196
11214
  }
@@ -11235,7 +11253,7 @@ var wf = {
11235
11253
  cropStart: function(t) {
11236
11254
  var a = t.buttons, i = t.button;
11237
11255
  if (!(this.disabled || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
11238
- (W(a) && a !== 1 || W(i) && i !== 0 || t.ctrlKey))) {
11256
+ (G(a) && a !== 1 || G(i) && i !== 0 || t.ctrlKey))) {
11239
11257
  var s = this.options, u = this.pointers, r;
11240
11258
  t.changedTouches ? de(t.changedTouches, function(o) {
11241
11259
  u[o.identifier] = Na(o);
@@ -11253,8 +11271,8 @@ var wf = {
11253
11271
  originalEvent: t,
11254
11272
  action: a
11255
11273
  }) !== !1 && (t.changedTouches ? de(t.changedTouches, function(s) {
11256
- ae(i[s.identifier] || {}, Na(s, !0));
11257
- }) : ae(i[t.pointerId || 0] || {}, Na(t, !0)), this.change(t));
11274
+ ie(i[s.identifier] || {}, Na(s, !0));
11275
+ }) : ie(i[t.pointerId || 0] || {}, Na(t, !0)), this.change(t));
11258
11276
  }
11259
11277
  },
11260
11278
  cropEnd: function(t) {
@@ -11270,24 +11288,24 @@ var wf = {
11270
11288
  }
11271
11289
  }, Hf = {
11272
11290
  change: function(t) {
11273
- 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, _ = d + E, C = f + T, L = 0, M = 0, w = s.width, Q = s.height, X = !0, ie;
11274
- !c && t.shiftKey && (c = E && T ? E / T : 1), this.limited && (L = u.minLeft, M = u.minTop, w = L + Math.min(s.width, i.width, i.left + i.width), Q = M + Math.min(s.height, i.height, i.top + i.height));
11291
+ 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, _ = d + E, C = f + T, y = 0, L = 0, w = s.width, X = s.height, $ = !0, se;
11292
+ !c && t.shiftKey && (c = E && T ? E / T : 1), this.limited && (y = u.minLeft, L = u.minTop, w = y + Math.min(s.width, i.width, i.left + i.width), X = L + Math.min(s.height, i.height, i.top + i.height));
11275
11293
  var q = r[Object.keys(r)[0]], g = {
11276
11294
  x: q.endX - q.startX,
11277
11295
  y: q.endY - q.startY
11278
- }, F = function(ue) {
11279
- switch (ue) {
11296
+ }, F = function(re) {
11297
+ switch (re) {
11280
11298
  case Tt:
11281
11299
  _ + g.x > w && (g.x = w - _);
11282
11300
  break;
11283
11301
  case pt:
11284
- d + g.x < L && (g.x = L - d);
11302
+ d + g.x < y && (g.x = y - d);
11285
11303
  break;
11286
11304
  case at:
11287
- f + g.y < M && (g.y = M - f);
11305
+ f + g.y < L && (g.y = L - f);
11288
11306
  break;
11289
11307
  case Dt:
11290
- C + g.y > Q && (g.y = Q - C);
11308
+ C + g.y > X && (g.y = X - C);
11291
11309
  break;
11292
11310
  }
11293
11311
  };
@@ -11296,93 +11314,93 @@ var wf = {
11296
11314
  d += g.x, f += g.y;
11297
11315
  break;
11298
11316
  case Tt:
11299
- if (g.x >= 0 && (_ >= w || c && (f <= M || C >= Q))) {
11300
- X = !1;
11317
+ if (g.x >= 0 && (_ >= w || c && (f <= L || C >= X))) {
11318
+ $ = !1;
11301
11319
  break;
11302
11320
  }
11303
11321
  F(Tt), E += g.x, E < 0 && (o = pt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11304
11322
  break;
11305
11323
  case at:
11306
- if (g.y <= 0 && (f <= M || c && (d <= L || _ >= w))) {
11307
- X = !1;
11324
+ if (g.y <= 0 && (f <= L || c && (d <= y || _ >= w))) {
11325
+ $ = !1;
11308
11326
  break;
11309
11327
  }
11310
11328
  F(at), T -= g.y, f += g.y, T < 0 && (o = Dt, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11311
11329
  break;
11312
11330
  case pt:
11313
- if (g.x <= 0 && (d <= L || c && (f <= M || C >= Q))) {
11314
- X = !1;
11331
+ if (g.x <= 0 && (d <= y || c && (f <= L || C >= X))) {
11332
+ $ = !1;
11315
11333
  break;
11316
11334
  }
11317
11335
  F(pt), E -= g.x, d += g.x, E < 0 && (o = Tt, E = -E, d -= E), c && (T = E / c, f += (u.height - T) / 2);
11318
11336
  break;
11319
11337
  case Dt:
11320
- if (g.y >= 0 && (C >= Q || c && (d <= L || _ >= w))) {
11321
- X = !1;
11338
+ if (g.y >= 0 && (C >= X || c && (d <= y || _ >= w))) {
11339
+ $ = !1;
11322
11340
  break;
11323
11341
  }
11324
11342
  F(Dt), T += g.y, T < 0 && (o = at, T = -T, f -= T), c && (E = T * c, d += (u.width - E) / 2);
11325
11343
  break;
11326
11344
  case $t:
11327
11345
  if (c) {
11328
- if (g.y <= 0 && (f <= M || _ >= w)) {
11329
- X = !1;
11346
+ if (g.y <= 0 && (f <= L || _ >= w)) {
11347
+ $ = !1;
11330
11348
  break;
11331
11349
  }
11332
11350
  F(at), T -= g.y, f += g.y, E = T * c;
11333
11351
  } else
11334
- F(at), F(Tt), g.x >= 0 ? _ < w ? E += g.x : g.y <= 0 && f <= M && (X = !1) : E += g.x, g.y <= 0 ? f > M && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
11352
+ F(at), F(Tt), g.x >= 0 ? _ < w ? E += g.x : g.y <= 0 && f <= L && ($ = !1) : E += g.x, g.y <= 0 ? f > L && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
11335
11353
  E < 0 && T < 0 ? (o = Xt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = Wt, E = -E, d -= E) : T < 0 && (o = Gt, T = -T, f -= T);
11336
11354
  break;
11337
11355
  case Wt:
11338
11356
  if (c) {
11339
- if (g.y <= 0 && (f <= M || d <= L)) {
11340
- X = !1;
11357
+ if (g.y <= 0 && (f <= L || d <= y)) {
11358
+ $ = !1;
11341
11359
  break;
11342
11360
  }
11343
11361
  F(at), T -= g.y, f += g.y, E = T * c, d += u.width - E;
11344
11362
  } else
11345
- F(at), F(pt), g.x <= 0 ? d > L ? (E -= g.x, d += g.x) : g.y <= 0 && f <= M && (X = !1) : (E -= g.x, d += g.x), g.y <= 0 ? f > M && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
11363
+ F(at), F(pt), g.x <= 0 ? d > y ? (E -= g.x, d += g.x) : g.y <= 0 && f <= L && ($ = !1) : (E -= g.x, d += g.x), g.y <= 0 ? f > L && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
11346
11364
  E < 0 && T < 0 ? (o = Gt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = $t, E = -E, d -= E) : T < 0 && (o = Xt, T = -T, f -= T);
11347
11365
  break;
11348
11366
  case Xt:
11349
11367
  if (c) {
11350
- if (g.x <= 0 && (d <= L || C >= Q)) {
11351
- X = !1;
11368
+ if (g.x <= 0 && (d <= y || C >= X)) {
11369
+ $ = !1;
11352
11370
  break;
11353
11371
  }
11354
11372
  F(pt), E -= g.x, d += g.x, T = E / c;
11355
11373
  } else
11356
- F(Dt), F(pt), g.x <= 0 ? d > L ? (E -= g.x, d += g.x) : g.y >= 0 && C >= Q && (X = !1) : (E -= g.x, d += g.x), g.y >= 0 ? C < Q && (T += g.y) : T += g.y;
11374
+ F(Dt), F(pt), g.x <= 0 ? d > y ? (E -= g.x, d += g.x) : g.y >= 0 && C >= X && ($ = !1) : (E -= g.x, d += g.x), g.y >= 0 ? C < X && (T += g.y) : T += g.y;
11357
11375
  E < 0 && T < 0 ? (o = $t, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = Gt, E = -E, d -= E) : T < 0 && (o = Wt, T = -T, f -= T);
11358
11376
  break;
11359
11377
  case Gt:
11360
11378
  if (c) {
11361
- if (g.x >= 0 && (_ >= w || C >= Q)) {
11362
- X = !1;
11379
+ if (g.x >= 0 && (_ >= w || C >= X)) {
11380
+ $ = !1;
11363
11381
  break;
11364
11382
  }
11365
11383
  F(Tt), E += g.x, T = E / c;
11366
11384
  } else
11367
- F(Dt), F(Tt), g.x >= 0 ? _ < w ? E += g.x : g.y >= 0 && C >= Q && (X = !1) : E += g.x, g.y >= 0 ? C < Q && (T += g.y) : T += g.y;
11385
+ F(Dt), F(Tt), g.x >= 0 ? _ < w ? E += g.x : g.y >= 0 && C >= X && ($ = !1) : E += g.x, g.y >= 0 ? C < X && (T += g.y) : T += g.y;
11368
11386
  E < 0 && T < 0 ? (o = Wt, T = -T, E = -E, f -= T, d -= E) : E < 0 ? (o = Xt, E = -E, d -= E) : T < 0 && (o = $t, T = -T, f -= T);
11369
11387
  break;
11370
11388
  case Lu:
11371
- this.move(g.x, g.y), X = !1;
11389
+ this.move(g.x, g.y), $ = !1;
11372
11390
  break;
11373
11391
  case yu:
11374
- this.zoom(xf(r), t), X = !1;
11392
+ this.zoom(xf(r), t), $ = !1;
11375
11393
  break;
11376
11394
  case vu:
11377
11395
  if (!g.x || !g.y) {
11378
- X = !1;
11396
+ $ = !1;
11379
11397
  break;
11380
11398
  }
11381
- ie = Fu(this.cropper), d = q.startX - ie.left, f = q.startY - ie.top, E = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Gt : $t : g.x < 0 && (d -= E, o = g.y > 0 ? Xt : Wt), g.y < 0 && (f -= T), this.cropped || (je(this.cropBox, Le), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
11399
+ se = Fu(this.cropper), d = q.startX - se.left, f = q.startY - se.top, E = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Gt : $t : g.x < 0 && (d -= E, o = g.y > 0 ? Xt : Wt), g.y < 0 && (f -= T), this.cropped || (je(this.cropBox, Le), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
11382
11400
  break;
11383
11401
  }
11384
- X && (u.width = E, u.height = T, u.left = d, u.top = f, this.action = o, this.renderCropBox()), de(r, function($) {
11385
- $.startX = $.endX, $.startY = $.endY;
11402
+ $ && (u.width = E, u.height = T, u.left = d, u.top = f, this.action = o, this.renderCropBox()), de(r, function(W) {
11403
+ W.startX = W.endX, W.startY = W.endY;
11386
11404
  });
11387
11405
  }
11388
11406
  }, Yf = {
@@ -11392,11 +11410,11 @@ var wf = {
11392
11410
  },
11393
11411
  // Reset the image and crop box to their initial states
11394
11412
  reset: function() {
11395
- return this.ready && !this.disabled && (this.imageData = ae({}, this.initialImageData), this.canvasData = ae({}, this.initialCanvasData), this.cropBoxData = ae({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
11413
+ return this.ready && !this.disabled && (this.imageData = ie({}, this.initialImageData), this.canvasData = ie({}, this.initialCanvasData), this.cropBoxData = ie({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
11396
11414
  },
11397
11415
  // Clear the crop box
11398
11416
  clear: function() {
11399
- return this.cropped && !this.disabled && (ae(this.cropBoxData, {
11417
+ return this.cropped && !this.disabled && (ie(this.cropBoxData, {
11400
11418
  left: 0,
11401
11419
  top: 0,
11402
11420
  width: 0,
@@ -11429,7 +11447,7 @@ var wf = {
11429
11447
  */
11430
11448
  destroy: function() {
11431
11449
  var t = this.element;
11432
- return t[te] ? (t[te] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
11450
+ return t[ae] ? (t[ae] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
11433
11451
  },
11434
11452
  /**
11435
11453
  * Move the canvas with relative offsets
@@ -11449,7 +11467,7 @@ var wf = {
11449
11467
  */
11450
11468
  moveTo: function(t) {
11451
11469
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.canvasData, s = !1;
11452
- return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.movable && (W(t) && (i.left = t, s = !0), W(a) && (i.top = a, s = !0), s && this.renderCanvas(!0)), this;
11470
+ return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.movable && (G(t) && (i.left = t, s = !0), G(a) && (i.top = a, s = !0), s && this.renderCanvas(!0)), this;
11453
11471
  },
11454
11472
  /**
11455
11473
  * Zoom the canvas with a relative ratio
@@ -11484,7 +11502,7 @@ var wf = {
11484
11502
  pageY: i.pageY
11485
11503
  };
11486
11504
  u.left -= (f - r) * ((C.pageX - _.left - u.left) / r), u.top -= (E - o) * ((C.pageY - _.top - u.top) / o);
11487
- } else vt(a) && W(a.x) && W(a.y) ? (u.left -= (f - r) * ((a.x - u.left) / r), u.top -= (E - o) * ((a.y - u.top) / o)) : (u.left -= (f - r) / 2, u.top -= (E - o) / 2);
11505
+ } else vt(a) && G(a.x) && G(a.y) ? (u.left -= (f - r) * ((a.x - u.left) / r), u.top -= (E - o) * ((a.y - u.top) / o)) : (u.left -= (f - r) / 2, u.top -= (E - o) / 2);
11488
11506
  u.width = f, u.height = E, this.renderCanvas(!0);
11489
11507
  }
11490
11508
  return this;
@@ -11503,7 +11521,7 @@ var wf = {
11503
11521
  * @returns {Cropper} this
11504
11522
  */
11505
11523
  rotateTo: function(t) {
11506
- return t = Number(t), W(t) && this.ready && !this.disabled && this.options.rotatable && (this.imageData.rotate = t % 360, this.renderCanvas(!0, !0)), this;
11524
+ return t = Number(t), G(t) && this.ready && !this.disabled && this.options.rotatable && (this.imageData.rotate = t % 360, this.renderCanvas(!0, !0)), this;
11507
11525
  },
11508
11526
  /**
11509
11527
  * Scale the image on the x-axis.
@@ -11512,7 +11530,7 @@ var wf = {
11512
11530
  */
11513
11531
  scaleX: function(t) {
11514
11532
  var a = this.imageData.scaleY;
11515
- return this.scale(t, W(a) ? a : 1);
11533
+ return this.scale(t, G(a) ? a : 1);
11516
11534
  },
11517
11535
  /**
11518
11536
  * Scale the image on the y-axis.
@@ -11521,7 +11539,7 @@ var wf = {
11521
11539
  */
11522
11540
  scaleY: function(t) {
11523
11541
  var a = this.imageData.scaleX;
11524
- return this.scale(W(a) ? a : 1, t);
11542
+ return this.scale(G(a) ? a : 1, t);
11525
11543
  },
11526
11544
  /**
11527
11545
  * Scale the image
@@ -11531,7 +11549,7 @@ var wf = {
11531
11549
  */
11532
11550
  scale: function(t) {
11533
11551
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.imageData, s = !1;
11534
- return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.scalable && (W(t) && (i.scaleX = t, s = !0), W(a) && (i.scaleY = a, s = !0), s && this.renderCanvas(!0, !0)), this;
11552
+ return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.scalable && (G(t) && (i.scaleX = t, s = !0), G(a) && (i.scaleY = a, s = !0), s && this.renderCanvas(!0, !0)), this;
11535
11553
  },
11536
11554
  /**
11537
11555
  * Get the cropped area position and size data (base on the original image)
@@ -11572,9 +11590,9 @@ var wf = {
11572
11590
  var a = this.options, i = this.imageData, s = this.canvasData, u = {};
11573
11591
  if (this.ready && !this.disabled && vt(t)) {
11574
11592
  var r = !1;
11575
- a.rotatable && W(t.rotate) && t.rotate !== i.rotate && (i.rotate = t.rotate, r = !0), a.scalable && (W(t.scaleX) && t.scaleX !== i.scaleX && (i.scaleX = t.scaleX, r = !0), W(t.scaleY) && t.scaleY !== i.scaleY && (i.scaleY = t.scaleY, r = !0)), r && this.renderCanvas(!0, !0);
11593
+ a.rotatable && G(t.rotate) && t.rotate !== i.rotate && (i.rotate = t.rotate, r = !0), a.scalable && (G(t.scaleX) && t.scaleX !== i.scaleX && (i.scaleX = t.scaleX, r = !0), G(t.scaleY) && t.scaleY !== i.scaleY && (i.scaleY = t.scaleY, r = !0)), r && this.renderCanvas(!0, !0);
11576
11594
  var o = i.width / i.naturalWidth;
11577
- W(t.x) && (u.left = t.x * o + s.left), W(t.y) && (u.top = t.y * o + s.top), W(t.width) && (u.width = t.width * o), W(t.height) && (u.height = t.height * o), this.setCropBoxData(u);
11595
+ G(t.x) && (u.left = t.x * o + s.left), G(t.y) && (u.top = t.y * o + s.top), G(t.width) && (u.width = t.width * o), G(t.height) && (u.height = t.height * o), this.setCropBoxData(u);
11578
11596
  }
11579
11597
  return this;
11580
11598
  },
@@ -11583,14 +11601,14 @@ var wf = {
11583
11601
  * @returns {Object} The result container data.
11584
11602
  */
11585
11603
  getContainerData: function() {
11586
- return this.ready ? ae({}, this.containerData) : {};
11604
+ return this.ready ? ie({}, this.containerData) : {};
11587
11605
  },
11588
11606
  /**
11589
11607
  * Get the image position and size data.
11590
11608
  * @returns {Object} The result image data.
11591
11609
  */
11592
11610
  getImageData: function() {
11593
- return this.sized ? ae({}, this.imageData) : {};
11611
+ return this.sized ? ie({}, this.imageData) : {};
11594
11612
  },
11595
11613
  /**
11596
11614
  * Get the canvas position and size data.
@@ -11609,7 +11627,7 @@ var wf = {
11609
11627
  */
11610
11628
  setCanvasData: function(t) {
11611
11629
  var a = this.canvasData, i = a.aspectRatio;
11612
- return this.ready && !this.disabled && vt(t) && (W(t.left) && (a.left = t.left), W(t.top) && (a.top = t.top), W(t.width) ? (a.width = t.width, a.height = t.width / i) : W(t.height) && (a.height = t.height, a.width = t.height * i), this.renderCanvas(!0)), this;
11630
+ return this.ready && !this.disabled && vt(t) && (G(t.left) && (a.left = t.left), G(t.top) && (a.top = t.top), G(t.width) ? (a.width = t.width, a.height = t.width / i) : G(t.height) && (a.height = t.height, a.width = t.height * i), this.renderCanvas(!0)), this;
11613
11631
  },
11614
11632
  /**
11615
11633
  * Get the crop box position and size data.
@@ -11631,7 +11649,7 @@ var wf = {
11631
11649
  */
11632
11650
  setCropBoxData: function(t) {
11633
11651
  var a = this.cropBoxData, i = this.options.aspectRatio, s, u;
11634
- return this.ready && this.cropped && !this.disabled && vt(t) && (W(t.left) && (a.left = t.left), W(t.top) && (a.top = t.top), W(t.width) && t.width !== a.width && (s = !0, a.width = t.width), W(t.height) && t.height !== a.height && (u = !0, a.height = t.height), i && (s ? a.height = a.width / i : u && (a.width = a.height * i)), this.renderCropBox()), this;
11652
+ return this.ready && this.cropped && !this.disabled && vt(t) && (G(t.left) && (a.left = t.left), G(t.top) && (a.top = t.top), G(t.width) && t.width !== a.width && (s = !0, a.width = t.width), G(t.height) && t.height !== a.height && (u = !0, a.height = t.height), i && (s ? a.height = a.width / i : u && (a.width = a.height * i)), this.renderCropBox()), this;
11635
11653
  },
11636
11654
  /**
11637
11655
  * Get a canvas drawn the cropped image.
@@ -11659,22 +11677,22 @@ var wf = {
11659
11677
  aspectRatio: f,
11660
11678
  width: t.width || (d !== 1 ? i.width : o),
11661
11679
  height: t.height || (d !== 1 ? i.height : c)
11662
- }), C = _.width, L = _.height;
11663
- C = Math.min(E.width, Math.max(T.width, C)), L = Math.min(E.height, Math.max(T.height, L));
11664
- var M = document.createElement("canvas"), w = M.getContext("2d");
11665
- M.width = Mt(C), M.height = Mt(L), w.fillStyle = t.fillColor || "transparent", w.fillRect(0, 0, C, L);
11666
- var Q = t.imageSmoothingEnabled, X = Q === void 0 ? !0 : Q, ie = t.imageSmoothingQuality;
11667
- w.imageSmoothingEnabled = X, ie && (w.imageSmoothingQuality = ie);
11668
- var q = i.width, g = i.height, F = u, $ = r, ue, Ae, He, Ye, Ce, oe;
11669
- F <= -o || F > q ? (F = 0, ue = 0, He = 0, Ce = 0) : F <= 0 ? (He = -F, F = 0, ue = Math.min(q, o + F), Ce = ue) : F <= q && (He = 0, ue = Math.min(o, q - F), Ce = ue), ue <= 0 || $ <= -c || $ > g ? ($ = 0, Ae = 0, Ye = 0, oe = 0) : $ <= 0 ? (Ye = -$, $ = 0, Ae = Math.min(g, c + $), oe = Ae) : $ <= g && (Ye = 0, Ae = Math.min(c, g - $), oe = Ae);
11670
- var ce = [F, $, ue, Ae];
11680
+ }), C = _.width, y = _.height;
11681
+ C = Math.min(E.width, Math.max(T.width, C)), y = Math.min(E.height, Math.max(T.height, y));
11682
+ var L = document.createElement("canvas"), w = L.getContext("2d");
11683
+ L.width = Mt(C), L.height = Mt(y), w.fillStyle = t.fillColor || "transparent", w.fillRect(0, 0, C, y);
11684
+ var X = t.imageSmoothingEnabled, $ = X === void 0 ? !0 : X, se = t.imageSmoothingQuality;
11685
+ w.imageSmoothingEnabled = $, se && (w.imageSmoothingQuality = se);
11686
+ var q = i.width, g = i.height, F = u, W = r, re, Ae, He, Ye, Ce, oe;
11687
+ F <= -o || F > q ? (F = 0, re = 0, He = 0, Ce = 0) : F <= 0 ? (He = -F, F = 0, re = Math.min(q, o + F), Ce = re) : F <= q && (He = 0, re = Math.min(o, q - F), Ce = re), re <= 0 || W <= -c || W > g ? (W = 0, Ae = 0, Ye = 0, oe = 0) : W <= 0 ? (Ye = -W, W = 0, Ae = Math.min(g, c + W), oe = Ae) : W <= g && (Ye = 0, Ae = Math.min(c, g - W), oe = Ae);
11688
+ var ce = [F, W, re, Ae];
11671
11689
  if (Ce > 0 && oe > 0) {
11672
11690
  var xe = C / o;
11673
11691
  ce.push(He * xe, Ye * xe, Ce * xe, oe * xe);
11674
11692
  }
11675
- return w.drawImage.apply(w, [i].concat(Du(ce.map(function(k) {
11676
- return Math.floor(Mt(k));
11677
- })))), M;
11693
+ return w.drawImage.apply(w, [i].concat(Du(ce.map(function(P) {
11694
+ return Math.floor(Mt(P));
11695
+ })))), L;
11678
11696
  },
11679
11697
  /**
11680
11698
  * Change the aspect ratio of the crop box.
@@ -11703,14 +11721,14 @@ var wf = {
11703
11721
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
11704
11722
  if (ef(this, e), !t || !Ef.test(t.tagName))
11705
11723
  throw new Error("The first argument is required and must be an <img> or <canvas> element.");
11706
- this.element = t, this.options = ae({}, tn, vt(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11724
+ this.element = t, this.options = ie({}, tn, vt(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11707
11725
  }
11708
11726
  return tf(e, [{
11709
11727
  key: "init",
11710
11728
  value: function() {
11711
11729
  var a = this.element, i = a.tagName.toLowerCase(), s;
11712
- if (!a[te]) {
11713
- if (a[te] = this, i === "img") {
11730
+ if (!a[ae]) {
11731
+ if (a[ae] = this, i === "img") {
11714
11732
  if (this.isImg = !0, s = a.getAttribute("src") || "", this.originalUrl = s, !s)
11715
11733
  return;
11716
11734
  s = a.src;
@@ -11768,11 +11786,11 @@ var wf = {
11768
11786
  var a = this, i = this.image;
11769
11787
  i.onload = null, i.onerror = null, this.sizing = !0;
11770
11788
  var s = ze.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ze.navigator.userAgent), u = function(d, f) {
11771
- ae(a.imageData, {
11789
+ ie(a.imageData, {
11772
11790
  naturalWidth: d,
11773
11791
  naturalHeight: f,
11774
11792
  aspectRatio: d / f
11775
- }), a.initialImageData = ae({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11793
+ }), a.initialImageData = ie({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11776
11794
  };
11777
11795
  if (i.naturalWidth && !s) {
11778
11796
  u(i.naturalWidth, i.naturalHeight);
@@ -11795,8 +11813,8 @@ var wf = {
11795
11813
  if (!(!this.sized || this.ready)) {
11796
11814
  var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
11797
11815
  r.innerHTML = Tf;
11798
- var o = r.querySelector(".".concat(te, "-container")), c = o.querySelector(".".concat(te, "-canvas")), d = o.querySelector(".".concat(te, "-drag-box")), f = o.querySelector(".".concat(te, "-crop-box")), E = f.querySelector(".".concat(te, "-face"));
11799
- this.container = u, this.cropper = o, this.canvas = c, this.dragBox = d, this.cropBox = f, this.viewBox = o.querySelector(".".concat(te, "-view-box")), this.face = E, c.appendChild(s), pe(a, Le), u.insertBefore(o, a.nextSibling), je(s, Gs), 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, pe(f, Le), i.guides || pe(f.getElementsByClassName("".concat(te, "-dashed")), Le), i.center || pe(f.getElementsByClassName("".concat(te, "-center")), Le), i.background && pe(o, "".concat(te, "-bg")), i.highlight || pe(E, of), i.cropBoxMovable && (pe(E, Oi), da(E, la, us)), i.cropBoxResizable || (pe(f.getElementsByClassName("".concat(te, "-line")), Le), pe(f.getElementsByClassName("".concat(te, "-point")), Le)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), De(i.ready) && we(a, Ks, i.ready, {
11816
+ 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"));
11817
+ 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), pe(a, Le), u.insertBefore(o, a.nextSibling), je(s, Gs), 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, pe(f, Le), i.guides || pe(f.getElementsByClassName("".concat(ae, "-dashed")), Le), i.center || pe(f.getElementsByClassName("".concat(ae, "-center")), Le), i.background && pe(o, "".concat(ae, "-bg")), i.highlight || pe(E, of), i.cropBoxMovable && (pe(E, Oi), da(E, la, us)), i.cropBoxResizable || (pe(f.getElementsByClassName("".concat(ae, "-line")), Le), pe(f.getElementsByClassName("".concat(ae, "-point")), Le)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), De(i.ready) && we(a, Ks, i.ready, {
11800
11818
  once: !0
11801
11819
  }), Pt(a, Ks);
11802
11820
  }
@@ -11831,11 +11849,11 @@ var wf = {
11831
11849
  }, {
11832
11850
  key: "setDefaults",
11833
11851
  value: function(a) {
11834
- ae(tn, vt(a) && a);
11852
+ ie(tn, vt(a) && a);
11835
11853
  }
11836
11854
  }]);
11837
11855
  }();
11838
- ae(Yu.prototype, wf, Bf, Uf, Ff, Hf, Yf);
11856
+ ie(Yu.prototype, wf, Bf, Uf, Ff, Hf, Yf);
11839
11857
  function Vf(e) {
11840
11858
  const t = e.split(","), a = t[0], i = a && a.match && a.match(/:(.*?);/) && a.match(/:(.*?);/)[1], s = t[1] && atob(t[1]);
11841
11859
  let u = s == null ? void 0 : s.length;
@@ -11866,7 +11884,7 @@ const Wf = {
11866
11884
  __name: "index",
11867
11885
  emits: ["cancel", "ok"],
11868
11886
  setup(e, { expose: t, emit: a }) {
11869
- const i = a, s = G({
11887
+ const i = a, s = Q({
11870
11888
  coverUrl: "",
11871
11889
  // 封面url
11872
11890
  inputValue: "",
@@ -11877,7 +11895,7 @@ const Wf = {
11877
11895
  // 视频前缀
11878
11896
  videoUrl: ""
11879
11897
  // 视频url
11880
- }), u = G(), r = G({
11898
+ }), u = Q(), r = Q({
11881
11899
  // 允许自裁
11882
11900
  autoCrop: !0,
11883
11901
  // 设置图片是否可以拖拽功能
@@ -11913,45 +11931,45 @@ const Wf = {
11913
11931
  // crop: (e) => {
11914
11932
  // console.log(e.detail);
11915
11933
  // }
11916
- }), o = G(!1), c = G({
11934
+ }), o = Q(!1), c = Q({
11917
11935
  // 裁剪后的图片
11918
11936
  afterImg: "",
11919
11937
  // 裁剪前的图片
11920
11938
  image: null,
11921
11939
  myCropper: null
11922
- }), d = G("image/jpeg"), f = (q) => {
11940
+ }), d = Q("image/jpeg"), f = (q) => {
11923
11941
  console.log(q);
11924
11942
  const g = q.target.files[0];
11925
11943
  if (g) {
11926
11944
  g.name && (s.value.inputValue = g.name);
11927
11945
  const F = new FileReader();
11928
- F.onload = ($) => {
11929
- var ue, Ae;
11930
- console.log("e?.target?.result", (ue = $ == null ? void 0 : $.target) == null ? void 0 : ue.result), E((Ae = $ == null ? void 0 : $.target) == null ? void 0 : Ae.result);
11946
+ F.onload = (W) => {
11947
+ var re, Ae;
11948
+ console.log("e?.target?.result", (re = W == null ? void 0 : W.target) == null ? void 0 : re.result), E((Ae = W == null ? void 0 : W.target) == null ? void 0 : Ae.result);
11931
11949
  }, F.readAsDataURL(g);
11932
11950
  }
11933
11951
  };
11934
11952
  async function E(q) {
11935
11953
  if (!q)
11936
11954
  return;
11937
- await ie();
11955
+ await se();
11938
11956
  const g = q;
11939
11957
  c.value.image = g, c.value.image && T();
11940
11958
  }
11941
11959
  function T() {
11942
11960
  const q = document.querySelector("#imgId");
11943
11961
  q && q.addEventListener("load", () => {
11944
- X(), c.value.myCropper = new Yu(
11962
+ $(), c.value.myCropper = new Yu(
11945
11963
  q,
11946
11964
  r.value
11947
11965
  );
11948
11966
  });
11949
11967
  }
11950
- const _ = G(!1), C = G();
11951
- function L(q, g, F, $) {
11952
- C.value = $, u.value = q, q && q.aspectRatio && (r.value.aspectRatio = q.aspectRatio), F && (s.value.inputValue = F), _.value = !0, g && E(g);
11968
+ const _ = Q(!1), C = Q();
11969
+ function y(q, g, F, W) {
11970
+ C.value = W, u.value = q, q && q.aspectRatio && (r.value.aspectRatio = q.aspectRatio), F && (s.value.inputValue = F), _.value = !0, g && E(g);
11953
11971
  }
11954
- function M() {
11972
+ function L() {
11955
11973
  _.value = !1;
11956
11974
  }
11957
11975
  const w = () => {
@@ -11970,26 +11988,26 @@ const Wf = {
11970
11988
  c.value.afterImg,
11971
11989
  s.value.inputValue
11972
11990
  );
11973
- i("ok", { options: q, element: C.value }), o.value = !1, ie(), X(), M();
11991
+ i("ok", { options: q, element: C.value }), o.value = !1, se(), $(), L();
11974
11992
  };
11975
- function Q() {
11976
- ie(), X(), M(), i("cancel");
11977
- }
11978
11993
  function X() {
11994
+ se(), $(), L(), i("cancel");
11995
+ }
11996
+ function $() {
11979
11997
  c.value.myCropper && c.value.myCropper.destroy();
11980
11998
  }
11981
- function ie() {
11999
+ function se() {
11982
12000
  c.value.image = "";
11983
12001
  }
11984
- return t({ handleCloseCropper: M, handleOpenCropper: L }), (q, g) => {
11985
- var F, $, ue;
11986
- return _.value ? (O(), R("div", Wf, [
12002
+ return t({ handleCloseCropper: L, handleOpenCropper: y }), (q, g) => {
12003
+ var F, W, re;
12004
+ return _.value ? (D(), M("div", Wf, [
11987
12005
  x("div", Gf, [
11988
12006
  x("div", Xf, [
11989
12007
  g[1] || (g[1] = x("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
11990
12008
  x("span", {
11991
12009
  class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
11992
- onClick: Be(Q, ["stop"])
12010
+ onClick: Be(X, ["stop"])
11993
12011
  })
11994
12012
  ]),
11995
12013
  x("div", Qf, [
@@ -12019,7 +12037,7 @@ const Wf = {
12019
12037
  x("div", t1, [
12020
12038
  x("div", a1, [
12021
12039
  x("div", i1, [
12022
- c.value.image ? H("", !0) : (O(), R("div", s1, " 请上传图片 ")),
12040
+ c.value.image ? H("", !0) : (D(), M("div", s1, " 请上传图片 ")),
12023
12041
  x("img", {
12024
12042
  id: "imgId",
12025
12043
  src: c.value.image,
@@ -12029,7 +12047,7 @@ const Wf = {
12029
12047
  ]),
12030
12048
  x("div", u1, [
12031
12049
  g[4] || (g[4] = x("div", { class: "before w-[270px] h-[200px] pr-[70px] border" }, null, -1)),
12032
- x("div", r1, " 预览画像 " + Se(((F = u.value) == null ? void 0 : F.width) || "") + " " + Se(($ = u.value) != null && $.width ? "x" : "") + " " + Se(((ue = u.value) == null ? void 0 : ue.height) || ""), 1)
12050
+ x("div", r1, " 预览画像 " + Se(((F = u.value) == null ? void 0 : F.width) || "") + " " + Se((W = u.value) != null && W.width ? "x" : "") + " " + Se(((re = u.value) == null ? void 0 : re.height) || ""), 1)
12033
12051
  ])
12034
12052
  ])
12035
12053
  ])
@@ -12045,7 +12063,7 @@ const Wf = {
12045
12063
  }, " 确认 ", 8, c1),
12046
12064
  x("span", {
12047
12065
  class: "!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",
12048
- onClick: Q
12066
+ onClick: X
12049
12067
  }, "取消")
12050
12068
  ])
12051
12069
  ])
@@ -12068,7 +12086,7 @@ const Wf = {
12068
12086
  }
12069
12087
  });
12070
12088
  function h1(e, t, a, i, s, u) {
12071
- return O(), R("span", {
12089
+ return D(), M("span", {
12072
12090
  style: { position: "unset", color: "unset", top: "unset", left: "unset", right: "unset", transform: "unset", "font-size": "unset" },
12073
12091
  class: un(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
12074
12092
  }, null, 2);
@@ -12132,16 +12150,16 @@ const f1 = /* @__PURE__ */ ft(d1, [["render", h1]]), m1 = Ke({
12132
12150
  class: "p-4 border-t border-gray-200 flex justify-end space-x-2"
12133
12151
  };
12134
12152
  function _1(e, t, a, i, s, u) {
12135
- return e.visible ? (O(), R("div", {
12153
+ return e.visible ? (D(), M("div", {
12136
12154
  key: 0,
12137
12155
  class: "fixed inset-0 z-[99999] flex items-center justify-center bg-gray-900 bg-opacity-50",
12138
12156
  onClick: t[3] || (t[3] = Be((...r) => e.onClose && e.onClose(...r), ["self"]))
12139
12157
  }, [
12140
12158
  x("div", E1, [
12141
12159
  x("div", T1, [
12142
- e.title ? (O(), R("h3", p1, Se(e.title), 1)) : H("", !0),
12160
+ e.title ? (D(), M("h3", p1, Se(e.title), 1)) : H("", !0),
12143
12161
  jt(e.$slots, "header"),
12144
- e.showCloseButton ? (O(), R("button", {
12162
+ e.showCloseButton ? (D(), M("button", {
12145
12163
  key: 1,
12146
12164
  class: "text-gray-400 hover:text-gray-600",
12147
12165
  onClick: t[0] || (t[0] = (...r) => e.onClose && e.onClose(...r)),
@@ -12164,14 +12182,14 @@ function _1(e, t, a, i, s, u) {
12164
12182
  x("div", b1, [
12165
12183
  jt(e.$slots, "default")
12166
12184
  ]),
12167
- e.showCancelButton || e.showOkButton ? (O(), R("div", g1, [
12185
+ e.showCancelButton || e.showOkButton ? (D(), M("div", g1, [
12168
12186
  jt(e.$slots, "footer", {}, () => [
12169
- e.showCancelButton ? (O(), R("button", {
12187
+ e.showCancelButton ? (D(), M("button", {
12170
12188
  key: 0,
12171
12189
  class: "px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",
12172
12190
  onClick: t[1] || (t[1] = (...r) => e.onCancel && e.onCancel(...r))
12173
12191
  }, Se(e.cancelText), 1)) : H("", !0),
12174
- e.showOkButton ? (O(), R("button", {
12192
+ e.showOkButton ? (D(), M("button", {
12175
12193
  key: 1,
12176
12194
  class: "px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",
12177
12195
  onClick: t[2] || (t[2] = (...r) => e.onOk && e.onOk(...r))
@@ -12192,7 +12210,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12192
12210
  },
12193
12211
  emits: ["ok"],
12194
12212
  setup(e, { expose: t, emit: a }) {
12195
- const i = e, s = G(i.icons || []);
12213
+ const i = e, s = Q(i.icons || []);
12196
12214
  nt(
12197
12215
  () => i.icons,
12198
12216
  (E) => {
@@ -12200,7 +12218,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12200
12218
  },
12201
12219
  { immediate: !0 }
12202
12220
  );
12203
- const u = a, r = G(!1), o = G();
12221
+ const u = a, r = Q(!1), o = Q();
12204
12222
  function c(E) {
12205
12223
  r.value = !0, o.value = E;
12206
12224
  }
@@ -12210,7 +12228,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12210
12228
  function f() {
12211
12229
  r.value = !1;
12212
12230
  }
12213
- return t({ openModal: c, closeModal: f }), (E, T) => (O(), At(A1, {
12231
+ return t({ openModal: c, closeModal: f }), (E, T) => (D(), At(A1, {
12214
12232
  visible: r.value,
12215
12233
  "onUpdate:visible": T[0] || (T[0] = (_) => r.value = _),
12216
12234
  title: "选择图标",
@@ -12221,7 +12239,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12221
12239
  }, {
12222
12240
  default: Sa(() => [
12223
12241
  x("div", N1, [
12224
- (O(!0), R(zt, null, Pi(s.value, (_) => (O(), At(f1, {
12242
+ (D(!0), M(zt, null, Pi(s.value, (_) => (D(), At(f1, {
12225
12243
  key: _,
12226
12244
  class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
12227
12245
  iconName: _,
@@ -12257,9 +12275,9 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12257
12275
  },
12258
12276
  emits: ["update:modelValue", "update:element"],
12259
12277
  setup(e, { emit: t }) {
12260
- const a = e, i = t, s = G(a.template), u = G();
12278
+ const a = e, i = t, s = Q(a.template), u = Q();
12261
12279
  let r = qs("", {}, !1);
12262
- const o = G("");
12280
+ const o = Q("");
12263
12281
  nt(
12264
12282
  () => a.template,
12265
12283
  (N) => {
@@ -12275,15 +12293,15 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12275
12293
  ), nt(
12276
12294
  () => a.css,
12277
12295
  (N) => {
12278
- N.forEach((D) => {
12279
- if (document.querySelector(`link[href="${D}"]`)) return;
12296
+ N.forEach((v) => {
12297
+ if (document.querySelector(`link[href="${v}"]`)) return;
12280
12298
  const B = document.createElement("link");
12281
- B.rel = "stylesheet", B.href = D, document.head.appendChild(B);
12299
+ B.rel = "stylesheet", B.href = v, document.head.appendChild(B);
12282
12300
  });
12283
12301
  },
12284
12302
  { immediate: !0 }
12285
12303
  );
12286
- const c = G(a.mode);
12304
+ const c = Q(a.mode);
12287
12305
  nt(
12288
12306
  () => u.value,
12289
12307
  (N) => {
@@ -12291,7 +12309,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12291
12309
  },
12292
12310
  { immediate: !0 }
12293
12311
  );
12294
- const d = G("");
12312
+ const d = Q("");
12295
12313
  nt(
12296
12314
  () => o.value,
12297
12315
  (N) => {
@@ -12299,62 +12317,62 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12299
12317
  },
12300
12318
  { immediate: !0 }
12301
12319
  );
12302
- const f = G(), E = G(), T = G(), _ = G(), C = G("");
12303
- function L(N) {
12320
+ const f = Q(), E = Q(), T = Q(), _ = Q(), C = Q("");
12321
+ function y(N) {
12304
12322
  T.value = N;
12305
12323
  }
12306
- function M(N, D = "") {
12307
- if (D) {
12308
- const B = w(u.value, D);
12324
+ function L(N, v = "") {
12325
+ if (v) {
12326
+ const B = w(u.value, v);
12309
12327
  B ? _.value = B : _.value = N;
12310
12328
  } else
12311
12329
  _.value = N;
12312
12330
  }
12313
- function w(N, D) {
12314
- if (N.xpath === D)
12331
+ function w(N, v) {
12332
+ if (N.xpath === v)
12315
12333
  return N;
12316
12334
  if (N.children && N.children.length)
12317
12335
  for (const B of N.children) {
12318
- const Y = w(B, D);
12336
+ const Y = w(B, v);
12319
12337
  if (Y)
12320
12338
  return Y;
12321
12339
  }
12322
12340
  }
12323
- function Q(N, D) {
12341
+ function X(N, v) {
12324
12342
  var B, Y;
12325
- return N.tag === D.tag && // 标签一致
12326
- ((B = N.children) == null ? void 0 : B.length) === ((Y = D.children) == null ? void 0 : Y.length);
12343
+ return N.tag === v.tag && // 标签一致
12344
+ ((B = N.children) == null ? void 0 : B.length) === ((Y = v.children) == null ? void 0 : Y.length);
12327
12345
  }
12328
- function X(N) {
12329
- var B, Y, se, Ie, Pe, he, le, We;
12346
+ function $(N) {
12347
+ var B, Y, ne, Ie, Pe, he, le, We;
12330
12348
  if (T.value.xpath == N.xpath) {
12331
12349
  if (T.value) {
12332
12350
  if (N.type === z.Block) {
12333
- var D = !0;
12351
+ var v = !0;
12334
12352
  const qe = w(
12335
12353
  u.value,
12336
12354
  T.value.parentxpath || ""
12337
12355
  );
12338
12356
  if (qe && qe.children && qe.children.forEach((ke) => {
12339
12357
  if (ke.tag != T.value.tag || // 检查标签一致
12340
- !Q(ke, T.value)) {
12341
- D = !1;
12358
+ !X(ke, T.value)) {
12359
+ v = !1;
12342
12360
  return;
12343
12361
  }
12344
- }), !D) {
12345
- J.error("同级结构不一致,错误配置!");
12362
+ }), !v) {
12363
+ Z.error("同级结构不一致,错误配置!");
12346
12364
  return;
12347
12365
  }
12348
12366
  }
12349
- if (T.value.rule = N.rule, T.value.type = N.type, (B = N.rule) != null && B.isThemeColor ? (!((Y = N.attrs.class) != null && Y.includes("theme_color")) && !((se = N.attrs.class) != null && se.includes(" theme_color")) && (N.attrs.class += " theme_color"), !((Ie = N.attrs.class) != null && Ie.includes("theme_bg")) && !((Pe = N.attrs.class) != null && Pe.includes(" theme_bg")) && (N.attrs.class += " theme_bg"), N.attrs.style && (N.attrs.style = void 0)) : ((he = N.attrs.class) != null && he.includes("theme_color") && (N.attrs.class = N.attrs.class.replace("theme_color", " ")), (le = N.attrs.class) != null && le.includes("theme_bg") && (N.attrs.class = N.attrs.class.replace("theme_bg", " "))), T.value.type === z.Block) {
12367
+ if (T.value.rule = N.rule, T.value.type = N.type, (B = N.rule) != null && B.isThemeColor ? (!((Y = N.attrs.class) != null && Y.includes("theme_color")) && !((ne = N.attrs.class) != null && ne.includes(" theme_color")) && (N.attrs.class += " theme_color"), !((Ie = N.attrs.class) != null && Ie.includes("theme_bg")) && !((Pe = N.attrs.class) != null && Pe.includes(" theme_bg")) && (N.attrs.class += " theme_bg"), N.attrs.style && (N.attrs.style = void 0)) : ((he = N.attrs.class) != null && he.includes("theme_color") && (N.attrs.class = N.attrs.class.replace("theme_color", " ")), (le = N.attrs.class) != null && le.includes("theme_bg") && (N.attrs.class = N.attrs.class.replace("theme_bg", " "))), T.value.type === z.Block) {
12350
12368
  const qe = w(
12351
12369
  u.value,
12352
12370
  T.value.parentxpath || ""
12353
12371
  );
12354
12372
  qe && qe.children && (qe.children.forEach((ke) => {
12355
12373
  if (ke.tag != T.value.tag || // 检查标签一致
12356
- !Q(ke, T.value)) {
12357
- J.error("同级结构不一致,无法配置为块类型");
12374
+ !X(ke, T.value)) {
12375
+ Z.error("同级结构不一致,无法配置为块类型");
12358
12376
  return;
12359
12377
  }
12360
12378
  }), qe.children.forEach((ke) => {
@@ -12364,18 +12382,18 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12364
12382
  } else
12365
12383
  (We = T.value.attrs.class) != null && We.includes(" mb40 relative") && (T.value.attrs.class = T.value.attrs.class.replace(" mb40 relative", " "));
12366
12384
  }
12367
- J.success("保存成功");
12385
+ Z.success("保存成功");
12368
12386
  }
12369
12387
  }
12370
- function ie(N) {
12388
+ function se(N) {
12371
12389
  o.value = N;
12372
12390
  }
12373
12391
  function q(N) {
12374
12392
  r = qs(N);
12375
- const D = r("body").children().toArray().map((B) => g(r(B)));
12376
- return o.value = r("body").html() || "", D[0];
12393
+ const v = r("body").children().toArray().map((B) => g(r(B)));
12394
+ return o.value = r("body").html() || "", v[0];
12377
12395
  }
12378
- function g(N, D = "") {
12396
+ function g(N, v = "") {
12379
12397
  var Pe;
12380
12398
  function B(he) {
12381
12399
  if (!he || !he[0]) return "";
@@ -12387,54 +12405,54 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12387
12405
  }
12388
12406
  return "/html/" + le.join("/");
12389
12407
  }
12390
- const Y = B(N).replace("/html/body[1]", ""), se = N.children().toArray().map((he) => g(r(he), Y)), Ie = (Pe = a.rules) == null ? void 0 : Pe.find((he) => he.xpath === Y);
12408
+ const Y = B(N).replace("/html/body[1]", ""), ne = N.children().toArray().map((he) => g(r(he), Y)), Ie = (Pe = a.rules) == null ? void 0 : Pe.find((he) => he.xpath === Y);
12391
12409
  return {
12392
12410
  tag: N[0].tagName,
12393
12411
  text: N.contents().not(N.children()).text().trim(),
12394
12412
  attrs: N[0].attribs,
12395
- children: se,
12413
+ children: ne,
12396
12414
  xpath: Y,
12397
- parentxpath: D,
12415
+ parentxpath: v,
12398
12416
  type: (Ie == null ? void 0 : Ie.type) || z.None,
12399
12417
  rule: (Ie == null ? void 0 : Ie.rule) || {}
12400
12418
  };
12401
12419
  }
12402
12420
  function F(N) {
12403
12421
  console.log("更新子节点的文本", N);
12404
- const D = w(u.value, N.element.xpath);
12405
- if (D) {
12406
- const B = rn(D);
12422
+ const v = w(u.value, N.element.xpath);
12423
+ if (v) {
12424
+ const B = rn(v);
12407
12425
  B.editText = N.newText;
12408
12426
  }
12409
12427
  }
12410
- function $(N, D = "") {
12411
- function B(Y, se) {
12428
+ function W(N, v = "") {
12429
+ function B(Y, ne) {
12412
12430
  var he;
12413
- const Pe = (se ? ((he = w(u.value, se)) == null ? void 0 : he.children) || [] : [u.value]).filter((le) => le.tag === Y.tag).indexOf(Y) + 1;
12414
- return `${se}/${Y.tag}[${Pe}]`;
12431
+ const Pe = (ne ? ((he = w(u.value, ne)) == null ? void 0 : he.children) || [] : [u.value]).filter((le) => le.tag === Y.tag).indexOf(Y) + 1;
12432
+ return `${ne}/${Y.tag}[${Pe}]`;
12415
12433
  }
12416
- N.xpath = B(N, D), N.parentxpath = D, (N.children || []).forEach(
12417
- (Y) => $(Y, N.xpath)
12434
+ N.xpath = B(N, v), N.parentxpath = v, (N.children || []).forEach(
12435
+ (Y) => W(Y, N.xpath)
12418
12436
  );
12419
12437
  }
12420
- function ue({
12438
+ function re({
12421
12439
  action: N,
12422
- element: D,
12440
+ element: v,
12423
12441
  newBlock: B
12424
12442
  }) {
12425
- console.log("块操作", N, D, B);
12443
+ console.log("块操作", N, v, B);
12426
12444
  const Y = w(
12427
12445
  u.value,
12428
- D.parentxpath || ""
12446
+ v.parentxpath || ""
12429
12447
  );
12430
12448
  if (!Y || !Y.children) return;
12431
- const se = Y.children.findIndex(
12432
- (le) => le === D
12449
+ const ne = Y.children.findIndex(
12450
+ (le) => le === v
12433
12451
  );
12434
- if (se === -1) return;
12435
- const Ie = Y.children.length, { minBlock: Pe, maxBlock: he } = D.rule;
12452
+ if (ne === -1) return;
12453
+ const Ie = Y.children.length, { minBlock: Pe, maxBlock: he } = v.rule;
12436
12454
  if ((N === "add" || N === "copy") && Ie >= (he || 1 / 0)) {
12437
- C.value = `无法添加更多块。最大块数量为 ${he}`, J.error(C.value);
12455
+ C.value = `无法添加更多块。最大块数量为 ${he}`, Z.error(C.value);
12438
12456
  return;
12439
12457
  }
12440
12458
  switch (N) {
@@ -12445,7 +12463,7 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12445
12463
  xpath: "",
12446
12464
  children: JSON.parse(JSON.stringify(B.children))
12447
12465
  };
12448
- Y.children.splice(se + 1, 0, le);
12466
+ Y.children.splice(ne + 1, 0, le);
12449
12467
  }
12450
12468
  break;
12451
12469
  case "copy":
@@ -12455,101 +12473,101 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12455
12473
  xpath: "",
12456
12474
  children: JSON.parse(JSON.stringify(B.children))
12457
12475
  };
12458
- Y.children.splice(se + 1, 0, le);
12476
+ Y.children.splice(ne + 1, 0, le);
12459
12477
  }
12460
12478
  break;
12461
12479
  case "moveUp":
12462
- if (se > 0) {
12463
- const [le] = Y.children.splice(se, 1);
12464
- Y.children.splice(se - 1, 0, le);
12480
+ if (ne > 0) {
12481
+ const [le] = Y.children.splice(ne, 1);
12482
+ Y.children.splice(ne - 1, 0, le);
12465
12483
  }
12466
12484
  break;
12467
12485
  case "moveDown":
12468
- if (se < Y.children.length - 1) {
12469
- const [le] = Y.children.splice(se, 1);
12470
- Y.children.splice(se + 1, 0, le);
12486
+ if (ne < Y.children.length - 1) {
12487
+ const [le] = Y.children.splice(ne, 1);
12488
+ Y.children.splice(ne + 1, 0, le);
12471
12489
  }
12472
12490
  break;
12473
12491
  case "delete":
12474
12492
  if (Ie <= (Pe || 0)) {
12475
- C.value = `无法删除更多块。最小块数量为 ${Pe}`, J.error(C.value);
12493
+ C.value = `无法删除更多块。最小块数量为 ${Pe}`, Z.error(C.value);
12476
12494
  return;
12477
12495
  }
12478
- Y.children.splice(se, 1);
12496
+ Y.children.splice(ne, 1);
12479
12497
  break;
12480
12498
  }
12481
- C.value = "", $(u.value);
12499
+ C.value = "", W(u.value);
12482
12500
  }
12483
- function Ae(N, D) {
12484
- let B = D.attrs.class.replace(/icon-\S+/g, `icon-${N}`);
12485
- D.attrs.class = B;
12501
+ function Ae(N, v) {
12502
+ let B = v.attrs.class.replace(/icon-\S+/g, `icon-${N}`);
12503
+ v.attrs.class = B;
12486
12504
  }
12487
12505
  function He(N) {
12488
- const D = w(u.value, N.element.xpath), B = N.options;
12506
+ const v = w(u.value, N.element.xpath), B = N.options;
12489
12507
  if (typeof B == "object")
12490
12508
  if (console.log("裁剪文件", N), a.uploadByFile)
12491
12509
  a.uploadByFile(B).then((Y) => {
12492
- Y.success && (D.attrs.src = Y.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12510
+ Y.success && (v.attrs.src = Y.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
12493
12511
  });
12494
12512
  else {
12495
- D.attrs.alt = B.name;
12513
+ v.attrs.alt = B.name;
12496
12514
  const Y = new FileReader();
12497
- Y.onload = (se) => {
12515
+ Y.onload = (ne) => {
12498
12516
  var le;
12499
- let Ie = (le = se == null ? void 0 : se.target) == null ? void 0 : le.result, Pe = Vf(Ie), he = URL.createObjectURL(Pe);
12500
- console.log("url", he), D.attrs.src = he, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12517
+ let Ie = (le = ne == null ? void 0 : ne.target) == null ? void 0 : le.result, Pe = Vf(Ie), he = URL.createObjectURL(Pe);
12518
+ console.log("url", he), v.attrs.src = he, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12501
12519
  }, Y.readAsDataURL(B);
12502
12520
  }
12503
12521
  else
12504
- D.attrs.src = B, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12522
+ v.attrs.src = B, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12505
12523
  }
12506
12524
  function Ye(N) {
12507
- const { icon: D } = N, B = w(u.value, N.element.xpath);
12508
- let Y = B.attrs.class.replace(/icon-\S+/g, `icon-${D}`);
12525
+ const { icon: v } = N, B = w(u.value, N.element.xpath);
12526
+ let Y = B.attrs.class.replace(/icon-\S+/g, `icon-${v}`);
12509
12527
  B.attrs.class = Y, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
12510
12528
  }
12511
- const Ce = G(a.previewWidth), oe = G(375);
12512
- let ce = G(!1), xe = G(""), k = 0, v = 0;
12513
- function re(N) {
12514
- xe.value = N, ce.value = !0, k = event.clientX, N === "preview" ? v = Ce.value : N === "structure" && (v = oe.value), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Me);
12529
+ const Ce = Q(a.previewWidth), oe = Q(375);
12530
+ let ce = Q(!1), xe = Q(""), P = 0, O = 0;
12531
+ function ee(N) {
12532
+ xe.value = N, ce.value = !0, P = event.clientX, N === "preview" ? O = Ce.value : N === "structure" && (O = oe.value), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Me);
12515
12533
  }
12516
12534
  function Ee(N) {
12517
12535
  if (!ce.value) return;
12518
- const D = N.clientX - k;
12519
- xe.value === "preview" ? Ce.value = Math.max(200, v + D) : xe.value === "structure" && (oe.value = Math.max(200, v - D));
12536
+ const v = N.clientX - P;
12537
+ xe.value === "preview" ? Ce.value = Math.max(200, O + v) : xe.value === "structure" && (oe.value = Math.max(200, O - v));
12520
12538
  }
12521
12539
  function Me() {
12522
12540
  ce.value = !1, xe.value = "", window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Me);
12523
12541
  }
12524
- return (N, D) => (O(), R("div", I1, [
12525
- N.preview ? (O(), R("div", {
12542
+ return (N, v) => (D(), M("div", I1, [
12543
+ N.preview ? (D(), M("div", {
12526
12544
  key: 0,
12527
12545
  class: "border-l overflow-auto resize-area",
12528
12546
  style: ls({ width: Ce.value + "px" })
12529
12547
  }, [
12530
- N.showTitle ? (O(), R("h2", S1, [
12531
- D[2] || (D[2] = li(" 实时预览 ")),
12548
+ N.showTitle ? (D(), M("h2", S1, [
12549
+ v[2] || (v[2] = li(" 实时预览 ")),
12532
12550
  x("span", x1, Se(Ce.value) + "px", 1)
12533
12551
  ])) : H("", !0),
12534
12552
  x("div", null, [
12535
- o.value ? (O(), R("div", {
12553
+ o.value ? (D(), M("div", {
12536
12554
  key: 0,
12537
12555
  innerHTML: o.value
12538
- }, null, 8, O1)) : (O(), R("div", {
12556
+ }, null, 8, O1)) : (D(), M("div", {
12539
12557
  key: 1,
12540
12558
  innerHTML: fe(r)("body").html()
12541
12559
  }, null, 8, D1))
12542
12560
  ])
12543
12561
  ], 4)) : H("", !0),
12544
- N.preview ? (O(), R("div", {
12562
+ N.preview ? (D(), M("div", {
12545
12563
  key: 1,
12546
12564
  class: "resizer",
12547
- onMousedown: D[0] || (D[0] = (B) => re("preview"))
12565
+ onMousedown: v[0] || (v[0] = (B) => ee("preview"))
12548
12566
  }, null, 32)) : H("", !0),
12549
12567
  x("div", v1, [
12550
- N.showTitle ? (O(), R("h2", L1, "结构渲染")) : H("", !0),
12568
+ N.showTitle ? (D(), M("h2", L1, "结构渲染")) : H("", !0),
12551
12569
  x("div", y1, [
12552
- u.value ? (O(), At(Lh, {
12570
+ u.value ? (D(), At(Lh, {
12553
12571
  key: 0,
12554
12572
  cropper: f.value,
12555
12573
  icon: E.value,
@@ -12560,34 +12578,34 @@ const A1 = /* @__PURE__ */ ft(m1, [["render", _1]]), N1 = { class: "p-4 flex fle
12560
12578
  selectedElement: T.value,
12561
12579
  hoveredElement: _.value,
12562
12580
  "upload-by-file": N.uploadByFile,
12563
- onSelectElement: L,
12564
- onHoverElement: M,
12565
- onContentUpdated: ie,
12581
+ onSelectElement: y,
12582
+ onHoverElement: L,
12583
+ onContentUpdated: se,
12566
12584
  onUpdateText: F,
12567
- onBlockAction: ue,
12585
+ onBlockAction: re,
12568
12586
  onAddIcon: Ae
12569
12587
  }, null, 8, ["cropper", "icon", "mode", "icons", "r", "element", "selectedElement", "hoveredElement", "upload-by-file"])) : H("", !0)
12570
12588
  ])
12571
12589
  ]),
12572
- c.value == "design" ? (O(), R("div", {
12590
+ c.value == "design" ? (D(), M("div", {
12573
12591
  key: 2,
12574
12592
  class: "resizer",
12575
- onMousedown: D[1] || (D[1] = (B) => re("structure"))
12593
+ onMousedown: v[1] || (v[1] = (B) => ee("structure"))
12576
12594
  }, null, 32)) : H("", !0),
12577
- c.value == "design" ? (O(), R("div", {
12595
+ c.value == "design" ? (D(), M("div", {
12578
12596
  key: 3,
12579
12597
  class: "resize-area overflow-auto",
12580
12598
  style: ls({ width: oe.value + "px" })
12581
12599
  }, [
12582
- N.showTitle ? (O(), R("h2", R1, [
12583
- D[3] || (D[3] = li(" 节点属性 ")),
12600
+ N.showTitle ? (D(), M("h2", R1, [
12601
+ v[3] || (v[3] = li(" 节点属性 ")),
12584
12602
  x("span", M1, Se(oe.value) + "px", 1)
12585
12603
  ])) : H("", !0),
12586
12604
  x("div", P1, [
12587
- T.value ? (O(), At(Zh, {
12605
+ T.value ? (D(), At(Zh, {
12588
12606
  key: 0,
12589
12607
  element: T.value,
12590
- onUpdateElement: X
12608
+ onUpdateElement: $
12591
12609
  }, null, 8, ["element"])) : H("", !0)
12592
12610
  ])
12593
12611
  ], 4)) : H("", !0),