@billgangcom/theme-lib 1.52.3 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -1,21 +1,21 @@
1
- import { j as t, I as b, c as V, a as rt, S as it, R as vt, B as tt, O as dt, b as ot, u as ut, d as mt, P as ht, D as pt, e as _t, v as gt, f as ft, C as xt, g as U, h as Ct, i as nt, k as St, l as wt, m as $t, n as lt, o as F, L as Bt, p as ct, q as bt, r as Y, t as Pt, M as jt, w as yt, x as Mt, y as Nt, z as Tt } from "./index-hseNJ-Jo.js";
2
- import { H as mi, E as hi, G as pi, A as _i, T as gi, F as fi } from "./index-hseNJ-Jo.js";
3
- import f from "react";
1
+ import { j as t, I as x, c as Y, a as dt, S as ot, b as yt, B as tt, O as ut, d as at, e as mt, f as ht, P as pt, D as _t, g as gt, v as xt, h as ft, C as bt, i as H, k as St, l as it, m as wt, n as Bt, o as $t, p as rt, q as V, L as Pt, r as lt, t as jt, w as G, x as Mt, M as vt, y as Nt, z as Tt, A as kt, E as qt } from "./index-BmN4PZT1.js";
2
+ import { K as hi, G as pi, J as _i, F as gi, T as xi, H as fi } from "./index-BmN4PZT1.js";
3
+ import _ from "react";
4
4
  import "@phosphor-icons/react";
5
- const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmyb_15", Et = "_subtitle_1vmyb_22", zt = "_alignmentContent_1vmyb_29", Rt = "_alignments_1vmyb_37", Dt = "_alignment_1vmyb_8", Lt = "_circle_1vmyb_60", Ht = "_paddings_1vmyb_67", Ut = "_padding_1vmyb_67", Ft = "_active_1vmyb_91", Vt = "_input_1vmyb_98", W = {
6
- wrapper: qt,
7
- alignmentBlock: At,
8
- title: Ot,
9
- subtitle: Et,
10
- alignmentContent: zt,
11
- alignments: Rt,
5
+ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15", zt = "_subtitle_1vmyb_22", Rt = "_alignmentContent_1vmyb_29", Lt = "_alignments_1vmyb_37", Dt = "_alignment_1vmyb_8", Ht = "_circle_1vmyb_60", Ut = "_paddings_1vmyb_67", Ft = "_padding_1vmyb_67", Vt = "_active_1vmyb_91", Yt = "_input_1vmyb_98", W = {
6
+ wrapper: At,
7
+ alignmentBlock: Ot,
8
+ title: Et,
9
+ subtitle: zt,
10
+ alignmentContent: Rt,
11
+ alignments: Lt,
12
12
  alignment: Dt,
13
- circle: Lt,
14
- paddings: Ht,
15
- padding: Ut,
16
- active: Ft,
17
- input: Vt
18
- }, Yt = [
13
+ circle: Ht,
14
+ paddings: Ut,
15
+ padding: Ft,
16
+ active: Vt,
17
+ input: Yt
18
+ }, Gt = [
19
19
  "topLeft",
20
20
  "top",
21
21
  "topRight",
@@ -25,10 +25,10 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], Wt = ["left", "top", "right", "bottom"], Xn = (d) => {
29
- const { alignment: o, padding: e, setPadding: s, setAlignment: n } = d;
30
- function g(l) {
31
- switch (l) {
28
+ ], Wt = ["left", "top", "right", "bottom"], Kn = (r) => {
29
+ const { alignment: i, padding: e, setPadding: s, setAlignment: n } = r;
30
+ function h(c) {
31
+ switch (c) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function h(l) {
49
- switch (l) {
48
+ function u(c) {
49
+ switch (c) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,40 +57,40 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [c, _] = f.useState(null), [k, M] = f.useState(null);
60
+ const [o, d] = _.useState(null), [f, $] = _.useState(null);
61
61
  return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
62
62
  /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
63
63
  /* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
64
64
  /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
65
65
  /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Yt.map((l) => /* @__PURE__ */ t.jsxs(
66
+ /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Gt.map((c) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- n(l);
70
+ n(c);
71
71
  },
72
72
  className: W.alignment,
73
73
  onMouseEnter: () => {
74
- _(l);
74
+ d(c);
75
75
  },
76
76
  onMouseLeave: () => {
77
- _(null);
77
+ d(null);
78
78
  },
79
79
  children: [
80
- l !== o && c !== l && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
- l !== o && c === l && /* @__PURE__ */ t.jsx(
82
- b,
80
+ c !== i && o !== c && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
+ c !== i && o === c && /* @__PURE__ */ t.jsx(
82
+ x,
83
83
  {
84
- name: g(c),
84
+ name: h(o),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- l === o && /* @__PURE__ */ t.jsx(
91
- b,
90
+ c === i && /* @__PURE__ */ t.jsx(
91
+ x,
92
92
  {
93
- name: g(o),
93
+ name: h(i),
94
94
  fill: "#FF3F19",
95
95
  width: 22,
96
96
  height: 22
@@ -98,37 +98,37 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
98
98
  )
99
99
  ]
100
100
  },
101
- l
101
+ c
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((l) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((c) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: V(W.padding, {
107
- [W.active]: k === l
106
+ className: Y(W.padding, {
107
+ [W.active]: f === c
108
108
  }),
109
109
  onFocus: () => {
110
- M(l);
110
+ $(c);
111
111
  },
112
112
  onBlur: () => {
113
- M(null);
113
+ $(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
- b,
117
+ x,
118
118
  {
119
- name: h(l),
119
+ name: u(c),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- rt,
125
+ dt,
126
126
  {
127
127
  type: "number",
128
- value: String(e[l]),
129
- onChange: (i) => s({
128
+ value: String(e[c]),
129
+ onChange: (l) => s({
130
130
  ...e,
131
- [l]: Math.min(Number(i), 999)
131
+ [c]: Math.min(Number(l), 999)
132
132
  }),
133
133
  max: 999,
134
134
  paddingless: !0,
@@ -137,66 +137,66 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
137
137
  )
138
138
  ]
139
139
  },
140
- l
140
+ c
141
141
  )) })
142
142
  ] })
143
143
  ] })
144
144
  ] });
145
- }, Gt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Xt = "_header_82zux_12", Jt = "_text_82zux_13", Kt = "_productsBlock_82zux_14", Zt = "_top_82zux_26", te = "_itemsBlock_82zux_35", ee = "_typeTexts_82zux_41", se = "_block_82zux_48", ne = "_active_82zux_61", ie = "_products_82zux_14", oe = "_product_82zux_14", ae = "_button_82zux_80", ce = "_disabled_82zux_91", le = "_image_82zux_95", re = "_info_82zux_102", de = "_name_82zux_114", ue = "_buttons_82zux_118", me = "_modal_82zux_125", he = "_link_82zux_145", pe = "_modalOptions_82zux_151", _e = "_addButton_82zux_157", ge = "_deleteButton_82zux_179", G = {
146
- title: Gt,
147
- subtitle: Qt,
148
- header: Xt,
149
- text: Jt,
150
- productsBlock: Kt,
151
- top: Zt,
152
- itemsBlock: te,
153
- typeTexts: ee,
154
- block: se,
155
- active: ne,
156
- products: ie,
157
- product: oe,
158
- button: ae,
159
- disabled: ce,
160
- image: le,
161
- info: re,
162
- name: de,
163
- buttons: ue,
164
- modal: me,
165
- link: he,
166
- modalOptions: pe,
167
- addButton: _e,
168
- deleteButton: ge
169
- }, Jn = (d) => {
145
+ }, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Kt = "_header_82zux_12", Qt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", xe = "_deleteButton_82zux_179", J = {
146
+ title: Jt,
147
+ subtitle: Xt,
148
+ header: Kt,
149
+ text: Qt,
150
+ productsBlock: Zt,
151
+ top: te,
152
+ itemsBlock: ee,
153
+ typeTexts: se,
154
+ block: ne,
155
+ active: ie,
156
+ products: oe,
157
+ product: ae,
158
+ button: ce,
159
+ disabled: le,
160
+ image: re,
161
+ info: de,
162
+ name: ue,
163
+ buttons: me,
164
+ modal: he,
165
+ link: pe,
166
+ modalOptions: _e,
167
+ addButton: ge,
168
+ deleteButton: xe
169
+ }, Qn = (r) => {
170
170
  const {
171
- isActiveItems: o,
171
+ isActiveItems: i,
172
172
  setIsActiveItems: e,
173
173
  items: s,
174
174
  setItems: n,
175
- other: g,
176
- title: h,
177
- subtitle: c,
178
- draggable: _ = !1,
179
- withImage: k = !1,
180
- addable: M = !0,
181
- itemsOptions: l,
182
- hasRangeSelector: i = !1,
183
- rangeSelectorOptions: x,
184
- limit: v,
175
+ other: h,
176
+ title: u,
177
+ subtitle: o,
178
+ draggable: d = !1,
179
+ withImage: f = !1,
180
+ addable: $ = !0,
181
+ itemsOptions: c,
182
+ hasRangeSelector: l = !1,
183
+ rangeSelectorOptions: M,
184
+ limit: w,
185
185
  autoScrollInterval: p,
186
- deletable: y
187
- } = d;
188
- function w(a) {
189
- if (k)
190
- return a ? /* @__PURE__ */ t.jsx(
186
+ deletable: I
187
+ } = r;
188
+ function B(v) {
189
+ if (f)
190
+ return v ? /* @__PURE__ */ t.jsx(
191
191
  "img",
192
192
  {
193
- src: `https://imagedelivery.net/${a[0]}/w=1000`,
193
+ src: `https://imagedelivery.net/${v[0]}/w=1000`,
194
194
  alt: "image",
195
195
  width: 16,
196
196
  height: 16
197
197
  }
198
198
  ) : /* @__PURE__ */ t.jsx(
199
- b,
199
+ x,
200
200
  {
201
201
  name: "Image",
202
202
  width: 16,
@@ -205,12 +205,12 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
205
205
  }
206
206
  );
207
207
  }
208
- const L = (a, $ = !1) => {
209
- const q = l.find((E) => E.id === a);
210
- if (!q) return;
211
- const Q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
- _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
- b,
208
+ const g = (v, q = !1) => {
209
+ const A = c.find((S) => S.id === v);
210
+ if (!A) return;
211
+ const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
+ x,
214
214
  {
215
215
  name: "DotsSixVertical",
216
216
  hoverable: !0,
@@ -219,56 +219,56 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
219
219
  }
220
220
  ) }),
221
221
  /* @__PURE__ */ t.jsx(
222
- ot,
222
+ at,
223
223
  {
224
- onChange: (E) => {
225
- const u = [...s], C = l.find((j) => j.name === E);
226
- if (!C) return;
227
- const T = C.id, r = u.map((j) => j === a ? T : j);
228
- n([...r]);
224
+ onChange: (S) => {
225
+ const b = [...s], N = c.find((j) => j.name === S);
226
+ if (!N) return;
227
+ const O = N.id, a = b.map((j) => j === v ? O : j);
228
+ n([...a]);
229
229
  },
230
- value: q.name,
231
- options: l.filter((E) => !s.find((u) => u === E.id)).map((E) => E.name),
232
- leftAddon: w(q.images)
230
+ value: A.name,
231
+ options: c.filter((S) => !s.find((b) => b === S.id)).map((S) => S.name),
232
+ leftAddon: B(A.images)
233
233
  }
234
234
  ),
235
- $ && /* @__PURE__ */ t.jsx("div", { className: G.buttons, children: /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
236
- b,
235
+ q && /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
236
+ x,
237
237
  {
238
238
  name: "Trash",
239
239
  hoverable: !0,
240
240
  width: 20,
241
241
  height: 20,
242
242
  fill: "#C12A2A",
243
- onClick: () => n(s.filter((E) => E !== a))
243
+ onClick: () => n(s.filter((S) => S !== v))
244
244
  }
245
245
  ) }) })
246
246
  ] });
247
247
  return /* @__PURE__ */ t.jsx(
248
248
  "div",
249
249
  {
250
- className: G.product,
251
- children: Q
250
+ className: J.product,
251
+ children: L
252
252
  },
253
- a
253
+ v
254
254
  );
255
255
  };
256
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
257
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
258
- h && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: h }),
259
- o !== void 0 && /* @__PURE__ */ t.jsx(
260
- it,
256
+ return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
257
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
258
+ u && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: u }),
259
+ i !== void 0 && /* @__PURE__ */ t.jsx(
260
+ ot,
261
261
  {
262
- current: o,
263
- onChange: (a) => e == null ? void 0 : e(a)
262
+ current: i,
263
+ onChange: (v) => e == null ? void 0 : e(v)
264
264
  }
265
265
  )
266
266
  ] }),
267
- i && x && /* @__PURE__ */ t.jsx(vt, { ...x }),
268
- /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
269
- c && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: c }),
270
- s.map((a) => L(a, y)),
271
- M && /* @__PURE__ */ t.jsx(
267
+ l && M && /* @__PURE__ */ t.jsx(yt, { ...M }),
268
+ /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
269
+ o && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: o }),
270
+ s.map((v) => g(v, I)),
271
+ $ && /* @__PURE__ */ t.jsx(
272
272
  "div",
273
273
  {
274
274
  style: {
@@ -281,30 +281,30 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
281
281
  tt,
282
282
  {
283
283
  withoutHover: !0,
284
- className: V(G.button, {
285
- [G.disabled]: !!(v && v <= s.length || s.length === l.length)
284
+ className: Y(J.button, {
285
+ [J.disabled]: !!(w && w <= s.length || s.length === c.length)
286
286
  }),
287
287
  size: "s",
288
- disabled: !!(v && v <= s.length || s.length === l.length),
288
+ disabled: !!(w && w <= s.length || s.length === c.length),
289
289
  onClick: () => {
290
- const a = [...s];
291
- let $ = null;
292
- if (l) {
293
- for (let q = 0; q < l.length; q++)
294
- if (!s.find((Q) => Q === l[q].id)) {
295
- $ = l[q];
290
+ const v = [...s];
291
+ let q = null;
292
+ if (c) {
293
+ for (let A = 0; A < c.length; A++)
294
+ if (!s.find((L) => L === c[A].id)) {
295
+ q = c[A];
296
296
  break;
297
297
  }
298
298
  }
299
- a.push(($ == null ? void 0 : $.id) || l[0].id), n(a);
299
+ v.push((q == null ? void 0 : q.id) || c[0].id), n(v);
300
300
  },
301
301
  style: {
302
302
  width: "fit-content"
303
303
  },
304
- children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
304
+ children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
305
305
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
306
306
  /* @__PURE__ */ t.jsx(
307
- b,
307
+ x,
308
308
  {
309
309
  name: "Plus",
310
310
  width: 16,
@@ -317,14 +317,14 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
317
317
  }
318
318
  )
319
319
  ] }),
320
- g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g }),
320
+ h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h }),
321
321
  p !== void 0 && /* @__PURE__ */ t.jsx(
322
- rt,
322
+ dt,
323
323
  {
324
324
  label: "Auto scroll interval",
325
325
  type: "number",
326
326
  value: String(p.scrollInterval),
327
- onChange: (a) => p.setScrollInterval(Number(a)),
327
+ onChange: (v) => p.setScrollInterval(Number(v)),
328
328
  min: 0.1,
329
329
  max: 100,
330
330
  style: {
@@ -334,109 +334,109 @@ const qt = "_wrapper_1vmyb_2", At = "_alignmentBlock_1vmyb_8", Ot = "_title_1vmy
334
334
  }
335
335
  )
336
336
  ] });
