@billgangcom/theme-lib 1.34.0 → 1.35.1

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