easy-email-pro-kit 1.34.0 → 1.34.2

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.
package/lib/index.es.js CHANGED
@@ -9,7 +9,7 @@ var Wt = (e, n, d) => n in e ? yn(e, n, { enumerable: !0, configurable: !0, writ
9
9
  for (var d of it(n))
10
10
  Yt.call(n, d) && Wt(e, d, n[d]);
11
11
  return e;
12
- }, He = (e, n) => fn(e, wn(n));
12
+ }, Ue = (e, n) => fn(e, wn(n));
13
13
  var ft = (e, n) => {
14
14
  var d = {};
15
15
  for (var p in e)
@@ -20,25 +20,25 @@ var ft = (e, n) => {
20
20
  return d;
21
21
  };
22
22
  var Se = (e, n, d) => new Promise((p, f) => {
23
- var M = (u) => {
23
+ var w = (u) => {
24
24
  try {
25
25
  a(d.next(u));
26
- } catch (w) {
27
- f(w);
26
+ } catch (M) {
27
+ f(M);
28
28
  }
29
29
  }, m = (u) => {
30
30
  try {
31
31
  a(d.throw(u));
32
- } catch (w) {
33
- f(w);
32
+ } catch (M) {
33
+ f(M);
34
34
  }
35
- }, a = (u) => u.done ? p(u.value) : Promise.resolve(u.value).then(M, m);
35
+ }, a = (u) => u.done ? p(u.value) : Promise.resolve(u.value).then(w, m);
36
36
  a((d = d.apply(e, n)).next());
37
37
  });
38
38
  import { createCustomBlock as qe, t as X, mergeBlock as $e, ElementCategory as et, NodeUtils as Mn, components as qt, ElementPlugin as tt, BlockManager as nt } from "easy-email-pro-core";
39
- import { AttributesPanelWrapper as rt, ResponsiveTabs as Lt, useEditorContext as Je, CollapseWrapper as Re, AttributeField as R, ResponsiveField as B, previewLoadImage as $t, useElementInteract as xn, ConfigPanelsMap as ot } from "easy-email-pro-theme";
39
+ import { AttributesPanelWrapper as rt, ResponsiveTabs as Lt, useEditorContext as He, CollapseWrapper as Re, AttributeField as R, ResponsiveField as B, previewLoadImage as $t, useElementInteract as xn, ConfigPanelsMap as ot } from "easy-email-pro-theme";
40
40
  import { cloneDeep as De, flatMap as Tn, get as en, isEqual as _e, set as Ge, merge as vn } from "lodash";
41
- import h, { useState as Fe, useEffect as Ue, useRef as zt, useMemo as Sn, useCallback as Ct } from "react";
41
+ import h, { useState as Fe, useEffect as Je, useRef as zt, useMemo as Sn, useCallback as Ct } from "react";
42
42
  import { Collapse as ue, Button as ct, Message as dt, Grid as je, Divider as wt, Radio as Mt, Form as Zn, Space as Nn, InputNumber as Kt } from "@arco-design/web-react";
43
43
  import { ActiveTabKeys as de, useEditorProps as ut, useSelectedNode as ke, useEditorState as mt } from "easy-email-pro-editor";
44
44
  import { useSlate as Et, ReactEditor as tn } from "slate-react";
@@ -74,14 +74,14 @@ function Ln(e) {
74
74
  case "day":
75
75
  p = 60 * 60 * 24 * p;
76
76
  }
77
- const { day: f, hour: M, minute: m, second: a } = nn(p), u = [
77
+ const { day: f, hour: w, minute: m, second: a } = nn(p), u = [
78
78
  {
79
79
  unit: "days",
80
80
  value: f
81
81
  },
82
82
  {
83
83
  unit: "hrs",
84
- value: M
84
+ value: w
85
85
  },
86
86
  {
87
87
  unit: "mins",
@@ -109,10 +109,10 @@ function Ln(e) {
109
109
  paddingBottom: 15
110
110
  }
111
111
  },
112
- u.map((w, x) => /* @__PURE__ */ h.createElement(
112
+ u.map((M, x) => /* @__PURE__ */ h.createElement(
113
113
  "div",
114
114
  {
115
- key: w.unit,
115
+ key: M.unit,
116
116
  style: {
117
117
  display: "flex",
118
118
  alignItems: "center",
@@ -135,12 +135,12 @@ function Ln(e) {
135
135
  fontSize: 24
136
136
  }
137
137
  },
138
- /* @__PURE__ */ h.createElement("div", { style: { height: "100%", overflow: "hidden" } }, /* @__PURE__ */ h.createElement("div", { className: w.unit }, w.value))
138
+ /* @__PURE__ */ h.createElement("div", { style: { height: "100%", overflow: "hidden" } }, /* @__PURE__ */ h.createElement("div", { className: M.unit }, M.value))
139
139
  ),
140
140
  x !== u.length - 1 && /* @__PURE__ */ h.createElement(
141
141
  "div",
142
142
  {
143
- key: w.unit,
143
+ key: M.unit,
144
144
  style: { margin: "0px 10px", fontWeight: "bold" }
145
145
  },
146
146
  ":"
@@ -156,10 +156,10 @@ function Ln(e) {
156
156
  paddingBottom: 10
157
157
  }
158
158
  },
159
- u.map((w, x) => /* @__PURE__ */ h.createElement(
159
+ u.map((M, x) => /* @__PURE__ */ h.createElement(
160
160
  "div",
161
161
  {
162
- key: w.unit,
162
+ key: M.unit,
163
163
  style: {
164
164
  display: "flex",
165
165
  alignItems: "center",
@@ -169,7 +169,7 @@ function Ln(e) {
169
169
  /* @__PURE__ */ h.createElement(
170
170
  "div",
171
171
  {
172
- key: w.unit,
172
+ key: M.unit,
173
173
  style: {
174
174
  width: 50,
175
175
  display: "flex",
@@ -180,7 +180,7 @@ function Ln(e) {
180
180
  textAlign: "center"
181
181
  }
182
182
  },
183
- w.unit
183
+ M.unit
184
184
  ),
185
185
  x !== u.length - 1 && /* @__PURE__ */ h.createElement(
186
186
  "div",
@@ -267,18 +267,18 @@ const { SlateNodePlaceholder: En } = qt, xt = {
267
267
  mode: d,
268
268
  context: { content: p },
269
269
  displayMode: f
270
- } = e, { attributes: M, children: m } = n;
270
+ } = e, { attributes: w, children: m } = n;
271
271
  if (d === "testing") {
272
272
  const a = parseInt(p.attributes.width || "600"), u = f === "only-mobile" ? 375 / a : 1;
273
273
  return /* @__PURE__ */ h.createElement("mj-section", { padding: "0px" }, /* @__PURE__ */ h.createElement("mj-column", { padding: "0px" }, /* @__PURE__ */ h.createElement("div", null, /* @__PURE__ */ h.createElement(
274
274
  "div",
275
275
  {
276
276
  style: {
277
- backgroundColor: M["background-color"],
278
- paddingBottom: M["padding-bottom"],
279
- paddingTop: M["padding-top"],
280
- paddingLeft: M["padding-left"],
281
- paddingRight: M["padding-right"],
277
+ backgroundColor: w["background-color"],
278
+ paddingBottom: w["padding-bottom"],
279
+ paddingTop: w["padding-top"],
280
+ paddingLeft: w["padding-left"],
281
+ paddingRight: w["padding-right"],
282
282
  fontSize: "0px",
283
283
  lineHeight: 1,
284
284
  zoom: u
@@ -293,7 +293,7 @@ const { SlateNodePlaceholder: En } = qt, xt = {
293
293
  display: "table"
294
294
  }
295
295
  },
296
- m.map((w, x) => Mn.isElement(w) ? /* @__PURE__ */ h.createElement(En, { key: x, node: w }) : null),
296
+ m.map((M, x) => Mn.isElement(M) ? /* @__PURE__ */ h.createElement(En, { key: x, node: M }) : null),
297
297
  /* @__PURE__ */ h.createElement("mj-spacer", { height: "20px" }),
298
298
  /* @__PURE__ */ h.createElement(Ln, { attributes: n.attributes, data: n.data })
299
299
  )
@@ -301,7 +301,7 @@ const { SlateNodePlaceholder: En } = qt, xt = {
301
301
  }
302
302
  return /* @__PURE__ */ h.createElement(
303
303
  "mj-image",
304
- He(fe({}, e.node.attributes), {
304
+ Ue(fe({}, e.node.attributes), {
305
305
  "padding-bottom": "0px",
306
306
  "padding-top": "0px",
307
307
  "padding-left": "0px",
@@ -361,14 +361,14 @@ const { SlateNodePlaceholder: En } = qt, xt = {
361
361
  "border-enabled": d,
362
362
  "border-width": p,
363
363
  "border-style": f,
364
- "border-color": M
364
+ "border-color": w
365
365
  } = u, m = ft(u, [
366
366
  "border-enabled",
367
367
  "border-width",
368
368
  "border-style",
369
369
  "border-color"
370
- ]), a = d ? `${p || "1px"} ${f || "solid"} ${M || "#AAAAAA"}` : "";
371
- return /* @__PURE__ */ h.createElement("mj-image", He(fe({}, m), { border: a }));
370
+ ]), a = d ? `${p || "1px"} ${f || "solid"} ${w || "#AAAAAA"}` : "";
371
+ return /* @__PURE__ */ h.createElement("mj-image", Ue(fe({}, m), { border: a }));
372
372
  }
373
373
  }), Tt = {
374
374
  attributes: {
@@ -505,7 +505,7 @@ const { SlateNodePlaceholder: En } = qt, xt = {
505
505
  mode: d,
506
506
  context: { content: p },
507
507
  displayMode: f
508
- } = e, { data: M, attributes: m } = n;
508
+ } = e, { data: w, attributes: m } = n;
509
509
  if (d === "testing") {
510
510
  const a = parseInt(
511
511
  m.width || p.attributes.width || "600"
@@ -517,10 +517,10 @@ const { SlateNodePlaceholder: En } = qt, xt = {
517
517
  width: "100%"
518
518
  }
519
519
  },
520
- /* @__PURE__ */ h.createElement(Wn, { attributes: m, data: M, scale: u })
520
+ /* @__PURE__ */ h.createElement(Wn, { attributes: m, data: w, scale: u })
521
521
  )))));
522
522
  }
523
- return /* @__PURE__ */ h.createElement("mj-image", fe({}, m));
523
+ return /* @__PURE__ */ h.createElement("mj-image", Ue(fe({}, m), { href: w["video-link"] }));
524
524
  }
525
525
  }), { SlateNodePlaceholder: st } = qt, St = {
526
526
  attributes: {
@@ -582,11 +582,11 @@ const { SlateNodePlaceholder: En } = qt, xt = {
582
582
  const { node: n } = e, z = De(n.attributes), {
583
583
  "border-enabled": p,
584
584
  "border-width": f,
585
- "border-style": M,
585
+ "border-style": w,
586
586
  "border-color": m,
587
587
  "vertical-align": a = "top",
588
588
  "first-column-width": u = 50
589
- } = z, w = ft(z, [
589
+ } = z, M = ft(z, [
590
590
  "border-enabled",
591
591
  "border-width",
592
592
  "border-style",
@@ -594,9 +594,9 @@ const { SlateNodePlaceholder: En } = qt, xt = {
594
594
  "vertical-align",
595
595
  "first-column-width"
596
596
  ]);
597
- w["background-image-enabled"] || (delete w["background-image-enabled"], w["background-url"] = "");
598
- const x = p ? `${f || "1px"} ${M || "solid"} ${m || "#AAAAAA"}` : "", Y = n.children[0], G = n.children[1];
599
- return n.data.stackOnMobile ? /* @__PURE__ */ h.createElement("mj-section", He(fe({}, w), { border: x }), /* @__PURE__ */ h.createElement(
597
+ M["background-image-enabled"] || (delete M["background-image-enabled"], M["background-url"] = "");
598
+ const x = p ? `${f || "1px"} ${w || "solid"} ${m || "#AAAAAA"}` : "", Y = n.children[0], G = n.children[1];
599
+ return n.data.stackOnMobile ? /* @__PURE__ */ h.createElement("mj-section", Ue(fe({}, M), { border: x }), /* @__PURE__ */ h.createElement(
600
600
  "mj-column",
601
601
  {
602
602
  width: u + "%",
@@ -610,7 +610,7 @@ const { SlateNodePlaceholder: En } = qt, xt = {
610
610
  "vertical-align": a
611
611
  },
612
612
  /* @__PURE__ */ h.createElement(st, { node: G })
613
- )) : /* @__PURE__ */ h.createElement("mj-section", He(fe({}, w), { border: x }), /* @__PURE__ */ h.createElement("mj-group", null, /* @__PURE__ */ h.createElement(
613
+ )) : /* @__PURE__ */ h.createElement("mj-section", Ue(fe({}, M), { border: x }), /* @__PURE__ */ h.createElement("mj-group", null, /* @__PURE__ */ h.createElement(
614
614
  "mj-column",
615
615
  {
616
616
  width: u + "%",
@@ -635,8 +635,8 @@ const { SlateNodePlaceholder: En } = qt, xt = {
635
635
  const n = new Image();
636
636
  return n.crossOrigin = "anonymous", new Promise((d, p) => {
637
637
  n.onload = () => {
638
- const f = n.width, M = n.height;
639
- Ae.width = f, Ae.height = M, Be.clearRect(0, 0, f, M), Be.drawImage(n, 0, 0), d(Ae.toDataURL());
638
+ const f = n.width, w = n.height;
639
+ Ae.width = f, Ae.height = w, Be.clearRect(0, 0, f, w), Be.drawImage(n, 0, 0), d(Ae.toDataURL());
640
640
  }, n.onerror = p, n.src = e.src;
641
641
  });
642
642
  }), Yn = (e) => new Promise((n) => {
@@ -686,12 +686,12 @@ function on(e) {
686
686
  }
687
687
  const an = function(d) {
688
688
  return Se(this, arguments, function* (e, n = {}) {
689
- const p = n.width || e.offsetWidth, f = n.height || e.offsetHeight, { overwrite: M = [], wrapper: m = (x) => x } = n, a = on(e);
689
+ const p = n.width || e.offsetWidth, f = n.height || e.offsetHeight, { overwrite: w = [], wrapper: m = (x) => x } = n, a = on(e);
690
690
  if (a.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), a.classList.remove("outline"), n.styleText) {
691
691
  const x = document.createElement("style");
692
692
  x.innerHTML = n.styleText, a.appendChild(x);
693
693
  }
694
- M.forEach((x) => {
694
+ w.forEach((x) => {
695
695
  if (x.selector === "" && x instanceof HTMLElement) {
696
696
  const Y = x.style;
697
697
  Object.keys(x.style).forEach((G) => {
@@ -716,8 +716,8 @@ const an = function(d) {
716
716
  }))
717
717
  );
718
718
  const u = new XMLSerializer().serializeToString(m(a));
719
- let w = 'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="' + p + '" height="' + f + '"><foreignObject x="0" y="0" width="100%" height="100%">' + u + "</foreignObject></svg>";
720
- return w = w.replace(/\n/g, "").replace(/\t/g, "").replace(/#/g, "%23"), w;
719
+ let M = 'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="' + p + '" height="' + f + '"><foreignObject x="0" y="0" width="100%" height="100%">' + u + "</foreignObject></svg>";
720
+ return M = M.replace(/\n/g, "").replace(/\t/g, "").replace(/#/g, "%23"), M;
721
721
  });
722
722
  };
723
723
  var Xn = Object.defineProperty, On = Object.defineProperties, Vn = Object.getOwnPropertyDescriptors, Ft = Object.getOwnPropertySymbols, jn = Object.prototype.hasOwnProperty, Pn = Object.prototype.propertyIsEnumerable, Ze = Math.pow, Rt = (e, n, d) => n in e ? Xn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[n] = d, We = (e, n) => {
@@ -728,19 +728,19 @@ var Xn = Object.defineProperty, On = Object.defineProperties, Vn = Object.getOwn
728
728
  Pn.call(n, d) && Rt(e, d, n[d]);
729
729
  return e;
730
730
  }, Qe = (e, n) => On(e, Vn(n)), Ee = (e, n, d) => new Promise((p, f) => {
731
- var M = (u) => {
731
+ var w = (u) => {
732
732
  try {
733
733
  a(d.next(u));
734
- } catch (w) {
735
- f(w);
734
+ } catch (M) {
735
+ f(M);
736
736
  }
737
737
  }, m = (u) => {
738
738
  try {
739
739
  a(d.throw(u));
740
- } catch (w) {
741
- f(w);
740
+ } catch (M) {
741
+ f(M);
742
742
  }
743
- }, a = (u) => u.done ? p(u.value) : Promise.resolve(u.value).then(M, m);
743
+ }, a = (u) => u.done ? p(u.value) : Promise.resolve(u.value).then(w, m);
744
744
  a((d = d.apply(e, n)).next());
745
745
  });
746
746
  const An = typeof window < "u", ae = 65536 - 1, Pe = ae * ae, Fn = 512 - 1, Zt = [
@@ -1531,11 +1531,11 @@ function Ce(e, n) {
1531
1531
  return (e ^ n) < 0 ? (e - n / 2) / n : (e + n / 2) / n;
1532
1532
  }
1533
1533
  function sn(e) {
1534
- const n = Zt[e >> 16 & 255], d = Zt[e >> 8 & 255], p = Zt[e & 255], f = (27015 * n + 35149 * d + 3372 * p + ae / 2) / ae, M = (13887 * n + 44610 * d + 7038 * p + ae / 2) / ae, m = (5787 * n + 18462 * d + 41286 * p + ae / 2) / ae, a = Nt(f), u = Nt(M), w = Nt(m);
1534
+ const n = Zt[e >> 16 & 255], d = Zt[e >> 8 & 255], p = Zt[e & 255], f = (27015 * n + 35149 * d + 3372 * p + ae / 2) / ae, w = (13887 * n + 44610 * d + 7038 * p + ae / 2) / ae, m = (5787 * n + 18462 * d + 41286 * p + ae / 2) / ae, a = Nt(f), u = Nt(w), M = Nt(m);
1535
1535
  return [
1536
- Ce(13792 * a + 52010 * u - 267 * w, ae),
1537
- Ce(129628 * a - 159158 * u + 29530 * w, ae),
1538
- Ce(1698 * a + 51299 * u - 52997 * w, ae)
1536
+ Ce(13792 * a + 52010 * u - 267 * M, ae),
1537
+ Ce(129628 * a - 159158 * u + 29530 * M, ae),
1538
+ Ce(1698 * a + 51299 * u - 52997 * M, ae)
1539
1539
  ];
1540
1540
  }
1541
1541
  function It(e) {
@@ -1544,17 +1544,17 @@ function It(e) {
1544
1544
  if (e >= ae)
1545
1545
  return 255;
1546
1546
  {
1547
- const n = e * Fn, d = ~~(n / ae), p = n % ae, f = Ut[d], M = Ut[d + 1];
1548
- return (p * (M - f) + ae / 2) / ae + f;
1547
+ const n = e * Fn, d = ~~(n / ae), p = n % ae, f = Ut[d], w = Ut[d + 1];
1548
+ return (p * (w - f) + ae / 2) / ae + f;
1549
1549
  }
1550
1550
  }
1551
1551
  function Rn(e) {
1552
- const n = e[0] + Ce(25974 * e[1], ae) + Ce(14143 * e[2], ae), d = e[0] + Ce(-6918 * e[1], ae) + Ce(-4185 * e[2], ae), p = e[0] + Ce(-5864 * e[1], ae) + Ce(-84638 * e[2], ae), f = Ze(n, 2) * n / Pe, M = Ze(d, 2) * d / Pe, m = Ze(p, 2) * p / Pe, a = It((267169 * f + -216771 * M + 15137 * m + ae / 2) / ae), u = It((-83127 * f + 171030 * M + -22368 * m + ae / 2) / ae), w = It((-275 * f + -46099 * M + 111909 * m + ae / 2) / ae);
1553
- return a << 16 | u << 8 | w;
1552
+ const n = e[0] + Ce(25974 * e[1], ae) + Ce(14143 * e[2], ae), d = e[0] + Ce(-6918 * e[1], ae) + Ce(-4185 * e[2], ae), p = e[0] + Ce(-5864 * e[1], ae) + Ce(-84638 * e[2], ae), f = Ze(n, 2) * n / Pe, w = Ze(d, 2) * d / Pe, m = Ze(p, 2) * p / Pe, a = It((267169 * f + -216771 * w + 15137 * m + ae / 2) / ae), u = It((-83127 * f + 171030 * w + -22368 * m + ae / 2) / ae), M = It((-275 * f + -46099 * w + 111909 * m + ae / 2) / ae);
1553
+ return a << 16 | u << 8 | M;
1554
1554
  }
1555
1555
  function Un(e) {
1556
- const n = { l: 0, a: 1, b: 2 }, d = e[0], p = e[1], f = e[2], M = n[d], m = n[p], a = n[f];
1557
- return (u, w) => u.oklab[M] - w.oklab[M] || u.oklab[m] - w.oklab[m] || u.oklab[a] - w.oklab[a];
1556
+ const n = { l: 0, a: 1, b: 2 }, d = e[0], p = e[1], f = e[2], w = n[d], m = n[p], a = n[f];
1557
+ return (u, M) => u.oklab[w] - M.oklab[w] || u.oklab[m] - M.oklab[m] || u.oklab[a] - M.oklab[a];
1558
1558
  }
1559
1559
  function Jn(e, n, d) {
1560
1560
  return e >= n ? n >= d ? "lab" : e >= d ? "lba" : "bla" : e >= d ? "alb" : n >= d ? "abl" : "bal";
@@ -1597,18 +1597,18 @@ function cn(e) {
1597
1597
  finderCache: p
1598
1598
  } = n;
1599
1599
  function f(m, a, u) {
1600
- const { left: w, right: x, longest: Y, oklab: G, colorBoxIndex: z } = d[m], W = Math.min(
1600
+ const { left: M, right: x, longest: Y, oklab: G, colorBoxIndex: z } = d[m], W = Math.min(
1601
1601
  Ze(a[0] - G[0], 2) + Ze(a[1] - G[1], 2) + Ze(a[2] - G[2], 2),
1602
1602
  4294967295 - 1
1603
1603
  );
1604
1604
  W < u.dist && (u.colorBoxIndex = z, u.dist = W);
1605
1605
  let T, O;
1606
- if (w !== -1 || x !== -1) {
1606
+ if (M !== -1 || x !== -1) {
1607
1607
  const _ = a[Y] - G[Y];
1608
- _ <= 0 ? (T = w, O = x) : (T = x, O = w), T !== -1 && f(T, a, u), O !== -1 && Ze(_, 2) < u.dist && f(O, a, u);
1608
+ _ <= 0 ? (T = M, O = x) : (T = x, O = M), T !== -1 && f(T, a, u), O !== -1 && Ze(_, 2) < u.dist && f(O, a, u);
1609
1609
  }
1610
1610
  }
1611
- function M(m) {
1611
+ function w(m) {
1612
1612
  const a = {
1613
1613
  dist: Number.MAX_SAFE_INTEGER,
1614
1614
  colorBoxIndex: -1
@@ -1619,8 +1619,8 @@ function cn(e) {
1619
1619
  const a = m % 32768;
1620
1620
  let u = p.get(a);
1621
1621
  u || (u = /* @__PURE__ */ new Map(), p.set(a, u));
1622
- let w = u.get(m);
1623
- return w !== void 0 || (w = M(sn(m)), u.set(m, w)), w;
1622
+ let M = u.get(m);
1623
+ return M !== void 0 || (M = w(sn(m)), u.set(m, M)), M;
1624
1624
  };
1625
1625
  }
1626
1626
  function _n(e, n) {
@@ -1635,42 +1635,42 @@ function _n(e, n) {
1635
1635
  });
1636
1636
  const f = [];
1637
1637
  for (let m = d.length, a = 0; a < m; a++) {
1638
- const { srgb: u, weight: w } = d[a];
1638
+ const { srgb: u, weight: M } = d[a];
1639
1639
  f.push({
1640
1640
  value: [
1641
1641
  u >> 16 & 255,
1642
1642
  u >> 8 & 255,
1643
1643
  u & 255
1644
1644
  ],
1645
- percentage: w / p
1645
+ percentage: M / p
1646
1646
  });
1647
1647
  }
1648
- let M;
1648
+ let w;
1649
1649
  if (n === "buffer") {
1650
- M = new Uint8ClampedArray(f.length * 4);
1650
+ w = new Uint8ClampedArray(f.length * 4);
1651
1651
  for (let m = f.length, a = 0; a < m; a++) {
1652
- const u = a * 4, w = f[a].value;
1653
- M[u] = w[0], M[u + 1] = w[1], M[u + 2] = w[2], M[u + 3] = 255;
1652
+ const u = a * 4, M = f[a].value;
1653
+ w[u] = M[0], w[u + 1] = M[1], w[u + 2] = M[2], w[u + 3] = 255;
1654
1654
  }
1655
1655
  } else if (n === "hex") {
1656
- M = [];
1656
+ w = [];
1657
1657
  for (let m = f.length, a = 0; a < m; a++) {
1658
- const { value: u, percentage: w } = f[a], x = u[0].toString(16).padStart(2, "0"), Y = u[1].toString(16).padStart(2, "0"), G = u[2].toString(16).padStart(2, "0");
1659
- M.push({
1658
+ const { value: u, percentage: M } = f[a], x = u[0].toString(16).padStart(2, "0"), Y = u[1].toString(16).padStart(2, "0"), G = u[2].toString(16).padStart(2, "0");
1659
+ w.push({
1660
1660
  value: `#${x}${Y}${G}`,
1661
- percentage: w
1661
+ percentage: M
1662
1662
  });
1663
1663
  }
1664
1664
  } else
1665
- M = f;
1666
- return M;
1665
+ w = f;
1666
+ return w;
1667
1667
  }
1668
1668
  function Gt(e, n, d) {
1669
- var p, f, M, m;
1669
+ var p, f, w, m;
1670
1670
  const {
1671
1671
  getContext2d: a,
1672
1672
  previousSample: u,
1673
- skipTransparent: w
1673
+ skipTransparent: M
1674
1674
  } = d, {
1675
1675
  statsMode: x,
1676
1676
  colorSamples: Y,
@@ -1688,7 +1688,7 @@ function Gt(e, n, d) {
1688
1688
  W.push(
1689
1689
  (p = n[O][0]) != null ? p : 0,
1690
1690
  (f = n[O][1]) != null ? f : 0,
1691
- (M = n[O][2]) != null ? M : 0,
1691
+ (w = n[O][2]) != null ? w : 0,
1692
1692
  (m = n[O][3]) != null ? m : 255
1693
1693
  );
1694
1694
  z = new Uint8ClampedArray(W);
@@ -1717,7 +1717,7 @@ function Gt(e, n, d) {
1717
1717
  }
1718
1718
  for (let W = z.length, T = 0; T < W; T += 4) {
1719
1719
  const O = z[T], _ = z[T + 1], ie = z[T + 2], te = z[T + 3];
1720
- if (w && te === 0 || x === "diff" && u && O === u[T] && _ === u[T + 1] && ie === u[T + 2] && te === u[T + 3])
1720
+ if (M && te === 0 || x === "diff" && u && O === u[T] && _ === u[T + 1] && ie === u[T + 2] && te === u[T + 3])
1721
1721
  continue;
1722
1722
  const $ = O << 16 | _ << 8 | ie, P = te * 1e8 + $, L = P % 32768;
1723
1723
  let se = G.get(L);
@@ -1739,15 +1739,15 @@ function Gt(e, n, d) {
1739
1739
  function dn(e, n) {
1740
1740
  const { colorSamples: d } = n, { start: p, end: f } = e;
1741
1741
  e.length = f - p, e.weight = 0;
1742
- const M = [0, 0, 0];
1742
+ const w = [0, 0, 0];
1743
1743
  for (let a = p; a < f; a++) {
1744
1744
  const u = d[a];
1745
- M[0] += u.oklab[0] * u.count, M[1] += u.oklab[1] * u.count, M[2] += u.oklab[2] * u.count, e.weight += u.count;
1745
+ w[0] += u.oklab[0] * u.count, w[1] += u.oklab[1] * u.count, w[2] += u.oklab[2] * u.count, e.weight += u.count;
1746
1746
  }
1747
1747
  e.oklab = [
1748
- M[0] / e.weight,
1749
- M[1] / e.weight,
1750
- M[2] / e.weight
1748
+ w[0] / e.weight,
1749
+ w[1] / e.weight,
1750
+ w[2] / e.weight
1751
1751
  ];
1752
1752
  const m = [0, 0, 0];
1753
1753
  for (let a = p; a < f; a++) {
@@ -1773,14 +1773,14 @@ function Jt(e, n) {
1773
1773
  function qn(e) {
1774
1774
  const { colorBoxes: n } = e, d = [], p = /* @__PURE__ */ new Map();
1775
1775
  for (let m = -1, a = n.length, u = 0; u < a; u++) {
1776
- const { srgb: w } = n[u];
1777
- if (w === m) {
1776
+ const { srgb: M } = n[u];
1777
+ if (M === m) {
1778
1778
  p.set(u, !0);
1779
1779
  continue;
1780
1780
  }
1781
- m = w;
1781
+ m = M;
1782
1782
  }
1783
- M({
1783
+ w({
1784
1784
  min: [-65535, -65535, -65535],
1785
1785
  max: [65535, 65535, 65535]
1786
1786
  });
@@ -1790,10 +1790,10 @@ function qn(e) {
1790
1790
  max: [-65535, -65535, -65535]
1791
1791
  };
1792
1792
  let u = 0;
1793
- const w = [];
1793
+ const M = [];
1794
1794
  for (let W = n.length, T = 0; T < W; T++) {
1795
1795
  const { oklab: O } = n[T];
1796
- p.has(T) || O[0] < m.min[0] || O[1] < m.min[1] || O[2] < m.min[2] || O[0] > m.max[0] || O[1] > m.max[1] || O[2] > m.max[2] || (O[0] < a.min[0] && (a.min[0] = O[0]), O[1] < a.min[1] && (a.min[1] = O[1]), O[2] < a.min[2] && (a.min[2] = O[2]), O[0] > a.max[0] && (a.max[0] = O[0]), O[1] > a.max[1] && (a.max[1] = O[1]), O[2] > a.max[2] && (a.max[2] = O[2]), w[u++] = {
1796
+ p.has(T) || O[0] < m.min[0] || O[1] < m.min[1] || O[2] < m.min[2] || O[0] > m.max[0] || O[1] > m.max[1] || O[2] > m.max[2] || (O[0] < a.min[0] && (a.min[0] = O[0]), O[1] < a.min[1] && (a.min[1] = O[1]), O[2] < a.min[2] && (a.min[2] = O[2]), O[0] > a.max[0] && (a.max[0] = O[0]), O[1] > a.max[1] && (a.max[1] = O[1]), O[2] > a.max[2] && (a.max[2] = O[2]), M[u++] = {
1797
1797
  oklab: O,
1798
1798
  colorBoxIndex: T
1799
1799
  });
@@ -1803,25 +1803,25 @@ function qn(e) {
1803
1803
  return { colorBoxIndex: -1, longest: x };
1804
1804
  const Y = a.max[0] - a.min[0], G = a.max[1] - a.min[1], z = a.max[2] - a.min[2];
1805
1805
  return Y >= G && Y >= z ? x = 0 : z >= Y && z >= G ? x = 2 : G >= Y && G >= z && (x = 1), {
1806
- colorBoxIndex: w.sort((W, T) => W.oklab[x] - T.oklab[x])[u >> 1].colorBoxIndex,
1806
+ colorBoxIndex: M.sort((W, T) => W.oklab[x] - T.oklab[x])[u >> 1].colorBoxIndex,
1807
1807
  longest: x
1808
1808
  };
1809
1809
  }
1810
- function M(m) {
1810
+ function w(m) {
1811
1811
  const { colorBoxIndex: a, longest: u } = f(m);
1812
1812
  if (a < 0)
1813
1813
  return -1;
1814
- const { oklab: w } = n[a], x = {
1814
+ const { oklab: M } = n[a], x = {
1815
1815
  longest: u,
1816
- oklab: w,
1816
+ oklab: M,
1817
1817
  colorBoxIndex: a
1818
1818
  }, Y = d.push(x) - 1;
1819
1819
  p.set(a, !0);
1820
1820
  const G = { max: [...m.max], min: [...m.min] }, z = { max: [...m.max], min: [...m.min] };
1821
- G.max[u] = w[u], z.min[u] = Math.min(w[u] + 1, 65535);
1822
- const W = M(G);
1821
+ G.max[u] = M[u], z.min[u] = Math.min(M[u] + 1, 65535);
1822
+ const W = w(G);
1823
1823
  let T = -1;
1824
- return z.min[u] <= z.max[u] && (T = M(z)), x.left = W, x.right = T, Y;
1824
+ return z.min[u] <= z.max[u] && (T = w(z)), x.left = W, x.right = T, Y;
1825
1825
  }
1826
1826
  return d;
1827
1827
  }
@@ -1834,11 +1834,11 @@ function $n(e, n = {}) {
1834
1834
  return;
1835
1835
  const {
1836
1836
  maxColors: f = d,
1837
- clearSamples: M = !0
1837
+ clearSamples: w = !0
1838
1838
  } = n;
1839
1839
  let m = Jt({ end: p.length }, e), a = 1;
1840
1840
  const u = [m];
1841
- function w() {
1841
+ function M() {
1842
1842
  let Y = -1, G = -1;
1843
1843
  if (a === f)
1844
1844
  return -1;
@@ -1869,12 +1869,12 @@ function $n(e, n = {}) {
1869
1869
  for (let te = G - 2; O < te && (_ += p[O].count, !(_ > T)); O++)
1870
1870
  ;
1871
1871
  x(m, O);
1872
- const ie = w();
1872
+ const ie = M();
1873
1873
  m = ie >= 0 ? u[ie] : null;
1874
1874
  }
1875
1875
  for (let Y = u.length, G = 0; G < Y; G++)
1876
1876
  u[G].srgb = Rn(u[G].oklab);
1877
- e.colorBoxes = u.sort((Y, G) => Y.srgb - G.srgb), e.colorBoxesIndexTree = qn(e), M && (e.colorSamples = [], e.colorSamplesCache.clear()), e.finderCache.clear();
1877
+ e.colorBoxes = u.sort((Y, G) => Y.srgb - G.srgb), e.colorBoxesIndexTree = qn(e), w && (e.colorSamples = [], e.colorSamplesCache.clear()), e.finderCache.clear();
1878
1878
  }
1879
1879
  function er(e, n, d) {
1880
1880
  const { colorBoxes: p } = e;
@@ -1884,28 +1884,28 @@ function er(e, n, d) {
1884
1884
  if (typeof d == "number")
1885
1885
  f = d;
1886
1886
  else if (typeof d == "string") {
1887
- const u = d.replace(/^#/, ""), w = [
1887
+ const u = d.replace(/^#/, ""), M = [
1888
1888
  `${u[0]}${u[1]}`,
1889
1889
  `${u[2]}${u[3]}`,
1890
1890
  `${u[4]}${u[5]}`
1891
1891
  ].map((x) => parseInt(x, 16));
1892
- f = w[0] << 16 | w[1] << 8 | w[2];
1892
+ f = M[0] << 16 | M[1] << 8 | M[2];
1893
1893
  } else if (Array.isArray(d))
1894
1894
  f = d[0] << 16 | d[1] << 8 | d[2];
1895
1895
  else
1896
1896
  throw new TypeError("Unsupported color format");
1897
- const M = n(f);
1898
- if (M === void 0)
1897
+ const w = n(f);
1898
+ if (w === void 0)
1899
1899
  return;
1900
- const m = p[M];
1900
+ const m = p[w];
1901
1901
  if (!m)
1902
1902
  return;
1903
1903
  const { srgb: a } = m;
1904
1904
  if (typeof d == "string") {
1905
- const u = (a >> 16 & 255).toString(16).padStart(2, "0"), w = (a >> 8 & 255).toString(16).padStart(2, "0"), x = (a & 255).toString(16).padStart(2, "0");
1905
+ const u = (a >> 16 & 255).toString(16).padStart(2, "0"), M = (a >> 8 & 255).toString(16).padStart(2, "0"), x = (a & 255).toString(16).padStart(2, "0");
1906
1906
  return {
1907
- value: `#${u}${w}${x}`,
1908
- index: M
1907
+ value: `#${u}${M}${x}`,
1908
+ index: w
1909
1909
  };
1910
1910
  } else if (typeof d == "object" && Array.isArray(d))
1911
1911
  return {
@@ -1914,11 +1914,11 @@ function er(e, n, d) {
1914
1914
  a >> 8 & 255,
1915
1915
  a & 255
1916
1916
  ],
1917
- index: M
1917
+ index: w
1918
1918
  };
1919
1919
  return {
1920
1920
  value: a,
1921
- index: M
1921
+ index: w
1922
1922
  };
1923
1923
  }
1924
1924
  function tr(e) {
@@ -1929,19 +1929,19 @@ function Ht(e) {
1929
1929
  statsMode: d,
1930
1930
  samples: p,
1931
1931
  skipTransparent: f
1932
- } = n, M = function() {
1933
- let w;
1934
- return () => (!w && An && (w = document.createElement("canvas").getContext("2d", {
1932
+ } = n, w = function() {
1933
+ let M;
1934
+ return () => (!M && An && (M = document.createElement("canvas").getContext("2d", {
1935
1935
  willReadFrequently: !0
1936
- })), w);
1936
+ })), M);
1937
1937
  }();
1938
1938
  let m = null, a = null;
1939
1939
  const u = {
1940
1940
  context: n,
1941
- addSample: (w) => {
1941
+ addSample: (M) => {
1942
1942
  n.colorSamples.length === 0 && (m = null);
1943
- const x = Gt(n, w, {
1944
- getContext2d: M,
1943
+ const x = Gt(n, M, {
1944
+ getContext2d: w,
1945
1945
  previousSample: m,
1946
1946
  skipTransparent: f
1947
1947
  });
@@ -1949,15 +1949,15 @@ function Ht(e) {
1949
1949
  Y && d === "diff" && (m = Y);
1950
1950
  }), x;
1951
1951
  },
1952
- generate(w = {}) {
1953
- const { clearSamples: x = !0 } = w;
1954
- return x && (m = null), $n(n, w), this;
1952
+ generate(M = {}) {
1953
+ const { clearSamples: x = !0 } = M;
1954
+ return x && (m = null), $n(n, M), this;
1955
1955
  },
1956
- getColors: (w) => _n(n, w),
1957
- findNearestColor: (w) => (a || (a = cn(n)), er(n, a, w)),
1956
+ getColors: (M) => _n(n, M),
1957
+ findNearestColor: (M) => (a || (a = cn(n)), er(n, a, M)),
1958
1958
  reset: () => tr(n)
1959
1959
  };
1960
- return p.length && (p.forEach((w) => u.addSample(w)), n.samples = []), u;
1960
+ return p.length && (p.forEach((M) => u.addSample(M)), n.samples = []), u;
1961
1961
  }
1962
1962
  const ht = "[modern-gif]", nr = "GIF", rr = 44, un = 33, or = 255, ir = 11, ar = 249, sr = 4, lr = 59, cr = (...e) => console.warn(ht, ...e), dr = (...e) => console.debug(ht, ...e), ur = (e) => console.time(`${ht} ${e}`), mr = (e) => console.timeEnd(`${ht} ${e}`);
1963
1963
  function hr(e) {
@@ -1973,10 +1973,10 @@ function pr(e, n, d) {
1973
1973
  else if (e instanceof ArrayBuffer)
1974
1974
  p = e;
1975
1975
  else {
1976
- const f = document.createElement("canvas"), { width: M, height: m } = d || {}, a = f.getContext("2d");
1976
+ const f = document.createElement("canvas"), { width: w, height: m } = d || {}, a = f.getContext("2d");
1977
1977
  if (!a)
1978
1978
  throw new Error("Failed to create canvas context2d");
1979
- f.width = M != null ? M : typeof e.width == "number" ? e.width : e.width.baseVal.value, f.height = m != null ? m : typeof e.height == "number" ? e.height : e.height.baseVal.value, a.drawImage(e, 0, 0, f.width, f.height), p = a.getImageData(0, 0, f.width, f.height).data.buffer;
1979
+ f.width = w != null ? w : typeof e.width == "number" ? e.width : e.width.baseVal.value, f.height = m != null ? m : typeof e.height == "number" ? e.height : e.height.baseVal.value, a.drawImage(e, 0, 0, f.width, f.height), p = a.getImageData(0, 0, f.width, f.height).data.buffer;
1980
1980
  }
1981
1981
  switch (n) {
1982
1982
  case "uint8Array":
@@ -2001,11 +2001,11 @@ function gr(e) {
2001
2001
  }
2002
2002
  function yr(e, n) {
2003
2003
  var d;
2004
- const { top: p = 0, left: f = 0, width: M, height: m, rawWidth: a, rate: u = 4, callback: w } = n, x = new Uint8ClampedArray(M * m * u), Y = f * u, G = p * u, z = M * u, W = a * u;
2004
+ const { top: p = 0, left: f = 0, width: w, height: m, rawWidth: a, rate: u = 4, callback: M } = n, x = new Uint8ClampedArray(w * m * u), Y = f * u, G = p * u, z = w * u, W = a * u;
2005
2005
  for (let T = 0; T < m; T++)
2006
2006
  for (let O = 0; O < z; O++) {
2007
2007
  const _ = (G + T) * W + (Y + O);
2008
- x[T * z + O] = (d = w == null ? void 0 : w(_)) != null ? d : e[_];
2008
+ x[T * z + O] = (d = M == null ? void 0 : M(_)) != null ? d : e[_];
2009
2009
  }
2010
2010
  return x;
2011
2011
  }
@@ -2014,25 +2014,25 @@ function mn(e = {}) {
2014
2014
  chunkSize: n = 4096
2015
2015
  } = e;
2016
2016
  let d = [new Uint8Array(n)], p = 0, f = 0;
2017
- const M = (a, u) => {
2017
+ const w = (a, u) => {
2018
2018
  u ? d[u[0]][u[1]] = a : (f >= n && (d[++p] = new Uint8Array(n), f = 0), d[p][f++] = a);
2019
- }, m = (a) => a.forEach((u) => M(u));
2019
+ }, m = (a) => a.forEach((u) => w(u));
2020
2020
  return {
2021
2021
  getCursor: () => [p, f],
2022
2022
  setCursor: (a) => {
2023
2023
  p = a[0], f = a[1];
2024
2024
  },
2025
2025
  calculateDistance: (a) => p * n + f - (a[0] * n + a[1]),
2026
- writeByte: M,
2026
+ writeByte: w,
2027
2027
  writeBytes: m,
2028
- writeString: (a) => a.split("").forEach((u, w) => M(a.charCodeAt(w))),
2028
+ writeString: (a) => a.split("").forEach((u, M) => w(a.charCodeAt(M))),
2029
2029
  writeUnsigned: (a) => m([a & 255, a >> 8 & 255]),
2030
2030
  flush: () => {
2031
2031
  d[p] = d[p].slice(0, f);
2032
- const a = new Uint8Array(d.reduce((w, x) => w + x.byteLength, 0));
2032
+ const a = new Uint8Array(d.reduce((M, x) => M + x.byteLength, 0));
2033
2033
  let u = 0;
2034
- return d.forEach((w) => {
2035
- a.set(w, u), u += w.byteLength;
2034
+ return d.forEach((M) => {
2035
+ a.set(M, u), u += M.byteLength;
2036
2036
  }), d = [new Uint8Array(n)], p = 0, f = 0, a;
2037
2037
  }
2038
2038
  };
@@ -2053,14 +2053,14 @@ function fr(e) {
2053
2053
  throw new Error("Width invalid.");
2054
2054
  if (f.height <= 0 || f.height > 65535)
2055
2055
  throw new Error("Height invalid.");
2056
- let M = 0;
2056
+ let w = 0;
2057
2057
  if ((n = f.colorTable) != null && n.length) {
2058
2058
  let G = f.colorTable.length;
2059
2059
  if (G < 2 || G > 256 || G & G - 1)
2060
2060
  throw new Error("Invalid color table length, must be power of 2 and 2 .. 256.");
2061
2061
  for (; G >>= 1; )
2062
- ++M;
2063
- if (G = 1 << M, f.colorTableSize = --M, f.backgroundColorIndex >= G)
2062
+ ++w;
2063
+ if (G = 1 << w, f.colorTableSize = --w, f.backgroundColorIndex >= G)
2064
2064
  throw new Error("Background index out of range.");
2065
2065
  if (f.backgroundColorIndex === 0)
2066
2066
  throw new Error("Background index explicitly passed as 0.");
@@ -2068,22 +2068,22 @@ function fr(e) {
2068
2068
  const m = mn(), {
2069
2069
  writeByte: a,
2070
2070
  writeBytes: u,
2071
- writeUnsigned: w,
2071
+ writeUnsigned: M,
2072
2072
  writeString: x,
2073
2073
  flush: Y
2074
2074
  } = m;
2075
- return x(nr), x(f.version), w(f.width), w(f.height), a(parseInt(`${f.colorTableSize ? 1 : 0}1110${f.colorTableSize.toString(2).padStart(3, "0")}`, 2)), a(f.backgroundColorIndex), a(f.pixelAspectRatio), u((p = (d = f.colorTable) == null ? void 0 : d.flat()) != null ? p : []), f.looped && (a(un), a(or), a(ir), x("NETSCAPE2.0"), a(3), a(1), w(f.loopCount), a(0)), Y();
2075
+ return x(nr), x(f.version), M(f.width), M(f.height), a(parseInt(`${f.colorTableSize ? 1 : 0}1110${f.colorTableSize.toString(2).padStart(3, "0")}`, 2)), a(f.backgroundColorIndex), a(f.pixelAspectRatio), u((p = (d = f.colorTable) == null ? void 0 : d.flat()) != null ? p : []), f.looped && (a(un), a(or), a(ir), x("NETSCAPE2.0"), a(3), a(1), M(f.loopCount), a(0)), Y();
2076
2076
  }
2077
2077
  function wr(e, n, d) {
2078
- const { writeByte: p, getCursor: f, calculateDistance: M } = d;
2078
+ const { writeByte: p, getCursor: f, calculateDistance: w } = d;
2079
2079
  p(e);
2080
2080
  let m = f();
2081
2081
  p(0);
2082
- const a = 1 << e, u = a - 1, w = a + 1;
2083
- let x = w + 1, Y = e + 1, G = 0, z = 0;
2082
+ const a = 1 << e, u = a - 1, M = a + 1;
2083
+ let x = M + 1, Y = e + 1, G = 0, z = 0;
2084
2084
  function W(P) {
2085
2085
  for (; G >= P; )
2086
- p(z & 255), z >>= 8, G -= 8, M(m) === 256 && (p(255, m), m = f(), p(0));
2086
+ p(z & 255), z >>= 8, G -= 8, w(m) === 256 && (p(255, m), m = f(), p(0));
2087
2087
  }
2088
2088
  function T(P) {
2089
2089
  z |= P << G, G += Y, W(8);
@@ -2093,21 +2093,21 @@ function wr(e, n, d) {
2093
2093
  for (let P = n.length, L = 1; L < P; ++L)
2094
2094
  if ($ = n[L] & u, ie = O << 8 | $, te = _[ie], te === void 0) {
2095
2095
  for (z |= O << G, G += Y; G >= 8; )
2096
- p(z & 255), z >>= 8, G -= 8, M(m) === 256 && (p(255, m), m = f(), p(0));
2097
- x === 4096 ? (T(a), x = w + 1, Y = e + 1, _ = {}) : (x >= 1 << Y && ++Y, _[ie] = x++), O = $;
2096
+ p(z & 255), z >>= 8, G -= 8, w(m) === 256 && (p(255, m), m = f(), p(0));
2097
+ x === 4096 ? (T(a), x = M + 1, Y = e + 1, _ = {}) : (x >= 1 << Y && ++Y, _[ie] = x++), O = $;
2098
2098
  } else
2099
2099
  O = te;
2100
- T(O), T(w), W(1), M(m) === 1 ? p(0, m) : (p(M(m) - 1, m), p(0));
2100
+ T(O), T(M), W(1), w(m) === 1 ? p(0, m) : (p(w(m) - 1, m), p(0));
2101
2101
  }
2102
2102
  function Mr(e) {
2103
2103
  var n, d, p;
2104
2104
  const f = mn(), {
2105
- writeByte: M,
2105
+ writeByte: w,
2106
2106
  writeBytes: m,
2107
2107
  writeUnsigned: a,
2108
2108
  flush: u
2109
2109
  } = f, {
2110
- left: w = 0,
2110
+ left: M = 0,
2111
2111
  top: x = 0,
2112
2112
  width: Y = 0,
2113
2113
  height: G = 0,
@@ -2119,7 +2119,7 @@ function Mr(e) {
2119
2119
  } = e;
2120
2120
  const O = (n = e.graphicControl) == null ? void 0 : n.transparent;
2121
2121
  let _ = (p = (d = e.graphicControl) == null ? void 0 : d.transparentIndex) != null ? p : 255;
2122
- if (w < 0 || w > 65535)
2122
+ if (M < 0 || M > 65535)
2123
2123
  throw new Error("Left invalid.");
2124
2124
  if (x < 0 || x > 65535)
2125
2125
  throw new Error("Top invalid.");
@@ -2134,7 +2134,7 @@ function Mr(e) {
2134
2134
  for (; te >>= 1; )
2135
2135
  ++ie;
2136
2136
  }
2137
- return M(un), M(ar), M(sr), O ? T || (T = 2) : _ = 0, M(parseInt(`000${Number(T & 7).toString(2).padStart(3, "0")}0${O ? 1 : 0}`, 2)), a(z / 10), M(_), M(0), M(rr), a(w), a(x), a(Y), a(G), W != null && W.length ? (M(parseInt(`10000${(ie - 1).toString(2).padStart(3, "0")}`, 2)), m(W.flat())) : M(0), wr(ie, e.imageData, f), u();
2137
+ return w(un), w(ar), w(sr), O ? T || (T = 2) : _ = 0, w(parseInt(`000${Number(T & 7).toString(2).padStart(3, "0")}0${O ? 1 : 0}`, 2)), a(z / 10), w(_), w(0), w(rr), a(M), a(x), a(Y), a(G), W != null && W.length ? (w(parseInt(`10000${(ie - 1).toString(2).padStart(3, "0")}`, 2)), m(W.flat())) : w(0), wr(ie, e.imageData, f), u();
2138
2138
  }
2139
2139
  function xr(e) {
2140
2140
  const {
@@ -2142,12 +2142,12 @@ function xr(e) {
2142
2142
  palette: d,
2143
2143
  transparentIndex: p
2144
2144
  } = e, f = cn(d);
2145
- return n.map(({ imageData: M }) => {
2145
+ return n.map(({ imageData: w }) => {
2146
2146
  let m = !1;
2147
- const a = new Uint8ClampedArray(M.length / 4);
2148
- for (let u = M.length, w = 0; w < u; w += 4)
2149
- M[w + 3] === 0 ? (a[w / 4] = p, m = !0) : a[w / 4] = f(
2150
- M[w] << 16 | M[w + 1] << 8 | M[w + 2]
2147
+ const a = new Uint8ClampedArray(w.length / 4);
2148
+ for (let u = w.length, M = 0; M < u; M += 4)
2149
+ w[M + 3] === 0 ? (a[M / 4] = p, m = !0) : a[M / 4] = f(
2150
+ w[M] << 16 | w[M + 1] << 8 | w[M + 2]
2151
2151
  );
2152
2152
  return {
2153
2153
  imageData: a,
@@ -2158,14 +2158,14 @@ function xr(e) {
2158
2158
  function Tr(e) {
2159
2159
  const { frames: n, transparentIndex: d } = e;
2160
2160
  let p;
2161
- return n.map((f, M) => {
2161
+ return n.map((f, w) => {
2162
2162
  var m, a;
2163
2163
  const {
2164
2164
  width: u,
2165
- height: w,
2165
+ height: M,
2166
2166
  imageData: x
2167
- } = f, Y = f.transparent || ((a = (m = n[M + 1]) == null ? void 0 : m.transparent) != null ? a : !0);
2168
- let G = 0, z = 0, W = u - 1, T = w - 1, O;
2167
+ } = f, Y = f.transparent || ((a = (m = n[w + 1]) == null ? void 0 : m.transparent) != null ? a : !0);
2168
+ let G = 0, z = 0, W = u - 1, T = M - 1, O;
2169
2169
  if (Y) {
2170
2170
  for (; z < T; ) {
2171
2171
  let $ = !0;
@@ -2311,16 +2311,16 @@ function Sr(e) {
2311
2311
  const f = [...new Array(d ? p : 0)].map(() => {
2312
2312
  try {
2313
2313
  const a = new Worker(d);
2314
- return a.onmessage = M, a;
2314
+ return a.onmessage = w, a;
2315
2315
  } catch (a) {
2316
2316
  return null;
2317
2317
  }
2318
2318
  }).filter(Boolean);
2319
2319
  p = f.length;
2320
- function M(a) {
2320
+ function w(a) {
2321
2321
  var u;
2322
- const { id: w, data: x } = a.data;
2323
- (u = n.get(w)) == null || u(x), n.delete(w);
2322
+ const { id: M, data: x } = a.data;
2323
+ (u = n.get(M)) == null || u(x), n.delete(M);
2324
2324
  }
2325
2325
  const m = function() {
2326
2326
  let a = 0;
@@ -2329,11 +2329,11 @@ function Sr(e) {
2329
2329
  return {
2330
2330
  call: function() {
2331
2331
  let a = 0;
2332
- return (u, w, x, Y) => new Promise((G) => {
2332
+ return (u, M, x, Y) => new Promise((G) => {
2333
2333
  const z = m(Y);
2334
2334
  if (!z)
2335
2335
  return G(void 0);
2336
- n.set(a, G), z.postMessage({ id: a++, type: u, data: w }, { transfer: x });
2336
+ n.set(a, G), z.postMessage({ id: a++, type: u, data: M }, { transfer: x });
2337
2337
  });
2338
2338
  }()
2339
2339
  };
@@ -2344,11 +2344,11 @@ function Zr(e) {
2344
2344
  height: d,
2345
2345
  workerUrl: p,
2346
2346
  workerNumber: f = 1,
2347
- colorTableSize: M = 256,
2348
- backgroundColorIndex: m = M - 1,
2349
- maxColors: a = M - 1,
2347
+ colorTableSize: w = 256,
2348
+ backgroundColorIndex: m = w - 1,
2349
+ maxColors: a = w - 1,
2350
2350
  debug: u = !1
2351
- } = e, w = {
2351
+ } = e, M = {
2352
2352
  width: n,
2353
2353
  height: d,
2354
2354
  maxColors: a,
@@ -2361,8 +2361,8 @@ function Zr(e) {
2361
2361
  encodeId: 0,
2362
2362
  encode(T) {
2363
2363
  return Ee(this, null, function* () {
2364
- const { log: O, frames: _, encodeId: ie, width: te, height: $ } = w;
2365
- w.encodeId++;
2364
+ const { log: O, frames: _, encodeId: ie, width: te, height: $ } = M;
2365
+ M.encodeId++;
2366
2366
  const { width: P = te, height: L = $ } = T;
2367
2367
  let { imageData: se } = T;
2368
2368
  O.time(`palette:sample-${ie}`);
@@ -2385,7 +2385,7 @@ function Zr(e) {
2385
2385
  },
2386
2386
  flush() {
2387
2387
  return Ee(this, null, function* () {
2388
- const { log: T, frames: O, width: _, height: ie, maxColors: te, palette: $ } = w;
2388
+ const { log: T, frames: O, width: _, height: ie, maxColors: te, palette: $ } = M;
2389
2389
  T.time("palette:generate");
2390
2390
  const P = yield Y(te), L = Ht(P).getColors("rgb").map((C) => C.value);
2391
2391
  T.debug("palette:maxColors", te);
@@ -2396,7 +2396,7 @@ function Zr(e) {
2396
2396
  for (u && console.debug(
2397
2397
  se.map(() => "%c ").join(""),
2398
2398
  ...se.map((C) => `margin: 1px; background: ${C}`)
2399
- ); L.length < M; )
2399
+ ); L.length < w; )
2400
2400
  L.push([0, 0, 0]);
2401
2401
  T.timeEnd("palette:generate"), T.time("frames:index");
2402
2402
  const be = yield G({
@@ -2431,33 +2431,33 @@ function Zr(e) {
2431
2431
  width: _,
2432
2432
  height: ie
2433
2433
  })), Ye = hr(Le), k = new Uint8Array(we.length + Ye.byteLength + 1);
2434
- return k.set(we), k.set(Ye, we.byteLength), k[k.length - 1] = lr, T.timeEnd("output"), $.reset(), w.frames = [], w.encodeId = 0, k;
2434
+ return k.set(we), k.set(Ye, we.byteLength), k[k.length - 1] = lr, T.timeEnd("output"), $.reset(), M.frames = [], M.encodeId = 0, k;
2435
2435
  });
2436
2436
  }
2437
2437
  };
2438
2438
  function x(T) {
2439
2439
  return Ee(this, null, function* () {
2440
- (yield w.worker.call(
2440
+ (yield M.worker.call(
2441
2441
  "palette:addSample",
2442
2442
  T,
2443
2443
  void 0,
2444
2444
  0
2445
- )) || w.palette.addSample(T);
2445
+ )) || M.palette.addSample(T);
2446
2446
  });
2447
2447
  }
2448
2448
  function Y(T) {
2449
2449
  return Ee(this, null, function* () {
2450
- return (yield w.worker.call(
2450
+ return (yield M.worker.call(
2451
2451
  "palette:generate",
2452
2452
  { maxColors: T },
2453
2453
  void 0,
2454
2454
  0
2455
- )) || (w.palette.generate({ maxColors: T }), w.palette.context);
2455
+ )) || (M.palette.generate({ maxColors: T }), M.palette.context);
2456
2456
  });
2457
2457
  }
2458
2458
  function G(T) {
2459
2459
  return Ee(this, null, function* () {
2460
- return (yield w.worker.call(
2460
+ return (yield M.worker.call(
2461
2461
  "frames:index",
2462
2462
  T
2463
2463
  )) || xr(T);
@@ -2465,7 +2465,7 @@ function Zr(e) {
2465
2465
  }
2466
2466
  function z(T) {
2467
2467
  return Ee(this, null, function* () {
2468
- return (yield w.worker.call(
2468
+ return (yield M.worker.call(
2469
2469
  "frames:crop",
2470
2470
  T,
2471
2471
  T.frames.map((_) => _.imageData.buffer)
@@ -2474,14 +2474,14 @@ function Zr(e) {
2474
2474
  }
2475
2475
  function W(T) {
2476
2476
  return Ee(this, null, function* () {
2477
- return (yield w.worker.call(
2477
+ return (yield M.worker.call(
2478
2478
  "frame:encode",
2479
2479
  T,
2480
2480
  [T.imageData.buffer]
2481
2481
  )) || Mr(T);
2482
2482
  });
2483
2483
  }
2484
- return w;
2484
+ return M;
2485
2485
  }
2486
2486
  function Nr(e) {
2487
2487
  return Ee(this, null, function* () {
@@ -2497,21 +2497,21 @@ const Ir = "data:application/javascript;base64,dmFyIFFlPU9iamVjdC5kZWZpbmVQcm9wZ
2497
2497
  gif: d,
2498
2498
  images: p,
2499
2499
  autoSize: f = !0
2500
- } = e, M = fe({}, d), m = [];
2500
+ } = e, w = fe({}, d), m = [];
2501
2501
  if (f) {
2502
- const w = (d == null ? void 0 : d.width) || Math.min(...p.map((Y) => Y.width)), x = (d == null ? void 0 : d.height) || Math.min(...p.map((Y) => Y.height));
2503
- M.width = w, M.height = x;
2502
+ const M = (d == null ? void 0 : d.width) || Math.min(...p.map((Y) => Y.width)), x = (d == null ? void 0 : d.height) || Math.min(...p.map((Y) => Y.height));
2503
+ w.width = M, w.height = x;
2504
2504
  }
2505
- p.forEach((w) => {
2505
+ p.forEach((M) => {
2506
2506
  m.push({
2507
- imageData: w,
2507
+ imageData: M,
2508
2508
  delay: n
2509
2509
  });
2510
2510
  });
2511
2511
  const a = yield Nr({
2512
2512
  workerUrl: Ir,
2513
- width: M.width || 200,
2514
- height: M.height || 200,
2513
+ width: w.width || 200,
2514
+ height: w.height || 200,
2515
2515
  maxColors: 255,
2516
2516
  frames: m
2517
2517
  });
@@ -2546,12 +2546,12 @@ function Qt({
2546
2546
  nodePath: e,
2547
2547
  mode: n
2548
2548
  }) {
2549
- const { onUpload: d } = ut(), { setFieldValue: p } = Je(), { selectedNode: f } = ke(), { setLock: M } = mt(), [m, a] = Fe(!1), u = h.useRef();
2550
- u.current || (u.current = De(f)), Ue(() => {
2549
+ const { onUpload: d } = ut(), { setFieldValue: p } = He(), { selectedNode: f } = ke(), { setLock: w } = mt(), [m, a] = Fe(!1), u = h.useRef();
2550
+ u.current || (u.current = De(f)), Je(() => {
2551
2551
  var x;
2552
- _e((x = u.current) == null ? void 0 : x.data.list, f == null ? void 0 : f.data.list) ? M(!1) : M(!0);
2553
- }, [f, M]);
2554
- const w = () => Se(this, null, function* () {
2552
+ _e((x = u.current) == null ? void 0 : x.data.list, f == null ? void 0 : f.data.list) ? w(!1) : w(!0);
2553
+ }, [f, w]);
2554
+ const M = () => Se(this, null, function* () {
2555
2555
  if (f)
2556
2556
  try {
2557
2557
  a(!0);
@@ -2585,7 +2585,7 @@ function Qt({
2585
2585
  {
2586
2586
  name: "3",
2587
2587
  header: X("Image"),
2588
- extra: /* @__PURE__ */ h.createElement(ct, { loading: m, type: "primary", onClick: w }, X("Save as gif"))
2588
+ extra: /* @__PURE__ */ h.createElement(ct, { loading: m, type: "primary", onClick: M }, X("Save as gif"))
2589
2589
  },
2590
2590
  /* @__PURE__ */ h.createElement(
2591
2591
  R.EditPanelTabsField,
@@ -2676,15 +2676,15 @@ function Er({
2676
2676
  nodePath: e,
2677
2677
  mode: n
2678
2678
  }) {
2679
- const d = Et(), { onUpload: p } = ut(), { setFieldValue: f } = Je(), { selectedNode: M } = ke(), { setLock: m } = mt(), [a, u] = Fe(!1), w = h.useRef();
2680
- w.current || (w.current = De(M)), Ue(() => {
2681
- _e(w.current, M) ? m(!1) : m(!0);
2682
- }, [M, m]);
2679
+ const d = Et(), { onUpload: p } = ut(), { setFieldValue: f } = He(), { selectedNode: w } = ke(), { setLock: m } = mt(), [a, u] = Fe(!1), M = h.useRef();
2680
+ M.current || (M.current = De(w)), Je(() => {
2681
+ _e(M.current, w) ? m(!1) : m(!0);
2682
+ }, [w, m]);
2683
2683
  const x = () => Se(this, null, function* () {
2684
- if (M)
2684
+ if (w)
2685
2685
  try {
2686
2686
  u(!0);
2687
- const Y = tn.toDOMNode(d, M), G = [], z = M.data;
2687
+ const Y = tn.toDOMNode(d, w), G = [], z = w.data;
2688
2688
  let W = z.remainingTime;
2689
2689
  switch (z.unit) {
2690
2690
  case "minute":
@@ -2738,19 +2738,19 @@ function Er({
2738
2738
  n === de.DESKTOP ? "attributes.src" : "mobileAttributes.src",
2739
2739
  _
2740
2740
  );
2741
- const ie = De(M);
2741
+ const ie = De(w);
2742
2742
  Ge(
2743
2743
  ie,
2744
2744
  n === de.DESKTOP ? "attributes.src" : "mobileAttributes.src",
2745
2745
  _
2746
- ), w.current = ie;
2746
+ ), M.current = ie;
2747
2747
  } catch (Y) {
2748
2748
  console.error(Y), dt.error(String(Y));
2749
2749
  } finally {
2750
2750
  u(!1);
2751
2751
  }
2752
2752
  });
2753
- return M ? /* @__PURE__ */ h.createElement(Re, { defaultActiveKey: ["0", "1", "2", "3"] }, /* @__PURE__ */ h.createElement(
2753
+ return w ? /* @__PURE__ */ h.createElement(Re, { defaultActiveKey: ["0", "1", "2", "3"] }, /* @__PURE__ */ h.createElement(
2754
2754
  ue.Item,
2755
2755
  {
2756
2756
  name: "0",
@@ -2868,8 +2868,8 @@ var pn = { exports: {} };
2868
2868
  e.exports = p();
2869
2869
  })(self, function() {
2870
2870
  return (() => {
2871
- var d = { 192: (M, m) => {
2872
- var a, u, w = function() {
2871
+ var d = { 192: (w, m) => {
2872
+ var a, u, M = function() {
2873
2873
  var x = function(k, C) {
2874
2874
  var D = k, I = O[C], v = null, K = 0, F = null, j = [], U = {}, ge = function(s, c) {
2875
2875
  v = function(i) {
@@ -3583,7 +3583,7 @@ var pn = { exports: {} };
3583
3583
  };
3584
3584
  return x;
3585
3585
  }();
3586
- w.stringToBytesFuncs["UTF-8"] = function(x) {
3586
+ M.stringToBytesFuncs["UTF-8"] = function(x) {
3587
3587
  return function(Y) {
3588
3588
  for (var G = [], z = 0; z < Y.length; z++) {
3589
3589
  var W = Y.charCodeAt(z);
@@ -3592,9 +3592,9 @@ var pn = { exports: {} };
3592
3592
  return G;
3593
3593
  }(x);
3594
3594
  }, (u = typeof (a = function() {
3595
- return w;
3596
- }) == "function" ? a.apply(m, []) : a) === void 0 || (M.exports = u);
3597
- }, 676: (M, m, a) => {
3595
+ return M;
3596
+ }) == "function" ? a.apply(m, []) : a) === void 0 || (w.exports = u);
3597
+ }, 676: (w, m, a) => {
3598
3598
  a.d(m, { default: () => ge });
3599
3599
  var u = function() {
3600
3600
  return (u = Object.assign || function(Z) {
@@ -3603,7 +3603,7 @@ var pn = { exports: {} };
3603
3603
  Object.prototype.hasOwnProperty.call(t, l) && (Z[l] = t[l]);
3604
3604
  return Z;
3605
3605
  }).apply(this, arguments);
3606
- }, w = function() {
3606
+ }, M = function() {
3607
3607
  for (var Z = 0, t = 0, o = arguments.length; t < o; t++)
3608
3608
  Z += arguments[t].length;
3609
3609
  var r = Array(Z), l = 0;
@@ -3623,7 +3623,7 @@ var pn = { exports: {} };
3623
3623
  return r !== void 0 && x(Z) && x(r) ? (Z = u({}, Z), Object.keys(r).forEach(function(l) {
3624
3624
  var g = Z[l], b = r[l];
3625
3625
  Array.isArray(g) && Array.isArray(b) ? Z[l] = b : x(g) && x(b) ? Z[l] = Y(Object.assign({}, g), b) : Z[l] = b;
3626
- }), Y.apply(void 0, w([Z], t))) : Z;
3626
+ }), Y.apply(void 0, M([Z], t))) : Z;
3627
3627
  }
3628
3628
  function G(Z, t) {
3629
3629
  var o = document.createElement("a");
@@ -4422,19 +4422,19 @@ var pn = { exports: {} };
4422
4422
  }, Z;
4423
4423
  }();
4424
4424
  } }, p = {};
4425
- function f(M) {
4426
- if (p[M])
4427
- return p[M].exports;
4428
- var m = p[M] = { exports: {} };
4429
- return d[M](m, m.exports, f), m.exports;
4425
+ function f(w) {
4426
+ if (p[w])
4427
+ return p[w].exports;
4428
+ var m = p[w] = { exports: {} };
4429
+ return d[w](m, m.exports, f), m.exports;
4430
4430
  }
4431
- return f.n = (M) => {
4432
- var m = M && M.__esModule ? () => M.default : () => M;
4431
+ return f.n = (w) => {
4432
+ var m = w && w.__esModule ? () => w.default : () => w;
4433
4433
  return f.d(m, { a: m }), m;
4434
- }, f.d = (M, m) => {
4434
+ }, f.d = (w, m) => {
4435
4435
  for (var a in m)
4436
- f.o(m, a) && !f.o(M, a) && Object.defineProperty(M, a, { enumerable: !0, get: m[a] });
4437
- }, f.o = (M, m) => Object.prototype.hasOwnProperty.call(M, m), f(676);
4436
+ f.o(m, a) && !f.o(w, a) && Object.defineProperty(w, a, { enumerable: !0, get: m[a] });
4437
+ }, f.o = (w, m) => Object.prototype.hasOwnProperty.call(w, m), f(676);
4438
4438
  })().default;
4439
4439
  });
4440
4440
  })(pn);
@@ -4462,13 +4462,13 @@ function Bt({
4462
4462
  nodePath: e,
4463
4463
  mode: n
4464
4464
  }) {
4465
- const d = Et(), { onUpload: p } = ut(), { setFieldValue: f, getFieldValue: M } = Je(), { selectedNode: m, selectedNodePath: a } = ke(), { setLock: u } = mt(), { isChanged: w } = xn(), [x, Y] = Fe(!1), G = zt(null), z = 600, W = zt(new Yr()), T = a && M(
4465
+ const d = Et(), { onUpload: p } = ut(), { setFieldValue: f, getFieldValue: w } = He(), { selectedNode: m, selectedNodePath: a } = ke(), { setLock: u } = mt(), { isChanged: M } = xn(), [x, Y] = Fe(!1), G = zt(null), z = 600, W = zt(new Yr()), T = a && w(
4466
4466
  a,
4467
4467
  n === de.DESKTOP ? "attributes.dot-color-type" : "mobileAttributes.dot-color-type"
4468
- ) !== "single", O = a && M(
4468
+ ) !== "single", O = a && w(
4469
4469
  a,
4470
4470
  n === de.DESKTOP ? "attributes.corner-dot-color-type" : "mobileAttributes.corner-dot-color-type"
4471
- ) !== "single", _ = a && M(
4471
+ ) !== "single", _ = a && w(
4472
4472
  a,
4473
4473
  n === de.DESKTOP ? "attributes.corner-square-color-type" : "mobileAttributes.corner-square-color-type"
4474
4474
  ) !== "single", ie = Sn(() => {
@@ -4554,8 +4554,8 @@ function Bt({
4554
4554
  m == null ? void 0 : m.data.text,
4555
4555
  m == null ? void 0 : m.mobileAttributes
4556
4556
  ]);
4557
- Ue(() => {
4558
- if (!w)
4557
+ Je(() => {
4558
+ if (!M)
4559
4559
  return;
4560
4560
  W.current.update(ie);
4561
4561
  const P = document.createElement("div");
@@ -4573,9 +4573,9 @@ function Bt({
4573
4573
  })).finally(() => {
4574
4574
  P.remove();
4575
4575
  });
4576
- }, [d, w, n, e, ie, f]);
4576
+ }, [d, M, n, e, ie, f]);
4577
4577
  const te = h.useRef();
4578
- te.current || (te.current = De(m)), Ue(() => {
4578
+ te.current || (te.current = De(m)), Je(() => {
4579
4579
  _e(te.current, m) ? u(!1) : u(!0);
4580
4580
  }, [m, u]);
4581
4581
  const $ = () => Se(this, null, function* () {
@@ -4892,16 +4892,16 @@ function Xr({
4892
4892
  nodePath: e,
4893
4893
  mode: n = de.DESKTOP
4894
4894
  }) {
4895
- const d = Et(), { onUpload: p } = ut(), { setFieldValue: f } = Je(), { selectedNode: M } = ke(), { setLock: m } = mt(), [a, u] = Fe(!1), w = h.useRef();
4896
- w.current || (w.current = De(M)), Ue(() => {
4895
+ const d = Et(), { onUpload: p } = ut(), { setFieldValue: f } = He(), { selectedNode: w } = ke(), { setLock: m } = mt(), [a, u] = Fe(!1), M = h.useRef();
4896
+ M.current || (M.current = De(w)), Je(() => {
4897
4897
  var Y;
4898
- _e((Y = w.current) == null ? void 0 : Y.data, M == null ? void 0 : M.data) ? m(!1) : m(!0);
4899
- }, [M, m]);
4898
+ _e((Y = M.current) == null ? void 0 : Y.data, w == null ? void 0 : w.data) ? m(!1) : m(!0);
4899
+ }, [w, m]);
4900
4900
  const x = () => Se(this, null, function* () {
4901
- if (M)
4901
+ if (w)
4902
4902
  try {
4903
4903
  u(!0);
4904
- const Y = tn.toDOMNode(d, M), G = yield an(Y, {
4904
+ const Y = tn.toDOMNode(d, w), G = yield an(Y, {
4905
4905
  styleText: '[data-slate-type="common-video"] { width: 600px }'
4906
4906
  }), z = yield Yn(yield rn(G)), W = yield p == null ? void 0 : p(
4907
4907
  new File([z], "video.png", { type: z.type })
@@ -4911,19 +4911,19 @@ function Xr({
4911
4911
  n === de.DESKTOP ? "attributes.src" : "mobileAttributes.src",
4912
4912
  W
4913
4913
  );
4914
- const T = De(M);
4914
+ const T = De(w);
4915
4915
  Ge(
4916
4916
  T,
4917
4917
  n === de.DESKTOP ? "attributes.src" : "mobileAttributes.src",
4918
4918
  W
4919
- ), w.current = T;
4919
+ ), M.current = T;
4920
4920
  } catch (Y) {
4921
4921
  console.error(Y), dt.error(String(Y));
4922
4922
  } finally {
4923
4923
  u(!1);
4924
4924
  }
4925
4925
  });
4926
- return M ? /* @__PURE__ */ h.createElement(Re, { defaultActiveKey: ["0", "1", "2", "3"] }, /* @__PURE__ */ h.createElement(
4926
+ return w ? /* @__PURE__ */ h.createElement(Re, { defaultActiveKey: ["0", "1", "2", "3"] }, /* @__PURE__ */ h.createElement(
4927
4927
  ue.Item,
4928
4928
  {
4929
4929
  name: "2",
@@ -5085,7 +5085,7 @@ function _t({
5085
5085
  )) : null;
5086
5086
  }
5087
5087
  const jr = ({ nodePath: e }) => {
5088
- const { selectedNode: n } = ke(), { setFieldValue: d, values: p } = Je(), f = parseInt(p.content.attributes.width || "600") || 600, M = Ct(
5088
+ const { selectedNode: n } = ke(), { setFieldValue: d, values: p } = He(), f = parseInt(p.content.attributes.width || "600") || 600, w = Ct(
5089
5089
  (m) => {
5090
5090
  m.width < f && d(e, "attributes.width", m.width + "px");
5091
5091
  },
@@ -5097,7 +5097,7 @@ const jr = ({ nodePath: e }) => {
5097
5097
  component: R.ImageUrl,
5098
5098
  path: e,
5099
5099
  name: "src",
5100
- onCallbackImageDetail: M,
5100
+ onCallbackImageDetail: w,
5101
5101
  formItem: { layout: "vertical" }
5102
5102
  }
5103
5103
  )), /* @__PURE__ */ h.createElement(ue.Item, { name: "1", header: X("Image settings") }, /* @__PURE__ */ h.createElement(
@@ -5211,21 +5211,21 @@ const jr = ({ nodePath: e }) => {
5211
5211
  nodePath: e,
5212
5212
  mode: n
5213
5213
  }) => {
5214
- const { selectedNode: d } = ke(), { setFieldValue: p } = Je(), f = en(
5214
+ const { selectedNode: d } = ke(), { setFieldValue: p } = He(), f = en(
5215
5215
  d,
5216
5216
  n === de.DESKTOP ? "attributes.first-column-width" : "mobileAttributes.first-column-width",
5217
5217
  50
5218
- ), [M, m] = Fe(f), [a, u] = Fe(100 - f);
5219
- Ue(() => {
5218
+ ), [w, m] = Fe(f), [a, u] = Fe(100 - f);
5219
+ Je(() => {
5220
5220
  m(f), u(100 - f);
5221
5221
  }, [f]);
5222
- const w = Ct(() => {
5222
+ const M = Ct(() => {
5223
5223
  p(
5224
5224
  e,
5225
5225
  n === de.DESKTOP ? "attributes.first-column-width" : "mobileAttributes.first-column-width",
5226
- M
5226
+ w
5227
5227
  );
5228
- }, [n, e, p, M]), x = Ct(() => {
5228
+ }, [n, e, p, w]), x = Ct(() => {
5229
5229
  p(
5230
5230
  e,
5231
5231
  n === de.DESKTOP ? "attributes.first-column-width" : "mobileAttributes.first-column-width",
@@ -5244,10 +5244,10 @@ const jr = ({ nodePath: e }) => {
5244
5244
  {
5245
5245
  min: 1,
5246
5246
  max: 99,
5247
- value: M,
5247
+ value: w,
5248
5248
  suffix: "%",
5249
5249
  onChange: m,
5250
- onBlur: w
5250
+ onBlur: M
5251
5251
  }
5252
5252
  ), /* @__PURE__ */ h.createElement(Cn, null), /* @__PURE__ */ h.createElement(
5253
5253
  Kt,