337
- }, fe = "_title_roi3a_1", xe = "_subtitle_roi3a_5", be = "_header_roi3a_12", je = "_text_roi3a_13", ve = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", Ne = "_itemsBlock_roi3a_35", ke = "_typeTexts_roi3a_41", Ie = "_block_roi3a_48", Ce = "_active_roi3a_61", Se = "_products_roi3a_14", we = "_product_roi3a_14", $e = "_button_roi3a_80", Be = "_disabled_roi3a_91", Pe = "_image_roi3a_95", Me = "_info_roi3a_102", Te = "_name_roi3a_114", qe = "_buttons_roi3a_118", Ae = "_modal_roi3a_125", Oe = "_link_roi3a_145", Ee = "_modalOptions_roi3a_151", ze = "_addButton_roi3a_164", Re = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", D = {
337
+ }, fe = "_title_roi3a_1", be = "_subtitle_roi3a_5", je = "_header_roi3a_12", ve = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", Ne = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", Ce = "_block_roi3a_48", Se = "_active_roi3a_61", we = "_products_roi3a_14", Be = "_product_roi3a_14", $e = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", ze = "_modalOptions_roi3a_151", Re = "_addButton_roi3a_164", Le = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", U = {
338
338
  title: fe,
339
- subtitle: xe,
340
- header: be,
341
- text: je,
342
- productsBlock: ve,
343
- top: ye,
344
- itemsBlock: Ne,
345
- typeTexts: ke,
346
- block: Ie,
347
- active: Ce,
348
- products: Se,
349
- product: we,
339
+ subtitle: be,
340
+ header: je,
341
+ text: ve,
342
+ productsBlock: ye,
343
+ top: Ne,
344
+ itemsBlock: ke,
345
+ typeTexts: Ie,
346
+ block: Ce,
347
+ active: Se,
348
+ products: we,
349
+ product: Be,
350
350
  button: $e,
351
- disabled: Be,
352
- image: Pe,
353
- info: Me,
354
- name: Te,
355
- buttons: qe,
356
- modal: Ae,
357
- link: Oe,
358
- modalOptions: Ee,
359
- addButton: ze,
360
- deleteButton: Re,
351
+ disabled: Pe,
352
+ image: Me,
353
+ info: Te,
354
+ name: qe,
355
+ buttons: Ae,
356
+ modal: Oe,
357
+ link: Ee,
358
+ modalOptions: ze,
359
+ addButton: Re,
360
+ deleteButton: Le,
361
361
  closeIcon: De
362
362
  };
363
- function Le({ product: d, children: o }) {
363
+ function He({ product: r, children: i }) {
364
364
  const {
365
365
  attributes: e,
366
366
  listeners: s,
367
367
  setNodeRef: n,
368
- transform: g,
369
- transition: h,
370
- isDragging: c
368
+ transform: h,
369
+ transition: u,
370
+ isDragging: o
371
371
  } = ft({
372
- id: d.id
373
- }), _ = {
374
- transform: xt.Transform.toString(g),
375
- transition: h
372
+ id: r.id
373
+ }), d = {
374
+ transform: bt.Transform.toString(h),
375
+ transition: u
376
376
  };
377
377
  return /* @__PURE__ */ t.jsx(
378
378
  "div",
379
379
  {
380
380
  ref: n,
381
- style: _,
382
- className: `${D.product} ${c ? D.dragging : ""}`,
381
+ style: d,
382
+ className: `${U.product} ${o ? U.dragging : ""}`,
383
383
  ...e,
384
384
  ...s,
385
- children: o
385
+ children: i
386
386
  }
387
387
  );
388
388
  }
