@billgangcom/theme-lib 1.69.6 → 1.69.7

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
@@ -1,7 +1,8 @@
1
- import { j as t, I as v, c as F, b as Nt, u as ht, d as pt, P as mt, S as rt, R as kt, D as gt, e as ft, v as xt, B as lt, f as nt, a as wt, g as Pt, O as ut, h as Z, i as _t, C as jt, k as V, l as $t, m as qt, n as vt, o as Ot, p as yt, q as X, L as At, r as Ct, t as bt, w as at, s as it, x as D, y as Et, M as dt, z as Dt, A as ot, E as Rt, F as Mt, G as Lt, H as Bt, J as zt } from "./index-D0Va9_Ca.js";
2
- import { Y as Gn, V as Wn, Q as Xn, X as Qn, N as Jn, U as Kn, T as Zn, K as ti, W as ei } from "./index-D0Va9_Ca.js";
1
+ import { j as t, I as b, c as U, b as Nt, u as ht, d as pt, P as mt, S as rt, R as kt, D as gt, e as ft, v as xt, B as lt, f as nt, a as wt, g as Pt, O as ut, h as J, i as _t, C as jt, k as F, l as Tt, m as qt, n as vt, o as Ot, p as yt, q as W, L as At, r as Ct, t as bt, w as at, s as it, x as D, y as Et, M as dt, z as Dt, A as ot, E as Rt, F as Mt, G as Lt, H as $t, J as zt } from "./index-CQFp0DVu.js";
2
+ import { Y as Wn, V as Xn, Q as Qn, X as Jn, N as Kn, U as Zn, T as ti, K as ei, W as si } from "./index-CQFp0DVu.js";
3
3
  import m from "react";
4
- const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Vt = "_alignmentContent_kh9z8_30", Yt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Wt = "_circle_kh9z8_64", Xt = "_paddings_kh9z8_71", Qt = "_padding_kh9z8_71", Jt = "_active_kh9z8_97", G = {
4
+ import "react-dom";
5
+ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Vt = "_alignmentContent_kh9z8_30", Yt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Wt = "_circle_kh9z8_64", Xt = "_paddings_kh9z8_71", Qt = "_padding_kh9z8_71", Jt = "_active_kh9z8_97", Y = {
5
6
  block: Ht,
6
7
  title: Ut,
7
8
  subtitle: Ft,
@@ -61,19 +62,19 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
61
62
  return "AlignBottom";
62
63
  }
63
64
  }
