@billgangcom/theme-lib 1.69.1 → 1.69.3

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,18 @@
1
- import { j as t, I as v, c as U, b as vt, u as rt, d as lt, P as dt, S as at, R as Ct, D as ut, e as ht, v as pt, B as ot, f as st, a as St, g as kt, O as ct, h as K, i as mt, C as gt, k as V, l as Bt, m as Tt, n as ft, o as $t, p as _t, q as X, L as Mt, r as bt, t as xt, w as nt, s as yt, x as F, y as At, M as It, z as wt, A as Ot, E as Pt, F as Et, G as Rt, H as Dt } from "./index-C1GpRLwI.js";
2
- import { X as Mn, U as An, N as On, W as En, K as Rn, Q as Dn, T as Ln, J as zn, V as Fn } from "./index-C1GpRLwI.js";
3
- import f from "react";
4
- const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Ht = "_alignmentContent_kh9z8_30", Ut = "_alignments_kh9z8_39", Vt = "_alignment_kh9z8_30", Yt = "_circle_kh9z8_64", Wt = "_paddings_kh9z8_71", Gt = "_padding_kh9z8_71", Xt = "_active_kh9z8_97", G = {
5
- block: Lt,
6
- title: zt,
7
- subtitle: Ft,
8
- alignmentContent: Ht,
9
- alignments: Ut,
10
- alignment: Vt,
11
- circle: Yt,
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";
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
12
  paddings: Wt,
13
- padding: Gt,
14
- active: Xt
15
- }, Qt = [
13
+ padding: Xt,
14
+ active: Qt
15
+ }, Jt = [
16
16
  "topLeft",
17
17
  "top",
18
18
  "topRight",
@@ -22,17 +22,17 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
22
22
  "bottomLeft",
23
23
  "bottom",
24
24
  "bottomRight"
25
- ], Jt = ["left", "top", "right", "bottom"], _n = (o) => {
25
+ ], Kt = ["left", "top", "right", "bottom"], Mn = (r) => {
26
26
  const {
27
27
  alignment: i,
28
28
  padding: a,
29
29
  setPadding: s,
30
30
  setAlignment: e,
31
31
  isAlignment: c = !0,
32
- isPadding: u = !0
33
- } = o;
34
- function d(l) {
35
- switch (l) {
32
+ isPadding: d = !0
33
+ } = r;
34
+ function u(o) {
35
+ switch (o) {
36
36
  case "left":
37
37
  case "topLeft":
38
38
  case "bottomLeft":
@@ -49,8 +49,8 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
49
49
  return "TextAlignCenter";
50
50
  }
51
51
  }
52
- function g(l) {
53
- switch (l) {
52
+ function g(o) {
53
+ switch (o) {
54
54
  case "left":
55
55
  return "AlignLeft";
56
56
  case "right":
@@ -61,40 +61,40 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
61
61
  return "AlignBottom";
62
62
  }
63
63
  }
64
- const [x, $] = f.useState(null), [_, n] = f.useState(null);
64
+ const [f, P] = m.useState(null), [j, n] = m.useState(null);
65
65
  return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
66
66
  /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
67
67
  /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
68
68
  c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
69
69
  /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Alignment" }),
70
- /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Qt.map((l) => /* @__PURE__ */ t.jsxs(
70
+ /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Jt.map((o) => /* @__PURE__ */ t.jsxs(
71
71
  "div",
72
72
  {
73
73
  onClick: () => {
74
- e(l);
74
+ e(o);
75
75
  },
76
76
  className: G.alignment,
77
77
  onMouseEnter: () => {
78
- $(l);
78
+ P(o);
79
79
  },
80
80
  onMouseLeave: () => {
81
- $(null);
81
+ P(null);
82
82
  },
83
83
  children: [
84
- l !== i && x !== l && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
- l !== i && x === l && /* @__PURE__ */ t.jsx(
84
+ o !== i && f !== o && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
+ o !== i && f === o && /* @__PURE__ */ t.jsx(
86
86
  v,
87
87
  {
88
- name: d(x),
88
+ name: u(f),
89
89
  fill: "#c2c2c2",
90
90
  width: 22,
91
91
  height: 22
92
92
  }
93
93
  ),
94
- l === i && /* @__PURE__ */ t.jsx(
94
+ o === i && /* @__PURE__ */ t.jsx(
95
95
  v,
96
96
  {
97
- name: d(i),
97
+ name: u(i),
98
98
  fill: "#FF3F19",
99
99
  width: 22,
100
100
  height: 22
@@ -102,19 +102,19 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
102
102
  )
103
103
  ]
104
104
  },
105
- l
105
+ o
106
106
  )) })
107
107
  ] }),
108
- u && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
108
+ d && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
109
  /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
110
- /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Jt.map((l) => /* @__PURE__ */ t.jsxs(
110
+ /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
111
111
  "label",
112
112
  {
113
- className: U(G.padding, {
114
- [G.active]: _ === l
113
+ className: F(G.padding, {
114
+ [G.active]: j === o
115
115
  }),
116
116
  onFocus: () => {
117
- n(l);
117
+ n(o);
118
118
  },
119
119
  onBlur: () => {
120
120
  n(null);
@@ -123,19 +123,19 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
123
123
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
124
124
  v,
125
125
  {
126
- name: g(l),
126
+ name: g(o),
127
127
  width: 20,
128
128
  height: 20
129
129
  }
130
130
  ) }),
131
131
  /* @__PURE__ */ t.jsx(
132
- vt,
132
+ Nt,
133
133
  {
134
134
  type: "number",
135
- value: String(a[l]),
136
- onChange: (m) => s({
135
+ value: String(a[o]),
136
+ onChange: (p) => s({
137
137
  ...a,
138
- [l]: Math.min(Number(m), 999)
138
+ [o]: Math.min(Number(p), 999)
139
139
  }),
140
140
  max: 999,
141
141
  paddingless: !0,
@@ -144,73 +144,73 @@ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
144
144
  )
145
145
  ]
146
146
  },
147
- l
147
+ o
148
148
  )) })
149
149
  ] })
150
150
  ] })
151
151
  ] });
152
- }, Kt = "_title_82zux_1", Zt = "_subtitle_82zux_5", te = "_productsBlock_82zux_14", ee = "_top_82zux_26", se = "_products_82zux_14", ne = "_product_82zux_14", ie = "_button_82zux_80", ae = "_disabled_82zux_91", oe = "_buttons_82zux_118", ce = "_addButton_82zux_157", re = "_deleteButton_82zux_179", Q = {
153
- title: Kt,
154
- subtitle: Zt,
155
- productsBlock: te,
156
- top: ee,
157
- products: se,
158
- product: ne,
159
- button: ie,
160
- disabled: ae,
161
- buttons: oe,
162
- addButton: ce,
163
- deleteButton: re
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
164
164
  };
165
- function le({ id: o, children: i }) {
165
+ function de({ id: r, children: i }) {
166
166
  const {
167
167
  attributes: a,
168
168
  listeners: s,
169
169
  setNodeRef: e,
170
170
  transform: c,
171
- transition: u,
172
- isDragging: d
173
- } = mt({
174
- id: o
171
+ transition: d,
172
+ isDragging: u
173
+ } = _t({
174
+ id: r
175
175
  }), g = {
176
- transform: gt.Transform.toString(c),
177
- transition: u
176
+ transform: jt.Transform.toString(c),
177
+ transition: d
178
178
  };
179
179
  return /* @__PURE__ */ t.jsx(
180
180
  "div",
181
181
  {
182
182
  ref: e,
183
183
  style: g,
184
- className: `${Q.product} ${d ? Q.dragging : ""}`,
184
+ className: `${Q.product} ${u ? Q.dragging : ""}`,
185
185
  ...a,
186
186
  ...s,
187
187
  children: i
188
188
  }
189
189
  );
190
190
  }
191
- const jn = (o) => {
191
+ const Bn = (r) => {
192
192
  const {
193
193
  isActiveItems: i,
194
194
  setIsActiveItems: a,
195
195
  items: s,
196
196
  setItems: e,
197
197
  other: c,
198
- tags: u,
199
- title: d,
198
+ tags: d,
199
+ title: u,
200
200
  subtitle: g,
201
- draggable: x = !1,
202
- withImage: $ = !1,
203
- addable: _ = !0,
201
+ draggable: f = !1,
202
+ withImage: P = !1,
203
+ addable: j = !0,
204
204
  itemsOptions: n,
205
- hasRangeSelector: l = !1,
206
- rangeSelectorOptions: m,
207
- limit: b,
208
- autoScrollInterval: p,
209
- deletable: P,
210
- aspectRatio: C,
211
- setAspectRatio: O
212
- } = o, L = rt(
213
- lt(dt, {
205
+ hasRangeSelector: o = !1,
206
+ rangeSelectorOptions: p,
207
+ limit: q,
208
+ autoScrollInterval: x,
209
+ deletable: _,
210
+ aspectRatio: y,
211
+ setAspectRatio: M
212
+ } = r, z = ht(
213
+ pt(mt, {
214
214
  activationConstraint: {
215
215
  distance: 5
216
216
  }
@@ -218,15 +218,15 @@ const jn = (o) => {
218
218
  ), R = (h) => {
219
219
  const { active: S, over: k } = h;
220
220
  if (k && S.id !== k.id) {
221
- const I = s.findIndex((M) => M === S.id), q = s.findIndex((M) => M === k.id);
222
- if (I !== -1 && q !== -1) {
223
- const M = [...s], [j] = M.splice(I, 1);
224
- M.splice(q, 0, j), e(M);
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);
225
225
  }
226
226
  }
227
227
  };
228
- function y(h) {
229
- if ($)
228
+ function I(h) {
229
+ if (P)
230
230
  return h ? /* @__PURE__ */ t.jsx(
231
231
  "img",
232
232
  {
@@ -245,11 +245,11 @@ const jn = (o) => {
245
245
  }
246
246
  );
247
247
  }
248
- const z = (h, S = !1) => {
249
- const k = n.find((q) => q.id === h);
248
+ const H = (h, S = !1) => {
249
+ const k = n.find((B) => B.id === h);
250
250
  if (!k) return;
251
- const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
- x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
251
+ const N = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
253
253
  v,
254
254
  {
255
255
  name: "DotsSixVertical",
@@ -259,19 +259,19 @@ const jn = (o) => {
259
259
  }
260
260
  ) }),
261
261
  /* @__PURE__ */ t.jsx(
262
- st,
262
+ nt,
263
263
  {
264
- onChange: (q) => {
265
- const M = [...s], j = n.find((r) => r.name === q);
266
- if (!j) return;
267
- const A = j.id, H = M.map((r) => r === h ? A : r);
268
- e([...H]);
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]);
269
269
  },
270
270
  value: k.name,
271
- options: n.filter((q) => !s.find((M) => M === q.id)).map((q) => q.name),
272
- leftAddonOptions: n.map((q) => ({
273
- value: q.name,
274
- addon: y(q.images)
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)
275
275
  }))
276
276
  }
277
277
  ),
@@ -283,56 +283,56 @@ const jn = (o) => {
283
283
  width: 20,
284
284
  height: 20,
285
285
  fill: "#C12A2A",
286
- onClick: () => e(s.filter((q) => q !== h))
286
+ onClick: () => e(s.filter((B) => B !== h))
287
287
  }
288
288
  ) }) })
289
289
  ] });
290
- return x ? /* @__PURE__ */ t.jsx(
291
- le,
290
+ return f ? /* @__PURE__ */ t.jsx(
291
+ de,
292
292
  {
293
293
  id: h,
294
- children: I
294
+ children: N
295
295
  },
296
- K()
296
+ Z()
297
297
  ) : /* @__PURE__ */ t.jsx(
298
298
  "div",
299
299
  {
300
300
  className: Q.product,
301
- children: I
301
+ children: N
302
302
  },
303
- K()
303
+ Z()
304
304
  );
305
305
  };
306
306
  return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
- (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
- d && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: d }),
307
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
+ u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
309
309
  i !== void 0 && /* @__PURE__ */ t.jsx(
310
- at,
310
+ rt,
311
311
  {
312
312
  current: i,
313
313
  onChange: (h) => a == null ? void 0 : a(h)
314
314
  }
315
315
  )
316
316
  ] }),
317
- l && m && /* @__PURE__ */ t.jsx(Ct, { ...m }),
317
+ o && p && /* @__PURE__ */ t.jsx(kt, { ...p }),
318
318
  /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
319
  g && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: g }),