389
- const Kn = (d) => {
389
+ const Zn = (r) => {
390
390
  const {
391
- isActiveItems: o,
391
+ isActiveItems: i,
392
392
  setIsActiveItems: e,
393
393
  items: s,
394
394
  setItems: n,
395
- title: g,
396
- subtitle: h,
397
- editable: c = !0,
398
- draggable: _ = !1,
399
- deletable: k = !0,
400
- addable: M = !0,
401
- itemsType: l,
402
- itemsOptions: i,
403
- addableOptions: x = {},
404
- limit: v
405
- } = d, [p, y] = f.useState(null), [w, L] = f.useState(null), a = f.useRef(null), $ = ut(
406
- mt(ht, {
395
+ title: h,
396
+ subtitle: u,
397
+ editable: o = !0,
398
+ draggable: d = !1,
399
+ deletable: f = !0,
400
+ addable: $ = !0,
401
+ itemsType: c,
402
+ itemsOptions: l,
403
+ addableOptions: M = {},
404
+ limit: w
405
+ } = r, [p, I] = _.useState(null), [B, g] = _.useState(null), v = _.useRef(null), q = mt(
406
+ ht(pt, {
407
407
  activationConstraint: {
408
408
  distance: 5
409
409
  }
410
410
  })
411
411
  );
412
- f.useEffect(() => {
412
+ _.useEffect(() => {
413
413
  if (p) {
414
- const u = [...s].map((C) => C.id === p.id ? p : C);
415
- n(u);
414
+ const b = [...s].map((N) => N.id === p.id ? p : N);
415
+ n(b);
416
416
  }
417
- }, [p]), f.useEffect(() => {
418
- a.current && w && (a.current.getBoundingClientRect().height, w.top);
419
- }, [a.current, w]);
420
- const q = (u, C) => {
421
- u.stopPropagation();
422
- const T = u.target.getBoundingClientRect();
423
- L({
424
- top: T.top + window.scrollY,
425
- left: T.left - 30
426
- }), y(C);
427
- }, Q = (u) => {
428
- const { active: C, over: T } = u;
429
- if (T && C.id !== T.id) {
430
- const r = s.findIndex((S) => S.id === C.id), j = s.findIndex((S) => S.id === T.id);
431
- if (r !== -1 && j !== -1) {
432
- const S = [...s], [R] = S.splice(r, 1);
433
- S.splice(j, 0, R), n(S);
417
+ }, [p]), _.useEffect(() => {
418
+ v.current && B && (v.current.getBoundingClientRect().height, B.top);
419
+ }, [v.current, B]);
420
+ const A = (b, N) => {
421
+ b.stopPropagation();
422
+ const O = b.target.getBoundingClientRect();
423
+ g({
424
+ top: O.top + window.scrollY,
425
+ left: O.left - 30
426
+ }), I(N);
427
+ }, L = (b) => {
428
+ const { active: N, over: O } = b;
429
+ if (O && N.id !== O.id) {
430
+ const a = s.findIndex((C) => C.id === N.id), j = s.findIndex((C) => C.id === O.id);
431
+ if (a !== -1 && j !== -1) {
432
+ const C = [...s], [D] = C.splice(a, 1);
433
+ C.splice(j, 0, D), n(C);
434
434
  }
435
435
  }
436
- }, E = (u, C) => {
437
- const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
- _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
- b,
436
+ }, S = (b, N) => {
437
+ const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
+ x,
440
440
  {
441
441
  name: "DotsSixVertical",
442
442
  hoverable: !0,
@@ -444,99 +444,99 @@ const Kn = (d) => {
444
444
  height: 20
445
445
  }
446
446
  ) }),
447
- l === "select" && i && /* @__PURE__ */ t.jsx(
448
- ot,
447
+ c === "select" && l && /* @__PURE__ */ t.jsx(
448
+ at,
449
449
  {
450
- onChange: (r) => {
451
- const j = [...s], S = i.find((P) => P.name === r);
452
- if (!S) return;
453
- const R = j.map((P) => P.id === u.id ? {
454
- ...S,
450
+ onChange: (a) => {
451
+ const j = [...s], C = l.find((P) => P.name === a);
452
+ if (!C) return;
453
+ const D = j.map((P) => P.id === b.id ? {
454
+ ...C,
455
455
  name: {
456
- "en-US": r
456
+ "en-US": a
457
457
  }
458
458
  } : P);
459
- y({
460
- ...u,
459
+ I({
460
+ ...b,
461
461
  name: {
462
- "en-US": r
462
+ "en-US": a
463
463
  }
464
- }), n([...R]);
464
+ }), n([...D]);
465
465
  },
466
- value: u.name,
467
- options: i.filter((r) => !s.find((j) => j.name === r.name)).map((r) => r.name)
466
+ value: b.name,
467
+ options: l.filter((a) => !s.find((j) => j.name === a.name)).map((a) => a.name)
468
468
  }
469
469
  ),
470
- /* @__PURE__ */ t.jsxs("div", { className: D.buttons, children: [
471
- c && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
472
- b,
470
+ /* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
471
+ o && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
472
+ x,
473
473
  {
474
474
  name: "Sliders",
475
475
  hoverable: !0,
476
476
  width: 20,
477
477
  height: 20,
478
- onClick: (r) => q(r, u)
478
+ onClick: (a) => A(a, b)
479
479
  }
480
480
  ) }),
481
- k && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
482
- b,
481
+ f && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
482
+ x,
483
483
  {
484
484
  name: "Trash",
485
485
  hoverable: !0,
486
486
  width: 20,
487
487
  height: 20,
488
488
  fill: "#C12A2A",
489
- onClick: () => n(s.filter((r) => r.id !== u.id))
489
+ onClick: () => n(s.filter((a) => a.id !== b.id))
490
490
  }
491
491
  ) })
492
492
  ] })
493
493
  ] });
494
- return _ ? /* @__PURE__ */ t.jsx(
495
- Le,
494
+ return d ? /* @__PURE__ */ t.jsx(
495
+ He,
496
496
  {
497
- product: u,
498
- index: C,
499
- children: T
497
+ product: b,
498
+ index: N,
499
+ children: O
500
500
  },
501
- u.id
501
+ b.id
502
502
  ) : /* @__PURE__ */ t.jsx(
503
503
  "div",
504
504
  {
505
- className: D.product,
506
- children: T
505
+ className: U.product,
506
+ children: O
507
507
  },
508
- u.id
508
+ b.id
509
509
  );
510
510
  };
511
- return /* @__PURE__ */ t.jsxs("div", { className: D.productsBlock, children: [
512
- (g || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: D.top, children: [
513
- g && /* @__PURE__ */ t.jsx("h3", { className: D.title, children: g }),
514
- o !== void 0 && /* @__PURE__ */ t.jsx(
515
- it,
511
+ return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
512
+ (h || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
513
+ h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
514
+ i !== void 0 && /* @__PURE__ */ t.jsx(
515
+ ot,
516
516
  {
517
- current: o,
518
- onChange: (u) => e == null ? void 0 : e(u)
517
+ current: i,
518
+ onChange: (b) => e == null ? void 0 : e(b)
519
519
  }
520
520
  )
521
521
  ] }),
522
- /* @__PURE__ */ t.jsxs("div", { className: D.products, children: [
523
- h && /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: h }),
524
- _ ? /* @__PURE__ */ t.jsx(
525
- pt,
522
+ /* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
523
+ u && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: u }),
524
+ d ? /* @__PURE__ */ t.jsx(
525
+ _t,
526
526
  {
527
- sensors: $,
528
- onDragEnd: Q,
527
+ sensors: q,
528
+ onDragEnd: L,
529
529
  children: /* @__PURE__ */ t.jsx(
530
- _t,
530
+ gt,
531
531
  {
532
- items: s.map((u) => u.id),
533
- strategy: gt,
534
- children: s.map((u, C) => E(u, C))
532
+ items: s.map((b) => b.id),
533
+ strategy: xt,
534
+ children: s.map((b, N) => S(b, N))
535
535
  }
536
536
  )
537
537
  }
538
- ) : s.map((u, C) => E(u, C)),
539
- M && /* @__PURE__ */ t.jsx(
538
+ ) : s.map((b, N) => S(b, N)),
539
+ $ && /* @__PURE__ */ t.jsx(
540
540
  "div",
541
541
  {
542
542
  style: {
@@ -548,34 +548,34 @@ const Kn = (d) => {
548
548
  tt,
549
549
  {
550
550
  withoutHover: !0,
551
- className: V(D.button, {
552
- [D.disabled]: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length))
551
+ className: Y(U.button, {
552
+ [U.disabled]: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length))
553
553
  }),
554
554
  size: "s",
555
- disabled: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length)),
555
+ disabled: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length)),
556
556
  onClick: () => {
557
- const u = [...s];
558
- let C = null;
559
- if (i) {
560
- for (let T = 0; T < i.length; T++)
561
- if (!s.find((r) => r.id === i[T].id)) {
562
- C = i[T];
557
+ const b = [...s];
558
+ let N = null;
559
+ if (l) {
560
+ for (let O = 0; O < l.length; O++)
561
+ if (!s.find((a) => a.id === l[O].id)) {
562
+ N = l[O];
563
563
  break;
564
564
  }
565
565
  }
566
- l === "select" && i && u.push({
567
- name: C ? C.name : i[0].name,
568
- id: (C == null ? void 0 : C.id) || i[0].id,
569
- ...x
570
- }), n(u);
566
+ c === "select" && l && b.push({
567
+ name: N ? N.name : l[0].name,
568
+ id: (N == null ? void 0 : N.id) || l[0].id,
569
+ ...M
570
+ }), n(b);
571
571
  },
572
572
  style: {
573
573
  width: "fit-content"
574
574
  },
575
- children: /* @__PURE__ */ t.jsxs("div", { className: D.addButton, children: [
575
+ children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
576
576
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
577
577
  /* @__PURE__ */ t.jsx(
578
- b,
578
+ x,
579
579
  {
580
580
  name: "Plus",
581
581
  width: 16,
@@ -590,88 +590,89 @@ const Kn = (d) => {
590
590
  ] })
591
591
  ] });
592
592
  };
593
- function He(d) {
594
- const { product: o, children: e } = d, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: _ } = ft({
595
- id: o.id
596
- }), k = {
597
- transform: xt.Transform.toString(h),
598
- transition: c
593
+ function Ue(r) {
594
+ const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
595
+ id: i.id
596
+ }), f = {
597
+ transform: bt.Transform.toString(u),
598
+ transition: o
599
599
  };
600
600
  return /* @__PURE__ */ t.jsx(
601
601
  "div",
602
602
  {
603
- ref: g,
604
- style: k,
605
- className: `${U.product} ${_ ? U.dragging : ""}`,
603
+ ref: h,
604
+ style: f,
605
+ className: `${H.product} ${d ? H.dragging : ""}`,
606
606
  ...s,
607
607
  ...n,
608
608
  children: e
609
609
  }
610
610
  );
611
611
  }
612
- const Zn = (d) => {
612
+ const ti = (r) => {
613
613
  const {
614
- isActiveItems: o,
614
+ isActiveItems: i,
615
615
  setIsActiveItems: e,
616
616
  items: s,
617
617
  setItems: n,
618
- other: g,
619
- title: h,
620
- subtitle: c,
621
- editable: _ = !0,
622
- draggable: k = !1,
623
- withImage: M = !1,
624
- deletable: l = !0,
625
- addable: i = !0,
626
- itemsType: x,
627
- itemsPlaceholder: v = "",
618
+ other: h,
619
+ title: u,
620
+ subtitle: o,
621
+ editable: d = !0,
622
+ draggable: f = !1,
623
+ withImage: $ = !1,
624
+ deletable: c = !0,
625
+ addable: l = !0,
626
+ itemsType: M,
627
+ itemsPlaceholder: w = "",
628
628
  itemsOptions: p,
629
- hasRangeSelector: y = !1,
630
- rangeSelectorOptions: w,
631
- modalOptions: L,
632
- addableOptions: a = {}
633
- } = d, [$, q] = f.useState(null), [Q, E] = f.useState({
629
+ hasRangeSelector: I = !1,
630
+ rangeSelectorOptions: B,
631
+ modalOptions: g,
632
+ addableOptions: v = {},
633
+ limit: q
634
+ } = r, [A, L] = _.useState(null), [S, b] = _.useState({
634
635
  top: 0,
635
636
  left: 0
636
- }), [u, C] = f.useState(null), T = f.useRef(null), [r, j] = f.useState(!1), S = ut(
637
- mt(ht, {
637
+ }), [N, O] = _.useState(null), a = _.useRef(null), [j, C] = _.useState(!1), D = mt(
638
+ ht(pt, {
638
639
  activationConstraint: {
639
640
  distance: 5
640
641
  }
641
642
  })
642
643
  );
643
- f.useEffect(() => {
644
+ _.useEffect(() => {
644
645
  const m = () => {
645
- q(null), j(!1);
646
+ L(null), C(!1);
646
647
  };
647
- return document.body.addEventListener("click", m), q(null), j(!1), () => {
648
- q(null), j(!1), document.body.removeEventListener("click", m);
648
+ return document.body.addEventListener("click", m), L(null), C(!1), () => {
649
+ L(null), C(!1), document.body.removeEventListener("click", m);
649
650
  };
650
- }, []), f.useEffect(() => {
651
- if ($) {
652
- const m = [...s].map((A) => A.id === $.id ? $ : A);
651
+ }, []), _.useEffect(() => {
652
+ if (A) {
653
+ const m = [...s].map((T) => T.id === A.id ? A : T);
653
654
  n(m);
654
655
  }
655
- }, [$]), f.useEffect(() => {
656
- if (T.current && u) {
657
- const m = T.current.getBoundingClientRect().height, A = window.innerHeight;
658
- let B = u.top;
659
- B + m > A + window.scrollY - 200 && (B = A + window.scrollY - m - 200), B < 0 && (B = 10), E({
660
- top: B,
661
- left: u.left
656
+ }, [A]), _.useEffect(() => {
657
+ if (a.current && N) {
658
+ const m = a.current.getBoundingClientRect().height, T = window.innerHeight;
659
+ let E = N.top;
660
+ E + m > T + window.scrollY - 200 && (E = T + window.scrollY - m - 200), E < 0 && (E = 10), b({
661
+ top: E,
662
+ left: N.left
662
663
  });
663
664
  }
664
- }, [T.current, u]);
665
- const R = (m, A) => {
665
+ }, [a.current, N]);
666
+ const P = (m, T) => {
666
667
  m.stopPropagation();
667
- const B = m.target.getBoundingClientRect();
668
- C({
669
- top: B.top + window.scrollY,
670
- left: B.left - 30
671
- }), q(A), j(!0);
668
+ const E = m.target.getBoundingClientRect();
669
+ O({
670
+ top: E.top + window.scrollY,
671
+ left: E.left - 30
672
+ }), L(T), C(!0);
672
673
  };
673
- function P(m) {
674
- if (M)
674
+ function R(m) {
675
+ if ($)
675
676
  return m ? /* @__PURE__ */ t.jsx(
676
677
  "img",
677
678
  {
@@ -681,7 +682,7 @@ const Zn = (d) => {
681
682
  height: 16
682
683
  }
683
684
  ) : /* @__PURE__ */ t.jsx(
684
- b,
685
+ x,
685
686
  {
686
687
  name: "Image",
687
688
  width: 16,
@@ -690,20 +691,20 @@ const Zn = (d) => {
690
691
  }
691
692
  );
692
693
  }
693
- const z = (m) => {
694
- const { active: A, over: B } = m;
695
- if (B && A.id !== B.id) {
696
- const O = s.findIndex((H) => H.id === A.id), et = s.findIndex((H) => H.id === B.id);
697
- if (O !== -1 && et !== -1) {
698
- const H = [...s], [X] = H.splice(O, 1);
699
- H.splice(et, 0, X), n(H);
694
+ const K = (m) => {
695
+ const { active: T, over: E } = m;
696
+ if (E && T.id !== E.id) {
697
+ const z = s.findIndex((F) => F.id === T.id), et = s.findIndex((F) => F.id === E.id);
698
+ if (z !== -1 && et !== -1) {
699
+ const F = [...s], [X] = F.splice(z, 1);
700
+ F.splice(et, 0, X), n(F);
700
701
  }
701
702
  }
702
- }, J = (m) => {
703
- var B;
704
- const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
705
- k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
706
- b,
703
+ }, st = (m) => {
704
+ var E;
705
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
706
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
707
+ x,
707
708
  {
708
709
  name: "DotsSixVertical",
709
710
  hoverable: !0,
@@ -711,140 +712,140 @@ const Zn = (d) => {
711
712
  height: 20
712
713
  }
713
714
  ) }),
714
- x === "select" && p && /* @__PURE__ */ t.jsx(
715
- ot,
715
+ M === "select" && p && /* @__PURE__ */ t.jsx(
716
+ at,
716
717
  {
717
- onChange: (O) => {
718
- const H = [...s].map((X) => X.id === m.id ? {
718
+ onChange: (z) => {
719
+ const F = [...s].map((X) => X.id === m.id ? {
719
720
  ...m,
720
721
  name: {
721
- "en-US": O
722
+ "en-US": z
722
723
  }
723
724
  } : X);
724
- q({
725
+ L({
725
726
  ...m,
726
727
  name: {
727
- "en-US": O
728
+ "en-US": z
728
729
  }
729
- }), n([...H]);
730
+ }), n([...F]);
730
731
  },
731
732
  value: m.name["en-US"],
732
733
  options: p.filter(
733
- (O) => !s.find((et) => et.name["en-US"] === O)
734
+ (z) => !s.find((et) => et.name["en-US"] === z)
734
735
  ),
735
- leftAddon: P(m.images)
736
+ leftAddon: R(m.images)
736
737
  }
737
738
  ),
738
- x === "input" && /* @__PURE__ */ t.jsx(
739
- rt,
739
+ M === "input" && /* @__PURE__ */ t.jsx(
740
+ dt,
740
741
  {
741
- onChange: (O) => {
742
- const H = [...s].map((X) => X.id === m.id ? {
742
+ onChange: (z) => {
743
+ const F = [...s].map((X) => X.id === m.id ? {
743
744
  ...m,
744
745
  name: {
745
- "en-US": O
746
+ "en-US": z
746
747
  }
747
748
  } : X);
748
- n([...H]);
749
+ n([...F]);
749
750
  },
750
751
  value: m.name["en-US"],
751
- placeholder: v
752
+ placeholder: w
752
753
  }
753
754
  ),
754
- x === "image" && /* @__PURE__ */ t.jsx(
755
- St,
755
+ M === "image" && /* @__PURE__ */ t.jsx(
756
+ wt,
756
757
  {
757
- onChange: (O) => {
758
- const H = [...s].map((X) => X.id === m.id ? {
758
+ onChange: (z) => {
759
+ const F = [...s].map((X) => X.id === m.id ? {
759
760
  ...m,
760
- images: O
761
+ images: z
761
762
  } : X);
762
- n([...H]);
763
+ n([...F]);
763
764
  },
764
- activeImage: (B = s.find((O) => O.id === m.id)) == null ? void 0 : B.images[0]
765
+ activeImage: (E = s.find((z) => z.id === m.id)) == null ? void 0 : E.images[0]
765
766
  }
766
767
  ),
767
- /* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
768
- _ && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
769
- b,
768
+ /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
769
+ d && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
770
+ x,
770
771
  {
771
772
  name: "Sliders",
772
773
  hoverable: !0,
773
774
  width: 20,
774
775
  height: 20,
775
- onClick: (O) => R(O, m)
776
+ onClick: (z) => P(z, m)
776
777
  }
777
778
  ) }),
778
- l && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
779
- b,
779
+ c && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
780
+ x,
780
781
  {
781
782
  name: "Trash",
782
783
  hoverable: !0,
783
784
  width: 20,
784
785
  height: 20,
785
786
  fill: "#C12A2A",
786
- onClick: () => n(s.filter((O) => O.id !== m.id))
787
+ onClick: () => n(s.filter((z) => z.id !== m.id))
787
788
  }
788
789
  ) })
789
790
  ] })
790
791
  ] });
791
- return k ? /* @__PURE__ */ t.jsx(
792
- He,
792
+ return f ? /* @__PURE__ */ t.jsx(
793
+ Ue,
793
794
  {
794
795
  product: m,
795
- children: A
796
+ children: T
796
797
  },
797
798
  m.id
798
799
  ) : /* @__PURE__ */ t.jsx(
799
800
  "div",
800
801
  {
801
- className: U.product,
802
- children: A
802
+ className: H.product,
803
+ children: T
803
804
  },
804
805
  m.id
805
806
  );
806
807
  };
807
- return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
808
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
809
- h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
810
- o !== void 0 && /* @__PURE__ */ t.jsx(
811
- it,
808
+ return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
809
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
810
+ u && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: u }),
811
+ i !== void 0 && /* @__PURE__ */ t.jsx(
812
+ ot,
812
813
  {
813
- current: o,
814
+ current: i,
814
815
  onChange: (m) => e == null ? void 0 : e(m)
815
816
  }
816
817
  )
817
818
  ] }),
818
- $ && _ && L && r && /* @__PURE__ */ t.jsx(
819
- Ct,
819
+ A && d && g && j && /* @__PURE__ */ t.jsx(
820
+ St,
820
821
  {
821
- ref: T,
822
- activeItem: $,
823
- setActiveItem: q,
824
- popupPosition: Q,
825
- modalOptions: L,
826
- setIsOpenModal: j
822
+ ref: a,
823
+ activeItem: A,
824
+ setActiveItem: L,
825
+ popupPosition: S,
826
+ modalOptions: g,
827
+ setIsOpenModal: C
827
828
  }
828
829
  ),
829
- y && w && /* @__PURE__ */ t.jsx(vt, { ...w }),
830
- /* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
831
- c && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: c }),
832
- k ? /* @__PURE__ */ t.jsx(
833
- pt,
830
+ I && B && /* @__PURE__ */ t.jsx(yt, { ...B }),
831
+ /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
832
+ o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
833
+ f ? /* @__PURE__ */ t.jsx(
834
+ _t,
834
835
  {
835
- sensors: S,
836
- onDragEnd: z,
836
+ sensors: D,
837
+ onDragEnd: K,
837
838
  children: /* @__PURE__ */ t.jsx(
838
- _t,
839
+ gt,
839
840
  {
840
841
  items: s.map((m) => m.id),
841
- strategy: gt,
842
- children: s.map((m) => J(m))
842
+ strategy: xt,
843
+ children: s.map((m) => st(m))
843
844
  }
844
845
  )
845
846
  }
846
- ) : s.map((m) => J(m)),
847
- i && /* @__PURE__ */ t.jsx(
847
+ ) : s.map((m) => st(m)),
848
+ l && /* @__PURE__ */ t.jsx(
848
849
  "div",
849
850
  {
850
851
  style: {
@@ -856,49 +857,52 @@ const Zn = (d) => {
856
857
  tt,
857
858
  {
858
859
  withoutHover: !0,
859
- className: U.button,
860
+ className: Y(H.button, {
861
+ [H.disabled]: !!(q && q <= s.length)
862
+ }),
860
863
  size: "s",
864
+ disabled: !!(q && q <= s.length),
861
865
  onClick: () => {
862
866
  const m = [...s];
863
- let A = null;
867
+ let T = null;
864
868
  if (p) {
865
- for (let B = 0; B < p.length; B++)
866
- if (!s.find((O) => O.name["en-US"] === p[B])) {
867
- A = p[B];
869
+ for (let E = 0; E < p.length; E++)
870
+ if (!s.find((z) => z.name["en-US"] === p[E])) {
871
+ T = p[E];
868
872
  break;
869
873
  }
870
874
  }
871
- x === "select" && p ? m.push({
875
+ M === "select" && p ? m.push({
872
876
  name: {
873
- "en-US": A || p[0]
877
+ "en-US": T || p[0]
874
878
  },
875
- id: nt(),
876
- ...a,
879
+ id: it(),
880
+ ...v,
877
881
  maxSymbols: 100
878
882
  // пример значения
879
- }) : x === "input" ? m.push({
883
+ }) : M === "input" ? m.push({
880
884
  name: {
881
885
  "en-US": ""
882
886
  },
883
- id: nt(),
884
- ...a,
887
+ id: it(),
888
+ ...v,
885
889
  maxSymbols: 100
886
890
  }) : m.push({
887
891
  name: {
888
892
  "en-US": `Image ${s.length + 1}`
889
893
  },
890
- id: nt(),
891
- ...a,
894
+ id: it(),
895
+ ...v,
892
896
  maxSymbols: 100
893
897
  }), n(m);
894
898
  },
895
899
  style: {
896
900
  width: "fit-content"
897
901
  },
898
- children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
902
+ children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
899
903
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
900
904
  /* @__PURE__ */ t.jsx(
901
- b,
905
+ x,
902
906
  {
903
907
  name: "Plus",
904
908
  width: 16,
@@ -911,101 +915,101 @@ const Zn = (d) => {
911
915
  }
912
916
  )
913
917
  ] }),
914
- g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
918
+ h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
915
919
  ] });
916
- }, Ue = "_subtitle_jql1y_1", Fe = "_header_jql1y_8", Ve = "_text_jql1y_9", Ye = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Ge = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Xe = "_typeTexts_jql1y_38", Je = "_block_jql1y_45", Ke = "_active_jql1y_58", Ze = "_products_jql1y_10", ts = "_product_jql1y_10", es = "_button_jql1y_11", ss = "_image_jql1y_88", ns = "_info_jql1y_95", is = "_name_jql1y_107", os = "_buttons_jql1y_11", as = "_modal_jql1y_118", cs = "_other_jql1y_138", ls = "_options_jql1y_144", rs = "_addButton_jql1y_150", ds = "_deleteButton_jql1y_165", K = {
917
- subtitle: Ue,
918
- header: Fe,
919
- text: Ve,
920
- productsBlock: Ye,
920
+ }, Fe = "_subtitle_jql1y_1", Ve = "_header_jql1y_8", Ye = "_text_jql1y_9", Ge = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Je = "_top_jql1y_23", Xe = "_itemsBlock_jql1y_32", Ke = "_typeTexts_jql1y_38", Qe = "_block_jql1y_45", Ze = "_active_jql1y_58", ts = "_products_jql1y_10", es = "_product_jql1y_10", ss = "_button_jql1y_11", ns = "_image_jql1y_88", is = "_info_jql1y_95", os = "_name_jql1y_107", as = "_buttons_jql1y_11", cs = "_modal_jql1y_118", ls = "_other_jql1y_138", rs = "_options_jql1y_144", ds = "_addButton_jql1y_150", us = "_deleteButton_jql1y_165", Q = {
921
+ subtitle: Fe,
922
+ header: Ve,
923
+ text: Ye,
924
+ productsBlock: Ge,
921
925
  buttonsBlock: We,
922
- top: Ge,
923
- itemsBlock: Qe,
924
- typeTexts: Xe,
925
- block: Je,
926
- active: Ke,
927
- products: Ze,
928
- product: ts,
929
- button: es,
930
- image: ss,
931
- info: ns,
932
- name: is,
933
- buttons: os,
934
- modal: as,
935
- other: cs,
936
- options: ls,
937
- addButton: rs,
938
- deleteButton: ds
939
- }, us = (d) => {
940
- const { buttons: o, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: g = !0 } = d, { pages: h } = wt(), [c, _] = f.useState(null), [k, M] = f.useState({
926
+ top: Je,
927
+ itemsBlock: Xe,
928
+ typeTexts: Ke,
929
+ block: Qe,
930
+ active: Ze,
931
+ products: ts,
932
+ product: es,
933
+ button: ss,
934
+ image: ns,
935
+ info: is,
936
+ name: os,
937
+ buttons: as,
938
+ modal: cs,
939
+ other: ls,
940
+ options: rs,
941
+ addButton: ds,
942
+ deleteButton: us
943
+ }, ms = (r) => {
944
+ const { buttons: i, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: h = !0 } = r, { pages: u } = Bt(), [o, d] = _.useState(null), [f, $] = _.useState({
941
945
  top: 0,
942
946
  left: 0
943
- }), [l, i] = f.useState(null), x = f.useRef(null);
944
- f.useEffect(() => {
945
- if (c) {
946
- const p = [...o].map((y) => y.id === c.id ? c : y);
947
+ }), [c, l] = _.useState(null), M = _.useRef(null);
948
+ _.useEffect(() => {
949
+ if (o) {
950
+ const p = [...i].map((I) => I.id === o.id ? o : I);
947
951
  e(p);
948
952
  }
949
- }, [c]), f.useEffect(() => {
950
- if (x.current && l) {
951
- const p = x.current.getBoundingClientRect().height, y = window.innerHeight;
952
- let w = l.top;
953
- w + p > y + window.scrollY - 200 && (w = y + window.scrollY - p - 200), w < 0 && (w = 10), M({
954
- top: w,
955
- left: l.left
953
+ }, [o]), _.useEffect(() => {
954
+ if (M.current && c) {
955
+ const p = M.current.getBoundingClientRect().height, I = window.innerHeight;
956
+ let B = c.top;
957
+ B + p > I + window.scrollY - 200 && (B = I + window.scrollY - p - 200), B < 0 && (B = 10), $({
958
+ top: B,
959
+ left: c.left
956
960
  });
957
961
  }
958
- }, [x.current, l]);
959
- const v = (p, y) => {
962
+ }, [M.current, c]);
963
+ const w = (p, I) => {
960
964
  p.stopPropagation();
961
- const w = p.target.getBoundingClientRect();
962
- i({
963
- top: w.top + window.scrollY - 70,
964
- left: w.left - (n ? 30 : 65)
965
- }), _(y);
965
+ const B = p.target.getBoundingClientRect();
966
+ l({
967
+ top: B.top + window.scrollY - 70,
968
+ left: B.left - (n ? 30 : 65)
969
+ }), d(I);
966
970
  };
967
- return /* @__PURE__ */ t.jsxs("div", { className: K.products, children: [
968
- /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Button Type" }),
969
- o.map((p) => /* @__PURE__ */ t.jsxs(
971
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
972
+ /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Button Type" }),
973
+ i.map((p) => /* @__PURE__ */ t.jsxs(
970
974
  "div",
971
975
  {
972
- className: K.product,
976
+ className: Q.product,
973
977
  children: [
974
978
  /* @__PURE__ */ t.jsx(
975
- ot,
979
+ at,
976
980
  {
977
- onChange: (y) => {
978
- const L = [...o].map((a) => a.id === p.id ? {
981
+ onChange: (I) => {
982
+ const g = [...i].map((v) => v.id === p.id ? {
979
983
  ...p,
980
- type: y
981
- } : a);
982
- e(L);
984
+ type: I
985
+ } : v);
986
+ e(g);
983
987
  },
984
988
  value: p.type,
985
989
  options: ["Primary", "Secondary", "Tertiary"]
986
990
  }
987
991
  ),
988
- /* @__PURE__ */ t.jsxs("div", { className: K.buttons, children: [
989
- /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
990
- b,
992
+ /* @__PURE__ */ t.jsxs("div", { className: Q.buttons, children: [
993
+ /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
994
+ x,
991
995
  {
992
996
  name: "Sliders",
993
997
  hoverable: !0,
994
998
  width: 20,
995
999
  height: 20,
996
- onClick: (y) => {
997
- v(y, p);
1000
+ onClick: (I) => {
1001
+ w(I, p);
998
1002
  }
999
1003
  }
1000
1004
  ) }),
1001
- s && /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
1002
- b,
1005
+ s && /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
1006
+ x,
1003
1007
  {
1004
1008
  name: "Trash",
1005
1009
  hoverable: !0,
1006
1010
  onClick: () => {
1007
- const y = o.filter((w) => w.id !== p.id);
1008
- e(y);
1011
+ const I = i.filter((B) => B.id !== p.id);
1012
+ e(I);
1009
1013
  },
1010
1014
  width: 20,
1011
1015
  height: 20,
@@ -1017,14 +1021,14 @@ const Zn = (d) => {
1017
1021
  },
1018
1022
  p.id
1019
1023
  )),
1020
- c && /* @__PURE__ */ t.jsx(
1024
+ o && /* @__PURE__ */ t.jsx(
1021
1025
  $t,
1022
1026
  {
1023
- ref: x,
1024
- activeButton: c,
1025
- setActiveButton: _,
1026
- popupPosition: k,
1027
- editableLink: g
1027
+ ref: M,
1028
+ activeButton: o,
1029
+ setActiveButton: d,
1030
+ popupPosition: f,
1031
+ editableLink: h
1028
1032
  }
1029
1033
  ),
1030
1034
  n && /* @__PURE__ */ t.jsx(
@@ -1039,39 +1043,39 @@ const Zn = (d) => {
1039
1043
  tt,
1040
1044
  {
1041
1045
  withoutHover: !0,
1042
- className: K.button,
1046
+ className: Q.button,
1043
1047
  size: "s",
1044
1048
  onClick: () => {
1045
- const p = [...o];
1046
- g ? p.push({
1049
+ const p = [...i];
1050
+ h ? p.push({
1047
1051
  type: "Primary",
1048
- id: nt(),
1052
+ id: it(),
1049
1053
  typesText: [],
1050
1054
  text: {
1051
1055
  "en-US": "Button Name"
1052
1056
  },
1053
1057
  destination: "Go to Page",
1054
- page: h ? Object.values(h)[0].name : "Home",
1058
+ page: u ? Object.values(u)[0].name : "Home",
1055
1059
  openInNewTab: !1
1056
1060
  }) : p.push({
1057
1061
  type: "Primary",
1058
- id: nt(),
1062
+ id: it(),
1059
1063
  typesText: [],
1060
1064
  text: {
1061
1065
  "en-US": "Create Ticket"
1062
1066
  },
1063
1067
  destination: "Go to Page",
1064
- page: h ? Object.values(h)[0].name : "Home",
1068
+ page: u ? Object.values(u)[0].name : "Home",
1065
1069
  openInNewTab: !1
1066
1070
  }), e(p);
1067
1071
  },
1068
1072
  style: {
1069
1073
  width: "fit-content"
1070
1074
  },
1071
- children: /* @__PURE__ */ t.jsxs("div", { className: K.addButton, children: [
1075
+ children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
1072
1076
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1073
1077
  /* @__PURE__ */ t.jsx(
1074
- b,
1078
+ x,
1075
1079
  {
1076
1080
  name: "Plus",
1077
1081
  width: 16,
@@ -1084,110 +1088,120 @@ const Zn = (d) => {
1084
1088
  }
1085
1089
  )
1086
1090
  ] });
1087
- }, ti = (d) => {
1088
- const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: n, editableLink: g = !0 } = d;
1089
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: lt.buttonsBlock, children: [
1090
- /* @__PURE__ */ t.jsxs("div", { className: lt.top, children: [
1091
- /* @__PURE__ */ t.jsx("h3", { className: lt.title, children: "Buttons" }),
1091
+ }, ei = (r) => {
1092
+ const {
1093
+ isActiveButtons: i,
1094
+ setIsActiveButtons: e,
1095
+ buttons: s,
1096
+ setButtons: n,
1097
+ editableLink: h = !0,
1098
+ addable: u = !0,
1099
+ deletable: o = !0
1100
+ } = r;
1101
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
1102
+ /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
1103
+ /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
1092
1104
  /* @__PURE__ */ t.jsx(
1093
- it,
1105
+ ot,
1094
1106
  {
1095
- current: o,
1096
- onChange: (h) => e(h)
1107
+ current: i,
1108
+ onChange: (d) => e(d)
1097
1109
  }
1098
1110
  )
1099
1111
  ] }),
1100
- o && /* @__PURE__ */ t.jsx(
1101
- us,
1112
+ i && /* @__PURE__ */ t.jsx(
1113
+ ms,
1102
1114
  {
1103
1115
  buttons: s,
1104
1116
  setButtons: n,
1105
- editableLink: g
1117
+ editableLink: h,
1118
+ addable: u,
1119
+ deletable: o
1106
1120
  }
1107
1121
  )
1108
1122
  ] }) });
1109
1123
  };
1110
- function ms(d) {
1111
- const { product: o, children: e } = d, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: _ } = ft({
1112
- id: String(o.listingId)
1113
- }), k = {
1114
- transform: xt.Transform.toString(h),
1115
- transition: c
1124
+ function hs(r) {
1125
+ const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
1126
+ id: String(i.listingId)
1127
+ }), f = {
1128
+ transform: bt.Transform.toString(u),
1129
+ transition: o
1116
1130
  };
1117
1131
  return /* @__PURE__ */ t.jsx(
1118
1132
  "div",
1119
1133
  {
1120
- ref: g,
1121
- style: k,
1122
- className: `${F.product} ${_ ? F.dragging : ""}`,
1134
+ ref: h,
1135
+ style: f,
1136
+ className: `${V.product} ${d ? V.dragging : ""}`,
1123
1137
  ...s,
1124
1138
  ...n,
1125
1139
  children: e
1126
1140
  }
1127
1141
  );
1128
1142
  }
1129
- const ei = (d) => {
1143
+ const si = (r) => {
1130
1144
  const {
1131
- isActiveItems: o,
1145
+ isActiveItems: i,
1132
1146
  setIsActiveItems: e,
1133
1147
  items: s,
1134
1148
  setItems: n,
1135
- other: g,
1136
- title: h,
1137
- subtitle: c,
1138
- editable: _ = !0,
1139
- draggable: k = !1,
1140
- withImage: M = !1,
1141
- deletable: l = !0,
1142
- addable: i = !0,
1143
- itemsType: x,
1144
- itemsOptions: v
1145
- } = d, [p, y] = f.useState(
1149
+ other: h,
1150
+ title: u,
1151
+ subtitle: o,
1152
+ editable: d = !0,
1153
+ draggable: f = !1,
1154
+ withImage: $ = !1,
1155
+ deletable: c = !0,
1156
+ addable: l = !0,
1157
+ itemsType: M,
1158
+ itemsOptions: w
1159
+ } = r, [p, I] = _.useState(
1146
1160
  null
1147
- ), [w, L] = f.useState({
1161
+ ), [B, g] = _.useState({
1148
1162
  top: 0,
1149
1163
  left: 0
1150
- }), [a, $] = f.useState(!1), q = ut(
1151
- mt(ht, {
1164
+ }), [v, q] = _.useState(!1), A = mt(
1165
+ ht(pt, {
1152
1166
  activationConstraint: {
1153
1167
  distance: 5
1154
1168
  }
1155
1169
  })
1156
1170
  );
1157
- f.useEffect(() => {
1158
- const r = () => {
1159
- y(null), $(!1);
1171
+ _.useEffect(() => {
1172
+ const a = () => {
1173
+ I(null), q(!1);
1160
1174
  };
1161
- return document.body.addEventListener("click", r), y(null), $(!1), () => {
1162
- y(null), $(!1), document.body.removeEventListener("click", r);
1175
+ return document.body.addEventListener("click", a), I(null), q(!1), () => {
1176
+ I(null), q(!1), document.body.removeEventListener("click", a);
1163
1177
  };
1164
- }, []), f.useEffect(() => {
1178
+ }, []), _.useEffect(() => {
1165
1179
  if (p) {
1166
- const r = [...s].map((j) => j.listingId === p.listingId ? p : j);
1167
- n(r);
1180
+ const a = [...s].map((j) => j.listingId === p.listingId ? p : j);
1181
+ n(a);
1168
1182
  }
1169
1183
  }, [p]);
1170
- const Q = (r, j) => {
1171
- r.stopPropagation();
1172
- const S = r.target.getBoundingClientRect(), R = 100, P = window.innerHeight;
1173
- let z = S.top + window.scrollY;
1174
- z + R > P && (z = P - R - 20), $(!0), L({
1175
- top: z - 80,
1176
- left: S.left - 30
1177
- }), y(j);
1184
+ const L = (a, j) => {
1185
+ a.stopPropagation();
1186
+ const C = a.target.getBoundingClientRect(), D = 100, P = window.innerHeight;
1187
+ let R = C.top + window.scrollY;
1188
+ R + D > P && (R = P - D - 20), q(!0), g({
1189
+ top: R - 80,
1190
+ left: C.left - 30
1191
+ }), I(j);
1178
1192
  };
1179
- function E(r) {
1180
- if (M)
1181
- return r ? /* @__PURE__ */ t.jsx(
1193
+ function S(a) {
1194
+ if ($)
1195
+ return a ? /* @__PURE__ */ t.jsx(
1182
1196
  "img",
1183
1197
  {
1184
- src: `https://imagedelivery.net/${r}/w=1000`,
1198
+ src: `https://imagedelivery.net/${a}/w=1000`,
1185
1199
  alt: "image",
1186
1200
  width: 16,
1187
1201
  height: 16
1188
1202
  }
1189
1203
  ) : /* @__PURE__ */ t.jsx(
1190
- b,
1204
+ x,
1191
1205
  {
1192
1206
  name: "Image",
1193
1207
  width: 16,
@@ -1196,21 +1210,21 @@ const ei = (d) => {
1196
1210
  }
1197
1211
  );
1198
1212
  }
1199
- const u = (r) => {
1200
- const { active: j, over: S } = r;
1201
- if (S && j.id !== S.id) {
1202
- const R = s.findIndex((z) => String(z.listingId) === j.id), P = s.findIndex((z) => String(z.listingId) === S.id);
1203
- if (R !== -1 && P !== -1) {
1204
- const z = [...s], [J] = z.splice(R, 1);
1205
- z.splice(P, 0, J), n(z);
1213
+ const b = (a) => {
1214
+ const { active: j, over: C } = a;
1215
+ if (C && j.id !== C.id) {
1216
+ const D = s.findIndex((R) => String(R.listingId) === j.id), P = s.findIndex((R) => String(R.listingId) === C.id);
1217
+ if (D !== -1 && P !== -1) {
1218
+ const R = [...s], [K] = R.splice(D, 1);
1219
+ R.splice(P, 0, K), n(R);
1206
1220
  }
1207
1221
  }
1208
- }, C = (r, j) => {
1209
- const S = v.find((P) => r.listingId === P.id);
1210
- if (!S) return null;
1211
- const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1212
- k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1213
- b,
1222
+ }, N = (a, j) => {
1223
+ const C = w.find((P) => a.listingId === P.id);
1224
+ if (!C) return null;
1225
+ const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1226
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1227
+ x,
1214
1228
  {
1215
1229
  name: "DotsSixVertical",
1216
1230
  hoverable: !0,
@@ -1218,108 +1232,108 @@ const ei = (d) => {
1218
1232
  height: 20
1219
1233
  }
1220
1234
  ) }),
1221
- x === "select" && /* @__PURE__ */ t.jsx(
1222
- ot,
1235
+ M === "select" && /* @__PURE__ */ t.jsx(
1236
+ at,
1223
1237
  {
1224
1238
  onChange: (P) => {
1225
- const z = [...s], J = v.find((B) => B.productData.name === P);
1226
- if (!J) return;
1227
- const m = {
1228
- listingId: J.id,
1229
- image: J.productData.images.length > 0 ? J.productData.images[0].cfId : ""
1230
- }, A = z.map((B) => B.listingId === r.listingId ? m : B);
1231
- y(m), n([...A]);
1239
+ const R = [...s], K = w.find((T) => T.productData.name === P);
1240
+ if (!K) return;
1241
+ const st = {
1242
+ listingId: K.id,
1243
+ image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
1244
+ }, m = R.map((T) => T.listingId === a.listingId ? st : T);
1245
+ I(st), n([...m]);
1232
1246
  },
1233
- value: S.productData.name,
1247
+ value: C.productData.name,
1234
1248
  options: [
1235
- ...v.filter((P) => !s.find((z) => z.listingId === P.id)).map((P) => P.productData.name)
1249
+ ...w.filter((P) => !s.find((R) => R.listingId === P.id)).map((P) => P.productData.name)
1236
1250
  ],
1237
- leftAddon: E(
1238
- r.image || S.productData.images.length > 0 && S.productData.images[0].cfId || ""
1251
+ leftAddon: S(
1252
+ a.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
1239
1253
  )
1240
1254
  },
1241
1255
  j
1242
1256
  ),
1243
- /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
1244
- _ && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1245
- b,
1257
+ /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
1258
+ d && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1259
+ x,
1246
1260
  {
1247
1261
  name: "Sliders",
1248
1262
  hoverable: !0,
1249
1263
  width: 20,
1250
1264
  height: 20,
1251
- onClick: (P) => Q(P, r)
1265
+ onClick: (P) => L(P, a)
1252
1266
  }
1253
1267
  ) }),
1254
- l && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1255
- b,
1268
+ c && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1269
+ x,
1256
1270
  {
1257
1271
  name: "Trash",
1258
1272
  hoverable: !0,
1259
1273
  width: 20,
1260
1274
  height: 20,
1261
1275
  fill: "#C12A2A",
1262
- onClick: () => n(s.filter((P) => P !== r))
1276
+ onClick: () => n(s.filter((P) => P !== a))
1263
1277
  }
1264
1278
  ) })
1265
1279
  ] })
1266
1280
  ] });
1267
- return k ? /* @__PURE__ */ t.jsx(
1268
- ms,
1281
+ return f ? /* @__PURE__ */ t.jsx(
1282
+ hs,
1269
1283
  {
1270
- product: r,
1271
- children: R
1284
+ product: a,
1285
+ children: D
1272
1286
  },
1273
- r.listingId
1287
+ a.listingId
1274
1288
  ) : /* @__PURE__ */ t.jsx(
1275
1289
  "div",
1276
1290
  {
1277
- className: F.product,
1278
- children: R
1291
+ className: V.product,
1292
+ children: D
1279
1293
  },
1280
- r.listingId
1294
+ a.listingId
1281
1295
  );
1282
- }, T = f.useRef(null);
1283
- return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
1284
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
1285
- h && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: h }),
1286
- o !== void 0 && /* @__PURE__ */ t.jsx(
1287
- it,
1296
+ }, O = _.useRef(null);
1297
+ return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
1298
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1299
+ u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
1300
+ i !== void 0 && /* @__PURE__ */ t.jsx(
1301
+ ot,
1288
1302
  {
1289
- current: o,
1290
- onChange: (r) => e == null ? void 0 : e(r)
1303
+ current: i,
1304
+ onChange: (a) => e == null ? void 0 : e(a)
1291
1305
  }
1292
1306
  )
1293
1307
  ] }),
1294
- a && p && /* @__PURE__ */ t.jsx(
1295
- Bt,
1308
+ v && p && /* @__PURE__ */ t.jsx(
1309
+ Pt,
1296
1310
  {
1297
- ref: T,
1311
+ ref: O,
1298
1312
  activeItem: p,
1299
- setActiveItem: y,
1300
- setIsOpenModal: $,
1301
- popupPosition: w,
1302
- itemsOptions: v
1313
+ setActiveItem: I,
1314
+ setIsOpenModal: q,
1315
+ popupPosition: B,
1316
+ itemsOptions: w
1303
1317
  }
1304
1318
  ),
1305
- o && /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
1306
- c && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: c }),
1307
- k ? /* @__PURE__ */ t.jsx(
1308
- pt,
1319
+ i && /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
1320
+ o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
1321
+ f ? /* @__PURE__ */ t.jsx(
1322
+ _t,
1309
1323
  {
1310
- sensors: q,
1311
- onDragEnd: u,
1324
+ sensors: A,
1325
+ onDragEnd: b,
1312
1326
  children: /* @__PURE__ */ t.jsx(
1313
- _t,
1327
+ gt,
1314
1328
  {
1315
- items: s.map((r) => String(r.listingId)),
1316
- strategy: gt,
1317
- children: s.map((r, j) => C(r, j))
1329
+ items: s.map((a) => String(a.listingId)),
1330
+ strategy: xt,
1331
+ children: s.map((a, j) => N(a, j))
1318
1332
  }
1319
1333
  )
1320
1334
  }
1321
- ) : s.map((r, j) => C(r, j)),
1322
- i && /* @__PURE__ */ t.jsx(
1335
+ ) : s.map((a, j) => N(a, j)),
1336
+ l && /* @__PURE__ */ t.jsx(
1323
1337
  "div",
1324
1338
  {
1325
1339
  style: {
@@ -1331,28 +1345,28 @@ const ei = (d) => {
1331
1345
  tt,
1332
1346
  {
1333
1347
  withoutHover: !0,
1334
- className: F.button,
1348
+ className: V.button,
1335
1349
  size: "s",
1336
1350
  onClick: () => {
1337
- const r = [...s];
1338
- for (let j = 0; j < v.length; j++)
1339
- if (!s.find((S) => S.listingId === v[j].id)) {
1340
- r.push({
1341
- listingId: v[j].id,
1342
- image: v[j].productData.images.length > 0 ? v[j].productData.images[0].cfId : ""
1351
+ const a = [...s];
1352
+ for (let j = 0; j < w.length; j++)
1353
+ if (!s.find((C) => C.listingId === w[j].id)) {
1354
+ a.push({
1355
+ listingId: w[j].id,
1356
+ image: w[j].productData.images.length > 0 ? w[j].productData.images[0].cfId : ""
1343
1357
  });
1344
1358
  break;
1345
1359
  }
1346
- n(r);
1360
+ n(a);
1347
1361
  },
1348
- disabled: s.length === v.length,
1362
+ disabled: s.length === w.length,
1349
1363
  style: {
1350
1364
  width: "fit-content"
1351
1365
  },
1352
- children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
1366
+ children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
1353
1367
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1354
1368
  /* @__PURE__ */ t.jsx(
1355
- b,
1369
+ x,
1356
1370
  {
1357
1371
  name: "Plus",
1358
1372
  width: 16,
@@ -1365,151 +1379,151 @@ const ei = (d) => {
1365
1379
  }
1366
1380
  )
1367
1381
  ] }),
1368
- o && g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
1382
+ i && h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
1369
1383
  ] });
1370
- }, hs = "_options_6cemk_1", ps = "_price_6cemk_12", _s = "_oldPrice_6cemk_19", gs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", xs = "_appearAndBounce_6cemk_1", bs = "_meta_6cemk_52", js = "_info_6cemk_58", vs = "_infoRight_6cemk_66", ys = "_buttons_6cemk_73", Ns = "_variants_6cemk_80", ks = "_variant_6cemk_80", Is = "_stock_6cemk_98", Cs = "_variantInfo_6cemk_105", Ss = "_quantity_6cemk_111", ws = "_count_6cemk_118", $s = "_focused_6cemk_135", Bs = "_button_6cemk_73", Ps = "_activeVariant_6cemk_161", Ms = "_chargeTypes_6cemk_165", Ts = "_charge_6cemk_165", qs = "_chargeActive_6cemk_190", As = "_title_6cemk_198", I = {
1371
- options: hs,
1372
- price: ps,
1373
- oldPrice: _s,
1374
- newPrice: gs,
1384
+ }, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19", xs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", bs = "_appearAndBounce_6cemk_1", js = "_meta_6cemk_52", vs = "_info_6cemk_58", ys = "_infoRight_6cemk_66", Ns = "_buttons_6cemk_73", ks = "_variants_6cemk_80", Is = "_variant_6cemk_80", Cs = "_stock_6cemk_98", Ss = "_variantInfo_6cemk_105", ws = "_quantity_6cemk_111", Bs = "_count_6cemk_118", $s = "_focused_6cemk_135", Ps = "_button_6cemk_73", Ms = "_activeVariant_6cemk_161", Ts = "_chargeTypes_6cemk_165", qs = "_charge_6cemk_165", As = "_chargeActive_6cemk_190", Os = "_title_6cemk_198", k = {
1385
+ options: ps,
1386
+ price: _s,
1387
+ oldPrice: gs,
1388
+ newPrice: xs,
1375
1389
  animate: fs,
1376
- appearAndBounce: xs,
1377
- meta: bs,
1378
- info: js,
1379
- infoRight: vs,
1380
- buttons: ys,
1381
- variants: Ns,
1382
- variant: ks,
1383
- stock: Is,
1384
- variantInfo: Cs,
1385
- quantity: Ss,
1386
- count: ws,
1390
+ appearAndBounce: bs,
1391
+ meta: js,
1392
+ info: vs,
1393
+ infoRight: ys,
1394
+ buttons: Ns,
1395
+ variants: ks,
1396
+ variant: Is,
1397
+ stock: Cs,
1398
+ variantInfo: Ss,
1399
+ quantity: ws,
1400
+ count: Bs,
1387
1401
  focused: $s,
1388
- button: Bs,
1389
- activeVariant: Ps,
1390
- chargeTypes: Ms,
1391
- charge: Ts,
1392
- chargeActive: qs,
1393
- title: As
1402
+ button: Ps,
1403
+ activeVariant: Ms,
1404
+ chargeTypes: Ts,
1405
+ charge: qs,
1406
+ chargeActive: As,
1407
+ title: Os
1394
1408
  };
1395
- var kt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(kt || {});
1396
- const si = (d) => {
1397
- var w, L;
1398
- const { variants: o } = d, [e, s] = f.useState(o[0]), [n, g] = f.useState(e.chargeTypes[0]), h = ct(), [c, _] = f.useState(1), { reset: k, addProductToCart: M, getProducts: l } = bt(), [i, x] = f.useState(!1);
1399
- f.useEffect(() => {
1400
- x(!0);
1401
- const a = setTimeout(() => x(!1), 600);
1402
- return () => clearTimeout(a);
1403
- }, [c]);
1404
- async function v() {
1405
- await l(), await M({
1406
- productId: d.id,
1409
+ var It = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(It || {});
1410
+ const ni = (r) => {
1411
+ var I, B;
1412
+ const { variants: i } = r, [e, s] = _.useState(i[0]), [n, h] = _.useState(e.chargeTypes[0]), u = lt(), [o, d] = _.useState(1), { reset: f, addProductToCart: $ } = jt(), [c, l] = _.useState(!1);
1413
+ _.useEffect(() => {
1414
+ l(!0);
1415
+ const g = setTimeout(() => l(!1), 600);
1416
+ return () => clearTimeout(g);
1417
+ }, [o]);
1418
+ async function M() {
1419
+ await $({
1420
+ productId: r.id,
1407
1421
  productVariantId: e.id,
1408
- quantity: c
1422
+ quantity: o
1409
1423
  });
1410
1424
  }
1411
- function p() {
1412
- k(), v(), h("/checkout");
1425
+ function w() {
1426
+ f(), M(), u("/checkout");
1413
1427
  }
1414
- function y(a) {
1415
- if (a >= 864e5) {
1416
- const u = Math.floor(a / 864e5);
1417
- return `${u} ${u === 1 ? "day" : "days"}`;
1418
- } else if (a >= 36e5) {
1419
- const u = Math.floor(a / 36e5);
1420
- return `${u} ${u === 1 ? "hour" : "hours"}`;
1421
- } else if (a >= 6e4) {
1422
- const u = Math.floor(a / 6e4);
1423
- return `${u} ${u === 1 ? "minute" : "minutes"}`;
1428
+ function p(g) {
1429
+ if (g >= 864e5) {
1430
+ const S = Math.floor(g / 864e5);
1431
+ return `${S} ${S === 1 ? "day" : "days"}`;
1432
+ } else if (g >= 36e5) {
1433
+ const S = Math.floor(g / 36e5);
1434
+ return `${S} ${S === 1 ? "hour" : "hours"}`;
1435
+ } else if (g >= 6e4) {
1436
+ const S = Math.floor(g / 6e4);
1437
+ return `${S} ${S === 1 ? "minute" : "minutes"}`;
1424
1438
  } else {
1425
- const u = Math.floor(a / 1e3);
1426
- return `${u} ${u === 1 ? "second" : "seconds"}`;
1439
+ const S = Math.floor(g / 1e3);
1440
+ return `${S} ${S === 1 ? "second" : "seconds"}`;
1427
1441
  }
1428
1442
  }
1429
- return f.useEffect(() => {
1430
- (e.quantity.available === 0 || !e.quantity.available) && _(0);
1431
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: I.options, children: [
1432
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: I.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
1443
+ return _.useEffect(() => {
1444
+ (e.quantity.available === 0 || !e.quantity.available) && d(0);
1445
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
1446
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
1433
1447
  "div",
1434
1448
  {
1435
- className: V(I.charge, {
1436
- [I.chargeActive]: n === a
1449
+ className: Y(k.charge, {
1450
+ [k.chargeActive]: n === g
1437
1451
  }),
1438
- onClick: () => g(a),
1439
- children: kt[a]
1452
+ onClick: () => h(g),
1453
+ children: It[g]
1440
1454
  },
1441
- a
1455
+ g
1442
1456
  )) }),
1443
- /* @__PURE__ */ t.jsx("div", { className: I.variants, children: o.map((a) => {
1444
- var $;
1457
+ /* @__PURE__ */ t.jsx("div", { className: k.variants, children: i.map((g) => {
1458
+ var v;
1445
1459
  return /* @__PURE__ */ t.jsxs(
1446
1460
  "div",
1447
1461
  {
1448
- className: V(I.variant, {
1449
- [I.activeVariant]: e.id === a.id
1462
+ className: Y(k.variant, {
1463
+ [k.activeVariant]: e.id === g.id
1450
1464
  }),
1451
- onClick: () => s(a),
1465
+ onClick: () => s(g),
1452
1466
  children: [
1453
- /* @__PURE__ */ t.jsxs("div", { className: I.variantInfo, children: [
1454
- /* @__PURE__ */ t.jsx("span", { className: I.title, children: a.name }),
1467
+ /* @__PURE__ */ t.jsxs("div", { className: k.variantInfo, children: [
1468
+ /* @__PURE__ */ t.jsx("span", { className: k.title, children: g.name }),
1455
1469
  /* @__PURE__ */ t.jsxs("span", { children: [
1456
1470
  "$",
1457
- n === "ONE_TIME" ? a.price.amount : a.subscriptionSettings ? a.subscriptionSettings.price.amount : "Price Not Found"
1471
+ n === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
1458
1472
  ] })
1459
1473
  ] }),
1460
- /* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: I.stock, children: [
1461
- (($ = a.quantity.restrictions) == null ? void 0 : $.max) || a.quantity.available || 0,
1474
+ /* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: k.stock, children: [
1475
+ ((v = g.quantity.restrictions) == null ? void 0 : v.max) || g.quantity.available || 0,
1462
1476
  " in stock"
1463
1477
  ] }) })
1464
1478
  ]
1465
1479
  },
1466
- a.id
1480
+ g.id
1467
1481
  );
1468
1482
  }) }),
1469
- n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: I.quantity, children: [
1483
+ n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
1470
1484
  /* @__PURE__ */ t.jsx(
1471
- Y,
1485
+ G,
1472
1486
  {
1473
1487
  type: "Secondary",
1474
1488
  onClick: () => {
1475
- c > 1 ? _((a) => a - 1) : _(1);
1489
+ o > 1 ? d((g) => g - 1) : d(1);
1476
1490
  },
1477
- className: I.button,
1478
- disabled: e.quantity.available === 0 || e.quantity.restrictions && c <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1479
- children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1491
+ className: k.button,
1492
+ disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1493
+ children: /* @__PURE__ */ t.jsx(x, { name: "Minus" })
1480
1494
  }
1481
1495
  ),
1482
1496
  /* @__PURE__ */ t.jsx(
1483
- Pt,
1497
+ Mt,
1484
1498
  {
1485
1499
  type: "number",
1486
- value: String(c),
1487
- onChange: (a) => _(Number(a)),
1488
- max: ((w = e.quantity.restrictions) == null ? void 0 : w.max) || e.quantity.available || 1 / 0,
1489
- min: ((L = e.quantity.restrictions) == null ? void 0 : L.min) || 0,
1500
+ value: String(o),
1501
+ onChange: (g) => d(Number(g)),
1502
+ max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || 1 / 0,
1503
+ min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
1490
1504
  centered: !0,
1491
1505
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
1492
1506
  }
1493
1507
  ),
1494
1508
  /* @__PURE__ */ t.jsx(
1495
- Y,
1509
+ G,
1496
1510
  {
1497
1511
  type: "Secondary",
1498
1512
  onClick: () => {
1499
- _((a) => a + 1);
1513
+ d((g) => g + 1);
1500
1514
  },
1501
- className: I.button,
1502
- disabled: !!(e.quantity.restrictions && c >= e.quantity.restrictions.max || e.quantity.available !== void 0 && c >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1503
- children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1515
+ className: k.button,
1516
+ disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1517
+ children: /* @__PURE__ */ t.jsx(x, { name: "Plus" })
1504
1518
  }
1505
1519
  )
1506
1520
  ] }),
1507
- /* @__PURE__ */ t.jsxs("div", { className: I.meta, children: [
1508
- /* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
1521
+ /* @__PURE__ */ t.jsxs("div", { className: k.meta, children: [
1522
+ /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1509
1523
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1510
- /* @__PURE__ */ t.jsxs("div", { className: I.infoRight, children: [
1524
+ /* @__PURE__ */ t.jsxs("div", { className: k.infoRight, children: [
1511
1525
  /* @__PURE__ */ t.jsx(
1512
- b,
1526
+ x,
1513
1527
  {
1514
1528
  name: "Lightning",
1515
1529
  fill: "#FF3F19",
@@ -1517,256 +1531,234 @@ const si = (d) => {
1517
1531
  height: 20
1518
1532
  }
1519
1533
  ),
1520
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
1534
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : p(e.deliveryTime) })
1521
1535
  ] })
1522
1536
  ] }),
1523
- /* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
1537
+ /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1524
1538
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1525
- /* @__PURE__ */ t.jsx("div", { className: I.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
1526
- /* @__PURE__ */ t.jsxs("span", { className: V(I.newPrice, { [I.animate]: i }), children: [
1539
+ /* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1540
+ /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1527
1541
  "$ ",
1528
- (e.price.amount || 0) * c
1542
+ (e.price.amount || 0) * o
1529
1543
  ] }),
1530
- /* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
1544
+ /* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
1531
1545
  "$ ",
1532
- (e.compareAtPrice.amount || 0) * c
1546
+ (e.compareAtPrice.amount || 0) * o
1533
1547
  ] })
1534
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(I.newPrice, { [I.animate]: i }), children: [
1548
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1535
1549
  "$ ",
1536
- (e.price.amount || 0) * c
1537
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
1538
- /* @__PURE__ */ t.jsxs("span", { className: V(I.newPrice, { [I.animate]: i }), children: [
1550
+ (e.price.amount || 0) * o
1551
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1552
+ /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1539
1553
  "$ ",
1540
1554
  e.subscriptionSettings.price.amount || 0
1541
1555
  ] }),
1542
- /* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
1556
+ /* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
1543
1557
  "$ ",
1544
1558
  e.subscriptionSettings.compareAtPrice.amount || 0
1545
1559
  ] })
1546
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(I.newPrice, { [I.animate]: i }), children: [
1560
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1547
1561
  "$ ",
1548
1562
  e.subscriptionSettings.price.amount || 0
1549
1563
  ] }) })
1550
1564
  ] })
1551
1565
  ] }),
1552
- /* @__PURE__ */ t.jsxs("div", { className: I.buttons, children: [
1566
+ /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1553
1567
  /* @__PURE__ */ t.jsx(
1554
- Y,
1568
+ G,
1555
1569
  {
1556
1570
  type: "Primary",
1557
- onClick: () => p(),
1571
+ onClick: () => w(),
1558
1572
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1559
1573
  children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1560
1574
  }
1561
1575
  ),
1562
1576
  n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1563
- Y,
1577
+ G,
1564
1578
  {
1565
1579
  type: "Secondary",
1566
- onClick: () => v(),
1580
+ onClick: () => M(),
1567
1581
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1568
1582
  children: "Add to Cart"
1569
1583
  }
1570
1584
  )
1571
1585
  ] })
1572
1586
  ] });
1573
- }, Os = "_button_1tdo3_1", Es = "_login_1tdo3_14", zs = "_signUp_1tdo3_18", Rs = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Ls = "_closing_1tdo3_64", Hs = "_info_1tdo3_113", Us = "_top_1tdo3_120", Fs = "_title_1tdo3_131", Vs = "_clear_1tdo3_138", Ys = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Gs = "_cart_1tdo3_164", Qs = "_empty_1tdo3_172", Xs = "_product_1tdo3_198", Js = "_products_1tdo3_207", Ks = "_image_1tdo3_215", Zs = "_productInfo_1tdo3_221", tn = "_content_1tdo3_228", en = "_name_1tdo3_234", sn = "_price_1tdo3_240", nn = "_productButtons_1tdo3_246", on = "_productButton_1tdo3_246", an = "_productCount_1tdo3_266", cn = "_bottom_1tdo3_282", ln = "_subtotal_1tdo3_290", rn = "_block_1tdo3_298", dn = "_shoppingCount_1tdo3_305", un = "_total_1tdo3_325", mn = "_link_1tdo3_331", hn = "_userInfo_1tdo3_338", pn = "_pagesMobileModal_1tdo3_349", _n = "_pagesMobileModalContent_1tdo3_363", gn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", N = {
1574
- button: Os,
1575
- login: Es,
1576
- signUp: zs,
1577
- buttons: Rs,
1587
+ }, Es = "_button_1tdo3_1", zs = "_login_1tdo3_14", Rs = "_signUp_1tdo3_18", Ls = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Hs = "_closing_1tdo3_64", Us = "_info_1tdo3_113", Fs = "_top_1tdo3_120", Vs = "_title_1tdo3_131", Ys = "_clear_1tdo3_138", Gs = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Js = "_cart_1tdo3_164", Xs = "_empty_1tdo3_172", Ks = "_product_1tdo3_198", Qs = "_products_1tdo3_207", Zs = "_image_1tdo3_215", tn = "_productInfo_1tdo3_221", en = "_content_1tdo3_228", sn = "_name_1tdo3_234", nn = "_price_1tdo3_240", on = "_productButtons_1tdo3_246", an = "_productButton_1tdo3_246", cn = "_productCount_1tdo3_266", ln = "_bottom_1tdo3_282", rn = "_subtotal_1tdo3_290", dn = "_block_1tdo3_298", un = "_shoppingCount_1tdo3_305", mn = "_total_1tdo3_325", hn = "_link_1tdo3_331", pn = "_userInfo_1tdo3_338", _n = "_pagesMobileModal_1tdo3_349", gn = "_pagesMobileModalContent_1tdo3_363", xn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", y = {
1588
+ button: Es,
1589
+ login: zs,
1590
+ signUp: Rs,
1591
+ buttons: Ls,
1578
1592
  modal: Ds,
1579
1593
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
1580
1594
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
1581
- closing: Ls,
1595
+ closing: Hs,
1582
1596
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
1583
1597
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
1584
- info: Hs,
1585
- top: Us,
1586
- title: Fs,
1587
- clear: Vs,
1588
- activeClear: Ys,
1598
+ info: Us,
1599
+ top: Fs,
1600
+ title: Vs,
1601
+ clear: Ys,
1602
+ activeClear: Gs,
1589
1603
  count: Ws,
1590
- cart: Gs,
1591
- empty: Qs,
1592
- product: Xs,
1593
- products: Js,
1594
- image: Ks,
1595
- productInfo: Zs,
1596
- content: tn,
1597
- name: en,
1598
- price: sn,
1599
- productButtons: nn,
1600
- productButton: on,
1601
- productCount: an,
1602
- bottom: cn,
1603
- subtotal: ln,
1604
- block: rn,
1605
- shoppingCount: dn,
1606
- total: un,
1607
- link: mn,
1608
- userInfo: hn,
1609
- pagesMobileModal: pn,
1610
- pagesMobileModalContent: _n,
1611
- pagesMobileModalHeader: gn,
1604
+ cart: Js,
1605
+ empty: Xs,
1606
+ product: Ks,
1607
+ products: Qs,
1608
+ image: Zs,
1609
+ productInfo: tn,
1610
+ content: en,
1611
+ name: sn,
1612
+ price: nn,
1613
+ productButtons: on,
1614
+ productButton: an,
1615
+ productCount: cn,
1616
+ bottom: ln,
1617
+ subtotal: rn,
1618
+ block: dn,
1619
+ shoppingCount: un,
1620
+ total: mn,
1621
+ link: hn,
1622
+ userInfo: pn,
1623
+ pagesMobileModal: _n,
1624
+ pagesMobileModalContent: gn,
1625
+ pagesMobileModalHeader: xn,
1612
1626
  pagesMobileModalFooter: fn
1613
- }, ni = (d) => {
1614
- const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = d;
1615
- return /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
1616
- o && /* @__PURE__ */ t.jsx(xn, {}),
1617
- s && /* @__PURE__ */ t.jsx(It, { signUp: e })
1627
+ }, ii = (r) => {
1628
+ const { shopping: i, signUp: e, isShowUserInfo: s = !0 } = r;
1629
+ return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
1630
+ i && /* @__PURE__ */ t.jsx(bn, {}),
1631
+ s && /* @__PURE__ */ t.jsx(Ct, { signUp: e })
1618
1632
  ] });
1619
- }, xn = () => {
1620
- const [d, o] = f.useState(!1), [e, s] = f.useState([]), { cart: n, getProducts: g } = bt();
1621
- function h(i) {
1622
- for (let x = 0; x < n.parts.length; x++)
1623
- for (let v = 0; v < i.variants.length; v++)
1624
- if (n.parts[x].productVariantId === i.variants[x].id)
1625
- return n.parts[x].productVariantId;
1626
- }
1627
- function c(i) {
1628
- for (let x = 0; x < n.parts.length; x++)
1629
- for (let v = 0; v < i.variants.length; v++)
1630
- if (n.parts[x].productVariantId === i.variants[x].id)
1631
- return n.parts[x].quantity;
1632
- }
1633
- f.useEffect(() => {
1634
- (async () => {
1635
- const x = n.parts.map((y) => String(y.productId)), p = (await g([...x])).map((y) => ({
1636
- ...y,
1637
- activeVariantId: h(y),
1638
- quantity: c(y)
1639
- }));
1640
- s(p);
1641
- })();
1642
- }, [n.parts.length]);
1643
- function _(i) {
1644
- var x;
1645
- return !i || !(i != null && i.variants) ? !1 : (x = i.variants.find((v) => v.id === i.activeVariantId)) == null ? void 0 : x.subscriptionSettings;
1633
+ }, bn = () => {
1634
+ const [r, i] = _.useState(!1), [e, s] = _.useState([]), { cart: n } = jt();
1635
+ function h(f) {
1636
+ var $;
1637
+ return !f || !(f != null && f.variants) ? !1 : ($ = f.variants.find((c) => c.id === f.activeVariantId)) == null ? void 0 : $.subscriptionSettings;
1646
1638
  }
1647
- const k = n.parts.length > 0 && e.length > 0 && !_(e[0]), [M, l] = f.useState(!1);
1639
+ const u = n.parts.length > 0 && e.length > 0 && !h(e[0]), [o, d] = _.useState(!1);
1648
1640
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1649
1641
  /* @__PURE__ */ t.jsxs(
1650
- Y,
1642
+ G,
1651
1643
  {
1652
1644
  type: "Secondary",
1653
1645
  style: {
1654
1646
  padding: 10
1655
1647
  },
1656
- onClick: (i) => {
1657
- i.stopPropagation(), window.location.pathname.includes("/admin/builder") || (o(!0), l(!0));
1648
+ onClick: (f) => {
1649
+ f.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), d(!0));
1658
1650
  },
1659
1651
  children: [
1660
1652
  /* @__PURE__ */ t.jsx(
1661
- b,
1653
+ x,
1662
1654
  {
1663
1655
  name: "Handbag",
1664
1656
  fill: "var(--icon-primary)"
1665
1657
  }
1666
1658
  ),
1667
- k && /* @__PURE__ */ t.jsx("div", { className: N.shoppingCount, children: n.parts.length })
1659
+ u && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: n.parts.length })
1668
1660
  ]
1669
1661
  }
1670
1662
  ),
1671
- d && /* @__PURE__ */ t.jsx(
1672
- jt,
1663
+ r && /* @__PURE__ */ t.jsx(
1664
+ vt,
1673
1665
  {
1674
1666
  close: () => {
1675
- l(!1), setTimeout(() => {
1676
- o(!1);
1667
+ d(!1), setTimeout(() => {
1668
+ i(!1);
1677
1669
  }, 300);
1678
1670
  },
1679
1671
  withAnimation: !1,
1680
1672
  children: /* @__PURE__ */ t.jsx(
1681
- bn,
1673
+ jn,
1682
1674
  {
1683
1675
  activeProducts: e,
1684
- isCartNotEmpty: k,
1685
- isOpen: M
1676
+ isCartNotEmpty: u,
1677
+ isOpen: o
1686
1678
  }
1687
1679
  )
1688
1680
  }
1689
1681
  )
1690
1682
  ] });
1691
- }, bn = (d) => {
1692
- const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: n, reset: g, getTotalAndDiscount: h, updateQuantityOfProduct: c } = bt(), _ = ct();
1693
- function k(i) {
1694
- _(i);
1683
+ }, jn = (r) => {
1684
+ const { activeProducts: i, isCartNotEmpty: e, isOpen: s } = r, { cart: n, reset: h, getTotalAndDiscount: u, updateQuantityOfProduct: o } = jt(), d = lt();
1685
+ function f(l) {
1686
+ d(l);
1695
1687
  }
1696
- function M(i) {
1697
- c({
1698
- productId: i.id,
1699
- productVariantId: i.activeVariantId,
1700
- quantity: i.quantity + 1
1688
+ function $(l) {
1689
+ o({
1690
+ productId: l.id,
1691
+ productVariantId: l.activeVariantId,
1692
+ quantity: l.quantity + 1
1701
1693
  });
1702
1694
  }
1703
- function l(i) {
1704
- c({
1705
- productId: i.id,
1706
- productVariantId: i.activeVariantId,
1707
- quantity: i.quantity - 1
1695
+ function c(l) {
1696
+ o({
1697
+ productId: l.id,
1698
+ productVariantId: l.activeVariantId,
1699
+ quantity: l.quantity - 1
1708
1700
  });
1709
1701
  }
1710
1702
  return /* @__PURE__ */ t.jsxs(
1711
1703
  "div",
1712
1704
  {
1713
- className: V(N.modal, {
1714
- [N.closing]: !s
1705
+ className: Y(y.modal, {
1706
+ [y.closing]: !s
1715
1707
  }),
1716
- onClick: (i) => i.stopPropagation(),
1708
+ onClick: (l) => l.stopPropagation(),
1717
1709
  children: [
1718
- /* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
1719
- /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
1720
- /* @__PURE__ */ t.jsx("span", { className: N.title, children: "Cart" }),
1721
- e && /* @__PURE__ */ t.jsx("div", { className: N.count, children: n.parts.length })
1710
+ /* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
1711
+ /* @__PURE__ */ t.jsxs("div", { className: y.info, children: [
1712
+ /* @__PURE__ */ t.jsx("span", { className: y.title, children: "Cart" }),
1713
+ e && /* @__PURE__ */ t.jsx("div", { className: y.count, children: n.parts.length })
1722
1714
  ] }),
1723
1715
  /* @__PURE__ */ t.jsx(
1724
1716
  "button",
1725
1717
  {
1726
- className: V(N.clear, {
1727
- [N.activeClear]: e
1718
+ className: Y(y.clear, {
1719
+ [y.activeClear]: e
1728
1720
  }),
1729
1721
  disabled: !e,
1730
- onClick: g,
1722
+ onClick: h,
1731
1723
  children: "Clear all"
1732
1724
  }
1733
1725
  )
1734
1726
  ] }),
1735
- e ? /* @__PURE__ */ t.jsxs("div", { className: N.cart, children: [
1736
- /* @__PURE__ */ t.jsx("div", { className: N.products, children: o.map((i) => /* @__PURE__ */ t.jsxs(
1727
+ e ? /* @__PURE__ */ t.jsxs("div", { className: y.cart, children: [
1728
+ /* @__PURE__ */ t.jsx("div", { className: y.products, children: i.map((l) => /* @__PURE__ */ t.jsxs(
1737
1729
  "div",
1738
1730
  {
1739
- className: N.product,
1731
+ className: y.product,
1740
1732
  children: [
1741
- /* @__PURE__ */ t.jsxs("div", { className: N.productInfo, children: [
1733
+ /* @__PURE__ */ t.jsxs("div", { className: y.productInfo, children: [
1742
1734
  /* @__PURE__ */ t.jsx(
1743
1735
  "img",
1744
1736
  {
1745
- src: `https://imagedelivery.net/${i.images[0].cfId}/w=500`,
1737
+ src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
1746
1738
  alt: "image",
1747
1739
  width: "100%",
1748
1740
  height: "100%",
1749
- className: N.image
1741
+ className: y.image
1750
1742
  }
1751
1743
  ),
1752
- /* @__PURE__ */ t.jsxs("div", { className: N.content, children: [
1753
- /* @__PURE__ */ t.jsx("div", { className: N.name, children: i.name }),
1754
- /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
1744
+ /* @__PURE__ */ t.jsxs("div", { className: y.content, children: [
1745
+ /* @__PURE__ */ t.jsx("div", { className: y.name, children: l.name }),
1746
+ /* @__PURE__ */ t.jsxs("div", { className: y.price, children: [
1755
1747
  "$",
1756
- i.variants.find((x) => x.id === i.activeVariantId).price.amount * ((i == null ? void 0 : i.quantity) || 1)
1748
+ l.variants.find((M) => M.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
1757
1749
  ] })
1758
1750
  ] })
1759
1751
  ] }),
1760
- /* @__PURE__ */ t.jsxs("div", { className: N.productButtons, children: [
1752
+ /* @__PURE__ */ t.jsxs("div", { className: y.productButtons, children: [
1761
1753
  /* @__PURE__ */ t.jsx(
1762
1754
  "div",
1763
1755
  {
1764
1756
  onClick: () => {
1765
- i.quantity !== 1 && l(i);
1757
+ l.quantity !== 1 && c(l);
1766
1758
  },
1767
- className: N.productButton,
1759
+ className: y.productButton,
1768
1760
  children: /* @__PURE__ */ t.jsx(
1769
- b,
1761
+ x,
1770
1762
  {
1771
1763
  name: "Minus",
1772
1764
  fill: "#757575",
@@ -1776,14 +1768,14 @@ const si = (d) => {
1776
1768
  )
1777
1769
  }
1778
1770
  ),
1779
- /* @__PURE__ */ t.jsx("div", { className: N.productCount, children: i.quantity }),
1771
+ /* @__PURE__ */ t.jsx("div", { className: y.productCount, children: l.quantity }),
1780
1772
  /* @__PURE__ */ t.jsx(
1781
1773
  "div",
1782
1774
  {
1783
- onClick: () => M(i),
1784
- className: N.productButton,
1775
+ onClick: () => $(l),
1776
+ className: y.productButton,
1785
1777
  children: /* @__PURE__ */ t.jsx(
1786
- b,
1778
+ x,
1787
1779
  {
1788
1780
  name: "Plus",
1789
1781
  fill: "#757575",
@@ -1796,14 +1788,14 @@ const si = (d) => {
1796
1788
  ] })
1797
1789
  ]
1798
1790
  },
1799
- i.id
1791
+ l.id
1800
1792
  )) }),
1801
- /* @__PURE__ */ t.jsxs("div", { className: N.bottom, children: [
1802
- /* @__PURE__ */ t.jsxs("div", { className: N.subtotal, children: [
1803
- /* @__PURE__ */ t.jsxs("div", { className: N.block, children: [
1793
+ /* @__PURE__ */ t.jsxs("div", { className: y.bottom, children: [
1794
+ /* @__PURE__ */ t.jsxs("div", { className: y.subtotal, children: [
1795
+ /* @__PURE__ */ t.jsxs("div", { className: y.block, children: [
1804
1796
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1805
1797
  /* @__PURE__ */ t.jsx(
1806
- b,
1798
+ x,
1807
1799
  {
1808
1800
  name: "Info",
1809
1801
  width: 20,
@@ -1812,20 +1804,20 @@ const si = (d) => {
1812
1804
  }
1813
1805
  )
1814
1806
  ] }),
1815
- /* @__PURE__ */ t.jsxs("div", { className: N.total, children: [
1807
+ /* @__PURE__ */ t.jsxs("div", { className: y.total, children: [
1816
1808
  "$",
1817
- h().total
1809
+ u().total
1818
1810
  ] })
1819
1811
  ] }),
1820
- /* @__PURE__ */ t.jsx(Y, { onClick: () => k("/checkout"), children: "Checkout" })
1812
+ /* @__PURE__ */ t.jsx(G, { onClick: () => f("/checkout"), children: "Checkout" })
1821
1813
  ] })
1822
- ] }) : /* @__PURE__ */ t.jsx(jn, {})
1814
+ ] }) : /* @__PURE__ */ t.jsx(vn, {})
1823
1815
  ]
1824
1816
  }
1825
1817
  );
1826
- }, jn = () => /* @__PURE__ */ t.jsxs("div", { className: N.empty, children: [
1818
+ }, vn = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
1827
1819
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1828
- b,
1820
+ x,
1829
1821
  {
1830
1822
  name: "Handbag",
1831
1823
  fill: "var(--icon-secondary)"
@@ -1839,20 +1831,20 @@ const si = (d) => {
1839
1831
  "a",
1840
1832
  {
1841
1833
  href: "/products",
1842
- className: N.link,
1834
+ className: y.link,
1843
1835
  children: "view products"
1844
1836
  }
1845
1837
  )
1846
1838
  ] })
1847
- ] }), It = ({ signUp: d }) => {
1848
- const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = ct();
1849
- function n(c) {
1850
- window.location.pathname.includes("/admin/builder") || s(c);
1839
+ ] }), Ct = ({ signUp: r }) => {
1840
+ const i = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = i, s = lt();
1841
+ function n(o) {
1842
+ window.location.pathname.includes("/admin/builder") || s(o);
1851
1843
  }
1852
1844
  if (!e)
1853
1845
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1854
1846
  /* @__PURE__ */ t.jsx(
1855
- Y,
1847
+ G,
1856
1848
  {
1857
1849
  onClick: () => n("/customer-dash"),
1858
1850
  type: "Secondary",
@@ -1862,8 +1854,8 @@ const si = (d) => {
1862
1854
  children: "Login"
1863
1855
  }
1864
1856
  ),
1865
- d && /* @__PURE__ */ t.jsx(
1866
- Y,
1857
+ r && /* @__PURE__ */ t.jsx(
1858
+ G,
1867
1859
  {
1868
1860
  onClick: () => n("/customer-dash"),
1869
1861
  type: "Primary",
@@ -1875,27 +1867,27 @@ const si = (d) => {
1875
1867
  }
1876
1868
  )
1877
1869
  ] });
1878
- const [g, h] = f.useState("test-email@gmail.com");
1879
- return f.useEffect(() => {
1870
+ const [h, u] = _.useState("test-email@gmail.com");
1871
+ return _.useEffect(() => {
1880
1872
  (async () => {
1881
- const _ = Mt(e);
1882
- h(_.email);
1873
+ const d = Tt(e);
1874
+ u(d.email);
1883
1875
  })();
1884
1876
  }, [e]), /* @__PURE__ */ t.jsx(
1885
1877
  "div",
1886
1878
  {
1887
- className: N.userInfo,
1879
+ className: y.userInfo,
1888
1880
  onClick: () => n("/customer-dash"),
1889
- children: /* @__PURE__ */ t.jsx("div", { children: g || "test-email@gmail.com" })
1881
+ children: /* @__PURE__ */ t.jsx("div", { children: h || "test-email@gmail.com" })
1890
1882
  }
1891
1883
  );
1892
- }, vn = ({
1893
- children: d,
1894
- logo: o,
1884
+ }, yn = ({
1885
+ children: r,
1886
+ logo: i,
1895
1887
  setIsOpen: e,
1896
1888
  signUp: s
1897
1889
  }) => {
1898
- const { setIsOpen: n } = yt(), g = () => {
1890
+ const { setIsOpen: n } = Nt(), h = () => {
1899
1891
  n(!1), setTimeout(() => {
1900
1892
  e(!1), n(!0);
1901
1893
  }, 300);
@@ -1903,18 +1895,18 @@ const si = (d) => {
1903
1895
  return /* @__PURE__ */ t.jsxs(
1904
1896
  "div",
1905
1897
  {
1906
- className: N.pagesMobileModal,
1907
- onClick: (h) => h.stopPropagation(),
1898
+ className: y.pagesMobileModal,
1899
+ onClick: (u) => u.stopPropagation(),
1908
1900
  children: [
1909
- /* @__PURE__ */ t.jsxs("div", { className: N.pagesMobileModalHeader, children: [
1910
- /* @__PURE__ */ t.jsx("div", { children: o }),
1901
+ /* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
1902
+ /* @__PURE__ */ t.jsx("div", { children: i }),
1911
1903
  /* @__PURE__ */ t.jsx(
1912
- Y,
1904
+ G,
1913
1905
  {
1914
1906
  type: "Secondary",
1915
- onClick: g,
1907
+ onClick: h,
1916
1908
  children: /* @__PURE__ */ t.jsx(
1917
- b,
1909
+ x,
1918
1910
  {
1919
1911
  name: "X",
1920
1912
  fill: "var(--icon-primary)"
@@ -1923,43 +1915,43 @@ const si = (d) => {
1923
1915
  }
1924
1916
  )
1925
1917
  ] }),
1926
- /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalContent, children: d }),
1927
- /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(It, { signUp: s }) })
1918
+ /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: r }),
1919
+ /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ct, { signUp: s }) })
1928
1920
  ]
1929
1921
  }
1930
1922
  );
1931
- }, ii = ({
1932
- children: d,
1933
- logo: o,
1923
+ }, oi = ({
1924
+ children: r,
1925
+ logo: i,
1934
1926
  signUp: e
1935
1927
  }) => {
1936
- const [s, n] = f.useState(!1);
1928
+ const [s, n] = _.useState(!1);
1937
1929
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1938
- /* @__PURE__ */ t.jsx(yn, { setIsOpenModal: n }),
1939
- s && /* @__PURE__ */ t.jsx(jt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
1940
- vn,
1930
+ /* @__PURE__ */ t.jsx(Nn, { setIsOpenModal: n }),
1931
+ s && /* @__PURE__ */ t.jsx(vt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
1932
+ yn,
1941
1933
  {
1942
- logo: o,
1934
+ logo: i,
1943
1935
  setIsOpen: n,
1944
1936
  signUp: e,
1945
- children: d
1937
+ children: r
1946
1938
  }
1947
1939
  ) })
1948
1940
  ] });
1949
- }, yn = (d) => {
1950
- const { setIsOpenModal: o } = d;
1941
+ }, Nn = (r) => {
1942
+ const { setIsOpenModal: i } = r;
1951
1943
  return /* @__PURE__ */ t.jsx(
1952
- Y,
1944
+ G,
1953
1945
  {
1954
1946
  type: "Secondary",
1955
1947
  style: {
1956
1948
  padding: 10
1957
1949
  },
1958
1950
  onClick: (e) => {
1959
- e.stopPropagation(), o(!0);
1951
+ e.stopPropagation(), i(!0);
1960
1952
  },
1961
1953
  children: /* @__PURE__ */ t.jsx(
1962
- b,
1954
+ x,
1963
1955
  {
1964
1956
  name: "List",
1965
1957
  fill: "var(--icon-primary)"
@@ -1967,22 +1959,22 @@ const si = (d) => {
1967
1959
  )
1968
1960
  }
1969
1961
  );
1970
- }, Nn = "_share_xddz7_1", kn = "_modal_xddz7_8", In = "_header_xddz7_20", Cn = "_socials_xddz7_30", Sn = "_social_xddz7_30", wn = "_copy_xddz7_40", $n = "_title_xddz7_47", Bn = "_copyWrapper_xddz7_53", Pn = "_copyText_xddz7_62", Mn = "_copyTextMobile_xddz7_75", Tn = "_copyTextMiniMobile_xddz7_94", Z = {
1971
- share: Nn,
1972
- modal: kn,
1973
- header: In,
1974
- socials: Cn,
1975
- social: Sn,
1976
- copy: wn,
1962
+ }, kn = "_share_xddz7_1", In = "_modal_xddz7_8", Cn = "_header_xddz7_20", Sn = "_socials_xddz7_30", wn = "_social_xddz7_30", Bn = "_copy_xddz7_40", $n = "_title_xddz7_47", Pn = "_copyWrapper_xddz7_53", Mn = "_copyText_xddz7_62", Tn = "_copyTextMobile_xddz7_75", qn = "_copyTextMiniMobile_xddz7_94", Z = {
1963
+ share: kn,
1964
+ modal: In,
1965
+ header: Cn,
1966
+ socials: Sn,
1967
+ social: wn,
1968
+ copy: Bn,
1977
1969
  title: $n,
1978
- copyWrapper: Bn,
1979
- copyText: Pn,
1980
- copyTextMobile: Mn,
1981
- copyTextMiniMobile: Tn
1982
- }, oi = () => {
1983
- const { isOpenModal: d, setIsOpenModal: o } = Nt();
1970
+ copyWrapper: Pn,
1971
+ copyText: Mn,
1972
+ copyTextMobile: Tn,
1973
+ copyTextMiniMobile: qn
1974
+ }, ai = () => {
1975
+ const { isOpenModal: r, setIsOpenModal: i } = kt();
1984
1976
  function e() {
1985
- o(!0);
1977
+ i(!0);
1986
1978
  }
1987
1979
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1988
1980
  /* @__PURE__ */ t.jsx(
@@ -1994,7 +1986,7 @@ const si = (d) => {
1994
1986
  },
1995
1987
  type: "Secondary",
1996
1988
  children: /* @__PURE__ */ t.jsx(
1997
- b,
1989
+ x,
1998
1990
  {
1999
1991
  name: "Share",
2000
1992
  fill: "#757575",
@@ -2003,38 +1995,38 @@ const si = (d) => {
2003
1995
  )
2004
1996
  }
2005
1997
  ),
2006
- d && /* @__PURE__ */ t.jsx(jt, { close: o, children: /* @__PURE__ */ t.jsx(qn, {}) })
1998
+ r && /* @__PURE__ */ t.jsx(vt, { close: i, children: /* @__PURE__ */ t.jsx(An, {}) })
2007
1999
  ] });
2008
- }, qn = () => {
2009
- const { setIsOpenModal: d } = Nt(), { notification: o, setNotification: e } = Tt(), { setIsOpen: s } = yt(), n = window.location.href;
2010
- function g() {
2000
+ }, An = () => {
2001
+ const { setIsOpenModal: r } = kt(), { notification: i, setNotification: e } = qt(), { setIsOpen: s } = Nt(), n = window.location.href;
2002
+ function h() {
2011
2003
  navigator.clipboard.writeText(n), e({
2012
2004
  message: "Link copied to clipboard",
2013
2005
  status: "success"
2014
2006
  });
2015
2007
  }
2016
- function h() {
2008
+ function u() {
2017
2009
  s(!1), setTimeout(() => {
2018
- d(!1), s(!0);
2010
+ r(!1), s(!0);
2019
2011
  }, 300);
2020
2012
  }
2021
- function c(_, k) {
2022
- return _.length > k ? _.slice(0, k) + "..." : _;
2013
+ function o(d, f) {
2014
+ return d.length > f ? d.slice(0, f) + "..." : d;
2023
2015
  }
2024
2016
  return /* @__PURE__ */ t.jsxs(
2025
2017
  "div",
2026
2018
  {
2027
2019
  className: Z.modal,
2028
- onClick: (_) => _.stopPropagation(),
2020
+ onClick: (d) => d.stopPropagation(),
2029
2021
  children: [
2030
2022
  /* @__PURE__ */ t.jsxs("div", { className: Z.header, children: [
2031
2023
  /* @__PURE__ */ t.jsx("div", { className: Z.title, children: "Copy Product Link" }),
2032
2024
  /* @__PURE__ */ t.jsx(
2033
- b,
2025
+ x,
2034
2026
  {
2035
2027
  name: "X",
2036
2028
  fill: "#757575",
2037
- onClick: h,
2029
+ onClick: u,
2038
2030
  hoverable: !0
2039
2031
  }
2040
2032
  )
@@ -2044,14 +2036,14 @@ const si = (d) => {
2044
2036
  tt,
2045
2037
  {
2046
2038
  type: "Secondary",
2047
- onClick: g,
2039
+ onClick: h,
2048
2040
  style: {
2049
2041
  flex: 1
2050
2042
  },
2051
2043
  children: [
2052
- /* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: c(n, 100) }),
2053
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: c(n, 40) }),
2054
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: c(n, 20) })
2044
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: o(n, 100) }),
2045
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: o(n, 40) }),
2046
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: o(n, 20) })
2055
2047
  ]
2056
2048
  }
2057
2049
  ),
@@ -2059,49 +2051,49 @@ const si = (d) => {
2059
2051
  tt,
2060
2052
  {
2061
2053
  type: "Secondary",
2062
- onClick: g,
2063
- children: o ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2054
+ onClick: h,
2055
+ children: i ? /* @__PURE__ */ t.jsx(x, { name: "Check" }) : /* @__PURE__ */ t.jsx(x, { name: "Copy" })
2064
2056
  }
2065
2057
  )
2066
2058
  ] })
2067
2059
  ]
2068
2060
  }
2069
2061
  );
2070
- }, An = "_accordion_1s1lq_1", On = "_header_1s1lq_9", En = "_icon_1s1lq_18", zn = "_open_1s1lq_21", Rn = "_content_1s1lq_25", st = {
2071
- accordion: An,
2072
- header: On,
2073
- icon: En,
2074
- open: zn,
2075
- content: Rn
2076
- }, ai = ({ title: d, content: o, defaultOpen: e = !1 }) => {
2077
- const [s, n] = f.useState(e), [g, h] = f.useState(0), c = f.useRef(null), _ = () => {
2062
+ }, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9", zn = "_icon_1s1lq_18", Rn = "_open_1s1lq_21", Ln = "_content_1s1lq_25", nt = {
2063
+ accordion: On,
2064
+ header: En,
2065
+ icon: zn,
2066
+ open: Rn,
2067
+ content: Ln
2068
+ }, ci = ({ title: r, content: i, defaultOpen: e = !1 }) => {
2069
+ const [s, n] = _.useState(e), [h, u] = _.useState(0), o = _.useRef(null), d = () => {
2078
2070
  n(!s);
2079
2071
  };
2080
- return f.useEffect(() => {
2081
- c.current && h(s ? c.current.scrollHeight : 0);
2082
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: st.accordion, children: [
2072
+ return _.useEffect(() => {
2073
+ o.current && u(s ? o.current.scrollHeight : 0);
2074
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: nt.accordion, children: [
2083
2075
  /* @__PURE__ */ t.jsxs(
2084
2076
  "div",
2085
2077
  {
2086
- className: st.header,
2087
- onClick: _,
2078
+ className: nt.header,
2079
+ onClick: d,
2088
2080
  children: [
2089
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
2090
- /* @__PURE__ */ t.jsx("div", { className: V(st.icon, { [st.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2081
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2082
+ /* @__PURE__ */ t.jsx("div", { className: Y(nt.icon, { [nt.open]: s }), children: /* @__PURE__ */ t.jsx(x, { name: "CaretDown" }) })
2091
2083
  ]
2092
2084
  }
2093
2085
  ),
2094
2086
  /* @__PURE__ */ t.jsx(
2095
2087
  "div",
2096
2088
  {
2097
- ref: c,
2098
- className: st.content,
2099
- style: { height: `${g}px` },
2100
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
2089
+ ref: o,
2090
+ className: nt.content,
2091
+ style: { height: `${h}px` },
2092
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2101
2093
  }
2102
2094
  )
2103
2095
  ] });
2104
- }, ci = ({ children: d, path: o, className: e, target: s = "_self", id: n }) => {
2096
+ }, li = ({ children: r, path: i, className: e, target: s = "_self", id: n }) => {
2105
2097
  if (window.location.pathname.includes("/admin/builder"))
2106
2098
  return /* @__PURE__ */ t.jsx(
2107
2099
  "div",
@@ -2110,29 +2102,29 @@ const si = (d) => {
2110
2102
  role: "link",
2111
2103
  style: { cursor: "pointer" },
2112
2104
  id: n,
2113
- children: d
2105
+ children: r
2114
2106
  }
2115
2107
  );
2116
- const g = ct(), h = /^https?:\/\//.test(o), c = (_) => {
2117
- h || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (_.preventDefault(), g(o, { replace: !0 }));
2108
+ const h = lt(), u = /^https?:\/\//.test(i), o = (d) => {
2109
+ u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.location.href = i : (d.preventDefault(), h(i, { replace: !0 }));
2118
2110
  };
2119
2111
  return /* @__PURE__ */ t.jsx(
2120
2112
  "div",
2121
2113
  {
2122
- onClick: c,
2114
+ onClick: o,
2123
2115
  className: e,
2124
2116
  role: "link",
2125
2117
  style: { cursor: "pointer" },
2126
2118
  id: n,
2127
- children: d
2119
+ children: r
2128
2120
  }
2129
2121
  );
2130
- }, Dn = "_buttonsBlock_1b2rb_1", Ln = "_slideUp_1b2rb_1", Hn = {
2122
+ }, Dn = "_buttonsBlock_1b2rb_1", Hn = "_slideUp_1b2rb_1", Un = {
2131
2123
  buttonsBlock: Dn,
2132
- slideUp: Ln
2133
- }, li = () => /* @__PURE__ */ t.jsxs("div", { className: Hn.buttonsBlock, children: [
2124
+ slideUp: Hn
2125
+ }, ri = () => /* @__PURE__ */ t.jsxs("div", { className: Un.buttonsBlock, children: [
2134
2126
  /* @__PURE__ */ t.jsx(
2135
- Y,
2127
+ G,
2136
2128
  {
2137
2129
  type: "Primary",
2138
2130
  style: {
@@ -2141,29 +2133,29 @@ const si = (d) => {
2141
2133
  children: "Add to Cart"
2142
2134
  }
2143
2135
  ),
2144
- /* @__PURE__ */ t.jsx(Y, { type: "Secondary", children: "Buy" })
2145
- ] }), Un = "_wrapper_st58d_1", Fn = "_label_st58d_10", Vn = "_textarea_st58d_18", Yn = "_length_st58d_33", at = {
2146
- wrapper: Un,
2147
- label: Fn,
2148
- textarea: Vn,
2149
- length: Yn
2150
- }, ri = (d) => {
2136
+ /* @__PURE__ */ t.jsx(G, { type: "Secondary", children: "Buy" })
2137
+ ] }), Fn = "_wrapper_st58d_1", Vn = "_label_st58d_10", Yn = "_textarea_st58d_18", Gn = "_length_st58d_33", ct = {
2138
+ wrapper: Fn,
2139
+ label: Vn,
2140
+ textarea: Yn,
2141
+ length: Gn
2142
+ }, di = (r) => {
2151
2143
  const {
2152
- onChange: o,
2144
+ onChange: i,
2153
2145
  label: e,
2154
2146
  value: s,
2155
2147
  maxLength: n,
2156
- placeholder: g = "Type something...",
2157
- type: h = "text"
2158
- } = d, [c, _] = f.useState(s.length);
2159
- function k(M) {
2160
- return h === "number" ? M.replace(/[^\d\n]+/g, "") : M;
2148
+ placeholder: h = "Type something...",
2149
+ type: u = "text"
2150
+ } = r, [o, d] = _.useState(s.length);
2151
+ function f($) {
2152
+ return u === "number" ? $.replace(/[^\d\n]+/g, "") : $;
2161
2153
  }
2162
- return /* @__PURE__ */ t.jsxs("div", { className: at.wrapper, children: [
2154
+ return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
2163
2155
  e && /* @__PURE__ */ t.jsx(
2164
2156
  "label",
2165
2157
  {
2166
- className: at.label,
2158
+ className: ct.label,
2167
2159
  htmlFor: e,
2168
2160
  children: e
2169
2161
  }
@@ -2173,57 +2165,57 @@ const si = (d) => {
2173
2165
  {
2174
2166
  id: e,
2175
2167
  value: s,
2176
- onChange: (M) => {
2177
- const l = k(M.target.value);
2178
- _(l.length), o(l);
2168
+ onChange: ($) => {
2169
+ const c = f($.target.value);
2170
+ d(c.length), i(c);
2179
2171
  },
2180
- placeholder: g,
2181
- className: at.textarea,
2172
+ placeholder: h,
2173
+ className: ct.textarea,
2182
2174
  maxLength: n
2183
2175
  }
2184
2176
  ),
2185
- n && /* @__PURE__ */ t.jsxs("div", { className: at.length, children: [
2186
- c,
2177
+ n && /* @__PURE__ */ t.jsxs("div", { className: ct.length, children: [
2178
+ o,
2187
2179
  "/",
2188
2180
  n
2189
2181
  ] })
2190
2182
  ] });
2191
2183
  };
2192
2184
  export {
2193
- ai as Accordion,
2194
- yn as BurgerMenuButton,
2195
- Y as Button,
2196
- us as ButtonTypeSettings,
2197
- ti as ButtonsSettings,
2198
- Jn as CategorySettings,
2199
- St as ChooseImage,
2200
- mi as ChooseImageModal,
2201
- jn as EmptyCart,
2202
- Zn as FormSettings,
2203
- ni as HeaderButtons,
2204
- b as Icon,
2205
- rt as InputSettings,
2206
- Pt as InputUI,
2207
- hi as ItemsSettings,
2208
- Xn as LayoutSettings,
2209
- ci as Link,
2210
- ei as ListingSelector,
2211
- pi as Loader,
2212
- jt as Modal,
2213
- ii as PagesMobileMenu,
2214
- vn as PagesMobileModal,
2215
- Kn as PagesSettings,
2216
- li as ProductCardButtons,
2217
- si as ProductOptions,
2218
- vt as RangeSelector,
2219
- ot as Select,
2220
- oi as ShareLink,
2221
- xn as ShoppingButton,
2222
- bn as ShoppingModalCart,
2223
- it as Switch,
2224
- _i as TextSettings,
2225
- gi as TextareaSettings,
2226
- ri as TextareaUI,
2185
+ ci as Accordion,
2186
+ Nn as BurgerMenuButton,
2187
+ G as Button,
2188
+ ms as ButtonTypeSettings,
2189
+ ei as ButtonsSettings,
2190
+ Qn as CategorySettings,
2191
+ wt as ChooseImage,
2192
+ hi as ChooseImageModal,
2193
+ vn as EmptyCart,
2194
+ ti as FormSettings,
2195
+ ii as HeaderButtons,
2196
+ x as Icon,
2197
+ dt as InputSettings,
2198
+ Mt as InputUI,
2199
+ pi as ItemsSettings,
2200
+ Kn as LayoutSettings,
2201
+ li as Link,
2202
+ si as ListingSelector,
2203
+ _i as Loader,
2204
+ vt as Modal,
2205
+ oi as PagesMobileMenu,
2206
+ yn as PagesMobileModal,
2207
+ Zn as PagesSettings,
2208
+ ri as ProductCardButtons,
2209
+ ni as ProductOptions,
2210
+ yt as RangeSelector,
2211
+ at as Select,
2212
+ ai as ShareLink,
2213
+ bn as ShoppingButton,
2214
+ jn as ShoppingModalCart,
2215
+ ot as Switch,
2216
+ gi as TextSettings,
2217
+ xi as TextareaSettings,
2218
+ di as TextareaUI,
2227
2219
  fi as TypesText,
2228
- It as UserInfo
2220
+ Ct as UserInfo
2229
2221
  };