template-designer 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,14 +20,14 @@ const ud = {
20
20
  },
21
21
  setup(e) {
22
22
  const A = e, t = J(() => {
23
- var B, f, g, p;
23
+ var B, f, h, p;
24
24
  let d = "";
25
- A.modelValue.Text || (d = ((p = (g = (f = (B = A.modelValue) == null ? void 0 : B.options) == null ? void 0 : f.fields) == null ? void 0 : g.find((U) => {
25
+ A.modelValue.Text || (d = ((p = (h = (f = (B = A.modelValue) == null ? void 0 : B.options) == null ? void 0 : f.fields) == null ? void 0 : h.find((U) => {
26
26
  var Q;
27
27
  return U.value == ((Q = A.modelValue) == null ? void 0 : Q.FieldName);
28
28
  })) == null ? void 0 : p.label) || "");
29
- const h = A.modelValue.Text || d;
30
- return A.modelValue.Title ? `${A.modelValue.Title}${h}` : h;
29
+ const g = A.modelValue.Text || d;
30
+ return A.modelValue.Title ? `${A.modelValue.Title}${g}` : g;
31
31
  }), r = Y({}), n = J(() => A.modelValue.__selected || !1), a = J(() => ({
32
32
  position: "absolute",
33
33
  left: "-2px",
@@ -47,21 +47,21 @@ const ud = {
47
47
  overflow: "hidden",
48
48
  boxSizing: "border-box"
49
49
  })), i = Y(/* @__PURE__ */ new Map()), l = (d) => {
50
- var B, f, g, p, U, Q;
50
+ var B, f, h, p, U, Q;
51
51
  if (i.value.has(d))
52
52
  return i.value.get(d);
53
- const h = ((Q = (U = (p = (g = (f = (B = A.propsConfig) == null ? void 0 : B.text) == null ? void 0 : f.propertyPanel) == null ? void 0 : g.find((w) => w.prop == "FontName")) == null ? void 0 : p.options) == null ? void 0 : U.find((w) => w.value == d)) == null ? void 0 : Q.cssValue) || d;
54
- return i.value.set(d, h), h;
53
+ const g = ((Q = (U = (p = (h = (f = (B = A.propsConfig) == null ? void 0 : B.text) == null ? void 0 : f.propertyPanel) == null ? void 0 : h.find((w) => w.prop == "FontName")) == null ? void 0 : p.options) == null ? void 0 : U.find((w) => w.value == d)) == null ? void 0 : Q.cssValue) || d;
54
+ return i.value.set(d, g), g;
55
55
  }, s = {
56
56
  1: "left",
57
57
  2: "center",
58
58
  3: "right"
59
59
  }, c = J(() => {
60
- const d = A.modelValue.TextWrap ?? r.value.TextWrap ?? 1, h = A.modelValue.FontSize ?? r.value.FontSize, B = A.modelValue.FontName || r.value.FontName, f = A.modelValue.Bold || r.value.Bold, g = A.modelValue.Italic || r.value.Italic, p = A.modelValue.FontColor || r.value.FontColor, U = A.modelValue.Alignment || r.value.Alignment || 2, Q = {
61
- fontSize: h + "px",
60
+ const d = A.modelValue.TextWrap ?? r.value.TextWrap ?? 1, g = A.modelValue.FontSize ?? r.value.FontSize, B = A.modelValue.FontName || r.value.FontName, f = A.modelValue.Bold || r.value.Bold, h = A.modelValue.Italic || r.value.Italic, p = A.modelValue.FontColor || r.value.FontColor, U = A.modelValue.Alignment || r.value.Alignment || 2, Q = {
61
+ fontSize: g + "px",
62
62
  fontFamily: l(B),
63
63
  fontWeight: f ? "bold" : "normal",
64
- fontStyle: g ? "italic" : "normal",
64
+ fontStyle: h ? "italic" : "normal",
65
65
  color: p,
66
66
  width: "100%",
67
67
  minWidth: 0,
@@ -81,11 +81,11 @@ const ud = {
81
81
  }
82
82
  return Q;
83
83
  }), u = () => {
84
- var h, B;
85
- const d = gt((B = (h = A.propsConfig) == null ? void 0 : h.text) == null ? void 0 : B.propertyPanel) || {};
84
+ var g, B;
85
+ const d = gt((B = (g = A.propsConfig) == null ? void 0 : g.text) == null ? void 0 : B.propertyPanel) || {};
86
86
  r.value = d, i.value.clear();
87
87
  };
88
- return QA(() => A.propsConfig, () => u(), { deep: !0, immediate: !0 }), (d, h) => (M(), Z("div", {
88
+ return QA(() => A.propsConfig, () => u(), { deep: !0, immediate: !0 }), (d, g) => (M(), Z("div", {
89
89
  class: "td-text-component",
90
90
  style: nA(o.value)
91
91
  }, [
@@ -113,26 +113,26 @@ const ud = {
113
113
  b: (f = "") => qe(t.value, e, f, "", ""),
114
114
  e: (f) => f ? qe(t.value, e, "", f, "") : "",
115
115
  m: (f) => f ? qe(t.value, e, "", "", f) : "",
116
- be: (f, g) => f && g ? qe(t.value, e, f, g, "") : "",
117
- em: (f, g) => f && g ? qe(t.value, e, "", f, g) : "",
118
- bm: (f, g) => f && g ? qe(t.value, e, f, "", g) : "",
119
- bem: (f, g, p) => f && g && p ? qe(t.value, e, f, g, p) : "",
120
- is: (f, ...g) => {
121
- const p = g.length >= 1 ? g[0] : !0;
116
+ be: (f, h) => f && h ? qe(t.value, e, f, h, "") : "",
117
+ em: (f, h) => f && h ? qe(t.value, e, "", f, h) : "",
118
+ bm: (f, h) => f && h ? qe(t.value, e, f, "", h) : "",
119
+ bem: (f, h, p) => f && h && p ? qe(t.value, e, f, h, p) : "",
120
+ is: (f, ...h) => {
121
+ const p = h.length >= 1 ? h[0] : !0;
122
122
  return f && p ? `${dd}${f}` : "";
123
123
  },
124
124
  cssVar: (f) => {
125
- const g = {};
125
+ const h = {};
126
126
  for (const p in f)
127
- f[p] && (g[`--${t.value}-${p}`] = f[p]);
128
- return g;
127
+ f[p] && (h[`--${t.value}-${p}`] = f[p]);
128
+ return h;
129
129
  },
130
130
  cssVarName: (f) => `--${t.value}-${f}`,
131
131
  cssVarBlock: (f) => {
132
- const g = {};
132
+ const h = {};
133
133
  for (const p in f)
134
- f[p] && (g[`--${t.value}-${e}-${p}`] = f[p]);
135
- return g;
134
+ f[p] && (h[`--${t.value}-${e}-${p}`] = f[p]);
135
+ return h;
136
136
  },
137
137
  cssVarBlockName: (f) => `--${t.value}-${e}-${f}`
138
138
  };
@@ -488,8 +488,8 @@ function _B(...e) {
488
488
  Array.isArray(t) || (t = [t]), Array.isArray(r) || (r = [r]);
489
489
  const a = [], o = () => {
490
490
  a.forEach((c) => c()), a.length = 0;
491
- }, i = (c, u, d, h) => (c.addEventListener(u, d, h), () => c.removeEventListener(u, d, h)), l = QA(() => [Zs(A), Do(n)], ([c, u]) => {
492
- o(), c && a.push(...t.flatMap((d) => r.map((h) => i(c, d, h, u))));
491
+ }, i = (c, u, d, g) => (c.addEventListener(u, d, g), () => c.removeEventListener(u, d, g)), l = QA(() => [Zs(A), Do(n)], ([c, u]) => {
492
+ o(), c && a.push(...t.flatMap((d) => r.map((g) => i(c, d, g, u))));
493
493
  }, { immediate: !0, flush: "post" }), s = () => {
494
494
  l(), o();
495
495
  };
@@ -780,7 +780,7 @@ const c0 = (e) => (A, t) => u0(A, t, b(e)), u0 = (e, A, t) => DB(t, e, e).replac
780
780
  validator: t || o ? (s) => {
781
781
  let c = !1, u = [];
782
782
  if (t && (u = Array.from(t), Wi(e, "default") && u.push(n), c || (c = u.includes(s))), o && (c || (c = o(s))), !c && u.length > 0) {
783
- const d = [...new Set(u)].map((h) => JSON.stringify(h)).join(", ");
783
+ const d = [...new Set(u)].map((g) => JSON.stringify(g)).join(", ");
784
784
  Ad(`Invalid prop: validation failed${A ? ` for prop "${A}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(s)}.`);
785
785
  }
786
786
  return c;
@@ -1250,21 +1250,21 @@ const Ps = [
1250
1250
  emits: G0,
1251
1251
  setup(e, { expose: A, emit: t }) {
1252
1252
  const r = e, { Close: n } = b0, a = Y(!1), { ns: o, zIndex: i } = w0("message"), { currentZIndex: l, nextZIndex: s } = i, c = Y(), u = Y(!1), d = Y(0);
1253
- let h;
1253
+ let g;
1254
1254
  const B = J(() => r.type ? r.type === "error" ? "danger" : r.type : "info"), f = J(() => {
1255
1255
  const F = r.type;
1256
1256
  return { [o.bm("icon", F)]: F && rl[F] };
1257
- }), g = J(() => r.icon || rl[r.type] || ""), p = J(() => z0(r.id)), U = J(() => j0(r.id, r.offset) + p.value), Q = J(() => d.value + U.value), w = J(() => ({
1257
+ }), h = J(() => r.icon || rl[r.type] || ""), p = J(() => z0(r.id)), U = J(() => j0(r.id, r.offset) + p.value), Q = J(() => d.value + U.value), w = J(() => ({
1258
1258
  top: `${U.value}px`,
1259
1259
  zIndex: l.value
1260
1260
  }));
1261
1261
  function m() {
1262
- r.duration !== 0 && ({ stop: h } = PB(() => {
1262
+ r.duration !== 0 && ({ stop: g } = PB(() => {
1263
1263
  N();
1264
1264
  }, r.duration));
1265
1265
  }
1266
1266
  function E() {
1267
- h == null || h();
1267
+ g == null || g();
1268
1268
  }
1269
1269
  function N() {
1270
1270
  u.value = !1, fe(() => {
@@ -1315,12 +1315,12 @@ const Ps = [
1315
1315
  type: b(B),
1316
1316
  class: zA(b(o).e("badge"))
1317
1317
  }, null, 8, ["value", "type", "class"])) : uA("v-if", !0),
1318
- b(g) ? (M(), SA(b(tl), {
1318
+ b(h) ? (M(), SA(b(tl), {
1319
1319
  key: 1,
1320
1320
  class: zA([b(o).e("icon"), b(f)])
1321
1321
  }, {
1322
1322
  default: tA(() => [
1323
- (M(), SA(mr(b(g))))
1323
+ (M(), SA(mr(b(h))))
1324
1324
  ]),
1325
1325
  _: 1
1326
1326
  }, 8, ["class"])) : uA("v-if", !0),
@@ -1476,37 +1476,37 @@ const MA = (e, A) => {
1476
1476
  }), u = () => {
1477
1477
  n.value && !a.value && n.value.click();
1478
1478
  }, d = (f) => {
1479
- const g = f.target.value.trim();
1480
- g ? g.startsWith("http://") || g.startsWith("https://") || g.startsWith("data:") ? s.value = g : g.startsWith("data:") || (s.value = g) : s.value = "";
1481
- }, h = async (f) => {
1479
+ const h = f.target.value.trim();
1480
+ h ? h.startsWith("http://") || h.startsWith("https://") || h.startsWith("data:") ? s.value = h : h.startsWith("data:") || (s.value = h) : s.value = "";
1481
+ }, g = async (f) => {
1482
1482
  var Q;
1483
- const g = f.target.files[0];
1484
- if (!g)
1483
+ const h = f.target.files[0];
1484
+ if (!h)
1485
1485
  return;
1486
- if (t.accept && !g.type.match(t.accept.replace("*", ".*"))) {
1486
+ if (t.accept && !h.type.match(t.accept.replace("*", ".*"))) {
1487
1487
  alert("请选择正确的文件类型");
1488
1488
  return;
1489
1489
  }
1490
1490
  const p = (Q = l == null ? void 0 : l.image) == null ? void 0 : Q.request;
1491
1491
  if (!p || typeof p != "function") {
1492
- handleFileAsBase64(g);
1492
+ handleFileAsBase64(h);
1493
1493
  return;
1494
1494
  }
1495
- i.value = g;
1495
+ i.value = h;
1496
1496
  let U = null;
1497
1497
  try {
1498
- a.value = !0, U = p(g), o.value = U;
1498
+ a.value = !0, U = p(h), o.value = U;
1499
1499
  const w = await U;
1500
- if (o.value === U && i.value === g)
1500
+ if (o.value === U && i.value === h)
1501
1501
  if (w && w.success !== !1) {
1502
1502
  let E = w.url || w.data || w;
1503
1503
  try {
1504
- const H = await B(g);
1504
+ const H = await B(h);
1505
1505
  H && (E = H);
1506
1506
  } catch {
1507
1507
  }
1508
1508
  const N = {
1509
- fileName: g.name,
1509
+ fileName: h.name,
1510
1510
  fileSrc: E,
1511
1511
  uploadResult: w
1512
1512
  };
@@ -1514,11 +1514,11 @@ const MA = (e, A) => {
1514
1514
  } else
1515
1515
  throw new Error((w == null ? void 0 : w.message) || "上传失败");
1516
1516
  } catch (w) {
1517
- o.value === U && i.value === g && (n.value && (n.value.value = ""), yr.error(w.message || "上传失败,请重试"));
1517
+ o.value === U && i.value === h && (n.value && (n.value.value = ""), yr.error(w.message || "上传失败,请重试"));
1518
1518
  } finally {
1519
1519
  o.value === U && (a.value = !1, o.value = null, i.value = null);
1520
1520
  }
1521
- }, B = (f) => new Promise((g, p) => {
1521
+ }, B = (f) => new Promise((h, p) => {
1522
1522
  const Q = f.size > 5242880;
1523
1523
  if (f.type.startsWith("image/"))
1524
1524
  if (Q) {
@@ -1535,7 +1535,7 @@ const MA = (e, A) => {
1535
1535
  }
1536
1536
  m.width = V, m.height = v, E.drawImage(w, 0, 0, V, v);
1537
1537
  const x = m.toDataURL("image/jpeg", 0.8);
1538
- g(x);
1538
+ h(x);
1539
1539
  } catch (F) {
1540
1540
  p(F);
1541
1541
  } finally {
@@ -1551,7 +1551,7 @@ const MA = (e, A) => {
1551
1551
  p(new Error("转换超时"));
1552
1552
  }, 5e3);
1553
1553
  w.onload = (E) => {
1554
- clearTimeout(m), g(E.target.result);
1554
+ clearTimeout(m), h(E.target.result);
1555
1555
  }, w.onerror = () => {
1556
1556
  clearTimeout(m), p(new Error("文件读取失败"));
1557
1557
  }, w.readAsDataURL(f);
@@ -1561,7 +1561,7 @@ const MA = (e, A) => {
1561
1561
  p(new Error("转换超时"));
1562
1562
  }, 5e3);
1563
1563
  w.onload = (E) => {
1564
- clearTimeout(m), g(E.target.result);
1564
+ clearTimeout(m), h(E.target.result);
1565
1565
  }, w.onerror = () => {
1566
1566
  clearTimeout(m), p(new Error("文件读取失败"));
1567
1567
  }, w.readAsDataURL(f);
@@ -1569,13 +1569,13 @@ const MA = (e, A) => {
1569
1569
  });
1570
1570
  return rd(() => {
1571
1571
  o.value = null, i.value = null;
1572
- }), (f, g) => {
1572
+ }), (f, h) => {
1573
1573
  const p = yA("el-icon-loading"), U = yA("el-icon");
1574
1574
  return M(), Z("div", tf, [
1575
1575
  e.label ? (M(), Z("label", rf, Ce(e.label), 1)) : uA("", !0),
1576
1576
  e.type === "select" ? Ae((M(), Z("select", {
1577
1577
  key: 1,
1578
- "onUpdate:modelValue": g[0] || (g[0] = (Q) => s.value = Q)
1578
+ "onUpdate:modelValue": h[0] || (h[0] = (Q) => s.value = Q)
1579
1579
  }, [
1580
1580
  (M(!0), Z(HA, null, Je(e.options, (Q) => (M(), Z("option", {
1581
1581
  key: Q.value,
@@ -1585,20 +1585,20 @@ const MA = (e, A) => {
1585
1585
  [nd, s.value]
1586
1586
  ]) : e.type === "color" ? Ae((M(), Z("input", {
1587
1587
  key: 2,
1588
- "onUpdate:modelValue": g[1] || (g[1] = (Q) => s.value = Q),
1588
+ "onUpdate:modelValue": h[1] || (h[1] = (Q) => s.value = Q),
1589
1589
  type: "color"
1590
1590
  }, null, 512)), [
1591
1591
  [et, s.value]
1592
1592
  ]) : e.type === "checkbox" ? Ae((M(), Z("input", {
1593
1593
  key: 3,
1594
- "onUpdate:modelValue": g[2] || (g[2] = (Q) => s.value = Q),
1594
+ "onUpdate:modelValue": h[2] || (h[2] = (Q) => s.value = Q),
1595
1595
  type: "checkbox"
1596
1596
  }, null, 512)), [
1597
1597
  [ad, s.value]
1598
1598
  ]) : e.type === "file" ? (M(), Z("div", af, [
1599
1599
  Ae(R("input", {
1600
1600
  type: "text",
1601
- "onUpdate:modelValue": g[3] || (g[3] = (Q) => c.value = Q),
1601
+ "onUpdate:modelValue": h[3] || (h[3] = (Q) => c.value = Q),
1602
1602
  placeholder: "请选择图片",
1603
1603
  class: "file-url-input",
1604
1604
  onInput: d,
@@ -1625,14 +1625,14 @@ const MA = (e, A) => {
1625
1625
  R("input", {
1626
1626
  type: "file",
1627
1627
  accept: e.accept,
1628
- onChange: h,
1628
+ onChange: g,
1629
1629
  ref_key: "fileInput",
1630
1630
  ref: n,
1631
1631
  class: "file-input"
1632
1632
  }, null, 40, sf)
1633
1633
  ])) : Ae((M(), Z("input", {
1634
1634
  key: 5,
1635
- "onUpdate:modelValue": g[4] || (g[4] = (Q) => s.value = Q),
1635
+ "onUpdate:modelValue": h[4] || (h[4] = (Q) => s.value = Q),
1636
1636
  type: e.type,
1637
1637
  min: e.min,
1638
1638
  max: e.max,
@@ -1678,10 +1678,10 @@ const df = { class: "property-layout-container" }, Bf = {
1678
1678
  setup(e, { emit: A }) {
1679
1679
  const t = e, r = A, { propsConfig: n, panelType: a } = id(t), o = J(() => `${a.value}-property-panel`), i = J(() => {
1680
1680
  const d = n.value.propertyPanel;
1681
- return d && typeof d == "object" && !Array.isArray(d) ? Object.keys(d).map((h) => ({
1682
- prop: h,
1683
- ...d[h]
1684
- })).filter((h) => !h.hide) : Array.isArray(d) ? d.filter((h) => !h.hide) || [] : [];
1681
+ return d && typeof d == "object" && !Array.isArray(d) ? Object.keys(d).map((g) => ({
1682
+ prop: g,
1683
+ ...d[g]
1684
+ })).filter((g) => !g.hide) : Array.isArray(d) ? d.filter((g) => !g.hide) || [] : [];
1685
1685
  }), l = J({
1686
1686
  get: () => t.modelValue,
1687
1687
  set: (d) => r("update:modelValue", d)
@@ -1691,10 +1691,10 @@ const df = { class: "property-layout-container" }, Bf = {
1691
1691
  var B;
1692
1692
  if (d.options)
1693
1693
  return d.options || [];
1694
- const h = JSON.parse(JSON.stringify(((B = t.options) == null ? void 0 : B[d == null ? void 0 : d.optionsKey]) || [])) || [];
1695
- return h.unshift({ label: "无", value: "" }), h;
1694
+ const g = JSON.parse(JSON.stringify(((B = t.options) == null ? void 0 : B[d == null ? void 0 : d.optionsKey]) || [])) || [];
1695
+ return g.unshift({ label: "无", value: "" }), g;
1696
1696
  }, u = (d) => d.layout ? d.layout : ["text", "file", "textarea"].includes(d.type) ? "full" : "half";
1697
- return vs("config", t.propsConfig), (d, h) => (M(), Z("div", {
1697
+ return vs("config", t.propsConfig), (d, g) => (M(), Z("div", {
1698
1698
  class: zA(o.value)
1699
1699
  }, [
1700
1700
  R("div", df, [
@@ -4467,7 +4467,7 @@ const EQ = {
4467
4467
  var p, U, Q, w, m, E, N, H, F, V;
4468
4468
  if (!t.value)
4469
4469
  return;
4470
- const c = gt((U = (p = A.propsConfig) == null ? void 0 : p.barcode) == null ? void 0 : U.propertyPanel) || {}, u = ((Q = A.modelValue) == null ? void 0 : Q.BarcodeValue) || c.BarcodeValue || "", d = ((w = A.modelValue) == null ? void 0 : w.CodeType) || c.CodeType || "", h = A.modelValue.LineColor || c.LineColor, B = ((V = (F = (H = (N = (E = (m = A.propsConfig) == null ? void 0 : m.barcode) == null ? void 0 : E.propertyPanel) == null ? void 0 : N.find((v) => v.prop === "CodeType")) == null ? void 0 : H.options) == null ? void 0 : F.find((v) => v.value === d)) == null ? void 0 : V.compValue) || "", f = { value: u, type: d, lineColor: h, codeType: B };
4470
+ const c = gt((U = (p = A.propsConfig) == null ? void 0 : p.barcode) == null ? void 0 : U.propertyPanel) || {}, u = ((Q = A.modelValue) == null ? void 0 : Q.BarcodeValue) || c.BarcodeValue || "", d = ((w = A.modelValue) == null ? void 0 : w.CodeType) || c.CodeType || "", g = A.modelValue.LineColor || c.LineColor, B = ((V = (F = (H = (N = (E = (m = A.propsConfig) == null ? void 0 : m.barcode) == null ? void 0 : E.propertyPanel) == null ? void 0 : N.find((v) => v.prop === "CodeType")) == null ? void 0 : H.options) == null ? void 0 : F.find((v) => v.value === d)) == null ? void 0 : V.compValue) || "", f = { value: u, type: d, lineColor: g, codeType: B };
4471
4471
  if (JSON.stringify(f) !== JSON.stringify(i.value)) {
4472
4472
  i.value = f;
4473
4473
  try {
@@ -4481,7 +4481,7 @@ const EQ = {
4481
4481
  // 条形码的边距
4482
4482
  margin: 0,
4483
4483
  // 条形码的颜色
4484
- lineColor: h,
4484
+ lineColor: g,
4485
4485
  // 条形码的高度
4486
4486
  height: 50,
4487
4487
  // 确保条形码能够正确渲染
@@ -4775,8 +4775,8 @@ var Vc = {};
4775
4775
  for (let u = 0; u < a; u++) {
4776
4776
  i = l = 0, s = c = null;
4777
4777
  for (let d = 0; d < a; d++) {
4778
- let h = n.get(u, d);
4779
- h === s ? i++ : (i >= 5 && (o += A.N1 + (i - 5)), s = h, i = 1), h = n.get(d, u), h === c ? l++ : (l >= 5 && (o += A.N1 + (l - 5)), c = h, l = 1);
4778
+ let g = n.get(u, d);
4779
+ g === s ? i++ : (i >= 5 && (o += A.N1 + (i - 5)), s = g, i = 1), g = n.get(d, u), g === c ? l++ : (l >= 5 && (o += A.N1 + (l - 5)), c = g, l = 1);
4780
4780
  }
4781
4781
  i >= 5 && (o += A.N1 + (i - 5)), l >= 5 && (o += A.N1 + (l - 5));
4782
4782
  }
@@ -5352,36 +5352,36 @@ Ee.testAlphanumeric = function(A) {
5352
5352
  })(Pe);
5353
5353
  (function(e) {
5354
5354
  const A = te, t = aa, r = na, n = Pe, a = mi, o = 7973, i = A.getBCHDigit(o);
5355
- function l(d, h, B) {
5355
+ function l(d, g, B) {
5356
5356
  for (let f = 1; f <= 40; f++)
5357
- if (h <= e.getCapacity(f, B, d))
5357
+ if (g <= e.getCapacity(f, B, d))
5358
5358
  return f;
5359
5359
  }
5360
- function s(d, h) {
5361
- return n.getCharCountIndicator(d, h) + 4;
5360
+ function s(d, g) {
5361
+ return n.getCharCountIndicator(d, g) + 4;
5362
5362
  }
5363
- function c(d, h) {
5363
+ function c(d, g) {
5364
5364
  let B = 0;
5365
5365
  return d.forEach(function(f) {
5366
- const g = s(f.mode, h);
5367
- B += g + f.getBitsLength();
5366
+ const h = s(f.mode, g);
5367
+ B += h + f.getBitsLength();
5368
5368
  }), B;
5369
5369
  }
5370
- function u(d, h) {
5370
+ function u(d, g) {
5371
5371
  for (let B = 1; B <= 40; B++)
5372
- if (c(d, B) <= e.getCapacity(B, h, n.MIXED))
5372
+ if (c(d, B) <= e.getCapacity(B, g, n.MIXED))
5373
5373
  return B;
5374
5374
  }
5375
- e.from = function(h, B) {
5376
- return a.isValid(h) ? parseInt(h, 10) : B;
5377
- }, e.getCapacity = function(h, B, f) {
5378
- if (!a.isValid(h))
5375
+ e.from = function(g, B) {
5376
+ return a.isValid(g) ? parseInt(g, 10) : B;
5377
+ }, e.getCapacity = function(g, B, f) {
5378
+ if (!a.isValid(g))
5379
5379
  throw new Error("Invalid QR Code version");
5380
5380
  typeof f > "u" && (f = n.BYTE);
5381
- const g = A.getSymbolTotalCodewords(h), p = t.getTotalCodewordsCount(h, B), U = (g - p) * 8;
5381
+ const h = A.getSymbolTotalCodewords(g), p = t.getTotalCodewordsCount(g, B), U = (h - p) * 8;
5382
5382
  if (f === n.MIXED)
5383
5383
  return U;
5384
- const Q = U - s(f, h);
5384
+ const Q = U - s(f, g);
5385
5385
  switch (f) {
5386
5386
  case n.NUMERIC:
5387
5387
  return Math.floor(Q / 10 * 3);
@@ -5393,25 +5393,25 @@ Ee.testAlphanumeric = function(A) {
5393
5393
  default:
5394
5394
  return Math.floor(Q / 8);
5395
5395
  }
5396
- }, e.getBestVersionForData = function(h, B) {
5396
+ }, e.getBestVersionForData = function(g, B) {
5397
5397
  let f;
5398
- const g = r.from(B, r.M);
5399
- if (Array.isArray(h)) {
5400
- if (h.length > 1)
5401
- return u(h, g);
5402
- if (h.length === 0)
5398
+ const h = r.from(B, r.M);
5399
+ if (Array.isArray(g)) {
5400
+ if (g.length > 1)
5401
+ return u(g, h);
5402
+ if (g.length === 0)
5403
5403
  return 1;
5404
- f = h[0];
5404
+ f = g[0];
5405
5405
  } else
5406
- f = h;
5407
- return l(f.mode, f.getLength(), g);
5408
- }, e.getEncodedBits = function(h) {
5409
- if (!a.isValid(h) || h < 7)
5406
+ f = g;
5407
+ return l(f.mode, f.getLength(), h);
5408
+ }, e.getEncodedBits = function(g) {
5409
+ if (!a.isValid(g) || g < 7)
5410
5410
  throw new Error("Invalid QR Code version");
5411
- let B = h << 12;
5411
+ let B = g << 12;
5412
5412
  for (; A.getBCHDigit(B) - i >= 0; )
5413
5413
  B ^= o << A.getBCHDigit(B) - i;
5414
- return h << 12 | B;
5414
+ return g << 12 | B;
5415
5415
  };
5416
5416
  })(Nc);
5417
5417
  var Mc = {};
@@ -5568,10 +5568,10 @@ var XQ = kt, xc = { exports: {} };
5568
5568
  o[r] = 0;
5569
5569
  var i = A.PriorityQueue.make();
5570
5570
  i.push(r, 0);
5571
- for (var l, s, c, u, d, h, B, f, g; !i.empty(); ) {
5571
+ for (var l, s, c, u, d, g, B, f, h; !i.empty(); ) {
5572
5572
  l = i.pop(), s = l.value, u = l.cost, d = t[s] || {};
5573
5573
  for (c in d)
5574
- d.hasOwnProperty(c) && (h = d[c], B = u + h, f = o[c], g = typeof o[c] > "u", (g || f > B) && (o[c] = B, i.push(c, B), a[c] = s));
5574
+ d.hasOwnProperty(c) && (g = d[c], B = u + g, f = o[c], h = typeof o[c] > "u", (h || f > B) && (o[c] = B, i.push(c, B), a[c] = s));
5575
5575
  }
5576
5576
  if (typeof n < "u" && typeof o[n] > "u") {
5577
5577
  var p = ["Could not find a path from ", r, " to ", n, "."].join("");
@@ -5669,7 +5669,7 @@ var PQ = xc.exports;
5669
5669
  return n.getBitsLength(p);
5670
5670
  }
5671
5671
  }
5672
- function h(p) {
5672
+ function g(p) {
5673
5673
  return p.reduce(function(U, Q) {
5674
5674
  const w = U.length - 1 >= 0 ? U[U.length - 1] : null;
5675
5675
  return w && w.mode === Q.mode ? (U[U.length - 1].data += Q.data, U) : (U.push(Q), U);
@@ -5726,7 +5726,7 @@ var PQ = xc.exports;
5726
5726
  w[m[E]].end = 0;
5727
5727
  return { map: w, table: Q };
5728
5728
  }
5729
- function g(p, U) {
5729
+ function h(p, U) {
5730
5730
  let Q;
5731
5731
  const w = A.getBestModeForData(p);
5732
5732
  if (Q = A.from(U, w), Q !== A.BYTE && Q.bit < w.bit)
@@ -5745,13 +5745,13 @@ var PQ = xc.exports;
5745
5745
  }
5746
5746
  e.fromArray = function(U) {
5747
5747
  return U.reduce(function(Q, w) {
5748
- return typeof w == "string" ? Q.push(g(w, null)) : w.data && Q.push(g(w.data, w.mode)), Q;
5748
+ return typeof w == "string" ? Q.push(h(w, null)) : w.data && Q.push(h(w.data, w.mode)), Q;
5749
5749
  }, []);
5750
5750
  }, e.fromString = function(U, Q) {
5751
5751
  const w = u(U, i.isKanjiModeEnabled()), m = B(w), E = f(m, Q), N = l.find_path(E.map, "start", "end"), H = [];
5752
5752
  for (let F = 1; F < N.length - 1; F++)
5753
5753
  H.push(E.table[N[F]].node);
5754
- return e.fromArray(h(H));
5754
+ return e.fromArray(g(H));
5755
5755
  }, e.rawSplit = function(U) {
5756
5756
  return e.fromArray(
5757
5757
  u(U, i.isKanjiModeEnabled())
@@ -5828,14 +5828,14 @@ function sw(e, A, t) {
5828
5828
  return cw(r, e, A);
5829
5829
  }
5830
5830
  function cw(e, A, t) {
5831
- const r = ia.getSymbolTotalCodewords(A), n = co.getTotalCodewordsCount(A, t), a = r - n, o = co.getBlocksCount(A, t), i = r % o, l = o - i, s = Math.floor(r / o), c = Math.floor(a / o), u = c + 1, d = s - c, h = new ew(d);
5831
+ const r = ia.getSymbolTotalCodewords(A), n = co.getTotalCodewordsCount(A, t), a = r - n, o = co.getBlocksCount(A, t), i = r % o, l = o - i, s = Math.floor(r / o), c = Math.floor(a / o), u = c + 1, d = s - c, g = new ew(d);
5832
5832
  let B = 0;
5833
- const f = new Array(o), g = new Array(o);
5833
+ const f = new Array(o), h = new Array(o);
5834
5834
  let p = 0;
5835
5835
  const U = new Uint8Array(e.buffer);
5836
5836
  for (let N = 0; N < o; N++) {
5837
5837
  const H = N < l ? c : u;
5838
- f[N] = U.slice(B, B + H), g[N] = h.encode(f[N]), B += H, p = Math.max(p, H);
5838
+ f[N] = U.slice(B, B + H), h[N] = g.encode(f[N]), B += H, p = Math.max(p, H);
5839
5839
  }
5840
5840
  const Q = new Uint8Array(r);
5841
5841
  let w = 0, m, E;
@@ -5844,7 +5844,7 @@ function cw(e, A, t) {
5844
5844
  m < f[E].length && (Q[w++] = f[E][m]);
5845
5845
  for (m = 0; m < d; m++)
5846
5846
  for (E = 0; E < o; E++)
5847
- Q[w++] = g[E][m];
5847
+ Q[w++] = h[E][m];
5848
5848
  return Q;
5849
5849
  }
5850
5850
  function uw(e, A, t, r) {
@@ -5932,11 +5932,11 @@ var Zc = {}, vi = {};
5932
5932
  }, e.qrToImageData = function(r, n, a) {
5933
5933
  const o = n.modules.size, i = n.modules.data, l = e.getScale(o, a), s = Math.floor((o + a.margin * 2) * l), c = a.margin * l, u = [a.color.light, a.color.dark];
5934
5934
  for (let d = 0; d < s; d++)
5935
- for (let h = 0; h < s; h++) {
5936
- let B = (d * s + h) * 4, f = a.color.light;
5937
- if (d >= c && h >= c && d < s - c && h < s - c) {
5938
- const g = Math.floor((d - c) / l), p = Math.floor((h - c) / l);
5939
- f = u[i[g * o + p] ? 1 : 0];
5935
+ for (let g = 0; g < s; g++) {
5936
+ let B = (d * s + g) * 4, f = a.color.light;
5937
+ if (d >= c && g >= c && d < s - c && g < s - c) {
5938
+ const h = Math.floor((d - c) / l), p = Math.floor((g - c) / l);
5939
+ f = u[i[h * o + p] ? 1 : 0];
5940
5940
  }
5941
5941
  r[B++] = f.r, r[B++] = f.g, r[B++] = f.b, r[B] = f.a;
5942
5942
  }
@@ -6041,13 +6041,13 @@ const gw = { class: "qrcode-canvas-fixed" }, pw = ["src", "alt"], Uw = 200, Qw =
6041
6041
  boxSizing: "border-box",
6042
6042
  zIndex: 1e3
6043
6043
  })), o = Y(null), i = () => {
6044
- var f, g;
6045
- return o.value || (o.value = gt((g = (f = A.propsConfig) == null ? void 0 : f.qrcode) == null ? void 0 : g.propertyPanel) || {}), o.value;
6046
- }, l = (f, g) => g ? f.QRCodeValue !== g.QRCodeValue || f.QRCodeForeground !== g.QRCodeForeground || f.QRCodeBackground !== g.QRCodeBackground || f.QRCodeErrorLevel !== g.QRCodeErrorLevel : !0, s = async () => {
6047
- var f, g, p, U;
6044
+ var f, h;
6045
+ return o.value || (o.value = gt((h = (f = A.propsConfig) == null ? void 0 : f.qrcode) == null ? void 0 : h.propertyPanel) || {}), o.value;
6046
+ }, l = (f, h) => h ? f.QRCodeValue !== h.QRCodeValue || f.QRCodeForeground !== h.QRCodeForeground || f.QRCodeBackground !== h.QRCodeBackground || f.QRCodeErrorLevel !== h.QRCodeErrorLevel : !0, s = async () => {
6047
+ var f, h, p, U;
6048
6048
  try {
6049
6049
  const Q = i(), w = ((f = A.modelValue) == null ? void 0 : f.QRCodeValue) || Q.QRCodeValue || "测试二维码";
6050
- let m = ((g = A.modelValue) == null ? void 0 : g.QRCodeForeground) || Q.QRCodeForeground || "#000000", E = ((p = A.modelValue) == null ? void 0 : p.QRCodeBackground) || Q.QRCodeBackground || "#ffffff";
6050
+ let m = ((h = A.modelValue) == null ? void 0 : h.QRCodeForeground) || Q.QRCodeForeground || "#000000", E = ((p = A.modelValue) == null ? void 0 : p.QRCodeBackground) || Q.QRCodeBackground || "#ffffff";
6051
6051
  (m === "transparent" || !m) && (m = "#000000"), (E === "transparent" || !E) && (E = "#ffffff");
6052
6052
  const H = { L: "low", M: "medium", Q: "quartile", H: "high" }[((U = A.modelValue) == null ? void 0 : U.QRCodeErrorLevel) || Q.QRCodeErrorLevel || "M"] || "medium";
6053
6053
  w && w.trim() ? t.value = await kr.toDataURL(w, {
@@ -6065,9 +6065,9 @@ const gw = { class: "qrcode-canvas-fixed" }, pw = ["src", "alt"], Uw = 200, Qw =
6065
6065
  }
6066
6066
  }, c = J(() => {
6067
6067
  var U, Q;
6068
- const f = i(), g = ((U = A.modelValue) == null ? void 0 : U.width) ?? f.width, p = ((Q = A.modelValue) == null ? void 0 : Q.height) ?? f.height;
6068
+ const f = i(), h = ((U = A.modelValue) == null ? void 0 : U.width) ?? f.width, p = ((Q = A.modelValue) == null ? void 0 : Q.height) ?? f.height;
6069
6069
  return {
6070
- width: Sn(g) + "px",
6070
+ width: Sn(h) + "px",
6071
6071
  height: Sn(p) + "px",
6072
6072
  display: "flex",
6073
6073
  alignItems: "center",
@@ -6077,13 +6077,13 @@ const gw = { class: "qrcode-canvas-fixed" }, pw = ["src", "alt"], Uw = 200, Qw =
6077
6077
  }), u = () => {
6078
6078
  }, d = () => {
6079
6079
  s();
6080
- }, h = () => {
6081
- const f = A.modelValue, g = r.value;
6082
- l(f, g) && s();
6080
+ }, g = () => {
6081
+ const f = A.modelValue, h = r.value;
6082
+ l(f, h) && s();
6083
6083
  }, B = (() => {
6084
6084
  let f;
6085
6085
  return () => {
6086
- clearTimeout(f), f = setTimeout(h, 50);
6086
+ clearTimeout(f), f = setTimeout(g, 50);
6087
6087
  };
6088
6088
  })();
6089
6089
  return je(() => {
@@ -6101,11 +6101,11 @@ const gw = { class: "qrcode-canvas-fixed" }, pw = ["src", "alt"], Uw = 200, Qw =
6101
6101
  o.value = null, s();
6102
6102
  }, { deep: !0 }), Nr(() => {
6103
6103
  r.value = null, o.value = null, t.value = "";
6104
- }), (f, g) => {
6104
+ }), (f, h) => {
6105
6105
  var p;
6106
6106
  return M(), Z("div", {
6107
6107
  class: "qrcode-component",
6108
- onDragstart: g[0] || (g[0] = cA(() => {
6108
+ onDragstart: h[0] || (h[0] = cA(() => {
6109
6109
  }, ["prevent"])),
6110
6110
  style: nA(c.value)
6111
6111
  }, [
@@ -6223,7 +6223,7 @@ const Rw = {
6223
6223
  position: "relative",
6224
6224
  backgroundColor: m
6225
6225
  };
6226
- }), h = J(() => {
6226
+ }), g = J(() => {
6227
6227
  var m;
6228
6228
  if (!n.value)
6229
6229
  return {};
@@ -6274,7 +6274,7 @@ const Rw = {
6274
6274
  } catch {
6275
6275
  }
6276
6276
  yr && yr.error("图片加载失败,请重新上传");
6277
- }, g = async () => {
6277
+ }, h = async () => {
6278
6278
  var m;
6279
6279
  const U = u(), Q = ((m = t.modelValue) == null ? void 0 : m.ImageSrc) || U.ImageSrc || "";
6280
6280
  let w = "";
@@ -6285,12 +6285,12 @@ const Rw = {
6285
6285
  return typeof U == "object" && U.fileName ? U.fileName : "未命名图片";
6286
6286
  };
6287
6287
  return QA(() => t.modelValue, () => {
6288
- g();
6288
+ h();
6289
6289
  }, { deep: !0 }), QA(() => t.propsConfig, () => {
6290
- c.value = null, g();
6290
+ c.value = null, h();
6291
6291
  }, { deep: !0 }), je(() => {
6292
6292
  fe(() => {
6293
- g();
6293
+ h();
6294
6294
  });
6295
6295
  }), (U, Q) => {
6296
6296
  const w = yA("el-icon-picture-filled"), m = yA("el-icon"), E = yA("el-icon-loading");
@@ -6303,7 +6303,7 @@ const Rw = {
6303
6303
  src: n.value,
6304
6304
  alt: "Image: " + p(),
6305
6305
  class: "image-content",
6306
- style: nA(h.value),
6306
+ style: nA(g.value),
6307
6307
  onLoad: B,
6308
6308
  onError: f,
6309
6309
  onDragstart: Q[0] || (Q[0] = cA(() => {
@@ -6596,11 +6596,11 @@ const Dw = {
6596
6596
  emits: ["update:modelValue"],
6597
6597
  setup(e, { emit: A }) {
6598
6598
  const t = e, { defaultProps: r, isSelected: n } = Wc(t, "rectangle"), a = J(() => kw()), o = J(() => {
6599
- var f, g;
6600
- return Vi(((f = t.modelValue) == null ? void 0 : f.LineWidth) ?? ((g = r.value) == null ? void 0 : g.LineWidth));
6599
+ var f, h;
6600
+ return Vi(((f = t.modelValue) == null ? void 0 : f.LineWidth) ?? ((h = r.value) == null ? void 0 : h.LineWidth));
6601
6601
  }), i = J(() => {
6602
- var f, g;
6603
- return Jc(((f = t.modelValue) == null ? void 0 : f.LineStyle) ?? ((g = r.value) == null ? void 0 : g.LineStyle));
6602
+ var f, h;
6603
+ return Jc(((f = t.modelValue) == null ? void 0 : f.LineStyle) ?? ((h = r.value) == null ? void 0 : h.LineStyle));
6604
6604
  }), l = J(() => i.value === "solid" && o.value < 1), s = J(() => {
6605
6605
  if (l.value) {
6606
6606
  const f = El(t.modelValue, r.value);
@@ -6623,7 +6623,7 @@ const Dw = {
6623
6623
  background: c,
6624
6624
  transform: `scaleY(${o.value})`,
6625
6625
  transformOrigin: "bottom left"
6626
- })), h = J(() => ({
6626
+ })), g = J(() => ({
6627
6627
  left: 0,
6628
6628
  top: 0,
6629
6629
  width: "1px",
@@ -6641,8 +6641,8 @@ const Dw = {
6641
6641
  transformOrigin: "top right"
6642
6642
  }));
6643
6643
  return QA(() => t.propsConfig, () => {
6644
- var g, p;
6645
- const f = gt((p = (g = t.propsConfig) == null ? void 0 : g.rectangle) == null ? void 0 : p.propertyPanel) || {};
6644
+ var h, p;
6645
+ const f = gt((p = (h = t.propsConfig) == null ? void 0 : h.rectangle) == null ? void 0 : p.propertyPanel) || {};
6646
6646
  r.value = {
6647
6647
  LineWidth: f.LineWidth ?? "0.75pt",
6648
6648
  LineStyle: f.LineStyle ?? 1,
@@ -6650,7 +6650,7 @@ const Dw = {
6650
6650
  };
6651
6651
  }, { deep: !0, immediate: !0 }), Nr(() => {
6652
6652
  r.value = {};
6653
- }), (f, g) => (M(), Z("div", {
6653
+ }), (f, h) => (M(), Z("div", {
6654
6654
  class: "rectangle-component",
6655
6655
  style: nA(a.value)
6656
6656
  }, [
@@ -6673,7 +6673,7 @@ const Dw = {
6673
6673
  }, null, 4),
6674
6674
  R("div", {
6675
6675
  class: "hairline-edge left",
6676
- style: nA(h.value)
6676
+ style: nA(g.value)
6677
6677
  }, null, 4)
6678
6678
  ], 64)) : uA("", !0)
6679
6679
  ], 4)
@@ -6749,17 +6749,17 @@ const jw = ["width", "height"], Xw = ["y1", "x2", "y2", "stroke-width", "stroke-
6749
6749
  return `${B},${f}`;
6750
6750
  }
6751
6751
  return null;
6752
- }), d = J(() => Ww(o.value, s.value)), h = J(() => Ow(t.modelValue, n.value));
6752
+ }), d = J(() => Ww(o.value, s.value)), g = J(() => Ow(t.modelValue, n.value));
6753
6753
  return QA(() => t.modelValue, (B) => {
6754
6754
  if (B) {
6755
6755
  n.value = {
6756
6756
  LineWidth: B.LineWidth || "0.75pt",
6757
6757
  LineStyle: B.LineStyle || 1
6758
6758
  };
6759
- const g = parseFloat(B.LineWidth || "0.75pt") * 0.3528;
6760
- Math.abs(B.height - g) > 1e-3 && r("update:modelValue", {
6759
+ const h = parseFloat(B.LineWidth || "0.75pt") * 0.3528;
6760
+ Math.abs(B.height - h) > 1e-3 && r("update:modelValue", {
6761
6761
  ...B,
6762
- height: Number(g.toFixed(3))
6762
+ height: Number(h.toFixed(3))
6763
6763
  });
6764
6764
  }
6765
6765
  }, { immediate: !0, deep: !0 }), QA(() => {
@@ -6767,15 +6767,15 @@ const jw = ["width", "height"], Xw = ["y1", "x2", "y2", "stroke-width", "stroke-
6767
6767
  return (B = t.modelValue) == null ? void 0 : B.LineWidth;
6768
6768
  }, (B) => {
6769
6769
  if (B && t.modelValue) {
6770
- const g = parseFloat(B) * 0.3528;
6771
- Math.abs(t.modelValue.height - g) > 1e-3 && r("update:modelValue", {
6770
+ const h = parseFloat(B) * 0.3528;
6771
+ Math.abs(t.modelValue.height - h) > 1e-3 && r("update:modelValue", {
6772
6772
  ...t.modelValue,
6773
- height: Number(g.toFixed(3))
6773
+ height: Number(h.toFixed(3))
6774
6774
  });
6775
6775
  }
6776
6776
  }, { immediate: !0 }), (B, f) => (M(), Z("div", {
6777
6777
  class: "line-component",
6778
- style: nA(h.value)
6778
+ style: nA(g.value)
6779
6779
  }, [
6780
6780
  (M(), Z("svg", {
6781
6781
  width: o.value,
@@ -7001,8 +7001,8 @@ const oF = { class: "component-list" }, iF = { class: "group-title" }, lF = { cl
7001
7001
  return (s, c) => {
7002
7002
  const u = yA("el-icon");
7003
7003
  return M(), Z("div", oF, [
7004
- (M(!0), Z(HA, null, Je(t.value, (d, h) => (M(), Z("div", {
7005
- key: h,
7004
+ (M(!0), Z(HA, null, Je(t.value, (d, g) => (M(), Z("div", {
7005
+ key: g,
7006
7006
  class: "component-group"
7007
7007
  }, [
7008
7008
  R("div", iF, Ce(d.groupName), 1),
@@ -7011,7 +7011,7 @@ const oF = { class: "component-list" }, iF = { class: "group-title" }, lF = { cl
7011
7011
  key: f,
7012
7012
  class: "component-item",
7013
7013
  draggable: "true",
7014
- onDragstart: (g) => s.$emit("dragStart", { e: g, comp: B, previewDiv: l(B) })
7014
+ onDragstart: (h) => s.$emit("dragStart", { e: h, comp: B, previewDiv: l(B) })
7015
7015
  }, [
7016
7016
  z(u, {
7017
7017
  size: 30,
@@ -7131,7 +7131,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7131
7131
  a.data.punchingList.splice(c, 1);
7132
7132
  };
7133
7133
  return (c, u) => {
7134
- const d = yA("el-button"), h = yA("el-input-number"), B = yA("el-table-column"), f = yA("el-col"), g = yA("el-row"), p = yA("el-table"), U = yA("el-form-item"), Q = yA("el-form"), w = yA("el-main"), m = yA("el-dialog");
7134
+ const d = yA("el-button"), g = yA("el-input-number"), B = yA("el-table-column"), f = yA("el-col"), h = yA("el-row"), p = yA("el-table"), U = yA("el-form-item"), Q = yA("el-form"), w = yA("el-main"), m = yA("el-dialog");
7135
7135
  return M(), Z(HA, null, [
7136
7136
  z(d, {
7137
7137
  type: "primary",
@@ -7227,7 +7227,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7227
7227
  width: "100"
7228
7228
  }, {
7229
7229
  default: tA((F) => [
7230
- z(h, {
7230
+ z(g, {
7231
7231
  modelValue: F.row.x,
7232
7232
  "onUpdate:modelValue": (V) => F.row.x = V,
7233
7233
  controls: !1,
@@ -7242,7 +7242,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7242
7242
  width: "100"
7243
7243
  }, {
7244
7244
  default: tA((F) => [
7245
- z(h, {
7245
+ z(g, {
7246
7246
  modelValue: F.row.y,
7247
7247
  "onUpdate:modelValue": (V) => F.row.y = V,
7248
7248
  controls: !1,
@@ -7257,7 +7257,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7257
7257
  width: "100"
7258
7258
  }, {
7259
7259
  default: tA((F) => [
7260
- z(h, {
7260
+ z(g, {
7261
7261
  modelValue: F.row.width,
7262
7262
  "onUpdate:modelValue": (V) => F.row.width = V,
7263
7263
  controls: !1,
@@ -7272,7 +7272,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7272
7272
  width: "100"
7273
7273
  }, {
7274
7274
  default: tA((F) => [
7275
- z(h, {
7275
+ z(g, {
7276
7276
  modelValue: F.row.height,
7277
7277
  "onUpdate:modelValue": (V) => F.row.height = V,
7278
7278
  controls: !1,
@@ -7286,11 +7286,11 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7286
7286
  align: "center"
7287
7287
  }, {
7288
7288
  default: tA((F) => [
7289
- z(g, { gutter: 10 }, {
7289
+ z(h, { gutter: 10 }, {
7290
7290
  default: tA(() => [
7291
7291
  z(f, { span: 6 }, {
7292
7292
  default: tA(() => [
7293
- z(h, {
7293
+ z(g, {
7294
7294
  modelValue: F.row.topLeftRadius,
7295
7295
  "onUpdate:modelValue": (V) => F.row.topLeftRadius = V,
7296
7296
  controls: !1,
@@ -7301,7 +7301,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7301
7301
  }, 1024),
7302
7302
  z(f, { span: 6 }, {
7303
7303
  default: tA(() => [
7304
- z(h, {
7304
+ z(g, {
7305
7305
  modelValue: F.row.bottomLeftRadius,
7306
7306
  "onUpdate:modelValue": (V) => F.row.bottomLeftRadius = V,
7307
7307
  controls: !1,
@@ -7312,7 +7312,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7312
7312
  }, 1024),
7313
7313
  z(f, { span: 6 }, {
7314
7314
  default: tA(() => [
7315
- z(h, {
7315
+ z(g, {
7316
7316
  modelValue: F.row.topRightRadius,
7317
7317
  "onUpdate:modelValue": (V) => F.row.topRightRadius = V,
7318
7318
  controls: !1,
@@ -7323,7 +7323,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7323
7323
  }, 1024),
7324
7324
  z(f, { span: 6 }, {
7325
7325
  default: tA(() => [
7326
- z(h, {
7326
+ z(g, {
7327
7327
  modelValue: F.row.bottomRightRadius,
7328
7328
  "onUpdate:modelValue": (V) => F.row.bottomRightRadius = V,
7329
7329
  controls: !1,
@@ -7392,7 +7392,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7392
7392
  width: "100"
7393
7393
  }, {
7394
7394
  default: tA((E) => [
7395
- z(h, {
7395
+ z(g, {
7396
7396
  modelValue: E.row.x,
7397
7397
  "onUpdate:modelValue": (N) => E.row.x = N,
7398
7398
  controls: !1,
@@ -7407,7 +7407,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7407
7407
  width: "100"
7408
7408
  }, {
7409
7409
  default: tA((E) => [
7410
- z(h, {
7410
+ z(g, {
7411
7411
  modelValue: E.row.y,
7412
7412
  "onUpdate:modelValue": (N) => E.row.y = N,
7413
7413
  controls: !1,
@@ -7422,7 +7422,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7422
7422
  width: "100"
7423
7423
  }, {
7424
7424
  default: tA((E) => [
7425
- z(h, {
7425
+ z(g, {
7426
7426
  modelValue: E.row.width,
7427
7427
  "onUpdate:modelValue": (N) => E.row.width = N,
7428
7428
  controls: !1,
@@ -7438,7 +7438,7 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7438
7438
  width: "100"
7439
7439
  }, {
7440
7440
  default: tA((E) => [
7441
- z(h, {
7441
+ z(g, {
7442
7442
  modelValue: E.row.height,
7443
7443
  "onUpdate:modelValue": (N) => E.row.height = N,
7444
7444
  controls: !1,
@@ -7577,14 +7577,14 @@ const mF = { class: "tg-title" }, vF = { class: "label-container" }, yF = { clas
7577
7577
  }
7578
7578
  }, SF = /* @__PURE__ */ MA(NF, [["__scopeId", "data-v-21b6e8d1"]]);
7579
7579
  function MF(e = {}) {
7580
- const { scale: A, canvasWidth: t, canvasHeight: r, selectItem: n, onStopDrag: a, onStartDrag: o, onDragUpdate: i } = e, l = Y(!1), s = Y(!1), c = Y(null), u = Y({ x: 0, y: 0 }), d = Y({ x: 0, y: 0 }), h = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), B = Y(0);
7580
+ const { scale: A, canvasWidth: t, canvasHeight: r, selectItem: n, onStopDrag: a, onStartDrag: o, onDragUpdate: i } = e, l = Y(!1), s = Y(!1), c = Y(null), u = Y({ x: 0, y: 0 }), d = Y({ x: 0, y: 0 }), g = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), B = Y(0);
7581
7581
  function f(w, m, E) {
7582
7582
  l.value = !0, s.value = !0, typeof o == "function" && o(), c.value = m, u.value = { x: w.clientX, y: w.clientY }, d.value = { x: m.props.x, y: m.props.y }, typeof n == "function" && n(m, E || w), document.addEventListener("mousemove", U), document.addEventListener("mouseup", Q);
7583
7583
  }
7584
- function g(w, m, E, N, H) {
7584
+ function h(w, m, E, N, H) {
7585
7585
  const F = `${O(w, 1)}_${O(m, 1)}_${O(E, 1)}_${O(N, 1)}_${O(H, 1)}`;
7586
- if (h.has(F))
7587
- return h.get(F);
7586
+ if (g.has(F))
7587
+ return g.get(F);
7588
7588
  const V = H * Math.PI / 180, v = E / 2, x = N / 2, G = [
7589
7589
  { x: 0, y: 0 },
7590
7590
  { x: E, y: 0 },
@@ -7602,7 +7602,7 @@ function MF(e = {}) {
7602
7602
  minY: Math.min(...S),
7603
7603
  maxY: Math.max(...S)
7604
7604
  };
7605
- return h.set(F, _), _;
7605
+ return g.set(F, _), _;
7606
7606
  }
7607
7607
  function p(w) {
7608
7608
  if (!l.value || !c.value)
@@ -7623,7 +7623,7 @@ function MF(e = {}) {
7623
7623
  (V < -S || V + x > t.value + S || v < -S || v + T > r.value + S) && (AA = !0);
7624
7624
  }
7625
7625
  if (AA) {
7626
- const S = g(V, v, x, T, G);
7626
+ const S = h(V, v, x, T, G);
7627
7627
  let _ = 0, q = 0;
7628
7628
  S.minX < 0 && (_ = -S.minX), S.maxX > t.value && (_ = t.value - S.maxX), S.minY < 0 && (q = -S.minY), S.maxY > r.value && (q = r.value - S.maxY), V += _, v += q;
7629
7629
  }
@@ -7634,7 +7634,7 @@ function MF(e = {}) {
7634
7634
  function Q() {
7635
7635
  l.value = !1, setTimeout(() => {
7636
7636
  s.value = !1;
7637
- }, 50), c.value && typeof n == "function" && n(c.value), c.value = null, typeof a == "function" && a(), typeof i == "function" && i(), h.clear();
7637
+ }, 50), c.value && typeof n == "function" && n(c.value), c.value = null, typeof a == "function" && a(), typeof i == "function" && i(), g.clear();
7638
7638
  const w = function(m) {
7639
7639
  m && (typeof m.stopImmediatePropagation == "function" && m.stopImmediatePropagation(), typeof m.stopPropagation == "function" && m.stopPropagation(), typeof m.preventDefault == "function" && m.preventDefault()), window.removeEventListener("click", w, !0);
7640
7640
  };
@@ -7654,14 +7654,14 @@ function MF(e = {}) {
7654
7654
  };
7655
7655
  }
7656
7656
  function bF(e, A, t, r, n) {
7657
- const a = Y(!1), o = Y(null), i = Y({ x: 0, y: 0 }), l = Y({ width: 0, height: 0, x: 0, y: 0, rotation: 0 }), s = Y(""), c = Y(""), u = Y({ x: 0, y: 0 }), d = Y([]), h = Y(null), B = Y(0), f = Y(null), g = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), p = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE);
7657
+ const a = Y(!1), o = Y(null), i = Y({ x: 0, y: 0 }), l = Y({ width: 0, height: 0, x: 0, y: 0, rotation: 0 }), s = Y(""), c = Y(""), u = Y({ x: 0, y: 0 }), d = Y([]), g = Y(null), B = Y(0), f = Y(null), h = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), p = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE);
7658
7658
  function U(V) {
7659
7659
  return V * Math.PI / 180;
7660
7660
  }
7661
7661
  function Q(V, v, x, T, G, AA, S) {
7662
7662
  const _ = `${O(V, 1)}_${O(v, 1)}_${O(x, 1)}_${O(T, 1)}_${O(G, 1)}`;
7663
- if (g.has(_))
7664
- return g.get(_);
7663
+ if (h.has(_))
7664
+ return h.get(_);
7665
7665
  const q = w(V, v, x, T, G), lA = q.map((ZA) => ZA.x), X = q.map((ZA) => ZA.y), W = Math.min(...lA), k = Math.max(...lA), $ = Math.min(...X), dA = Math.max(...X), pA = vA.CALCULATION.BOUNDARY_TOLERANCE, hA = W < -pA || k > AA + pA || $ < -pA || dA > S + pA, aA = {
7666
7666
  minX: W,
7667
7667
  maxX: k,
@@ -7670,7 +7670,7 @@ function bF(e, A, t, r, n) {
7670
7670
  isOutOfBounds: hA,
7671
7671
  corners: q
7672
7672
  };
7673
- return g.set(_, aA), aA;
7673
+ return h.set(_, aA), aA;
7674
7674
  }
7675
7675
  function w(V, v, x, T, G) {
7676
7676
  const AA = `${O(V, 1)}_${O(v, 1)}_${O(x, 1)}_${O(T, 1)}_${O(G, 1)}`;
@@ -7730,17 +7730,17 @@ function bF(e, A, t, r, n) {
7730
7730
  x: v.props.x,
7731
7731
  y: v.props.y,
7732
7732
  rotation: v.props.rotation || 0
7733
- }, c.value = "", u.value = { x: 0, y: 0 }, f.value = null, h.value = m(
7733
+ }, c.value = "", u.value = { x: 0, y: 0 }, f.value = null, g.value = m(
7734
7734
  x,
7735
7735
  l.value.x,
7736
7736
  l.value.y,
7737
7737
  l.value.width,
7738
7738
  l.value.height,
7739
7739
  l.value.rotation
7740
- ), d.value = [...r.value], g.clear(), p.clear(), document.addEventListener("mousemove", H), document.addEventListener("mouseup", F));
7740
+ ), d.value = [...r.value], h.clear(), p.clear(), document.addEventListener("mousemove", H), document.addEventListener("mouseup", F));
7741
7741
  }
7742
7742
  function N(V) {
7743
- if (!a.value || !o.value || !h.value)
7743
+ if (!a.value || !o.value || !g.value)
7744
7744
  return;
7745
7745
  const v = Date.now();
7746
7746
  if (v - B.value < vA.CACHE.UPDATE_THRESHOLD)
@@ -7771,7 +7771,7 @@ function bF(e, A, t, r, n) {
7771
7771
  k,
7772
7772
  $,
7773
7773
  T
7774
- ), Lr = h.value.x - jt.x, pe = h.value.y - jt.y;
7774
+ ), Lr = g.value.x - jt.x, pe = g.value.y - jt.y;
7775
7775
  let WA = O(lA + Lr), re = O(X + pe);
7776
7776
  const Ue = e.value || 0, Se = A.value || 0, Jr = WA, ne = WA + k, _e = re, Kr = re + $;
7777
7777
  let Xt = !1;
@@ -7798,7 +7798,7 @@ function bF(e, A, t, r, n) {
7798
7798
  }
7799
7799
  const H = Ri(N);
7800
7800
  function F() {
7801
- a.value = !1, o.value = null, c.value = "", u.value = { x: 0, y: 0 }, h.value = null, g.clear(), p.clear(), d.value.length > 0 && (r.value = [...d.value]), d.value = [], document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", F), f.value = null;
7801
+ a.value = !1, o.value = null, c.value = "", u.value = { x: 0, y: 0 }, g.value = null, h.clear(), p.clear(), d.value.length > 0 && (r.value = [...d.value]), d.value = [], document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", F), f.value = null;
7802
7802
  }
7803
7803
  return {
7804
7804
  resizing: a,
@@ -7850,13 +7850,13 @@ function xF() {
7850
7850
  return;
7851
7851
  a.preventDefault(), a.stopPropagation();
7852
7852
  const i = a.target.parentElement.getBoundingClientRect(), l = i.left + i.width / 2, s = i.top + i.height / 2;
7853
- let c = null, u = !1, d = f(a.clientX, a.clientY), h = o.props.rotation || 0, B = h;
7853
+ let c = null, u = !1, d = f(a.clientX, a.clientY), g = o.props.rotation || 0, B = g;
7854
7854
  function f(Q, w) {
7855
7855
  const m = Q - l, E = w - s;
7856
7856
  let N = Math.atan2(E, m) * 180 / Math.PI + 90;
7857
7857
  return N > 180 && (N -= 360), N < -180 && (N += 360), N;
7858
7858
  }
7859
- function g(Q) {
7859
+ function h(Q) {
7860
7860
  const w = Q.clientX - l, m = Q.clientY - s;
7861
7861
  if (Math.sqrt(w * w + m * m) < 20) {
7862
7862
  u = !0, c = null;
@@ -7868,12 +7868,12 @@ function xF() {
7868
7868
  }
7869
7869
  const N = f(Q.clientX, Q.clientY);
7870
7870
  let H = N - d;
7871
- H > 180 && (H -= 360), H < -180 && (H += 360), h += H, d = N, B = r(B, h, 0.25);
7871
+ H > 180 && (H -= 360), H < -180 && (H += 360), g += H, d = N, B = r(B, g, 0.25);
7872
7872
  const F = (B % 360 + 360) % 360;
7873
7873
  Math.abs(o.props.rotation - F) >= 0.2 && (o.props.rotation = Number(F.toFixed(2))), c = null;
7874
7874
  }
7875
7875
  const p = (Q) => {
7876
- c || (c = requestAnimationFrame(() => g(Q)));
7876
+ c || (c = requestAnimationFrame(() => h(Q)));
7877
7877
  }, U = (Q) => {
7878
7878
  Q && Q.stopPropagation(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", U), c && (cancelAnimationFrame(c), c = null), u = !1;
7879
7879
  const w = (m) => {
@@ -7895,10 +7895,6 @@ function ZF(e, A) {
7895
7895
  const o = n.props.ImageSrc;
7896
7896
  typeof o == "object" && (o != null && o.uploadResult ? n.props.ImageSrc = o.uploadResult : o.fileSrc && (n.props.ImageSrc = o.fileSrc));
7897
7897
  }
7898
- if (n.type === "line" && n.props) {
7899
- const { x: o, y: i, width: l, height: s, rotation: c = 0 } = n.props, u = c * Math.PI / 180, d = Math.cos(u), h = Math.sin(u), B = o + l * d, f = i + l * h;
7900
- n.props.x1 = Math.round(B * 100) / 100, n.props.y1 = Math.round(f * 100) / 100;
7901
- }
7902
7898
  }), {
7903
7899
  ...A,
7904
7900
  items: t
@@ -7922,15 +7918,15 @@ function kF(e, A, t) {
7922
7918
  const c = e.value[e.value.length - 1];
7923
7919
  let u = Number(c.props[i]) + Number(l);
7924
7920
  if (i === "x" || i === "y") {
7925
- const d = A != null && A.value ? A.value - c.props.width : 1 / 0, h = t != null && t.value ? t.value - c.props.height : 1 / 0;
7926
- i === "x" ? u = Math.max(0, Math.min(u, d)) : i === "y" && (u = Math.max(0, Math.min(u, h)));
7921
+ const d = A != null && A.value ? A.value - c.props.width : 1 / 0, g = t != null && t.value ? t.value - c.props.height : 1 / 0;
7922
+ i === "x" ? u = Math.max(0, Math.min(u, d)) : i === "y" && (u = Math.max(0, Math.min(u, g)));
7927
7923
  } else if (i === "width" || i === "height") {
7928
7924
  if (i === "width") {
7929
- const h = A != null && A.value ? A.value - c.props.x : 1 / 0;
7930
- u = Math.max(1, Math.min(u, h));
7925
+ const g = A != null && A.value ? A.value - c.props.x : 1 / 0;
7926
+ u = Math.max(1, Math.min(u, g));
7931
7927
  } else if (i === "height") {
7932
- const h = t != null && t.value ? t.value - c.props.y : 1 / 0;
7933
- u = Math.max(1, Math.min(u, h));
7928
+ const g = t != null && t.value ? t.value - c.props.y : 1 / 0;
7929
+ u = Math.max(1, Math.min(u, g));
7934
7930
  }
7935
7931
  }
7936
7932
  if (!(u < s)) {
@@ -7944,8 +7940,8 @@ function kF(e, A, t) {
7944
7940
  }
7945
7941
  }
7946
7942
  if (c.type === "line" && i === "height") {
7947
- const h = u / 0.3528;
7948
- c.props.height = Number(u.toFixed(2)), c.props.LineWidth = Number(h.toFixed(2)) + "pt";
7943
+ const g = u / 0.3528;
7944
+ c.props.height = Number(u.toFixed(2)), c.props.LineWidth = Number(g.toFixed(2)) + "pt";
7949
7945
  return;
7950
7946
  }
7951
7947
  c.props[i] = Number(u.toFixed(2));
@@ -8006,8 +8002,8 @@ function OF(e, A, t, r) {
8006
8002
  const s = JSON.parse(JSON.stringify(n.value));
8007
8003
  if (s.id = Date.now(), s.props) {
8008
8004
  let c = Number(s.props.x) + 5, u = Number(s.props.y) + 5;
8009
- const d = t.value - Number(s.props.width), h = r.value - Number(s.props.height);
8010
- s.props.x = Math.max(0, Math.min(c, d)), s.props.y = Math.max(0, Math.min(u, h)), s.props.x != c && (s.props.x = c - 5 * 2), s.props.y != u && (s.props.y = u - 5 * 2);
8005
+ const d = t.value - Number(s.props.width), g = r.value - Number(s.props.height);
8006
+ s.props.x = Math.max(0, Math.min(c, d)), s.props.y = Math.max(0, Math.min(u, g)), s.props.x != c && (s.props.x = c - 5 * 2), s.props.y != u && (s.props.y = u - 5 * 2);
8011
8007
  }
8012
8008
  e.value.push(s), A.value = [s], i.preventDefault();
8013
8009
  }
@@ -8021,7 +8017,7 @@ function WF(e = {}) {
8021
8017
  vertical: []
8022
8018
  // 垂直对齐线 [{ x: number, visible: boolean, type: string }]
8023
8019
  }), c = new ut(50), u = new ut(50), d = Y(0);
8024
- function h(F) {
8020
+ function g(F) {
8025
8021
  const v = ((F.props.rotation || 0) % 360 + 360) % 360;
8026
8022
  return Math.abs(v % 90) < 0.1;
8027
8023
  }
@@ -8074,7 +8070,7 @@ function WF(e = {}) {
8074
8070
  }
8075
8071
  return u.set(x, _), _;
8076
8072
  }
8077
- function g(F, V) {
8073
+ function h(F, V) {
8078
8074
  const v = [], x = [], T = /* @__PURE__ */ new Set(), G = /* @__PURE__ */ new Set(), AA = B(F);
8079
8075
  return V.forEach((S) => {
8080
8076
  const _ = B(S), q = Math.abs(AA.centerY - _.centerY), lA = O(AA.centerY, 2);
@@ -8162,15 +8158,15 @@ function WF(e = {}) {
8162
8158
  s.value.horizontal = [], s.value.vertical = [];
8163
8159
  return;
8164
8160
  }
8165
- if (!h(V)) {
8161
+ if (!g(V)) {
8166
8162
  s.value.horizontal = [], s.value.vertical = [];
8167
8163
  return;
8168
8164
  }
8169
8165
  const v = A.value.filter(
8170
- (lA) => lA !== V && h(lA)
8166
+ (lA) => lA !== V && g(lA)
8171
8167
  );
8172
8168
  let x = { horizontalLines: [], verticalLines: [] }, T = { horizontalLines: [], verticalLines: [] }, G = { horizontalLines: [], verticalLines: [] };
8173
- a.value && (o != null && o.value) ? (G = U(V, v, o.value), T = Q(V)) : (x = g(V, v), T = Q(V));
8169
+ a.value && (o != null && o.value) ? (G = U(V, v, o.value), T = Q(V)) : (x = h(V, v), T = Q(V));
8174
8170
  const AA = [
8175
8171
  ...x.horizontalLines,
8176
8172
  ...G.horizontalLines,
@@ -8575,7 +8571,7 @@ var lC = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
8575
8571
  if (Co === l && [Co, vn, Qo, wo].indexOf(c) !== -1 || [vn, Qo].indexOf(l) !== -1 && [vn, yn].indexOf(c) !== -1 || [yn, wo].indexOf(l) !== -1 && c === yn || xl.indexOf(l) !== -1 && [bl, ur].indexOf(c) !== -1 || xl.indexOf(c) !== -1 && l === dr || Re.indexOf(l) !== -1 && Re.indexOf(c) !== -1 || l === wt && Re.indexOf(c) !== -1 || Re.concat(_A).indexOf(l) !== -1 && c === ar && pC.indexOf(e[i]) === -1 || Re.concat(_A).indexOf(c) !== -1 && l === nr)
8576
8572
  return iA;
8577
8573
  if (l === ka && c === ka) {
8578
- for (var h = t[a], B = 1; h > 0 && (h--, A[h] === ka); )
8574
+ for (var g = t[a], B = 1; g > 0 && (g--, A[g] === ka); )
8579
8575
  B++;
8580
8576
  if (B % 2 !== 0)
8581
8577
  return iA;
@@ -8800,8 +8796,8 @@ var lC = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
8800
8796
  return this.consumeCodePoint(), this.consumeCodePoint(), EE;
8801
8797
  break;
8802
8798
  case xC:
8803
- var u = this.peekCodePoint(0), d = this.peekCodePoint(1), h = this.peekCodePoint(2);
8804
- if (Bn(u, d, h)) {
8799
+ var u = this.peekCodePoint(0), d = this.peekCodePoint(1), g = this.peekCodePoint(2);
8800
+ if (Bn(u, d, g)) {
8805
8801
  var o = this.consumeName();
8806
8802
  return { type: 7, value: o };
8807
8803
  }
@@ -9228,8 +9224,8 @@ var Gl = function(e, A) {
9228
9224
  var t = A.filter(Ot), r = t[0], n = t[1], a = t[2], o = t[3], i = (r.type === 17 ? se(r.number) : ca.parse(e, r)) / (Math.PI * 2), l = RA(n) ? n.number / 100 : 0, s = RA(a) ? a.number / 100 : 0, c = typeof o < "u" && RA(o) ? UA(o, 1) : 1;
9229
9225
  if (l === 0)
9230
9226
  return Le(s * 255, s * 255, s * 255, 1);
9231
- var u = s <= 0.5 ? s * (l + 1) : s + l - s * l, d = s * 2 - u, h = La(d, u, i + 1 / 3), B = La(d, u, i), f = La(d, u, i - 1 / 3);
9232
- return Le(h * 255, B * 255, f * 255, c);
9227
+ var u = s <= 0.5 ? s * (l + 1) : s + l - s * l, d = s * 2 - u, g = La(d, u, i + 1 / 3), B = La(d, u, i), f = La(d, u, i - 1 / 3);
9228
+ return Le(g * 255, B * 255, f * 255, c);
9233
9229
  }, SE = {
9234
9230
  hsl: Gl,
9235
9231
  hsla: Gl,
@@ -9429,14 +9425,14 @@ var Gl = function(e, A) {
9429
9425
  if (c === null)
9430
9426
  s === null && (s = o);
9431
9427
  else if (s !== null) {
9432
- for (var u = o - s, d = n[s - 1], h = (c - d) / (u + 1), B = 1; B <= u; B++)
9433
- n[s + B - 1] = h * B;
9428
+ for (var u = o - s, d = n[s - 1], g = (c - d) / (u + 1), B = 1; B <= u; B++)
9429
+ n[s + B - 1] = g * B;
9434
9430
  s = null;
9435
9431
  }
9436
9432
  }
9437
- return e.map(function(f, g) {
9433
+ return e.map(function(f, h) {
9438
9434
  var p = f.color;
9439
- return { color: p, stop: Math.max(Math.min(1, n[g] / A), 0) };
9435
+ return { color: p, stop: Math.max(Math.min(1, n[h] / A), 0) };
9440
9436
  });
9441
9437
  }, HE = function(e, A, t) {
9442
9438
  var r = A / 2, n = t / 2, a = UA(e[0], A) - r, o = n - UA(e[1], t);
@@ -9555,9 +9551,9 @@ var Gl = function(e, A) {
9555
9551
  } else if (c.name === "color-stop") {
9556
9552
  var d = c.values.filter(Ot);
9557
9553
  if (d.length === 2) {
9558
- var u = Ge.parse(e, d[1]), h = d[0];
9559
- zt(h) && r.push({
9560
- stop: { type: 16, number: h.number * 100, flags: h.flags },
9554
+ var u = Ge.parse(e, d[1]), g = d[0];
9555
+ zt(g) && r.push({
9556
+ stop: { type: 16, number: g.number * 100, flags: g.flags },
9561
9557
  color: u
9562
9558
  });
9563
9559
  }
@@ -11847,18 +11843,18 @@ var Nv = 1, Ga = 2, Ya = 3, es = 4, ts = 5, Sv = 7, rs = 8, za = 9, ja = 10, ns
11847
11843
  d.src = u.value, d.style.opacity = "1", s.appendChild(d);
11848
11844
  } else if (u.type === 18) {
11849
11845
  if (u.name === "attr") {
11850
- var h = u.values.filter(gA);
11851
- h.length && s.appendChild(i.createTextNode(A.getAttribute(h[0].value) || ""));
11846
+ var g = u.values.filter(gA);
11847
+ g.length && s.appendChild(i.createTextNode(A.getAttribute(g[0].value) || ""));
11852
11848
  } else if (u.name === "counter") {
11853
- var B = u.values.filter(Ot), f = B[0], g = B[1];
11849
+ var B = u.values.filter(Ot), f = B[0], h = B[1];
11854
11850
  if (f && gA(f)) {
11855
- var p = a.counters.getCounterValue(f.value), U = g && gA(g) ? Ro.parse(a.context, g.value) : 3;
11851
+ var p = a.counters.getCounterValue(f.value), U = h && gA(h) ? Ro.parse(a.context, h.value) : 3;
11856
11852
  s.appendChild(i.createTextNode(Ir(p, U, !1)));
11857
11853
  }
11858
11854
  } else if (u.name === "counters") {
11859
- var Q = u.values.filter(Ot), f = Q[0], w = Q[1], g = Q[2];
11855
+ var Q = u.values.filter(Ot), f = Q[0], w = Q[1], h = Q[2];
11860
11856
  if (f && gA(f)) {
11861
- var m = a.counters.getCounterValues(f.value), E = g && gA(g) ? Ro.parse(a.context, g.value) : 3, N = w && w.type === 0 ? w.value : "", H = m.map(function(v) {
11857
+ var m = a.counters.getCounterValues(f.value), E = h && gA(h) ? Ro.parse(a.context, h.value) : 3, N = w && w.type === 0 ? w.value : "", H = m.map(function(v) {
11862
11858
  return Ir(v, E, !1);
11863
11859
  }).join(N);
11864
11860
  s.appendChild(i.createTextNode(H));
@@ -12083,9 +12079,9 @@ var Uy = function(e, A) {
12083
12079
  /** @class */
12084
12080
  function() {
12085
12081
  function e(A) {
12086
- var t = A.styles, r = A.bounds, n = Br(t.borderTopLeftRadius, r.width, r.height), a = n[0], o = n[1], i = Br(t.borderTopRightRadius, r.width, r.height), l = i[0], s = i[1], c = Br(t.borderBottomRightRadius, r.width, r.height), u = c[0], d = c[1], h = Br(t.borderBottomLeftRadius, r.width, r.height), B = h[0], f = h[1], g = [];
12087
- g.push((a + l) / r.width), g.push((B + u) / r.width), g.push((o + f) / r.height), g.push((s + d) / r.height);
12088
- var p = Math.max.apply(Math, g);
12082
+ var t = A.styles, r = A.bounds, n = Br(t.borderTopLeftRadius, r.width, r.height), a = n[0], o = n[1], i = Br(t.borderTopRightRadius, r.width, r.height), l = i[0], s = i[1], c = Br(t.borderBottomRightRadius, r.width, r.height), u = c[0], d = c[1], g = Br(t.borderBottomLeftRadius, r.width, r.height), B = g[0], f = g[1], h = [];
12083
+ h.push((a + l) / r.width), h.push((B + u) / r.width), h.push((o + f) / r.height), h.push((s + d) / r.height);
12084
+ var p = Math.max.apply(Math, h);
12089
12085
  p > 1 && (a /= p, o /= p, l /= p, s /= p, u /= p, d /= p, B /= p, f /= p);
12090
12086
  var U = r.width - l, Q = r.height - d, w = r.width - u, m = r.height - f, E = t.borderTopWidth, N = t.borderRightWidth, H = t.borderBottomWidth, F = t.borderLeftWidth, V = UA(t.paddingTop, A.bounds.width), v = UA(t.paddingRight, A.bounds.width), x = UA(t.paddingBottom, A.bounds.width), T = UA(t.paddingLeft, A.bounds.width);
12091
12087
  this.topLeftBorderDoubleOuterBox = a > 0 || o > 0 ? FA(r.left + F / 3, r.top + E / 3, a - F / 3, o - E / 3, fA.TOP_LEFT) : new L(r.left + F / 3, r.top + E / 3), this.topRightBorderDoubleOuterBox = a > 0 || o > 0 ? FA(r.left + U, r.top + E / 3, l - N / 3, s - E / 3, fA.TOP_RIGHT) : new L(r.left + r.width - N / 3, r.top + E / 3), this.bottomRightBorderDoubleOuterBox = u > 0 || d > 0 ? FA(r.left + w, r.top + Q, u - N / 3, d - H / 3, fA.BOTTOM_RIGHT) : new L(r.left + r.width - N / 3, r.top + r.height - H / 3), this.bottomLeftBorderDoubleOuterBox = B > 0 || f > 0 ? FA(r.left + F / 3, r.top + m, B - F / 3, f - H / 3, fA.BOTTOM_LEFT) : new L(r.left + F / 3, r.top + r.height - H / 3), this.topLeftBorderDoubleInnerBox = a > 0 || o > 0 ? FA(r.left + F * 2 / 3, r.top + E * 2 / 3, a - F * 2 / 3, o - E * 2 / 3, fA.TOP_LEFT) : new L(r.left + F * 2 / 3, r.top + E * 2 / 3), this.topRightBorderDoubleInnerBox = a > 0 || o > 0 ? FA(r.left + U, r.top + E * 2 / 3, l - N * 2 / 3, s - E * 2 / 3, fA.TOP_RIGHT) : new L(r.left + r.width - N * 2 / 3, r.top + E * 2 / 3), this.bottomRightBorderDoubleInnerBox = u > 0 || d > 0 ? FA(r.left + w, r.top + Q, u - N * 2 / 3, d - H * 2 / 3, fA.BOTTOM_RIGHT) : new L(r.left + r.width - N * 2 / 3, r.top + r.height - H * 2 / 3), this.bottomLeftBorderDoubleInnerBox = B > 0 || f > 0 ? FA(r.left + F * 2 / 3, r.top + m, B - F * 2 / 3, f - H * 2 / 3, fA.BOTTOM_LEFT) : new L(r.left + F * 2 / 3, r.top + r.height - H * 2 / 3), this.topLeftBorderStroke = a > 0 || o > 0 ? FA(r.left + F / 2, r.top + E / 2, a - F / 2, o - E / 2, fA.TOP_LEFT) : new L(r.left + F / 2, r.top + E / 2), this.topRightBorderStroke = a > 0 || o > 0 ? FA(r.left + U, r.top + E / 2, l - N / 2, s - E / 2, fA.TOP_RIGHT) : new L(r.left + r.width - N / 2, r.top + E / 2), this.bottomRightBorderStroke = u > 0 || d > 0 ? FA(r.left + w, r.top + Q, u - N / 2, d - H / 2, fA.BOTTOM_RIGHT) : new L(r.left + r.width - N / 2, r.top + r.height - H / 2), this.bottomLeftBorderStroke = B > 0 || f > 0 ? FA(r.left + F / 2, r.top + m, B - F / 2, f - H / 2, fA.BOTTOM_LEFT) : new L(r.left + F / 2, r.top + r.height - H / 2), this.topLeftBorderBox = a > 0 || o > 0 ? FA(r.left, r.top, a, o, fA.TOP_LEFT) : new L(r.left, r.top), this.topRightBorderBox = l > 0 || s > 0 ? FA(r.left + U, r.top, l, s, fA.TOP_RIGHT) : new L(r.left + r.width, r.top), this.bottomRightBorderBox = u > 0 || d > 0 ? FA(r.left + w, r.top + Q, u, d, fA.BOTTOM_RIGHT) : new L(r.left + r.width, r.top + r.height), this.bottomLeftBorderBox = B > 0 || f > 0 ? FA(r.left, r.top + m, B, f, fA.BOTTOM_LEFT) : new L(r.left, r.top + r.height), this.topLeftPaddingBox = a > 0 || o > 0 ? FA(r.left + F, r.top + E, Math.max(0, a - F), Math.max(0, o - E), fA.TOP_LEFT) : new L(r.left + F, r.top + E), this.topRightPaddingBox = l > 0 || s > 0 ? FA(r.left + Math.min(U, r.width - N), r.top + E, U > r.width + N ? 0 : Math.max(0, l - N), Math.max(0, s - E), fA.TOP_RIGHT) : new L(r.left + r.width - N, r.top + E), this.bottomRightPaddingBox = u > 0 || d > 0 ? FA(r.left + Math.min(w, r.width - F), r.top + Math.min(Q, r.height - H), Math.max(0, u - N), Math.max(0, d - H), fA.BOTTOM_RIGHT) : new L(r.left + r.width - N, r.top + r.height - H), this.bottomLeftPaddingBox = B > 0 || f > 0 ? FA(r.left + F, r.top + Math.min(m, r.height - H), Math.max(0, B - F), Math.max(0, f - H), fA.BOTTOM_LEFT) : new L(r.left + F, r.top + r.height - H), this.topLeftContentBox = a > 0 || o > 0 ? FA(r.left + F + T, r.top + E + V, Math.max(0, a - (F + T)), Math.max(0, o - (E + V)), fA.TOP_LEFT) : new L(r.left + F + T, r.top + E + V), this.topRightContentBox = l > 0 || s > 0 ? FA(r.left + Math.min(U, r.width + F + T), r.top + E + V, U > r.width + F + T ? 0 : l - F + T, s - (E + V), fA.TOP_RIGHT) : new L(r.left + r.width - (N + v), r.top + E + V), this.bottomRightContentBox = u > 0 || d > 0 ? FA(r.left + Math.min(w, r.width - (F + T)), r.top + Math.min(Q, r.height + E + V), Math.max(0, u - (N + v)), d - (H + x), fA.BOTTOM_RIGHT) : new L(r.left + r.width - (N + v), r.top + r.height - (H + x)), this.bottomLeftContentBox = B > 0 || f > 0 ? FA(r.left + F + T, r.top + m, Math.max(0, B - (F + T)), f - (H + x), fA.BOTTOM_LEFT) : new L(r.left + F + T, r.top + r.height - (H + x));
@@ -12268,10 +12264,10 @@ var FA = function(e, A, t, r, n) {
12268
12264
  return u > B.element.container.styles.zIndex.order ? (d = f, !1) : d > 0;
12269
12265
  }), s.negativeZIndex.splice(d, 0, c);
12270
12266
  } else if (u > 0) {
12271
- var h = 0;
12267
+ var g = 0;
12272
12268
  s.positiveZIndex.some(function(B, f) {
12273
- return u >= B.element.container.styles.zIndex.order ? (h = f + 1, !1) : h > 0;
12274
- }), s.positiveZIndex.splice(h, 0, c);
12269
+ return u >= B.element.container.styles.zIndex.order ? (g = f + 1, !1) : g > 0;
12270
+ }), s.positiveZIndex.splice(g, 0, c);
12275
12271
  } else
12276
12272
  s.zeroOrAutoZIndexOrTransformedOrOpacity.push(c);
12277
12273
  } else
@@ -12385,11 +12381,11 @@ var FA = function(e, A, t, r, n) {
12385
12381
  if (!l && !d)
12386
12382
  return [t.width, t.height];
12387
12383
  if (d && l) {
12388
- var h = c ? r : n * a, B = u ? n : r / a;
12389
- return [h, B];
12384
+ var g = c ? r : n * a, B = u ? n : r / a;
12385
+ return [g, B];
12390
12386
  }
12391
- var f = c ? r : t.width, g = u ? n : t.height;
12392
- return [f, g];
12387
+ var f = c ? r : t.width, h = u ? n : t.height;
12388
+ return [f, h];
12393
12389
  }
12394
12390
  if (l) {
12395
12391
  var p = 0, U = 0;
@@ -12541,14 +12537,14 @@ var FA = function(e, A, t, r, n) {
12541
12537
  }, A.prototype.renderTextNode = function(t, r) {
12542
12538
  return JA(this, void 0, void 0, function() {
12543
12539
  var n, a, o, i, l, s, c, u, d = this;
12544
- return kA(this, function(h) {
12540
+ return kA(this, function(g) {
12545
12541
  return n = this.createFontStyle(r), a = n[0], o = n[1], i = n[2], this.ctx.font = a, this.ctx.direction = r.direction === 1 ? "rtl" : "ltr", this.ctx.textAlign = "left", this.ctx.textBaseline = "alphabetic", l = this.fontMetrics.getMetrics(o, i), s = l.baseline, c = l.middle, u = r.paintOrder, t.textBounds.forEach(function(B) {
12546
12542
  u.forEach(function(f) {
12547
12543
  switch (f) {
12548
12544
  case 0:
12549
12545
  d.ctx.fillStyle = NA(r.color), d.renderTextWithLetterSpacing(B, r.letterSpacing, s);
12550
- var g = r.textShadow;
12551
- g.length && B.text.trim().length && (g.slice(0).reverse().forEach(function(p) {
12546
+ var h = r.textShadow;
12547
+ h.length && B.text.trim().length && (h.slice(0).reverse().forEach(function(p) {
12552
12548
  d.ctx.shadowColor = NA(p.color), d.ctx.shadowOffsetX = p.offsetX.number * d.options.scale, d.ctx.shadowOffsetY = p.offsetY.number * d.options.scale, d.ctx.shadowBlur = p.blur.number, d.renderTextWithLetterSpacing(B, r.letterSpacing, s);
12553
12549
  }), d.ctx.shadowColor = "", d.ctx.shadowOffsetX = 0, d.ctx.shadowOffsetY = 0, d.ctx.shadowBlur = 0), r.textDecorationLine.length && (d.ctx.fillStyle = NA(r.textDecorationColor || r.color), r.textDecorationLine.forEach(function(p) {
12554
12550
  switch (p) {
@@ -12582,7 +12578,7 @@ var FA = function(e, A, t, r, n) {
12582
12578
  }
12583
12579
  }, A.prototype.renderNodeContent = function(t) {
12584
12580
  return JA(this, void 0, void 0, function() {
12585
- var r, n, a, o, i, l, U, U, s, c, u, d, w, h, B, m, f, g, p, U, Q, w, m;
12581
+ var r, n, a, o, i, l, U, U, s, c, u, d, w, g, B, m, f, h, p, U, Q, w, m;
12586
12582
  return kA(this, function(E) {
12587
12583
  switch (E.label) {
12588
12584
  case 0:
@@ -12637,7 +12633,7 @@ var FA = function(e, A, t, r, n) {
12637
12633
  new L(r.bounds.left + u * 0.84, r.bounds.top + u * 0.34085),
12638
12634
  new L(r.bounds.left + u * 0.39363, r.bounds.top + u * 0.79)
12639
12635
  ]), this.ctx.fillStyle = NA(us), this.ctx.fill(), this.ctx.restore()) : r.type === On && r.checked && (this.ctx.save(), this.ctx.beginPath(), this.ctx.arc(r.bounds.left + u / 2, r.bounds.top + u / 2, u / 4, 0, Math.PI * 2, !0), this.ctx.fillStyle = NA(us), this.ctx.fill(), this.ctx.restore())), tR(r) && r.value.length) {
12640
- switch (d = this.createFontStyle(a), w = d[0], h = d[1], B = this.fontMetrics.getMetrics(w, h).baseline, this.ctx.font = w, this.ctx.fillStyle = NA(a.color), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = nR(r.styles.textAlign), m = Kn(r), f = 0, r.styles.textAlign) {
12636
+ switch (d = this.createFontStyle(a), w = d[0], g = d[1], B = this.fontMetrics.getMetrics(w, g).baseline, this.ctx.font = w, this.ctx.fillStyle = NA(a.color), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = nR(r.styles.textAlign), m = Kn(r), f = 0, r.styles.textAlign) {
12641
12637
  case 1:
12642
12638
  f += m.width / 2;
12643
12639
  break;
@@ -12645,12 +12641,12 @@ var FA = function(e, A, t, r, n) {
12645
12641
  f += m.width;
12646
12642
  break;
12647
12643
  }
12648
- g = m.add(f, 0, 0, -m.height / 2 + 1), this.ctx.save(), this.path([
12644
+ h = m.add(f, 0, 0, -m.height / 2 + 1), this.ctx.save(), this.path([
12649
12645
  new L(m.left, m.top),
12650
12646
  new L(m.left + m.width, m.top),
12651
12647
  new L(m.left + m.width, m.top + m.height),
12652
12648
  new L(m.left, m.top + m.height)
12653
- ]), this.ctx.clip(), this.renderTextWithLetterSpacing(new Fr(r.value, g), a.letterSpacing, B), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
12649
+ ]), this.ctx.clip(), this.renderTextWithLetterSpacing(new Fr(r.value, h), a.letterSpacing, B), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
12654
12650
  }
12655
12651
  if (!TA(
12656
12652
  r.styles.display,
@@ -12683,7 +12679,7 @@ var FA = function(e, A, t, r, n) {
12683
12679
  });
12684
12680
  }, A.prototype.renderStackContent = function(t) {
12685
12681
  return JA(this, void 0, void 0, function() {
12686
- var r, n, p, a, o, p, i, l, p, s, c, p, u, d, p, h, B, p, f, g, p;
12682
+ var r, n, p, a, o, p, i, l, p, s, c, p, u, d, p, g, B, p, f, h, p;
12687
12683
  return kA(this, function(U) {
12688
12684
  switch (U.label) {
12689
12685
  case 0:
@@ -12737,17 +12733,17 @@ var FA = function(e, A, t, r, n) {
12737
12733
  case 21:
12738
12734
  return u++, [3, 19];
12739
12735
  case 22:
12740
- h = 0, B = t.zeroOrAutoZIndexOrTransformedOrOpacity, U.label = 23;
12736
+ g = 0, B = t.zeroOrAutoZIndexOrTransformedOrOpacity, U.label = 23;
12741
12737
  case 23:
12742
- return h < B.length ? (p = B[h], [4, this.renderStack(p)]) : [3, 26];
12738
+ return g < B.length ? (p = B[g], [4, this.renderStack(p)]) : [3, 26];
12743
12739
  case 24:
12744
12740
  U.sent(), U.label = 25;
12745
12741
  case 25:
12746
- return h++, [3, 23];
12742
+ return g++, [3, 23];
12747
12743
  case 26:
12748
- f = 0, g = t.positiveZIndex, U.label = 27;
12744
+ f = 0, h = t.positiveZIndex, U.label = 27;
12749
12745
  case 27:
12750
- return f < g.length ? (p = g[f], [4, this.renderStack(p)]) : [3, 30];
12746
+ return f < h.length ? (p = h[f], [4, this.renderStack(p)]) : [3, 30];
12751
12747
  case 28:
12752
12748
  U.sent(), U.label = 29;
12753
12749
  case 29:
@@ -12787,7 +12783,7 @@ var FA = function(e, A, t, r, n) {
12787
12783
  switch (s.label) {
12788
12784
  case 0:
12789
12785
  r = t.styles.backgroundImage.length - 1, n = function(c) {
12790
- var u, d, h, V, S, _, T, G, H, B, V, S, _, T, G, f, g, p, U, Q, w, m, E, N, H, F, V, v, x, T, G, AA, S, _, q, lA, X, W, k, $, dA, pA;
12786
+ var u, d, g, V, S, _, T, G, H, B, V, S, _, T, G, f, h, p, U, Q, w, m, E, N, H, F, V, v, x, T, G, AA, S, _, q, lA, X, W, k, $, dA, pA;
12791
12787
  return kA(this, function(hA) {
12792
12788
  switch (hA.label) {
12793
12789
  case 0:
@@ -12801,13 +12797,13 @@ var FA = function(e, A, t, r, n) {
12801
12797
  case 3:
12802
12798
  return hA.sent(), a.context.logger.error("Error loading background-image " + d), [3, 4];
12803
12799
  case 4:
12804
- return u && (h = eo(t, r, [
12800
+ return u && (g = eo(t, r, [
12805
12801
  u.width,
12806
12802
  u.height,
12807
12803
  u.width / u.height
12808
- ]), V = h[0], S = h[1], _ = h[2], T = h[3], G = h[4], H = a.ctx.createPattern(a.resizeImage(u, T, G), "repeat"), a.renderRepeat(V, H, S, _)), [3, 6];
12804
+ ]), V = g[0], S = g[1], _ = g[2], T = g[3], G = g[4], H = a.ctx.createPattern(a.resizeImage(u, T, G), "repeat"), a.renderRepeat(V, H, S, _)), [3, 6];
12809
12805
  case 5:
12810
- DE(c) ? (B = eo(t, r, [null, null, null]), V = B[0], S = B[1], _ = B[2], T = B[3], G = B[4], f = xE(c.angle, T, G), g = f[0], p = f[1], U = f[2], Q = f[3], w = f[4], m = document.createElement("canvas"), m.width = T, m.height = G, E = m.getContext("2d"), N = E.createLinearGradient(p, Q, U, w), Yl(c.stops, g).forEach(function(aA) {
12806
+ DE(c) ? (B = eo(t, r, [null, null, null]), V = B[0], S = B[1], _ = B[2], T = B[3], G = B[4], f = xE(c.angle, T, G), h = f[0], p = f[1], U = f[2], Q = f[3], w = f[4], m = document.createElement("canvas"), m.width = T, m.height = G, E = m.getContext("2d"), N = E.createLinearGradient(p, Q, U, w), Yl(c.stops, h).forEach(function(aA) {
12811
12807
  return N.addColorStop(aA.stop, NA(aA.color));
12812
12808
  }), E.fillStyle = N, E.fillRect(0, 0, T, G), T > 0 && G > 0 && (H = a.ctx.createPattern(m, "repeat"), a.renderRepeat(V, H, S, _))) : LE(c) && (F = eo(t, r, [
12813
12809
  null,
@@ -12883,10 +12879,10 @@ var FA = function(e, A, t, r, n) {
12883
12879
  { style: r.borderLeftStyle, color: r.borderLeftColor, width: r.borderLeftWidth }
12884
12880
  ], o = rR(Rt(r.backgroundClip, 0), t.curves), n || r.boxShadow.length ? (this.ctx.save(), this.path(o), this.ctx.clip(), Ye(r.backgroundColor) || (this.ctx.fillStyle = NA(r.backgroundColor), this.ctx.fill()), [4, this.renderBackgroundImage(t.container)]) : [3, 2];
12885
12881
  case 1:
12886
- d.sent(), this.ctx.restore(), r.boxShadow.slice(0).reverse().forEach(function(h) {
12882
+ d.sent(), this.ctx.restore(), r.boxShadow.slice(0).reverse().forEach(function(g) {
12887
12883
  u.ctx.save();
12888
- var B = Ln(t.curves), f = h.inset ? 0 : AR, g = Jy(B, -f + (h.inset ? 1 : -1) * h.spread.number, (h.inset ? 1 : -1) * h.spread.number, h.spread.number * (h.inset ? -2 : 2), h.spread.number * (h.inset ? -2 : 2));
12889
- h.inset ? (u.path(B), u.ctx.clip(), u.mask(g)) : (u.mask(B), u.ctx.clip(), u.path(g)), u.ctx.shadowOffsetX = h.offsetX.number + f, u.ctx.shadowOffsetY = h.offsetY.number, u.ctx.shadowColor = NA(h.color), u.ctx.shadowBlur = h.blur.number, u.ctx.fillStyle = h.inset ? NA(h.color) : "rgba(0,0,0,1)", u.ctx.fill(), u.ctx.restore();
12884
+ var B = Ln(t.curves), f = g.inset ? 0 : AR, h = Jy(B, -f + (g.inset ? 1 : -1) * g.spread.number, (g.inset ? 1 : -1) * g.spread.number, g.spread.number * (g.inset ? -2 : 2), g.spread.number * (g.inset ? -2 : 2));
12885
+ g.inset ? (u.path(B), u.ctx.clip(), u.mask(h)) : (u.mask(B), u.ctx.clip(), u.path(h)), u.ctx.shadowOffsetX = g.offsetX.number + f, u.ctx.shadowOffsetY = g.offsetY.number, u.ctx.shadowColor = NA(g.color), u.ctx.shadowBlur = g.blur.number, u.ctx.fillStyle = g.inset ? NA(g.color) : "rgba(0,0,0,1)", u.ctx.fill(), u.ctx.restore();
12890
12886
  }), d.label = 2;
12891
12887
  case 2:
12892
12888
  i = 0, l = 0, s = a, d.label = 3;
@@ -12934,9 +12930,9 @@ var FA = function(e, A, t, r, n) {
12934
12930
  });
12935
12931
  }, A.prototype.renderDashedDottedBorder = function(t, r, n, a, o) {
12936
12932
  return JA(this, void 0, void 0, function() {
12937
- var i, l, s, c, u, d, h, B, f, g, p, U, Q, w, m, E, m, E;
12933
+ var i, l, s, c, u, d, g, B, f, h, p, U, Q, w, m, E, m, E;
12938
12934
  return kA(this, function(N) {
12939
- return this.ctx.save(), i = zy(a, n), l = Es(a, n), o === 2 && (this.path(l), this.ctx.clip()), ie(l[0]) ? (s = l[0].start.x, c = l[0].start.y) : (s = l[0].x, c = l[0].y), ie(l[1]) ? (u = l[1].end.x, d = l[1].end.y) : (u = l[1].x, d = l[1].y), n === 0 || n === 2 ? h = Math.abs(s - u) : h = Math.abs(c - d), this.ctx.beginPath(), o === 3 ? this.formatPath(i) : this.formatPath(l.slice(0, 2)), B = r < 3 ? r * 3 : r * 2, f = r < 3 ? r * 2 : r, o === 3 && (B = r, f = r), g = !0, h <= B * 2 ? g = !1 : h <= B * 2 + f ? (p = h / (2 * B + f), B *= p, f *= p) : (U = Math.floor((h + f) / (B + f)), Q = (h - U * B) / (U - 1), w = (h - (U + 1) * B) / U, f = w <= 0 || Math.abs(f - Q) < Math.abs(f - w) ? Q : w), g && (o === 3 ? this.ctx.setLineDash([0, B + f]) : this.ctx.setLineDash([B, f])), o === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = r) : this.ctx.lineWidth = r * 2 + 1.1, this.ctx.strokeStyle = NA(t), this.ctx.stroke(), this.ctx.setLineDash([]), o === 2 && (ie(l[0]) && (m = l[3], E = l[0], this.ctx.beginPath(), this.formatPath([new L(m.end.x, m.end.y), new L(E.start.x, E.start.y)]), this.ctx.stroke()), ie(l[1]) && (m = l[1], E = l[2], this.ctx.beginPath(), this.formatPath([new L(m.end.x, m.end.y), new L(E.start.x, E.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
12935
+ return this.ctx.save(), i = zy(a, n), l = Es(a, n), o === 2 && (this.path(l), this.ctx.clip()), ie(l[0]) ? (s = l[0].start.x, c = l[0].start.y) : (s = l[0].x, c = l[0].y), ie(l[1]) ? (u = l[1].end.x, d = l[1].end.y) : (u = l[1].x, d = l[1].y), n === 0 || n === 2 ? g = Math.abs(s - u) : g = Math.abs(c - d), this.ctx.beginPath(), o === 3 ? this.formatPath(i) : this.formatPath(l.slice(0, 2)), B = r < 3 ? r * 3 : r * 2, f = r < 3 ? r * 2 : r, o === 3 && (B = r, f = r), h = !0, g <= B * 2 ? h = !1 : g <= B * 2 + f ? (p = g / (2 * B + f), B *= p, f *= p) : (U = Math.floor((g + f) / (B + f)), Q = (g - U * B) / (U - 1), w = (g - (U + 1) * B) / U, f = w <= 0 || Math.abs(f - Q) < Math.abs(f - w) ? Q : w), h && (o === 3 ? this.ctx.setLineDash([0, B + f]) : this.ctx.setLineDash([B, f])), o === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = r) : this.ctx.lineWidth = r * 2 + 1.1, this.ctx.strokeStyle = NA(t), this.ctx.stroke(), this.ctx.setLineDash([]), o === 2 && (ie(l[0]) && (m = l[3], E = l[0], this.ctx.beginPath(), this.formatPath([new L(m.end.x, m.end.y), new L(E.start.x, E.start.y)]), this.ctx.stroke()), ie(l[1]) && (m = l[1], E = l[2], this.ctx.beginPath(), this.formatPath([new L(m.end.x, m.end.y), new L(E.start.x, E.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
12940
12936
  2
12941
12937
  /*return*/
12942
12938
  ];
@@ -13053,7 +13049,7 @@ var FA = function(e, A, t, r, n) {
13053
13049
  typeof window < "u" && Lu.setContext(window);
13054
13050
  var dR = function(e, A) {
13055
13051
  return JA(void 0, void 0, void 0, function() {
13056
- var t, r, n, a, o, i, l, s, c, u, d, h, B, f, g, p, U, Q, w, m, N, E, N, H, F, V, v, x, T, G, AA, S, _, q, lA, X, W, k, $, dA;
13052
+ var t, r, n, a, o, i, l, s, c, u, d, g, B, f, h, p, U, Q, w, m, N, E, N, H, F, V, v, x, T, G, AA, S, _, q, lA, X, W, k, $, dA;
13057
13053
  return kA(this, function(pA) {
13058
13054
  switch (pA.label) {
13059
13055
  case 0:
@@ -13081,23 +13077,23 @@ var dR = function(e, A) {
13081
13077
  copyStyles: s
13082
13078
  }, l.logger.debug("Starting document clone with size " + i.width + "x" + i.height + " scrolled to " + -i.left + "," + -i.top), u = new ws(l, e, c), d = u.clonedReferenceElement, d ? [4, u.toIFrame(t, i)] : [2, Promise.reject("Unable to find element in cloned iframe")];
13083
13079
  case 1:
13084
- return h = pA.sent(), B = Hi(d) || By(d) ? JF(d.ownerDocument) : la(l, d), f = B.width, g = B.height, p = B.left, U = B.top, Q = BR(l, d, A.backgroundColor), w = {
13080
+ return g = pA.sent(), B = Hi(d) || By(d) ? JF(d.ownerDocument) : la(l, d), f = B.width, h = B.height, p = B.left, U = B.top, Q = BR(l, d, A.backgroundColor), w = {
13085
13081
  canvas: A.canvas,
13086
13082
  backgroundColor: Q,
13087
13083
  scale: (lA = (q = A.scale) !== null && q !== void 0 ? q : r.devicePixelRatio) !== null && lA !== void 0 ? lA : 1,
13088
13084
  x: ((X = A.x) !== null && X !== void 0 ? X : 0) + p,
13089
13085
  y: ((W = A.y) !== null && W !== void 0 ? W : 0) + U,
13090
13086
  width: (k = A.width) !== null && k !== void 0 ? k : Math.ceil(f),
13091
- height: ($ = A.height) !== null && $ !== void 0 ? $ : Math.ceil(g)
13087
+ height: ($ = A.height) !== null && $ !== void 0 ? $ : Math.ceil(h)
13092
13088
  }, s ? (l.logger.debug("Document cloned, using foreign object rendering"), N = new iR(l, w), [4, N.render(d)]) : [3, 3];
13093
13089
  case 2:
13094
13090
  return m = pA.sent(), [3, 5];
13095
13091
  case 3:
13096
- return l.logger.debug("Document cloned, element located at " + p + "," + U + " with size " + f + "x" + g + " using computed rendering"), l.logger.debug("Starting DOM parsing"), E = bu(l, d), Q === E.styles.backgroundColor && (E.styles.backgroundColor = Ie.TRANSPARENT), l.logger.debug("Starting renderer for element at " + w.x + "," + w.y + " with size " + w.width + "x" + w.height), N = new eR(l, w), [4, N.render(E)];
13092
+ return l.logger.debug("Document cloned, element located at " + p + "," + U + " with size " + f + "x" + h + " using computed rendering"), l.logger.debug("Starting DOM parsing"), E = bu(l, d), Q === E.styles.backgroundColor && (E.styles.backgroundColor = Ie.TRANSPARENT), l.logger.debug("Starting renderer for element at " + w.x + "," + w.y + " with size " + w.width + "x" + w.height), N = new eR(l, w), [4, N.render(E)];
13097
13093
  case 4:
13098
13094
  m = pA.sent(), pA.label = 5;
13099
13095
  case 5:
13100
- return (!((dA = A.removeContainer) !== null && dA !== void 0) || dA) && (ws.destroy(h) || l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), l.logger.debug("Finished rendering"), [2, m];
13096
+ return (!((dA = A.removeContainer) !== null && dA !== void 0) || dA) && (ws.destroy(g) || l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), l.logger.debug("Finished rendering"), [2, m];
13101
13097
  }
13102
13098
  });
13103
13099
  });
@@ -13170,7 +13166,7 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13170
13166
  return ((y = r.value) == null ? void 0 : y.printHeight) || 0;
13171
13167
  });
13172
13168
  Y(!1);
13173
- const u = Y(!1), d = Y(!1), h = new ut(vA.CACHE.STYLE_CACHE_SIZE), B = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), f = new Map(Gc.map((y) => [y.type, y])), { selectedItems: g, selectItem: p, getCurrentSelected: U, clearSelection: Q } = HF(), { dragging: w, dragItem: m, startDrag: E } = MF({
13169
+ const u = Y(!1), d = Y(!1), g = new ut(vA.CACHE.STYLE_CACHE_SIZE), B = new ut(vA.CACHE.BOUNDING_BOX_CACHE_SIZE), f = new Map(Gc.map((y) => [y.type, y])), { selectedItems: h, selectItem: p, getCurrentSelected: U, clearSelection: Q } = HF(), { dragging: w, dragItem: m, startDrag: E } = MF({
13174
13170
  scale: i,
13175
13171
  canvasWidth: s,
13176
13172
  canvasHeight: c,
@@ -13188,7 +13184,7 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13188
13184
  onDragUpdate: () => {
13189
13185
  T();
13190
13186
  }
13191
- }), { startResize: N, resizing: H, resizeDirection: F, resizeItem: V } = bF(s, c, i, g), { alignmentGuides: v, showGuides: x, updateAlignmentGuides: T, clearAlignmentGuides: G } = WF({
13187
+ }), { startResize: N, resizing: H, resizeDirection: F, resizeItem: V } = bF(s, c, i, h), { alignmentGuides: v, showGuides: x, updateAlignmentGuides: T, clearAlignmentGuides: G } = WF({
13192
13188
  items: o,
13193
13189
  dragItem: m,
13194
13190
  resizeItem: V,
@@ -13198,8 +13194,8 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13198
13194
  canvasWidth: s,
13199
13195
  canvasHeight: c
13200
13196
  }), { startRotate: AA } = xF();
13201
- QA(() => g.value, () => {
13202
- h.clear();
13197
+ QA(() => h.value, () => {
13198
+ g.clear();
13203
13199
  }, { deep: !0 }), QA(() => H.value, (y) => {
13204
13200
  y ? T() : G();
13205
13201
  }), QA(() => {
@@ -13316,17 +13312,17 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13316
13312
  return D !== -1 ? y = y.substring(0, C + D + 1) : y = y.substring(0), Number(parseFloat(y).toFixed(C));
13317
13313
  }
13318
13314
  const W = (y) => f.get(y) || null, k = (y) => {
13319
- const C = g.value.indexOf(y), D = C === g.value.length - 1, eA = C !== -1, sA = `${y.id}_${Math.round(y.props.x * 10)}_${Math.round(y.props.y * 10)}_${y.props.width}_${y.props.height}_${y.props.rotation}_${eA}_${D}`;
13320
- if (h.has(sA))
13321
- return h.get(sA);
13315
+ const C = h.value.indexOf(y), D = C === h.value.length - 1, eA = C !== -1, sA = `${y.id}_${Math.round(y.props.x * 10)}_${Math.round(y.props.y * 10)}_${y.props.width}_${y.props.height}_${y.props.rotation}_${eA}_${D}`;
13316
+ if (g.has(sA))
13317
+ return g.get(sA);
13322
13318
  const P = {
13323
13319
  width: y.props.width + "mm",
13324
13320
  height: y.props.height + "mm",
13325
13321
  transform: `translate(${y.props.x}mm, ${y.props.y}mm) rotate(${y.props.rotation}deg)`
13326
13322
  };
13327
- return eA ? D ? P.zIndex = 1e3 : P.zIndex = 999 : P.zIndex = 10, h.set(sA, P), P;
13323
+ return eA ? D ? P.zIndex = 1e3 : P.zIndex = 999 : P.zIndex = 10, g.set(sA, P), P;
13328
13324
  }, $ = (y) => {
13329
- const C = g.value.some((eA) => eA.id === y.id), D = U() === y;
13325
+ const C = h.value.some((eA) => eA.id === y.id), D = U() === y;
13330
13326
  return {
13331
13327
  "component-selected": C,
13332
13328
  "component-current": C && D,
@@ -13431,7 +13427,7 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13431
13427
  Q();
13432
13428
  }
13433
13429
  const Qa = (y, C) => {
13434
- if (y.stopPropagation(), g.value.length === 0) {
13430
+ if (y.stopPropagation(), h.value.length === 0) {
13435
13431
  p(C), E(y, C);
13436
13432
  return;
13437
13433
  }
@@ -13441,17 +13437,17 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13441
13437
  }
13442
13438
  p(C), E(y, C);
13443
13439
  }, jt = (y) => {
13444
- if (h.clear(), B.clear(), o.value.find((D) => D.id === y) && (o.value = o.value.filter((D) => D.id !== y)), g.value.some((D) => D.id === y)) {
13445
- const D = g.value.filter((eA) => eA.id !== y);
13446
- g.value = D;
13440
+ if (g.clear(), B.clear(), o.value.find((D) => D.id === y) && (o.value = o.value.filter((D) => D.id !== y)), h.value.some((D) => D.id === y)) {
13441
+ const D = h.value.filter((eA) => eA.id !== y);
13442
+ h.value = D;
13447
13443
  }
13448
13444
  fe(() => {
13449
13445
  });
13450
13446
  }, Lr = (y) => {
13451
13447
  var D;
13452
13448
  const C = document.activeElement.tagName.toLowerCase();
13453
- C === "input" || C === "textarea" || (y.key === "Delete" || y.key === "Backspace") && g.value.length > 0 && jt((D = U()) == null ? void 0 : D.id);
13454
- }, { handleMouseWheel: pe, handleInputChange: WA, adjustRotation: re } = kF(g, s, c), Ue = () => {
13449
+ C === "input" || C === "textarea" || (y.key === "Delete" || y.key === "Backspace") && h.value.length > 0 && jt((D = U()) == null ? void 0 : D.id);
13450
+ }, { handleMouseWheel: pe, handleInputChange: WA, adjustRotation: re } = kF(h, s, c), Ue = () => {
13455
13451
  setTimeout(() => {
13456
13452
  const y = document.querySelector(".center-container");
13457
13453
  if (!y)
@@ -13463,7 +13459,7 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13463
13459
  QA(() => t.templateInfo, (y, C) => {
13464
13460
  y !== C && (r.value = y || {}, o.value = (y == null ? void 0 : y.items) || [], Ue());
13465
13461
  }, { deep: !0, immediate: !0 });
13466
- const { handleCopy: Se, handlePaste: Jr } = OF(o, g, s, c), ne = Y({}), _e = Y(!1), Kr = async (y) => {
13462
+ const { handleCopy: Se, handlePaste: Jr } = OF(o, h, s, c), ne = Y({}), _e = Y(!1), Kr = async (y) => {
13467
13463
  try {
13468
13464
  _e.value = !1, ne.value = await tF(y), _e.value = !0;
13469
13465
  } catch {
@@ -13472,13 +13468,13 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13472
13468
  };
13473
13469
  QA(() => t.templateType, async (y) => {
13474
13470
  try {
13475
- await Kr(y), Q(), h.clear(), B.clear();
13471
+ await Kr(y), Q(), g.clear(), B.clear();
13476
13472
  } catch {
13477
13473
  }
13478
13474
  }, { immediate: !0 }), je(async () => {
13479
13475
  _e.value || await Kr(t.templateType), window.addEventListener("resize", Ue), window.addEventListener("keydown", Lr), window.addEventListener("keydown", Se), window.addEventListener("keydown", Jr), window.addEventListener("keydown", aA), Ue(), Me();
13480
13476
  }), Nr(() => {
13481
- window.removeEventListener("resize", Ue), window.removeEventListener("keydown", Lr), window.removeEventListener("keydown", Se), window.removeEventListener("keydown", Jr), window.removeEventListener("keydown", aA), h.clear(), B.clear();
13477
+ window.removeEventListener("resize", Ue), window.removeEventListener("keydown", Lr), window.removeEventListener("keydown", Se), window.removeEventListener("keydown", Jr), window.removeEventListener("keydown", aA), g.clear(), B.clear();
13482
13478
  });
13483
13479
  function Xt() {
13484
13480
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (y) => {
@@ -13807,7 +13803,7 @@ const fR = { class: "label-designer" }, hR = { class: "toolbar" }, gR = { class:
13807
13803
  ])
13808
13804
  ]),
13809
13805
  R("div", xR, [
13810
- b(g).length > 0 ? (M(), Z(HA, { key: 0 }, [
13806
+ b(h).length > 0 ? (M(), Z(HA, { key: 0 }, [
13811
13807
  C[42] || (C[42] = R("h3", { class: "property-panel-title" }, "属性设置", -1)),
13812
13808
  R("div", ZR, [
13813
13809
  R("div", kR, [
@@ -13989,11 +13985,11 @@ const qR = {
13989
13985
  }
13990
13986
  },
13991
13987
  setup(e) {
13992
- const A = lt(), t = e, r = Y(!1), n = Y({}), a = Y(), o = Y(0), i = Y(!1), l = (g, p) => {
13988
+ const A = lt(), t = e, r = Y(!1), n = Y({}), a = Y(), o = Y(0), i = Y(!1), l = (h, p) => {
13993
13989
  let U;
13994
13990
  return function(...w) {
13995
13991
  const m = () => {
13996
- clearTimeout(U), g(...w);
13992
+ clearTimeout(U), h(...w);
13997
13993
  };
13998
13994
  clearTimeout(U), U = setTimeout(m, p);
13999
13995
  };
@@ -14003,12 +13999,12 @@ const qR = {
14003
13999
  }), c = () => {
14004
14000
  if (!a.value)
14005
14001
  return;
14006
- const g = a.value.getBoundingClientRect(), p = d(a.value);
14002
+ const h = a.value.getBoundingClientRect(), p = d(a.value);
14007
14003
  let U = 0;
14008
- if (g.top > 0)
14009
- U = g.top;
14004
+ if (h.top > 0)
14005
+ U = h.top;
14010
14006
  else if (p) {
14011
- const Q = h(a.value);
14007
+ const Q = g(a.value);
14012
14008
  U = Q > 0 ? Q : 60;
14013
14009
  } else {
14014
14010
  const Q = a.value.offsetTop;
@@ -14018,16 +14014,16 @@ const qR = {
14018
14014
  rectTop: U,
14019
14015
  isInModal: p
14020
14016
  });
14021
- }, u = l(c, 100), d = (g) => {
14022
- let p = g.parentElement;
14017
+ }, u = l(c, 100), d = (h) => {
14018
+ let p = h.parentElement;
14023
14019
  for (; p; ) {
14024
14020
  if (p.classList && (p.classList.contains("el-dialog") || p.classList.contains("el-drawer") || p.classList.contains("sc-dialog")))
14025
14021
  return !0;
14026
14022
  p = p.parentElement;
14027
14023
  }
14028
14024
  return !1;
14029
- }, h = (g) => {
14030
- let p = g.parentElement;
14025
+ }, g = (h) => {
14026
+ let p = h.parentElement;
14031
14027
  for (; p; ) {
14032
14028
  if (p.classList && (p.classList.contains("el-dialog") || p.classList.contains("el-drawer") || p.classList.contains("sc-dialog"))) {
14033
14029
  const U = p.getBoundingClientRect();
@@ -14041,13 +14037,13 @@ const qR = {
14041
14037
  setTimeout(() => c(), 100), setTimeout(() => c(), 300), window.addEventListener("resize", u), Nr(() => {
14042
14038
  window.removeEventListener("resize", u);
14043
14039
  });
14044
- }), QA(() => r.value, (g) => {
14045
- g && fe(() => setTimeout(() => c(), 50));
14046
- }), QA(() => t.templateData, (g) => B(g), { deep: !0, immediate: !0 });
14047
- function B(g) {
14048
- if (r.value = (g == null ? void 0 : g.width) > 0 && (g == null ? void 0 : g.height) > 0, !r.value)
14040
+ }), QA(() => r.value, (h) => {
14041
+ h && fe(() => setTimeout(() => c(), 50));
14042
+ }), QA(() => t.templateData, (h) => B(h), { deep: !0, immediate: !0 });
14043
+ function B(h) {
14044
+ if (r.value = (h == null ? void 0 : h.width) > 0 && (h == null ? void 0 : h.height) > 0, !r.value)
14049
14045
  return;
14050
- const p = { ...g };
14046
+ const p = { ...h };
14051
14047
  p.printWidth || Object.assign(p, {
14052
14048
  printWidth: p.width
14053
14049
  }), p.printHeight || Object.assign(p, {
@@ -14057,8 +14053,8 @@ const qR = {
14057
14053
  printList: [{
14058
14054
  x: 0,
14059
14055
  y: 0,
14060
- width: g.printWidth,
14061
- height: g.printHeight,
14056
+ width: h.printWidth,
14057
+ height: h.printHeight,
14062
14058
  topLeftRadius: 4,
14063
14059
  topRightRadius: 4,
14064
14060
  bottomLeftRadius: 4,
@@ -14070,10 +14066,10 @@ const qR = {
14070
14066
  items: []
14071
14067
  }), n.value = p;
14072
14068
  }
14073
- function f(g) {
14074
- A.exposed = g || {}, A.exposeProxy = g || {};
14069
+ function f(h) {
14070
+ A.exposed = h || {}, A.exposeProxy = h || {};
14075
14071
  }
14076
- return (g, p) => {
14072
+ return (h, p) => {
14077
14073
  const U = ld("loading");
14078
14074
  return Ae((M(), Z("div", {
14079
14075
  ref_key: "templateDesignerRef",
@@ -14081,7 +14077,7 @@ const qR = {
14081
14077
  class: zA(["template-designer", { "template-designer-border-top": i.value }]),
14082
14078
  style: nA({ height: "calc(100vh - " + (o.value + 1) + "px)" })
14083
14079
  }, [
14084
- r.value ? (M(), SA(mr(sd(_R, { ...g.$attrs, ...t, ref: f }, g.$slots)), {
14080
+ r.value ? (M(), SA(mr(sd(_R, { ...h.$attrs, ...t, ref: f }, h.$slots)), {
14085
14081
  key: 0,
14086
14082
  "template-info": n.value
14087
14083
  }, null, 8, ["template-info"])) : uA("", !0)