320
- x ? /* @__PURE__ */ t.jsx(
321
- ut,
320
+ f ? /* @__PURE__ */ t.jsx(
321
+ gt,
322
322
  {
323
- sensors: L,
323
+ sensors: z,
324
324
  onDragEnd: R,
325
325
  children: /* @__PURE__ */ t.jsx(
326
- ht,
326
+ ft,
327
327
  {
328
328
  items: s,
329
- strategy: pt,
330
- children: s.map((h) => z(h, P))
329
+ strategy: xt,
330
+ children: s.map((h) => H(h, _))
331
331
  }
332
332
  )
333
333
  }
334
- ) : s.map((h) => z(h, P)),
335
- _ && /* @__PURE__ */ t.jsx(
334
+ ) : s.map((h) => H(h, _)),
335
+ j && /* @__PURE__ */ t.jsx(
336
336
  "div",
337
337
  {
338
338
  style: {
@@ -342,20 +342,20 @@ const jn = (o) => {
342
342
  gap: 5
343
343
  },
344
344
  children: /* @__PURE__ */ t.jsx(
345
- ot,
345
+ lt,
346
346
  {
347
347
  withoutHover: !0,
348
- className: U(Q.button, {
349
- [Q.disabled]: !!(b && b <= s.length || s.length === n.length)
348
+ className: F(Q.button, {
349
+ [Q.disabled]: !!(q && q <= s.length || s.length === n.length)
350
350
  }),
351
351
  size: "s",
352
- disabled: !!(b && b <= s.length || s.length === n.length),
352
+ disabled: !!(q && q <= s.length || s.length === n.length),
353
353
  onClick: () => {
354
354
  const h = [...s];
355
355
  let S = null;
356
356
  if (n) {
357
357
  for (let k = 0; k < n.length; k++)
358
- if (!s.find((I) => I === n[k].id)) {
358
+ if (!s.find((N) => N === n[k].id)) {
359
359
  S = n[k];
360
360
  break;
361
361
  }
@@ -381,37 +381,37 @@ const jn = (o) => {
381
381
  }
382
382
  )
383
383
  ] }),
384
- C && O && /* @__PURE__ */ t.jsx(
385
- st,
384
+ y && M && /* @__PURE__ */ t.jsx(
385
+ nt,
386
386
  {
387
- value: C,
387
+ value: y,
388
388
  label: "Aspect Ratio",
389
- options: Object.keys(kt),
390
- onChange: (h) => O(h),
391
- leftAddonOptions: St
389
+ options: Object.keys(Pt),
390
+ onChange: (h) => M(h),
391
+ leftAddonOptions: wt
392
392
  }
393
393
  ),
394
- u !== void 0 && /* @__PURE__ */ t.jsx(
395
- ct,
394
+ d !== void 0 && /* @__PURE__ */ t.jsx(
395
+ ut,
396
396
  {
397
397
  tagsTitle: "Tags",
398
- items: u
398
+ items: d
399
399
  }
400
400
  ),
401
401
  c !== void 0 && /* @__PURE__ */ t.jsx(
402
- ct,
402
+ ut,
403
403
  {
404
404
  otherTitle: "Other",
405
405
  items: c
406
406
  }
407
407
  ),
408
- p !== void 0 && /* @__PURE__ */ t.jsx(
409
- vt,
408
+ x !== void 0 && /* @__PURE__ */ t.jsx(
409
+ Nt,
410
410
  {
411
411
  label: "Auto scroll interval",
412
412
  type: "number",
413
- value: String(p.scrollInterval),
414
- onChange: (h) => p.setScrollInterval(Number(h)),
413
+ value: String(x.scrollInterval),
414
+ onChange: (h) => x.setScrollInterval(Number(h)),
415
415
  min: 0.1,
416
416
  max: 100,
417
417
  style: {
@@ -421,93 +421,93 @@ const jn = (o) => {
421
421
  }
422
422
  )
423
423
  ] });
424
- }, de = "_title_roi3a_1", ue = "_subtitle_roi3a_5", he = "_productsBlock_roi3a_14", pe = "_top_roi3a_26", me = "_products_roi3a_14", ge = "_product_roi3a_14", fe = "_button_roi3a_80", xe = "_disabled_roi3a_91", _e = "_buttons_roi3a_118", je = "_addButton_roi3a_164", ve = "_deleteButton_roi3a_179", Y = {
425
- title: de,
426
- subtitle: ue,
427
- productsBlock: he,
428
- top: pe,
429
- products: me,
430
- product: ge,
431
- button: fe,
432
- disabled: xe,
433
- buttons: _e,
434
- addButton: je,
435
- deleteButton: ve
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
436
436
  };
437
- function be({ product: o, children: i }) {
437
+ function ye({ product: r, children: i }) {
438
438
  const {
439
439
  attributes: a,
440
440
  listeners: s,
441
441
  setNodeRef: e,
442
442
  transform: c,
443
- transition: u,
444
- isDragging: d
445
- } = mt({
446
- id: o.id
443
+ transition: d,
444
+ isDragging: u
445
+ } = _t({
446
+ id: r.id
447
447
  }), g = {
448
- transform: gt.Transform.toString(c),
449
- transition: u
448
+ transform: jt.Transform.toString(c),
449
+ transition: d
450
450
  };
451
451
  return /* @__PURE__ */ t.jsx(
452
452
  "div",
453
453
  {
454
454
  ref: e,
455
455
  style: g,
456
- className: `${Y.product} ${d ? Y.dragging : ""}`,
456
+ className: `${Y.product} ${u ? Y.dragging : ""}`,
457
457
  ...a,
458
458
  ...s,
459
459
  children: i
460
460
  }
461
461
  );
462
462
  }
463
- const vn = (o) => {
463
+ const Tn = (r) => {
464
464
  const {
465
465
  isActiveItems: i,
466
466
  setIsActiveItems: a,
467
467
  items: s,
468
468
  setItems: e,
469
469
  title: c,
470
- subtitle: u,
471
- editable: d = !0,
470
+ subtitle: d,
471
+ editable: u = !0,
472
472
  draggable: g = !1,
473
- deletable: x = !0,
474
- addable: $ = !0,
475
- itemsType: _,
473
+ deletable: f = !0,
474
+ addable: P = !0,
475
+ itemsType: j,
476
476
  itemsOptions: n,
477
- addableOptions: l = {},
478
- limit: m
479
- } = o, [b, p] = f.useState(null), [P, C] = f.useState(null), O = f.useRef(null), L = rt(
480
- lt(dt, {
477
+ addableOptions: o = {},
478
+ limit: p
479
+ } = r, [q, x] = m.useState(null), [_, y] = m.useState(null), M = m.useRef(null), z = ht(
480
+ pt(mt, {
481
481
  activationConstraint: {
482
482
  distance: 5
483
483
  }
484
484
  })
485
485
  );
486
- f.useEffect(() => {
487
- if (b) {
488
- const h = [...s].map((S) => S.id === b.id ? b : S);
486
+ m.useEffect(() => {
487
+ if (q) {
488
+ const h = [...s].map((S) => S.id === q.id ? q : S);
489
489
  e(h);
490
490
  }
491
- }, [b]), f.useEffect(() => {
492
- O.current && P && (O.current.getBoundingClientRect().height, P.top);
493
- }, [O.current, P]);
491
+ }, [q]), m.useEffect(() => {
492
+ M.current && _ && (M.current.getBoundingClientRect().height, _.top);
493
+ }, [M.current, _]);
494
494
  const R = (h, S) => {
495
495
  h.stopPropagation();
496
496
  const k = h.target.getBoundingClientRect();
497
- C({
497
+ y({
498
498
  top: k.top + window.scrollY,
499
499
  left: k.left - 30
500
- }), p(S);
501
- }, y = (h) => {
500
+ }), x(S);
501
+ }, I = (h) => {
502
502
  const { active: S, over: k } = h;
503
503
  if (k && S.id !== k.id) {
504
- const I = s.findIndex((M) => M.id === S.id), q = s.findIndex((M) => M.id === k.id);
505
- if (I !== -1 && q !== -1) {
506
- const M = [...s], [j] = M.splice(I, 1);
507
- M.splice(q, 0, j), e(M);
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);
508
508
  }
509
509
  }
510
- }, z = (h, S) => {
510
+ }, H = (h, S) => {
511
511
  const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
512
512
  g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
513
513
  v,
@@ -518,41 +518,41 @@ const vn = (o) => {
518
518
  height: 20
519
519
  }
520
520
  ) }),
521
- _ === "select" && n && /* @__PURE__ */ t.jsx(
522
- st,
521
+ j === "select" && n && /* @__PURE__ */ t.jsx(
522
+ nt,
523
523
  {
524
- onChange: (I) => {
525
- const q = [...s], M = n.find((A) => A.name === I);
526
- if (!M) return;
527
- const j = q.map((A) => A.id === h.id ? {
528
- ...M,
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,
529
529
  name: {
530
- "en-US": I
530
+ "en-US": N
531
531
  }
532
532
  } : A);
533
- p({
533
+ x({
534
534
  ...h,
535
535
  name: {
536
- "en-US": I
536
+ "en-US": N
537
537
  }
538
- }), e([...j]);
538
+ }), e([...b]);
539
539
  },
540
540
  value: h.name,
541
- options: n.filter((I) => !s.find((q) => q.name === I.name)).map((I) => I.name)
541
+ options: n.filter((N) => !s.find((B) => B.name === N.name)).map((N) => N.name)
542
542
  }
543
543
  ),
544
544
  /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
545
- d && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
545
+ u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
546
546
  v,
547
547
  {
548
548
  name: "Sliders",
549
549
  hoverable: !0,
550
550
  width: 20,
551
551
  height: 20,
552
- onClick: (I) => R(I, h)
552
+ onClick: (N) => R(N, h)
553
553
  }
554
554
  ) }),
555
- x && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
555
+ f && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
556
556
  v,
557
557
  {
558
558
  name: "Trash",
@@ -560,13 +560,13 @@ const vn = (o) => {
560
560
  width: 20,
561
561
  height: 20,
562
562
  fill: "#C12A2A",
563
- onClick: () => e(s.filter((I) => I.id !== h.id))
563
+ onClick: () => e(s.filter((N) => N.id !== h.id))
564
564
  }
565
565
  ) })
566
566
  ] })
567
567
  ] });
568
568
  return g ? /* @__PURE__ */ t.jsx(
569
- be,
569
+ ye,
570
570
  {
571
571
  product: h,
572
572
  index: S,
@@ -586,7 +586,7 @@ const vn = (o) => {
586
586
  (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
587
  c && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: c }),
588
588
  i !== void 0 && /* @__PURE__ */ t.jsx(
589
- at,
589
+ rt,
590
590
  {
591
591
  current: i,
592
592
  onChange: (h) => a == null ? void 0 : a(h)
@@ -594,23 +594,23 @@ const vn = (o) => {
594
594
  )
595
595
  ] }),
596
596
  /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
597
- u && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: u }),
597
+ d && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: d }),
598
598
  g ? /* @__PURE__ */ t.jsx(
599
- ut,
599
+ gt,
600
600
  {
601
- sensors: L,
602
- onDragEnd: y,
601
+ sensors: z,
602
+ onDragEnd: I,
603
603
  children: /* @__PURE__ */ t.jsx(
604
- ht,
604
+ ft,
605
605
  {
606
606
  items: s.map((h) => h.id),
607
- strategy: pt,
608
- children: s.map((h, S) => z(h, S))
607
+ strategy: xt,
608
+ children: s.map((h, S) => H(h, S))
609
609
  }
610
610
  )
611
611
  }
612
- ) : s.map((h, S) => z(h, S)),
613
- $ && /* @__PURE__ */ t.jsx(
612
+ ) : s.map((h, S) => H(h, S)),
613
+ P && /* @__PURE__ */ t.jsx(
614
614
  "div",
615
615
  {
616
616
  style: {
@@ -619,28 +619,28 @@ const vn = (o) => {
619
619
  justifyContent: "center"
620
620
  },
621
621
  children: /* @__PURE__ */ t.jsx(
622
- ot,
622
+ lt,
623
623
  {
624
624
  withoutHover: !0,
625
- className: U(Y.button, {
626
- [Y.disabled]: !!(m && m <= s.length || s.length === (n == null ? void 0 : n.length))
625
+ className: F(Y.button, {
626
+ [Y.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
627
627
  }),
628
628
  size: "s",
629
- disabled: !!(m && m <= s.length || s.length === (n == null ? void 0 : n.length)),
629
+ disabled: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length)),
630
630
  onClick: () => {
631
631
  const h = [...s];
632
632
  let S = null;
633
633
  if (n) {
634
634
  for (let k = 0; k < n.length; k++)
635
- if (!s.find((I) => I.id === n[k].id)) {
635
+ if (!s.find((N) => N.id === n[k].id)) {
636
636
  S = n[k];
637
637
  break;
638
638
  }
639
639
  }
640
- _ === "select" && n && h.push({
640
+ j === "select" && n && h.push({
641
641
  name: S ? S.name : n[0].name,
642
642
  id: (S == null ? void 0 : S.id) || n[0].id,
643
- ...l
643
+ ...o
644
644
  }), e(h);
645
645
  },
646
646
  style: {
@@ -664,18 +664,18 @@ const vn = (o) => {
664
664
  ] })
665
665
  ] });
666
666
  };
667
- function ye(o) {
668
- const { product: i, children: a } = o, { attributes: s, listeners: e, setNodeRef: c, transform: u, transition: d, isDragging: g } = mt({
667
+ function Ie(r) {
668
+ const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
669
669
  id: i.id
670
- }), x = {
671
- transform: gt.Transform.toString(u),
672
- transition: d
670
+ }), f = {
671
+ transform: jt.Transform.toString(d),
672
+ transition: u
673
673
  };
674
674
  return /* @__PURE__ */ t.jsx(
675
675
  "div",
676
676
  {
677
677
  ref: c,
678
- style: x,
678
+ style: f,
679
679
  className: `${V.product} ${g ? V.dragging : ""}`,
680
680
  ...s,
681
681
  ...e,
@@ -683,79 +683,79 @@ function ye(o) {
683
683
  }
684
684
  );
685
685
  }
686
- const bn = (o) => {
686
+ const $n = (r) => {
687
687
  const {
688
688
  isActiveItems: i,
689
689
  setIsActiveItems: a,
690
690
  items: s,
691
691
  setItems: e,
692
692
  other: c,
693
- title: u,
694
- subtitle: d,
693
+ title: d,
694
+ subtitle: u,
695
695
  editable: g = !0,
696
- draggable: x = !1,
697
- deletable: $ = !0,
698
- addable: _ = !0,
696
+ draggable: f = !1,
697
+ deletable: P = !0,
698
+ addable: j = !0,
699
699
  itemsType: n,
700
- itemsPlaceholder: l = "",
701
- itemsOptions: m,
702
- hasRangeSelector: b = !1,
703
- rangeSelectorOptions: p,
704
- modalOptions: P,
705
- addableOptions: C = {},
706
- limit: O
707
- } = o, [L, R] = f.useState(null), [y, z] = f.useState({
700
+ itemsPlaceholder: o = "",
701
+ itemsOptions: p,
702
+ hasRangeSelector: q = !1,
703
+ rangeSelectorOptions: x,
704
+ modalOptions: _,
705
+ addableOptions: y = {},
706
+ limit: M
707
+ } = r, [z, R] = m.useState(null), [I, H] = m.useState({
708
708
  top: 0,
709
709
  left: 0
710
- }), [h, S] = f.useState(null), k = f.useRef(null), [I, q] = f.useState(!1), M = rt(
711
- lt(dt, {
710
+ }), [h, S] = m.useState(null), k = m.useRef(null), [N, B] = m.useState(!1), O = ht(
711
+ pt(mt, {
712
712
  activationConstraint: {
713
713
  distance: 5
714
714
  }
715
715
  })
716
716
  );
717
- f.useEffect(() => {
718
- const r = () => {
719
- R(null), q(!1);
717
+ m.useEffect(() => {
718
+ const l = () => {
719
+ R(null), B(!1);
720
720
  };
721
- return document.body.addEventListener("click", r), R(null), q(!1), () => {
722
- R(null), q(!1), document.body.removeEventListener("click", r);
721
+ return document.body.addEventListener("click", l), R(null), B(!1), () => {
722
+ R(null), B(!1), document.body.removeEventListener("click", l);
723
723
  };
724
- }, []), f.useEffect(() => {
725
- if (L) {
726
- const r = [...s].map((T) => T.id === L.id ? L : T);
727
- e(r);
724
+ }, []), m.useEffect(() => {
725
+ if (z) {
726
+ const l = [...s].map(($) => $.id === z.id ? z : $);
727
+ e(l);
728
728
  }
729
- }, [L]), f.useEffect(() => {
729
+ }, [z]), m.useEffect(() => {
730
730
  if (k.current && h) {
731
- const r = k.current.getBoundingClientRect().height, T = window.innerHeight;
732
- let N = h.top;
733
- N + r > T + window.scrollY - 200 && (N = T + window.scrollY - r - 200), N < 0 && (N = 10), z({
734
- top: N,
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,
735
735
  left: h.left
736
736
  });
737
737
  }
738
738
  }, [k.current, h]);
739
- const j = (r, T) => {
740
- r.stopPropagation();
741
- const N = r.target.getBoundingClientRect();
739
+ const b = (l, $) => {
740
+ l.stopPropagation();
741
+ const C = l.target.getBoundingClientRect();
742
742
  S({
743
- top: N.top + window.scrollY,
744
- left: N.left - 30
745
- }), R(T), q(!0);
746
- }, A = (r) => {
747
- const { active: T, over: N } = r;
748
- if (N && T.id !== N.id) {
749
- const E = s.findIndex((D) => D.id === T.id), Z = s.findIndex((D) => D.id === N.id);
750
- if (E !== -1 && Z !== -1) {
751
- const D = [...s], [J] = D.splice(E, 1);
752
- D.splice(Z, 0, J), e(D);
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);
753
753
  }
754
754
  }
755
- }, H = (r) => {
756
- var N;
757
- const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
758
- x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
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
759
  v,
760
760
  {
761
761
  name: "DotsSixVertical",
@@ -764,56 +764,56 @@ const bn = (o) => {
764
764
  height: 20
765
765
  }
766
766
  ) }),
767
- n === "select" && m && /* @__PURE__ */ t.jsx(
768
- st,
767
+ n === "select" && p && /* @__PURE__ */ t.jsx(
768
+ nt,
769
769
  {
770
770
  onChange: (E) => {
771
- const D = [...s].map((J) => J.id === r.id ? {
772
- ...r,
771
+ const L = [...s].map((K) => K.id === l.id ? {
772
+ ...l,
773
773
  name: {
774
774
  "en-US": E
775
775
  }
776
- } : J);
776
+ } : K);
777
777
  R({
778
- ...r,
778
+ ...l,
779
779
  name: {
780
780
  "en-US": E
781
781
  }
782
- }), e([...D]);
782
+ }), e([...L]);
783
783
  },
784
- value: r.name["en-US"],
785
- options: m.filter(
786
- (E) => !s.find((Z) => Z.name["en-US"] === E)
784
+ value: l.name["en-US"],
785
+ options: p.filter(
786
+ (E) => !s.find((tt) => tt.name["en-US"] === E)
787
787
  )
788
788
  }
789
789
  ),
790
790
  n === "input" && /* @__PURE__ */ t.jsx(
791
- vt,
791
+ Nt,
792
792
  {
793
793
  onChange: (E) => {
794
- const D = [...s].map((J) => J.id === r.id ? {
795
- ...r,
794
+ const L = [...s].map((K) => K.id === l.id ? {
795
+ ...l,
796
796
  name: {
797
797
  "en-US": E
798
798
  }
799
- } : J);
800
- e([...D]);
799
+ } : K);
800
+ e([...L]);
801
801
  },
802
- value: r.name["en-US"],
803
- placeholder: l
802
+ value: l.name["en-US"],
803
+ placeholder: o
804
804
  }
805
805
  ),
806
806
  n === "image" && /* @__PURE__ */ t.jsx(
807
- Tt,
807
+ qt,
808
808
  {
809
809
  onChange: (E) => {
810
- const D = [...s].map((J) => J.id === r.id ? {
811
- ...r,
810
+ const L = [...s].map((K) => K.id === l.id ? {
811
+ ...l,
812
812
  images: E
813
- } : J);
814
- e([...D]);
813
+ } : K);
814
+ e([...L]);
815
815
  },
816
- activeImage: (N = s.find((E) => E.id === r.id)) == null ? void 0 : N.images[0]
816
+ activeImage: (C = s.find((E) => E.id === l.id)) == null ? void 0 : C.images[0]
817
817
  }
818
818
  ),
819
819
  /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
@@ -824,10 +824,10 @@ const bn = (o) => {
824
824
  hoverable: !0,
825
825
  width: 20,
826
826
  height: 20,
827
- onClick: (E) => j(E, r)
827
+ onClick: (E) => b(E, l)
828
828
  }
829
829
  ) }),
830
- $ && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
830
+ P && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
831
831
  v,
832
832
  {
833
833
  name: "Trash",
@@ -835,68 +835,68 @@ const bn = (o) => {
835
835
  width: 20,
836
836
  height: 20,
837
837
  fill: "#C12A2A",
838
- onClick: () => e(s.filter((E) => E.id !== r.id))
838
+ onClick: () => e(s.filter((E) => E.id !== l.id))
839
839
  }
840
840
  ) })
841
841
  ] })
842
842
  ] });
843
- return x ? /* @__PURE__ */ t.jsx(
844
- ye,
843
+ return f ? /* @__PURE__ */ t.jsx(
844
+ Ie,
845
845
  {
846
- product: r,
847
- children: T
846
+ product: l,
847
+ children: $
848
848
  },
849
- r.id
849
+ l.id
850
850
  ) : /* @__PURE__ */ t.jsx(
851
851
  "div",
852
852
  {
853
853
  className: V.product,
854
- children: T
854
+ children: $
855
855
  },
856
- r.id
856
+ l.id
857
857
  );
858
858
  };
859
859
  return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
860
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
861
- u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
860
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
861
+ d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
862
862
  i !== void 0 && /* @__PURE__ */ t.jsx(
863
- at,
863
+ rt,
864
864
  {
865
865
  current: i,
866
- onChange: (r) => a == null ? void 0 : a(r)
866
+ onChange: (l) => a == null ? void 0 : a(l)
867
867
  }
868
868
  )
869
869
  ] }),
