@billgangcom/theme-lib 1.65.2 → 1.66.0

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