@billgangcom/theme-lib 1.44.1 → 1.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +1 -1
- package/dist/builder/components/Preview/Render/index.d.ts +11 -2
- package/dist/builder/utils/index.d.ts +1 -0
- package/dist/builder/utils/splitTextIntoSpans.d.ts +1 -0
- package/dist/builder.cjs.js +48 -48
- package/dist/builder.es.js +958 -943
- package/dist/{index-Dg3e7rFo.js → index-CbgVRiD5.js} +108 -63
- package/dist/{index-BkqkB6IP.cjs → index-X-Olyqgp.cjs} +15 -15
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -4
- package/dist/ui/ButtonsSettings/index.d.ts +3 -1
- package/dist/ui/FormSettings/index.d.ts +7 -3
- package/dist/ui/ItemsSettings/index.d.ts +3 -1
- package/dist/ui/ItemsSettings/popup.d.ts +1 -0
- package/dist/ui/ProductCardButtons/index.d.ts +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1465 -1421
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { q as
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, c as V, a as K, S as et, T as qt, b as tt, C as ft, u as $t, d as Nt, D as wt, e as St, v as Ct, B as lt, f as mt, P as Bt, g as Tt, h as Pt, i as Ft, s as Vt, k as Et, l as jt, m as At, M as Mt, n as Ut, o as Dt, p as Yt } from "./index-CbgVRiD5.js";
|
|
2
|
+
import { q as Ua, L as Da } from "./index-CbgVRiD5.js";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
5
|
+
const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1ibay_15", Jt = "_subtitle_1ibay_22", Qt = "_alignmentContent_1ibay_29", Kt = "_alignments_1ibay_37", Zt = "_alignment_1ibay_8", te = "_circle_1ibay_60", ee = "_paddings_1ibay_67", se = "_padding_1ibay_67", ne = "_active_1ibay_91", ie = "_input_1ibay_98", J = {
|
|
6
|
+
wrapper: Gt,
|
|
7
|
+
alignmentBlock: Xt,
|
|
8
|
+
title: Wt,
|
|
9
|
+
subtitle: Jt,
|
|
10
|
+
alignmentContent: Qt,
|
|
11
|
+
alignments: Kt,
|
|
12
|
+
alignment: Zt,
|
|
13
|
+
circle: te,
|
|
14
|
+
paddings: ee,
|
|
15
|
+
padding: se,
|
|
16
|
+
active: ne,
|
|
17
|
+
input: ie
|
|
18
|
+
}, oe = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,9 +25,9 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment:
|
|
30
|
-
function
|
|
28
|
+
], ae = ["left", "top", "right", "bottom"], ka = (d) => {
|
|
29
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: n } = d;
|
|
30
|
+
function c(h) {
|
|
31
31
|
switch (h) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
@@ -45,7 +45,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function r(h) {
|
|
49
49
|
switch (h) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
@@ -57,40 +57,40 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [
|
|
60
|
+
const [o, i] = x.useState(null), [l, j] = x.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children:
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: oe.map((h) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
|
|
70
|
+
n(h);
|
|
71
71
|
},
|
|
72
72
|
className: J.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
|
|
74
|
+
i(h);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
|
-
|
|
77
|
+
i(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
h !==
|
|
81
|
-
h !==
|
|
82
|
-
|
|
80
|
+
h !== a && o !== h && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
h !== a && o === h && /* @__PURE__ */ t.jsx(
|
|
82
|
+
b,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: c(o),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
h ===
|
|
91
|
-
|
|
90
|
+
h === a && /* @__PURE__ */ t.jsx(
|
|
91
|
+
b,
|
|
92
92
|
{
|
|
93
|
-
name: a
|
|
93
|
+
name: c(a),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -100,23 +100,23 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
100
100
|
},
|
|
101
101
|
h
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: ae.map((h) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[J.active]:
|
|
106
|
+
className: V(J.padding, {
|
|
107
|
+
[J.active]: l === h
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
j(h);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
j(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
b,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: r(h),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
@@ -141,21 +141,21 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
}, me = "_typeTexts_167ez_1",
|
|
144
|
+
}, ce = "_title_1jkiw_1", le = "_subtitle_1jkiw_5", re = "_header_1jkiw_12", de = "_text_1jkiw_13", ue = "_top_1jkiw_20", _e = "_itemsBlock_1jkiw_29", ht = {
|
|
145
|
+
title: ce,
|
|
146
|
+
subtitle: le,
|
|
147
|
+
header: re,
|
|
148
|
+
text: de,
|
|
149
|
+
top: ue,
|
|
150
|
+
itemsBlock: _e
|
|
151
|
+
}, me = "_typeTexts_167ez_1", he = "_block_167ez_8", pe = "_active_167ez_25", kt = {
|
|
152
152
|
typeTexts: me,
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
157
|
-
function s(
|
|
158
|
-
switch (
|
|
153
|
+
block: he,
|
|
154
|
+
active: pe
|
|
155
|
+
}, xe = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
|
|
156
|
+
const { typesText: a, setTypesText: e } = d;
|
|
157
|
+
function s(n) {
|
|
158
|
+
switch (n) {
|
|
159
159
|
case "bold":
|
|
160
160
|
return "TextB";
|
|
161
161
|
case "italic":
|
|
@@ -168,31 +168,31 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className: kt.typeTexts, children:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: kt.typeTexts, children: xe.map((n) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
[kt.active]:
|
|
174
|
+
className: V(kt.block, {
|
|
175
|
+
[kt.active]: a.includes(n)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
e(
|
|
178
|
+
const c = [...a];
|
|
179
|
+
if (c.includes(n)) {
|
|
180
|
+
const r = c.filter((o) => o !== n);
|
|
181
|
+
e(r);
|
|
182
182
|
} else
|
|
183
|
-
|
|
183
|
+
c.push(n), e(c);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
|
-
|
|
186
|
+
b,
|
|
187
187
|
{
|
|
188
|
-
name: s(
|
|
189
|
-
fill:
|
|
188
|
+
name: s(n),
|
|
189
|
+
fill: a.includes(n) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
},
|
|
195
|
-
String(
|
|
195
|
+
String(n)
|
|
196
196
|
)) });
|
|
197
197
|
}, pt = {
|
|
198
198
|
h1: "Heading 1",
|
|
@@ -202,24 +202,24 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
202
202
|
h5: "Heading 5",
|
|
203
203
|
h6: "Heading 6",
|
|
204
204
|
p: "Paragraph"
|
|
205
|
-
},
|
|
205
|
+
}, Lt = (d) => {
|
|
206
206
|
const {
|
|
207
|
-
typesText:
|
|
207
|
+
typesText: a,
|
|
208
208
|
isActiveText: e,
|
|
209
209
|
setIsActiveText: s,
|
|
210
|
-
text:
|
|
211
|
-
setText:
|
|
212
|
-
setTypesText:
|
|
213
|
-
title:
|
|
214
|
-
subtitle:
|
|
215
|
-
typeFont:
|
|
216
|
-
setTypeFont:
|
|
210
|
+
text: n,
|
|
211
|
+
setText: c,
|
|
212
|
+
setTypesText: r,
|
|
213
|
+
title: o,
|
|
214
|
+
subtitle: i = "Items",
|
|
215
|
+
typeFont: l,
|
|
216
|
+
setTypeFont: j
|
|
217
217
|
} = d;
|
|
218
218
|
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
219
|
-
(
|
|
220
|
-
|
|
219
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
220
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: o }),
|
|
221
221
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
222
|
-
|
|
222
|
+
et,
|
|
223
223
|
{
|
|
224
224
|
current: e,
|
|
225
225
|
onChange: (h) => s(h)
|
|
@@ -227,229 +227,231 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
229
|
/* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children:
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: i }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
232
|
qt,
|
|
233
233
|
{
|
|
234
|
-
onChange: (h) =>
|
|
235
|
-
value:
|
|
234
|
+
onChange: (h) => c(h),
|
|
235
|
+
value: n,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ t.jsx(
|
|
240
240
|
Ht,
|
|
241
241
|
{
|
|
242
|
-
typesText:
|
|
243
|
-
setTypesText:
|
|
242
|
+
typesText: a,
|
|
243
|
+
setTypesText: r
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
246
|
/* @__PURE__ */ t.jsx(
|
|
247
|
-
|
|
247
|
+
tt,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
250
|
options: Object.values(pt).filter(
|
|
251
|
-
(h) => h !== pt[
|
|
251
|
+
(h) => h !== pt[l]
|
|
252
252
|
),
|
|
253
|
-
onChange: (h) =>
|
|
253
|
+
onChange: (h) => j(
|
|
254
254
|
Object.keys(pt).find(
|
|
255
255
|
(p) => pt[p] === h
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value: pt[
|
|
258
|
+
value: pt[l]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
},
|
|
264
|
-
title:
|
|
265
|
-
subtitle:
|
|
266
|
-
header:
|
|
267
|
-
text:
|
|
268
|
-
productsBlock:
|
|
269
|
-
top:
|
|
270
|
-
itemsBlock:
|
|
271
|
-
typeTexts:
|
|
272
|
-
block:
|
|
273
|
-
active:
|
|
274
|
-
products:
|
|
275
|
-
product:
|
|
263
|
+
}, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", be = "_header_roi3a_12", ve = "_text_roi3a_13", je = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", $e = "_block_roi3a_48", Ne = "_active_roi3a_61", we = "_products_roi3a_14", Se = "_product_roi3a_14", Ce = "_button_roi3a_80", Be = "_disabled_roi3a_91", Te = "_image_roi3a_95", Pe = "_info_roi3a_102", Ae = "_name_roi3a_114", Me = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", qe = "_link_roi3a_145", Ee = "_modalOptions_roi3a_151", Ue = "_addButton_roi3a_164", De = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", H = {
|
|
264
|
+
title: ge,
|
|
265
|
+
subtitle: fe,
|
|
266
|
+
header: be,
|
|
267
|
+
text: ve,
|
|
268
|
+
productsBlock: je,
|
|
269
|
+
top: ye,
|
|
270
|
+
itemsBlock: ke,
|
|
271
|
+
typeTexts: Ie,
|
|
272
|
+
block: $e,
|
|
273
|
+
active: Ne,
|
|
274
|
+
products: we,
|
|
275
|
+
product: Se,
|
|
276
276
|
button: Ce,
|
|
277
277
|
disabled: Be,
|
|
278
|
-
image:
|
|
279
|
-
info:
|
|
280
|
-
name:
|
|
281
|
-
buttons:
|
|
282
|
-
modal:
|
|
283
|
-
link:
|
|
284
|
-
modalOptions:
|
|
285
|
-
addButton:
|
|
278
|
+
image: Te,
|
|
279
|
+
info: Pe,
|
|
280
|
+
name: Ae,
|
|
281
|
+
buttons: Me,
|
|
282
|
+
modal: Oe,
|
|
283
|
+
link: qe,
|
|
284
|
+
modalOptions: Ee,
|
|
285
|
+
addButton: Ue,
|
|
286
286
|
deleteButton: De,
|
|
287
|
-
closeIcon:
|
|
288
|
-
},
|
|
289
|
-
(d,
|
|
290
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
291
|
-
function
|
|
292
|
-
return
|
|
287
|
+
closeIcon: He
|
|
288
|
+
}, Le = x.forwardRef(
|
|
289
|
+
(d, a) => {
|
|
290
|
+
const { activeItem: e, setActiveItem: s, popupPosition: n, modalOptions: c, setIsOpenModal: r } = d;
|
|
291
|
+
function o(i, l) {
|
|
292
|
+
return i.length > l ? `${i.slice(0, l)}...` : i;
|
|
293
293
|
}
|
|
294
294
|
return /* @__PURE__ */ t.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
|
-
ref:
|
|
298
|
-
className:
|
|
299
|
-
onClick: (
|
|
300
|
-
|
|
297
|
+
ref: a,
|
|
298
|
+
className: H.modal,
|
|
299
|
+
onClick: (i) => {
|
|
300
|
+
i.stopPropagation();
|
|
301
301
|
},
|
|
302
302
|
style: {
|
|
303
|
-
top: `${
|
|
304
|
-
left: `${
|
|
303
|
+
top: `${n.top}px`,
|
|
304
|
+
left: `${n.left}px`
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
309
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
310
|
-
|
|
307
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
308
|
+
/* @__PURE__ */ t.jsx("h3", { className: H.title, children: o(e.name["en-US"], 20) }),
|
|
309
|
+
/* @__PURE__ */ t.jsx("div", { className: H.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
310
|
+
b,
|
|
311
311
|
{
|
|
312
312
|
name: "X",
|
|
313
313
|
height: 20,
|
|
314
314
|
width: 20,
|
|
315
315
|
onClick: () => {
|
|
316
|
-
s(null),
|
|
316
|
+
s(null), r(!1);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
) })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
322
|
-
if (
|
|
321
|
+
/* @__PURE__ */ t.jsx("div", { className: H.modalOptions, children: c.map((i) => {
|
|
322
|
+
if (i.type === "image")
|
|
323
323
|
return /* @__PURE__ */ t.jsx(
|
|
324
324
|
ft,
|
|
325
325
|
{
|
|
326
326
|
label: "Put up an attractive image",
|
|
327
|
-
activeImage: e[
|
|
328
|
-
onChange: (
|
|
329
|
-
const
|
|
327
|
+
activeImage: e[i.field],
|
|
328
|
+
onChange: (l) => {
|
|
329
|
+
const j = {
|
|
330
330
|
...e,
|
|
331
|
-
[
|
|
331
|
+
[i.field]: l
|
|
332
332
|
};
|
|
333
|
-
s(
|
|
333
|
+
s(j);
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
|
-
String(
|
|
336
|
+
String(i.field)
|
|
337
337
|
);
|
|
338
|
-
if (
|
|
338
|
+
if (i.type === "text")
|
|
339
339
|
return /* @__PURE__ */ t.jsx(
|
|
340
|
-
|
|
340
|
+
Lt,
|
|
341
341
|
{
|
|
342
|
-
typesText: e[
|
|
343
|
-
setTypesText: (
|
|
344
|
-
const
|
|
342
|
+
typesText: e[i.field.type],
|
|
343
|
+
setTypesText: (l) => {
|
|
344
|
+
const j = {
|
|
345
345
|
...e,
|
|
346
|
-
[
|
|
346
|
+
[i.field.type]: l
|
|
347
347
|
};
|
|
348
|
-
s(
|
|
348
|
+
s(j);
|
|
349
349
|
},
|
|
350
|
-
text: e[
|
|
351
|
-
setText: (
|
|
352
|
-
const
|
|
350
|
+
text: e[i.field.text]["en-US"] || "",
|
|
351
|
+
setText: (l) => {
|
|
352
|
+
const j = {
|
|
353
353
|
...e,
|
|
354
|
-
[
|
|
354
|
+
[i.field.text]: {
|
|
355
|
+
"en-US": l
|
|
356
|
+
}
|
|
355
357
|
};
|
|
356
|
-
s(
|
|
358
|
+
s(j);
|
|
357
359
|
},
|
|
358
|
-
typeFont: e[
|
|
359
|
-
setTypeFont: (
|
|
360
|
-
const
|
|
360
|
+
typeFont: e[i.field.typeFont],
|
|
361
|
+
setTypeFont: (l) => {
|
|
362
|
+
const j = {
|
|
361
363
|
...e,
|
|
362
|
-
[
|
|
364
|
+
[i.field.typeFont]: l
|
|
363
365
|
};
|
|
364
|
-
s(
|
|
366
|
+
s(j);
|
|
365
367
|
},
|
|
366
|
-
subtitle:
|
|
368
|
+
subtitle: i.label
|
|
367
369
|
}
|
|
368
370
|
);
|
|
369
|
-
if (
|
|
371
|
+
if (i.type === "input")
|
|
370
372
|
return /* @__PURE__ */ t.jsx(
|
|
371
373
|
K,
|
|
372
374
|
{
|
|
373
|
-
onChange: (
|
|
374
|
-
const
|
|
375
|
+
onChange: (l) => {
|
|
376
|
+
const j = {
|
|
375
377
|
...e,
|
|
376
|
-
[
|
|
378
|
+
[i.field]: l
|
|
377
379
|
};
|
|
378
|
-
s(
|
|
380
|
+
s(j);
|
|
379
381
|
},
|
|
380
|
-
value: e[
|
|
381
|
-
label:
|
|
382
|
-
placeholder:
|
|
382
|
+
value: e[i.field] || "",
|
|
383
|
+
label: i.label,
|
|
384
|
+
placeholder: i.placeholder
|
|
383
385
|
}
|
|
384
386
|
);
|
|
385
|
-
if (
|
|
386
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
387
|
+
if (i.type === "inputSwitch")
|
|
388
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.link, children: [
|
|
387
389
|
/* @__PURE__ */ t.jsx(
|
|
388
390
|
K,
|
|
389
391
|
{
|
|
390
|
-
onChange: (
|
|
391
|
-
const
|
|
392
|
+
onChange: (l) => {
|
|
393
|
+
const j = {
|
|
392
394
|
...e,
|
|
393
|
-
[
|
|
395
|
+
[i.field.text]: l
|
|
394
396
|
};
|
|
395
|
-
s(
|
|
397
|
+
s(j);
|
|
396
398
|
},
|
|
397
|
-
value: e[
|
|
398
|
-
label:
|
|
399
|
-
placeholder:
|
|
399
|
+
value: e[i.field.text] || "",
|
|
400
|
+
label: i.inputLabel,
|
|
401
|
+
placeholder: i.placeholder
|
|
400
402
|
}
|
|
401
403
|
),
|
|
402
404
|
/* @__PURE__ */ t.jsx(
|
|
403
|
-
|
|
405
|
+
et,
|
|
404
406
|
{
|
|
405
|
-
current: !!e[
|
|
406
|
-
label:
|
|
407
|
-
onChange: (
|
|
408
|
-
const
|
|
407
|
+
current: !!e[i.field.switch] || !1,
|
|
408
|
+
label: i.switchLabel,
|
|
409
|
+
onChange: (l) => {
|
|
410
|
+
const j = {
|
|
409
411
|
...e,
|
|
410
|
-
[
|
|
412
|
+
[i.field.switch]: l
|
|
411
413
|
};
|
|
412
|
-
s(
|
|
414
|
+
s(j);
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
)
|
|
416
418
|
] });
|
|
417
|
-
if (
|
|
419
|
+
if (i.type === "list")
|
|
418
420
|
return /* @__PURE__ */ t.jsx(
|
|
419
|
-
|
|
421
|
+
Ye,
|
|
420
422
|
{
|
|
421
|
-
items: e[
|
|
422
|
-
setItems: (
|
|
423
|
-
const
|
|
423
|
+
items: e[i.field] || [],
|
|
424
|
+
setItems: (l) => {
|
|
425
|
+
const j = {
|
|
424
426
|
...e,
|
|
425
|
-
[
|
|
427
|
+
[i.field]: l
|
|
426
428
|
};
|
|
427
|
-
s(
|
|
429
|
+
s(j);
|
|
428
430
|
},
|
|
429
431
|
itemsType: "select",
|
|
430
|
-
draggable:
|
|
431
|
-
itemsOptions:
|
|
432
|
-
deletable:
|
|
432
|
+
draggable: i.draggable || !1,
|
|
433
|
+
itemsOptions: i.itemsOptions,
|
|
434
|
+
deletable: i.deletable || !1,
|
|
433
435
|
editable: !1,
|
|
434
|
-
subtitle:
|
|
435
|
-
addableOptions:
|
|
436
|
+
subtitle: i.label,
|
|
437
|
+
addableOptions: i.addableOptions
|
|
436
438
|
}
|
|
437
439
|
);
|
|
438
|
-
if (
|
|
440
|
+
if (i.type === "select")
|
|
439
441
|
return /* @__PURE__ */ t.jsx(
|
|
440
|
-
|
|
442
|
+
tt,
|
|
441
443
|
{
|
|
442
|
-
options:
|
|
443
|
-
onChange: (
|
|
444
|
-
const
|
|
444
|
+
options: i.itemsOptions,
|
|
445
|
+
onChange: (l) => {
|
|
446
|
+
const j = {
|
|
445
447
|
...e,
|
|
446
|
-
[
|
|
448
|
+
[i.field]: l
|
|
447
449
|
};
|
|
448
|
-
s(
|
|
450
|
+
s(j);
|
|
449
451
|
},
|
|
450
|
-
label:
|
|
451
|
-
value: e[
|
|
452
|
-
leftAddon:
|
|
452
|
+
label: i.label,
|
|
453
|
+
value: e[i.field] || "String",
|
|
454
|
+
leftAddon: i.leftAddon && i.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[i.field] })
|
|
453
455
|
}
|
|
454
456
|
);
|
|
455
457
|
}) })
|
|
@@ -462,123 +464,123 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
462
464
|
subtitle: Re,
|
|
463
465
|
items: Fe
|
|
464
466
|
}, yt = (d) => {
|
|
465
|
-
const { items:
|
|
467
|
+
const { items: a, title: e = "Other" } = d;
|
|
466
468
|
return /* @__PURE__ */ t.jsxs("div", { className: It.other, children: [
|
|
467
469
|
/* @__PURE__ */ t.jsx("h5", { className: It.subtitle, children: e }),
|
|
468
|
-
/* @__PURE__ */ t.jsx("div", { className: It.items, children:
|
|
469
|
-
|
|
470
|
+
/* @__PURE__ */ t.jsx("div", { className: It.items, children: a.map((s, n) => /* @__PURE__ */ t.jsx(
|
|
471
|
+
et,
|
|
470
472
|
{
|
|
471
473
|
current: s.isItem,
|
|
472
|
-
onChange: (
|
|
474
|
+
onChange: (c) => s.setIsItem(c),
|
|
473
475
|
label: s.label,
|
|
474
476
|
hasBackground: !0,
|
|
475
477
|
paddingless: !1
|
|
476
478
|
},
|
|
477
|
-
|
|
479
|
+
n
|
|
478
480
|
)) })
|
|
479
481
|
] });
|
|
480
482
|
};
|
|
481
|
-
function Ve({ product: d, children:
|
|
483
|
+
function Ve({ product: d, children: a }) {
|
|
482
484
|
const {
|
|
483
485
|
attributes: e,
|
|
484
486
|
listeners: s,
|
|
485
|
-
setNodeRef:
|
|
486
|
-
transform:
|
|
487
|
-
transition:
|
|
488
|
-
isDragging:
|
|
487
|
+
setNodeRef: n,
|
|
488
|
+
transform: c,
|
|
489
|
+
transition: r,
|
|
490
|
+
isDragging: o
|
|
489
491
|
} = Tt({
|
|
490
492
|
id: d.id
|
|
491
|
-
}),
|
|
492
|
-
transform: Pt.Transform.toString(
|
|
493
|
-
transition:
|
|
493
|
+
}), i = {
|
|
494
|
+
transform: Pt.Transform.toString(c),
|
|
495
|
+
transition: r
|
|
494
496
|
};
|
|
495
497
|
return /* @__PURE__ */ t.jsx(
|
|
496
498
|
"div",
|
|
497
499
|
{
|
|
498
|
-
ref:
|
|
499
|
-
style:
|
|
500
|
-
className: `${
|
|
500
|
+
ref: n,
|
|
501
|
+
style: i,
|
|
502
|
+
className: `${H.product} ${o ? H.dragging : ""}`,
|
|
501
503
|
...e,
|
|
502
504
|
...s,
|
|
503
|
-
children:
|
|
505
|
+
children: a
|
|
504
506
|
}
|
|
505
507
|
);
|
|
506
508
|
}
|
|
507
|
-
const
|
|
509
|
+
const Ye = (d) => {
|
|
508
510
|
const {
|
|
509
|
-
isActiveItems:
|
|
511
|
+
isActiveItems: a,
|
|
510
512
|
setIsActiveItems: e,
|
|
511
513
|
items: s,
|
|
512
|
-
setItems:
|
|
513
|
-
other:
|
|
514
|
-
title:
|
|
515
|
-
subtitle:
|
|
516
|
-
editable:
|
|
517
|
-
draggable:
|
|
518
|
-
withImage:
|
|
514
|
+
setItems: n,
|
|
515
|
+
other: c,
|
|
516
|
+
title: r,
|
|
517
|
+
subtitle: o,
|
|
518
|
+
editable: i = !0,
|
|
519
|
+
draggable: l = !1,
|
|
520
|
+
withImage: j = !1,
|
|
519
521
|
deletable: h = !0,
|
|
520
522
|
addable: p = !0,
|
|
521
|
-
itemsType:
|
|
522
|
-
itemsPlaceholder:
|
|
523
|
+
itemsType: m,
|
|
524
|
+
itemsPlaceholder: f = "",
|
|
523
525
|
itemsOptions: u,
|
|
524
|
-
hasRangeSelector:
|
|
525
|
-
rangeSelectorOptions:
|
|
526
|
+
hasRangeSelector: S = !1,
|
|
527
|
+
rangeSelectorOptions: D,
|
|
526
528
|
modalOptions: I,
|
|
527
|
-
addableOptions:
|
|
528
|
-
limit:
|
|
529
|
-
autoScrollInterval:
|
|
530
|
-
} = d, [
|
|
529
|
+
addableOptions: g = {},
|
|
530
|
+
limit: w,
|
|
531
|
+
autoScrollInterval: E
|
|
532
|
+
} = d, [R, C] = x.useState(null), [P, st] = x.useState({
|
|
531
533
|
top: 0,
|
|
532
534
|
left: 0
|
|
533
|
-
}), [y, M] =
|
|
534
|
-
Nt(
|
|
535
|
+
}), [y, M] = x.useState(null), B = x.useRef(null), [X, O] = x.useState(!1), L = $t(
|
|
536
|
+
Nt(Bt, {
|
|
535
537
|
activationConstraint: {
|
|
536
538
|
distance: 5
|
|
537
539
|
}
|
|
538
540
|
})
|
|
539
541
|
);
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
|
|
542
|
+
x.useEffect(() => {
|
|
543
|
+
const _ = () => {
|
|
544
|
+
C(null), O(!1);
|
|
543
545
|
};
|
|
544
|
-
return document.body.addEventListener("click",
|
|
545
|
-
|
|
546
|
+
return document.body.addEventListener("click", _), C(null), O(!1), () => {
|
|
547
|
+
C(null), O(!1), document.body.removeEventListener("click", _);
|
|
546
548
|
};
|
|
547
|
-
}, []),
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
550
|
-
|
|
549
|
+
}, []), x.useEffect(() => {
|
|
550
|
+
if (R) {
|
|
551
|
+
const _ = [...s].map((k) => k.id === R.id ? R : k);
|
|
552
|
+
n(_);
|
|
551
553
|
}
|
|
552
|
-
}, [
|
|
553
|
-
if (
|
|
554
|
-
const
|
|
555
|
-
let
|
|
556
|
-
|
|
557
|
-
top:
|
|
554
|
+
}, [R]), x.useEffect(() => {
|
|
555
|
+
if (B.current && y) {
|
|
556
|
+
const _ = B.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
557
|
+
let T = y.top;
|
|
558
|
+
T + _ > k + window.scrollY - 200 && (T = k + window.scrollY - _ - 200), T < 0 && (T = 10), st({
|
|
559
|
+
top: T,
|
|
558
560
|
left: y.left
|
|
559
561
|
});
|
|
560
562
|
}
|
|
561
|
-
}, [
|
|
562
|
-
const Z = (
|
|
563
|
-
|
|
564
|
-
const
|
|
563
|
+
}, [B.current, y]);
|
|
564
|
+
const Z = (_, k) => {
|
|
565
|
+
_.stopPropagation();
|
|
566
|
+
const T = _.target.getBoundingClientRect();
|
|
565
567
|
M({
|
|
566
|
-
top:
|
|
567
|
-
left:
|
|
568
|
-
}),
|
|
568
|
+
top: T.top + window.scrollY,
|
|
569
|
+
left: T.left - 30
|
|
570
|
+
}), C(k), O(!0);
|
|
569
571
|
};
|
|
570
|
-
function rt(
|
|
571
|
-
if (
|
|
572
|
-
return
|
|
572
|
+
function rt(_) {
|
|
573
|
+
if (j)
|
|
574
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
573
575
|
"img",
|
|
574
576
|
{
|
|
575
|
-
src: `https://imagedelivery.net/${
|
|
577
|
+
src: `https://imagedelivery.net/${_[0]}/w=1000`,
|
|
576
578
|
alt: "image",
|
|
577
579
|
width: 16,
|
|
578
580
|
height: 16
|
|
579
581
|
}
|
|
580
582
|
) : /* @__PURE__ */ t.jsx(
|
|
581
|
-
|
|
583
|
+
b,
|
|
582
584
|
{
|
|
583
585
|
name: "Image",
|
|
584
586
|
width: 16,
|
|
@@ -587,20 +589,20 @@ const Ue = (d) => {
|
|
|
587
589
|
}
|
|
588
590
|
);
|
|
589
591
|
}
|
|
590
|
-
const
|
|
591
|
-
const { active: k, over:
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
const A = [...s], [dt] = A.splice(
|
|
596
|
-
A.splice(
|
|
592
|
+
const v = (_) => {
|
|
593
|
+
const { active: k, over: T } = _;
|
|
594
|
+
if (T && k.id !== T.id) {
|
|
595
|
+
const U = s.findIndex((A) => A.id === k.id), Y = s.findIndex((A) => A.id === T.id);
|
|
596
|
+
if (U !== -1 && Y !== -1) {
|
|
597
|
+
const A = [...s], [dt] = A.splice(U, 1);
|
|
598
|
+
A.splice(Y, 0, dt), n(A);
|
|
597
599
|
}
|
|
598
600
|
}
|
|
599
|
-
}, q = (
|
|
600
|
-
var
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
|
|
601
|
+
}, q = (_, k) => {
|
|
602
|
+
var U, Y;
|
|
603
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
604
|
+
l && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
605
|
+
b,
|
|
604
606
|
{
|
|
605
607
|
name: "DotsSixVertical",
|
|
606
608
|
hoverable: !0,
|
|
@@ -608,134 +610,140 @@ const Ue = (d) => {
|
|
|
608
610
|
height: 20
|
|
609
611
|
}
|
|
610
612
|
) }),
|
|
611
|
-
|
|
612
|
-
|
|
613
|
+
m === "select" && u && /* @__PURE__ */ t.jsx(
|
|
614
|
+
tt,
|
|
613
615
|
{
|
|
614
616
|
onChange: (A) => {
|
|
615
|
-
const dt = [...s],
|
|
616
|
-
if (!
|
|
617
|
-
const ut = dt.map((bt) => bt.id ===
|
|
618
|
-
...
|
|
619
|
-
name:
|
|
617
|
+
const dt = [...s], _t = u.find((bt) => bt.name["en-US"] === A);
|
|
618
|
+
if (!_t) return;
|
|
619
|
+
const ut = dt.map((bt) => bt.id === _.id ? {
|
|
620
|
+
..._t,
|
|
621
|
+
name: {
|
|
622
|
+
"en-US": A
|
|
623
|
+
}
|
|
620
624
|
} : bt);
|
|
621
|
-
|
|
622
|
-
...
|
|
623
|
-
name:
|
|
624
|
-
|
|
625
|
+
C({
|
|
626
|
+
..._,
|
|
627
|
+
name: {
|
|
628
|
+
"en-US": A
|
|
629
|
+
}
|
|
630
|
+
}), n([...ut]);
|
|
625
631
|
},
|
|
626
|
-
value:
|
|
627
|
-
options: u.filter((A) => !s.find((dt) => dt.name === A.name)).map((A) => A.name),
|
|
628
|
-
leftAddon: rt(
|
|
632
|
+
value: _.name["en-US"],
|
|
633
|
+
options: u.filter((A) => !s.find((dt) => dt.name["en-US"] === A.name["en-US"])).map((A) => A.name["en-US"]),
|
|
634
|
+
leftAddon: rt(_.images)
|
|
629
635
|
}
|
|
630
636
|
),
|
|
631
|
-
|
|
637
|
+
m === "input" && /* @__PURE__ */ t.jsx(
|
|
632
638
|
K,
|
|
633
639
|
{
|
|
634
640
|
onChange: (A) => {
|
|
635
|
-
const
|
|
636
|
-
...
|
|
637
|
-
name:
|
|
641
|
+
const _t = [...s].map((ut) => ut.id === _.id ? {
|
|
642
|
+
..._,
|
|
643
|
+
name: {
|
|
644
|
+
"en-US": A
|
|
645
|
+
}
|
|
638
646
|
} : ut);
|
|
639
|
-
|
|
647
|
+
n([..._t]);
|
|
640
648
|
},
|
|
641
|
-
value:
|
|
642
|
-
placeholder:
|
|
649
|
+
value: _.name["en-US"],
|
|
650
|
+
placeholder: f
|
|
643
651
|
}
|
|
644
652
|
),
|
|
645
|
-
|
|
653
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
646
654
|
ft,
|
|
647
655
|
{
|
|
648
656
|
onChange: (A) => {
|
|
649
|
-
const
|
|
650
|
-
...
|
|
657
|
+
const _t = [...s].map((ut) => ut.id === _.id ? {
|
|
658
|
+
..._,
|
|
651
659
|
images: A
|
|
652
660
|
} : ut);
|
|
653
|
-
|
|
661
|
+
n([..._t]);
|
|
654
662
|
},
|
|
655
|
-
activeImage: (
|
|
663
|
+
activeImage: (U = s.find((A) => A.id === _.id)) != null && U.images ? (Y = s.find((A) => A.id === _.id)) == null ? void 0 : Y.images[0] : void 0
|
|
656
664
|
}
|
|
657
665
|
),
|
|
658
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
659
|
-
|
|
660
|
-
|
|
666
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
667
|
+
i && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
668
|
+
b,
|
|
661
669
|
{
|
|
662
670
|
name: "Sliders",
|
|
663
671
|
hoverable: !0,
|
|
664
672
|
width: 20,
|
|
665
673
|
height: 20,
|
|
666
|
-
onClick: (A) => Z(A,
|
|
674
|
+
onClick: (A) => Z(A, _)
|
|
667
675
|
}
|
|
668
676
|
) }),
|
|
669
|
-
h && /* @__PURE__ */ t.jsx("div", { className:
|
|
670
|
-
|
|
677
|
+
h && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
678
|
+
b,
|
|
671
679
|
{
|
|
672
680
|
name: "Trash",
|
|
673
681
|
hoverable: !0,
|
|
674
682
|
width: 20,
|
|
675
683
|
height: 20,
|
|
676
684
|
fill: "#C12A2A",
|
|
677
|
-
onClick: () =>
|
|
685
|
+
onClick: () => n(s.filter((A) => A.id !== _.id))
|
|
678
686
|
}
|
|
679
687
|
) })
|
|
680
688
|
] })
|
|
681
689
|
] });
|
|
682
|
-
return
|
|
690
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
683
691
|
Ve,
|
|
684
692
|
{
|
|
685
|
-
product:
|
|
693
|
+
product: _,
|
|
686
694
|
index: k,
|
|
687
|
-
children:
|
|
695
|
+
children: T
|
|
688
696
|
},
|
|
689
|
-
|
|
697
|
+
_.id
|
|
690
698
|
) : /* @__PURE__ */ t.jsx(
|
|
691
699
|
"div",
|
|
692
700
|
{
|
|
693
|
-
className:
|
|
694
|
-
children:
|
|
701
|
+
className: H.product,
|
|
702
|
+
children: T
|
|
695
703
|
},
|
|
696
|
-
|
|
704
|
+
_.id
|
|
697
705
|
);
|
|
698
706
|
};
|
|
699
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
700
|
-
(
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
707
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
|
|
708
|
+
(r || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
709
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: r }),
|
|
710
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
711
|
+
et,
|
|
704
712
|
{
|
|
705
|
-
current:
|
|
706
|
-
onChange: (
|
|
713
|
+
current: a,
|
|
714
|
+
onChange: (_) => e == null ? void 0 : e(_)
|
|
707
715
|
}
|
|
708
716
|
)
|
|
709
717
|
] }),
|
|
710
|
-
|
|
711
|
-
|
|
718
|
+
R && i && I && X && /* @__PURE__ */ t.jsx(
|
|
719
|
+
Le,
|
|
712
720
|
{
|
|
713
|
-
ref:
|
|
714
|
-
activeItem:
|
|
715
|
-
setActiveItem:
|
|
716
|
-
popupPosition:
|
|
721
|
+
ref: B,
|
|
722
|
+
activeItem: R,
|
|
723
|
+
setActiveItem: C,
|
|
724
|
+
popupPosition: P,
|
|
717
725
|
modalOptions: I,
|
|
718
726
|
setIsOpenModal: O
|
|
719
727
|
}
|
|
720
728
|
),
|
|
721
|
-
|
|
722
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
723
|
-
|
|
724
|
-
|
|
729
|
+
S && D && /* @__PURE__ */ t.jsx(Ot, { ...D }),
|
|
730
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
731
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
|
|
732
|
+
l ? /* @__PURE__ */ t.jsx(
|
|
725
733
|
wt,
|
|
726
734
|
{
|
|
727
|
-
sensors:
|
|
728
|
-
onDragEnd:
|
|
735
|
+
sensors: L,
|
|
736
|
+
onDragEnd: v,
|
|
729
737
|
children: /* @__PURE__ */ t.jsx(
|
|
730
|
-
|
|
738
|
+
St,
|
|
731
739
|
{
|
|
732
|
-
items: s.map((
|
|
733
|
-
strategy:
|
|
734
|
-
children: s.map((
|
|
740
|
+
items: s.map((_) => _.id),
|
|
741
|
+
strategy: Ct,
|
|
742
|
+
children: s.map((_, k) => q(_, k))
|
|
735
743
|
}
|
|
736
744
|
)
|
|
737
745
|
}
|
|
738
|
-
) : s.map((
|
|
746
|
+
) : s.map((_, k) => q(_, k)),
|
|
739
747
|
p && /* @__PURE__ */ t.jsx(
|
|
740
748
|
"div",
|
|
741
749
|
{
|
|
@@ -748,42 +756,46 @@ const Ue = (d) => {
|
|
|
748
756
|
lt,
|
|
749
757
|
{
|
|
750
758
|
withoutHover: !0,
|
|
751
|
-
className:
|
|
752
|
-
[
|
|
759
|
+
className: V(H.button, {
|
|
760
|
+
[H.disabled]: !!(w && w <= s.length || s.length === (u == null ? void 0 : u.length))
|
|
753
761
|
}),
|
|
754
762
|
size: "s",
|
|
755
|
-
disabled: !!(
|
|
763
|
+
disabled: !!(w && w <= s.length || s.length === (u == null ? void 0 : u.length)),
|
|
756
764
|
onClick: () => {
|
|
757
|
-
const
|
|
765
|
+
const _ = [...s];
|
|
758
766
|
let k = null;
|
|
759
767
|
if (u) {
|
|
760
|
-
for (let
|
|
761
|
-
if (!s.find((
|
|
762
|
-
k = u[
|
|
768
|
+
for (let T = 0; T < u.length; T++)
|
|
769
|
+
if (!s.find((U) => U.id === u[T].id)) {
|
|
770
|
+
k = u[T];
|
|
763
771
|
break;
|
|
764
772
|
}
|
|
765
773
|
}
|
|
766
|
-
|
|
774
|
+
m === "select" && u ? _.push({
|
|
767
775
|
name: k ? k.name : u[0].name,
|
|
768
776
|
id: (k == null ? void 0 : k.id) || u[0].id,
|
|
769
|
-
...
|
|
770
|
-
}) :
|
|
771
|
-
name:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
...g
|
|
778
|
+
}) : m === "input" ? _.push({
|
|
779
|
+
name: {
|
|
780
|
+
"en-US": ""
|
|
781
|
+
},
|
|
782
|
+
id: mt(),
|
|
783
|
+
...g
|
|
784
|
+
}) : _.push({
|
|
785
|
+
name: {
|
|
786
|
+
"en-US": `Image ${s.length + 1}`
|
|
787
|
+
},
|
|
788
|
+
id: mt(),
|
|
789
|
+
...g
|
|
790
|
+
}), n(_);
|
|
779
791
|
},
|
|
780
792
|
style: {
|
|
781
793
|
width: "fit-content"
|
|
782
794
|
},
|
|
783
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
795
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
|
|
784
796
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
785
797
|
/* @__PURE__ */ t.jsx(
|
|
786
|
-
|
|
798
|
+
b,
|
|
787
799
|
{
|
|
788
800
|
name: "Plus",
|
|
789
801
|
width: 16,
|
|
@@ -796,14 +808,14 @@ const Ue = (d) => {
|
|
|
796
808
|
}
|
|
797
809
|
)
|
|
798
810
|
] }),
|
|
799
|
-
|
|
800
|
-
|
|
811
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c }),
|
|
812
|
+
E !== void 0 && /* @__PURE__ */ t.jsx(
|
|
801
813
|
K,
|
|
802
814
|
{
|
|
803
815
|
label: "Auto scroll interval",
|
|
804
816
|
type: "number",
|
|
805
|
-
value: String(
|
|
806
|
-
onChange: (
|
|
817
|
+
value: String(E.scrollInterval),
|
|
818
|
+
onChange: (_) => E.setScrollInterval(Number(_)),
|
|
807
819
|
min: 0.1,
|
|
808
820
|
max: 100,
|
|
809
821
|
style: {
|
|
@@ -813,61 +825,61 @@ const Ue = (d) => {
|
|
|
813
825
|
}
|
|
814
826
|
)
|
|
815
827
|
] });
|
|
816
|
-
},
|
|
817
|
-
title:
|
|
818
|
-
subtitle:
|
|
819
|
-
header:
|
|
820
|
-
text:
|
|
821
|
-
productsBlock:
|
|
822
|
-
top:
|
|
823
|
-
itemsBlock:
|
|
824
|
-
typeTexts:
|
|
825
|
-
block:
|
|
826
|
-
active:
|
|
827
|
-
products:
|
|
828
|
-
product:
|
|
829
|
-
button:
|
|
830
|
-
disabled:
|
|
831
|
-
image:
|
|
832
|
-
info:
|
|
833
|
-
name:
|
|
834
|
-
buttons:
|
|
835
|
-
modal:
|
|
836
|
-
link:
|
|
828
|
+
}, Ge = "_title_82zux_1", Xe = "_subtitle_82zux_5", We = "_header_82zux_12", Je = "_text_82zux_13", Qe = "_productsBlock_82zux_14", Ke = "_top_82zux_26", Ze = "_itemsBlock_82zux_35", ts = "_typeTexts_82zux_41", es = "_block_82zux_48", ss = "_active_82zux_61", ns = "_products_82zux_14", is = "_product_82zux_14", os = "_button_82zux_80", as = "_disabled_82zux_91", cs = "_image_82zux_95", ls = "_info_82zux_102", rs = "_name_82zux_114", ds = "_buttons_82zux_118", us = "_modal_82zux_125", _s = "_link_82zux_145", ms = "_modalOptions_82zux_151", hs = "_addButton_82zux_157", ps = "_deleteButton_82zux_179", Q = {
|
|
829
|
+
title: Ge,
|
|
830
|
+
subtitle: Xe,
|
|
831
|
+
header: We,
|
|
832
|
+
text: Je,
|
|
833
|
+
productsBlock: Qe,
|
|
834
|
+
top: Ke,
|
|
835
|
+
itemsBlock: Ze,
|
|
836
|
+
typeTexts: ts,
|
|
837
|
+
block: es,
|
|
838
|
+
active: ss,
|
|
839
|
+
products: ns,
|
|
840
|
+
product: is,
|
|
841
|
+
button: os,
|
|
842
|
+
disabled: as,
|
|
843
|
+
image: cs,
|
|
844
|
+
info: ls,
|
|
845
|
+
name: rs,
|
|
846
|
+
buttons: ds,
|
|
847
|
+
modal: us,
|
|
848
|
+
link: _s,
|
|
837
849
|
modalOptions: ms,
|
|
838
|
-
addButton:
|
|
839
|
-
deleteButton:
|
|
840
|
-
},
|
|
850
|
+
addButton: hs,
|
|
851
|
+
deleteButton: ps
|
|
852
|
+
}, Ia = (d) => {
|
|
841
853
|
const {
|
|
842
|
-
isActiveItems:
|
|
854
|
+
isActiveItems: a,
|
|
843
855
|
setIsActiveItems: e,
|
|
844
856
|
items: s,
|
|
845
|
-
setItems:
|
|
846
|
-
other:
|
|
847
|
-
title:
|
|
848
|
-
subtitle:
|
|
849
|
-
draggable:
|
|
850
|
-
withImage:
|
|
851
|
-
addable:
|
|
857
|
+
setItems: n,
|
|
858
|
+
other: c,
|
|
859
|
+
title: r,
|
|
860
|
+
subtitle: o,
|
|
861
|
+
draggable: i = !1,
|
|
862
|
+
withImage: l = !1,
|
|
863
|
+
addable: j = !0,
|
|
852
864
|
itemsOptions: h,
|
|
853
865
|
hasRangeSelector: p = !1,
|
|
854
|
-
rangeSelectorOptions:
|
|
855
|
-
limit:
|
|
866
|
+
rangeSelectorOptions: m,
|
|
867
|
+
limit: f,
|
|
856
868
|
autoScrollInterval: u,
|
|
857
|
-
deletable:
|
|
869
|
+
deletable: S
|
|
858
870
|
} = d;
|
|
859
|
-
function
|
|
860
|
-
if (
|
|
861
|
-
return
|
|
871
|
+
function D(g) {
|
|
872
|
+
if (l)
|
|
873
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
862
874
|
"img",
|
|
863
875
|
{
|
|
864
|
-
src: `https://imagedelivery.net/${
|
|
876
|
+
src: `https://imagedelivery.net/${g[0]}/w=1000`,
|
|
865
877
|
alt: "image",
|
|
866
878
|
width: 16,
|
|
867
879
|
height: 16
|
|
868
880
|
}
|
|
869
881
|
) : /* @__PURE__ */ t.jsx(
|
|
870
|
-
|
|
882
|
+
b,
|
|
871
883
|
{
|
|
872
884
|
name: "Image",
|
|
873
885
|
width: 16,
|
|
@@ -876,12 +888,12 @@ const Ue = (d) => {
|
|
|
876
888
|
}
|
|
877
889
|
);
|
|
878
890
|
}
|
|
879
|
-
const I = (
|
|
880
|
-
const
|
|
881
|
-
if (!
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
|
|
891
|
+
const I = (g, w = !1) => {
|
|
892
|
+
const E = h.find((C) => C.id === g);
|
|
893
|
+
if (!E) return;
|
|
894
|
+
const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
895
|
+
i && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
896
|
+
b,
|
|
885
897
|
{
|
|
886
898
|
name: "DotsSixVertical",
|
|
887
899
|
hoverable: !0,
|
|
@@ -890,28 +902,28 @@ const Ue = (d) => {
|
|
|
890
902
|
}
|
|
891
903
|
) }),
|
|
892
904
|
/* @__PURE__ */ t.jsx(
|
|
893
|
-
|
|
905
|
+
tt,
|
|
894
906
|
{
|
|
895
|
-
onChange: (
|
|
896
|
-
const
|
|
897
|
-
if (!
|
|
898
|
-
const y =
|
|
899
|
-
|
|
907
|
+
onChange: (C) => {
|
|
908
|
+
const P = [...s], st = h.find((B) => B.name === C);
|
|
909
|
+
if (!st) return;
|
|
910
|
+
const y = st.id, M = P.map((B) => B === g ? y : B);
|
|
911
|
+
n([...M]);
|
|
900
912
|
},
|
|
901
|
-
value:
|
|
902
|
-
options: h.filter((
|
|
903
|
-
leftAddon:
|
|
913
|
+
value: E.name,
|
|
914
|
+
options: h.filter((C) => !s.find((P) => P === C.id)).map((C) => C.name),
|
|
915
|
+
leftAddon: D(E.images)
|
|
904
916
|
}
|
|
905
917
|
),
|
|
906
|
-
|
|
907
|
-
|
|
918
|
+
w && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
919
|
+
b,
|
|
908
920
|
{
|
|
909
921
|
name: "Trash",
|
|
910
922
|
hoverable: !0,
|
|
911
923
|
width: 20,
|
|
912
924
|
height: 20,
|
|
913
925
|
fill: "#C12A2A",
|
|
914
|
-
onClick: () =>
|
|
926
|
+
onClick: () => n(s.filter((C) => C !== g))
|
|
915
927
|
}
|
|
916
928
|
) }) })
|
|
917
929
|
] });
|
|
@@ -919,27 +931,27 @@ const Ue = (d) => {
|
|
|
919
931
|
"div",
|
|
920
932
|
{
|
|
921
933
|
className: Q.product,
|
|
922
|
-
children:
|
|
934
|
+
children: R
|
|
923
935
|
},
|
|
924
|
-
|
|
936
|
+
g
|
|
925
937
|
);
|
|
926
938
|
};
|
|
927
939
|
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
928
|
-
(
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
940
|
+
(r || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
941
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: r }),
|
|
942
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
943
|
+
et,
|
|
932
944
|
{
|
|
933
|
-
current:
|
|
934
|
-
onChange: (
|
|
945
|
+
current: a,
|
|
946
|
+
onChange: (g) => e == null ? void 0 : e(g)
|
|
935
947
|
}
|
|
936
948
|
)
|
|
937
949
|
] }),
|
|
938
|
-
p &&
|
|
950
|
+
p && m && /* @__PURE__ */ t.jsx(Ot, { ...m }),
|
|
939
951
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
940
|
-
|
|
941
|
-
s.map((
|
|
942
|
-
|
|
952
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: o }),
|
|
953
|
+
s.map((g) => I(g, S)),
|
|
954
|
+
j && /* @__PURE__ */ t.jsx(
|
|
943
955
|
"div",
|
|
944
956
|
{
|
|
945
957
|
style: {
|
|
@@ -952,22 +964,22 @@ const Ue = (d) => {
|
|
|
952
964
|
lt,
|
|
953
965
|
{
|
|
954
966
|
withoutHover: !0,
|
|
955
|
-
className:
|
|
956
|
-
[Q.disabled]: !!(
|
|
967
|
+
className: V(Q.button, {
|
|
968
|
+
[Q.disabled]: !!(f && f <= s.length || s.length === h.length)
|
|
957
969
|
}),
|
|
958
970
|
size: "s",
|
|
959
|
-
disabled: !!(
|
|
971
|
+
disabled: !!(f && f <= s.length || s.length === h.length),
|
|
960
972
|
onClick: () => {
|
|
961
|
-
const
|
|
962
|
-
let
|
|
973
|
+
const g = [...s];
|
|
974
|
+
let w = null;
|
|
963
975
|
if (h) {
|
|
964
|
-
for (let
|
|
965
|
-
if (!s.find((
|
|
966
|
-
|
|
976
|
+
for (let E = 0; E < h.length; E++)
|
|
977
|
+
if (!s.find((R) => R === h[E].id)) {
|
|
978
|
+
w = h[E];
|
|
967
979
|
break;
|
|
968
980
|
}
|
|
969
981
|
}
|
|
970
|
-
|
|
982
|
+
g.push((w == null ? void 0 : w.id) || h[0].id), n(g);
|
|
971
983
|
},
|
|
972
984
|
style: {
|
|
973
985
|
width: "fit-content"
|
|
@@ -975,7 +987,7 @@ const Ue = (d) => {
|
|
|
975
987
|
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
976
988
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
977
989
|
/* @__PURE__ */ t.jsx(
|
|
978
|
-
|
|
990
|
+
b,
|
|
979
991
|
{
|
|
980
992
|
name: "Plus",
|
|
981
993
|
width: 16,
|
|
@@ -988,14 +1000,14 @@ const Ue = (d) => {
|
|
|
988
1000
|
}
|
|
989
1001
|
)
|
|
990
1002
|
] }),
|
|
991
|
-
|
|
1003
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c }),
|
|
992
1004
|
u !== void 0 && /* @__PURE__ */ t.jsx(
|
|
993
1005
|
K,
|
|
994
1006
|
{
|
|
995
1007
|
label: "Auto scroll interval",
|
|
996
1008
|
type: "number",
|
|
997
1009
|
value: String(u.scrollInterval),
|
|
998
|
-
onChange: (
|
|
1010
|
+
onChange: (g) => u.setScrollInterval(Number(g)),
|
|
999
1011
|
min: 0.1,
|
|
1000
1012
|
max: 100,
|
|
1001
1013
|
style: {
|
|
@@ -1005,176 +1017,175 @@ const Ue = (d) => {
|
|
|
1005
1017
|
}
|
|
1006
1018
|
)
|
|
1007
1019
|
] });
|
|
1008
|
-
},
|
|
1009
|
-
title:
|
|
1010
|
-
subtitle:
|
|
1011
|
-
header:
|
|
1012
|
-
text:
|
|
1013
|
-
productsBlock:
|
|
1014
|
-
top:
|
|
1015
|
-
itemsBlock:
|
|
1016
|
-
typeTexts:
|
|
1017
|
-
block:
|
|
1018
|
-
active:
|
|
1019
|
-
products:
|
|
1020
|
-
product:
|
|
1021
|
-
button:
|
|
1020
|
+
}, xs = "_title_1vfw9_1", gs = "_subtitle_1vfw9_5", fs = "_header_1vfw9_12", bs = "_text_1vfw9_13", vs = "_productsBlock_1vfw9_14", js = "_top_1vfw9_26", ys = "_itemsBlock_1vfw9_35", ks = "_typeTexts_1vfw9_41", Is = "_block_1vfw9_48", $s = "_active_1vfw9_61", Ns = "_products_1vfw9_14", ws = "_product_1vfw9_14", Ss = "_button_1vfw9_80", Cs = "_disabled_1vfw9_91", Bs = "_image_1vfw9_95", Ts = "_info_1vfw9_102", Ps = "_name_1vfw9_114", As = "_buttons_1vfw9_118", Ms = "_modal_1vfw9_125", Os = "_link_1vfw9_145", qs = "_modalOptions_1vfw9_151", Es = "_addButton_1vfw9_164", Us = "_deleteButton_1vfw9_179", Ds = "_closeIcon_1vfw9_191", z = {
|
|
1021
|
+
title: xs,
|
|
1022
|
+
subtitle: gs,
|
|
1023
|
+
header: fs,
|
|
1024
|
+
text: bs,
|
|
1025
|
+
productsBlock: vs,
|
|
1026
|
+
top: js,
|
|
1027
|
+
itemsBlock: ys,
|
|
1028
|
+
typeTexts: ks,
|
|
1029
|
+
block: Is,
|
|
1030
|
+
active: $s,
|
|
1031
|
+
products: Ns,
|
|
1032
|
+
product: ws,
|
|
1033
|
+
button: Ss,
|
|
1022
1034
|
disabled: Cs,
|
|
1023
1035
|
image: Bs,
|
|
1024
|
-
info:
|
|
1025
|
-
name:
|
|
1026
|
-
buttons:
|
|
1027
|
-
modal:
|
|
1028
|
-
link:
|
|
1029
|
-
modalOptions:
|
|
1030
|
-
addButton:
|
|
1031
|
-
deleteButton:
|
|
1036
|
+
info: Ts,
|
|
1037
|
+
name: Ps,
|
|
1038
|
+
buttons: As,
|
|
1039
|
+
modal: Ms,
|
|
1040
|
+
link: Os,
|
|
1041
|
+
modalOptions: qs,
|
|
1042
|
+
addButton: Es,
|
|
1043
|
+
deleteButton: Us,
|
|
1032
1044
|
closeIcon: Ds
|
|
1033
|
-
},
|
|
1034
|
-
(d,
|
|
1035
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
1036
|
-
function r(n, c) {
|
|
1037
|
-
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1038
|
-
}
|
|
1045
|
+
}, Hs = x.forwardRef(
|
|
1046
|
+
(d, a) => {
|
|
1047
|
+
const { activeItem: e, setActiveItem: s, popupPosition: n, modalOptions: c, setIsOpenModal: r } = d;
|
|
1039
1048
|
return /* @__PURE__ */ t.jsxs(
|
|
1040
1049
|
"div",
|
|
1041
1050
|
{
|
|
1042
|
-
ref:
|
|
1043
|
-
className:
|
|
1044
|
-
onClick: (
|
|
1045
|
-
|
|
1051
|
+
ref: a,
|
|
1052
|
+
className: z.modal,
|
|
1053
|
+
onClick: (o) => {
|
|
1054
|
+
o.stopPropagation();
|
|
1046
1055
|
},
|
|
1047
1056
|
style: {
|
|
1048
|
-
top: `${
|
|
1049
|
-
left: `${
|
|
1057
|
+
top: `${n.top}px`,
|
|
1058
|
+
left: `${n.left}px`
|
|
1050
1059
|
},
|
|
1051
1060
|
children: [
|
|
1052
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1053
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1054
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1055
|
-
|
|
1061
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
1062
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: e.name["en-US"] }),
|
|
1063
|
+
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1064
|
+
b,
|
|
1056
1065
|
{
|
|
1057
1066
|
name: "X",
|
|
1058
1067
|
height: 20,
|
|
1059
1068
|
width: 20,
|
|
1060
1069
|
hoverable: !0,
|
|
1061
1070
|
onClick: () => {
|
|
1062
|
-
s(null),
|
|
1071
|
+
s(null), r(!1);
|
|
1063
1072
|
}
|
|
1064
1073
|
}
|
|
1065
1074
|
) })
|
|
1066
1075
|
] }),
|
|
1067
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1068
|
-
if (
|
|
1076
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((o) => {
|
|
1077
|
+
if (o.type === "image")
|
|
1069
1078
|
return /* @__PURE__ */ t.jsx(
|
|
1070
1079
|
ft,
|
|
1071
1080
|
{
|
|
1072
1081
|
label: "Put up an attractive image",
|
|
1073
|
-
activeImage: e[
|
|
1074
|
-
onChange: (
|
|
1075
|
-
const
|
|
1082
|
+
activeImage: e[o.field],
|
|
1083
|
+
onChange: (i) => {
|
|
1084
|
+
const l = {
|
|
1076
1085
|
...e,
|
|
1077
|
-
[
|
|
1086
|
+
[o.field]: i
|
|
1078
1087
|
};
|
|
1079
|
-
s(
|
|
1088
|
+
s(l);
|
|
1080
1089
|
}
|
|
1081
1090
|
},
|
|
1082
|
-
String(
|
|
1091
|
+
String(o.field)
|
|
1083
1092
|
);
|
|
1084
|
-
if (
|
|
1093
|
+
if (o.type === "text")
|
|
1085
1094
|
return /* @__PURE__ */ t.jsx(
|
|
1086
|
-
|
|
1095
|
+
Lt,
|
|
1087
1096
|
{
|
|
1088
|
-
typesText: e[
|
|
1089
|
-
setTypesText: (
|
|
1090
|
-
const
|
|
1097
|
+
typesText: e[o.field.type],
|
|
1098
|
+
setTypesText: (i) => {
|
|
1099
|
+
const l = {
|
|
1091
1100
|
...e,
|
|
1092
|
-
[
|
|
1101
|
+
[o.field.type]: i
|
|
1093
1102
|
};
|
|
1094
|
-
s(
|
|
1103
|
+
s(l);
|
|
1095
1104
|
},
|
|
1096
|
-
text: e[
|
|
1097
|
-
setText: (
|
|
1098
|
-
const
|
|
1105
|
+
text: e[o.field.text]["en-US"] || "",
|
|
1106
|
+
setText: (i) => {
|
|
1107
|
+
const l = {
|
|
1099
1108
|
...e,
|
|
1100
|
-
[
|
|
1109
|
+
[o.field.text]: {
|
|
1110
|
+
"en-US": i
|
|
1111
|
+
}
|
|
1101
1112
|
};
|
|
1102
|
-
s(
|
|
1113
|
+
s(l);
|
|
1103
1114
|
},
|
|
1104
|
-
typeFont: e[
|
|
1105
|
-
setTypeFont: (
|
|
1106
|
-
const
|
|
1115
|
+
typeFont: e[o.field.type],
|
|
1116
|
+
setTypeFont: (i) => {
|
|
1117
|
+
const l = {
|
|
1107
1118
|
...e,
|
|
1108
|
-
[
|
|
1119
|
+
[o.field.type]: i
|
|
1109
1120
|
};
|
|
1110
|
-
s(
|
|
1121
|
+
s(l);
|
|
1111
1122
|
},
|
|
1112
|
-
subtitle:
|
|
1123
|
+
subtitle: o.label
|
|
1113
1124
|
}
|
|
1114
1125
|
);
|
|
1115
|
-
if (
|
|
1126
|
+
if (o.type === "input")
|
|
1116
1127
|
return /* @__PURE__ */ t.jsx(
|
|
1117
1128
|
K,
|
|
1118
1129
|
{
|
|
1119
|
-
onChange: (
|
|
1120
|
-
const
|
|
1130
|
+
onChange: (i) => {
|
|
1131
|
+
const l = {
|
|
1121
1132
|
...e,
|
|
1122
|
-
[
|
|
1133
|
+
[o.field]: i
|
|
1123
1134
|
};
|
|
1124
|
-
s(
|
|
1135
|
+
s(l);
|
|
1125
1136
|
},
|
|
1126
|
-
value: e[
|
|
1127
|
-
label:
|
|
1128
|
-
placeholder:
|
|
1137
|
+
value: e[o.field] || "",
|
|
1138
|
+
label: o.label,
|
|
1139
|
+
placeholder: o.placeholder
|
|
1129
1140
|
}
|
|
1130
1141
|
);
|
|
1131
|
-
if (
|
|
1132
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1142
|
+
if (o.type === "inputSwitch")
|
|
1143
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
1133
1144
|
/* @__PURE__ */ t.jsx(
|
|
1134
1145
|
K,
|
|
1135
1146
|
{
|
|
1136
|
-
onChange: (
|
|
1137
|
-
const
|
|
1147
|
+
onChange: (i) => {
|
|
1148
|
+
const l = {
|
|
1138
1149
|
...e,
|
|
1139
|
-
[
|
|
1150
|
+
[o.field.text]: i
|
|
1140
1151
|
};
|
|
1141
|
-
s(
|
|
1152
|
+
s(l);
|
|
1142
1153
|
},
|
|
1143
|
-
value: e[
|
|
1144
|
-
label:
|
|
1145
|
-
placeholder:
|
|
1154
|
+
value: e[o.field.text] || "",
|
|
1155
|
+
label: o.inputLabel,
|
|
1156
|
+
placeholder: o.placeholder
|
|
1146
1157
|
}
|
|
1147
1158
|
),
|
|
1148
1159
|
/* @__PURE__ */ t.jsx(
|
|
1149
|
-
|
|
1160
|
+
et,
|
|
1150
1161
|
{
|
|
1151
|
-
current: !!e[
|
|
1152
|
-
label:
|
|
1153
|
-
onChange: (
|
|
1154
|
-
const
|
|
1162
|
+
current: !!e[o.field.switch] || !1,
|
|
1163
|
+
label: o.switchLabel,
|
|
1164
|
+
onChange: (i) => {
|
|
1165
|
+
const l = {
|
|
1155
1166
|
...e,
|
|
1156
|
-
[
|
|
1167
|
+
[o.field.switch]: i
|
|
1157
1168
|
};
|
|
1158
|
-
s(
|
|
1169
|
+
s(l);
|
|
1159
1170
|
}
|
|
1160
1171
|
}
|
|
1161
1172
|
)
|
|
1162
1173
|
] });
|
|
1163
|
-
if (
|
|
1174
|
+
if (o.type === "select")
|
|
1164
1175
|
return /* @__PURE__ */ t.jsx(
|
|
1165
|
-
|
|
1176
|
+
tt,
|
|
1166
1177
|
{
|
|
1167
|
-
options:
|
|
1168
|
-
onChange: (
|
|
1169
|
-
const
|
|
1178
|
+
options: o.itemsOptions,
|
|
1179
|
+
onChange: (i) => {
|
|
1180
|
+
const l = {
|
|
1170
1181
|
...e,
|
|
1171
|
-
[
|
|
1182
|
+
[o.field]: i
|
|
1172
1183
|
};
|
|
1173
|
-
s(
|
|
1184
|
+
s(l);
|
|
1174
1185
|
},
|
|
1175
|
-
label:
|
|
1176
|
-
value: e[
|
|
1177
|
-
leftAddon:
|
|
1186
|
+
label: o.label,
|
|
1187
|
+
value: e[o.field] || "String",
|
|
1188
|
+
leftAddon: o.leftAddon && o.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[o.field] })
|
|
1178
1189
|
}
|
|
1179
1190
|
);
|
|
1180
1191
|
}) })
|
|
@@ -1183,98 +1194,98 @@ const Ue = (d) => {
|
|
|
1183
1194
|
);
|
|
1184
1195
|
}
|
|
1185
1196
|
);
|
|
1186
|
-
function
|
|
1187
|
-
const { product:
|
|
1188
|
-
id:
|
|
1189
|
-
}),
|
|
1190
|
-
transform: Pt.Transform.toString(
|
|
1191
|
-
transition:
|
|
1197
|
+
function Ls(d) {
|
|
1198
|
+
const { product: a, children: e } = d, { attributes: s, listeners: n, setNodeRef: c, transform: r, transition: o, isDragging: i } = Tt({
|
|
1199
|
+
id: a.id
|
|
1200
|
+
}), l = {
|
|
1201
|
+
transform: Pt.Transform.toString(r),
|
|
1202
|
+
transition: o
|
|
1192
1203
|
};
|
|
1193
1204
|
return /* @__PURE__ */ t.jsx(
|
|
1194
1205
|
"div",
|
|
1195
1206
|
{
|
|
1196
|
-
ref:
|
|
1197
|
-
style:
|
|
1198
|
-
className: `${
|
|
1207
|
+
ref: c,
|
|
1208
|
+
style: l,
|
|
1209
|
+
className: `${z.product} ${i ? z.dragging : ""}`,
|
|
1199
1210
|
...s,
|
|
1200
|
-
...
|
|
1211
|
+
...n,
|
|
1201
1212
|
children: e
|
|
1202
1213
|
}
|
|
1203
1214
|
);
|
|
1204
1215
|
}
|
|
1205
|
-
const
|
|
1216
|
+
const $a = (d) => {
|
|
1206
1217
|
const {
|
|
1207
|
-
isActiveItems:
|
|
1218
|
+
isActiveItems: a,
|
|
1208
1219
|
setIsActiveItems: e,
|
|
1209
1220
|
items: s,
|
|
1210
|
-
setItems:
|
|
1211
|
-
other:
|
|
1212
|
-
title:
|
|
1213
|
-
subtitle:
|
|
1214
|
-
editable:
|
|
1215
|
-
draggable:
|
|
1216
|
-
withImage:
|
|
1221
|
+
setItems: n,
|
|
1222
|
+
other: c,
|
|
1223
|
+
title: r,
|
|
1224
|
+
subtitle: o,
|
|
1225
|
+
editable: i = !0,
|
|
1226
|
+
draggable: l = !1,
|
|
1227
|
+
withImage: j = !1,
|
|
1217
1228
|
deletable: h = !0,
|
|
1218
1229
|
addable: p = !0,
|
|
1219
|
-
itemsType:
|
|
1220
|
-
itemsPlaceholder:
|
|
1230
|
+
itemsType: m,
|
|
1231
|
+
itemsPlaceholder: f = "",
|
|
1221
1232
|
itemsOptions: u,
|
|
1222
|
-
hasRangeSelector:
|
|
1223
|
-
rangeSelectorOptions:
|
|
1233
|
+
hasRangeSelector: S = !1,
|
|
1234
|
+
rangeSelectorOptions: D,
|
|
1224
1235
|
modalOptions: I,
|
|
1225
|
-
addableOptions:
|
|
1226
|
-
} = d, [
|
|
1236
|
+
addableOptions: g = {}
|
|
1237
|
+
} = d, [w, E] = x.useState(null), [R, C] = x.useState({
|
|
1227
1238
|
top: 0,
|
|
1228
1239
|
left: 0
|
|
1229
|
-
}), [
|
|
1230
|
-
Nt(
|
|
1240
|
+
}), [P, st] = x.useState(null), y = x.useRef(null), [M, B] = x.useState(!1), X = $t(
|
|
1241
|
+
Nt(Bt, {
|
|
1231
1242
|
activationConstraint: {
|
|
1232
1243
|
distance: 5
|
|
1233
1244
|
}
|
|
1234
1245
|
})
|
|
1235
1246
|
);
|
|
1236
|
-
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1247
|
+
x.useEffect(() => {
|
|
1248
|
+
const v = () => {
|
|
1249
|
+
E(null), B(!1);
|
|
1239
1250
|
};
|
|
1240
|
-
return document.body.addEventListener("click",
|
|
1241
|
-
|
|
1251
|
+
return document.body.addEventListener("click", v), E(null), B(!1), () => {
|
|
1252
|
+
E(null), B(!1), document.body.removeEventListener("click", v);
|
|
1242
1253
|
};
|
|
1243
|
-
}, []),
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1254
|
+
}, []), x.useEffect(() => {
|
|
1255
|
+
if (w) {
|
|
1256
|
+
const v = [...s].map((q) => q.id === w.id ? w : q);
|
|
1257
|
+
n(v);
|
|
1247
1258
|
}
|
|
1248
|
-
}, [
|
|
1249
|
-
if (y.current &&
|
|
1250
|
-
const
|
|
1251
|
-
let
|
|
1252
|
-
|
|
1253
|
-
top:
|
|
1254
|
-
left:
|
|
1259
|
+
}, [w]), x.useEffect(() => {
|
|
1260
|
+
if (y.current && P) {
|
|
1261
|
+
const v = y.current.getBoundingClientRect().height, q = window.innerHeight;
|
|
1262
|
+
let _ = P.top;
|
|
1263
|
+
_ + v > q + window.scrollY - 200 && (_ = q + window.scrollY - v - 200), _ < 0 && (_ = 10), C({
|
|
1264
|
+
top: _,
|
|
1265
|
+
left: P.left
|
|
1255
1266
|
});
|
|
1256
1267
|
}
|
|
1257
|
-
}, [y.current,
|
|
1258
|
-
const O = (
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
top:
|
|
1263
|
-
left:
|
|
1264
|
-
}),
|
|
1268
|
+
}, [y.current, P]);
|
|
1269
|
+
const O = (v, q) => {
|
|
1270
|
+
v.stopPropagation();
|
|
1271
|
+
const _ = v.target.getBoundingClientRect();
|
|
1272
|
+
st({
|
|
1273
|
+
top: _.top + window.scrollY,
|
|
1274
|
+
left: _.left - 30
|
|
1275
|
+
}), E(q), B(!0);
|
|
1265
1276
|
};
|
|
1266
|
-
function
|
|
1267
|
-
if (
|
|
1268
|
-
return
|
|
1277
|
+
function L(v) {
|
|
1278
|
+
if (j)
|
|
1279
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
1269
1280
|
"img",
|
|
1270
1281
|
{
|
|
1271
|
-
src: `https://imagedelivery.net/${
|
|
1282
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
1272
1283
|
alt: "image",
|
|
1273
1284
|
width: 16,
|
|
1274
1285
|
height: 16
|
|
1275
1286
|
}
|
|
1276
1287
|
) : /* @__PURE__ */ t.jsx(
|
|
1277
|
-
|
|
1288
|
+
b,
|
|
1278
1289
|
{
|
|
1279
1290
|
name: "Image",
|
|
1280
1291
|
width: 16,
|
|
@@ -1283,20 +1294,20 @@ const ja = (d) => {
|
|
|
1283
1294
|
}
|
|
1284
1295
|
);
|
|
1285
1296
|
}
|
|
1286
|
-
const Z = (
|
|
1287
|
-
const { active: q, over:
|
|
1288
|
-
if (
|
|
1289
|
-
const k = s.findIndex((
|
|
1290
|
-
if (k !== -1 &&
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1297
|
+
const Z = (v) => {
|
|
1298
|
+
const { active: q, over: _ } = v;
|
|
1299
|
+
if (_ && q.id !== _.id) {
|
|
1300
|
+
const k = s.findIndex((U) => U.id === q.id), T = s.findIndex((U) => U.id === _.id);
|
|
1301
|
+
if (k !== -1 && T !== -1) {
|
|
1302
|
+
const U = [...s], [Y] = U.splice(k, 1);
|
|
1303
|
+
U.splice(T, 0, Y), n(U);
|
|
1293
1304
|
}
|
|
1294
1305
|
}
|
|
1295
|
-
}, rt = (
|
|
1296
|
-
var
|
|
1306
|
+
}, rt = (v) => {
|
|
1307
|
+
var _;
|
|
1297
1308
|
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1298
|
-
|
|
1299
|
-
|
|
1309
|
+
l && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1310
|
+
b,
|
|
1300
1311
|
{
|
|
1301
1312
|
name: "DotsSixVertical",
|
|
1302
1313
|
hoverable: !0,
|
|
@@ -1304,131 +1315,139 @@ const ja = (d) => {
|
|
|
1304
1315
|
height: 20
|
|
1305
1316
|
}
|
|
1306
1317
|
) }),
|
|
1307
|
-
|
|
1308
|
-
|
|
1318
|
+
m === "select" && u && /* @__PURE__ */ t.jsx(
|
|
1319
|
+
tt,
|
|
1309
1320
|
{
|
|
1310
1321
|
onChange: (k) => {
|
|
1311
|
-
const
|
|
1312
|
-
...
|
|
1313
|
-
name:
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1322
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1323
|
+
...v,
|
|
1324
|
+
name: {
|
|
1325
|
+
"en-US": k
|
|
1326
|
+
}
|
|
1327
|
+
} : Y);
|
|
1328
|
+
E({
|
|
1329
|
+
...v,
|
|
1330
|
+
name: {
|
|
1331
|
+
"en-US": k
|
|
1332
|
+
}
|
|
1333
|
+
}), n([...U]);
|
|
1319
1334
|
},
|
|
1320
|
-
value:
|
|
1321
|
-
options: u.filter(
|
|
1322
|
-
|
|
1335
|
+
value: v.name["en-US"],
|
|
1336
|
+
options: u.filter(
|
|
1337
|
+
(k) => !s.find((T) => T.name["en-US"] === k)
|
|
1338
|
+
),
|
|
1339
|
+
leftAddon: L(v.images)
|
|
1323
1340
|
}
|
|
1324
1341
|
),
|
|
1325
|
-
|
|
1342
|
+
m === "input" && /* @__PURE__ */ t.jsx(
|
|
1326
1343
|
K,
|
|
1327
1344
|
{
|
|
1328
1345
|
onChange: (k) => {
|
|
1329
|
-
const
|
|
1330
|
-
...
|
|
1331
|
-
name:
|
|
1332
|
-
|
|
1333
|
-
|
|
1346
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1347
|
+
...v,
|
|
1348
|
+
name: {
|
|
1349
|
+
"en-US": k
|
|
1350
|
+
}
|
|
1351
|
+
} : Y);
|
|
1352
|
+
n([...U]);
|
|
1334
1353
|
},
|
|
1335
|
-
value:
|
|
1336
|
-
placeholder:
|
|
1354
|
+
value: v.name["en-US"],
|
|
1355
|
+
placeholder: f
|
|
1337
1356
|
}
|
|
1338
1357
|
),
|
|
1339
|
-
|
|
1358
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
1340
1359
|
ft,
|
|
1341
1360
|
{
|
|
1342
1361
|
onChange: (k) => {
|
|
1343
|
-
const
|
|
1344
|
-
...
|
|
1362
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1363
|
+
...v,
|
|
1345
1364
|
images: k
|
|
1346
|
-
} :
|
|
1347
|
-
|
|
1365
|
+
} : Y);
|
|
1366
|
+
n([...U]);
|
|
1348
1367
|
},
|
|
1349
|
-
activeImage: (
|
|
1368
|
+
activeImage: (_ = s.find((k) => k.id === v.id)) == null ? void 0 : _.images[0]
|
|
1350
1369
|
}
|
|
1351
1370
|
),
|
|
1352
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1353
|
-
|
|
1354
|
-
|
|
1371
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
1372
|
+
i && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1373
|
+
b,
|
|
1355
1374
|
{
|
|
1356
1375
|
name: "Sliders",
|
|
1357
1376
|
hoverable: !0,
|
|
1358
1377
|
width: 20,
|
|
1359
1378
|
height: 20,
|
|
1360
|
-
onClick: (k) => O(k,
|
|
1379
|
+
onClick: (k) => O(k, v)
|
|
1361
1380
|
}
|
|
1362
1381
|
) }),
|
|
1363
|
-
h && /* @__PURE__ */ t.jsx("div", { className:
|
|
1364
|
-
|
|
1382
|
+
h && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1383
|
+
b,
|
|
1365
1384
|
{
|
|
1366
1385
|
name: "Trash",
|
|
1367
1386
|
hoverable: !0,
|
|
1368
1387
|
width: 20,
|
|
1369
1388
|
height: 20,
|
|
1370
1389
|
fill: "#C12A2A",
|
|
1371
|
-
onClick: () =>
|
|
1390
|
+
onClick: () => n(s.filter((k) => k.id !== v.id))
|
|
1372
1391
|
}
|
|
1373
1392
|
) })
|
|
1374
1393
|
] })
|
|
1375
1394
|
] });
|
|
1376
|
-
return
|
|
1377
|
-
|
|
1395
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
1396
|
+
Ls,
|
|
1378
1397
|
{
|
|
1379
|
-
product:
|
|
1398
|
+
product: v,
|
|
1380
1399
|
children: q
|
|
1381
1400
|
},
|
|
1382
|
-
|
|
1401
|
+
v.id
|
|
1383
1402
|
) : /* @__PURE__ */ t.jsx(
|
|
1384
1403
|
"div",
|
|
1385
1404
|
{
|
|
1386
|
-
className:
|
|
1405
|
+
className: z.product,
|
|
1387
1406
|
children: q
|
|
1388
1407
|
},
|
|
1389
|
-
|
|
1408
|
+
v.id
|
|
1390
1409
|
);
|
|
1391
1410
|
};
|
|
1392
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1393
|
-
(
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1411
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
1412
|
+
(r || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
1413
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: r }),
|
|
1414
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1415
|
+
et,
|
|
1397
1416
|
{
|
|
1398
|
-
current:
|
|
1399
|
-
onChange: (
|
|
1417
|
+
current: a,
|
|
1418
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
1400
1419
|
}
|
|
1401
1420
|
)
|
|
1402
1421
|
] }),
|
|
1403
|
-
|
|
1404
|
-
|
|
1422
|
+
w && i && I && M && /* @__PURE__ */ t.jsx(
|
|
1423
|
+
Hs,
|
|
1405
1424
|
{
|
|
1406
1425
|
ref: y,
|
|
1407
|
-
activeItem:
|
|
1408
|
-
setActiveItem:
|
|
1409
|
-
popupPosition:
|
|
1426
|
+
activeItem: w,
|
|
1427
|
+
setActiveItem: E,
|
|
1428
|
+
popupPosition: R,
|
|
1410
1429
|
modalOptions: I,
|
|
1411
|
-
setIsOpenModal:
|
|
1430
|
+
setIsOpenModal: B
|
|
1412
1431
|
}
|
|
1413
1432
|
),
|
|
1414
|
-
|
|
1415
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1416
|
-
|
|
1417
|
-
|
|
1433
|
+
S && D && /* @__PURE__ */ t.jsx(Ot, { ...D }),
|
|
1434
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
1435
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
1436
|
+
l ? /* @__PURE__ */ t.jsx(
|
|
1418
1437
|
wt,
|
|
1419
1438
|
{
|
|
1420
|
-
sensors:
|
|
1439
|
+
sensors: X,
|
|
1421
1440
|
onDragEnd: Z,
|
|
1422
1441
|
children: /* @__PURE__ */ t.jsx(
|
|
1423
|
-
|
|
1442
|
+
St,
|
|
1424
1443
|
{
|
|
1425
|
-
items: s.map((
|
|
1426
|
-
strategy:
|
|
1427
|
-
children: s.map((
|
|
1444
|
+
items: s.map((v) => v.id),
|
|
1445
|
+
strategy: Ct,
|
|
1446
|
+
children: s.map((v) => rt(v))
|
|
1428
1447
|
}
|
|
1429
1448
|
)
|
|
1430
1449
|
}
|
|
1431
|
-
) : s.map((
|
|
1450
|
+
) : s.map((v) => rt(v)),
|
|
1432
1451
|
p && /* @__PURE__ */ t.jsx(
|
|
1433
1452
|
"div",
|
|
1434
1453
|
{
|
|
@@ -1441,43 +1460,49 @@ const ja = (d) => {
|
|
|
1441
1460
|
lt,
|
|
1442
1461
|
{
|
|
1443
1462
|
withoutHover: !0,
|
|
1444
|
-
className:
|
|
1463
|
+
className: z.button,
|
|
1445
1464
|
size: "s",
|
|
1446
1465
|
onClick: () => {
|
|
1447
|
-
const
|
|
1466
|
+
const v = [...s];
|
|
1448
1467
|
let q = null;
|
|
1449
1468
|
if (u) {
|
|
1450
|
-
for (let
|
|
1451
|
-
if (!s.find((k) => k.name === u[
|
|
1452
|
-
q = u[
|
|
1469
|
+
for (let _ = 0; _ < u.length; _++)
|
|
1470
|
+
if (!s.find((k) => k.name["en-US"] === u[_])) {
|
|
1471
|
+
q = u[_];
|
|
1453
1472
|
break;
|
|
1454
1473
|
}
|
|
1455
1474
|
}
|
|
1456
|
-
|
|
1457
|
-
name:
|
|
1458
|
-
|
|
1459
|
-
|
|
1475
|
+
m === "select" && u ? v.push({
|
|
1476
|
+
name: {
|
|
1477
|
+
"en-US": q || u[0]
|
|
1478
|
+
},
|
|
1479
|
+
id: mt(),
|
|
1480
|
+
...g,
|
|
1460
1481
|
maxSymbols: 100
|
|
1461
1482
|
// пример значения
|
|
1462
|
-
}) :
|
|
1463
|
-
name:
|
|
1464
|
-
|
|
1465
|
-
|
|
1483
|
+
}) : m === "input" ? v.push({
|
|
1484
|
+
name: {
|
|
1485
|
+
"en-US": ""
|
|
1486
|
+
},
|
|
1487
|
+
id: mt(),
|
|
1488
|
+
...g,
|
|
1466
1489
|
maxSymbols: 100
|
|
1467
|
-
}) :
|
|
1468
|
-
name:
|
|
1469
|
-
|
|
1470
|
-
|
|
1490
|
+
}) : v.push({
|
|
1491
|
+
name: {
|
|
1492
|
+
"en-US": `Image ${s.length + 1}`
|
|
1493
|
+
},
|
|
1494
|
+
id: mt(),
|
|
1495
|
+
...g,
|
|
1471
1496
|
maxSymbols: 100
|
|
1472
|
-
}),
|
|
1497
|
+
}), n(v);
|
|
1473
1498
|
},
|
|
1474
1499
|
style: {
|
|
1475
1500
|
width: "fit-content"
|
|
1476
1501
|
},
|
|
1477
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1502
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
1478
1503
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1479
1504
|
/* @__PURE__ */ t.jsx(
|
|
1480
|
-
|
|
1505
|
+
b,
|
|
1481
1506
|
{
|
|
1482
1507
|
name: "Plus",
|
|
1483
1508
|
width: 16,
|
|
@@ -1490,46 +1515,46 @@ const ja = (d) => {
|
|
|
1490
1515
|
}
|
|
1491
1516
|
)
|
|
1492
1517
|
] }),
|
|
1493
|
-
|
|
1518
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
|
|
1494
1519
|
] });
|
|
1495
|
-
}, zs = "_title_bn7sv_1", Rs = "_subtitle_bn7sv_5", Fs = "_header_bn7sv_12", Vs = "_text_bn7sv_13",
|
|
1520
|
+
}, zs = "_title_bn7sv_1", Rs = "_subtitle_bn7sv_5", Fs = "_header_bn7sv_12", Vs = "_text_bn7sv_13", Ys = "_productsBlock_bn7sv_14", Gs = "_buttonsBlock_bn7sv_15", Xs = "_top_bn7sv_26", Ws = "_itemsBlock_bn7sv_35", Js = "_typeTexts_bn7sv_41", Qs = "_block_bn7sv_48", Ks = "_active_bn7sv_60", Zs = "_products_bn7sv_14", tn = "_product_bn7sv_14", en = "_button_bn7sv_15", sn = "_image_bn7sv_90", nn = "_info_bn7sv_97", on = "_name_bn7sv_109", an = "_buttons_bn7sv_15", cn = "_modal_bn7sv_120", ln = "_other_bn7sv_139", rn = "_options_bn7sv_145", dn = "_closeIcon_bn7sv_153", ct = {
|
|
1496
1521
|
title: zs,
|
|
1497
1522
|
subtitle: Rs,
|
|
1498
1523
|
header: Fs,
|
|
1499
1524
|
text: Vs,
|
|
1500
|
-
productsBlock:
|
|
1501
|
-
buttonsBlock:
|
|
1502
|
-
top:
|
|
1503
|
-
itemsBlock:
|
|
1504
|
-
typeTexts:
|
|
1505
|
-
block:
|
|
1506
|
-
active:
|
|
1507
|
-
products:
|
|
1508
|
-
product:
|
|
1509
|
-
button:
|
|
1510
|
-
image:
|
|
1511
|
-
info:
|
|
1512
|
-
name:
|
|
1513
|
-
buttons:
|
|
1514
|
-
modal:
|
|
1515
|
-
other:
|
|
1516
|
-
options:
|
|
1517
|
-
closeIcon:
|
|
1518
|
-
},
|
|
1519
|
-
const { activeButton: e, setActiveButton: s, popupPosition:
|
|
1520
|
-
return
|
|
1525
|
+
productsBlock: Ys,
|
|
1526
|
+
buttonsBlock: Gs,
|
|
1527
|
+
top: Xs,
|
|
1528
|
+
itemsBlock: Ws,
|
|
1529
|
+
typeTexts: Js,
|
|
1530
|
+
block: Qs,
|
|
1531
|
+
active: Ks,
|
|
1532
|
+
products: Zs,
|
|
1533
|
+
product: tn,
|
|
1534
|
+
button: en,
|
|
1535
|
+
image: sn,
|
|
1536
|
+
info: nn,
|
|
1537
|
+
name: on,
|
|
1538
|
+
buttons: an,
|
|
1539
|
+
modal: cn,
|
|
1540
|
+
other: ln,
|
|
1541
|
+
options: rn,
|
|
1542
|
+
closeIcon: dn
|
|
1543
|
+
}, un = x.forwardRef((d, a) => {
|
|
1544
|
+
const { activeButton: e, setActiveButton: s, popupPosition: n } = d, [c, r] = x.useState(e.typesText), [o, i] = x.useState(e.destination), [l, j] = x.useState(e.page), [h, p] = x.useState(e.link || ""), [m, f] = x.useState(e.text || ""), [u, S] = x.useState(e.openInNewTab), { pages: D } = Ft();
|
|
1545
|
+
return x.useEffect(() => {
|
|
1521
1546
|
s({
|
|
1522
1547
|
...e,
|
|
1523
1548
|
...{
|
|
1524
|
-
text:
|
|
1549
|
+
text: m,
|
|
1525
1550
|
link: h,
|
|
1526
|
-
destination:
|
|
1527
|
-
typesText:
|
|
1528
|
-
page:
|
|
1551
|
+
destination: o,
|
|
1552
|
+
typesText: c,
|
|
1553
|
+
page: l,
|
|
1529
1554
|
openInNewTab: u
|
|
1530
1555
|
}
|
|
1531
1556
|
});
|
|
1532
|
-
}, [
|
|
1557
|
+
}, [c, o, h, m, l, u]), /* @__PURE__ */ t.jsxs(
|
|
1533
1558
|
"div",
|
|
1534
1559
|
{
|
|
1535
1560
|
className: ct.modal,
|
|
@@ -1537,15 +1562,15 @@ const ja = (d) => {
|
|
|
1537
1562
|
I.stopPropagation();
|
|
1538
1563
|
},
|
|
1539
1564
|
style: {
|
|
1540
|
-
top: `${
|
|
1541
|
-
left: `${
|
|
1565
|
+
top: `${n.top}px`,
|
|
1566
|
+
left: `${n.left}px`
|
|
1542
1567
|
},
|
|
1543
|
-
ref:
|
|
1568
|
+
ref: a,
|
|
1544
1569
|
children: [
|
|
1545
1570
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1546
1571
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
|
|
1547
1572
|
/* @__PURE__ */ t.jsx("div", { className: ct.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1548
|
-
|
|
1573
|
+
b,
|
|
1549
1574
|
{
|
|
1550
1575
|
name: "X",
|
|
1551
1576
|
height: 20,
|
|
@@ -1557,21 +1582,21 @@ const ja = (d) => {
|
|
|
1557
1582
|
] }),
|
|
1558
1583
|
/* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
|
|
1559
1584
|
/* @__PURE__ */ t.jsx(
|
|
1560
|
-
|
|
1585
|
+
tt,
|
|
1561
1586
|
{
|
|
1562
1587
|
label: "Destination",
|
|
1563
|
-
onChange: (I) =>
|
|
1564
|
-
options: ["Go to Page", "Open Link"].filter((I) => I !==
|
|
1565
|
-
value:
|
|
1588
|
+
onChange: (I) => i(I),
|
|
1589
|
+
options: ["Go to Page", "Open Link"].filter((I) => I !== o),
|
|
1590
|
+
value: o
|
|
1566
1591
|
}
|
|
1567
1592
|
),
|
|
1568
|
-
|
|
1569
|
-
|
|
1593
|
+
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1594
|
+
tt,
|
|
1570
1595
|
{
|
|
1571
1596
|
label: "Go to",
|
|
1572
|
-
onChange: (I) =>
|
|
1573
|
-
options:
|
|
1574
|
-
value:
|
|
1597
|
+
onChange: (I) => j(I),
|
|
1598
|
+
options: D ? Object.values(D).filter((I) => I.name !== l).map((I) => I.name) : [],
|
|
1599
|
+
value: l
|
|
1575
1600
|
}
|
|
1576
1601
|
) : /* @__PURE__ */ t.jsx(
|
|
1577
1602
|
K,
|
|
@@ -1583,18 +1608,18 @@ const ja = (d) => {
|
|
|
1583
1608
|
}
|
|
1584
1609
|
),
|
|
1585
1610
|
/* @__PURE__ */ t.jsx(
|
|
1586
|
-
|
|
1611
|
+
et,
|
|
1587
1612
|
{
|
|
1588
1613
|
current: e.openInNewTab,
|
|
1589
1614
|
label: "Open in new tab",
|
|
1590
|
-
onChange: (I) =>
|
|
1615
|
+
onChange: (I) => S(I)
|
|
1591
1616
|
}
|
|
1592
1617
|
),
|
|
1593
1618
|
/* @__PURE__ */ t.jsx(
|
|
1594
1619
|
qt,
|
|
1595
1620
|
{
|
|
1596
|
-
onChange: (I) =>
|
|
1597
|
-
value:
|
|
1621
|
+
onChange: (I) => f({ "en-US": I }),
|
|
1622
|
+
value: m["en-US"],
|
|
1598
1623
|
label: "Text",
|
|
1599
1624
|
maxLength: 150
|
|
1600
1625
|
}
|
|
@@ -1602,114 +1627,114 @@ const ja = (d) => {
|
|
|
1602
1627
|
/* @__PURE__ */ t.jsx(
|
|
1603
1628
|
Ht,
|
|
1604
1629
|
{
|
|
1605
|
-
typesText:
|
|
1606
|
-
setTypesText:
|
|
1630
|
+
typesText: c,
|
|
1631
|
+
setTypesText: r
|
|
1607
1632
|
}
|
|
1608
1633
|
)
|
|
1609
1634
|
] })
|
|
1610
1635
|
]
|
|
1611
1636
|
}
|
|
1612
1637
|
);
|
|
1613
|
-
}),
|
|
1614
|
-
subtitle:
|
|
1638
|
+
}), _n = "_subtitle_jql1y_1", mn = "_header_jql1y_8", hn = "_text_jql1y_9", pn = "_productsBlock_jql1y_10", xn = "_buttonsBlock_jql1y_11", gn = "_top_jql1y_23", fn = "_itemsBlock_jql1y_32", bn = "_typeTexts_jql1y_38", vn = "_block_jql1y_45", jn = "_active_jql1y_58", yn = "_products_jql1y_10", kn = "_product_jql1y_10", In = "_button_jql1y_11", $n = "_image_jql1y_88", Nn = "_info_jql1y_95", wn = "_name_jql1y_107", Sn = "_buttons_jql1y_11", Cn = "_modal_jql1y_118", Bn = "_other_jql1y_138", Tn = "_options_jql1y_144", Pn = "_addButton_jql1y_150", An = "_deleteButton_jql1y_165", it = {
|
|
1639
|
+
subtitle: _n,
|
|
1615
1640
|
header: mn,
|
|
1616
|
-
text:
|
|
1617
|
-
productsBlock:
|
|
1618
|
-
buttonsBlock:
|
|
1619
|
-
top:
|
|
1620
|
-
itemsBlock:
|
|
1621
|
-
typeTexts:
|
|
1622
|
-
block:
|
|
1623
|
-
active:
|
|
1624
|
-
products:
|
|
1625
|
-
product:
|
|
1626
|
-
button:
|
|
1627
|
-
image:
|
|
1628
|
-
info:
|
|
1629
|
-
name:
|
|
1630
|
-
buttons:
|
|
1641
|
+
text: hn,
|
|
1642
|
+
productsBlock: pn,
|
|
1643
|
+
buttonsBlock: xn,
|
|
1644
|
+
top: gn,
|
|
1645
|
+
itemsBlock: fn,
|
|
1646
|
+
typeTexts: bn,
|
|
1647
|
+
block: vn,
|
|
1648
|
+
active: jn,
|
|
1649
|
+
products: yn,
|
|
1650
|
+
product: kn,
|
|
1651
|
+
button: In,
|
|
1652
|
+
image: $n,
|
|
1653
|
+
info: Nn,
|
|
1654
|
+
name: wn,
|
|
1655
|
+
buttons: Sn,
|
|
1631
1656
|
modal: Cn,
|
|
1632
1657
|
other: Bn,
|
|
1633
|
-
options:
|
|
1634
|
-
addButton:
|
|
1635
|
-
deleteButton:
|
|
1636
|
-
},
|
|
1637
|
-
const { buttons:
|
|
1658
|
+
options: Tn,
|
|
1659
|
+
addButton: Pn,
|
|
1660
|
+
deleteButton: An
|
|
1661
|
+
}, Mn = (d) => {
|
|
1662
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: n = !0 } = d, [c, r] = x.useState(null), [o, i] = x.useState({
|
|
1638
1663
|
top: 0,
|
|
1639
1664
|
left: 0
|
|
1640
|
-
}), [
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1665
|
+
}), [l, j] = x.useState(null), h = x.useRef(null);
|
|
1666
|
+
x.useEffect(() => {
|
|
1667
|
+
const m = () => {
|
|
1668
|
+
r(null);
|
|
1644
1669
|
};
|
|
1645
|
-
return document.body.addEventListener("click",
|
|
1646
|
-
|
|
1670
|
+
return document.body.addEventListener("click", m), r(null), () => {
|
|
1671
|
+
r(null), document.body.removeEventListener("click", m);
|
|
1647
1672
|
};
|
|
1648
|
-
}, []),
|
|
1649
|
-
if (
|
|
1650
|
-
const
|
|
1651
|
-
e(
|
|
1673
|
+
}, []), x.useEffect(() => {
|
|
1674
|
+
if (c) {
|
|
1675
|
+
const m = [...a].map((f) => f.id === c.id ? c : f);
|
|
1676
|
+
e(m);
|
|
1652
1677
|
}
|
|
1653
|
-
}, [
|
|
1654
|
-
if (h.current &&
|
|
1655
|
-
const
|
|
1656
|
-
let u =
|
|
1657
|
-
u +
|
|
1678
|
+
}, [c]), x.useEffect(() => {
|
|
1679
|
+
if (h.current && l) {
|
|
1680
|
+
const m = h.current.getBoundingClientRect().height, f = window.innerHeight;
|
|
1681
|
+
let u = l.top;
|
|
1682
|
+
u + m > f + window.scrollY - 200 && (u = f + window.scrollY - m - 200), u < 0 && (u = 10), i({
|
|
1658
1683
|
top: u,
|
|
1659
|
-
left:
|
|
1684
|
+
left: l.left
|
|
1660
1685
|
});
|
|
1661
1686
|
}
|
|
1662
|
-
}, [h.current,
|
|
1663
|
-
const p = (
|
|
1664
|
-
|
|
1665
|
-
const u =
|
|
1666
|
-
|
|
1687
|
+
}, [h.current, l]);
|
|
1688
|
+
const p = (m, f) => {
|
|
1689
|
+
m.stopPropagation();
|
|
1690
|
+
const u = m.target.getBoundingClientRect();
|
|
1691
|
+
j({
|
|
1667
1692
|
top: u.top + window.scrollY,
|
|
1668
1693
|
left: u.left - 30
|
|
1669
|
-
}),
|
|
1694
|
+
}), r(f);
|
|
1670
1695
|
};
|
|
1671
1696
|
return /* @__PURE__ */ t.jsxs("div", { className: it.products, children: [
|
|
1672
1697
|
/* @__PURE__ */ t.jsx("h5", { className: it.subtitle, children: "Button Type" }),
|
|
1673
|
-
|
|
1698
|
+
a.map((m) => /* @__PURE__ */ t.jsxs(
|
|
1674
1699
|
"div",
|
|
1675
1700
|
{
|
|
1676
1701
|
className: it.product,
|
|
1677
1702
|
children: [
|
|
1678
1703
|
/* @__PURE__ */ t.jsx(
|
|
1679
|
-
|
|
1704
|
+
tt,
|
|
1680
1705
|
{
|
|
1681
|
-
onChange: (
|
|
1682
|
-
const
|
|
1683
|
-
...
|
|
1684
|
-
type:
|
|
1685
|
-
} :
|
|
1686
|
-
e(
|
|
1706
|
+
onChange: (f) => {
|
|
1707
|
+
const S = [...a].map((D) => D.id === m.id ? {
|
|
1708
|
+
...m,
|
|
1709
|
+
type: f
|
|
1710
|
+
} : D);
|
|
1711
|
+
e(S);
|
|
1687
1712
|
},
|
|
1688
|
-
value:
|
|
1713
|
+
value: m.type,
|
|
1689
1714
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1690
1715
|
}
|
|
1691
1716
|
),
|
|
1692
1717
|
/* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
|
|
1693
1718
|
/* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1694
|
-
|
|
1719
|
+
b,
|
|
1695
1720
|
{
|
|
1696
1721
|
name: "Sliders",
|
|
1697
1722
|
hoverable: !0,
|
|
1698
1723
|
width: 20,
|
|
1699
1724
|
height: 20,
|
|
1700
|
-
onClick: (
|
|
1701
|
-
p(
|
|
1725
|
+
onClick: (f) => {
|
|
1726
|
+
p(f, m);
|
|
1702
1727
|
}
|
|
1703
1728
|
}
|
|
1704
1729
|
) }),
|
|
1705
1730
|
s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1706
|
-
|
|
1731
|
+
b,
|
|
1707
1732
|
{
|
|
1708
1733
|
name: "Trash",
|
|
1709
1734
|
hoverable: !0,
|
|
1710
1735
|
onClick: () => {
|
|
1711
|
-
const
|
|
1712
|
-
e(
|
|
1736
|
+
const f = a.filter((u) => u.id !== m.id);
|
|
1737
|
+
e(f);
|
|
1713
1738
|
},
|
|
1714
1739
|
width: 20,
|
|
1715
1740
|
height: 20,
|
|
@@ -1719,18 +1744,18 @@ const ja = (d) => {
|
|
|
1719
1744
|
] })
|
|
1720
1745
|
]
|
|
1721
1746
|
},
|
|
1722
|
-
|
|
1747
|
+
m.id
|
|
1723
1748
|
)),
|
|
1724
|
-
|
|
1725
|
-
|
|
1749
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1750
|
+
un,
|
|
1726
1751
|
{
|
|
1727
1752
|
ref: h,
|
|
1728
|
-
activeButton:
|
|
1729
|
-
setActiveButton:
|
|
1730
|
-
popupPosition:
|
|
1753
|
+
activeButton: c,
|
|
1754
|
+
setActiveButton: r,
|
|
1755
|
+
popupPosition: o
|
|
1731
1756
|
}
|
|
1732
1757
|
),
|
|
1733
|
-
|
|
1758
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1734
1759
|
"div",
|
|
1735
1760
|
{
|
|
1736
1761
|
style: {
|
|
@@ -1745,16 +1770,18 @@ const ja = (d) => {
|
|
|
1745
1770
|
className: it.button,
|
|
1746
1771
|
size: "s",
|
|
1747
1772
|
onClick: () => {
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1773
|
+
const m = [...a];
|
|
1774
|
+
m.push({
|
|
1750
1775
|
type: "Primary",
|
|
1751
|
-
id:
|
|
1776
|
+
id: mt(),
|
|
1752
1777
|
typesText: [],
|
|
1753
1778
|
destination: "Go to Page",
|
|
1754
|
-
text:
|
|
1779
|
+
text: {
|
|
1780
|
+
"en-US": "Button Name"
|
|
1781
|
+
},
|
|
1755
1782
|
page: "home",
|
|
1756
1783
|
openInNewTab: !0
|
|
1757
|
-
}), e(
|
|
1784
|
+
}), e(m);
|
|
1758
1785
|
},
|
|
1759
1786
|
style: {
|
|
1760
1787
|
width: "fit-content"
|
|
@@ -1762,7 +1789,7 @@ const ja = (d) => {
|
|
|
1762
1789
|
children: /* @__PURE__ */ t.jsxs("div", { className: it.addButton, children: [
|
|
1763
1790
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1764
1791
|
/* @__PURE__ */ t.jsx(
|
|
1765
|
-
|
|
1792
|
+
b,
|
|
1766
1793
|
{
|
|
1767
1794
|
name: "Plus",
|
|
1768
1795
|
width: 16,
|
|
@@ -1775,75 +1802,75 @@ const ja = (d) => {
|
|
|
1775
1802
|
}
|
|
1776
1803
|
)
|
|
1777
1804
|
] });
|
|
1778
|
-
},
|
|
1779
|
-
const { isActiveButtons:
|
|
1805
|
+
}, Na = (d) => {
|
|
1806
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: n } = d;
|
|
1780
1807
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
|
|
1781
1808
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1782
1809
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
|
|
1783
1810
|
/* @__PURE__ */ t.jsx(
|
|
1784
|
-
|
|
1811
|
+
et,
|
|
1785
1812
|
{
|
|
1786
|
-
current:
|
|
1787
|
-
onChange: (
|
|
1813
|
+
current: a,
|
|
1814
|
+
onChange: (c) => e(c)
|
|
1788
1815
|
}
|
|
1789
1816
|
)
|
|
1790
1817
|
] }),
|
|
1791
1818
|
/* @__PURE__ */ t.jsx(
|
|
1792
|
-
|
|
1819
|
+
Mn,
|
|
1793
1820
|
{
|
|
1794
1821
|
buttons: s,
|
|
1795
|
-
setButtons:
|
|
1822
|
+
setButtons: n
|
|
1796
1823
|
}
|
|
1797
1824
|
)
|
|
1798
1825
|
] }) });
|
|
1799
|
-
},
|
|
1800
|
-
wrapper:
|
|
1801
|
-
subtitle:
|
|
1802
|
-
content:
|
|
1803
|
-
range:
|
|
1826
|
+
}, On = "_wrapper_m18qi_1", qn = "_subtitle_m18qi_7", En = "_content_m18qi_14", Un = "_range_m18qi_22", Dn = "_track_m18qi_27", Hn = "_progress_m18qi_36", Ln = "_dots_m18qi_46", zn = "_dot_m18qi_46", Rn = "_active_m18qi_65", Fn = "_input_m18qi_77", Vn = "_countBlock_m18qi_91", Yn = "_count_m18qi_91", Gn = "_controls_m18qi_107", Xn = "_button_m18qi_113", G = {
|
|
1827
|
+
wrapper: On,
|
|
1828
|
+
subtitle: qn,
|
|
1829
|
+
content: En,
|
|
1830
|
+
range: Un,
|
|
1804
1831
|
track: Dn,
|
|
1805
|
-
progress:
|
|
1806
|
-
dots:
|
|
1832
|
+
progress: Hn,
|
|
1833
|
+
dots: Ln,
|
|
1807
1834
|
dot: zn,
|
|
1808
1835
|
active: Rn,
|
|
1809
1836
|
input: Fn,
|
|
1810
1837
|
countBlock: Vn,
|
|
1811
|
-
count:
|
|
1812
|
-
controls:
|
|
1813
|
-
button:
|
|
1838
|
+
count: Yn,
|
|
1839
|
+
controls: Gn,
|
|
1840
|
+
button: Xn
|
|
1814
1841
|
}, Ot = (d) => {
|
|
1815
|
-
const { label:
|
|
1816
|
-
|
|
1842
|
+
const { label: a, min: e = 1, max: s = 4, step: n = 1, count: c, setCount: r } = d, [o, i] = x.useState(!1), l = Array.from({ length: (s - e) / n + 1 }), j = (c - e) / (s - e) * 100, h = () => {
|
|
1843
|
+
c < s && r(c + n);
|
|
1817
1844
|
}, p = () => {
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1820
|
-
const u = e +
|
|
1821
|
-
|
|
1845
|
+
c > e && r(c - n);
|
|
1846
|
+
}, m = (f) => {
|
|
1847
|
+
const u = e + f * n;
|
|
1848
|
+
r(u);
|
|
1822
1849
|
};
|
|
1823
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1824
|
-
|
|
1825
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1826
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1827
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1850
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.wrapper, children: [
|
|
1851
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: a }),
|
|
1852
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.content, children: [
|
|
1853
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.range, children: [
|
|
1854
|
+
/* @__PURE__ */ t.jsx("div", { className: G.track }),
|
|
1828
1855
|
/* @__PURE__ */ t.jsx(
|
|
1829
1856
|
"div",
|
|
1830
1857
|
{
|
|
1831
|
-
className:
|
|
1832
|
-
style: { width: `${
|
|
1858
|
+
className: G.progress,
|
|
1859
|
+
style: { width: `${j}%` }
|
|
1833
1860
|
}
|
|
1834
1861
|
),
|
|
1835
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1836
|
-
const
|
|
1862
|
+
/* @__PURE__ */ t.jsx("div", { className: G.dots, children: l.map((f, u) => {
|
|
1863
|
+
const S = u <= (c - e) / n;
|
|
1837
1864
|
return /* @__PURE__ */ t.jsx(
|
|
1838
1865
|
"button",
|
|
1839
1866
|
{
|
|
1840
|
-
onClick: () =>
|
|
1841
|
-
className:
|
|
1842
|
-
[
|
|
1843
|
-
[
|
|
1844
|
-
[
|
|
1867
|
+
onClick: () => m(u),
|
|
1868
|
+
className: V(G.dot, {
|
|
1869
|
+
[G.active]: S,
|
|
1870
|
+
[G.inactive]: !S,
|
|
1871
|
+
[G.dragging]: o
|
|
1845
1872
|
}),
|
|
1846
|
-
"aria-label": `Set value to ${e + u *
|
|
1873
|
+
"aria-label": `Set value to ${e + u * n}`
|
|
1847
1874
|
},
|
|
1848
1875
|
u
|
|
1849
1876
|
);
|
|
@@ -1854,18 +1881,18 @@ const ja = (d) => {
|
|
|
1854
1881
|
type: "range",
|
|
1855
1882
|
min: e,
|
|
1856
1883
|
max: s,
|
|
1857
|
-
step:
|
|
1858
|
-
value:
|
|
1859
|
-
onChange: (
|
|
1860
|
-
onMouseDown: () =>
|
|
1861
|
-
onMouseUp: () =>
|
|
1862
|
-
onTouchStart: () =>
|
|
1863
|
-
onTouchEnd: () =>
|
|
1864
|
-
className:
|
|
1884
|
+
step: n,
|
|
1885
|
+
value: c,
|
|
1886
|
+
onChange: (f) => r(Number(f.target.value)),
|
|
1887
|
+
onMouseDown: () => i(!0),
|
|
1888
|
+
onMouseUp: () => i(!1),
|
|
1889
|
+
onTouchStart: () => i(!0),
|
|
1890
|
+
onTouchEnd: () => i(!1),
|
|
1891
|
+
className: G.input
|
|
1865
1892
|
}
|
|
1866
1893
|
)
|
|
1867
1894
|
] }),
|
|
1868
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1895
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.countBlock, children: [
|
|
1869
1896
|
/* @__PURE__ */ t.jsx(
|
|
1870
1897
|
K,
|
|
1871
1898
|
{
|
|
@@ -1873,23 +1900,23 @@ const ja = (d) => {
|
|
|
1873
1900
|
min: e,
|
|
1874
1901
|
max: s,
|
|
1875
1902
|
paddingless: !0,
|
|
1876
|
-
onChange: (
|
|
1877
|
-
const u = Number(
|
|
1878
|
-
u > s ?
|
|
1903
|
+
onChange: (f) => {
|
|
1904
|
+
const u = Number(f);
|
|
1905
|
+
u > s ? r(s) : u < e ? r(e) : r(u);
|
|
1879
1906
|
},
|
|
1880
|
-
value: String(
|
|
1907
|
+
value: String(c)
|
|
1881
1908
|
}
|
|
1882
1909
|
),
|
|
1883
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1910
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.controls, children: [
|
|
1884
1911
|
/* @__PURE__ */ t.jsx(
|
|
1885
1912
|
"button",
|
|
1886
1913
|
{
|
|
1887
1914
|
onClick: h,
|
|
1888
|
-
disabled:
|
|
1889
|
-
className:
|
|
1915
|
+
disabled: c >= s,
|
|
1916
|
+
className: G.button,
|
|
1890
1917
|
"aria-label": "Increment count",
|
|
1891
1918
|
children: /* @__PURE__ */ t.jsx(
|
|
1892
|
-
|
|
1919
|
+
b,
|
|
1893
1920
|
{
|
|
1894
1921
|
name: "CaretUp",
|
|
1895
1922
|
width: 15,
|
|
@@ -1902,11 +1929,11 @@ const ja = (d) => {
|
|
|
1902
1929
|
"button",
|
|
1903
1930
|
{
|
|
1904
1931
|
onClick: p,
|
|
1905
|
-
disabled:
|
|
1906
|
-
className:
|
|
1932
|
+
disabled: c <= e,
|
|
1933
|
+
className: G.button,
|
|
1907
1934
|
"aria-label": "Decrement count",
|
|
1908
1935
|
children: /* @__PURE__ */ t.jsx(
|
|
1909
|
-
|
|
1936
|
+
b,
|
|
1910
1937
|
{
|
|
1911
1938
|
name: "CaretDown",
|
|
1912
1939
|
width: 15,
|
|
@@ -1919,151 +1946,147 @@ const ja = (d) => {
|
|
|
1919
1946
|
] })
|
|
1920
1947
|
] })
|
|
1921
1948
|
] });
|
|
1922
|
-
},
|
|
1923
|
-
title:
|
|
1924
|
-
subtitle:
|
|
1925
|
-
header:
|
|
1926
|
-
text:
|
|
1927
|
-
productsBlock:
|
|
1928
|
-
top:
|
|
1929
|
-
itemsBlock:
|
|
1930
|
-
typeTexts:
|
|
1931
|
-
block:
|
|
1932
|
-
active:
|
|
1933
|
-
products:
|
|
1934
|
-
product:
|
|
1935
|
-
button:
|
|
1936
|
-
image:
|
|
1937
|
-
info:
|
|
1938
|
-
name:
|
|
1939
|
-
buttons:
|
|
1940
|
-
modal:
|
|
1949
|
+
}, Wn = "_title_ix5ax_1", Jn = "_subtitle_ix5ax_5", Qn = "_header_ix5ax_12", Kn = "_text_ix5ax_13", Zn = "_productsBlock_ix5ax_14", ti = "_top_ix5ax_26", ei = "_itemsBlock_ix5ax_35", si = "_typeTexts_ix5ax_41", ni = "_block_ix5ax_48", ii = "_active_ix5ax_61", oi = "_products_ix5ax_14", ai = "_product_ix5ax_14", ci = "_button_ix5ax_80", li = "_image_ix5ax_91", ri = "_info_ix5ax_98", di = "_name_ix5ax_110", ui = "_buttons_ix5ax_114", _i = "_modal_ix5ax_121", mi = "_link_ix5ax_141", hi = "_modalOptions_ix5ax_147", pi = "_addButton_ix5ax_160", xi = "_deleteButton_ix5ax_175", gi = "_closeIcon_ix5ax_187", F = {
|
|
1950
|
+
title: Wn,
|
|
1951
|
+
subtitle: Jn,
|
|
1952
|
+
header: Qn,
|
|
1953
|
+
text: Kn,
|
|
1954
|
+
productsBlock: Zn,
|
|
1955
|
+
top: ti,
|
|
1956
|
+
itemsBlock: ei,
|
|
1957
|
+
typeTexts: si,
|
|
1958
|
+
block: ni,
|
|
1959
|
+
active: ii,
|
|
1960
|
+
products: oi,
|
|
1961
|
+
product: ai,
|
|
1962
|
+
button: ci,
|
|
1963
|
+
image: li,
|
|
1964
|
+
info: ri,
|
|
1965
|
+
name: di,
|
|
1966
|
+
buttons: ui,
|
|
1967
|
+
modal: _i,
|
|
1941
1968
|
link: mi,
|
|
1942
|
-
modalOptions:
|
|
1943
|
-
addButton:
|
|
1944
|
-
deleteButton:
|
|
1945
|
-
closeIcon:
|
|
1946
|
-
},
|
|
1947
|
-
const { activeItem:
|
|
1948
|
-
|
|
1949
|
-
function r(n, c) {
|
|
1950
|
-
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1951
|
-
}
|
|
1952
|
-
return /* @__PURE__ */ t.jsxs(
|
|
1969
|
+
modalOptions: hi,
|
|
1970
|
+
addButton: pi,
|
|
1971
|
+
deleteButton: xi,
|
|
1972
|
+
closeIcon: gi
|
|
1973
|
+
}, fi = (d) => {
|
|
1974
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: n, itemsOptions: c } = d, r = c.find((o) => o.id === a.listingId);
|
|
1975
|
+
return r ? /* @__PURE__ */ t.jsxs(
|
|
1953
1976
|
"div",
|
|
1954
1977
|
{
|
|
1955
|
-
className:
|
|
1956
|
-
onClick: (
|
|
1957
|
-
|
|
1978
|
+
className: F.modal,
|
|
1979
|
+
onClick: (o) => {
|
|
1980
|
+
o.stopPropagation();
|
|
1958
1981
|
},
|
|
1959
1982
|
style: {
|
|
1960
1983
|
top: `${s.top}px`,
|
|
1961
1984
|
left: `${s.left}px`
|
|
1962
1985
|
},
|
|
1963
1986
|
children: [
|
|
1964
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1965
|
-
/* @__PURE__ */ t.jsx("h3", { children: r
|
|
1966
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1967
|
-
|
|
1987
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1988
|
+
/* @__PURE__ */ t.jsx("h3", { children: Vt(r.productData.name) }),
|
|
1989
|
+
/* @__PURE__ */ t.jsx("div", { className: F.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1990
|
+
b,
|
|
1968
1991
|
{
|
|
1969
1992
|
name: "X",
|
|
1970
1993
|
height: 20,
|
|
1971
1994
|
width: 20,
|
|
1972
1995
|
onClick: () => {
|
|
1973
|
-
|
|
1996
|
+
n(!1), e(null);
|
|
1974
1997
|
}
|
|
1975
1998
|
}
|
|
1976
1999
|
) })
|
|
1977
2000
|
] }),
|
|
1978
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2001
|
+
/* @__PURE__ */ t.jsx("div", { className: F.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1979
2002
|
ft,
|
|
1980
2003
|
{
|
|
1981
2004
|
label: "Put up an attractive image",
|
|
1982
|
-
activeImage:
|
|
1983
|
-
onChange: (
|
|
1984
|
-
const
|
|
1985
|
-
...
|
|
1986
|
-
image:
|
|
2005
|
+
activeImage: r.productData.images.length > 0 ? r.productData.images[0].cfId : void 0,
|
|
2006
|
+
onChange: (o) => {
|
|
2007
|
+
const i = {
|
|
2008
|
+
...a,
|
|
2009
|
+
image: o[0]
|
|
1987
2010
|
};
|
|
1988
|
-
e(
|
|
2011
|
+
e(i);
|
|
1989
2012
|
}
|
|
1990
2013
|
}
|
|
1991
2014
|
) })
|
|
1992
2015
|
]
|
|
1993
2016
|
}
|
|
1994
|
-
);
|
|
2017
|
+
) : null;
|
|
1995
2018
|
};
|
|
1996
|
-
function
|
|
1997
|
-
const { product:
|
|
1998
|
-
id: String(
|
|
1999
|
-
}),
|
|
2000
|
-
transform: Pt.Transform.toString(
|
|
2001
|
-
transition:
|
|
2019
|
+
function bi(d) {
|
|
2020
|
+
const { product: a, children: e } = d, { attributes: s, listeners: n, setNodeRef: c, transform: r, transition: o, isDragging: i } = Tt({
|
|
2021
|
+
id: String(a.listingId)
|
|
2022
|
+
}), l = {
|
|
2023
|
+
transform: Pt.Transform.toString(r),
|
|
2024
|
+
transition: o
|
|
2002
2025
|
};
|
|
2003
2026
|
return /* @__PURE__ */ t.jsx(
|
|
2004
2027
|
"div",
|
|
2005
2028
|
{
|
|
2006
|
-
ref:
|
|
2007
|
-
style:
|
|
2008
|
-
className: `${
|
|
2029
|
+
ref: c,
|
|
2030
|
+
style: l,
|
|
2031
|
+
className: `${F.product} ${i ? F.dragging : ""}`,
|
|
2009
2032
|
...s,
|
|
2010
|
-
...
|
|
2033
|
+
...n,
|
|
2011
2034
|
children: e
|
|
2012
2035
|
}
|
|
2013
2036
|
);
|
|
2014
2037
|
}
|
|
2015
|
-
const
|
|
2038
|
+
const wa = (d) => {
|
|
2016
2039
|
const {
|
|
2017
|
-
isActiveItems:
|
|
2040
|
+
isActiveItems: a,
|
|
2018
2041
|
setIsActiveItems: e,
|
|
2019
2042
|
items: s,
|
|
2020
|
-
setItems:
|
|
2021
|
-
other:
|
|
2022
|
-
title:
|
|
2023
|
-
subtitle:
|
|
2024
|
-
editable:
|
|
2025
|
-
draggable:
|
|
2026
|
-
withImage:
|
|
2043
|
+
setItems: n,
|
|
2044
|
+
other: c,
|
|
2045
|
+
title: r,
|
|
2046
|
+
subtitle: o,
|
|
2047
|
+
editable: i = !0,
|
|
2048
|
+
draggable: l = !1,
|
|
2049
|
+
withImage: j = !1,
|
|
2027
2050
|
deletable: h = !0,
|
|
2028
2051
|
addable: p = !0,
|
|
2029
|
-
itemsType:
|
|
2030
|
-
itemsOptions:
|
|
2031
|
-
} = d, [u,
|
|
2052
|
+
itemsType: m,
|
|
2053
|
+
itemsOptions: f
|
|
2054
|
+
} = d, [u, S] = x.useState(
|
|
2032
2055
|
null
|
|
2033
|
-
), [
|
|
2056
|
+
), [D, I] = x.useState({
|
|
2034
2057
|
top: 0,
|
|
2035
2058
|
left: 0
|
|
2036
|
-
}), [
|
|
2037
|
-
Nt(
|
|
2059
|
+
}), [g, w] = x.useState(!1), E = $t(
|
|
2060
|
+
Nt(Bt, {
|
|
2038
2061
|
activationConstraint: {
|
|
2039
2062
|
distance: 5
|
|
2040
2063
|
}
|
|
2041
2064
|
})
|
|
2042
2065
|
);
|
|
2043
|
-
|
|
2066
|
+
x.useEffect(() => {
|
|
2044
2067
|
const y = () => {
|
|
2045
|
-
|
|
2068
|
+
S(null), w(!1);
|
|
2046
2069
|
};
|
|
2047
|
-
return document.body.addEventListener("click", y),
|
|
2048
|
-
|
|
2070
|
+
return document.body.addEventListener("click", y), S(null), w(!1), () => {
|
|
2071
|
+
S(null), w(!1), document.body.removeEventListener("click", y);
|
|
2049
2072
|
};
|
|
2050
|
-
}, []),
|
|
2073
|
+
}, []), x.useEffect(() => {
|
|
2051
2074
|
if (u) {
|
|
2052
2075
|
const y = [...s].map((M) => M.listingId === u.listingId ? u : M);
|
|
2053
|
-
|
|
2076
|
+
n(y);
|
|
2054
2077
|
}
|
|
2055
2078
|
}, [u]);
|
|
2056
|
-
const
|
|
2079
|
+
const R = (y, M) => {
|
|
2057
2080
|
y.stopPropagation();
|
|
2058
|
-
const
|
|
2059
|
-
let
|
|
2060
|
-
|
|
2061
|
-
top:
|
|
2062
|
-
left:
|
|
2063
|
-
}),
|
|
2081
|
+
const B = y.target.getBoundingClientRect(), X = 100, O = window.innerHeight;
|
|
2082
|
+
let L = B.top + window.scrollY;
|
|
2083
|
+
L + X > O && (L = O - X - 20), w(!0), I({
|
|
2084
|
+
top: L - 80,
|
|
2085
|
+
left: B.left - 30
|
|
2086
|
+
}), S(M);
|
|
2064
2087
|
};
|
|
2065
|
-
function
|
|
2066
|
-
if (
|
|
2088
|
+
function C(y) {
|
|
2089
|
+
if (j)
|
|
2067
2090
|
return y ? /* @__PURE__ */ t.jsx(
|
|
2068
2091
|
"img",
|
|
2069
2092
|
{
|
|
@@ -2073,7 +2096,7 @@ const ka = (d) => {
|
|
|
2073
2096
|
height: 16
|
|
2074
2097
|
}
|
|
2075
2098
|
) : /* @__PURE__ */ t.jsx(
|
|
2076
|
-
|
|
2099
|
+
b,
|
|
2077
2100
|
{
|
|
2078
2101
|
name: "Image",
|
|
2079
2102
|
width: 16,
|
|
@@ -2082,21 +2105,21 @@ const ka = (d) => {
|
|
|
2082
2105
|
}
|
|
2083
2106
|
);
|
|
2084
2107
|
}
|
|
2085
|
-
const
|
|
2086
|
-
const { active: M, over:
|
|
2087
|
-
if (
|
|
2088
|
-
const
|
|
2089
|
-
if (
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2108
|
+
const P = (y) => {
|
|
2109
|
+
const { active: M, over: B } = y;
|
|
2110
|
+
if (B && M.id !== B.id) {
|
|
2111
|
+
const X = s.findIndex((L) => String(L.listingId) === M.id), O = s.findIndex((L) => String(L.listingId) === B.id);
|
|
2112
|
+
if (X !== -1 && O !== -1) {
|
|
2113
|
+
const L = [...s], [Z] = L.splice(X, 1);
|
|
2114
|
+
L.splice(O, 0, Z), n(L);
|
|
2092
2115
|
}
|
|
2093
2116
|
}
|
|
2094
|
-
},
|
|
2095
|
-
const
|
|
2096
|
-
if (!
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
|
|
2117
|
+
}, st = (y, M) => {
|
|
2118
|
+
const B = f.find((O) => y.listingId === O.id);
|
|
2119
|
+
if (!B) return null;
|
|
2120
|
+
const X = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2121
|
+
l && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2122
|
+
b,
|
|
2100
2123
|
{
|
|
2101
2124
|
name: "DotsSixVertical",
|
|
2102
2125
|
hoverable: !0,
|
|
@@ -2104,106 +2127,106 @@ const ka = (d) => {
|
|
|
2104
2127
|
height: 20
|
|
2105
2128
|
}
|
|
2106
2129
|
) }),
|
|
2107
|
-
|
|
2108
|
-
|
|
2130
|
+
m === "select" && /* @__PURE__ */ t.jsx(
|
|
2131
|
+
tt,
|
|
2109
2132
|
{
|
|
2110
2133
|
onChange: (O) => {
|
|
2111
|
-
const
|
|
2134
|
+
const L = [...s], Z = f.find((q) => q.productData.name === O);
|
|
2112
2135
|
if (!Z) return;
|
|
2113
2136
|
const rt = {
|
|
2114
2137
|
listingId: Z.id,
|
|
2115
2138
|
image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
|
|
2116
|
-
},
|
|
2117
|
-
|
|
2139
|
+
}, v = L.map((q) => q.listingId === y.listingId ? rt : q);
|
|
2140
|
+
S(rt), n([...v]);
|
|
2118
2141
|
},
|
|
2119
|
-
value:
|
|
2142
|
+
value: B.productData.name,
|
|
2120
2143
|
options: [
|
|
2121
|
-
...
|
|
2144
|
+
...f.filter((O) => !s.find((L) => L.listingId === O.id)).map((O) => O.productData.name)
|
|
2122
2145
|
],
|
|
2123
|
-
leftAddon:
|
|
2124
|
-
y.image ||
|
|
2146
|
+
leftAddon: C(
|
|
2147
|
+
y.image || B.productData.images.length > 0 && B.productData.images[0].cfId || ""
|
|
2125
2148
|
)
|
|
2126
2149
|
},
|
|
2127
2150
|
M
|
|
2128
2151
|
),
|
|
2129
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2130
|
-
|
|
2131
|
-
|
|
2152
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
2153
|
+
i && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2154
|
+
b,
|
|
2132
2155
|
{
|
|
2133
2156
|
name: "Sliders",
|
|
2134
2157
|
hoverable: !0,
|
|
2135
2158
|
width: 20,
|
|
2136
2159
|
height: 20,
|
|
2137
|
-
onClick: (O) =>
|
|
2160
|
+
onClick: (O) => R(O, y)
|
|
2138
2161
|
}
|
|
2139
2162
|
) }),
|
|
2140
|
-
h && /* @__PURE__ */ t.jsx("div", { className:
|
|
2141
|
-
|
|
2163
|
+
h && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2164
|
+
b,
|
|
2142
2165
|
{
|
|
2143
2166
|
name: "Trash",
|
|
2144
2167
|
hoverable: !0,
|
|
2145
2168
|
width: 20,
|
|
2146
2169
|
height: 20,
|
|
2147
2170
|
fill: "#C12A2A",
|
|
2148
|
-
onClick: () =>
|
|
2171
|
+
onClick: () => n(s.filter((O) => O !== y))
|
|
2149
2172
|
}
|
|
2150
2173
|
) })
|
|
2151
2174
|
] })
|
|
2152
2175
|
] });
|
|
2153
|
-
return
|
|
2154
|
-
|
|
2176
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
2177
|
+
bi,
|
|
2155
2178
|
{
|
|
2156
2179
|
product: y,
|
|
2157
|
-
children:
|
|
2180
|
+
children: X
|
|
2158
2181
|
},
|
|
2159
2182
|
y.listingId
|
|
2160
2183
|
) : /* @__PURE__ */ t.jsx(
|
|
2161
2184
|
"div",
|
|
2162
2185
|
{
|
|
2163
|
-
className:
|
|
2164
|
-
children:
|
|
2186
|
+
className: F.product,
|
|
2187
|
+
children: X
|
|
2165
2188
|
},
|
|
2166
2189
|
y.listingId
|
|
2167
2190
|
);
|
|
2168
2191
|
};
|
|
2169
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2170
|
-
(
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2192
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
2193
|
+
(r || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
2194
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: r }),
|
|
2195
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2196
|
+
et,
|
|
2174
2197
|
{
|
|
2175
|
-
current:
|
|
2198
|
+
current: a,
|
|
2176
2199
|
onChange: (y) => e == null ? void 0 : e(y)
|
|
2177
2200
|
}
|
|
2178
2201
|
)
|
|
2179
2202
|
] }),
|
|
2180
|
-
|
|
2181
|
-
|
|
2203
|
+
g && u && /* @__PURE__ */ t.jsx(
|
|
2204
|
+
fi,
|
|
2182
2205
|
{
|
|
2183
2206
|
activeItem: u,
|
|
2184
|
-
setActiveItem:
|
|
2185
|
-
setIsOpenModal:
|
|
2186
|
-
popupPosition:
|
|
2187
|
-
itemsOptions:
|
|
2207
|
+
setActiveItem: S,
|
|
2208
|
+
setIsOpenModal: w,
|
|
2209
|
+
popupPosition: D,
|
|
2210
|
+
itemsOptions: f
|
|
2188
2211
|
}
|
|
2189
2212
|
),
|
|
2190
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2191
|
-
|
|
2192
|
-
|
|
2213
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
2214
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: o }),
|
|
2215
|
+
l ? /* @__PURE__ */ t.jsx(
|
|
2193
2216
|
wt,
|
|
2194
2217
|
{
|
|
2195
|
-
sensors:
|
|
2196
|
-
onDragEnd:
|
|
2218
|
+
sensors: E,
|
|
2219
|
+
onDragEnd: P,
|
|
2197
2220
|
children: /* @__PURE__ */ t.jsx(
|
|
2198
|
-
|
|
2221
|
+
St,
|
|
2199
2222
|
{
|
|
2200
2223
|
items: s.map((y) => String(y.listingId)),
|
|
2201
|
-
strategy:
|
|
2202
|
-
children: s.map((y, M) =>
|
|
2224
|
+
strategy: Ct,
|
|
2225
|
+
children: s.map((y, M) => st(y, M))
|
|
2203
2226
|
}
|
|
2204
2227
|
)
|
|
2205
2228
|
}
|
|
2206
|
-
) : s.map((y, M) =>
|
|
2229
|
+
) : s.map((y, M) => st(y, M)),
|
|
2207
2230
|
p && /* @__PURE__ */ t.jsx(
|
|
2208
2231
|
"div",
|
|
2209
2232
|
{
|
|
@@ -2216,28 +2239,28 @@ const ka = (d) => {
|
|
|
2216
2239
|
lt,
|
|
2217
2240
|
{
|
|
2218
2241
|
withoutHover: !0,
|
|
2219
|
-
className:
|
|
2242
|
+
className: F.button,
|
|
2220
2243
|
size: "s",
|
|
2221
2244
|
onClick: () => {
|
|
2222
2245
|
const y = [...s];
|
|
2223
|
-
for (let M = 0; M <
|
|
2224
|
-
if (!s.find((
|
|
2246
|
+
for (let M = 0; M < f.length; M++)
|
|
2247
|
+
if (!s.find((B) => B.listingId === f[M].id)) {
|
|
2225
2248
|
y.push({
|
|
2226
|
-
listingId:
|
|
2227
|
-
image:
|
|
2249
|
+
listingId: f[M].id,
|
|
2250
|
+
image: f[M].productData.images.length > 0 ? f[M].productData.images[0].cfId : ""
|
|
2228
2251
|
});
|
|
2229
2252
|
break;
|
|
2230
2253
|
}
|
|
2231
|
-
|
|
2254
|
+
n(y);
|
|
2232
2255
|
},
|
|
2233
|
-
disabled: s.length ===
|
|
2256
|
+
disabled: s.length === f.length,
|
|
2234
2257
|
style: {
|
|
2235
2258
|
width: "fit-content"
|
|
2236
2259
|
},
|
|
2237
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2260
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
2238
2261
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2239
2262
|
/* @__PURE__ */ t.jsx(
|
|
2240
|
-
|
|
2263
|
+
b,
|
|
2241
2264
|
{
|
|
2242
2265
|
name: "Plus",
|
|
2243
2266
|
width: 16,
|
|
@@ -2250,65 +2273,65 @@ const ka = (d) => {
|
|
|
2250
2273
|
}
|
|
2251
2274
|
)
|
|
2252
2275
|
] }),
|
|
2253
|
-
|
|
2276
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
|
|
2254
2277
|
] });
|
|
2255
|
-
},
|
|
2256
|
-
options:
|
|
2257
|
-
price:
|
|
2258
|
-
oldPrice:
|
|
2259
|
-
newPrice:
|
|
2260
|
-
animate:
|
|
2261
|
-
appearAndBounce:
|
|
2262
|
-
meta:
|
|
2263
|
-
info:
|
|
2264
|
-
infoRight:
|
|
2278
|
+
}, vi = "_options_6cemk_1", ji = "_price_6cemk_12", yi = "_oldPrice_6cemk_19", ki = "_newPrice_6cemk_27", Ii = "_animate_6cemk_34", $i = "_appearAndBounce_6cemk_1", Ni = "_meta_6cemk_52", wi = "_info_6cemk_58", Si = "_infoRight_6cemk_66", Ci = "_buttons_6cemk_73", Bi = "_variants_6cemk_80", Ti = "_variant_6cemk_80", Pi = "_stock_6cemk_98", Ai = "_variantInfo_6cemk_105", Mi = "_quantity_6cemk_111", Oi = "_count_6cemk_118", qi = "_focused_6cemk_135", Ei = "_button_6cemk_73", Ui = "_activeVariant_6cemk_161", Di = "_chargeTypes_6cemk_165", Hi = "_charge_6cemk_165", Li = "_chargeActive_6cemk_190", zi = "_title_6cemk_198", N = {
|
|
2279
|
+
options: vi,
|
|
2280
|
+
price: ji,
|
|
2281
|
+
oldPrice: yi,
|
|
2282
|
+
newPrice: ki,
|
|
2283
|
+
animate: Ii,
|
|
2284
|
+
appearAndBounce: $i,
|
|
2285
|
+
meta: Ni,
|
|
2286
|
+
info: wi,
|
|
2287
|
+
infoRight: Si,
|
|
2265
2288
|
buttons: Ci,
|
|
2266
2289
|
variants: Bi,
|
|
2267
|
-
variant:
|
|
2268
|
-
stock:
|
|
2269
|
-
variantInfo:
|
|
2270
|
-
quantity:
|
|
2271
|
-
count:
|
|
2272
|
-
focused:
|
|
2273
|
-
button:
|
|
2274
|
-
activeVariant:
|
|
2290
|
+
variant: Ti,
|
|
2291
|
+
stock: Pi,
|
|
2292
|
+
variantInfo: Ai,
|
|
2293
|
+
quantity: Mi,
|
|
2294
|
+
count: Oi,
|
|
2295
|
+
focused: qi,
|
|
2296
|
+
button: Ei,
|
|
2297
|
+
activeVariant: Ui,
|
|
2275
2298
|
chargeTypes: Di,
|
|
2276
|
-
charge:
|
|
2277
|
-
chargeActive:
|
|
2299
|
+
charge: Hi,
|
|
2300
|
+
chargeActive: Li,
|
|
2278
2301
|
title: zi
|
|
2279
|
-
}, Ri = "_wrapper_c1dht_1", Fi = "_label_c1dht_9", Vi = "_input_c1dht_18",
|
|
2302
|
+
}, Ri = "_wrapper_c1dht_1", Fi = "_label_c1dht_9", Vi = "_input_c1dht_18", Yi = "_paddingless_c1dht_31", Gi = "_content_c1dht_35", Xi = "_contentBorder_c1dht_47", Wi = "_borderless_c1dht_52", Ji = "_rightIcon_c1dht_57", nt = {
|
|
2280
2303
|
wrapper: Ri,
|
|
2281
2304
|
label: Fi,
|
|
2282
2305
|
input: Vi,
|
|
2283
|
-
paddingless:
|
|
2284
|
-
content:
|
|
2285
|
-
contentBorder:
|
|
2286
|
-
borderless:
|
|
2287
|
-
rightIcon:
|
|
2288
|
-
},
|
|
2306
|
+
paddingless: Yi,
|
|
2307
|
+
content: Gi,
|
|
2308
|
+
contentBorder: Xi,
|
|
2309
|
+
borderless: Wi,
|
|
2310
|
+
rightIcon: Ji
|
|
2311
|
+
}, Qi = (d) => {
|
|
2289
2312
|
const {
|
|
2290
|
-
onChange:
|
|
2313
|
+
onChange: a,
|
|
2291
2314
|
style: e,
|
|
2292
2315
|
label: s,
|
|
2293
|
-
value:
|
|
2294
|
-
type:
|
|
2295
|
-
min:
|
|
2296
|
-
max:
|
|
2297
|
-
placeholder:
|
|
2298
|
-
disabled:
|
|
2299
|
-
required:
|
|
2316
|
+
value: n,
|
|
2317
|
+
type: c,
|
|
2318
|
+
min: r,
|
|
2319
|
+
max: o,
|
|
2320
|
+
placeholder: i,
|
|
2321
|
+
disabled: l = !1,
|
|
2322
|
+
required: j = !1,
|
|
2300
2323
|
regex: h,
|
|
2301
2324
|
paddingless: p = !1,
|
|
2302
|
-
borderless:
|
|
2303
|
-
editable:
|
|
2325
|
+
borderless: m = !1,
|
|
2326
|
+
editable: f = !1,
|
|
2304
2327
|
isSearch: u = !1,
|
|
2305
|
-
centered:
|
|
2306
|
-
} = d, { themeSettings:
|
|
2307
|
-
function C
|
|
2308
|
-
return Number(
|
|
2328
|
+
centered: S = !1
|
|
2329
|
+
} = d, { themeSettings: D } = Et(), { inputs: I } = D, [g, w] = x.useState(!1);
|
|
2330
|
+
function E(C) {
|
|
2331
|
+
return Number(C) < 0 ? String(r) : C;
|
|
2309
2332
|
}
|
|
2310
|
-
function
|
|
2311
|
-
return !
|
|
2333
|
+
function R(C) {
|
|
2334
|
+
return !j || !h ? !0 : new RegExp(h).test(C);
|
|
2312
2335
|
}
|
|
2313
2336
|
return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
|
|
2314
2337
|
s && /* @__PURE__ */ t.jsx(
|
|
@@ -2322,7 +2345,7 @@ const ka = (d) => {
|
|
|
2322
2345
|
/* @__PURE__ */ t.jsxs(
|
|
2323
2346
|
"div",
|
|
2324
2347
|
{
|
|
2325
|
-
className:
|
|
2348
|
+
className: V(nt.content, {
|
|
2326
2349
|
[nt.contentBorder]: I.border.active
|
|
2327
2350
|
}),
|
|
2328
2351
|
style: {
|
|
@@ -2335,33 +2358,33 @@ const ka = (d) => {
|
|
|
2335
2358
|
"input",
|
|
2336
2359
|
{
|
|
2337
2360
|
id: s,
|
|
2338
|
-
type:
|
|
2339
|
-
onChange: (
|
|
2340
|
-
if (
|
|
2361
|
+
type: c || "text",
|
|
2362
|
+
onChange: (C) => {
|
|
2363
|
+
if (c === "text") a(C.target.value);
|
|
2341
2364
|
else {
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2365
|
+
const P = E(C.target.value);
|
|
2366
|
+
a(P);
|
|
2344
2367
|
}
|
|
2345
2368
|
},
|
|
2346
|
-
value:
|
|
2369
|
+
value: n,
|
|
2347
2370
|
autoComplete: "off",
|
|
2348
|
-
placeholder:
|
|
2349
|
-
className:
|
|
2350
|
-
[nt.required]:
|
|
2371
|
+
placeholder: i || "Type something...",
|
|
2372
|
+
className: V(nt.input, {
|
|
2373
|
+
[nt.required]: g && j && !R(n),
|
|
2351
2374
|
[nt.paddingless]: p,
|
|
2352
|
-
[nt.borderless]:
|
|
2375
|
+
[nt.borderless]: m
|
|
2353
2376
|
}),
|
|
2354
|
-
min:
|
|
2355
|
-
max:
|
|
2356
|
-
disabled:
|
|
2357
|
-
onFocus: () =>
|
|
2377
|
+
min: c === "number" ? r : void 0,
|
|
2378
|
+
max: c === "number" ? o : void 0,
|
|
2379
|
+
disabled: l,
|
|
2380
|
+
onFocus: () => w(!0),
|
|
2358
2381
|
style: {
|
|
2359
|
-
textAlign:
|
|
2382
|
+
textAlign: S ? "center" : "left"
|
|
2360
2383
|
}
|
|
2361
2384
|
}
|
|
2362
2385
|
),
|
|
2363
2386
|
u && /* @__PURE__ */ t.jsx("div", { className: nt.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2364
|
-
|
|
2387
|
+
b,
|
|
2365
2388
|
{
|
|
2366
2389
|
name: "MagnifyingGlass",
|
|
2367
2390
|
fill: "var(--icon-secondary)",
|
|
@@ -2369,8 +2392,8 @@ const ka = (d) => {
|
|
|
2369
2392
|
height: I.general.size
|
|
2370
2393
|
}
|
|
2371
2394
|
) }),
|
|
2372
|
-
|
|
2373
|
-
|
|
2395
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2396
|
+
b,
|
|
2374
2397
|
{
|
|
2375
2398
|
name: "Sliders",
|
|
2376
2399
|
width: 20,
|
|
@@ -2382,37 +2405,37 @@ const ka = (d) => {
|
|
|
2382
2405
|
}
|
|
2383
2406
|
)
|
|
2384
2407
|
] });
|
|
2385
|
-
},
|
|
2386
|
-
button:
|
|
2387
|
-
primary:
|
|
2388
|
-
primaryHovered:
|
|
2389
|
-
secondary:
|
|
2390
|
-
secondaryHovered:
|
|
2391
|
-
tertiary:
|
|
2392
|
-
tertiaryHovered:
|
|
2393
|
-
content:
|
|
2394
|
-
},
|
|
2395
|
-
const { children:
|
|
2408
|
+
}, Ki = "_button_85085_1", Zi = "_primary_85085_20", to = "_primaryHovered_85085_30", eo = "_secondary_85085_34", so = "_secondaryHovered_85085_44", no = "_tertiary_85085_48", io = "_tertiaryHovered_85085_58", oo = "_content_85085_62", ot = {
|
|
2409
|
+
button: Ki,
|
|
2410
|
+
primary: Zi,
|
|
2411
|
+
primaryHovered: to,
|
|
2412
|
+
secondary: eo,
|
|
2413
|
+
secondaryHovered: so,
|
|
2414
|
+
tertiary: no,
|
|
2415
|
+
tertiaryHovered: io,
|
|
2416
|
+
content: oo
|
|
2417
|
+
}, W = (d) => {
|
|
2418
|
+
const { children: a, onClick: e, style: s, className: n, disabled: c = !1, type: r = "Primary" } = d, { themeSettings: o } = Et();
|
|
2396
2419
|
return /* @__PURE__ */ t.jsx(
|
|
2397
2420
|
"button",
|
|
2398
2421
|
{
|
|
2399
|
-
className:
|
|
2400
|
-
[ot.primary]:
|
|
2401
|
-
[ot.secondary]:
|
|
2402
|
-
[ot.tertiary]:
|
|
2403
|
-
[ot.primaryHovered]:
|
|
2404
|
-
[ot.secondaryHovered]:
|
|
2405
|
-
[ot.tertiaryHovered]:
|
|
2422
|
+
className: V(ot.button, n, {
|
|
2423
|
+
[ot.primary]: r === "Primary",
|
|
2424
|
+
[ot.secondary]: r === "Secondary",
|
|
2425
|
+
[ot.tertiary]: r === "Tertiary",
|
|
2426
|
+
[ot.primaryHovered]: r === "Primary" && !c && o.buttons.primary.hover,
|
|
2427
|
+
[ot.secondaryHovered]: r === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2428
|
+
[ot.tertiaryHovered]: r === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2406
2429
|
}),
|
|
2407
2430
|
onClick: e,
|
|
2408
2431
|
style: {
|
|
2409
2432
|
...s
|
|
2410
2433
|
},
|
|
2411
|
-
disabled:
|
|
2412
|
-
children:
|
|
2413
|
-
|
|
2434
|
+
disabled: c,
|
|
2435
|
+
children: r === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
|
|
2436
|
+
a,
|
|
2414
2437
|
/* @__PURE__ */ t.jsx(
|
|
2415
|
-
|
|
2438
|
+
b,
|
|
2416
2439
|
{
|
|
2417
2440
|
name: "ArrowRight",
|
|
2418
2441
|
fill: "var(--icon-tertiary)",
|
|
@@ -2420,78 +2443,77 @@ const ka = (d) => {
|
|
|
2420
2443
|
height: 20
|
|
2421
2444
|
}
|
|
2422
2445
|
)
|
|
2423
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2446
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2424
2447
|
}
|
|
2425
2448
|
);
|
|
2426
2449
|
};
|
|
2427
|
-
var
|
|
2428
|
-
const
|
|
2429
|
-
var
|
|
2430
|
-
const { variants:
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
const g = setTimeout(() =>
|
|
2450
|
+
var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
|
|
2451
|
+
const Sa = (d) => {
|
|
2452
|
+
var D, I;
|
|
2453
|
+
const { variants: a } = d, [e, s] = x.useState(a[0]), [n, c] = x.useState(e.chargeTypes[0]), r = jt(), [o, i] = x.useState(1), { reset: l, addProductToCart: j, getProducts: h } = At(), [p, m] = x.useState(!1);
|
|
2454
|
+
x.useEffect(() => {
|
|
2455
|
+
m(!0);
|
|
2456
|
+
const g = setTimeout(() => m(!1), 600);
|
|
2434
2457
|
return () => clearTimeout(g);
|
|
2435
|
-
}, [
|
|
2436
|
-
async function
|
|
2437
|
-
await h(), await
|
|
2458
|
+
}, [o]);
|
|
2459
|
+
async function f() {
|
|
2460
|
+
await h(), await j({
|
|
2438
2461
|
productId: d.id,
|
|
2439
2462
|
productVariantId: e.id,
|
|
2440
|
-
quantity:
|
|
2463
|
+
quantity: o
|
|
2441
2464
|
});
|
|
2442
2465
|
}
|
|
2443
2466
|
function u() {
|
|
2444
|
-
|
|
2467
|
+
l(), f(), r("/checkout");
|
|
2445
2468
|
}
|
|
2446
|
-
function
|
|
2469
|
+
function S(g) {
|
|
2447
2470
|
if (g >= 864e5) {
|
|
2448
|
-
const
|
|
2449
|
-
return `${
|
|
2471
|
+
const P = Math.floor(g / 864e5);
|
|
2472
|
+
return `${P} ${P === 1 ? "day" : "days"}`;
|
|
2450
2473
|
} else if (g >= 36e5) {
|
|
2451
|
-
const
|
|
2452
|
-
return `${
|
|
2474
|
+
const P = Math.floor(g / 36e5);
|
|
2475
|
+
return `${P} ${P === 1 ? "hour" : "hours"}`;
|
|
2453
2476
|
} else if (g >= 6e4) {
|
|
2454
|
-
const
|
|
2455
|
-
return `${
|
|
2477
|
+
const P = Math.floor(g / 6e4);
|
|
2478
|
+
return `${P} ${P === 1 ? "minute" : "minutes"}`;
|
|
2456
2479
|
} else {
|
|
2457
|
-
const
|
|
2458
|
-
return `${
|
|
2480
|
+
const P = Math.floor(g / 1e3);
|
|
2481
|
+
return `${P} ${P === 1 ? "second" : "seconds"}`;
|
|
2459
2482
|
}
|
|
2460
2483
|
}
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
2484
|
+
return x.useEffect(() => {
|
|
2485
|
+
(e.quantity.available === 0 || !e.quantity.available) && i(0);
|
|
2486
|
+
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
|
|
2487
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
2466
2488
|
"div",
|
|
2467
2489
|
{
|
|
2468
|
-
className:
|
|
2469
|
-
[
|
|
2490
|
+
className: V(N.charge, {
|
|
2491
|
+
[N.chargeActive]: n === g
|
|
2470
2492
|
}),
|
|
2471
|
-
onClick: () =>
|
|
2472
|
-
children:
|
|
2493
|
+
onClick: () => c(g),
|
|
2494
|
+
children: zt[g]
|
|
2473
2495
|
},
|
|
2474
2496
|
g
|
|
2475
2497
|
)) }),
|
|
2476
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2477
|
-
var
|
|
2498
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: a.map((g) => {
|
|
2499
|
+
var w;
|
|
2478
2500
|
return /* @__PURE__ */ t.jsxs(
|
|
2479
2501
|
"div",
|
|
2480
2502
|
{
|
|
2481
|
-
className:
|
|
2482
|
-
[
|
|
2503
|
+
className: V(N.variant, {
|
|
2504
|
+
[N.activeVariant]: e.id === g.id
|
|
2483
2505
|
}),
|
|
2484
2506
|
onClick: () => s(g),
|
|
2485
2507
|
children: [
|
|
2486
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2487
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2508
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
|
|
2509
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: g.name }),
|
|
2488
2510
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2489
2511
|
"$",
|
|
2490
|
-
|
|
2512
|
+
n === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
2491
2513
|
] })
|
|
2492
2514
|
] }),
|
|
2493
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2494
|
-
((
|
|
2515
|
+
/* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
|
|
2516
|
+
((w = g.quantity.restrictions) == null ? void 0 : w.max) || g.quantity.available || 0,
|
|
2495
2517
|
" in stock"
|
|
2496
2518
|
] }) })
|
|
2497
2519
|
]
|
|
@@ -2499,49 +2521,50 @@ const Ia = (d) => {
|
|
|
2499
2521
|
g.id
|
|
2500
2522
|
);
|
|
2501
2523
|
}) }),
|
|
2502
|
-
|
|
2524
|
+
n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
2503
2525
|
/* @__PURE__ */ t.jsx(
|
|
2504
|
-
|
|
2526
|
+
W,
|
|
2505
2527
|
{
|
|
2506
2528
|
type: "Secondary",
|
|
2507
2529
|
onClick: () => {
|
|
2508
|
-
|
|
2530
|
+
o > 1 ? i((g) => g - 1) : i(1);
|
|
2509
2531
|
},
|
|
2510
|
-
className:
|
|
2511
|
-
disabled: e.quantity.restrictions &&
|
|
2512
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2532
|
+
className: N.button,
|
|
2533
|
+
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2534
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2513
2535
|
}
|
|
2514
2536
|
),
|
|
2515
2537
|
/* @__PURE__ */ t.jsx(
|
|
2516
|
-
|
|
2538
|
+
Qi,
|
|
2517
2539
|
{
|
|
2518
2540
|
type: "number",
|
|
2519
|
-
value: String(
|
|
2520
|
-
onChange: (g) =>
|
|
2521
|
-
max: ((
|
|
2522
|
-
min: ((
|
|
2523
|
-
centered: !0
|
|
2541
|
+
value: String(o),
|
|
2542
|
+
onChange: (g) => i(Number(g)),
|
|
2543
|
+
max: ((D = e.quantity.restrictions) == null ? void 0 : D.max) || e.quantity.available || 1 / 0,
|
|
2544
|
+
min: ((I = e.quantity.restrictions) == null ? void 0 : I.min) || 0,
|
|
2545
|
+
centered: !0,
|
|
2546
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
2524
2547
|
}
|
|
2525
2548
|
),
|
|
2526
2549
|
/* @__PURE__ */ t.jsx(
|
|
2527
|
-
|
|
2550
|
+
W,
|
|
2528
2551
|
{
|
|
2529
2552
|
type: "Secondary",
|
|
2530
2553
|
onClick: () => {
|
|
2531
|
-
|
|
2554
|
+
i((g) => g + 1);
|
|
2532
2555
|
},
|
|
2533
|
-
className:
|
|
2534
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2535
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2556
|
+
className: N.button,
|
|
2557
|
+
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
|
|
2558
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2536
2559
|
}
|
|
2537
2560
|
)
|
|
2538
2561
|
] }),
|
|
2539
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2540
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2562
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
|
|
2563
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2541
2564
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2542
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2565
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
2543
2566
|
/* @__PURE__ */ t.jsx(
|
|
2544
|
-
|
|
2567
|
+
b,
|
|
2545
2568
|
{
|
|
2546
2569
|
name: "Lightning",
|
|
2547
2570
|
fill: "#FF3F19",
|
|
@@ -2549,201 +2572,203 @@ const Ia = (d) => {
|
|
|
2549
2572
|
height: 20
|
|
2550
2573
|
}
|
|
2551
2574
|
),
|
|
2552
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2575
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : S(e.deliveryTime) })
|
|
2553
2576
|
] })
|
|
2554
2577
|
] }),
|
|
2555
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2578
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2556
2579
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2557
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2558
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2580
|
+
/* @__PURE__ */ t.jsx("div", { className: N.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2581
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2559
2582
|
"$ ",
|
|
2560
|
-
(e.price.amount || 0) *
|
|
2583
|
+
(e.price.amount || 0) * o
|
|
2561
2584
|
] }),
|
|
2562
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2585
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2563
2586
|
"$ ",
|
|
2564
|
-
(e.compareAtPrice.amount || 0) *
|
|
2587
|
+
(e.compareAtPrice.amount || 0) * o
|
|
2565
2588
|
] })
|
|
2566
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2589
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2567
2590
|
"$ ",
|
|
2568
|
-
(e.price.amount || 0) *
|
|
2569
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2570
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2591
|
+
(e.price.amount || 0) * o
|
|
2592
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2593
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2571
2594
|
"$ ",
|
|
2572
2595
|
e.subscriptionSettings.price.amount || 0
|
|
2573
2596
|
] }),
|
|
2574
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2597
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2575
2598
|
"$ ",
|
|
2576
2599
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2577
2600
|
] })
|
|
2578
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2601
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2579
2602
|
"$ ",
|
|
2580
2603
|
e.subscriptionSettings.price.amount || 0
|
|
2581
2604
|
] }) })
|
|
2582
2605
|
] })
|
|
2583
2606
|
] }),
|
|
2584
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2607
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
2585
2608
|
/* @__PURE__ */ t.jsx(
|
|
2586
|
-
|
|
2609
|
+
W,
|
|
2587
2610
|
{
|
|
2588
2611
|
type: "Primary",
|
|
2589
2612
|
onClick: () => u(),
|
|
2590
|
-
|
|
2613
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2614
|
+
children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
2591
2615
|
}
|
|
2592
2616
|
),
|
|
2593
|
-
|
|
2594
|
-
|
|
2617
|
+
n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2618
|
+
W,
|
|
2595
2619
|
{
|
|
2596
2620
|
type: "Secondary",
|
|
2597
|
-
onClick: () =>
|
|
2621
|
+
onClick: () => f(),
|
|
2622
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2598
2623
|
children: "Add to Cart"
|
|
2599
2624
|
}
|
|
2600
2625
|
)
|
|
2601
2626
|
] })
|
|
2602
2627
|
] });
|
|
2603
|
-
},
|
|
2604
|
-
button:
|
|
2605
|
-
login:
|
|
2606
|
-
signUp:
|
|
2607
|
-
buttons:
|
|
2608
|
-
modal:
|
|
2628
|
+
}, ao = "_button_1tdo3_1", co = "_login_1tdo3_14", lo = "_signUp_1tdo3_18", ro = "_buttons_1tdo3_23", uo = "_modal_1tdo3_32", _o = "_closing_1tdo3_64", mo = "_info_1tdo3_113", ho = "_top_1tdo3_120", po = "_title_1tdo3_131", xo = "_clear_1tdo3_138", go = "_activeClear_1tdo3_145", fo = "_count_1tdo3_149", bo = "_cart_1tdo3_164", vo = "_empty_1tdo3_172", jo = "_product_1tdo3_198", yo = "_products_1tdo3_207", ko = "_image_1tdo3_215", Io = "_productInfo_1tdo3_221", $o = "_content_1tdo3_228", No = "_name_1tdo3_234", wo = "_price_1tdo3_240", So = "_productButtons_1tdo3_246", Co = "_productButton_1tdo3_246", Bo = "_productCount_1tdo3_266", To = "_bottom_1tdo3_282", Po = "_subtotal_1tdo3_290", Ao = "_block_1tdo3_298", Mo = "_shoppingCount_1tdo3_305", Oo = "_total_1tdo3_325", qo = "_link_1tdo3_331", Eo = "_userInfo_1tdo3_338", Uo = "_pagesMobileModal_1tdo3_349", Do = "_pagesMobileModalContent_1tdo3_363", Ho = "_pagesMobileModalHeader_1tdo3_369", Lo = "_pagesMobileModalFooter_1tdo3_379", $ = {
|
|
2629
|
+
button: ao,
|
|
2630
|
+
login: co,
|
|
2631
|
+
signUp: lo,
|
|
2632
|
+
buttons: ro,
|
|
2633
|
+
modal: uo,
|
|
2609
2634
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2610
2635
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2611
|
-
closing:
|
|
2636
|
+
closing: _o,
|
|
2612
2637
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2613
2638
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2614
2639
|
info: mo,
|
|
2615
|
-
top:
|
|
2616
|
-
title:
|
|
2617
|
-
clear:
|
|
2618
|
-
activeClear:
|
|
2619
|
-
count:
|
|
2620
|
-
cart:
|
|
2621
|
-
empty:
|
|
2622
|
-
product:
|
|
2623
|
-
products:
|
|
2624
|
-
image:
|
|
2625
|
-
productInfo:
|
|
2626
|
-
content:
|
|
2627
|
-
name:
|
|
2628
|
-
price:
|
|
2629
|
-
productButtons:
|
|
2640
|
+
top: ho,
|
|
2641
|
+
title: po,
|
|
2642
|
+
clear: xo,
|
|
2643
|
+
activeClear: go,
|
|
2644
|
+
count: fo,
|
|
2645
|
+
cart: bo,
|
|
2646
|
+
empty: vo,
|
|
2647
|
+
product: jo,
|
|
2648
|
+
products: yo,
|
|
2649
|
+
image: ko,
|
|
2650
|
+
productInfo: Io,
|
|
2651
|
+
content: $o,
|
|
2652
|
+
name: No,
|
|
2653
|
+
price: wo,
|
|
2654
|
+
productButtons: So,
|
|
2630
2655
|
productButton: Co,
|
|
2631
2656
|
productCount: Bo,
|
|
2632
|
-
bottom:
|
|
2633
|
-
subtotal:
|
|
2634
|
-
block:
|
|
2635
|
-
shoppingCount:
|
|
2636
|
-
total:
|
|
2637
|
-
link:
|
|
2638
|
-
userInfo:
|
|
2639
|
-
pagesMobileModal:
|
|
2657
|
+
bottom: To,
|
|
2658
|
+
subtotal: Po,
|
|
2659
|
+
block: Ao,
|
|
2660
|
+
shoppingCount: Mo,
|
|
2661
|
+
total: Oo,
|
|
2662
|
+
link: qo,
|
|
2663
|
+
userInfo: Eo,
|
|
2664
|
+
pagesMobileModal: Uo,
|
|
2640
2665
|
pagesMobileModalContent: Do,
|
|
2641
|
-
pagesMobileModalHeader:
|
|
2642
|
-
pagesMobileModalFooter:
|
|
2666
|
+
pagesMobileModalHeader: Ho,
|
|
2667
|
+
pagesMobileModalFooter: Lo
|
|
2643
2668
|
};
|
|
2644
2669
|
class gt extends Error {
|
|
2645
2670
|
}
|
|
2646
2671
|
gt.prototype.name = "InvalidTokenError";
|
|
2647
2672
|
function zo(d) {
|
|
2648
|
-
return decodeURIComponent(atob(d).replace(/(.)/g, (
|
|
2673
|
+
return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
|
|
2649
2674
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2650
2675
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2651
2676
|
}));
|
|
2652
2677
|
}
|
|
2653
2678
|
function Ro(d) {
|
|
2654
|
-
let
|
|
2655
|
-
switch (
|
|
2679
|
+
let a = d.replace(/-/g, "+").replace(/_/g, "/");
|
|
2680
|
+
switch (a.length % 4) {
|
|
2656
2681
|
case 0:
|
|
2657
2682
|
break;
|
|
2658
2683
|
case 2:
|
|
2659
|
-
|
|
2684
|
+
a += "==";
|
|
2660
2685
|
break;
|
|
2661
2686
|
case 3:
|
|
2662
|
-
|
|
2687
|
+
a += "=";
|
|
2663
2688
|
break;
|
|
2664
2689
|
default:
|
|
2665
2690
|
throw new Error("base64 string is not of the correct length");
|
|
2666
2691
|
}
|
|
2667
2692
|
try {
|
|
2668
|
-
return zo(
|
|
2693
|
+
return zo(a);
|
|
2669
2694
|
} catch {
|
|
2670
|
-
return atob(
|
|
2695
|
+
return atob(a);
|
|
2671
2696
|
}
|
|
2672
2697
|
}
|
|
2673
|
-
function Fo(d,
|
|
2698
|
+
function Fo(d, a) {
|
|
2674
2699
|
if (typeof d != "string")
|
|
2675
2700
|
throw new gt("Invalid token specified: must be a string");
|
|
2676
|
-
|
|
2677
|
-
const e =
|
|
2701
|
+
a || (a = {});
|
|
2702
|
+
const e = a.header === !0 ? 0 : 1, s = d.split(".")[e];
|
|
2678
2703
|
if (typeof s != "string")
|
|
2679
2704
|
throw new gt(`Invalid token specified: missing part #${e + 1}`);
|
|
2680
|
-
let
|
|
2705
|
+
let n;
|
|
2681
2706
|
try {
|
|
2682
|
-
|
|
2683
|
-
} catch (
|
|
2684
|
-
throw new gt(`Invalid token specified: invalid base64 for part #${e + 1} (${
|
|
2707
|
+
n = Ro(s);
|
|
2708
|
+
} catch (c) {
|
|
2709
|
+
throw new gt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2685
2710
|
}
|
|
2686
2711
|
try {
|
|
2687
|
-
return JSON.parse(
|
|
2688
|
-
} catch (
|
|
2689
|
-
throw new gt(`Invalid token specified: invalid json for part #${e + 1} (${
|
|
2712
|
+
return JSON.parse(n);
|
|
2713
|
+
} catch (c) {
|
|
2714
|
+
throw new gt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2690
2715
|
}
|
|
2691
2716
|
}
|
|
2692
|
-
const
|
|
2693
|
-
const { shopping:
|
|
2717
|
+
const Ca = (d) => {
|
|
2718
|
+
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
|
|
2694
2719
|
return /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
|
|
2695
|
-
|
|
2696
|
-
s && /* @__PURE__ */ t.jsx(
|
|
2720
|
+
a && /* @__PURE__ */ t.jsx(Vo, {}),
|
|
2721
|
+
s && /* @__PURE__ */ t.jsx(Rt, { signUp: e })
|
|
2697
2722
|
] });
|
|
2698
2723
|
}, Vo = () => {
|
|
2699
|
-
const [d,
|
|
2700
|
-
function l(p) {
|
|
2701
|
-
for (let _ = 0; _ < i.parts.length; _++)
|
|
2702
|
-
for (let b = 0; b < p.variants.length; b++)
|
|
2703
|
-
if (i.parts[_].productVariantId === p.variants[_].id)
|
|
2704
|
-
return i.parts[_].productVariantId;
|
|
2705
|
-
}
|
|
2724
|
+
const [d, a] = x.useState(!1), [e, s] = x.useState([]), { cart: n, getProducts: c } = At();
|
|
2706
2725
|
function r(p) {
|
|
2707
|
-
for (let
|
|
2708
|
-
for (let
|
|
2709
|
-
if (
|
|
2710
|
-
return
|
|
2726
|
+
for (let m = 0; m < n.parts.length; m++)
|
|
2727
|
+
for (let f = 0; f < p.variants.length; f++)
|
|
2728
|
+
if (n.parts[m].productVariantId === p.variants[m].id)
|
|
2729
|
+
return n.parts[m].productVariantId;
|
|
2730
|
+
}
|
|
2731
|
+
function o(p) {
|
|
2732
|
+
for (let m = 0; m < n.parts.length; m++)
|
|
2733
|
+
for (let f = 0; f < p.variants.length; f++)
|
|
2734
|
+
if (n.parts[m].productVariantId === p.variants[m].id)
|
|
2735
|
+
return n.parts[m].quantity;
|
|
2711
2736
|
}
|
|
2712
|
-
|
|
2737
|
+
x.useEffect(() => {
|
|
2713
2738
|
(async () => {
|
|
2714
|
-
const
|
|
2715
|
-
...
|
|
2716
|
-
activeVariantId:
|
|
2717
|
-
quantity:
|
|
2739
|
+
const m = n.parts.map((S) => String(S.productId)), u = (await c([...m])).map((S) => ({
|
|
2740
|
+
...S,
|
|
2741
|
+
activeVariantId: r(S),
|
|
2742
|
+
quantity: o(S)
|
|
2718
2743
|
}));
|
|
2719
2744
|
s(u);
|
|
2720
2745
|
})();
|
|
2721
|
-
}, [
|
|
2722
|
-
function
|
|
2723
|
-
var
|
|
2724
|
-
return !p || !(p != null && p.variants) ? !1 : (
|
|
2746
|
+
}, [n.parts.length]);
|
|
2747
|
+
function i(p) {
|
|
2748
|
+
var m;
|
|
2749
|
+
return !p || !(p != null && p.variants) ? !1 : (m = p.variants.find((f) => f.id === p.activeVariantId)) == null ? void 0 : m.subscriptionSettings;
|
|
2725
2750
|
}
|
|
2726
|
-
const
|
|
2751
|
+
const l = n.parts.length > 0 && e.length > 0 && !i(e[0]), [j, h] = x.useState(!1);
|
|
2727
2752
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2728
2753
|
/* @__PURE__ */ t.jsxs(
|
|
2729
|
-
|
|
2754
|
+
W,
|
|
2730
2755
|
{
|
|
2731
2756
|
type: "Secondary",
|
|
2732
2757
|
style: {
|
|
2733
2758
|
padding: 10
|
|
2734
2759
|
},
|
|
2735
2760
|
onClick: (p) => {
|
|
2736
|
-
p.stopPropagation(), window.location.pathname !== "/admin/builder" && (
|
|
2761
|
+
p.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), h(!0));
|
|
2737
2762
|
},
|
|
2738
2763
|
children: [
|
|
2739
2764
|
/* @__PURE__ */ t.jsx(
|
|
2740
|
-
|
|
2765
|
+
b,
|
|
2741
2766
|
{
|
|
2742
2767
|
name: "Handbag",
|
|
2743
2768
|
fill: "var(--icon-primary)"
|
|
2744
2769
|
}
|
|
2745
2770
|
),
|
|
2746
|
-
|
|
2771
|
+
l && /* @__PURE__ */ t.jsx("div", { className: $.shoppingCount, children: n.parts.length })
|
|
2747
2772
|
]
|
|
2748
2773
|
}
|
|
2749
2774
|
),
|
|
@@ -2752,35 +2777,35 @@ const $a = (d) => {
|
|
|
2752
2777
|
{
|
|
2753
2778
|
close: () => {
|
|
2754
2779
|
h(!1), setTimeout(() => {
|
|
2755
|
-
|
|
2780
|
+
a(!1);
|
|
2756
2781
|
}, 300);
|
|
2757
2782
|
},
|
|
2758
2783
|
withAnimation: !1,
|
|
2759
2784
|
children: /* @__PURE__ */ t.jsx(
|
|
2760
|
-
|
|
2785
|
+
Yo,
|
|
2761
2786
|
{
|
|
2762
2787
|
activeProducts: e,
|
|
2763
|
-
isCartNotEmpty:
|
|
2764
|
-
isOpen:
|
|
2788
|
+
isCartNotEmpty: l,
|
|
2789
|
+
isOpen: j
|
|
2765
2790
|
}
|
|
2766
2791
|
)
|
|
2767
2792
|
}
|
|
2768
2793
|
)
|
|
2769
2794
|
] });
|
|
2770
|
-
},
|
|
2771
|
-
const { activeProducts:
|
|
2772
|
-
function
|
|
2773
|
-
|
|
2795
|
+
}, Yo = (d) => {
|
|
2796
|
+
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = d, { cart: n, reset: c, getTotalAndDiscount: r, updateQuantityOfProduct: o } = At(), i = jt();
|
|
2797
|
+
function l(p) {
|
|
2798
|
+
i(p);
|
|
2774
2799
|
}
|
|
2775
|
-
function
|
|
2776
|
-
|
|
2800
|
+
function j(p) {
|
|
2801
|
+
o({
|
|
2777
2802
|
productId: p.id,
|
|
2778
2803
|
productVariantId: p.activeVariantId,
|
|
2779
2804
|
quantity: p.quantity + 1
|
|
2780
2805
|
});
|
|
2781
2806
|
}
|
|
2782
2807
|
function h(p) {
|
|
2783
|
-
|
|
2808
|
+
o({
|
|
2784
2809
|
productId: p.id,
|
|
2785
2810
|
productVariantId: p.activeVariantId,
|
|
2786
2811
|
quantity: p.quantity - 1
|
|
@@ -2789,7 +2814,7 @@ const $a = (d) => {
|
|
|
2789
2814
|
return /* @__PURE__ */ t.jsxs(
|
|
2790
2815
|
"div",
|
|
2791
2816
|
{
|
|
2792
|
-
className:
|
|
2817
|
+
className: V($.modal, {
|
|
2793
2818
|
[$.closing]: !s
|
|
2794
2819
|
}),
|
|
2795
2820
|
onClick: (p) => p.stopPropagation(),
|
|
@@ -2797,22 +2822,22 @@ const $a = (d) => {
|
|
|
2797
2822
|
/* @__PURE__ */ t.jsxs("div", { className: $.top, children: [
|
|
2798
2823
|
/* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
|
|
2799
2824
|
/* @__PURE__ */ t.jsx("span", { className: $.title, children: "Cart" }),
|
|
2800
|
-
e && /* @__PURE__ */ t.jsx("div", { className: $.count, children:
|
|
2825
|
+
e && /* @__PURE__ */ t.jsx("div", { className: $.count, children: n.parts.length })
|
|
2801
2826
|
] }),
|
|
2802
2827
|
/* @__PURE__ */ t.jsx(
|
|
2803
2828
|
"button",
|
|
2804
2829
|
{
|
|
2805
|
-
className:
|
|
2830
|
+
className: V($.clear, {
|
|
2806
2831
|
[$.activeClear]: e
|
|
2807
2832
|
}),
|
|
2808
2833
|
disabled: !e,
|
|
2809
|
-
onClick:
|
|
2834
|
+
onClick: c,
|
|
2810
2835
|
children: "Clear all"
|
|
2811
2836
|
}
|
|
2812
2837
|
)
|
|
2813
2838
|
] }),
|
|
2814
2839
|
e ? /* @__PURE__ */ t.jsxs("div", { className: $.cart, children: [
|
|
2815
|
-
/* @__PURE__ */ t.jsx("div", { className: $.products, children:
|
|
2840
|
+
/* @__PURE__ */ t.jsx("div", { className: $.products, children: a.map((p) => /* @__PURE__ */ t.jsxs(
|
|
2816
2841
|
"div",
|
|
2817
2842
|
{
|
|
2818
2843
|
className: $.product,
|
|
@@ -2832,7 +2857,7 @@ const $a = (d) => {
|
|
|
2832
2857
|
/* @__PURE__ */ t.jsx("div", { className: $.name, children: p.name }),
|
|
2833
2858
|
/* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
|
|
2834
2859
|
"$",
|
|
2835
|
-
p.variants.find((
|
|
2860
|
+
p.variants.find((m) => m.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
|
|
2836
2861
|
] })
|
|
2837
2862
|
] })
|
|
2838
2863
|
] }),
|
|
@@ -2845,7 +2870,7 @@ const $a = (d) => {
|
|
|
2845
2870
|
},
|
|
2846
2871
|
className: $.productButton,
|
|
2847
2872
|
children: /* @__PURE__ */ t.jsx(
|
|
2848
|
-
|
|
2873
|
+
b,
|
|
2849
2874
|
{
|
|
2850
2875
|
name: "Minus",
|
|
2851
2876
|
fill: "#757575",
|
|
@@ -2859,10 +2884,10 @@ const $a = (d) => {
|
|
|
2859
2884
|
/* @__PURE__ */ t.jsx(
|
|
2860
2885
|
"div",
|
|
2861
2886
|
{
|
|
2862
|
-
onClick: () =>
|
|
2887
|
+
onClick: () => j(p),
|
|
2863
2888
|
className: $.productButton,
|
|
2864
2889
|
children: /* @__PURE__ */ t.jsx(
|
|
2865
|
-
|
|
2890
|
+
b,
|
|
2866
2891
|
{
|
|
2867
2892
|
name: "Plus",
|
|
2868
2893
|
fill: "#757575",
|
|
@@ -2882,7 +2907,7 @@ const $a = (d) => {
|
|
|
2882
2907
|
/* @__PURE__ */ t.jsxs("div", { className: $.block, children: [
|
|
2883
2908
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2884
2909
|
/* @__PURE__ */ t.jsx(
|
|
2885
|
-
|
|
2910
|
+
b,
|
|
2886
2911
|
{
|
|
2887
2912
|
name: "Info",
|
|
2888
2913
|
width: 20,
|
|
@@ -2893,18 +2918,18 @@ const $a = (d) => {
|
|
|
2893
2918
|
] }),
|
|
2894
2919
|
/* @__PURE__ */ t.jsxs("div", { className: $.total, children: [
|
|
2895
2920
|
"$",
|
|
2896
|
-
|
|
2921
|
+
r().total
|
|
2897
2922
|
] })
|
|
2898
2923
|
] }),
|
|
2899
|
-
/* @__PURE__ */ t.jsx(
|
|
2924
|
+
/* @__PURE__ */ t.jsx(W, { onClick: () => l("/checkout"), children: "Checkout" })
|
|
2900
2925
|
] })
|
|
2901
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2926
|
+
] }) : /* @__PURE__ */ t.jsx(Go, {})
|
|
2902
2927
|
]
|
|
2903
2928
|
}
|
|
2904
2929
|
);
|
|
2905
|
-
},
|
|
2930
|
+
}, Go = () => /* @__PURE__ */ t.jsxs("div", { className: $.empty, children: [
|
|
2906
2931
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2907
|
-
|
|
2932
|
+
b,
|
|
2908
2933
|
{
|
|
2909
2934
|
name: "Handbag",
|
|
2910
2935
|
fill: "var(--icon-secondary)"
|
|
@@ -2923,17 +2948,17 @@ const $a = (d) => {
|
|
|
2923
2948
|
}
|
|
2924
2949
|
)
|
|
2925
2950
|
] })
|
|
2926
|
-
] }),
|
|
2927
|
-
const
|
|
2928
|
-
function
|
|
2929
|
-
s(
|
|
2951
|
+
] }), Rt = ({ signUp: d }) => {
|
|
2952
|
+
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = jt();
|
|
2953
|
+
function n(o) {
|
|
2954
|
+
s(o);
|
|
2930
2955
|
}
|
|
2931
2956
|
if (!e)
|
|
2932
2957
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2933
2958
|
/* @__PURE__ */ t.jsx(
|
|
2934
|
-
|
|
2959
|
+
W,
|
|
2935
2960
|
{
|
|
2936
|
-
onClick: () =>
|
|
2961
|
+
onClick: () => n("/customer-dash"),
|
|
2937
2962
|
type: "Secondary",
|
|
2938
2963
|
style: {
|
|
2939
2964
|
padding: 10
|
|
@@ -2942,9 +2967,9 @@ const $a = (d) => {
|
|
|
2942
2967
|
}
|
|
2943
2968
|
),
|
|
2944
2969
|
d && /* @__PURE__ */ t.jsx(
|
|
2945
|
-
|
|
2970
|
+
W,
|
|
2946
2971
|
{
|
|
2947
|
-
onClick: () =>
|
|
2972
|
+
onClick: () => n("/customer-dash"),
|
|
2948
2973
|
type: "Primary",
|
|
2949
2974
|
style: {
|
|
2950
2975
|
padding: 10
|
|
@@ -2953,46 +2978,46 @@ const $a = (d) => {
|
|
|
2953
2978
|
}
|
|
2954
2979
|
)
|
|
2955
2980
|
] });
|
|
2956
|
-
const [
|
|
2957
|
-
return
|
|
2981
|
+
const [c, r] = x.useState("test-email@gmail.com");
|
|
2982
|
+
return x.useEffect(() => {
|
|
2958
2983
|
(async () => {
|
|
2959
|
-
const
|
|
2960
|
-
|
|
2984
|
+
const i = Fo(e);
|
|
2985
|
+
r(i.email);
|
|
2961
2986
|
})();
|
|
2962
2987
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
2963
2988
|
"div",
|
|
2964
2989
|
{
|
|
2965
2990
|
className: $.userInfo,
|
|
2966
|
-
onClick: () =>
|
|
2967
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2991
|
+
onClick: () => n("/customer-dash"),
|
|
2992
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2968
2993
|
}
|
|
2969
2994
|
);
|
|
2970
|
-
},
|
|
2995
|
+
}, Xo = ({
|
|
2971
2996
|
children: d,
|
|
2972
|
-
logo:
|
|
2997
|
+
logo: a,
|
|
2973
2998
|
setIsOpen: e,
|
|
2974
2999
|
signUp: s
|
|
2975
3000
|
}) => {
|
|
2976
|
-
const { setIsOpen:
|
|
2977
|
-
|
|
2978
|
-
e(!1),
|
|
3001
|
+
const { setIsOpen: n } = Ut(), c = () => {
|
|
3002
|
+
n(!1), setTimeout(() => {
|
|
3003
|
+
e(!1), n(!0);
|
|
2979
3004
|
}, 300);
|
|
2980
3005
|
};
|
|
2981
3006
|
return /* @__PURE__ */ t.jsxs(
|
|
2982
3007
|
"div",
|
|
2983
3008
|
{
|
|
2984
3009
|
className: $.pagesMobileModal,
|
|
2985
|
-
onClick: (
|
|
3010
|
+
onClick: (r) => r.stopPropagation(),
|
|
2986
3011
|
children: [
|
|
2987
3012
|
/* @__PURE__ */ t.jsxs("div", { className: $.pagesMobileModalHeader, children: [
|
|
2988
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
3013
|
+
/* @__PURE__ */ t.jsx("div", { children: a }),
|
|
2989
3014
|
/* @__PURE__ */ t.jsx(
|
|
2990
|
-
|
|
3015
|
+
W,
|
|
2991
3016
|
{
|
|
2992
3017
|
type: "Secondary",
|
|
2993
|
-
onClick:
|
|
3018
|
+
onClick: c,
|
|
2994
3019
|
children: /* @__PURE__ */ t.jsx(
|
|
2995
|
-
|
|
3020
|
+
b,
|
|
2996
3021
|
{
|
|
2997
3022
|
name: "X",
|
|
2998
3023
|
fill: "var(--icon-primary)"
|
|
@@ -3002,42 +3027,42 @@ const $a = (d) => {
|
|
|
3002
3027
|
)
|
|
3003
3028
|
] }),
|
|
3004
3029
|
/* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalContent, children: d }),
|
|
3005
|
-
/* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
3030
|
+
/* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Rt, { signUp: s }) })
|
|
3006
3031
|
]
|
|
3007
3032
|
}
|
|
3008
3033
|
);
|
|
3009
|
-
},
|
|
3034
|
+
}, Ba = ({
|
|
3010
3035
|
children: d,
|
|
3011
|
-
logo:
|
|
3036
|
+
logo: a,
|
|
3012
3037
|
signUp: e
|
|
3013
3038
|
}) => {
|
|
3014
|
-
const [s,
|
|
3039
|
+
const [s, n] = x.useState(!1);
|
|
3015
3040
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3016
|
-
/* @__PURE__ */ t.jsx(
|
|
3017
|
-
s && /* @__PURE__ */ t.jsx(Mt, { close: () =>
|
|
3018
|
-
|
|
3041
|
+
/* @__PURE__ */ t.jsx(Wo, { setIsOpenModal: n }),
|
|
3042
|
+
s && /* @__PURE__ */ t.jsx(Mt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
|
|
3043
|
+
Xo,
|
|
3019
3044
|
{
|
|
3020
|
-
logo:
|
|
3021
|
-
setIsOpen:
|
|
3045
|
+
logo: a,
|
|
3046
|
+
setIsOpen: n,
|
|
3022
3047
|
signUp: e,
|
|
3023
3048
|
children: d
|
|
3024
3049
|
}
|
|
3025
3050
|
) })
|
|
3026
3051
|
] });
|
|
3027
|
-
},
|
|
3028
|
-
const { setIsOpenModal:
|
|
3052
|
+
}, Wo = (d) => {
|
|
3053
|
+
const { setIsOpenModal: a } = d;
|
|
3029
3054
|
return /* @__PURE__ */ t.jsx(
|
|
3030
|
-
|
|
3055
|
+
W,
|
|
3031
3056
|
{
|
|
3032
3057
|
type: "Secondary",
|
|
3033
3058
|
style: {
|
|
3034
3059
|
padding: 10
|
|
3035
3060
|
},
|
|
3036
3061
|
onClick: (e) => {
|
|
3037
|
-
e.stopPropagation(),
|
|
3062
|
+
e.stopPropagation(), a(!0);
|
|
3038
3063
|
},
|
|
3039
3064
|
children: /* @__PURE__ */ t.jsx(
|
|
3040
|
-
|
|
3065
|
+
b,
|
|
3041
3066
|
{
|
|
3042
3067
|
name: "List",
|
|
3043
3068
|
fill: "var(--icon-primary)"
|
|
@@ -3045,22 +3070,22 @@ const $a = (d) => {
|
|
|
3045
3070
|
)
|
|
3046
3071
|
}
|
|
3047
3072
|
);
|
|
3048
|
-
},
|
|
3049
|
-
share:
|
|
3050
|
-
modal:
|
|
3051
|
-
header:
|
|
3052
|
-
socials:
|
|
3053
|
-
social:
|
|
3054
|
-
copy:
|
|
3055
|
-
title:
|
|
3056
|
-
copyWrapper:
|
|
3057
|
-
copyText:
|
|
3058
|
-
copyTextMobile:
|
|
3059
|
-
copyTextMiniMobile:
|
|
3060
|
-
},
|
|
3061
|
-
const { isOpenModal: d, setIsOpenModal:
|
|
3073
|
+
}, Jo = "_share_xddz7_1", Qo = "_modal_xddz7_8", Ko = "_header_xddz7_20", Zo = "_socials_xddz7_30", ta = "_social_xddz7_30", ea = "_copy_xddz7_40", sa = "_title_xddz7_47", na = "_copyWrapper_xddz7_53", ia = "_copyText_xddz7_62", oa = "_copyTextMobile_xddz7_75", aa = "_copyTextMiniMobile_xddz7_94", at = {
|
|
3074
|
+
share: Jo,
|
|
3075
|
+
modal: Qo,
|
|
3076
|
+
header: Ko,
|
|
3077
|
+
socials: Zo,
|
|
3078
|
+
social: ta,
|
|
3079
|
+
copy: ea,
|
|
3080
|
+
title: sa,
|
|
3081
|
+
copyWrapper: na,
|
|
3082
|
+
copyText: ia,
|
|
3083
|
+
copyTextMobile: oa,
|
|
3084
|
+
copyTextMiniMobile: aa
|
|
3085
|
+
}, Ta = () => {
|
|
3086
|
+
const { isOpenModal: d, setIsOpenModal: a } = Dt();
|
|
3062
3087
|
function e() {
|
|
3063
|
-
|
|
3088
|
+
a(!0);
|
|
3064
3089
|
}
|
|
3065
3090
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3066
3091
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3072,7 +3097,7 @@ const $a = (d) => {
|
|
|
3072
3097
|
},
|
|
3073
3098
|
type: "Secondary",
|
|
3074
3099
|
children: /* @__PURE__ */ t.jsx(
|
|
3075
|
-
|
|
3100
|
+
b,
|
|
3076
3101
|
{
|
|
3077
3102
|
name: "Share",
|
|
3078
3103
|
fill: "#757575",
|
|
@@ -3081,38 +3106,38 @@ const $a = (d) => {
|
|
|
3081
3106
|
)
|
|
3082
3107
|
}
|
|
3083
3108
|
),
|
|
3084
|
-
d && /* @__PURE__ */ t.jsx(Mt, { close:
|
|
3109
|
+
d && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(ca, {}) })
|
|
3085
3110
|
] });
|
|
3086
|
-
},
|
|
3087
|
-
const { setIsOpenModal: d } =
|
|
3088
|
-
function
|
|
3089
|
-
navigator.clipboard.writeText(
|
|
3111
|
+
}, ca = () => {
|
|
3112
|
+
const { setIsOpenModal: d } = Dt(), { notification: a, setNotification: e } = Yt(), { setIsOpen: s } = Ut(), n = window.location.href;
|
|
3113
|
+
function c() {
|
|
3114
|
+
navigator.clipboard.writeText(n), e({
|
|
3090
3115
|
message: "Link copied to clipboard",
|
|
3091
3116
|
status: "success"
|
|
3092
3117
|
});
|
|
3093
3118
|
}
|
|
3094
|
-
function
|
|
3119
|
+
function r() {
|
|
3095
3120
|
s(!1), setTimeout(() => {
|
|
3096
3121
|
d(!1), s(!0);
|
|
3097
3122
|
}, 300);
|
|
3098
3123
|
}
|
|
3099
|
-
function
|
|
3100
|
-
return
|
|
3124
|
+
function o(i, l) {
|
|
3125
|
+
return i.length > l ? i.slice(0, l) + "..." : i;
|
|
3101
3126
|
}
|
|
3102
3127
|
return /* @__PURE__ */ t.jsxs(
|
|
3103
3128
|
"div",
|
|
3104
3129
|
{
|
|
3105
3130
|
className: at.modal,
|
|
3106
|
-
onClick: (
|
|
3131
|
+
onClick: (i) => i.stopPropagation(),
|
|
3107
3132
|
children: [
|
|
3108
3133
|
/* @__PURE__ */ t.jsxs("div", { className: at.header, children: [
|
|
3109
3134
|
/* @__PURE__ */ t.jsx("div", { className: at.title, children: "Copy Product Link" }),
|
|
3110
3135
|
/* @__PURE__ */ t.jsx(
|
|
3111
|
-
|
|
3136
|
+
b,
|
|
3112
3137
|
{
|
|
3113
3138
|
name: "X",
|
|
3114
3139
|
fill: "#757575",
|
|
3115
|
-
onClick:
|
|
3140
|
+
onClick: r,
|
|
3116
3141
|
hoverable: !0
|
|
3117
3142
|
}
|
|
3118
3143
|
)
|
|
@@ -3122,14 +3147,14 @@ const $a = (d) => {
|
|
|
3122
3147
|
lt,
|
|
3123
3148
|
{
|
|
3124
3149
|
type: "Secondary",
|
|
3125
|
-
onClick:
|
|
3150
|
+
onClick: c,
|
|
3126
3151
|
style: {
|
|
3127
3152
|
flex: 1
|
|
3128
3153
|
},
|
|
3129
3154
|
children: [
|
|
3130
|
-
/* @__PURE__ */ t.jsx("div", { className: at.copyText, children:
|
|
3131
|
-
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children:
|
|
3132
|
-
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children:
|
|
3155
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyText, children: o(n, 100) }),
|
|
3156
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: o(n, 40) }),
|
|
3157
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children: o(n, 20) })
|
|
3133
3158
|
]
|
|
3134
3159
|
}
|
|
3135
3160
|
),
|
|
@@ -3137,70 +3162,88 @@ const $a = (d) => {
|
|
|
3137
3162
|
lt,
|
|
3138
3163
|
{
|
|
3139
3164
|
type: "Secondary",
|
|
3140
|
-
onClick:
|
|
3141
|
-
children:
|
|
3165
|
+
onClick: c,
|
|
3166
|
+
children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
3142
3167
|
}
|
|
3143
3168
|
)
|
|
3144
3169
|
] })
|
|
3145
3170
|
]
|
|
3146
3171
|
}
|
|
3147
3172
|
);
|
|
3148
|
-
},
|
|
3149
|
-
accordion:
|
|
3150
|
-
header:
|
|
3151
|
-
icon:
|
|
3152
|
-
open:
|
|
3153
|
-
content:
|
|
3154
|
-
},
|
|
3155
|
-
const [s,
|
|
3156
|
-
|
|
3173
|
+
}, la = "_accordion_1s1lq_1", ra = "_header_1s1lq_9", da = "_icon_1s1lq_18", ua = "_open_1s1lq_21", _a = "_content_1s1lq_25", xt = {
|
|
3174
|
+
accordion: la,
|
|
3175
|
+
header: ra,
|
|
3176
|
+
icon: da,
|
|
3177
|
+
open: ua,
|
|
3178
|
+
content: _a
|
|
3179
|
+
}, Pa = ({ title: d, content: a, defaultOpen: e = !1 }) => {
|
|
3180
|
+
const [s, n] = x.useState(e), [c, r] = x.useState(0), o = x.useRef(null), i = () => {
|
|
3181
|
+
n(!s);
|
|
3157
3182
|
};
|
|
3158
|
-
return
|
|
3159
|
-
|
|
3183
|
+
return x.useEffect(() => {
|
|
3184
|
+
o.current && r(s ? o.current.scrollHeight : 0);
|
|
3160
3185
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
|
|
3161
3186
|
/* @__PURE__ */ t.jsxs(
|
|
3162
3187
|
"div",
|
|
3163
3188
|
{
|
|
3164
3189
|
className: xt.header,
|
|
3165
|
-
onClick:
|
|
3190
|
+
onClick: i,
|
|
3166
3191
|
children: [
|
|
3167
3192
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
|
|
3168
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3193
|
+
/* @__PURE__ */ t.jsx("div", { className: V(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3169
3194
|
]
|
|
3170
3195
|
}
|
|
3171
3196
|
),
|
|
3172
3197
|
/* @__PURE__ */ t.jsx(
|
|
3173
3198
|
"div",
|
|
3174
3199
|
{
|
|
3175
|
-
ref:
|
|
3200
|
+
ref: o,
|
|
3176
3201
|
className: xt.content,
|
|
3177
|
-
style: { height: `${
|
|
3178
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
3202
|
+
style: { height: `${c}px` },
|
|
3203
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3179
3204
|
}
|
|
3180
3205
|
)
|
|
3181
3206
|
] });
|
|
3182
|
-
},
|
|
3183
|
-
const
|
|
3184
|
-
|
|
3207
|
+
}, Aa = ({ children: d, path: a, className: e, target: s = "_self", id: n }) => {
|
|
3208
|
+
const c = jt(), r = /^https?:\/\//.test(a), o = (i) => {
|
|
3209
|
+
r || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (i.preventDefault(), c(a, { replace: !0 }));
|
|
3185
3210
|
};
|
|
3186
3211
|
return /* @__PURE__ */ t.jsx(
|
|
3187
3212
|
"div",
|
|
3188
3213
|
{
|
|
3189
|
-
onClick:
|
|
3214
|
+
onClick: o,
|
|
3190
3215
|
className: e,
|
|
3191
3216
|
role: "link",
|
|
3192
3217
|
style: { cursor: "pointer" },
|
|
3193
|
-
id:
|
|
3218
|
+
id: n,
|
|
3194
3219
|
children: d
|
|
3195
3220
|
}
|
|
3196
3221
|
);
|
|
3197
|
-
}, ma = "
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3222
|
+
}, ma = "_buttonsBlock_1b2rb_1", ha = "_slideUp_1b2rb_1", pa = {
|
|
3223
|
+
buttonsBlock: ma,
|
|
3224
|
+
slideUp: ha
|
|
3225
|
+
}, Ma = () => /* @__PURE__ */ t.jsxs("div", { className: pa.buttonsBlock, children: [
|
|
3226
|
+
/* @__PURE__ */ t.jsx(
|
|
3227
|
+
W,
|
|
3228
|
+
{
|
|
3229
|
+
type: "Primary",
|
|
3230
|
+
style: {
|
|
3231
|
+
width: "100%"
|
|
3232
|
+
},
|
|
3233
|
+
onClick: () => {
|
|
3234
|
+
console.log("add to cart");
|
|
3235
|
+
},
|
|
3236
|
+
children: "Add to Cart"
|
|
3237
|
+
}
|
|
3238
|
+
),
|
|
3239
|
+
/* @__PURE__ */ t.jsx(W, { type: "Secondary", children: "Buy" })
|
|
3240
|
+
] }), xa = "_wrapper_st58d_1", ga = "_label_st58d_10", fa = "_textarea_st58d_18", ba = "_length_st58d_33", vt = {
|
|
3241
|
+
wrapper: xa,
|
|
3242
|
+
label: ga,
|
|
3243
|
+
textarea: fa,
|
|
3244
|
+
length: ba
|
|
3245
|
+
}, Oa = (d) => {
|
|
3246
|
+
const { onChange: a, label: e, value: s, maxLength: n, placeholder: c = "Type something..." } = d, [r, o] = x.useState(s.length);
|
|
3204
3247
|
return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
|
|
3205
3248
|
e && /* @__PURE__ */ t.jsx(
|
|
3206
3249
|
"label",
|
|
@@ -3215,54 +3258,55 @@ const $a = (d) => {
|
|
|
3215
3258
|
{
|
|
3216
3259
|
id: e,
|
|
3217
3260
|
defaultValue: s,
|
|
3218
|
-
onChange: (
|
|
3219
|
-
|
|
3261
|
+
onChange: (i) => {
|
|
3262
|
+
o(i.target.value.length), a(i.target.value);
|
|
3220
3263
|
},
|
|
3221
|
-
placeholder:
|
|
3264
|
+
placeholder: c,
|
|
3222
3265
|
className: vt.textarea,
|
|
3223
|
-
maxLength:
|
|
3266
|
+
maxLength: n
|
|
3224
3267
|
}
|
|
3225
3268
|
),
|
|
3226
|
-
|
|
3227
|
-
|
|
3269
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: vt.length, children: [
|
|
3270
|
+
r,
|
|
3228
3271
|
"/",
|
|
3229
|
-
|
|
3272
|
+
n
|
|
3230
3273
|
] })
|
|
3231
3274
|
] });
|
|
3232
3275
|
};
|
|
3233
3276
|
export {
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3277
|
+
Pa as Accordion,
|
|
3278
|
+
Wo as BurgerMenuButton,
|
|
3279
|
+
W as Button,
|
|
3280
|
+
Mn as ButtonTypeSettings,
|
|
3281
|
+
Na as ButtonsSettings,
|
|
3282
|
+
Ia as CategorySettings,
|
|
3240
3283
|
ft as ChooseImage,
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3284
|
+
Ua as ChooseImageModal,
|
|
3285
|
+
Go as EmptyCart,
|
|
3286
|
+
$a as FormSettings,
|
|
3287
|
+
Ca as HeaderButtons,
|
|
3288
|
+
b as Icon,
|
|
3246
3289
|
K as InputSettings,
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3290
|
+
Qi as InputUI,
|
|
3291
|
+
Ye as ItemsSettings,
|
|
3292
|
+
ka as LayoutSettings,
|
|
3293
|
+
Aa as Link,
|
|
3294
|
+
wa as ListingSelector,
|
|
3295
|
+
Da as Loader,
|
|
3253
3296
|
Mt as Modal,
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3297
|
+
Ba as PagesMobileMenu,
|
|
3298
|
+
Xo as PagesMobileModal,
|
|
3299
|
+
Ma as ProductCardButtons,
|
|
3300
|
+
Sa as ProductOptions,
|
|
3257
3301
|
Ot as RangeSelector,
|
|
3258
|
-
|
|
3259
|
-
|
|
3302
|
+
tt as Select,
|
|
3303
|
+
Ta as ShareLink,
|
|
3260
3304
|
Vo as ShoppingButton,
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3305
|
+
Yo as ShoppingModalCart,
|
|
3306
|
+
et as Switch,
|
|
3307
|
+
Lt as TextSettings,
|
|
3264
3308
|
qt as TextareaSettings,
|
|
3265
|
-
|
|
3309
|
+
Oa as TextareaUI,
|
|
3266
3310
|
Ht as TypesText,
|
|
3267
|
-
|
|
3311
|
+
Rt as UserInfo
|
|
3268
3312
|
};
|