870
- L && g && P && I && /* @__PURE__ */ t.jsx(
871
- Bt,
870
+ z && g && _ && N && /* @__PURE__ */ t.jsx(
871
+ $t,
872
872
  {
873
873
  ref: k,
874
- activeItem: L,
874
+ activeItem: z,
875
875
  setActiveItem: R,
876
- popupPosition: y,
877
- modalOptions: P,
878
- setIsOpenModal: q
876
+ popupPosition: I,
877
+ modalOptions: _,
878
+ setIsOpenModal: B
879
879
  }
880
880
  ),
881
- b && p && /* @__PURE__ */ t.jsx(Ct, { ...p }),
881
+ q && x && /* @__PURE__ */ t.jsx(kt, { ...x }),
882
882
  /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
883
- d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
884
- x ? /* @__PURE__ */ t.jsx(
885
- ut,
883
+ u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
884
+ f ? /* @__PURE__ */ t.jsx(
885
+ gt,
886
886
  {
887
- sensors: M,
887
+ sensors: O,
888
888
  onDragEnd: A,
889
889
  children: /* @__PURE__ */ t.jsx(
890
- ht,
890
+ ft,
891
891
  {
892
- items: s.map((r) => r.id),
893
- strategy: pt,
894
- children: s.map((r) => H(r))
892
+ items: s.map((l) => l.id),
893
+ strategy: xt,
894
+ children: s.map((l) => U(l))
895
895
  }
896
896
  )
897
897
  }
898
- ) : s.map((r) => H(r)),
899
- _ && /* @__PURE__ */ t.jsx(
898
+ ) : s.map((l) => U(l)),
899
+ j && /* @__PURE__ */ t.jsx(
900
900
  "div",
901
901
  {
902
902
  style: {
@@ -905,47 +905,47 @@ const bn = (o) => {
905
905
  justifyContent: "center"
906
906
  },
907
907
  children: /* @__PURE__ */ t.jsx(
908
- ot,
908
+ lt,
909
909
  {
910
910
  withoutHover: !0,
911
- className: U(V.button, {
912
- [V.disabled]: !!(O && O <= s.length)
911
+ className: F(V.button, {
912
+ [V.disabled]: !!(M && M <= s.length)
913
913
  }),
914
914
  size: "s",
915
- disabled: !!(O && O <= s.length),
915
+ disabled: !!(M && M <= s.length),
916
916
  onClick: () => {
917
- const r = [...s];
918
- let T = null;
919
- if (m) {
920
- for (let N = 0; N < m.length; N++)
921
- if (!s.find((E) => E.name["en-US"] === m[N])) {
922
- T = m[N];
917
+ const l = [...s];
918
+ let $ = null;
919
+ 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];
923
923
  break;
924
924
  }
925
925
  }
926
- n === "select" && m ? r.push({
926
+ n === "select" && p ? l.push({
927
927
  name: {
928
- "en-US": T || m[0]
928
+ "en-US": $ || p[0]
929
929
  },
930
- id: K(),
931
- ...C,
930
+ id: Z(),
931
+ ...y,
932
932
  maxSymbols: 100
933
933
  // пример значения
934
- }) : n === "input" ? r.push({
934
+ }) : n === "input" ? l.push({
935
935
  name: {
936
936
  "en-US": ""
937
937
  },
938
- id: K(),
939
- ...C,
938
+ id: Z(),
939
+ ...y,
940
940
  maxSymbols: 100
941
- }) : r.push({
941
+ }) : l.push({
942
942
  name: {
943
943
  "en-US": `Image ${s.length + 1}`
944
944
  },
945
- id: K(),
946
- ...C,
945
+ id: Z(),
946
+ ...y,
947
947
  maxSymbols: 100
948
- }), e(r);
948
+ }), e(l);
949
949
  },
950
950
  style: {
951
951
  width: "fit-content"
@@ -967,79 +967,79 @@ const bn = (o) => {
967
967
  )
968
968
  ] }),
969
969
  c !== void 0 && /* @__PURE__ */ t.jsx(
970
- ct,
970
+ ut,
971
971
  {
972
972
  otherTitle: "Other",
973
973
  items: c
974
974
  }
975
975
  )
976
976
  ] });
977
- }, Ie = "_subtitle_jql1y_1", Ne = "_products_jql1y_10", Ce = "_product_jql1y_10", Se = "_button_jql1y_11", ke = "_buttons_jql1y_11", we = "_addButton_jql1y_150", Pe = "_deleteButton_jql1y_165", tt = {
978
- subtitle: Ie,
979
- products: Ne,
980
- product: Ce,
981
- button: Se,
982
- buttons: ke,
983
- addButton: we,
984
- deleteButton: Pe
985
- }, qe = (o) => {
986
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = o, { pages: u } = ft(), [d, g] = f.useState(null), [x, $] = f.useState({
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
985
+ }, 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
987
  top: 0,
988
988
  left: 0
989
- }), [_, n] = f.useState(null), l = f.useRef(null);
990
- f.useEffect(() => {
991
- if (d) {
992
- const p = [...i].map((P) => P.id === d.id ? d : P);
993
- a(p);
989
+ }), [j, n] = m.useState(null), o = m.useRef(null);
990
+ m.useEffect(() => {
991
+ if (u) {
992
+ const x = [...i].map((_) => _.id === u.id ? u : _);
993
+ a(x);
994
994
  }
995
- }, [d]), f.useEffect(() => {
996
- if (l.current && _) {
997
- const p = l.current.getBoundingClientRect().height, P = window.innerHeight;
998
- let C = _.top;
999
- C + p > P + window.scrollY - 200 && (C = P + window.scrollY - p - 200), C < 0 && (C = 10), $({
1000
- top: C,
1001
- left: _.left
995
+ }, [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
1002
1002
  });
1003
1003
  }
1004
- }, [l.current, _]);
1005
- const m = (p, P) => {
1006
- p.stopPropagation();
1007
- const C = p.target.getBoundingClientRect();
1004
+ }, [o.current, j]);
1005
+ const p = (x, _) => {
1006
+ x.stopPropagation();
1007
+ const y = x.target.getBoundingClientRect();
1008
1008
  n({
1009
- top: C.top + window.scrollY - 70,
1010
- left: C.left - (e ? 30 : 65)
1011
- }), g(P);
1012
- }, b = (p, P) => {
1013
- const C = [...i], O = {
1014
- ...p,
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,
1015
1015
  id: Math.random().toString(36).substr(2, 9)
1016
1016
  // Генерируем новый уникальный ID
1017
1017
  };
1018
- C.splice(P + 1, 0, O), a(C);
1018
+ y.splice(_ + 1, 0, M), a(y);
1019
1019
  };
1020
- return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
1021
- /* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
1022
- i.map((p, P) => /* @__PURE__ */ t.jsxs(
1020
+ return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
1021
+ /* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
1022
+ i.map((x, _) => /* @__PURE__ */ t.jsxs(
1023
1023
  "div",
1024
1024
  {
1025
- className: tt.product,
1025
+ className: et.product,
1026
1026
  children: [
1027
1027
  /* @__PURE__ */ t.jsx(
1028
- st,
1028
+ nt,
1029
1029
  {
1030
- onChange: (C) => {
1031
- const L = [...i].map((R) => R.id === p.id ? {
1032
- ...p,
1033
- type: C
1030
+ onChange: (y) => {
1031
+ const z = [...i].map((R) => R.id === x.id ? {
1032
+ ...x,
1033
+ type: y
1034
1034
  } : R);
1035
- a(L);
1035
+ a(z);
1036
1036
  },
1037
- value: p.type,
1037
+ value: x.type,
1038
1038
  options: ["Primary", "Secondary", "Tertiary"]
1039
1039
  }
1040
1040
  ),
1041
- /* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
1042
- /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1041
+ /* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
1042
+ /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1043
1043
  v,
1044
1044
  {
1045
1045
  name: "Copy",
@@ -1047,30 +1047,30 @@ const bn = (o) => {
1047
1047
  width: 20,
1048
1048
  height: 20,
1049
1049
  onClick: () => {
1050
- b(p, P);
1050
+ q(x, _);
1051
1051
  }
1052
1052
  }
1053
1053
  ) }),
1054
- /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1054
+ /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1055
1055
  v,
1056
1056
  {
1057
1057
  name: "Sliders",
1058
1058
  hoverable: !0,
1059
1059
  width: 20,
1060
1060
  height: 20,
1061
- onClick: (C) => {
1062
- m(C, p);
1061
+ onClick: (y) => {
1062
+ p(y, x);
1063
1063
  }
1064
1064
  }
1065
1065
  ) }),
1066
- s && /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1066
+ s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1067
1067
  v,
1068
1068
  {
1069
1069
  name: "Trash",
1070
1070
  hoverable: !0,
1071
1071
  onClick: () => {
1072
- const C = i.filter((O) => O.id !== p.id);
1073
- a(C);
1072
+ const y = i.filter((M) => M.id !== x.id);
1073
+ a(y);
1074
1074
  },
1075
1075
  width: 20,
1076
1076
  height: 20,
@@ -1080,15 +1080,15 @@ const bn = (o) => {
1080
1080
  ] })
1081
1081
  ]
1082
1082
  },
1083
- p.id
1083
+ x.id
1084
1084
  )),
1085
- d && /* @__PURE__ */ t.jsx(
1086
- $t,
1085
+ u && /* @__PURE__ */ t.jsx(
1086
+ Ot,
1087
1087
  {
1088
- ref: l,
1089
- activeButton: d,
1088
+ ref: o,
1089
+ activeButton: u,
1090
1090
  setActiveButton: g,
1091
- popupPosition: x,
1091
+ popupPosition: f,
1092
1092
  editableLink: c
1093
1093
  }
1094
1094
  ),
@@ -1101,39 +1101,39 @@ const bn = (o) => {
1101
1101
  justifyContent: "center"
1102
1102
  },
1103
1103
  children: /* @__PURE__ */ t.jsx(
1104
- ot,
1104
+ lt,
1105
1105
  {
1106
1106
  withoutHover: !0,
1107
- className: tt.button,
1107
+ className: et.button,
1108
1108
  size: "s",
1109
1109
  onClick: () => {
1110
- const p = [...i];
1111
- c ? p.push({
1110
+ const x = [...i];
1111
+ c ? x.push({
1112
1112
  type: "Primary",
1113
- id: K(),
1113
+ id: Z(),
1114
1114
  typesText: [],
1115
1115
  text: {
1116
1116
  "en-US": "Button Name"
1117
1117
  },
1118
1118
  destination: "Go to Page",
1119
- page: u ? Object.values(u)[0].path : "/",
1119
+ page: d ? Object.values(d)[0].path : "/",
1120
1120
  openInNewTab: !1
1121
- }) : p.push({
1121
+ }) : x.push({
1122
1122
  type: "Primary",
1123
- id: K(),
1123
+ id: Z(),
1124
1124
  typesText: [],
1125
1125
  text: {
1126
1126
  "en-US": "Create Ticket"
1127
1127
  },
1128
1128
  destination: "Go to Page",
1129
- page: u ? Object.values(u)[0].path : "/",
1129
+ page: d ? Object.values(d)[0].path : "/",
1130
1130
  openInNewTab: !1
1131
- }), a(p);
1131
+ }), a(x);
1132
1132
  },
1133
1133
  style: {
1134
1134
  width: "fit-content"
1135
1135
  },
1136
- children: /* @__PURE__ */ t.jsxs("div", { className: tt.addButton, children: [
1136
+ children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
1137
1137
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1138
1138
  /* @__PURE__ */ t.jsx(
1139
1139
  v,
@@ -1149,21 +1149,21 @@ const bn = (o) => {
1149
1149
  }
1150
1150
  )
1151
1151
  ] });
1152
- }, yn = (o) => {
1152
+ }, qn = (r) => {
1153
1153
  const {
1154
1154
  isActiveButtons: i,
1155
1155
  setIsActiveButtons: a,
1156
1156
  buttons: s,
1157
1157
  setButtons: e,
1158
1158
  editableLink: c = !0,
1159
- addable: u = !0,
1160
- deletable: d = !0
1161
- } = o;
1162
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: _t.buttonsBlock, children: [
1163
- /* @__PURE__ */ t.jsxs("div", { className: _t.top, children: [
1164
- /* @__PURE__ */ t.jsx("h3", { className: _t.title, children: "Buttons" }),
1159
+ addable: d = !0,
1160
+ deletable: u = !0
1161
+ } = r;
1162
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: yt.buttonsBlock, children: [
1163
+ /* @__PURE__ */ t.jsxs("div", { className: yt.top, children: [
1164
+ /* @__PURE__ */ t.jsx("h3", { className: yt.title, children: "Buttons" }),
1165
1165
  /* @__PURE__ */ t.jsx(
1166
- at,
1166
+ rt,
1167
1167
  {
1168
1168
  current: i,
1169
1169
  onChange: (g) => a(g)
@@ -1171,29 +1171,29 @@ const bn = (o) => {
1171
1171
  )
1172
1172
  ] }),
1173
1173
  i && /* @__PURE__ */ t.jsx(
1174
- qe,
1174
+ Be,
1175
1175
  {
1176
1176
  buttons: s,
1177
1177
  setButtons: e,
1178
1178
  editableLink: c,
1179
- addable: u,
1180
- deletable: d
1179
+ addable: d,
1180
+ deletable: u
1181
1181
  }
1182
1182
  )
1183
1183
  ] }) });
1184
1184
  };
1185
- function Be(o) {
1186
- const { product: i, children: a } = o, { attributes: s, listeners: e, setNodeRef: c, transform: u, transition: d, isDragging: g } = mt({
1185
+ function Te(r) {
1186
+ const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
1187
1187
  id: String(i.listingId)
1188
- }), x = {
1189
- transform: gt.Transform.toString(u),
1190
- transition: d
1188
+ }), f = {
1189
+ transform: jt.Transform.toString(d),
1190
+ transition: u
1191
1191
  };
1192
1192
  return /* @__PURE__ */ t.jsx(
1193
1193
  "div",
1194
1194
  {
1195
1195
  ref: c,
1196
- style: x,
1196
+ style: f,
1197
1197
  className: `${X.product} ${g ? X.dragging : ""}`,
1198
1198
  ...s,
1199
1199
  ...e,
@@ -1201,65 +1201,65 @@ function Be(o) {
1201
1201
  }
1202
1202
  );
1203
1203
  }
1204
- const In = (o) => {
1204
+ const On = (r) => {
1205
1205
  const {
1206
1206
  isActiveItems: i,
1207
1207
  setIsActiveItems: a,
1208
1208
  items: s,
1209
1209
  setItems: e,
1210
1210
  other: c,
1211
- title: u,
1212
- subtitle: d,
1211
+ title: d,
1212
+ subtitle: u,
1213
1213
  editable: g = !0,
1214
- draggable: x = !1,
1215
- withImage: $ = !1,
1216
- deletable: _ = !0,
1214
+ draggable: f = !1,
1215
+ withImage: P = !1,
1216
+ deletable: j = !0,
1217
1217
  addable: n = !0,
1218
- itemsType: l,
1219
- itemsOptions: m,
1220
- limit: b,
1221
- aspectRatio: p,
1222
- setAspectRatio: P
1223
- } = o, [C, O] = f.useState(
1218
+ itemsType: o,
1219
+ itemsOptions: p,
1220
+ limit: q,
1221
+ aspectRatio: x,
1222
+ setAspectRatio: _
1223
+ } = r, [y, M] = m.useState(
1224
1224
  null
1225
- ), [L, R] = f.useState({
1225
+ ), [z, R] = m.useState({
1226
1226
  top: 0,
1227
1227
  left: 0
1228
- }), [y, z] = f.useState(!1), h = rt(
1229
- lt(dt, {
1228
+ }), [I, H] = m.useState(!1), h = ht(
1229
+ pt(mt, {
1230
1230
  activationConstraint: {
1231
1231
  distance: 5
1232
1232
  }
1233
1233
  })
1234
1234
  );
1235
- f.useEffect(() => {
1236
- const j = () => {
1237
- O(null), z(!1);
1235
+ m.useEffect(() => {
1236
+ const b = () => {
1237
+ M(null), H(!1);
1238
1238
  };
1239
- return document.body.addEventListener("click", j), O(null), z(!1), () => {
1240
- O(null), z(!1), document.body.removeEventListener("click", j);
1239
+ return document.body.addEventListener("click", b), M(null), H(!1), () => {
1240
+ M(null), H(!1), document.body.removeEventListener("click", b);
1241
1241
  };
1242
- }, []), f.useEffect(() => {
1243
- if (C) {
1244
- const j = [...s].map((A) => A.listingId === C.listingId ? C : A);
1245
- e(j);
1242
+ }, []), m.useEffect(() => {
1243
+ if (y) {
1244
+ const b = [...s].map((A) => A.listingId === y.listingId ? y : A);
1245
+ e(b);
1246
1246
  }
1247
- }, [C]);
1248
- const S = (j, A) => {
1249
- j.stopPropagation();
1250
- const H = j.target.getBoundingClientRect(), r = 100, T = window.innerHeight;
1251
- let N = H.top + window.scrollY;
1252
- N + r > T && (N = T - r - 20), z(!0), R({
1253
- top: N - 80,
1254
- left: H.left - 30
1255
- }), O(A);
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);
1256
1256
  };
1257
- function k(j) {
1258
- if ($)
1259
- return j ? /* @__PURE__ */ t.jsx(
1257
+ function k(b) {
1258
+ if (P)
1259
+ return b ? /* @__PURE__ */ t.jsx(
1260
1260
  "img",
1261
1261
  {
1262
- src: `https://imagedelivery.net/${j}/w=1000`,
1262
+ src: `https://imagedelivery.net/${b}/w=1000`,
1263
1263
  alt: "image",
1264
1264
  width: 16,
1265
1265
  height: 16
@@ -1274,20 +1274,20 @@ const In = (o) => {
1274
1274
  }
1275
1275
  );
1276
1276
  }
1277
- const I = (j) => {
1278
- const { active: A, over: H } = j;
1279
- if (H && A.id !== H.id) {
1280
- const r = s.findIndex((N) => String(N.listingId) === A.id), T = s.findIndex((N) => String(N.listingId) === H.id);
1281
- if (r !== -1 && T !== -1) {
1282
- const N = [...s], [E] = N.splice(r, 1);
1283
- N.splice(T, 0, E), e(N);
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);
1284
1284
  }
1285
1285
  }
1286
- }, q = (j) => {
1287
- const A = m.find((r) => j.listingId === r.id);
1286
+ }, B = (b) => {
1287
+ const A = p.find((l) => b.listingId === l.id);
1288
1288
  if (!A) return null;
1289
- const H = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
- x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1289
+ const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1291
1291
  v,
1292
1292
  {
1293
1293
  name: "DotsSixVertical",
@@ -1296,27 +1296,27 @@ const In = (o) => {
1296
1296
  height: 20
1297
1297
  }
1298
1298
  ) }),
1299
- l === "select" && /* @__PURE__ */ t.jsx(
1300
- st,
1299
+ o === "select" && /* @__PURE__ */ t.jsx(
1300
+ nt,
1301
1301
  {
1302
- onChange: (r) => {
1303
- const T = [...s], N = m.find((D) => D.productData.name === r);
1304
- if (!N) return;
1302
+ onChange: (l) => {
1303
+ const $ = [...s], C = p.find((L) => L.productData.name === l);
1304
+ if (!C) return;
1305
1305
  const E = {
1306
- listingId: N.id,
1307
- image: N.productData.images.length > 0 ? N.productData.images[0].cfId : ""
1308
- }, Z = T.map((D) => D.listingId === j.listingId ? E : D);
1309
- O(E), e([...Z]);
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]);
1310
1310
  },
1311
1311
  value: A.productData.name,
1312
1312
  options: [
1313
- ...m.filter((r) => !s.find((T) => T.listingId === r.id)).map((r) => r.productData.name)
1313
+ ...p.filter((l) => !s.find(($) => $.listingId === l.id)).map((l) => l.productData.name)
1314
1314
  ],
1315
- leftAddonOptions: m.map((r) => {
1316
- var T;
1315
+ leftAddonOptions: p.map((l) => {
1316
+ var $;
1317
1317
  return {
1318
- value: r.productData.name,
1319
- addon: k(((T = r.productData.images[0]) == null ? void 0 : T.cfId) || "")
1318
+ value: l.productData.name,
1319
+ addon: k((($ = l.productData.images[0]) == null ? void 0 : $.cfId) || "")
1320
1320
  };
1321
1321
  })
1322
1322
  }
@@ -1329,10 +1329,10 @@ const In = (o) => {
1329
1329
  hoverable: !0,
1330
1330
  width: 20,
1331
1331
  height: 20,
1332
- onClick: (r) => S(r, j)
1332
+ onClick: (l) => S(l, b)
1333
1333
  }
1334
1334
  ) }),
1335
- _ && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1335
+ j && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1336
1336
  v,
1337
1337
  {
1338
1338
  name: "Trash",
@@ -1340,66 +1340,66 @@ const In = (o) => {
1340
1340
  width: 20,
1341
1341
  height: 20,
1342
1342
  fill: "#C12A2A",
1343
- onClick: () => e(s.filter((r) => r !== j))
1343
+ onClick: () => e(s.filter((l) => l !== b))
1344
1344
  }
1345
1345
  ) })
1346
1346
  ] })
1347
1347
  ] });
1348
- return x ? /* @__PURE__ */ t.jsx(
1349
- Be,
1348
+ return f ? /* @__PURE__ */ t.jsx(
1349
+ Te,
1350
1350
  {
1351
- product: j,
1352
- children: H
1351
+ product: b,
1352
+ children: U
1353
1353
  },
1354
- j.listingId
1354
+ b.listingId
1355
1355
  ) : /* @__PURE__ */ t.jsx(
1356
1356
  "div",
1357
1357
  {
1358
1358
  className: X.product,
1359
- children: H
1359
+ children: U
1360
1360
  },
1361
- j.listingId
1361
+ b.listingId
1362
1362
  );
1363
- }, M = f.useRef(null);
1363
+ }, O = m.useRef(null);
1364
1364
  return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
1365
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
- u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
1365
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
+ d && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: d }),
1367
1367
  i !== void 0 && /* @__PURE__ */ t.jsx(
1368
- at,
1368
+ rt,
1369
1369
  {
1370
1370
  current: i,
1371
- onChange: (j) => a == null ? void 0 : a(j)
1371
+ onChange: (b) => a == null ? void 0 : a(b)
1372
1372
  }
1373
1373
  )
1374
1374
  ] }),
1375
- y && C && /* @__PURE__ */ t.jsx(
1376
- Mt,
1375
+ I && y && /* @__PURE__ */ t.jsx(
1376
+ At,
1377
1377
  {
1378
- ref: M,
1379
- activeItem: C,
1380
- setActiveItem: O,
1381
- setIsOpenModal: z,
1382
- popupPosition: L,
1383
- itemsOptions: m
1378
+ ref: O,
1379
+ activeItem: y,
1380
+ setActiveItem: M,
1381
+ setIsOpenModal: H,
1382
+ popupPosition: z,
1383
+ itemsOptions: p
1384
1384
  }
1385
1385
  ),
1386
1386
  i && /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
1387
- d && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: d }),
1388
- x ? /* @__PURE__ */ t.jsx(
1389
- ut,
1387
+ u && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: u }),
1388
+ f ? /* @__PURE__ */ t.jsx(
1389
+ gt,
1390
1390
  {
1391
1391
  sensors: h,
1392
- onDragEnd: I,
1392
+ onDragEnd: N,
1393
1393
  children: /* @__PURE__ */ t.jsx(
1394
- ht,
1394
+ ft,
1395
1395
  {
1396
- items: s.map((j) => String(j.listingId)),
1397
- strategy: pt,
1398
- children: s.map((j) => q(j))
1396
+ items: s.map((b) => String(b.listingId)),
1397
+ strategy: xt,
1398
+ children: s.map((b) => B(b))
1399
1399
  }
1400
1400
  )
1401
1401
  }
1402
- ) : s.map((j) => q(j)),
1402
+ ) : s.map((b) => B(b)),
1403
1403
  n && /* @__PURE__ */ t.jsx(
1404
1404
  "div",
1405
1405
  {
@@ -1409,24 +1409,24 @@ const In = (o) => {
1409
1409
  justifyContent: "center"
1410
1410
  },
1411
1411
  children: /* @__PURE__ */ t.jsx(
1412
- ot,
1412
+ lt,
1413
1413
  {
1414
1414
  withoutHover: !0,
1415
1415
  className: X.button,
1416
1416
  size: "s",
1417
1417
  onClick: () => {
1418
- const j = [...s];
1419
- for (let A = 0; A < m.length; A++)
1420
- if (!s.find((H) => H.listingId === m[A].id)) {
1421
- j.push({
1422
- listingId: m[A].id,
1423
- image: m[A].productData.images.length > 0 ? m[A].productData.images[0].cfId : ""
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 : ""
1424
1424
  });
1425
1425
  break;
1426
1426
  }
1427
- e(j);
1427
+ e(b);
1428
1428
  },
1429
- disabled: s.length === (b || m.length),
1429
+ disabled: s.length === (q || p.length),
1430
1430
  style: {
1431
1431
  width: "fit-content"
1432
1432
  },
@@ -1446,307 +1446,307 @@ const In = (o) => {
1446
1446
  }
1447
1447
  )
1448
1448
  ] }),
1449
- p && P && /* @__PURE__ */ t.jsx(
1450
- st,
1449
+ x && _ && /* @__PURE__ */ t.jsx(
1450
+ nt,
1451
1451
  {
1452
- value: p,
1453
- options: Object.keys(kt),
1454
- onChange: (j) => P(j),
1455
- leftAddonOptions: St
1452
+ value: x,
1453
+ options: Object.keys(Pt),
1454
+ onChange: (b) => _(b),
1455
+ leftAddonOptions: wt
1456
1456
  }
1457
1457
  ),
1458
1458
  i && c !== void 0 && /* @__PURE__ */ t.jsx(
1459
- ct,
1459
+ ut,
1460
1460
  {
1461
1461
  otherTitle: "Other",
1462
1462
  items: c
1463
1463
  }
1464
1464
  )
1465
1465
  ] });
1466
- }, Te = "_options_1aiq8_1", $e = "_price_1aiq8_18", Me = "_oldPrice_1aiq8_25", Ae = "_newPrice_1aiq8_33", Oe = "_animate_1aiq8_40", Ee = "_meta_1aiq8_58", Re = "_info_1aiq8_64", De = "_infoRight_1aiq8_72", Le = "_buttons_1aiq8_79", ze = "_variants_1aiq8_86", Fe = "_variant_1aiq8_86", He = "_stock_1aiq8_104", Ue = "_variantInfo_1aiq8_111", Ve = "_quantity_1aiq8_117", Ye = "_button_1aiq8_79", We = "_activeVariant_1aiq8_167", Ge = "_chargeTypes_1aiq8_171", Xe = "_charge_1aiq8_171", Qe = "_chargeActive_1aiq8_196", Je = "_title_1aiq8_204", B = {
1467
- options: Te,
1468
- price: $e,
1469
- oldPrice: Me,
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
1470
  newPrice: Ae,
1471
- animate: Oe,
1472
- meta: Ee,
1471
+ animate: Ee,
1472
+ meta: De,
1473
1473
  info: Re,
1474
- infoRight: De,
1475
- buttons: Le,
1476
- variants: ze,
1477
- variant: Fe,
1478
- stock: He,
1479
- variantInfo: Ue,
1480
- quantity: Ve,
1481
- button: Ye,
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
1482
  activeVariant: We,
1483
- chargeTypes: Ge,
1484
- charge: Xe,
1485
- chargeActive: Qe,
1486
- title: Je
1483
+ chargeTypes: Xe,
1484
+ charge: Qe,
1485
+ chargeActive: Je,
1486
+ title: Ke
1487
1487
  };
1488
- var Nt = /* @__PURE__ */ ((o) => (o.ONE_TIME = "One-Time", o.RECURRING = "Subscribe & Save", o))(Nt || {});
1489
- const Ke = (o) => {
1490
- var L, R;
1491
- const { product: i, setIsOpen: a } = o, { variants: s } = i, [e, c] = f.useState(s[0]), [u, d] = f.useState(
1488
+ var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
1489
+ const Ze = (r) => {
1490
+ var z, R;
1491
+ const { product: i, setIsOpen: a } = r, { variants: s } = i, [e, c] = m.useState(s[0]), [d, u] = m.useState(
1492
1492
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1493
- ), { notifications: g, setNotifications: x } = bt(), $ = xt(), [_, n] = f.useState(1), { reset: l, addProductToCart: m } = nt(), [b, p] = f.useState(!1);
1494
- f.useEffect(() => {
1495
- p(!0);
1496
- const y = setTimeout(() => p(!1), 600);
1497
- return () => clearTimeout(y);
1498
- }, [_]);
1499
- async function P() {
1500
- await m({
1493
+ ), { notifications: g, setNotifications: f } = Ct(), P = bt(), [j, n] = m.useState(1), { reset: o, addProductToCart: p } = at(), [q, x] = m.useState(!1);
1494
+ 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
1501
  productId: i.id,
1502
1502
  productVariantId: e.id,
1503
- quantity: _
1504
- }), a == null || a(!1), x([
1503
+ quantity: j
1504
+ }), a == null || a(!1), f([
1505
1505
  ...g,
1506
1506
  {
1507
- id: K(),
1507
+ id: Z(),
1508
1508
  message: "Product added to cart",
1509
1509
  status: "success"
1510
1510
  }
1511
1511
  ]);
1512
1512
  }
1513
- function C() {
1514
- l(), P(), $("/checkout");
1513
+ function y() {
1514
+ o(), _(), P("/checkout");
1515
1515
  }
1516
- function O(y) {
1517
- if (y >= 864e5) {
1518
- const I = Math.floor(y / 864e5);
1519
- return `${I} ${I === 1 ? "day" : "days"}`;
1520
- } else if (y >= 36e5) {
1521
- const I = Math.floor(y / 36e5);
1522
- return `${I} ${I === 1 ? "hour" : "hours"}`;
1523
- } else if (y >= 6e4) {
1524
- const I = Math.floor(y / 6e4);
1525
- return `${I} ${I === 1 ? "minute" : "minutes"}`;
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"}`;
1526
1526
  } else {
1527
- const I = Math.floor(y / 1e3);
1528
- return `${I} ${I === 1 ? "second" : "seconds"}`;
1527
+ const N = Math.floor(I / 1e3);
1528
+ return `${N} ${N === 1 ? "second" : "seconds"}`;
1529
1529
  }
1530
1530
  }
1531
- return f.useEffect(() => {
1531
+ return m.useEffect(() => {
1532
1532
  e.quantity && e.quantity.available === 0 ? n(0) : n(1);
1533
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: B.options, children: [
1534
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((y) => /* @__PURE__ */ t.jsx(
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(
1535
1535
  "div",
1536
1536
  {
1537
- className: U(B.charge, {
1538
- [B.chargeActive]: u === y
1537
+ className: F(T.charge, {
1538
+ [T.chargeActive]: d === I
1539
1539
  }),
1540
- onClick: () => d(y),
1541
- children: Nt[y]
1540
+ onClick: () => u(I),
1541
+ children: St[I]
1542
1542
  },
1543
- y
1543
+ I
1544
1544
  )) }),
1545
- /* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.map((y) => {
1546
- var z, h;
1545
+ /* @__PURE__ */ t.jsx("div", { className: T.variants, children: s.map((I) => {
1546
+ var H, h;
1547
1547
  return /* @__PURE__ */ t.jsxs(
1548
1548
  "div",
1549
1549
  {
1550
- className: U(B.variant, {
1551
- [B.activeVariant]: e.id === y.id
1550
+ className: F(T.variant, {
1551
+ [T.activeVariant]: e.id === I.id
1552
1552
  }),
1553
- onClick: () => c(y),
1553
+ onClick: () => c(I),
1554
1554
  children: [
1555
- /* @__PURE__ */ t.jsxs("div", { className: B.variantInfo, children: [
1556
- /* @__PURE__ */ t.jsx("span", { className: B.title, children: yt(y.name) }),
1555
+ /* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
1556
+ /* @__PURE__ */ t.jsx("span", { className: T.title, children: it(I.name) }),
1557
1557
  /* @__PURE__ */ t.jsxs("span", { children: [
1558
1558
  "$",
1559
- u === "ONE_TIME" ? y.price.amount : y.subscriptionSettings ? y.subscriptionSettings.price.amount : "Price Not Found"
1559
+ d === "ONE_TIME" ? I.price.amount : I.subscriptionSettings ? I.subscriptionSettings.price.amount : "Price Not Found"
1560
1560
  ] })
1561
1561
  ] }),
1562
- /* @__PURE__ */ t.jsx("div", { children: u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: B.stock, children: [
1563
- (z = y.quantity.restrictions) != null && z.max || y.quantity.available !== void 0 ? ((h = y.quantity.restrictions) == null ? void 0 : h.max) || y.quantity.available : "∞",
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 : "∞",
1564
1564
  " ",
1565
1565
  "in stock"
1566
1566
  ] }) })
1567
1567
  ]
1568
1568
  },
1569
- y.id
1569
+ I.id
1570
1570
  );
1571
1571
  }) }),
1572
- u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: B.quantity, children: [
1572
+ d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1573
1573
  /* @__PURE__ */ t.jsx(
1574
- F,
1574
+ D,
1575
1575
  {
1576
1576
  type: "Secondary",
1577
1577
  onClick: () => {
1578
- _ > 1 ? n((y) => y - 1) : n(1);
1578
+ j > 1 ? n((I) => I - 1) : n(1);
1579
1579
  },
1580
- className: B.button,
1581
- disabled: e.quantity.available && e.quantity.restrictions && _ <= e.quantity.restrictions.min || e.quantity.available === 0,
1580
+ className: T.button,
1581
+ disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
1582
1582
  children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1583
1583
  }
1584
1584
  ),
1585
1585
  /* @__PURE__ */ t.jsx(
1586
- At,
1586
+ Et,
1587
1587
  {
1588
1588
  type: "number",
1589
- value: String(_),
1590
- onChange: (y) => n(Number(y)),
1591
- max: ((L = e.quantity.restrictions) == null ? void 0 : L.max) || e.quantity.available || Number.POSITIVE_INFINITY,
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
1592
  min: ((R = e.quantity.restrictions) == null ? void 0 : R.min) || 0,
1593
1593
  centered: !0,
1594
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && _ >= e.quantity.restrictions.max
1594
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
1595
1595
  }
1596
1596
  ),
1597
1597
  /* @__PURE__ */ t.jsx(
1598
- F,
1598
+ D,
1599
1599
  {
1600
1600
  type: "Secondary",
1601
1601
  onClick: () => {
1602
- n((y) => y + 1);
1602
+ n((I) => I + 1);
1603
1603
  },
1604
- className: B.button,
1605
- disabled: !!(e.quantity.available && e.quantity.restrictions && _ >= e.quantity.restrictions.max || e.quantity.available === 0),
1604
+ className: T.button,
1605
+ disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0),
1606
1606
  children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1607
1607
  }
1608
1608
  )
1609
1609
  ] }),
1610
- /* @__PURE__ */ t.jsxs("div", { className: B.meta, children: [
1611
- /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1610
+ /* @__PURE__ */ t.jsxs("div", { className: T.meta, children: [
1611
+ /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1612
1612
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1613
- /* @__PURE__ */ t.jsxs("div", { className: B.infoRight, children: [
1613
+ /* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
1614
1614
  /* @__PURE__ */ t.jsx(
1615
1615
  v,
1616
1616
  {
1617
1617
  name: "Lightning",
1618
- fill: "#FF3F19",
1618
+ fill: "var(--text-action)",
1619
1619
  width: 20,
1620
1620
  height: 20
1621
1621
  }
1622
1622
  ),
1623
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : O(e.deliveryTime) })
1623
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
1624
1624
  ] })
1625
1625
  ] }),
1626
- /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1626
+ /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1627
1627
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1628
- /* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: u === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1629
- /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
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: [
1630
1630
  "$ ",
1631
- (e.price.amount || 0) * _
1631
+ (e.price.amount || 0) * j
1632
1632
  ] }),
1633
- /* @__PURE__ */ t.jsxs("span", { className: B.oldPrice, children: [
1633
+ /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1634
1634
  "$ ",
1635
- (e.compareAtPrice.amount || 0) * _
1635
+ (e.compareAtPrice.amount || 0) * j
1636
1636
  ] })
1637
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1637
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1638
1638
  "$ ",
1639
- (e.price.amount || 0) * _
1640
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1641
- /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
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: [
1642
1642
  "$ ",
1643
1643
  e.subscriptionSettings.price.amount || 0
1644
1644
  ] }),
1645
- /* @__PURE__ */ t.jsxs("span", { className: B.oldPrice, children: [
1645
+ /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1646
1646
  "$ ",
1647
1647
  e.subscriptionSettings.compareAtPrice.amount || 0
1648
1648
  ] })
1649
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1649
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1650
1650
  "$ ",
1651
1651
  e.subscriptionSettings.price.amount || 0
1652
1652
  ] }) })
1653
1653
  ] })
