@billgangcom/theme-lib 1.69.5 → 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,18 +1,19 @@
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 ot, A as Dt, E as Mt, F as Rt, G as Bt, H as Lt } from "./index-CVyi3AZa.js";
2
- import { X as Yn, U as Gn, N as Wn, W as Xn, K as Qn, Q as Jn, T as Kn, J as Zn, V as ti } from "./index-CVyi3AZa.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 zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23", Ft = "_alignmentContent_kh9z8_30", Vt = "_alignments_kh9z8_39", Yt = "_alignment_kh9z8_30", Gt = "_circle_kh9z8_64", Wt = "_paddings_kh9z8_71", Xt = "_padding_kh9z8_71", Qt = "_active_kh9z8_97", G = {
5
- block: zt,
6
- title: Ht,
7
- subtitle: Ut,
8
- alignmentContent: Ft,
9
- alignments: Vt,
10
- alignment: Yt,
11
- circle: Gt,
12
- paddings: Wt,
13
- padding: Xt,
14
- active: Qt
15
- }, Jt = [
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 = {
6
+ block: Ht,
7
+ title: Ut,
8
+ subtitle: Ft,
9
+ alignmentContent: Vt,
10
+ alignments: Yt,
11
+ alignment: Gt,
12
+ circle: Wt,
13
+ paddings: Xt,
14
+ padding: Qt,
15
+ active: Jt
16
+ }, Kt = [
16
17
  "topLeft",
17
18
  "top",
18
19
  "topRight",
@@ -22,7 +23,7 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
22
23
  "bottomLeft",
23
24
  "bottom",
24
25
  "bottomRight"
25
- ], Kt = ["left", "top", "right", "bottom"], Mn = (r) => {
26
+ ], Zt = ["left", "top", "right", "bottom"], Bn = (r) => {
26
27
  const {
27
28
  alignment: i,
28
29
  padding: a,
@@ -61,19 +62,19 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_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: Jt.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 zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_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 zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_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: Kt.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 zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_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,20 +150,20 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
149
150
  ] })
150
151
  ] })
151
152
  ] });
