@billgangcom/theme-lib 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -25,8 +25,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], oe = ["left", "top", "right", "bottom"], ba = (r) => {
29
- const { alignment: o, padding: e, setPadding: s, setAlignment: i } = r;
28
+ ], oe = ["left", "top", "right", "bottom"], ba = (d) => {
29
+ const { alignment: o, padding: e, setPadding: s, setAlignment: i } = d;
30
30
  function a(h) {
31
31
  switch (h) {
32
32
  case "left":
@@ -57,7 +57,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [d, n] = f.useState(null), [c, x] = f.useState(null);
60
+ const [r, n] = f.useState(null), [c, x] = f.useState(null);
61
61
  return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
62
62
  /* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
63
63
  /* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
@@ -77,11 +77,11 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
77
77
  n(null);
78
78
  },
79
79
  children: [
80
- h !== o && d !== h && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
- h !== o && d === h && /* @__PURE__ */ t.jsx(
80
+ h !== o && r !== h && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
+ h !== o && r === h && /* @__PURE__ */ t.jsx(
82
82
  j,
83
83
  {
84
- name: a(d),
84
+ name: a(r),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
@@ -152,8 +152,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
152
152
  typeTexts: me,
153
153
  block: _e,
154
154
  active: he
155
- }, pe = ["bold", "italic", "underline", "strike-through", "code"], Lt = (r) => {
156
- const { typesText: o, setTypesText: e } = r;
155
+ }, pe = ["bold", "italic", "underline", "strike-through", "code"], Lt = (d) => {
156
+ const { typesText: o, setTypesText: e } = d;
157
157
  function s(i) {
158
158
  switch (i) {
159
159
  case "bold":
@@ -177,7 +177,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
177
177
  onClick: () => {
178
178
  const a = [...o];
179
179
  if (a.includes(i)) {
180
- const l = a.filter((d) => d !== i);
180
+ const l = a.filter((r) => r !== i);
181
181
  e(l);
182
182
  } else
183
183
  a.push(i), e(a);
@@ -202,7 +202,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
202
202
  h5: "Heading 5",
203
203
  h6: "Heading 6",
204
204
  p: "Paragraph"
205
- }, Rt = (r) => {
205
+ }, Rt = (d) => {
206
206
  const {
207
207
  typesText: o,
208
208
  isActiveText: e,
@@ -210,14 +210,14 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
210
210
  text: i,
211
211
  setText: a,
212
212
  setTypesText: l,
213
- title: d,
213
+ title: r,
214
214
  subtitle: n = "Items",
215
215
  typeFont: c,
216
216
  setTypeFont: x
217
- } = r;
217
+ } = d;
218
218
  return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
219
- (d || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
220
- d && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: d }),
219
+ (r || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
220
+ r && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: r }),
221
221
  e !== void 0 && s && /* @__PURE__ */ t.jsx(
222
222
  st,
223
223
  {
@@ -286,9 +286,9 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
286
286
  deleteButton: De,
287
287
  closeIcon: He
288
288
  }, Le = f.forwardRef(
289
- (r, o) => {
290
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
291
- function d(n, c) {
289
+ (d, o) => {
290
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
291
+ function r(n, c) {
292
292
  return n.length > c ? `${n.slice(0, c)}...` : n;
293
293
  }
294
294
  return /* @__PURE__ */ t.jsxs(
@@ -305,7 +305,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
305
305
  },
306
306
  children: [
307
307
  /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
308
- /* @__PURE__ */ t.jsx("h3", { className: H.title, children: d(e.name, 20) }),
308
+ /* @__PURE__ */ t.jsx("h3", { className: H.title, children: r(e.name, 20) }),
309
309
  /* @__PURE__ */ t.jsx("div", { className: H.closeIcon, children: /* @__PURE__ */ t.jsx(
310
310
  j,
311
311
  {
@@ -461,8 +461,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
461
461
  other: Re,
462
462
  subtitle: ze,
463
463
  items: Fe
464
- }, jt = (r) => {
465
- const { items: o, title: e = "Other" } = r;
464
+ }, jt = (d) => {
465
+ const { items: o, title: e = "Other" } = d;
466
466
  return /* @__PURE__ */ t.jsxs("div", { className: It.other, children: [
467
467
  /* @__PURE__ */ t.jsx("h5", { className: It.subtitle, children: e }),
468
468
  /* @__PURE__ */ t.jsx("div", { className: It.items, children: o.map((s, i) => /* @__PURE__ */ t.jsx(
@@ -478,16 +478,16 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
478
478
  )) })
479
479
  ] });
480
480
  };
481
- function Ve({ product: r, children: o }) {
481
+ function Ve({ product: d, children: o }) {
482
482
  const {
483
483
  attributes: e,
484
484
  listeners: s,
485
485
  setNodeRef: i,
486
486
  transform: a,
487
487
  transition: l,
488
- isDragging: d
488
+ isDragging: r
489
489
  } = St({
490
- id: r.id
490
+ id: d.id
491
491
  }), n = {
492
492
  transform: Tt.Transform.toString(a),
493
493
  transition: l
@@ -497,14 +497,14 @@ function Ve({ product: r, children: o }) {
497
497
  {
498
498
  ref: i,
499
499
  style: n,
500
- className: `${H.product} ${d ? H.dragging : ""}`,
500
+ className: `${H.product} ${r ? H.dragging : ""}`,
501
501
  ...e,
502
502
  ...s,
503
503
  children: o
504
504
  }
505
505
  );
506
506
  }
507
- const Ue = (r) => {
507
+ const Ue = (d) => {
508
508
  const {
509
509
  isActiveItems: o,
510
510
  setIsActiveItems: e,
@@ -512,7 +512,7 @@ const Ue = (r) => {
512
512
  setItems: i,
513
513
  other: a,
514
514
  title: l,
515
- subtitle: d,
515
+ subtitle: r,
516
516
  editable: n = !0,
517
517
  draggable: c = !1,
518
518
  withImage: x = !1,
@@ -527,7 +527,7 @@ const Ue = (r) => {
527
527
  addableOptions: O = {},
528
528
  limit: g,
529
529
  autoScrollInterval: $
530
- } = r, [F, q] = f.useState(null), [X, D] = f.useState({
530
+ } = d, [F, q] = f.useState(null), [X, D] = f.useState({
531
531
  top: 0,
532
532
  left: 0
533
533
  }), [I, A] = f.useState(null), M = f.useRef(null), [W, T] = f.useState(!1), R = kt(
@@ -720,7 +720,7 @@ const Ue = (r) => {
720
720
  ),
721
721
  C && L && /* @__PURE__ */ t.jsx(Ot, { ...L }),
722
722
  /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
723
- d && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: d }),
723
+ r && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: r }),
724
724
  c ? /* @__PURE__ */ t.jsx(
725
725
  Nt,
726
726
  {
@@ -837,7 +837,7 @@ const Ue = (r) => {
837
837
  modalOptions: ms,
838
838
  addButton: _s,
839
839
  deleteButton: hs
840
- }, va = (r) => {
840
+ }, va = (d) => {
841
841
  const {
842
842
  isActiveItems: o,
843
843
  setIsActiveItems: e,
@@ -845,7 +845,7 @@ const Ue = (r) => {
845
845
  setItems: i,
846
846
  other: a,
847
847
  title: l,
848
- subtitle: d,
848
+ subtitle: r,
849
849
  draggable: n = !1,
850
850
  withImage: c = !1,
851
851
  addable: x = !0,
@@ -854,7 +854,7 @@ const Ue = (r) => {
854
854
  rangeSelectorOptions: _,
855
855
  limit: b,
856
856
  autoScrollInterval: u
857
- } = r;
857
+ } = d;
858
858
  function C(v) {
859
859
  if (c)
860
860
  return v ? /* @__PURE__ */ t.jsx(
@@ -936,7 +936,7 @@ const Ue = (r) => {
936
936
  ] }),
937
937
  p && _ && /* @__PURE__ */ t.jsx(Ot, { ..._ }),
938
938
  /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
939
- d && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: d }),
939
+ r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
940
940
  s.map((v) => L(v)),
941
941
  x && /* @__PURE__ */ t.jsx(
942
942
  "div",
@@ -1030,9 +1030,9 @@ const Ue = (r) => {
1030
1030
  deleteButton: Es,
1031
1031
  closeIcon: Ds
1032
1032
  }, Hs = f.forwardRef(
1033
- (r, o) => {
1034
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
1035
- function d(n, c) {
1033
+ (d, o) => {
1034
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
1035
+ function r(n, c) {
1036
1036
  return n.length > c ? `${n.slice(0, c)}...` : n;
1037
1037
  }
1038
1038
  return /* @__PURE__ */ t.jsxs(
@@ -1049,7 +1049,7 @@ const Ue = (r) => {
1049
1049
  },
1050
1050
  children: [
1051
1051
  /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
1052
- /* @__PURE__ */ t.jsx("h3", { className: z.title, children: d(e.name, 20) }),
1052
+ /* @__PURE__ */ t.jsx("h3", { className: z.title, children: r(e.name, 20) }),
1053
1053
  /* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
1054
1054
  j,
1055
1055
  {
@@ -1182,12 +1182,12 @@ const Ue = (r) => {
1182
1182
  );
1183
1183
  }
1184
1184
  );
1185
- function Ls(r) {
1186
- const { product: o, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: d, isDragging: n } = St({
1185
+ function Ls(d) {
1186
+ const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = St({
1187
1187
  id: o.id
1188
1188
  }), c = {
1189
1189
  transform: Tt.Transform.toString(l),
1190
- transition: d
1190
+ transition: r
1191
1191
  };
1192
1192
  return /* @__PURE__ */ t.jsx(
1193
1193
  "div",
@@ -1201,7 +1201,7 @@ function Ls(r) {
1201
1201
  }
1202
1202
  );
1203
1203
  }
1204
- const ja = (r) => {
1204
+ const ja = (d) => {
1205
1205
  const {
1206
1206
  isActiveItems: o,
1207
1207
  setIsActiveItems: e,
@@ -1209,7 +1209,7 @@ const ja = (r) => {
1209
1209
  setItems: i,
1210
1210
  other: a,
1211
1211
  title: l,
1212
- subtitle: d,
1212
+ subtitle: r,
1213
1213
  editable: n = !0,
1214
1214
  draggable: c = !1,
1215
1215
  withImage: x = !1,
@@ -1222,7 +1222,7 @@ const ja = (r) => {
1222
1222
  rangeSelectorOptions: L,
1223
1223
  modalOptions: v,
1224
1224
  addableOptions: O = {}
1225
- } = r, [g, $] = f.useState(null), [F, q] = f.useState({
1225
+ } = d, [g, $] = f.useState(null), [F, q] = f.useState({
1226
1226
  top: 0,
1227
1227
  left: 0
1228
1228
  }), [X, D] = f.useState(null), I = f.useRef(null), [A, M] = f.useState(!1), W = kt(
@@ -1412,7 +1412,7 @@ const ja = (r) => {
1412
1412
  ),
1413
1413
  C && L && /* @__PURE__ */ t.jsx(Ot, { ...L }),
1414
1414
  /* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
1415
- d && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: d }),
1415
+ r && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: r }),
1416
1416
  c ? /* @__PURE__ */ t.jsx(
1417
1417
  Nt,
1418
1418
  {
@@ -1514,21 +1514,21 @@ const ja = (r) => {
1514
1514
  other: cn,
1515
1515
  options: ln,
1516
1516
  closeIcon: rn
1517
- }, dn = f.forwardRef((r, o) => {
1518
- const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [a, l] = f.useState(e.typesText), [d, n] = f.useState(e.destination), [c, x] = f.useState(e.page), [h, p] = f.useState(e.link || ""), [_, b] = f.useState(e.text || ""), [u, C] = f.useState(e.openInNewTab), { pages: L } = Vt();
1517
+ }, dn = f.forwardRef((d, o) => {
1518
+ const { activeButton: e, setActiveButton: s, popupPosition: i } = d, [a, l] = f.useState(e.typesText), [r, n] = f.useState(e.destination), [c, x] = f.useState(e.page), [h, p] = f.useState(e.link || ""), [_, b] = f.useState(e.text || ""), [u, C] = f.useState(e.openInNewTab), { pages: L } = Vt();
1519
1519
  return f.useEffect(() => {
1520
1520
  s({
1521
1521
  ...e,
1522
1522
  ...{
1523
1523
  text: _,
1524
1524
  link: h,
1525
- destination: d,
1525
+ destination: r,
1526
1526
  typesText: a,
1527
1527
  page: c,
1528
1528
  openInNewTab: u
1529
1529
  }
1530
1530
  });
1531
- }, [a, d, h, _, c, u]), /* @__PURE__ */ t.jsxs(
1531
+ }, [a, r, h, _, c, u]), /* @__PURE__ */ t.jsxs(
1532
1532
  "div",
1533
1533
  {
1534
1534
  className: ct.modal,
@@ -1560,11 +1560,11 @@ const ja = (r) => {
1560
1560
  {
1561
1561
  label: "Destination",
1562
1562
  onChange: (v) => n(v),
1563
- options: ["Go to Page", "Open Link"].filter((v) => v !== d),
1564
- value: d
1563
+ options: ["Go to Page", "Open Link"].filter((v) => v !== r),
1564
+ value: r
1565
1565
  }
1566
1566
  ),
1567
- d === "Go to Page" ? /* @__PURE__ */ t.jsx(
1567
+ r === "Go to Page" ? /* @__PURE__ */ t.jsx(
1568
1568
  et,
1569
1569
  {
1570
1570
  label: "Go to",
@@ -1632,8 +1632,8 @@ const ja = (r) => {
1632
1632
  options: Sn,
1633
1633
  addButton: Tn,
1634
1634
  deleteButton: Pn
1635
- }, An = (r) => {
1636
- const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = r, [a, l] = f.useState(null), [d, n] = f.useState({
1635
+ }, An = (d) => {
1636
+ const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = d, [a, l] = f.useState(null), [r, n] = f.useState({
1637
1637
  top: 0,
1638
1638
  left: 0
1639
1639
  }), [c, x] = f.useState(null), h = f.useRef(null);
@@ -1726,7 +1726,7 @@ const ja = (r) => {
1726
1726
  ref: h,
1727
1727
  activeButton: a,
1728
1728
  setActiveButton: l,
1729
- popupPosition: d
1729
+ popupPosition: r
1730
1730
  }
1731
1731
  ),
1732
1732
  i && /* @__PURE__ */ t.jsx(
@@ -1774,8 +1774,8 @@ const ja = (r) => {
1774
1774
  }
1775
1775
  )
1776
1776
  ] });
1777
- }, ya = (r) => {
1778
- const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = r;
1777
+ }, ya = (d) => {
1778
+ const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = d;
1779
1779
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
1780
1780
  /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1781
1781
  /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
@@ -1810,8 +1810,8 @@ const ja = (r) => {
1810
1810
  count: Un,
1811
1811
  controls: Yn,
1812
1812
  button: Gn
1813
- }, Ot = (r) => {
1814
- const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = r, [d, n] = f.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100, h = () => {
1813
+ }, Ot = (d) => {
1814
+ const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = d, [r, n] = f.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100, h = () => {
1815
1815
  a < s && l(a + i);
1816
1816
  }, p = () => {
1817
1817
  a > e && l(a - i);
@@ -1840,7 +1840,7 @@ const ja = (r) => {
1840
1840
  className: U(G.dot, {
1841
1841
  [G.active]: C,
1842
1842
  [G.inactive]: !C,
1843
- [G.dragging]: d
1843
+ [G.dragging]: r
1844
1844
  }),
1845
1845
  "aria-label": `Set value to ${e + u * i}`
1846
1846
  },
@@ -1942,10 +1942,10 @@ const ja = (r) => {
1942
1942
  addButton: hi,
1943
1943
  deleteButton: pi,
1944
1944
  closeIcon: xi
1945
- }, gi = (r) => {
1946
- const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = r, l = a.find((n) => n.id === o.listingId);
1945
+ }, gi = (d) => {
1946
+ const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = d, l = a.find((n) => n.id === o.listingId);
1947
1947
  if (!l) return null;
1948
- function d(n, c) {
1948
+ function r(n, c) {
1949
1949
  return n.length > c ? `${n.slice(0, c)}...` : n;
1950
1950
  }
1951
1951
  return /* @__PURE__ */ t.jsxs(
@@ -1961,7 +1961,7 @@ const ja = (r) => {
1961
1961
  },
1962
1962
  children: [
1963
1963
  /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1964
- /* @__PURE__ */ t.jsx("h3", { children: d(l.productData.name, 20) }),
1964
+ /* @__PURE__ */ t.jsx("h3", { children: r(l.productData.name, 20) }),
1965
1965
  /* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
1966
1966
  j,
1967
1967
  {
@@ -1992,12 +1992,12 @@ const ja = (r) => {
1992
1992
  }
1993
1993
  );
1994
1994
  };
1995
- function fi(r) {
1996
- const { product: o, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: d, isDragging: n } = St({
1995
+ function fi(d) {
1996
+ const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = St({
1997
1997
  id: String(o.listingId)
1998
1998
  }), c = {
1999
1999
  transform: Tt.Transform.toString(l),
2000
- transition: d
2000
+ transition: r
2001
2001
  };
2002
2002
  return /* @__PURE__ */ t.jsx(
2003
2003
  "div",
@@ -2011,7 +2011,7 @@ function fi(r) {
2011
2011
  }
2012
2012
  );
2013
2013
  }
2014
- const Ia = (r) => {
2014
+ const Ia = (d) => {
2015
2015
  const {
2016
2016
  isActiveItems: o,
2017
2017
  setIsActiveItems: e,
@@ -2019,7 +2019,7 @@ const Ia = (r) => {
2019
2019
  setItems: i,
2020
2020
  other: a,
2021
2021
  title: l,
2022
- subtitle: d,
2022
+ subtitle: r,
2023
2023
  editable: n = !0,
2024
2024
  draggable: c = !1,
2025
2025
  withImage: x = !1,
@@ -2027,7 +2027,7 @@ const Ia = (r) => {
2027
2027
  addable: p = !0,
2028
2028
  itemsType: _,
2029
2029
  itemsOptions: b
2030
- } = r, [u, C] = f.useState(
2030
+ } = d, [u, C] = f.useState(
2031
2031
  null
2032
2032
  ), [L, v] = f.useState({
2033
2033
  top: 0,
@@ -2187,7 +2187,7 @@ const Ia = (r) => {
2187
2187
  }
2188
2188
  ),
2189
2189
  /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
2190
- d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
2190
+ r && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: r }),
2191
2191
  c ? /* @__PURE__ */ t.jsx(
2192
2192
  Nt,
2193
2193
  {
@@ -2284,7 +2284,7 @@ const Ia = (r) => {
2284
2284
  contentBorder: Gi,
2285
2285
  borderless: Xi,
2286
2286
  rightIcon: Wi
2287
- }, Ji = (r) => {
2287
+ }, Ji = (d) => {
2288
2288
  const {
2289
2289
  onChange: o,
2290
2290
  style: e,
@@ -2292,7 +2292,7 @@ const Ia = (r) => {
2292
2292
  value: i,
2293
2293
  type: a,
2294
2294
  min: l,
2295
- max: d,
2295
+ max: r,
2296
2296
  placeholder: n,
2297
2297
  disabled: c = !1,
2298
2298
  required: x = !1,
@@ -2302,7 +2302,7 @@ const Ia = (r) => {
2302
2302
  editable: b = !1,
2303
2303
  isSearch: u = !1,
2304
2304
  centered: C = !1
2305
- } = r, { themeSettings: L } = Et(), { inputs: v } = L, [O, g] = f.useState(!1);
2305
+ } = d, { themeSettings: L } = Et(), { inputs: v } = L, [O, g] = f.useState(!1);
2306
2306
  function $(q) {
2307
2307
  return Number(q) < 0 ? String(l) : q;
2308
2308
  }
@@ -2351,7 +2351,7 @@ const Ia = (r) => {
2351
2351
  [nt.borderless]: _
2352
2352
  }),
2353
2353
  min: a === "number" ? l : void 0,
2354
- max: a === "number" ? d : void 0,
2354
+ max: a === "number" ? r : void 0,
2355
2355
  disabled: c,
2356
2356
  onFocus: () => g(!0),
2357
2357
  style: {
@@ -2390,8 +2390,8 @@ const Ia = (r) => {
2390
2390
  tertiary: so,
2391
2391
  tertiaryHovered: no,
2392
2392
  content: io
2393
- }, tt = (r) => {
2394
- const { children: o, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings: d } = Et();
2393
+ }, tt = (d) => {
2394
+ const { children: o, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = d, { themeSettings: r } = Et();
2395
2395
  return /* @__PURE__ */ t.jsx(
2396
2396
  "button",
2397
2397
  {
@@ -2399,9 +2399,9 @@ const Ia = (r) => {
2399
2399
  [ot.primary]: l === "Primary",
2400
2400
  [ot.secondary]: l === "Secondary",
2401
2401
  [ot.tertiary]: l === "Tertiary",
2402
- [ot.primaryHovered]: l === "Primary" && !a && d.buttons.primary.hover,
2403
- [ot.secondaryHovered]: l === "Secondary" && !a && d.buttons.secondary.hover,
2404
- [ot.tertiaryHovered]: l === "Tertiary" && !a && d.buttons.tertiary.hover
2402
+ [ot.primaryHovered]: l === "Primary" && !a && r.buttons.primary.hover,
2403
+ [ot.secondaryHovered]: l === "Secondary" && !a && r.buttons.secondary.hover,
2404
+ [ot.tertiaryHovered]: l === "Tertiary" && !a && r.buttons.tertiary.hover
2405
2405
  }),
2406
2406
  onClick: e,
2407
2407
  style: {
@@ -2423,20 +2423,20 @@ const Ia = (r) => {
2423
2423
  }
2424
2424
  );
2425
2425
  };
2426
- var zt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(zt || {});
2427
- const ka = (r) => {
2426
+ var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
2427
+ const ka = (d) => {
2428
2428
  var v, O;
2429
- const { variants: o } = r, [e, s] = f.useState(o[0]), [i, a] = f.useState(e.chargeTypes[0]), l = Pt(), [d, n] = f.useState(1), { reset: c, addProductToCart: x, getProducts: h } = At(), [p, _] = f.useState(!1);
2429
+ const { variants: o } = d, [e, s] = f.useState(o[0]), [i, a] = f.useState(e.chargeTypes[0]), l = Pt(), [r, n] = f.useState(1), { reset: c, addProductToCart: x, getProducts: h } = At(), [p, _] = f.useState(!1);
2430
2430
  f.useEffect(() => {
2431
2431
  _(!0);
2432
2432
  const g = setTimeout(() => _(!1), 600);
2433
2433
  return () => clearTimeout(g);
2434
- }, [d]);
2434
+ }, [r]);
2435
2435
  async function b() {
2436
2436
  await h(), await x({
2437
- productId: r.id,
2437
+ productId: d.id,
2438
2438
  productVariantId: e.id,
2439
- quantity: d
2439
+ quantity: r
2440
2440
  });
2441
2441
  }
2442
2442
  function u() {
@@ -2504,10 +2504,10 @@ const ka = (r) => {
2504
2504
  {
2505
2505
  type: "Secondary",
2506
2506
  onClick: () => {
2507
- d > 1 ? n((g) => g - 1) : n(1);
2507
+ r > 1 ? n((g) => g - 1) : n(1);
2508
2508
  },
2509
2509
  className: w.button,
2510
- disabled: e.quantity.restrictions && d <= e.quantity.restrictions.min,
2510
+ disabled: e.quantity.restrictions && r <= e.quantity.restrictions.min,
2511
2511
  children: /* @__PURE__ */ t.jsx(j, { name: "Minus" })
2512
2512
  }
2513
2513
  ),
@@ -2515,7 +2515,7 @@ const ka = (r) => {
2515
2515
  Ji,
2516
2516
  {
2517
2517
  type: "number",
2518
- value: String(d),
2518
+ value: String(r),
2519
2519
  onChange: (g) => n(Number(g)),
2520
2520
  max: ((v = e.quantity.restrictions) == null ? void 0 : v.max) || e.quantity.available || 1 / 0,
2521
2521
  min: ((O = e.quantity.restrictions) == null ? void 0 : O.min) || 0,
@@ -2530,7 +2530,7 @@ const ka = (r) => {
2530
2530
  n((g) => g + 1);
2531
2531
  },
2532
2532
  className: w.button,
2533
- disabled: !!(e.quantity.restrictions && d >= e.quantity.restrictions.max || e.quantity.available && d >= e.quantity.available),
2533
+ disabled: !!(e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available && r >= e.quantity.available),
2534
2534
  children: /* @__PURE__ */ t.jsx(j, { name: "Plus" })
2535
2535
  }
2536
2536
  )
@@ -2556,15 +2556,15 @@ const ka = (r) => {
2556
2556
  /* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2557
2557
  /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2558
2558
  "$ ",
2559
- (e.price.amount || 0) * d
2559
+ (e.price.amount || 0) * r
2560
2560
  ] }),
2561
2561
  /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2562
2562
  "$ ",
2563
- (e.compareAtPrice.amount || 0) * d
2563
+ (e.compareAtPrice.amount || 0) * r
2564
2564
  ] })
2565
2565
  ] }) : /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2566
2566
  "$ ",
2567
- (e.price.amount || 0) * d
2567
+ (e.price.amount || 0) * r
2568
2568
  ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2569
2569
  /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2570
2570
  "$ ",
@@ -2643,14 +2643,14 @@ const ka = (r) => {
2643
2643
  class gt extends Error {
2644
2644
  }
2645
2645
  gt.prototype.name = "InvalidTokenError";
2646
- function Ro(r) {
2647
- return decodeURIComponent(atob(r).replace(/(.)/g, (o, e) => {
2646
+ function Ro(d) {
2647
+ return decodeURIComponent(atob(d).replace(/(.)/g, (o, e) => {
2648
2648
  let s = e.charCodeAt(0).toString(16).toUpperCase();
2649
2649
  return s.length < 2 && (s = "0" + s), "%" + s;
2650
2650
  }));
2651
2651
  }
2652
- function zo(r) {
2653
- let o = r.replace(/-/g, "+").replace(/_/g, "/");
2652
+ function zo(d) {
2653
+ let o = d.replace(/-/g, "+").replace(/_/g, "/");
2654
2654
  switch (o.length % 4) {
2655
2655
  case 0:
2656
2656
  break;
@@ -2669,11 +2669,11 @@ function zo(r) {
2669
2669
  return atob(o);
2670
2670
  }
2671
2671
  }
2672
- function Fo(r, o) {
2673
- if (typeof r != "string")
2672
+ function Fo(d, o) {
2673
+ if (typeof d != "string")
2674
2674
  throw new gt("Invalid token specified: must be a string");
2675
2675
  o || (o = {});
2676
- const e = o.header === !0 ? 0 : 1, s = r.split(".")[e];
2676
+ const e = o.header === !0 ? 0 : 1, s = d.split(".")[e];
2677
2677
  if (typeof s != "string")
2678
2678
  throw new gt(`Invalid token specified: missing part #${e + 1}`);
2679
2679
  let i;
@@ -2688,21 +2688,21 @@ function Fo(r, o) {
2688
2688
  throw new gt(`Invalid token specified: invalid json for part #${e + 1} (${a.message})`);
2689
2689
  }
2690
2690
  }
2691
- const $a = (r) => {
2692
- const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = r;
2691
+ const $a = (d) => {
2692
+ const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = d;
2693
2693
  return /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
2694
2694
  o && /* @__PURE__ */ t.jsx(Vo, {}),
2695
2695
  s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
2696
2696
  ] });
2697
2697
  }, Vo = () => {
2698
- const [r, o] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: a } = At();
2698
+ const [d, o] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: a } = At();
2699
2699
  function l(p) {
2700
2700
  for (let _ = 0; _ < i.parts.length; _++)
2701
2701
  for (let b = 0; b < p.variants.length; b++)
2702
2702
  if (i.parts[_].productVariantId === p.variants[_].id)
2703
2703
  return i.parts[_].productVariantId;
2704
2704
  }
2705
- function d(p) {
2705
+ function r(p) {
2706
2706
  for (let _ = 0; _ < i.parts.length; _++)
2707
2707
  for (let b = 0; b < p.variants.length; b++)
2708
2708
  if (i.parts[_].productVariantId === p.variants[_].id)
@@ -2713,7 +2713,7 @@ const $a = (r) => {
2713
2713
  const _ = i.parts.map((C) => String(C.productId)), u = (await a([..._])).map((C) => ({
2714
2714
  ...C,
2715
2715
  activeVariantId: l(C),
2716
- quantity: d(C)
2716
+ quantity: r(C)
2717
2717
  }));
2718
2718
  s(u);
2719
2719
  })();
@@ -2746,7 +2746,7 @@ const $a = (r) => {
2746
2746
  ]
2747
2747
  }
2748
2748
  ),
2749
- r && /* @__PURE__ */ t.jsx(
2749
+ d && /* @__PURE__ */ t.jsx(
2750
2750
  Mt,
2751
2751
  {
2752
2752
  close: () => {
@@ -2766,20 +2766,20 @@ const $a = (r) => {
2766
2766
  }
2767
2767
  )
2768
2768
  ] });
2769
- }, Uo = (r) => {
2770
- const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: d } = At(), n = Pt();
2769
+ }, Uo = (d) => {
2770
+ const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: r } = At(), n = Pt();
2771
2771
  function c(p) {
2772
2772
  n(p);
2773
2773
  }
2774
2774
  function x(p) {
2775
- d({
2775
+ r({
2776
2776
  productId: p.id,
2777
2777
  productVariantId: p.activeVariantId,
2778
2778
  quantity: p.quantity + 1
2779
2779
  });
2780
2780
  }
2781
2781
  function h(p) {
2782
- d({
2782
+ r({
2783
2783
  productId: p.id,
2784
2784
  productVariantId: p.activeVariantId,
2785
2785
  quantity: p.quantity - 1
@@ -2922,7 +2922,7 @@ const $a = (r) => {
2922
2922
  }
2923
2923
  )
2924
2924
  ] })
2925
- ] }), Ft = ({ signUp: r }) => {
2925
+ ] }), Ft = ({ signUp: d }) => {
2926
2926
  const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o;
2927
2927
  if (!e)
2928
2928
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
@@ -2937,7 +2937,7 @@ const $a = (r) => {
2937
2937
  children: "Login"
2938
2938
  }
2939
2939
  ),
2940
- r && /* @__PURE__ */ t.jsx(
2940
+ d && /* @__PURE__ */ t.jsx(
2941
2941
  tt,
2942
2942
  {
2943
2943
  onClick: () => l("/customer-dash"),
@@ -2956,8 +2956,8 @@ const $a = (r) => {
2956
2956
  i(n.email);
2957
2957
  })();
2958
2958
  }, [e]);
2959
- function l(d) {
2960
- a(d);
2959
+ function l(r) {
2960
+ a(r);
2961
2961
  }
2962
2962
  return /* @__PURE__ */ t.jsx(
2963
2963
  "div",
@@ -2968,7 +2968,7 @@ const $a = (r) => {
2968
2968
  }
2969
2969
  );
2970
2970
  }, Go = ({
2971
- children: r,
2971
+ children: d,
2972
2972
  logo: o,
2973
2973
  setIsOpen: e,
2974
2974
  signUp: s
@@ -3001,13 +3001,13 @@ const $a = (r) => {
3001
3001
  }
3002
3002
  )
3003
3003
  ] }),
3004
- /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalContent, children: r }),
3004
+ /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalContent, children: d }),
3005
3005
  /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
3006
3006
  ]
3007
3007
  }
3008
3008
  );
3009
3009
  }, Na = ({
3010
- children: r,
3010
+ children: d,
3011
3011
  logo: o,
3012
3012
  signUp: e
3013
3013
  }) => {
@@ -3020,12 +3020,12 @@ const $a = (r) => {
3020
3020
  logo: o,
3021
3021
  setIsOpen: i,
3022
3022
  signUp: e,
3023
- children: r
3023
+ children: d
3024
3024
  }
3025
3025
  ) })
3026
3026
  ] });
3027
- }, Xo = (r) => {
3028
- const { setIsOpenModal: o } = r;
3027
+ }, Xo = (d) => {
3028
+ const { setIsOpenModal: o } = d;
3029
3029
  return /* @__PURE__ */ t.jsx(
3030
3030
  tt,
3031
3031
  {
@@ -3058,7 +3058,7 @@ const $a = (r) => {
3058
3058
  copyTextMobile: ia,
3059
3059
  copyTextMiniMobile: oa
3060
3060
  }, wa = () => {
3061
- const { isOpenModal: r, setIsOpenModal: o } = Ht();
3061
+ const { isOpenModal: d, setIsOpenModal: o } = Ht();
3062
3062
  function e() {
3063
3063
  o(!0);
3064
3064
  }
@@ -3081,10 +3081,10 @@ const $a = (r) => {
3081
3081
  )
3082
3082
  }
3083
3083
  ),
3084
- r && /* @__PURE__ */ t.jsx(Mt, { close: o, children: /* @__PURE__ */ t.jsx(aa, {}) })
3084
+ d && /* @__PURE__ */ t.jsx(Mt, { close: o, children: /* @__PURE__ */ t.jsx(aa, {}) })
3085
3085
  ] });
3086
3086
  }, aa = () => {
3087
- const { setIsOpenModal: r } = Ht(), { notification: o, setNotification: e } = Ut(), { setIsOpen: s } = Dt(), i = window.location.href;
3087
+ const { setIsOpenModal: d } = Ht(), { notification: o, setNotification: e } = Ut(), { setIsOpen: s } = Dt(), i = window.location.href;
3088
3088
  function a() {
3089
3089
  navigator.clipboard.writeText(i), e({
3090
3090
  message: "Link copied to clipboard",
@@ -3093,10 +3093,10 @@ const $a = (r) => {
3093
3093
  }
3094
3094
  function l() {
3095
3095
  s(!1), setTimeout(() => {
3096
- r(!1), s(!0);
3096
+ d(!1), s(!0);
3097
3097
  }, 300);
3098
3098
  }
3099
- function d(n, c) {
3099
+ function r(n, c) {
3100
3100
  return n.length > c ? n.slice(0, c) + "..." : n;
3101
3101
  }
3102
3102
  return /* @__PURE__ */ t.jsxs(
@@ -3127,9 +3127,9 @@ const $a = (r) => {
3127
3127
  flex: 1
3128
3128
  },
3129
3129
  children: [
3130
- /* @__PURE__ */ t.jsx("div", { className: at.copyText, children: d(i, 100) }),
3131
- /* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: d(i, 40) }),
3132
- /* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children: d(i, 20) })
3130
+ /* @__PURE__ */ t.jsx("div", { className: at.copyText, children: r(i, 100) }),
3131
+ /* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: r(i, 40) }),
3132
+ /* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children: r(i, 20) })
3133
3133
  ]
3134
3134
  }
3135
3135
  ),
@@ -3151,30 +3151,30 @@ const $a = (r) => {
3151
3151
  icon: ra,
3152
3152
  open: da,
3153
3153
  content: ua
3154
- }, Ca = ({ title: r, content: o }) => {
3155
- const [e, s] = f.useState(!1), [i, a] = f.useState(0), l = f.useRef(null), d = () => {
3156
- s(!e);
3154
+ }, Ca = ({ title: d, content: o, defaultOpen: e = !1 }) => {
3155
+ const [s, i] = f.useState(e), [a, l] = f.useState(0), r = f.useRef(null), n = () => {
3156
+ i(!s);
3157
3157
  };
3158
3158
  return f.useEffect(() => {
3159
- l.current && a(e ? l.current.scrollHeight : 0);
3160
- }, [e]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
3159
+ r.current && l(s ? r.current.scrollHeight : 0);
3160
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
3161
3161
  /* @__PURE__ */ t.jsxs(
3162
3162
  "div",
3163
3163
  {
3164
3164
  className: xt.header,
3165
- onClick: d,
3165
+ onClick: n,
3166
3166
  children: [
3167
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
3168
- /* @__PURE__ */ t.jsx("div", { className: U(xt.icon, { [xt.open]: e }), children: /* @__PURE__ */ t.jsx(j, { name: "CaretDown" }) })
3167
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
3168
+ /* @__PURE__ */ t.jsx("div", { className: U(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(j, { name: "CaretDown" }) })
3169
3169
  ]
3170
3170
  }
3171
3171
  ),
3172
3172
  /* @__PURE__ */ t.jsx(
3173
3173
  "div",
3174
3174
  {
3175
- ref: l,
3175
+ ref: r,
3176
3176
  className: xt.content,
3177
- style: { height: `${i}px` },
3177
+ style: { height: `${a}px` },
3178
3178
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
3179
3179
  }
3180
3180
  )
@@ -3184,8 +3184,8 @@ const $a = (r) => {
3184
3184
  label: _a,
3185
3185
  textarea: ha,
3186
3186
  length: pa
3187
- }, Ba = (r) => {
3188
- const { onChange: o, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = r, [l, d] = f.useState(s.length);
3187
+ }, Ba = (d) => {
3188
+ const { onChange: o, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = d, [l, r] = f.useState(s.length);
3189
3189
  return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
3190
3190
  e && /* @__PURE__ */ t.jsx(
3191
3191
  "label",
@@ -3201,7 +3201,7 @@ const $a = (r) => {
3201
3201
  id: e,
3202
3202
  defaultValue: s,
3203
3203
  onChange: (n) => {
3204
- d(n.target.value.length), o(n.target.value);
3204
+ r(n.target.value.length), o(n.target.value);
3205
3205
  },
3206
3206
  placeholder: a,
3207
3207
  className: vt.textarea,