1654
1654
  ] }),
1655
- /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
1655
+ /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1656
1656
  /* @__PURE__ */ t.jsx(
1657
- F,
1657
+ D,
1658
1658
  {
1659
1659
  type: "Primary",
1660
- onClick: () => C(),
1660
+ onClick: () => y(),
1661
1661
  disabled: e.quantity && e.quantity.available === 0,
1662
- children: u === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1662
+ children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1663
1663
  }
1664
1664
  ),
1665
- u === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1666
- F,
1665
+ d === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1666
+ D,
1667
1667
  {
1668
1668
  type: "Secondary",
1669
- onClick: () => P(),
1669
+ onClick: () => _(),
1670
1670
  disabled: e.quantity && e.quantity.available === 0,
1671
1671
  children: "Add to Cart"
1672
1672
  }
1673
1673
  )
1674
1674
  ] })
1675
1675
  ] });
1676
- }, Ze = "_buttons_14q75_23", ts = "_modal_14q75_32", es = "_closing_14q75_64", ss = "_info_14q75_113", ns = "_top_14q75_120", is = "_title_14q75_131", as = "_clear_14q75_138", os = "_activeClear_14q75_145", cs = "_count_14q75_149", rs = "_cart_14q75_164", ls = "_empty_14q75_172", ds = "_product_14q75_198", us = "_products_14q75_207", hs = "_image_14q75_215", ps = "_productInfo_14q75_230", ms = "_content_14q75_237", gs = "_name_14q75_243", fs = "_price_14q75_249", xs = "_productButtons_14q75_255", _s = "_productButton_14q75_255", js = "_productCount_14q75_272", vs = "_bottom_14q75_289", bs = "_subtotal_14q75_297", ys = "_block_14q75_305", Is = "_shoppingCount_14q75_312", Ns = "_total_14q75_332", Cs = "_link_14q75_338", Ss = "_userInfo_14q75_345", ks = "_pagesMobileModal_14q75_356", ws = "_pagesMobileModalContent_14q75_370", Ps = "_pagesMobileModalHeader_14q75_376", qs = "_pagesMobileModalFooter_14q75_386", w = {
1677
- buttons: Ze,
1678
- modal: ts,
1679
- closing: es,
1680
- info: ss,
1681
- top: ns,
1682
- title: is,
1683
- clear: as,
1684
- activeClear: os,
1685
- count: cs,
1686
- cart: rs,
1687
- empty: ls,
1688
- product: ds,
1689
- products: us,
1690
- image: hs,
1691
- productInfo: ps,
1692
- content: ms,
1693
- name: gs,
1694
- price: fs,
1695
- productButtons: xs,
1696
- productButton: _s,
1697
- productCount: js,
1698
- bottom: vs,
1699
- subtotal: bs,
1700
- block: ys,
1701
- shoppingCount: Is,
1702
- total: Ns,
1703
- link: Cs,
1704
- userInfo: Ss,
1705
- pagesMobileModal: ks,
1706
- pagesMobileModalContent: ws,
1707
- pagesMobileModalHeader: Ps,
1708
- pagesMobileModalFooter: qs
1709
- }, Nn = (o) => {
1710
- const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = o;
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,
1708
+ pagesMobileModalFooter: Bs
1709
+ }, An = (r) => {
1710
+ const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = r;
1711
1711
  return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1712
- i && /* @__PURE__ */ t.jsx(Bs, {}),
1713
- s && /* @__PURE__ */ t.jsx(qt, { signUp: a })
1712
+ i && /* @__PURE__ */ t.jsx(Ts, {}),
1713
+ s && /* @__PURE__ */ t.jsx(Tt, { signUp: a })
1714
1714
  ] });
