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