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