1715
- }, Bs = () => {
1716
- const [o, i] = f.useState(!1), [a, s] = f.useState([]), { cart: e, products: c } = nt();
1717
- function u(n) {
1715
+ }, Ts = () => {
1716
+ const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
1717
+ function d(n) {
1718
1718
  if (n.variants.length > 0) {
1719
- for (let l = 0; l < e.parts.length; l++)
1720
- for (let m = 0; m < n.variants.length; m++)
1721
- if (n.variants[m] && e.parts[l].productVariantId === n.variants[m].id)
1722
- return e.parts[l].productVariantId;
1719
+ for (let o = 0; o < e.parts.length; o++)
1720
+ for (let p = 0; p < n.variants.length; p++)
1721
+ if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1722
+ return e.parts[o].productVariantId;
1723
1723
  }
1724
1724
  return n.variants[0].id;
1725
1725
  }
1726
- function d(n) {
1727
- for (let l = 0; l < e.parts.length; l++)
1728
- for (let m = 0; m < n.variants.length; m++)
1729
- if (n.variants[m] && e.parts[l].productVariantId === n.variants[m].id)
1730
- return e.parts[l].quantity;
1726
+ function u(n) {
1727
+ for (let o = 0; o < e.parts.length; o++)
1728
+ for (let p = 0; p < n.variants.length; p++)
1729
+ if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1730
+ return e.parts[o].quantity;
1731
1731
  }
1732
- f.useEffect(() => {
1732
+ m.useEffect(() => {
1733
1733
  (async () => {
1734
- const l = e.parts.map((p) => String(p.productId)), b = (c.filter((p) => l.includes(String(p.id))) || []).map((p) => ({
1735
- ...p,
1736
- activeVariantId: u(p),
1737
- quantity: d(p)
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)
1738
1738
  }));
1739
- s(b);
1739
+ s(q);
1740
1740
  })();
1741
1741
  }, [e.parts]);
1742
1742
  function g(n) {
1743
- var l;
1744
- return !n || !(n != null && n.variants) ? !1 : (l = n.variants.find((m) => m.id === n.activeVariantId)) == null ? void 0 : l.subscriptionSettings;
1743
+ var o;
1744
+ return !n || !(n != null && n.variants) ? !1 : (o = n.variants.find((p) => p.id === n.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
1745
1745
  }
1746
- const x = e.parts.length > 0 && a.length > 0 && !g(a[0]), [$, _] = f.useState(!1);
1746
+ const f = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, j] = m.useState(!1);
1747
1747
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1748
1748
  /* @__PURE__ */ t.jsxs(
1749
- F,
1749
+ D,
1750
1750
  {
1751
1751
  type: "Secondary",
1752
1752
  style: {
@@ -1754,54 +1754,53 @@ const Ke = (o) => {
1754
1754
  position: "relative"
1755
1755
  },
1756
1756
  onClick: (n) => {
1757
- n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), _(!0));
1757
+ n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), j(!0));
1758
1758
  },
1759
1759
  children: [
1760
1760
  /* @__PURE__ */ t.jsx(
1761
1761
  v,
1762
1762
  {
1763
- name: "Handbag",
1764
- fill: "var(--text-primary)"
1763
+ name: "Handbag"
1765
1764
  }
1766
1765
  ),
1767
- x && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1766
+ f && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1768
1767
  ]
1769
1768
  }
1770
1769
  ),
1771
- o && /* @__PURE__ */ t.jsx(
1772
- It,
1770
+ r && /* @__PURE__ */ t.jsx(
1771
+ dt,
1773
1772
  {
1774
1773
  close: () => {
1775
- _(!1), setTimeout(() => {
1774
+ j(!1), setTimeout(() => {
1776
1775
  i(!1);
1777
1776
  }, 300);
1778
1777
  },
1779
1778
  withAnimation: !1,
1780
1779
  children: /* @__PURE__ */ t.jsx(
1781
- Ts,
1780
+ $s,
1782
1781
  {
1783
1782
  activeProducts: a,
1784
- isCartNotEmpty: x,
1785
- isOpen: $
1783
+ isCartNotEmpty: f,
1784
+ isOpen: P
1786
1785
  }
1787
1786
  )
1788
1787
  }
1789
1788
  )
1790
1789
  ] });
1791
- }, Ts = (o) => {
1792
- const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = o, { cart: e, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct: d } = nt(), g = xt();
1793
- function x(n) {
1790
+ }, $s = (r) => {
1791
+ const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = r, { cart: e, reset: c, getTotalAndDiscount: d, updateQuantityOfProduct: u } = at(), g = bt();
1792
+ function f(n) {
1794
1793
  g(n);
1795
1794
  }
1796
- function $(n) {
1797
- n.quantity && d({
1795
+ function P(n) {
1796
+ n.quantity && u({
1798
1797
  productId: n.id,
1799
1798
  productVariantId: n.activeVariantId,
1800
1799
  quantity: n.quantity + 1
1801
1800
  });
1802
1801
  }
1803
- function _(n) {
1804
- n.quantity && d({
1802
+ function j(n) {
1803
+ n.quantity && u({
1805
1804
  productId: n.id,
1806
1805
  productVariantId: n.activeVariantId,
1807
1806
  quantity: n.quantity - 1
@@ -1810,7 +1809,7 @@ const Ke = (o) => {
1810
1809
  return /* @__PURE__ */ t.jsxs(
1811
1810
  "div",
1812
1811
  {
1813
- className: U(w.modal, {
1812
+ className: F(w.modal, {
1814
1813
  [w.closing]: !s
1815
1814
  }),
1816
1815
  onClick: (n) => n.stopPropagation(),
@@ -1823,7 +1822,7 @@ const Ke = (o) => {
1823
1822
  /* @__PURE__ */ t.jsx(
1824
1823
  "button",
1825
1824
  {
1826
- className: U(w.clear, {
1825
+ className: F(w.clear, {
1827
1826
  [w.activeClear]: a
1828
1827
  }),
1829
1828
  disabled: !a,
@@ -1856,20 +1855,20 @@ const Ke = (o) => {
1856
1855
  }
1857
1856
  ) }),
1858
1857
  /* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
1859
- /* @__PURE__ */ t.jsx("div", { className: w.name, children: yt(n.name) }),
1858
+ /* @__PURE__ */ t.jsx("div", { className: w.name, children: it(n.name) }),
1860
1859
  /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1861
1860
  "$",
1862
- n.variants.find((l) => l.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1861
+ n.variants.find((o) => o.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1863
1862
  ] })
1864
1863
  ] })
1865
1864
  ] }),
1866
1865
  /* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
1867
1866
  /* @__PURE__ */ t.jsx(
1868
- F,
1867
+ D,
1869
1868
  {
1870
1869
  type: "Secondary",
1871
1870
  onClick: () => {
1872
- n.quantity !== 1 && _(n);
1871
+ n.quantity !== 1 && j(n);
1873
1872
  },
1874
1873
  className: w.productButton,
1875
1874
  disabled: n.quantity === 1,
@@ -1886,12 +1885,12 @@ const Ke = (o) => {
1886
1885
  ),
1887
1886
  /* @__PURE__ */ t.jsx("div", { className: w.productCount, children: n.quantity }),
1888
1887
  /* @__PURE__ */ t.jsx(
1889
- F,
1888
+ D,
1890
1889
  {
1891
1890
  type: "Secondary",
1892
- onClick: () => $(n),
1891
+ onClick: () => P(n),
1893
1892
  className: w.productButton,
1894
- disabled: n.quantity === n.variants.find((l) => l.id === n.activeVariantId).quantity.available,
1893
+ disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
1895
1894
  children: /* @__PURE__ */ t.jsx(
1896
1895
  v,
1897
1896
  {
@@ -1924,16 +1923,16 @@ const Ke = (o) => {
1924
1923
  ] }),
1925
1924
  /* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
1926
1925
  "$",
1927
- u().total
1926
+ d().total
1928
1927
  ] })
1929
1928
  ] }),
1930
- /* @__PURE__ */ t.jsx(F, { onClick: () => x("/checkout"), children: "Checkout" })
1929
+ /* @__PURE__ */ t.jsx(D, { onClick: () => f("/checkout"), children: "Checkout" })
1931
1930
  ] })
1932
- ] }) : /* @__PURE__ */ t.jsx($s, {})
1931
+ ] }) : /* @__PURE__ */ t.jsx(qs, {})
1933
1932
  ]
1934
1933
  }
1935
1934
  );
1936
- }, $s = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1935
+ }, qs = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1937
1936
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1938
1937
  v,
1939
1938
  {
@@ -1954,15 +1953,15 @@ const Ke = (o) => {
1954
1953
  }
1955
1954
  )
1956
1955
  ] })
