@billgangcom/theme-lib 1.33.2 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { j as t, I as b, a as W, c as F, S as K, T as Ct, C as ht, b as Z, D as yt, H as kt, B as it, v as dt, u as $t, d as wt, e as Ot, f as ft, g as Nt, h as Bt, M as St, i as Pt, k as Dt } from "./index-Dfo5ydyB.js";
2
- import { l as no, L as io } from "./index-Dfo5ydyB.js";
1
+ import { j as t, I as b, a as W, c as V, S as K, T as Ct, C as _t, b as Z, D as yt, H as kt, B as ot, v as dt, u as $t, d as Nt, e as Ot, f as ft, g as It, h as Bt, M as St, i as Tt, k as Dt } from "./index-DIba_a6n.js";
2
+ import { l as da, L as ua } from "./index-DIba_a6n.js";
3
3
  import g from "react";
4
4
  import "@phosphor-icons/react";
5
- const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5j_15", Mt = "_subtitle_9rr5j_22", Ht = "_alignmentContent_9rr5j_29", zt = "_alignments_9rr5j_37", Vt = "_alignment_9rr5j_8", Ft = "_circle_9rr5j_58", Ut = "_paddings_9rr5j_65", Yt = "_padding_9rr5j_65", Gt = "_input_9rr5j_84", J = {
5
+ const Et = "_wrapper_1q5mp_2", Lt = "_alignmentBlock_1q5mp_8", Rt = "_title_1q5mp_15", Mt = "_subtitle_1q5mp_22", Ht = "_alignmentContent_1q5mp_29", zt = "_alignments_1q5mp_37", Vt = "_alignment_1q5mp_8", Ft = "_circle_1q5mp_58", Ut = "_paddings_1q5mp_65", Yt = "_padding_1q5mp_65", Gt = "_input_1q5mp_84", Q = {
6
6
  wrapper: Et,
7
7
  alignmentBlock: Lt,
8
8
  title: Rt,
@@ -24,10 +24,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
24
24
  "bottomLeft",
25
25
  "bottom",
26
26
  "bottomRight"
27
- ], Xt = ["left", "top", "right", "bottom"], Fa = (u) => {
28
- const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
27
+ ], Xt = ["left", "top", "right", "bottom"], Qo = (d) => {
28
+ const { alignment: o, padding: e, setPadding: s, setAlignment: i } = d;
29
29
  function c() {
30
- switch (a) {
30
+ switch (o) {
31
31
  case "left":
32
32
  case "topLeft":
33
33
  case "bottomLeft":
@@ -44,8 +44,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
44
44
  return "TextAlignCenter";
45
45
  }
46
46
  }
47
- function l(o) {
48
- switch (o) {
47
+ function l(a) {
48
+ switch (a) {
49
49
  case "left":
50
50
  return "AlignLeft";
51
51
  case "right":
@@ -56,21 +56,21 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
56
56
  return "AlignBottom";
57
57
  }
58
58
  }
59
- return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
60
- /* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
61
- /* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
62
- /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
63
- /* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
64
- /* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Wt.map((o) => /* @__PURE__ */ t.jsxs(
59
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.layout, children: [
60
+ /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: "Layout" }),
61
+ /* @__PURE__ */ t.jsxs("div", { className: Q.alignmentBlock, children: [
62
+ /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Alignment" }),
63
+ /* @__PURE__ */ t.jsxs("div", { className: Q.alignmentContent, children: [
64
+ /* @__PURE__ */ t.jsx("div", { className: Q.alignments, children: Wt.map((a) => /* @__PURE__ */ t.jsxs(
65
65
  "div",
66
66
  {
67
67
  onClick: () => {
68
- i(o);
68
+ i(a);
69
69
  },
70
- className: J.alignment,
70
+ className: Q.alignment,
71
71
  children: [
72
- o !== a && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
73
- o === a && /* @__PURE__ */ t.jsx(
72
+ a !== o && /* @__PURE__ */ t.jsx("div", { className: Q.circle }),
73
+ a === o && /* @__PURE__ */ t.jsx(
74
74
  b,
75
75
  {
76
76
  name: c(),
@@ -81,17 +81,17 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
81
81
  )
82
82
  ]
83
83
  },
84
- o
84
+ a
85
85
  )) }),
86
- /* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((o) => /* @__PURE__ */ t.jsxs(
86
+ /* @__PURE__ */ t.jsx("div", { className: Q.paddings, children: Xt.map((a) => /* @__PURE__ */ t.jsxs(
87
87
  "label",
88
88
  {
89
- className: J.padding,
89
+ className: Q.padding,
90
90
  children: [
91
91
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
92
92
  b,
93
93
  {
94
- name: l(o),
94
+ name: l(a),
95
95
  width: 20,
96
96
  height: 20
97
97
  }
@@ -100,10 +100,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
100
100
  W,
101
101
  {
102
102
  type: "number",
103
- value: String(e[o]),
103
+ value: String(e[a]),
104
104
  onChange: (n) => s({
105
105
  ...e,
106
- [o]: Number(n)
106
+ [a]: Number(n)
107
107
  }),
108
108
  paddingless: !0,
109
109
  borderless: !0
@@ -111,12 +111,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
111
111
  )
112
112
  ]
113
113
  },
114
- o
114
+ a
115
115
  )) })
116
116
  ] })
117
117
  ] })
118
118
  ] });
119
- }, Jt = "_title_voimd_1", Qt = "_subtitle_voimd_5", Kt = "_header_voimd_12", Zt = "_text_voimd_13", te = "_top_voimd_20", ee = "_itemsBlock_voimd_29", ut = {
119
+ }, Jt = "_title_1jkiw_1", Qt = "_subtitle_1jkiw_5", Kt = "_header_1jkiw_12", Zt = "_text_1jkiw_13", te = "_top_1jkiw_20", ee = "_itemsBlock_1jkiw_29", ut = {
120
120
  title: Jt,
121
121
  subtitle: Qt,
122
122
  header: Kt,
@@ -127,8 +127,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
127
127
  typeTexts: se,
128
128
  block: ne,
129
129
  active: ie
130
- }, ae = ["bold", "italic", "underline", "strike-through", "code"], Tt = (u) => {
131
- const { typesText: a, setTypesText: e } = u;
130
+ }, oe = ["bold", "italic", "underline", "strike-through", "code"], Pt = (d) => {
131
+ const { typesText: o, setTypesText: e } = d;
132
132
  function s(i) {
133
133
  switch (i) {
134
134
  case "bold":
@@ -143,16 +143,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
143
143
  return "TextUnderline";
144
144
  }
145
145
  }
146
- return /* @__PURE__ */ t.jsx("div", { className: bt.typeTexts, children: ae.map((i) => /* @__PURE__ */ t.jsx(
146
+ return /* @__PURE__ */ t.jsx("div", { className: bt.typeTexts, children: oe.map((i) => /* @__PURE__ */ t.jsx(
147
147
  "div",
148
148
  {
149
- className: F(bt.block, {
150
- [bt.active]: a.includes(i)
149
+ className: V(bt.block, {
150
+ [bt.active]: o.includes(i)
151
151
  }),
152
152
  onClick: () => {
153
- const c = [...a];
153
+ const c = [...o];
154
154
  if (c.includes(i)) {
155
- const l = c.filter((o) => o !== i);
155
+ const l = c.filter((a) => a !== i);
156
156
  e(l);
157
157
  } else
158
158
  c.push(i), e(c);
@@ -161,7 +161,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
161
161
  b,
162
162
  {
163
163
  name: s(i),
164
- fill: a.includes(i) ? "#252525" : "#757575",
164
+ fill: o.includes(i) ? "#252525" : "#757575",
165
165
  width: 20,
166
166
  height: 20
167
167
  }
@@ -169,20 +169,20 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
169
169
  },
170
170
  String(i)
171
171
  )) });
172
- }, qt = (u) => {
172
+ }, At = (d) => {
173
173
  const {
174
- typesText: a,
174
+ typesText: o,
175
175
  isActiveText: e,
176
176
  setIsActiveText: s,
177
177
  text: i,
178
178
  setText: c,
179
179
  setTypesText: l,
180
- title: o,
180
+ title: a,
181
181
  subtitle: n = "Items"
182
- } = u;
182
+ } = d;
183
183
  return /* @__PURE__ */ t.jsxs("div", { className: ut.text, children: [
184
- (o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ut.top, children: [
185
- o && /* @__PURE__ */ t.jsx("h3", { className: ut.title, children: o }),
184
+ (a || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ut.top, children: [
185
+ a && /* @__PURE__ */ t.jsx("h3", { className: ut.title, children: a }),
186
186
  e !== void 0 && s && /* @__PURE__ */ t.jsx(
187
187
  K,
188
188
  {
@@ -202,47 +202,48 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
202
202
  }
203
203
  ),
204
204
  /* @__PURE__ */ t.jsx(
205
- Tt,
205
+ Pt,
206
206
  {
207
- typesText: a,
207
+ typesText: o,
208
208
  setTypesText: l
209
209
  }
210
210
  )
211
211
  ] })
212
212
  ] });
213
- }, oe = "_title_vzbkd_1", ce = "_subtitle_vzbkd_5", le = "_header_vzbkd_12", re = "_text_vzbkd_13", de = "_productsBlock_vzbkd_14", ue = "_top_vzbkd_26", me = "_itemsBlock_vzbkd_35", _e = "_typeTexts_vzbkd_41", he = "_block_vzbkd_48", pe = "_active_vzbkd_61", ge = "_products_vzbkd_14", fe = "_product_vzbkd_14", xe = "_button_vzbkd_80", be = "_disabled_vzbkd_91", ve = "_image_vzbkd_95", je = "_info_vzbkd_102", ye = "_name_vzbkd_114", ke = "_buttons_vzbkd_118", $e = "_modal_vzbkd_125", we = "_link_vzbkd_145", Ne = "_modalOptions_vzbkd_151", Ie = "_addButton_vzbkd_163", H = {
214
- title: oe,
213
+ }, ae = "_title_157lh_1", ce = "_subtitle_157lh_5", le = "_header_157lh_12", re = "_text_157lh_13", de = "_productsBlock_157lh_14", ue = "_top_157lh_26", me = "_itemsBlock_157lh_35", he = "_typeTexts_157lh_41", _e = "_block_157lh_48", pe = "_active_157lh_61", ge = "_products_157lh_14", fe = "_product_157lh_14", xe = "_button_157lh_80", be = "_disabled_157lh_91", je = "_image_157lh_95", ve = "_info_157lh_102", ye = "_name_157lh_114", ke = "_buttons_157lh_118", $e = "_modal_157lh_125", Ne = "_link_157lh_145", Ie = "_modalOptions_157lh_151", we = "_addButton_157lh_163", Ce = "_deleteButton_157lh_178", H = {
214
+ title: ae,
215
215
  subtitle: ce,
216
216
  header: le,
217
217
  text: re,
218
218
  productsBlock: de,
219
219
  top: ue,
220
220
  itemsBlock: me,
221
- typeTexts: _e,
222
- block: he,
221
+ typeTexts: he,
222
+ block: _e,
223
223
  active: pe,
224
224
  products: ge,
225
225
  product: fe,
226
226
  button: xe,
227
227
  disabled: be,
228
- image: ve,
229
- info: je,
228
+ image: je,
229
+ info: ve,
230
230
  name: ye,
231
231
  buttons: ke,
232
232
  modal: $e,
233
- link: we,
234
- modalOptions: Ne,
235
- addButton: Ie
236
- }, Ce = g.forwardRef(
237
- (u, a) => {
238
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
239
- function o(n, r) {
233
+ link: Ne,
234
+ modalOptions: Ie,
235
+ addButton: we,
236
+ deleteButton: Ce
237
+ }, Be = g.forwardRef(
238
+ (d, o) => {
239
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
240
+ function a(n, r) {
240
241
  return n.length > r ? `${n.slice(0, r)}...` : n;
241
242
  }
242
243
  return /* @__PURE__ */ t.jsxs(
243
244
  "div",
244
245
  {
245
- ref: a,
246
+ ref: o,
246
247
  className: H.modal,
247
248
  onClick: (n) => {
248
249
  n.stopPropagation();
@@ -253,7 +254,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
253
254
  },
254
255
  children: [
255
256
  /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
256
- /* @__PURE__ */ t.jsx("h3", { className: H.title, children: o(e.name, 20) }),
257
+ /* @__PURE__ */ t.jsx("h3", { className: H.title, children: a(e.name, 20) }),
257
258
  /* @__PURE__ */ t.jsx(
258
259
  b,
259
260
  {
@@ -270,39 +271,39 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
270
271
  /* @__PURE__ */ t.jsx("div", { className: H.modalOptions, children: c.map((n) => {
271
272
  if (n.type === "image")
272
273
  return /* @__PURE__ */ t.jsx(
273
- ht,
274
+ _t,
274
275
  {
275
276
  label: "Put up an attractive image",
276
277
  activeImage: e[n.field],
277
278
  onChange: (r) => {
278
- const _ = {
279
+ const x = {
279
280
  ...e,
280
281
  [n.field]: r
281
282
  };
282
- s(_);
283
+ s(x);
283
284
  }
284
285
  },
285
286
  String(n.field)
286
287
  );
287
288
  if (n.type === "text")
288
289
  return /* @__PURE__ */ t.jsx(
289
- qt,
290
+ At,
290
291
  {
291
292
  typesText: e[n.field.type],
292
293
  setTypesText: (r) => {
293
- const _ = {
294
+ const x = {
294
295
  ...e,
295
296
  [n.field.type]: r
296
297
  };
297
- s(_);
298
+ s(x);
298
299
  },
299
300
  text: e[n.field.text] || "",
300
301
  setText: (r) => {
301
- const _ = {
302
+ const x = {
302
303
  ...e,
303
304
  [n.field.text]: r
304
305
  };
305
- s(_);
306
+ s(x);
306
307
  },
307
308
  subtitle: n.label
308
309
  }
@@ -312,11 +313,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
312
313
  W,
313
314
  {
314
315
  onChange: (r) => {
315
- const _ = {
316
+ const x = {
316
317
  ...e,
317
318
  [n.field]: r
318
319
  };
319
- s(_);
320
+ s(x);
320
321
  },
321
322
  value: e[n.field] || "",
322
323
  label: n.label,
@@ -329,11 +330,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
329
330
  W,
330
331
  {
331
332
  onChange: (r) => {
332
- const _ = {
333
+ const x = {
333
334
  ...e,
334
335
  [n.field.text]: r
335
336
  };
336
- s(_);
337
+ s(x);
337
338
  },
338
339
  value: e[n.field.text] || "",
339
340
  label: n.inputLabel,
@@ -346,11 +347,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
346
347
  current: !!e[n.field.switch] || !1,
347
348
  label: n.switchLabel,
348
349
  onChange: (r) => {
349
- const _ = {
350
+ const x = {
350
351
  ...e,
351
352
  [n.field.switch]: r
352
353
  };
353
- s(_);
354
+ s(x);
354
355
  }
355
356
  }
356
357
  )
@@ -361,11 +362,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
361
362
  {
362
363
  items: e[n.field] || [],
363
364
  setItems: (r) => {
364
- const _ = {
365
+ const x = {
365
366
  ...e,
366
367
  [n.field]: r
367
368
  };
368
- s(_);
369
+ s(x);
369
370
  },
370
371
  itemsType: "select",
371
372
  draggable: n.draggable || !1,
@@ -382,11 +383,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
382
383
  {
383
384
  options: n.itemsOptions,
384
385
  onChange: (r) => {
385
- const _ = {
386
+ const x = {
386
387
  ...e,
387
388
  [n.field]: r
388
389
  };
389
- s(_);
390
+ s(x);
390
391
  },
391
392
  label: n.label,
392
393
  value: e[n.field] || "String",
@@ -398,15 +399,15 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
398
399
  }
399
400
  );
400
401
  }
401
- ), Be = "_other_g74jx_1", Se = "_subtitle_g74jx_7", Pe = "_items_g74jx_14", vt = {
402
- other: Be,
403
- subtitle: Se,
402
+ ), Se = "_other_g74jx_1", Te = "_subtitle_g74jx_7", Pe = "_items_g74jx_14", jt = {
403
+ other: Se,
404
+ subtitle: Te,
404
405
  items: Pe
405
- }, xt = (u) => {
406
- const { items: a, title: e = "Other" } = u;
407
- return /* @__PURE__ */ t.jsxs("div", { className: vt.other, children: [
408
- /* @__PURE__ */ t.jsx("h5", { className: vt.subtitle, children: e }),
409
- /* @__PURE__ */ t.jsx("div", { className: vt.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
406
+ }, xt = (d) => {
407
+ const { items: o, title: e = "Other" } = d;
408
+ return /* @__PURE__ */ t.jsxs("div", { className: jt.other, children: [
409
+ /* @__PURE__ */ t.jsx("h5", { className: jt.subtitle, children: e }),
410
+ /* @__PURE__ */ t.jsx("div", { className: jt.items, children: o.map((s, i) => /* @__PURE__ */ t.jsx(
410
411
  K,
411
412
  {
412
413
  current: s.isItem,
@@ -418,93 +419,93 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
418
419
  i
419
420
  )) })
420
421
  ] });
421
- }, Te = (u) => {
422
- const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
422
+ }, Ae = (d) => {
423
+ const { index: o, moveProduct: e, children: s } = d, [, i] = $t({
423
424
  accept: "product",
424
- hover(o) {
425
- o.index !== a && (e(o.index, a), o.index = a);
425
+ hover(a) {
426
+ a.index !== o && (e(a.index, o), a.index = o);
426
427
  }
427
- }), [{ isDragging: c }, l] = wt({
428
+ }), [{ isDragging: c }, l] = Nt({
428
429
  type: "product",
429
- item: { index: a },
430
- collect: (o) => ({
431
- isDragging: o.isDragging()
430
+ item: { index: o },
431
+ collect: (a) => ({
432
+ isDragging: a.isDragging()
432
433
  })
433
434
  });
434
435
  return /* @__PURE__ */ t.jsx(
435
436
  "div",
436
437
  {
437
- ref: (o) => l(i(o)),
438
+ ref: (a) => l(i(a)),
438
439
  className: `${H.product} ${c ? H.dragging : ""}`,
439
440
  children: s
440
441
  }
441
442
  );
442
- }, qe = (u) => {
443
+ }, qe = (d) => {
443
444
  const {
444
- isActiveItems: a,
445
+ isActiveItems: o,
445
446
  setIsActiveItems: e,
446
447
  items: s,
447
448
  setItems: i,
448
449
  other: c,
449
450
  title: l,
450
- subtitle: o,
451
+ subtitle: a,
451
452
  editable: n = !0,
452
453
  draggable: r = !1,
453
- withImage: _ = !1,
454
- deletable: d = !0,
455
- addable: P = !0,
456
- itemsType: x,
454
+ withImage: x = !1,
455
+ deletable: $ = !0,
456
+ addable: p = !0,
457
+ itemsType: h,
457
458
  itemsPlaceholder: f = "",
458
- itemsOptions: h,
459
- hasRangeSelector: q = !1,
460
- rangeSelectorOptions: A,
461
- modalOptions: v,
459
+ itemsOptions: m,
460
+ hasRangeSelector: C = !1,
461
+ rangeSelectorOptions: q,
462
+ modalOptions: j,
462
463
  addableOptions: E = {},
463
- limit: I,
464
- autoScrollInterval: C
465
- } = u, [M, m] = g.useState(null), [O, k] = g.useState({
464
+ limit: S,
465
+ autoScrollInterval: T
466
+ } = d, [M, u] = g.useState(null), [O, k] = g.useState({
466
467
  top: 0,
467
468
  left: 0
468
- }), [y, L] = g.useState(null), w = g.useRef(null), [R, U] = g.useState(!1), tt = (p, B) => {
469
- const $ = [...s], [X] = $.splice(p, 1);
470
- $.splice(B, 0, X), i($);
469
+ }), [y, L] = g.useState(null), I = g.useRef(null), [R, Y] = g.useState(!1), tt = (_, P) => {
470
+ const N = [...s], [X] = N.splice(_, 1);
471
+ N.splice(P, 0, X), i(N);
471
472
  };
472
473
  g.useEffect(() => {
473
- const p = () => {
474
- m(null), U(!1);
474
+ const _ = () => {
475
+ u(null), Y(!1);
475
476
  };
476
- return document.body.addEventListener("click", p), m(null), U(!1), () => {
477
- m(null), U(!1), document.body.removeEventListener("click", p);
477
+ return document.body.addEventListener("click", _), u(null), Y(!1), () => {
478
+ u(null), Y(!1), document.body.removeEventListener("click", _);
478
479
  };
479
480
  }, []), g.useEffect(() => {
480
481
  if (M) {
481
- const p = [...s].map((B) => B.id === M.id ? M : B);
482
- i(p);
482
+ const _ = [...s].map((P) => P.id === M.id ? M : P);
483
+ i(_);
483
484
  }
484
485
  }, [M]), g.useEffect(() => {
485
- if (w.current && y) {
486
- const p = w.current.getBoundingClientRect().height, B = window.innerHeight;
487
- let $ = y.top;
488
- $ + p > B + window.scrollY - 200 && ($ = B + window.scrollY - p - 200), $ < 0 && ($ = 10), k({
489
- top: $,
486
+ if (I.current && y) {
487
+ const _ = I.current.getBoundingClientRect().height, P = window.innerHeight;
488
+ let N = y.top;
489
+ N + _ > P + window.scrollY - 200 && (N = P + window.scrollY - _ - 200), N < 0 && (N = 10), k({
490
+ top: N,
490
491
  left: y.left
491
492
  });
492
493
  }
493
- }, [w.current, y]);
494
- const at = (p, B) => {
495
- p.stopPropagation();
496
- const $ = p.target.getBoundingClientRect();
494
+ }, [I.current, y]);
495
+ const at = (_, P) => {
496
+ _.stopPropagation();
497
+ const N = _.target.getBoundingClientRect();
497
498
  L({
498
- top: $.top + window.scrollY,
499
- left: $.left - 30
500
- }), m(B), U(!0);
499
+ top: N.top + window.scrollY,
500
+ left: N.left - 30
501
+ }), u(P), Y(!0);
501
502
  };
502
- function j(p) {
503
- if (_)
504
- return p ? /* @__PURE__ */ t.jsx(
503
+ function v(_) {
504
+ if (x)
505
+ return _ ? /* @__PURE__ */ t.jsx(
505
506
  "img",
506
507
  {
507
- src: `https://imagedelivery.net/${p[0]}/w=1000`,
508
+ src: `https://imagedelivery.net/${_[0]}/w=1000`,
508
509
  alt: "image",
509
510
  width: 16,
510
511
  height: 16
@@ -519,9 +520,9 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
519
520
  }
520
521
  );
521
522
  }
522
- const T = (p, B) => {
523
+ const A = (_, P) => {
523
524
  var X;
524
- const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
525
+ const N = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
525
526
  r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
526
527
  b,
527
528
  {
@@ -531,65 +532,65 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
531
532
  height: 20
532
533
  }
533
534
  ) }),
534
- x === "select" && /* @__PURE__ */ t.jsx(
535
+ h === "select" && /* @__PURE__ */ t.jsx(
535
536
  Z,
536
537
  {
537
538
  onChange: (D) => {
538
- const Y = [...s], lt = h.find((pt) => pt.name === D);
539
- if (!lt) return;
540
- const ot = Y.map((pt) => pt.id === p.id ? {
541
- ...lt,
539
+ const G = [...s], rt = m.find((pt) => pt.name === D);
540
+ if (!rt) return;
541
+ const ct = G.map((pt) => pt.id === _.id ? {
542
+ ...rt,
542
543
  name: D
543
544
  } : pt);
544
- m({
545
- ...p,
545
+ u({
546
+ ..._,
546
547
  name: D
547
- }), i([...ot]);
548
+ }), i([...ct]);
548
549
  },
549
- value: p.name,
550
- options: h.filter((D) => !s.find((Y) => Y.name === D.name)).map((D) => D.name),
551
- leftAddon: j(p.images)
550
+ value: _.name,
551
+ options: m.filter((D) => !s.find((G) => G.name === D.name)).map((D) => D.name),
552
+ leftAddon: v(_.images)
552
553
  }
553
554
  ),
554
- x === "input" && /* @__PURE__ */ t.jsx(
555
+ h === "input" && /* @__PURE__ */ t.jsx(
555
556
  W,
556
557
  {
557
558
  onChange: (D) => {
558
- const lt = [...s].map((ot) => ot.id === p.id ? {
559
- ...p,
559
+ const rt = [...s].map((ct) => ct.id === _.id ? {
560
+ ..._,
560
561
  name: D
561
- } : ot);
562
- i([...lt]);
562
+ } : ct);
563
+ i([...rt]);
563
564
  },
564
- value: p.name,
565
+ value: _.name,
565
566
  placeholder: f
566
567
  }
567
568
  ),
568
- x === "image" && /* @__PURE__ */ t.jsx(
569
- ht,
569
+ h === "image" && /* @__PURE__ */ t.jsx(
570
+ _t,
570
571
  {
571
572
  onChange: (D) => {
572
- const lt = [...s].map((ot) => ot.id === p.id ? {
573
- ...p,
573
+ const rt = [...s].map((ct) => ct.id === _.id ? {
574
+ ..._,
574
575
  images: D
575
- } : ot);
576
- i([...lt]);
576
+ } : ct);
577
+ i([...rt]);
577
578
  },
578
- activeImage: (X = s.find((D) => D.id === p.id)) == null ? void 0 : X.images[0]
579
+ activeImage: (X = s.find((D) => D.id === _.id)) == null ? void 0 : X.images[0]
579
580
  }
580
581
  ),
581
582
  /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
582
- n && /* @__PURE__ */ t.jsx(
583
+ n && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
583
584
  b,
584
585
  {
585
586
  name: "Sliders",
586
587
  hoverable: !0,
587
588
  width: 20,
588
589
  height: 20,
589
- onClick: (D) => at(D, p)
590
+ onClick: (D) => at(D, _)
590
591
  }
591
- ),
592
- d && /* @__PURE__ */ t.jsx(
592
+ ) }),
593
+ $ && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
593
594
  b,
594
595
  {
595
596
  name: "Trash",
@@ -597,113 +598,123 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
597
598
  width: 20,
598
599
  height: 20,
599
600
  fill: "#C12A2A",
600
- onClick: () => i(s.filter((D) => D.id !== p.id))
601
+ onClick: () => i(s.filter((D) => D.id !== _.id))
601
602
  }
602
- )
603
+ ) })
603
604
  ] })
604
605
  ] });
605
606
  return r ? /* @__PURE__ */ t.jsx(
606
- Te,
607
+ Ae,
607
608
  {
608
- product: p,
609
- index: B,
609
+ product: _,
610
+ index: P,
610
611
  moveProduct: tt,
611
- children: $
612
+ children: N
612
613
  },
613
- p.id
614
+ _.id
614
615
  ) : /* @__PURE__ */ t.jsx(
615
616
  "div",
616
617
  {
617
618
  className: H.product,
618
- children: $
619
+ children: N
619
620
  },
620
- p.id
621
+ _.id
621
622
  );
622
623
  };
623
624
  return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
624
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
625
+ (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
625
626
  l && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: l }),
626
- a !== void 0 && /* @__PURE__ */ t.jsx(
627
+ o !== void 0 && /* @__PURE__ */ t.jsx(
627
628
  K,
628
629
  {
629
- current: a,
630
- onChange: (p) => e == null ? void 0 : e(p)
630
+ current: o,
631
+ onChange: (_) => e == null ? void 0 : e(_)
631
632
  }
632
633
  )
633
634
  ] }),
634
- M && n && v && R && /* @__PURE__ */ t.jsx(
635
- Ce,
635
+ M && n && j && R && /* @__PURE__ */ t.jsx(
636
+ Be,
636
637
  {
637
- ref: w,
638
+ ref: I,
638
639
  activeItem: M,
639
- setActiveItem: m,
640
+ setActiveItem: u,
640
641
  popupPosition: O,
641
- modalOptions: v,
642
- setIsOpenModal: U
642
+ modalOptions: j,
643
+ setIsOpenModal: Y
643
644
  }
644
645
  ),
645
- q && A && /* @__PURE__ */ t.jsx(It, { ...A }),
646
+ C && q && /* @__PURE__ */ t.jsx(wt, { ...q }),
646
647
  /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
647
- o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
648
- r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((p, B) => T(p, B)) }) : s.map((p, B) => T(p, B)),
649
- P && /* @__PURE__ */ t.jsx("div", { className: H.addButton, children: /* @__PURE__ */ t.jsxs(
650
- it,
648
+ a && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: a }),
649
+ r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((_, P) => A(_, P)) }) : s.map((_, P) => A(_, P)),
650
+ p && /* @__PURE__ */ t.jsx(
651
+ "div",
651
652
  {
652
- withoutHover: !0,
653
- className: F(H.button, {
654
- [H.disabled]: !!(I && I <= s.length || s.length === (h == null ? void 0 : h.length))
655
- }),
656
- size: "s",
657
- disabled: !!(I && I <= s.length || s.length === (h == null ? void 0 : h.length)),
658
- onClick: () => {
659
- const p = [...s];
660
- let B = null;
661
- if (h) {
662
- for (let $ = 0; $ < h.length; $++)
663
- if (!s.find((X) => X.id === h[$].id)) {
664
- B = h[$];
665
- break;
666
- }
667
- }
668
- x === "select" ? p.push({
669
- name: B ? B.name : h[0].name,
670
- id: (B == null ? void 0 : B.id) || h[0].id,
671
- ...E
672
- }) : x === "input" ? p.push({
673
- name: "",
674
- id: dt(),
675
- ...E
676
- }) : p.push({
677
- name: `Image ${s.length + 1}`,
678
- id: dt(),
679
- ...E
680
- }), i(p);
681
- },
682
653
  style: {
683
- width: "fit-content"
654
+ width: "100%",
655
+ display: "flex",
656
+ justifyContent: "center"
684
657
  },
685
- children: [
686
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
687
- /* @__PURE__ */ t.jsx(
688
- b,
689
- {
690
- name: "Plus",
691
- width: 16,
692
- height: 16
693
- }
694
- )
695
- ]
658
+ children: /* @__PURE__ */ t.jsx(
659
+ ot,
660
+ {
661
+ withoutHover: !0,
662
+ className: V(H.button, {
663
+ [H.disabled]: !!(S && S <= s.length || s.length === (m == null ? void 0 : m.length))
664
+ }),
665
+ size: "s",
666
+ disabled: !!(S && S <= s.length || s.length === (m == null ? void 0 : m.length)),
667
+ onClick: () => {
668
+ const _ = [...s];
669
+ let P = null;
670
+ if (m) {
671
+ for (let N = 0; N < m.length; N++)
672
+ if (!s.find((X) => X.id === m[N].id)) {
673
+ P = m[N];
674
+ break;
675
+ }
676
+ }
677
+ h === "select" ? _.push({
678
+ name: P ? P.name : m[0].name,
679
+ id: (P == null ? void 0 : P.id) || m[0].id,
680
+ ...E
681
+ }) : h === "input" ? _.push({
682
+ name: "",
683
+ id: dt(),
684
+ ...E
685
+ }) : _.push({
686
+ name: `Image ${s.length + 1}`,
687
+ id: dt(),
688
+ ...E
689
+ }), i(_);
690
+ },
691
+ style: {
692
+ width: "fit-content"
693
+ },
694
+ children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
695
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
696
+ /* @__PURE__ */ t.jsx(
697
+ b,
698
+ {
699
+ name: "Plus",
700
+ width: 16,
701
+ height: 16
702
+ }
703
+ )
704
+ ] })
705
+ }
706
+ )
696
707
  }
697
- ) })
708
+ )
698
709
  ] }),
699
710
  c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
700
- C !== void 0 && /* @__PURE__ */ t.jsx(
711
+ T !== void 0 && /* @__PURE__ */ t.jsx(
701
712
  W,
702
713
  {
703
714
  label: "Auto scroll interval",
704
715
  type: "number",
705
- value: String(C.scrollInterval),
706
- onChange: (p) => C.setScrollInterval(Number(p)),
716
+ value: String(T.scrollInterval),
717
+ onChange: (_) => T.setScrollInterval(Number(_)),
707
718
  min: 0.1,
708
719
  max: 100,
709
720
  style: {
@@ -713,53 +724,54 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
713
724
  }
714
725
  )
715
726
  ] });
716
- }, Ae = "_title_1jjcw_1", Oe = "_subtitle_1jjcw_5", De = "_header_1jjcw_12", Ee = "_text_1jjcw_13", Le = "_productsBlock_1jjcw_14", Re = "_top_1jjcw_26", Me = "_itemsBlock_1jjcw_35", He = "_typeTexts_1jjcw_41", ze = "_block_1jjcw_48", Ve = "_active_1jjcw_61", Fe = "_products_1jjcw_14", Ue = "_product_1jjcw_14", Ye = "_button_1jjcw_80", Ge = "_disabled_1jjcw_91", We = "_image_1jjcw_95", Xe = "_info_1jjcw_102", Je = "_name_1jjcw_114", Qe = "_buttons_1jjcw_118", Ke = "_modal_1jjcw_125", Ze = "_link_1jjcw_145", ts = "_modalOptions_1jjcw_151", es = "_addButton_1jjcw_157", Q = {
717
- title: Ae,
718
- subtitle: Oe,
719
- header: De,
720
- text: Ee,
721
- productsBlock: Le,
722
- top: Re,
723
- itemsBlock: Me,
724
- typeTexts: He,
725
- block: ze,
726
- active: Ve,
727
- products: Fe,
728
- product: Ue,
729
- button: Ye,
730
- disabled: Ge,
731
- image: We,
732
- info: Xe,
733
- name: Je,
734
- buttons: Qe,
735
- modal: Ke,
736
- link: Ze,
737
- modalOptions: ts,
738
- addButton: es
739
- }, Ua = (u) => {
727
+ }, Oe = "_title_82zux_1", De = "_subtitle_82zux_5", Ee = "_header_82zux_12", Le = "_text_82zux_13", Re = "_productsBlock_82zux_14", Me = "_top_82zux_26", He = "_itemsBlock_82zux_35", ze = "_typeTexts_82zux_41", Ve = "_block_82zux_48", Fe = "_active_82zux_61", Ue = "_products_82zux_14", Ye = "_product_82zux_14", Ge = "_button_82zux_80", We = "_disabled_82zux_91", Xe = "_image_82zux_95", Je = "_info_82zux_102", Qe = "_name_82zux_114", Ke = "_buttons_82zux_118", Ze = "_modal_82zux_125", ts = "_link_82zux_145", es = "_modalOptions_82zux_151", ss = "_addButton_82zux_157", ns = "_deleteButton_82zux_179", J = {
728
+ title: Oe,
729
+ subtitle: De,
730
+ header: Ee,
731
+ text: Le,
732
+ productsBlock: Re,
733
+ top: Me,
734
+ itemsBlock: He,
735
+ typeTexts: ze,
736
+ block: Ve,
737
+ active: Fe,
738
+ products: Ue,
739
+ product: Ye,
740
+ button: Ge,
741
+ disabled: We,
742
+ image: Xe,
743
+ info: Je,
744
+ name: Qe,
745
+ buttons: Ke,
746
+ modal: Ze,
747
+ link: ts,
748
+ modalOptions: es,
749
+ addButton: ss,
750
+ deleteButton: ns
751
+ }, Ko = (d) => {
740
752
  const {
741
- isActiveItems: a,
753
+ isActiveItems: o,
742
754
  setIsActiveItems: e,
743
755
  items: s,
744
756
  setItems: i,
745
757
  other: c,
746
758
  title: l,
747
- subtitle: o,
759
+ subtitle: a,
748
760
  draggable: n = !1,
749
761
  withImage: r = !1,
750
- addable: _ = !0,
751
- itemsOptions: d,
752
- hasRangeSelector: P = !1,
753
- rangeSelectorOptions: x,
762
+ addable: x = !0,
763
+ itemsOptions: $,
764
+ hasRangeSelector: p = !1,
765
+ rangeSelectorOptions: h,
754
766
  limit: f,
755
- autoScrollInterval: h
756
- } = u;
757
- function q(v) {
767
+ autoScrollInterval: m
768
+ } = d;
769
+ function C(j) {
758
770
  if (r)
759
- return v ? /* @__PURE__ */ t.jsx(
771
+ return j ? /* @__PURE__ */ t.jsx(
760
772
  "img",
761
773
  {
762
- src: `https://imagedelivery.net/${v[0]}/w=1000`,
774
+ src: `https://imagedelivery.net/${j[0]}/w=1000`,
763
775
  alt: "image",
764
776
  width: 16,
765
777
  height: 16
@@ -774,10 +786,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
774
786
  }
775
787
  );
776
788
  }
777
- const A = (v) => {
778
- const E = d.find((C) => C.id === v);
789
+ const q = (j) => {
790
+ const E = $.find((T) => T.id === j);
779
791
  if (!E) return;
780
- const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
792
+ const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
781
793
  n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
782
794
  b,
783
795
  {
@@ -790,18 +802,18 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
790
802
  /* @__PURE__ */ t.jsx(
791
803
  Z,
792
804
  {
793
- onChange: (C) => {
794
- const M = [...s], m = d.find((y) => y.name === C);
795
- if (!m) return;
796
- const O = m.id, k = M.map((y) => y === v ? O : y);
805
+ onChange: (T) => {
806
+ const M = [...s], u = $.find((y) => y.name === T);
807
+ if (!u) return;
808
+ const O = u.id, k = M.map((y) => y === j ? O : y);
797
809
  i([...k]);
798
810
  },
799
811
  value: E.name,
800
- options: d.filter((C) => !s.find((M) => M === C.id)).map((C) => C.name),
801
- leftAddon: q(E.images)
812
+ options: $.filter((T) => !s.find((M) => M === T.id)).map((T) => T.name),
813
+ leftAddon: C(E.images)
802
814
  }
803
815
  ),
804
- /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx(
816
+ /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
805
817
  b,
806
818
  {
807
819
  name: "Trash",
@@ -809,80 +821,91 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
809
821
  width: 20,
810
822
  height: 20,
811
823
  fill: "#C12A2A",
812
- onClick: () => i(s.filter((C) => C !== v))
824
+ onClick: () => i(s.filter((T) => T !== j))
813
825
  }
814
- ) })
826
+ ) }) })
815
827
  ] });
816
828
  return /* @__PURE__ */ t.jsx(
817
829
  "div",
818
830
  {
819
- className: Q.product,
820
- children: I
831
+ className: J.product,
832
+ children: S
821
833
  },
822
- v
834
+ j
823
835
  );
824
836
  };
825
- return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
826
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
827
- l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
828
- a !== void 0 && /* @__PURE__ */ t.jsx(
837
+ return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
838
+ (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
839
+ l && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: l }),
840
+ o !== void 0 && /* @__PURE__ */ t.jsx(
829
841
  K,
830
842
  {
831
- current: a,
832
- onChange: (v) => e == null ? void 0 : e(v)
843
+ current: o,
844
+ onChange: (j) => e == null ? void 0 : e(j)
833
845
  }
834
846
  )
835
847
  ] }),
836
- P && x && /* @__PURE__ */ t.jsx(It, { ...x }),
837
- /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
838
- o && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: o }),
839
- s.map((v) => A(v)),
840
- _ && /* @__PURE__ */ t.jsx("div", { className: Q.addButton, children: /* @__PURE__ */ t.jsxs(
841
- it,
848
+ p && h && /* @__PURE__ */ t.jsx(wt, { ...h }),
849
+ /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
850
+ a && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: a }),
851
+ s.map((j) => q(j)),
852
+ x && /* @__PURE__ */ t.jsx(
853
+ "div",
842
854
  {
843
- withoutHover: !0,
844
- className: F(Q.button, {
845
- [Q.disabled]: !!(f && f <= s.length || s.length === d.length)
846
- }),
847
- size: "s",
848
- disabled: !!(f && f <= s.length || s.length === d.length),
849
- onClick: () => {
850
- const v = [...s];
851
- let E = null;
852
- if (d) {
853
- for (let I = 0; I < d.length; I++)
854
- if (!s.find((C) => C === d[I].id)) {
855
- E = d[I];
856
- break;
857
- }
858
- }
859
- v.push((E == null ? void 0 : E.id) || d[0].id), i(v);
860
- },
861
855
  style: {
862
- width: "fit-content"
856
+ width: "100%",
857
+ display: "flex",
858
+ justifyContent: "center",
859
+ gap: 5
863
860
  },
864
- children: [
865
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
866
- /* @__PURE__ */ t.jsx(
867
- b,
868
- {
869
- name: "Plus",
870
- width: 16,
871
- height: 16
872
- }
873
- )
874
- ]
861
+ children: /* @__PURE__ */ t.jsx(
862
+ ot,
863
+ {
864
+ withoutHover: !0,
865
+ className: V(J.button, {
866
+ [J.disabled]: !!(f && f <= s.length || s.length === $.length)
867
+ }),
868
+ size: "s",
869
+ disabled: !!(f && f <= s.length || s.length === $.length),
870
+ onClick: () => {
871
+ const j = [...s];
872
+ let E = null;
873
+ if ($) {
874
+ for (let S = 0; S < $.length; S++)
875
+ if (!s.find((T) => T === $[S].id)) {
876
+ E = $[S];
877
+ break;
878
+ }
879
+ }
880
+ j.push((E == null ? void 0 : E.id) || $[0].id), i(j);
881
+ },
882
+ style: {
883
+ width: "fit-content"
884
+ },
885
+ children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
886
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
887
+ /* @__PURE__ */ t.jsx(
888
+ b,
889
+ {
890
+ name: "Plus",
891
+ width: 16,
892
+ height: 16
893
+ }
894
+ )
895
+ ] })
896
+ }
897
+ )
875
898
  }
876
- ) })
899
+ )
877
900
  ] }),
878
901
  c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
879
- h !== void 0 && /* @__PURE__ */ t.jsx(
902
+ m !== void 0 && /* @__PURE__ */ t.jsx(
880
903
  W,
881
904
  {
882
905
  label: "Auto scroll interval",
883
906
  type: "number",
884
- value: String(h.scrollInterval),
885
- onChange: (v) => h.setScrollInterval(Number(v)),
907
+ value: String(m.scrollInterval),
908
+ onChange: (j) => m.setScrollInterval(Number(j)),
886
909
  min: 0.1,
887
910
  max: 100,
888
911
  style: {
@@ -892,40 +915,41 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
892
915
  }
893
916
  )
894
917
  ] });
