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