1957
- ] }), qt = ({ signUp: o, close: i }) => {
1958
- const a = localStorage.getItem("token"), s = xt();
1959
- function e(d) {
1960
- window.location.pathname.includes("/admin/builder") || s(d);
1956
+ ] }), Tt = ({ signUp: r, close: i }) => {
1957
+ const a = localStorage.getItem("token"), s = bt();
1958
+ function e(u) {
1959
+ window.location.pathname.includes("/admin/builder") || s(u);
1961
1960
  }
1962
1961
  if (!a)
1963
1962
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1964
1963
  /* @__PURE__ */ t.jsx(
1965
- F,
1964
+ D,
1966
1965
  {
1967
1966
  onClick: () => {
1968
1967
  e("/customer-dash"), i == null || i();
@@ -1974,8 +1973,8 @@ const Ke = (o) => {
1974
1973
  children: "Login"
1975
1974
  }
1976
1975
  ),
1977
- o && /* @__PURE__ */ t.jsx(
1978
- F,
1976
+ r && /* @__PURE__ */ t.jsx(
1977
+ D,
1979
1978
  {
1980
1979
  onClick: () => {
1981
1980
  e("/customer-dash"), i == null || i();
@@ -1989,11 +1988,11 @@ const Ke = (o) => {
1989
1988
  }
1990
1989
  )
1991
1990
  ] });
1992
- const [c, u] = f.useState("test-email@gmail.com");
1993
- return f.useEffect(() => {
1991
+ const [c, d] = m.useState("test-email@gmail.com");
1992
+ return m.useEffect(() => {
1994
1993
  (async () => {
1995
- const g = Ot(a);
1996
- u(g.email);
1994
+ const g = Dt(a);
1995
+ d(g.email);
1997
1996
  })();
1998
1997
  }, [a]), /* @__PURE__ */ t.jsx(
1999
1998
  "div",
@@ -2005,13 +2004,13 @@ const Ke = (o) => {
2005
2004
  children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2006
2005
  }
2007
2006
  );
2008
- }, Ms = ({
2009
- children: o,
2007
+ }, Os = ({
2008
+ children: r,
2010
2009
  logo: i,
2011
2010
  setIsOpen: a,
2012
2011
  signUp: s
2013
2012
  }) => {
2014
- const { setIsOpen: e } = wt(), c = () => {
2013
+ const { setIsOpen: e } = ot(), c = () => {
2015
2014
  e(!1), setTimeout(() => {
2016
2015
  a(!1), e(!0);
2017
2016
  }, 300);
@@ -2020,28 +2019,22 @@ const Ke = (o) => {
2020
2019
  "div",
2021
2020
  {
2022
2021
  className: w.pagesMobileModal,
2023
- onClick: (u) => u.stopPropagation(),
2022
+ onClick: (d) => d.stopPropagation(),
2024
2023
  children: [
2025
2024
  /* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
2026
2025
  /* @__PURE__ */ t.jsx("div", { children: i }),
2027
2026
  /* @__PURE__ */ t.jsx(
2028
- F,
2027
+ D,
2029
2028
  {
2030
2029
  type: "Secondary",
2031
2030
  onClick: c,
2032
- children: /* @__PURE__ */ t.jsx(
2033
- v,
2034
- {
2035
- name: "X",
2036
- fill: "var(--text-primary)"
2037
- }
2038
- )
2031
+ children: /* @__PURE__ */ t.jsx(v, { name: "X" })
2039
2032
  }
2040
2033
  )
2041
2034
  ] }),
2042
- /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: o }),
2035
+ /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
2043
2036
  /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2044
- qt,
2037
+ Tt,
2045
2038
  {
2046
2039
  signUp: s,
2047
2040
  close: c
@@ -2050,35 +2043,35 @@ const Ke = (o) => {
2050
2043
  ]
2051
2044
  }
2052
2045
  );
2053
- }, Cn = ({
2054
- children: o,
2046
+ }, En = ({
2047
+ children: r,
2055
2048
  logo: i,
2056
2049
  signUp: a
2057
2050
  }) => {
2058
- const [s, e] = f.useState(!1);
2051
+ const [s, e] = m.useState(!1);
2059
2052
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2060
2053
  /* @__PURE__ */ t.jsx(As, { setIsOpenModal: e }),
2061
2054
  s && /* @__PURE__ */ t.jsx(
2062
- It,
2055
+ dt,
2063
2056
  {
2064
2057
  close: () => e(!1),
2065
2058
  hasPadding: !1,
2066
2059
  children: /* @__PURE__ */ t.jsx(
2067
- Ms,
2060
+ Os,
2068
2061
  {
2069
2062
  logo: i,
2070
2063
  setIsOpen: e,
2071
2064
  signUp: a,
2072
- children: o
2065
+ children: r
2073
2066
  }
2074
2067
  )
2075
2068
  }
2076
2069
  )
2077
2070
  ] });
2078
- }, As = (o) => {
2079
- const { setIsOpenModal: i } = o;
2071
+ }, As = (r) => {
2072
+ const { setIsOpenModal: i } = r;
2080
2073
  return /* @__PURE__ */ t.jsx(
2081
- F,
2074
+ D,
2082
2075
  {
2083
2076
  type: "Secondary",
2084
2077
  style: {
@@ -2087,34 +2080,28 @@ const Ke = (o) => {
2087
2080
  onClick: (a) => {
2088
2081
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2089
2082
  },
2090
- children: /* @__PURE__ */ t.jsx(
2091
- v,
2092
- {
2093
- name: "List",
2094
- fill: "var(--text-primary)"
2095
- }
2096
- )
2083
+ children: /* @__PURE__ */ t.jsx(v, { name: "List" })
2097
2084
  }
2098
2085
  );
2099
- }, Os = "_share_10urc_1", Es = "_modal_10urc_9", Rs = "_header_10urc_21", Ds = "_title_10urc_48", Ls = "_copyWrapper_10urc_54", zs = "_copyText_10urc_63", Fs = "_copyTextMobile_10urc_76", Hs = "_copyTextMiniMobile_10urc_95", et = {
2100
- share: Os,
2101
- modal: Es,
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,
2102
2089
  header: Rs,
2103
- title: Ds,
2104
- copyWrapper: Ls,
2105
- copyText: zs,
2106
- copyTextMobile: Fs,
2107
- copyTextMiniMobile: Hs
2108
- }, Sn = ({ title: o = "Copy Product Link" }) => {
2109
- const { isOpenModal: i, setIsOpenModal: a } = Pt();
2090
+ title: Ls,
2091
+ copyWrapper: zs,
2092
+ copyText: Hs,
2093
+ copyTextMobile: Us,
2094
+ copyTextMiniMobile: Fs
2095
+ }, Dn = ({ title: r = "Copy Product Link" }) => {
2096
+ const { isOpenModal: i, setIsOpenModal: a } = Mt();
2110
2097
  function s() {
2111
2098
  a(!0);
2112
2099
  }
2113
2100
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2114
2101
  /* @__PURE__ */ t.jsx(
2115
- F,
2102
+ D,
2116
2103
  {
2117
- className: et.share,
2104
+ className: st.share,
2118
2105
  onClick: (e) => {
2119
2106
  e.stopPropagation(), s();
2120
2107
  },
@@ -2129,69 +2116,69 @@ const Ke = (o) => {
2129
2116
  )
2130
2117
  }
2131
2118
  ),
2132
- i && /* @__PURE__ */ t.jsx(It, { close: a, children: /* @__PURE__ */ t.jsx(Us, { title: o }) })
2119
+ i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Vs, { title: r }) })
2133
2120
  ] });