895
- }, ss = "_title_iqcxl_1", ns = "_subtitle_iqcxl_5", is = "_header_iqcxl_12", as = "_text_iqcxl_13", os = "_productsBlock_iqcxl_14", cs = "_top_iqcxl_26", ls = "_itemsBlock_iqcxl_35", rs = "_typeTexts_iqcxl_41", ds = "_block_iqcxl_48", us = "_active_iqcxl_61", ms = "_products_iqcxl_14", _s = "_product_iqcxl_14", hs = "_button_iqcxl_80", ps = "_disabled_iqcxl_91", gs = "_image_iqcxl_95", fs = "_info_iqcxl_102", xs = "_name_iqcxl_114", bs = "_buttons_iqcxl_118", vs = "_modal_iqcxl_125", js = "_link_iqcxl_146", ys = "_modalOptions_iqcxl_152", ks = "_addButton_iqcxl_164", V = {
896
- title: ss,
897
- subtitle: ns,
898
- header: is,
899
- text: as,
900
- productsBlock: os,
901
- top: cs,
902
- itemsBlock: ls,
903
- typeTexts: rs,
904
- block: ds,
905
- active: us,
906
- products: ms,
907
- product: _s,
908
- button: hs,
909
- disabled: ps,
910
- image: gs,
911
- info: fs,
912
- name: xs,
913
- buttons: bs,
914
- modal: vs,
915
- link: js,
916
- modalOptions: ys,
917
- addButton: ks
918
- }, $s = g.forwardRef(
919
- (u, a) => {
920
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
921
- function o(n, r) {
918
+ }, is = "_title_1wm9m_1", os = "_subtitle_1wm9m_5", as = "_header_1wm9m_12", cs = "_text_1wm9m_13", ls = "_productsBlock_1wm9m_14", rs = "_top_1wm9m_26", ds = "_itemsBlock_1wm9m_35", us = "_typeTexts_1wm9m_41", ms = "_block_1wm9m_48", hs = "_active_1wm9m_61", _s = "_products_1wm9m_14", ps = "_product_1wm9m_14", gs = "_button_1wm9m_80", fs = "_disabled_1wm9m_91", xs = "_image_1wm9m_95", bs = "_info_1wm9m_102", js = "_name_1wm9m_114", vs = "_buttons_1wm9m_118", ys = "_modal_1wm9m_125", ks = "_link_1wm9m_146", $s = "_modalOptions_1wm9m_152", Ns = "_addButton_1wm9m_164", Is = "_deleteButton_1wm9m_179", z = {
919
+ title: is,
920
+ subtitle: os,
921
+ header: as,
922
+ text: cs,
923
+ productsBlock: ls,
924
+ top: rs,
925
+ itemsBlock: ds,
926
+ typeTexts: us,
927
+ block: ms,
928
+ active: hs,
929
+ products: _s,
930
+ product: ps,
931
+ button: gs,
932
+ disabled: fs,
933
+ image: xs,
934
+ info: bs,
935
+ name: js,
936
+ buttons: vs,
937
+ modal: ys,
938
+ link: ks,
939
+ modalOptions: $s,
940
+ addButton: Ns,
941
+ deleteButton: Is
942
+ }, ws = g.forwardRef(
943
+ (d, o) => {
944
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
945
+ function a(n, r) {
922
946
  return n.length > r ? `${n.slice(0, r)}...` : n;
923
947
  }
924
948
  return /* @__PURE__ */ t.jsxs(
925
949
  "div",
926
950
  {
927
- ref: a,
928
- className: V.modal,
951
+ ref: o,
952
+ className: z.modal,
929
953
  onClick: (n) => {
930
954
  n.stopPropagation();
931
955
  },
@@ -934,8 +958,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
934
958
  left: `${i.left}px`
935
959
  },
936
960
  children: [
937
- /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
938
- /* @__PURE__ */ t.jsx("h3", { className: V.title, children: o(e.name, 20) }),
961
+ /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
962
+ /* @__PURE__ */ t.jsx("h3", { className: z.title, children: a(e.name, 20) }),
939
963
  /* @__PURE__ */ t.jsx(
940
964
  b,
941
965
  {
@@ -949,42 +973,42 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
949
973
  }
950
974
  )
951
975
  ] }),
952
- /* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((n) => {
976
+ /* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((n) => {
953
977
  if (n.type === "image")
954
978
  return /* @__PURE__ */ t.jsx(
955
- ht,
979
+ _t,
956
980
  {
957
981
  label: "Put up an attractive image",
958
982
  activeImage: e[n.field],
959
983
  onChange: (r) => {
960
- const _ = {
984
+ const x = {
961
985
  ...e,
962
986
  [n.field]: r
963
987
  };
964
- s(_);
988
+ s(x);
965
989
  }
966
990
  },
967
991
  String(n.field)
968
992
  );
969
993
  if (n.type === "text")
970
994
  return /* @__PURE__ */ t.jsx(
971
- qt,
995
+ At,
972
996
  {
973
997
  typesText: e[n.field.type],
974
998
  setTypesText: (r) => {
975
- const _ = {
999
+ const x = {
976
1000
  ...e,
977
1001
  [n.field.type]: r
978
1002
  };
979
- s(_);
1003
+ s(x);
980
1004
  },
981
1005
  text: e[n.field.text] || "",
982
1006
  setText: (r) => {
983
- const _ = {
1007
+ const x = {
984
1008
  ...e,
985
1009
  [n.field.text]: r
986
1010
  };
987
- s(_);
1011
+ s(x);
988
1012
  },
989
1013
  subtitle: n.label
990
1014
  }
@@ -994,11 +1018,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
994
1018
  W,
995
1019
  {
996
1020
  onChange: (r) => {
997
- const _ = {
1021
+ const x = {
998
1022
  ...e,
999
1023
  [n.field]: r
1000
1024
  };
1001
- s(_);
1025
+ s(x);
1002
1026
  },
1003
1027
  value: e[n.field] || "",
1004
1028
  label: n.label,
@@ -1006,16 +1030,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1006
1030
  }
1007
1031
  );
1008
1032
  if (n.type === "inputSwitch")
1009
- return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
1033
+ return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
1010
1034
  /* @__PURE__ */ t.jsx(
1011
1035
  W,
1012
1036
  {
1013
1037
  onChange: (r) => {
1014
- const _ = {
1038
+ const x = {
1015
1039
  ...e,
1016
1040
  [n.field.text]: r
1017
1041
  };
1018
- s(_);
1042
+ s(x);
1019
1043
  },
1020
1044
  value: e[n.field.text] || "",
1021
1045
  label: n.inputLabel,
@@ -1028,11 +1052,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1028
1052
  current: !!e[n.field.switch] || !1,
1029
1053
  label: n.switchLabel,
1030
1054
  onChange: (r) => {
1031
- const _ = {
1055
+ const x = {
1032
1056
  ...e,
1033
1057
  [n.field.switch]: r
1034
1058
  };
1035
- s(_);
1059
+ s(x);
1036
1060
  }
1037
1061
  }
1038
1062
  )
@@ -1043,11 +1067,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1043
1067
  {
1044
1068
  options: n.itemsOptions,
1045
1069
  onChange: (r) => {
1046
- const _ = {
1070
+ const x = {
1047
1071
  ...e,
1048
1072
  [n.field]: r
1049
1073
  };
1050
- s(_);
1074
+ s(x);
1051
1075
  },
1052
1076
  label: n.label,
1053
1077
  value: e[n.field] || "String",
@@ -1059,91 +1083,91 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1059
1083
  }
1060
1084
  );
1061
1085
  }
1062
- ), ws = (u) => {
1063
- const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
1086
+ ), Cs = (d) => {
1087
+ const { index: o, moveProduct: e, children: s } = d, [, i] = $t({
1064
1088
  accept: "product",
1065
- hover(o) {
1066
- o.index !== a && (e(o.index, a), o.index = a);
1089
+ hover(a) {
1090
+ a.index !== o && (e(a.index, o), a.index = o);
1067
1091
  }
1068
- }), [{ isDragging: c }, l] = wt({
1092
+ }), [{ isDragging: c }, l] = Nt({
1069
1093
  type: "product",
1070
- item: { index: a },
1071
- collect: (o) => ({
1072
- isDragging: o.isDragging()
1094
+ item: { index: o },
1095
+ collect: (a) => ({
1096
+ isDragging: a.isDragging()
1073
1097
  })
1074
1098
  });
1075
1099
  return /* @__PURE__ */ t.jsx(
1076
1100
  "div",
1077
1101
  {
1078
- ref: (o) => l(i(o)),
1079
- className: `${V.product} ${c ? V.dragging : ""}`,
1102
+ ref: (a) => l(i(a)),
1103
+ className: `${z.product} ${c ? z.dragging : ""}`,
1080
1104
  children: s
1081
1105
  }
1082
1106
  );
1083
- }, Ya = (u) => {
1107
+ }, Zo = (d) => {
1084
1108
  const {
1085
- isActiveItems: a,
1109
+ isActiveItems: o,
1086
1110
  setIsActiveItems: e,
1087
1111
  items: s,
1088
1112
  setItems: i,
1089
1113
  other: c,
1090
1114
  title: l,
1091
- subtitle: o,
1115
+ subtitle: a,
1092
1116
  editable: n = !0,
1093
1117
  draggable: r = !1,
1094
- withImage: _ = !1,
1095
- deletable: d = !0,
1096
- addable: P = !0,
1097
- itemsType: x,
1118
+ withImage: x = !1,
1119
+ deletable: $ = !0,
1120
+ addable: p = !0,
1121
+ itemsType: h,
1098
1122
  itemsPlaceholder: f = "",
1099
- itemsOptions: h,
1100
- hasRangeSelector: q = !1,
1101
- rangeSelectorOptions: A,
1102
- modalOptions: v,
1123
+ itemsOptions: m,
1124
+ hasRangeSelector: C = !1,
1125
+ rangeSelectorOptions: q,
1126
+ modalOptions: j,
1103
1127
  addableOptions: E = {}
1104
- } = u, [I, C] = g.useState(null), [M, m] = g.useState({
1128
+ } = d, [S, T] = g.useState(null), [M, u] = g.useState({
1105
1129
  top: 0,
1106
1130
  left: 0
1107
- }), [O, k] = g.useState(null), y = g.useRef(null), [L, w] = g.useState(!1), R = (j, T) => {
1108
- const p = [...s], [B] = p.splice(j, 1);
1109
- p.splice(T, 0, B), i(p);
1131
+ }), [O, k] = g.useState(null), y = g.useRef(null), [L, I] = g.useState(!1), R = (v, A) => {
1132
+ const _ = [...s], [P] = _.splice(v, 1);
1133
+ _.splice(A, 0, P), i(_);
1110
1134
  };
1111
1135
  g.useEffect(() => {
1112
- const j = () => {
1113
- C(null), w(!1);
1136
+ const v = () => {
1137
+ T(null), I(!1);
1114
1138
  };
1115
- return document.body.addEventListener("click", j), C(null), w(!1), () => {
1116
- C(null), w(!1), document.body.removeEventListener("click", j);
1139
+ return document.body.addEventListener("click", v), T(null), I(!1), () => {
1140
+ T(null), I(!1), document.body.removeEventListener("click", v);
1117
1141
  };
1118
1142
  }, []), g.useEffect(() => {
1119
- if (I) {
1120
- const j = [...s].map((T) => T.id === I.id ? I : T);
1121
- i(j);
1143
+ if (S) {
1144
+ const v = [...s].map((A) => A.id === S.id ? S : A);
1145
+ i(v);
1122
1146
  }
1123
- }, [I]), g.useEffect(() => {
1147
+ }, [S]), g.useEffect(() => {
1124
1148
  if (y.current && O) {
1125
- const j = y.current.getBoundingClientRect().height, T = window.innerHeight;
1126
- let p = O.top;
1127
- p + j > T + window.scrollY - 200 && (p = T + window.scrollY - j - 200), p < 0 && (p = 10), m({
1128
- top: p,
1149
+ const v = y.current.getBoundingClientRect().height, A = window.innerHeight;
1150
+ let _ = O.top;
1151
+ _ + v > A + window.scrollY - 200 && (_ = A + window.scrollY - v - 200), _ < 0 && (_ = 10), u({
1152
+ top: _,
1129
1153
  left: O.left
1130
1154
  });
1131
1155
  }
1132
1156
  }, [y.current, O]);
1133
- const U = (j, T) => {
1134
- j.stopPropagation();
1135
- const p = j.target.getBoundingClientRect();
1157
+ const Y = (v, A) => {
1158
+ v.stopPropagation();
1159
+ const _ = v.target.getBoundingClientRect();
1136
1160
  k({
1137
- top: p.top + window.scrollY,
1138
- left: p.left - 30
1139
- }), C(T), w(!0);
1161
+ top: _.top + window.scrollY,
1162
+ left: _.left - 30
1163
+ }), T(A), I(!0);
1140
1164
  };
1141
- function tt(j) {
1142
- if (_)
1143
- return j ? /* @__PURE__ */ t.jsx(
1165
+ function tt(v) {
1166
+ if (x)
1167
+ return v ? /* @__PURE__ */ t.jsx(
1144
1168
  "img",
1145
1169
  {
1146
- src: `https://imagedelivery.net/${j[0]}/w=1000`,
1170
+ src: `https://imagedelivery.net/${v[0]}/w=1000`,
1147
1171
  alt: "image",
1148
1172
  width: 16,
1149
1173
  height: 16
@@ -1158,9 +1182,9 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1158
1182
  }
1159
1183
  );
1160
1184
  }
1161
- const at = (j, T) => {
1162
- var B;
1163
- const p = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1185
+ const at = (v, A) => {
1186
+ var P;
1187
+ const _ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1164
1188
  r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1165
1189
  b,
1166
1190
  {
@@ -1170,63 +1194,63 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1170
1194
  height: 20
1171
1195
  }
1172
1196
  ) }),
1173
- x === "select" && /* @__PURE__ */ t.jsx(
1197
+ h === "select" && /* @__PURE__ */ t.jsx(
1174
1198
  Z,
1175
1199
  {
1176
- onChange: ($) => {
1177
- const D = [...s].map((Y) => Y.id === j.id ? {
1178
- ...j,
1179
- name: $
1180
- } : Y);
1181
- C({
1182
- ...j,
1183
- name: $
1200
+ onChange: (N) => {
1201
+ const D = [...s].map((G) => G.id === v.id ? {
1202
+ ...v,
1203
+ name: N
1204
+ } : G);
1205
+ T({
1206
+ ...v,
1207
+ name: N
1184
1208
  }), i([...D]);
1185
1209
  },
1186
- value: j.name,
1187
- options: h.filter(($) => !s.find((X) => X.name === $)),
1188
- leftAddon: tt(j.images)
1210
+ value: v.name,
1211
+ options: m.filter((N) => !s.find((X) => X.name === N)),
1212
+ leftAddon: tt(v.images)
1189
1213
  }
1190
1214
  ),
1191
- x === "input" && /* @__PURE__ */ t.jsx(
1215
+ h === "input" && /* @__PURE__ */ t.jsx(
1192
1216
  W,
1193
1217
  {
1194
- onChange: ($) => {
1195
- const D = [...s].map((Y) => Y.id === j.id ? {
1196
- ...j,
1197
- name: $
1198
- } : Y);
1218
+ onChange: (N) => {
1219
+ const D = [...s].map((G) => G.id === v.id ? {
1220
+ ...v,
1221
+ name: N
1222
+ } : G);
1199
1223
  i([...D]);
1200
1224
  },
1201
- value: j.name,
1225
+ value: v.name,
1202
1226
  placeholder: f
1203
1227
  }
1204
1228
  ),
1205
- x === "image" && /* @__PURE__ */ t.jsx(
1206
- ht,
1229
+ h === "image" && /* @__PURE__ */ t.jsx(
1230
+ _t,
1207
1231
  {
1208
- onChange: ($) => {
1209
- const D = [...s].map((Y) => Y.id === j.id ? {
1210
- ...j,
1211
- images: $
1212
- } : Y);
1232
+ onChange: (N) => {
1233
+ const D = [...s].map((G) => G.id === v.id ? {
1234
+ ...v,
1235
+ images: N
1236
+ } : G);
1213
1237
  i([...D]);
1214
1238
  },
1215
- activeImage: (B = s.find(($) => $.id === j.id)) == null ? void 0 : B.images[0]
1239
+ activeImage: (P = s.find((N) => N.id === v.id)) == null ? void 0 : P.images[0]
1216
1240
  }
1217
1241
  ),
1218
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
1219
- n && /* @__PURE__ */ t.jsx(
1242
+ /* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
1243
+ n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
1220
1244
  b,
1221
1245
  {
1222
1246
  name: "Sliders",
1223
1247
  hoverable: !0,
1224
1248
  width: 20,
1225
1249
  height: 20,
1226
- onClick: ($) => U($, j)
1250
+ onClick: (N) => Y(N, v)
1227
1251
  }
1228
- ),
1229
- d && /* @__PURE__ */ t.jsx(
1252
+ ) }),
1253
+ $ && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
1230
1254
  b,
1231
1255
  {
1232
1256
  name: "Trash",
@@ -1234,155 +1258,165 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1234
1258
  width: 20,
1235
1259
  height: 20,
1236
1260
  fill: "#C12A2A",
1237
- onClick: () => i(s.filter(($) => $.id !== j.id))
1261
+ onClick: () => i(s.filter((N) => N.id !== v.id))
1238
1262
  }
1239
- )
1263
+ ) })
1240
1264
  ] })
1241
1265
  ] });
1242
1266
  return r ? /* @__PURE__ */ t.jsx(
1243
- ws,
1267
+ Cs,
1244
1268
  {
1245
- product: j,
1246
- index: T,
1269
+ product: v,
1270
+ index: A,
1247
1271
  moveProduct: R,
1248
- children: p
1272
+ children: _
1249
1273
  },
1250
- j.id
1274
+ v.id
1251
1275
  ) : /* @__PURE__ */ t.jsx(
1252
1276
  "div",
1253
1277
  {
1254
- className: V.product,
1255
- children: p
1278
+ className: z.product,
1279
+ children: _
1256
1280
  },
1257
- j.id
1281
+ v.id
1258
1282
  );
1259
1283
  };
1260
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
1261
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1262
- l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
1263
- a !== void 0 && /* @__PURE__ */ t.jsx(
1284
+ return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
1285
+ (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
1286
+ l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
1287
+ o !== void 0 && /* @__PURE__ */ t.jsx(
1264
1288
  K,
1265
1289
  {
1266
- current: a,
1267
- onChange: (j) => e == null ? void 0 : e(j)
1290
+ current: o,
1291
+ onChange: (v) => e == null ? void 0 : e(v)
1268
1292
  }
1269
1293
  )
1270
1294
  ] }),
1271
- I && n && v && L && /* @__PURE__ */ t.jsx(
1272
- $s,
1295
+ S && n && j && L && /* @__PURE__ */ t.jsx(
1296
+ ws,
1273
1297
  {
1274
1298
  ref: y,
1275
- activeItem: I,
1276
- setActiveItem: C,
1299
+ activeItem: S,
1300
+ setActiveItem: T,
1277
1301
  popupPosition: M,
1278
- modalOptions: v,
1279
- setIsOpenModal: w
1302
+ modalOptions: j,
1303
+ setIsOpenModal: I
1280
1304
  }
1281
1305
  ),
1282
- q && A && /* @__PURE__ */ t.jsx(It, { ...A }),
1283
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
1284
- o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
1285
- r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((j, T) => at(j, T)) }) : s.map((j, T) => at(j, T)),
1286
- P && /* @__PURE__ */ t.jsx("div", { className: V.addButton, children: /* @__PURE__ */ t.jsxs(
1287
- it,
1306
+ C && q && /* @__PURE__ */ t.jsx(wt, { ...q }),
1307
+ /* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
1308
+ a && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: a }),
1309
+ r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((v, A) => at(v, A)) }) : s.map((v, A) => at(v, A)),
1310
+ p && /* @__PURE__ */ t.jsx(
1311
+ "div",
1288
1312
  {
1289
- withoutHover: !0,
1290
- className: V.button,
1291
- size: "s",
1292
- onClick: () => {
1293
- const j = [...s];
1294
- let T = null;
1295
- if (h) {
1296
- for (let p = 0; p < h.length; p++)
1297
- if (!s.find((B) => B.name === h[p])) {
1298
- T = h[p];
1299
- break;
1300
- }
1301
- }
1302
- x === "select" ? j.push({
1303
- name: T || h[0],
1304
- id: dt(),
1305
- ...E
1306
- }) : x === "input" ? j.push({
1307
- name: "",
1308
- id: dt(),
1309
- ...E
1310
- }) : j.push({
1311
- name: `Image ${s.length + 1}`,
1312
- id: dt(),
1313
- ...E
1314
- }), i(j);
1315
- },
1316
1313
  style: {
1317
- width: "fit-content"
1314
+ width: "100%",
1315
+ display: "flex",
1316
+ justifyContent: "center"
1318
1317
  },
1319
- children: [
1320
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1321
- /* @__PURE__ */ t.jsx(
1322
- b,
1323
- {
1324
- name: "Plus",
1325
- width: 16,
1326
- height: 16
1327
- }
1328
- )
1329
- ]
1318
+ children: /* @__PURE__ */ t.jsx(
1319
+ ot,
1320
+ {
1321
+ withoutHover: !0,
1322
+ className: z.button,
1323
+ size: "s",
1324
+ onClick: () => {
1325
+ const v = [...s];
1326
+ let A = null;
1327
+ if (m) {
1328
+ for (let _ = 0; _ < m.length; _++)
1329
+ if (!s.find((P) => P.name === m[_])) {
1330
+ A = m[_];
1331
+ break;
1332
+ }
1333
+ }
1334
+ h === "select" ? v.push({
1335
+ name: A || m[0],
1336
+ id: dt(),
1337
+ ...E
1338
+ }) : h === "input" ? v.push({
1339
+ name: "",
1340
+ id: dt(),
1341
+ ...E
1342
+ }) : v.push({
1343
+ name: `Image ${s.length + 1}`,
1344
+ id: dt(),
1345
+ ...E
1346
+ }), i(v);
1347
+ },
1348
+ style: {
1349
+ width: "fit-content"
1350
+ },
1351
+ children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
1352
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1353
+ /* @__PURE__ */ t.jsx(
1354
+ b,
1355
+ {
1356
+ name: "Plus",
1357
+ width: 16,
1358
+ height: 16
1359
+ }
1360
+ )
1361
+ ] })
1362
+ }
1363
+ )
1330
1364
  }
1331
- ) })
1365
+ )
1332
1366
  ] }),
1333
1367
  c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
1334
1368
  ] });
1335
- }, Ns = "_title_oravb_1", Is = "_subtitle_oravb_5", Cs = "_header_oravb_12", Bs = "_text_oravb_13", Ss = "_productsBlock_oravb_14", Ps = "_buttonsBlock_oravb_15", Ts = "_top_oravb_26", qs = "_itemsBlock_oravb_35", As = "_typeTexts_oravb_41", Os = "_block_oravb_48", Ds = "_active_oravb_60", Es = "_products_oravb_14", Ls = "_product_oravb_14", Rs = "_button_oravb_15", Ms = "_image_oravb_90", Hs = "_info_oravb_97", zs = "_name_oravb_109", Vs = "_buttons_oravb_15", Fs = "_modal_oravb_120", Us = "_other_oravb_139", Ys = "_options_oravb_145", ct = {
1336
- title: Ns,
1337
- subtitle: Is,
1338
- header: Cs,
1339
- text: Bs,
1340
- productsBlock: Ss,
1341
- buttonsBlock: Ps,
1342
- top: Ts,
1343
- itemsBlock: qs,
1344
- typeTexts: As,
1345
- block: Os,
1346
- active: Ds,
1347
- products: Es,
1348
- product: Ls,
1349
- button: Rs,
1350
- image: Ms,
1351
- info: Hs,
1352
- name: zs,
1353
- buttons: Vs,
1354
- modal: Fs,
1355
- other: Us,
1356
- options: Ys
1357
- }, Gs = g.forwardRef((u, a) => {
1358
- const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = g.useState(e.typesText), [o, n] = g.useState(e.destination), [r, _] = g.useState(e.page), [d, P] = g.useState(e.link || ""), [x, f] = g.useState(e.text || ""), [h, q] = g.useState(e.openInNewTab), { pages: A } = Ot();
1369
+ }, Bs = "_title_174ru_1", Ss = "_subtitle_174ru_5", Ts = "_header_174ru_12", Ps = "_text_174ru_13", As = "_productsBlock_174ru_14", qs = "_buttonsBlock_174ru_15", Os = "_top_174ru_26", Ds = "_itemsBlock_174ru_35", Es = "_typeTexts_174ru_41", Ls = "_block_174ru_48", Rs = "_active_174ru_60", Ms = "_products_174ru_14", Hs = "_product_174ru_14", zs = "_button_174ru_15", Vs = "_image_174ru_90", Fs = "_info_174ru_97", Us = "_name_174ru_109", Ys = "_buttons_174ru_15", Gs = "_modal_174ru_120", Ws = "_other_174ru_139", Xs = "_options_174ru_145", lt = {
1370
+ title: Bs,
1371
+ subtitle: Ss,
1372
+ header: Ts,
1373
+ text: Ps,
1374
+ productsBlock: As,
1375
+ buttonsBlock: qs,
1376
+ top: Os,
1377
+ itemsBlock: Ds,
1378
+ typeTexts: Es,
1379
+ block: Ls,
1380
+ active: Rs,
1381
+ products: Ms,
1382
+ product: Hs,
1383
+ button: zs,
1384
+ image: Vs,
1385
+ info: Fs,
1386
+ name: Us,
1387
+ buttons: Ys,
1388
+ modal: Gs,
1389
+ other: Ws,
1390
+ options: Xs
1391
+ }, Js = g.forwardRef((d, o) => {
1392
+ const { activeButton: e, setActiveButton: s, popupPosition: i } = d, [c, l] = g.useState(e.typesText), [a, n] = g.useState(e.destination), [r, x] = g.useState(e.page), [$, p] = g.useState(e.link || ""), [h, f] = g.useState(e.text || ""), [m, C] = g.useState(e.openInNewTab), { pages: q } = Ot();
1359
1393
  return g.useEffect(() => {
1360
1394
  s({
1361
1395
  ...e,
1362
1396
  ...{
1363
- text: x,
1364
- link: d,
1365
- destination: o,
1397
+ text: h,
1398
+ link: $,
1399
+ destination: a,
1366
1400
  typesText: c,
1367
1401
  page: r,
1368
- openInNewTab: h
1402
+ openInNewTab: m
1369
1403
  }
1370
1404
  });
1371
- }, [c, o, d, x, r, h]), /* @__PURE__ */ t.jsxs(
1405
+ }, [c, a, $, h, r, m]), /* @__PURE__ */ t.jsxs(
1372
1406
  "div",
1373
1407
  {
1374
- className: ct.modal,
1375
- onClick: (v) => {
1376
- v.stopPropagation();
1408
+ className: lt.modal,
1409
+ onClick: (j) => {
1410
+ j.stopPropagation();
1377
1411
  },
1378
1412
  style: {
1379
1413
  top: `${i.top}px`,
1380
1414
  left: `${i.left}px`
1381
1415
  },
1382
- ref: a,
1416
+ ref: o,
1383
1417
  children: [
1384
- /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1385
- /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
1418
+ /* @__PURE__ */ t.jsxs("div", { className: lt.top, children: [
1419
+ /* @__PURE__ */ t.jsx("h3", { className: lt.title, children: e.type }),
1386
1420
  /* @__PURE__ */ t.jsx(
1387
1421
  b,
1388
1422
  {
@@ -1394,29 +1428,29 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1394
1428
  }
1395
1429
  )
1396
1430
  ] }),
1397
- /* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
1431
+ /* @__PURE__ */ t.jsxs("div", { className: lt.options, children: [
1398
1432
  /* @__PURE__ */ t.jsx(
1399
1433
  Z,
1400
1434
  {
1401
1435
  label: "Destination",
1402
- onChange: (v) => n(v),
1403
- options: ["Go to Page", "Open Link"].filter((v) => v !== o),
1404
- value: o
1436
+ onChange: (j) => n(j),
1437
+ options: ["Go to Page", "Open Link"].filter((j) => j !== a),
1438
+ value: a
1405
1439
  }
1406
1440
  ),
1407
- o === "Go to Page" ? /* @__PURE__ */ t.jsx(
1441
+ a === "Go to Page" ? /* @__PURE__ */ t.jsx(
1408
1442
  Z,
1409
1443
  {
1410
1444
  label: "Go to",
1411
- onChange: (v) => _(v),
1412
- options: A ? Object.values(A).filter((v) => v.name !== r).map((v) => v.name) : [],
1445
+ onChange: (j) => x(j),
1446
+ options: q ? Object.values(q).filter((j) => j.name !== r).map((j) => j.name) : [],
1413
1447
  value: r
1414
1448
  }
1415
1449
  ) : /* @__PURE__ */ t.jsx(
1416
1450
  W,
1417
1451
  {
1418
- onChange: (v) => P(v),
1419
- value: d,
1452
+ onChange: (j) => p(j),
1453
+ value: $,
1420
1454
  placeholder: "https://",
1421
1455
  label: "Link"
1422
1456
  }
@@ -1426,20 +1460,20 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1426
1460
  {
1427
1461
  current: e.openInNewTab,
1428
1462
  label: "Open in new tab",
1429
- onChange: (v) => q(v)
1463
+ onChange: (j) => C(j)
1430
1464
  }
1431
1465
  ),
1432
1466
  /* @__PURE__ */ t.jsx(
1433
1467
  Ct,
1434
1468
  {
1435
- onChange: (v) => f(v),
1436
- value: x,
1469
+ onChange: (j) => f(j),
1470
+ value: h,
1437
1471
  label: "Text",
1438
1472
  maxLength: 150
1439
1473
  }
1440
1474
  ),
1441
1475
  /* @__PURE__ */ t.jsx(
1442
- Tt,
1476
+ Pt,
1443
1477
  {
1444
1478
  typesText: c,
1445
1479
  setTypesText: l
@@ -1449,86 +1483,87 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1449
1483
  ]
1450
1484
  }
1451
1485
  );
1452
- }), Ws = "_subtitle_w0d5g_1", Xs = "_header_w0d5g_8", Js = "_text_w0d5g_9", Qs = "_productsBlock_w0d5g_10", Ks = "_buttonsBlock_w0d5g_11", Zs = "_top_w0d5g_23", tn = "_itemsBlock_w0d5g_32", en = "_typeTexts_w0d5g_38", sn = "_block_w0d5g_45", nn = "_active_w0d5g_58", an = "_products_w0d5g_10", on = "_product_w0d5g_10", cn = "_button_w0d5g_11", ln = "_image_w0d5g_88", rn = "_info_w0d5g_95", dn = "_name_w0d5g_107", un = "_buttons_w0d5g_11", mn = "_modal_w0d5g_118", _n = "_other_w0d5g_138", hn = "_options_w0d5g_144", pn = "_addButton_w0d5g_150", rt = {
1453
- subtitle: Ws,
1454
- header: Xs,
1455
- text: Js,
1456
- productsBlock: Qs,
1457
- buttonsBlock: Ks,
1458
- top: Zs,
1459
- itemsBlock: tn,
1460
- typeTexts: en,
1461
- block: sn,
1462
- active: nn,
1463
- products: an,
1464
- product: on,
1465
- button: cn,
1466
- image: ln,
1467
- info: rn,
1468
- name: dn,
1469
- buttons: un,
1470
- modal: mn,
1471
- other: _n,
1472
- options: hn,
1473
- addButton: pn
1474
- }, gn = (u) => {
1475
- const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0 } = u, [c, l] = g.useState(null), [o, n] = g.useState({
1486
+ }), Qs = "_subtitle_jql1y_1", Ks = "_header_jql1y_8", Zs = "_text_jql1y_9", tn = "_productsBlock_jql1y_10", en = "_buttonsBlock_jql1y_11", sn = "_top_jql1y_23", nn = "_itemsBlock_jql1y_32", on = "_typeTexts_jql1y_38", an = "_block_jql1y_45", cn = "_active_jql1y_58", ln = "_products_jql1y_10", rn = "_product_jql1y_10", dn = "_button_jql1y_11", un = "_image_jql1y_88", mn = "_info_jql1y_95", hn = "_name_jql1y_107", _n = "_buttons_jql1y_11", pn = "_modal_jql1y_118", gn = "_other_jql1y_138", fn = "_options_jql1y_144", xn = "_addButton_jql1y_150", bn = "_deleteButton_jql1y_165", et = {
1487
+ subtitle: Qs,
1488
+ header: Ks,
1489
+ text: Zs,
1490
+ productsBlock: tn,
1491
+ buttonsBlock: en,
1492
+ top: sn,
1493
+ itemsBlock: nn,
1494
+ typeTexts: on,
1495
+ block: an,
1496
+ active: cn,
1497
+ products: ln,
1498
+ product: rn,
1499
+ button: dn,
1500
+ image: un,
1501
+ info: mn,
1502
+ name: hn,
1503
+ buttons: _n,
1504
+ modal: pn,
1505
+ other: gn,
1506
+ options: fn,
1507
+ addButton: xn,
1508
+ deleteButton: bn
1509
+ }, jn = (d) => {
1510
+ const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = d, [c, l] = g.useState(null), [a, n] = g.useState({
1476
1511
  top: 0,
1477
1512
  left: 0
1478
- }), [r, _] = g.useState(null), d = g.useRef(null);
1513
+ }), [r, x] = g.useState(null), $ = g.useRef(null);
1479
1514
  g.useEffect(() => {
1480
- const x = () => {
1515
+ const h = () => {
1481
1516
  l(null);
1482
1517
  };
1483
- return document.body.addEventListener("click", x), l(null), () => {
1484
- l(null), document.body.removeEventListener("click", x);
1518
+ return document.body.addEventListener("click", h), l(null), () => {
1519
+ l(null), document.body.removeEventListener("click", h);
1485
1520
  };
1486
1521
  }, []), g.useEffect(() => {
1487
1522
  if (c) {
1488
- const x = [...a].map((f) => f.id === c.id ? c : f);
1489
- e(x);
1523
+ const h = [...o].map((f) => f.id === c.id ? c : f);
1524
+ e(h);
1490
1525
  }
1491
1526
  }, [c]), g.useEffect(() => {
1492
- if (d.current && r) {
1493
- const x = d.current.getBoundingClientRect().height, f = window.innerHeight;
1494
- let h = r.top;
1495
- h + x > f + window.scrollY - 200 && (h = f + window.scrollY - x - 200), h < 0 && (h = 10), n({
1496
- top: h,
1527
+ if ($.current && r) {
1528
+ const h = $.current.getBoundingClientRect().height, f = window.innerHeight;
1529
+ let m = r.top;
1530
+ m + h > f + window.scrollY - 200 && (m = f + window.scrollY - h - 200), m < 0 && (m = 10), n({
1531
+ top: m,
1497
1532
  left: r.left
1498
1533
  });
1499
1534
  }
1500
- }, [d.current, r]);
1501
- const P = (x, f) => {
1502
- x.stopPropagation();
1503
- const h = x.target.getBoundingClientRect();
1504
- _({
1505
- top: h.top + window.scrollY,
1506
- left: h.left - 30
1535
+ }, [$.current, r]);
1536
+ const p = (h, f) => {
1537
+ h.stopPropagation();
1538
+ const m = h.target.getBoundingClientRect();
1539
+ x({
1540
+ top: m.top + window.scrollY,
1541
+ left: m.left - 30
1507
1542
  }), l(f);
1508
1543
  };
1509
- return /* @__PURE__ */ t.jsxs("div", { className: rt.products, children: [
1510
- /* @__PURE__ */ t.jsx("h5", { className: rt.subtitle, children: "Button Type" }),
1511
- a.map((x) => /* @__PURE__ */ t.jsxs(
1544
+ return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
1545
+ /* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
1546
+ o.map((h) => /* @__PURE__ */ t.jsxs(
1512
1547
  "div",
1513
1548
  {
1514
- className: rt.product,
1549
+ className: et.product,
1515
1550
  children: [
1516
1551
  /* @__PURE__ */ t.jsx(
1517
1552
  Z,
1518
1553
  {
1519
1554
  onChange: (f) => {
1520
- const q = [...a].map((A) => A.id === x.id ? {
1521
- ...x,
1555
+ const C = [...o].map((q) => q.id === h.id ? {
1556
+ ...h,
1522
1557
  type: f
1523
- } : A);
1524
- e(q);
1558
+ } : q);
1559
+ e(C);
1525
1560
  },
1526
- value: x.type,
1561
+ value: h.type,
1527
1562
  options: ["Primary", "Secondary", "Tertiary"]
1528
1563
  }
1529
1564
  ),
1530
- /* @__PURE__ */ t.jsxs("div", { className: rt.buttons, children: [
1531
- /* @__PURE__ */ t.jsx(
1565
+ /* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
1566
+ /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1532
1567
  b,
1533
1568
  {
1534
1569
  name: "Sliders",
@@ -1536,144 +1571,154 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1536
1571
  width: 20,
1537
1572
  height: 20,
1538
1573
  onClick: (f) => {
1539
- P(f, x);
1574
+ p(f, h);
1540
1575
  }
1541
1576
  }
1542
- ),
1543
- s && /* @__PURE__ */ t.jsx(
1577
+ ) }),
1578
+ s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1544
1579
  b,
1545
1580
  {
1546
1581
  name: "Trash",
1547
1582
  hoverable: !0,
1548
1583
  onClick: () => {
1549
- const f = a.filter((h) => h.id !== x.id);
1584
+ const f = o.filter((m) => m.id !== h.id);
1550
1585
  e(f);
1551
1586
  },
1552
1587
  width: 20,
1553
1588
  height: 20,
1554
1589
  fill: "#C12A2A"
1555
1590
  }
1556
- )
1591
+ ) })
1557
1592
  ] })
1558
1593
  ]
1559
1594
  },
1560
- x.id
1595
+ h.id
1561
1596
  )),
1562
1597
  c && /* @__PURE__ */ t.jsx(
1563
- Gs,
1598
+ Js,
1564
1599
  {
1565
- ref: d,
1600
+ ref: $,
1566
1601
  activeButton: c,
1567
1602
  setActiveButton: l,
1568
- popupPosition: o
1603
+ popupPosition: a
1569
1604
  }
1570
1605
  ),
1571
- i && /* @__PURE__ */ t.jsx("div", { className: rt.addButton, children: /* @__PURE__ */ t.jsxs(
1572
- it,
1606
+ i && /* @__PURE__ */ t.jsx(
1607
+ "div",
1573
1608
  {
1574
- withoutHover: !0,
1575
- className: rt.button,
1576
- size: "s",
1577
- onClick: () => {
1578
- const x = [...a];
1579
- x.push({
1580
- type: "Primary",
1581
- id: dt(),
1582
- typesText: [],
1583
- destination: "Go to Page",
1584
- text: "Button Name",
1585
- page: "home",
1586
- openInNewTab: !0
1587
- }), e(x);
1588
- },
1589
1609
  style: {
1590
- width: "fit-content"
1610
+ width: "100%",
1611
+ display: "flex",
1612
+ justifyContent: "center"
1591
1613
  },
1592
- children: [
1593
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1594
- /* @__PURE__ */ t.jsx(
1595
- b,
1596
- {
1597
- name: "Plus",
1598
- width: 16,
1599
- height: 16
1600
- }
1601
- )
1602
- ]
1614
+ children: /* @__PURE__ */ t.jsx(
1615
+ ot,
1616
+ {
1617
+ withoutHover: !0,
1618
+ className: et.button,
1619
+ size: "s",
1620
+ onClick: () => {
1621
+ const h = [...o];
1622
+ h.push({
1623
+ type: "Primary",
1624
+ id: dt(),
1625
+ typesText: [],
1626
+ destination: "Go to Page",
1627
+ text: "Button Name",
1628
+ page: "home",
1629
+ openInNewTab: !0
1630
+ }), e(h);
1631
+ },
1632
+ style: {
1633
+ width: "fit-content"
1634
+ },
1635
+ children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
1636
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1637
+ /* @__PURE__ */ t.jsx(
1638
+ b,
1639
+ {
1640
+ name: "Plus",
1641
+ width: 16,
1642
+ height: 16
1643
+ }
1644
+ )
1645
+ ] })
1646
+ }
1647
+ )
1603
1648
  }
1604
- ) })
1649
+ )
1605
1650
  ] });
1606
- }, Ga = (u) => {
1607
- const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i } = u;
1608
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
1609
- /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1610
- /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
1651
+ }, ta = (d) => {
1652
+ const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = d;
1653
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: lt.buttonsBlock, children: [
1654
+ /* @__PURE__ */ t.jsxs("div", { className: lt.top, children: [
1655
+ /* @__PURE__ */ t.jsx("h3", { className: lt.title, children: "Buttons" }),
1611
1656
  /* @__PURE__ */ t.jsx(
1612
1657
  K,
1613
1658
  {
1614
- current: a,
1659
+ current: o,
1615
1660
  onChange: (c) => e(c)
1616
1661
  }
1617
1662
  )
1618
1663
  ] }),
1619
1664
  /* @__PURE__ */ t.jsx(
1620
- gn,
1665
+ jn,
1621
1666
  {
1622
1667
  buttons: s,
1623
1668
  setButtons: i
1624
1669
  }
1625
1670
  )
1626
1671
  ] }) });
