@billgangcom/theme-lib 1.98.5 → 1.99.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/App.d.ts +1 -0
- package/dist/builder.cjs.js +58 -71
- package/dist/builder.es.js +4824 -11528
- package/dist/index-BQwXXgcO.js +41112 -0
- package/dist/index-wJ7Iwa3N.cjs +164 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +12 -11
- package/dist/storefront/components/TermsOfService/index.d.ts +1 -1
- package/dist/storefront/utils/parseDraftJsText.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +629 -603
- package/package.json +4 -2
- package/dist/index-BQsNEXrH.js +0 -24774
- package/dist/index-CIBHTo6B.cjs +0 -125
package/dist/ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as t, I as j, d as U, e as
|
|
2
|
-
import { a1 as si, a5 as ni, $ as ii, Z as ai, a4 as oi, a3 as ci, Y as ri, _ as li, W as di, X as ui, a0 as hi, a2 as mi } from "./index-
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as j, d as U, e as Ct, g as mt, h as pt, P as gt, S as lt, i as Pt, D as ft, k as xt, v as _t, B as dt, l as ot, a as wt, m as Tt, O as ht, n as J, o as yt, C as jt, q as V, r as At, t as Dt, w as bt, x as Et, y as It, z as W, L as Rt, A as St, E as vt, b as ct, s as at, f as Q, F as Lt, G as R, H as Ut, M as ut, J as Ht, K as rt, N as zt, Q as Mt, T as Ft, U as Bt, V as Vt } from "./index-BQwXXgcO.js";
|
|
2
|
+
import { a1 as si, a5 as ni, $ as ii, Z as ai, a4 as oi, a3 as ci, Y as ri, _ as li, W as di, X as ui, a0 as hi, a2 as mi } from "./index-BQwXXgcO.js";
|
|
3
|
+
import f from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23", Xt = "_alignmentContent_kh9z8_30", Qt = "_alignments_kh9z8_39", Jt = "_alignment_kh9z8_30", Kt = "_circle_kh9z8_64", Zt = "_paddings_kh9z8_71", te = "_padding_kh9z8_71", ee = "_active_kh9z8_97", G = {
|
|
6
6
|
block: Yt,
|
|
@@ -23,15 +23,15 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
], ne = ["left", "top", "right", "bottom"], Ln = (
|
|
26
|
+
], ne = ["left", "top", "right", "bottom"], Ln = (u) => {
|
|
27
27
|
const {
|
|
28
|
-
alignment:
|
|
28
|
+
alignment: n,
|
|
29
29
|
padding: o,
|
|
30
30
|
setPadding: s,
|
|
31
|
-
setAlignment:
|
|
31
|
+
setAlignment: c,
|
|
32
32
|
isAlignment: e = !0,
|
|
33
|
-
isPadding:
|
|
34
|
-
} =
|
|
33
|
+
isPadding: h = !0
|
|
34
|
+
} = u;
|
|
35
35
|
function d(l) {
|
|
36
36
|
switch (l) {
|
|
37
37
|
case "left":
|
|
@@ -50,7 +50,7 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
50
50
|
return "TextAlignCenter";
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function g(l) {
|
|
54
54
|
switch (l) {
|
|
55
55
|
case "left":
|
|
56
56
|
return "AlignLeft";
|
|
@@ -62,7 +62,7 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
62
62
|
return "AlignBottom";
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const [_, M] =
|
|
65
|
+
const [_, M] = f.useState(null), [I, r] = f.useState(null);
|
|
66
66
|
return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
|
|
67
67
|
/* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
|
|
68
68
|
/* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
|
|
@@ -72,7 +72,7 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
74
|
onClick: () => {
|
|
75
|
-
|
|
75
|
+
c(l);
|
|
76
76
|
},
|
|
77
77
|
className: G.alignment,
|
|
78
78
|
onMouseEnter: () => {
|
|
@@ -82,8 +82,8 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
82
82
|
M(null);
|
|
83
83
|
},
|
|
84
84
|
children: [
|
|
85
|
-
l !==
|
|
86
|
-
l !==
|
|
85
|
+
l !== n && _ !== l && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
|
|
86
|
+
l !== n && _ === l && /* @__PURE__ */ t.jsx(
|
|
87
87
|
j,
|
|
88
88
|
{
|
|
89
89
|
name: d(_),
|
|
@@ -92,10 +92,10 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
92
92
|
height: 22
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
l ===
|
|
95
|
+
l === n && /* @__PURE__ */ t.jsx(
|
|
96
96
|
j,
|
|
97
97
|
{
|
|
98
|
-
name: d(
|
|
98
|
+
name: d(n),
|
|
99
99
|
fill: "#FF3F19",
|
|
100
100
|
width: 22,
|
|
101
101
|
height: 22
|
|
@@ -106,7 +106,7 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
106
106
|
l
|
|
107
107
|
)) })
|
|
108
108
|
] }),
|
|
109
|
-
|
|
109
|
+
h && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
|
|
110
110
|
/* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
|
|
111
111
|
/* @__PURE__ */ t.jsx("div", { className: G.paddings, children: ne.map((l) => /* @__PURE__ */ t.jsxs(
|
|
112
112
|
"label",
|
|
@@ -115,22 +115,22 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
115
115
|
[G.active]: I === l
|
|
116
116
|
}),
|
|
117
117
|
onFocus: () => {
|
|
118
|
-
|
|
118
|
+
r(l);
|
|
119
119
|
},
|
|
120
120
|
onBlur: () => {
|
|
121
|
-
|
|
121
|
+
r(null);
|
|
122
122
|
},
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
125
125
|
j,
|
|
126
126
|
{
|
|
127
|
-
name:
|
|
127
|
+
name: g(l),
|
|
128
128
|
width: 20,
|
|
129
129
|
height: 20
|
|
130
130
|
}
|
|
131
131
|
) }),
|
|
132
132
|
/* @__PURE__ */ t.jsx(
|
|
133
|
-
|
|
133
|
+
Ct,
|
|
134
134
|
{
|
|
135
135
|
type: "number",
|
|
136
136
|
value: String(o[l]),
|
|
@@ -163,75 +163,75 @@ const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23",
|
|
|
163
163
|
addButton: me,
|
|
164
164
|
deleteButton: pe
|
|
165
165
|
};
|
|
166
|
-
function ge({ id:
|
|
166
|
+
function ge({ id: u, children: n }) {
|
|
167
167
|
const {
|
|
168
168
|
attributes: o,
|
|
169
169
|
listeners: s,
|
|
170
|
-
setNodeRef:
|
|
170
|
+
setNodeRef: c,
|
|
171
171
|
transform: e,
|
|
172
|
-
transition:
|
|
172
|
+
transition: h,
|
|
173
173
|
isDragging: d
|
|
174
174
|
} = yt({
|
|
175
|
-
id:
|
|
176
|
-
}),
|
|
175
|
+
id: u
|
|
176
|
+
}), g = {
|
|
177
177
|
transform: jt.Transform.toString(e),
|
|
178
|
-
transition:
|
|
178
|
+
transition: h
|
|
179
179
|
};
|
|
180
180
|
return /* @__PURE__ */ t.jsx(
|
|
181
181
|
"div",
|
|
182
182
|
{
|
|
183
|
-
ref:
|
|
184
|
-
style:
|
|
183
|
+
ref: c,
|
|
184
|
+
style: g,
|
|
185
185
|
className: `${X.product} ${d ? X.dragging : ""}`,
|
|
186
186
|
...o,
|
|
187
187
|
...s,
|
|
188
|
-
children:
|
|
188
|
+
children: n
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
const Un = (
|
|
192
|
+
const Un = (u) => {
|
|
193
193
|
const {
|
|
194
|
-
isActiveItems:
|
|
194
|
+
isActiveItems: n,
|
|
195
195
|
setIsActiveItems: o,
|
|
196
196
|
items: s,
|
|
197
|
-
setItems:
|
|
197
|
+
setItems: c,
|
|
198
198
|
other: e,
|
|
199
|
-
tags:
|
|
199
|
+
tags: h,
|
|
200
200
|
title: d,
|
|
201
|
-
subtitle:
|
|
201
|
+
subtitle: g,
|
|
202
202
|
draggable: _ = !1,
|
|
203
203
|
withImage: M = !1,
|
|
204
204
|
addable: I = !0,
|
|
205
|
-
itemsOptions:
|
|
205
|
+
itemsOptions: r,
|
|
206
206
|
hasRangeSelector: l = !1,
|
|
207
207
|
rangeSelectorOptions: y,
|
|
208
208
|
limit: x,
|
|
209
209
|
autoScrollInterval: m,
|
|
210
|
-
deletable:
|
|
210
|
+
deletable: a,
|
|
211
211
|
aspectRatio: b,
|
|
212
|
-
setAspectRatio:
|
|
213
|
-
} =
|
|
212
|
+
setAspectRatio: k
|
|
213
|
+
} = u, A = mt(
|
|
214
214
|
pt(gt, {
|
|
215
215
|
activationConstraint: {
|
|
216
216
|
distance: 5
|
|
217
217
|
}
|
|
218
218
|
})
|
|
219
|
-
), E = (
|
|
220
|
-
const { active: N, over:
|
|
221
|
-
if (
|
|
222
|
-
const q = s.findIndex((
|
|
219
|
+
), E = (i) => {
|
|
220
|
+
const { active: N, over: P } = i;
|
|
221
|
+
if (P && N.id !== P.id) {
|
|
222
|
+
const q = s.findIndex((C) => C === N.id), $ = s.findIndex((C) => C === P.id);
|
|
223
223
|
if (q !== -1 && $ !== -1) {
|
|
224
|
-
const
|
|
225
|
-
|
|
224
|
+
const C = [...s], [Z] = C.splice(q, 1);
|
|
225
|
+
C.splice($, 0, Z), c(C);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
function K(
|
|
229
|
+
function K(i) {
|
|
230
230
|
if (M)
|
|
231
|
-
return
|
|
231
|
+
return i ? /* @__PURE__ */ t.jsx(
|
|
232
232
|
"img",
|
|
233
233
|
{
|
|
234
|
-
src: `https://imagedelivery.net/${
|
|
234
|
+
src: `https://imagedelivery.net/${i[0]}/w=1000`,
|
|
235
235
|
alt: "image",
|
|
236
236
|
width: 16,
|
|
237
237
|
height: 16
|
|
@@ -246,9 +246,9 @@ const Un = (h) => {
|
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
|
-
const L = (
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
249
|
+
const L = (i, N = !1) => {
|
|
250
|
+
const P = r.find(($) => $.id === i);
|
|
251
|
+
if (!P) return;
|
|
252
252
|
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
253
253
|
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
254
254
|
j,
|
|
@@ -263,14 +263,14 @@ const Un = (h) => {
|
|
|
263
263
|
ot,
|
|
264
264
|
{
|
|
265
265
|
onChange: ($) => {
|
|
266
|
-
const
|
|
266
|
+
const C = [...s], Z = r.find((p) => p.name === $);
|
|
267
267
|
if (!Z) return;
|
|
268
|
-
const v = Z.id, D =
|
|
269
|
-
|
|
268
|
+
const v = Z.id, D = C.map((p) => p === i ? v : p);
|
|
269
|
+
c([...D]);
|
|
270
270
|
},
|
|
271
|
-
value:
|
|
272
|
-
options:
|
|
273
|
-
leftAddonOptions:
|
|
271
|
+
value: P.name,
|
|
272
|
+
options: r.filter(($) => !s.find((C) => C === $.id)).map(($) => $.name),
|
|
273
|
+
leftAddonOptions: r.map(($) => ({
|
|
274
274
|
value: $.name,
|
|
275
275
|
addon: K($.images)
|
|
276
276
|
}))
|
|
@@ -284,14 +284,14 @@ const Un = (h) => {
|
|
|
284
284
|
width: 20,
|
|
285
285
|
height: 20,
|
|
286
286
|
fill: "#C12A2A",
|
|
287
|
-
onClick: () =>
|
|
287
|
+
onClick: () => c(s.filter(($) => $ !== i))
|
|
288
288
|
}
|
|
289
289
|
) }) })
|
|
290
290
|
] });
|
|
291
291
|
return _ ? /* @__PURE__ */ t.jsx(
|
|
292
292
|
ge,
|
|
293
293
|
{
|
|
294
|
-
id:
|
|
294
|
+
id: i,
|
|
295
295
|
children: q
|
|
296
296
|
},
|
|
297
297
|
J()
|
|
@@ -305,19 +305,19 @@ const Un = (h) => {
|
|
|
305
305
|
);
|
|
306
306
|
};
|
|
307
307
|
return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
|
|
308
|
-
(d ||
|
|
308
|
+
(d || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
309
309
|
d && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: d }),
|
|
310
|
-
|
|
310
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
311
311
|
lt,
|
|
312
312
|
{
|
|
313
|
-
current:
|
|
314
|
-
onChange: (
|
|
313
|
+
current: n,
|
|
314
|
+
onChange: (i) => o == null ? void 0 : o(i)
|
|
315
315
|
}
|
|
316
316
|
)
|
|
317
317
|
] }),
|
|
318
|
-
l && y && /* @__PURE__ */ t.jsx(
|
|
318
|
+
l && y && /* @__PURE__ */ t.jsx(Pt, { ...y }),
|
|
319
319
|
/* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
|
|
320
|
-
|
|
320
|
+
g && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: g }),
|
|
321
321
|
_ ? /* @__PURE__ */ t.jsx(
|
|
322
322
|
ft,
|
|
323
323
|
{
|
|
@@ -328,11 +328,11 @@ const Un = (h) => {
|
|
|
328
328
|
{
|
|
329
329
|
items: s,
|
|
330
330
|
strategy: _t,
|
|
331
|
-
children: s.map((
|
|
331
|
+
children: s.map((i) => L(i, a))
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
}
|
|
335
|
-
) : s.map((
|
|
335
|
+
) : s.map((i) => L(i, a)),
|
|
336
336
|
I && /* @__PURE__ */ t.jsx(
|
|
337
337
|
"div",
|
|
338
338
|
{
|
|
@@ -347,21 +347,21 @@ const Un = (h) => {
|
|
|
347
347
|
{
|
|
348
348
|
withoutHover: !0,
|
|
349
349
|
className: U(X.button, {
|
|
350
|
-
[X.disabled]: !!(x && x <= s.length || s.length ===
|
|
350
|
+
[X.disabled]: !!(x && x <= s.length || s.length === r.length)
|
|
351
351
|
}),
|
|
352
352
|
size: "s",
|
|
353
|
-
disabled: !!(x && x <= s.length || s.length ===
|
|
353
|
+
disabled: !!(x && x <= s.length || s.length === r.length),
|
|
354
354
|
onClick: () => {
|
|
355
|
-
const
|
|
355
|
+
const i = [...s];
|
|
356
356
|
let N = null;
|
|
357
|
-
if (
|
|
358
|
-
for (let
|
|
359
|
-
if (!s.find((q) => q ===
|
|
360
|
-
N =
|
|
357
|
+
if (r) {
|
|
358
|
+
for (let P = 0; P < r.length; P++)
|
|
359
|
+
if (!s.find((q) => q === r[P].id)) {
|
|
360
|
+
N = r[P];
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
i.push((N == null ? void 0 : N.id) || r[0].id), c(i);
|
|
365
365
|
},
|
|
366
366
|
style: {
|
|
367
367
|
width: "fit-content"
|
|
@@ -382,21 +382,21 @@ const Un = (h) => {
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
] }),
|
|
385
|
-
b &&
|
|
385
|
+
b && k && /* @__PURE__ */ t.jsx(
|
|
386
386
|
ot,
|
|
387
387
|
{
|
|
388
388
|
value: b,
|
|
389
389
|
label: "Aspect Ratio",
|
|
390
390
|
options: Object.keys(Tt),
|
|
391
|
-
onChange: (
|
|
391
|
+
onChange: (i) => k(i),
|
|
392
392
|
leftAddonOptions: wt
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
|
-
|
|
395
|
+
h !== void 0 && /* @__PURE__ */ t.jsx(
|
|
396
396
|
ht,
|
|
397
397
|
{
|
|
398
398
|
tagsTitle: "Tags",
|
|
399
|
-
items:
|
|
399
|
+
items: h
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
402
|
e !== void 0 && /* @__PURE__ */ t.jsx(
|
|
@@ -407,12 +407,12 @@ const Un = (h) => {
|
|
|
407
407
|
}
|
|
408
408
|
),
|
|
409
409
|
m !== void 0 && /* @__PURE__ */ t.jsx(
|
|
410
|
-
|
|
410
|
+
Ct,
|
|
411
411
|
{
|
|
412
412
|
label: "Auto scroll interval",
|
|
413
413
|
type: "number",
|
|
414
414
|
value: String(m.scrollInterval),
|
|
415
|
-
onChange: (
|
|
415
|
+
onChange: (i) => m.setScrollInterval(Number(i)),
|
|
416
416
|
min: 0.1,
|
|
417
417
|
max: 100,
|
|
418
418
|
style: {
|
|
@@ -422,7 +422,7 @@ const Un = (h) => {
|
|
|
422
422
|
}
|
|
423
423
|
)
|
|
424
424
|
] });
|
|
425
|
-
}, fe = "_title_roi3a_1", xe = "_subtitle_roi3a_5", _e = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", je = "_products_roi3a_14", be = "_product_roi3a_14", ve = "_button_roi3a_80", Ie = "_disabled_roi3a_91", Ne = "_buttons_roi3a_118",
|
|
425
|
+
}, fe = "_title_roi3a_1", xe = "_subtitle_roi3a_5", _e = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", je = "_products_roi3a_14", be = "_product_roi3a_14", ve = "_button_roi3a_80", Ie = "_disabled_roi3a_91", Ne = "_buttons_roi3a_118", Ce = "_addButton_roi3a_164", Se = "_deleteButton_roi3a_179", Y = {
|
|
426
426
|
title: fe,
|
|
427
427
|
subtitle: xe,
|
|
428
428
|
productsBlock: _e,
|
|
@@ -432,85 +432,85 @@ const Un = (h) => {
|
|
|
432
432
|
button: ve,
|
|
433
433
|
disabled: Ie,
|
|
434
434
|
buttons: Ne,
|
|
435
|
-
addButton:
|
|
436
|
-
deleteButton:
|
|
435
|
+
addButton: Ce,
|
|
436
|
+
deleteButton: Se
|
|
437
437
|
};
|
|
438
|
-
function
|
|
438
|
+
function ke({ product: u, children: n }) {
|
|
439
439
|
const {
|
|
440
440
|
attributes: o,
|
|
441
441
|
listeners: s,
|
|
442
|
-
setNodeRef:
|
|
442
|
+
setNodeRef: c,
|
|
443
443
|
transform: e,
|
|
444
|
-
transition:
|
|
444
|
+
transition: h,
|
|
445
445
|
isDragging: d
|
|
446
446
|
} = yt({
|
|
447
|
-
id:
|
|
448
|
-
}),
|
|
447
|
+
id: u.id
|
|
448
|
+
}), g = {
|
|
449
449
|
transform: jt.Transform.toString(e),
|
|
450
|
-
transition:
|
|
450
|
+
transition: h
|
|
451
451
|
};
|
|
452
452
|
return /* @__PURE__ */ t.jsx(
|
|
453
453
|
"div",
|
|
454
454
|
{
|
|
455
|
-
ref:
|
|
456
|
-
style:
|
|
455
|
+
ref: c,
|
|
456
|
+
style: g,
|
|
457
457
|
className: `${Y.product} ${d ? Y.dragging : ""}`,
|
|
458
458
|
...o,
|
|
459
459
|
...s,
|
|
460
|
-
children:
|
|
460
|
+
children: n
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const Hn = (
|
|
464
|
+
const Hn = (u) => {
|
|
465
465
|
const {
|
|
466
|
-
isActiveItems:
|
|
466
|
+
isActiveItems: n,
|
|
467
467
|
setIsActiveItems: o,
|
|
468
468
|
items: s,
|
|
469
|
-
setItems:
|
|
469
|
+
setItems: c,
|
|
470
470
|
title: e,
|
|
471
|
-
subtitle:
|
|
471
|
+
subtitle: h,
|
|
472
472
|
editable: d = !0,
|
|
473
|
-
draggable:
|
|
473
|
+
draggable: g = !1,
|
|
474
474
|
deletable: _ = !0,
|
|
475
475
|
addable: M = !0,
|
|
476
476
|
itemsType: I,
|
|
477
|
-
itemsOptions:
|
|
477
|
+
itemsOptions: r,
|
|
478
478
|
addableOptions: l = {},
|
|
479
479
|
limit: y
|
|
480
|
-
} =
|
|
480
|
+
} = u, [x, m] = f.useState(null), [a, b] = f.useState(null), k = f.useRef(null), A = mt(
|
|
481
481
|
pt(gt, {
|
|
482
482
|
activationConstraint: {
|
|
483
483
|
distance: 5
|
|
484
484
|
}
|
|
485
485
|
})
|
|
486
486
|
);
|
|
487
|
-
|
|
487
|
+
f.useEffect(() => {
|
|
488
488
|
if (x) {
|
|
489
|
-
const
|
|
490
|
-
|
|
489
|
+
const i = [...s].map((N) => N.id === x.id ? x : N);
|
|
490
|
+
c(i);
|
|
491
491
|
}
|
|
492
|
-
}, [x]),
|
|
493
|
-
|
|
494
|
-
}, [
|
|
495
|
-
const E = (
|
|
496
|
-
|
|
497
|
-
const
|
|
492
|
+
}, [x]), f.useEffect(() => {
|
|
493
|
+
k.current && a && (k.current.getBoundingClientRect().height, a.top);
|
|
494
|
+
}, [k.current, a]);
|
|
495
|
+
const E = (i, N) => {
|
|
496
|
+
i.stopPropagation();
|
|
497
|
+
const P = i.target.getBoundingClientRect();
|
|
498
498
|
b({
|
|
499
|
-
top:
|
|
500
|
-
left:
|
|
499
|
+
top: P.top + window.scrollY,
|
|
500
|
+
left: P.left - 30
|
|
501
501
|
}), m(N);
|
|
502
|
-
}, K = (
|
|
503
|
-
const { active: N, over:
|
|
504
|
-
if (
|
|
505
|
-
const q = s.findIndex((
|
|
502
|
+
}, K = (i) => {
|
|
503
|
+
const { active: N, over: P } = i;
|
|
504
|
+
if (P && N.id !== P.id) {
|
|
505
|
+
const q = s.findIndex((C) => C.id === N.id), $ = s.findIndex((C) => C.id === P.id);
|
|
506
506
|
if (q !== -1 && $ !== -1) {
|
|
507
|
-
const
|
|
508
|
-
|
|
507
|
+
const C = [...s], [Z] = C.splice(q, 1);
|
|
508
|
+
C.splice($, 0, Z), c(C);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
}, L = (
|
|
512
|
-
const
|
|
513
|
-
|
|
511
|
+
}, L = (i, N) => {
|
|
512
|
+
const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
513
|
+
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
514
514
|
j,
|
|
515
515
|
{
|
|
516
516
|
name: "DotsSixVertical",
|
|
@@ -519,27 +519,27 @@ const Hn = (h) => {
|
|
|
519
519
|
height: 20
|
|
520
520
|
}
|
|
521
521
|
) }),
|
|
522
|
-
I === "select" &&
|
|
522
|
+
I === "select" && r && /* @__PURE__ */ t.jsx(
|
|
523
523
|
ot,
|
|
524
524
|
{
|
|
525
525
|
onChange: (q) => {
|
|
526
|
-
const $ = [...s],
|
|
527
|
-
if (!
|
|
528
|
-
const Z = $.map((v) => v.id ===
|
|
529
|
-
...
|
|
526
|
+
const $ = [...s], C = r.find((v) => v.name === q);
|
|
527
|
+
if (!C) return;
|
|
528
|
+
const Z = $.map((v) => v.id === i.id ? {
|
|
529
|
+
...C,
|
|
530
530
|
name: {
|
|
531
531
|
"en-US": q
|
|
532
532
|
}
|
|
533
533
|
} : v);
|
|
534
534
|
m({
|
|
535
|
-
...
|
|
535
|
+
...i,
|
|
536
536
|
name: {
|
|
537
537
|
"en-US": q
|
|
538
538
|
}
|
|
539
|
-
}),
|
|
539
|
+
}), c([...Z]);
|
|
540
540
|
},
|
|
541
|
-
value:
|
|
542
|
-
options:
|
|
541
|
+
value: i.name,
|
|
542
|
+
options: r.filter((q) => !s.find(($) => $.name === q.name)).map((q) => q.name)
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
545
|
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
@@ -550,7 +550,7 @@ const Hn = (h) => {
|
|
|
550
550
|
hoverable: !0,
|
|
551
551
|
width: 20,
|
|
552
552
|
height: 20,
|
|
553
|
-
onClick: (q) => E(q,
|
|
553
|
+
onClick: (q) => E(q, i)
|
|
554
554
|
}
|
|
555
555
|
) }),
|
|
556
556
|
_ && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
@@ -561,42 +561,42 @@ const Hn = (h) => {
|
|
|
561
561
|
width: 20,
|
|
562
562
|
height: 20,
|
|
563
563
|
fill: "#C12A2A",
|
|
564
|
-
onClick: () =>
|
|
564
|
+
onClick: () => c(s.filter((q) => q.id !== i.id))
|
|
565
565
|
}
|
|
566
566
|
) })
|
|
567
567
|
] })
|
|
568
568
|
] });
|
|
569
|
-
return
|
|
570
|
-
|
|
569
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
570
|
+
ke,
|
|
571
571
|
{
|
|
572
|
-
product:
|
|
572
|
+
product: i,
|
|
573
573
|
index: N,
|
|
574
|
-
children:
|
|
574
|
+
children: P
|
|
575
575
|
},
|
|
576
|
-
|
|
576
|
+
i.id
|
|
577
577
|
) : /* @__PURE__ */ t.jsx(
|
|
578
578
|
"div",
|
|
579
579
|
{
|
|
580
580
|
className: Y.product,
|
|
581
|
-
children:
|
|
581
|
+
children: P
|
|
582
582
|
},
|
|
583
|
-
|
|
583
|
+
i.id
|
|
584
584
|
);
|
|
585
585
|
};
|
|
586
586
|
return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
|
|
587
|
-
(e ||
|
|
587
|
+
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
588
588
|
e && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: e }),
|
|
589
|
-
|
|
589
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
590
590
|
lt,
|
|
591
591
|
{
|
|
592
|
-
current:
|
|
593
|
-
onChange: (
|
|
592
|
+
current: n,
|
|
593
|
+
onChange: (i) => o == null ? void 0 : o(i)
|
|
594
594
|
}
|
|
595
595
|
)
|
|
596
596
|
] }),
|
|
597
597
|
/* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: h }),
|
|
599
|
+
g ? /* @__PURE__ */ t.jsx(
|
|
600
600
|
ft,
|
|
601
601
|
{
|
|
602
602
|
sensors: A,
|
|
@@ -604,13 +604,13 @@ const Hn = (h) => {
|
|
|
604
604
|
children: /* @__PURE__ */ t.jsx(
|
|
605
605
|
xt,
|
|
606
606
|
{
|
|
607
|
-
items: s.map((
|
|
607
|
+
items: s.map((i) => i.id),
|
|
608
608
|
strategy: _t,
|
|
609
|
-
children: s.map((
|
|
609
|
+
children: s.map((i, N) => L(i, N))
|
|
610
610
|
}
|
|
611
611
|
)
|
|
612
612
|
}
|
|
613
|
-
) : s.map((
|
|
613
|
+
) : s.map((i, N) => L(i, N)),
|
|
614
614
|
M && /* @__PURE__ */ t.jsx(
|
|
615
615
|
"div",
|
|
616
616
|
{
|
|
@@ -624,25 +624,25 @@ const Hn = (h) => {
|
|
|
624
624
|
{
|
|
625
625
|
withoutHover: !0,
|
|
626
626
|
className: U(Y.button, {
|
|
627
|
-
[Y.disabled]: !!(y && y <= s.length || s.length === (
|
|
627
|
+
[Y.disabled]: !!(y && y <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
628
628
|
}),
|
|
629
629
|
size: "s",
|
|
630
|
-
disabled: !!(y && y <= s.length || s.length === (
|
|
630
|
+
disabled: !!(y && y <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
631
631
|
onClick: () => {
|
|
632
|
-
const
|
|
632
|
+
const i = [...s];
|
|
633
633
|
let N = null;
|
|
634
|
-
if (
|
|
635
|
-
for (let
|
|
636
|
-
if (!s.find((q) => q.id ===
|
|
637
|
-
N =
|
|
634
|
+
if (r) {
|
|
635
|
+
for (let P = 0; P < r.length; P++)
|
|
636
|
+
if (!s.find((q) => q.id === r[P].id)) {
|
|
637
|
+
N = r[P];
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
I === "select" &&
|
|
642
|
-
name: N ? N.name :
|
|
643
|
-
id: (N == null ? void 0 : N.id) ||
|
|
641
|
+
I === "select" && r && i.push({
|
|
642
|
+
name: N ? N.name : r[0].name,
|
|
643
|
+
id: (N == null ? void 0 : N.id) || r[0].id,
|
|
644
644
|
...l
|
|
645
|
-
}),
|
|
645
|
+
}), c(i);
|
|
646
646
|
},
|
|
647
647
|
style: {
|
|
648
648
|
width: "fit-content"
|
|
@@ -665,11 +665,11 @@ const Hn = (h) => {
|
|
|
665
665
|
] })
|
|
666
666
|
] });
|
|
667
667
|
};
|
|
668
|
-
function
|
|
669
|
-
const { product:
|
|
670
|
-
id:
|
|
668
|
+
function Pe(u) {
|
|
669
|
+
const { product: n, children: o } = u, { attributes: s, listeners: c, setNodeRef: e, transform: h, transition: d, isDragging: g } = yt({
|
|
670
|
+
id: n.id
|
|
671
671
|
}), _ = {
|
|
672
|
-
transform: jt.Transform.toString(
|
|
672
|
+
transform: jt.Transform.toString(h),
|
|
673
673
|
transition: d
|
|
674
674
|
};
|
|
675
675
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -677,85 +677,85 @@ function ke(h) {
|
|
|
677
677
|
{
|
|
678
678
|
ref: e,
|
|
679
679
|
style: _,
|
|
680
|
-
className: `${V.product} ${
|
|
680
|
+
className: `${V.product} ${g ? V.dragging : ""}`,
|
|
681
681
|
...s,
|
|
682
|
-
...
|
|
682
|
+
...c,
|
|
683
683
|
children: o
|
|
684
684
|
}
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
|
-
const zn = (
|
|
687
|
+
const zn = (u) => {
|
|
688
688
|
const {
|
|
689
|
-
isActiveItems:
|
|
689
|
+
isActiveItems: n,
|
|
690
690
|
setIsActiveItems: o,
|
|
691
691
|
items: s,
|
|
692
|
-
setItems:
|
|
692
|
+
setItems: c,
|
|
693
693
|
other: e,
|
|
694
|
-
title:
|
|
694
|
+
title: h,
|
|
695
695
|
subtitle: d,
|
|
696
|
-
editable:
|
|
696
|
+
editable: g = !0,
|
|
697
697
|
draggable: _ = !1,
|
|
698
698
|
deletable: M = !0,
|
|
699
699
|
addable: I = !0,
|
|
700
|
-
itemsType:
|
|
700
|
+
itemsType: r,
|
|
701
701
|
itemsPlaceholder: l = "",
|
|
702
702
|
itemsOptions: y,
|
|
703
703
|
hasRangeSelector: x = !1,
|
|
704
704
|
rangeSelectorOptions: m,
|
|
705
|
-
modalOptions:
|
|
705
|
+
modalOptions: a,
|
|
706
706
|
addableOptions: b = {},
|
|
707
|
-
limit:
|
|
708
|
-
} =
|
|
707
|
+
limit: k
|
|
708
|
+
} = u, [A, E] = f.useState(null), [K, L] = f.useState({
|
|
709
709
|
top: 0,
|
|
710
710
|
left: 0
|
|
711
|
-
}), [
|
|
711
|
+
}), [i, N] = f.useState(null), P = f.useRef(null), [q, $] = f.useState(!1), C = mt(
|
|
712
712
|
pt(gt, {
|
|
713
713
|
activationConstraint: {
|
|
714
714
|
distance: 5
|
|
715
715
|
}
|
|
716
716
|
})
|
|
717
717
|
);
|
|
718
|
-
|
|
718
|
+
f.useEffect(() => {
|
|
719
719
|
const p = () => {
|
|
720
720
|
E(null), $(!1);
|
|
721
721
|
};
|
|
722
722
|
return document.body.addEventListener("click", p), E(null), $(!1), () => {
|
|
723
723
|
E(null), $(!1), document.body.removeEventListener("click", p);
|
|
724
724
|
};
|
|
725
|
-
}, []),
|
|
725
|
+
}, []), f.useEffect(() => {
|
|
726
726
|
if (A) {
|
|
727
|
-
const p = [...s].map((
|
|
728
|
-
|
|
727
|
+
const p = [...s].map((S) => S.id === A.id ? A : S);
|
|
728
|
+
c(p);
|
|
729
729
|
}
|
|
730
|
-
}, [A]),
|
|
731
|
-
if (
|
|
732
|
-
const p =
|
|
733
|
-
let B =
|
|
734
|
-
B + p >
|
|
730
|
+
}, [A]), f.useEffect(() => {
|
|
731
|
+
if (P.current && i) {
|
|
732
|
+
const p = P.current.getBoundingClientRect().height, S = window.innerHeight;
|
|
733
|
+
let B = i.top;
|
|
734
|
+
B + p > S + window.scrollY - 200 && (B = S + window.scrollY - p - 200), B < 0 && (B = 10), L({
|
|
735
735
|
top: B,
|
|
736
|
-
left:
|
|
736
|
+
left: i.left
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
}, [
|
|
740
|
-
const Z = (p,
|
|
739
|
+
}, [P.current, i]);
|
|
740
|
+
const Z = (p, S) => {
|
|
741
741
|
p.stopPropagation();
|
|
742
742
|
const B = p.target.getBoundingClientRect();
|
|
743
743
|
N({
|
|
744
744
|
top: B.top + window.scrollY,
|
|
745
745
|
left: B.left - 30
|
|
746
|
-
}), E(
|
|
746
|
+
}), E(S), $(!0);
|
|
747
747
|
}, v = (p) => {
|
|
748
|
-
const { active:
|
|
749
|
-
if (B &&
|
|
750
|
-
const T = s.findIndex((z) => z.id ===
|
|
748
|
+
const { active: S, over: B } = p;
|
|
749
|
+
if (B && S.id !== B.id) {
|
|
750
|
+
const T = s.findIndex((z) => z.id === S.id), tt = s.findIndex((z) => z.id === B.id);
|
|
751
751
|
if (T !== -1 && tt !== -1) {
|
|
752
752
|
const z = [...s], [F] = z.splice(T, 1);
|
|
753
|
-
z.splice(tt, 0, F),
|
|
753
|
+
z.splice(tt, 0, F), c(z);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
}, D = (p) => {
|
|
757
757
|
var B;
|
|
758
|
-
const
|
|
758
|
+
const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
759
759
|
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
760
760
|
j,
|
|
761
761
|
{
|
|
@@ -765,7 +765,7 @@ const zn = (h) => {
|
|
|
765
765
|
height: 20
|
|
766
766
|
}
|
|
767
767
|
) }),
|
|
768
|
-
|
|
768
|
+
r === "select" && y && /* @__PURE__ */ t.jsx(
|
|
769
769
|
ot,
|
|
770
770
|
{
|
|
771
771
|
onChange: (T) => {
|
|
@@ -780,7 +780,7 @@ const zn = (h) => {
|
|
|
780
780
|
name: {
|
|
781
781
|
"en-US": T
|
|
782
782
|
}
|
|
783
|
-
}),
|
|
783
|
+
}), c([...z]);
|
|
784
784
|
},
|
|
785
785
|
value: p.name["en-US"],
|
|
786
786
|
options: y.filter(
|
|
@@ -788,8 +788,8 @@ const zn = (h) => {
|
|
|
788
788
|
)
|
|
789
789
|
}
|
|
790
790
|
),
|
|
791
|
-
|
|
792
|
-
|
|
791
|
+
r === "input" && /* @__PURE__ */ t.jsx(
|
|
792
|
+
Ct,
|
|
793
793
|
{
|
|
794
794
|
onChange: (T) => {
|
|
795
795
|
const z = [...s].map((F) => F.id === p.id ? {
|
|
@@ -798,13 +798,13 @@ const zn = (h) => {
|
|
|
798
798
|
"en-US": T
|
|
799
799
|
}
|
|
800
800
|
} : F);
|
|
801
|
-
|
|
801
|
+
c([...z]);
|
|
802
802
|
},
|
|
803
803
|
value: p.name["en-US"],
|
|
804
804
|
placeholder: l
|
|
805
805
|
}
|
|
806
806
|
),
|
|
807
|
-
|
|
807
|
+
r === "image" && /* @__PURE__ */ t.jsx(
|
|
808
808
|
Dt,
|
|
809
809
|
{
|
|
810
810
|
onChange: (T) => {
|
|
@@ -812,13 +812,13 @@ const zn = (h) => {
|
|
|
812
812
|
...p,
|
|
813
813
|
images: T
|
|
814
814
|
} : F);
|
|
815
|
-
|
|
815
|
+
c([...z]);
|
|
816
816
|
},
|
|
817
817
|
activeImage: (B = s.find((T) => T.id === p.id)) == null ? void 0 : B.images[0]
|
|
818
818
|
}
|
|
819
819
|
),
|
|
820
820
|
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
821
|
-
|
|
821
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
822
822
|
j,
|
|
823
823
|
{
|
|
824
824
|
name: "Sliders",
|
|
@@ -836,56 +836,56 @@ const zn = (h) => {
|
|
|
836
836
|
width: 20,
|
|
837
837
|
height: 20,
|
|
838
838
|
fill: "#C12A2A",
|
|
839
|
-
onClick: () =>
|
|
839
|
+
onClick: () => c(s.filter((T) => T.id !== p.id))
|
|
840
840
|
}
|
|
841
841
|
) })
|
|
842
842
|
] })
|
|
843
843
|
] });
|
|
844
844
|
return _ ? /* @__PURE__ */ t.jsx(
|
|
845
|
-
|
|
845
|
+
Pe,
|
|
846
846
|
{
|
|
847
847
|
product: p,
|
|
848
|
-
children:
|
|
848
|
+
children: S
|
|
849
849
|
},
|
|
850
850
|
p.id
|
|
851
851
|
) : /* @__PURE__ */ t.jsx(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
854
854
|
className: V.product,
|
|
855
|
-
children:
|
|
855
|
+
children: S
|
|
856
856
|
},
|
|
857
857
|
p.id
|
|
858
858
|
);
|
|
859
859
|
};
|
|
860
860
|
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
861
|
-
(
|
|
862
|
-
|
|
863
|
-
|
|
861
|
+
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
862
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: h }),
|
|
863
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
864
864
|
lt,
|
|
865
865
|
{
|
|
866
|
-
current:
|
|
866
|
+
current: n,
|
|
867
867
|
onChange: (p) => o == null ? void 0 : o(p)
|
|
868
868
|
}
|
|
869
869
|
)
|
|
870
870
|
] }),
|
|
871
|
-
A &&
|
|
871
|
+
A && g && a && q && /* @__PURE__ */ t.jsx(
|
|
872
872
|
At,
|
|
873
873
|
{
|
|
874
|
-
ref:
|
|
874
|
+
ref: P,
|
|
875
875
|
activeItem: A,
|
|
876
876
|
setActiveItem: E,
|
|
877
877
|
popupPosition: K,
|
|
878
|
-
modalOptions:
|
|
878
|
+
modalOptions: a,
|
|
879
879
|
setIsOpenModal: $
|
|
880
880
|
}
|
|
881
881
|
),
|
|
882
|
-
x && m && /* @__PURE__ */ t.jsx(
|
|
882
|
+
x && m && /* @__PURE__ */ t.jsx(Pt, { ...m }),
|
|
883
883
|
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
884
884
|
d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
|
|
885
885
|
_ ? /* @__PURE__ */ t.jsx(
|
|
886
886
|
ft,
|
|
887
887
|
{
|
|
888
|
-
sensors:
|
|
888
|
+
sensors: C,
|
|
889
889
|
onDragEnd: v,
|
|
890
890
|
children: /* @__PURE__ */ t.jsx(
|
|
891
891
|
xt,
|
|
@@ -910,29 +910,29 @@ const zn = (h) => {
|
|
|
910
910
|
{
|
|
911
911
|
withoutHover: !0,
|
|
912
912
|
className: U(V.button, {
|
|
913
|
-
[V.disabled]: !!(
|
|
913
|
+
[V.disabled]: !!(k && k <= s.length)
|
|
914
914
|
}),
|
|
915
915
|
size: "s",
|
|
916
|
-
disabled: !!(
|
|
916
|
+
disabled: !!(k && k <= s.length),
|
|
917
917
|
onClick: () => {
|
|
918
918
|
const p = [...s];
|
|
919
|
-
let
|
|
919
|
+
let S = null;
|
|
920
920
|
if (y) {
|
|
921
921
|
for (let B = 0; B < y.length; B++)
|
|
922
922
|
if (!s.find((T) => T.name["en-US"] === y[B])) {
|
|
923
|
-
|
|
923
|
+
S = y[B];
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
|
-
|
|
927
|
+
r === "select" && y ? p.push({
|
|
928
928
|
name: {
|
|
929
|
-
"en-US":
|
|
929
|
+
"en-US": S || y[0]
|
|
930
930
|
},
|
|
931
931
|
id: J(),
|
|
932
932
|
...b,
|
|
933
933
|
maxSymbols: 100
|
|
934
934
|
// пример значения
|
|
935
|
-
}) :
|
|
935
|
+
}) : r === "input" ? p.push({
|
|
936
936
|
name: {
|
|
937
937
|
"en-US": ""
|
|
938
938
|
},
|
|
@@ -946,7 +946,7 @@ const zn = (h) => {
|
|
|
946
946
|
id: J(),
|
|
947
947
|
...b,
|
|
948
948
|
maxSymbols: 100
|
|
949
|
-
}),
|
|
949
|
+
}), c(p);
|
|
950
950
|
},
|
|
951
951
|
style: {
|
|
952
952
|
width: "fit-content"
|
|
@@ -983,44 +983,44 @@ const zn = (h) => {
|
|
|
983
983
|
buttons: $e,
|
|
984
984
|
addButton: Oe,
|
|
985
985
|
deleteButton: qe
|
|
986
|
-
}, Ae = (
|
|
987
|
-
const { buttons:
|
|
986
|
+
}, Ae = (u) => {
|
|
987
|
+
const { buttons: n, setButtons: o, deletable: s = !0, addable: c = !0, editableLink: e = !0 } = u, { pages: h } = bt(), [d, g] = f.useState(null), [_, M] = f.useState({
|
|
988
988
|
top: 0,
|
|
989
989
|
left: 0
|
|
990
|
-
}), [I,
|
|
991
|
-
|
|
990
|
+
}), [I, r] = f.useState(null), l = f.useRef(null);
|
|
991
|
+
f.useEffect(() => {
|
|
992
992
|
if (d) {
|
|
993
|
-
const m = [...
|
|
993
|
+
const m = [...n].map((a) => a.id === d.id ? d : a);
|
|
994
994
|
o(m);
|
|
995
995
|
}
|
|
996
|
-
}, [d]),
|
|
996
|
+
}, [d]), f.useEffect(() => {
|
|
997
997
|
if (l.current && I) {
|
|
998
|
-
const m = l.current.getBoundingClientRect().height,
|
|
998
|
+
const m = l.current.getBoundingClientRect().height, a = window.innerHeight;
|
|
999
999
|
let b = I.top;
|
|
1000
|
-
b + m >
|
|
1000
|
+
b + m > a + window.scrollY - 200 && (b = a + window.scrollY - m - 200), b < 0 && (b = 10), M({
|
|
1001
1001
|
top: b,
|
|
1002
1002
|
left: I.left
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
1005
|
}, [l.current, I]);
|
|
1006
|
-
const y = (m,
|
|
1006
|
+
const y = (m, a) => {
|
|
1007
1007
|
m.stopPropagation();
|
|
1008
1008
|
const b = m.target.getBoundingClientRect();
|
|
1009
|
-
|
|
1009
|
+
r({
|
|
1010
1010
|
top: b.top + window.scrollY - 70,
|
|
1011
|
-
left: b.left - (
|
|
1012
|
-
}),
|
|
1013
|
-
}, x = (m,
|
|
1014
|
-
const b = [...
|
|
1011
|
+
left: b.left - (c ? 30 : 65)
|
|
1012
|
+
}), g(a);
|
|
1013
|
+
}, x = (m, a) => {
|
|
1014
|
+
const b = [...n], k = {
|
|
1015
1015
|
...m,
|
|
1016
1016
|
id: Math.random().toString(36).substr(2, 9)
|
|
1017
1017
|
// Генерируем новый уникальный ID
|
|
1018
1018
|
};
|
|
1019
|
-
b.splice(
|
|
1019
|
+
b.splice(a + 1, 0, k), o(b);
|
|
1020
1020
|
};
|
|
1021
1021
|
return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
|
|
1022
1022
|
/* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
|
|
1023
|
-
|
|
1023
|
+
n.map((m, a) => /* @__PURE__ */ t.jsxs(
|
|
1024
1024
|
"div",
|
|
1025
1025
|
{
|
|
1026
1026
|
className: st.product,
|
|
@@ -1029,7 +1029,7 @@ const zn = (h) => {
|
|
|
1029
1029
|
ot,
|
|
1030
1030
|
{
|
|
1031
1031
|
onChange: (b) => {
|
|
1032
|
-
const A = [...
|
|
1032
|
+
const A = [...n].map((E) => E.id === m.id ? {
|
|
1033
1033
|
...m,
|
|
1034
1034
|
type: b
|
|
1035
1035
|
} : E);
|
|
@@ -1048,7 +1048,7 @@ const zn = (h) => {
|
|
|
1048
1048
|
width: 20,
|
|
1049
1049
|
height: 20,
|
|
1050
1050
|
onClick: () => {
|
|
1051
|
-
x(m,
|
|
1051
|
+
x(m, a);
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
) }),
|
|
@@ -1070,7 +1070,7 @@ const zn = (h) => {
|
|
|
1070
1070
|
name: "Trash",
|
|
1071
1071
|
hoverable: !0,
|
|
1072
1072
|
onClick: () => {
|
|
1073
|
-
const b =
|
|
1073
|
+
const b = n.filter((k) => k.id !== m.id);
|
|
1074
1074
|
o(b);
|
|
1075
1075
|
},
|
|
1076
1076
|
width: 20,
|
|
@@ -1088,12 +1088,12 @@ const zn = (h) => {
|
|
|
1088
1088
|
{
|
|
1089
1089
|
ref: l,
|
|
1090
1090
|
activeButton: d,
|
|
1091
|
-
setActiveButton:
|
|
1091
|
+
setActiveButton: g,
|
|
1092
1092
|
popupPosition: _,
|
|
1093
1093
|
editableLink: e
|
|
1094
1094
|
}
|
|
1095
1095
|
),
|
|
1096
|
-
|
|
1096
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1097
1097
|
"div",
|
|
1098
1098
|
{
|
|
1099
1099
|
style: {
|
|
@@ -1108,7 +1108,7 @@ const zn = (h) => {
|
|
|
1108
1108
|
className: st.button,
|
|
1109
1109
|
size: "s",
|
|
1110
1110
|
onClick: () => {
|
|
1111
|
-
const m = [...
|
|
1111
|
+
const m = [...n];
|
|
1112
1112
|
e ? m.push({
|
|
1113
1113
|
type: "Primary",
|
|
1114
1114
|
id: J(),
|
|
@@ -1117,7 +1117,7 @@ const zn = (h) => {
|
|
|
1117
1117
|
"en-US": "Button Name"
|
|
1118
1118
|
},
|
|
1119
1119
|
destination: "Go to Page",
|
|
1120
|
-
page:
|
|
1120
|
+
page: h ? Object.values(h)[0].path : "/",
|
|
1121
1121
|
openInNewTab: !1
|
|
1122
1122
|
}) : m.push({
|
|
1123
1123
|
type: "Primary",
|
|
@@ -1127,7 +1127,7 @@ const zn = (h) => {
|
|
|
1127
1127
|
"en-US": "Create Ticket"
|
|
1128
1128
|
},
|
|
1129
1129
|
destination: "Go to Page",
|
|
1130
|
-
page:
|
|
1130
|
+
page: h ? Object.values(h)[0].path : "/",
|
|
1131
1131
|
openInNewTab: !1
|
|
1132
1132
|
}), o(m);
|
|
1133
1133
|
},
|
|
@@ -1150,44 +1150,44 @@ const zn = (h) => {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
)
|
|
1152
1152
|
] });
|
|
1153
|
-
}, Fn = (
|
|
1153
|
+
}, Fn = (u) => {
|
|
1154
1154
|
const {
|
|
1155
|
-
isActiveButtons:
|
|
1155
|
+
isActiveButtons: n,
|
|
1156
1156
|
setIsActiveButtons: o,
|
|
1157
1157
|
buttons: s,
|
|
1158
|
-
setButtons:
|
|
1158
|
+
setButtons: c,
|
|
1159
1159
|
editableLink: e = !0,
|
|
1160
|
-
addable:
|
|
1160
|
+
addable: h = !0,
|
|
1161
1161
|
deletable: d = !0
|
|
1162
|
-
} =
|
|
1163
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1164
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1165
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1162
|
+
} = u;
|
|
1163
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: It.buttonsBlock, children: [
|
|
1164
|
+
/* @__PURE__ */ t.jsxs("div", { className: It.top, children: [
|
|
1165
|
+
/* @__PURE__ */ t.jsx("h3", { className: It.title, children: "Buttons" }),
|
|
1166
1166
|
/* @__PURE__ */ t.jsx(
|
|
1167
1167
|
lt,
|
|
1168
1168
|
{
|
|
1169
|
-
current:
|
|
1170
|
-
onChange: (
|
|
1169
|
+
current: n,
|
|
1170
|
+
onChange: (g) => o(g)
|
|
1171
1171
|
}
|
|
1172
1172
|
)
|
|
1173
1173
|
] }),
|
|
1174
|
-
|
|
1174
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1175
1175
|
Ae,
|
|
1176
1176
|
{
|
|
1177
1177
|
buttons: s,
|
|
1178
|
-
setButtons:
|
|
1178
|
+
setButtons: c,
|
|
1179
1179
|
editableLink: e,
|
|
1180
|
-
addable:
|
|
1180
|
+
addable: h,
|
|
1181
1181
|
deletable: d
|
|
1182
1182
|
}
|
|
1183
1183
|
)
|
|
1184
1184
|
] }) });
|
|
1185
1185
|
};
|
|
1186
|
-
function De(
|
|
1187
|
-
const { product:
|
|
1188
|
-
id: String(
|
|
1186
|
+
function De(u) {
|
|
1187
|
+
const { product: n, children: o } = u, { attributes: s, listeners: c, setNodeRef: e, transform: h, transition: d, isDragging: g } = yt({
|
|
1188
|
+
id: String(n.listingId)
|
|
1189
1189
|
}), _ = {
|
|
1190
|
-
transform: jt.Transform.toString(
|
|
1190
|
+
transform: jt.Transform.toString(h),
|
|
1191
1191
|
transition: d
|
|
1192
1192
|
};
|
|
1193
1193
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1195,67 +1195,67 @@ function De(h) {
|
|
|
1195
1195
|
{
|
|
1196
1196
|
ref: e,
|
|
1197
1197
|
style: _,
|
|
1198
|
-
className: `${W.product} ${
|
|
1198
|
+
className: `${W.product} ${g ? W.dragging : ""}`,
|
|
1199
1199
|
...s,
|
|
1200
|
-
...
|
|
1200
|
+
...c,
|
|
1201
1201
|
children: o
|
|
1202
1202
|
}
|
|
1203
1203
|
);
|
|
1204
1204
|
}
|
|
1205
|
-
const Vn = (
|
|
1205
|
+
const Vn = (u) => {
|
|
1206
1206
|
const {
|
|
1207
|
-
isActiveItems:
|
|
1207
|
+
isActiveItems: n,
|
|
1208
1208
|
setIsActiveItems: o,
|
|
1209
1209
|
items: s,
|
|
1210
|
-
setItems:
|
|
1210
|
+
setItems: c,
|
|
1211
1211
|
other: e,
|
|
1212
|
-
title:
|
|
1212
|
+
title: h,
|
|
1213
1213
|
subtitle: d,
|
|
1214
|
-
editable:
|
|
1214
|
+
editable: g = !0,
|
|
1215
1215
|
draggable: _ = !1,
|
|
1216
1216
|
withImage: M = !1,
|
|
1217
1217
|
deletable: I = !0,
|
|
1218
|
-
addable:
|
|
1218
|
+
addable: r = !0,
|
|
1219
1219
|
itemsType: l,
|
|
1220
1220
|
itemsOptions: y,
|
|
1221
1221
|
limit: x,
|
|
1222
1222
|
aspectRatio: m,
|
|
1223
|
-
setAspectRatio:
|
|
1224
|
-
} =
|
|
1223
|
+
setAspectRatio: a
|
|
1224
|
+
} = u, [b, k] = f.useState(
|
|
1225
1225
|
null
|
|
1226
|
-
), [A, E] =
|
|
1226
|
+
), [A, E] = f.useState({
|
|
1227
1227
|
top: 0,
|
|
1228
1228
|
left: 0
|
|
1229
|
-
}), [K, L] =
|
|
1229
|
+
}), [K, L] = f.useState(!1), i = mt(
|
|
1230
1230
|
pt(gt, {
|
|
1231
1231
|
activationConstraint: {
|
|
1232
1232
|
distance: 5
|
|
1233
1233
|
}
|
|
1234
1234
|
})
|
|
1235
1235
|
);
|
|
1236
|
-
|
|
1236
|
+
f.useEffect(() => {
|
|
1237
1237
|
const v = () => {
|
|
1238
|
-
|
|
1238
|
+
k(null), L(!1);
|
|
1239
1239
|
};
|
|
1240
|
-
return document.body.addEventListener("click", v),
|
|
1241
|
-
|
|
1240
|
+
return document.body.addEventListener("click", v), k(null), L(!1), () => {
|
|
1241
|
+
k(null), L(!1), document.body.removeEventListener("click", v);
|
|
1242
1242
|
};
|
|
1243
|
-
}, []),
|
|
1243
|
+
}, []), f.useEffect(() => {
|
|
1244
1244
|
if (b) {
|
|
1245
1245
|
const v = [...s].map((D) => D.listingId === b.listingId ? b : D);
|
|
1246
|
-
|
|
1246
|
+
c(v);
|
|
1247
1247
|
}
|
|
1248
1248
|
}, [b]);
|
|
1249
1249
|
const N = (v, D) => {
|
|
1250
1250
|
v.stopPropagation();
|
|
1251
|
-
const p = v.target.getBoundingClientRect(),
|
|
1251
|
+
const p = v.target.getBoundingClientRect(), S = 100, B = window.innerHeight;
|
|
1252
1252
|
let T = p.top + window.scrollY;
|
|
1253
|
-
T +
|
|
1253
|
+
T + S > B && (T = B - S - 20), L(!0), E({
|
|
1254
1254
|
top: T - 80,
|
|
1255
1255
|
left: p.left - 30
|
|
1256
|
-
}),
|
|
1256
|
+
}), k(D);
|
|
1257
1257
|
};
|
|
1258
|
-
function
|
|
1258
|
+
function P(v) {
|
|
1259
1259
|
if (M)
|
|
1260
1260
|
return v ? /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"img",
|
|
@@ -1278,16 +1278,16 @@ const Vn = (h) => {
|
|
|
1278
1278
|
const q = (v) => {
|
|
1279
1279
|
const { active: D, over: p } = v;
|
|
1280
1280
|
if (p && D.id !== p.id) {
|
|
1281
|
-
const
|
|
1282
|
-
if (
|
|
1283
|
-
const T = [...s], [tt] = T.splice(
|
|
1284
|
-
T.splice(B, 0, tt),
|
|
1281
|
+
const S = s.findIndex((T) => String(T.listingId) === D.id), B = s.findIndex((T) => String(T.listingId) === p.id);
|
|
1282
|
+
if (S !== -1 && B !== -1) {
|
|
1283
|
+
const T = [...s], [tt] = T.splice(S, 1);
|
|
1284
|
+
T.splice(B, 0, tt), c(T);
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
1287
|
}, $ = () => {
|
|
1288
|
-
L(!1),
|
|
1289
|
-
},
|
|
1290
|
-
const D = y.find((
|
|
1288
|
+
L(!1), k(null);
|
|
1289
|
+
}, C = (v) => {
|
|
1290
|
+
const D = y.find((S) => v.listingId === S.id);
|
|
1291
1291
|
if (!D) return null;
|
|
1292
1292
|
const p = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1293
1293
|
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
@@ -1302,37 +1302,37 @@ const Vn = (h) => {
|
|
|
1302
1302
|
l === "select" && /* @__PURE__ */ t.jsx(
|
|
1303
1303
|
ot,
|
|
1304
1304
|
{
|
|
1305
|
-
onChange: (
|
|
1306
|
-
const B = [...s], T = y.find((F) => F.productData.name ===
|
|
1305
|
+
onChange: (S) => {
|
|
1306
|
+
const B = [...s], T = y.find((F) => F.productData.name === S);
|
|
1307
1307
|
if (!T) return;
|
|
1308
1308
|
const tt = {
|
|
1309
1309
|
listingId: T.id,
|
|
1310
1310
|
image: T.productData.images.length > 0 ? T.productData.images[0].cfId : ""
|
|
1311
1311
|
}, z = B.map((F) => F.listingId === v.listingId ? tt : F);
|
|
1312
|
-
|
|
1312
|
+
k(tt), c([...z]);
|
|
1313
1313
|
},
|
|
1314
1314
|
value: D.productData.name,
|
|
1315
1315
|
options: [
|
|
1316
|
-
...y.filter((
|
|
1316
|
+
...y.filter((S) => !s.find((B) => B.listingId === S.id)).map((S) => S.productData.name)
|
|
1317
1317
|
],
|
|
1318
|
-
leftAddonOptions: y.map((
|
|
1318
|
+
leftAddonOptions: y.map((S) => {
|
|
1319
1319
|
var B;
|
|
1320
1320
|
return {
|
|
1321
|
-
value:
|
|
1322
|
-
addon:
|
|
1321
|
+
value: S.productData.name,
|
|
1322
|
+
addon: P(((B = S.productData.images[0]) == null ? void 0 : B.cfId) || "")
|
|
1323
1323
|
};
|
|
1324
1324
|
})
|
|
1325
1325
|
}
|
|
1326
1326
|
),
|
|
1327
1327
|
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
1328
|
-
|
|
1328
|
+
g && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1329
1329
|
j,
|
|
1330
1330
|
{
|
|
1331
1331
|
name: "Sliders",
|
|
1332
1332
|
hoverable: !0,
|
|
1333
1333
|
width: 20,
|
|
1334
1334
|
height: 20,
|
|
1335
|
-
onClick: (
|
|
1335
|
+
onClick: (S) => N(S, v)
|
|
1336
1336
|
}
|
|
1337
1337
|
) }),
|
|
1338
1338
|
I && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
@@ -1343,7 +1343,7 @@ const Vn = (h) => {
|
|
|
1343
1343
|
width: 20,
|
|
1344
1344
|
height: 20,
|
|
1345
1345
|
fill: "#C12A2A",
|
|
1346
|
-
onClick: () =>
|
|
1346
|
+
onClick: () => c(s.filter((S) => S !== v))
|
|
1347
1347
|
}
|
|
1348
1348
|
) })
|
|
1349
1349
|
] })
|
|
@@ -1363,14 +1363,14 @@ const Vn = (h) => {
|
|
|
1363
1363
|
},
|
|
1364
1364
|
v.listingId
|
|
1365
1365
|
);
|
|
1366
|
-
}, Z =
|
|
1366
|
+
}, Z = f.useRef(null);
|
|
1367
1367
|
return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
|
|
1368
|
-
(
|
|
1369
|
-
|
|
1370
|
-
|
|
1368
|
+
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
1369
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: h }),
|
|
1370
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1371
1371
|
lt,
|
|
1372
1372
|
{
|
|
1373
|
-
current:
|
|
1373
|
+
current: n,
|
|
1374
1374
|
onChange: (v) => o == null ? void 0 : o(v)
|
|
1375
1375
|
}
|
|
1376
1376
|
)
|
|
@@ -1380,18 +1380,18 @@ const Vn = (h) => {
|
|
|
1380
1380
|
{
|
|
1381
1381
|
ref: Z,
|
|
1382
1382
|
activeItem: b,
|
|
1383
|
-
setActiveItem:
|
|
1383
|
+
setActiveItem: k,
|
|
1384
1384
|
setIsOpenModal: L,
|
|
1385
1385
|
popupPosition: A,
|
|
1386
1386
|
itemsOptions: y
|
|
1387
1387
|
}
|
|
1388
1388
|
),
|
|
1389
|
-
|
|
1389
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
1390
1390
|
d && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: d }),
|
|
1391
1391
|
_ ? /* @__PURE__ */ t.jsx(
|
|
1392
1392
|
ft,
|
|
1393
1393
|
{
|
|
1394
|
-
sensors:
|
|
1394
|
+
sensors: i,
|
|
1395
1395
|
onDragEnd: q,
|
|
1396
1396
|
onDragStart: $,
|
|
1397
1397
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1399,12 +1399,12 @@ const Vn = (h) => {
|
|
|
1399
1399
|
{
|
|
1400
1400
|
items: s.map((v) => String(v.listingId)),
|
|
1401
1401
|
strategy: _t,
|
|
1402
|
-
children: s.map((v) =>
|
|
1402
|
+
children: s.map((v) => C(v))
|
|
1403
1403
|
}
|
|
1404
1404
|
)
|
|
1405
1405
|
}
|
|
1406
|
-
) : s.map((v) =>
|
|
1407
|
-
|
|
1406
|
+
) : s.map((v) => C(v)),
|
|
1407
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1408
1408
|
"div",
|
|
1409
1409
|
{
|
|
1410
1410
|
style: {
|
|
@@ -1428,7 +1428,7 @@ const Vn = (h) => {
|
|
|
1428
1428
|
});
|
|
1429
1429
|
break;
|
|
1430
1430
|
}
|
|
1431
|
-
|
|
1431
|
+
c(v);
|
|
1432
1432
|
},
|
|
1433
1433
|
disabled: s.length === (x || y.length),
|
|
1434
1434
|
style: {
|
|
@@ -1450,16 +1450,16 @@ const Vn = (h) => {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
)
|
|
1452
1452
|
] }),
|
|
1453
|
-
m &&
|
|
1453
|
+
m && a && /* @__PURE__ */ t.jsx(
|
|
1454
1454
|
ot,
|
|
1455
1455
|
{
|
|
1456
1456
|
value: m,
|
|
1457
1457
|
options: Object.keys(Tt),
|
|
1458
|
-
onChange: (v) =>
|
|
1458
|
+
onChange: (v) => a(v),
|
|
1459
1459
|
leftAddonOptions: wt
|
|
1460
1460
|
}
|
|
1461
1461
|
),
|
|
1462
|
-
|
|
1462
|
+
n && e !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1463
1463
|
ht,
|
|
1464
1464
|
{
|
|
1465
1465
|
otherTitle: "Other",
|
|
@@ -1489,24 +1489,24 @@ const Vn = (h) => {
|
|
|
1489
1489
|
chargeActive: ss,
|
|
1490
1490
|
title: ns
|
|
1491
1491
|
};
|
|
1492
|
-
var
|
|
1493
|
-
const is = (
|
|
1492
|
+
var $t = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))($t || {});
|
|
1493
|
+
const is = (u) => {
|
|
1494
1494
|
var K, L;
|
|
1495
|
-
const { product:
|
|
1495
|
+
const { product: n, setIsOpen: o, isCartEnabled: s = !0 } = u, { variants: c } = n, [e, h] = f.useState(c[0]), [d, g] = f.useState(
|
|
1496
1496
|
e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
|
|
1497
|
-
), { notifications: _, setNotifications: M } = St(), I =
|
|
1498
|
-
|
|
1497
|
+
), { notifications: _, setNotifications: M } = St(), I = vt(), [r, l] = f.useState(1), { cart: y, reset: x, addProductToCart: m } = ct(), [a, b] = f.useState(!1);
|
|
1498
|
+
f.useEffect(() => {
|
|
1499
1499
|
b(!0);
|
|
1500
|
-
const
|
|
1501
|
-
return () => clearTimeout(
|
|
1502
|
-
}, [
|
|
1503
|
-
async function
|
|
1500
|
+
const i = setTimeout(() => b(!1), 600);
|
|
1501
|
+
return () => clearTimeout(i);
|
|
1502
|
+
}, [r]);
|
|
1503
|
+
async function k() {
|
|
1504
1504
|
try {
|
|
1505
1505
|
m({
|
|
1506
|
-
productId:
|
|
1506
|
+
productId: n.id,
|
|
1507
1507
|
productVariantId: e.id,
|
|
1508
1508
|
chargeType: d,
|
|
1509
|
-
quantity:
|
|
1509
|
+
quantity: r
|
|
1510
1510
|
}), M([
|
|
1511
1511
|
..._,
|
|
1512
1512
|
{
|
|
@@ -1515,12 +1515,12 @@ const is = (h) => {
|
|
|
1515
1515
|
status: "success"
|
|
1516
1516
|
}
|
|
1517
1517
|
]);
|
|
1518
|
-
} catch (
|
|
1518
|
+
} catch (i) {
|
|
1519
1519
|
M([
|
|
1520
1520
|
..._,
|
|
1521
1521
|
{
|
|
1522
1522
|
id: J(),
|
|
1523
|
-
message: `Product failed to add to cart: ${
|
|
1523
|
+
message: `Product failed to add to cart: ${i}`,
|
|
1524
1524
|
status: "error"
|
|
1525
1525
|
}
|
|
1526
1526
|
]);
|
|
@@ -1528,54 +1528,54 @@ const is = (h) => {
|
|
|
1528
1528
|
o == null || o(!1);
|
|
1529
1529
|
}
|
|
1530
1530
|
function A() {
|
|
1531
|
-
x(),
|
|
1531
|
+
x(), k(), I("/checkout");
|
|
1532
1532
|
}
|
|
1533
|
-
function E(
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
return `${
|
|
1537
|
-
} else if (
|
|
1538
|
-
const
|
|
1539
|
-
return `${
|
|
1540
|
-
} else if (
|
|
1541
|
-
const
|
|
1542
|
-
return `${
|
|
1533
|
+
function E(i) {
|
|
1534
|
+
if (i >= 864e5) {
|
|
1535
|
+
const C = Math.floor(i / 864e5);
|
|
1536
|
+
return `${C} ${C === 1 ? "day" : "days"}`;
|
|
1537
|
+
} else if (i >= 36e5) {
|
|
1538
|
+
const C = Math.floor(i / 36e5);
|
|
1539
|
+
return `${C} ${C === 1 ? "hour" : "hours"}`;
|
|
1540
|
+
} else if (i >= 6e4) {
|
|
1541
|
+
const C = Math.floor(i / 6e4);
|
|
1542
|
+
return `${C} ${C === 1 ? "minute" : "minutes"}`;
|
|
1543
1543
|
} else {
|
|
1544
|
-
const
|
|
1545
|
-
return `${
|
|
1544
|
+
const C = Math.floor(i / 1e3);
|
|
1545
|
+
return `${C} ${C === 1 ? "second" : "seconds"}`;
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
|
-
return
|
|
1548
|
+
return f.useEffect(() => {
|
|
1549
1549
|
e.quantity && e.quantity.available === 0 ? l(0) : l(1);
|
|
1550
|
-
}, [e.quantity.available]),
|
|
1551
|
-
e.chargeTypes &&
|
|
1550
|
+
}, [e.quantity.available]), f.useEffect(() => {
|
|
1551
|
+
e.chargeTypes && g(
|
|
1552
1552
|
e.chargeTypes.includes(d) ? d : e.chargeTypes[0]
|
|
1553
1553
|
);
|
|
1554
1554
|
}, [e.chargeTypes]), /* @__PURE__ */ t.jsxs("div", { className: O.options, children: [
|
|
1555
|
-
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: O.chargeTypes, children: e.chargeTypes.map((
|
|
1555
|
+
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: O.chargeTypes, children: e.chargeTypes.map((i) => /* @__PURE__ */ t.jsx(
|
|
1556
1556
|
"div",
|
|
1557
1557
|
{
|
|
1558
1558
|
className: U(O.charge, {
|
|
1559
|
-
[O.chargeActive]: d ===
|
|
1559
|
+
[O.chargeActive]: d === i
|
|
1560
1560
|
}),
|
|
1561
|
-
onClick: () =>
|
|
1562
|
-
children:
|
|
1561
|
+
onClick: () => g(i),
|
|
1562
|
+
children: $t[i]
|
|
1563
1563
|
},
|
|
1564
|
-
|
|
1564
|
+
i
|
|
1565
1565
|
)) }),
|
|
1566
|
-
/* @__PURE__ */ t.jsx("div", { className: O.variants, children:
|
|
1566
|
+
/* @__PURE__ */ t.jsx("div", { className: O.variants, children: c.filter((i) => {
|
|
1567
1567
|
var N;
|
|
1568
|
-
return (N =
|
|
1569
|
-
}).map((
|
|
1570
|
-
var N,
|
|
1568
|
+
return (N = i.chargeTypes) == null ? void 0 : N.includes(d);
|
|
1569
|
+
}).map((i) => {
|
|
1570
|
+
var N, P;
|
|
1571
1571
|
return /* @__PURE__ */ t.jsxs(
|
|
1572
1572
|
"div",
|
|
1573
1573
|
{
|
|
1574
1574
|
className: U(O.variant, {
|
|
1575
|
-
[O.activeVariant]: e.id ===
|
|
1575
|
+
[O.activeVariant]: e.id === i.id
|
|
1576
1576
|
}),
|
|
1577
1577
|
onClick: () => {
|
|
1578
|
-
|
|
1578
|
+
h(i), l(1);
|
|
1579
1579
|
},
|
|
1580
1580
|
children: [
|
|
1581
1581
|
/* @__PURE__ */ t.jsxs("div", { className: O.variantInfo, children: [
|
|
@@ -1585,17 +1585,17 @@ const is = (h) => {
|
|
|
1585
1585
|
className: O.title,
|
|
1586
1586
|
id: "h4",
|
|
1587
1587
|
dangerouslySetInnerHTML: {
|
|
1588
|
-
__html: at(
|
|
1588
|
+
__html: at(i.name)
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
),
|
|
1592
1592
|
/* @__PURE__ */ t.jsxs("span", { id: "md", children: [
|
|
1593
1593
|
Q({
|
|
1594
|
-
amount: d === "ONE_TIME" ?
|
|
1595
|
-
currency: d === "ONE_TIME" ?
|
|
1594
|
+
amount: d === "ONE_TIME" ? i.price.amount : i.subscriptionSettings ? i.subscriptionSettings.price.amount : 0,
|
|
1595
|
+
currency: d === "ONE_TIME" ? i.price.currency : i.subscriptionSettings ? i.subscriptionSettings.price.currency : "USD"
|
|
1596
1596
|
}),
|
|
1597
1597
|
" ",
|
|
1598
|
-
d === "RECURRING" &&
|
|
1598
|
+
d === "RECURRING" && i.subscriptionSettings && ` / ${Lt(i.subscriptionSettings.recurringIntervalDays || 0)}`
|
|
1599
1599
|
] })
|
|
1600
1600
|
] }),
|
|
1601
1601
|
/* @__PURE__ */ t.jsx("div", { id: "md", children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
@@ -1604,7 +1604,7 @@ const is = (h) => {
|
|
|
1604
1604
|
className: O.stock,
|
|
1605
1605
|
id: "md",
|
|
1606
1606
|
children: [
|
|
1607
|
-
(N =
|
|
1607
|
+
(N = i.quantity.restrictions) != null && N.max || i.quantity.available !== void 0 ? ((P = i.quantity.restrictions) == null ? void 0 : P.max) || i.quantity.available : "∞",
|
|
1608
1608
|
" ",
|
|
1609
1609
|
"in stock"
|
|
1610
1610
|
]
|
|
@@ -1612,7 +1612,7 @@ const is = (h) => {
|
|
|
1612
1612
|
) })
|
|
1613
1613
|
]
|
|
1614
1614
|
},
|
|
1615
|
-
|
|
1615
|
+
i.id
|
|
1616
1616
|
);
|
|
1617
1617
|
}) }),
|
|
1618
1618
|
d === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
@@ -1626,10 +1626,10 @@ const is = (h) => {
|
|
|
1626
1626
|
{
|
|
1627
1627
|
type: "Secondary",
|
|
1628
1628
|
onClick: () => {
|
|
1629
|
-
|
|
1629
|
+
r > 1 ? l((i) => i - 1) : l(1);
|
|
1630
1630
|
},
|
|
1631
1631
|
className: O.button,
|
|
1632
|
-
disabled: e.quantity.available && e.quantity.restrictions &&
|
|
1632
|
+
disabled: e.quantity.available && e.quantity.restrictions && r <= e.quantity.restrictions.min || e.quantity.available === 0,
|
|
1633
1633
|
children: /* @__PURE__ */ t.jsx(j, { name: "Minus" })
|
|
1634
1634
|
}
|
|
1635
1635
|
),
|
|
@@ -1637,14 +1637,14 @@ const is = (h) => {
|
|
|
1637
1637
|
Ut,
|
|
1638
1638
|
{
|
|
1639
1639
|
type: "number",
|
|
1640
|
-
value: String(
|
|
1641
|
-
onChange: (
|
|
1642
|
-
e.quantity.available && Number(
|
|
1640
|
+
value: String(r),
|
|
1641
|
+
onChange: (i) => {
|
|
1642
|
+
e.quantity.available && Number(i) > e.quantity.available ? l(e.quantity.available) : l(Number(i));
|
|
1643
1643
|
},
|
|
1644
1644
|
max: ((K = e.quantity.restrictions) == null ? void 0 : K.max) || e.quantity.available || Number.POSITIVE_INFINITY,
|
|
1645
1645
|
min: ((L = e.quantity.restrictions) == null ? void 0 : L.min) || 0,
|
|
1646
1646
|
centered: !0,
|
|
1647
|
-
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 &&
|
|
1647
|
+
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && r >= e.quantity.restrictions.max
|
|
1648
1648
|
}
|
|
1649
1649
|
),
|
|
1650
1650
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1652,10 +1652,10 @@ const is = (h) => {
|
|
|
1652
1652
|
{
|
|
1653
1653
|
type: "Secondary",
|
|
1654
1654
|
onClick: () => {
|
|
1655
|
-
l((
|
|
1655
|
+
l((i) => i + 1);
|
|
1656
1656
|
},
|
|
1657
1657
|
className: O.button,
|
|
1658
|
-
disabled: !!(e.quantity.available && e.quantity.restrictions &&
|
|
1658
|
+
disabled: !!(e.quantity.available && e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && r >= e.quantity.available),
|
|
1659
1659
|
children: /* @__PURE__ */ t.jsx(j, { name: "Plus" })
|
|
1660
1660
|
}
|
|
1661
1661
|
)
|
|
@@ -1686,8 +1686,8 @@ const is = (h) => {
|
|
|
1686
1686
|
className: O.price,
|
|
1687
1687
|
id: "md",
|
|
1688
1688
|
children: [
|
|
1689
|
-
/* @__PURE__ */ t.jsx("span", { className: U(O.newPrice, { [O.animate]:
|
|
1690
|
-
amount: e.price.amount *
|
|
1689
|
+
/* @__PURE__ */ t.jsx("span", { className: U(O.newPrice, { [O.animate]: a }), children: Q({
|
|
1690
|
+
amount: e.price.amount * r,
|
|
1691
1691
|
currency: e.price.currency
|
|
1692
1692
|
}) }),
|
|
1693
1693
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1696,7 +1696,7 @@ const is = (h) => {
|
|
|
1696
1696
|
className: O.oldPrice,
|
|
1697
1697
|
id: "md",
|
|
1698
1698
|
children: Q({
|
|
1699
|
-
amount: e.compareAtPrice.amount *
|
|
1699
|
+
amount: e.compareAtPrice.amount * r,
|
|
1700
1700
|
currency: e.compareAtPrice.currency
|
|
1701
1701
|
})
|
|
1702
1702
|
}
|
|
@@ -1706,10 +1706,10 @@ const is = (h) => {
|
|
|
1706
1706
|
) : /* @__PURE__ */ t.jsx(
|
|
1707
1707
|
"span",
|
|
1708
1708
|
{
|
|
1709
|
-
className: U(O.newPrice, { [O.animate]:
|
|
1709
|
+
className: U(O.newPrice, { [O.animate]: a }),
|
|
1710
1710
|
id: "md",
|
|
1711
1711
|
children: Q({
|
|
1712
|
-
amount: e.price.amount *
|
|
1712
|
+
amount: e.price.amount * r,
|
|
1713
1713
|
currency: e.price.currency
|
|
1714
1714
|
})
|
|
1715
1715
|
}
|
|
@@ -1722,10 +1722,10 @@ const is = (h) => {
|
|
|
1722
1722
|
/* @__PURE__ */ t.jsx(
|
|
1723
1723
|
"span",
|
|
1724
1724
|
{
|
|
1725
|
-
className: U(O.newPrice, { [O.animate]:
|
|
1725
|
+
className: U(O.newPrice, { [O.animate]: a }),
|
|
1726
1726
|
id: "md",
|
|
1727
1727
|
children: Q({
|
|
1728
|
-
amount: e.subscriptionSettings.price.amount *
|
|
1728
|
+
amount: e.subscriptionSettings.price.amount * r,
|
|
1729
1729
|
currency: e.subscriptionSettings.price.currency
|
|
1730
1730
|
})
|
|
1731
1731
|
}
|
|
@@ -1736,7 +1736,7 @@ const is = (h) => {
|
|
|
1736
1736
|
className: O.oldPrice,
|
|
1737
1737
|
id: "md",
|
|
1738
1738
|
children: Q({
|
|
1739
|
-
amount: e.subscriptionSettings.compareAtPrice.amount *
|
|
1739
|
+
amount: e.subscriptionSettings.compareAtPrice.amount * r,
|
|
1740
1740
|
currency: e.subscriptionSettings.compareAtPrice.currency
|
|
1741
1741
|
})
|
|
1742
1742
|
}
|
|
@@ -1746,10 +1746,10 @@ const is = (h) => {
|
|
|
1746
1746
|
) : e.subscriptionSettings && /* @__PURE__ */ t.jsx(
|
|
1747
1747
|
"span",
|
|
1748
1748
|
{
|
|
1749
|
-
className: U(O.newPrice, { [O.animate]:
|
|
1749
|
+
className: U(O.newPrice, { [O.animate]: a }),
|
|
1750
1750
|
id: "md",
|
|
1751
1751
|
children: Q({
|
|
1752
|
-
amount: e.subscriptionSettings.price.amount *
|
|
1752
|
+
amount: e.subscriptionSettings.price.amount * r,
|
|
1753
1753
|
currency: e.subscriptionSettings.price.currency
|
|
1754
1754
|
})
|
|
1755
1755
|
}
|
|
@@ -1762,7 +1762,7 @@ const is = (h) => {
|
|
|
1762
1762
|
{
|
|
1763
1763
|
type: "Primary",
|
|
1764
1764
|
onClick: () => A(),
|
|
1765
|
-
disabled: e.quantity && e.quantity.available === 0 ||
|
|
1765
|
+
disabled: e.quantity && e.quantity.available === 0 || r === 0,
|
|
1766
1766
|
children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1767
1767
|
}
|
|
1768
1768
|
),
|
|
@@ -1770,16 +1770,16 @@ const is = (h) => {
|
|
|
1770
1770
|
R,
|
|
1771
1771
|
{
|
|
1772
1772
|
type: "Secondary",
|
|
1773
|
-
onClick: () =>
|
|
1774
|
-
disabled: e.quantity && e.quantity.available === 0 ||
|
|
1773
|
+
onClick: () => k(),
|
|
1774
|
+
disabled: e.quantity && e.quantity.available === 0 || r === 0,
|
|
1775
1775
|
children: y.parts.some(
|
|
1776
|
-
(
|
|
1776
|
+
(i) => i.productId === n.id && i.productVariantId === e.id
|
|
1777
1777
|
) ? "Add More" : "Add to Cart"
|
|
1778
1778
|
}
|
|
1779
1779
|
)
|
|
1780
1780
|
] })
|
|
1781
1781
|
] });
|
|
1782
|
-
}, as = "_buttons_1uy6y_23", os = "_modal_1uy6y_32", cs = "_closing_1uy6y_65", rs = "_info_1uy6y_114", ls = "_top_1uy6y_121", ds = "_title_1uy6y_132", us = "_clear_1uy6y_139", hs = "_activeClear_1uy6y_146", ms = "_count_1uy6y_150", ps = "_cart_1uy6y_165", gs = "_empty_1uy6y_173", fs = "_product_1uy6y_199", xs = "_products_1uy6y_208", _s = "_image_1uy6y_216", ys = "_productInfo_1uy6y_233", js = "_content_1uy6y_240", bs = "_name_1uy6y_246", vs = "_price_1uy6y_252", Is = "_productButtons_1uy6y_258", Ns = "_productButton_1uy6y_258",
|
|
1782
|
+
}, as = "_buttons_1uy6y_23", os = "_modal_1uy6y_32", cs = "_closing_1uy6y_65", rs = "_info_1uy6y_114", ls = "_top_1uy6y_121", ds = "_title_1uy6y_132", us = "_clear_1uy6y_139", hs = "_activeClear_1uy6y_146", ms = "_count_1uy6y_150", ps = "_cart_1uy6y_165", gs = "_empty_1uy6y_173", fs = "_product_1uy6y_199", xs = "_products_1uy6y_208", _s = "_image_1uy6y_216", ys = "_productInfo_1uy6y_233", js = "_content_1uy6y_240", bs = "_name_1uy6y_246", vs = "_price_1uy6y_252", Is = "_productButtons_1uy6y_258", Ns = "_productButton_1uy6y_258", Cs = "_productCount_1uy6y_275", Ss = "_bottom_1uy6y_292", ks = "_subtotal_1uy6y_300", Ps = "_block_1uy6y_308", ws = "_shoppingCount_1uy6y_315", Ts = "_total_1uy6y_335", Ms = "_link_1uy6y_341", Bs = "_userInfo_1uy6y_348", $s = "_pagesMobileModal_1uy6y_360", Os = "_pagesMobileModalContent_1uy6y_374", qs = "_pagesMobileModalHeader_1uy6y_380", As = "_pagesMobileModalFooter_1uy6y_390", Ds = "_pageLink_1uy6y_397", Es = "_rightButtons_1uy6y_406", w = {
|
|
1783
1783
|
buttons: as,
|
|
1784
1784
|
modal: os,
|
|
1785
1785
|
closing: cs,
|
|
@@ -1800,10 +1800,10 @@ const is = (h) => {
|
|
|
1800
1800
|
price: vs,
|
|
1801
1801
|
productButtons: Is,
|
|
1802
1802
|
productButton: Ns,
|
|
1803
|
-
productCount:
|
|
1804
|
-
bottom:
|
|
1805
|
-
subtotal:
|
|
1806
|
-
block:
|
|
1803
|
+
productCount: Cs,
|
|
1804
|
+
bottom: Ss,
|
|
1805
|
+
subtotal: ks,
|
|
1806
|
+
block: Ps,
|
|
1807
1807
|
shoppingCount: ws,
|
|
1808
1808
|
total: Ts,
|
|
1809
1809
|
link: Ms,
|
|
@@ -1815,18 +1815,18 @@ const is = (h) => {
|
|
|
1815
1815
|
pageLink: Ds,
|
|
1816
1816
|
rightButtons: Es,
|
|
1817
1817
|
delete: "_delete_1uy6y_413"
|
|
1818
|
-
}, Yn = (
|
|
1819
|
-
const { shopping:
|
|
1820
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: (
|
|
1821
|
-
|
|
1822
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1818
|
+
}, Yn = (u) => {
|
|
1819
|
+
const { shopping: n, signUp: o, isShowUserInfo: s = !0 } = u;
|
|
1820
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: (n || s) && /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
|
|
1821
|
+
n && /* @__PURE__ */ t.jsx(Rs, {}),
|
|
1822
|
+
s && /* @__PURE__ */ t.jsx(Ot, { signUp: o })
|
|
1823
1823
|
] }) });
|
|
1824
1824
|
}, Rs = () => {
|
|
1825
|
-
const [
|
|
1826
|
-
|
|
1825
|
+
const [u, n] = f.useState(!1), [o, s] = f.useState([]), [c, e] = f.useState(!1), { cart: h, products: d } = ct();
|
|
1826
|
+
f.useEffect(() => {
|
|
1827
1827
|
(async () => {
|
|
1828
|
-
const
|
|
1829
|
-
const m = l.find((
|
|
1828
|
+
const r = h.parts.map((x) => String(x.productId)), l = d.filter((x) => r.includes(String(x.id))) || [], y = h.parts.map((x) => {
|
|
1829
|
+
const m = l.find((a) => a.id === x.productId);
|
|
1830
1830
|
return m ? {
|
|
1831
1831
|
...m,
|
|
1832
1832
|
activeVariantId: x.productVariantId,
|
|
@@ -1836,14 +1836,14 @@ const is = (h) => {
|
|
|
1836
1836
|
}).filter(Boolean);
|
|
1837
1837
|
s(y);
|
|
1838
1838
|
})();
|
|
1839
|
-
}, [
|
|
1840
|
-
function
|
|
1839
|
+
}, [h.parts, d]);
|
|
1840
|
+
function g(I) {
|
|
1841
1841
|
return !I || !(I != null && I.variants) ? !1 : I.chargeType === "RECURRING";
|
|
1842
1842
|
}
|
|
1843
|
-
const _ =
|
|
1843
|
+
const _ = h.parts.length > 0 && o.length > 0 && !g(o[0]);
|
|
1844
1844
|
function M() {
|
|
1845
1845
|
e(!1), setTimeout(() => {
|
|
1846
|
-
|
|
1846
|
+
n(!1);
|
|
1847
1847
|
}, 300);
|
|
1848
1848
|
}
|
|
1849
1849
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -1856,7 +1856,7 @@ const is = (h) => {
|
|
|
1856
1856
|
position: "relative"
|
|
1857
1857
|
},
|
|
1858
1858
|
onClick: (I) => {
|
|
1859
|
-
I.stopPropagation(), window.location.pathname.includes("/admin/builder") || (
|
|
1859
|
+
I.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), e(!0));
|
|
1860
1860
|
},
|
|
1861
1861
|
children: [
|
|
1862
1862
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1865,11 +1865,11 @@ const is = (h) => {
|
|
|
1865
1865
|
name: "Handbag"
|
|
1866
1866
|
}
|
|
1867
1867
|
),
|
|
1868
|
-
_ && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children:
|
|
1868
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: h.parts.length })
|
|
1869
1869
|
]
|
|
1870
1870
|
}
|
|
1871
1871
|
),
|
|
1872
|
-
|
|
1872
|
+
u && /* @__PURE__ */ t.jsx(
|
|
1873
1873
|
ut,
|
|
1874
1874
|
{
|
|
1875
1875
|
close: M,
|
|
@@ -1879,41 +1879,41 @@ const is = (h) => {
|
|
|
1879
1879
|
{
|
|
1880
1880
|
activeProducts: o,
|
|
1881
1881
|
isCartNotEmpty: _,
|
|
1882
|
-
isOpen:
|
|
1882
|
+
isOpen: c,
|
|
1883
1883
|
close: M
|
|
1884
1884
|
}
|
|
1885
1885
|
)
|
|
1886
1886
|
}
|
|
1887
1887
|
)
|
|
1888
1888
|
] });
|
|
1889
|
-
}, Ls = (
|
|
1889
|
+
}, Ls = (u) => {
|
|
1890
1890
|
var x, m;
|
|
1891
|
-
const { activeProducts:
|
|
1892
|
-
function I(
|
|
1893
|
-
M(
|
|
1891
|
+
const { activeProducts: n, isCartNotEmpty: o, isOpen: s, close: c } = u, { cart: e, reset: h, getTotalAndDiscount: d, updateQuantityOfProduct: g, removeProduct: _ } = ct(), M = vt();
|
|
1892
|
+
function I(a, b) {
|
|
1893
|
+
M(a, { replace: b });
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1896
|
-
|
|
1897
|
-
productId:
|
|
1898
|
-
productVariantId:
|
|
1899
|
-
quantity:
|
|
1900
|
-
chargeType:
|
|
1895
|
+
function r(a) {
|
|
1896
|
+
a.quantity && g({
|
|
1897
|
+
productId: a.id,
|
|
1898
|
+
productVariantId: a.activeVariantId,
|
|
1899
|
+
quantity: a.quantity + 1,
|
|
1900
|
+
chargeType: a.chargeType
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
|
-
function l(
|
|
1904
|
-
|
|
1905
|
-
productId:
|
|
1906
|
-
productVariantId:
|
|
1907
|
-
quantity:
|
|
1908
|
-
chargeType:
|
|
1903
|
+
function l(a) {
|
|
1904
|
+
a.quantity && g({
|
|
1905
|
+
productId: a.id,
|
|
1906
|
+
productVariantId: a.activeVariantId,
|
|
1907
|
+
quantity: a.quantity - 1,
|
|
1908
|
+
chargeType: a.chargeType
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
|
-
function y(
|
|
1911
|
+
function y(a) {
|
|
1912
1912
|
_({
|
|
1913
|
-
productId:
|
|
1914
|
-
productVariantId:
|
|
1915
|
-
quantity:
|
|
1916
|
-
chargeType:
|
|
1913
|
+
productId: a.id,
|
|
1914
|
+
productVariantId: a.activeVariantId,
|
|
1915
|
+
quantity: a.quantity || 1,
|
|
1916
|
+
chargeType: a.chargeType
|
|
1917
1917
|
});
|
|
1918
1918
|
}
|
|
1919
1919
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1922,7 +1922,7 @@ const is = (h) => {
|
|
|
1922
1922
|
className: U(w.modal, {
|
|
1923
1923
|
[w.closing]: !s
|
|
1924
1924
|
}),
|
|
1925
|
-
onClick: (
|
|
1925
|
+
onClick: (a) => a.stopPropagation(),
|
|
1926
1926
|
children: [
|
|
1927
1927
|
/* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
1928
1928
|
/* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
|
|
@@ -1951,7 +1951,7 @@ const is = (h) => {
|
|
|
1951
1951
|
[w.activeClear]: o
|
|
1952
1952
|
}),
|
|
1953
1953
|
disabled: !o,
|
|
1954
|
-
onClick:
|
|
1954
|
+
onClick: h,
|
|
1955
1955
|
id: "md",
|
|
1956
1956
|
children: "Clear all"
|
|
1957
1957
|
}
|
|
@@ -1960,7 +1960,7 @@ const is = (h) => {
|
|
|
1960
1960
|
j,
|
|
1961
1961
|
{
|
|
1962
1962
|
name: "X",
|
|
1963
|
-
onClick:
|
|
1963
|
+
onClick: c,
|
|
1964
1964
|
hoverable: !0,
|
|
1965
1965
|
width: 24,
|
|
1966
1966
|
height: 24,
|
|
@@ -1970,18 +1970,18 @@ const is = (h) => {
|
|
|
1970
1970
|
] })
|
|
1971
1971
|
] }),
|
|
1972
1972
|
o ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
|
|
1973
|
-
/* @__PURE__ */ t.jsx("div", { className: w.products, children:
|
|
1974
|
-
var b,
|
|
1973
|
+
/* @__PURE__ */ t.jsx("div", { className: w.products, children: n.map((a) => {
|
|
1974
|
+
var b, k;
|
|
1975
1975
|
return /* @__PURE__ */ t.jsxs(
|
|
1976
1976
|
"div",
|
|
1977
1977
|
{
|
|
1978
1978
|
className: w.product,
|
|
1979
1979
|
children: [
|
|
1980
1980
|
/* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
|
|
1981
|
-
|
|
1981
|
+
a.images.length > 0 ? /* @__PURE__ */ t.jsx(
|
|
1982
1982
|
"img",
|
|
1983
1983
|
{
|
|
1984
|
-
src: `https://imagedelivery.net/${
|
|
1984
|
+
src: `https://imagedelivery.net/${a.images[0].cfId}/w=500`,
|
|
1985
1985
|
alt: "image",
|
|
1986
1986
|
width: "100%",
|
|
1987
1987
|
height: "100%",
|
|
@@ -2001,19 +2001,19 @@ const is = (h) => {
|
|
|
2001
2001
|
className: w.name,
|
|
2002
2002
|
dangerouslySetInnerHTML: {
|
|
2003
2003
|
__html: at(
|
|
2004
|
-
((b =
|
|
2005
|
-
(A) => A.id ===
|
|
2006
|
-
)) == null ? void 0 : b.name) ||
|
|
2004
|
+
((b = a.variants.find(
|
|
2005
|
+
(A) => A.id === a.activeVariantId
|
|
2006
|
+
)) == null ? void 0 : b.name) || a.name
|
|
2007
2007
|
)
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
2010
2010
|
),
|
|
2011
2011
|
/* @__PURE__ */ t.jsx("div", { className: w.price, children: Q({
|
|
2012
|
-
amount:
|
|
2013
|
-
(A) => A.id ===
|
|
2014
|
-
).price.amount * ((
|
|
2015
|
-
currency:
|
|
2016
|
-
(A) => A.id ===
|
|
2012
|
+
amount: a.variants.find(
|
|
2013
|
+
(A) => A.id === a.activeVariantId
|
|
2014
|
+
).price.amount * ((a == null ? void 0 : a.quantity) || 1),
|
|
2015
|
+
currency: a.variants.find(
|
|
2016
|
+
(A) => A.id === a.activeVariantId
|
|
2017
2017
|
).price.currency
|
|
2018
2018
|
}) })
|
|
2019
2019
|
] })
|
|
@@ -2024,10 +2024,10 @@ const is = (h) => {
|
|
|
2024
2024
|
{
|
|
2025
2025
|
type: "Secondary",
|
|
2026
2026
|
onClick: () => {
|
|
2027
|
-
|
|
2027
|
+
a.quantity !== 1 && l(a);
|
|
2028
2028
|
},
|
|
2029
2029
|
className: w.productButton,
|
|
2030
|
-
disabled:
|
|
2030
|
+
disabled: a.quantity === 1,
|
|
2031
2031
|
children: /* @__PURE__ */ t.jsx(
|
|
2032
2032
|
j,
|
|
2033
2033
|
{
|
|
@@ -2044,30 +2044,30 @@ const is = (h) => {
|
|
|
2044
2044
|
{
|
|
2045
2045
|
className: w.productCount,
|
|
2046
2046
|
type: "number",
|
|
2047
|
-
value: ((
|
|
2047
|
+
value: ((k = a.quantity) == null ? void 0 : k.toString()) || "",
|
|
2048
2048
|
onChange: (A) => {
|
|
2049
2049
|
const E = Math.min(
|
|
2050
2050
|
Number(A.target.value),
|
|
2051
|
-
|
|
2051
|
+
a.variants.find((K) => K.id === a.activeVariantId).quantity.available || 1 / 0
|
|
2052
2052
|
);
|
|
2053
|
-
E < 1 ||
|
|
2054
|
-
productId:
|
|
2055
|
-
productVariantId:
|
|
2053
|
+
E < 1 || g({
|
|
2054
|
+
productId: a.id,
|
|
2055
|
+
productVariantId: a.activeVariantId,
|
|
2056
2056
|
quantity: E,
|
|
2057
|
-
chargeType:
|
|
2057
|
+
chargeType: a.chargeType
|
|
2058
2058
|
});
|
|
2059
2059
|
},
|
|
2060
2060
|
min: 1,
|
|
2061
|
-
max:
|
|
2061
|
+
max: a.variants.find((A) => A.id === a.activeVariantId).quantity.available || 1 / 0
|
|
2062
2062
|
}
|
|
2063
2063
|
),
|
|
2064
2064
|
/* @__PURE__ */ t.jsx(
|
|
2065
2065
|
R,
|
|
2066
2066
|
{
|
|
2067
2067
|
type: "Secondary",
|
|
2068
|
-
onClick: () =>
|
|
2068
|
+
onClick: () => r(a),
|
|
2069
2069
|
className: w.productButton,
|
|
2070
|
-
disabled:
|
|
2070
|
+
disabled: a.quantity === a.variants.find((A) => A.id === a.activeVariantId).quantity.available,
|
|
2071
2071
|
children: /* @__PURE__ */ t.jsx(
|
|
2072
2072
|
j,
|
|
2073
2073
|
{
|
|
@@ -2086,14 +2086,14 @@ const is = (h) => {
|
|
|
2086
2086
|
fill: "var(--text-action)",
|
|
2087
2087
|
width: 20,
|
|
2088
2088
|
height: 20,
|
|
2089
|
-
onClick: () => y(
|
|
2089
|
+
onClick: () => y(a),
|
|
2090
2090
|
hoverable: !0
|
|
2091
2091
|
}
|
|
2092
2092
|
) })
|
|
2093
2093
|
] })
|
|
2094
2094
|
]
|
|
2095
2095
|
},
|
|
2096
|
-
|
|
2096
|
+
a.id
|
|
2097
2097
|
);
|
|
2098
2098
|
}) }),
|
|
2099
2099
|
/* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
|
|
@@ -2112,7 +2112,7 @@ const is = (h) => {
|
|
|
2112
2112
|
] }),
|
|
2113
2113
|
/* @__PURE__ */ t.jsx("div", { className: w.total, children: Q({
|
|
2114
2114
|
amount: d().total,
|
|
2115
|
-
currency: e.parts.length > 0 && ((m = (x =
|
|
2115
|
+
currency: e.parts.length > 0 && ((m = (x = n.find((a) => a.id === e.parts[0].productId)) == null ? void 0 : x.variants.find((a) => a.id === e.parts[0].productVariantId)) == null ? void 0 : m.price.currency) || "USD"
|
|
2116
2116
|
}) })
|
|
2117
2117
|
] }),
|
|
2118
2118
|
/* @__PURE__ */ t.jsx(R, { onClick: () => I("/checkout", !1), children: "Checkout" })
|
|
@@ -2143,16 +2143,16 @@ const is = (h) => {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
)
|
|
2145
2145
|
] })
|
|
2146
|
-
] }),
|
|
2147
|
-
const { token: o } = Ht(), s =
|
|
2148
|
-
|
|
2146
|
+
] }), Ot = ({ signUp: u, close: n }) => {
|
|
2147
|
+
const { token: o } = Ht(), s = vt(), [c, e] = f.useState("test-email@gmail.com");
|
|
2148
|
+
f.useEffect(() => {
|
|
2149
2149
|
o && (async () => {
|
|
2150
2150
|
if (!o) return;
|
|
2151
|
-
const
|
|
2152
|
-
e(
|
|
2151
|
+
const g = zt(o);
|
|
2152
|
+
e(g.email);
|
|
2153
2153
|
})();
|
|
2154
2154
|
}, [o]);
|
|
2155
|
-
function
|
|
2155
|
+
function h(d) {
|
|
2156
2156
|
window.location.pathname.includes("/admin/builder") || s(d);
|
|
2157
2157
|
}
|
|
2158
2158
|
return o ? /* @__PURE__ */ t.jsx(
|
|
@@ -2161,16 +2161,16 @@ const is = (h) => {
|
|
|
2161
2161
|
type: "Secondary",
|
|
2162
2162
|
className: w.userInfo,
|
|
2163
2163
|
onClick: () => {
|
|
2164
|
-
|
|
2164
|
+
h("/customer-dash"), n == null || n();
|
|
2165
2165
|
},
|
|
2166
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2166
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2167
2167
|
}
|
|
2168
2168
|
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2169
2169
|
/* @__PURE__ */ t.jsx(
|
|
2170
2170
|
R,
|
|
2171
2171
|
{
|
|
2172
2172
|
onClick: () => {
|
|
2173
|
-
|
|
2173
|
+
h("/customer-dash"), n == null || n();
|
|
2174
2174
|
},
|
|
2175
2175
|
type: "Secondary",
|
|
2176
2176
|
style: {
|
|
@@ -2179,11 +2179,11 @@ const is = (h) => {
|
|
|
2179
2179
|
children: "Login"
|
|
2180
2180
|
}
|
|
2181
2181
|
),
|
|
2182
|
-
|
|
2182
|
+
u && /* @__PURE__ */ t.jsx(
|
|
2183
2183
|
R,
|
|
2184
2184
|
{
|
|
2185
2185
|
onClick: () => {
|
|
2186
|
-
|
|
2186
|
+
h("/customer-dash"), n == null || n();
|
|
2187
2187
|
},
|
|
2188
2188
|
type: "Primary",
|
|
2189
2189
|
style: {
|
|
@@ -2195,24 +2195,24 @@ const is = (h) => {
|
|
|
2195
2195
|
)
|
|
2196
2196
|
] });
|
|
2197
2197
|
}, Hs = ({
|
|
2198
|
-
logo:
|
|
2199
|
-
setIsOpen:
|
|
2198
|
+
logo: u,
|
|
2199
|
+
setIsOpen: n,
|
|
2200
2200
|
signUp: o,
|
|
2201
2201
|
pages: s
|
|
2202
2202
|
}) => {
|
|
2203
|
-
const { setIsOpen:
|
|
2204
|
-
|
|
2205
|
-
|
|
2203
|
+
const { setIsOpen: c } = rt(), e = () => {
|
|
2204
|
+
c(!1), setTimeout(() => {
|
|
2205
|
+
n(!1), c(!0);
|
|
2206
2206
|
}, 300);
|
|
2207
2207
|
};
|
|
2208
2208
|
return /* @__PURE__ */ t.jsxs(
|
|
2209
2209
|
"div",
|
|
2210
2210
|
{
|
|
2211
2211
|
className: w.pagesMobileModal,
|
|
2212
|
-
onClick: (
|
|
2212
|
+
onClick: (h) => h.stopPropagation(),
|
|
2213
2213
|
children: [
|
|
2214
2214
|
/* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
|
|
2215
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2215
|
+
/* @__PURE__ */ t.jsx("div", { children: u }),
|
|
2216
2216
|
/* @__PURE__ */ t.jsx(
|
|
2217
2217
|
R,
|
|
2218
2218
|
{
|
|
@@ -2222,23 +2222,23 @@ const is = (h) => {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
)
|
|
2224
2224
|
] }),
|
|
2225
|
-
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: s.length > 0 && s.map((
|
|
2225
|
+
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: s.length > 0 && s.map((h) => /* @__PURE__ */ t.jsx(
|
|
2226
2226
|
"div",
|
|
2227
2227
|
{
|
|
2228
2228
|
className: w.pageLink,
|
|
2229
2229
|
onClick: e,
|
|
2230
2230
|
children: /* @__PURE__ */ t.jsx(
|
|
2231
|
-
|
|
2231
|
+
qt,
|
|
2232
2232
|
{
|
|
2233
|
-
path:
|
|
2234
|
-
children:
|
|
2233
|
+
path: h.path,
|
|
2234
|
+
children: h.name["en-US"]
|
|
2235
2235
|
},
|
|
2236
|
-
|
|
2236
|
+
h.id
|
|
2237
2237
|
)
|
|
2238
2238
|
}
|
|
2239
2239
|
)) }),
|
|
2240
2240
|
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
2241
|
-
|
|
2241
|
+
Ot,
|
|
2242
2242
|
{
|
|
2243
2243
|
signUp: o,
|
|
2244
2244
|
close: e
|
|
@@ -2247,29 +2247,29 @@ const is = (h) => {
|
|
|
2247
2247
|
]
|
|
2248
2248
|
}
|
|
2249
2249
|
);
|
|
2250
|
-
}, Gn = ({ logo:
|
|
2251
|
-
const [s,
|
|
2250
|
+
}, Gn = ({ logo: u, signUp: n, pages: o }) => {
|
|
2251
|
+
const [s, c] = f.useState(!1);
|
|
2252
2252
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2253
|
-
/* @__PURE__ */ t.jsx(zs, { setIsOpenModal:
|
|
2253
|
+
/* @__PURE__ */ t.jsx(zs, { setIsOpenModal: c }),
|
|
2254
2254
|
s && /* @__PURE__ */ t.jsx(
|
|
2255
2255
|
ut,
|
|
2256
2256
|
{
|
|
2257
|
-
close: () =>
|
|
2257
|
+
close: () => c(!1),
|
|
2258
2258
|
hasPadding: !1,
|
|
2259
2259
|
children: /* @__PURE__ */ t.jsx(
|
|
2260
2260
|
Hs,
|
|
2261
2261
|
{
|
|
2262
|
-
logo:
|
|
2263
|
-
setIsOpen:
|
|
2264
|
-
signUp:
|
|
2262
|
+
logo: u,
|
|
2263
|
+
setIsOpen: c,
|
|
2264
|
+
signUp: n,
|
|
2265
2265
|
pages: o
|
|
2266
2266
|
}
|
|
2267
2267
|
)
|
|
2268
2268
|
}
|
|
2269
2269
|
)
|
|
2270
2270
|
] });
|
|
2271
|
-
}, zs = (
|
|
2272
|
-
const { setIsOpenModal:
|
|
2271
|
+
}, zs = (u) => {
|
|
2272
|
+
const { setIsOpenModal: n } = u;
|
|
2273
2273
|
return /* @__PURE__ */ t.jsx(
|
|
2274
2274
|
R,
|
|
2275
2275
|
{
|
|
@@ -2278,7 +2278,7 @@ const is = (h) => {
|
|
|
2278
2278
|
padding: 10
|
|
2279
2279
|
},
|
|
2280
2280
|
onClick: (o) => {
|
|
2281
|
-
o.stopPropagation(), window.location.pathname.includes("/admin/builder") ||
|
|
2281
|
+
o.stopPropagation(), window.location.pathname.includes("/admin/builder") || n(!0);
|
|
2282
2282
|
},
|
|
2283
2283
|
children: /* @__PURE__ */ t.jsx(j, { name: "List" })
|
|
2284
2284
|
}
|
|
@@ -2292,8 +2292,8 @@ const is = (h) => {
|
|
|
2292
2292
|
copyText: Xs,
|
|
2293
2293
|
copyTextMobile: Qs,
|
|
2294
2294
|
copyTextMiniMobile: Js
|
|
2295
|
-
}, Wn = ({ title:
|
|
2296
|
-
const { isOpenModal:
|
|
2295
|
+
}, Wn = ({ title: u = "Copy Product Link" }) => {
|
|
2296
|
+
const { isOpenModal: n, setIsOpenModal: o } = Mt();
|
|
2297
2297
|
function s() {
|
|
2298
2298
|
o(!0);
|
|
2299
2299
|
}
|
|
@@ -2302,8 +2302,8 @@ const is = (h) => {
|
|
|
2302
2302
|
R,
|
|
2303
2303
|
{
|
|
2304
2304
|
className: nt.share,
|
|
2305
|
-
onClick: (
|
|
2306
|
-
|
|
2305
|
+
onClick: (c) => {
|
|
2306
|
+
c.stopPropagation(), s();
|
|
2307
2307
|
},
|
|
2308
2308
|
type: "Secondary",
|
|
2309
2309
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -2316,11 +2316,11 @@ const is = (h) => {
|
|
|
2316
2316
|
)
|
|
2317
2317
|
}
|
|
2318
2318
|
),
|
|
2319
|
-
|
|
2319
|
+
n && /* @__PURE__ */ t.jsx(ut, { close: o, children: /* @__PURE__ */ t.jsx(Ks, { title: u }) })
|
|
2320
2320
|
] });
|
|
2321
|
-
}, Ks = ({ title:
|
|
2322
|
-
const { setIsOpenModal:
|
|
2323
|
-
function
|
|
2321
|
+
}, Ks = ({ title: u = "Copy Product Link" }) => {
|
|
2322
|
+
const { setIsOpenModal: n } = Mt(), { notifications: o, setNotifications: s } = St(), { setIsOpen: c } = rt(), e = window.location.href;
|
|
2323
|
+
function h() {
|
|
2324
2324
|
navigator.clipboard.writeText(e), s([
|
|
2325
2325
|
...o,
|
|
2326
2326
|
{
|
|
@@ -2331,11 +2331,11 @@ const is = (h) => {
|
|
|
2331
2331
|
]);
|
|
2332
2332
|
}
|
|
2333
2333
|
function d() {
|
|
2334
|
-
|
|
2335
|
-
|
|
2334
|
+
c(!1), setTimeout(() => {
|
|
2335
|
+
n(!1), c(!0);
|
|
2336
2336
|
}, 300);
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function g(_, M) {
|
|
2339
2339
|
return _.length > M ? _.slice(0, M) + "..." : _;
|
|
2340
2340
|
}
|
|
2341
2341
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -2350,7 +2350,7 @@ const is = (h) => {
|
|
|
2350
2350
|
{
|
|
2351
2351
|
className: nt.title,
|
|
2352
2352
|
id: "h4",
|
|
2353
|
-
children:
|
|
2353
|
+
children: u
|
|
2354
2354
|
}
|
|
2355
2355
|
),
|
|
2356
2356
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2368,7 +2368,7 @@ const is = (h) => {
|
|
|
2368
2368
|
R,
|
|
2369
2369
|
{
|
|
2370
2370
|
type: "Secondary",
|
|
2371
|
-
onClick:
|
|
2371
|
+
onClick: h,
|
|
2372
2372
|
style: {
|
|
2373
2373
|
flex: 1
|
|
2374
2374
|
},
|
|
@@ -2378,7 +2378,7 @@ const is = (h) => {
|
|
|
2378
2378
|
{
|
|
2379
2379
|
className: nt.copyText,
|
|
2380
2380
|
id: "md",
|
|
2381
|
-
children:
|
|
2381
|
+
children: g(e, 100)
|
|
2382
2382
|
}
|
|
2383
2383
|
),
|
|
2384
2384
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2386,7 +2386,7 @@ const is = (h) => {
|
|
|
2386
2386
|
{
|
|
2387
2387
|
className: nt.copyTextMobile,
|
|
2388
2388
|
id: "md",
|
|
2389
|
-
children:
|
|
2389
|
+
children: g(e, 40)
|
|
2390
2390
|
}
|
|
2391
2391
|
),
|
|
2392
2392
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2394,7 +2394,7 @@ const is = (h) => {
|
|
|
2394
2394
|
{
|
|
2395
2395
|
className: nt.copyTextMiniMobile,
|
|
2396
2396
|
id: "md",
|
|
2397
|
-
children:
|
|
2397
|
+
children: g(e, 20)
|
|
2398
2398
|
}
|
|
2399
2399
|
)
|
|
2400
2400
|
]
|
|
@@ -2404,7 +2404,7 @@ const is = (h) => {
|
|
|
2404
2404
|
R,
|
|
2405
2405
|
{
|
|
2406
2406
|
type: "Secondary",
|
|
2407
|
-
onClick:
|
|
2407
|
+
onClick: h,
|
|
2408
2408
|
children: o.find(
|
|
2409
2409
|
(_) => _.message === "Link copied to clipboard"
|
|
2410
2410
|
) ? /* @__PURE__ */ t.jsx(j, { name: "Check" }) : /* @__PURE__ */ t.jsx(j, { name: "Copy" })
|
|
@@ -2422,20 +2422,20 @@ const is = (h) => {
|
|
|
2422
2422
|
content: nn,
|
|
2423
2423
|
contentOpen: an,
|
|
2424
2424
|
contentText: on
|
|
2425
|
-
}, Xn = ({ title:
|
|
2426
|
-
const [s,
|
|
2427
|
-
|
|
2425
|
+
}, Xn = ({ title: u, content: n, defaultOpen: o = !1 }) => {
|
|
2426
|
+
const [s, c] = f.useState(o), [e, h] = f.useState(0), d = f.useRef(null), g = () => {
|
|
2427
|
+
c(!s);
|
|
2428
2428
|
};
|
|
2429
|
-
return
|
|
2430
|
-
d.current &&
|
|
2429
|
+
return f.useEffect(() => {
|
|
2430
|
+
d.current && h(s ? d.current.scrollHeight : 0);
|
|
2431
2431
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
|
|
2432
2432
|
/* @__PURE__ */ t.jsxs(
|
|
2433
2433
|
"div",
|
|
2434
2434
|
{
|
|
2435
2435
|
className: it.header,
|
|
2436
|
-
onClick:
|
|
2436
|
+
onClick: g,
|
|
2437
2437
|
children: [
|
|
2438
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
2438
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
2439
2439
|
/* @__PURE__ */ t.jsx("div", { className: U(it.icon, { [it.open]: s }), children: /* @__PURE__ */ t.jsx(j, { name: "CaretDown" }) })
|
|
2440
2440
|
]
|
|
2441
2441
|
}
|
|
@@ -2447,33 +2447,59 @@ const is = (h) => {
|
|
|
2447
2447
|
className: it.contentText,
|
|
2448
2448
|
ref: d,
|
|
2449
2449
|
style: { height: `${e}px`, marginTop: `${e > 0 ? "20px" : "0px"}` },
|
|
2450
|
-
children:
|
|
2450
|
+
children: n
|
|
2451
2451
|
}
|
|
2452
2452
|
) })
|
|
2453
2453
|
] });
|
|
2454
|
-
},
|
|
2454
|
+
}, qt = ({ children: u, path: n, className: o, target: s = "_self", id: c }) => {
|
|
2455
|
+
if (window.location.pathname.includes("/admin/builder"))
|
|
2456
|
+
return /* @__PURE__ */ t.jsx(
|
|
2457
|
+
"div",
|
|
2458
|
+
{
|
|
2459
|
+
className: o,
|
|
2460
|
+
role: "link",
|
|
2461
|
+
style: { cursor: "pointer" },
|
|
2462
|
+
id: c,
|
|
2463
|
+
children: u
|
|
2464
|
+
}
|
|
2465
|
+
);
|
|
2466
|
+
const e = vt(), h = /^https?:\/\//.test(n), d = (g) => {
|
|
2467
|
+
h || s === "_blank" ? s === "_blank" ? window.open(n, "_blank") : window.open(n, "_self") : (g.preventDefault(), e(n, { replace: !1 }));
|
|
2468
|
+
};
|
|
2469
|
+
return /* @__PURE__ */ t.jsx(
|
|
2470
|
+
"div",
|
|
2471
|
+
{
|
|
2472
|
+
onClick: d,
|
|
2473
|
+
className: o,
|
|
2474
|
+
role: "link",
|
|
2475
|
+
style: { cursor: "pointer" },
|
|
2476
|
+
id: c,
|
|
2477
|
+
children: u
|
|
2478
|
+
}
|
|
2479
|
+
);
|
|
2480
|
+
}, cn = "_buttonsBlock_1x6xf_1", rn = "_cartDisabled_1x6xf_25", kt = {
|
|
2455
2481
|
buttonsBlock: cn,
|
|
2456
2482
|
cartDisabled: rn
|
|
2457
|
-
}, Qn = (
|
|
2483
|
+
}, Qn = (u) => {
|
|
2458
2484
|
var M, I;
|
|
2459
|
-
const { setIsOpen:
|
|
2485
|
+
const { setIsOpen: n, setModalType: o, productId: s, isCartEnabled: c = !0 } = u, { cart: e } = ct(), { pageContext: h } = bt(), d = (M = h == null ? void 0 : h.listings) == null ? void 0 : M.find((r) => r.id === s);
|
|
2460
2486
|
if (!d)
|
|
2461
2487
|
return null;
|
|
2462
|
-
const
|
|
2463
|
-
(
|
|
2488
|
+
const g = (I = h == null ? void 0 : h.products) == null ? void 0 : I.find(
|
|
2489
|
+
(r) => r.uniquePath === d.productData.uniquePath
|
|
2464
2490
|
);
|
|
2465
|
-
if (!
|
|
2491
|
+
if (!g)
|
|
2466
2492
|
return null;
|
|
2467
|
-
const _ = e.parts.find((
|
|
2493
|
+
const _ = e.parts.find((r) => r.productId === g.id);
|
|
2468
2494
|
return /* @__PURE__ */ t.jsxs(
|
|
2469
2495
|
"div",
|
|
2470
2496
|
{
|
|
2471
|
-
className: U(
|
|
2472
|
-
[
|
|
2497
|
+
className: U(kt.buttonsBlock, {
|
|
2498
|
+
[kt.cartDisabled]: !c
|
|
2473
2499
|
}),
|
|
2474
|
-
onClick: (
|
|
2500
|
+
onClick: (r) => r.stopPropagation(),
|
|
2475
2501
|
children: [
|
|
2476
|
-
|
|
2502
|
+
c && /* @__PURE__ */ t.jsx(
|
|
2477
2503
|
R,
|
|
2478
2504
|
{
|
|
2479
2505
|
type: "Secondary",
|
|
@@ -2481,7 +2507,7 @@ const is = (h) => {
|
|
|
2481
2507
|
width: "100%"
|
|
2482
2508
|
},
|
|
2483
2509
|
onClick: () => {
|
|
2484
|
-
o("Add To Cart"),
|
|
2510
|
+
o("Add To Cart"), n(!0);
|
|
2485
2511
|
},
|
|
2486
2512
|
children: _ ? "Add More" : "Add To Cart"
|
|
2487
2513
|
}
|
|
@@ -2491,7 +2517,7 @@ const is = (h) => {
|
|
|
2491
2517
|
{
|
|
2492
2518
|
type: "Primary",
|
|
2493
2519
|
onClick: () => {
|
|
2494
|
-
o("Buy Now"),
|
|
2520
|
+
o("Buy Now"), n(!0);
|
|
2495
2521
|
},
|
|
2496
2522
|
style: {
|
|
2497
2523
|
width: "100%"
|
|
@@ -2502,15 +2528,15 @@ const is = (h) => {
|
|
|
2502
2528
|
]
|
|
2503
2529
|
}
|
|
2504
2530
|
);
|
|
2505
|
-
}, ln = "_wrapper_27wzz_1", dn = "_logo_27wzz_8", un = "_info_27wzz_12",
|
|
2531
|
+
}, ln = "_wrapper_27wzz_1", dn = "_logo_27wzz_8", un = "_info_27wzz_12", Nt = {
|
|
2506
2532
|
wrapper: ln,
|
|
2507
2533
|
logo: dn,
|
|
2508
2534
|
info: un
|
|
2509
|
-
}, Jn = ({ date:
|
|
2510
|
-
const { general:
|
|
2511
|
-
if (!
|
|
2535
|
+
}, Jn = ({ date: u }) => {
|
|
2536
|
+
const { general: n } = Ft();
|
|
2537
|
+
if (!n) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2512
2538
|
function o(s) {
|
|
2513
|
-
const
|
|
2539
|
+
const c = new Date(s), e = {
|
|
2514
2540
|
month: "short",
|
|
2515
2541
|
day: "2-digit",
|
|
2516
2542
|
year: "numeric",
|
|
@@ -2518,13 +2544,13 @@ const is = (h) => {
|
|
|
2518
2544
|
minute: "2-digit",
|
|
2519
2545
|
hour12: !1
|
|
2520
2546
|
};
|
|
2521
|
-
return
|
|
2547
|
+
return c.toLocaleDateString("en-US", e);
|
|
2522
2548
|
}
|
|
2523
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2524
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2549
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Nt.wrapper, children: [
|
|
2550
|
+
/* @__PURE__ */ t.jsx("div", { className: Nt.logo, children: n.info.logo ? /* @__PURE__ */ t.jsx(
|
|
2525
2551
|
"img",
|
|
2526
2552
|
{
|
|
2527
|
-
src: `https://imagedelivery.net/${
|
|
2553
|
+
src: `https://imagedelivery.net/${n.info.logo.cfId}/w=500,h=500`,
|
|
2528
2554
|
alt: "image",
|
|
2529
2555
|
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2530
2556
|
}
|
|
@@ -2536,9 +2562,9 @@ const is = (h) => {
|
|
|
2536
2562
|
height: 48
|
|
2537
2563
|
}
|
|
2538
2564
|
) }),
|
|
2539
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2540
|
-
/* @__PURE__ */ t.jsx("h3", { id: "h4", children:
|
|
2541
|
-
/* @__PURE__ */ t.jsx("p", { id: "p", children: o(
|
|
2565
|
+
/* @__PURE__ */ t.jsxs("div", { className: Nt.info, children: [
|
|
2566
|
+
/* @__PURE__ */ t.jsx("h3", { id: "h4", children: n.info.name }),
|
|
2567
|
+
/* @__PURE__ */ t.jsx("p", { id: "p", children: o(u) })
|
|
2542
2568
|
] })
|
|
2543
2569
|
] });
|
|
2544
2570
|
}, hn = "_variants_18tbu_82", mn = "_variant_18tbu_82", pn = "_stock_18tbu_100", gn = "_variantInfo_18tbu_108", fn = "_title_18tbu_202", xn = "_modal_18tbu_208", _n = "_header_18tbu_228", yn = "_productOptions_18tbu_236", jn = "_loading_18tbu_244", et = {
|
|
@@ -2551,80 +2577,80 @@ const is = (h) => {
|
|
|
2551
2577
|
header: _n,
|
|
2552
2578
|
productOptions: yn,
|
|
2553
2579
|
loading: jn
|
|
2554
|
-
}, Kn = (
|
|
2555
|
-
var
|
|
2556
|
-
const { pageContext:
|
|
2580
|
+
}, Kn = (u) => {
|
|
2581
|
+
var r;
|
|
2582
|
+
const { pageContext: n } = bt(), o = (r = n == null ? void 0 : n.listings) == null ? void 0 : r.find((l) => l.id === u.productId), [s, c] = f.useState(!0), [e, h] = f.useState(null), d = (e == null ? void 0 : e.variants[0]) || null, [g, _] = f.useState(
|
|
2557
2583
|
"ONE_TIME"
|
|
2558
2584
|
), { addProducts: M } = ct(), { setIsOpen: I } = rt();
|
|
2559
|
-
return
|
|
2585
|
+
return f.useEffect(() => {
|
|
2560
2586
|
(async () => {
|
|
2561
|
-
|
|
2587
|
+
c(!0);
|
|
2562
2588
|
const y = await Vt(
|
|
2563
2589
|
encodeURIComponent(
|
|
2564
2590
|
`/product/${o.productData.uniquePath}`
|
|
2565
2591
|
)
|
|
2566
2592
|
);
|
|
2567
|
-
M(y == null ? void 0 : y.data.products),
|
|
2593
|
+
M(y == null ? void 0 : y.data.products), h(y == null ? void 0 : y.data.products[0]), c(!1);
|
|
2568
2594
|
})();
|
|
2569
|
-
}, []),
|
|
2595
|
+
}, []), f.useEffect(() => {
|
|
2570
2596
|
I(!0);
|
|
2571
|
-
}, []), /* @__PURE__ */ t.jsx(ut, { close:
|
|
2597
|
+
}, []), /* @__PURE__ */ t.jsx(ut, { close: u.setIsOpen, children: /* @__PURE__ */ t.jsxs(
|
|
2572
2598
|
"div",
|
|
2573
2599
|
{
|
|
2574
2600
|
className: et.modal,
|
|
2575
2601
|
onClick: (l) => l.stopPropagation(),
|
|
2576
2602
|
children: [
|
|
2577
|
-
s && /* @__PURE__ */ t.jsx("div", { className: et.loading, children: /* @__PURE__ */ t.jsx(
|
|
2578
|
-
|
|
2603
|
+
s && /* @__PURE__ */ t.jsx("div", { className: et.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
|
|
2604
|
+
u.type === "Add To Cart" && u.isCartEnabled && e && d && !s && /* @__PURE__ */ t.jsx(
|
|
2579
2605
|
bn,
|
|
2580
2606
|
{
|
|
2581
2607
|
variants: e.variants,
|
|
2582
2608
|
activeVariant: d,
|
|
2583
|
-
activeChargeType:
|
|
2609
|
+
activeChargeType: g,
|
|
2584
2610
|
setActiveChargeType: _,
|
|
2585
2611
|
productId: e.id,
|
|
2586
|
-
setIsOpen:
|
|
2612
|
+
setIsOpen: u.setIsOpen
|
|
2587
2613
|
}
|
|
2588
2614
|
),
|
|
2589
|
-
|
|
2615
|
+
u.type === "Buy Now" && e && !s && /* @__PURE__ */ t.jsx(
|
|
2590
2616
|
vn,
|
|
2591
2617
|
{
|
|
2592
2618
|
product: e,
|
|
2593
|
-
setIsOpen:
|
|
2594
|
-
isCartEnabled:
|
|
2619
|
+
setIsOpen: u.setIsOpen,
|
|
2620
|
+
isCartEnabled: u.isCartEnabled
|
|
2595
2621
|
}
|
|
2596
2622
|
)
|
|
2597
2623
|
]
|
|
2598
2624
|
}
|
|
2599
2625
|
) });
|
|
2600
|
-
}, bn = (
|
|
2601
|
-
const { variants:
|
|
2602
|
-
|
|
2603
|
-
|
|
2626
|
+
}, bn = (u) => {
|
|
2627
|
+
const { variants: n, activeChargeType: o, productId: s, setIsOpen: c } = u, { cart: e, addProductToCart: h, addProducts: d, updateQuantityOfProduct: g } = ct(), { notifications: _, setNotifications: M } = St(), { pageContext: I } = bt(), { setIsOpen: r } = rt(), l = () => {
|
|
2628
|
+
r(!1), setTimeout(() => {
|
|
2629
|
+
c(!1);
|
|
2604
2630
|
}, 300);
|
|
2605
2631
|
};
|
|
2606
2632
|
async function y(x) {
|
|
2607
|
-
const m =
|
|
2608
|
-
(
|
|
2633
|
+
const m = n.find((k) => k.id === x), a = e.parts.find(
|
|
2634
|
+
(k) => k.productId === u.productId && k.productVariantId === x
|
|
2609
2635
|
);
|
|
2610
|
-
if ((m == null ? void 0 : m.quantity.available) && (m == null ? void 0 : m.quantity.restrictions) && ((
|
|
2636
|
+
if ((m == null ? void 0 : m.quantity.available) && (m == null ? void 0 : m.quantity.restrictions) && ((a == null ? void 0 : a.quantity) || 0) + 1 > (m == null ? void 0 : m.quantity.restrictions.max) || (m == null ? void 0 : m.quantity.available) === 0 || (m == null ? void 0 : m.quantity.available) && ((a == null ? void 0 : a.quantity) || 0) + 1 > (m == null ? void 0 : m.quantity.available)) {
|
|
2611
2637
|
M([
|
|
2612
2638
|
..._,
|
|
2613
2639
|
{ id: J(), message: "Product is out of stock", status: "error" }
|
|
2614
2640
|
]);
|
|
2615
2641
|
return;
|
|
2616
2642
|
}
|
|
2617
|
-
if (
|
|
2618
|
-
|
|
2643
|
+
if (a)
|
|
2644
|
+
g({
|
|
2619
2645
|
productId: s,
|
|
2620
2646
|
productVariantId: x,
|
|
2621
|
-
quantity:
|
|
2647
|
+
quantity: a.quantity + 1,
|
|
2622
2648
|
chargeType: o
|
|
2623
2649
|
});
|
|
2624
2650
|
else {
|
|
2625
2651
|
I != null && I.products && d(I.products);
|
|
2626
2652
|
try {
|
|
2627
|
-
|
|
2653
|
+
h({
|
|
2628
2654
|
productId: s,
|
|
2629
2655
|
productVariantId: x,
|
|
2630
2656
|
quantity: 1,
|
|
@@ -2637,12 +2663,12 @@ const is = (h) => {
|
|
|
2637
2663
|
status: "success"
|
|
2638
2664
|
}
|
|
2639
2665
|
]);
|
|
2640
|
-
} catch (
|
|
2666
|
+
} catch (k) {
|
|
2641
2667
|
M([
|
|
2642
2668
|
..._,
|
|
2643
2669
|
{
|
|
2644
2670
|
id: J(),
|
|
2645
|
-
message: `Product failed to add to cart: ${
|
|
2671
|
+
message: `Product failed to add to cart: ${k}`,
|
|
2646
2672
|
status: "error"
|
|
2647
2673
|
}
|
|
2648
2674
|
]);
|
|
@@ -2664,17 +2690,17 @@ const is = (h) => {
|
|
|
2664
2690
|
}
|
|
2665
2691
|
)
|
|
2666
2692
|
] }),
|
|
2667
|
-
/* @__PURE__ */ t.jsx("div", { className: et.variants, children:
|
|
2693
|
+
/* @__PURE__ */ t.jsx("div", { className: et.variants, children: n.filter((x) => {
|
|
2668
2694
|
var m;
|
|
2669
2695
|
return (m = x.chargeTypes) == null ? void 0 : m.includes(o);
|
|
2670
2696
|
}).map((x) => {
|
|
2671
|
-
var m,
|
|
2697
|
+
var m, a, b;
|
|
2672
2698
|
return /* @__PURE__ */ t.jsxs(
|
|
2673
2699
|
"div",
|
|
2674
2700
|
{
|
|
2675
2701
|
className: U(et.variant),
|
|
2676
2702
|
onClick: () => {
|
|
2677
|
-
y(x.id),
|
|
2703
|
+
y(x.id), c(!1);
|
|
2678
2704
|
},
|
|
2679
2705
|
children: [
|
|
2680
2706
|
/* @__PURE__ */ t.jsxs("div", { className: et.variantInfo, children: [
|
|
@@ -2697,7 +2723,7 @@ const is = (h) => {
|
|
|
2697
2723
|
className: et.stock,
|
|
2698
2724
|
id: "md",
|
|
2699
2725
|
children: [
|
|
2700
|
-
(
|
|
2726
|
+
(a = x.quantity.restrictions) != null && a.max || x.quantity.available !== void 0 ? ((b = x.quantity.restrictions) == null ? void 0 : b.max) || x.quantity.available : "∞",
|
|
2701
2727
|
" ",
|
|
2702
2728
|
"in stock"
|
|
2703
2729
|
]
|
|
@@ -2709,9 +2735,9 @@ const is = (h) => {
|
|
|
2709
2735
|
);
|
|
2710
2736
|
}) })
|
|
2711
2737
|
] });
|
|
2712
|
-
}, vn = (
|
|
2713
|
-
const { product:
|
|
2714
|
-
|
|
2738
|
+
}, vn = (u) => {
|
|
2739
|
+
const { product: n, setIsOpen: o, isCartEnabled: s } = u, { setIsOpen: c } = rt(), e = () => {
|
|
2740
|
+
c(!1), setTimeout(() => {
|
|
2715
2741
|
o(!1);
|
|
2716
2742
|
}, 300);
|
|
2717
2743
|
};
|
|
@@ -2723,7 +2749,7 @@ const is = (h) => {
|
|
|
2723
2749
|
id: "h3",
|
|
2724
2750
|
className: et.title,
|
|
2725
2751
|
dangerouslySetInnerHTML: {
|
|
2726
|
-
__html: `Buy ${at(
|
|
2752
|
+
__html: `Buy ${at(n.name)}`
|
|
2727
2753
|
}
|
|
2728
2754
|
}
|
|
2729
2755
|
),
|
|
@@ -2746,19 +2772,19 @@ const is = (h) => {
|
|
|
2746
2772
|
/* @__PURE__ */ t.jsx("div", { className: et.productOptions, children: /* @__PURE__ */ t.jsx(
|
|
2747
2773
|
is,
|
|
2748
2774
|
{
|
|
2749
|
-
product:
|
|
2775
|
+
product: n,
|
|
2750
2776
|
setIsOpen: o,
|
|
2751
2777
|
isCartEnabled: s
|
|
2752
2778
|
}
|
|
2753
2779
|
) })
|
|
2754
2780
|
] });
|
|
2755
|
-
}, In = "_contentModal_m2tf9_1", Nn = "_modalTop_m2tf9_12",
|
|
2781
|
+
}, In = "_contentModal_m2tf9_1", Nn = "_modalTop_m2tf9_12", Cn = "_loading_m2tf9_19", Sn = "_modalCards_m2tf9_28", kn = "_modalImage_m2tf9_34", Pn = "_card_m2tf9_39", wn = "_cardInfo_m2tf9_51", Tn = "_cardButtons_m2tf9_58", Mn = "_title_m2tf9_64", Bn = "_blockImage_m2tf9_71", $n = "_short_m2tf9_80", On = "_price_m2tf9_84", qn = "_oldPrice_m2tf9_91", An = "_newPrice_m2tf9_100", H = {
|
|
2756
2782
|
contentModal: In,
|
|
2757
2783
|
modalTop: Nn,
|
|
2758
|
-
loading:
|
|
2759
|
-
modalCards:
|
|
2760
|
-
modalImage:
|
|
2761
|
-
card:
|
|
2784
|
+
loading: Cn,
|
|
2785
|
+
modalCards: Sn,
|
|
2786
|
+
modalImage: kn,
|
|
2787
|
+
card: Pn,
|
|
2762
2788
|
cardInfo: wn,
|
|
2763
2789
|
cardButtons: Tn,
|
|
2764
2790
|
title: Mn,
|
|
@@ -2767,31 +2793,31 @@ const is = (h) => {
|
|
|
2767
2793
|
price: On,
|
|
2768
2794
|
oldPrice: qn,
|
|
2769
2795
|
newPrice: An
|
|
2770
|
-
}, Zn = (
|
|
2796
|
+
}, Zn = (u) => {
|
|
2771
2797
|
const {
|
|
2772
|
-
setIsOpen:
|
|
2798
|
+
setIsOpen: n,
|
|
2773
2799
|
pageContext: o,
|
|
2774
2800
|
groupData: s,
|
|
2775
|
-
setProductId:
|
|
2801
|
+
setProductId: c,
|
|
2776
2802
|
setIsProductModalOpen: e,
|
|
2777
|
-
setShowDropdown:
|
|
2778
|
-
} =
|
|
2779
|
-
|
|
2803
|
+
setShowDropdown: h
|
|
2804
|
+
} = u, [d, g] = f.useState(null), [_, M] = f.useState(!0), { setIsOpen: I } = rt();
|
|
2805
|
+
f.useEffect(() => {
|
|
2780
2806
|
var y;
|
|
2781
2807
|
M(!0);
|
|
2782
2808
|
const l = (y = o.listings) == null ? void 0 : y.filter(
|
|
2783
2809
|
(x) => s.listingIdList.includes(x.id)
|
|
2784
2810
|
);
|
|
2785
|
-
l &&
|
|
2786
|
-
}, [o]),
|
|
2811
|
+
l && g([...l]), M(!1);
|
|
2812
|
+
}, [o]), f.useEffect(() => {
|
|
2787
2813
|
I(!0);
|
|
2788
2814
|
}, []);
|
|
2789
|
-
const
|
|
2815
|
+
const r = () => {
|
|
2790
2816
|
I(!1), setTimeout(() => {
|
|
2791
|
-
|
|
2817
|
+
n(!1);
|
|
2792
2818
|
}, 300);
|
|
2793
2819
|
};
|
|
2794
|
-
return /* @__PURE__ */ t.jsx(ut, { close: () =>
|
|
2820
|
+
return /* @__PURE__ */ t.jsx(ut, { close: () => n(!1), children: /* @__PURE__ */ t.jsxs(
|
|
2795
2821
|
"div",
|
|
2796
2822
|
{
|
|
2797
2823
|
className: H.contentModal,
|
|
@@ -2813,7 +2839,7 @@ const is = (h) => {
|
|
|
2813
2839
|
{
|
|
2814
2840
|
name: "X",
|
|
2815
2841
|
hoverable: !0,
|
|
2816
|
-
onClick:
|
|
2842
|
+
onClick: r,
|
|
2817
2843
|
fill: "var(--text-primary)"
|
|
2818
2844
|
}
|
|
2819
2845
|
)
|
|
@@ -2898,18 +2924,18 @@ const is = (h) => {
|
|
|
2898
2924
|
{
|
|
2899
2925
|
type: "Secondary",
|
|
2900
2926
|
onClick: () => {
|
|
2901
|
-
|
|
2927
|
+
c(l.id), n(!1), e(!0);
|
|
2902
2928
|
},
|
|
2903
2929
|
children: "Buy"
|
|
2904
2930
|
}
|
|
2905
2931
|
),
|
|
2906
|
-
/* @__PURE__ */ t.jsx(
|
|
2932
|
+
/* @__PURE__ */ t.jsx(qt, { path: `/product/${l.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(
|
|
2907
2933
|
R,
|
|
2908
2934
|
{
|
|
2909
2935
|
type: "Primary",
|
|
2910
2936
|
style: { whiteSpace: "nowrap" },
|
|
2911
2937
|
onClick: () => {
|
|
2912
|
-
|
|
2938
|
+
h(!1), r();
|
|
2913
2939
|
},
|
|
2914
2940
|
children: "View Details"
|
|
2915
2941
|
}
|
|
@@ -2919,7 +2945,7 @@ const is = (h) => {
|
|
|
2919
2945
|
},
|
|
2920
2946
|
l.id
|
|
2921
2947
|
)) }),
|
|
2922
|
-
_ && /* @__PURE__ */ t.jsx("div", { className: H.loading, children: /* @__PURE__ */ t.jsx(
|
|
2948
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: H.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
|
|
2923
2949
|
]
|
|
2924
2950
|
}
|
|
2925
2951
|
) });
|
|
@@ -2932,7 +2958,7 @@ export {
|
|
|
2932
2958
|
Ae as ButtonTypeSettings,
|
|
2933
2959
|
Fn as ButtonsSettings,
|
|
2934
2960
|
Un as CategorySettings,
|
|
2935
|
-
|
|
2961
|
+
$t as ChargeTypes,
|
|
2936
2962
|
Dt as ChooseImage,
|
|
2937
2963
|
ni as ChooseImageModal,
|
|
2938
2964
|
Us as EmptyCart,
|
|
@@ -2940,13 +2966,13 @@ export {
|
|
|
2940
2966
|
Zn as GroupCardModal,
|
|
2941
2967
|
Yn as HeaderButtons,
|
|
2942
2968
|
j as Icon,
|
|
2943
|
-
|
|
2969
|
+
Ct as InputSettings,
|
|
2944
2970
|
Ut as InputUI,
|
|
2945
2971
|
ii as ItemsSettings,
|
|
2946
2972
|
Ln as LayoutSettings,
|
|
2947
|
-
|
|
2973
|
+
qt as Link,
|
|
2948
2974
|
Vn as ListingSelector,
|
|
2949
|
-
|
|
2975
|
+
Bt as Loader,
|
|
2950
2976
|
Jn as MetaInfoPost,
|
|
2951
2977
|
ut as Modal,
|
|
2952
2978
|
Gn as PagesMobileMenu,
|
|
@@ -2956,7 +2982,7 @@ export {
|
|
|
2956
2982
|
Kn as ProductCardModal,
|
|
2957
2983
|
is as ProductOptions,
|
|
2958
2984
|
ai as RadioUI,
|
|
2959
|
-
|
|
2985
|
+
Pt as RangeSelector,
|
|
2960
2986
|
ot as Select,
|
|
2961
2987
|
oi as SelectInfiniteList,
|
|
2962
2988
|
ci as SelectTypeText,
|
|
@@ -2969,6 +2995,6 @@ export {
|
|
|
2969
2995
|
di as TextareaSettings,
|
|
2970
2996
|
ui as TextareaUI,
|
|
2971
2997
|
hi as TypesText,
|
|
2972
|
-
|
|
2998
|
+
Ot as UserInfo,
|
|
2973
2999
|
mi as Wrapper
|
|
2974
3000
|
};
|