2134
- }, Us = ({ title: o = "Copy Product Link" }) => {
2135
- const { setIsOpenModal: i } = Pt(), { notifications: a, setNotifications: s } = bt(), { setIsOpen: e } = wt(), c = window.location.href;
2136
- function u() {
2121
+ }, Vs = ({ title: r = "Copy Product Link" }) => {
2122
+ const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ot(), c = window.location.href;
2123
+ function d() {
2137
2124
  navigator.clipboard.writeText(c), s([
2138
2125
  ...a,
2139
2126
  {
2140
- id: K(),
2127
+ id: Z(),
2141
2128
  message: "Link copied to clipboard",
2142
2129
  status: "success"
2143
2130
  }
2144
2131
  ]);
2145
2132
  }
2146
- function d() {
2133
+ function u() {
2147
2134
  e(!1), setTimeout(() => {
2148
2135
  i(!1), e(!0);
2149
2136
  }, 300);
2150
2137
  }
2151
- function g(x, $) {
2152
- return x.length > $ ? x.slice(0, $) + "..." : x;
2138
+ function g(f, P) {
2139
+ return f.length > P ? f.slice(0, P) + "..." : f;
2153
2140
  }
2154
2141
  return /* @__PURE__ */ t.jsxs(
2155
2142
  "div",
2156
2143
  {
2157
- className: et.modal,
2158
- onClick: (x) => x.stopPropagation(),
2144
+ className: st.modal,
2145
+ onClick: (f) => f.stopPropagation(),
2159
2146
  children: [
2160
- /* @__PURE__ */ t.jsxs("div", { className: et.header, children: [
2161
- /* @__PURE__ */ t.jsx("div", { className: et.title, children: o }),
2147
+ /* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
2148
+ /* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
2162
2149
  /* @__PURE__ */ t.jsx(
2163
2150
  v,
2164
2151
  {
2165
2152
  name: "X",
2166
2153
  fill: "#757575",
2167
- onClick: d,
2154
+ onClick: u,
2168
2155
  hoverable: !0
2169
2156
  }
2170
2157
  )
2171
2158
  ] }),
2172
- /* @__PURE__ */ t.jsxs("div", { className: et.copyWrapper, children: [
2159
+ /* @__PURE__ */ t.jsxs("div", { className: st.copyWrapper, children: [
2173
2160
  /* @__PURE__ */ t.jsxs(
2174
- F,
2161
+ D,
2175
2162
  {
2176
2163
  type: "Secondary",
2177
- onClick: u,
2164
+ onClick: d,
2178
2165
  style: {
2179
2166
  flex: 1
2180
2167
  },
2181
2168
  children: [
2182
- /* @__PURE__ */ t.jsx("div", { className: et.copyText, children: g(c, 100) }),
2183
- /* @__PURE__ */ t.jsx("div", { className: et.copyTextMobile, children: g(c, 40) }),
2184
- /* @__PURE__ */ t.jsx("div", { className: et.copyTextMiniMobile, children: g(c, 20) })
2169
+ /* @__PURE__ */ t.jsx("div", { className: st.copyText, children: g(c, 100) }),
2170
+ /* @__PURE__ */ t.jsx("div", { className: st.copyTextMobile, children: g(c, 40) }),
2171
+ /* @__PURE__ */ t.jsx("div", { className: st.copyTextMiniMobile, children: g(c, 20) })
2185
2172
  ]
2186
2173
  }
2187
2174
  ),
2188
2175
  /* @__PURE__ */ t.jsx(
2189
- F,
2176
+ D,
2190
2177
  {
2191
2178
  type: "Secondary",
2192
- onClick: u,
2179
+ onClick: d,
2193
2180
  children: a.find(
2194
- (x) => x.message === "Link copied to clipboard"
2181
+ (f) => f.message === "Link copied to clipboard"
2195
2182
  ) ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2196
2183
  }
2197
2184
  )
@@ -2199,41 +2186,41 @@ const Ke = (o) => {
2199
2186
  ]
2200
2187
  }
2201
2188
  );
2202
- }, Vs = "_accordion_1s1lq_1", Ys = "_header_1s1lq_9", Ws = "_icon_1s1lq_18", Gs = "_open_1s1lq_21", Xs = "_content_1s1lq_25", it = {
2203
- accordion: Vs,
2204
- header: Ys,
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,
2205
2192
  icon: Ws,
2206
- open: Gs,
2207
- content: Xs
2208
- }, kn = ({ title: o, content: i, defaultOpen: a = !1 }) => {
2209
- const [s, e] = f.useState(a), [c, u] = f.useState(0), d = f.useRef(null), g = () => {
2193
+ open: Xs,
2194
+ content: Qs
2195
+ }, Rn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2196
+ const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
2210
2197
  e(!s);
2211
2198
  };
2212
- return f.useEffect(() => {
2213
- d.current && u(s ? d.current.scrollHeight : 0);
2214
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
2199
+ return m.useEffect(() => {
2200
+ u.current && d(s ? u.current.scrollHeight : 0);
2201
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: ct.accordion, children: [
2215
2202
  /* @__PURE__ */ t.jsxs(
2216
2203
  "div",
2217
2204
  {
2218
- className: it.header,
2205
+ className: ct.header,
2219
2206
  onClick: g,
2220
2207
  children: [
2221
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: o }),
2222
- /* @__PURE__ */ t.jsx("div", { className: U(it.icon, { [it.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2208
+ /* @__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" }) })
2223
2210
  ]
2224
2211
  }
2225
2212
  ),
2226
2213
  /* @__PURE__ */ t.jsx(
2227
2214
  "div",
2228
2215
  {
2229
- ref: d,
2230
- className: it.content,
2216
+ ref: u,
2217
+ className: ct.content,
2231
2218
  style: { height: `${c}px` },
2232
2219
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2233
2220
  }
2234
2221
  )
2235
2222
  ] });
2236
- }, wn = ({ children: o, path: i, className: a, target: s = "_self", id: e }) => {
2223
+ }, Js = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
2237
2224
  if (window.location.pathname.includes("/admin/builder"))
2238
2225
  return /* @__PURE__ */ t.jsx(
2239
2226
  "div",
@@ -2242,44 +2229,44 @@ const Ke = (o) => {
2242
2229
  role: "link",
2243
2230
  style: { cursor: "pointer" },
2244
2231
  id: e,
2245
- children: o
2232
+ children: r
2246
2233
  }
2247
2234
  );
2248
- const c = xt(), u = /^https?:\/\//.test(i), d = (g) => {
2249
- u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (g.preventDefault(), c(i));
2235
+ const c = bt(), d = /^https?:\/\//.test(i), u = (g) => {
2236
+ d || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (g.preventDefault(), c(i));
2250
2237
  };
2251
2238
  return /* @__PURE__ */ t.jsx(
2252
2239
  "div",
2253
2240
  {
2254
- onClick: d,
2241
+ onClick: u,
2255
2242
  className: a,
2256
2243
  role: "link",
2257
2244
  style: { cursor: "pointer" },
2258
2245
  id: e,
2259
- children: o
2246
+ children: r
2260
2247
  }
2261
2248
  );
2262
- }, Qs = "_buttonsBlock_1b2rb_1", Js = {
2263
- buttonsBlock: Qs
2264
- }, Pn = (o) => {
2265
- var x, $;
2266
- const { setIsOpen: i, setModalType: a, productId: s } = o, { cart: e } = nt(), { pageContext: c } = ft(), u = (x = c == null ? void 0 : c.listings) == null ? void 0 : x.find((_) => _.id === s);
2267
- if (!u)
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);
2254
+ if (!d)
2268
2255
  return null;
2269
- const d = ($ = c == null ? void 0 : c.products) == null ? void 0 : $.find(
2270
- (_) => _.uniquePath === u.productData.uniquePath
2256
+ const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
2257
+ (j) => j.uniquePath === d.productData.uniquePath
2271
2258
  );
2272
- if (!d)
2259
+ if (!u)
2273
2260
  return null;
2274
- const g = e.parts.find((_) => _.productId === d.id);
2261
+ const g = e.parts.find((j) => j.productId === u.id);
2275
2262
  return /* @__PURE__ */ t.jsxs(
2276
2263
  "div",
2277
2264
  {
2278
- className: Js.buttonsBlock,
2279
- onClick: (_) => _.stopPropagation(),
2265
+ className: Zs.buttonsBlock,
2266
+ onClick: (j) => j.stopPropagation(),
2280
2267
  children: [
2281
2268
  /* @__PURE__ */ t.jsx(
2282
- F,
2269
+ D,
2283
2270
  {
2284
2271
  type: "Secondary",
2285
2272
  style: {
@@ -2292,7 +2279,7 @@ const Ke = (o) => {
2292
2279
  }
2293
2280
  ),
2294
2281
  /* @__PURE__ */ t.jsx(
2295
- F,
2282
+ D,
2296
2283
  {
2297
2284
  type: "Primary",
2298
2285
  onClick: () => {
@@ -2304,12 +2291,12 @@ const Ke = (o) => {
2304
2291
  ]
2305
2292
  }
2306
2293
  );
2307
- }, Ks = "_wrapper_27wzz_1", Zs = "_logo_27wzz_8", tn = "_info_27wzz_12", jt = {
2308
- wrapper: Ks,
2309
- logo: Zs,
2310
- info: tn
2311
- }, qn = ({ date: o }) => {
2312
- const { general: i } = Et();
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();
2313
2300
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2314
2301
  function a(s) {
2315
2302
  const e = new Date(s), c = {
@@ -2322,8 +2309,8 @@ const Ke = (o) => {
2322
2309
  };
2323
2310
  return e.toLocaleDateString("en-US", c);
2324
2311
  }
2325
- return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
2326
- /* @__PURE__ */ t.jsx("div", { className: jt.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2312
+ return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
2313
+ /* @__PURE__ */ t.jsx("div", { className: It.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2327
2314
  "img",
2328
2315
  {
2329
2316
  src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
@@ -2338,108 +2325,98 @@ const Ke = (o) => {
2338
2325
  height: 48
2339
2326
  }
2340
2327
  ) }),
2341
- /* @__PURE__ */ t.jsxs("div", { className: jt.info, children: [
2328
+ /* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
2342
2329
  /* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
2343
- /* @__PURE__ */ t.jsx("p", { id: "p", children: a(o) })
2330
+ /* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
2344
2331
  ] })
2345
2332
  ] });
2346
- }, en = "_variants_puxd1_80", sn = "_variant_puxd1_80", nn = "_stock_puxd1_98", an = "_variantInfo_puxd1_105", on = "_chargeTypes_puxd1_165", cn = "_charge_puxd1_165", rn = "_chargeActive_puxd1_190", ln = "_title_puxd1_198", dn = "_modal_puxd1_204", un = "_header_puxd1_224", hn = "_productOptions_puxd1_232", pn = "_loading_puxd1_236", W = {
2347
- variants: en,
2348
- variant: sn,
2349
- stock: nn,
2350
- variantInfo: an,
2351
- chargeTypes: on,
2352
- charge: cn,
2353
- chargeActive: rn,
2354
- title: ln,
2355
- modal: dn,
2356
- header: un,
2357
- productOptions: hn,
2358
- loading: pn
2359
- }, Bn = (o) => {
2360
- var _;
2361
- const { pageContext: i } = ft(), a = (_ = i == null ? void 0 : i.listings) == null ? void 0 : _.find((n) => n.id === o.productId), [s, e] = f.useState(!0), [c, u] = f.useState(null), d = (c == null ? void 0 : c.variants[0]) || null, [g, x] = f.useState(
2362
- d != null && d.chargeTypes && d.chargeTypes.length > 1 ? d.chargeTypes[0] : "ONE_TIME"
2363
- ), { addProducts: $ } = nt();
2364
- if (f.useEffect(() => {
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) => {
2347
+ 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(
2349
+ u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
2350
+ ), { addProducts: P } = at(), { setIsOpen: j } = ot();
2351
+ return m.useEffect(() => {
2365
2352
  (async () => {
2366
2353
  e(!0);
2367
- const l = await Dt(
2354
+ const p = await Lt(
2368
2355
  encodeURIComponent(
2369
2356
  `/product/${a.productData.uniquePath}`
2370
2357
  )
2371
2358
  );
2372
- $(l == null ? void 0 : l.data.products), u(l == null ? void 0 : l.data.products[0]), e(!1);
2359
+ P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
2373
2360
  })();
2374
- }, []), s)
2375
- return /* @__PURE__ */ t.jsx(
2376
- "div",
2377
- {
2378
- className: W.modal,
2379
- onClick: (n) => n.stopPropagation(),
2380
- children: /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Rt, {}) })
2381
- }
2382
- );
2383
- if (!c) {
2384
- o.setIsOpen(!1);
2385
- return;
2386
- }
2387
- if (!d) {
2388
- o.setIsOpen(!1);
2389
- return;
2390
- }
2391
- return /* @__PURE__ */ t.jsxs(
2361
+ }, []), m.useEffect(() => {
2362
+ j(!0);
2363
+ }, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2392
2364
  "div",
2393
2365
  {
2394
- className: W.modal,
2395
- onClick: (n) => n.stopPropagation(),
2366
+ className: J.modal,
2367
+ onClick: (o) => o.stopPropagation(),
2396
2368
  children: [
2397
- o.type === "Add To Cart" && !s && /* @__PURE__ */ t.jsx(
2398
- mn,
2369
+ s && /* @__PURE__ */ t.jsx("div", { className: J.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2370
+ r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
2371
+ fn,
2399
2372
  {
2400
2373
  variants: c.variants,
2401
- activeVariant: d,
2374
+ activeVariant: u,
2402
2375
  activeChargeType: g,
2403
- setActiveChargeType: x,
2376
+ setActiveChargeType: f,
2404
2377
  productId: c.id,
2405
- setIsOpen: o.setIsOpen
2378
+ setIsOpen: r.setIsOpen
2406
2379
  }
2407
2380
  ),
2408
- o.type === "Buy Now" && !s && /* @__PURE__ */ t.jsx(
2409
- gn,
2381
+ r.type === "Buy Now" && c && !s && /* @__PURE__ */ t.jsx(
2382
+ xn,
2410
2383
  {
2411
2384
  product: c,
2412
- setIsOpen: o.setIsOpen
2385
+ setIsOpen: r.setIsOpen
2413
2386
  }
2414
2387
  )
2415
2388
  ]
2416
2389
  }
2417
- );
2418
- }, mn = (o) => {
2419
- const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: u } = o, { cart: d, addProductToCart: g, addProducts: x, updateQuantityOfProduct: $ } = nt(), { notifications: _, setNotifications: n } = bt(), { pageContext: l } = ft();
2420
- async function m(b) {
2421
- const p = d.parts.find(
2422
- (P) => P.productId === o.productId && P.productVariantId === b
2390
+ ) });
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 = () => {
2393
+ p(!1), setTimeout(() => {
2394
+ d(!1);
2395
+ }, 300);
2396
+ };
2397
+ async function x(_) {
2398
+ const y = u.parts.find(
2399
+ (M) => M.productId === r.productId && M.productVariantId === _
2423
2400
  );
2424
- p ? $({
2401
+ y ? P({
2425
2402
  productId: c,
2426
- productVariantId: b,
2427
- quantity: p.quantity + 1
2428
- }) : (l != null && l.products && await x(l.products), await g({
2403
+ productVariantId: _,
2404
+ quantity: y.quantity + 1
2405
+ }) : (o != null && o.products && await f(o.products), await g({
2429
2406
  productId: c,
2430
- productVariantId: b,
2407
+ productVariantId: _,
2431
2408
  quantity: 1
2432
2409
  })), n([
2433
- ..._,
2410
+ ...j,
2434
2411
  {
2435
- id: K(),
2412
+ id: Z(),
2436
2413
  message: "Product added to cart",
2437
2414
  status: "success"
2438
2415
  }
2439
2416
  ]);
2440
2417
  }
2441
2418
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2442
- /* @__PURE__ */ t.jsxs("div", { className: W.header, children: [
2419
+ /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2443
2420
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2444
2421
  /* @__PURE__ */ t.jsx(
2445
2422
  v,
@@ -2449,56 +2426,60 @@ const Ke = (o) => {
2449
2426
  height: 24,
2450
2427
  fill: "var(--text-secondary)",
2451
2428
  hoverable: !0,
2452
- onClick: () => u(!1)
2429
+ onClick: q
2453
2430
  }
2454
2431
  )
2455
2432
  ] }),
2456
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: W.chargeTypes, children: e.chargeTypes.map((b) => /* @__PURE__ */ t.jsx(
2433
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: J.chargeTypes, children: e.chargeTypes.map((_) => /* @__PURE__ */ t.jsx(
2457
2434
  "div",
2458
2435
  {
2459
- className: U(W.charge, {
2460
- [W.chargeActive]: a === b
2436
+ className: F(J.charge, {
2437
+ [J.chargeActive]: a === _
2461
2438
  }),
2462
- onClick: () => s(b),
2463
- children: Nt[b]
2439
+ onClick: () => s(_),
2440
+ children: St[_]
2464
2441
  },
2465
- b
2442
+ _
2466
2443
  )) }),
2467
- /* @__PURE__ */ t.jsx("div", { className: W.variants, children: i.map((b) => {
2468
- var p, P;
2444
+ /* @__PURE__ */ t.jsx("div", { className: J.variants, children: i.map((_) => {
2445
+ var y, M;
2469
2446
  return /* @__PURE__ */ t.jsxs(
2470
2447
  "div",
2471
2448
  {
2472
- className: U(W.variant),
2449
+ className: F(J.variant),
2473
2450
  onClick: () => {
2474
- m(b.id), u(!1);
2451
+ x(_.id), d(!1);
2475
2452
  },
2476
2453
  children: [
2477
- /* @__PURE__ */ t.jsxs("div", { className: W.variantInfo, children: [
2478
- /* @__PURE__ */ t.jsx("span", { className: W.title, children: b.name }),
2454
+ /* @__PURE__ */ t.jsxs("div", { className: J.variantInfo, children: [
2455
+ /* @__PURE__ */ t.jsx("span", { className: J.title, children: _.name }),
2479
2456
  /* @__PURE__ */ t.jsxs("span", { children: [
2480
2457
  "$",
2481
- a === "ONE_TIME" ? b.price.amount : b.subscriptionSettings ? b.subscriptionSettings.price.amount : "Price Not Found"
2458
+ a === "ONE_TIME" ? _.price.amount : _.subscriptionSettings ? _.subscriptionSettings.price.amount : "Price Not Found"
2482
2459
  ] })
2483
2460
  ] }),
2484
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: W.stock, children: [
2485
- (p = b.quantity.restrictions) != null && p.max || b.quantity.available !== void 0 ? ((P = b.quantity.restrictions) == null ? void 0 : P.max) || b.quantity.available : "∞",
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 : "∞",
2486
2463
  " ",
2487
2464
  "in stock"
2488
2465
  ] }) })
2489
2466
  ]
2490
2467
  },
2491
- b.id
2468
+ _.id
2492
2469
  );
2493
2470
  }) })
2494
2471
  ] });
2495
- }, gn = (o) => {
2496
- const { product: i, setIsOpen: a } = o;
2472
+ }, xn = (r) => {
2473
+ const { product: i, setIsOpen: a } = r, { setIsOpen: s } = ot(), e = () => {
2474
+ s(!1), setTimeout(() => {
2475
+ a(!1);
2476
+ }, 300);
2477
+ };
2497
2478
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2498
- /* @__PURE__ */ t.jsxs("div", { className: W.header, children: [
2479
+ /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2499
2480
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2500
2481
  "Buy ",
2501
- yt(i.name)
2482
+ it(i.name)
2502
2483
  ] }),
2503
2484
  /* @__PURE__ */ t.jsx(
2504
2485
  v,
@@ -2508,7 +2489,7 @@ const Ke = (o) => {
2508
2489
  height: 24,
2509
2490
  fill: "var(--text-secondary)",
2510
2491
  hoverable: !0,
2511
- onClick: () => a(!1),
2492
+ onClick: e,
2512
2493
  style: {
2513
2494
  minWidth: 24,
2514
2495
  minHeight: 24
@@ -2516,56 +2497,174 @@ const Ke = (o) => {
2516
2497
  }
2517
2498
  )
2518
2499
  ] }),
2519
- /* @__PURE__ */ t.jsx("div", { className: W.productOptions, children: /* @__PURE__ */ t.jsx(
2520
- Ke,
2500
+ /* @__PURE__ */ t.jsx("div", { className: J.productOptions, children: /* @__PURE__ */ t.jsx(
2501
+ Ze,
2521
2502
  {
2522
2503
  product: i,
2523
2504
  setIsOpen: a
2524
2505
  }
2525
2506
  ) })
2526
2507
  ] });
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();
2521
+ m.useEffect(() => {
2522
+ var p;
2523
+ f(!0);
2524
+ const o = (p = a.listings) == null ? void 0 : p.filter(
2525
+ (q) => s.listingIdList.includes(q.id)
2526
+ );
2527
+ o && u([...o]), f(!1);
2528
+ }, [a]), m.useEffect(() => {
2529
+ P(!0);
2530
+ }, []);
2531
+ const j = () => {
2532
+ P(!1), setTimeout(() => {
2533
+ i(!1);
2534
+ }, 300);
2535
+ };
2536
+ function n(o) {
2537
+ return o.productData.compareAtPrice ? o.productData.compareAtPrice.amount : 0;
2538
+ }
2539
+ return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2540
+ "div",
2541
+ {
2542
+ className: W.contentModal,
2543
+ onClick: (o) => o.stopPropagation(),
2544
+ children: [
2545
+ /* @__PURE__ */ t.jsxs("div", { className: W.modalTop, children: [
2546
+ /* @__PURE__ */ t.jsx(
2547
+ "span",
2548
+ {
2549
+ className: W.title,
2550
+ id: "h4",
2551
+ children: it(s.name)
2552
+ }
2553
+ ),
2554
+ /* @__PURE__ */ t.jsx(
2555
+ v,
2556
+ {
2557
+ name: "X",
2558
+ hoverable: !0,
2559
+ onClick: j
2560
+ }
2561
+ )
2562
+ ] }),
2563
+ !g && d && /* @__PURE__ */ t.jsx("div", { className: W.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
2564
+ "div",
2565
+ {
2566
+ className: W.card,
2567
+ children: [
2568
+ /* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
2569
+ "img",
2570
+ {
2571
+ src: `https://imagedelivery.net/${o.productData.images[0].cfId}/w=500`,
2572
+ alt: "",
2573
+ width: 64,
2574
+ height: 64,
2575
+ className: W.modalImage
2576
+ }
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: [
2579
+ /* @__PURE__ */ t.jsxs(
2580
+ "span",
2581
+ {
2582
+ className: W.name,
2583
+ id: "h5",
2584
+ children: [
2585
+ it(o.productData.name),
2586
+ " $",
2587
+ o.productData.minPrice.amount,
2588
+ " ",
2589
+ "- $",
2590
+ n(o)
2591
+ ]
2592
+ }
2593
+ ),
2594
+ o.productData.shortDescription && /* @__PURE__ */ t.jsx(
2595
+ "span",
2596
+ {
2597
+ className: W.short,
2598
+ id: "md",
2599
+ children: it(o.productData.shortDescription)
2600
+ }
2601
+ ),
2602
+ /* @__PURE__ */ t.jsx("span", {})
2603
+ ] }),
2604
+ /* @__PURE__ */ t.jsxs("div", { className: W.cardButtons, children: [
2605
+ /* @__PURE__ */ t.jsx(
2606
+ D,
2607
+ {
2608
+ type: "Secondary",
2609
+ onClick: () => {
2610
+ e(o.id), i(!1), c(!0);
2611
+ },
2612
+ children: "Buy"
2613
+ }
2614
+ ),
2615
+ /* @__PURE__ */ t.jsx(Js, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
2616
+ ] })
2617
+ ]
2618
+ },
2619
+ o.id
2620
+ )) }),
2621
+ g && /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2622
+ ]
2623
+ }
2624
+ ) });
2527
2625
  };
2528
2626
  export {
2529
- kn as Accordion,
2627
+ Rn as Accordion,
2530
2628
  As as BurgerMenuButton,
2531
- F as Button,
2532
- qe as ButtonTypeSettings,
2533
- yn as ButtonsSettings,
2534
- jn as CategorySettings,
2535
- Nt as ChargeTypes,
2536
- Tt as ChooseImage,
2537
- Mn as ChooseImageModal,
2538
- $s as EmptyCart,
2539
- bn as FormSettings,
2540
- Nn as HeaderButtons,
2629
+ D as Button,
2630
+ Be as ButtonTypeSettings,
2631
+ qn as ButtonsSettings,
2632
+ Bn as CategorySettings,
2633
+ St as ChargeTypes,
2634
+ qt as ChooseImage,
2635
+ Yn as ChooseImageModal,
2636
+ qs as EmptyCart,
2637
+ $n as FormSettings,
2638
+ Un as GroupCardModal,
2639
+ An as HeaderButtons,
2541
2640
  v as Icon,
2542
- vt as InputSettings,
2543
- At as InputUI,
2544
- An as ItemsSettings,
2545
- _n as LayoutSettings,
2546
- wn as Link,
2547
- In as ListingSelector,
2548
- Rt as Loader,
2549
- qn as MetaInfoPost,
2550
- It as Modal,
2551
- Cn as PagesMobileMenu,
2552
- Ms as PagesMobileModal,
2553
- vn as PagesSettings,
2554
- Pn as ProductCardButtons,
2555
- Bn as ProductCardModal,
2556
- Ke as ProductOptions,
2557
- On as RadioUI,
2558
- Ct as RangeSelector,
2559
- st as Select,
2560
- En as SelectInfiniteList,
2561
- Rn as SelectUI,
2562
- Sn as ShareLink,
2563
- Bs as ShoppingButton,
2564
- Ts as ShoppingModalCart,
2565
- at as Switch,
2566
- Dn as TextSettings,
2567
- Ln as TextareaSettings,
2568
- zn as TextareaUI,
2569
- Fn as TypesText,
2570
- qt as UserInfo
2641
+ Nt as InputSettings,
2642
+ 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,
2649
+ 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,
2657
+ kt as RangeSelector,
2658
+ nt as Select,
2659
+ Xn as SelectInfiniteList,
2660
+ Qn as SelectUI,
2661
+ Dn as ShareLink,
2662
+ Ts as ShoppingButton,
2663
+ $s as ShoppingModalCart,
2664
+ rt as Switch,
2665
+ Jn as TextSettings,
2666
+ Kn as TextareaSettings,
2667
+ Zn as TextareaUI,
2668
+ ti as TypesText,
2669
+ Tt as UserInfo
2571
2670
  };