1627
- }, fn = "_wrapper_m18qi_1", xn = "_subtitle_m18qi_7", bn = "_content_m18qi_14", vn = "_range_m18qi_22", jn = "_track_m18qi_27", yn = "_progress_m18qi_36", kn = "_dots_m18qi_46", $n = "_dot_m18qi_46", wn = "_active_m18qi_65", Nn = "_input_m18qi_77", In = "_countBlock_m18qi_91", Cn = "_count_m18qi_91", Bn = "_controls_m18qi_107", Sn = "_button_m18qi_113", z = {
1628
- wrapper: fn,
1629
- subtitle: xn,
1630
- content: bn,
1631
- range: vn,
1632
- track: jn,
1633
- progress: yn,
1634
- dots: kn,
1635
- dot: $n,
1636
- active: wn,
1637
- input: Nn,
1638
- countBlock: In,
1639
- count: Cn,
1640
- controls: Bn,
1641
- button: Sn
1642
- }, It = (u) => {
1643
- const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = g.useState(!1), r = Array.from({ length: (s - e) / i + 1 }), _ = (c - e) / (s - e) * 100, d = () => {
1672
+ }, vn = "_wrapper_m18qi_1", yn = "_subtitle_m18qi_7", kn = "_content_m18qi_14", $n = "_range_m18qi_22", Nn = "_track_m18qi_27", In = "_progress_m18qi_36", wn = "_dots_m18qi_46", Cn = "_dot_m18qi_46", Bn = "_active_m18qi_65", Sn = "_input_m18qi_77", Tn = "_countBlock_m18qi_91", Pn = "_count_m18qi_91", An = "_controls_m18qi_107", qn = "_button_m18qi_113", F = {
1673
+ wrapper: vn,
1674
+ subtitle: yn,
1675
+ content: kn,
1676
+ range: $n,
1677
+ track: Nn,
1678
+ progress: In,
1679
+ dots: wn,
1680
+ dot: Cn,
1681
+ active: Bn,
1682
+ input: Sn,
1683
+ countBlock: Tn,
1684
+ count: Pn,
1685
+ controls: An,
1686
+ button: qn
1687
+ }, wt = (d) => {
1688
+ const { label: o, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = d, [a, n] = g.useState(!1), r = Array.from({ length: (s - e) / i + 1 }), x = (c - e) / (s - e) * 100, $ = () => {
1644
1689
  c < s && l(c + i);
1645
- }, P = () => {
1690
+ }, p = () => {
1646
1691
  c > e && l(c - i);
1647
- }, x = (f) => {
1648
- const h = e + f * i;
1649
- l(h);
1692
+ }, h = (f) => {
1693
+ const m = e + f * i;
1694
+ l(m);
1650
1695
  };
1651
- return /* @__PURE__ */ t.jsxs("div", { className: z.wrapper, children: [
1652
- a && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: a }),
1653
- /* @__PURE__ */ t.jsxs("div", { className: z.content, children: [
1654
- /* @__PURE__ */ t.jsxs("div", { className: z.range, children: [
1655
- /* @__PURE__ */ t.jsx("div", { className: z.track }),
1696
+ return /* @__PURE__ */ t.jsxs("div", { className: F.wrapper, children: [
1697
+ o && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: o }),
1698
+ /* @__PURE__ */ t.jsxs("div", { className: F.content, children: [
1699
+ /* @__PURE__ */ t.jsxs("div", { className: F.range, children: [
1700
+ /* @__PURE__ */ t.jsx("div", { className: F.track }),
1656
1701
  /* @__PURE__ */ t.jsx(
1657
1702
  "div",
1658
1703
  {
1659
- className: z.progress,
1660
- style: { width: `${_}%` }
1704
+ className: F.progress,
1705
+ style: { width: `${x}%` }
1661
1706
  }
1662
1707
  ),
1663
- /* @__PURE__ */ t.jsx("div", { className: z.dots, children: r.map((f, h) => {
1664
- const q = h <= (c - e) / i;
1708
+ /* @__PURE__ */ t.jsx("div", { className: F.dots, children: r.map((f, m) => {
1709
+ const C = m <= (c - e) / i;
1665
1710
  return /* @__PURE__ */ t.jsx(
1666
1711
  "button",
1667
1712
  {
1668
- onClick: () => x(h),
1669
- className: F(z.dot, {
1670
- [z.active]: q,
1671
- [z.inactive]: !q,
1672
- [z.dragging]: o
1713
+ onClick: () => h(m),
1714
+ className: V(F.dot, {
1715
+ [F.active]: C,
1716
+ [F.inactive]: !C,
1717
+ [F.dragging]: a
1673
1718
  }),
1674
- "aria-label": `Set value to ${e + h * i}`
1719
+ "aria-label": `Set value to ${e + m * i}`
1675
1720
  },
1676
- h
1721
+ m
1677
1722
  );
1678
1723
  }) }),
1679
1724
  /* @__PURE__ */ t.jsx(
@@ -1689,11 +1734,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1689
1734
  onMouseUp: () => n(!1),
1690
1735
  onTouchStart: () => n(!0),
1691
1736
  onTouchEnd: () => n(!1),
1692
- className: z.input
1737
+ className: F.input
1693
1738
  }
1694
1739
  )
1695
1740
  ] }),
1696
- /* @__PURE__ */ t.jsxs("div", { className: z.countBlock, children: [
1741
+ /* @__PURE__ */ t.jsxs("div", { className: F.countBlock, children: [
1697
1742
  /* @__PURE__ */ t.jsx(
1698
1743
  W,
1699
1744
  {
@@ -1702,19 +1747,19 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1702
1747
  max: s,
1703
1748
  paddingless: !0,
1704
1749
  onChange: (f) => {
1705
- const h = Number(f);
1706
- h > s ? l(s) : h < e ? l(e) : l(h);
1750
+ const m = Number(f);
1751
+ m > s ? l(s) : m < e ? l(e) : l(m);
1707
1752
  },
1708
1753
  value: String(c)
1709
1754
  }
1710
1755
  ),
1711
- /* @__PURE__ */ t.jsxs("div", { className: z.controls, children: [
1756
+ /* @__PURE__ */ t.jsxs("div", { className: F.controls, children: [
1712
1757
  /* @__PURE__ */ t.jsx(
1713
1758
  "button",
1714
1759
  {
1715
- onClick: d,
1760
+ onClick: $,
1716
1761
  disabled: c >= s,
1717
- className: z.button,
1762
+ className: F.button,
1718
1763
  "aria-label": "Increment count",
1719
1764
  children: /* @__PURE__ */ t.jsx(
1720
1765
  b,
@@ -1729,9 +1774,9 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1729
1774
  /* @__PURE__ */ t.jsx(
1730
1775
  "button",
1731
1776
  {
1732
- onClick: P,
1777
+ onClick: p,
1733
1778
  disabled: c <= e,
1734
- className: z.button,
1779
+ className: F.button,
1735
1780
  "aria-label": "Decrement count",
1736
1781
  children: /* @__PURE__ */ t.jsx(
1737
1782
  b,
@@ -1747,38 +1792,39 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1747
1792
  ] })
1748
1793
  ] })
1749
1794
  ] });
1750
- }, Pn = "_title_w64fy_1", Tn = "_subtitle_w64fy_5", qn = "_header_w64fy_12", An = "_text_w64fy_13", On = "_productsBlock_w64fy_14", Dn = "_top_w64fy_26", En = "_itemsBlock_w64fy_35", Ln = "_typeTexts_w64fy_41", Rn = "_block_w64fy_48", Mn = "_active_w64fy_61", Hn = "_products_w64fy_14", zn = "_product_w64fy_14", Vn = "_button_w64fy_80", Fn = "_image_w64fy_91", Un = "_info_w64fy_98", Yn = "_name_w64fy_110", Gn = "_buttons_w64fy_114", Wn = "_modal_w64fy_121", Xn = "_link_w64fy_141", Jn = "_modalOptions_w64fy_147", Qn = "_addButton_w64fy_159", G = {
1751
- title: Pn,
1752
- subtitle: Tn,
1753
- header: qn,
1754
- text: An,
1755
- productsBlock: On,
1756
- top: Dn,
1757
- itemsBlock: En,
1758
- typeTexts: Ln,
1759
- block: Rn,
1760
- active: Mn,
1761
- products: Hn,
1762
- product: zn,
1763
- button: Vn,
1764
- image: Fn,
1765
- info: Un,
1766
- name: Yn,
1767
- buttons: Gn,
1768
- modal: Wn,
1769
- link: Xn,
1770
- modalOptions: Jn,
1771
- addButton: Qn
1772
- }, Kn = (u) => {
1773
- const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((n) => n.id === a.listingId);
1795
+ }, On = "_title_1lejm_1", Dn = "_subtitle_1lejm_5", En = "_header_1lejm_12", Ln = "_text_1lejm_13", Rn = "_productsBlock_1lejm_14", Mn = "_top_1lejm_26", Hn = "_itemsBlock_1lejm_35", zn = "_typeTexts_1lejm_41", Vn = "_block_1lejm_48", Fn = "_active_1lejm_61", Un = "_products_1lejm_14", Yn = "_product_1lejm_14", Gn = "_button_1lejm_80", Wn = "_image_1lejm_91", Xn = "_info_1lejm_98", Jn = "_name_1lejm_110", Qn = "_buttons_1lejm_114", Kn = "_modal_1lejm_121", Zn = "_link_1lejm_141", ti = "_modalOptions_1lejm_147", ei = "_addButton_1lejm_159", si = "_deleteButton_1lejm_174", U = {
1796
+ title: On,
1797
+ subtitle: Dn,
1798
+ header: En,
1799
+ text: Ln,
1800
+ productsBlock: Rn,
1801
+ top: Mn,
1802
+ itemsBlock: Hn,
1803
+ typeTexts: zn,
1804
+ block: Vn,
1805
+ active: Fn,
1806
+ products: Un,
1807
+ product: Yn,
1808
+ button: Gn,
1809
+ image: Wn,
1810
+ info: Xn,
1811
+ name: Jn,
1812
+ buttons: Qn,
1813
+ modal: Kn,
1814
+ link: Zn,
1815
+ modalOptions: ti,
1816
+ addButton: ei,
1817
+ deleteButton: si
1818
+ }, ni = (d) => {
1819
+ const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = d, l = c.find((n) => n.id === o.listingId);
1774
1820
  if (!l) return null;
1775
- function o(n, r) {
1821
+ function a(n, r) {
1776
1822
  return n.length > r ? `${n.slice(0, r)}...` : n;
1777
1823
  }
1778
1824
  return /* @__PURE__ */ t.jsxs(
1779
1825
  "div",
1780
1826
  {
1781
- className: G.modal,
1827
+ className: U.modal,
1782
1828
  onClick: (n) => {
1783
1829
  n.stopPropagation();
1784
1830
  },
@@ -1787,8 +1833,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1787
1833
  left: `${s.left}px`
1788
1834
  },
1789
1835
  children: [
1790
- /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
1791
- /* @__PURE__ */ t.jsx("h3", { children: o(l.productData.name, 20) }),
1836
+ /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
1837
+ /* @__PURE__ */ t.jsx("h3", { children: a(l.productData.name, 20) }),
1792
1838
  /* @__PURE__ */ t.jsx(
1793
1839
  b,
1794
1840
  {
@@ -1802,14 +1848,14 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1802
1848
  }
1803
1849
  )
1804
1850
  ] }),
1805
- /* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
1806
- ht,
1851
+ /* @__PURE__ */ t.jsx("div", { className: U.modalOptions, children: /* @__PURE__ */ t.jsx(
1852
+ _t,
1807
1853
  {
1808
1854
  label: "Put up an attractive image",
1809
1855
  activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
1810
1856
  onChange: (n) => {
1811
1857
  const r = {
1812
- ...a,
1858
+ ...o,
1813
1859
  image: n[0]
1814
1860
  };
1815
1861
  e(r);
@@ -1819,74 +1865,74 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1819
1865
  ]
1820
1866
  }
1821
1867
  );
1822
- }, Zn = (u) => {
1823
- const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
1868
+ }, ii = (d) => {
1869
+ const { index: o, moveProduct: e, children: s } = d, [, i] = $t({
1824
1870
  accept: "product",
1825
- hover(o) {
1826
- o.index !== a && (e(o.index, a), o.index = a);
1871
+ hover(a) {
1872
+ a.index !== o && (e(a.index, o), a.index = o);
1827
1873
  }
1828
- }), [{ isDragging: c }, l] = wt({
1874
+ }), [{ isDragging: c }, l] = Nt({
1829
1875
  type: "product",
1830
- item: { index: a },
1831
- collect: (o) => ({
1832
- isDragging: o.isDragging()
1876
+ item: { index: o },
1877
+ collect: (a) => ({
1878
+ isDragging: a.isDragging()
1833
1879
  })
1834
1880
  });
1835
1881
  return /* @__PURE__ */ t.jsx(
1836
1882
  "div",
1837
1883
  {
1838
- ref: (o) => l(i(o)),
1839
- className: `${G.product} ${c ? G.dragging : ""}`,
1884
+ ref: (a) => l(i(a)),
1885
+ className: `${U.product} ${c ? U.dragging : ""}`,
1840
1886
  children: s
1841
1887
  }
1842
1888
  );
1843
- }, Wa = (u) => {
1889
+ }, ea = (d) => {
1844
1890
  const {
1845
- isActiveItems: a,
1891
+ isActiveItems: o,
1846
1892
  setIsActiveItems: e,
1847
1893
  items: s,
1848
1894
  setItems: i,
1849
1895
  other: c,
1850
1896
  title: l,
1851
- subtitle: o,
1897
+ subtitle: a,
1852
1898
  editable: n = !0,
1853
1899
  draggable: r = !1,
1854
- withImage: _ = !1,
1855
- deletable: d = !0,
1856
- addable: P = !0,
1857
- itemsType: x,
1900
+ withImage: x = !1,
1901
+ deletable: $ = !0,
1902
+ addable: p = !0,
1903
+ itemsType: h,
1858
1904
  itemsOptions: f
1859
- } = u, [h, q] = g.useState(null), [A, v] = g.useState({
1905
+ } = d, [m, C] = g.useState(null), [q, j] = g.useState({
1860
1906
  top: 0,
1861
1907
  left: 0
1862
- }), [E, I] = g.useState(!1), C = (k, y) => {
1863
- const L = [...s], [w] = L.splice(k, 1);
1864
- L.splice(y, 0, w), i(L);
1908
+ }), [E, S] = g.useState(!1), T = (k, y) => {
1909
+ const L = [...s], [I] = L.splice(k, 1);
1910
+ L.splice(y, 0, I), i(L);
1865
1911
  };
1866
1912
  g.useEffect(() => {
1867
1913
  const k = () => {
1868
- q(null), I(!1);
1914
+ C(null), S(!1);
1869
1915
  };
1870
- return document.body.addEventListener("click", k), q(null), I(!1), () => {
1871
- q(null), I(!1), document.body.removeEventListener("click", k);
1916
+ return document.body.addEventListener("click", k), C(null), S(!1), () => {
1917
+ C(null), S(!1), document.body.removeEventListener("click", k);
1872
1918
  };
1873
1919
  }, []), g.useEffect(() => {
1874
- if (h) {
1875
- const k = [...s].map((y) => y.listingId === h.listingId ? h : y);
1920
+ if (m) {
1921
+ const k = [...s].map((y) => y.listingId === m.listingId ? m : y);
1876
1922
  i(k);
1877
1923
  }
1878
- }, [h]);
1924
+ }, [m]);
1879
1925
  const M = (k, y) => {
1880
1926
  k.stopPropagation();
1881
- const L = k.target.getBoundingClientRect(), w = 100, R = window.innerHeight;
1882
- let U = L.top + window.scrollY;
1883
- U + w > R && (U = R - w - 20), I(!0), v({
1884
- top: U - 80,
1927
+ const L = k.target.getBoundingClientRect(), I = 100, R = window.innerHeight;
1928
+ let Y = L.top + window.scrollY;
1929
+ Y + I > R && (Y = R - I - 20), S(!0), j({
1930
+ top: Y - 80,
1885
1931
  left: L.left - 30
1886
- }), q(y);
1932
+ }), C(y);
1887
1933
  };
1888
- function m(k) {
1889
- if (_)
1934
+ function u(k) {
1935
+ if (x)
1890
1936
  return k ? /* @__PURE__ */ t.jsx(
1891
1937
  "img",
1892
1938
  {
@@ -1908,7 +1954,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1908
1954
  const O = (k, y) => {
1909
1955
  const L = f.find((R) => k.listingId === R.id);
1910
1956
  if (!L) return null;
1911
- const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1957
+ const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1912
1958
  r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1913
1959
  b,
1914
1960
  {
@@ -1918,30 +1964,30 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1918
1964
  height: 20
1919
1965
  }
1920
1966
  ) }, y),
1921
- x === "select" && /* @__PURE__ */ t.jsx(
1967
+ h === "select" && /* @__PURE__ */ t.jsx(
1922
1968
  Z,
1923
1969
  {
1924
1970
  onChange: (R) => {
1925
- const U = [...s], tt = f.find((T) => T.productData.name === R);
1971
+ const Y = [...s], tt = f.find((A) => A.productData.name === R);
1926
1972
  if (!tt) return;
1927
1973
  const at = {
1928
1974
  listingId: tt.id,
1929
1975
  image: tt.productData.images.length > 0 ? tt.productData.images[0].cfId : ""
1930
- }, j = U.map((T) => T.listingId === k.listingId ? at : T);
1931
- q(at), i([...j]);
1976
+ }, v = Y.map((A) => A.listingId === k.listingId ? at : A);
1977
+ C(at), i([...v]);
1932
1978
  },
1933
1979
  value: L.productData.name,
1934
1980
  options: [
1935
- ...f.filter((R) => !s.find((U) => U.listingId === R.id)).map((R) => R.productData.name)
1981
+ ...f.filter((R) => !s.find((Y) => Y.listingId === R.id)).map((R) => R.productData.name)
1936
1982
  ],
1937
- leftAddon: m(
1983
+ leftAddon: u(
1938
1984
  k.image || L.productData.images.length > 0 && L.productData.images[0].cfId || ""
1939
1985
  )
1940
1986
  },
1941
1987
  y
1942
1988
  ),
1943
- /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
1944
- n && /* @__PURE__ */ t.jsx(
1989
+ /* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
1990
+ n && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
1945
1991
  b,
1946
1992
  {
1947
1993
  name: "Sliders",
@@ -1950,8 +1996,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1950
1996
  height: 20,
1951
1997
  onClick: (R) => M(R, k)
1952
1998
  }
1953
- ),
1954
- d && /* @__PURE__ */ t.jsx(
1999
+ ) }),
2000
+ $ && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
1955
2001
  b,
1956
2002
  {
1957
2003
  name: "Trash",
@@ -1961,217 +2007,227 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
1961
2007
  fill: "#C12A2A",
1962
2008
  onClick: () => i(s.filter((R) => R !== k))
1963
2009
  }
1964
- )
2010
+ ) })
1965
2011
  ] })
1966
2012
  ] });
1967
2013
  return r ? /* @__PURE__ */ t.jsx(
1968
- Zn,
2014
+ ii,
1969
2015
  {
1970
2016
  product: k,
1971
2017
  index: y,
1972
- moveProduct: C,
1973
- children: w
2018
+ moveProduct: T,
2019
+ children: I
1974
2020
  },
1975
2021
  k.listingId
1976
2022
  ) : /* @__PURE__ */ t.jsx(
1977
2023
  "div",
1978
2024
  {
1979
- className: G.product,
1980
- children: w
2025
+ className: U.product,
2026
+ children: I
1981
2027
  },
1982
2028
  k.listingId
1983
2029
  );
1984
2030
  };
1985
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
1986
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
1987
- l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
1988
- a !== void 0 && /* @__PURE__ */ t.jsx(
2031
+ return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
2032
+ (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
2033
+ l && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: l }),
2034
+ o !== void 0 && /* @__PURE__ */ t.jsx(
1989
2035
  K,
1990
2036
  {
1991
- current: a,
2037
+ current: o,
1992
2038
  onChange: (k) => e == null ? void 0 : e(k)
1993
2039
  }
1994
2040
  )
1995
2041
  ] }),
1996
- E && h && /* @__PURE__ */ t.jsx(
1997
- Kn,
2042
+ E && m && /* @__PURE__ */ t.jsx(
2043
+ ni,
1998
2044
  {
1999
- activeItem: h,
2000
- setActiveItem: q,
2001
- setIsOpenModal: I,
2002
- popupPosition: A,
2045
+ activeItem: m,
2046
+ setActiveItem: C,
2047
+ setIsOpenModal: S,
2048
+ popupPosition: q,
2003
2049
  itemsOptions: f
2004
2050
  }
2005
2051
  ),
2006
- /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
2007
- o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
2052
+ /* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
2053
+ a && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: a }),
2008
2054
  r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((k, y) => O(k, y)) }) : s.map((k, y) => O(k, y)),
2009
- P && /* @__PURE__ */ t.jsx("div", { className: G.addButton, children: /* @__PURE__ */ t.jsxs(
2010
- it,
2055
+ p && /* @__PURE__ */ t.jsx(
2056
+ "div",
2011
2057
  {
2012
- withoutHover: !0,
2013
- className: G.button,
2014
- size: "s",
2015
- onClick: () => {
2016
- const k = [...s];
2017
- for (let y = 0; y < f.length; y++)
2018
- if (!s.find((L) => L.listingId === f[y].id)) {
2019
- k.push({
2020
- listingId: f[y].id,
2021
- image: f[y].productData.images.length > 0 ? f[y].productData.images[0].cfId : ""
2022
- });
2023
- break;
2024
- }
2025
- i(k);
2026
- },
2027
- disabled: s.length === f.length,
2028
2058
  style: {
2029
- width: "fit-content"
2059
+ width: "100%",
2060
+ display: "flex",
2061
+ justifyContent: "center"
2030
2062
  },
2031
- children: [
2032
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2033
- /* @__PURE__ */ t.jsx(
2034
- b,
2035
- {
2036
- name: "Plus",
2037
- width: 16,
2038
- height: 16
2039
- }
2040
- )
2041
- ]
2063
+ children: /* @__PURE__ */ t.jsx(
2064
+ ot,
2065
+ {
2066
+ withoutHover: !0,
2067
+ className: U.button,
2068
+ size: "s",
2069
+ onClick: () => {
2070
+ const k = [...s];
2071
+ for (let y = 0; y < f.length; y++)
2072
+ if (!s.find((L) => L.listingId === f[y].id)) {
2073
+ k.push({
2074
+ listingId: f[y].id,
2075
+ image: f[y].productData.images.length > 0 ? f[y].productData.images[0].cfId : ""
2076
+ });
2077
+ break;
2078
+ }
2079
+ i(k);
2080
+ },
2081
+ disabled: s.length === f.length,
2082
+ style: {
2083
+ width: "fit-content"
2084
+ },
2085
+ children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
2086
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2087
+ /* @__PURE__ */ t.jsx(
2088
+ b,
2089
+ {
2090
+ name: "Plus",
2091
+ width: 16,
2092
+ height: 16
2093
+ }
2094
+ )
2095
+ ] })
2096
+ }
2097
+ )
2042
2098
  }
2043
- ) })
2099
+ )
2044
2100
  ] }),
2045
2101
  c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
2046
2102
  ] });
2047
- }, ti = "_options_jdafm_1", ei = "_price_jdafm_12", si = "_oldPrice_jdafm_19", ni = "_newPrice_jdafm_27", ii = "_animate_jdafm_34", ai = "_appearAndBounce_jdafm_1", oi = "_meta_jdafm_52", ci = "_info_jdafm_58", li = "_infoRight_jdafm_66", ri = "_buttons_jdafm_73", di = "_variants_jdafm_80", ui = "_variant_jdafm_80", mi = "_stock_jdafm_97", _i = "_variantInfo_jdafm_104", hi = "_quantity_jdafm_110", pi = "_count_jdafm_117", gi = "_focused_jdafm_134", fi = "_button_jdafm_73", xi = "_activeVariant_jdafm_160", bi = "_chargeTypes_jdafm_164", vi = "_charge_jdafm_164", ji = "_chargeActive_jdafm_189", yi = "_title_jdafm_197", N = {
2048
- options: ti,
2049
- price: ei,
2050
- oldPrice: si,
2051
- newPrice: ni,
2052
- animate: ii,
2053
- appearAndBounce: ai,
2054
- meta: oi,
2055
- info: ci,
2056
- infoRight: li,
2057
- buttons: ri,
2058
- variants: di,
2059
- variant: ui,
2060
- stock: mi,
2061
- variantInfo: _i,
2062
- quantity: hi,
2063
- count: pi,
2064
- focused: gi,
2065
- button: fi,
2066
- activeVariant: xi,
2067
- chargeTypes: bi,
2068
- charge: vi,
2069
- chargeActive: ji,
2070
- title: yi
2103
+ }, oi = "_options_d1lk6_1", ai = "_price_d1lk6_12", ci = "_oldPrice_d1lk6_19", li = "_newPrice_d1lk6_27", ri = "_animate_d1lk6_34", di = "_appearAndBounce_d1lk6_1", ui = "_meta_d1lk6_52", mi = "_info_d1lk6_58", hi = "_infoRight_d1lk6_66", _i = "_buttons_d1lk6_73", pi = "_variants_d1lk6_80", gi = "_variant_d1lk6_80", fi = "_stock_d1lk6_98", xi = "_variantInfo_d1lk6_105", bi = "_quantity_d1lk6_111", ji = "_count_d1lk6_118", vi = "_focused_d1lk6_135", yi = "_button_d1lk6_73", ki = "_activeVariant_d1lk6_161", $i = "_chargeTypes_d1lk6_165", Ni = "_charge_d1lk6_165", Ii = "_chargeActive_d1lk6_190", wi = "_title_d1lk6_198", w = {
2104
+ options: oi,
2105
+ price: ai,
2106
+ oldPrice: ci,
2107
+ newPrice: li,
2108
+ animate: ri,
2109
+ appearAndBounce: di,
2110
+ meta: ui,
2111
+ info: mi,
2112
+ infoRight: hi,
2113
+ buttons: _i,
2114
+ variants: pi,
2115
+ variant: gi,
2116
+ stock: fi,
2117
+ variantInfo: xi,
2118
+ quantity: bi,
2119
+ count: ji,
2120
+ focused: vi,
2121
+ button: yi,
2122
+ activeVariant: ki,
2123
+ chargeTypes: $i,
2124
+ charge: Ni,
2125
+ chargeActive: Ii,
2126
+ title: wi
2071
2127
  };
2072
- var At = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(At || {});
2073
- const Xa = (u) => {
2074
- var C, M;
2075
- const { variants: a } = u, [e, s] = g.useState(a[0]), [i, c] = g.useState(e.chargeTypes[0]), l = ft(), [o, n] = g.useState(1), [r, _] = g.useState(!1), { reset: d, addProductToCart: P, getProducts: x, cart: f } = Nt(), [h, q] = g.useState(!1);
2128
+ var qt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(qt || {});
2129
+ const sa = (d) => {
2130
+ var T, M;
2131
+ const { variants: o } = d, [e, s] = g.useState(o[0]), [i, c] = g.useState(e.chargeTypes[0]), l = ft(), [a, n] = g.useState(1), [r, x] = g.useState(!1), { reset: $, addProductToCart: p, getProducts: h, cart: f } = It(), [m, C] = g.useState(!1);
2076
2132
  g.useEffect(() => {
2077
- q(!0);
2078
- const m = setTimeout(() => q(!1), 600);
2079
- return () => clearTimeout(m);
2080
- }, [o]);
2081
- async function A() {
2082
- await x(), await P({
2083
- productId: u.id,
2133
+ C(!0);
2134
+ const u = setTimeout(() => C(!1), 600);
2135
+ return () => clearTimeout(u);
2136
+ }, [a]);
2137
+ async function q() {
2138
+ await h(), await p({
2139
+ productId: d.id,
2084
2140
  productVariantId: e.id,
2085
- quantity: o
2141
+ quantity: a
2086
2142
  });
2087
2143
  }
2088
- function v() {
2089
- d(), A(), l("/checkout");
2144
+ function j() {
2145
+ $(), q(), l("/checkout");
2090
2146
  }
2091
2147
  console.log(f);
2092
- function E(m) {
2093
- if (m >= 864e5) {
2094
- const w = Math.floor(m / 864e5);
2095
- return `${w} ${w === 1 ? "day" : "days"}`;
2096
- } else if (m >= 36e5) {
2097
- const w = Math.floor(m / 36e5);
2098
- return `${w} ${w === 1 ? "hour" : "hours"}`;
2099
- } else if (m >= 6e4) {
2100
- const w = Math.floor(m / 6e4);
2101
- return `${w} ${w === 1 ? "minute" : "minutes"}`;
2148
+ function E(u) {
2149
+ if (u >= 864e5) {
2150
+ const I = Math.floor(u / 864e5);
2151
+ return `${I} ${I === 1 ? "day" : "days"}`;
2152
+ } else if (u >= 36e5) {
2153
+ const I = Math.floor(u / 36e5);
2154
+ return `${I} ${I === 1 ? "hour" : "hours"}`;
2155
+ } else if (u >= 6e4) {
2156
+ const I = Math.floor(u / 6e4);
2157
+ return `${I} ${I === 1 ? "minute" : "minutes"}`;
2102
2158
  } else {
2103
- const w = Math.floor(m / 1e3);
2104
- return `${w} ${w === 1 ? "second" : "seconds"}`;
2159
+ const I = Math.floor(u / 1e3);
2160
+ return `${I} ${I === 1 ? "second" : "seconds"}`;
2105
2161
  }
2106
2162
  }
2107
- function I(m, O) {
2108
- return m.length > O ? m.slice(0, O) + "..." : m;
2163
+ function S(u, O) {
2164
+ return u.length > O ? u.slice(0, O) + "..." : u;
2109
2165
  }
2110
- return /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
2111
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((m) => /* @__PURE__ */ t.jsx(
2166
+ return /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
2167
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((u) => /* @__PURE__ */ t.jsx(
2112
2168
  "div",
2113
2169
  {
2114
- className: F(N.charge, {
2115
- [N.chargeActive]: i === m
2170
+ className: V(w.charge, {
2171
+ [w.chargeActive]: i === u
2116
2172
  }),
2117
- onClick: () => c(m),
2118
- children: At[m]
2173
+ onClick: () => c(u),
2174
+ children: qt[u]
2119
2175
  },
2120
- m
2176
+ u
2121
2177
  )) }),
2122
- /* @__PURE__ */ t.jsx("div", { className: N.variants, children: a.map((m) => {
2178
+ /* @__PURE__ */ t.jsx("div", { className: w.variants, children: o.map((u) => {
2123
2179
  var O;
2124
2180
  return /* @__PURE__ */ t.jsxs(
2125
2181
  "div",
2126
2182
  {
2127
- className: F(N.variant, {
2128
- [N.activeVariant]: e.id === m.id
2183
+ className: V(w.variant, {
2184
+ [w.activeVariant]: e.id === u.id
2129
2185
  }),
2130
- onClick: () => s(m),
2186
+ onClick: () => s(u),
2131
2187
  children: [
2132
- /* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
2133
- /* @__PURE__ */ t.jsx("span", { className: N.title, children: I(m.name, 15) }),
2188
+ /* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
2189
+ /* @__PURE__ */ t.jsx("span", { className: w.title, children: S(u.name, 15) }),
2134
2190
  /* @__PURE__ */ t.jsxs("span", { children: [
2135
2191
  "$",
2136
- i === "ONE_TIME" ? m.price.amount : m.subscriptionSettings ? m.subscriptionSettings.price.amount : "Price Not Found"
2192
+ i === "ONE_TIME" ? u.price.amount : u.subscriptionSettings ? u.subscriptionSettings.price.amount : "Price Not Found"
2137
2193
  ] })
2138
2194
  ] }),
2139
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
2140
- ((O = m.quantity.restrictions) == null ? void 0 : O.max) || m.quantity.available || 0,
2195
+ /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: w.stock, children: [
2196
+ ((O = u.quantity.restrictions) == null ? void 0 : O.max) || u.quantity.available || 0,
2141
2197
  " in stock"
2142
2198
  ] }) })
2143
2199
  ]
2144
2200
  },
2145
- m.id
2201
+ u.id
2146
2202
  );
2147
2203
  }) }),
2148
- i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
2204
+ i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: w.quantity, children: [
2149
2205
  /* @__PURE__ */ t.jsx(
2150
2206
  "button",
2151
2207
  {
2152
2208
  onClick: () => {
2153
- o > 1 ? n((m) => m - 1) : n(1);
2209
+ a > 1 ? n((u) => u - 1) : n(1);
2154
2210
  },
2155
- className: N.button,
2156
- disabled: e.quantity.restrictions && o <= e.quantity.restrictions.min,
2211
+ className: w.button,
2212
+ disabled: e.quantity.restrictions && a <= e.quantity.restrictions.min,
2157
2213
  children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
2158
2214
  }
2159
2215
  ),
2160
2216
  /* @__PURE__ */ t.jsx(
2161
2217
  "label",
2162
2218
  {
2163
- className: F(N.count, {
2164
- [N.focused]: r
2219
+ className: V(w.count, {
2220
+ [w.focused]: r
2165
2221
  }),
2166
- onFocus: () => _(!0),
2167
- onBlur: () => _(!1),
2222
+ onFocus: () => x(!0),
2223
+ onBlur: () => x(!1),
2168
2224
  children: /* @__PURE__ */ t.jsx(
2169
2225
  W,
2170
2226
  {
2171
2227
  type: "number",
2172
- value: String(o),
2173
- onChange: (m) => n(Number(m)),
2174
- max: ((C = e.quantity.restrictions) == null ? void 0 : C.max) || e.quantity.available || 1 / 0,
2228
+ value: String(a),
2229
+ onChange: (u) => n(Number(u)),
2230
+ max: ((T = e.quantity.restrictions) == null ? void 0 : T.max) || e.quantity.available || 1 / 0,
2175
2231
  min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
2176
2232
  style: {
2177
2233
  backgroundColor: "transparent",
@@ -2186,18 +2242,18 @@ const Xa = (u) => {
2186
2242
  "button",
2187
2243
  {
2188
2244
  onClick: () => {
2189
- n((m) => m + 1);
2245
+ n((u) => u + 1);
2190
2246
  },
2191
- className: N.button,
2192
- disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available && o >= e.quantity.available),
2247
+ className: w.button,
2248
+ disabled: !!(e.quantity.restrictions && a >= e.quantity.restrictions.max || e.quantity.available && a >= e.quantity.available),
2193
2249
  children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
2194
2250
  }
2195
2251
  )
2196
2252
  ] }),
2197
- /* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
2198
- /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
2253
+ /* @__PURE__ */ t.jsxs("div", { className: w.meta, children: [
2254
+ /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
2199
2255
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
2200
- /* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
2256
+ /* @__PURE__ */ t.jsxs("div", { className: w.infoRight, children: [
2201
2257
  /* @__PURE__ */ t.jsx(
2202
2258
  b,
2203
2259
  {
@@ -2210,113 +2266,116 @@ const Xa = (u) => {
2210
2266
  /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : E(e.deliveryTime) })
2211
2267
  ] })
2212
2268
  ] }),
2213
- /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
2269
+ /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
2214
2270
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
2215
- /* @__PURE__ */ t.jsx("div", { className: N.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
2216
- /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
2271
+ /* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2272
+ /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: m }), children: [
2217
2273
  "$ ",
2218
- (e.price.amount || 0) * o
2274
+ (e.price.amount || 0) * a
2219
2275
  ] }),
2220
- /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
2276
+ /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2221
2277
  "$ ",
2222
- (e.compareAtPrice.amount || 0) * o
2278
+ (e.compareAtPrice.amount || 0) * a
2223
2279
  ] })
2224
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
2280
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: m }), children: [
2225
2281
  "$ ",
2226
- (e.price.amount || 0) * o
2227
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
2228
- /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
2282
+ (e.price.amount || 0) * a
2283
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2284
+ /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: m }), children: [
2229
2285
  "$ ",
2230
2286
  e.subscriptionSettings.price.amount || 0
2231
2287
  ] }),
2232
- /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
2288
+ /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2233
2289
  "$ ",
2234
2290
  e.subscriptionSettings.compareAtPrice.amount || 0
2235
2291
  ] })
2236
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
2292
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: m }), children: [
2237
2293
  "$ ",
2238
2294
  e.subscriptionSettings.price.amount || 0
2239
2295
  ] }) })
2240
2296
  ] })
2241
2297
  ] }),
2242
- /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
2298
+ /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
2243
2299
  /* @__PURE__ */ t.jsx(
2244
- it,
2300
+ ot,
2245
2301
  {
2246
2302
  type: "Primary",
2247
- onClick: () => v(),
2303
+ onClick: () => j(),
2248
2304
  children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
2249
2305
  }
2250
2306
  ),
2251
2307
  i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
2252
- it,
2308
+ ot,
2253
2309
  {
2254
2310
  type: "Secondary",
2255
- onClick: () => A(),
2311
+ onClick: () => q(),
2256
2312
  children: "Add to Cart"
2257
2313
  }
2258
2314
  )
2259
2315
  ] })
2260
2316
  ] });
2261
- }, ki = "_button_nq46k_1", $i = "_login_nq46k_14", wi = "_signUp_nq46k_18", Ni = "_buttons_nq46k_23", Ii = "_modal_nq46k_32", Ci = "_info_nq46k_60", Bi = "_top_nq46k_67", Si = "_title_nq46k_78", Pi = "_clear_nq46k_85", Ti = "_activeClear_nq46k_92", qi = "_count_nq46k_96", Ai = "_cart_nq46k_111", Oi = "_empty_nq46k_119", Di = "_product_nq46k_145", Ei = "_products_nq46k_154", Li = "_image_nq46k_162", Ri = "_productInfo_nq46k_168", Mi = "_content_nq46k_175", Hi = "_name_nq46k_181", zi = "_price_nq46k_187", Vi = "_productButtons_nq46k_193", Fi = "_productButton_nq46k_193", Ui = "_productCount_nq46k_213", Yi = "_bottom_nq46k_229", Gi = "_subtotal_nq46k_237", Wi = "_block_nq46k_245", Xi = "_shoppingCount_nq46k_252", Ji = "_total_nq46k_272", Qi = "_link_nq46k_278", Ki = "_userInfo_nq46k_285", S = {
2262
- button: ki,
2263
- login: $i,
2264
- signUp: wi,
2265
- buttons: Ni,
2266
- modal: Ii,
2267
- info: Ci,
2268
- top: Bi,
2269
- title: Si,
2270
- clear: Pi,
2271
- activeClear: Ti,
2272
- count: qi,
2273
- cart: Ai,
2274
- empty: Oi,
2275
- product: Di,
2276
- products: Ei,
2277
- image: Li,
2278
- productInfo: Ri,
2279
- content: Mi,
2280
- name: Hi,
2281
- price: zi,
2282
- productButtons: Vi,
2283
- productButton: Fi,
2284
- productCount: Ui,
2285
- bottom: Yi,
2286
- subtotal: Gi,
2287
- block: Wi,
2288
- shoppingCount: Xi,
2289
- total: Ji,
2290
- link: Qi,
2291
- userInfo: Ki
2292
- }, Zi = "_button_85085_1", ta = "_primary_85085_20", ea = "_primaryHovered_85085_30", sa = "_secondary_85085_34", na = "_secondaryHovered_85085_44", ia = "_tertiary_85085_48", aa = "_tertiaryHovered_85085_58", oa = "_content_85085_62", et = {
2293
- button: Zi,
2294
- primary: ta,
2295
- primaryHovered: ea,
2296
- secondary: sa,
2297
- secondaryHovered: na,
2298
- tertiary: ia,
2299
- tertiaryHovered: aa,
2300
- content: oa
2301
- }, jt = (u) => {
2302
- const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Bt();
2317
+ }, Ci = "_button_oyh2y_1", Bi = "_login_oyh2y_14", Si = "_signUp_oyh2y_18", Ti = "_buttons_oyh2y_23", Pi = "_modal_oyh2y_32", Ai = "_closing_oyh2y_61", qi = "_info_oyh2y_85", Oi = "_top_oyh2y_92", Di = "_title_oyh2y_103", Ei = "_clear_oyh2y_110", Li = "_activeClear_oyh2y_117", Ri = "_count_oyh2y_121", Mi = "_cart_oyh2y_136", Hi = "_empty_oyh2y_144", zi = "_product_oyh2y_170", Vi = "_products_oyh2y_179", Fi = "_image_oyh2y_187", Ui = "_productInfo_oyh2y_193", Yi = "_content_oyh2y_200", Gi = "_name_oyh2y_206", Wi = "_price_oyh2y_212", Xi = "_productButtons_oyh2y_218", Ji = "_productButton_oyh2y_218", Qi = "_productCount_oyh2y_238", Ki = "_bottom_oyh2y_254", Zi = "_subtotal_oyh2y_262", to = "_block_oyh2y_270", eo = "_shoppingCount_oyh2y_277", so = "_total_oyh2y_297", no = "_link_oyh2y_303", io = "_userInfo_oyh2y_310", B = {
2318
+ button: Ci,
2319
+ login: Bi,
2320
+ signUp: Si,
2321
+ buttons: Ti,
2322
+ modal: Pi,
2323
+ "slide-in-fade": "_slide-in-fade_oyh2y_1",
2324
+ closing: Ai,
2325
+ "slide-out-fade": "_slide-out-fade_oyh2y_1",
2326
+ info: qi,
2327
+ top: Oi,
2328
+ title: Di,
2329
+ clear: Ei,
2330
+ activeClear: Li,
2331
+ count: Ri,
2332
+ cart: Mi,
2333
+ empty: Hi,
2334
+ product: zi,
2335
+ products: Vi,
2336
+ image: Fi,
2337
+ productInfo: Ui,
2338
+ content: Yi,
2339
+ name: Gi,
2340
+ price: Wi,
2341
+ productButtons: Xi,
2342
+ productButton: Ji,
2343
+ productCount: Qi,
2344
+ bottom: Ki,
2345
+ subtotal: Zi,
2346
+ block: to,
2347
+ shoppingCount: eo,
2348
+ total: so,
2349
+ link: no,
2350
+ userInfo: io
2351
+ }, oo = "_button_85085_1", ao = "_primary_85085_20", co = "_primaryHovered_85085_30", lo = "_secondary_85085_34", ro = "_secondaryHovered_85085_44", uo = "_tertiary_85085_48", mo = "_tertiaryHovered_85085_58", ho = "_content_85085_62", st = {
2352
+ button: oo,
2353
+ primary: ao,
2354
+ primaryHovered: co,
2355
+ secondary: lo,
2356
+ secondaryHovered: ro,
2357
+ tertiary: uo,
2358
+ tertiaryHovered: mo,
2359
+ content: ho
2360
+ }, vt = (d) => {
2361
+ const { children: o, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = d, { themeSettings: a } = Bt();
2303
2362
  return /* @__PURE__ */ t.jsx(
2304
2363
  "button",
2305
2364
  {
2306
- className: F(et.button, i, {
2307
- [et.primary]: l === "Primary",
2308
- [et.secondary]: l === "Secondary",
2309
- [et.tertiary]: l === "Tertiary",
2310
- [et.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
2311
- [et.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
2312
- [et.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
2365
+ className: V(st.button, i, {
2366
+ [st.primary]: l === "Primary",
2367
+ [st.secondary]: l === "Secondary",
2368
+ [st.tertiary]: l === "Tertiary",
2369
+ [st.primaryHovered]: l === "Primary" && !c && a.buttons.primary.hover,
2370
+ [st.secondaryHovered]: l === "Secondary" && !c && a.buttons.secondary.hover,
2371
+ [st.tertiaryHovered]: l === "Tertiary" && !c && a.buttons.tertiary.hover
2313
2372
  }),
2314
2373
  onClick: e,
2315
2374
  style: {
2316
2375
  ...s
2317
2376
  },
2318
2377
  disabled: c,
2319
- children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: et.content, children: [
2378
+ children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: st.content, children: [
2320
2379
  /* @__PURE__ */ t.jsx(
2321
2380
  b,
2322
2381
  {
@@ -2326,69 +2385,69 @@ const Xa = (u) => {
2326
2385
  height: 20
2327
2386
  }
2328
2387
  ),
2329
- a
2330
- ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
2388
+ o
2389
+ ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: o })
2331
2390
  }
2332
2391
  );
2333
2392
  };
2334
- class _t extends Error {
2393
+ class ht extends Error {
2335
2394
  }
2336
- _t.prototype.name = "InvalidTokenError";
2337
- function ca(u) {
2338
- return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
2395
+ ht.prototype.name = "InvalidTokenError";
2396
+ function _o(d) {
2397
+ return decodeURIComponent(atob(d).replace(/(.)/g, (o, e) => {
2339
2398
  let s = e.charCodeAt(0).toString(16).toUpperCase();
2340
2399
  return s.length < 2 && (s = "0" + s), "%" + s;
2341
2400
  }));
2342
2401
  }
2343
- function la(u) {
2344
- let a = u.replace(/-/g, "+").replace(/_/g, "/");
2345
- switch (a.length % 4) {
2402
+ function po(d) {
2403
+ let o = d.replace(/-/g, "+").replace(/_/g, "/");
2404
+ switch (o.length % 4) {
2346
2405
  case 0:
2347
2406
  break;
2348
2407
  case 2:
2349
- a += "==";
2408
+ o += "==";
2350
2409
  break;
2351
2410
  case 3:
2352
- a += "=";
2411
+ o += "=";
2353
2412
  break;
2354
2413
  default:
2355
2414
  throw new Error("base64 string is not of the correct length");
2356
2415
  }
2357
2416
  try {
2358
- return ca(a);
2417
+ return _o(o);
2359
2418
  } catch {
2360
- return atob(a);
2419
+ return atob(o);
2361
2420
  }
2362
2421
  }
2363
- function ra(u, a) {
2364
- if (typeof u != "string")
2365
- throw new _t("Invalid token specified: must be a string");
2366
- a || (a = {});
2367
- const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
2422
+ function go(d, o) {
2423
+ if (typeof d != "string")
2424
+ throw new ht("Invalid token specified: must be a string");
2425
+ o || (o = {});
2426
+ const e = o.header === !0 ? 0 : 1, s = d.split(".")[e];
2368
2427
  if (typeof s != "string")
2369
- throw new _t(`Invalid token specified: missing part #${e + 1}`);
2428
+ throw new ht(`Invalid token specified: missing part #${e + 1}`);
2370
2429
  let i;
2371
2430
  try {
2372
- i = la(s);
2431
+ i = po(s);
2373
2432
  } catch (c) {
2374
- throw new _t(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
2433
+ throw new ht(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
2375
2434
  }
2376
2435
  try {
2377
2436
  return JSON.parse(i);
2378
2437
  } catch (c) {
2379
- throw new _t(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
2438
+ throw new ht(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
2380
2439
  }
2381
2440
  }
2382
- const Ja = (u) => {
2383
- const { shopping: a, signUp: e } = u, s = ft();
2441
+ const na = (d) => {
2442
+ const { shopping: o, signUp: e } = d, s = ft();
2384
2443
  function i(l) {
2385
2444
  s(l);
2386
2445
  }
2387
2446
  const c = JSON.parse(localStorage.getItem("token") || "{}");
2388
- return /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
2389
- a && /* @__PURE__ */ t.jsx(da, {}),
2447
+ return /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
2448
+ o && /* @__PURE__ */ t.jsx(fo, {}),
2390
2449
  !c.data && /* @__PURE__ */ t.jsx(
2391
- jt,
2450
+ vt,
2392
2451
  {
2393
2452
  onClick: () => i("/customer-dash"),
2394
2453
  type: "Secondary",
@@ -2399,7 +2458,7 @@ const Ja = (u) => {
2399
2458
  }
2400
2459
  ),
2401
2460
  !c.data && e && /* @__PURE__ */ t.jsx(
2402
- jt,
2461
+ vt,
2403
2462
  {
2404
2463
  onClick: () => i("/customer-dash"),
2405
2464
  type: "Primary",
@@ -2409,44 +2468,46 @@ const Ja = (u) => {
2409
2468
  children: "Sign Up"
2410
2469
  }
2411
2470
  ),
2412
- c.data && /* @__PURE__ */ t.jsx(_a, { token: c.data })
2471
+ c.data && /* @__PURE__ */ t.jsx(jo, { token: c.data })
2413
2472
  ] });
2414
- }, da = () => {
2415
- const [u, a] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: c } = Nt();
2416
- function l(_) {
2417
- for (let d = 0; d < i.parts.length; d++)
2418
- for (let P = 0; P < _.variants.length; P++)
2419
- if (i.parts[d].productVariantId === _.variants[d].id)
2420
- return i.parts[d].productVariantId;
2473
+ }, fo = () => {
2474
+ const [d, o] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: c } = It();
2475
+ function l(p) {
2476
+ for (let h = 0; h < i.parts.length; h++)
2477
+ for (let f = 0; f < p.variants.length; f++)
2478
+ if (i.parts[h].productVariantId === p.variants[h].id)
2479
+ return i.parts[h].productVariantId;
2421
2480
  }
2422
- function o(_) {
2423
- for (let d = 0; d < i.parts.length; d++)
2424
- for (let P = 0; P < _.variants.length; P++)
2425
- if (i.parts[d].productVariantId === _.variants[d].id)
2426
- return i.parts[d].quantity;
2481
+ function a(p) {
2482
+ for (let h = 0; h < i.parts.length; h++)
2483
+ for (let f = 0; f < p.variants.length; f++)
2484
+ if (i.parts[h].productVariantId === p.variants[h].id)
2485
+ return i.parts[h].quantity;
2427
2486
  }
2428
2487
  g.useEffect(() => {
2429
2488
  (async () => {
2430
- const d = i.parts.map((f) => String(f.productId)), x = (await c([...d])).map((f) => ({
2431
- ...f,
2432
- activeVariantId: l(f),
2433
- quantity: o(f)
2489
+ const h = i.parts.map((C) => String(C.productId)), m = (await c([...h])).map((C) => ({
2490
+ ...C,
2491
+ activeVariantId: l(C),
2492
+ quantity: a(C)
2434
2493
  }));
2435
- s(x);
2494
+ s(m);
2436
2495
  })();
2437
2496
  }, [i.parts.length]);
2438
- function n(_) {
2439
- var d;
2440
- return !_ || !(_ != null && _.variants) ? !1 : (d = _.variants.find((P) => P.id === _.activeVariantId)) == null ? void 0 : d.subscriptionSettings;
2497
+ function n(p) {
2498
+ var h;
2499
+ return !p || !(p != null && p.variants) ? !1 : (h = p.variants.find((f) => f.id === p.activeVariantId)) == null ? void 0 : h.subscriptionSettings;
2441
2500
  }
2442
2501
  const r = i.parts.length > 0 && e.length > 0 && !n(e[0]);
2443
- return console.log(i.parts.length > 0, e.length > 0, !n(e[0])), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2502
+ console.log(i.parts.length > 0, e.length > 0, !n(e[0]));
2503
+ const [x, $] = g.useState(!1);
2504
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2444
2505
  /* @__PURE__ */ t.jsxs(
2445
2506
  "div",
2446
2507
  {
2447
- className: S.button,
2448
- onClick: (_) => {
2449
- _.stopPropagation(), a(!0);
2508
+ className: B.button,
2509
+ onClick: (p) => {
2510
+ p.stopPropagation(), o(!0), $(!0);
2450
2511
  },
2451
2512
  children: [
2452
2513
  /* @__PURE__ */ t.jsx(
@@ -2456,93 +2517,106 @@ const Ja = (u) => {
2456
2517
  fill: "var(--icon-primary)"
2457
2518
  }
2458
2519
  ),
2459
- r && /* @__PURE__ */ t.jsx("div", { className: S.shoppingCount, children: i.parts.length })
2520
+ r && /* @__PURE__ */ t.jsx("div", { className: B.shoppingCount, children: i.parts.length })
2460
2521
  ]
2461
2522
  }
2462
2523
  ),
2463
- u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(
2464
- ua,
2524
+ d && /* @__PURE__ */ t.jsx(
2525
+ St,
2465
2526
  {
2466
- activeProducts: e,
2467
- isCartNotEmpty: r
2527
+ close: () => {
2528
+ $(!1), setTimeout(() => {
2529
+ o(!1);
2530
+ }, 300);
2531
+ },
2532
+ children: /* @__PURE__ */ t.jsx(
2533
+ xo,
2534
+ {
2535
+ activeProducts: e,
2536
+ isCartNotEmpty: r,
2537
+ isOpen: x
2538
+ }
2539
+ )
2468
2540
  }
2469
- ) })
2541
+ )
2470
2542
  ] });
2471
- }, ua = (u) => {
2472
- const { activeProducts: a, isCartNotEmpty: e } = u, { cart: s, reset: i, getTotalAndDiscount: c, updateQuantityOfProduct: l } = Nt(), o = ft();
2473
- function n(d) {
2474
- o(d);
2543
+ }, xo = (d) => {
2544
+ const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: a } = It(), n = ft();
2545
+ function r(p) {
2546
+ n(p);
2475
2547
  }
2476
- function r(d) {
2477
- l({
2478
- productId: d.id,
2479
- productVariantId: d.activeVariantId,
2480
- quantity: d.quantity + 1
2548
+ function x(p) {
2549
+ a({
2550
+ productId: p.id,
2551
+ productVariantId: p.activeVariantId,
2552
+ quantity: p.quantity + 1
2481
2553
  });
2482
2554
  }
2483
- function _(d) {
2484
- l({
2485
- productId: d.id,
2486
- productVariantId: d.activeVariantId,
2487
- quantity: d.quantity - 1
2555
+ function $(p) {
2556
+ a({
2557
+ productId: p.id,
2558
+ productVariantId: p.activeVariantId,
2559
+ quantity: p.quantity - 1
2488
2560
  });
2489
2561
  }
2490
2562
  return /* @__PURE__ */ t.jsxs(
2491
2563
  "div",
2492
2564
  {
2493
- className: S.modal,
2494
- onClick: (d) => d.stopPropagation(),
2565
+ className: V(B.modal, {
2566
+ [B.closing]: !s
2567
+ }),
2568
+ onClick: (p) => p.stopPropagation(),
2495
2569
  children: [
2496
- /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
2497
- /* @__PURE__ */ t.jsxs("div", { className: S.info, children: [
2498
- /* @__PURE__ */ t.jsx("span", { className: S.title, children: "Cart" }),
2499
- e && /* @__PURE__ */ t.jsx("div", { className: S.count, children: s.parts.length })
2570
+ /* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
2571
+ /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
2572
+ /* @__PURE__ */ t.jsx("span", { className: B.title, children: "Cart" }),
2573
+ e && /* @__PURE__ */ t.jsx("div", { className: B.count, children: i.parts.length })
2500
2574
  ] }),
2501
2575
  /* @__PURE__ */ t.jsx(
2502
2576
  "button",
2503
2577
  {
2504
- className: F(S.clear, {
2505
- [S.activeClear]: e
2578
+ className: V(B.clear, {
2579
+ [B.activeClear]: e
2506
2580
  }),
2507
2581
  disabled: !e,
2508
- onClick: () => i(),
2582
+ onClick: c,
2509
2583
  children: "Clear all"
2510
2584
  }
2511
2585
  )
2512
2586
  ] }),
2513
- e ? /* @__PURE__ */ t.jsxs("div", { className: S.cart, children: [
2514
- /* @__PURE__ */ t.jsx("div", { className: S.products, children: a.map((d) => /* @__PURE__ */ t.jsxs(
2587
+ e ? /* @__PURE__ */ t.jsxs("div", { className: B.cart, children: [
2588
+ /* @__PURE__ */ t.jsx("div", { className: B.products, children: o.map((p) => /* @__PURE__ */ t.jsxs(
2515
2589
  "div",
2516
2590
  {
2517
- className: S.product,
2591
+ className: B.product,
2518
2592
  children: [
2519
- /* @__PURE__ */ t.jsxs("div", { className: S.productInfo, children: [
2593
+ /* @__PURE__ */ t.jsxs("div", { className: B.productInfo, children: [
2520
2594
  /* @__PURE__ */ t.jsx(
2521
2595
  "img",
2522
2596
  {
2523
- src: `https://imagedelivery.net/${d.images[0].cfId}/w=500`,
2597
+ src: `https://imagedelivery.net/${p.images[0].cfId}/w=500`,
2524
2598
  alt: "image",
2525
2599
  width: "100%",
2526
2600
  height: "100%",
2527
- className: S.image
2601
+ className: B.image
2528
2602
  }
2529
2603
  ),
2530
- /* @__PURE__ */ t.jsxs("div", { className: S.content, children: [
2531
- /* @__PURE__ */ t.jsx("div", { className: S.name, children: d.name }),
2532
- /* @__PURE__ */ t.jsxs("div", { className: S.price, children: [
2604
+ /* @__PURE__ */ t.jsxs("div", { className: B.content, children: [
2605
+ /* @__PURE__ */ t.jsx("div", { className: B.name, children: p.name }),
2606
+ /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
2533
2607
  "$",
2534
- d.variants.find((P) => P.id === d.activeVariantId).price.amount * ((d == null ? void 0 : d.quantity) || 1)
2608
+ p.variants.find((h) => h.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
2535
2609
  ] })
2536
2610
  ] })
2537
2611
  ] }),
2538
- /* @__PURE__ */ t.jsxs("div", { className: S.productButtons, children: [
2612
+ /* @__PURE__ */ t.jsxs("div", { className: B.productButtons, children: [
2539
2613
  /* @__PURE__ */ t.jsx(
2540
2614
  "div",
2541
2615
  {
2542
2616
  onClick: () => {
2543
- d.quantity !== 1 && _(d);
2617
+ p.quantity !== 1 && $(p);
2544
2618
  },
2545
- className: S.productButton,
2619
+ className: B.productButton,
2546
2620
  children: /* @__PURE__ */ t.jsx(
2547
2621
  b,
2548
2622
  {
@@ -2554,12 +2628,12 @@ const Ja = (u) => {
2554
2628
  )
2555
2629
  }
2556
2630
  ),
2557
- /* @__PURE__ */ t.jsx("div", { className: S.productCount, children: d.quantity }),
2631
+ /* @__PURE__ */ t.jsx("div", { className: B.productCount, children: p.quantity }),
2558
2632
  /* @__PURE__ */ t.jsx(
2559
2633
  "div",
2560
2634
  {
2561
- onClick: () => r(d),
2562
- className: S.productButton,
2635
+ onClick: () => x(p),
2636
+ className: B.productButton,
2563
2637
  children: /* @__PURE__ */ t.jsx(
2564
2638
  b,
2565
2639
  {
@@ -2574,11 +2648,11 @@ const Ja = (u) => {
2574
2648
  ] })
2575
2649
  ]
2576
2650
  },
2577
- d.id
2651
+ p.id
2578
2652
  )) }),
2579
- /* @__PURE__ */ t.jsxs("div", { className: S.bottom, children: [
2580
- /* @__PURE__ */ t.jsxs("div", { className: S.subtotal, children: [
2581
- /* @__PURE__ */ t.jsxs("div", { className: S.block, children: [
2653
+ /* @__PURE__ */ t.jsxs("div", { className: B.bottom, children: [
2654
+ /* @__PURE__ */ t.jsxs("div", { className: B.subtotal, children: [
2655
+ /* @__PURE__ */ t.jsxs("div", { className: B.block, children: [
2582
2656
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
2583
2657
  /* @__PURE__ */ t.jsx(
2584
2658
  b,
@@ -2590,71 +2664,77 @@ const Ja = (u) => {
2590
2664
  }
2591
2665
  )
2592
2666
  ] }),
2593
- /* @__PURE__ */ t.jsxs("div", { className: S.total, children: [
2667
+ /* @__PURE__ */ t.jsxs("div", { className: B.total, children: [
2594
2668
  "$",
2595
- c().total
2669
+ l().total
2596
2670
  ] })
2597
2671
  ] }),
2598
- /* @__PURE__ */ t.jsx(jt, { onClick: () => n("/checkout"), children: "Checkout" })
2672
+ /* @__PURE__ */ t.jsx(vt, { onClick: () => r("/checkout"), children: "Checkout" })
2599
2673
  ] })
2600
- ] }) : /* @__PURE__ */ t.jsx(ma, {})
2674
+ ] }) : /* @__PURE__ */ t.jsx(bo, {})
2601
2675
  ]
2602
2676
  }
2603
2677
  );
2604
- }, ma = () => /* @__PURE__ */ t.jsxs("div", { className: S.empty, children: [
2605
- /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(b, { name: "Handbag" }) }),
2606
- /* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
2678
+ }, bo = () => /* @__PURE__ */ t.jsxs("div", { className: B.empty, children: [
2679
+ /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2680
+ b,
2681
+ {
2682
+ name: "Handbag",
2683
+ fill: "var(--icon-secondary)"
2684
+ }
2685
+ ) }),
2686
+ /* @__PURE__ */ t.jsx("span", { children: "Empty Cart" }),
2607
2687
  /* @__PURE__ */ t.jsxs("span", { children: [
2608
- "Check out the store's products and add them",
2688
+ "You don’t have any items in your shopping cart yet,",
2609
2689
  " ",
2610
2690
  /* @__PURE__ */ t.jsx(
2611
2691
  "a",
2612
2692
  {
2613
2693
  href: "/products",
2614
- className: S.link,
2615
- children: "here"
2694
+ className: B.link,
2695
+ children: "view products"
2616
2696
  }
2617
2697
  )
2618
2698
  ] })
2619
- ] }), _a = ({ token: u }) => {
2620
- const [a, e] = g.useState("test-email@gmail.com"), s = ft();
2699
+ ] }), jo = ({ token: d }) => {
2700
+ const [o, e] = g.useState("test-email@gmail.com"), s = ft();
2621
2701
  g.useEffect(() => {
2622
2702
  (async () => {
2623
- const l = ra(u);
2703
+ const l = go(d);
2624
2704
  e(l.email);
2625
2705
  })();
2626
- }, [u]);
2706
+ }, [d]);
2627
2707
  function i(c) {
2628
2708
  s(c);
2629
2709
  }
2630
2710
  return /* @__PURE__ */ t.jsx(
2631
2711
  "div",
2632
2712
  {
2633
- className: S.userInfo,
2713
+ className: B.userInfo,
2634
2714
  onClick: () => i("/customer-dash"),
2635
- children: /* @__PURE__ */ t.jsx("div", { children: a || "test-email@gmail.com" })
2715
+ children: /* @__PURE__ */ t.jsx("div", { children: o || "test-email@gmail.com" })
2636
2716
  }
2637
2717
  );
2638
- }, ha = "_share_11u0d_1", pa = "_modal_11u0d_8", ga = "_header_11u0d_14", fa = "_socials_11u0d_24", xa = "_social_11u0d_24", ba = "_copy_11u0d_34", va = "_title_11u0d_41", ja = "_copyWrapper_11u0d_47", ya = "_copyText_11u0d_56", nt = {
2639
- share: ha,
2640
- modal: pa,
2641
- header: ga,
2642
- socials: fa,
2643
- social: xa,
2644
- copy: ba,
2645
- title: va,
2646
- copyWrapper: ja,
2647
- copyText: ya
2648
- }, Qa = () => {
2649
- const { isOpenModal: u, setIsOpenModal: a } = Pt();
2718
+ }, vo = "_share_11u0d_1", yo = "_modal_11u0d_8", ko = "_header_11u0d_14", $o = "_socials_11u0d_24", No = "_social_11u0d_24", Io = "_copy_11u0d_34", wo = "_title_11u0d_41", Co = "_copyWrapper_11u0d_47", Bo = "_copyText_11u0d_56", it = {
2719
+ share: vo,
2720
+ modal: yo,
2721
+ header: ko,
2722
+ socials: $o,
2723
+ social: No,
2724
+ copy: Io,
2725
+ title: wo,
2726
+ copyWrapper: Co,
2727
+ copyText: Bo
2728
+ }, ia = () => {
2729
+ const { isOpenModal: d, setIsOpenModal: o } = Tt();
2650
2730
  function e() {
2651
- a(!0);
2731
+ o(!0);
2652
2732
  }
2653
2733
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2654
2734
  /* @__PURE__ */ t.jsx(
2655
- it,
2735
+ ot,
2656
2736
  {
2657
- className: nt.share,
2737
+ className: it.share,
2658
2738
  onClick: (s) => {
2659
2739
  s.stopPropagation(), e();
2660
2740
  },
@@ -2669,10 +2749,10 @@ const Ja = (u) => {
2669
2749
  )
2670
2750
  }
2671
2751
  ),
2672
- u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(ka, {}) })
2752
+ d && /* @__PURE__ */ t.jsx(St, { close: o, children: /* @__PURE__ */ t.jsx(So, {}) })
2673
2753
  ] });
2674
- }, ka = () => {
2675
- const { setIsOpenModal: u } = Pt(), { notification: a, setNotification: e } = Dt(), s = window.location.href;
2754
+ }, So = () => {
2755
+ const { setIsOpenModal: d } = Tt(), { notification: o, setNotification: e } = Dt(), s = window.location.href;
2676
2756
  function i() {
2677
2757
  navigator.clipboard.writeText(s), e({
2678
2758
  message: "Link copied to clipboard",
@@ -2682,26 +2762,26 @@ const Ja = (u) => {
2682
2762
  return /* @__PURE__ */ t.jsxs(
2683
2763
  "div",
2684
2764
  {
2685
- className: nt.modal,
2765
+ className: it.modal,
2686
2766
  onClick: (c) => c.stopPropagation(),
2687
2767
  children: [
2688
- /* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
2689
- /* @__PURE__ */ t.jsx("div", { className: nt.title, children: "Share this Post" }),
2768
+ /* @__PURE__ */ t.jsxs("div", { className: it.header, children: [
2769
+ /* @__PURE__ */ t.jsx("div", { className: it.title, children: "Copy Product Link" }),
2690
2770
  /* @__PURE__ */ t.jsx(
2691
2771
  b,
2692
2772
  {
2693
2773
  name: "X",
2694
2774
  fill: "#757575",
2695
- onClick: () => u(!1),
2775
+ onClick: () => d(!1),
2696
2776
  hoverable: !0
2697
2777
  }
2698
2778
  )
2699
2779
  ] }),
2700
- /* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
2780
+ /* @__PURE__ */ t.jsxs("div", { className: it.copyWrapper, children: [
2701
2781
  /* @__PURE__ */ t.jsx(
2702
2782
  "div",
2703
2783
  {
2704
- className: F(nt.copy, nt.copyText),
2784
+ className: V(it.copy, it.copyText),
2705
2785
  onClick: i,
2706
2786
  children: s
2707
2787
  }
@@ -2710,22 +2790,22 @@ const Ja = (u) => {
2710
2790
  "div",
2711
2791
  {
2712
2792
  onClick: i,
2713
- className: nt.copy,
2714
- children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2793
+ className: it.copy,
2794
+ children: o ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2715
2795
  }
2716
2796
  )
2717
2797
  ] })
2718
2798
  ]
2719
2799
  }
2720
2800
  );
2721
- }, $a = "_accordion_1s1lq_1", wa = "_header_1s1lq_9", Na = "_icon_1s1lq_18", Ia = "_open_1s1lq_21", Ca = "_content_1s1lq_25", mt = {
2722
- accordion: $a,
2723
- header: wa,
2724
- icon: Na,
2725
- open: Ia,
2726
- content: Ca
2727
- }, Ka = ({ title: u, content: a }) => {
2728
- const [e, s] = g.useState(!1), [i, c] = g.useState(0), l = g.useRef(null), o = () => {
2801
+ }, To = "_accordion_1s1lq_1", Po = "_header_1s1lq_9", Ao = "_icon_1s1lq_18", qo = "_open_1s1lq_21", Oo = "_content_1s1lq_25", mt = {
2802
+ accordion: To,
2803
+ header: Po,
2804
+ icon: Ao,
2805
+ open: qo,
2806
+ content: Oo
2807
+ }, oa = ({ title: d, content: o }) => {
2808
+ const [e, s] = g.useState(!1), [i, c] = g.useState(0), l = g.useRef(null), a = () => {
2729
2809
  s(!e);
2730
2810
  };
2731
2811
  return g.useEffect(() => {
@@ -2735,10 +2815,10 @@ const Ja = (u) => {
2735
2815
  "div",
2736
2816
  {
2737
2817
  className: mt.header,
2738
- onClick: o,
2818
+ onClick: a,
2739
2819
  children: [
2740
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
2741
- /* @__PURE__ */ t.jsx("div", { className: F(mt.icon, { [mt.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2820
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
2821
+ /* @__PURE__ */ t.jsx("div", { className: V(mt.icon, { [mt.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2742
2822
  ]
2743
2823
  }
2744
2824
  ),
@@ -2748,41 +2828,41 @@ const Ja = (u) => {
2748
2828
  ref: l,
2749
2829
  className: mt.content,
2750
2830
  style: { height: `${i}px` },
2751
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
2831
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
2752
2832
  }
2753
2833
  )
2754
2834
  ] });
2755
- }, Ba = "_wrapper_1r14x_1", Sa = "_label_1r14x_9", Pa = "_input_1r14x_18", Ta = "_required_1r14x_35", qa = "_paddingless_1r14x_39", Aa = "_content_1r14x_43", Oa = "_borderless_1r14x_58", Da = "_rightIcon_1r14x_63", st = {
2756
- wrapper: Ba,
2757
- label: Sa,
2758
- input: Pa,
2759
- required: Ta,
2760
- paddingless: qa,
2761
- content: Aa,
2762
- borderless: Oa,
2763
- rightIcon: Da
2764
- }, Za = (u) => {
2835
+ }, Do = "_wrapper_1r14x_1", Eo = "_label_1r14x_9", Lo = "_input_1r14x_18", Ro = "_required_1r14x_35", Mo = "_paddingless_1r14x_39", Ho = "_content_1r14x_43", zo = "_borderless_1r14x_58", Vo = "_rightIcon_1r14x_63", nt = {
2836
+ wrapper: Do,
2837
+ label: Eo,
2838
+ input: Lo,
2839
+ required: Ro,
2840
+ paddingless: Mo,
2841
+ content: Ho,
2842
+ borderless: zo,
2843
+ rightIcon: Vo
2844
+ }, aa = (d) => {
2765
2845
  const {
2766
- onChange: a,
2846
+ onChange: o,
2767
2847
  style: e,
2768
2848
  label: s,
2769
2849
  value: i,
2770
2850
  type: c,
2771
2851
  min: l,
2772
- max: o,
2852
+ max: a,
2773
2853
  placeholder: n,
2774
2854
  disabled: r = !1,
2775
- required: _ = !1,
2776
- regex: d,
2777
- paddingless: P = !1,
2778
- borderless: x = !1,
2855
+ required: x = !1,
2856
+ regex: $,
2857
+ paddingless: p = !1,
2858
+ borderless: h = !1,
2779
2859
  editable: f = !1,
2780
- isSearch: h = !1
2781
- } = u, { themeSettings: q } = Bt(), { inputs: A } = q, [v, E] = g.useState(!1);
2782
- function I(m, O) {
2783
- if (m.startsWith("#")) {
2784
- let L, w, R;
2785
- return m.length === 7 ? (L = parseInt(m.slice(1, 3), 16), w = parseInt(m.slice(3, 5), 16), R = parseInt(m.slice(5, 7), 16)) : m.length === 4 && (L = parseInt(m[1] + m[1], 16), w = parseInt(m[2] + m[2], 16), R = parseInt(m[3] + m[3], 16)), `rgba(${L}, ${w}, ${R}, ${O})`;
2860
+ isSearch: m = !1
2861
+ } = d, { themeSettings: C } = Bt(), { inputs: q } = C, [j, E] = g.useState(!1);
2862
+ function S(u, O) {
2863
+ if (u.startsWith("#")) {
2864
+ let L, I, R;
2865
+ return u.length === 7 ? (L = parseInt(u.slice(1, 3), 16), I = parseInt(u.slice(3, 5), 16), R = parseInt(u.slice(5, 7), 16)) : u.length === 4 && (L = parseInt(u[1] + u[1], 16), I = parseInt(u[2] + u[2], 16), R = parseInt(u[3] + u[3], 16)), `rgba(${L}, ${I}, ${R}, ${O})`;
2786
2866
  }
2787
2867
  const y = {
2788
2868
  black: "#000000",
@@ -2791,20 +2871,20 @@ const Ja = (u) => {
2791
2871
  green: "#00ff00",
2792
2872
  blue: "#0000ff"
2793
2873
  // Можно добавить больше цветов
2794
- }[m.toLowerCase()];
2795
- return y ? I(y, O) : m;
2874
+ }[u.toLowerCase()];
2875
+ return y ? S(y, O) : u;
2796
2876
  }
2797
- function C(m) {
2798
- return Number(m) < 0 ? String(l) : m;
2877
+ function T(u) {
2878
+ return Number(u) < 0 ? String(l) : u;
2799
2879
  }
2800
- function M(m) {
2801
- return !_ || !d ? !0 : new RegExp(d).test(m);
2880
+ function M(u) {
2881
+ return !x || !$ ? !0 : new RegExp($).test(u);
2802
2882
  }
2803
- return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
2883
+ return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2804
2884
  s && /* @__PURE__ */ t.jsx(
2805
2885
  "label",
2806
2886
  {
2807
- className: st.label,
2887
+ className: nt.label,
2808
2888
  htmlFor: s,
2809
2889
  children: s
2810
2890
  }
@@ -2812,11 +2892,11 @@ const Ja = (u) => {
2812
2892
  /* @__PURE__ */ t.jsxs(
2813
2893
  "div",
2814
2894
  {
2815
- className: st.content,
2895
+ className: nt.content,
2816
2896
  style: {
2817
- paddingRight: A.general.height + 15,
2897
+ paddingRight: q.general.height + 15,
2818
2898
  ...e,
2819
- backgroundColor: I(A.field.color, A.field.opacity / 100)
2899
+ backgroundColor: S(q.field.color, q.field.opacity / 100)
2820
2900
  },
2821
2901
  children: [
2822
2902
  /* @__PURE__ */ t.jsx(
@@ -2824,34 +2904,34 @@ const Ja = (u) => {
2824
2904
  {
2825
2905
  id: s,
2826
2906
  type: c || "text",
2827
- onChange: (m) => {
2828
- if (c === "text") a(m.target.value);
2907
+ onChange: (u) => {
2908
+ if (c === "text") o(u.target.value);
2829
2909
  else {
2830
- const O = C(m.target.value);
2831
- a(O);
2910
+ const O = T(u.target.value);
2911
+ o(O);
2832
2912
  }
2833
2913
  },
2834
2914
  value: i,
2835
2915
  autoComplete: "off",
2836
2916
  placeholder: n || "Type something...",
2837
- className: F(st.input, {
2838
- [st.required]: v && _ && !M(i),
2839
- [st.paddingless]: P,
2840
- [st.borderless]: x
2917
+ className: V(nt.input, {
2918
+ [nt.required]: j && x && !M(i),
2919
+ [nt.paddingless]: p,
2920
+ [nt.borderless]: h
2841
2921
  }),
2842
2922
  min: c === "number" ? l : void 0,
2843
- max: c === "number" ? o : void 0,
2923
+ max: c === "number" ? a : void 0,
2844
2924
  disabled: r,
2845
2925
  onFocus: () => E(!0)
2846
2926
  }
2847
2927
  ),
2848
- h && /* @__PURE__ */ t.jsx("div", { className: st.rightIcon, children: /* @__PURE__ */ t.jsx(
2928
+ m && /* @__PURE__ */ t.jsx("div", { className: nt.rightIcon, children: /* @__PURE__ */ t.jsx(
2849
2929
  b,
2850
2930
  {
2851
2931
  name: "MagnifyingGlass",
2852
2932
  fill: "var(--icon-secondary)",
2853
- width: A.general.height,
2854
- height: A.general.height
2933
+ width: q.general.height,
2934
+ height: q.general.height
2855
2935
  }
2856
2936
  ) }),
2857
2937
  f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
@@ -2867,13 +2947,13 @@ const Ja = (u) => {
2867
2947
  }
2868
2948
  )
2869
2949
  ] });
2870
- }, Ea = "_wrapper_st58d_1", La = "_label_st58d_10", Ra = "_textarea_st58d_18", Ma = "_length_st58d_33", gt = {
2871
- wrapper: Ea,
2872
- label: La,
2873
- textarea: Ra,
2874
- length: Ma
2875
- }, to = (u) => {
2876
- const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = g.useState(s.length);
2950
+ }, Fo = "_wrapper_st58d_1", Uo = "_label_st58d_10", Yo = "_textarea_st58d_18", Go = "_length_st58d_33", gt = {
2951
+ wrapper: Fo,
2952
+ label: Uo,
2953
+ textarea: Yo,
2954
+ length: Go
2955
+ }, ca = (d) => {
2956
+ const { onChange: o, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = d, [l, a] = g.useState(s.length);
2877
2957
  return /* @__PURE__ */ t.jsxs("div", { className: gt.wrapper, children: [
2878
2958
  e && /* @__PURE__ */ t.jsx(
2879
2959
  "label",
@@ -2889,7 +2969,7 @@ const Ja = (u) => {
2889
2969
  id: e,
2890
2970
  defaultValue: s,
2891
2971
  onChange: (n) => {
2892
- o(n.target.value.length), a(n.target.value);
2972
+ a(n.target.value.length), o(n.target.value);
2893
2973
  },
2894
2974
  placeholder: c,
2895
2975
  className: gt.textarea,
@@ -2904,34 +2984,34 @@ const Ja = (u) => {
2904
2984
  ] });
2905
2985
  };
2906
2986
  export {
2907
- Ka as Accordion,
2908
- jt as Button,
2909
- gn as ButtonTypeSettings,
2910
- Ga as ButtonsSettings,
2911
- Ua as CategorySettings,
2912
- ht as ChooseImage,
2913
- no as ChooseImageModal,
2914
- ma as EmptyCart,
2915
- Ya as FormSettings,
2916
- Ja as HeaderButtons,
2987
+ oa as Accordion,
2988
+ vt as Button,
2989
+ jn as ButtonTypeSettings,
2990
+ ta as ButtonsSettings,
2991
+ Ko as CategorySettings,
2992
+ _t as ChooseImage,
2993
+ da as ChooseImageModal,
2994
+ bo as EmptyCart,
2995
+ Zo as FormSettings,
2996
+ na as HeaderButtons,
2917
2997
  b as Icon,
2918
2998
  W as InputSettings,
2919
- Za as InputUI,
2999
+ aa as InputUI,
2920
3000
  qe as ItemsSettings,
2921
- Fa as LayoutSettings,
2922
- Wa as ListingSelector,
2923
- io as Loader,
3001
+ Qo as LayoutSettings,
3002
+ ea as ListingSelector,
3003
+ ua as Loader,
2924
3004
  St as Modal,
2925
- Xa as ProductOptions,
2926
- It as RangeSelector,
3005
+ sa as ProductOptions,
3006
+ wt as RangeSelector,
2927
3007
  Z as Select,
2928
- Qa as ShareLink,
2929
- da as ShoppingButton,
2930
- ua as ShoppingModalCart,
3008
+ ia as ShareLink,
3009
+ fo as ShoppingButton,
3010
+ xo as ShoppingModalCart,
2931
3011
  K as Switch,
2932
- qt as TextSettings,
3012
+ At as TextSettings,
2933
3013
  Ct as TextareaSettings,
2934
- to as TextareaUI,
2935
- Tt as TypesText,
2936
- _a as UserInfo
3014
+ ca as TextareaUI,
3015
+ Pt as TypesText,
3016
+ jo as UserInfo
2937
3017
  };