64
- const [f, P] = m.useState(null), [j, n] = m.useState(null);
65
- return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
66
- /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
67
- /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
68
- c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
69
- /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Alignment" }),
70
- /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
65
+ const [x, P] = m.useState(null), [v, n] = m.useState(null);
66
+ return /* @__PURE__ */ t.jsxs("div", { className: Y.layout, children: [
67
+ /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: "Layout (for Desktop version)" }),
68
+ /* @__PURE__ */ t.jsxs("div", { className: Y.alignmentContent, children: [
69
+ c && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
70
+ /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Alignment" }),
71
+ /* @__PURE__ */ t.jsx("div", { className: Y.alignments, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
71
72
  "div",
72
73
  {
73
74
  onClick: () => {
74
75
  e(o);
75
76
  },
76
- className: G.alignment,
77
+ className: Y.alignment,
77
78
  onMouseEnter: () => {
78
79
  P(o);
79
80
  },
@@ -81,18 +82,18 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
81
82
  P(null);
82
83
  },
83
84
  children: [
84
- o !== i && f !== o && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
- o !== i && f === o && /* @__PURE__ */ t.jsx(
86
- v,
85
+ o !== i && x !== o && /* @__PURE__ */ t.jsx("div", { className: Y.circle }),
86
+ o !== i && x === o && /* @__PURE__ */ t.jsx(
87
+ b,
87
88
  {
88
- name: u(f),
89
+ name: u(x),
89
90
  fill: "#c2c2c2",
90
91
  width: 22,
91
92
  height: 22
92
93
  }
93
94
  ),
94
95
  o === i && /* @__PURE__ */ t.jsx(
95
- v,
96
+ b,
96
97
  {
97
98
  name: u(i),
98
99
  fill: "#FF3F19",
@@ -105,13 +106,13 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
105
106
  o
106
107
  )) })
107
108
  ] }),
108
- d && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
- /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
110
- /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Zt.map((o) => /* @__PURE__ */ t.jsxs(
109
+ d && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
110
+ /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Paddings" }),
111
+ /* @__PURE__ */ t.jsx("div", { className: Y.paddings, children: Zt.map((o) => /* @__PURE__ */ t.jsxs(
111
112
  "label",
112
113
  {
113
- className: F(G.padding, {
114
- [G.active]: j === o
114
+ className: U(Y.padding, {
115
+ [Y.active]: v === o
115
116
  }),
116
117
  onFocus: () => {
117
118
  n(o);
@@ -121,7 +122,7 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
121
122
  },
122
123
  children: [
123
124
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
124
- v,
125
+ b,
125
126
  {
126
127
  name: g(o),
127
128
  width: 20,
@@ -149,7 +150,7 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
149
150
  ] })
150
151
  ] })
151
152
  ] });
152
- }, te = "_title_82zux_1", ee = "_subtitle_82zux_5", se = "_productsBlock_82zux_14", ne = "_top_82zux_26", ie = "_products_82zux_14", ae = "_product_82zux_14", oe = "_button_82zux_80", ce = "_disabled_82zux_91", re = "_buttons_82zux_118", le = "_addButton_82zux_157", de = "_deleteButton_82zux_179", Q = {
153
+ }, te = "_title_82zux_1", ee = "_subtitle_82zux_5", se = "_productsBlock_82zux_14", ne = "_top_82zux_26", ie = "_products_82zux_14", ae = "_product_82zux_14", oe = "_button_82zux_80", ce = "_disabled_82zux_91", re = "_buttons_82zux_118", le = "_addButton_82zux_157", de = "_deleteButton_82zux_179", X = {
153
154
  title: te,
154
155
  subtitle: ee,
155
156
  productsBlock: se,
@@ -181,7 +182,7 @@ function ue({ id: r, children: i }) {
181
182
  {
182
183
  ref: e,
183
184
  style: g,
184
- className: `${Q.product} ${u ? Q.dragging : ""}`,
185
+ className: `${X.product} ${u ? X.dragging : ""}`,
185
186
  ...a,
186
187
  ...s,
187
188
  children: i
@@ -198,16 +199,16 @@ const Tn = (r) => {
198
199
  tags: d,
199
200
  title: u,
200
201
  subtitle: g,
201
- draggable: f = !1,
202
+ draggable: x = !1,
202
203
  withImage: P = !1,
203
- addable: j = !0,
204
+ addable: v = !0,
204
205
  itemsOptions: n,
205
206
  hasRangeSelector: o = !1,
206
207
  rangeSelectorOptions: p,
207
- limit: q,
208
- autoScrollInterval: x,
209
- deletable: _,
210
- aspectRatio: y,
208
+ limit: E,
209
+ autoScrollInterval: _,
210
+ deletable: j,
211
+ aspectRatio: N,
211
212
  setAspectRatio: M
212
213
  } = r, z = ht(
213
214
  pt(mt, {
@@ -216,16 +217,16 @@ const Tn = (r) => {
216
217
  }
217
218
  })
218
219
  ), R = (h) => {
219
- const { active: S, over: k } = h;
220
- if (k && S.id !== k.id) {
221
- const N = s.findIndex((O) => O === S.id), B = s.findIndex((O) => O === k.id);
222
- if (N !== -1 && B !== -1) {
223
- const O = [...s], [b] = O.splice(N, 1);
224
- O.splice(B, 0, b), e(O);
220
+ const { active: C, over: k } = h;
221
+ if (k && C.id !== k.id) {
222
+ const T = s.findIndex((q) => q === C.id), I = s.findIndex((q) => q === k.id);
223
+ if (T !== -1 && I !== -1) {
224
+ const q = [...s], [y] = q.splice(T, 1);
225
+ q.splice(I, 0, y), e(q);
225
226
  }
226
227
  }
227
228
  };
228
- function I(h) {
229
+ function K(h) {
229
230
  if (P)
230
231
  return h ? /* @__PURE__ */ t.jsx(
231
232
  "img",
@@ -236,7 +237,7 @@ const Tn = (r) => {
236
237
  height: 16
237
238
  }
238
239
  ) : /* @__PURE__ */ t.jsx(
239
- v,
240
+ b,
240
241
  {
241
242
  name: "Image",
242
243
  width: 16,
@@ -245,12 +246,12 @@ const Tn = (r) => {
245
246
  }
246
247
  );
247
248
  }
248
- const H = (h, S = !1) => {
249
- const k = n.find((B) => B.id === h);
249
+ const f = (h, C = !1) => {
250
+ const k = n.find((I) => I.id === h);
250
251
  if (!k) return;
251
- const N = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
253
- v,
252
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
253
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
254
+ b,
254
255
  {
255
256
  name: "DotsSixVertical",
256
257
  hoverable: !0,
@@ -261,51 +262,51 @@ const Tn = (r) => {
261
262
  /* @__PURE__ */ t.jsx(
262
263
  nt,
263
264
  {
264
- onChange: (B) => {
265
- const O = [...s], b = n.find((l) => l.name === B);
266
- if (!b) return;
267
- const A = b.id, U = O.map((l) => l === h ? A : l);
268
- e([...U]);
265
+ onChange: (I) => {
266
+ const q = [...s], y = n.find((l) => l.name === I);
267
+ if (!y) return;
268
+ const O = y.id, H = q.map((l) => l === h ? O : l);
269
+ e([...H]);
269
270
  },
270
271
  value: k.name,
271
- options: n.filter((B) => !s.find((O) => O === B.id)).map((B) => B.name),
272
- leftAddonOptions: n.map((B) => ({
273
- value: B.name,
274
- addon: I(B.images)
272
+ options: n.filter((I) => !s.find((q) => q === I.id)).map((I) => I.name),
273
+ leftAddonOptions: n.map((I) => ({
274
+ value: I.name,
275
+ addon: K(I.images)
275
276
  }))
276
277
  }
277
278
  ),
278
- S && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
279
- v,
279
+ C && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
280
+ b,
280
281
  {
281
282
  name: "Trash",
282
283
  hoverable: !0,
283
284
  width: 20,
284
285
  height: 20,
285
286
  fill: "#C12A2A",
286
- onClick: () => e(s.filter((B) => B !== h))
287
+ onClick: () => e(s.filter((I) => I !== h))
287
288
  }
288
289
  ) }) })
289
290
  ] });
290
- return f ? /* @__PURE__ */ t.jsx(
291
+ return x ? /* @__PURE__ */ t.jsx(
291
292
  ue,
292
293
  {
293
294
  id: h,
294
- children: N
295
+ children: T
295
296
  },
296
- Z()
297
+ J()
297
298
  ) : /* @__PURE__ */ t.jsx(
298
299
  "div",
299
300
  {
300
- className: Q.product,
301
- children: N
301
+ className: X.product,
302
+ children: T
302
303
  },
303
- Z()
304
+ J()
304
305
  );
305
306
  };
306
- return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
- u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
307
+ return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
308
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
309
+ u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
309
310
  i !== void 0 && /* @__PURE__ */ t.jsx(
310
311
  rt,
311
312
  {
@@ -315,9 +316,9 @@ const Tn = (r) => {
315
316
  )
316
317
  ] }),
317
318
  o && p && /* @__PURE__ */ t.jsx(kt, { ...p }),
318
- /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
- g && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: g }),
320
- f ? /* @__PURE__ */ t.jsx(
319
+ /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
320
+ g && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: g }),
321
+ x ? /* @__PURE__ */ t.jsx(
321
322
  gt,
322
323
  {
323
324
  sensors: z,
@@ -327,12 +328,12 @@ const Tn = (r) => {
327
328
  {
328
329
  items: s,
329
330
  strategy: xt,
330
- children: s.map((h) => H(h, _))
331
+ children: s.map((h) => f(h, j))
331
332
  }
332
333
  )
333
334
  }
334
- ) : s.map((h) => H(h, _)),
335
- j && /* @__PURE__ */ t.jsx(
335
+ ) : s.map((h) => f(h, j)),
336
+ v && /* @__PURE__ */ t.jsx(
336
337
  "div",
337
338
  {
338
339
  style: {
@@ -345,30 +346,30 @@ const Tn = (r) => {
345
346
  lt,
346
347
  {
347
348
  withoutHover: !0,
348
- className: F(Q.button, {
349
- [Q.disabled]: !!(q && q <= s.length || s.length === n.length)
349
+ className: U(X.button, {
350
+ [X.disabled]: !!(E && E <= s.length || s.length === n.length)
350
351
  }),
351
352
  size: "s",
352
- disabled: !!(q && q <= s.length || s.length === n.length),
353
+ disabled: !!(E && E <= s.length || s.length === n.length),
353
354
  onClick: () => {
354
355
  const h = [...s];
355
- let S = null;
356
+ let C = null;
356
357
  if (n) {
357
358
  for (let k = 0; k < n.length; k++)
358
- if (!s.find((N) => N === n[k].id)) {
359
- S = n[k];
359
+ if (!s.find((T) => T === n[k].id)) {
360
+ C = n[k];
360
361
  break;
361
362
  }
362
363
  }
363
- h.push((S == null ? void 0 : S.id) || n[0].id), e(h);
364
+ h.push((C == null ? void 0 : C.id) || n[0].id), e(h);
364
365
  },
365
366
  style: {
366
367
  width: "fit-content"
367
368
  },
368
- children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
369
+ children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
369
370
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
370
371
  /* @__PURE__ */ t.jsx(
371
- v,
372
+ b,
372
373
  {
373
374
  name: "Plus",
374
375
  width: 16,
@@ -381,10 +382,10 @@ const Tn = (r) => {
381
382
  }
382
383
  )
383
384
  ] }),
384
- y && M && /* @__PURE__ */ t.jsx(
385
+ N && M && /* @__PURE__ */ t.jsx(
385
386
  nt,
386
387
  {
387
- value: y,
388
+ value: N,
388
389
  label: "Aspect Ratio",
389
390
  options: Object.keys(Pt),
390
391
  onChange: (h) => M(h),
@@ -405,13 +406,13 @@ const Tn = (r) => {
405
406
  items: c
406
407
  }
407
408
  ),
408
- x !== void 0 && /* @__PURE__ */ t.jsx(
409
+ _ !== void 0 && /* @__PURE__ */ t.jsx(
409
410
  Nt,
410
411
  {
411
412
  label: "Auto scroll interval",
412
413
  type: "number",
413
- value: String(x.scrollInterval),
414
- onChange: (h) => x.setScrollInterval(Number(h)),
414
+ value: String(_.scrollInterval),
415
+ onChange: (h) => _.setScrollInterval(Number(h)),
415
416
  min: 0.1,
416
417
  max: 100,
417
418
  style: {
@@ -421,7 +422,7 @@ const Tn = (r) => {
421
422
  }
422
423
  )
423
424
  ] });
424
- }, he = "_title_roi3a_1", pe = "_subtitle_roi3a_5", me = "_productsBlock_roi3a_14", ge = "_top_roi3a_26", fe = "_products_roi3a_14", xe = "_product_roi3a_14", _e = "_button_roi3a_80", je = "_disabled_roi3a_91", ve = "_buttons_roi3a_118", be = "_addButton_roi3a_164", ye = "_deleteButton_roi3a_179", Y = {
425
+ }, he = "_title_roi3a_1", pe = "_subtitle_roi3a_5", me = "_productsBlock_roi3a_14", ge = "_top_roi3a_26", fe = "_products_roi3a_14", xe = "_product_roi3a_14", _e = "_button_roi3a_80", je = "_disabled_roi3a_91", ve = "_buttons_roi3a_118", be = "_addButton_roi3a_164", ye = "_deleteButton_roi3a_179", V = {
425
426
  title: he,
426
427
  subtitle: pe,
427
428
  productsBlock: me,
@@ -453,14 +454,14 @@ function Ie({ product: r, children: i }) {
453
454
  {
454
455
  ref: e,
455
456
  style: g,
456
- className: `${Y.product} ${u ? Y.dragging : ""}`,
457
+ className: `${V.product} ${u ? V.dragging : ""}`,
457
458
  ...a,
458
459
  ...s,
459
460
  children: i
460
461
  }
461
462
  );
462
463
  }
463
- const $n = (r) => {
464
+ const qn = (r) => {
464
465
  const {
465
466
  isActiveItems: i,
466
467
  setIsActiveItems: a,
@@ -470,13 +471,13 @@ const $n = (r) => {
470
471
  subtitle: d,
471
472
  editable: u = !0,
472
473
  draggable: g = !1,
473
- deletable: f = !0,
474
+ deletable: x = !0,
474
475
  addable: P = !0,
475
- itemsType: j,
476
+ itemsType: v,
476
477
  itemsOptions: n,
477
478
  addableOptions: o = {},
478
479
  limit: p
479
- } = r, [q, x] = m.useState(null), [_, y] = m.useState(null), M = m.useRef(null), z = ht(
480
+ } = r, [E, _] = m.useState(null), [j, N] = m.useState(null), M = m.useRef(null), z = ht(
480
481
  pt(mt, {
481
482
  activationConstraint: {
482
483
  distance: 5
@@ -484,33 +485,33 @@ const $n = (r) => {
484
485
  })
485
486
  );
486
487
  m.useEffect(() => {
487
- if (q) {
488
- const h = [...s].map((S) => S.id === q.id ? q : S);
488
+ if (E) {
489
+ const h = [...s].map((C) => C.id === E.id ? E : C);
489
490
  e(h);
490
491
  }
491
- }, [q]), m.useEffect(() => {
492
- M.current && _ && (M.current.getBoundingClientRect().height, _.top);
493
- }, [M.current, _]);
494
- const R = (h, S) => {
492
+ }, [E]), m.useEffect(() => {
493
+ M.current && j && (M.current.getBoundingClientRect().height, j.top);
494
+ }, [M.current, j]);
495
+ const R = (h, C) => {
495
496
  h.stopPropagation();
496
497
  const k = h.target.getBoundingClientRect();
497
- y({
498
+ N({
498
499
  top: k.top + window.scrollY,
499
500
  left: k.left - 30
500
- }), x(S);
501
- }, I = (h) => {
502
- const { active: S, over: k } = h;
503
- if (k && S.id !== k.id) {
504
- const N = s.findIndex((O) => O.id === S.id), B = s.findIndex((O) => O.id === k.id);
505
- if (N !== -1 && B !== -1) {
506
- const O = [...s], [b] = O.splice(N, 1);
507
- O.splice(B, 0, b), e(O);
501
+ }), _(C);
502
+ }, K = (h) => {
503
+ const { active: C, over: k } = h;
504
+ if (k && C.id !== k.id) {
505
+ const T = s.findIndex((q) => q.id === C.id), I = s.findIndex((q) => q.id === k.id);
506
+ if (T !== -1 && I !== -1) {
507
+ const q = [...s], [y] = q.splice(T, 1);
508
+ q.splice(I, 0, y), e(q);
508
509
  }
509
510
  }
510
- }, H = (h, S) => {
511
+ }, f = (h, C) => {
511
512
  const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
512
513
  g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
513
- v,
514
+ b,
514
515
  {
515
516
  name: "DotsSixVertical",
516
517
  hoverable: !0,
@@ -518,49 +519,49 @@ const $n = (r) => {
518
519
  height: 20
519
520
  }
520
521
  ) }),
521
- j === "select" && n && /* @__PURE__ */ t.jsx(
522
+ v === "select" && n && /* @__PURE__ */ t.jsx(
522
523
  nt,
523
524
  {
524
- onChange: (N) => {
525
- const B = [...s], O = n.find((A) => A.name === N);
526
- if (!O) return;
527
- const b = B.map((A) => A.id === h.id ? {
528
- ...O,
525
+ onChange: (T) => {
526
+ const I = [...s], q = n.find((O) => O.name === T);
527
+ if (!q) return;
528
+ const y = I.map((O) => O.id === h.id ? {
529
+ ...q,
529
530
  name: {
530
- "en-US": N
531
+ "en-US": T
531
532
  }
532
- } : A);
533
- x({
533
+ } : O);
534
+ _({
534
535
  ...h,
535
536
  name: {
536
- "en-US": N
537
+ "en-US": T
537
538
  }
538
- }), e([...b]);
539
+ }), e([...y]);
539
540
  },
540
541
  value: h.name,
541
- options: n.filter((N) => !s.find((B) => B.name === N.name)).map((N) => N.name)
542
+ options: n.filter((T) => !s.find((I) => I.name === T.name)).map((T) => T.name)
542
543
  }
543
544
  ),
544
- /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
545
- u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
546
- v,
545
+ /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
546
+ u && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
547
+ b,
547
548
  {
548
549
  name: "Sliders",
549
550
  hoverable: !0,
550
551
  width: 20,
551
552
  height: 20,
552
- onClick: (N) => R(N, h)
553
+ onClick: (T) => R(T, h)
553
554
  }
554
555
  ) }),
555
- f && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
556
- v,
556
+ x && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
557
+ b,
557
558
  {
558
559
  name: "Trash",
559
560
  hoverable: !0,
560
561
  width: 20,
561
562
  height: 20,
562
563
  fill: "#C12A2A",
563
- onClick: () => e(s.filter((N) => N.id !== h.id))
564
+ onClick: () => e(s.filter((T) => T.id !== h.id))
564
565
  }
565
566
  ) })
566
567
  ] })
@@ -569,22 +570,22 @@ const $n = (r) => {
569
570
  Ie,
570
571
  {
571
572
  product: h,
572
- index: S,
573
+ index: C,
573
574
  children: k
574
575
  },
575
576
  h.id
576
577
  ) : /* @__PURE__ */ t.jsx(
577
578
  "div",
578
579
  {
579
- className: Y.product,
580
+ className: V.product,
580
581
  children: k
581
582
  },
582
583
  h.id
583
584
  );
584
585
  };
585
- return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
586
- (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
- c && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: c }),
586
+ return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
587
+ (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
588
+ c && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: c }),
588
589
  i !== void 0 && /* @__PURE__ */ t.jsx(
589
590
  rt,
590
591
  {
@@ -593,23 +594,23 @@ const $n = (r) => {
593
594
  }
594
595
  )
595
596
  ] }),
596
- /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
597
- d && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: d }),
597
+ /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
598
+ d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
598
599
  g ? /* @__PURE__ */ t.jsx(
599
600
  gt,
600
601
  {
601
602
  sensors: z,
602
- onDragEnd: I,
603
+ onDragEnd: K,
603
604
  children: /* @__PURE__ */ t.jsx(
604
605
  ft,
605
606
  {
606
607
  items: s.map((h) => h.id),
607
608
  strategy: xt,
608
- children: s.map((h, S) => H(h, S))
609
+ children: s.map((h, C) => f(h, C))
609
610
  }
610
611
  )
611
612
  }
612
- ) : s.map((h, S) => H(h, S)),
613
+ ) : s.map((h, C) => f(h, C)),
613
614
  P && /* @__PURE__ */ t.jsx(
614
615
  "div",
615
616
  {
@@ -622,34 +623,34 @@ const $n = (r) => {
622
623
  lt,
623
624
  {
624
625
  withoutHover: !0,
625
- className: F(Y.button, {
626
- [Y.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
626
+ className: U(V.button, {
627
+ [V.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
627
628
  }),
628
629
  size: "s",
629
630
  disabled: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length)),
630
631
  onClick: () => {
631
632
  const h = [...s];
632
- let S = null;
633
+ let C = null;
633
634
  if (n) {
634
635
  for (let k = 0; k < n.length; k++)
635
- if (!s.find((N) => N.id === n[k].id)) {
636
- S = n[k];
636
+ if (!s.find((T) => T.id === n[k].id)) {
637
+ C = n[k];
637
638
  break;
638
639
  }
639
640
  }
640
- j === "select" && n && h.push({
641
- name: S ? S.name : n[0].name,
642
- id: (S == null ? void 0 : S.id) || n[0].id,
641
+ v === "select" && n && h.push({
642
+ name: C ? C.name : n[0].name,
643
+ id: (C == null ? void 0 : C.id) || n[0].id,
643
644
  ...o
644
645
  }), e(h);
645
646
  },
646
647
  style: {
647
648
  width: "fit-content"
648
649
  },
649
- children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
650
+ children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
650
651
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
651
652
  /* @__PURE__ */ t.jsx(
652
- v,
653
+ b,
653
654
  {
654
655
  name: "Plus",
655
656
  width: 16,
@@ -667,7 +668,7 @@ const $n = (r) => {
667
668
  function Ne(r) {
668
669
  const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
669
670
  id: i.id
670
- }), f = {
671
+ }), x = {
671
672
  transform: jt.Transform.toString(d),
672
673
  transition: u
673
674
  };
@@ -675,15 +676,15 @@ function Ne(r) {
675
676
  "div",
676
677
  {
677
678
  ref: c,
678
- style: f,
679
- className: `${V.product} ${g ? V.dragging : ""}`,
679
+ style: x,
680
+ className: `${F.product} ${g ? F.dragging : ""}`,
680
681
  ...s,
681
682
  ...e,
682
683
  children: a
683
684
  }
684
685
  );
685
686
  }
686
- const qn = (r) => {
687
+ const On = (r) => {
687
688
  const {
688
689
  isActiveItems: i,
689
690
  setIsActiveItems: a,
@@ -693,21 +694,21 @@ const qn = (r) => {
693
694
  title: d,
694
695
  subtitle: u,
695
696
  editable: g = !0,
696
- draggable: f = !1,
697
+ draggable: x = !1,
697
698
  deletable: P = !0,
698
- addable: j = !0,
699
+ addable: v = !0,
699
700
  itemsType: n,
700
701
  itemsPlaceholder: o = "",
701
702
  itemsOptions: p,
702
- hasRangeSelector: q = !1,
703
- rangeSelectorOptions: x,
704
- modalOptions: _,
705
- addableOptions: y = {},
703
+ hasRangeSelector: E = !1,
704
+ rangeSelectorOptions: _,
705
+ modalOptions: j,
706
+ addableOptions: N = {},
706
707
  limit: M
707
- } = r, [z, R] = m.useState(null), [I, H] = m.useState({
708
+ } = r, [z, R] = m.useState(null), [K, f] = m.useState({
708
709
  top: 0,
709
710
  left: 0
710
- }), [h, S] = m.useState(null), k = m.useRef(null), [N, B] = m.useState(!1), O = ht(
711
+ }), [h, C] = m.useState(null), k = m.useRef(null), [T, I] = m.useState(!1), q = ht(
711
712
  pt(mt, {
712
713
  activationConstraint: {
713
714
  distance: 5
@@ -716,47 +717,47 @@ const qn = (r) => {
716
717
  );
717
718
  m.useEffect(() => {
718
719
  const l = () => {
719
- R(null), B(!1);
720
+ R(null), I(!1);
720
721
  };
721
- return document.body.addEventListener("click", l), R(null), B(!1), () => {
722
- R(null), B(!1), document.body.removeEventListener("click", l);
722
+ return document.body.addEventListener("click", l), R(null), I(!1), () => {
723
+ R(null), I(!1), document.body.removeEventListener("click", l);
723
724
  };
724
725
  }, []), m.useEffect(() => {
725
726
  if (z) {
726
- const l = [...s].map(($) => $.id === z.id ? z : $);
727
+ const l = [...s].map((B) => B.id === z.id ? z : B);
727
728
  e(l);
728
729
  }
729
730
  }, [z]), m.useEffect(() => {
730
731
  if (k.current && h) {
731
- const l = k.current.getBoundingClientRect().height, $ = window.innerHeight;
732
- let C = h.top;
733
- C + l > $ + window.scrollY - 200 && (C = $ + window.scrollY - l - 200), C < 0 && (C = 10), H({
734
- top: C,
732
+ const l = k.current.getBoundingClientRect().height, B = window.innerHeight;
733
+ let S = h.top;
734
+ S + l > B + window.scrollY - 200 && (S = B + window.scrollY - l - 200), S < 0 && (S = 10), f({
735
+ top: S,
735
736
  left: h.left
736
737
  });
737
738
  }
738
739
  }, [k.current, h]);
739
- const b = (l, $) => {
740
+ const y = (l, B) => {
740
741
  l.stopPropagation();
741
- const C = l.target.getBoundingClientRect();
742
- S({
743
- top: C.top + window.scrollY,
744
- left: C.left - 30
745
- }), R($), B(!0);
746
- }, A = (l) => {
747
- const { active: $, over: C } = l;
748
- if (C && $.id !== C.id) {
749
- const E = s.findIndex((L) => L.id === $.id), tt = s.findIndex((L) => L.id === C.id);
750
- if (E !== -1 && tt !== -1) {
751
- const L = [...s], [K] = L.splice(E, 1);
752
- L.splice(tt, 0, K), e(L);
742
+ const S = l.target.getBoundingClientRect();
743
+ C({
744
+ top: S.top + window.scrollY,
745
+ left: S.left - 30
746
+ }), R(B), I(!0);
747
+ }, O = (l) => {
748
+ const { active: B, over: S } = l;
749
+ if (S && B.id !== S.id) {
750
+ const A = s.findIndex((L) => L.id === B.id), tt = s.findIndex((L) => L.id === S.id);
751
+ if (A !== -1 && tt !== -1) {
752
+ const L = [...s], [Z] = L.splice(A, 1);
753
+ L.splice(tt, 0, Z), e(L);
753
754
  }
754
755
  }
755
- }, U = (l) => {
756
- var C;
757
- const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
758
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
759
- v,
756
+ }, H = (l) => {
757
+ var S;
758
+ const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
759
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
760
+ b,
760
761
  {
761
762
  name: "DotsSixVertical",
762
763
  hoverable: !0,
@@ -767,36 +768,36 @@ const qn = (r) => {
767
768
  n === "select" && p && /* @__PURE__ */ t.jsx(
768
769
  nt,
769
770
  {
770
- onChange: (E) => {
771
- const L = [...s].map((K) => K.id === l.id ? {
771
+ onChange: (A) => {
772
+ const L = [...s].map((Z) => Z.id === l.id ? {
772
773
  ...l,
773
774
  name: {
774
- "en-US": E
775
+ "en-US": A
775
776
  }
776
- } : K);
777
+ } : Z);
777
778
  R({
778
779
  ...l,
779
780
  name: {
780
- "en-US": E
781
+ "en-US": A
781
782
  }
782
783
  }), e([...L]);
783
784
  },
784
785
  value: l.name["en-US"],
785
786
  options: p.filter(
786
- (E) => !s.find((tt) => tt.name["en-US"] === E)
787
+ (A) => !s.find((tt) => tt.name["en-US"] === A)
787
788
  )
788
789
  }
789
790
  ),
790
791
  n === "input" && /* @__PURE__ */ t.jsx(
791
792
  Nt,
792
793
  {
793
- onChange: (E) => {
794
- const L = [...s].map((K) => K.id === l.id ? {
794
+ onChange: (A) => {
795
+ const L = [...s].map((Z) => Z.id === l.id ? {
795
796
  ...l,
796
797
  name: {
797
- "en-US": E
798
+ "en-US": A
798
799
  }
799
- } : K);
800
+ } : Z);
800
801
  e([...L]);
801
802
  },
802
803
  value: l.name["en-US"],
@@ -806,59 +807,59 @@ const qn = (r) => {
806
807
  n === "image" && /* @__PURE__ */ t.jsx(
807
808
  qt,
808
809
  {
809
- onChange: (E) => {
810
- const L = [...s].map((K) => K.id === l.id ? {
810
+ onChange: (A) => {
811
+ const L = [...s].map((Z) => Z.id === l.id ? {
811
812
  ...l,
812
- images: E
813
- } : K);
813
+ images: A
814
+ } : Z);
814
815
  e([...L]);
815
816
  },
816
- activeImage: (C = s.find((E) => E.id === l.id)) == null ? void 0 : C.images[0]
817
+ activeImage: (S = s.find((A) => A.id === l.id)) == null ? void 0 : S.images[0]
817
818
  }
818
819
  ),
819
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
820
- g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
821
- v,
820
+ /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
821
+ g && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
822
+ b,
822
823
  {
823
824
  name: "Sliders",
824
825
  hoverable: !0,
825
826
  width: 20,
826
827
  height: 20,
827
- onClick: (E) => b(E, l)
828
+ onClick: (A) => y(A, l)
828
829
  }
829
830
  ) }),
830
- P && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
831
- v,
831
+ P && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
832
+ b,
832
833
  {
833
834
  name: "Trash",
834
835
  hoverable: !0,
835
836
  width: 20,
836
837
  height: 20,
837
838
  fill: "#C12A2A",
838
- onClick: () => e(s.filter((E) => E.id !== l.id))
839
+ onClick: () => e(s.filter((A) => A.id !== l.id))
839
840
  }
840
841
  ) })
841
842
  ] })
842
843
  ] });
843
- return f ? /* @__PURE__ */ t.jsx(
844
+ return x ? /* @__PURE__ */ t.jsx(
844
845
  Ne,
845
846
  {
846
847
  product: l,
847
- children: $
848
+ children: B
848
849
  },
849
850
  l.id
850
851
  ) : /* @__PURE__ */ t.jsx(
851
852
  "div",
852
853
  {
853
- className: V.product,
854
- children: $
854
+ className: F.product,
855
+ children: B
855
856
  },
856
857
  l.id
857
858
  );
858
859
  };
859
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
860
- (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
861
- d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
860
+ return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
861
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
862
+ d && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: d }),
862
863
  i !== void 0 && /* @__PURE__ */ t.jsx(
863
864
  rt,
864
865
  {
@@ -867,36 +868,36 @@ const qn = (r) => {
867
868
  }
868
869
  )
869
870
  ] }),
870
- z && g && _ && N && /* @__PURE__ */ t.jsx(
871
- $t,
871
+ z && g && j && T && /* @__PURE__ */ t.jsx(
872
+ Tt,
872
873
  {
873
874
  ref: k,
874
875
  activeItem: z,
875
876
  setActiveItem: R,
876
- popupPosition: I,
877
- modalOptions: _,
878
- setIsOpenModal: B
877
+ popupPosition: K,
878
+ modalOptions: j,
879
+ setIsOpenModal: I
879
880
  }
880
881
  ),
881
- q && x && /* @__PURE__ */ t.jsx(kt, { ...x }),
882
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
883
- u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
884
- f ? /* @__PURE__ */ t.jsx(
882
+ E && _ && /* @__PURE__ */ t.jsx(kt, { ..._ }),
883
+ /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
884
+ u && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: u }),
885
+ x ? /* @__PURE__ */ t.jsx(
885
886
  gt,
886
887
  {
887
- sensors: O,
888
- onDragEnd: A,
888
+ sensors: q,
889
+ onDragEnd: O,
889
890
  children: /* @__PURE__ */ t.jsx(
890
891
  ft,
891
892
  {
892
893
  items: s.map((l) => l.id),
893
894
  strategy: xt,
894
- children: s.map((l) => U(l))
895
+ children: s.map((l) => H(l))
895
896
  }
896
897
  )
897
898
  }
898
- ) : s.map((l) => U(l)),
899
- j && /* @__PURE__ */ t.jsx(
899
+ ) : s.map((l) => H(l)),
900
+ v && /* @__PURE__ */ t.jsx(
900
901
  "div",
901
902
  {
902
903
  style: {
@@ -908,52 +909,52 @@ const qn = (r) => {
908
909
  lt,
909
910
  {
910
911
  withoutHover: !0,
911
- className: F(V.button, {
912
- [V.disabled]: !!(M && M <= s.length)
912
+ className: U(F.button, {
913
+ [F.disabled]: !!(M && M <= s.length)
913
914
  }),
914
915
  size: "s",
915
916
  disabled: !!(M && M <= s.length),
916
917
  onClick: () => {
917
918
  const l = [...s];
918
- let $ = null;
919
+ let B = null;
919
920
  if (p) {
920
- for (let C = 0; C < p.length; C++)
921
- if (!s.find((E) => E.name["en-US"] === p[C])) {
922
- $ = p[C];
921
+ for (let S = 0; S < p.length; S++)
922
+ if (!s.find((A) => A.name["en-US"] === p[S])) {
923
+ B = p[S];
923
924
  break;
924
925
  }
925
926
  }
926
927
  n === "select" && p ? l.push({
927
928
  name: {
928
- "en-US": $ || p[0]
929
+ "en-US": B || p[0]
929
930
  },
930
- id: Z(),
931
- ...y,
931
+ id: J(),
932
+ ...N,
932
933
  maxSymbols: 100
933
934
  // пример значения
934
935
  }) : n === "input" ? l.push({
935
936
  name: {
936
937
  "en-US": ""
937
938
  },
938
- id: Z(),
939
- ...y,
939
+ id: J(),
940
+ ...N,
940
941
  maxSymbols: 100
941
942
  }) : l.push({
942
943
  name: {
943
944
  "en-US": `Image ${s.length + 1}`
944
945
  },
945
- id: Z(),
946
- ...y,
946
+ id: J(),
947
+ ...N,
947
948
  maxSymbols: 100
948
949
  }), e(l);
949
950
  },
950
951
  style: {
951
952
  width: "fit-content"
952
953
  },
953
- children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
954
+ children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
954
955
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
955
956
  /* @__PURE__ */ t.jsx(
956
- v,
957
+ b,
957
958
  {
958
959
  name: "Plus",
959
960
  width: 16,
@@ -974,52 +975,52 @@ const qn = (r) => {
974
975
  }
975
976
  )
976
977
  ] });
977
- }, Ce = "_subtitle_jql1y_1", Se = "_products_jql1y_10", ke = "_product_jql1y_10", we = "_button_jql1y_11", Pe = "_buttons_jql1y_11", Me = "_addButton_jql1y_150", Be = "_deleteButton_jql1y_165", et = {
978
+ }, Ce = "_subtitle_jql1y_1", Se = "_products_jql1y_10", ke = "_product_jql1y_10", we = "_button_jql1y_11", Pe = "_buttons_jql1y_11", Me = "_addButton_jql1y_150", $e = "_deleteButton_jql1y_165", et = {
978
979
  subtitle: Ce,
979
980
  products: Se,
980
981
  product: ke,
981
982
  button: we,
982
983
  buttons: Pe,
983
984
  addButton: Me,
984
- deleteButton: Be
985
- }, Te = (r) => {
986
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [f, P] = m.useState({
985
+ deleteButton: $e
986
+ }, Be = (r) => {
987
+ const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [x, P] = m.useState({
987
988
  top: 0,
988
989
  left: 0
989
- }), [j, n] = m.useState(null), o = m.useRef(null);
990
+ }), [v, n] = m.useState(null), o = m.useRef(null);
990
991
  m.useEffect(() => {
991
992
  if (u) {
992
- const x = [...i].map((_) => _.id === u.id ? u : _);
993
- a(x);
993
+ const _ = [...i].map((j) => j.id === u.id ? u : j);
994
+ a(_);
994
995
  }
995
996
  }, [u]), m.useEffect(() => {
996
- if (o.current && j) {
997
- const x = o.current.getBoundingClientRect().height, _ = window.innerHeight;
998
- let y = j.top;
999
- y + x > _ + window.scrollY - 200 && (y = _ + window.scrollY - x - 200), y < 0 && (y = 10), P({
1000
- top: y,
1001
- left: j.left
997
+ if (o.current && v) {
998
+ const _ = o.current.getBoundingClientRect().height, j = window.innerHeight;
999
+ let N = v.top;
1000
+ N + _ > j + window.scrollY - 200 && (N = j + window.scrollY - _ - 200), N < 0 && (N = 10), P({
1001
+ top: N,
1002
+ left: v.left
1002
1003
  });
1003
1004
  }
1004
- }, [o.current, j]);
1005
- const p = (x, _) => {
1006
- x.stopPropagation();
1007
- const y = x.target.getBoundingClientRect();
1005
+ }, [o.current, v]);
1006
+ const p = (_, j) => {
1007
+ _.stopPropagation();
1008
+ const N = _.target.getBoundingClientRect();
1008
1009
  n({
1009
- top: y.top + window.scrollY - 70,
1010
- left: y.left - (e ? 30 : 65)
1011
- }), g(_);
1012
- }, q = (x, _) => {
1013
- const y = [...i], M = {
1014
- ...x,
1010
+ top: N.top + window.scrollY - 70,
1011
+ left: N.left - (e ? 30 : 65)
1012
+ }), g(j);
1013
+ }, E = (_, j) => {
1014
+ const N = [...i], M = {
1015
+ ..._,
1015
1016
  id: Math.random().toString(36).substr(2, 9)
1016
1017
  // Генерируем новый уникальный ID
1017
1018
  };
1018
- y.splice(_ + 1, 0, M), a(y);
1019
+ N.splice(j + 1, 0, M), a(N);
1019
1020
  };
1020
1021
  return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
1021
1022
  /* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
1022
- i.map((x, _) => /* @__PURE__ */ t.jsxs(
1023
+ i.map((_, j) => /* @__PURE__ */ t.jsxs(
1023
1024
  "div",
1024
1025
  {
1025
1026
  className: et.product,
@@ -1027,50 +1028,50 @@ const qn = (r) => {
1027
1028
  /* @__PURE__ */ t.jsx(
1028
1029
  nt,
1029
1030
  {
1030
- onChange: (y) => {
1031
- const z = [...i].map((R) => R.id === x.id ? {
1032
- ...x,
1033
- type: y
1031
+ onChange: (N) => {
1032
+ const z = [...i].map((R) => R.id === _.id ? {
1033
+ ..._,
1034
+ type: N
1034
1035
  } : R);
1035
1036
  a(z);
1036
1037
  },
1037
- value: x.type,
1038
+ value: _.type,
1038
1039
  options: ["Primary", "Secondary", "Tertiary"]
1039
1040
  }
1040
1041
  ),
1041
1042
  /* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
1042
1043
  /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1043
- v,
1044
+ b,
1044
1045
  {
1045
1046
  name: "Copy",
1046
1047
  hoverable: !0,
1047
1048
  width: 20,
1048
1049
  height: 20,
1049
1050
  onClick: () => {
1050
- q(x, _);
1051
+ E(_, j);
1051
1052
  }
1052
1053
  }
1053
1054
  ) }),
1054
1055
  /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1055
- v,
1056
+ b,
1056
1057
  {
1057
1058
  name: "Sliders",
1058
1059
  hoverable: !0,
1059
1060
  width: 20,
1060
1061
  height: 20,
1061
- onClick: (y) => {
1062
- p(y, x);
1062
+ onClick: (N) => {
1063
+ p(N, _);
1063
1064
  }
1064
1065
  }
1065
1066
  ) }),
1066
1067
  s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1067
- v,
1068
+ b,
1068
1069
  {
1069
1070
  name: "Trash",
1070
1071
  hoverable: !0,
1071
1072
  onClick: () => {
1072
- const y = i.filter((M) => M.id !== x.id);
1073
- a(y);
1073
+ const N = i.filter((M) => M.id !== _.id);
1074
+ a(N);
1074
1075
  },
1075
1076
  width: 20,
1076
1077
  height: 20,
@@ -1080,7 +1081,7 @@ const qn = (r) => {
1080
1081
  ] })
1081
1082
  ]
1082
1083
  },
1083
- x.id
1084
+ _.id
1084
1085
  )),
1085
1086
  u && /* @__PURE__ */ t.jsx(
1086
1087
  Ot,
@@ -1088,7 +1089,7 @@ const qn = (r) => {
1088
1089
  ref: o,
1089
1090
  activeButton: u,
1090
1091
  setActiveButton: g,
1091
- popupPosition: f,
1092
+ popupPosition: x,
1092
1093
  editableLink: c
1093
1094
  }
1094
1095
  ),
@@ -1107,10 +1108,10 @@ const qn = (r) => {
1107
1108
  className: et.button,
1108
1109
  size: "s",
1109
1110
  onClick: () => {
1110
- const x = [...i];
1111
- c ? x.push({
1111
+ const _ = [...i];
1112
+ c ? _.push({
1112
1113
  type: "Primary",
1113
- id: Z(),
1114
+ id: J(),
1114
1115
  typesText: [],
1115
1116
  text: {
1116
1117
  "en-US": "Button Name"
@@ -1118,9 +1119,9 @@ const qn = (r) => {
1118
1119
  destination: "Go to Page",
1119
1120
  page: d ? Object.values(d)[0].path : "/",
1120
1121
  openInNewTab: !1
1121
- }) : x.push({
1122
+ }) : _.push({
1122
1123
  type: "Primary",
1123
- id: Z(),
1124
+ id: J(),
1124
1125
  typesText: [],
1125
1126
  text: {
1126
1127
  "en-US": "Create Ticket"
@@ -1128,7 +1129,7 @@ const qn = (r) => {
1128
1129
  destination: "Go to Page",
1129
1130
  page: d ? Object.values(d)[0].path : "/",
1130
1131
  openInNewTab: !1
1131
- }), a(x);
1132
+ }), a(_);
1132
1133
  },
1133
1134
  style: {
1134
1135
  width: "fit-content"
@@ -1136,7 +1137,7 @@ const qn = (r) => {
1136
1137
  children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
1137
1138
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1138
1139
  /* @__PURE__ */ t.jsx(
1139
- v,
1140
+ b,
1140
1141
  {
1141
1142
  name: "Plus",
1142
1143
  width: 16,
@@ -1149,7 +1150,7 @@ const qn = (r) => {
1149
1150
  }
1150
1151
  )
1151
1152
  ] });
1152
- }, On = (r) => {
1153
+ }, An = (r) => {
1153
1154
  const {
1154
1155
  isActiveButtons: i,
1155
1156
  setIsActiveButtons: a,
@@ -1171,7 +1172,7 @@ const qn = (r) => {
1171
1172
  )
1172
1173
  ] }),
1173
1174
  i && /* @__PURE__ */ t.jsx(
1174
- Te,
1175
+ Be,
1175
1176
  {
1176
1177
  buttons: s,
1177
1178
  setButtons: e,
@@ -1182,10 +1183,10 @@ const qn = (r) => {
1182
1183
  )
1183
1184
  ] }) });
1184
1185
  };
1185
- function $e(r) {
1186
+ function Te(r) {
1186
1187
  const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
1187
1188
  id: String(i.listingId)
1188
- }), f = {
1189
+ }), x = {
1189
1190
  transform: jt.Transform.toString(d),
1190
1191
  transition: u
1191
1192
  };
@@ -1193,15 +1194,15 @@ function $e(r) {
1193
1194
  "div",
1194
1195
  {
1195
1196
  ref: c,
1196
- style: f,
1197
- className: `${X.product} ${g ? X.dragging : ""}`,
1197
+ style: x,
1198
+ className: `${W.product} ${g ? W.dragging : ""}`,
1198
1199
  ...s,
1199
1200
  ...e,
1200
1201
  children: a
1201
1202
  }
1202
1203
  );
1203
1204
  }
1204
- const An = (r) => {
1205
+ const En = (r) => {
1205
1206
  const {
1206
1207
  isActiveItems: i,
1207
1208
  setIsActiveItems: a,
@@ -1211,21 +1212,21 @@ const An = (r) => {
1211
1212
  title: d,
1212
1213
  subtitle: u,
1213
1214
  editable: g = !0,
1214
- draggable: f = !1,
1215
+ draggable: x = !1,
1215
1216
  withImage: P = !1,
1216
- deletable: j = !0,
1217
+ deletable: v = !0,
1217
1218
  addable: n = !0,
1218
1219
  itemsType: o,
1219
1220
  itemsOptions: p,
1220
- limit: q,
1221
- aspectRatio: x,
1222
- setAspectRatio: _
1223
- } = r, [y, M] = m.useState(
1221
+ limit: E,
1222
+ aspectRatio: _,
1223
+ setAspectRatio: j
1224
+ } = r, [N, M] = m.useState(
1224
1225
  null
1225
1226
  ), [z, R] = m.useState({
1226
1227
  top: 0,
1227
1228
  left: 0
1228
- }), [I, H] = m.useState(!1), h = ht(
1229
+ }), [K, f] = m.useState(!1), h = ht(
1229
1230
  pt(mt, {
1230
1231
  activationConstraint: {
1231
1232
  distance: 5
@@ -1233,39 +1234,39 @@ const An = (r) => {
1233
1234
  })
1234
1235
  );
1235
1236
  m.useEffect(() => {
1236
- const b = () => {
1237
- M(null), H(!1);
1237
+ const y = () => {
1238
+ M(null), f(!1);
1238
1239
  };
1239
- return document.body.addEventListener("click", b), M(null), H(!1), () => {
1240
- M(null), H(!1), document.body.removeEventListener("click", b);
1240
+ return document.body.addEventListener("click", y), M(null), f(!1), () => {
1241
+ M(null), f(!1), document.body.removeEventListener("click", y);
1241
1242
  };
1242
1243
  }, []), m.useEffect(() => {
1243
- if (y) {
1244
- const b = [...s].map((A) => A.listingId === y.listingId ? y : A);
1245
- e(b);
1244
+ if (N) {
1245
+ const y = [...s].map((O) => O.listingId === N.listingId ? N : O);
1246
+ e(y);
1246
1247
  }
1247
- }, [y]);
1248
- const S = (b, A) => {
1249
- b.stopPropagation();
1250
- const U = b.target.getBoundingClientRect(), l = 100, $ = window.innerHeight;
1251
- let C = U.top + window.scrollY;
1252
- C + l > $ && (C = $ - l - 20), H(!0), R({
1253
- top: C - 80,
1254
- left: U.left - 30
1255
- }), M(A);
1248
+ }, [N]);
1249
+ const C = (y, O) => {
1250
+ y.stopPropagation();
1251
+ const H = y.target.getBoundingClientRect(), l = 100, B = window.innerHeight;
1252
+ let S = H.top + window.scrollY;
1253
+ S + l > B && (S = B - l - 20), f(!0), R({
1254
+ top: S - 80,
1255
+ left: H.left - 30
1256
+ }), M(O);
1256
1257
  };
1257
- function k(b) {
1258
+ function k(y) {
1258
1259
  if (P)
1259
- return b ? /* @__PURE__ */ t.jsx(
1260
+ return y ? /* @__PURE__ */ t.jsx(
1260
1261
  "img",
1261
1262
  {
1262
- src: `https://imagedelivery.net/${b}/w=1000`,
1263
+ src: `https://imagedelivery.net/${y}/w=1000`,
1263
1264
  alt: "image",
1264
1265
  width: 16,
1265
1266
  height: 16
1266
1267
  }
1267
1268
  ) : /* @__PURE__ */ t.jsx(
1268
- v,
1269
+ b,
1269
1270
  {
1270
1271
  name: "Image",
1271
1272
  width: 16,
@@ -1274,21 +1275,21 @@ const An = (r) => {
1274
1275
  }
1275
1276
  );
1276
1277
  }
1277
- const N = (b) => {
1278
- const { active: A, over: U } = b;
1279
- if (U && A.id !== U.id) {
1280
- const l = s.findIndex((C) => String(C.listingId) === A.id), $ = s.findIndex((C) => String(C.listingId) === U.id);
1281
- if (l !== -1 && $ !== -1) {
1282
- const C = [...s], [E] = C.splice(l, 1);
1283
- C.splice($, 0, E), e(C);
1278
+ const T = (y) => {
1279
+ const { active: O, over: H } = y;
1280
+ if (H && O.id !== H.id) {
1281
+ const l = s.findIndex((S) => String(S.listingId) === O.id), B = s.findIndex((S) => String(S.listingId) === H.id);
1282
+ if (l !== -1 && B !== -1) {
1283
+ const S = [...s], [A] = S.splice(l, 1);
1284
+ S.splice(B, 0, A), e(S);
1284
1285
  }
1285
1286
  }
1286
- }, B = (b) => {
1287
- const A = p.find((l) => b.listingId === l.id);
1288
- if (!A) return null;
1289
- const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1291
- v,
1287
+ }, I = (y) => {
1288
+ const O = p.find((l) => y.listingId === l.id);
1289
+ if (!O) return null;
1290
+ const H = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1291
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1292
+ b,
1292
1293
  {
1293
1294
  name: "DotsSixVertical",
1294
1295
  hoverable: !0,
@@ -1300,106 +1301,106 @@ const An = (r) => {
1300
1301
  nt,
1301
1302
  {
1302
1303
  onChange: (l) => {
1303
- const $ = [...s], C = p.find((L) => L.productData.name === l);
1304
- if (!C) return;
1305
- const E = {
1306
- listingId: C.id,
1307
- image: C.productData.images.length > 0 ? C.productData.images[0].cfId : ""
1308
- }, tt = $.map((L) => L.listingId === b.listingId ? E : L);
1309
- M(E), e([...tt]);
1304
+ const B = [...s], S = p.find((L) => L.productData.name === l);
1305
+ if (!S) return;
1306
+ const A = {
1307
+ listingId: S.id,
1308
+ image: S.productData.images.length > 0 ? S.productData.images[0].cfId : ""
1309
+ }, tt = B.map((L) => L.listingId === y.listingId ? A : L);
1310
+ M(A), e([...tt]);
1310
1311
  },
1311
- value: A.productData.name,
1312
+ value: O.productData.name,
1312
1313
  options: [
1313
- ...p.filter((l) => !s.find(($) => $.listingId === l.id)).map((l) => l.productData.name)
1314
+ ...p.filter((l) => !s.find((B) => B.listingId === l.id)).map((l) => l.productData.name)
1314
1315
  ],
1315
1316
  leftAddonOptions: p.map((l) => {
1316
- var $;
1317
+ var B;
1317
1318
  return {
1318
1319
  value: l.productData.name,
1319
- addon: k((($ = l.productData.images[0]) == null ? void 0 : $.cfId) || "")
1320
+ addon: k(((B = l.productData.images[0]) == null ? void 0 : B.cfId) || "")
1320
1321
  };
1321
1322
  })
1322
1323
  }
1323
1324
  ),
1324
- /* @__PURE__ */ t.jsxs("div", { className: X.buttons, children: [
1325
- g && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1326
- v,
1325
+ /* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
1326
+ g && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1327
+ b,
1327
1328
  {
1328
1329
  name: "Sliders",
1329
1330
  hoverable: !0,
1330
1331
  width: 20,
1331
1332
  height: 20,
1332
- onClick: (l) => S(l, b)
1333
+ onClick: (l) => C(l, y)
1333
1334
  }
1334
1335
  ) }),
1335
- j && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1336
- v,
1336
+ v && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1337
+ b,
1337
1338
  {
1338
1339
  name: "Trash",
1339
1340
  hoverable: !0,
1340
1341
  width: 20,
1341
1342
  height: 20,
1342
1343
  fill: "#C12A2A",
1343
- onClick: () => e(s.filter((l) => l !== b))
1344
+ onClick: () => e(s.filter((l) => l !== y))
1344
1345
  }
1345
1346
  ) })
1346
1347
  ] })
1347
1348
  ] });
1348
- return f ? /* @__PURE__ */ t.jsx(
1349
- $e,
1349
+ return x ? /* @__PURE__ */ t.jsx(
1350
+ Te,
1350
1351
  {
1351
- product: b,
1352
- children: U
1352
+ product: y,
1353
+ children: H
1353
1354
  },
1354
- b.listingId
1355
+ y.listingId
1355
1356
  ) : /* @__PURE__ */ t.jsx(
1356
1357
  "div",
1357
1358
  {
1358
- className: X.product,
1359
- children: U
1359
+ className: W.product,
1360
+ children: H
1360
1361
  },
1361
- b.listingId
1362
+ y.listingId
1362
1363
  );
1363
- }, O = m.useRef(null);
1364
- return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
1365
- (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
- d && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: d }),
1364
+ }, q = m.useRef(null);
1365
+ return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
1366
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
1367
+ d && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: d }),
1367
1368
  i !== void 0 && /* @__PURE__ */ t.jsx(
1368
1369
  rt,
1369
1370
  {
1370
1371
  current: i,
1371
- onChange: (b) => a == null ? void 0 : a(b)
1372
+ onChange: (y) => a == null ? void 0 : a(y)
1372
1373
  }
1373
1374
  )
1374
1375
  ] }),
1375
- I && y && /* @__PURE__ */ t.jsx(
1376
+ K && N && /* @__PURE__ */ t.jsx(
1376
1377
  At,
1377
1378
  {
1378
- ref: O,
1379
- activeItem: y,
1379
+ ref: q,
1380
+ activeItem: N,
1380
1381
  setActiveItem: M,
1381
- setIsOpenModal: H,
1382
+ setIsOpenModal: f,
1382
1383
  popupPosition: z,
1383
1384
  itemsOptions: p
1384
1385
  }
1385
1386
  ),
1386
- i && /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
1387
- u && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: u }),
1388
- f ? /* @__PURE__ */ t.jsx(
1387
+ i && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
1388
+ u && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: u }),
1389
+ x ? /* @__PURE__ */ t.jsx(
1389
1390
  gt,
1390
1391
  {
1391
1392
  sensors: h,
1392
- onDragEnd: N,
1393
+ onDragEnd: T,
1393
1394
  children: /* @__PURE__ */ t.jsx(
1394
1395
  ft,
1395
1396
  {
1396
- items: s.map((b) => String(b.listingId)),
1397
+ items: s.map((y) => String(y.listingId)),
1397
1398
  strategy: xt,
1398
- children: s.map((b) => B(b))
1399
+ children: s.map((y) => I(y))
1399
1400
  }
1400
1401
  )
1401
1402
  }
1402
- ) : s.map((b) => B(b)),
1403
+ ) : s.map((y) => I(y)),
1403
1404
  n && /* @__PURE__ */ t.jsx(
1404
1405
  "div",
1405
1406
  {
@@ -1412,28 +1413,28 @@ const An = (r) => {
1412
1413
  lt,
1413
1414
  {
1414
1415
  withoutHover: !0,
1415
- className: X.button,
1416
+ className: W.button,
1416
1417
  size: "s",
1417
1418
  onClick: () => {
1418
- const b = [...s];
1419
- for (let A = 0; A < p.length; A++)
1420
- if (!s.find((U) => U.listingId === p[A].id)) {
1421
- b.push({
1422
- listingId: p[A].id,
1423
- image: p[A].productData.images.length > 0 ? p[A].productData.images[0].cfId : ""
1419
+ const y = [...s];
1420
+ for (let O = 0; O < p.length; O++)
1421
+ if (!s.find((H) => H.listingId === p[O].id)) {
1422
+ y.push({
1423
+ listingId: p[O].id,
1424
+ image: p[O].productData.images.length > 0 ? p[O].productData.images[0].cfId : ""
1424
1425
  });
1425
1426
  break;
1426
1427
  }
1427
- e(b);
1428
+ e(y);
1428
1429
  },
1429
- disabled: s.length === (q || p.length),
1430
+ disabled: s.length === (E || p.length),
1430
1431
  style: {
1431
1432
  width: "fit-content"
1432
1433
  },
1433
- children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
1434
+ children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
1434
1435
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1435
1436
  /* @__PURE__ */ t.jsx(
1436
- v,
1437
+ b,
1437
1438
  {
1438
1439
  name: "Plus",
1439
1440
  width: 16,
@@ -1446,12 +1447,12 @@ const An = (r) => {
1446
1447
  }
1447
1448
  )
1448
1449
  ] }),
1449
- x && _ && /* @__PURE__ */ t.jsx(
1450
+ _ && j && /* @__PURE__ */ t.jsx(
1450
1451
  nt,
1451
1452
  {
1452
- value: x,
1453
+ value: _,
1453
1454
  options: Object.keys(Pt),
1454
- onChange: (b) => _(b),
1455
+ onChange: (y) => j(y),
1455
1456
  leftAddonOptions: wt
1456
1457
  }
1457
1458
  ),
@@ -1463,7 +1464,7 @@ const An = (r) => {
1463
1464
  }
1464
1465
  )
1465
1466
  ] });
1466
- }, qe = "_options_167h8_1", Oe = "_price_167h8_18", Ae = "_oldPrice_167h8_25", Ee = "_newPrice_167h8_33", De = "_animate_167h8_40", Re = "_meta_167h8_58", Le = "_info_167h8_64", ze = "_infoRight_167h8_73", He = "_buttons_167h8_80", Ue = "_variants_167h8_87", Fe = "_variant_167h8_87", Ve = "_stock_167h8_105", Ye = "_variantInfo_167h8_112", Ge = "_quantity_167h8_119", We = "_button_167h8_80", Xe = "_activeVariant_167h8_165", Qe = "_chargeTypes_167h8_169", Je = "_charge_167h8_169", Ke = "_chargeActive_167h8_194", Ze = "_title_167h8_202", T = {
1467
+ }, qe = "_options_167h8_1", Oe = "_price_167h8_18", Ae = "_oldPrice_167h8_25", Ee = "_newPrice_167h8_33", De = "_animate_167h8_40", Re = "_meta_167h8_58", Le = "_info_167h8_64", ze = "_infoRight_167h8_73", He = "_buttons_167h8_80", Ue = "_variants_167h8_87", Fe = "_variant_167h8_87", Ve = "_stock_167h8_105", Ye = "_variantInfo_167h8_112", Ge = "_quantity_167h8_119", We = "_button_167h8_80", Xe = "_activeVariant_167h8_165", Qe = "_chargeTypes_167h8_169", Je = "_charge_167h8_169", Ke = "_chargeActive_167h8_194", Ze = "_title_167h8_202", $ = {
1467
1468
  options: qe,
1468
1469
  price: Oe,
1469
1470
  oldPrice: Ae,
@@ -1487,111 +1488,125 @@ const An = (r) => {
1487
1488
  };
1488
1489
  var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
1489
1490
  const ts = (r) => {
1490
- var z, R;
1491
+ var R, K;
1491
1492
  const { product: i, setIsOpen: a } = r, { variants: s } = i, [e, c] = m.useState(s[0]), [d, u] = m.useState(
1492
1493
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1493
- ), { notifications: g, setNotifications: f } = Ct(), P = bt(), [j, n] = m.useState(1), { reset: o, addProductToCart: p } = at(), [q, x] = m.useState(!1);
1494
+ ), { notifications: g, setNotifications: x } = Ct(), P = bt(), [v, n] = m.useState(1), { cart: o, reset: p, addProductToCart: E } = at(), [_, j] = m.useState(!1);
1494
1495
  m.useEffect(() => {
1495
- x(!0);
1496
- const I = setTimeout(() => x(!1), 600);
1497
- return () => clearTimeout(I);
1498
- }, [j]);
1499
- async function _() {
1500
- await p({
1501
- productId: i.id,
1502
- productVariantId: e.id,
1503
- quantity: j
1504
- }), a == null || a(!1), f([
1505
- ...g,
1506
- {
1507
- id: Z(),
1508
- message: "Product added to cart",
1509
- status: "success"
1510
- }
1511
- ]);
1496
+ j(!0);
1497
+ const f = setTimeout(() => j(!1), 600);
1498
+ return () => clearTimeout(f);
1499
+ }, [v]);
1500
+ async function N() {
1501
+ try {
1502
+ await E({
1503
+ productId: i.id,
1504
+ productVariantId: e.id,
1505
+ quantity: v
1506
+ }), x([
1507
+ ...g,
1508
+ {
1509
+ id: J(),
1510
+ message: "Product added to cart",
1511
+ status: "success"
1512
+ }
1513
+ ]);
1514
+ } catch (f) {
1515
+ x([
1516
+ ...g,
1517
+ {
1518
+ id: J(),
1519
+ message: `Product failed to add to cart: ${f}`,
1520
+ status: "error"
1521
+ }
1522
+ ]);
1523
+ }
1524
+ a == null || a(!1);
1512
1525
  }
1513
- function y() {
1514
- o(), _(), P("/checkout");
1526
+ function M() {
1527
+ p(), N(), P("/checkout");
1515
1528
  }
1516
- function M(I) {
1517
- if (I >= 864e5) {
1518
- const N = Math.floor(I / 864e5);
1519
- return `${N} ${N === 1 ? "day" : "days"}`;
1520
- } else if (I >= 36e5) {
1521
- const N = Math.floor(I / 36e5);
1522
- return `${N} ${N === 1 ? "hour" : "hours"}`;
1523
- } else if (I >= 6e4) {
1524
- const N = Math.floor(I / 6e4);
1525
- return `${N} ${N === 1 ? "minute" : "minutes"}`;
1529
+ function z(f) {
1530
+ if (f >= 864e5) {
1531
+ const I = Math.floor(f / 864e5);
1532
+ return `${I} ${I === 1 ? "day" : "days"}`;
1533
+ } else if (f >= 36e5) {
1534
+ const I = Math.floor(f / 36e5);
1535
+ return `${I} ${I === 1 ? "hour" : "hours"}`;
1536
+ } else if (f >= 6e4) {
1537
+ const I = Math.floor(f / 6e4);
1538
+ return `${I} ${I === 1 ? "minute" : "minutes"}`;
1526
1539
  } else {
1527
- const N = Math.floor(I / 1e3);
1528
- return `${N} ${N === 1 ? "second" : "seconds"}`;
1540
+ const I = Math.floor(f / 1e3);
1541
+ return `${I} ${I === 1 ? "second" : "seconds"}`;
1529
1542
  }
1530
1543
  }
1531
1544
  return m.useEffect(() => {
1532
1545
  e.quantity && e.quantity.available === 0 ? n(0) : n(1);
1533
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
1534
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((I) => /* @__PURE__ */ t.jsx(
1546
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: $.options, children: [
1547
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: $.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
1535
1548
  "div",
1536
1549
  {
1537
- className: F(T.charge, {
1538
- [T.chargeActive]: d === I
1550
+ className: U($.charge, {
1551
+ [$.chargeActive]: d === f
1539
1552
  }),
1540
- onClick: () => u(I),
1541
- children: St[I]
1553
+ onClick: () => u(f),
1554
+ children: St[f]
1542
1555
  },
1543
- I
1556
+ f
1544
1557
  )) }),
1545
- /* @__PURE__ */ t.jsx("div", { className: T.variants, children: s.map((I) => {
1546
- var H, h;
1558
+ /* @__PURE__ */ t.jsx("div", { className: $.variants, children: s.map((f) => {
1559
+ var h, C;
1547
1560
  return /* @__PURE__ */ t.jsxs(
1548
1561
  "div",
1549
1562
  {
1550
- className: F(T.variant, {
1551
- [T.activeVariant]: e.id === I.id
1563
+ className: U($.variant, {
1564
+ [$.activeVariant]: e.id === f.id
1552
1565
  }),
1553
- onClick: () => c(I),
1566
+ onClick: () => c(f),
1554
1567
  children: [
1555
- /* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
1556
- /* @__PURE__ */ t.jsx("span", { className: T.title, children: it(I.name) }),
1568
+ /* @__PURE__ */ t.jsxs("div", { className: $.variantInfo, children: [
1569
+ /* @__PURE__ */ t.jsx("span", { className: $.title, children: it(f.name) }),
1557
1570
  /* @__PURE__ */ t.jsxs("span", { children: [
1558
1571
  "$",
1559
- d === "ONE_TIME" ? I.price.amount : I.subscriptionSettings ? I.subscriptionSettings.price.amount : "Price Not Found"
1572
+ d === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
1560
1573
  ] })
1561
1574
  ] }),
1562
- /* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
1563
- (H = I.quantity.restrictions) != null && H.max || I.quantity.available !== void 0 ? ((h = I.quantity.restrictions) == null ? void 0 : h.max) || I.quantity.available : "∞",
1575
+ /* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: $.stock, children: [
1576
+ (h = f.quantity.restrictions) != null && h.max || f.quantity.available !== void 0 ? ((C = f.quantity.restrictions) == null ? void 0 : C.max) || f.quantity.available : "∞",
1564
1577
  " ",
1565
1578
  "in stock"
1566
1579
  ] }) })
1567
1580
  ]
1568
1581
  },
1569
- I.id
1582
+ f.id
1570
1583
  );
1571
1584
  }) }),
1572
- d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1585
+ d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: $.quantity, children: [
1573
1586
  /* @__PURE__ */ t.jsx(
1574
1587
  D,
1575
1588
  {
1576
1589
  type: "Secondary",
1577
1590
  onClick: () => {
1578
- j > 1 ? n((I) => I - 1) : n(1);
1591
+ v > 1 ? n((f) => f - 1) : n(1);
1579
1592
  },
1580
- className: T.button,
1581
- disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
1582
- children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1593
+ className: $.button,
1594
+ disabled: e.quantity.available && e.quantity.restrictions && v <= e.quantity.restrictions.min || e.quantity.available === 0,
1595
+ children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1583
1596
  }
1584
1597
  ),
1585
1598
  /* @__PURE__ */ t.jsx(
1586
1599
  Et,
1587
1600
  {
1588
1601
  type: "number",
1589
- value: String(j),
1590
- onChange: (I) => n(Number(I)),
1591
- max: ((z = e.quantity.restrictions) == null ? void 0 : z.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1592
- min: ((R = e.quantity.restrictions) == null ? void 0 : R.min) || 0,
1602
+ value: String(v),
1603
+ onChange: (f) => {
1604
+ e.quantity.available && Number(f) > e.quantity.available ? n(e.quantity.available) : n(Number(f));
1605
+ },
1606
+ max: ((R = e.quantity.restrictions) == null ? void 0 : R.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1607
+ min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
1593
1608
  centered: !0,
1594
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
1609
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && v >= e.quantity.restrictions.max
1595
1610
  }
1596
1611
  ),
1597
1612
  /* @__PURE__ */ t.jsx(
@@ -1599,20 +1614,20 @@ const ts = (r) => {
1599
1614
  {
1600
1615
  type: "Secondary",
1601
1616
  onClick: () => {
1602
- n((I) => I + 1);
1617
+ n((f) => f + 1);
1603
1618
  },
1604
- className: T.button,
1605
- disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0),
1606
- children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1619
+ className: $.button,
1620
+ disabled: !!(e.quantity.available && e.quantity.restrictions && v >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && v >= e.quantity.available),
1621
+ children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1607
1622
  }
1608
1623
  )
1609
1624
  ] }),
1610
- /* @__PURE__ */ t.jsxs("div", { className: T.meta, children: [
1611
- /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1625
+ /* @__PURE__ */ t.jsxs("div", { className: $.meta, children: [
1626
+ /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
1612
1627
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1613
- /* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
1628
+ /* @__PURE__ */ t.jsxs("div", { className: $.infoRight, children: [
1614
1629
  /* @__PURE__ */ t.jsx(
1615
- v,
1630
+ b,
1616
1631
  {
1617
1632
  name: "Lightning",
1618
1633
  fill: "var(--text-action)",
@@ -1620,44 +1635,44 @@ const ts = (r) => {
1620
1635
  height: 20
1621
1636
  }
1622
1637
  ),
1623
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
1638
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : z(e.deliveryTime) })
1624
1639
  ] })
1625
1640
  ] }),
1626
- /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1641
+ /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
1627
1642
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1628
- /* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: d === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1629
- /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1643
+ /* @__PURE__ */ t.jsx("div", { className: $.infoRight, children: d === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
1644
+ /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
1630
1645
  "$ ",
1631
- (e.price.amount || 0) * j
1646
+ (e.price.amount || 0) * v
1632
1647
  ] }),
1633
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1648
+ /* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
1634
1649
  "$ ",
1635
- (e.compareAtPrice.amount || 0) * j
1650
+ (e.compareAtPrice.amount || 0) * v
1636
1651
  ] })
1637
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1652
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
1638
1653
  "$ ",
1639
- (e.price.amount || 0) * j
1640
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1641
- /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1654
+ (e.price.amount || 0) * v
1655
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
1656
+ /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
1642
1657
  "$ ",
1643
1658
  e.subscriptionSettings.price.amount || 0
1644
1659
  ] }),
1645
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1660
+ /* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
1646
1661
  "$ ",
1647
1662
  e.subscriptionSettings.compareAtPrice.amount || 0
1648
1663
  ] })
1649
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1664
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
1650
1665
  "$ ",
1651
1666
  e.subscriptionSettings.price.amount || 0
1652
1667
  ] }) })
1653
1668
  ] })
1654
1669
  ] }),
1655
- /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1670
+ /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
1656
1671
  /* @__PURE__ */ t.jsx(
1657
1672
  D,
1658
1673
  {
1659
1674
  type: "Primary",
1660
- onClick: () => y(),
1675
+ onClick: () => M(),
1661
1676
  disabled: e.quantity && e.quantity.available === 0,
1662
1677
  children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1663
1678
  }
@@ -1666,14 +1681,16 @@ const ts = (r) => {
1666
1681
  D,
1667
1682
  {
1668
1683
  type: "Secondary",
1669
- onClick: () => _(),
1684
+ onClick: () => N(),
1670
1685
  disabled: e.quantity && e.quantity.available === 0,
1671
- children: "Add to Cart"
1686
+ children: o.parts.some(
1687
+ (f) => f.productId === i.id && f.productVariantId === e.id
1688
+ ) ? "Add More" : "Add to Cart"
1672
1689
  }
1673
1690
  )
1674
1691
  ] })
1675
1692
  ] });
1676
- }, es = "_buttons_qns27_23", ss = "_modal_qns27_32", ns = "_closing_qns27_64", is = "_info_qns27_113", as = "_top_qns27_120", os = "_title_qns27_131", cs = "_clear_qns27_138", rs = "_activeClear_qns27_145", ls = "_count_qns27_149", ds = "_cart_qns27_164", us = "_empty_qns27_172", hs = "_product_qns27_198", ps = "_products_qns27_207", ms = "_image_qns27_215", gs = "_productInfo_qns27_231", fs = "_content_qns27_238", xs = "_name_qns27_244", _s = "_price_qns27_250", js = "_productButtons_qns27_256", vs = "_productButton_qns27_256", bs = "_productCount_qns27_273", ys = "_bottom_qns27_290", Is = "_subtotal_qns27_298", Ns = "_block_qns27_306", Cs = "_shoppingCount_qns27_313", Ss = "_total_qns27_333", ks = "_link_qns27_339", ws = "_userInfo_qns27_346", Ps = "_pagesMobileModal_qns27_358", Ms = "_pagesMobileModalContent_qns27_372", Bs = "_pagesMobileModalHeader_qns27_378", Ts = "_pagesMobileModalFooter_qns27_388", w = {
1693
+ }, es = "_buttons_qns27_23", ss = "_modal_qns27_32", ns = "_closing_qns27_64", is = "_info_qns27_113", as = "_top_qns27_120", os = "_title_qns27_131", cs = "_clear_qns27_138", rs = "_activeClear_qns27_145", ls = "_count_qns27_149", ds = "_cart_qns27_164", us = "_empty_qns27_172", hs = "_product_qns27_198", ps = "_products_qns27_207", ms = "_image_qns27_215", gs = "_productInfo_qns27_231", fs = "_content_qns27_238", xs = "_name_qns27_244", _s = "_price_qns27_250", js = "_productButtons_qns27_256", vs = "_productButton_qns27_256", bs = "_productCount_qns27_273", ys = "_bottom_qns27_290", Is = "_subtotal_qns27_298", Ns = "_block_qns27_306", Cs = "_shoppingCount_qns27_313", Ss = "_total_qns27_333", ks = "_link_qns27_339", ws = "_userInfo_qns27_346", Ps = "_pagesMobileModal_qns27_358", Ms = "_pagesMobileModalContent_qns27_372", $s = "_pagesMobileModalHeader_qns27_378", Bs = "_pagesMobileModalFooter_qns27_388", w = {
1677
1694
  buttons: es,
1678
1695
  modal: ss,
1679
1696
  closing: ns,
@@ -1704,15 +1721,15 @@ const ts = (r) => {
1704
1721
  userInfo: ws,
1705
1722
  pagesMobileModal: Ps,
1706
1723
  pagesMobileModalContent: Ms,
1707
- pagesMobileModalHeader: Bs,
1708
- pagesMobileModalFooter: Ts
1709
- }, En = (r) => {
1724
+ pagesMobileModalHeader: $s,
1725
+ pagesMobileModalFooter: Bs
1726
+ }, Dn = (r) => {
1710
1727
  const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = r;
1711
1728
  return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1712
- i && /* @__PURE__ */ t.jsx($s, {}),
1713
- s && /* @__PURE__ */ t.jsx(Tt, { signUp: a })
1729
+ i && /* @__PURE__ */ t.jsx(Ts, {}),
1730
+ s && /* @__PURE__ */ t.jsx(Bt, { signUp: a })
1714
1731
  ] });
1715
- }, $s = () => {
1732
+ }, Ts = () => {
1716
1733
  const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
1717
1734
  function d(n) {
1718
1735
  if (n.variants.length > 0) {
@@ -1731,19 +1748,19 @@ const ts = (r) => {
1731
1748
  }
1732
1749
  m.useEffect(() => {
1733
1750
  (async () => {
1734
- const o = e.parts.map((x) => String(x.productId)), q = (c.filter((x) => o.includes(String(x.id))) || []).map((x) => ({
1735
- ...x,
1736
- activeVariantId: d(x),
1737
- quantity: u(x)
1751
+ const o = e.parts.map((_) => String(_.productId)), E = (c.filter((_) => o.includes(String(_.id))) || []).map((_) => ({
1752
+ ..._,
1753
+ activeVariantId: d(_),
1754
+ quantity: u(_)
1738
1755
  }));
1739
- s(q);
1756
+ s(E);
1740
1757
  })();
1741
1758
  }, [e.parts]);
1742
1759
  function g(n) {
1743
1760
  var o;
1744
1761
  return !n || !(n != null && n.variants) ? !1 : (o = n.variants.find((p) => p.id === n.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
1745
1762
  }
1746
- const f = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, j] = m.useState(!1);
1763
+ const x = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, v] = m.useState(!1);
1747
1764
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1748
1765
  /* @__PURE__ */ t.jsxs(
1749
1766
  D,
@@ -1754,16 +1771,16 @@ const ts = (r) => {
1754
1771
  position: "relative"
1755
1772
  },
1756
1773
  onClick: (n) => {
1757
- n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), j(!0));
1774
+ n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), v(!0));
1758
1775
  },
1759
1776
  children: [
1760
1777
  /* @__PURE__ */ t.jsx(
1761
- v,
1778
+ b,
1762
1779
  {
1763
1780
  name: "Handbag"
1764
1781
  }
1765
1782
  ),
1766
- f && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1783
+ x && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1767
1784
  ]
1768
1785
  }
1769
1786
  ),
@@ -1771,7 +1788,7 @@ const ts = (r) => {
1771
1788
  dt,
1772
1789
  {
1773
1790
  close: () => {
1774
- j(!1), setTimeout(() => {
1791
+ v(!1), setTimeout(() => {
1775
1792
  i(!1);
1776
1793
  }, 300);
1777
1794
  },
@@ -1780,7 +1797,7 @@ const ts = (r) => {
1780
1797
  qs,
1781
1798
  {
1782
1799
  activeProducts: a,
1783
- isCartNotEmpty: f,
1800
+ isCartNotEmpty: x,
1784
1801
  isOpen: P
1785
1802
  }
1786
1803
  )
@@ -1789,7 +1806,7 @@ const ts = (r) => {
1789
1806
  ] });
1790
1807
  }, qs = (r) => {
1791
1808
  const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = r, { cart: e, reset: c, getTotalAndDiscount: d, updateQuantityOfProduct: u } = at(), g = bt();
1792
- function f(n) {
1809
+ function x(n) {
1793
1810
  g(n);
1794
1811
  }
1795
1812
  function P(n) {
@@ -1799,7 +1816,7 @@ const ts = (r) => {
1799
1816
  quantity: n.quantity + 1
1800
1817
  });
1801
1818
  }
1802
- function j(n) {
1819
+ function v(n) {
1803
1820
  n.quantity && u({
1804
1821
  productId: n.id,
1805
1822
  productVariantId: n.activeVariantId,
@@ -1809,7 +1826,7 @@ const ts = (r) => {
1809
1826
  return /* @__PURE__ */ t.jsxs(
1810
1827
  "div",
1811
1828
  {
1812
- className: F(w.modal, {
1829
+ className: U(w.modal, {
1813
1830
  [w.closing]: !s
1814
1831
  }),
1815
1832
  onClick: (n) => n.stopPropagation(),
@@ -1822,7 +1839,7 @@ const ts = (r) => {
1822
1839
  /* @__PURE__ */ t.jsx(
1823
1840
  "button",
1824
1841
  {
1825
- className: F(w.clear, {
1842
+ className: U(w.clear, {
1826
1843
  [w.activeClear]: a
1827
1844
  }),
1828
1845
  disabled: !a,
@@ -1848,7 +1865,7 @@ const ts = (r) => {
1848
1865
  className: w.image
1849
1866
  }
1850
1867
  ) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
1851
- v,
1868
+ b,
1852
1869
  {
1853
1870
  name: "Image",
1854
1871
  fill: "var(--text-secondary)"
@@ -1868,12 +1885,12 @@ const ts = (r) => {
1868
1885
  {
1869
1886
  type: "Secondary",
1870
1887
  onClick: () => {
1871
- n.quantity !== 1 && j(n);
1888
+ n.quantity !== 1 && v(n);
1872
1889
  },
1873
1890
  className: w.productButton,
1874
1891
  disabled: n.quantity === 1,
1875
1892
  children: /* @__PURE__ */ t.jsx(
1876
- v,
1893
+ b,
1877
1894
  {
1878
1895
  name: "Minus",
1879
1896
  fill: "#757575",
@@ -1892,7 +1909,7 @@ const ts = (r) => {
1892
1909
  className: w.productButton,
1893
1910
  disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
1894
1911
  children: /* @__PURE__ */ t.jsx(
1895
- v,
1912
+ b,
1896
1913
  {
1897
1914
  name: "Plus",
1898
1915
  fill: "#757575",
@@ -1912,7 +1929,7 @@ const ts = (r) => {
1912
1929
  /* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
1913
1930
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1914
1931
  /* @__PURE__ */ t.jsx(
1915
- v,
1932
+ b,
1916
1933
  {
1917
1934
  name: "Info",
1918
1935
  width: 20,
@@ -1926,7 +1943,7 @@ const ts = (r) => {
1926
1943
  d().total
1927
1944
  ] })
1928
1945
  ] }),
1929
- /* @__PURE__ */ t.jsx(D, { onClick: () => f("/checkout"), children: "Checkout" })
1946
+ /* @__PURE__ */ t.jsx(D, { onClick: () => x("/checkout"), children: "Checkout" })
1930
1947
  ] })
1931
1948
  ] }) : /* @__PURE__ */ t.jsx(Os, {})
1932
1949
  ]
@@ -1934,7 +1951,7 @@ const ts = (r) => {
1934
1951
  );
1935
1952
  }, Os = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1936
1953
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1937
- v,
1954
+ b,
1938
1955
  {
1939
1956
  name: "Handbag",
1940
1957
  fill: "var(--text-secondary)"
@@ -1953,7 +1970,7 @@ const ts = (r) => {
1953
1970
  }
1954
1971
  )
1955
1972
  ] })
1956
- ] }), Tt = ({ signUp: r, close: i }) => {
1973
+ ] }), Bt = ({ signUp: r, close: i }) => {
1957
1974
  const { token: a } = Dt(), s = bt(), [e, c] = m.useState("test-email@gmail.com");
1958
1975
  m.useEffect(() => {
1959
1976
  a && (async () => {
@@ -2027,13 +2044,13 @@ const ts = (r) => {
2027
2044
  {
2028
2045
  type: "Secondary",
2029
2046
  onClick: c,
2030
- children: /* @__PURE__ */ t.jsx(v, { name: "X" })
2047
+ children: /* @__PURE__ */ t.jsx(b, { name: "X" })
2031
2048
  }
2032
2049
  )
2033
2050
  ] }),
2034
2051
  /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
2035
2052
  /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2036
- Tt,
2053
+ Bt,
2037
2054
  {
2038
2055
  signUp: s,
2039
2056
  close: c
@@ -2042,7 +2059,7 @@ const ts = (r) => {
2042
2059
  ]
2043
2060
  }
2044
2061
  );
2045
- }, Dn = ({
2062
+ }, Rn = ({
2046
2063
  children: r,
2047
2064
  logo: i,
2048
2065
  signUp: a
@@ -2079,7 +2096,7 @@ const ts = (r) => {
2079
2096
  onClick: (a) => {
2080
2097
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2081
2098
  },
2082
- children: /* @__PURE__ */ t.jsx(v, { name: "List" })
2099
+ children: /* @__PURE__ */ t.jsx(b, { name: "List" })
2083
2100
  }
2084
2101
  );
2085
2102
  }, Ds = "_share_rlgln_1", Rs = "_modal_rlgln_8", Ls = "_header_rlgln_20", zs = "_title_rlgln_46", Hs = "_copyWrapper_rlgln_52", Us = "_copyText_rlgln_61", Fs = "_copyTextMobile_rlgln_74", Vs = "_copyTextMiniMobile_rlgln_93", st = {
@@ -2091,7 +2108,7 @@ const ts = (r) => {
2091
2108
  copyText: Us,
2092
2109
  copyTextMobile: Fs,
2093
2110
  copyTextMiniMobile: Vs
2094
- }, Rn = ({ title: r = "Copy Product Link" }) => {
2111
+ }, Ln = ({ title: r = "Copy Product Link" }) => {
2095
2112
  const { isOpenModal: i, setIsOpenModal: a } = Mt();
2096
2113
  function s() {
2097
2114
  a(!0);
@@ -2106,7 +2123,7 @@ const ts = (r) => {
2106
2123
  },
2107
2124
  type: "Secondary",
2108
2125
  children: /* @__PURE__ */ t.jsx(
2109
- v,
2126
+ b,
2110
2127
  {
2111
2128
  name: "Share",
2112
2129
  fill: "#757575",
@@ -2123,7 +2140,7 @@ const ts = (r) => {
2123
2140
  navigator.clipboard.writeText(c), s([
2124
2141
  ...a,
2125
2142
  {
2126
- id: Z(),
2143
+ id: J(),
2127
2144
  message: "Link copied to clipboard",
2128
2145
  status: "success"
2129
2146
  }
@@ -2134,19 +2151,19 @@ const ts = (r) => {
2134
2151
  i(!1), e(!0);
2135
2152
  }, 300);
2136
2153
  }
2137
- function g(f, P) {
2138
- return f.length > P ? f.slice(0, P) + "..." : f;
2154
+ function g(x, P) {
2155
+ return x.length > P ? x.slice(0, P) + "..." : x;
2139
2156
  }
2140
2157
  return /* @__PURE__ */ t.jsxs(
2141
2158
  "div",
2142
2159
  {
2143
2160
  className: st.modal,
2144
- onClick: (f) => f.stopPropagation(),
2161
+ onClick: (x) => x.stopPropagation(),
2145
2162
  children: [
2146
2163
  /* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
2147
2164
  /* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
2148
2165
  /* @__PURE__ */ t.jsx(
2149
- v,
2166
+ b,
2150
2167
  {
2151
2168
  name: "X",
2152
2169
  fill: "#757575",
@@ -2177,8 +2194,8 @@ const ts = (r) => {
2177
2194
  type: "Secondary",
2178
2195
  onClick: d,
2179
2196
  children: a.find(
2180
- (f) => f.message === "Link copied to clipboard"
2181
- ) ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2197
+ (x) => x.message === "Link copied to clipboard"
2198
+ ) ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2182
2199
  }
2183
2200
  )
2184
2201
  ] })
@@ -2191,7 +2208,7 @@ const ts = (r) => {
2191
2208
  icon: Xs,
2192
2209
  open: Qs,
2193
2210
  content: Js
2194
- }, Ln = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2211
+ }, zn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2195
2212
  const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
2196
2213
  e(!s);
2197
2214
  };
@@ -2205,7 +2222,7 @@ const ts = (r) => {
2205
2222
  onClick: g,
2206
2223
  children: [
2207
2224
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2208
- /* @__PURE__ */ t.jsx("div", { className: F(ct.icon, { [ct.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2225
+ /* @__PURE__ */ t.jsx("div", { className: U(ct.icon, { [ct.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2209
2226
  ]
2210
2227
  }
2211
2228
  ),
@@ -2247,22 +2264,22 @@ const ts = (r) => {
2247
2264
  );
2248
2265
  }, Zs = "_buttonsBlock_1b2rb_1", tn = {
2249
2266
  buttonsBlock: Zs
2250
- }, zn = (r) => {
2251
- var f, P;
2252
- const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (f = c == null ? void 0 : c.listings) == null ? void 0 : f.find((j) => j.id === s);
2267
+ }, Hn = (r) => {
2268
+ var x, P;
2269
+ const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (x = c == null ? void 0 : c.listings) == null ? void 0 : x.find((v) => v.id === s);
2253
2270
  if (!d)
2254
2271
  return null;
2255
2272
  const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
2256
- (j) => j.uniquePath === d.productData.uniquePath
2273
+ (v) => v.uniquePath === d.productData.uniquePath
2257
2274
  );
2258
2275
  if (!u)
2259
2276
  return null;
2260
- const g = e.parts.find((j) => j.productId === u.id);
2277
+ const g = e.parts.find((v) => v.productId === u.id);
2261
2278
  return /* @__PURE__ */ t.jsxs(
2262
2279
  "div",
2263
2280
  {
2264
2281
  className: tn.buttonsBlock,
2265
- onClick: (j) => j.stopPropagation(),
2282
+ onClick: (v) => v.stopPropagation(),
2266
2283
  children: [
2267
2284
  /* @__PURE__ */ t.jsx(
2268
2285
  D,
@@ -2294,7 +2311,7 @@ const ts = (r) => {
2294
2311
  wrapper: en,
2295
2312
  logo: sn,
2296
2313
  info: nn
2297
- }, Hn = ({ date: r }) => {
2314
+ }, Un = ({ date: r }) => {
2298
2315
  const { general: i } = Lt();
2299
2316
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2300
2317
  function a(s) {
@@ -2317,7 +2334,7 @@ const ts = (r) => {
2317
2334
  style: { objectFit: "contain", width: "48px", height: "48px" }
2318
2335
  }
2319
2336
  ) : /* @__PURE__ */ t.jsx(
2320
- v,
2337
+ b,
2321
2338
  {
2322
2339
  name: "Image",
2323
2340
  width: 48,
@@ -2329,7 +2346,7 @@ const ts = (r) => {
2329
2346
  /* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
2330
2347
  ] })
2331
2348
  ] });
2332
- }, an = "_variants_puxd1_80", on = "_variant_puxd1_80", cn = "_stock_puxd1_98", rn = "_variantInfo_puxd1_105", ln = "_chargeTypes_puxd1_165", dn = "_charge_puxd1_165", un = "_chargeActive_puxd1_190", hn = "_title_puxd1_198", pn = "_modal_puxd1_204", mn = "_header_puxd1_224", gn = "_productOptions_puxd1_232", fn = "_loading_puxd1_236", J = {
2349
+ }, an = "_variants_puxd1_80", on = "_variant_puxd1_80", cn = "_stock_puxd1_98", rn = "_variantInfo_puxd1_105", ln = "_chargeTypes_puxd1_165", dn = "_charge_puxd1_165", un = "_chargeActive_puxd1_190", hn = "_title_puxd1_198", pn = "_modal_puxd1_204", mn = "_header_puxd1_224", gn = "_productOptions_puxd1_232", fn = "_loading_puxd1_236", Q = {
2333
2350
  variants: an,
2334
2351
  variant: on,
2335
2352
  stock: cn,
@@ -2342,11 +2359,11 @@ const ts = (r) => {
2342
2359
  header: mn,
2343
2360
  productOptions: gn,
2344
2361
  loading: fn
2345
- }, Un = (r) => {
2362
+ }, Fn = (r) => {
2346
2363
  var n;
2347
- const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g, f] = m.useState(
2364
+ const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g, x] = m.useState(
2348
2365
  u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
2349
- ), { addProducts: P } = at(), { setIsOpen: j } = ot();
2366
+ ), { addProducts: P } = at(), { setIsOpen: v } = ot();
2350
2367
  return m.useEffect(() => {
2351
2368
  (async () => {
2352
2369
  e(!0);
@@ -2358,21 +2375,21 @@ const ts = (r) => {
2358
2375
  P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
2359
2376
  })();
2360
2377
  }, []), m.useEffect(() => {
2361
- j(!0);
2378
+ v(!0);
2362
2379
  }, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2363
2380
  "div",
2364
2381
  {
2365
- className: J.modal,
2382
+ className: Q.modal,
2366
2383
  onClick: (o) => o.stopPropagation(),
2367
2384
  children: [
2368
- s && /* @__PURE__ */ t.jsx("div", { className: J.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2385
+ s && /* @__PURE__ */ t.jsx("div", { className: Q.loading, children: /* @__PURE__ */ t.jsx($t, {}) }),
2369
2386
  r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
2370
2387
  xn,
2371
2388
  {
2372
2389
  variants: c.variants,
2373
2390
  activeVariant: u,
2374
2391
  activeChargeType: g,
2375
- setActiveChargeType: f,
2392
+ setActiveChargeType: x,
2376
2393
  productId: c.id,
2377
2394
  setIsOpen: r.setIsOpen
2378
2395
  }
@@ -2388,83 +2405,83 @@ const ts = (r) => {
2388
2405
  }
2389
2406
  ) });
2390
2407
  }, xn = (r) => {
2391
- const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts: f, updateQuantityOfProduct: P } = at(), { notifications: j, setNotifications: n } = Ct(), { pageContext: o } = vt(), { setIsOpen: p } = ot(), q = () => {
2408
+ const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts: x, updateQuantityOfProduct: P } = at(), { notifications: v, setNotifications: n } = Ct(), { pageContext: o } = vt(), { setIsOpen: p } = ot(), E = () => {
2392
2409
  p(!1), setTimeout(() => {
2393
2410
  d(!1);
2394
2411
  }, 300);
2395
2412
  };
2396
- async function x(_) {
2397
- const y = u.parts.find(
2398
- (M) => M.productId === r.productId && M.productVariantId === _
2413
+ async function _(j) {
2414
+ const N = u.parts.find(
2415
+ (M) => M.productId === r.productId && M.productVariantId === j
2399
2416
  );
2400
- y ? P({
2417
+ N ? P({
2401
2418
  productId: c,
2402
- productVariantId: _,
2403
- quantity: y.quantity + 1
2404
- }) : (o != null && o.products && await f(o.products), await g({
2419
+ productVariantId: j,
2420
+ quantity: N.quantity + 1
2421
+ }) : (o != null && o.products && await x(o.products), await g({
2405
2422
  productId: c,
2406
- productVariantId: _,
2423
+ productVariantId: j,
2407
2424
  quantity: 1
2408
2425
  })), n([
2409
- ...j,
2426
+ ...v,
2410
2427
  {
2411
- id: Z(),
2428
+ id: J(),
2412
2429
  message: "Product added to cart",
2413
2430
  status: "success"
2414
2431
  }
2415
2432
  ]);
2416
2433
  }
2417
2434
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2418
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2435
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2419
2436
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2420
2437
  /* @__PURE__ */ t.jsx(
2421
- v,
2438
+ b,
2422
2439
  {
2423
2440
  name: "X",
2424
2441
  width: 24,
2425
2442
  height: 24,
2426
2443
  fill: "var(--text-secondary)",
2427
2444
  hoverable: !0,
2428
- onClick: q
2445
+ onClick: E
2429
2446
  }
2430
2447
  )
2431
2448
  ] }),
2432
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: J.chargeTypes, children: e.chargeTypes.map((_) => /* @__PURE__ */ t.jsx(
2449
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Q.chargeTypes, children: e.chargeTypes.map((j) => /* @__PURE__ */ t.jsx(
2433
2450
  "div",
2434
2451
  {
2435
- className: F(J.charge, {
2436
- [J.chargeActive]: a === _
2452
+ className: U(Q.charge, {
2453
+ [Q.chargeActive]: a === j
2437
2454
  }),
2438
- onClick: () => s(_),
2439
- children: St[_]
2455
+ onClick: () => s(j),
2456
+ children: St[j]
2440
2457
  },
2441
- _
2458
+ j
2442
2459
  )) }),
2443
- /* @__PURE__ */ t.jsx("div", { className: J.variants, children: i.map((_) => {
2444
- var y, M;
2460
+ /* @__PURE__ */ t.jsx("div", { className: Q.variants, children: i.map((j) => {
2461
+ var N, M;
2445
2462
  return /* @__PURE__ */ t.jsxs(
2446
2463
  "div",
2447
2464
  {
2448
- className: F(J.variant),
2465
+ className: U(Q.variant),
2449
2466
  onClick: () => {
2450
- x(_.id), d(!1);
2467
+ _(j.id), d(!1);
2451
2468
  },
2452
2469
  children: [
2453
- /* @__PURE__ */ t.jsxs("div", { className: J.variantInfo, children: [
2454
- /* @__PURE__ */ t.jsx("span", { className: J.title, children: _.name }),
2470
+ /* @__PURE__ */ t.jsxs("div", { className: Q.variantInfo, children: [
2471
+ /* @__PURE__ */ t.jsx("span", { className: Q.title, children: j.name }),
2455
2472
  /* @__PURE__ */ t.jsxs("span", { children: [
2456
2473
  "$",
2457
- a === "ONE_TIME" ? _.price.amount : _.subscriptionSettings ? _.subscriptionSettings.price.amount : "Price Not Found"
2474
+ a === "ONE_TIME" ? j.price.amount : j.subscriptionSettings ? j.subscriptionSettings.price.amount : "Price Not Found"
2458
2475
  ] })
2459
2476
  ] }),
2460
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: J.stock, children: [
2461
- (y = _.quantity.restrictions) != null && y.max || _.quantity.available !== void 0 ? ((M = _.quantity.restrictions) == null ? void 0 : M.max) || _.quantity.available : "∞",
2477
+ /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Q.stock, children: [
2478
+ (N = j.quantity.restrictions) != null && N.max || j.quantity.available !== void 0 ? ((M = j.quantity.restrictions) == null ? void 0 : M.max) || j.quantity.available : "∞",
2462
2479
  " ",
2463
2480
  "in stock"
2464
2481
  ] }) })
2465
2482
  ]
2466
2483
  },
2467
- _.id
2484
+ j.id
2468
2485
  );
2469
2486
  }) })
2470
2487
  ] });
@@ -2475,13 +2492,13 @@ const ts = (r) => {
2475
2492
  }, 300);
2476
2493
  };
2477
2494
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2478
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2495
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2479
2496
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2480
2497
  "Buy ",
2481
2498
  it(i.name)
2482
2499
  ] }),
2483
2500
  /* @__PURE__ */ t.jsx(
2484
- v,
2501
+ b,
2485
2502
  {
2486
2503
  name: "X",
2487
2504
  width: 24,
@@ -2496,7 +2513,7 @@ const ts = (r) => {
2496
2513
  }
2497
2514
  )
2498
2515
  ] }),
2499
- /* @__PURE__ */ t.jsx("div", { className: J.productOptions, children: /* @__PURE__ */ t.jsx(
2516
+ /* @__PURE__ */ t.jsx("div", { className: Q.productOptions, children: /* @__PURE__ */ t.jsx(
2500
2517
  ts,
2501
2518
  {
2502
2519
  product: i,
@@ -2504,7 +2521,7 @@ const ts = (r) => {
2504
2521
  }
2505
2522
  ) })
2506
2523
  ] });
2507
- }, jn = "_contentModal_2a136_1", vn = "_modalTop_2a136_13", bn = "_loading_2a136_19", yn = "_modalCards_2a136_27", In = "_modalImage_2a136_32", Nn = "_card_2a136_37", Cn = "_cardInfo_2a136_48", Sn = "_cardButtons_2a136_55", kn = "_title_2a136_61", wn = "_blockImage_2a136_68", W = {
2524
+ }, jn = "_contentModal_2a136_1", vn = "_modalTop_2a136_13", bn = "_loading_2a136_19", yn = "_modalCards_2a136_27", In = "_modalImage_2a136_32", Nn = "_card_2a136_37", Cn = "_cardInfo_2a136_48", Sn = "_cardButtons_2a136_55", kn = "_title_2a136_61", wn = "_blockImage_2a136_68", G = {
2508
2525
  contentModal: jn,
2509
2526
  modalTop: vn,
2510
2527
  loading: bn,
@@ -2515,19 +2532,19 @@ const ts = (r) => {
2515
2532
  cardButtons: Sn,
2516
2533
  title: kn,
2517
2534
  blockImage: wn
2518
- }, Fn = (r) => {
2519
- const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g, f] = m.useState(!0), { setIsOpen: P } = ot();
2535
+ }, Vn = (r) => {
2536
+ const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g, x] = m.useState(!0), { setIsOpen: P } = ot();
2520
2537
  m.useEffect(() => {
2521
2538
  var p;
2522
- f(!0);
2539
+ x(!0);
2523
2540
  const o = (p = a.listings) == null ? void 0 : p.filter(
2524
- (q) => s.listingIdList.includes(q.id)
2541
+ (E) => s.listingIdList.includes(E.id)
2525
2542
  );
2526
- o && u([...o]), f(!1);
2543
+ o && u([...o]), x(!1);
2527
2544
  }, [a]), m.useEffect(() => {
2528
2545
  P(!0);
2529
2546
  }, []);
2530
- const j = () => {
2547
+ const v = () => {
2531
2548
  P(!1), setTimeout(() => {
2532
2549
  i(!1);
2533
2550
  }, 300);
@@ -2538,31 +2555,31 @@ const ts = (r) => {
2538
2555
  return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2539
2556
  "div",
2540
2557
  {
2541
- className: W.contentModal,
2558
+ className: G.contentModal,
2542
2559
  onClick: (o) => o.stopPropagation(),
2543
2560
  children: [
2544
- /* @__PURE__ */ t.jsxs("div", { className: W.modalTop, children: [
2561
+ /* @__PURE__ */ t.jsxs("div", { className: G.modalTop, children: [
2545
2562
  /* @__PURE__ */ t.jsx(
2546
2563
  "span",
2547
2564
  {
2548
- className: W.title,
2565
+ className: G.title,
2549
2566
  id: "h4",
2550
2567
  children: it(s.name)
2551
2568
  }
2552
2569
  ),
2553
2570
  /* @__PURE__ */ t.jsx(
2554
- v,
2571
+ b,
2555
2572
  {
2556
2573
  name: "X",
2557
2574
  hoverable: !0,
2558
- onClick: j
2575
+ onClick: v
2559
2576
  }
2560
2577
  )
2561
2578
  ] }),
2562
- !g && d && /* @__PURE__ */ t.jsx("div", { className: W.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
2579
+ !g && d && /* @__PURE__ */ t.jsx("div", { className: G.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
2563
2580
  "div",
2564
2581
  {
2565
- className: W.card,
2582
+ className: G.card,
2566
2583
  children: [
2567
2584
  /* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
2568
2585
  "img",
@@ -2571,14 +2588,14 @@ const ts = (r) => {
2571
2588
  alt: "",
2572
2589
  width: 64,
2573
2590
  height: 64,
2574
- className: W.modalImage
2591
+ className: G.modalImage
2575
2592
  }
2576
- ) : /* @__PURE__ */ t.jsx("div", { className: F(W.blockImage, W.modalImage), children: /* @__PURE__ */ t.jsx(v, { name: "Image" }) }) }),
2577
- /* @__PURE__ */ t.jsxs("div", { className: W.cardInfo, children: [
2593
+ ) : /* @__PURE__ */ t.jsx("div", { className: U(G.blockImage, G.modalImage), children: /* @__PURE__ */ t.jsx(b, { name: "Image" }) }) }),
2594
+ /* @__PURE__ */ t.jsxs("div", { className: G.cardInfo, children: [
2578
2595
  /* @__PURE__ */ t.jsxs(
2579
2596
  "span",
2580
2597
  {
2581
- className: W.name,
2598
+ className: G.name,
2582
2599
  id: "h5",
2583
2600
  children: [
2584
2601
  it(o.productData.name),
@@ -2593,14 +2610,14 @@ const ts = (r) => {
2593
2610
  o.productData.shortDescription && /* @__PURE__ */ t.jsx(
2594
2611
  "span",
2595
2612
  {
2596
- className: W.short,
2613
+ className: G.short,
2597
2614
  id: "md",
2598
2615
  children: it(o.productData.shortDescription)
2599
2616
  }
2600
2617
  ),
2601
2618
  /* @__PURE__ */ t.jsx("span", {})
2602
2619
  ] }),
2603
- /* @__PURE__ */ t.jsxs("div", { className: W.cardButtons, children: [
2620
+ /* @__PURE__ */ t.jsxs("div", { className: G.cardButtons, children: [
2604
2621
  /* @__PURE__ */ t.jsx(
2605
2622
  D,
2606
2623
  {
@@ -2617,53 +2634,53 @@ const ts = (r) => {
2617
2634
  },
2618
2635
  o.id
2619
2636
  )) }),
2620
- g && /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2637
+ g && /* @__PURE__ */ t.jsx("div", { className: G.loading, children: /* @__PURE__ */ t.jsx($t, {}) })
2621
2638
  ]
2622
2639
  }
2623
2640
  ) });
2624
2641
  };
2625
2642
  export {
2626
- Ln as Accordion,
2643
+ zn as Accordion,
2627
2644
  Es as BurgerMenuButton,
2628
2645
  D as Button,
2629
- Te as ButtonTypeSettings,
2630
- On as ButtonsSettings,
2646
+ Be as ButtonTypeSettings,
2647
+ An as ButtonsSettings,
2631
2648
  Tn as CategorySettings,
2632
2649
  St as ChargeTypes,
2633
2650
  qt as ChooseImage,
2634
- Gn as ChooseImageModal,
2651
+ Wn as ChooseImageModal,
2635
2652
  Os as EmptyCart,
2636
- qn as FormSettings,
2637
- Fn as GroupCardModal,
2638
- En as HeaderButtons,
2639
- v as Icon,
2653
+ On as FormSettings,
2654
+ Vn as GroupCardModal,
2655
+ Dn as HeaderButtons,
2656
+ b as Icon,
2640
2657
  Nt as InputSettings,
2641
2658
  Et as InputUI,
2642
- Wn as ItemsSettings,
2659
+ Xn as ItemsSettings,
2643
2660
  Bn as LayoutSettings,
2644
2661
  Ks as Link,
2645
- An as ListingSelector,
2646
- Bt as Loader,
2647
- Hn as MetaInfoPost,
2662
+ En as ListingSelector,
2663
+ $t as Loader,
2664
+ Un as MetaInfoPost,
2648
2665
  dt as Modal,
2649
- Dn as PagesMobileMenu,
2666
+ Rn as PagesMobileMenu,
2650
2667
  As as PagesMobileModal,
2651
- $n as PagesSettings,
2652
- zn as ProductCardButtons,
2653
- Un as ProductCardModal,
2668
+ qn as PagesSettings,
2669
+ Hn as ProductCardButtons,
2670
+ Fn as ProductCardModal,
2654
2671
  ts as ProductOptions,
2655
- Xn as RadioUI,
2672
+ Qn as RadioUI,
2656
2673
  kt as RangeSelector,
2657
2674
  nt as Select,
2658
- Qn as SelectInfiniteList,
2659
- Jn as SelectUI,
2660
- Rn as ShareLink,
2661
- $s as ShoppingButton,
2675
+ Jn as SelectInfiniteList,
2676
+ Kn as SelectUI,
2677
+ Ln as ShareLink,
2678
+ Ts as ShoppingButton,
2662
2679
  qs as ShoppingModalCart,
2663
2680
  rt as Switch,
2664
- Kn as TextSettings,
2665
- Zn as TextareaSettings,
2666
- ti as TextareaUI,
2667
- ei as TypesText,
2668
- Tt as UserInfo
2681
+ Zn as TextSettings,
2682
+ ti as TextareaSettings,
2683
+ ei as TextareaUI,
2684
+ si as TypesText,
2685
+ Bt as UserInfo
2669
2686
  };