@billgangcom/theme-lib 1.66.1 → 1.66.3

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