152
- }, Zt = "_title_82zux_1", te = "_subtitle_82zux_5", ee = "_productsBlock_82zux_14", se = "_top_82zux_26", ne = "_products_82zux_14", ie = "_product_82zux_14", ae = "_button_82zux_80", oe = "_disabled_82zux_91", ce = "_buttons_82zux_118", re = "_addButton_82zux_157", le = "_deleteButton_82zux_179", Q = {
153
- title: Zt,
154
- subtitle: te,
155
- productsBlock: ee,
156
- top: se,
157
- products: ne,
158
- product: ie,
159
- button: ae,
160
- disabled: oe,
161
- buttons: ce,
162
- addButton: re,
163
- deleteButton: le
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 = {
154
+ title: te,
155
+ subtitle: ee,
156
+ productsBlock: se,
157
+ top: ne,
158
+ products: ie,
159
+ product: ae,
160
+ button: oe,
161
+ disabled: ce,
162
+ buttons: re,
163
+ addButton: le,
164
+ deleteButton: de
164
165
  };
165
- function de({ id: r, children: i }) {
166
+ function ue({ id: r, children: i }) {
166
167
  const {
167
168
  attributes: a,
168
169
  listeners: s,
@@ -181,14 +182,14 @@ function de({ 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
188
189
  }
189
190
  );
190
191
  }
191
- const Bn = (r) => {
192
+ const Tn = (r) => {
192
193
  const {
193
194
  isActiveItems: i,
194
195
  setIsActiveItems: a,
@@ -198,16 +199,16 @@ const Bn = (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 Bn = (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 Bn = (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 Bn = (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 Bn = (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
- de,
291
+ return x ? /* @__PURE__ */ t.jsx(
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 Bn = (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 Bn = (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 Bn = (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 Bn = (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 Bn = (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,20 +422,20 @@ const Bn = (r) => {
421
422
  }
422
423
  )
423
424
  ] });
424
- }, ue = "_title_roi3a_1", he = "_subtitle_roi3a_5", pe = "_productsBlock_roi3a_14", me = "_top_roi3a_26", ge = "_products_roi3a_14", fe = "_product_roi3a_14", xe = "_button_roi3a_80", _e = "_disabled_roi3a_91", je = "_buttons_roi3a_118", ve = "_addButton_roi3a_164", be = "_deleteButton_roi3a_179", Y = {
425
- title: ue,
426
- subtitle: he,
427
- productsBlock: pe,
428
- top: me,
429
- products: ge,
430
- product: fe,
431
- button: xe,
432
- disabled: _e,
433
- buttons: je,
434
- addButton: ve,
435
- deleteButton: be
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 = {
426
+ title: he,
427
+ subtitle: pe,
428
+ productsBlock: me,
429
+ top: ge,
430
+ products: fe,
431
+ product: xe,
432
+ button: _e,
433
+ disabled: je,
434
+ buttons: ve,
435
+ addButton: be,
436
+ deleteButton: ye
436
437
  };
437
- function ye({ product: r, children: i }) {
438
+ function Ie({ product: r, children: i }) {
438
439
  const {
439
440
  attributes: a,
440
441
  listeners: s,
@@ -453,14 +454,14 @@ function ye({ 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 Tn = (r) => {
464
+ const qn = (r) => {
464
465
  const {
465
466
  isActiveItems: i,
466
467
  setIsActiveItems: a,
@@ -470,13 +471,13 @@ const Tn = (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 Tn = (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,73 +519,73 @@ const Tn = (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
  ] })
567
568
  ] });
568
569
  return g ? /* @__PURE__ */ t.jsx(
569
- ye,
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 Tn = (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 Tn = (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,
@@ -664,10 +665,10 @@ const Tn = (r) => {
664
665
  ] })
665
666
  ] });
666
667
  };
667
- function Ie(r) {
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 Ie(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 $n = (r) => {
687
+ const On = (r) => {
687
688
  const {
688
689
  isActiveItems: i,
689
690
  setIsActiveItems: a,
@@ -693,21 +694,21 @@ const $n = (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 $n = (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 $n = (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 $n = (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
- Ie,
844
+ return x ? /* @__PURE__ */ t.jsx(
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 $n = (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 $n = (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 $n = (r) => {
974
975
  }
975
976
  )
976
977
  ] });
977
- }, Ne = "_subtitle_jql1y_1", Ce = "_products_jql1y_10", Se = "_product_jql1y_10", ke = "_button_jql1y_11", we = "_buttons_jql1y_11", Pe = "_addButton_jql1y_150", Me = "_deleteButton_jql1y_165", et = {
978
- subtitle: Ne,
979
- products: Ce,
980
- product: Se,
981
- button: ke,
982
- buttons: we,
983
- addButton: Pe,
984
- deleteButton: Me
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 = {
979
+ subtitle: Ce,
980
+ products: Se,
981
+ product: ke,
982
+ button: we,
983
+ buttons: Pe,
984
+ addButton: Me,
985
+ deleteButton: $e
985
986
  }, Be = (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({
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 $n = (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 $n = (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 $n = (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 $n = (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 $n = (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 $n = (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 $n = (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 $n = (r) => {
1149
1150
  }
1150
1151
  )
1151
1152
  ] });
1152
- }, qn = (r) => {
1153
+ }, An = (r) => {
1153
1154
  const {
1154
1155
  isActiveButtons: i,
1155
1156
  setIsActiveButtons: a,
@@ -1185,7 +1186,7 @@ const $n = (r) => {
1185
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 Te(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 On = (r) => {
1205
+ const En = (r) => {
1205
1206
  const {
1206
1207
  isActiveItems: i,
1207
1208
  setIsActiveItems: a,
@@ -1211,21 +1212,21 @@ const On = (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 On = (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 On = (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 On = (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
+ return x ? /* @__PURE__ */ t.jsx(
1349
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 On = (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 On = (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,135 +1464,149 @@ const On = (r) => {
1463
1464
  }
1464
1465
  )
1465
1466
  ] });
1466
- }, $e = "_options_167h8_1", qe = "_price_167h8_18", Oe = "_oldPrice_167h8_25", Ae = "_newPrice_167h8_33", Ee = "_animate_167h8_40", De = "_meta_167h8_58", Re = "_info_167h8_64", Le = "_infoRight_167h8_73", ze = "_buttons_167h8_80", He = "_variants_167h8_87", Ue = "_variant_167h8_87", Fe = "_stock_167h8_105", Ve = "_variantInfo_167h8_112", Ye = "_quantity_167h8_119", Ge = "_button_167h8_80", We = "_activeVariant_167h8_165", Xe = "_chargeTypes_167h8_169", Qe = "_charge_167h8_169", Je = "_chargeActive_167h8_194", Ke = "_title_167h8_202", T = {
1467
- options: $e,
1468
- price: qe,
1469
- oldPrice: Oe,
1470
- newPrice: Ae,
1471
- animate: Ee,
1472
- meta: De,
1473
- info: Re,
1474
- infoRight: Le,
1475
- buttons: ze,
1476
- variants: He,
1477
- variant: Ue,
1478
- stock: Fe,
1479
- variantInfo: Ve,
1480
- quantity: Ye,
1481
- button: Ge,
1482
- activeVariant: We,
1483
- chargeTypes: Xe,
1484
- charge: Qe,
1485
- chargeActive: Je,
1486
- title: Ke
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", $ = {
1468
+ options: qe,
1469
+ price: Oe,
1470
+ oldPrice: Ae,
1471
+ newPrice: Ee,
1472
+ animate: De,
1473
+ meta: Re,
1474
+ info: Le,
1475
+ infoRight: ze,
1476
+ buttons: He,
1477
+ variants: Ue,
1478
+ variant: Fe,
1479
+ stock: Ve,
1480
+ variantInfo: Ye,
1481
+ quantity: Ge,
1482
+ button: We,
1483
+ activeVariant: Xe,
1484
+ chargeTypes: Qe,
1485
+ charge: Je,
1486
+ chargeActive: Ke,
1487
+ title: Ze
1487
1488
  };
1488
1489
  var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
1489
- const Ze = (r) => {
1490
- var z, R;
1490
+ const ts = (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 Ze = (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 Ze = (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,51 +1681,53 @@ const Ze = (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
- }, ts = "_buttons_qns27_23", es = "_modal_qns27_32", ss = "_closing_qns27_64", ns = "_info_qns27_113", is = "_top_qns27_120", as = "_title_qns27_131", os = "_clear_qns27_138", cs = "_activeClear_qns27_145", rs = "_count_qns27_149", ls = "_cart_qns27_164", ds = "_empty_qns27_172", us = "_product_qns27_198", hs = "_products_qns27_207", ps = "_image_qns27_215", ms = "_productInfo_qns27_231", gs = "_content_qns27_238", fs = "_name_qns27_244", xs = "_price_qns27_250", _s = "_productButtons_qns27_256", js = "_productButton_qns27_256", vs = "_productCount_qns27_273", bs = "_bottom_qns27_290", ys = "_subtotal_qns27_298", Is = "_block_qns27_306", Ns = "_shoppingCount_qns27_313", Cs = "_total_qns27_333", Ss = "_link_qns27_339", ks = "_userInfo_qns27_346", ws = "_pagesMobileModal_qns27_358", Ps = "_pagesMobileModalContent_qns27_372", Ms = "_pagesMobileModalHeader_qns27_378", Bs = "_pagesMobileModalFooter_qns27_388", w = {
1677
- buttons: ts,
1678
- modal: es,
1679
- closing: ss,
1680
- info: ns,
1681
- top: is,
1682
- title: as,
1683
- clear: os,
1684
- activeClear: cs,
1685
- count: rs,
1686
- cart: ls,
1687
- empty: ds,
1688
- product: us,
1689
- products: hs,
1690
- image: ps,
1691
- productInfo: ms,
1692
- content: gs,
1693
- name: fs,
1694
- price: xs,
1695
- productButtons: _s,
1696
- productButton: js,
1697
- productCount: vs,
1698
- bottom: bs,
1699
- subtotal: ys,
1700
- block: Is,
1701
- shoppingCount: Ns,
1702
- total: Cs,
1703
- link: Ss,
1704
- userInfo: ks,
1705
- pagesMobileModal: ws,
1706
- pagesMobileModalContent: Ps,
1707
- pagesMobileModalHeader: Ms,
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 = {
1694
+ buttons: es,
1695
+ modal: ss,
1696
+ closing: ns,
1697
+ info: is,
1698
+ top: as,
1699
+ title: os,
1700
+ clear: cs,
1701
+ activeClear: rs,
1702
+ count: ls,
1703
+ cart: ds,
1704
+ empty: us,
1705
+ product: hs,
1706
+ products: ps,
1707
+ image: ms,
1708
+ productInfo: gs,
1709
+ content: fs,
1710
+ name: xs,
1711
+ price: _s,
1712
+ productButtons: js,
1713
+ productButton: vs,
1714
+ productCount: bs,
1715
+ bottom: ys,
1716
+ subtotal: Is,
1717
+ block: Ns,
1718
+ shoppingCount: Cs,
1719
+ total: Ss,
1720
+ link: ks,
1721
+ userInfo: ws,
1722
+ pagesMobileModal: Ps,
1723
+ pagesMobileModalContent: Ms,
1724
+ pagesMobileModalHeader: $s,
1708
1725
  pagesMobileModalFooter: Bs
1709
- }, An = (r) => {
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
1729
  i && /* @__PURE__ */ t.jsx(Ts, {}),
1713
- s && /* @__PURE__ */ t.jsx(Tt, { signUp: a })
1730
+ s && /* @__PURE__ */ t.jsx(Bt, { signUp: a })
1714
1731
  ] });
1715
1732
  }, Ts = () => {
1716
1733
  const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
@@ -1731,19 +1748,19 @@ const Ze = (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 Ze = (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,25 +1788,25 @@ const Ze = (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
  },
1778
1795
  withAnimation: !1,
1779
1796
  children: /* @__PURE__ */ t.jsx(
1780
- $s,
1797
+ qs,
1781
1798
  {
1782
1799
  activeProducts: a,
1783
- isCartNotEmpty: f,
1800
+ isCartNotEmpty: x,
1784
1801
  isOpen: P
1785
1802
  }
1786
1803
  )
1787
1804
  }
1788
1805
  )
1789
1806
  ] });
1790
- }, $s = (r) => {
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 Ze = (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 Ze = (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 Ze = (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 Ze = (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 Ze = (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 Ze = (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 Ze = (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,15 +1943,15 @@ const Ze = (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
- ] }) : /* @__PURE__ */ t.jsx(qs, {})
1948
+ ] }) : /* @__PURE__ */ t.jsx(Os, {})
1932
1949
  ]
1933
1950
  }
1934
1951
  );
1935
- }, qs = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
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,58 +1970,57 @@ const Ze = (r) => {
1953
1970
  }
1954
1971
  )
1955
1972
  ] })
1956
- ] }), Tt = ({ signUp: r, close: i }) => {
1957
- const a = localStorage.getItem("token"), s = bt();
1958
- function e(u) {
1973
+ ] }), Bt = ({ signUp: r, close: i }) => {
1974
+ const { token: a } = Dt(), s = bt(), [e, c] = m.useState("test-email@gmail.com");
1975
+ m.useEffect(() => {
1976
+ a && (async () => {
1977
+ if (!a) return;
1978
+ const g = Rt(a);
1979
+ c(g.email);
1980
+ })();
1981
+ }, [a]);
1982
+ function d(u) {
1959
1983
  window.location.pathname.includes("/admin/builder") || s(u);
1960
1984
  }
1961
- if (!a)
1962
- return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1963
- /* @__PURE__ */ t.jsx(
1964
- D,
1965
- {
1966
- onClick: () => {
1967
- e("/customer-dash"), i == null || i();
1968
- },
1969
- type: "Secondary",
1970
- style: {
1971
- padding: 10
1972
- },
1973
- children: "Login"
1974
- }
1975
- ),
1976
- r && /* @__PURE__ */ t.jsx(
1977
- D,
1978
- {
1979
- onClick: () => {
1980
- e("/customer-dash"), i == null || i();
1981
- },
1982
- type: "Primary",
1983
- style: {
1984
- padding: 10,
1985
- whiteSpace: "nowrap"
1986
- },
1987
- children: "Sign Up"
1988
- }
1989
- )
1990
- ] });
1991
- const [c, d] = m.useState("test-email@gmail.com");
1992
- return m.useEffect(() => {
1993
- (async () => {
1994
- const g = Dt(a);
1995
- d(g.email);
1996
- })();
1997
- }, [a]), /* @__PURE__ */ t.jsx(
1985
+ return a ? /* @__PURE__ */ t.jsx(
1998
1986
  "div",
1999
1987
  {
2000
1988
  className: w.userInfo,
2001
1989
  onClick: () => {
2002
- e("/customer-dash"), i == null || i();
1990
+ d("/customer-dash"), i == null || i();
2003
1991
  },
2004
- children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
1992
+ children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
2005
1993
  }
2006
- );
2007
- }, Os = ({
1994
+ ) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1995
+ /* @__PURE__ */ t.jsx(
1996
+ D,
1997
+ {
1998
+ onClick: () => {
1999
+ d("/customer-dash"), i == null || i();
2000
+ },
2001
+ type: "Secondary",
2002
+ style: {
2003
+ padding: 10
2004
+ },
2005
+ children: "Login"
2006
+ }
2007
+ ),
2008
+ r && /* @__PURE__ */ t.jsx(
2009
+ D,
2010
+ {
2011
+ onClick: () => {
2012
+ d("/customer-dash"), i == null || i();
2013
+ },
2014
+ type: "Primary",
2015
+ style: {
2016
+ padding: 10,
2017
+ whiteSpace: "nowrap"
2018
+ },
2019
+ children: "Sign Up"
2020
+ }
2021
+ )
2022
+ ] });
2023
+ }, As = ({
2008
2024
  children: r,
2009
2025
  logo: i,
2010
2026
  setIsOpen: a,
@@ -2028,13 +2044,13 @@ const Ze = (r) => {
2028
2044
  {
2029
2045
  type: "Secondary",
2030
2046
  onClick: c,
2031
- children: /* @__PURE__ */ t.jsx(v, { name: "X" })
2047
+ children: /* @__PURE__ */ t.jsx(b, { name: "X" })
2032
2048
  }
2033
2049
  )
2034
2050
  ] }),
2035
2051
  /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
2036
2052
  /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2037
- Tt,
2053
+ Bt,
2038
2054
  {
2039
2055
  signUp: s,
2040
2056
  close: c
@@ -2043,21 +2059,21 @@ const Ze = (r) => {
2043
2059
  ]
2044
2060
  }
2045
2061
  );
2046
- }, En = ({
2062
+ }, Rn = ({
2047
2063
  children: r,
2048
2064
  logo: i,
2049
2065
  signUp: a
2050
2066
  }) => {
2051
2067
  const [s, e] = m.useState(!1);
2052
2068
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2053
- /* @__PURE__ */ t.jsx(As, { setIsOpenModal: e }),
2069
+ /* @__PURE__ */ t.jsx(Es, { setIsOpenModal: e }),
2054
2070
  s && /* @__PURE__ */ t.jsx(
2055
2071
  dt,
2056
2072
  {
2057
2073
  close: () => e(!1),
2058
2074
  hasPadding: !1,
2059
2075
  children: /* @__PURE__ */ t.jsx(
2060
- Os,
2076
+ As,
2061
2077
  {
2062
2078
  logo: i,
2063
2079
  setIsOpen: e,
@@ -2068,7 +2084,7 @@ const Ze = (r) => {
2068
2084
  }
2069
2085
  )
2070
2086
  ] });
2071
- }, As = (r) => {
2087
+ }, Es = (r) => {
2072
2088
  const { setIsOpenModal: i } = r;
2073
2089
  return /* @__PURE__ */ t.jsx(
2074
2090
  D,
@@ -2080,19 +2096,19 @@ const Ze = (r) => {
2080
2096
  onClick: (a) => {
2081
2097
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2082
2098
  },
2083
- children: /* @__PURE__ */ t.jsx(v, { name: "List" })
2099
+ children: /* @__PURE__ */ t.jsx(b, { name: "List" })
2084
2100
  }
2085
2101
  );
2086
- }, Es = "_share_rlgln_1", Ds = "_modal_rlgln_8", Rs = "_header_rlgln_20", Ls = "_title_rlgln_46", zs = "_copyWrapper_rlgln_52", Hs = "_copyText_rlgln_61", Us = "_copyTextMobile_rlgln_74", Fs = "_copyTextMiniMobile_rlgln_93", st = {
2087
- share: Es,
2088
- modal: Ds,
2089
- header: Rs,
2090
- title: Ls,
2091
- copyWrapper: zs,
2092
- copyText: Hs,
2093
- copyTextMobile: Us,
2094
- copyTextMiniMobile: Fs
2095
- }, Dn = ({ title: r = "Copy Product Link" }) => {
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 = {
2103
+ share: Ds,
2104
+ modal: Rs,
2105
+ header: Ls,
2106
+ title: zs,
2107
+ copyWrapper: Hs,
2108
+ copyText: Us,
2109
+ copyTextMobile: Fs,
2110
+ copyTextMiniMobile: Vs
2111
+ }, Ln = ({ title: r = "Copy Product Link" }) => {
2096
2112
  const { isOpenModal: i, setIsOpenModal: a } = Mt();
2097
2113
  function s() {
2098
2114
  a(!0);
@@ -2107,7 +2123,7 @@ const Ze = (r) => {
2107
2123
  },
2108
2124
  type: "Secondary",
2109
2125
  children: /* @__PURE__ */ t.jsx(
2110
- v,
2126
+ b,
2111
2127
  {
2112
2128
  name: "Share",
2113
2129
  fill: "#757575",
@@ -2116,15 +2132,15 @@ const Ze = (r) => {
2116
2132
  )
2117
2133
  }
2118
2134
  ),
2119
- i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Vs, { title: r }) })
2135
+ i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Ys, { title: r }) })
2120
2136
  ] });
2121
- }, Vs = ({ title: r = "Copy Product Link" }) => {
2137
+ }, Ys = ({ title: r = "Copy Product Link" }) => {
2122
2138
  const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ot(), c = window.location.href;
2123
2139
  function d() {
2124
2140
  navigator.clipboard.writeText(c), s([
2125
2141
  ...a,
2126
2142
  {
2127
- id: Z(),
2143
+ id: J(),
2128
2144
  message: "Link copied to clipboard",
2129
2145
  status: "success"
2130
2146
  }
@@ -2135,19 +2151,19 @@ const Ze = (r) => {
2135
2151
  i(!1), e(!0);
2136
2152
  }, 300);
2137
2153
  }
2138
- function g(f, P) {
2139
- return f.length > P ? f.slice(0, P) + "..." : f;
2154
+ function g(x, P) {
2155
+ return x.length > P ? x.slice(0, P) + "..." : x;
2140
2156
  }
2141
2157
  return /* @__PURE__ */ t.jsxs(
2142
2158
  "div",
2143
2159
  {
2144
2160
  className: st.modal,
2145
- onClick: (f) => f.stopPropagation(),
2161
+ onClick: (x) => x.stopPropagation(),
2146
2162
  children: [
2147
2163
  /* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
2148
2164
  /* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
2149
2165
  /* @__PURE__ */ t.jsx(
2150
- v,
2166
+ b,
2151
2167
  {
2152
2168
  name: "X",
2153
2169
  fill: "#757575",
@@ -2178,21 +2194,21 @@ const Ze = (r) => {
2178
2194
  type: "Secondary",
2179
2195
  onClick: d,
2180
2196
  children: a.find(
2181
- (f) => f.message === "Link copied to clipboard"
2182
- ) ? /* @__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" })
2183
2199
  }
2184
2200
  )
2185
2201
  ] })
2186
2202
  ]
2187
2203
  }
2188
2204
  );
2189
- }, Ys = "_accordion_1s1lq_1", Gs = "_header_1s1lq_9", Ws = "_icon_1s1lq_18", Xs = "_open_1s1lq_21", Qs = "_content_1s1lq_25", ct = {
2190
- accordion: Ys,
2191
- header: Gs,
2192
- icon: Ws,
2193
- open: Xs,
2194
- content: Qs
2195
- }, Rn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2205
+ }, Gs = "_accordion_1s1lq_1", Ws = "_header_1s1lq_9", Xs = "_icon_1s1lq_18", Qs = "_open_1s1lq_21", Js = "_content_1s1lq_25", ct = {
2206
+ accordion: Gs,
2207
+ header: Ws,
2208
+ icon: Xs,
2209
+ open: Qs,
2210
+ content: Js
2211
+ }, zn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2196
2212
  const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
2197
2213
  e(!s);
2198
2214
  };
@@ -2206,7 +2222,7 @@ const Ze = (r) => {
2206
2222
  onClick: g,
2207
2223
  children: [
2208
2224
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2209
- /* @__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" }) })
2210
2226
  ]
2211
2227
  }
2212
2228
  ),
@@ -2220,7 +2236,7 @@ const Ze = (r) => {
2220
2236
  }
2221
2237
  )
2222
2238
  ] });
2223
- }, Js = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
2239
+ }, Ks = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
2224
2240
  if (window.location.pathname.includes("/admin/builder"))
2225
2241
  return /* @__PURE__ */ t.jsx(
2226
2242
  "div",
@@ -2246,24 +2262,24 @@ const Ze = (r) => {
2246
2262
  children: r
2247
2263
  }
2248
2264
  );
2249
- }, Ks = "_buttonsBlock_1b2rb_1", Zs = {
2250
- buttonsBlock: Ks
2251
- }, Ln = (r) => {
2252
- var f, P;
2253
- 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);
2265
+ }, Zs = "_buttonsBlock_1b2rb_1", tn = {
2266
+ buttonsBlock: Zs
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);
2254
2270
  if (!d)
2255
2271
  return null;
2256
2272
  const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
2257
- (j) => j.uniquePath === d.productData.uniquePath
2273
+ (v) => v.uniquePath === d.productData.uniquePath
2258
2274
  );
2259
2275
  if (!u)
2260
2276
  return null;
2261
- const g = e.parts.find((j) => j.productId === u.id);
2277
+ const g = e.parts.find((v) => v.productId === u.id);
2262
2278
  return /* @__PURE__ */ t.jsxs(
2263
2279
  "div",
2264
2280
  {
2265
- className: Zs.buttonsBlock,
2266
- onClick: (j) => j.stopPropagation(),
2281
+ className: tn.buttonsBlock,
2282
+ onClick: (v) => v.stopPropagation(),
2267
2283
  children: [
2268
2284
  /* @__PURE__ */ t.jsx(
2269
2285
  D,
@@ -2291,12 +2307,12 @@ const Ze = (r) => {
2291
2307
  ]
2292
2308
  }
2293
2309
  );
2294
- }, tn = "_wrapper_27wzz_1", en = "_logo_27wzz_8", sn = "_info_27wzz_12", It = {
2295
- wrapper: tn,
2296
- logo: en,
2297
- info: sn
2298
- }, zn = ({ date: r }) => {
2299
- const { general: i } = Rt();
2310
+ }, en = "_wrapper_27wzz_1", sn = "_logo_27wzz_8", nn = "_info_27wzz_12", It = {
2311
+ wrapper: en,
2312
+ logo: sn,
2313
+ info: nn
2314
+ }, Un = ({ date: r }) => {
2315
+ const { general: i } = Lt();
2300
2316
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2301
2317
  function a(s) {
2302
2318
  const e = new Date(s), c = {
@@ -2318,7 +2334,7 @@ const Ze = (r) => {
2318
2334
  style: { objectFit: "contain", width: "48px", height: "48px" }
2319
2335
  }
2320
2336
  ) : /* @__PURE__ */ t.jsx(
2321
- v,
2337
+ b,
2322
2338
  {
2323
2339
  name: "Image",
2324
2340
  width: 48,
@@ -2330,28 +2346,28 @@ const Ze = (r) => {
2330
2346
  /* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
2331
2347
  ] })
2332
2348
  ] });
2333
- }, nn = "_variants_puxd1_80", an = "_variant_puxd1_80", on = "_stock_puxd1_98", cn = "_variantInfo_puxd1_105", rn = "_chargeTypes_puxd1_165", ln = "_charge_puxd1_165", dn = "_chargeActive_puxd1_190", un = "_title_puxd1_198", hn = "_modal_puxd1_204", pn = "_header_puxd1_224", mn = "_productOptions_puxd1_232", gn = "_loading_puxd1_236", J = {
2334
- variants: nn,
2335
- variant: an,
2336
- stock: on,
2337
- variantInfo: cn,
2338
- chargeTypes: rn,
2339
- charge: ln,
2340
- chargeActive: dn,
2341
- title: un,
2342
- modal: hn,
2343
- header: pn,
2344
- productOptions: mn,
2345
- loading: gn
2346
- }, Hn = (r) => {
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 = {
2350
+ variants: an,
2351
+ variant: on,
2352
+ stock: cn,
2353
+ variantInfo: rn,
2354
+ chargeTypes: ln,
2355
+ charge: dn,
2356
+ chargeActive: un,
2357
+ title: hn,
2358
+ modal: pn,
2359
+ header: mn,
2360
+ productOptions: gn,
2361
+ loading: fn
2362
+ }, Fn = (r) => {
2347
2363
  var n;
2348
- 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(
2349
2365
  u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
2350
- ), { addProducts: P } = at(), { setIsOpen: j } = ot();
2366
+ ), { addProducts: P } = at(), { setIsOpen: v } = ot();
2351
2367
  return m.useEffect(() => {
2352
2368
  (async () => {
2353
2369
  e(!0);
2354
- const p = await Lt(
2370
+ const p = await zt(
2355
2371
  encodeURIComponent(
2356
2372
  `/product/${a.productData.uniquePath}`
2357
2373
  )
@@ -2359,27 +2375,27 @@ const Ze = (r) => {
2359
2375
  P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
2360
2376
  })();
2361
2377
  }, []), m.useEffect(() => {
2362
- j(!0);
2378
+ v(!0);
2363
2379
  }, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2364
2380
  "div",
2365
2381
  {
2366
- className: J.modal,
2382
+ className: Q.modal,
2367
2383
  onClick: (o) => o.stopPropagation(),
2368
2384
  children: [
2369
- 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, {}) }),
2370
2386
  r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
2371
- fn,
2387
+ xn,
2372
2388
  {
2373
2389
  variants: c.variants,
2374
2390
  activeVariant: u,
2375
2391
  activeChargeType: g,
2376
- setActiveChargeType: f,
2392
+ setActiveChargeType: x,
2377
2393
  productId: c.id,
2378
2394
  setIsOpen: r.setIsOpen
2379
2395
  }
2380
2396
  ),
2381
2397
  r.type === "Buy Now" && c && !s && /* @__PURE__ */ t.jsx(
2382
- xn,
2398
+ _n,
2383
2399
  {
2384
2400
  product: c,
2385
2401
  setIsOpen: r.setIsOpen
@@ -2388,101 +2404,101 @@ const Ze = (r) => {
2388
2404
  ]
2389
2405
  }
2390
2406
  ) });
2391
- }, fn = (r) => {
2392
- 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 = () => {
2407
+ }, xn = (r) => {
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 = () => {
2393
2409
  p(!1), setTimeout(() => {
2394
2410
  d(!1);
2395
2411
  }, 300);
2396
2412
  };
2397
- async function x(_) {
2398
- const y = u.parts.find(
2399
- (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
2400
2416
  );
2401
- y ? P({
2417
+ N ? P({
2402
2418
  productId: c,
2403
- productVariantId: _,
2404
- quantity: y.quantity + 1
2405
- }) : (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({
2406
2422
  productId: c,
2407
- productVariantId: _,
2423
+ productVariantId: j,
2408
2424
  quantity: 1
2409
2425
  })), n([
2410
- ...j,
2426
+ ...v,
2411
2427
  {
2412
- id: Z(),
2428
+ id: J(),
2413
2429
  message: "Product added to cart",
2414
2430
  status: "success"
2415
2431
  }
2416
2432
  ]);
2417
2433
  }
2418
2434
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2419
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2435
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2420
2436
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2421
2437
  /* @__PURE__ */ t.jsx(
2422
- v,
2438
+ b,
2423
2439
  {
2424
2440
  name: "X",
2425
2441
  width: 24,
2426
2442
  height: 24,
2427
2443
  fill: "var(--text-secondary)",
2428
2444
  hoverable: !0,
2429
- onClick: q
2445
+ onClick: E
2430
2446
  }
2431
2447
  )
2432
2448
  ] }),
2433
- 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(
2434
2450
  "div",
2435
2451
  {
2436
- className: F(J.charge, {
2437
- [J.chargeActive]: a === _
2452
+ className: U(Q.charge, {
2453
+ [Q.chargeActive]: a === j
2438
2454
  }),
2439
- onClick: () => s(_),
2440
- children: St[_]
2455
+ onClick: () => s(j),
2456
+ children: St[j]
2441
2457
  },
2442
- _
2458
+ j
2443
2459
  )) }),
2444
- /* @__PURE__ */ t.jsx("div", { className: J.variants, children: i.map((_) => {
2445
- var y, M;
2460
+ /* @__PURE__ */ t.jsx("div", { className: Q.variants, children: i.map((j) => {
2461
+ var N, M;
2446
2462
  return /* @__PURE__ */ t.jsxs(
2447
2463
  "div",
2448
2464
  {
2449
- className: F(J.variant),
2465
+ className: U(Q.variant),
2450
2466
  onClick: () => {
2451
- x(_.id), d(!1);
2467
+ _(j.id), d(!1);
2452
2468
  },
2453
2469
  children: [
2454
- /* @__PURE__ */ t.jsxs("div", { className: J.variantInfo, children: [
2455
- /* @__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 }),
2456
2472
  /* @__PURE__ */ t.jsxs("span", { children: [
2457
2473
  "$",
2458
- 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"
2459
2475
  ] })
2460
2476
  ] }),
2461
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: J.stock, children: [
2462
- (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 : "∞",
2463
2479
  " ",
2464
2480
  "in stock"
2465
2481
  ] }) })
2466
2482
  ]
2467
2483
  },
2468
- _.id
2484
+ j.id
2469
2485
  );
2470
2486
  }) })
2471
2487
  ] });
2472
- }, xn = (r) => {
2488
+ }, _n = (r) => {
2473
2489
  const { product: i, setIsOpen: a } = r, { setIsOpen: s } = ot(), e = () => {
2474
2490
  s(!1), setTimeout(() => {
2475
2491
  a(!1);
2476
2492
  }, 300);
2477
2493
  };
2478
2494
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2479
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2495
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2480
2496
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2481
2497
  "Buy ",
2482
2498
  it(i.name)
2483
2499
  ] }),
2484
2500
  /* @__PURE__ */ t.jsx(
2485
- v,
2501
+ b,
2486
2502
  {
2487
2503
  name: "X",
2488
2504
  width: 24,
@@ -2497,38 +2513,38 @@ const Ze = (r) => {
2497
2513
  }
2498
2514
  )
2499
2515
  ] }),
2500
- /* @__PURE__ */ t.jsx("div", { className: J.productOptions, children: /* @__PURE__ */ t.jsx(
2501
- Ze,
2516
+ /* @__PURE__ */ t.jsx("div", { className: Q.productOptions, children: /* @__PURE__ */ t.jsx(
2517
+ ts,
2502
2518
  {
2503
2519
  product: i,
2504
2520
  setIsOpen: a
2505
2521
  }
2506
2522
  ) })
2507
2523
  ] });
2508
- }, _n = "_contentModal_2a136_1", jn = "_modalTop_2a136_13", vn = "_loading_2a136_19", bn = "_modalCards_2a136_27", yn = "_modalImage_2a136_32", In = "_card_2a136_37", Nn = "_cardInfo_2a136_48", Cn = "_cardButtons_2a136_55", Sn = "_title_2a136_61", kn = "_blockImage_2a136_68", W = {
2509
- contentModal: _n,
2510
- modalTop: jn,
2511
- loading: vn,
2512
- modalCards: bn,
2513
- modalImage: yn,
2514
- card: In,
2515
- cardInfo: Nn,
2516
- cardButtons: Cn,
2517
- title: Sn,
2518
- blockImage: kn
2519
- }, Un = (r) => {
2520
- 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();
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 = {
2525
+ contentModal: jn,
2526
+ modalTop: vn,
2527
+ loading: bn,
2528
+ modalCards: yn,
2529
+ modalImage: In,
2530
+ card: Nn,
2531
+ cardInfo: Cn,
2532
+ cardButtons: Sn,
2533
+ title: kn,
2534
+ blockImage: wn
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();
2521
2537
  m.useEffect(() => {
2522
2538
  var p;
2523
- f(!0);
2539
+ x(!0);
2524
2540
  const o = (p = a.listings) == null ? void 0 : p.filter(
2525
- (q) => s.listingIdList.includes(q.id)
2541
+ (E) => s.listingIdList.includes(E.id)
2526
2542
  );
2527
- o && u([...o]), f(!1);
2543
+ o && u([...o]), x(!1);
2528
2544
  }, [a]), m.useEffect(() => {
2529
2545
  P(!0);
2530
2546
  }, []);
2531
- const j = () => {
2547
+ const v = () => {
2532
2548
  P(!1), setTimeout(() => {
2533
2549
  i(!1);
2534
2550
  }, 300);
@@ -2539,31 +2555,31 @@ const Ze = (r) => {
2539
2555
  return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2540
2556
  "div",
2541
2557
  {
2542
- className: W.contentModal,
2558
+ className: G.contentModal,
2543
2559
  onClick: (o) => o.stopPropagation(),
2544
2560
  children: [
2545
- /* @__PURE__ */ t.jsxs("div", { className: W.modalTop, children: [
2561
+ /* @__PURE__ */ t.jsxs("div", { className: G.modalTop, children: [
2546
2562
  /* @__PURE__ */ t.jsx(
2547
2563
  "span",
2548
2564
  {
2549
- className: W.title,
2565
+ className: G.title,
2550
2566
  id: "h4",
2551
2567
  children: it(s.name)
2552
2568
  }
2553
2569
  ),
2554
2570
  /* @__PURE__ */ t.jsx(
2555
- v,
2571
+ b,
2556
2572
  {
2557
2573
  name: "X",
2558
2574
  hoverable: !0,
2559
- onClick: j
2575
+ onClick: v
2560
2576
  }
2561
2577
  )
2562
2578
  ] }),
2563
- !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(
2564
2580
  "div",
2565
2581
  {
2566
- className: W.card,
2582
+ className: G.card,
2567
2583
  children: [
2568
2584
  /* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
2569
2585
  "img",
@@ -2572,14 +2588,14 @@ const Ze = (r) => {
2572
2588
  alt: "",
2573
2589
  width: 64,
2574
2590
  height: 64,
2575
- className: W.modalImage
2591
+ className: G.modalImage
2576
2592
  }
2577
- ) : /* @__PURE__ */ t.jsx("div", { className: F(W.blockImage, W.modalImage), children: /* @__PURE__ */ t.jsx(v, { name: "Image" }) }) }),
2578
- /* @__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: [
2579
2595
  /* @__PURE__ */ t.jsxs(
2580
2596
  "span",
2581
2597
  {
2582
- className: W.name,
2598
+ className: G.name,
2583
2599
  id: "h5",
2584
2600
  children: [
2585
2601
  it(o.productData.name),
@@ -2594,14 +2610,14 @@ const Ze = (r) => {
2594
2610
  o.productData.shortDescription && /* @__PURE__ */ t.jsx(
2595
2611
  "span",
2596
2612
  {
2597
- className: W.short,
2613
+ className: G.short,
2598
2614
  id: "md",
2599
2615
  children: it(o.productData.shortDescription)
2600
2616
  }
2601
2617
  ),
2602
2618
  /* @__PURE__ */ t.jsx("span", {})
2603
2619
  ] }),
2604
- /* @__PURE__ */ t.jsxs("div", { className: W.cardButtons, children: [
2620
+ /* @__PURE__ */ t.jsxs("div", { className: G.cardButtons, children: [
2605
2621
  /* @__PURE__ */ t.jsx(
2606
2622
  D,
2607
2623
  {
@@ -2612,59 +2628,59 @@ const Ze = (r) => {
2612
2628
  children: "Buy"
2613
2629
  }
2614
2630
  ),
2615
- /* @__PURE__ */ t.jsx(Js, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
2631
+ /* @__PURE__ */ t.jsx(Ks, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
2616
2632
  ] })
2617
2633
  ]
2618
2634
  },
2619
2635
  o.id
2620
2636
  )) }),
2621
- 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, {}) })
2622
2638
  ]
2623
2639
  }
2624
2640
  ) });
2625
2641
  };
2626
2642
  export {
2627
- Rn as Accordion,
2628
- As as BurgerMenuButton,
2643
+ zn as Accordion,
2644
+ Es as BurgerMenuButton,
2629
2645
  D as Button,
2630
2646
  Be as ButtonTypeSettings,
2631
- qn as ButtonsSettings,
2632
- Bn as CategorySettings,
2647
+ An as ButtonsSettings,
2648
+ Tn as CategorySettings,
2633
2649
  St as ChargeTypes,
2634
2650
  qt as ChooseImage,
2635
- Yn as ChooseImageModal,
2636
- qs as EmptyCart,
2637
- $n as FormSettings,
2638
- Un as GroupCardModal,
2639
- An as HeaderButtons,
2640
- v as Icon,
2651
+ Wn as ChooseImageModal,
2652
+ Os as EmptyCart,
2653
+ On as FormSettings,
2654
+ Vn as GroupCardModal,
2655
+ Dn as HeaderButtons,
2656
+ b as Icon,
2641
2657
  Nt as InputSettings,
2642
2658
  Et as InputUI,
2643
- Gn as ItemsSettings,
2644
- Mn as LayoutSettings,
2645
- Js as Link,
2646
- On as ListingSelector,
2647
- Bt as Loader,
2648
- zn as MetaInfoPost,
2659
+ Xn as ItemsSettings,
2660
+ Bn as LayoutSettings,
2661
+ Ks as Link,
2662
+ En as ListingSelector,
2663
+ $t as Loader,
2664
+ Un as MetaInfoPost,
2649
2665
  dt as Modal,
2650
- En as PagesMobileMenu,
2651
- Os as PagesMobileModal,
2652
- Tn as PagesSettings,
2653
- Ln as ProductCardButtons,
2654
- Hn as ProductCardModal,
2655
- Ze as ProductOptions,
2656
- Wn as RadioUI,
2666
+ Rn as PagesMobileMenu,
2667
+ As as PagesMobileModal,
2668
+ qn as PagesSettings,
2669
+ Hn as ProductCardButtons,
2670
+ Fn as ProductCardModal,
2671
+ ts as ProductOptions,
2672
+ Qn as RadioUI,
2657
2673
  kt as RangeSelector,
2658
2674
  nt as Select,
2659
- Xn as SelectInfiniteList,
2660
- Qn as SelectUI,
2661
- Dn as ShareLink,
2675
+ Jn as SelectInfiniteList,
2676
+ Kn as SelectUI,
2677
+ Ln as ShareLink,
2662
2678
  Ts as ShoppingButton,
2663
- $s as ShoppingModalCart,
2679
+ qs as ShoppingModalCart,
2664
2680
  rt as Switch,
2665
- Jn as TextSettings,
2666
- Kn as TextareaSettings,
2667
- Zn as TextareaUI,
2668
- ti as TypesText,
2669
- Tt as UserInfo
2681
+ Zn as TextSettings,
2682
+ ti as TextareaSettings,
2683
+ ei as TextareaUI,
2684
+ si as TypesText,
2685
+ Bt as UserInfo
2670
2686
  };