template-designer 0.2.2 → 0.2.4

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.
@@ -38,45 +38,45 @@ const td = {
38
38
  overflow: "hidden",
39
39
  boxSizing: "border-box"
40
40
  })), i = k(/* @__PURE__ */ new Map()), l = (d) => {
41
- var f, B, U, g, Q, p;
41
+ var f, B, g, h, p, Q;
42
42
  if (i.value.has(d))
43
43
  return i.value.get(d);
44
- const h = ((p = (Q = (g = (U = (B = (f = A.propsConfig) == null ? void 0 : f.text) == null ? void 0 : B.propertyPanel) == null ? void 0 : U.find((F) => F.prop == "FontName")) == null ? void 0 : g.options) == null ? void 0 : Q.find((F) => F.value == d)) == null ? void 0 : p.cssValue) || d;
45
- return i.value.set(d, h), h;
44
+ const U = ((Q = (p = (h = (g = (B = (f = A.propsConfig) == null ? void 0 : f.text) == null ? void 0 : B.propertyPanel) == null ? void 0 : g.find((F) => F.prop == "FontName")) == null ? void 0 : h.options) == null ? void 0 : p.find((F) => F.value == d)) == null ? void 0 : Q.cssValue) || d;
45
+ return i.value.set(d, U), U;
46
46
  }, s = {
47
47
  1: "left",
48
48
  2: "center",
49
49
  3: "right"
50
50
  }, c = H(() => {
51
- const d = A.modelValue.TextWrap ?? r.value.TextWrap ?? 1, h = A.modelValue.FontSize ?? r.value.FontSize, f = A.modelValue.FontName || r.value.FontName, B = A.modelValue.Bold || r.value.Bold, U = A.modelValue.Italic || r.value.Italic, g = A.modelValue.FontColor || r.value.FontColor, Q = A.modelValue.Alignment || r.value.Alignment || 2, p = {
52
- fontSize: h + "px",
51
+ const d = A.modelValue.TextWrap ?? r.value.TextWrap ?? 1, U = A.modelValue.FontSize ?? r.value.FontSize, f = A.modelValue.FontName || r.value.FontName, B = A.modelValue.Bold || r.value.Bold, g = A.modelValue.Italic || r.value.Italic, h = A.modelValue.FontColor || r.value.FontColor, p = A.modelValue.Alignment || r.value.Alignment || 2, Q = {
52
+ fontSize: U + "px",
53
53
  fontFamily: l(f),
54
54
  fontWeight: B ? "bold" : "normal",
55
- fontStyle: U ? "italic" : "normal",
56
- color: g,
55
+ fontStyle: g ? "italic" : "normal",
56
+ color: h,
57
57
  width: "100%",
58
58
  minWidth: 0,
59
59
  boxSizing: "border-box",
60
- textAlign: s[Q]
60
+ textAlign: s[p]
61
61
  };
62
62
  switch (d) {
63
63
  case 1:
64
- p.whiteSpace = "pre-wrap", p.overflow = "visible", p.textOverflow = "unset";
64
+ Q.whiteSpace = "pre-wrap", Q.overflow = "visible", Q.textOverflow = "unset";
65
65
  break;
66
66
  case 2:
67
- p.whiteSpace = "nowrap", p.overflow = "hidden", p.textOverflow = "ellipsis";
67
+ Q.whiteSpace = "nowrap", Q.overflow = "hidden", Q.textOverflow = "ellipsis";
68
68
  break;
69
69
  case 3:
70
- p.whiteSpace = "nowrap", p.overflow = "hidden", p.textOverflow = "clip";
70
+ Q.whiteSpace = "nowrap", Q.overflow = "hidden", Q.textOverflow = "clip";
71
71
  break;
72
72
  }
73
- return p;
73
+ return Q;
74
74
  }), u = () => {
75
- var h, f;
76
- const d = at((f = (h = A.propsConfig) == null ? void 0 : h.text) == null ? void 0 : f.propertyPanel) || {};
75
+ var U, f;
76
+ const d = at((f = (U = A.propsConfig) == null ? void 0 : U.text) == null ? void 0 : f.propertyPanel) || {};
77
77
  r.value = d, i.value.clear();
78
78
  };
79
- return CA(() => A.propsConfig, () => u(), { deep: !0, immediate: !0 }), (d, h) => (V(), N("div", {
79
+ return CA(() => A.propsConfig, () => u(), { deep: !0, immediate: !0 }), (d, U) => (V(), N("div", {
80
80
  class: "td-text-component",
81
81
  style: $(o.value)
82
82
  }, [
@@ -104,26 +104,26 @@ const td = {
104
104
  b: (B = "") => Ke(t.value, e, B, "", ""),
105
105
  e: (B) => B ? Ke(t.value, e, "", B, "") : "",
106
106
  m: (B) => B ? Ke(t.value, e, "", "", B) : "",
107
- be: (B, U) => B && U ? Ke(t.value, e, B, U, "") : "",
108
- em: (B, U) => B && U ? Ke(t.value, e, "", B, U) : "",
109
- bm: (B, U) => B && U ? Ke(t.value, e, B, "", U) : "",
110
- bem: (B, U, g) => B && U && g ? Ke(t.value, e, B, U, g) : "",
111
- is: (B, ...U) => {
112
- const g = U.length >= 1 ? U[0] : !0;
113
- return B && g ? `${rd}${B}` : "";
107
+ be: (B, g) => B && g ? Ke(t.value, e, B, g, "") : "",
108
+ em: (B, g) => B && g ? Ke(t.value, e, "", B, g) : "",
109
+ bm: (B, g) => B && g ? Ke(t.value, e, B, "", g) : "",
110
+ bem: (B, g, h) => B && g && h ? Ke(t.value, e, B, g, h) : "",
111
+ is: (B, ...g) => {
112
+ const h = g.length >= 1 ? g[0] : !0;
113
+ return B && h ? `${rd}${B}` : "";
114
114
  },
115
115
  cssVar: (B) => {
116
- const U = {};
117
- for (const g in B)
118
- B[g] && (U[`--${t.value}-${g}`] = B[g]);
119
- return U;
116
+ const g = {};
117
+ for (const h in B)
118
+ B[h] && (g[`--${t.value}-${h}`] = B[h]);
119
+ return g;
120
120
  },
121
121
  cssVarName: (B) => `--${t.value}-${B}`,
122
122
  cssVarBlock: (B) => {
123
- const U = {};
124
- for (const g in B)
125
- B[g] && (U[`--${t.value}-${e}-${g}`] = B[g]);
126
- return U;
123
+ const g = {};
124
+ for (const h in B)
125
+ B[h] && (g[`--${t.value}-${e}-${h}`] = B[h]);
126
+ return g;
127
127
  },
128
128
  cssVarBlockName: (B) => `--${t.value}-${e}-${B}`
129
129
  };
@@ -479,8 +479,8 @@ function JB(...e) {
479
479
  Array.isArray(t) || (t = [t]), Array.isArray(r) || (r = [r]);
480
480
  const a = [], o = () => {
481
481
  a.forEach((c) => c()), a.length = 0;
482
- }, i = (c, u, d, h) => (c.addEventListener(u, d, h), () => c.removeEventListener(u, d, h)), l = CA(() => [Rs(A), To(n)], ([c, u]) => {
483
- o(), c && a.push(...t.flatMap((d) => r.map((h) => i(c, d, h, u))));
482
+ }, i = (c, u, d, U) => (c.addEventListener(u, d, U), () => c.removeEventListener(u, d, U)), l = CA(() => [Rs(A), To(n)], ([c, u]) => {
483
+ o(), c && a.push(...t.flatMap((d) => r.map((U) => i(c, d, U, u))));
484
484
  }, { immediate: !0, flush: "post" }), s = () => {
485
485
  l(), o();
486
486
  };
@@ -771,7 +771,7 @@ const e0 = (e) => (A, t) => t0(A, t, I(e)), t0 = (e, A, t) => SB(t, e, e).replac
771
771
  validator: t || o ? (s) => {
772
772
  let c = !1, u = [];
773
773
  if (t && (u = Array.from(t), Ti(e, "default") && u.push(n), c || (c = u.includes(s))), o && (c || (c = o(s))), !c && u.length > 0) {
774
- const d = [...new Set(u)].map((h) => JSON.stringify(h)).join(", ");
774
+ const d = [...new Set(u)].map((U) => JSON.stringify(U)).join(", ");
775
775
  Gu(`Invalid prop: validation failed${A ? ` for prop "${A}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(s)}.`);
776
776
  }
777
777
  return c;
@@ -1241,21 +1241,21 @@ const Ws = [
1241
1241
  emits: x0,
1242
1242
  setup(e, { expose: A, emit: t }) {
1243
1243
  const r = e, { Close: n } = v0, a = k(!1), { ns: o, zIndex: i } = u0("message"), { currentZIndex: l, nextZIndex: s } = i, c = k(), u = k(!1), d = k(0);
1244
- let h;
1244
+ let U;
1245
1245
  const f = H(() => r.type ? r.type === "error" ? "danger" : r.type : "info"), B = H(() => {
1246
1246
  const y = r.type;
1247
1247
  return { [o.bm("icon", y)]: y && Yi[y] };
1248
- }), U = H(() => r.icon || Yi[r.type] || ""), g = H(() => k0(r.id)), Q = H(() => O0(r.id, r.offset) + g.value), p = H(() => d.value + Q.value), F = H(() => ({
1249
- top: `${Q.value}px`,
1248
+ }), g = H(() => r.icon || Yi[r.type] || ""), h = H(() => k0(r.id)), p = H(() => O0(r.id, r.offset) + h.value), Q = H(() => d.value + p.value), F = H(() => ({
1249
+ top: `${p.value}px`,
1250
1250
  zIndex: l.value
1251
1251
  }));
1252
1252
  function v() {
1253
- r.duration !== 0 && ({ stop: h } = DB(() => {
1253
+ r.duration !== 0 && ({ stop: U } = DB(() => {
1254
1254
  T();
1255
1255
  }, r.duration));
1256
1256
  }
1257
1257
  function C() {
1258
- h == null || h();
1258
+ U == null || U();
1259
1259
  }
1260
1260
  function T() {
1261
1261
  u.value = !1, ue(() => {
@@ -1274,7 +1274,7 @@ const Ws = [
1274
1274
  d.value = c.value.getBoundingClientRect().height;
1275
1275
  }), A({
1276
1276
  visible: u,
1277
- bottom: p,
1277
+ bottom: Q,
1278
1278
  close: T
1279
1279
  }), (y, S) => (V(), yA(gs, {
1280
1280
  name: I(o).b("fade"),
@@ -1306,12 +1306,12 @@ const Ws = [
1306
1306
  type: I(f),
1307
1307
  class: _A(I(o).e("badge"))
1308
1308
  }, null, 8, ["value", "type", "class"])) : tA("v-if", !0),
1309
- I(U) ? (V(), yA(I(Gi), {
1309
+ I(g) ? (V(), yA(I(Gi), {
1310
1310
  key: 1,
1311
1311
  class: _A([I(o).e("icon"), I(B)])
1312
1312
  }, {
1313
1313
  default: j(() => [
1314
- (V(), yA(cr(I(U))))
1314
+ (V(), yA(cr(I(g))))
1315
1315
  ]),
1316
1316
  _: 1
1317
1317
  }, 8, ["class"])) : tA("v-if", !0),
@@ -1467,31 +1467,31 @@ const RA = (e, A) => {
1467
1467
  }), u = () => {
1468
1468
  n.value && !a.value && n.value.click();
1469
1469
  }, d = (B) => {
1470
- const U = B.target.value.trim();
1471
- U ? U.startsWith("http://") || U.startsWith("https://") || U.startsWith("data:") ? s.value = U : U.startsWith("data:") || (s.value = U) : s.value = "";
1472
- }, h = async (B) => {
1473
- var p;
1474
- const U = B.target.files[0];
1475
- if (!U)
1470
+ const g = B.target.value.trim();
1471
+ g ? g.startsWith("http://") || g.startsWith("https://") || g.startsWith("data:") ? s.value = g : g.startsWith("data:") || (s.value = g) : s.value = "";
1472
+ }, U = async (B) => {
1473
+ var Q;
1474
+ const g = B.target.files[0];
1475
+ if (!g)
1476
1476
  return;
1477
- if (t.accept && !U.type.match(t.accept.replace("*", ".*"))) {
1477
+ if (t.accept && !g.type.match(t.accept.replace("*", ".*"))) {
1478
1478
  alert("请选择正确的文件类型");
1479
1479
  return;
1480
1480
  }
1481
- const g = (p = l == null ? void 0 : l.image) == null ? void 0 : p.request;
1482
- if (!g || typeof g != "function") {
1483
- f(U);
1481
+ const h = (Q = l == null ? void 0 : l.image) == null ? void 0 : Q.request;
1482
+ if (!h || typeof h != "function") {
1483
+ f(g);
1484
1484
  return;
1485
1485
  }
1486
- i.value = U;
1487
- let Q = null;
1486
+ i.value = g;
1487
+ let p = null;
1488
1488
  try {
1489
- a.value = !0, Q = g(U), o.value = Q;
1490
- const F = await Q;
1491
- if (o.value === Q && i.value === U)
1489
+ a.value = !0, p = h(g), o.value = p;
1490
+ const F = await p;
1491
+ if (o.value === p && i.value === g)
1492
1492
  if (F && F.success !== !1) {
1493
1493
  const v = F.url || F.data || F, C = {
1494
- fileName: U.name,
1494
+ fileName: g.name,
1495
1495
  fileSrc: v,
1496
1496
  uploadResult: F
1497
1497
  };
@@ -1501,54 +1501,54 @@ const RA = (e, A) => {
1501
1501
  else
1502
1502
  console.log("组件已切换或文件已改变,忽略上传结果");
1503
1503
  } catch (F) {
1504
- o.value === Q && i.value === U && (n.value && (n.value.value = ""), dr.error(F.message || "上传失败,请重试"));
1504
+ o.value === p && i.value === g && (n.value && (n.value.value = ""), dr.error(F.message || "上传失败,请重试"));
1505
1505
  } finally {
1506
- o.value === Q && (a.value = !1, o.value = null, i.value = null);
1506
+ o.value === p && (a.value = !1, o.value = null, i.value = null);
1507
1507
  }
1508
1508
  }, f = (B) => {
1509
- const U = new FileReader();
1510
- U.onload = (g) => {
1511
- const Q = {
1509
+ const g = new FileReader();
1510
+ g.onload = (h) => {
1511
+ const p = {
1512
1512
  fileName: B.name,
1513
- fileSrc: g.target.result
1513
+ fileSrc: h.target.result
1514
1514
  };
1515
- s.value = Q, r("change", { target: { files: [B] } });
1516
- }, U.onerror = () => {
1515
+ s.value = p, r("change", { target: { files: [B] } });
1516
+ }, g.onerror = () => {
1517
1517
  alert("文件读取失败,请重试");
1518
- }, U.readAsDataURL(B);
1518
+ }, g.readAsDataURL(B);
1519
1519
  };
1520
1520
  return ju(() => {
1521
1521
  o.value = null, i.value = null;
1522
- }), (B, U) => {
1523
- const g = wA("el-icon-loading"), Q = wA("el-icon");
1522
+ }), (B, g) => {
1523
+ const h = wA("el-icon-loading"), p = wA("el-icon");
1524
1524
  return V(), N("div", z0, [
1525
1525
  e.label ? (V(), N("label", j0, Be(e.label), 1)) : tA("", !0),
1526
1526
  e.type === "select" ? YA((V(), N("select", {
1527
1527
  key: 1,
1528
- "onUpdate:modelValue": U[0] || (U[0] = (p) => s.value = p)
1528
+ "onUpdate:modelValue": g[0] || (g[0] = (Q) => s.value = Q)
1529
1529
  }, [
1530
- (V(!0), N(TA, null, Se(e.options, (p) => (V(), N("option", {
1531
- key: p.value,
1532
- value: p.value
1533
- }, Be(p.label), 9, X0))), 128))
1530
+ (V(!0), N(TA, null, Se(e.options, (Q) => (V(), N("option", {
1531
+ key: Q.value,
1532
+ value: Q.value
1533
+ }, Be(Q.label), 9, X0))), 128))
1534
1534
  ], 512)), [
1535
1535
  [Xu, s.value]
1536
1536
  ]) : e.type === "color" ? YA((V(), N("input", {
1537
1537
  key: 2,
1538
- "onUpdate:modelValue": U[1] || (U[1] = (p) => s.value = p),
1538
+ "onUpdate:modelValue": g[1] || (g[1] = (Q) => s.value = Q),
1539
1539
  type: "color"
1540
1540
  }, null, 512)), [
1541
1541
  [Ge, s.value]
1542
1542
  ]) : e.type === "checkbox" ? YA((V(), N("input", {
1543
1543
  key: 3,
1544
- "onUpdate:modelValue": U[2] || (U[2] = (p) => s.value = p),
1544
+ "onUpdate:modelValue": g[2] || (g[2] = (Q) => s.value = Q),
1545
1545
  type: "checkbox"
1546
1546
  }, null, 512)), [
1547
1547
  [Pu, s.value]
1548
1548
  ]) : e.type === "file" ? (V(), N("div", P0, [
1549
1549
  YA(m("input", {
1550
1550
  type: "text",
1551
- "onUpdate:modelValue": U[3] || (U[3] = (p) => c.value = p),
1551
+ "onUpdate:modelValue": g[3] || (g[3] = (Q) => c.value = Q),
1552
1552
  placeholder: "请选择图片",
1553
1553
  class: "file-url-input",
1554
1554
  onInput: d,
@@ -1562,12 +1562,12 @@ const RA = (e, A) => {
1562
1562
  class: "file-select-btn",
1563
1563
  disabled: a.value
1564
1564
  }, [
1565
- a.value ? (V(), yA(Q, {
1565
+ a.value ? (V(), yA(p, {
1566
1566
  key: 0,
1567
1567
  class: "is-loading"
1568
1568
  }, {
1569
1569
  default: j(() => [
1570
- W(g)
1570
+ W(h)
1571
1571
  ]),
1572
1572
  _: 1
1573
1573
  })) : (V(), N("span", q0, Be(a.value ? "上传中..." : "选择"), 1))
@@ -1575,14 +1575,14 @@ const RA = (e, A) => {
1575
1575
  m("input", {
1576
1576
  type: "file",
1577
1577
  accept: e.accept,
1578
- onChange: h,
1578
+ onChange: U,
1579
1579
  ref_key: "fileInput",
1580
1580
  ref: n,
1581
1581
  class: "file-input"
1582
1582
  }, null, 40, $0)
1583
1583
  ])) : YA((V(), N("input", {
1584
1584
  key: 5,
1585
- "onUpdate:modelValue": U[4] || (U[4] = (p) => s.value = p),
1585
+ "onUpdate:modelValue": g[4] || (g[4] = (Q) => s.value = Q),
1586
1586
  type: e.type,
1587
1587
  min: e.min,
1588
1588
  max: e.max,
@@ -1628,10 +1628,10 @@ const tf = { class: "property-layout-container" }, rf = {
1628
1628
  setup(e, { emit: A }) {
1629
1629
  const t = e, r = A, { propsConfig: n, panelType: a } = qu(t), o = H(() => `${a.value}-property-panel`), i = H(() => {
1630
1630
  const d = n.value.propertyPanel;
1631
- return d && typeof d == "object" && !Array.isArray(d) ? Object.keys(d).map((h) => ({
1632
- prop: h,
1633
- ...d[h]
1634
- })).filter((h) => !h.hide) : Array.isArray(d) ? d.filter((h) => !h.hide) || [] : [];
1631
+ return d && typeof d == "object" && !Array.isArray(d) ? Object.keys(d).map((U) => ({
1632
+ prop: U,
1633
+ ...d[U]
1634
+ })).filter((U) => !U.hide) : Array.isArray(d) ? d.filter((U) => !U.hide) || [] : [];
1635
1635
  }), l = H({
1636
1636
  get: () => t.modelValue,
1637
1637
  set: (d) => r("update:modelValue", d)
@@ -1641,10 +1641,10 @@ const tf = { class: "property-layout-container" }, rf = {
1641
1641
  var f;
1642
1642
  if (d.options)
1643
1643
  return d.options || [];
1644
- const h = JSON.parse(JSON.stringify(((f = t.options) == null ? void 0 : f[d == null ? void 0 : d.optionsKey]) || [])) || [];
1645
- return h.unshift({ label: "无", value: "" }), h;
1644
+ const U = JSON.parse(JSON.stringify(((f = t.options) == null ? void 0 : f[d == null ? void 0 : d.optionsKey]) || [])) || [];
1645
+ return U.unshift({ label: "无", value: "" }), U;
1646
1646
  }, u = (d) => d.layout ? d.layout : ["text", "file", "textarea"].includes(d.type) ? "full" : "half";
1647
- return hs("config", t.propsConfig), (d, h) => (V(), N("div", {
1647
+ return hs("config", t.propsConfig), (d, U) => (V(), N("div", {
1648
1648
  class: _A(o.value)
1649
1649
  }, [
1650
1650
  m("div", tf, [
@@ -4414,10 +4414,10 @@ const fQ = {
4414
4414
  lineColor: "",
4415
4415
  codeType: ""
4416
4416
  }), l = () => {
4417
- var g, Q, p, F, v, C, T, M, y, S;
4417
+ var h, p, Q, F, v, C, T, M, y, S;
4418
4418
  if (!t.value)
4419
4419
  return;
4420
- const c = at((Q = (g = A.propsConfig) == null ? void 0 : g.barcode) == null ? void 0 : Q.propertyPanel) || {}, u = ((p = A.modelValue) == null ? void 0 : p.BarcodeValue) || c.BarcodeValue || "", d = ((F = A.modelValue) == null ? void 0 : F.CodeType) || c.CodeType || "", h = A.modelValue.LineColor || c.LineColor, f = ((S = (y = (M = (T = (C = (v = A.propsConfig) == null ? void 0 : v.barcode) == null ? void 0 : C.propertyPanel) == null ? void 0 : T.find((D) => D.prop === "CodeType")) == null ? void 0 : M.options) == null ? void 0 : y.find((D) => D.value === d)) == null ? void 0 : S.compValue) || "", B = { value: u, type: d, lineColor: h, codeType: f };
4420
+ const c = at((p = (h = A.propsConfig) == null ? void 0 : h.barcode) == null ? void 0 : p.propertyPanel) || {}, u = ((Q = A.modelValue) == null ? void 0 : Q.BarcodeValue) || c.BarcodeValue || "", d = ((F = A.modelValue) == null ? void 0 : F.CodeType) || c.CodeType || "", U = A.modelValue.LineColor || c.LineColor, f = ((S = (y = (M = (T = (C = (v = A.propsConfig) == null ? void 0 : v.barcode) == null ? void 0 : C.propertyPanel) == null ? void 0 : T.find((D) => D.prop === "CodeType")) == null ? void 0 : M.options) == null ? void 0 : y.find((D) => D.value === d)) == null ? void 0 : S.compValue) || "", B = { value: u, type: d, lineColor: U, codeType: f };
4421
4421
  if (JSON.stringify(B) !== JSON.stringify(i.value)) {
4422
4422
  i.value = B;
4423
4423
  try {
@@ -4431,7 +4431,7 @@ const fQ = {
4431
4431
  // 条形码的边距
4432
4432
  margin: 0,
4433
4433
  // 条形码的颜色
4434
- lineColor: h,
4434
+ lineColor: U,
4435
4435
  // 条形码的高度
4436
4436
  height: 50,
4437
4437
  // 确保条形码能够正确渲染
@@ -4726,8 +4726,8 @@ var pc = {};
4726
4726
  for (let u = 0; u < a; u++) {
4727
4727
  i = l = 0, s = c = null;
4728
4728
  for (let d = 0; d < a; d++) {
4729
- let h = n.get(u, d);
4730
- 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);
4729
+ let U = n.get(u, d);
4730
+ U === s ? i++ : (i >= 5 && (o += A.N1 + (i - 5)), s = U, i = 1), U = n.get(d, u), U === c ? l++ : (l >= 5 && (o += A.N1 + (l - 5)), c = U, l = 1);
4731
4731
  }
4732
4732
  i >= 5 && (o += A.N1 + (i - 5)), l >= 5 && (o += A.N1 + (l - 5));
4733
4733
  }
@@ -5303,66 +5303,66 @@ fe.testAlphanumeric = function(A) {
5303
5303
  })(Oe);
5304
5304
  (function(e) {
5305
5305
  const A = jA, t = Yn, r = Gn, n = Oe, a = di, o = 7973, i = A.getBCHDigit(o);
5306
- function l(d, h, f) {
5306
+ function l(d, U, f) {
5307
5307
  for (let B = 1; B <= 40; B++)
5308
- if (h <= e.getCapacity(B, f, d))
5308
+ if (U <= e.getCapacity(B, f, d))
5309
5309
  return B;
5310
5310
  }
5311
- function s(d, h) {
5312
- return n.getCharCountIndicator(d, h) + 4;
5311
+ function s(d, U) {
5312
+ return n.getCharCountIndicator(d, U) + 4;
5313
5313
  }
5314
- function c(d, h) {
5314
+ function c(d, U) {
5315
5315
  let f = 0;
5316
5316
  return d.forEach(function(B) {
5317
- const U = s(B.mode, h);
5318
- f += U + B.getBitsLength();
5317
+ const g = s(B.mode, U);
5318
+ f += g + B.getBitsLength();
5319
5319
  }), f;
5320
5320
  }
5321
- function u(d, h) {
5321
+ function u(d, U) {
5322
5322
  for (let f = 1; f <= 40; f++)
5323
- if (c(d, f) <= e.getCapacity(f, h, n.MIXED))
5323
+ if (c(d, f) <= e.getCapacity(f, U, n.MIXED))
5324
5324
  return f;
5325
5325
  }
5326
- e.from = function(h, f) {
5327
- return a.isValid(h) ? parseInt(h, 10) : f;
5328
- }, e.getCapacity = function(h, f, B) {
5329
- if (!a.isValid(h))
5326
+ e.from = function(U, f) {
5327
+ return a.isValid(U) ? parseInt(U, 10) : f;
5328
+ }, e.getCapacity = function(U, f, B) {
5329
+ if (!a.isValid(U))
5330
5330
  throw new Error("Invalid QR Code version");
5331
5331
  typeof B > "u" && (B = n.BYTE);
5332
- const U = A.getSymbolTotalCodewords(h), g = t.getTotalCodewordsCount(h, f), Q = (U - g) * 8;
5332
+ const g = A.getSymbolTotalCodewords(U), h = t.getTotalCodewordsCount(U, f), p = (g - h) * 8;
5333
5333
  if (B === n.MIXED)
5334
- return Q;
5335
- const p = Q - s(B, h);
5334
+ return p;
5335
+ const Q = p - s(B, U);
5336
5336
  switch (B) {
5337
5337
  case n.NUMERIC:
5338
- return Math.floor(p / 10 * 3);
5338
+ return Math.floor(Q / 10 * 3);
5339
5339
  case n.ALPHANUMERIC:
5340
- return Math.floor(p / 11 * 2);
5340
+ return Math.floor(Q / 11 * 2);
5341
5341
  case n.KANJI:
5342
- return Math.floor(p / 13);
5342
+ return Math.floor(Q / 13);
5343
5343
  case n.BYTE:
5344
5344
  default:
5345
- return Math.floor(p / 8);
5345
+ return Math.floor(Q / 8);
5346
5346
  }
5347
- }, e.getBestVersionForData = function(h, f) {
5347
+ }, e.getBestVersionForData = function(U, f) {
5348
5348
  let B;
5349
- const U = r.from(f, r.M);
5350
- if (Array.isArray(h)) {
5351
- if (h.length > 1)
5352
- return u(h, U);
5353
- if (h.length === 0)
5349
+ const g = r.from(f, r.M);
5350
+ if (Array.isArray(U)) {
5351
+ if (U.length > 1)
5352
+ return u(U, g);
5353
+ if (U.length === 0)
5354
5354
  return 1;
5355
- B = h[0];
5355
+ B = U[0];
5356
5356
  } else
5357
- B = h;
5358
- return l(B.mode, B.getLength(), U);
5359
- }, e.getEncodedBits = function(h) {
5360
- if (!a.isValid(h) || h < 7)
5357
+ B = U;
5358
+ return l(B.mode, B.getLength(), g);
5359
+ }, e.getEncodedBits = function(U) {
5360
+ if (!a.isValid(U) || U < 7)
5361
5361
  throw new Error("Invalid QR Code version");
5362
- let f = h << 12;
5362
+ let f = U << 12;
5363
5363
  for (; A.getBCHDigit(f) - i >= 0; )
5364
5364
  f ^= o << A.getBCHDigit(f) - i;
5365
- return h << 12 | f;
5365
+ return U << 12 | f;
5366
5366
  };
5367
5367
  })(Fc);
5368
5368
  var Ec = {};
@@ -5519,14 +5519,14 @@ var WQ = It, yc = { exports: {} };
5519
5519
  o[r] = 0;
5520
5520
  var i = A.PriorityQueue.make();
5521
5521
  i.push(r, 0);
5522
- for (var l, s, c, u, d, h, f, B, U; !i.empty(); ) {
5522
+ for (var l, s, c, u, d, U, f, B, g; !i.empty(); ) {
5523
5523
  l = i.pop(), s = l.value, u = l.cost, d = t[s] || {};
5524
5524
  for (c in d)
5525
- d.hasOwnProperty(c) && (h = d[c], f = u + h, B = o[c], U = typeof o[c] > "u", (U || B > f) && (o[c] = f, i.push(c, f), a[c] = s));
5525
+ d.hasOwnProperty(c) && (U = d[c], f = u + U, B = o[c], g = typeof o[c] > "u", (g || B > f) && (o[c] = f, i.push(c, f), a[c] = s));
5526
5526
  }
5527
5527
  if (typeof n < "u" && typeof o[n] > "u") {
5528
- var g = ["Could not find a path from ", r, " to ", n, "."].join("");
5529
- throw new Error(g);
5528
+ var h = ["Could not find a path from ", r, " to ", n, "."].join("");
5529
+ throw new Error(h);
5530
5530
  }
5531
5531
  return a;
5532
5532
  },
@@ -5580,25 +5580,25 @@ var WQ = It, yc = { exports: {} };
5580
5580
  var DQ = yc.exports;
5581
5581
  (function(e) {
5582
5582
  const A = Oe, t = MQ, r = HQ, n = ZQ, a = WQ, o = fe, i = jA, l = DQ;
5583
- function s(g) {
5584
- return unescape(encodeURIComponent(g)).length;
5583
+ function s(h) {
5584
+ return unescape(encodeURIComponent(h)).length;
5585
5585
  }
5586
- function c(g, Q, p) {
5586
+ function c(h, p, Q) {
5587
5587
  const F = [];
5588
5588
  let v;
5589
- for (; (v = g.exec(p)) !== null; )
5589
+ for (; (v = h.exec(Q)) !== null; )
5590
5590
  F.push({
5591
5591
  data: v[0],
5592
5592
  index: v.index,
5593
- mode: Q,
5593
+ mode: p,
5594
5594
  length: v[0].length
5595
5595
  });
5596
5596
  return F;
5597
5597
  }
5598
- function u(g) {
5599
- const Q = c(o.NUMERIC, A.NUMERIC, g), p = c(o.ALPHANUMERIC, A.ALPHANUMERIC, g);
5598
+ function u(h) {
5599
+ const p = c(o.NUMERIC, A.NUMERIC, h), Q = c(o.ALPHANUMERIC, A.ALPHANUMERIC, h);
5600
5600
  let F, v;
5601
- return i.isKanjiModeEnabled() ? (F = c(o.BYTE, A.BYTE, g), v = c(o.KANJI, A.KANJI, g)) : (F = c(o.BYTE_KANJI, A.BYTE, g), v = []), Q.concat(p, F, v).sort(function(T, M) {
5601
+ return i.isKanjiModeEnabled() ? (F = c(o.BYTE, A.BYTE, h), v = c(o.KANJI, A.KANJI, h)) : (F = c(o.BYTE_KANJI, A.BYTE, h), v = []), p.concat(Q, F, v).sort(function(T, M) {
5602
5602
  return T.index - M.index;
5603
5603
  }).map(function(T) {
5604
5604
  return {
@@ -5608,104 +5608,104 @@ var DQ = yc.exports;
5608
5608
  };
5609
5609
  });
5610
5610
  }
5611
- function d(g, Q) {
5612
- switch (Q) {
5611
+ function d(h, p) {
5612
+ switch (p) {
5613
5613
  case A.NUMERIC:
5614
- return t.getBitsLength(g);
5614
+ return t.getBitsLength(h);
5615
5615
  case A.ALPHANUMERIC:
5616
- return r.getBitsLength(g);
5616
+ return r.getBitsLength(h);
5617
5617
  case A.KANJI:
5618
- return a.getBitsLength(g);
5618
+ return a.getBitsLength(h);
5619
5619
  case A.BYTE:
5620
- return n.getBitsLength(g);
5620
+ return n.getBitsLength(h);
5621
5621
  }
5622
5622
  }
5623
- function h(g) {
5624
- return g.reduce(function(Q, p) {
5625
- const F = Q.length - 1 >= 0 ? Q[Q.length - 1] : null;
5626
- return F && F.mode === p.mode ? (Q[Q.length - 1].data += p.data, Q) : (Q.push(p), Q);
5623
+ function U(h) {
5624
+ return h.reduce(function(p, Q) {
5625
+ const F = p.length - 1 >= 0 ? p[p.length - 1] : null;
5626
+ return F && F.mode === Q.mode ? (p[p.length - 1].data += Q.data, p) : (p.push(Q), p);
5627
5627
  }, []);
5628
5628
  }
5629
- function f(g) {
5630
- const Q = [];
5631
- for (let p = 0; p < g.length; p++) {
5632
- const F = g[p];
5629
+ function f(h) {
5630
+ const p = [];
5631
+ for (let Q = 0; Q < h.length; Q++) {
5632
+ const F = h[Q];
5633
5633
  switch (F.mode) {
5634
5634
  case A.NUMERIC:
5635
- Q.push([
5635
+ p.push([
5636
5636
  F,
5637
5637
  { data: F.data, mode: A.ALPHANUMERIC, length: F.length },
5638
5638
  { data: F.data, mode: A.BYTE, length: F.length }
5639
5639
  ]);
5640
5640
  break;
5641
5641
  case A.ALPHANUMERIC:
5642
- Q.push([
5642
+ p.push([
5643
5643
  F,
5644
5644
  { data: F.data, mode: A.BYTE, length: F.length }
5645
5645
  ]);
5646
5646
  break;
5647
5647
  case A.KANJI:
5648
- Q.push([
5648
+ p.push([
5649
5649
  F,
5650
5650
  { data: F.data, mode: A.BYTE, length: s(F.data) }
5651
5651
  ]);
5652
5652
  break;
5653
5653
  case A.BYTE:
5654
- Q.push([
5654
+ p.push([
5655
5655
  { data: F.data, mode: A.BYTE, length: s(F.data) }
5656
5656
  ]);
5657
5657
  }
5658
5658
  }
5659
- return Q;
5659
+ return p;
5660
5660
  }
5661
- function B(g, Q) {
5662
- const p = {}, F = { start: {} };
5661
+ function B(h, p) {
5662
+ const Q = {}, F = { start: {} };
5663
5663
  let v = ["start"];
5664
- for (let C = 0; C < g.length; C++) {
5665
- const T = g[C], M = [];
5664
+ for (let C = 0; C < h.length; C++) {
5665
+ const T = h[C], M = [];
5666
5666
  for (let y = 0; y < T.length; y++) {
5667
5667
  const S = T[y], D = "" + C + y;
5668
- M.push(D), p[D] = { node: S, lastCount: 0 }, F[D] = {};
5668
+ M.push(D), Q[D] = { node: S, lastCount: 0 }, F[D] = {};
5669
5669
  for (let L = 0; L < v.length; L++) {
5670
5670
  const b = v[L];
5671
- p[b] && p[b].node.mode === S.mode ? (F[b][D] = d(p[b].lastCount + S.length, S.mode) - d(p[b].lastCount, S.mode), p[b].lastCount += S.length) : (p[b] && (p[b].lastCount = S.length), F[b][D] = d(S.length, S.mode) + 4 + A.getCharCountIndicator(S.mode, Q));
5671
+ Q[b] && Q[b].node.mode === S.mode ? (F[b][D] = d(Q[b].lastCount + S.length, S.mode) - d(Q[b].lastCount, S.mode), Q[b].lastCount += S.length) : (Q[b] && (Q[b].lastCount = S.length), F[b][D] = d(S.length, S.mode) + 4 + A.getCharCountIndicator(S.mode, p));
5672
5672
  }
5673
5673
  }
5674
5674
  v = M;
5675
5675
  }
5676
5676
  for (let C = 0; C < v.length; C++)
5677
5677
  F[v[C]].end = 0;
5678
- return { map: F, table: p };
5678
+ return { map: F, table: Q };
5679
5679
  }
5680
- function U(g, Q) {
5681
- let p;
5682
- const F = A.getBestModeForData(g);
5683
- if (p = A.from(Q, F), p !== A.BYTE && p.bit < F.bit)
5684
- throw new Error('"' + g + '" cannot be encoded with mode ' + A.toString(p) + `.
5680
+ function g(h, p) {
5681
+ let Q;
5682
+ const F = A.getBestModeForData(h);
5683
+ if (Q = A.from(p, F), Q !== A.BYTE && Q.bit < F.bit)
5684
+ throw new Error('"' + h + '" cannot be encoded with mode ' + A.toString(Q) + `.
5685
5685
  Suggested mode is: ` + A.toString(F));
5686
- switch (p === A.KANJI && !i.isKanjiModeEnabled() && (p = A.BYTE), p) {
5686
+ switch (Q === A.KANJI && !i.isKanjiModeEnabled() && (Q = A.BYTE), Q) {
5687
5687
  case A.NUMERIC:
5688
- return new t(g);
5688
+ return new t(h);
5689
5689
  case A.ALPHANUMERIC:
5690
- return new r(g);
5690
+ return new r(h);
5691
5691
  case A.KANJI:
5692
- return new a(g);
5692
+ return new a(h);
5693
5693
  case A.BYTE:
5694
- return new n(g);
5694
+ return new n(h);
5695
5695
  }
5696
5696
  }
5697
- e.fromArray = function(Q) {
5698
- return Q.reduce(function(p, F) {
5699
- return typeof F == "string" ? p.push(U(F, null)) : F.data && p.push(U(F.data, F.mode)), p;
5697
+ e.fromArray = function(p) {
5698
+ return p.reduce(function(Q, F) {
5699
+ return typeof F == "string" ? Q.push(g(F, null)) : F.data && Q.push(g(F.data, F.mode)), Q;
5700
5700
  }, []);
5701
- }, e.fromString = function(Q, p) {
5702
- const F = u(Q, i.isKanjiModeEnabled()), v = f(F), C = B(v, p), T = l.find_path(C.map, "start", "end"), M = [];
5701
+ }, e.fromString = function(p, Q) {
5702
+ const F = u(p, i.isKanjiModeEnabled()), v = f(F), C = B(v, Q), T = l.find_path(C.map, "start", "end"), M = [];
5703
5703
  for (let y = 1; y < T.length - 1; y++)
5704
5704
  M.push(C.table[T[y]].node);
5705
- return e.fromArray(h(M));
5706
- }, e.rawSplit = function(Q) {
5705
+ return e.fromArray(U(M));
5706
+ }, e.rawSplit = function(p) {
5707
5707
  return e.fromArray(
5708
- u(Q, i.isKanjiModeEnabled())
5708
+ u(p, i.isKanjiModeEnabled())
5709
5709
  );
5710
5710
  };
5711
5711
  })(vc);
@@ -5779,24 +5779,24 @@ function Aw(e, A, t) {
5779
5779
  return ew(r, e, A);
5780
5780
  }
5781
5781
  function ew(e, A, t) {
5782
- const r = jn.getSymbolTotalCodewords(A), n = qa.getTotalCodewordsCount(A, t), a = r - n, o = qa.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 YQ(d);
5782
+ const r = jn.getSymbolTotalCodewords(A), n = qa.getTotalCodewordsCount(A, t), a = r - n, o = qa.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, U = new YQ(d);
5783
5783
  let f = 0;
5784
- const B = new Array(o), U = new Array(o);
5785
- let g = 0;
5786
- const Q = new Uint8Array(e.buffer);
5784
+ const B = new Array(o), g = new Array(o);
5785
+ let h = 0;
5786
+ const p = new Uint8Array(e.buffer);
5787
5787
  for (let T = 0; T < o; T++) {
5788
5788
  const M = T < l ? c : u;
5789
- B[T] = Q.slice(f, f + M), U[T] = h.encode(B[T]), f += M, g = Math.max(g, M);
5789
+ B[T] = p.slice(f, f + M), g[T] = U.encode(B[T]), f += M, h = Math.max(h, M);
5790
5790
  }
5791
- const p = new Uint8Array(r);
5791
+ const Q = new Uint8Array(r);
5792
5792
  let F = 0, v, C;
5793
- for (v = 0; v < g; v++)
5793
+ for (v = 0; v < h; v++)
5794
5794
  for (C = 0; C < o; C++)
5795
- v < B[C].length && (p[F++] = B[C][v]);
5795
+ v < B[C].length && (Q[F++] = B[C][v]);
5796
5796
  for (v = 0; v < d; v++)
5797
5797
  for (C = 0; C < o; C++)
5798
- p[F++] = U[C][v];
5799
- return p;
5798
+ Q[F++] = g[C][v];
5799
+ return Q;
5800
5800
  }
5801
5801
  function tw(e, A, t, r) {
5802
5802
  let n;
@@ -5883,11 +5883,11 @@ var Rc = {}, Bi = {};
5883
5883
  }, e.qrToImageData = function(r, n, a) {
5884
5884
  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];
5885
5885
  for (let d = 0; d < s; d++)
5886
- for (let h = 0; h < s; h++) {
5887
- let f = (d * s + h) * 4, B = a.color.light;
5888
- if (d >= c && h >= c && d < s - c && h < s - c) {
5889
- const U = Math.floor((d - c) / l), g = Math.floor((h - c) / l);
5890
- B = u[i[U * o + g] ? 1 : 0];
5886
+ for (let U = 0; U < s; U++) {
5887
+ let f = (d * s + U) * 4, B = a.color.light;
5888
+ if (d >= c && U >= c && d < s - c && U < s - c) {
5889
+ const g = Math.floor((d - c) / l), h = Math.floor((U - c) / l);
5890
+ B = u[i[g * o + h] ? 1 : 0];
5891
5891
  }
5892
5892
  r[f++] = B.r, r[f++] = B.g, r[f++] = B.b, r[f] = B.a;
5893
5893
  }
@@ -5992,15 +5992,15 @@ const iw = { class: "qrcode-canvas-fixed" }, lw = ["src", "alt"], sw = 200, cw =
5992
5992
  boxSizing: "border-box",
5993
5993
  zIndex: 1e3
5994
5994
  })), o = k(null), i = () => {
5995
- var B, U;
5996
- return o.value || (o.value = at((U = (B = A.propsConfig) == null ? void 0 : B.qrcode) == null ? void 0 : U.propertyPanel) || {}), o.value;
5997
- }, l = (B, U) => U ? B.QRCodeValue !== U.QRCodeValue || B.QRCodeForeground !== U.QRCodeForeground || B.QRCodeBackground !== U.QRCodeBackground || B.QRCodeErrorLevel !== U.QRCodeErrorLevel : !0, s = async () => {
5998
- var B, U, g, Q;
5995
+ var B, g;
5996
+ return o.value || (o.value = at((g = (B = A.propsConfig) == null ? void 0 : B.qrcode) == null ? void 0 : g.propertyPanel) || {}), o.value;
5997
+ }, l = (B, g) => g ? B.QRCodeValue !== g.QRCodeValue || B.QRCodeForeground !== g.QRCodeForeground || B.QRCodeBackground !== g.QRCodeBackground || B.QRCodeErrorLevel !== g.QRCodeErrorLevel : !0, s = async () => {
5998
+ var B, g, h, p;
5999
5999
  try {
6000
- const p = i(), F = ((B = A.modelValue) == null ? void 0 : B.QRCodeValue) || p.QRCodeValue || "测试二维码";
6001
- let v = ((U = A.modelValue) == null ? void 0 : U.QRCodeForeground) || p.QRCodeForeground || "#000000", C = ((g = A.modelValue) == null ? void 0 : g.QRCodeBackground) || p.QRCodeBackground || "#ffffff";
6000
+ const Q = i(), F = ((B = A.modelValue) == null ? void 0 : B.QRCodeValue) || Q.QRCodeValue || "测试二维码";
6001
+ let v = ((g = A.modelValue) == null ? void 0 : g.QRCodeForeground) || Q.QRCodeForeground || "#000000", C = ((h = A.modelValue) == null ? void 0 : h.QRCodeBackground) || Q.QRCodeBackground || "#ffffff";
6002
6002
  (v === "transparent" || !v) && (v = "#000000"), (C === "transparent" || !C) && (C = "#ffffff");
6003
- const M = { L: "low", M: "medium", Q: "quartile", H: "high" }[((Q = A.modelValue) == null ? void 0 : Q.QRCodeErrorLevel) || p.QRCodeErrorLevel || "M"] || "medium";
6003
+ const M = { L: "low", M: "medium", Q: "quartile", H: "high" }[((p = A.modelValue) == null ? void 0 : p.QRCodeErrorLevel) || Q.QRCodeErrorLevel || "M"] || "medium";
6004
6004
  F && F.trim() ? t.value = await mr.toDataURL(F, {
6005
6005
  width: sw,
6006
6006
  margin: 0,
@@ -6011,15 +6011,15 @@ const iw = { class: "qrcode-canvas-fixed" }, lw = ["src", "alt"], sw = 200, cw =
6011
6011
  },
6012
6012
  errorCorrectionLevel: M
6013
6013
  }) : t.value = "";
6014
- } catch (p) {
6015
- console.error("生成二维码失败:", p), t.value = "";
6014
+ } catch (Q) {
6015
+ console.error("生成二维码失败:", Q), t.value = "";
6016
6016
  }
6017
6017
  }, c = H(() => {
6018
- var Q, p;
6019
- const B = i(), U = ((Q = A.modelValue) == null ? void 0 : Q.width) ?? B.width, g = ((p = A.modelValue) == null ? void 0 : p.height) ?? B.height;
6018
+ var p, Q;
6019
+ const B = i(), g = ((p = A.modelValue) == null ? void 0 : p.width) ?? B.width, h = ((Q = A.modelValue) == null ? void 0 : Q.height) ?? B.height;
6020
6020
  return {
6021
- width: Qn(U) + "px",
6022
- height: Qn(g) + "px",
6021
+ width: Qn(g) + "px",
6022
+ height: Qn(h) + "px",
6023
6023
  display: "flex",
6024
6024
  alignItems: "center",
6025
6025
  justifyContent: "center",
@@ -6028,13 +6028,13 @@ const iw = { class: "qrcode-canvas-fixed" }, lw = ["src", "alt"], sw = 200, cw =
6028
6028
  }), u = () => {
6029
6029
  }, d = () => {
6030
6030
  console.warn("QR Code image failed to load"), s();
6031
- }, h = () => {
6032
- const B = A.modelValue, U = r.value;
6033
- l(B, U) && s();
6031
+ }, U = () => {
6032
+ const B = A.modelValue, g = r.value;
6033
+ l(B, g) && s();
6034
6034
  }, f = (() => {
6035
6035
  let B;
6036
6036
  return () => {
6037
- clearTimeout(B), B = setTimeout(h, 50);
6037
+ clearTimeout(B), B = setTimeout(U, 50);
6038
6038
  };
6039
6039
  })();
6040
6040
  return Ze(() => {
@@ -6052,18 +6052,18 @@ const iw = { class: "qrcode-canvas-fixed" }, lw = ["src", "alt"], sw = 200, cw =
6052
6052
  o.value = null, s();
6053
6053
  }, { deep: !0 }), Ur(() => {
6054
6054
  r.value = null, o.value = null, t.value = "";
6055
- }), (B, U) => {
6056
- var g;
6055
+ }), (B, g) => {
6056
+ var h;
6057
6057
  return V(), N("div", {
6058
6058
  class: "qrcode-component",
6059
- onDragstart: U[0] || (U[0] = ZA(() => {
6059
+ onDragstart: g[0] || (g[0] = ZA(() => {
6060
6060
  }, ["prevent"])),
6061
6061
  style: $(c.value)
6062
6062
  }, [
6063
6063
  m("div", iw, [
6064
6064
  m("img", {
6065
6065
  src: t.value,
6066
- alt: "QR Code: " + (((g = A.modelValue) == null ? void 0 : g.QRCodeValue) || ""),
6066
+ alt: "QR Code: " + (((h = A.modelValue) == null ? void 0 : h.QRCodeValue) || ""),
6067
6067
  class: "qrcode-image",
6068
6068
  onLoad: u,
6069
6069
  onError: d
@@ -6157,8 +6157,8 @@ const pw = {
6157
6157
  boxSizing: "border-box",
6158
6158
  zIndex: 1e3
6159
6159
  })), c = k(null), u = () => {
6160
- var Q, p;
6161
- return c.value || (c.value = at((p = (Q = t.propsConfig) == null ? void 0 : Q.image) == null ? void 0 : p.propertyPanel) || {}), c.value;
6160
+ var p, Q;
6161
+ return c.value || (c.value = at((Q = (p = t.propsConfig) == null ? void 0 : p.image) == null ? void 0 : Q.propertyPanel) || {}), c.value;
6162
6162
  }, d = H(() => ({
6163
6163
  width: "100%",
6164
6164
  height: "100%",
@@ -6167,16 +6167,16 @@ const pw = {
6167
6167
  justifyContent: "center",
6168
6168
  overflow: "hidden",
6169
6169
  position: "relative"
6170
- })), h = H(() => {
6170
+ })), U = H(() => {
6171
6171
  var v;
6172
6172
  if (!n.value)
6173
6173
  return {};
6174
- const Q = u(), p = ((v = t.modelValue) == null ? void 0 : v.ScaleMode) ?? Q.ScaleMode ?? 1, F = {
6174
+ const p = u(), Q = ((v = t.modelValue) == null ? void 0 : v.ScaleMode) ?? p.ScaleMode ?? 1, F = {
6175
6175
  maxWidth: "100%",
6176
6176
  maxHeight: "100%",
6177
6177
  display: "block"
6178
6178
  };
6179
- switch (p) {
6179
+ switch (Q) {
6180
6180
  case 1:
6181
6181
  return {
6182
6182
  ...F,
@@ -6209,30 +6209,30 @@ const pw = {
6209
6209
  }, B = () => {
6210
6210
  a.value = !1, o.value = !0, n.value = "";
6211
6211
  try {
6212
- const Q = { ...t.modelValue || {} };
6213
- Q.ImageSrc = "", r("update:modelValue", Q);
6212
+ const p = { ...t.modelValue || {} };
6213
+ p.ImageSrc = "", r("update:modelValue", p);
6214
6214
  } catch {
6215
6215
  }
6216
6216
  dr && dr.error("图片加载失败,请重新上传");
6217
- }, U = () => {
6217
+ }, g = () => {
6218
6218
  var v;
6219
- const Q = u(), p = ((v = t.modelValue) == null ? void 0 : v.ImageSrc) || Q.ImageSrc || "";
6219
+ const p = u(), Q = ((v = t.modelValue) == null ? void 0 : v.ImageSrc) || p.ImageSrc || "";
6220
6220
  let F = "";
6221
- typeof p == "object" && p.fileSrc ? F = p.fileSrc : typeof p == "string" && (F = p), F !== n.value && (n.value = F, a.value = !1, o.value = !1);
6222
- }, g = () => {
6223
- var p;
6224
- const Q = (p = t.modelValue) == null ? void 0 : p.ImageSrc;
6225
- return typeof Q == "object" && Q.fileName ? Q.fileName : "未命名图片";
6221
+ typeof Q == "object" && Q.fileSrc ? F = Q.fileSrc : typeof Q == "string" && (F = Q), F !== n.value && (n.value = F, a.value = !1, o.value = !1);
6222
+ }, h = () => {
6223
+ var Q;
6224
+ const p = (Q = t.modelValue) == null ? void 0 : Q.ImageSrc;
6225
+ return typeof p == "object" && p.fileName ? p.fileName : "未命名图片";
6226
6226
  };
6227
6227
  return CA(() => t.modelValue, () => {
6228
- U();
6228
+ g();
6229
6229
  }, { deep: !0 }), CA(() => t.propsConfig, () => {
6230
- c.value = null, U();
6230
+ c.value = null, g();
6231
6231
  }, { deep: !0 }), Ze(() => {
6232
6232
  ue(() => {
6233
- U();
6233
+ g();
6234
6234
  });
6235
- }), (Q, p) => {
6235
+ }), (p, Q) => {
6236
6236
  const F = wA("el-icon-picture-filled"), v = wA("el-icon"), C = wA("el-icon-loading");
6237
6237
  return V(), N("div", {
6238
6238
  class: "image-component",
@@ -6241,12 +6241,12 @@ const pw = {
6241
6241
  n.value ? (V(), N("img", {
6242
6242
  key: 1,
6243
6243
  src: n.value,
6244
- alt: "Image: " + g(),
6244
+ alt: "Image: " + h(),
6245
6245
  class: "image-content",
6246
- style: $(h.value),
6246
+ style: $(U.value),
6247
6247
  onLoad: f,
6248
6248
  onError: B,
6249
- onDragstart: p[0] || (p[0] = ZA(() => {
6249
+ onDragstart: Q[0] || (Q[0] = ZA(() => {
6250
6250
  }, ["prevent"]))
6251
6251
  }, null, 44, Qw)) : (V(), N("div", pw, [
6252
6252
  W(v, {
@@ -6462,15 +6462,15 @@ const Mw = {
6462
6462
  emits: ["update:modelValue"],
6463
6463
  setup(e, { emit: A }) {
6464
6464
  const t = e, { defaultProps: r, isSelected: n } = Ic(t, "rectangle"), a = H(() => Tw()), o = H(() => Iw()), i = H(() => {
6465
- var U, g;
6466
- return hi(((U = t.modelValue) == null ? void 0 : U.LineWidth) ?? ((g = r.value) == null ? void 0 : g.LineWidth));
6465
+ var g, h;
6466
+ return hi(((g = t.modelValue) == null ? void 0 : g.LineWidth) ?? ((h = r.value) == null ? void 0 : h.LineWidth));
6467
6467
  }), l = H(() => {
6468
- var U, g;
6469
- return Mc(((U = t.modelValue) == null ? void 0 : U.LineStyle) ?? ((g = r.value) == null ? void 0 : g.LineStyle));
6468
+ var g, h;
6469
+ return Mc(((g = t.modelValue) == null ? void 0 : g.LineStyle) ?? ((h = r.value) == null ? void 0 : h.LineStyle));
6470
6470
  }), s = H(() => l.value === "solid" && i.value < 1), c = H(() => {
6471
6471
  if (s.value) {
6472
- const U = Bl(t.modelValue, r.value);
6473
- return U.border = "none", U.boxShadow = "none", U;
6472
+ const g = Bl(t.modelValue, r.value);
6473
+ return g.border = "none", g.boxShadow = "none", g;
6474
6474
  }
6475
6475
  return Bl(t.modelValue, r.value);
6476
6476
  }), u = Ft.BORDER_COLOR, d = H(() => ({
@@ -6481,7 +6481,7 @@ const Mw = {
6481
6481
  background: u,
6482
6482
  transform: `scaleY(${i.value})`,
6483
6483
  transformOrigin: "top left"
6484
- })), h = H(() => ({
6484
+ })), U = H(() => ({
6485
6485
  left: 0,
6486
6486
  bottom: 0,
6487
6487
  width: "100%",
@@ -6507,16 +6507,16 @@ const Mw = {
6507
6507
  transformOrigin: "top right"
6508
6508
  }));
6509
6509
  return CA(() => t.propsConfig, () => {
6510
- var g, Q;
6511
- const U = at((Q = (g = t.propsConfig) == null ? void 0 : g.rectangle) == null ? void 0 : Q.propertyPanel) || {};
6510
+ var h, p;
6511
+ const g = at((p = (h = t.propsConfig) == null ? void 0 : h.rectangle) == null ? void 0 : p.propertyPanel) || {};
6512
6512
  r.value = {
6513
- LineWidth: U.LineWidth ?? "0.75pt",
6514
- LineStyle: U.LineStyle ?? "实线",
6515
- BorderRadius: U.BorderRadius ?? 0
6513
+ LineWidth: g.LineWidth ?? "0.75pt",
6514
+ LineStyle: g.LineStyle ?? "实线",
6515
+ BorderRadius: g.BorderRadius ?? 0
6516
6516
  };
6517
6517
  }, { deep: !0, immediate: !0 }), Ur(() => {
6518
6518
  r.value = {};
6519
- }), (U, g) => (V(), N("div", {
6519
+ }), (g, h) => (V(), N("div", {
6520
6520
  class: "rectangle-component",
6521
6521
  style: $(o.value)
6522
6522
  }, [
@@ -6535,7 +6535,7 @@ const Mw = {
6535
6535
  }, null, 4),
6536
6536
  m("div", {
6537
6537
  class: "hairline-edge bottom",
6538
- style: $(h.value)
6538
+ style: $(U.value)
6539
6539
  }, null, 4),
6540
6540
  m("div", {
6541
6541
  class: "hairline-edge left",
@@ -6620,17 +6620,17 @@ const Ww = ["width", "height"], Dw = ["y1", "x2", "y2", "stroke-width", "stroke-
6620
6620
  return `${f},${B}`;
6621
6621
  }
6622
6622
  return null;
6623
- }), d = H(() => Sw(o.value, s.value)), h = H(() => Nw(t.modelValue, n.value));
6623
+ }), d = H(() => Sw(o.value, s.value)), U = H(() => Nw(t.modelValue, n.value));
6624
6624
  return CA(() => t.modelValue, (f) => {
6625
6625
  if (f) {
6626
6626
  n.value = {
6627
6627
  LineWidth: f.LineWidth || "0.75pt",
6628
6628
  LineStyle: f.LineStyle || "实线"
6629
6629
  };
6630
- const U = parseFloat(f.LineWidth || "0.75pt") * 0.3528;
6631
- Math.abs(f.height - U) > 1e-3 && r("update:modelValue", {
6630
+ const g = parseFloat(f.LineWidth || "0.75pt") * 0.3528;
6631
+ Math.abs(f.height - g) > 1e-3 && r("update:modelValue", {
6632
6632
  ...f,
6633
- height: Number(U.toFixed(3))
6633
+ height: Number(g.toFixed(3))
6634
6634
  });
6635
6635
  }
6636
6636
  }, { immediate: !0, deep: !0 }), CA(() => {
@@ -6638,15 +6638,15 @@ const Ww = ["width", "height"], Dw = ["y1", "x2", "y2", "stroke-width", "stroke-
6638
6638
  return (f = t.modelValue) == null ? void 0 : f.LineWidth;
6639
6639
  }, (f) => {
6640
6640
  if (f && t.modelValue) {
6641
- const U = parseFloat(f) * 0.3528;
6642
- Math.abs(t.modelValue.height - U) > 1e-3 && r("update:modelValue", {
6641
+ const g = parseFloat(f) * 0.3528;
6642
+ Math.abs(t.modelValue.height - g) > 1e-3 && r("update:modelValue", {
6643
6643
  ...t.modelValue,
6644
- height: Number(U.toFixed(3))
6644
+ height: Number(g.toFixed(3))
6645
6645
  });
6646
6646
  }
6647
6647
  }, { immediate: !0 }), (f, B) => (V(), N("div", {
6648
6648
  class: "horline-component",
6649
- style: $(h.value)
6649
+ style: $(U.value)
6650
6650
  }, [
6651
6651
  (V(), N("svg", {
6652
6652
  width: o.value,
@@ -6747,9 +6747,9 @@ const zw = /* @__PURE__ */ RA(Lw, [["render", Yw]]), bc = [
6747
6747
  ], Hc = bc.flatMap((e) => e.components);
6748
6748
  async function jw(e) {
6749
6749
  try {
6750
- return (await ed(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-25ec3af8.mjs"), "./props/rfid.js": () => import("./rfid-ac52a396.mjs") }), `./props/${e}.js`)).default;
6750
+ return (await ed(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-a892b6d8.mjs"), "./props/rfid.js": () => import("./rfid-3a366dd9.mjs") }), `./props/${e}.js`)).default;
6751
6751
  } catch {
6752
- return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-25ec3af8.mjs")).default;
6752
+ return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-a892b6d8.mjs")).default;
6753
6753
  }
6754
6754
  }
6755
6755
  function Xw(e = {}, A = {}) {
@@ -6872,8 +6872,8 @@ const qw = { class: "component-list" }, $w = { class: "group-title" }, AF = { cl
6872
6872
  return (s, c) => {
6873
6873
  const u = wA("el-icon");
6874
6874
  return V(), N("div", qw, [
6875
- (V(!0), N(TA, null, Se(t.value, (d, h) => (V(), N("div", {
6876
- key: h,
6875
+ (V(!0), N(TA, null, Se(t.value, (d, U) => (V(), N("div", {
6876
+ key: U,
6877
6877
  class: "component-group"
6878
6878
  }, [
6879
6879
  m("div", $w, Be(d.groupName), 1),
@@ -6882,7 +6882,7 @@ const qw = { class: "component-list" }, $w = { class: "group-title" }, AF = { cl
6882
6882
  key: B,
6883
6883
  class: "component-item",
6884
6884
  draggable: "true",
6885
- onDragstart: (U) => s.$emit("dragStart", { e: U, comp: f, previewDiv: l(f) })
6885
+ onDragstart: (g) => s.$emit("dragStart", { e: g, comp: f, previewDiv: l(f) })
6886
6886
  }, [
6887
6887
  W(u, {
6888
6888
  size: 30,
@@ -7002,7 +7002,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7002
7002
  a.data.punchingList.splice(c, 1);
7003
7003
  };
7004
7004
  return (c, u) => {
7005
- const d = wA("el-button"), h = wA("el-input-number"), f = wA("el-table-column"), B = wA("el-col"), U = wA("el-row"), g = wA("el-table"), Q = wA("el-form-item"), p = wA("el-form"), F = wA("el-main"), v = wA("el-dialog");
7005
+ const d = wA("el-button"), U = wA("el-input-number"), f = wA("el-table-column"), B = wA("el-col"), g = wA("el-row"), h = wA("el-table"), p = wA("el-form-item"), Q = wA("el-form"), F = wA("el-main"), v = wA("el-dialog");
7006
7006
  return V(), N(TA, null, [
7007
7007
  W(d, {
7008
7008
  type: "primary",
@@ -7062,7 +7062,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7062
7062
  default: j(() => [
7063
7063
  W(F, { style: { "max-height": "60vh", padding: "0" } }, {
7064
7064
  default: j(() => [
7065
- W(p, {
7065
+ W(Q, {
7066
7066
  ref: "formRef",
7067
7067
  model: a.data,
7068
7068
  "label-width": "90px",
@@ -7070,7 +7070,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7070
7070
  "label-suffix": ":"
7071
7071
  }, {
7072
7072
  default: j(() => [
7073
- W(Q, null, {
7073
+ W(p, null, {
7074
7074
  label: j(() => [
7075
7075
  m("div", null, [
7076
7076
  u[9] || (u[9] = m("p", null, "打印区域:", -1)),
@@ -7091,7 +7091,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7091
7091
  var C, T, M;
7092
7092
  return [
7093
7093
  m("div", UF, [
7094
- ((T = (C = a.data) == null ? void 0 : C.printList) == null ? void 0 : T.length) > 0 ? (V(), yA(g, {
7094
+ ((T = (C = a.data) == null ? void 0 : C.printList) == null ? void 0 : T.length) > 0 ? (V(), yA(h, {
7095
7095
  key: 0,
7096
7096
  data: (M = a.data) == null ? void 0 : M.printList,
7097
7097
  class: "graph-table"
@@ -7103,7 +7103,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7103
7103
  width: "100"
7104
7104
  }, {
7105
7105
  default: j((y) => [
7106
- W(h, {
7106
+ W(U, {
7107
7107
  modelValue: y.row.x,
7108
7108
  "onUpdate:modelValue": (S) => y.row.x = S,
7109
7109
  controls: !1,
@@ -7118,7 +7118,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7118
7118
  width: "100"
7119
7119
  }, {
7120
7120
  default: j((y) => [
7121
- W(h, {
7121
+ W(U, {
7122
7122
  modelValue: y.row.y,
7123
7123
  "onUpdate:modelValue": (S) => y.row.y = S,
7124
7124
  controls: !1,
@@ -7133,7 +7133,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7133
7133
  width: "100"
7134
7134
  }, {
7135
7135
  default: j((y) => [
7136
- W(h, {
7136
+ W(U, {
7137
7137
  modelValue: y.row.width,
7138
7138
  "onUpdate:modelValue": (S) => y.row.width = S,
7139
7139
  controls: !1,
@@ -7148,7 +7148,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7148
7148
  width: "100"
7149
7149
  }, {
7150
7150
  default: j((y) => [
7151
- W(h, {
7151
+ W(U, {
7152
7152
  modelValue: y.row.height,
7153
7153
  "onUpdate:modelValue": (S) => y.row.height = S,
7154
7154
  controls: !1,
@@ -7162,11 +7162,11 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7162
7162
  align: "center"
7163
7163
  }, {
7164
7164
  default: j((y) => [
7165
- W(U, { gutter: 10 }, {
7165
+ W(g, { gutter: 10 }, {
7166
7166
  default: j(() => [
7167
7167
  W(B, { span: 6 }, {
7168
7168
  default: j(() => [
7169
- W(h, {
7169
+ W(U, {
7170
7170
  modelValue: y.row.topLeftRadius,
7171
7171
  "onUpdate:modelValue": (S) => y.row.topLeftRadius = S,
7172
7172
  controls: !1,
@@ -7177,7 +7177,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7177
7177
  }, 1024),
7178
7178
  W(B, { span: 6 }, {
7179
7179
  default: j(() => [
7180
- W(h, {
7180
+ W(U, {
7181
7181
  modelValue: y.row.bottomLeftRadius,
7182
7182
  "onUpdate:modelValue": (S) => y.row.bottomLeftRadius = S,
7183
7183
  controls: !1,
@@ -7188,7 +7188,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7188
7188
  }, 1024),
7189
7189
  W(B, { span: 6 }, {
7190
7190
  default: j(() => [
7191
- W(h, {
7191
+ W(U, {
7192
7192
  modelValue: y.row.topRightRadius,
7193
7193
  "onUpdate:modelValue": (S) => y.row.topRightRadius = S,
7194
7194
  controls: !1,
@@ -7199,7 +7199,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7199
7199
  }, 1024),
7200
7200
  W(B, { span: 6 }, {
7201
7201
  default: j(() => [
7202
- W(h, {
7202
+ W(U, {
7203
7203
  modelValue: y.row.bottomRightRadius,
7204
7204
  "onUpdate:modelValue": (S) => y.row.bottomRightRadius = S,
7205
7205
  controls: !1,
@@ -7242,7 +7242,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7242
7242
  }),
7243
7243
  _: 1
7244
7244
  }),
7245
- W(Q, { label: "打孔区域" }, {
7245
+ W(p, { label: "打孔区域" }, {
7246
7246
  label: j(() => [
7247
7247
  m("div", null, [
7248
7248
  u[12] || (u[12] = m("p", null, "打孔区域:", -1)),
@@ -7261,7 +7261,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7261
7261
  ]),
7262
7262
  default: j(() => [
7263
7263
  m("div", QF, [
7264
- a.data.punchingList.length > 0 ? (V(), yA(g, {
7264
+ a.data.punchingList.length > 0 ? (V(), yA(h, {
7265
7265
  key: 0,
7266
7266
  data: a.data.punchingList,
7267
7267
  class: "graph-table"
@@ -7273,7 +7273,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7273
7273
  width: "100"
7274
7274
  }, {
7275
7275
  default: j((C) => [
7276
- W(h, {
7276
+ W(U, {
7277
7277
  modelValue: C.row.x,
7278
7278
  "onUpdate:modelValue": (T) => C.row.x = T,
7279
7279
  controls: !1,
@@ -7288,7 +7288,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7288
7288
  width: "100"
7289
7289
  }, {
7290
7290
  default: j((C) => [
7291
- W(h, {
7291
+ W(U, {
7292
7292
  modelValue: C.row.y,
7293
7293
  "onUpdate:modelValue": (T) => C.row.y = T,
7294
7294
  controls: !1,
@@ -7303,7 +7303,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7303
7303
  width: "100"
7304
7304
  }, {
7305
7305
  default: j((C) => [
7306
- W(h, {
7306
+ W(U, {
7307
7307
  modelValue: C.row.width,
7308
7308
  "onUpdate:modelValue": (T) => C.row.width = T,
7309
7309
  controls: !1,
@@ -7319,7 +7319,7 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7319
7319
  width: "100"
7320
7320
  }, {
7321
7321
  default: j((C) => [
7322
- W(h, {
7322
+ W(U, {
7323
7323
  modelValue: C.row.height,
7324
7324
  "onUpdate:modelValue": (T) => C.row.height = T,
7325
7325
  controls: !1,
@@ -7458,14 +7458,14 @@ const gF = { class: "tg-title" }, UF = { class: "table-container" }, pF = {
7458
7458
  }
7459
7459
  }, CF = /* @__PURE__ */ RA(FF, [["__scopeId", "data-v-7f9ab3cb"]]);
7460
7460
  function EF(e = {}) {
7461
- const { scale: A, canvasWidth: t, canvasHeight: r, selectItem: n, onStopDrag: a, onStartDrag: o, onDragUpdate: i } = e, l = k(!1), s = k(!1), c = k(null), u = k({ x: 0, y: 0 }), d = k({ x: 0, y: 0 }), h = /* @__PURE__ */ new Map();
7462
- function f(Q, p, F) {
7463
- l.value = !0, s.value = !0, typeof o == "function" && o(), c.value = p, u.value = { x: Q.clientX, y: Q.clientY }, d.value = { x: p.props.x, y: p.props.y }, typeof n == "function" && n(p, F || Q), document.addEventListener("mousemove", U), document.addEventListener("mouseup", g);
7464
- }
7465
- function B(Q, p, F, v, C) {
7466
- const T = `${Q}_${p}_${F}_${v}_${C}`;
7467
- if (h.has(T))
7468
- return h.get(T);
7461
+ const { scale: A, canvasWidth: t, canvasHeight: r, selectItem: n, onStopDrag: a, onStartDrag: o, onDragUpdate: i } = e, l = k(!1), s = k(!1), c = k(null), u = k({ x: 0, y: 0 }), d = k({ x: 0, y: 0 }), U = /* @__PURE__ */ new Map();
7462
+ function f(p, Q, F) {
7463
+ l.value = !0, s.value = !0, typeof o == "function" && o(), c.value = Q, u.value = { x: p.clientX, y: p.clientY }, d.value = { x: Q.props.x, y: Q.props.y }, typeof n == "function" && n(Q, F || p), document.addEventListener("mousemove", g), document.addEventListener("mouseup", h);
7464
+ }
7465
+ function B(p, Q, F, v, C) {
7466
+ const T = `${p}_${Q}_${F}_${v}_${C}`;
7467
+ if (U.has(T))
7468
+ return U.get(T);
7469
7469
  const M = C * Math.PI / 180, y = F / 2, S = v / 2, L = [
7470
7470
  { x: 0, y: 0 },
7471
7471
  { x: F, y: 0 },
@@ -7474,8 +7474,8 @@ function EF(e = {}) {
7474
7474
  ].map((G) => {
7475
7475
  const _ = G.x - y, rA = G.y - S, fA = _ * Math.cos(M) - rA * Math.sin(M), uA = _ * Math.sin(M) + rA * Math.cos(M);
7476
7476
  return {
7477
- x: Number((fA + y + Q).toFixed(2)),
7478
- y: Number((uA + S + p).toFixed(2))
7477
+ x: Number((fA + y + p).toFixed(2)),
7478
+ y: Number((uA + S + Q).toFixed(2))
7479
7479
  };
7480
7480
  }), b = L.map((G) => G.x), P = L.map((G) => G.y), iA = {
7481
7481
  minX: Math.min(...b),
@@ -7483,13 +7483,13 @@ function EF(e = {}) {
7483
7483
  minY: Math.min(...P),
7484
7484
  maxY: Math.max(...P)
7485
7485
  };
7486
- return h.set(T, iA), iA;
7486
+ return U.set(T, iA), iA;
7487
7487
  }
7488
- function U(Q) {
7488
+ function g(p) {
7489
7489
  if (!l.value || !c.value)
7490
7490
  return;
7491
- const p = Q.clientX - u.value.x, F = Q.clientY - u.value.y, v = (A == null ? void 0 : A.value) || 1, C = 1 / 3.7795275591;
7492
- let T = d.value.x + p * C / v, M = d.value.y + F * C / v;
7491
+ const Q = p.clientX - u.value.x, F = p.clientY - u.value.y, v = (A == null ? void 0 : A.value) || 1, C = 1 / 3.7795275591;
7492
+ let T = d.value.x + Q * C / v, M = d.value.y + F * C / v;
7493
7493
  if (t != null && t.value && (r != null && r.value)) {
7494
7494
  const y = c.value.props.width || 0, S = c.value.props.height || 0, D = c.value.props.rotation || 0;
7495
7495
  let L = !1;
@@ -7501,14 +7501,14 @@ function EF(e = {}) {
7501
7501
  }
7502
7502
  c.value.props.x = Number(T.toFixed(2)), c.value.props.y = Number(M.toFixed(2)), typeof i == "function" && i();
7503
7503
  }
7504
- function g() {
7504
+ function h() {
7505
7505
  l.value = !1, setTimeout(() => {
7506
7506
  s.value = !1;
7507
- }, 50), c.value && typeof n == "function" && n(c.value), c.value = null, typeof a == "function" && a(), typeof i == "function" && i(), h.clear();
7508
- const Q = function(p) {
7509
- p && (typeof p.stopImmediatePropagation == "function" && p.stopImmediatePropagation(), typeof p.stopPropagation == "function" && p.stopPropagation(), typeof p.preventDefault == "function" && p.preventDefault()), window.removeEventListener("click", Q, !0);
7507
+ }, 50), c.value && typeof n == "function" && n(c.value), c.value = null, typeof a == "function" && a(), typeof i == "function" && i(), U.clear();
7508
+ const p = function(Q) {
7509
+ Q && (typeof Q.stopImmediatePropagation == "function" && Q.stopImmediatePropagation(), typeof Q.stopPropagation == "function" && Q.stopPropagation(), typeof Q.preventDefault == "function" && Q.preventDefault()), window.removeEventListener("click", p, !0);
7510
7510
  };
7511
- window.addEventListener("click", Q, !0), document.removeEventListener("mousemove", U), document.removeEventListener("mouseup", g);
7511
+ window.addEventListener("click", p, !0), document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", h);
7512
7512
  }
7513
7513
  return {
7514
7514
  dragging: l,
@@ -7519,19 +7519,19 @@ function EF(e = {}) {
7519
7519
  // 当前拖拽元素
7520
7520
  startDrag: f,
7521
7521
  // 开始拖拽方法
7522
- stopDrag: g
7522
+ stopDrag: h
7523
7523
  // 停止拖拽方法
7524
7524
  };
7525
7525
  }
7526
7526
  function mF(e, A, t, r) {
7527
- const n = k(!1), a = k(null), o = k({ x: 0, y: 0 }), i = k({ width: 0, height: 0, x: 0, y: 0, rotation: 0 }), l = k(""), s = k(""), c = k({ x: 0, y: 0 }), u = k([]), d = k(null), h = k(0), f = dl.UPDATE_THRESHOLD, B = k({ x: 0, y: 0, width: 0, height: 0 }), U = k(/* @__PURE__ */ new Map()), g = k(/* @__PURE__ */ new Map()), Q = k(null);
7528
- function p(S) {
7527
+ const n = k(!1), a = k(null), o = k({ x: 0, y: 0 }), i = k({ width: 0, height: 0, x: 0, y: 0, rotation: 0 }), l = k(""), s = k(""), c = k({ x: 0, y: 0 }), u = k([]), d = k(null), U = k(0), f = dl.UPDATE_THRESHOLD, B = k({ x: 0, y: 0, width: 0, height: 0 }), g = k(/* @__PURE__ */ new Map()), h = k(/* @__PURE__ */ new Map()), p = k(null);
7528
+ function Q(S) {
7529
7529
  return S * Math.PI / 180;
7530
7530
  }
7531
7531
  function F(S, D, L, b, P, iA, G) {
7532
7532
  const _ = `${S.toFixed(1)}_${D.toFixed(1)}_${L.toFixed(1)}_${b.toFixed(1)}_${P.toFixed(1)}`;
7533
- if (U.value.has(_))
7534
- return U.value.get(_);
7533
+ if (g.value.has(_))
7534
+ return g.value.get(_);
7535
7535
  const rA = v(S, D, L, b, P), fA = rA.map((SA) => SA.x), uA = rA.map((SA) => SA.y), aA = Math.min(...fA), X = Math.max(...fA), z = Math.min(...uA), NA = Math.max(...uA), QA = 0.5, hA = aA < -QA || X > iA + QA || z < -QA || NA > G + QA, gA = {
7536
7536
  minX: aA,
7537
7537
  maxX: X,
@@ -7540,17 +7540,17 @@ function mF(e, A, t, r) {
7540
7540
  isOutOfBounds: hA,
7541
7541
  corners: rA
7542
7542
  };
7543
- if (U.value.set(_, gA), U.value.size > dl.MAX_SIZE) {
7544
- const SA = U.value.keys().next().value;
7545
- U.value.delete(SA);
7543
+ if (g.value.set(_, gA), g.value.size > dl.MAX_SIZE) {
7544
+ const SA = g.value.keys().next().value;
7545
+ g.value.delete(SA);
7546
7546
  }
7547
7547
  return gA;
7548
7548
  }
7549
7549
  function v(S, D, L, b, P) {
7550
7550
  const iA = `${S.toFixed(1)}_${D.toFixed(1)}_${L.toFixed(1)}_${b.toFixed(1)}_${P.toFixed(1)}`;
7551
- if (g.value.has(iA))
7552
- return g.value.get(iA);
7553
- const G = p(P), _ = Math.cos(G), rA = Math.sin(G), fA = S + L / 2, uA = D + b / 2, X = [
7551
+ if (h.value.has(iA))
7552
+ return h.value.get(iA);
7553
+ const G = Q(P), _ = Math.cos(G), rA = Math.sin(G), fA = S + L / 2, uA = D + b / 2, X = [
7554
7554
  { x: -L / 2, y: -b / 2 },
7555
7555
  { x: L / 2, y: -b / 2 },
7556
7556
  { x: L / 2, y: b / 2 },
@@ -7559,9 +7559,9 @@ function mF(e, A, t, r) {
7559
7559
  x: Number((fA + z.x * _ - z.y * rA).toFixed(2)),
7560
7560
  y: Number((uA + z.x * rA + z.y * _).toFixed(2))
7561
7561
  }));
7562
- if (g.value.set(iA, X), g.value.size > 100) {
7563
- const z = g.value.keys().next().value;
7564
- g.value.delete(z);
7562
+ if (h.value.set(iA, X), h.value.size > 100) {
7563
+ const z = h.value.keys().next().value;
7564
+ h.value.delete(z);
7565
7565
  }
7566
7566
  return X;
7567
7567
  }
@@ -7608,7 +7608,7 @@ function mF(e, A, t, r) {
7608
7608
  x: D.props.x,
7609
7609
  y: D.props.y,
7610
7610
  rotation: D.props.rotation || 0
7611
- }, s.value = "", c.value = { x: 0, y: 0 }, Q.value = null, d.value = C(
7611
+ }, s.value = "", c.value = { x: 0, y: 0 }, p.value = null, d.value = C(
7612
7612
  L,
7613
7613
  i.value.x,
7614
7614
  i.value.y,
@@ -7620,24 +7620,24 @@ function mF(e, A, t, r) {
7620
7620
  y: i.value.y,
7621
7621
  width: i.value.width,
7622
7622
  height: i.value.height
7623
- }, u.value = [...r.value], U.value.clear(), g.value.clear(), document.addEventListener("mousemove", M), document.addEventListener("mouseup", y));
7623
+ }, u.value = [...r.value], g.value.clear(), h.value.clear(), document.addEventListener("mousemove", M), document.addEventListener("mouseup", y));
7624
7624
  }
7625
7625
  function M(S) {
7626
7626
  if (!n.value || !a.value || !d.value)
7627
7627
  return;
7628
7628
  const D = Date.now();
7629
- if (D - h.value < f)
7629
+ if (D - U.value < f)
7630
7630
  return;
7631
- h.value = D;
7632
- const L = (t == null ? void 0 : t.value) || 1, b = i.value.rotation || 0, P = p(b), iA = Math.cos(P), G = Math.sin(P), _ = i.value.width, rA = i.value.height, fA = i.value.x, uA = i.value.y, aA = 1;
7631
+ U.value = D;
7632
+ const L = (t == null ? void 0 : t.value) || 1, b = i.value.rotation || 0, P = Q(b), iA = Math.cos(P), G = Math.sin(P), _ = i.value.width, rA = i.value.height, fA = i.value.x, uA = i.value.y, aA = 1;
7633
7633
  let X = _, z = rA;
7634
7634
  const NA = (S.clientX - o.value.x) / 3.7795275591 / L, QA = (S.clientY - o.value.y) / 3.7795275591 / L;
7635
7635
  let hA, gA;
7636
7636
  b === 0 ? (hA = NA, gA = QA) : (hA = NA * iA + QA * G, gA = -NA * G + QA * iA);
7637
7637
  const SA = !!a.value.props.lockAspectRatio, XA = _ / rA, se = Math.abs(S.clientX - o.value.x), We = Math.abs(S.clientY - o.value.y);
7638
- if (SA && !Q.value && (Q.value = se > We ? "x" : "y"), l.value.includes("-")) {
7639
- if (SA && Q.value)
7640
- Q.value === "x" ? (["top-left", "bottom-left"].includes(l.value) ? X = Math.max(aA, _ - hA) : X = Math.max(aA, _ + hA), z = X / XA) : (["top-left", "top-right"].includes(l.value) ? z = Math.max(aA, rA - gA) : z = Math.max(aA, rA + gA), X = z * XA);
7638
+ if (SA && !p.value && (p.value = se > We ? "x" : "y"), l.value.includes("-")) {
7639
+ if (SA && p.value)
7640
+ p.value === "x" ? (["top-left", "bottom-left"].includes(l.value) ? X = Math.max(aA, _ - hA) : X = Math.max(aA, _ + hA), z = X / XA) : (["top-left", "top-right"].includes(l.value) ? z = Math.max(aA, rA - gA) : z = Math.max(aA, rA + gA), X = z * XA);
7641
7641
  else if (l.value === "top-left" ? (X = Math.max(aA, _ - hA), z = Math.max(aA, rA - gA)) : l.value === "top-right" ? (X = Math.max(aA, _ + hA), z = Math.max(aA, rA - gA)) : l.value === "bottom-right" ? (X = Math.max(aA, _ + hA), z = Math.max(aA, rA + gA)) : l.value === "bottom-left" && (X = Math.max(aA, _ - hA), z = Math.max(aA, rA + gA)), SA) {
7642
7642
  const HA = X / z;
7643
7643
  if (Math.abs(HA - XA) > 0.01) {
@@ -7673,7 +7673,7 @@ function mF(e, A, t, r) {
7673
7673
  (Math.abs(X - a.value.props.width) > 1e-3 || Math.abs(z - a.value.props.height) > 1e-3 || Math.abs(ne - a.value.props.x) > 1e-3 || Math.abs(EA - a.value.props.y) > 1e-3) && (a.value.props.x = Number(ne.toFixed(2)), a.value.props.y = Number(EA.toFixed(2)), a.value.props.width = Number(X.toFixed(2)), a.value.props.height = Number(z.toFixed(2)), B.value = { x: ne, y: EA, width: X, height: z });
7674
7674
  }
7675
7675
  function y() {
7676
- n.value = !1, a.value = null, s.value = "", c.value = { x: 0, y: 0 }, d.value = null, B.value = { x: 0, y: 0, width: 0, height: 0 }, U.value.clear(), g.value.clear(), u.value.length > 0 && (r.value = [...u.value]), u.value = [], document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", y), Q.value = null;
7676
+ n.value = !1, a.value = null, s.value = "", c.value = { x: 0, y: 0 }, d.value = null, B.value = { x: 0, y: 0, width: 0, height: 0 }, g.value.clear(), h.value.clear(), u.value.length > 0 && (r.value = [...u.value]), u.value = [], document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", y), p.value = null;
7677
7677
  }
7678
7678
  return {
7679
7679
  resizing: n,
@@ -7724,38 +7724,38 @@ function yF() {
7724
7724
  return;
7725
7725
  a.preventDefault(), a.stopPropagation();
7726
7726
  const i = a.target.parentElement.getBoundingClientRect(), l = i.left + i.width / 2, s = i.top + i.height / 2;
7727
- let c = null, u = !1, d = B(a.clientX, a.clientY), h = o.props.rotation || 0, f = h;
7728
- function B(p, F) {
7729
- const v = p - l, C = F - s;
7727
+ let c = null, u = !1, d = B(a.clientX, a.clientY), U = o.props.rotation || 0, f = U;
7728
+ function B(Q, F) {
7729
+ const v = Q - l, C = F - s;
7730
7730
  let T = Math.atan2(C, v) * 180 / Math.PI + 90;
7731
7731
  return T > 180 && (T -= 360), T < -180 && (T += 360), T;
7732
7732
  }
7733
- function U(p) {
7734
- const F = p.clientX - l, v = p.clientY - s;
7733
+ function g(Q) {
7734
+ const F = Q.clientX - l, v = Q.clientY - s;
7735
7735
  if (Math.sqrt(F * F + v * v) < 20) {
7736
7736
  u = !0, c = null;
7737
7737
  return;
7738
7738
  }
7739
7739
  if (u) {
7740
- d = B(p.clientX, p.clientY), u = !1, c = null;
7740
+ d = B(Q.clientX, Q.clientY), u = !1, c = null;
7741
7741
  return;
7742
7742
  }
7743
- const T = B(p.clientX, p.clientY);
7743
+ const T = B(Q.clientX, Q.clientY);
7744
7744
  let M = T - d;
7745
- M > 180 && (M -= 360), M < -180 && (M += 360), h += M, d = T, f = r(f, h, 0.25);
7745
+ M > 180 && (M -= 360), M < -180 && (M += 360), U += M, d = T, f = r(f, U, 0.25);
7746
7746
  const y = (f % 360 + 360) % 360;
7747
7747
  Math.abs(o.props.rotation - y) >= 0.2 && (o.props.rotation = Number(y.toFixed(2))), c = null;
7748
7748
  }
7749
- const g = (p) => {
7750
- c || (c = requestAnimationFrame(() => U(p)));
7751
- }, Q = (p) => {
7752
- p && p.stopPropagation(), document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", Q), c && (cancelAnimationFrame(c), c = null), u = !1;
7749
+ const h = (Q) => {
7750
+ c || (c = requestAnimationFrame(() => g(Q)));
7751
+ }, p = (Q) => {
7752
+ Q && Q.stopPropagation(), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", p), c && (cancelAnimationFrame(c), c = null), u = !1;
7753
7753
  const F = (v) => {
7754
7754
  v.stopImmediatePropagation(), document.removeEventListener("click", F, !0);
7755
7755
  };
7756
7756
  document.addEventListener("click", F, !0);
7757
7757
  };
7758
- document.addEventListener("mousemove", g), document.addEventListener("mouseup", Q);
7758
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", p);
7759
7759
  }
7760
7760
  return {
7761
7761
  startRotate: n
@@ -7785,15 +7785,15 @@ function VF(e, A, t) {
7785
7785
  const c = e.value[e.value.length - 1];
7786
7786
  let u = Number(c.props[i]) + Number(l);
7787
7787
  if (i === "x" || i === "y") {
7788
- 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;
7789
- i === "x" ? u = Math.max(0, Math.min(u, d)) : i === "y" && (u = Math.max(0, Math.min(u, h)));
7788
+ const d = A != null && A.value ? A.value - c.props.width : 1 / 0, U = t != null && t.value ? t.value - c.props.height : 1 / 0;
7789
+ i === "x" ? u = Math.max(0, Math.min(u, d)) : i === "y" && (u = Math.max(0, Math.min(u, U)));
7790
7790
  } else if (i === "width" || i === "height") {
7791
7791
  if (i === "width") {
7792
- const h = A != null && A.value ? A.value - c.props.x : 1 / 0;
7793
- u = Math.max(1, Math.min(u, h));
7792
+ const U = A != null && A.value ? A.value - c.props.x : 1 / 0;
7793
+ u = Math.max(1, Math.min(u, U));
7794
7794
  } else if (i === "height") {
7795
- const h = t != null && t.value ? t.value - c.props.y : 1 / 0;
7796
- u = Math.max(1, Math.min(u, h));
7795
+ const U = t != null && t.value ? t.value - c.props.y : 1 / 0;
7796
+ u = Math.max(1, Math.min(u, U));
7797
7797
  }
7798
7798
  }
7799
7799
  if (!(u < s)) {
@@ -7807,8 +7807,8 @@ function VF(e, A, t) {
7807
7807
  }
7808
7808
  }
7809
7809
  if (c.type === "horline" && i === "height") {
7810
- const h = u / 0.3528;
7811
- c.props.height = Number(u.toFixed(2)), c.props.LineWidth = Number(h.toFixed(2)) + "pt";
7810
+ const U = u / 0.3528;
7811
+ c.props.height = Number(u.toFixed(2)), c.props.LineWidth = Number(U.toFixed(2)) + "pt";
7812
7812
  return;
7813
7813
  }
7814
7814
  c.props[i] = Number(u.toFixed(2));
@@ -7869,8 +7869,8 @@ function TF(e, A, t, r) {
7869
7869
  const s = JSON.parse(JSON.stringify(n.value));
7870
7870
  if (s.id = Date.now(), s.props) {
7871
7871
  let c = Number(s.props.x) + 5, u = Number(s.props.y) + 5;
7872
- const d = t.value - Number(s.props.width), h = r.value - Number(s.props.height);
7873
- 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);
7872
+ const d = t.value - Number(s.props.width), U = r.value - Number(s.props.height);
7873
+ s.props.x = Math.max(0, Math.min(c, d)), s.props.y = Math.max(0, Math.min(u, U)), s.props.x != c && (s.props.x = c - 5 * 2), s.props.y != u && (s.props.y = u - 5 * 2);
7874
7874
  }
7875
7875
  e.value.push(s), A.value = [s], i.preventDefault();
7876
7876
  }
@@ -7885,34 +7885,34 @@ function IF(e = {}) {
7885
7885
  // 垂直对齐线 [{ x: number, visible: boolean }]
7886
7886
  }), a = 0.1;
7887
7887
  function o(d) {
7888
- const h = Number(d.props.x) || 0, f = Number(d.props.y) || 0, B = Number(d.props.width) || 0, U = Number(d.props.height) || 0;
7888
+ const U = Number(d.props.x) || 0, f = Number(d.props.y) || 0, B = Number(d.props.width) || 0, g = Number(d.props.height) || 0;
7889
7889
  return {
7890
- centerX: h + B / 2,
7891
- centerY: f + U / 2
7890
+ centerX: U + B / 2,
7891
+ centerY: f + g / 2
7892
7892
  };
7893
7893
  }
7894
- function i(d, h) {
7894
+ function i(d, U) {
7895
7895
  const f = [], B = /* @__PURE__ */ new Set();
7896
- return h.forEach((U) => {
7897
- const g = o(U), Q = Math.abs(d.centerY - g.centerY);
7896
+ return U.forEach((g) => {
7897
+ const h = o(g), p = Math.abs(d.centerY - h.centerY);
7898
7898
  Math.round(d.centerY * 100) / 100;
7899
- const p = Math.round(g.centerY * 100) / 100;
7900
- Q <= a && !B.has(p) && (f.push({
7901
- y: p,
7899
+ const Q = Math.round(h.centerY * 100) / 100;
7900
+ p <= a && !B.has(Q) && (f.push({
7901
+ y: Q,
7902
7902
  visible: !0
7903
- }), B.add(p));
7903
+ }), B.add(Q));
7904
7904
  }), f;
7905
7905
  }
7906
- function l(d, h) {
7906
+ function l(d, U) {
7907
7907
  const f = [], B = /* @__PURE__ */ new Set();
7908
- return h.forEach((U) => {
7909
- const g = o(U), Q = Math.abs(d.centerX - g.centerX);
7908
+ return U.forEach((g) => {
7909
+ const h = o(g), p = Math.abs(d.centerX - h.centerX);
7910
7910
  Math.round(d.centerX * 100) / 100;
7911
- const p = Math.round(g.centerX * 100) / 100;
7912
- Q <= a && !B.has(p) && (f.push({
7913
- x: p,
7911
+ const Q = Math.round(h.centerX * 100) / 100;
7912
+ p <= a && !B.has(Q) && (f.push({
7913
+ x: Q,
7914
7914
  visible: !0
7915
- }), B.add(p));
7915
+ }), B.add(Q));
7916
7916
  }), f;
7917
7917
  }
7918
7918
  function s() {
@@ -7920,7 +7920,7 @@ function IF(e = {}) {
7920
7920
  n.value.horizontal = [], n.value.vertical = [];
7921
7921
  return;
7922
7922
  }
7923
- const d = o(t.value), h = A.value.filter((U) => U !== t.value), f = i(d, h), B = l(d, h);
7923
+ const d = o(t.value), U = A.value.filter((g) => g !== t.value), f = i(d, U), B = l(d, U);
7924
7924
  n.value.horizontal = f, n.value.vertical = B;
7925
7925
  }
7926
7926
  function c() {
@@ -8315,7 +8315,7 @@ var qF = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
8315
8315
  if (so === l && [so, dn, oo, io].indexOf(c) !== -1 || [dn, oo].indexOf(l) !== -1 && [dn, Bn].indexOf(c) !== -1 || [Bn, io].indexOf(l) !== -1 && c === Bn || yl.indexOf(l) !== -1 && [ml, qt].indexOf(c) !== -1 || yl.indexOf(c) !== -1 && l === $t || pe.indexOf(l) !== -1 && pe.indexOf(c) !== -1 || l === ut && pe.indexOf(c) !== -1 || pe.concat(KA).indexOf(l) !== -1 && c === Yt && iC.indexOf(e[i]) === -1 || pe.concat(KA).indexOf(c) !== -1 && l === Gt)
8316
8316
  return AA;
8317
8317
  if (l === ya && c === ya) {
8318
- for (var h = t[a], f = 1; h > 0 && (h--, A[h] === ya); )
8318
+ for (var U = t[a], f = 1; U > 0 && (U--, A[U] === ya); )
8319
8319
  f++;
8320
8320
  if (f % 2 !== 0)
8321
8321
  return AA;
@@ -8540,8 +8540,8 @@ var qF = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
8540
8540
  return this.consumeCodePoint(), this.consumeCodePoint(), BE;
8541
8541
  break;
8542
8542
  case yC:
8543
- var u = this.peekCodePoint(0), d = this.peekCodePoint(1), h = this.peekCodePoint(2);
8544
- if ($r(u, d, h)) {
8543
+ var u = this.peekCodePoint(0), d = this.peekCodePoint(1), U = this.peekCodePoint(2);
8544
+ if ($r(u, d, U)) {
8545
8545
  var o = this.consumeName();
8546
8546
  return { type: 7, value: o };
8547
8547
  }
@@ -8968,8 +8968,8 @@ var Hl = function(e, A) {
8968
8968
  var t = A.filter(Nt), r = t[0], n = t[1], a = t[2], o = t[3], i = (r.type === 17 ? Ae(r.number) : _n.parse(e, r)) / (Math.PI * 2), l = FA(n) ? n.number / 100 : 0, s = FA(a) ? a.number / 100 : 0, c = typeof o < "u" && FA(o) ? cA(o, 1) : 1;
8969
8969
  if (l === 0)
8970
8970
  return Ne(s * 255, s * 255, s * 255, 1);
8971
- var u = s <= 0.5 ? s * (l + 1) : s + l - s * l, d = s * 2 - u, h = Ia(d, u, i + 1 / 3), f = Ia(d, u, i), B = Ia(d, u, i - 1 / 3);
8972
- return Ne(h * 255, f * 255, B * 255, c);
8971
+ var u = s <= 0.5 ? s * (l + 1) : s + l - s * l, d = s * 2 - u, U = Ia(d, u, i + 1 / 3), f = Ia(d, u, i), B = Ia(d, u, i - 1 / 3);
8972
+ return Ne(U * 255, f * 255, B * 255, c);
8973
8973
  }, CE = {
8974
8974
  hsl: Hl,
8975
8975
  hsla: Hl,
@@ -9169,14 +9169,14 @@ var Hl = function(e, A) {
9169
9169
  if (c === null)
9170
9170
  s === null && (s = o);
9171
9171
  else if (s !== null) {
9172
- for (var u = o - s, d = n[s - 1], h = (c - d) / (u + 1), f = 1; f <= u; f++)
9173
- n[s + f - 1] = h * f;
9172
+ for (var u = o - s, d = n[s - 1], U = (c - d) / (u + 1), f = 1; f <= u; f++)
9173
+ n[s + f - 1] = U * f;
9174
9174
  s = null;
9175
9175
  }
9176
9176
  }
9177
- return e.map(function(B, U) {
9178
- var g = B.color;
9179
- return { color: g, stop: Math.max(Math.min(1, n[U] / A), 0) };
9177
+ return e.map(function(B, g) {
9178
+ var h = B.color;
9179
+ return { color: h, stop: Math.max(Math.min(1, n[g] / A), 0) };
9180
9180
  });
9181
9181
  }, vE = function(e, A, t) {
9182
9182
  var r = A / 2, n = t / 2, a = cA(e[0], A) - r, o = n - cA(e[1], t);
@@ -9295,9 +9295,9 @@ var Hl = function(e, A) {
9295
9295
  } else if (c.name === "color-stop") {
9296
9296
  var d = c.values.filter(Nt);
9297
9297
  if (d.length === 2) {
9298
- var u = be.parse(e, d[1]), h = d[0];
9299
- Ot(h) && r.push({
9300
- stop: { type: 16, number: h.number * 100, flags: h.flags },
9298
+ var u = be.parse(e, d[1]), U = d[0];
9299
+ Ot(U) && r.push({
9300
+ stop: { type: 16, number: U.number * 100, flags: U.flags },
9301
9301
  color: u
9302
9302
  });
9303
9303
  }
@@ -11587,18 +11587,18 @@ var Fv = 1, Ma = 2, ba = 3, Gl = 4, Yl = 5, Cv = 7, zl = 8, Ha = 9, xa = 10, jl
11587
11587
  d.src = u.value, d.style.opacity = "1", s.appendChild(d);
11588
11588
  } else if (u.type === 18) {
11589
11589
  if (u.name === "attr") {
11590
- var h = u.values.filter(lA);
11591
- h.length && s.appendChild(i.createTextNode(A.getAttribute(h[0].value) || ""));
11590
+ var U = u.values.filter(lA);
11591
+ U.length && s.appendChild(i.createTextNode(A.getAttribute(U[0].value) || ""));
11592
11592
  } else if (u.name === "counter") {
11593
- var f = u.values.filter(Nt), B = f[0], U = f[1];
11593
+ var f = u.values.filter(Nt), B = f[0], g = f[1];
11594
11594
  if (B && lA(B)) {
11595
- var g = a.counters.getCounterValue(B.value), Q = U && lA(U) ? ho.parse(a.context, U.value) : 3;
11596
- s.appendChild(i.createTextNode(gr(g, Q, !1)));
11595
+ var h = a.counters.getCounterValue(B.value), p = g && lA(g) ? ho.parse(a.context, g.value) : 3;
11596
+ s.appendChild(i.createTextNode(gr(h, p, !1)));
11597
11597
  }
11598
11598
  } else if (u.name === "counters") {
11599
- var p = u.values.filter(Nt), B = p[0], F = p[1], U = p[2];
11599
+ var Q = u.values.filter(Nt), B = Q[0], F = Q[1], g = Q[2];
11600
11600
  if (B && lA(B)) {
11601
- var v = a.counters.getCounterValues(B.value), C = U && lA(U) ? ho.parse(a.context, U.value) : 3, T = F && F.type === 0 ? F.value : "", M = v.map(function(D) {
11601
+ var v = a.counters.getCounterValues(B.value), C = g && lA(g) ? ho.parse(a.context, g.value) : 3, T = F && F.type === 0 ? F.value : "", M = v.map(function(D) {
11602
11602
  return gr(D, C, !1);
11603
11603
  }).join(T);
11604
11604
  s.appendChild(i.createTextNode(M));
@@ -11823,12 +11823,12 @@ var ly = function(e, A) {
11823
11823
  /** @class */
11824
11824
  function() {
11825
11825
  function e(A) {
11826
- var t = A.styles, r = A.bounds, n = Ar(t.borderTopLeftRadius, r.width, r.height), a = n[0], o = n[1], i = Ar(t.borderTopRightRadius, r.width, r.height), l = i[0], s = i[1], c = Ar(t.borderBottomRightRadius, r.width, r.height), u = c[0], d = c[1], h = Ar(t.borderBottomLeftRadius, r.width, r.height), f = h[0], B = h[1], U = [];
11827
- U.push((a + l) / r.width), U.push((f + u) / r.width), U.push((o + B) / r.height), U.push((s + d) / r.height);
11828
- var g = Math.max.apply(Math, U);
11829
- g > 1 && (a /= g, o /= g, l /= g, s /= g, u /= g, d /= g, f /= g, B /= g);
11830
- var Q = r.width - l, p = r.height - d, F = r.width - u, v = r.height - B, C = t.borderTopWidth, T = t.borderRightWidth, M = t.borderBottomWidth, y = t.borderLeftWidth, S = cA(t.paddingTop, A.bounds.width), D = cA(t.paddingRight, A.bounds.width), L = cA(t.paddingBottom, A.bounds.width), b = cA(t.paddingLeft, A.bounds.width);
11831
- this.topLeftBorderDoubleOuterBox = a > 0 || o > 0 ? BA(r.left + y / 3, r.top + C / 3, a - y / 3, o - C / 3, oA.TOP_LEFT) : new x(r.left + y / 3, r.top + C / 3), this.topRightBorderDoubleOuterBox = a > 0 || o > 0 ? BA(r.left + Q, r.top + C / 3, l - T / 3, s - C / 3, oA.TOP_RIGHT) : new x(r.left + r.width - T / 3, r.top + C / 3), this.bottomRightBorderDoubleOuterBox = u > 0 || d > 0 ? BA(r.left + F, r.top + p, u - T / 3, d - M / 3, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T / 3, r.top + r.height - M / 3), this.bottomLeftBorderDoubleOuterBox = f > 0 || B > 0 ? BA(r.left + y / 3, r.top + v, f - y / 3, B - M / 3, oA.BOTTOM_LEFT) : new x(r.left + y / 3, r.top + r.height - M / 3), this.topLeftBorderDoubleInnerBox = a > 0 || o > 0 ? BA(r.left + y * 2 / 3, r.top + C * 2 / 3, a - y * 2 / 3, o - C * 2 / 3, oA.TOP_LEFT) : new x(r.left + y * 2 / 3, r.top + C * 2 / 3), this.topRightBorderDoubleInnerBox = a > 0 || o > 0 ? BA(r.left + Q, r.top + C * 2 / 3, l - T * 2 / 3, s - C * 2 / 3, oA.TOP_RIGHT) : new x(r.left + r.width - T * 2 / 3, r.top + C * 2 / 3), this.bottomRightBorderDoubleInnerBox = u > 0 || d > 0 ? BA(r.left + F, r.top + p, u - T * 2 / 3, d - M * 2 / 3, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T * 2 / 3, r.top + r.height - M * 2 / 3), this.bottomLeftBorderDoubleInnerBox = f > 0 || B > 0 ? BA(r.left + y * 2 / 3, r.top + v, f - y * 2 / 3, B - M * 2 / 3, oA.BOTTOM_LEFT) : new x(r.left + y * 2 / 3, r.top + r.height - M * 2 / 3), this.topLeftBorderStroke = a > 0 || o > 0 ? BA(r.left + y / 2, r.top + C / 2, a - y / 2, o - C / 2, oA.TOP_LEFT) : new x(r.left + y / 2, r.top + C / 2), this.topRightBorderStroke = a > 0 || o > 0 ? BA(r.left + Q, r.top + C / 2, l - T / 2, s - C / 2, oA.TOP_RIGHT) : new x(r.left + r.width - T / 2, r.top + C / 2), this.bottomRightBorderStroke = u > 0 || d > 0 ? BA(r.left + F, r.top + p, u - T / 2, d - M / 2, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T / 2, r.top + r.height - M / 2), this.bottomLeftBorderStroke = f > 0 || B > 0 ? BA(r.left + y / 2, r.top + v, f - y / 2, B - M / 2, oA.BOTTOM_LEFT) : new x(r.left + y / 2, r.top + r.height - M / 2), this.topLeftBorderBox = a > 0 || o > 0 ? BA(r.left, r.top, a, o, oA.TOP_LEFT) : new x(r.left, r.top), this.topRightBorderBox = l > 0 || s > 0 ? BA(r.left + Q, r.top, l, s, oA.TOP_RIGHT) : new x(r.left + r.width, r.top), this.bottomRightBorderBox = u > 0 || d > 0 ? BA(r.left + F, r.top + p, u, d, oA.BOTTOM_RIGHT) : new x(r.left + r.width, r.top + r.height), this.bottomLeftBorderBox = f > 0 || B > 0 ? BA(r.left, r.top + v, f, B, oA.BOTTOM_LEFT) : new x(r.left, r.top + r.height), this.topLeftPaddingBox = a > 0 || o > 0 ? BA(r.left + y, r.top + C, Math.max(0, a - y), Math.max(0, o - C), oA.TOP_LEFT) : new x(r.left + y, r.top + C), this.topRightPaddingBox = l > 0 || s > 0 ? BA(r.left + Math.min(Q, r.width - T), r.top + C, Q > r.width + T ? 0 : Math.max(0, l - T), Math.max(0, s - C), oA.TOP_RIGHT) : new x(r.left + r.width - T, r.top + C), this.bottomRightPaddingBox = u > 0 || d > 0 ? BA(r.left + Math.min(F, r.width - y), r.top + Math.min(p, r.height - M), Math.max(0, u - T), Math.max(0, d - M), oA.BOTTOM_RIGHT) : new x(r.left + r.width - T, r.top + r.height - M), this.bottomLeftPaddingBox = f > 0 || B > 0 ? BA(r.left + y, r.top + Math.min(v, r.height - M), Math.max(0, f - y), Math.max(0, B - M), oA.BOTTOM_LEFT) : new x(r.left + y, r.top + r.height - M), this.topLeftContentBox = a > 0 || o > 0 ? BA(r.left + y + b, r.top + C + S, Math.max(0, a - (y + b)), Math.max(0, o - (C + S)), oA.TOP_LEFT) : new x(r.left + y + b, r.top + C + S), this.topRightContentBox = l > 0 || s > 0 ? BA(r.left + Math.min(Q, r.width + y + b), r.top + C + S, Q > r.width + y + b ? 0 : l - y + b, s - (C + S), oA.TOP_RIGHT) : new x(r.left + r.width - (T + D), r.top + C + S), this.bottomRightContentBox = u > 0 || d > 0 ? BA(r.left + Math.min(F, r.width - (y + b)), r.top + Math.min(p, r.height + C + S), Math.max(0, u - (T + D)), d - (M + L), oA.BOTTOM_RIGHT) : new x(r.left + r.width - (T + D), r.top + r.height - (M + L)), this.bottomLeftContentBox = f > 0 || B > 0 ? BA(r.left + y + b, r.top + v, Math.max(0, f - (y + b)), B - (M + L), oA.BOTTOM_LEFT) : new x(r.left + y + b, r.top + r.height - (M + L));
11826
+ var t = A.styles, r = A.bounds, n = Ar(t.borderTopLeftRadius, r.width, r.height), a = n[0], o = n[1], i = Ar(t.borderTopRightRadius, r.width, r.height), l = i[0], s = i[1], c = Ar(t.borderBottomRightRadius, r.width, r.height), u = c[0], d = c[1], U = Ar(t.borderBottomLeftRadius, r.width, r.height), f = U[0], B = U[1], g = [];
11827
+ g.push((a + l) / r.width), g.push((f + u) / r.width), g.push((o + B) / r.height), g.push((s + d) / r.height);
11828
+ var h = Math.max.apply(Math, g);
11829
+ h > 1 && (a /= h, o /= h, l /= h, s /= h, u /= h, d /= h, f /= h, B /= h);
11830
+ var p = r.width - l, Q = r.height - d, F = r.width - u, v = r.height - B, C = t.borderTopWidth, T = t.borderRightWidth, M = t.borderBottomWidth, y = t.borderLeftWidth, S = cA(t.paddingTop, A.bounds.width), D = cA(t.paddingRight, A.bounds.width), L = cA(t.paddingBottom, A.bounds.width), b = cA(t.paddingLeft, A.bounds.width);
11831
+ this.topLeftBorderDoubleOuterBox = a > 0 || o > 0 ? BA(r.left + y / 3, r.top + C / 3, a - y / 3, o - C / 3, oA.TOP_LEFT) : new x(r.left + y / 3, r.top + C / 3), this.topRightBorderDoubleOuterBox = a > 0 || o > 0 ? BA(r.left + p, r.top + C / 3, l - T / 3, s - C / 3, oA.TOP_RIGHT) : new x(r.left + r.width - T / 3, r.top + C / 3), this.bottomRightBorderDoubleOuterBox = u > 0 || d > 0 ? BA(r.left + F, r.top + Q, u - T / 3, d - M / 3, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T / 3, r.top + r.height - M / 3), this.bottomLeftBorderDoubleOuterBox = f > 0 || B > 0 ? BA(r.left + y / 3, r.top + v, f - y / 3, B - M / 3, oA.BOTTOM_LEFT) : new x(r.left + y / 3, r.top + r.height - M / 3), this.topLeftBorderDoubleInnerBox = a > 0 || o > 0 ? BA(r.left + y * 2 / 3, r.top + C * 2 / 3, a - y * 2 / 3, o - C * 2 / 3, oA.TOP_LEFT) : new x(r.left + y * 2 / 3, r.top + C * 2 / 3), this.topRightBorderDoubleInnerBox = a > 0 || o > 0 ? BA(r.left + p, r.top + C * 2 / 3, l - T * 2 / 3, s - C * 2 / 3, oA.TOP_RIGHT) : new x(r.left + r.width - T * 2 / 3, r.top + C * 2 / 3), this.bottomRightBorderDoubleInnerBox = u > 0 || d > 0 ? BA(r.left + F, r.top + Q, u - T * 2 / 3, d - M * 2 / 3, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T * 2 / 3, r.top + r.height - M * 2 / 3), this.bottomLeftBorderDoubleInnerBox = f > 0 || B > 0 ? BA(r.left + y * 2 / 3, r.top + v, f - y * 2 / 3, B - M * 2 / 3, oA.BOTTOM_LEFT) : new x(r.left + y * 2 / 3, r.top + r.height - M * 2 / 3), this.topLeftBorderStroke = a > 0 || o > 0 ? BA(r.left + y / 2, r.top + C / 2, a - y / 2, o - C / 2, oA.TOP_LEFT) : new x(r.left + y / 2, r.top + C / 2), this.topRightBorderStroke = a > 0 || o > 0 ? BA(r.left + p, r.top + C / 2, l - T / 2, s - C / 2, oA.TOP_RIGHT) : new x(r.left + r.width - T / 2, r.top + C / 2), this.bottomRightBorderStroke = u > 0 || d > 0 ? BA(r.left + F, r.top + Q, u - T / 2, d - M / 2, oA.BOTTOM_RIGHT) : new x(r.left + r.width - T / 2, r.top + r.height - M / 2), this.bottomLeftBorderStroke = f > 0 || B > 0 ? BA(r.left + y / 2, r.top + v, f - y / 2, B - M / 2, oA.BOTTOM_LEFT) : new x(r.left + y / 2, r.top + r.height - M / 2), this.topLeftBorderBox = a > 0 || o > 0 ? BA(r.left, r.top, a, o, oA.TOP_LEFT) : new x(r.left, r.top), this.topRightBorderBox = l > 0 || s > 0 ? BA(r.left + p, r.top, l, s, oA.TOP_RIGHT) : new x(r.left + r.width, r.top), this.bottomRightBorderBox = u > 0 || d > 0 ? BA(r.left + F, r.top + Q, u, d, oA.BOTTOM_RIGHT) : new x(r.left + r.width, r.top + r.height), this.bottomLeftBorderBox = f > 0 || B > 0 ? BA(r.left, r.top + v, f, B, oA.BOTTOM_LEFT) : new x(r.left, r.top + r.height), this.topLeftPaddingBox = a > 0 || o > 0 ? BA(r.left + y, r.top + C, Math.max(0, a - y), Math.max(0, o - C), oA.TOP_LEFT) : new x(r.left + y, r.top + C), this.topRightPaddingBox = l > 0 || s > 0 ? BA(r.left + Math.min(p, r.width - T), r.top + C, p > r.width + T ? 0 : Math.max(0, l - T), Math.max(0, s - C), oA.TOP_RIGHT) : new x(r.left + r.width - T, r.top + C), this.bottomRightPaddingBox = u > 0 || d > 0 ? BA(r.left + Math.min(F, r.width - y), r.top + Math.min(Q, r.height - M), Math.max(0, u - T), Math.max(0, d - M), oA.BOTTOM_RIGHT) : new x(r.left + r.width - T, r.top + r.height - M), this.bottomLeftPaddingBox = f > 0 || B > 0 ? BA(r.left + y, r.top + Math.min(v, r.height - M), Math.max(0, f - y), Math.max(0, B - M), oA.BOTTOM_LEFT) : new x(r.left + y, r.top + r.height - M), this.topLeftContentBox = a > 0 || o > 0 ? BA(r.left + y + b, r.top + C + S, Math.max(0, a - (y + b)), Math.max(0, o - (C + S)), oA.TOP_LEFT) : new x(r.left + y + b, r.top + C + S), this.topRightContentBox = l > 0 || s > 0 ? BA(r.left + Math.min(p, r.width + y + b), r.top + C + S, p > r.width + y + b ? 0 : l - y + b, s - (C + S), oA.TOP_RIGHT) : new x(r.left + r.width - (T + D), r.top + C + S), this.bottomRightContentBox = u > 0 || d > 0 ? BA(r.left + Math.min(F, r.width - (y + b)), r.top + Math.min(Q, r.height + C + S), Math.max(0, u - (T + D)), d - (M + L), oA.BOTTOM_RIGHT) : new x(r.left + r.width - (T + D), r.top + r.height - (M + L)), this.bottomLeftContentBox = f > 0 || B > 0 ? BA(r.left + y + b, r.top + v, Math.max(0, f - (y + b)), B - (M + L), oA.BOTTOM_LEFT) : new x(r.left + y + b, r.top + r.height - (M + L));
11832
11832
  }
11833
11833
  return e;
11834
11834
  }()
@@ -12008,10 +12008,10 @@ var BA = function(e, A, t, r, n) {
12008
12008
  return u > f.element.container.styles.zIndex.order ? (d = B, !1) : d > 0;
12009
12009
  }), s.negativeZIndex.splice(d, 0, c);
12010
12010
  } else if (u > 0) {
12011
- var h = 0;
12011
+ var U = 0;
12012
12012
  s.positiveZIndex.some(function(f, B) {
12013
- return u >= f.element.container.styles.zIndex.order ? (h = B + 1, !1) : h > 0;
12014
- }), s.positiveZIndex.splice(h, 0, c);
12013
+ return u >= f.element.container.styles.zIndex.order ? (U = B + 1, !1) : U > 0;
12014
+ }), s.positiveZIndex.splice(U, 0, c);
12015
12015
  } else
12016
12016
  s.zeroOrAutoZIndexOrTransformedOrOpacity.push(c);
12017
12017
  } else
@@ -12125,19 +12125,19 @@ var BA = function(e, A, t, r, n) {
12125
12125
  if (!l && !d)
12126
12126
  return [t.width, t.height];
12127
12127
  if (d && l) {
12128
- var h = c ? r : n * a, f = u ? n : r / a;
12129
- return [h, f];
12128
+ var U = c ? r : n * a, f = u ? n : r / a;
12129
+ return [U, f];
12130
12130
  }
12131
- var B = c ? r : t.width, U = u ? n : t.height;
12132
- return [B, U];
12131
+ var B = c ? r : t.width, g = u ? n : t.height;
12132
+ return [B, g];
12133
12133
  }
12134
12134
  if (l) {
12135
- var g = 0, Q = 0;
12136
- return FA(o) ? g = cA(o, t.width) : FA(i) && (Q = cA(i, t.height)), gt(o) ? g = Q * a : (!i || gt(i)) && (Q = g / a), [g, Q];
12135
+ var h = 0, p = 0;
12136
+ return FA(o) ? h = cA(o, t.width) : FA(i) && (p = cA(i, t.height)), gt(o) ? h = p * a : (!i || gt(i)) && (p = h / a), [h, p];
12137
12137
  }
12138
- var p = null, F = null;
12139
- if (FA(o) ? p = cA(o, t.width) : i && FA(i) && (F = cA(i, t.height)), p !== null && (!i || gt(i)) && (F = c && u ? p / r * n : t.height), F !== null && gt(o) && (p = c && u ? F / n * r : t.width), p !== null && F !== null)
12140
- return [p, F];
12138
+ var Q = null, F = null;
12139
+ if (FA(o) ? Q = cA(o, t.width) : i && FA(i) && (F = cA(i, t.height)), Q !== null && (!i || gt(i)) && (F = c && u ? Q / r * n : t.height), F !== null && gt(o) && (Q = c && u ? F / n * r : t.width), Q !== null && F !== null)
12140
+ return [Q, F];
12141
12141
  throw new Error("Unable to calculate background-size for element");
12142
12142
  }, pt = function(e, A) {
12143
12143
  var t = e[A];
@@ -12281,17 +12281,17 @@ var BA = function(e, A, t, r, n) {
12281
12281
  }, A.prototype.renderTextNode = function(t, r) {
12282
12282
  return kA(this, void 0, void 0, function() {
12283
12283
  var n, a, o, i, l, s, c, u, d = this;
12284
- return MA(this, function(h) {
12284
+ return MA(this, function(U) {
12285
12285
  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(f) {
12286
12286
  u.forEach(function(B) {
12287
12287
  switch (B) {
12288
12288
  case 0:
12289
12289
  d.ctx.fillStyle = vA(r.color), d.renderTextWithLetterSpacing(f, r.letterSpacing, s);
12290
- var U = r.textShadow;
12291
- U.length && f.text.trim().length && (U.slice(0).reverse().forEach(function(g) {
12292
- d.ctx.shadowColor = vA(g.color), d.ctx.shadowOffsetX = g.offsetX.number * d.options.scale, d.ctx.shadowOffsetY = g.offsetY.number * d.options.scale, d.ctx.shadowBlur = g.blur.number, d.renderTextWithLetterSpacing(f, r.letterSpacing, s);
12293
- }), d.ctx.shadowColor = "", d.ctx.shadowOffsetX = 0, d.ctx.shadowOffsetY = 0, d.ctx.shadowBlur = 0), r.textDecorationLine.length && (d.ctx.fillStyle = vA(r.textDecorationColor || r.color), r.textDecorationLine.forEach(function(g) {
12294
- switch (g) {
12290
+ var g = r.textShadow;
12291
+ g.length && f.text.trim().length && (g.slice(0).reverse().forEach(function(h) {
12292
+ d.ctx.shadowColor = vA(h.color), d.ctx.shadowOffsetX = h.offsetX.number * d.options.scale, d.ctx.shadowOffsetY = h.offsetY.number * d.options.scale, d.ctx.shadowBlur = h.blur.number, d.renderTextWithLetterSpacing(f, r.letterSpacing, s);
12293
+ }), d.ctx.shadowColor = "", d.ctx.shadowOffsetX = 0, d.ctx.shadowOffsetY = 0, d.ctx.shadowBlur = 0), r.textDecorationLine.length && (d.ctx.fillStyle = vA(r.textDecorationColor || r.color), r.textDecorationLine.forEach(function(h) {
12294
+ switch (h) {
12295
12295
  case 1:
12296
12296
  d.ctx.fillRect(f.bounds.left, Math.round(f.bounds.top + s), f.bounds.width, 1);
12297
12297
  break;
@@ -12322,7 +12322,7 @@ var BA = function(e, A, t, r, n) {
12322
12322
  }
12323
12323
  }, A.prototype.renderNodeContent = function(t) {
12324
12324
  return kA(this, void 0, void 0, function() {
12325
- var r, n, a, o, i, l, Q, Q, s, c, u, d, F, h, f, v, B, U, g, Q, p, F, v;
12325
+ var r, n, a, o, i, l, p, p, s, c, u, d, F, U, f, v, B, g, h, p, Q, F, v;
12326
12326
  return MA(this, function(C) {
12327
12327
  switch (C.label) {
12328
12328
  case 0:
@@ -12343,7 +12343,7 @@ var BA = function(e, A, t, r, n) {
12343
12343
  case 5:
12344
12344
  return C.trys.push([5, 7, , 8]), [4, this.context.cache.match(r.src)];
12345
12345
  case 6:
12346
- return Q = C.sent(), this.renderReplacedElement(r, n, Q), [3, 8];
12346
+ return p = C.sent(), this.renderReplacedElement(r, n, p), [3, 8];
12347
12347
  case 7:
12348
12348
  return C.sent(), this.context.logger.error("Error loading image " + r.src), [3, 8];
12349
12349
  case 8:
@@ -12353,7 +12353,7 @@ var BA = function(e, A, t, r, n) {
12353
12353
  case 9:
12354
12354
  return C.trys.push([9, 11, , 12]), [4, this.context.cache.match(r.svg)];
12355
12355
  case 10:
12356
- return Q = C.sent(), this.renderReplacedElement(r, n, Q), [3, 12];
12356
+ return p = C.sent(), this.renderReplacedElement(r, n, p), [3, 12];
12357
12357
  case 11:
12358
12358
  return C.sent(), this.context.logger.error("Error loading svg " + r.svg.substring(0, 255)), [3, 12];
12359
12359
  case 12:
@@ -12377,7 +12377,7 @@ var BA = function(e, A, t, r, n) {
12377
12377
  new x(r.bounds.left + u * 0.84, r.bounds.top + u * 0.34085),
12378
12378
  new x(r.bounds.left + u * 0.39363, r.bounds.top + u * 0.79)
12379
12379
  ]), this.ctx.fillStyle = vA(es), this.ctx.fill(), this.ctx.restore()) : r.type === yn && 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 = vA(es), this.ctx.fill(), this.ctx.restore())), Yy(r) && r.value.length) {
12380
- switch (d = this.createFontStyle(a), F = d[0], h = d[1], f = this.fontMetrics.getMetrics(F, h).baseline, this.ctx.font = F, this.ctx.fillStyle = vA(a.color), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = jy(r.styles.textAlign), v = Nn(r), B = 0, r.styles.textAlign) {
12380
+ switch (d = this.createFontStyle(a), F = d[0], U = d[1], f = this.fontMetrics.getMetrics(F, U).baseline, this.ctx.font = F, this.ctx.fillStyle = vA(a.color), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = jy(r.styles.textAlign), v = Nn(r), B = 0, r.styles.textAlign) {
12381
12381
  case 1:
12382
12382
  B += v.width / 2;
12383
12383
  break;
@@ -12385,12 +12385,12 @@ var BA = function(e, A, t, r, n) {
12385
12385
  B += v.width;
12386
12386
  break;
12387
12387
  }
12388
- U = v.add(B, 0, 0, -v.height / 2 + 1), this.ctx.save(), this.path([
12388
+ g = v.add(B, 0, 0, -v.height / 2 + 1), this.ctx.save(), this.path([
12389
12389
  new x(v.left, v.top),
12390
12390
  new x(v.left + v.width, v.top),
12391
12391
  new x(v.left + v.width, v.top + v.height),
12392
12392
  new x(v.left, v.top + v.height)
12393
- ]), this.ctx.clip(), this.renderTextWithLetterSpacing(new ir(r.value, U), a.letterSpacing, f), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
12393
+ ]), this.ctx.clip(), this.renderTextWithLetterSpacing(new ir(r.value, g), a.letterSpacing, f), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
12394
12394
  }
12395
12395
  if (!mA(
12396
12396
  r.styles.display,
@@ -12400,15 +12400,15 @@ var BA = function(e, A, t, r, n) {
12400
12400
  return [3, 20];
12401
12401
  if (r.styles.listStyleImage === null)
12402
12402
  return [3, 19];
12403
- if (g = r.styles.listStyleImage, g.type !== 0)
12403
+ if (h = r.styles.listStyleImage, h.type !== 0)
12404
12404
  return [3, 18];
12405
- Q = void 0, p = g.url, C.label = 15;
12405
+ p = void 0, Q = h.url, C.label = 15;
12406
12406
  case 15:
12407
- return C.trys.push([15, 17, , 18]), [4, this.context.cache.match(p)];
12407
+ return C.trys.push([15, 17, , 18]), [4, this.context.cache.match(Q)];
12408
12408
  case 16:
12409
- return Q = C.sent(), this.ctx.drawImage(Q, r.bounds.left - (Q.width + 10), r.bounds.top), [3, 18];
12409
+ return p = C.sent(), this.ctx.drawImage(p, r.bounds.left - (p.width + 10), r.bounds.top), [3, 18];
12410
12410
  case 17:
12411
- return C.sent(), this.context.logger.error("Error loading list-style-image " + p), [3, 18];
12411
+ return C.sent(), this.context.logger.error("Error loading list-style-image " + Q), [3, 18];
12412
12412
  case 18:
12413
12413
  return [3, 20];
12414
12414
  case 19:
@@ -12423,9 +12423,9 @@ var BA = function(e, A, t, r, n) {
12423
12423
  });
12424
12424
  }, A.prototype.renderStackContent = function(t) {
12425
12425
  return kA(this, void 0, void 0, function() {
12426
- var r, n, g, a, o, g, i, l, g, s, c, g, u, d, g, h, f, g, B, U, g;
12427
- return MA(this, function(Q) {
12428
- switch (Q.label) {
12426
+ var r, n, h, a, o, h, i, l, h, s, c, h, u, d, h, U, f, h, B, g, h;
12427
+ return MA(this, function(p) {
12428
+ switch (p.label) {
12429
12429
  case 0:
12430
12430
  if (mA(
12431
12431
  t.element.container.flags,
@@ -12435,61 +12435,61 @@ var BA = function(e, A, t, r, n) {
12435
12435
  debugger;
12436
12436
  return [4, this.renderNodeBackgroundAndBorders(t.element)];
12437
12437
  case 1:
12438
- Q.sent(), r = 0, n = t.negativeZIndex, Q.label = 2;
12438
+ p.sent(), r = 0, n = t.negativeZIndex, p.label = 2;
12439
12439
  case 2:
12440
- return r < n.length ? (g = n[r], [4, this.renderStack(g)]) : [3, 5];
12440
+ return r < n.length ? (h = n[r], [4, this.renderStack(h)]) : [3, 5];
12441
12441
  case 3:
12442
- Q.sent(), Q.label = 4;
12442
+ p.sent(), p.label = 4;
12443
12443
  case 4:
12444
12444
  return r++, [3, 2];
12445
12445
  case 5:
12446
12446
  return [4, this.renderNodeContent(t.element)];
12447
12447
  case 6:
12448
- Q.sent(), a = 0, o = t.nonInlineLevel, Q.label = 7;
12448
+ p.sent(), a = 0, o = t.nonInlineLevel, p.label = 7;
12449
12449
  case 7:
12450
- return a < o.length ? (g = o[a], [4, this.renderNode(g)]) : [3, 10];
12450
+ return a < o.length ? (h = o[a], [4, this.renderNode(h)]) : [3, 10];
12451
12451
  case 8:
12452
- Q.sent(), Q.label = 9;
12452
+ p.sent(), p.label = 9;
12453
12453
  case 9:
12454
12454
  return a++, [3, 7];
12455
12455
  case 10:
12456
- i = 0, l = t.nonPositionedFloats, Q.label = 11;
12456
+ i = 0, l = t.nonPositionedFloats, p.label = 11;
12457
12457
  case 11:
12458
- return i < l.length ? (g = l[i], [4, this.renderStack(g)]) : [3, 14];
12458
+ return i < l.length ? (h = l[i], [4, this.renderStack(h)]) : [3, 14];
12459
12459
  case 12:
12460
- Q.sent(), Q.label = 13;
12460
+ p.sent(), p.label = 13;
12461
12461
  case 13:
12462
12462
  return i++, [3, 11];
12463
12463
  case 14:
12464
- s = 0, c = t.nonPositionedInlineLevel, Q.label = 15;
12464
+ s = 0, c = t.nonPositionedInlineLevel, p.label = 15;
12465
12465
  case 15:
12466
- return s < c.length ? (g = c[s], [4, this.renderStack(g)]) : [3, 18];
12466
+ return s < c.length ? (h = c[s], [4, this.renderStack(h)]) : [3, 18];
12467
12467
  case 16:
12468
- Q.sent(), Q.label = 17;
12468
+ p.sent(), p.label = 17;
12469
12469
  case 17:
12470
12470
  return s++, [3, 15];
12471
12471
  case 18:
12472
- u = 0, d = t.inlineLevel, Q.label = 19;
12472
+ u = 0, d = t.inlineLevel, p.label = 19;
12473
12473
  case 19:
12474
- return u < d.length ? (g = d[u], [4, this.renderNode(g)]) : [3, 22];
12474
+ return u < d.length ? (h = d[u], [4, this.renderNode(h)]) : [3, 22];
12475
12475
  case 20:
12476
- Q.sent(), Q.label = 21;
12476
+ p.sent(), p.label = 21;
12477
12477
  case 21:
12478
12478
  return u++, [3, 19];
12479
12479
  case 22:
12480
- h = 0, f = t.zeroOrAutoZIndexOrTransformedOrOpacity, Q.label = 23;
12480
+ U = 0, f = t.zeroOrAutoZIndexOrTransformedOrOpacity, p.label = 23;
12481
12481
  case 23:
12482
- return h < f.length ? (g = f[h], [4, this.renderStack(g)]) : [3, 26];
12482
+ return U < f.length ? (h = f[U], [4, this.renderStack(h)]) : [3, 26];
12483
12483
  case 24:
12484
- Q.sent(), Q.label = 25;
12484
+ p.sent(), p.label = 25;
12485
12485
  case 25:
12486
- return h++, [3, 23];
12486
+ return U++, [3, 23];
12487
12487
  case 26:
12488
- B = 0, U = t.positiveZIndex, Q.label = 27;
12488
+ B = 0, g = t.positiveZIndex, p.label = 27;
12489
12489
  case 27:
12490
- return B < U.length ? (g = U[B], [4, this.renderStack(g)]) : [3, 30];
12490
+ return B < g.length ? (h = g[B], [4, this.renderStack(h)]) : [3, 30];
12491
12491
  case 28:
12492
- Q.sent(), Q.label = 29;
12492
+ p.sent(), p.label = 29;
12493
12493
  case 29:
12494
12494
  return B++, [3, 27];
12495
12495
  case 30:
@@ -12527,7 +12527,7 @@ var BA = function(e, A, t, r, n) {
12527
12527
  switch (s.label) {
12528
12528
  case 0:
12529
12529
  r = t.styles.backgroundImage.length - 1, n = function(c) {
12530
- var u, d, h, S, G, _, b, P, M, f, S, G, _, b, P, B, U, g, Q, p, F, v, C, T, M, y, S, D, L, b, P, iA, G, _, rA, fA, uA, aA, X, z, NA, QA;
12530
+ var u, d, U, S, G, _, b, P, M, f, S, G, _, b, P, B, g, h, p, Q, F, v, C, T, M, y, S, D, L, b, P, iA, G, _, rA, fA, uA, aA, X, z, NA, QA;
12531
12531
  return MA(this, function(hA) {
12532
12532
  switch (hA.label) {
12533
12533
  case 0:
@@ -12541,13 +12541,13 @@ var BA = function(e, A, t, r, n) {
12541
12541
  case 3:
12542
12542
  return hA.sent(), a.context.logger.error("Error loading background-image " + d), [3, 4];
12543
12543
  case 4:
12544
- return u && (h = Ka(t, r, [
12544
+ return u && (U = Ka(t, r, [
12545
12545
  u.width,
12546
12546
  u.height,
12547
12547
  u.width / u.height
12548
- ]), S = h[0], G = h[1], _ = h[2], b = h[3], P = h[4], M = a.ctx.createPattern(a.resizeImage(u, b, P), "repeat"), a.renderRepeat(S, M, G, _)), [3, 6];
12548
+ ]), S = U[0], G = U[1], _ = U[2], b = U[3], P = U[4], M = a.ctx.createPattern(a.resizeImage(u, b, P), "repeat"), a.renderRepeat(S, M, G, _)), [3, 6];
12549
12549
  case 5:
12550
- NE(c) ? (f = Ka(t, r, [null, null, null]), S = f[0], G = f[1], _ = f[2], b = f[3], P = f[4], B = yE(c.angle, b, P), U = B[0], g = B[1], Q = B[2], p = B[3], F = B[4], v = document.createElement("canvas"), v.width = b, v.height = P, C = v.getContext("2d"), T = C.createLinearGradient(g, p, Q, F), xl(c.stops, U).forEach(function(gA) {
12550
+ NE(c) ? (f = Ka(t, r, [null, null, null]), S = f[0], G = f[1], _ = f[2], b = f[3], P = f[4], B = yE(c.angle, b, P), g = B[0], h = B[1], p = B[2], Q = B[3], F = B[4], v = document.createElement("canvas"), v.width = b, v.height = P, C = v.getContext("2d"), T = C.createLinearGradient(h, Q, p, F), xl(c.stops, g).forEach(function(gA) {
12551
12551
  return T.addColorStop(gA.stop, vA(gA.color));
12552
12552
  }), C.fillStyle = T, C.fillRect(0, 0, b, P), b > 0 && P > 0 && (M = a.ctx.createPattern(v, "repeat"), a.renderRepeat(S, M, G, _))) : SE(c) && (y = Ka(t, r, [
12553
12553
  null,
@@ -12623,10 +12623,10 @@ var BA = function(e, A, t, r, n) {
12623
12623
  { style: r.borderLeftStyle, color: r.borderLeftColor, width: r.borderLeftWidth }
12624
12624
  ], o = zy(pt(r.backgroundClip, 0), t.curves), n || r.boxShadow.length ? (this.ctx.save(), this.path(o), this.ctx.clip(), He(r.backgroundColor) || (this.ctx.fillStyle = vA(r.backgroundColor), this.ctx.fill()), [4, this.renderBackgroundImage(t.container)]) : [3, 2];
12625
12625
  case 1:
12626
- d.sent(), this.ctx.restore(), r.boxShadow.slice(0).reverse().forEach(function(h) {
12626
+ d.sent(), this.ctx.restore(), r.boxShadow.slice(0).reverse().forEach(function(U) {
12627
12627
  u.ctx.save();
12628
- var f = Tn(t.curves), B = h.inset ? 0 : Ly, U = My(f, -B + (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));
12629
- h.inset ? (u.path(f), u.ctx.clip(), u.mask(U)) : (u.mask(f), u.ctx.clip(), u.path(U)), u.ctx.shadowOffsetX = h.offsetX.number + B, u.ctx.shadowOffsetY = h.offsetY.number, u.ctx.shadowColor = vA(h.color), u.ctx.shadowBlur = h.blur.number, u.ctx.fillStyle = h.inset ? vA(h.color) : "rgba(0,0,0,1)", u.ctx.fill(), u.ctx.restore();
12628
+ var f = Tn(t.curves), B = U.inset ? 0 : Ly, g = My(f, -B + (U.inset ? 1 : -1) * U.spread.number, (U.inset ? 1 : -1) * U.spread.number, U.spread.number * (U.inset ? -2 : 2), U.spread.number * (U.inset ? -2 : 2));
12629
+ U.inset ? (u.path(f), u.ctx.clip(), u.mask(g)) : (u.mask(f), u.ctx.clip(), u.path(g)), u.ctx.shadowOffsetX = U.offsetX.number + B, u.ctx.shadowOffsetY = U.offsetY.number, u.ctx.shadowColor = vA(U.color), u.ctx.shadowBlur = U.blur.number, u.ctx.fillStyle = U.inset ? vA(U.color) : "rgba(0,0,0,1)", u.ctx.fill(), u.ctx.restore();
12630
12630
  }), d.label = 2;
12631
12631
  case 2:
12632
12632
  i = 0, l = 0, s = a, d.label = 3;
@@ -12674,9 +12674,9 @@ var BA = function(e, A, t, r, n) {
12674
12674
  });
12675
12675
  }, A.prototype.renderDashedDottedBorder = function(t, r, n, a, o) {
12676
12676
  return kA(this, void 0, void 0, function() {
12677
- var i, l, s, c, u, d, h, f, B, U, g, Q, p, F, v, C, v, C;
12677
+ var i, l, s, c, u, d, U, f, B, g, h, p, Q, F, v, C, v, C;
12678
12678
  return MA(this, function(T) {
12679
- return this.ctx.save(), i = Zy(a, n), l = Bs(a, n), o === 2 && (this.path(l), this.ctx.clip()), qA(l[0]) ? (s = l[0].start.x, c = l[0].start.y) : (s = l[0].x, c = l[0].y), qA(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)), f = r < 3 ? r * 3 : r * 2, B = r < 3 ? r * 2 : r, o === 3 && (f = r, B = r), U = !0, h <= f * 2 ? U = !1 : h <= f * 2 + B ? (g = h / (2 * f + B), f *= g, B *= g) : (Q = Math.floor((h + B) / (f + B)), p = (h - Q * f) / (Q - 1), F = (h - (Q + 1) * f) / Q, B = F <= 0 || Math.abs(B - p) < Math.abs(B - F) ? p : F), U && (o === 3 ? this.ctx.setLineDash([0, f + B]) : this.ctx.setLineDash([f, B])), o === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = r) : this.ctx.lineWidth = r * 2 + 1.1, this.ctx.strokeStyle = vA(t), this.ctx.stroke(), this.ctx.setLineDash([]), o === 2 && (qA(l[0]) && (v = l[3], C = l[0], this.ctx.beginPath(), this.formatPath([new x(v.end.x, v.end.y), new x(C.start.x, C.start.y)]), this.ctx.stroke()), qA(l[1]) && (v = l[1], C = l[2], this.ctx.beginPath(), this.formatPath([new x(v.end.x, v.end.y), new x(C.start.x, C.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
12679
+ return this.ctx.save(), i = Zy(a, n), l = Bs(a, n), o === 2 && (this.path(l), this.ctx.clip()), qA(l[0]) ? (s = l[0].start.x, c = l[0].start.y) : (s = l[0].x, c = l[0].y), qA(l[1]) ? (u = l[1].end.x, d = l[1].end.y) : (u = l[1].x, d = l[1].y), n === 0 || n === 2 ? U = Math.abs(s - u) : U = Math.abs(c - d), this.ctx.beginPath(), o === 3 ? this.formatPath(i) : this.formatPath(l.slice(0, 2)), f = r < 3 ? r * 3 : r * 2, B = r < 3 ? r * 2 : r, o === 3 && (f = r, B = r), g = !0, U <= f * 2 ? g = !1 : U <= f * 2 + B ? (h = U / (2 * f + B), f *= h, B *= h) : (p = Math.floor((U + B) / (f + B)), Q = (U - p * f) / (p - 1), F = (U - (p + 1) * f) / p, B = F <= 0 || Math.abs(B - Q) < Math.abs(B - F) ? Q : F), g && (o === 3 ? this.ctx.setLineDash([0, f + B]) : this.ctx.setLineDash([f, B])), o === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = r) : this.ctx.lineWidth = r * 2 + 1.1, this.ctx.strokeStyle = vA(t), this.ctx.stroke(), this.ctx.setLineDash([]), o === 2 && (qA(l[0]) && (v = l[3], C = l[0], this.ctx.beginPath(), this.formatPath([new x(v.end.x, v.end.y), new x(C.start.x, C.start.y)]), this.ctx.stroke()), qA(l[1]) && (v = l[1], C = l[2], this.ctx.beginPath(), this.formatPath([new x(v.end.x, v.end.y), new x(C.start.x, C.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
12680
12680
  2
12681
12681
  /*return*/
12682
12682
  ];
@@ -12793,7 +12793,7 @@ var BA = function(e, A, t, r, n) {
12793
12793
  typeof window < "u" && Su.setContext(window);
12794
12794
  var tR = function(e, A) {
12795
12795
  return kA(void 0, void 0, void 0, function() {
12796
- var t, r, n, a, o, i, l, s, c, u, d, h, f, B, U, g, Q, p, F, v, T, C, T, M, y, S, D, L, b, P, iA, G, _, rA, fA, uA, aA, X, z, NA;
12796
+ var t, r, n, a, o, i, l, s, c, u, d, U, f, B, g, h, p, Q, F, v, T, C, T, M, y, S, D, L, b, P, iA, G, _, rA, fA, uA, aA, X, z, NA;
12797
12797
  return MA(this, function(QA) {
12798
12798
  switch (QA.label) {
12799
12799
  case 0:
@@ -12821,23 +12821,23 @@ var tR = function(e, A) {
12821
12821
  copyStyles: s
12822
12822
  }, l.logger.debug("Starting document clone with size " + i.width + "x" + i.height + " scrolled to " + -i.left + "," + -i.top), u = new cs(l, e, c), d = u.clonedReferenceElement, d ? [4, u.toIFrame(t, i)] : [2, Promise.reject("Unable to find element in cloned iframe")];
12823
12823
  case 1:
12824
- return h = QA.sent(), f = Ci(d) || ry(d) ? MF(d.ownerDocument) : Xn(l, d), B = f.width, U = f.height, g = f.left, Q = f.top, p = rR(l, d, A.backgroundColor), F = {
12824
+ return U = QA.sent(), f = Ci(d) || ry(d) ? MF(d.ownerDocument) : Xn(l, d), B = f.width, g = f.height, h = f.left, p = f.top, Q = rR(l, d, A.backgroundColor), F = {
12825
12825
  canvas: A.canvas,
12826
- backgroundColor: p,
12826
+ backgroundColor: Q,
12827
12827
  scale: (fA = (rA = A.scale) !== null && rA !== void 0 ? rA : r.devicePixelRatio) !== null && fA !== void 0 ? fA : 1,
12828
- x: ((uA = A.x) !== null && uA !== void 0 ? uA : 0) + g,
12829
- y: ((aA = A.y) !== null && aA !== void 0 ? aA : 0) + Q,
12828
+ x: ((uA = A.x) !== null && uA !== void 0 ? uA : 0) + h,
12829
+ y: ((aA = A.y) !== null && aA !== void 0 ? aA : 0) + p,
12830
12830
  width: (X = A.width) !== null && X !== void 0 ? X : Math.ceil(B),
12831
- height: (z = A.height) !== null && z !== void 0 ? z : Math.ceil(U)
12831
+ height: (z = A.height) !== null && z !== void 0 ? z : Math.ceil(g)
12832
12832
  }, s ? (l.logger.debug("Document cloned, using foreign object rendering"), T = new _y(l, F), [4, T.render(d)]) : [3, 3];
12833
12833
  case 2:
12834
12834
  return v = QA.sent(), [3, 5];
12835
12835
  case 3:
12836
- return l.logger.debug("Document cloned, element located at " + g + "," + Q + " with size " + B + "x" + U + " using computed rendering"), l.logger.debug("Starting DOM parsing"), C = mu(l, d), p === C.styles.backgroundColor && (C.styles.backgroundColor = Ce.TRANSPARENT), l.logger.debug("Starting renderer for element at " + F.x + "," + F.y + " with size " + F.width + "x" + F.height), T = new Gy(l, F), [4, T.render(C)];
12836
+ return l.logger.debug("Document cloned, element located at " + h + "," + p + " with size " + B + "x" + g + " using computed rendering"), l.logger.debug("Starting DOM parsing"), C = mu(l, d), Q === C.styles.backgroundColor && (C.styles.backgroundColor = Ce.TRANSPARENT), l.logger.debug("Starting renderer for element at " + F.x + "," + F.y + " with size " + F.width + "x" + F.height), T = new Gy(l, F), [4, T.render(C)];
12837
12837
  case 4:
12838
12838
  v = QA.sent(), QA.label = 5;
12839
12839
  case 5:
12840
- return (!((NA = A.removeContainer) !== null && NA !== void 0) || NA) && (cs.destroy(h) || l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), l.logger.debug("Finished rendering"), [2, v];
12840
+ return (!((NA = A.removeContainer) !== null && NA !== void 0) || NA) && (cs.destroy(U) || l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), l.logger.debug("Finished rendering"), [2, v];
12841
12841
  }
12842
12842
  });
12843
12843
  });
@@ -12907,11 +12907,11 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
12907
12907
  return ((E = r.value) == null ? void 0 : E.printHeight) || 0;
12908
12908
  });
12909
12909
  k(!1);
12910
- const c = k(!1), u = k(!1), d = k(/* @__PURE__ */ new Map()), h = k(/* @__PURE__ */ new Map()), f = new Map(Hc.map((E) => [E.type, E])), { selectedItems: B, selectItem: U, getCurrentSelected: g, clearSelection: Q } = vF(), { dragging: p, dragItem: F, startDrag: v } = EF({
12910
+ const c = k(!1), u = k(!1), d = k(/* @__PURE__ */ new Map()), U = k(/* @__PURE__ */ new Map()), f = new Map(Hc.map((E) => [E.type, E])), { selectedItems: B, selectItem: g, getCurrentSelected: h, clearSelection: p } = vF(), { dragging: Q, dragItem: F, startDrag: v } = EF({
12911
12911
  scale: o,
12912
12912
  canvasWidth: l,
12913
12913
  canvasHeight: s,
12914
- selectItem: U,
12914
+ selectItem: g,
12915
12915
  onStartDrag: () => {
12916
12916
  c.value = !0;
12917
12917
  },
@@ -12926,15 +12926,15 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
12926
12926
  }), { alignmentGuides: C, showGuides: T, updateAlignmentGuides: M, clearAlignmentGuides: y } = IF({
12927
12927
  items: a,
12928
12928
  dragItem: F,
12929
- dragging: p
12929
+ dragging: Q
12930
12930
  }), { startResize: S } = mF(l, s, o, B), { startRotate: D } = yF();
12931
12931
  CA(() => B.value, () => {
12932
12932
  d.value.clear();
12933
12933
  }, { deep: !0 });
12934
12934
  const L = (E) => {
12935
12935
  const w = `${E.id}_${E.props.x.toFixed(1)}_${E.props.y.toFixed(1)}_${E.props.width}_${E.props.height}_${E.props.rotation}`;
12936
- if (h.value.has(w))
12937
- return h.value.get(w);
12936
+ if (U.value.has(w))
12937
+ return U.value.get(w);
12938
12938
  const q = (E.props.rotation || 0) * Math.PI / 180, K = [
12939
12939
  { x: 0, y: 0 },
12940
12940
  // top-left
@@ -12951,9 +12951,9 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
12951
12951
  y: Number((Je + Y + E.props.y).toFixed(2))
12952
12952
  };
12953
12953
  });
12954
- if (h.value.set(w, eA), h.value.size > 100) {
12955
- const R = h.value.keys().next().value;
12956
- h.value.delete(R);
12954
+ if (U.value.set(w, eA), U.value.size > 100) {
12955
+ const R = U.value.keys().next().value;
12956
+ U.value.delete(R);
12957
12957
  }
12958
12958
  return eA;
12959
12959
  }, b = (E) => {
@@ -13034,7 +13034,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13034
13034
  }
13035
13035
  return J;
13036
13036
  }, fA = (E) => {
13037
- const w = B.value.some((q) => q.id === E.id), O = g() === E;
13037
+ const w = B.value.some((q) => q.id === E.id), O = h() === E;
13038
13038
  return {
13039
13039
  "component-selected": w,
13040
13040
  "component-current": w && O,
@@ -13077,7 +13077,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13077
13077
  const w = document.activeElement.tagName.toLowerCase();
13078
13078
  if (w === "input" || w === "textarea")
13079
13079
  return;
13080
- const O = g();
13080
+ const O = h();
13081
13081
  if (!O)
13082
13082
  return;
13083
13083
  const q = Number(O.props.width) || 0, K = Number(O.props.height) || 0;
@@ -13117,7 +13117,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13117
13117
  type: O,
13118
13118
  props: Nr
13119
13119
  };
13120
- a.value.push(mi), U(mi);
13120
+ a.value.push(mi), g(mi);
13121
13121
  };
13122
13122
  function hA(E) {
13123
13123
  let w = E.target;
@@ -13126,27 +13126,27 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13126
13126
  return;
13127
13127
  w = w.parentElement;
13128
13128
  }
13129
- Q();
13129
+ p();
13130
13130
  }
13131
13131
  const gA = (E, w) => {
13132
13132
  if (B.value.length === 0) {
13133
- U(w), v(E, w);
13133
+ g(w), v(E, w);
13134
13134
  return;
13135
13135
  }
13136
- if (g() === w) {
13136
+ if (h() === w) {
13137
13137
  v(E, w);
13138
13138
  return;
13139
13139
  }
13140
- U(w), v(E, w);
13140
+ g(w), v(E, w);
13141
13141
  }, SA = (E) => {
13142
13142
  const w = [];
13143
13143
  for (const K of d.value.keys())
13144
13144
  K.includes(E) && w.push(K);
13145
13145
  w.forEach((K) => d.value.delete(K));
13146
13146
  const O = [];
13147
- for (const K of h.value.keys())
13147
+ for (const K of U.value.keys())
13148
13148
  K.includes(E) && O.push(K);
13149
- if (O.forEach((K) => h.value.delete(K)), d.value.clear(), h.value.clear(), a.value.find((K) => K.id === E) && (a.value = a.value.filter((K) => K.id !== E)), B.value.some((K) => K.id === E)) {
13149
+ if (O.forEach((K) => U.value.delete(K)), d.value.clear(), U.value.clear(), a.value.find((K) => K.id === E) && (a.value = a.value.filter((K) => K.id !== E)), B.value.some((K) => K.id === E)) {
13150
13150
  const K = B.value.filter((J) => J.id !== E);
13151
13151
  B.value = K;
13152
13152
  }
@@ -13155,7 +13155,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13155
13155
  }, XA = (E) => {
13156
13156
  var O;
13157
13157
  const w = document.activeElement.tagName.toLowerCase();
13158
- w === "input" || w === "textarea" || (E.key === "Delete" || E.key === "Backspace") && B.value.length > 0 && SA((O = g()) == null ? void 0 : O.id);
13158
+ w === "input" || w === "textarea" || (E.key === "Delete" || E.key === "Backspace") && B.value.length > 0 && SA((O = h()) == null ? void 0 : O.id);
13159
13159
  }, { handleMouseWheel: se, handleInputChange: We, adjustRotation: Wt } = VF(B, l, s), ot = () => {
13160
13160
  setTimeout(() => {
13161
13161
  const E = document.querySelector(".center-container");
@@ -13177,7 +13177,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13177
13177
  };
13178
13178
  CA(() => t.templateType, async (E) => {
13179
13179
  try {
13180
- await me(E), Q(), d.value.clear(), h.value.clear(), console.log("配置切换成功:", E);
13180
+ await me(E), p(), d.value.clear(), U.value.clear(), console.log("配置切换成功:", E);
13181
13181
  } catch (w) {
13182
13182
  console.error("配置切换失败:", w);
13183
13183
  }
@@ -13211,7 +13211,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13211
13211
  const E = SF(r.value.graphData) || "";
13212
13212
  E && ((w = document.querySelector("#design")) == null || w.appendChild(E));
13213
13213
  }, Ei = () => new Promise((E, w) => {
13214
- Q(), JSON.parse(JSON.stringify(a.value));
13214
+ p(), JSON.parse(JSON.stringify(a.value));
13215
13215
  const O = JSON.parse(JSON.stringify(a.value));
13216
13216
  O == null || O.forEach((K) => {
13217
13217
  var J, Y;
@@ -13287,7 +13287,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13287
13287
  getJson: () => HA().then(() => Tr()),
13288
13288
  // 清空画布
13289
13289
  clear: () => {
13290
- a.value = [], Q();
13290
+ a.value = [], p();
13291
13291
  },
13292
13292
  // 生成快照
13293
13293
  snapshot: () => HA().then(() => Ei())
@@ -13351,7 +13351,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13351
13351
  }, ["prevent"])),
13352
13352
  onPointerdown: hA
13353
13353
  }, [
13354
- I(p) && I(F) ? (V(), N("div", fR, [
13354
+ I(Q) && I(F) ? (V(), N("div", fR, [
13355
13355
  m("div", {
13356
13356
  class: "drag-extend-line vertical",
13357
13357
  style: $(P(I(F), "left"))
@@ -13397,9 +13397,9 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13397
13397
  style: $(rA(R)),
13398
13398
  "data-item-id": R.id,
13399
13399
  onMousedown: ZA((nA) => gA(nA, R), ["stop"]),
13400
- onClick: ZA((nA) => I(U)(R), ["stop"])
13400
+ onClick: ZA((nA) => I(g)(R), ["stop"])
13401
13401
  }, [
13402
- I(g)() === R ? (V(), N(TA, { key: 0 }, [
13402
+ I(h)() === R ? (V(), N(TA, { key: 0 }, [
13403
13403
  R.props.lockAspectRatio ? tA("", !0) : (V(), N(TA, { key: 0 }, [
13404
13404
  R.type !== "verline" && R.type !== "horline" ? (V(), N("div", {
13405
13405
  key: 0,
@@ -13467,7 +13467,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13467
13467
  ], 64)) : tA("", !0),
13468
13468
  R.props && ae.value ? (V(), yA(cr(((sA = _(R.type)) == null ? void 0 : sA.component) || null), {
13469
13469
  key: `${R.id}-${R.type}`,
13470
- modelValue: { ...R.props, __selected: I(g)() === R },
13470
+ modelValue: { ...R.props, __selected: I(h)() === R },
13471
13471
  propsConfig: EA.value,
13472
13472
  "onUpdate:modelValue": (nA) => {
13473
13473
  const { __selected: De, ...Je } = nA;
@@ -13494,12 +13494,12 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13494
13494
  }, "-"),
13495
13495
  YA(m("input", {
13496
13496
  type: "number",
13497
- "onUpdate:modelValue": w[3] || (w[3] = (R) => I(g)().props.x = R),
13497
+ "onUpdate:modelValue": w[3] || (w[3] = (R) => I(h)().props.x = R),
13498
13498
  onInput: w[4] || (w[4] = (R) => I(We)("x", R.target.value))
13499
13499
  }, null, 544), [
13500
13500
  [
13501
13501
  Ge,
13502
- I(g)().props.x,
13502
+ I(h)().props.x,
13503
13503
  void 0,
13504
13504
  { number: !0 }
13505
13505
  ]
@@ -13517,12 +13517,12 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13517
13517
  }, "-"),
13518
13518
  YA(m("input", {
13519
13519
  type: "number",
13520
- "onUpdate:modelValue": w[7] || (w[7] = (R) => I(g)().props.y = R),
13520
+ "onUpdate:modelValue": w[7] || (w[7] = (R) => I(h)().props.y = R),
13521
13521
  onInput: w[8] || (w[8] = (R) => I(We)("y", R.target.value))
13522
13522
  }, null, 544), [
13523
13523
  [
13524
13524
  Ge,
13525
- I(g)().props.y,
13525
+ I(h)().props.y,
13526
13526
  void 0,
13527
13527
  { number: !0 }
13528
13528
  ]
@@ -13532,7 +13532,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13532
13532
  }, "+")
13533
13533
  ])
13534
13534
  ]),
13535
- I(g)().type !== "verline" ? (V(), N("div", NR, [
13535
+ I(h)().type !== "verline" ? (V(), N("div", NR, [
13536
13536
  w[27] || (w[27] = m("label", null, "宽度:", -1)),
13537
13537
  m("div", SR, [
13538
13538
  m("button", {
@@ -13540,12 +13540,12 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13540
13540
  }, "-"),
13541
13541
  YA(m("input", {
13542
13542
  type: "number",
13543
- "onUpdate:modelValue": w[11] || (w[11] = (R) => I(g)().props.width = R),
13543
+ "onUpdate:modelValue": w[11] || (w[11] = (R) => I(h)().props.width = R),
13544
13544
  onInput: w[12] || (w[12] = (R) => I(We)("width", R.target.value))
13545
13545
  }, null, 544), [
13546
13546
  [
13547
13547
  Ge,
13548
- I(g)().props.width,
13548
+ I(h)().props.width,
13549
13549
  void 0,
13550
13550
  { number: !0 }
13551
13551
  ]
@@ -13555,7 +13555,7 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13555
13555
  }, "+")
13556
13556
  ])
13557
13557
  ])) : tA("", !0),
13558
- I(g)().type !== "horline" ? (V(), N("div", MR, [
13558
+ I(h)().type !== "horline" ? (V(), N("div", MR, [
13559
13559
  w[28] || (w[28] = m("label", null, "高度:", -1)),
13560
13560
  m("div", bR, [
13561
13561
  m("button", {
@@ -13563,12 +13563,12 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13563
13563
  }, "-"),
13564
13564
  YA(m("input", {
13565
13565
  type: "number",
13566
- "onUpdate:modelValue": w[15] || (w[15] = (R) => I(g)().props.height = R),
13566
+ "onUpdate:modelValue": w[15] || (w[15] = (R) => I(h)().props.height = R),
13567
13567
  onInput: w[16] || (w[16] = (R) => I(We)("height", R.target.value))
13568
13568
  }, null, 544), [
13569
13569
  [
13570
13570
  Ge,
13571
- I(g)().props.height,
13571
+ I(h)().props.height,
13572
13572
  void 0,
13573
13573
  { number: !0 }
13574
13574
  ]
@@ -13586,12 +13586,12 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13586
13586
  }, "-"),
13587
13587
  YA(m("input", {
13588
13588
  type: "number",
13589
- "onUpdate:modelValue": w[19] || (w[19] = (R) => I(g)().props.rotation = R),
13589
+ "onUpdate:modelValue": w[19] || (w[19] = (R) => I(h)().props.rotation = R),
13590
13590
  onInput: w[20] || (w[20] = (R) => I(We)("rotation", R.target.value))
13591
13591
  }, null, 544), [
13592
13592
  [
13593
13593
  Ge,
13594
- I(g)().props.rotation,
13594
+ I(h)().props.rotation,
13595
13595
  void 0,
13596
13596
  { number: !0 }
13597
13597
  ]
@@ -13601,23 +13601,23 @@ const nR = { class: "label-designer" }, aR = { class: "toolbar" }, oR = { class:
13601
13601
  }, "+")
13602
13602
  ])
13603
13603
  ]),
13604
- I(g)().type !== "horline" ? (V(), N("div", ZR, [
13604
+ I(h)().type !== "horline" ? (V(), N("div", ZR, [
13605
13605
  w[30] || (w[30] = m("label", null, "锁定宽高比:", -1)),
13606
13606
  m("div", kR, [
13607
13607
  W(J, {
13608
- modelValue: I(g)().props.lockAspectRatio,
13609
- "onUpdate:modelValue": w[22] || (w[22] = (R) => I(g)().props.lockAspectRatio = R),
13608
+ modelValue: I(h)().props.lockAspectRatio,
13609
+ "onUpdate:modelValue": w[22] || (w[22] = (R) => I(h)().props.lockAspectRatio = R),
13610
13610
  "active-value": !0,
13611
13611
  "inactive-value": !1
13612
13612
  }, null, 8, ["modelValue"])
13613
13613
  ])
13614
13614
  ])) : tA("", !0)
13615
13615
  ]),
13616
- (V(), yA(cr(((eA = _(I(g)().type)) == null ? void 0 : eA.propertyPanel) || null), {
13617
- modelValue: I(g)().props,
13618
- "onUpdate:modelValue": w[23] || (w[23] = (R) => I(g)().props = R),
13616
+ (V(), yA(cr(((eA = _(I(h)().type)) == null ? void 0 : eA.propertyPanel) || null), {
13617
+ modelValue: I(h)().props,
13618
+ "onUpdate:modelValue": w[23] || (w[23] = (R) => I(h)().props = R),
13619
13619
  options: e.options,
13620
- "props-config": oa(I(g)().type)
13620
+ "props-config": oa(I(h)().type)
13621
13621
  }, null, 8, ["modelValue", "options", "props-config"]))
13622
13622
  ], 64)) : tA("", !0)
13623
13623
  ])
@@ -13645,13 +13645,13 @@ const DR = {
13645
13645
  }
13646
13646
  },
13647
13647
  setup(e) {
13648
- const A = qe(), t = e, r = k(!1), n = k({}), a = k(), o = k(0), i = k(!1), l = (B, U) => {
13649
- let g;
13650
- return function(...p) {
13651
- const F = () => {
13652
- clearTimeout(g), B(...p);
13648
+ const A = qe(), t = e, r = k(!1), n = k({}), a = k(), o = k(0), i = k(!1), l = (g, h) => {
13649
+ let p;
13650
+ return function(...F) {
13651
+ const v = () => {
13652
+ clearTimeout(p), g(...F);
13653
13653
  };
13654
- clearTimeout(g), g = setTimeout(F, U);
13654
+ clearTimeout(p), p = setTimeout(v, h);
13655
13655
  };
13656
13656
  }, s = k({
13657
13657
  rectTop: 0,
@@ -13659,37 +13659,37 @@ const DR = {
13659
13659
  }), c = () => {
13660
13660
  if (!a.value)
13661
13661
  return;
13662
- const B = a.value.getBoundingClientRect(), U = d(a.value);
13663
- let g = 0;
13664
- if (B.top > 0)
13665
- g = B.top;
13666
- else if (U) {
13667
- const Q = h(a.value);
13668
- g = Q > 0 ? Q : 60;
13662
+ const g = a.value.getBoundingClientRect(), h = d(a.value);
13663
+ let p = 0;
13664
+ if (g.top > 0)
13665
+ p = g.top;
13666
+ else if (h) {
13667
+ const Q = U(a.value);
13668
+ p = Q > 0 ? Q : 60;
13669
13669
  } else {
13670
13670
  const Q = a.value.offsetTop;
13671
- Q > 0 ? g = Q : g = 60;
13671
+ Q > 0 ? p = Q : p = 60;
13672
13672
  }
13673
- (g !== s.value.rectTop || U !== s.value.isInModal) && (o.value = g, i.value = U, s.value = {
13674
- rectTop: g,
13675
- isInModal: U
13673
+ (p !== s.value.rectTop || h !== s.value.isInModal) && (o.value = p, i.value = h, s.value = {
13674
+ rectTop: p,
13675
+ isInModal: h
13676
13676
  });
13677
- }, u = l(c, 100), d = (B) => {
13678
- let U = B.parentElement;
13679
- for (; U; ) {
13680
- if (U.classList && (U.classList.contains("el-dialog") || U.classList.contains("el-drawer") || U.classList.contains("sc-dialog")))
13677
+ }, u = l(c, 100), d = (g) => {
13678
+ let h = g.parentElement;
13679
+ for (; h; ) {
13680
+ if (h.classList && (h.classList.contains("el-dialog") || h.classList.contains("el-drawer") || h.classList.contains("sc-dialog")))
13681
13681
  return !0;
13682
- U = U.parentElement;
13682
+ h = h.parentElement;
13683
13683
  }
13684
13684
  return !1;
13685
- }, h = (B) => {
13686
- let U = B.parentElement;
13687
- for (; U; ) {
13688
- if (U.classList && (U.classList.contains("el-dialog") || U.classList.contains("el-drawer") || U.classList.contains("sc-dialog"))) {
13689
- const g = U.getBoundingClientRect();
13690
- return g.top > 0 ? g.top : 60;
13685
+ }, U = (g) => {
13686
+ let h = g.parentElement;
13687
+ for (; h; ) {
13688
+ if (h.classList && (h.classList.contains("el-dialog") || h.classList.contains("el-drawer") || h.classList.contains("sc-dialog"))) {
13689
+ const p = h.getBoundingClientRect();
13690
+ return p.top > 0 ? p.top : 60;
13691
13691
  }
13692
- U = U.parentElement;
13692
+ h = h.parentElement;
13693
13693
  }
13694
13694
  return 60;
13695
13695
  };
@@ -13697,32 +13697,56 @@ const DR = {
13697
13697
  setTimeout(() => c(), 100), setTimeout(() => c(), 300), window.addEventListener("resize", u), Ur(() => {
13698
13698
  window.removeEventListener("resize", u);
13699
13699
  });
13700
- }), CA(() => r.value, (B) => {
13701
- B && ue(() => setTimeout(() => c(), 50));
13702
- }), CA(() => t.templateData, async (B) => {
13703
- r.value = (B == null ? void 0 : B.width) > 0 && (B == null ? void 0 : B.height) > 0, n.value = B;
13704
- }, { deep: !0, immediate: !0 });
13705
- function f(B) {
13706
- A.exposed = B || {}, A.exposeProxy = B || {};
13700
+ }), CA(() => r.value, (g) => {
13701
+ g && ue(() => setTimeout(() => c(), 50));
13702
+ }), CA(() => t.templateData, (g) => f(g), { deep: !0, immediate: !0 });
13703
+ function f(g) {
13704
+ if (r.value = (g == null ? void 0 : g.width) > 0 && (g == null ? void 0 : g.height) > 0, !r.value)
13705
+ return;
13706
+ const h = { ...g };
13707
+ h != null && h.graphData || Object.assign(h, {
13708
+ graphData: {
13709
+ printList: [{
13710
+ x: 0,
13711
+ y: 0,
13712
+ width: g.width,
13713
+ height: g.height,
13714
+ topLeftRadius: 4,
13715
+ topRightRadius: 4,
13716
+ bottomLeftRadius: 4,
13717
+ bottomRightRadius: 4
13718
+ }],
13719
+ punchingList: []
13720
+ }
13721
+ }), h != null && h.items || Object.assign(h, {
13722
+ items: []
13723
+ }), h.printWidth || Object.assign(h, {
13724
+ printWidth: h.width
13725
+ }), h.printHeight || Object.assign(h, {
13726
+ printHeight: h.height
13727
+ }), n.value = h;
13728
+ }
13729
+ function B(g) {
13730
+ A.exposed = g || {}, A.exposeProxy = g || {};
13707
13731
  }
13708
- return (B, U) => {
13709
- const g = $u("loading");
13732
+ return (g, h) => {
13733
+ const p = $u("loading");
13710
13734
  return YA((V(), N("div", {
13711
13735
  ref_key: "templateDesignerRef",
13712
13736
  ref: a,
13713
13737
  class: _A(["template-designer", { "template-designer-border-top": i.value }]),
13714
13738
  style: $({ height: "calc(100vh - " + (o.value + 1) + "px)" })
13715
13739
  }, [
13716
- r.value ? (V(), yA(cr(Ad(WR, { ...B.$attrs, ...t, ref: f }, B.$slots)), {
13740
+ r.value ? (V(), yA(cr(Ad(WR, { ...g.$attrs, ...t, ref: B }, g.$slots)), {
13717
13741
  key: 0,
13718
13742
  "template-info": n.value
13719
13743
  }, null, 8, ["template-info"])) : tA("", !0)
13720
13744
  ], 6)), [
13721
- [g, !r.value]
13745
+ [p, !r.value]
13722
13746
  ]);
13723
13747
  };
13724
13748
  }
13725
- }, La = /* @__PURE__ */ RA(DR, [["__scopeId", "data-v-300f49ad"]]);
13749
+ }, La = /* @__PURE__ */ RA(DR, [["__scopeId", "data-v-7efcb65e"]]);
13726
13750
  La.install = (e) => {
13727
13751
  e.component(La.name || "TemplateDesigner", La);
13728
13752
  };