@billgangcom/theme-lib 1.44.0 → 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/store/useThemeSettingsStore.d.ts +1 -1
- package/dist/builder/utils/index.d.ts +1 -0
- package/dist/builder/utils/splitTextIntoSpans.d.ts +1 -0
- package/dist/builder.cjs.js +49 -49
- package/dist/builder.es.js +1020 -1005
- package/dist/{index-CsriRi8a.js → index-CbgVRiD5.js} +396 -341
- package/dist/{index-D-lLRh8K.cjs → index-X-Olyqgp.cjs} +25 -25
- 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 +1567 -1522
- 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,10 +25,10 @@ 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
|
|
31
|
-
switch (
|
|
28
|
+
], ae = ["left", "top", "right", "bottom"], ka = (d) => {
|
|
29
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: n } = d;
|
|
30
|
+
function c(h) {
|
|
31
|
+
switch (h) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function r(h) {
|
|
49
|
+
switch (h) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -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
|
-
|
|
81
|
-
|
|
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
|
-
|
|
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
|
|
@@ -98,25 +98,25 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
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
|
}
|
|
@@ -125,10 +125,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
125
125
|
K,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[h]),
|
|
129
|
+
onChange: (p) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[h]: Number(p)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,26 +136,26 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
h
|
|
140
140
|
)) })
|
|
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:
|
|
153
|
+
block: he,
|
|
154
154
|
active: pe
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
157
|
-
function s(
|
|
158
|
-
switch (
|
|
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,33 +168,33 @@ 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",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -202,254 +202,256 @@ 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
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
219
|
-
(
|
|
220
|
-
|
|
218
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
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
|
-
onChange: (
|
|
225
|
+
onChange: (h) => s(h)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
229
|
+
/* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: i }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
232
|
qt,
|
|
233
233
|
{
|
|
234
|
-
onChange: (
|
|
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
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(pt).filter(
|
|
251
|
+
(h) => h !== pt[l]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(
|
|
253
|
+
onChange: (h) => j(
|
|
254
|
+
Object.keys(pt).find(
|
|
255
|
+
(p) => pt[p] === h
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
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
|
}) })
|
|
@@ -457,128 +459,128 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
457
459
|
}
|
|
458
460
|
);
|
|
459
461
|
}
|
|
460
|
-
),
|
|
461
|
-
other:
|
|
462
|
-
subtitle:
|
|
462
|
+
), ze = "_other_g74jx_1", Re = "_subtitle_g74jx_7", Fe = "_items_g74jx_14", It = {
|
|
463
|
+
other: ze,
|
|
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:
|
|
519
|
-
deletable:
|
|
520
|
-
addable:
|
|
521
|
-
itemsType:
|
|
522
|
-
itemsPlaceholder:
|
|
514
|
+
setItems: n,
|
|
515
|
+
other: c,
|
|
516
|
+
title: r,
|
|
517
|
+
subtitle: o,
|
|
518
|
+
editable: i = !0,
|
|
519
|
+
draggable: l = !1,
|
|
520
|
+
withImage: j = !1,
|
|
521
|
+
deletable: h = !0,
|
|
522
|
+
addable: p = !0,
|
|
523
|
+
itemsType: m,
|
|
524
|
+
itemsPlaceholder: f = "",
|
|
523
525
|
itemsOptions: u,
|
|
524
|
-
hasRangeSelector:
|
|
525
|
-
rangeSelectorOptions:
|
|
526
|
-
modalOptions:
|
|
527
|
-
addableOptions:
|
|
528
|
-
limit:
|
|
529
|
-
autoScrollInterval:
|
|
530
|
-
} = d, [
|
|
526
|
+
hasRangeSelector: S = !1,
|
|
527
|
+
rangeSelectorOptions: D,
|
|
528
|
+
modalOptions: I,
|
|
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
|
-
}), [
|
|
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:
|
|
558
|
-
left:
|
|
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,
|
|
560
|
+
left: y.left
|
|
559
561
|
});
|
|
560
562
|
}
|
|
561
|
-
}, [
|
|
562
|
-
const Z = (
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
top:
|
|
567
|
-
left:
|
|
568
|
-
}),
|
|
563
|
+
}, [B.current, y]);
|
|
564
|
+
const Z = (_, k) => {
|
|
565
|
+
_.stopPropagation();
|
|
566
|
+
const T = _.target.getBoundingClientRect();
|
|
567
|
+
M({
|
|
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:
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
|
|
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
|
-
},
|
|
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,135 +610,141 @@ 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
|
-
onChange: (
|
|
615
|
-
const dt = [...s],
|
|
616
|
-
if (!
|
|
617
|
-
const ut = dt.map((bt) => bt.id ===
|
|
618
|
-
...
|
|
619
|
-
name:
|
|
616
|
+
onChange: (A) => {
|
|
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((
|
|
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
|
-
onChange: (
|
|
635
|
-
const
|
|
636
|
-
...
|
|
637
|
-
name:
|
|
640
|
+
onChange: (A) => {
|
|
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
|
-
onChange: (
|
|
649
|
-
const
|
|
650
|
-
...
|
|
651
|
-
images:
|
|
656
|
+
onChange: (A) => {
|
|
657
|
+
const _t = [...s].map((ut) => ut.id === _.id ? {
|
|
658
|
+
..._,
|
|
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: (
|
|
674
|
+
onClick: (A) => Z(A, _)
|
|
667
675
|
}
|
|
668
676
|
) }),
|
|
669
|
-
|
|
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:
|
|
686
|
-
index:
|
|
687
|
-
children:
|
|
693
|
+
product: _,
|
|
694
|
+
index: k,
|
|
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:
|
|
717
|
-
modalOptions:
|
|
718
|
-
setIsOpenModal:
|
|
721
|
+
ref: B,
|
|
722
|
+
activeItem: R,
|
|
723
|
+
setActiveItem: C,
|
|
724
|
+
popupPosition: P,
|
|
725
|
+
modalOptions: I,
|
|
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((
|
|
739
|
-
|
|
746
|
+
) : s.map((_, k) => q(_, k)),
|
|
747
|
+
p && /* @__PURE__ */ t.jsx(
|
|
740
748
|
"div",
|
|
741
749
|
{
|
|
742
750
|
style: {
|
|
@@ -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
|
|
758
|
-
let
|
|
765
|
+
const _ = [...s];
|
|
766
|
+
let k = null;
|
|
759
767
|
if (u) {
|
|
760
|
-
for (let
|
|
761
|
-
if (!s.find((
|
|
762
|
-
|
|
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
|
-
|
|
767
|
-
name:
|
|
768
|
-
id: (
|
|
769
|
-
...
|
|
770
|
-
}) :
|
|
771
|
-
name:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
774
|
+
m === "select" && u ? _.push({
|
|
775
|
+
name: k ? k.name : u[0].name,
|
|
776
|
+
id: (k == null ? void 0 : k.id) || u[0].id,
|
|
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,60 +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:
|
|
850
|
+
addButton: hs,
|
|
839
851
|
deleteButton: ps
|
|
840
|
-
},
|
|
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:
|
|
852
|
-
itemsOptions:
|
|
853
|
-
hasRangeSelector:
|
|
854
|
-
rangeSelectorOptions:
|
|
855
|
-
limit:
|
|
856
|
-
autoScrollInterval: u
|
|
857
|
+
setItems: n,
|
|
858
|
+
other: c,
|
|
859
|
+
title: r,
|
|
860
|
+
subtitle: o,
|
|
861
|
+
draggable: i = !1,
|
|
862
|
+
withImage: l = !1,
|
|
863
|
+
addable: j = !0,
|
|
864
|
+
itemsOptions: h,
|
|
865
|
+
hasRangeSelector: p = !1,
|
|
866
|
+
rangeSelectorOptions: m,
|
|
867
|
+
limit: f,
|
|
868
|
+
autoScrollInterval: u,
|
|
869
|
+
deletable: S
|
|
857
870
|
} = d;
|
|
858
|
-
function
|
|
859
|
-
if (
|
|
860
|
-
return
|
|
871
|
+
function D(g) {
|
|
872
|
+
if (l)
|
|
873
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
861
874
|
"img",
|
|
862
875
|
{
|
|
863
|
-
src: `https://imagedelivery.net/${
|
|
876
|
+
src: `https://imagedelivery.net/${g[0]}/w=1000`,
|
|
864
877
|
alt: "image",
|
|
865
878
|
width: 16,
|
|
866
879
|
height: 16
|
|
867
880
|
}
|
|
868
881
|
) : /* @__PURE__ */ t.jsx(
|
|
869
|
-
|
|
882
|
+
b,
|
|
870
883
|
{
|
|
871
884
|
name: "Image",
|
|
872
885
|
width: 16,
|
|
@@ -875,12 +888,12 @@ const Ue = (d) => {
|
|
|
875
888
|
}
|
|
876
889
|
);
|
|
877
890
|
}
|
|
878
|
-
const
|
|
879
|
-
const
|
|
880
|
-
if (!
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
|
|
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,
|
|
884
897
|
{
|
|
885
898
|
name: "DotsSixVertical",
|
|
886
899
|
hoverable: !0,
|
|
@@ -889,28 +902,28 @@ const Ue = (d) => {
|
|
|
889
902
|
}
|
|
890
903
|
) }),
|
|
891
904
|
/* @__PURE__ */ t.jsx(
|
|
892
|
-
|
|
905
|
+
tt,
|
|
893
906
|
{
|
|
894
|
-
onChange: (
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
897
|
-
const
|
|
898
|
-
|
|
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]);
|
|
899
912
|
},
|
|
900
|
-
value:
|
|
901
|
-
options:
|
|
902
|
-
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)
|
|
903
916
|
}
|
|
904
917
|
),
|
|
905
|
-
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
906
|
-
|
|
918
|
+
w && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
919
|
+
b,
|
|
907
920
|
{
|
|
908
921
|
name: "Trash",
|
|
909
922
|
hoverable: !0,
|
|
910
923
|
width: 20,
|
|
911
924
|
height: 20,
|
|
912
925
|
fill: "#C12A2A",
|
|
913
|
-
onClick: () =>
|
|
926
|
+
onClick: () => n(s.filter((C) => C !== g))
|
|
914
927
|
}
|
|
915
928
|
) }) })
|
|
916
929
|
] });
|
|
@@ -918,27 +931,27 @@ const Ue = (d) => {
|
|
|
918
931
|
"div",
|
|
919
932
|
{
|
|
920
933
|
className: Q.product,
|
|
921
|
-
children:
|
|
934
|
+
children: R
|
|
922
935
|
},
|
|
923
|
-
|
|
936
|
+
g
|
|
924
937
|
);
|
|
925
938
|
};
|
|
926
939
|
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
927
|
-
(
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
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,
|
|
931
944
|
{
|
|
932
|
-
current:
|
|
933
|
-
onChange: (
|
|
945
|
+
current: a,
|
|
946
|
+
onChange: (g) => e == null ? void 0 : e(g)
|
|
934
947
|
}
|
|
935
948
|
)
|
|
936
949
|
] }),
|
|
937
|
-
|
|
950
|
+
p && m && /* @__PURE__ */ t.jsx(Ot, { ...m }),
|
|
938
951
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
939
|
-
|
|
940
|
-
s.map((
|
|
941
|
-
|
|
952
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: o }),
|
|
953
|
+
s.map((g) => I(g, S)),
|
|
954
|
+
j && /* @__PURE__ */ t.jsx(
|
|
942
955
|
"div",
|
|
943
956
|
{
|
|
944
957
|
style: {
|
|
@@ -951,22 +964,22 @@ const Ue = (d) => {
|
|
|
951
964
|
lt,
|
|
952
965
|
{
|
|
953
966
|
withoutHover: !0,
|
|
954
|
-
className:
|
|
955
|
-
[Q.disabled]: !!(
|
|
967
|
+
className: V(Q.button, {
|
|
968
|
+
[Q.disabled]: !!(f && f <= s.length || s.length === h.length)
|
|
956
969
|
}),
|
|
957
970
|
size: "s",
|
|
958
|
-
disabled: !!(
|
|
971
|
+
disabled: !!(f && f <= s.length || s.length === h.length),
|
|
959
972
|
onClick: () => {
|
|
960
|
-
const
|
|
961
|
-
let
|
|
962
|
-
if (
|
|
963
|
-
for (let
|
|
964
|
-
if (!s.find((
|
|
965
|
-
|
|
973
|
+
const g = [...s];
|
|
974
|
+
let w = null;
|
|
975
|
+
if (h) {
|
|
976
|
+
for (let E = 0; E < h.length; E++)
|
|
977
|
+
if (!s.find((R) => R === h[E].id)) {
|
|
978
|
+
w = h[E];
|
|
966
979
|
break;
|
|
967
980
|
}
|
|
968
981
|
}
|
|
969
|
-
|
|
982
|
+
g.push((w == null ? void 0 : w.id) || h[0].id), n(g);
|
|
970
983
|
},
|
|
971
984
|
style: {
|
|
972
985
|
width: "fit-content"
|
|
@@ -974,7 +987,7 @@ const Ue = (d) => {
|
|
|
974
987
|
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
975
988
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
976
989
|
/* @__PURE__ */ t.jsx(
|
|
977
|
-
|
|
990
|
+
b,
|
|
978
991
|
{
|
|
979
992
|
name: "Plus",
|
|
980
993
|
width: 16,
|
|
@@ -987,14 +1000,14 @@ const Ue = (d) => {
|
|
|
987
1000
|
}
|
|
988
1001
|
)
|
|
989
1002
|
] }),
|
|
990
|
-
|
|
1003
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c }),
|
|
991
1004
|
u !== void 0 && /* @__PURE__ */ t.jsx(
|
|
992
1005
|
K,
|
|
993
1006
|
{
|
|
994
1007
|
label: "Auto scroll interval",
|
|
995
1008
|
type: "number",
|
|
996
1009
|
value: String(u.scrollInterval),
|
|
997
|
-
onChange: (
|
|
1010
|
+
onChange: (g) => u.setScrollInterval(Number(g)),
|
|
998
1011
|
min: 0.1,
|
|
999
1012
|
max: 100,
|
|
1000
1013
|
style: {
|
|
@@ -1004,176 +1017,175 @@ const Ue = (d) => {
|
|
|
1004
1017
|
}
|
|
1005
1018
|
)
|
|
1006
1019
|
] });
|
|
1007
|
-
},
|
|
1008
|
-
title:
|
|
1009
|
-
subtitle:
|
|
1010
|
-
header:
|
|
1011
|
-
text:
|
|
1012
|
-
productsBlock:
|
|
1013
|
-
top:
|
|
1014
|
-
itemsBlock:
|
|
1015
|
-
typeTexts:
|
|
1016
|
-
block:
|
|
1017
|
-
active:
|
|
1018
|
-
products:
|
|
1019
|
-
product:
|
|
1020
|
-
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,
|
|
1021
1034
|
disabled: Cs,
|
|
1022
1035
|
image: Bs,
|
|
1023
|
-
info:
|
|
1024
|
-
name:
|
|
1025
|
-
buttons:
|
|
1026
|
-
modal:
|
|
1027
|
-
link:
|
|
1028
|
-
modalOptions:
|
|
1029
|
-
addButton:
|
|
1030
|
-
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,
|
|
1031
1044
|
closeIcon: Ds
|
|
1032
|
-
},
|
|
1033
|
-
(d,
|
|
1034
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
1035
|
-
function r(n, c) {
|
|
1036
|
-
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1037
|
-
}
|
|
1045
|
+
}, Hs = x.forwardRef(
|
|
1046
|
+
(d, a) => {
|
|
1047
|
+
const { activeItem: e, setActiveItem: s, popupPosition: n, modalOptions: c, setIsOpenModal: r } = d;
|
|
1038
1048
|
return /* @__PURE__ */ t.jsxs(
|
|
1039
1049
|
"div",
|
|
1040
1050
|
{
|
|
1041
|
-
ref:
|
|
1051
|
+
ref: a,
|
|
1042
1052
|
className: z.modal,
|
|
1043
|
-
onClick: (
|
|
1044
|
-
|
|
1053
|
+
onClick: (o) => {
|
|
1054
|
+
o.stopPropagation();
|
|
1045
1055
|
},
|
|
1046
1056
|
style: {
|
|
1047
|
-
top: `${
|
|
1048
|
-
left: `${
|
|
1057
|
+
top: `${n.top}px`,
|
|
1058
|
+
left: `${n.left}px`
|
|
1049
1059
|
},
|
|
1050
1060
|
children: [
|
|
1051
1061
|
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
1052
|
-
/* @__PURE__ */ t.jsx("h3", { className: z.title, children:
|
|
1062
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: e.name["en-US"] }),
|
|
1053
1063
|
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1054
|
-
|
|
1064
|
+
b,
|
|
1055
1065
|
{
|
|
1056
1066
|
name: "X",
|
|
1057
1067
|
height: 20,
|
|
1058
1068
|
width: 20,
|
|
1059
1069
|
hoverable: !0,
|
|
1060
1070
|
onClick: () => {
|
|
1061
|
-
s(null),
|
|
1071
|
+
s(null), r(!1);
|
|
1062
1072
|
}
|
|
1063
1073
|
}
|
|
1064
1074
|
) })
|
|
1065
1075
|
] }),
|
|
1066
|
-
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children:
|
|
1067
|
-
if (
|
|
1076
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((o) => {
|
|
1077
|
+
if (o.type === "image")
|
|
1068
1078
|
return /* @__PURE__ */ t.jsx(
|
|
1069
1079
|
ft,
|
|
1070
1080
|
{
|
|
1071
1081
|
label: "Put up an attractive image",
|
|
1072
|
-
activeImage: e[
|
|
1073
|
-
onChange: (
|
|
1074
|
-
const
|
|
1082
|
+
activeImage: e[o.field],
|
|
1083
|
+
onChange: (i) => {
|
|
1084
|
+
const l = {
|
|
1075
1085
|
...e,
|
|
1076
|
-
[
|
|
1086
|
+
[o.field]: i
|
|
1077
1087
|
};
|
|
1078
|
-
s(
|
|
1088
|
+
s(l);
|
|
1079
1089
|
}
|
|
1080
1090
|
},
|
|
1081
|
-
String(
|
|
1091
|
+
String(o.field)
|
|
1082
1092
|
);
|
|
1083
|
-
if (
|
|
1093
|
+
if (o.type === "text")
|
|
1084
1094
|
return /* @__PURE__ */ t.jsx(
|
|
1085
|
-
|
|
1095
|
+
Lt,
|
|
1086
1096
|
{
|
|
1087
|
-
typesText: e[
|
|
1088
|
-
setTypesText: (
|
|
1089
|
-
const
|
|
1097
|
+
typesText: e[o.field.type],
|
|
1098
|
+
setTypesText: (i) => {
|
|
1099
|
+
const l = {
|
|
1090
1100
|
...e,
|
|
1091
|
-
[
|
|
1101
|
+
[o.field.type]: i
|
|
1092
1102
|
};
|
|
1093
|
-
s(
|
|
1103
|
+
s(l);
|
|
1094
1104
|
},
|
|
1095
|
-
text: e[
|
|
1096
|
-
setText: (
|
|
1097
|
-
const
|
|
1105
|
+
text: e[o.field.text]["en-US"] || "",
|
|
1106
|
+
setText: (i) => {
|
|
1107
|
+
const l = {
|
|
1098
1108
|
...e,
|
|
1099
|
-
[
|
|
1109
|
+
[o.field.text]: {
|
|
1110
|
+
"en-US": i
|
|
1111
|
+
}
|
|
1100
1112
|
};
|
|
1101
|
-
s(
|
|
1113
|
+
s(l);
|
|
1102
1114
|
},
|
|
1103
|
-
typeFont: e[
|
|
1104
|
-
setTypeFont: (
|
|
1105
|
-
const
|
|
1115
|
+
typeFont: e[o.field.type],
|
|
1116
|
+
setTypeFont: (i) => {
|
|
1117
|
+
const l = {
|
|
1106
1118
|
...e,
|
|
1107
|
-
[
|
|
1119
|
+
[o.field.type]: i
|
|
1108
1120
|
};
|
|
1109
|
-
s(
|
|
1121
|
+
s(l);
|
|
1110
1122
|
},
|
|
1111
|
-
subtitle:
|
|
1123
|
+
subtitle: o.label
|
|
1112
1124
|
}
|
|
1113
1125
|
);
|
|
1114
|
-
if (
|
|
1126
|
+
if (o.type === "input")
|
|
1115
1127
|
return /* @__PURE__ */ t.jsx(
|
|
1116
1128
|
K,
|
|
1117
1129
|
{
|
|
1118
|
-
onChange: (
|
|
1119
|
-
const
|
|
1130
|
+
onChange: (i) => {
|
|
1131
|
+
const l = {
|
|
1120
1132
|
...e,
|
|
1121
|
-
[
|
|
1133
|
+
[o.field]: i
|
|
1122
1134
|
};
|
|
1123
|
-
s(
|
|
1135
|
+
s(l);
|
|
1124
1136
|
},
|
|
1125
|
-
value: e[
|
|
1126
|
-
label:
|
|
1127
|
-
placeholder:
|
|
1137
|
+
value: e[o.field] || "",
|
|
1138
|
+
label: o.label,
|
|
1139
|
+
placeholder: o.placeholder
|
|
1128
1140
|
}
|
|
1129
1141
|
);
|
|
1130
|
-
if (
|
|
1142
|
+
if (o.type === "inputSwitch")
|
|
1131
1143
|
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
1132
1144
|
/* @__PURE__ */ t.jsx(
|
|
1133
1145
|
K,
|
|
1134
1146
|
{
|
|
1135
|
-
onChange: (
|
|
1136
|
-
const
|
|
1147
|
+
onChange: (i) => {
|
|
1148
|
+
const l = {
|
|
1137
1149
|
...e,
|
|
1138
|
-
[
|
|
1150
|
+
[o.field.text]: i
|
|
1139
1151
|
};
|
|
1140
|
-
s(
|
|
1152
|
+
s(l);
|
|
1141
1153
|
},
|
|
1142
|
-
value: e[
|
|
1143
|
-
label:
|
|
1144
|
-
placeholder:
|
|
1154
|
+
value: e[o.field.text] || "",
|
|
1155
|
+
label: o.inputLabel,
|
|
1156
|
+
placeholder: o.placeholder
|
|
1145
1157
|
}
|
|
1146
1158
|
),
|
|
1147
1159
|
/* @__PURE__ */ t.jsx(
|
|
1148
|
-
|
|
1160
|
+
et,
|
|
1149
1161
|
{
|
|
1150
|
-
current: !!e[
|
|
1151
|
-
label:
|
|
1152
|
-
onChange: (
|
|
1153
|
-
const
|
|
1162
|
+
current: !!e[o.field.switch] || !1,
|
|
1163
|
+
label: o.switchLabel,
|
|
1164
|
+
onChange: (i) => {
|
|
1165
|
+
const l = {
|
|
1154
1166
|
...e,
|
|
1155
|
-
[
|
|
1167
|
+
[o.field.switch]: i
|
|
1156
1168
|
};
|
|
1157
|
-
s(
|
|
1169
|
+
s(l);
|
|
1158
1170
|
}
|
|
1159
1171
|
}
|
|
1160
1172
|
)
|
|
1161
1173
|
] });
|
|
1162
|
-
if (
|
|
1174
|
+
if (o.type === "select")
|
|
1163
1175
|
return /* @__PURE__ */ t.jsx(
|
|
1164
|
-
|
|
1176
|
+
tt,
|
|
1165
1177
|
{
|
|
1166
|
-
options:
|
|
1167
|
-
onChange: (
|
|
1168
|
-
const
|
|
1178
|
+
options: o.itemsOptions,
|
|
1179
|
+
onChange: (i) => {
|
|
1180
|
+
const l = {
|
|
1169
1181
|
...e,
|
|
1170
|
-
[
|
|
1182
|
+
[o.field]: i
|
|
1171
1183
|
};
|
|
1172
|
-
s(
|
|
1184
|
+
s(l);
|
|
1173
1185
|
},
|
|
1174
|
-
label:
|
|
1175
|
-
value: e[
|
|
1176
|
-
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] })
|
|
1177
1189
|
}
|
|
1178
1190
|
);
|
|
1179
1191
|
}) })
|
|
@@ -1182,98 +1194,98 @@ const Ue = (d) => {
|
|
|
1182
1194
|
);
|
|
1183
1195
|
}
|
|
1184
1196
|
);
|
|
1185
|
-
function
|
|
1186
|
-
const { product:
|
|
1187
|
-
id:
|
|
1188
|
-
}),
|
|
1189
|
-
transform: Pt.Transform.toString(
|
|
1190
|
-
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
|
|
1191
1203
|
};
|
|
1192
1204
|
return /* @__PURE__ */ t.jsx(
|
|
1193
1205
|
"div",
|
|
1194
1206
|
{
|
|
1195
|
-
ref:
|
|
1196
|
-
style:
|
|
1197
|
-
className: `${z.product} ${
|
|
1207
|
+
ref: c,
|
|
1208
|
+
style: l,
|
|
1209
|
+
className: `${z.product} ${i ? z.dragging : ""}`,
|
|
1198
1210
|
...s,
|
|
1199
|
-
...
|
|
1211
|
+
...n,
|
|
1200
1212
|
children: e
|
|
1201
1213
|
}
|
|
1202
1214
|
);
|
|
1203
1215
|
}
|
|
1204
|
-
const
|
|
1216
|
+
const $a = (d) => {
|
|
1205
1217
|
const {
|
|
1206
|
-
isActiveItems:
|
|
1218
|
+
isActiveItems: a,
|
|
1207
1219
|
setIsActiveItems: e,
|
|
1208
1220
|
items: s,
|
|
1209
|
-
setItems:
|
|
1210
|
-
other:
|
|
1211
|
-
title:
|
|
1212
|
-
subtitle:
|
|
1213
|
-
editable:
|
|
1214
|
-
draggable:
|
|
1215
|
-
withImage:
|
|
1216
|
-
deletable:
|
|
1217
|
-
addable:
|
|
1218
|
-
itemsType:
|
|
1219
|
-
itemsPlaceholder:
|
|
1221
|
+
setItems: n,
|
|
1222
|
+
other: c,
|
|
1223
|
+
title: r,
|
|
1224
|
+
subtitle: o,
|
|
1225
|
+
editable: i = !0,
|
|
1226
|
+
draggable: l = !1,
|
|
1227
|
+
withImage: j = !1,
|
|
1228
|
+
deletable: h = !0,
|
|
1229
|
+
addable: p = !0,
|
|
1230
|
+
itemsType: m,
|
|
1231
|
+
itemsPlaceholder: f = "",
|
|
1220
1232
|
itemsOptions: u,
|
|
1221
|
-
hasRangeSelector:
|
|
1222
|
-
rangeSelectorOptions:
|
|
1223
|
-
modalOptions:
|
|
1224
|
-
addableOptions:
|
|
1225
|
-
} = d, [
|
|
1233
|
+
hasRangeSelector: S = !1,
|
|
1234
|
+
rangeSelectorOptions: D,
|
|
1235
|
+
modalOptions: I,
|
|
1236
|
+
addableOptions: g = {}
|
|
1237
|
+
} = d, [w, E] = x.useState(null), [R, C] = x.useState({
|
|
1226
1238
|
top: 0,
|
|
1227
1239
|
left: 0
|
|
1228
|
-
}), [
|
|
1229
|
-
Nt(
|
|
1240
|
+
}), [P, st] = x.useState(null), y = x.useRef(null), [M, B] = x.useState(!1), X = $t(
|
|
1241
|
+
Nt(Bt, {
|
|
1230
1242
|
activationConstraint: {
|
|
1231
1243
|
distance: 5
|
|
1232
1244
|
}
|
|
1233
1245
|
})
|
|
1234
1246
|
);
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
|
|
1247
|
+
x.useEffect(() => {
|
|
1248
|
+
const v = () => {
|
|
1249
|
+
E(null), B(!1);
|
|
1238
1250
|
};
|
|
1239
|
-
return document.body.addEventListener("click",
|
|
1240
|
-
|
|
1251
|
+
return document.body.addEventListener("click", v), E(null), B(!1), () => {
|
|
1252
|
+
E(null), B(!1), document.body.removeEventListener("click", v);
|
|
1241
1253
|
};
|
|
1242
|
-
}, []),
|
|
1243
|
-
if (
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1254
|
+
}, []), x.useEffect(() => {
|
|
1255
|
+
if (w) {
|
|
1256
|
+
const v = [...s].map((q) => q.id === w.id ? w : q);
|
|
1257
|
+
n(v);
|
|
1246
1258
|
}
|
|
1247
|
-
}, [
|
|
1248
|
-
if (
|
|
1249
|
-
const
|
|
1250
|
-
let
|
|
1251
|
-
|
|
1252
|
-
top:
|
|
1253
|
-
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
|
|
1254
1266
|
});
|
|
1255
1267
|
}
|
|
1256
|
-
}, [
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
top:
|
|
1262
|
-
left:
|
|
1263
|
-
}),
|
|
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);
|
|
1264
1276
|
};
|
|
1265
|
-
function
|
|
1266
|
-
if (
|
|
1267
|
-
return
|
|
1277
|
+
function L(v) {
|
|
1278
|
+
if (j)
|
|
1279
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
1268
1280
|
"img",
|
|
1269
1281
|
{
|
|
1270
|
-
src: `https://imagedelivery.net/${
|
|
1282
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
1271
1283
|
alt: "image",
|
|
1272
1284
|
width: 16,
|
|
1273
1285
|
height: 16
|
|
1274
1286
|
}
|
|
1275
1287
|
) : /* @__PURE__ */ t.jsx(
|
|
1276
|
-
|
|
1288
|
+
b,
|
|
1277
1289
|
{
|
|
1278
1290
|
name: "Image",
|
|
1279
1291
|
width: 16,
|
|
@@ -1282,20 +1294,20 @@ const ja = (d) => {
|
|
|
1282
1294
|
}
|
|
1283
1295
|
);
|
|
1284
1296
|
}
|
|
1285
|
-
const Z = (
|
|
1286
|
-
const { active:
|
|
1287
|
-
if (
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
const
|
|
1291
|
-
|
|
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);
|
|
1292
1304
|
}
|
|
1293
1305
|
}
|
|
1294
|
-
}, rt = (
|
|
1295
|
-
var
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
|
|
1306
|
+
}, rt = (v) => {
|
|
1307
|
+
var _;
|
|
1308
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1309
|
+
l && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1310
|
+
b,
|
|
1299
1311
|
{
|
|
1300
1312
|
name: "DotsSixVertical",
|
|
1301
1313
|
hoverable: !0,
|
|
@@ -1303,132 +1315,140 @@ const ja = (d) => {
|
|
|
1303
1315
|
height: 20
|
|
1304
1316
|
}
|
|
1305
1317
|
) }),
|
|
1306
|
-
|
|
1307
|
-
|
|
1318
|
+
m === "select" && u && /* @__PURE__ */ t.jsx(
|
|
1319
|
+
tt,
|
|
1308
1320
|
{
|
|
1309
|
-
onChange: (
|
|
1310
|
-
const
|
|
1311
|
-
...
|
|
1312
|
-
name:
|
|
1321
|
+
onChange: (k) => {
|
|
1322
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1323
|
+
...v,
|
|
1324
|
+
name: {
|
|
1325
|
+
"en-US": k
|
|
1326
|
+
}
|
|
1313
1327
|
} : Y);
|
|
1314
|
-
|
|
1315
|
-
...
|
|
1316
|
-
name:
|
|
1317
|
-
|
|
1328
|
+
E({
|
|
1329
|
+
...v,
|
|
1330
|
+
name: {
|
|
1331
|
+
"en-US": k
|
|
1332
|
+
}
|
|
1333
|
+
}), n([...U]);
|
|
1318
1334
|
},
|
|
1319
|
-
value:
|
|
1320
|
-
options: u.filter(
|
|
1321
|
-
|
|
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)
|
|
1322
1340
|
}
|
|
1323
1341
|
),
|
|
1324
|
-
|
|
1342
|
+
m === "input" && /* @__PURE__ */ t.jsx(
|
|
1325
1343
|
K,
|
|
1326
1344
|
{
|
|
1327
|
-
onChange: (
|
|
1328
|
-
const
|
|
1329
|
-
...
|
|
1330
|
-
name:
|
|
1345
|
+
onChange: (k) => {
|
|
1346
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1347
|
+
...v,
|
|
1348
|
+
name: {
|
|
1349
|
+
"en-US": k
|
|
1350
|
+
}
|
|
1331
1351
|
} : Y);
|
|
1332
|
-
|
|
1352
|
+
n([...U]);
|
|
1333
1353
|
},
|
|
1334
|
-
value:
|
|
1335
|
-
placeholder:
|
|
1354
|
+
value: v.name["en-US"],
|
|
1355
|
+
placeholder: f
|
|
1336
1356
|
}
|
|
1337
1357
|
),
|
|
1338
|
-
|
|
1358
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
1339
1359
|
ft,
|
|
1340
1360
|
{
|
|
1341
|
-
onChange: (
|
|
1342
|
-
const
|
|
1343
|
-
...
|
|
1344
|
-
images:
|
|
1361
|
+
onChange: (k) => {
|
|
1362
|
+
const U = [...s].map((Y) => Y.id === v.id ? {
|
|
1363
|
+
...v,
|
|
1364
|
+
images: k
|
|
1345
1365
|
} : Y);
|
|
1346
|
-
|
|
1366
|
+
n([...U]);
|
|
1347
1367
|
},
|
|
1348
|
-
activeImage: (
|
|
1368
|
+
activeImage: (_ = s.find((k) => k.id === v.id)) == null ? void 0 : _.images[0]
|
|
1349
1369
|
}
|
|
1350
1370
|
),
|
|
1351
1371
|
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
1352
|
-
|
|
1353
|
-
|
|
1372
|
+
i && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1373
|
+
b,
|
|
1354
1374
|
{
|
|
1355
1375
|
name: "Sliders",
|
|
1356
1376
|
hoverable: !0,
|
|
1357
1377
|
width: 20,
|
|
1358
1378
|
height: 20,
|
|
1359
|
-
onClick: (
|
|
1379
|
+
onClick: (k) => O(k, v)
|
|
1360
1380
|
}
|
|
1361
1381
|
) }),
|
|
1362
|
-
|
|
1363
|
-
|
|
1382
|
+
h && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1383
|
+
b,
|
|
1364
1384
|
{
|
|
1365
1385
|
name: "Trash",
|
|
1366
1386
|
hoverable: !0,
|
|
1367
1387
|
width: 20,
|
|
1368
1388
|
height: 20,
|
|
1369
1389
|
fill: "#C12A2A",
|
|
1370
|
-
onClick: () =>
|
|
1390
|
+
onClick: () => n(s.filter((k) => k.id !== v.id))
|
|
1371
1391
|
}
|
|
1372
1392
|
) })
|
|
1373
1393
|
] })
|
|
1374
1394
|
] });
|
|
1375
|
-
return
|
|
1376
|
-
|
|
1395
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
1396
|
+
Ls,
|
|
1377
1397
|
{
|
|
1378
|
-
product:
|
|
1379
|
-
children:
|
|
1398
|
+
product: v,
|
|
1399
|
+
children: q
|
|
1380
1400
|
},
|
|
1381
|
-
|
|
1401
|
+
v.id
|
|
1382
1402
|
) : /* @__PURE__ */ t.jsx(
|
|
1383
1403
|
"div",
|
|
1384
1404
|
{
|
|
1385
1405
|
className: z.product,
|
|
1386
|
-
children:
|
|
1406
|
+
children: q
|
|
1387
1407
|
},
|
|
1388
|
-
|
|
1408
|
+
v.id
|
|
1389
1409
|
);
|
|
1390
1410
|
};
|
|
1391
1411
|
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
1392
|
-
(
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
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,
|
|
1396
1416
|
{
|
|
1397
|
-
current:
|
|
1398
|
-
onChange: (
|
|
1417
|
+
current: a,
|
|
1418
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
1399
1419
|
}
|
|
1400
1420
|
)
|
|
1401
1421
|
] }),
|
|
1402
|
-
|
|
1403
|
-
|
|
1422
|
+
w && i && I && M && /* @__PURE__ */ t.jsx(
|
|
1423
|
+
Hs,
|
|
1404
1424
|
{
|
|
1405
|
-
ref:
|
|
1406
|
-
activeItem:
|
|
1407
|
-
setActiveItem:
|
|
1408
|
-
popupPosition:
|
|
1409
|
-
modalOptions:
|
|
1410
|
-
setIsOpenModal:
|
|
1425
|
+
ref: y,
|
|
1426
|
+
activeItem: w,
|
|
1427
|
+
setActiveItem: E,
|
|
1428
|
+
popupPosition: R,
|
|
1429
|
+
modalOptions: I,
|
|
1430
|
+
setIsOpenModal: B
|
|
1411
1431
|
}
|
|
1412
1432
|
),
|
|
1413
|
-
|
|
1433
|
+
S && D && /* @__PURE__ */ t.jsx(Ot, { ...D }),
|
|
1414
1434
|
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
1415
|
-
|
|
1416
|
-
|
|
1435
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
1436
|
+
l ? /* @__PURE__ */ t.jsx(
|
|
1417
1437
|
wt,
|
|
1418
1438
|
{
|
|
1419
|
-
sensors:
|
|
1439
|
+
sensors: X,
|
|
1420
1440
|
onDragEnd: Z,
|
|
1421
1441
|
children: /* @__PURE__ */ t.jsx(
|
|
1422
|
-
|
|
1442
|
+
St,
|
|
1423
1443
|
{
|
|
1424
|
-
items: s.map((
|
|
1425
|
-
strategy:
|
|
1426
|
-
children: s.map((
|
|
1444
|
+
items: s.map((v) => v.id),
|
|
1445
|
+
strategy: Ct,
|
|
1446
|
+
children: s.map((v) => rt(v))
|
|
1427
1447
|
}
|
|
1428
1448
|
)
|
|
1429
1449
|
}
|
|
1430
|
-
) : s.map((
|
|
1431
|
-
|
|
1450
|
+
) : s.map((v) => rt(v)),
|
|
1451
|
+
p && /* @__PURE__ */ t.jsx(
|
|
1432
1452
|
"div",
|
|
1433
1453
|
{
|
|
1434
1454
|
style: {
|
|
@@ -1443,32 +1463,38 @@ const ja = (d) => {
|
|
|
1443
1463
|
className: z.button,
|
|
1444
1464
|
size: "s",
|
|
1445
1465
|
onClick: () => {
|
|
1446
|
-
const
|
|
1447
|
-
let
|
|
1466
|
+
const v = [...s];
|
|
1467
|
+
let q = null;
|
|
1448
1468
|
if (u) {
|
|
1449
|
-
for (let
|
|
1450
|
-
if (!s.find((
|
|
1451
|
-
|
|
1469
|
+
for (let _ = 0; _ < u.length; _++)
|
|
1470
|
+
if (!s.find((k) => k.name["en-US"] === u[_])) {
|
|
1471
|
+
q = u[_];
|
|
1452
1472
|
break;
|
|
1453
1473
|
}
|
|
1454
1474
|
}
|
|
1455
|
-
|
|
1456
|
-
name:
|
|
1457
|
-
|
|
1458
|
-
|
|
1475
|
+
m === "select" && u ? v.push({
|
|
1476
|
+
name: {
|
|
1477
|
+
"en-US": q || u[0]
|
|
1478
|
+
},
|
|
1479
|
+
id: mt(),
|
|
1480
|
+
...g,
|
|
1459
1481
|
maxSymbols: 100
|
|
1460
1482
|
// пример значения
|
|
1461
|
-
}) :
|
|
1462
|
-
name:
|
|
1463
|
-
|
|
1464
|
-
|
|
1483
|
+
}) : m === "input" ? v.push({
|
|
1484
|
+
name: {
|
|
1485
|
+
"en-US": ""
|
|
1486
|
+
},
|
|
1487
|
+
id: mt(),
|
|
1488
|
+
...g,
|
|
1465
1489
|
maxSymbols: 100
|
|
1466
|
-
}) :
|
|
1467
|
-
name:
|
|
1468
|
-
|
|
1469
|
-
|
|
1490
|
+
}) : v.push({
|
|
1491
|
+
name: {
|
|
1492
|
+
"en-US": `Image ${s.length + 1}`
|
|
1493
|
+
},
|
|
1494
|
+
id: mt(),
|
|
1495
|
+
...g,
|
|
1470
1496
|
maxSymbols: 100
|
|
1471
|
-
}),
|
|
1497
|
+
}), n(v);
|
|
1472
1498
|
},
|
|
1473
1499
|
style: {
|
|
1474
1500
|
width: "fit-content"
|
|
@@ -1476,7 +1502,7 @@ const ja = (d) => {
|
|
|
1476
1502
|
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
1477
1503
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1478
1504
|
/* @__PURE__ */ t.jsx(
|
|
1479
|
-
|
|
1505
|
+
b,
|
|
1480
1506
|
{
|
|
1481
1507
|
name: "Plus",
|
|
1482
1508
|
width: 16,
|
|
@@ -1489,62 +1515,62 @@ const ja = (d) => {
|
|
|
1489
1515
|
}
|
|
1490
1516
|
)
|
|
1491
1517
|
] }),
|
|
1492
|
-
|
|
1518
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
|
|
1493
1519
|
] });
|
|
1494
|
-
},
|
|
1495
|
-
title:
|
|
1496
|
-
subtitle:
|
|
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 = {
|
|
1521
|
+
title: zs,
|
|
1522
|
+
subtitle: Rs,
|
|
1497
1523
|
header: Fs,
|
|
1498
1524
|
text: Vs,
|
|
1499
|
-
productsBlock:
|
|
1500
|
-
buttonsBlock:
|
|
1501
|
-
top:
|
|
1502
|
-
itemsBlock:
|
|
1503
|
-
typeTexts:
|
|
1504
|
-
block:
|
|
1505
|
-
active:
|
|
1506
|
-
products:
|
|
1507
|
-
product:
|
|
1508
|
-
button:
|
|
1509
|
-
image:
|
|
1510
|
-
info:
|
|
1511
|
-
name:
|
|
1512
|
-
buttons:
|
|
1513
|
-
modal:
|
|
1514
|
-
other:
|
|
1515
|
-
options:
|
|
1516
|
-
closeIcon:
|
|
1517
|
-
},
|
|
1518
|
-
const { activeButton: e, setActiveButton: s, popupPosition:
|
|
1519
|
-
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(() => {
|
|
1520
1546
|
s({
|
|
1521
1547
|
...e,
|
|
1522
1548
|
...{
|
|
1523
|
-
text:
|
|
1524
|
-
link:
|
|
1525
|
-
destination:
|
|
1526
|
-
typesText:
|
|
1527
|
-
page:
|
|
1549
|
+
text: m,
|
|
1550
|
+
link: h,
|
|
1551
|
+
destination: o,
|
|
1552
|
+
typesText: c,
|
|
1553
|
+
page: l,
|
|
1528
1554
|
openInNewTab: u
|
|
1529
1555
|
}
|
|
1530
1556
|
});
|
|
1531
|
-
}, [
|
|
1557
|
+
}, [c, o, h, m, l, u]), /* @__PURE__ */ t.jsxs(
|
|
1532
1558
|
"div",
|
|
1533
1559
|
{
|
|
1534
1560
|
className: ct.modal,
|
|
1535
|
-
onClick: (
|
|
1536
|
-
|
|
1561
|
+
onClick: (I) => {
|
|
1562
|
+
I.stopPropagation();
|
|
1537
1563
|
},
|
|
1538
1564
|
style: {
|
|
1539
|
-
top: `${
|
|
1540
|
-
left: `${
|
|
1565
|
+
top: `${n.top}px`,
|
|
1566
|
+
left: `${n.left}px`
|
|
1541
1567
|
},
|
|
1542
|
-
ref:
|
|
1568
|
+
ref: a,
|
|
1543
1569
|
children: [
|
|
1544
1570
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1545
1571
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
|
|
1546
1572
|
/* @__PURE__ */ t.jsx("div", { className: ct.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1547
|
-
|
|
1573
|
+
b,
|
|
1548
1574
|
{
|
|
1549
1575
|
name: "X",
|
|
1550
1576
|
height: 20,
|
|
@@ -1556,44 +1582,44 @@ const ja = (d) => {
|
|
|
1556
1582
|
] }),
|
|
1557
1583
|
/* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
|
|
1558
1584
|
/* @__PURE__ */ t.jsx(
|
|
1559
|
-
|
|
1585
|
+
tt,
|
|
1560
1586
|
{
|
|
1561
1587
|
label: "Destination",
|
|
1562
|
-
onChange: (
|
|
1563
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1564
|
-
value:
|
|
1588
|
+
onChange: (I) => i(I),
|
|
1589
|
+
options: ["Go to Page", "Open Link"].filter((I) => I !== o),
|
|
1590
|
+
value: o
|
|
1565
1591
|
}
|
|
1566
1592
|
),
|
|
1567
|
-
|
|
1568
|
-
|
|
1593
|
+
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1594
|
+
tt,
|
|
1569
1595
|
{
|
|
1570
1596
|
label: "Go to",
|
|
1571
|
-
onChange: (
|
|
1572
|
-
options:
|
|
1573
|
-
value:
|
|
1597
|
+
onChange: (I) => j(I),
|
|
1598
|
+
options: D ? Object.values(D).filter((I) => I.name !== l).map((I) => I.name) : [],
|
|
1599
|
+
value: l
|
|
1574
1600
|
}
|
|
1575
1601
|
) : /* @__PURE__ */ t.jsx(
|
|
1576
1602
|
K,
|
|
1577
1603
|
{
|
|
1578
|
-
onChange: (
|
|
1579
|
-
value:
|
|
1604
|
+
onChange: (I) => p(I),
|
|
1605
|
+
value: h,
|
|
1580
1606
|
placeholder: "https://",
|
|
1581
1607
|
label: "Link"
|
|
1582
1608
|
}
|
|
1583
1609
|
),
|
|
1584
1610
|
/* @__PURE__ */ t.jsx(
|
|
1585
|
-
|
|
1611
|
+
et,
|
|
1586
1612
|
{
|
|
1587
1613
|
current: e.openInNewTab,
|
|
1588
1614
|
label: "Open in new tab",
|
|
1589
|
-
onChange: (
|
|
1615
|
+
onChange: (I) => S(I)
|
|
1590
1616
|
}
|
|
1591
1617
|
),
|
|
1592
1618
|
/* @__PURE__ */ t.jsx(
|
|
1593
1619
|
qt,
|
|
1594
1620
|
{
|
|
1595
|
-
onChange: (
|
|
1596
|
-
value:
|
|
1621
|
+
onChange: (I) => f({ "en-US": I }),
|
|
1622
|
+
value: m["en-US"],
|
|
1597
1623
|
label: "Text",
|
|
1598
1624
|
maxLength: 150
|
|
1599
1625
|
}
|
|
@@ -1601,114 +1627,114 @@ const ja = (d) => {
|
|
|
1601
1627
|
/* @__PURE__ */ t.jsx(
|
|
1602
1628
|
Ht,
|
|
1603
1629
|
{
|
|
1604
|
-
typesText:
|
|
1605
|
-
setTypesText:
|
|
1630
|
+
typesText: c,
|
|
1631
|
+
setTypesText: r
|
|
1606
1632
|
}
|
|
1607
1633
|
)
|
|
1608
1634
|
] })
|
|
1609
1635
|
]
|
|
1610
1636
|
}
|
|
1611
1637
|
);
|
|
1612
|
-
}),
|
|
1613
|
-
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,
|
|
1614
1640
|
header: mn,
|
|
1615
|
-
text:
|
|
1641
|
+
text: hn,
|
|
1616
1642
|
productsBlock: pn,
|
|
1617
|
-
buttonsBlock:
|
|
1618
|
-
top:
|
|
1619
|
-
itemsBlock:
|
|
1620
|
-
typeTexts:
|
|
1621
|
-
block:
|
|
1622
|
-
active:
|
|
1623
|
-
products:
|
|
1624
|
-
product:
|
|
1625
|
-
button:
|
|
1626
|
-
image:
|
|
1627
|
-
info:
|
|
1628
|
-
name:
|
|
1629
|
-
buttons:
|
|
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,
|
|
1630
1656
|
modal: Cn,
|
|
1631
1657
|
other: Bn,
|
|
1632
|
-
options:
|
|
1633
|
-
addButton:
|
|
1634
|
-
deleteButton:
|
|
1635
|
-
},
|
|
1636
|
-
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({
|
|
1637
1663
|
top: 0,
|
|
1638
1664
|
left: 0
|
|
1639
|
-
}), [
|
|
1640
|
-
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1665
|
+
}), [l, j] = x.useState(null), h = x.useRef(null);
|
|
1666
|
+
x.useEffect(() => {
|
|
1667
|
+
const m = () => {
|
|
1668
|
+
r(null);
|
|
1643
1669
|
};
|
|
1644
|
-
return document.body.addEventListener("click",
|
|
1645
|
-
|
|
1670
|
+
return document.body.addEventListener("click", m), r(null), () => {
|
|
1671
|
+
r(null), document.body.removeEventListener("click", m);
|
|
1646
1672
|
};
|
|
1647
|
-
}, []),
|
|
1648
|
-
if (
|
|
1649
|
-
const
|
|
1650
|
-
e(
|
|
1673
|
+
}, []), x.useEffect(() => {
|
|
1674
|
+
if (c) {
|
|
1675
|
+
const m = [...a].map((f) => f.id === c.id ? c : f);
|
|
1676
|
+
e(m);
|
|
1651
1677
|
}
|
|
1652
|
-
}, [
|
|
1653
|
-
if (
|
|
1654
|
-
const
|
|
1655
|
-
let u =
|
|
1656
|
-
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({
|
|
1657
1683
|
top: u,
|
|
1658
|
-
left:
|
|
1684
|
+
left: l.left
|
|
1659
1685
|
});
|
|
1660
1686
|
}
|
|
1661
|
-
}, [
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1664
|
-
const u =
|
|
1665
|
-
|
|
1687
|
+
}, [h.current, l]);
|
|
1688
|
+
const p = (m, f) => {
|
|
1689
|
+
m.stopPropagation();
|
|
1690
|
+
const u = m.target.getBoundingClientRect();
|
|
1691
|
+
j({
|
|
1666
1692
|
top: u.top + window.scrollY,
|
|
1667
1693
|
left: u.left - 30
|
|
1668
|
-
}),
|
|
1694
|
+
}), r(f);
|
|
1669
1695
|
};
|
|
1670
1696
|
return /* @__PURE__ */ t.jsxs("div", { className: it.products, children: [
|
|
1671
1697
|
/* @__PURE__ */ t.jsx("h5", { className: it.subtitle, children: "Button Type" }),
|
|
1672
|
-
|
|
1698
|
+
a.map((m) => /* @__PURE__ */ t.jsxs(
|
|
1673
1699
|
"div",
|
|
1674
1700
|
{
|
|
1675
1701
|
className: it.product,
|
|
1676
1702
|
children: [
|
|
1677
1703
|
/* @__PURE__ */ t.jsx(
|
|
1678
|
-
|
|
1704
|
+
tt,
|
|
1679
1705
|
{
|
|
1680
|
-
onChange: (
|
|
1681
|
-
const
|
|
1682
|
-
...
|
|
1683
|
-
type:
|
|
1684
|
-
} :
|
|
1685
|
-
e(
|
|
1706
|
+
onChange: (f) => {
|
|
1707
|
+
const S = [...a].map((D) => D.id === m.id ? {
|
|
1708
|
+
...m,
|
|
1709
|
+
type: f
|
|
1710
|
+
} : D);
|
|
1711
|
+
e(S);
|
|
1686
1712
|
},
|
|
1687
|
-
value:
|
|
1713
|
+
value: m.type,
|
|
1688
1714
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1689
1715
|
}
|
|
1690
1716
|
),
|
|
1691
1717
|
/* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
|
|
1692
1718
|
/* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1693
|
-
|
|
1719
|
+
b,
|
|
1694
1720
|
{
|
|
1695
1721
|
name: "Sliders",
|
|
1696
1722
|
hoverable: !0,
|
|
1697
1723
|
width: 20,
|
|
1698
1724
|
height: 20,
|
|
1699
|
-
onClick: (
|
|
1700
|
-
|
|
1725
|
+
onClick: (f) => {
|
|
1726
|
+
p(f, m);
|
|
1701
1727
|
}
|
|
1702
1728
|
}
|
|
1703
1729
|
) }),
|
|
1704
1730
|
s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1705
|
-
|
|
1731
|
+
b,
|
|
1706
1732
|
{
|
|
1707
1733
|
name: "Trash",
|
|
1708
1734
|
hoverable: !0,
|
|
1709
1735
|
onClick: () => {
|
|
1710
|
-
const
|
|
1711
|
-
e(
|
|
1736
|
+
const f = a.filter((u) => u.id !== m.id);
|
|
1737
|
+
e(f);
|
|
1712
1738
|
},
|
|
1713
1739
|
width: 20,
|
|
1714
1740
|
height: 20,
|
|
@@ -1718,18 +1744,18 @@ const ja = (d) => {
|
|
|
1718
1744
|
] })
|
|
1719
1745
|
]
|
|
1720
1746
|
},
|
|
1721
|
-
|
|
1747
|
+
m.id
|
|
1722
1748
|
)),
|
|
1723
|
-
|
|
1724
|
-
|
|
1749
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1750
|
+
un,
|
|
1725
1751
|
{
|
|
1726
|
-
ref:
|
|
1727
|
-
activeButton:
|
|
1728
|
-
setActiveButton:
|
|
1729
|
-
popupPosition:
|
|
1752
|
+
ref: h,
|
|
1753
|
+
activeButton: c,
|
|
1754
|
+
setActiveButton: r,
|
|
1755
|
+
popupPosition: o
|
|
1730
1756
|
}
|
|
1731
1757
|
),
|
|
1732
|
-
|
|
1758
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1733
1759
|
"div",
|
|
1734
1760
|
{
|
|
1735
1761
|
style: {
|
|
@@ -1744,16 +1770,18 @@ const ja = (d) => {
|
|
|
1744
1770
|
className: it.button,
|
|
1745
1771
|
size: "s",
|
|
1746
1772
|
onClick: () => {
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1773
|
+
const m = [...a];
|
|
1774
|
+
m.push({
|
|
1749
1775
|
type: "Primary",
|
|
1750
|
-
id:
|
|
1776
|
+
id: mt(),
|
|
1751
1777
|
typesText: [],
|
|
1752
1778
|
destination: "Go to Page",
|
|
1753
|
-
text:
|
|
1779
|
+
text: {
|
|
1780
|
+
"en-US": "Button Name"
|
|
1781
|
+
},
|
|
1754
1782
|
page: "home",
|
|
1755
1783
|
openInNewTab: !0
|
|
1756
|
-
}), e(
|
|
1784
|
+
}), e(m);
|
|
1757
1785
|
},
|
|
1758
1786
|
style: {
|
|
1759
1787
|
width: "fit-content"
|
|
@@ -1761,7 +1789,7 @@ const ja = (d) => {
|
|
|
1761
1789
|
children: /* @__PURE__ */ t.jsxs("div", { className: it.addButton, children: [
|
|
1762
1790
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1763
1791
|
/* @__PURE__ */ t.jsx(
|
|
1764
|
-
|
|
1792
|
+
b,
|
|
1765
1793
|
{
|
|
1766
1794
|
name: "Plus",
|
|
1767
1795
|
width: 16,
|
|
@@ -1774,53 +1802,53 @@ const ja = (d) => {
|
|
|
1774
1802
|
}
|
|
1775
1803
|
)
|
|
1776
1804
|
] });
|
|
1777
|
-
},
|
|
1778
|
-
const { isActiveButtons:
|
|
1805
|
+
}, Na = (d) => {
|
|
1806
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: n } = d;
|
|
1779
1807
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
|
|
1780
1808
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1781
1809
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
|
|
1782
1810
|
/* @__PURE__ */ t.jsx(
|
|
1783
|
-
|
|
1811
|
+
et,
|
|
1784
1812
|
{
|
|
1785
|
-
current:
|
|
1786
|
-
onChange: (
|
|
1813
|
+
current: a,
|
|
1814
|
+
onChange: (c) => e(c)
|
|
1787
1815
|
}
|
|
1788
1816
|
)
|
|
1789
1817
|
] }),
|
|
1790
1818
|
/* @__PURE__ */ t.jsx(
|
|
1791
|
-
|
|
1819
|
+
Mn,
|
|
1792
1820
|
{
|
|
1793
1821
|
buttons: s,
|
|
1794
|
-
setButtons:
|
|
1822
|
+
setButtons: n
|
|
1795
1823
|
}
|
|
1796
1824
|
)
|
|
1797
1825
|
] }) });
|
|
1798
|
-
},
|
|
1799
|
-
wrapper:
|
|
1800
|
-
subtitle:
|
|
1801
|
-
content:
|
|
1802
|
-
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,
|
|
1803
1831
|
track: Dn,
|
|
1804
|
-
progress:
|
|
1805
|
-
dots:
|
|
1806
|
-
dot:
|
|
1807
|
-
active:
|
|
1832
|
+
progress: Hn,
|
|
1833
|
+
dots: Ln,
|
|
1834
|
+
dot: zn,
|
|
1835
|
+
active: Rn,
|
|
1808
1836
|
input: Fn,
|
|
1809
1837
|
countBlock: Vn,
|
|
1810
|
-
count:
|
|
1811
|
-
controls:
|
|
1812
|
-
button:
|
|
1838
|
+
count: Yn,
|
|
1839
|
+
controls: Gn,
|
|
1840
|
+
button: Xn
|
|
1813
1841
|
}, Ot = (d) => {
|
|
1814
|
-
const { label:
|
|
1815
|
-
|
|
1816
|
-
},
|
|
1817
|
-
|
|
1818
|
-
},
|
|
1819
|
-
const u = e +
|
|
1820
|
-
|
|
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);
|
|
1844
|
+
}, p = () => {
|
|
1845
|
+
c > e && r(c - n);
|
|
1846
|
+
}, m = (f) => {
|
|
1847
|
+
const u = e + f * n;
|
|
1848
|
+
r(u);
|
|
1821
1849
|
};
|
|
1822
1850
|
return /* @__PURE__ */ t.jsxs("div", { className: G.wrapper, children: [
|
|
1823
|
-
|
|
1851
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: a }),
|
|
1824
1852
|
/* @__PURE__ */ t.jsxs("div", { className: G.content, children: [
|
|
1825
1853
|
/* @__PURE__ */ t.jsxs("div", { className: G.range, children: [
|
|
1826
1854
|
/* @__PURE__ */ t.jsx("div", { className: G.track }),
|
|
@@ -1828,21 +1856,21 @@ const ja = (d) => {
|
|
|
1828
1856
|
"div",
|
|
1829
1857
|
{
|
|
1830
1858
|
className: G.progress,
|
|
1831
|
-
style: { width: `${
|
|
1859
|
+
style: { width: `${j}%` }
|
|
1832
1860
|
}
|
|
1833
1861
|
),
|
|
1834
|
-
/* @__PURE__ */ t.jsx("div", { className: G.dots, children:
|
|
1835
|
-
const
|
|
1862
|
+
/* @__PURE__ */ t.jsx("div", { className: G.dots, children: l.map((f, u) => {
|
|
1863
|
+
const S = u <= (c - e) / n;
|
|
1836
1864
|
return /* @__PURE__ */ t.jsx(
|
|
1837
1865
|
"button",
|
|
1838
1866
|
{
|
|
1839
|
-
onClick: () =>
|
|
1840
|
-
className:
|
|
1841
|
-
[G.active]:
|
|
1842
|
-
[G.inactive]: !
|
|
1843
|
-
[G.dragging]:
|
|
1867
|
+
onClick: () => m(u),
|
|
1868
|
+
className: V(G.dot, {
|
|
1869
|
+
[G.active]: S,
|
|
1870
|
+
[G.inactive]: !S,
|
|
1871
|
+
[G.dragging]: o
|
|
1844
1872
|
}),
|
|
1845
|
-
"aria-label": `Set value to ${e + u *
|
|
1873
|
+
"aria-label": `Set value to ${e + u * n}`
|
|
1846
1874
|
},
|
|
1847
1875
|
u
|
|
1848
1876
|
);
|
|
@@ -1853,13 +1881,13 @@ const ja = (d) => {
|
|
|
1853
1881
|
type: "range",
|
|
1854
1882
|
min: e,
|
|
1855
1883
|
max: s,
|
|
1856
|
-
step:
|
|
1857
|
-
value:
|
|
1858
|
-
onChange: (
|
|
1859
|
-
onMouseDown: () =>
|
|
1860
|
-
onMouseUp: () =>
|
|
1861
|
-
onTouchStart: () =>
|
|
1862
|
-
onTouchEnd: () =>
|
|
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),
|
|
1863
1891
|
className: G.input
|
|
1864
1892
|
}
|
|
1865
1893
|
)
|
|
@@ -1872,23 +1900,23 @@ const ja = (d) => {
|
|
|
1872
1900
|
min: e,
|
|
1873
1901
|
max: s,
|
|
1874
1902
|
paddingless: !0,
|
|
1875
|
-
onChange: (
|
|
1876
|
-
const u = Number(
|
|
1877
|
-
u > s ?
|
|
1903
|
+
onChange: (f) => {
|
|
1904
|
+
const u = Number(f);
|
|
1905
|
+
u > s ? r(s) : u < e ? r(e) : r(u);
|
|
1878
1906
|
},
|
|
1879
|
-
value: String(
|
|
1907
|
+
value: String(c)
|
|
1880
1908
|
}
|
|
1881
1909
|
),
|
|
1882
1910
|
/* @__PURE__ */ t.jsxs("div", { className: G.controls, children: [
|
|
1883
1911
|
/* @__PURE__ */ t.jsx(
|
|
1884
1912
|
"button",
|
|
1885
1913
|
{
|
|
1886
|
-
onClick:
|
|
1887
|
-
disabled:
|
|
1914
|
+
onClick: h,
|
|
1915
|
+
disabled: c >= s,
|
|
1888
1916
|
className: G.button,
|
|
1889
1917
|
"aria-label": "Increment count",
|
|
1890
1918
|
children: /* @__PURE__ */ t.jsx(
|
|
1891
|
-
|
|
1919
|
+
b,
|
|
1892
1920
|
{
|
|
1893
1921
|
name: "CaretUp",
|
|
1894
1922
|
width: 15,
|
|
@@ -1900,12 +1928,12 @@ const ja = (d) => {
|
|
|
1900
1928
|
/* @__PURE__ */ t.jsx(
|
|
1901
1929
|
"button",
|
|
1902
1930
|
{
|
|
1903
|
-
onClick:
|
|
1904
|
-
disabled:
|
|
1931
|
+
onClick: p,
|
|
1932
|
+
disabled: c <= e,
|
|
1905
1933
|
className: G.button,
|
|
1906
1934
|
"aria-label": "Decrement count",
|
|
1907
1935
|
children: /* @__PURE__ */ t.jsx(
|
|
1908
|
-
|
|
1936
|
+
b,
|
|
1909
1937
|
{
|
|
1910
1938
|
name: "CaretDown",
|
|
1911
1939
|
width: 15,
|
|
@@ -1918,161 +1946,157 @@ const ja = (d) => {
|
|
|
1918
1946
|
] })
|
|
1919
1947
|
] })
|
|
1920
1948
|
] });
|
|
1921
|
-
},
|
|
1922
|
-
title:
|
|
1923
|
-
subtitle:
|
|
1924
|
-
header:
|
|
1925
|
-
text:
|
|
1926
|
-
productsBlock:
|
|
1927
|
-
top:
|
|
1928
|
-
itemsBlock:
|
|
1929
|
-
typeTexts:
|
|
1930
|
-
block:
|
|
1931
|
-
active:
|
|
1932
|
-
products:
|
|
1933
|
-
product:
|
|
1934
|
-
button:
|
|
1935
|
-
image:
|
|
1936
|
-
info:
|
|
1937
|
-
name:
|
|
1938
|
-
buttons:
|
|
1939
|
-
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,
|
|
1940
1968
|
link: mi,
|
|
1941
|
-
modalOptions:
|
|
1969
|
+
modalOptions: hi,
|
|
1942
1970
|
addButton: pi,
|
|
1943
|
-
deleteButton:
|
|
1944
|
-
closeIcon:
|
|
1945
|
-
},
|
|
1946
|
-
const { activeItem:
|
|
1947
|
-
|
|
1948
|
-
function r(n, c) {
|
|
1949
|
-
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1950
|
-
}
|
|
1951
|
-
return /* @__PURE__ */ t.jsxs(
|
|
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(
|
|
1952
1976
|
"div",
|
|
1953
1977
|
{
|
|
1954
|
-
className:
|
|
1955
|
-
onClick: (
|
|
1956
|
-
|
|
1978
|
+
className: F.modal,
|
|
1979
|
+
onClick: (o) => {
|
|
1980
|
+
o.stopPropagation();
|
|
1957
1981
|
},
|
|
1958
1982
|
style: {
|
|
1959
1983
|
top: `${s.top}px`,
|
|
1960
1984
|
left: `${s.left}px`
|
|
1961
1985
|
},
|
|
1962
1986
|
children: [
|
|
1963
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1964
|
-
/* @__PURE__ */ t.jsx("h3", { children: r
|
|
1965
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1966
|
-
|
|
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,
|
|
1967
1991
|
{
|
|
1968
1992
|
name: "X",
|
|
1969
1993
|
height: 20,
|
|
1970
1994
|
width: 20,
|
|
1971
1995
|
onClick: () => {
|
|
1972
|
-
|
|
1996
|
+
n(!1), e(null);
|
|
1973
1997
|
}
|
|
1974
1998
|
}
|
|
1975
1999
|
) })
|
|
1976
2000
|
] }),
|
|
1977
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2001
|
+
/* @__PURE__ */ t.jsx("div", { className: F.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1978
2002
|
ft,
|
|
1979
2003
|
{
|
|
1980
2004
|
label: "Put up an attractive image",
|
|
1981
|
-
activeImage:
|
|
1982
|
-
onChange: (
|
|
1983
|
-
const
|
|
1984
|
-
...
|
|
1985
|
-
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]
|
|
1986
2010
|
};
|
|
1987
|
-
e(
|
|
2011
|
+
e(i);
|
|
1988
2012
|
}
|
|
1989
2013
|
}
|
|
1990
2014
|
) })
|
|
1991
2015
|
]
|
|
1992
2016
|
}
|
|
1993
|
-
);
|
|
2017
|
+
) : null;
|
|
1994
2018
|
};
|
|
1995
|
-
function
|
|
1996
|
-
const { product:
|
|
1997
|
-
id: String(
|
|
1998
|
-
}),
|
|
1999
|
-
transform: Pt.Transform.toString(
|
|
2000
|
-
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
|
|
2001
2025
|
};
|
|
2002
2026
|
return /* @__PURE__ */ t.jsx(
|
|
2003
2027
|
"div",
|
|
2004
2028
|
{
|
|
2005
|
-
ref:
|
|
2006
|
-
style:
|
|
2007
|
-
className: `${
|
|
2029
|
+
ref: c,
|
|
2030
|
+
style: l,
|
|
2031
|
+
className: `${F.product} ${i ? F.dragging : ""}`,
|
|
2008
2032
|
...s,
|
|
2009
|
-
...
|
|
2033
|
+
...n,
|
|
2010
2034
|
children: e
|
|
2011
2035
|
}
|
|
2012
2036
|
);
|
|
2013
2037
|
}
|
|
2014
|
-
const
|
|
2038
|
+
const wa = (d) => {
|
|
2015
2039
|
const {
|
|
2016
|
-
isActiveItems:
|
|
2040
|
+
isActiveItems: a,
|
|
2017
2041
|
setIsActiveItems: e,
|
|
2018
2042
|
items: s,
|
|
2019
|
-
setItems:
|
|
2020
|
-
other:
|
|
2021
|
-
title:
|
|
2022
|
-
subtitle:
|
|
2023
|
-
editable:
|
|
2024
|
-
draggable:
|
|
2025
|
-
withImage:
|
|
2026
|
-
deletable:
|
|
2027
|
-
addable:
|
|
2028
|
-
itemsType:
|
|
2029
|
-
itemsOptions:
|
|
2030
|
-
} = d, [u,
|
|
2043
|
+
setItems: n,
|
|
2044
|
+
other: c,
|
|
2045
|
+
title: r,
|
|
2046
|
+
subtitle: o,
|
|
2047
|
+
editable: i = !0,
|
|
2048
|
+
draggable: l = !1,
|
|
2049
|
+
withImage: j = !1,
|
|
2050
|
+
deletable: h = !0,
|
|
2051
|
+
addable: p = !0,
|
|
2052
|
+
itemsType: m,
|
|
2053
|
+
itemsOptions: f
|
|
2054
|
+
} = d, [u, S] = x.useState(
|
|
2031
2055
|
null
|
|
2032
|
-
), [
|
|
2056
|
+
), [D, I] = x.useState({
|
|
2033
2057
|
top: 0,
|
|
2034
2058
|
left: 0
|
|
2035
|
-
}), [
|
|
2036
|
-
Nt(
|
|
2059
|
+
}), [g, w] = x.useState(!1), E = $t(
|
|
2060
|
+
Nt(Bt, {
|
|
2037
2061
|
activationConstraint: {
|
|
2038
2062
|
distance: 5
|
|
2039
2063
|
}
|
|
2040
2064
|
})
|
|
2041
2065
|
);
|
|
2042
|
-
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2066
|
+
x.useEffect(() => {
|
|
2067
|
+
const y = () => {
|
|
2068
|
+
S(null), w(!1);
|
|
2045
2069
|
};
|
|
2046
|
-
return document.body.addEventListener("click",
|
|
2047
|
-
|
|
2070
|
+
return document.body.addEventListener("click", y), S(null), w(!1), () => {
|
|
2071
|
+
S(null), w(!1), document.body.removeEventListener("click", y);
|
|
2048
2072
|
};
|
|
2049
|
-
}, []),
|
|
2073
|
+
}, []), x.useEffect(() => {
|
|
2050
2074
|
if (u) {
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2075
|
+
const y = [...s].map((M) => M.listingId === u.listingId ? u : M);
|
|
2076
|
+
n(y);
|
|
2053
2077
|
}
|
|
2054
2078
|
}, [u]);
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2057
|
-
const
|
|
2058
|
-
let
|
|
2059
|
-
|
|
2060
|
-
top:
|
|
2061
|
-
left:
|
|
2062
|
-
}),
|
|
2079
|
+
const R = (y, M) => {
|
|
2080
|
+
y.stopPropagation();
|
|
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);
|
|
2063
2087
|
};
|
|
2064
|
-
function
|
|
2065
|
-
if (
|
|
2066
|
-
return
|
|
2088
|
+
function C(y) {
|
|
2089
|
+
if (j)
|
|
2090
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
2067
2091
|
"img",
|
|
2068
2092
|
{
|
|
2069
|
-
src: `https://imagedelivery.net/${
|
|
2093
|
+
src: `https://imagedelivery.net/${y}/w=1000`,
|
|
2070
2094
|
alt: "image",
|
|
2071
2095
|
width: 16,
|
|
2072
2096
|
height: 16
|
|
2073
2097
|
}
|
|
2074
2098
|
) : /* @__PURE__ */ t.jsx(
|
|
2075
|
-
|
|
2099
|
+
b,
|
|
2076
2100
|
{
|
|
2077
2101
|
name: "Image",
|
|
2078
2102
|
width: 16,
|
|
@@ -2081,21 +2105,21 @@ const ka = (d) => {
|
|
|
2081
2105
|
}
|
|
2082
2106
|
);
|
|
2083
2107
|
}
|
|
2084
|
-
const
|
|
2085
|
-
const { active:
|
|
2086
|
-
if (
|
|
2087
|
-
const
|
|
2088
|
-
if (
|
|
2089
|
-
const
|
|
2090
|
-
|
|
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);
|
|
2091
2115
|
}
|
|
2092
2116
|
}
|
|
2093
|
-
},
|
|
2094
|
-
const
|
|
2095
|
-
if (!
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2098
|
-
|
|
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,
|
|
2099
2123
|
{
|
|
2100
2124
|
name: "DotsSixVertical",
|
|
2101
2125
|
hoverable: !0,
|
|
@@ -2103,107 +2127,107 @@ const ka = (d) => {
|
|
|
2103
2127
|
height: 20
|
|
2104
2128
|
}
|
|
2105
2129
|
) }),
|
|
2106
|
-
|
|
2107
|
-
|
|
2130
|
+
m === "select" && /* @__PURE__ */ t.jsx(
|
|
2131
|
+
tt,
|
|
2108
2132
|
{
|
|
2109
|
-
onChange: (
|
|
2110
|
-
const
|
|
2133
|
+
onChange: (O) => {
|
|
2134
|
+
const L = [...s], Z = f.find((q) => q.productData.name === O);
|
|
2111
2135
|
if (!Z) return;
|
|
2112
2136
|
const rt = {
|
|
2113
2137
|
listingId: Z.id,
|
|
2114
2138
|
image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
|
|
2115
|
-
},
|
|
2116
|
-
|
|
2139
|
+
}, v = L.map((q) => q.listingId === y.listingId ? rt : q);
|
|
2140
|
+
S(rt), n([...v]);
|
|
2117
2141
|
},
|
|
2118
|
-
value:
|
|
2142
|
+
value: B.productData.name,
|
|
2119
2143
|
options: [
|
|
2120
|
-
...
|
|
2144
|
+
...f.filter((O) => !s.find((L) => L.listingId === O.id)).map((O) => O.productData.name)
|
|
2121
2145
|
],
|
|
2122
|
-
leftAddon:
|
|
2123
|
-
|
|
2146
|
+
leftAddon: C(
|
|
2147
|
+
y.image || B.productData.images.length > 0 && B.productData.images[0].cfId || ""
|
|
2124
2148
|
)
|
|
2125
2149
|
},
|
|
2126
|
-
|
|
2150
|
+
M
|
|
2127
2151
|
),
|
|
2128
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2129
|
-
|
|
2130
|
-
|
|
2152
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
2153
|
+
i && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2154
|
+
b,
|
|
2131
2155
|
{
|
|
2132
2156
|
name: "Sliders",
|
|
2133
2157
|
hoverable: !0,
|
|
2134
2158
|
width: 20,
|
|
2135
2159
|
height: 20,
|
|
2136
|
-
onClick: (
|
|
2160
|
+
onClick: (O) => R(O, y)
|
|
2137
2161
|
}
|
|
2138
2162
|
) }),
|
|
2139
|
-
|
|
2140
|
-
|
|
2163
|
+
h && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2164
|
+
b,
|
|
2141
2165
|
{
|
|
2142
2166
|
name: "Trash",
|
|
2143
2167
|
hoverable: !0,
|
|
2144
2168
|
width: 20,
|
|
2145
2169
|
height: 20,
|
|
2146
2170
|
fill: "#C12A2A",
|
|
2147
|
-
onClick: () =>
|
|
2171
|
+
onClick: () => n(s.filter((O) => O !== y))
|
|
2148
2172
|
}
|
|
2149
2173
|
) })
|
|
2150
2174
|
] })
|
|
2151
2175
|
] });
|
|
2152
|
-
return
|
|
2153
|
-
|
|
2176
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
2177
|
+
bi,
|
|
2154
2178
|
{
|
|
2155
|
-
product:
|
|
2156
|
-
children:
|
|
2179
|
+
product: y,
|
|
2180
|
+
children: X
|
|
2157
2181
|
},
|
|
2158
|
-
|
|
2182
|
+
y.listingId
|
|
2159
2183
|
) : /* @__PURE__ */ t.jsx(
|
|
2160
2184
|
"div",
|
|
2161
2185
|
{
|
|
2162
|
-
className:
|
|
2163
|
-
children:
|
|
2186
|
+
className: F.product,
|
|
2187
|
+
children: X
|
|
2164
2188
|
},
|
|
2165
|
-
|
|
2189
|
+
y.listingId
|
|
2166
2190
|
);
|
|
2167
2191
|
};
|
|
2168
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2169
|
-
(
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
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,
|
|
2173
2197
|
{
|
|
2174
|
-
current:
|
|
2175
|
-
onChange: (
|
|
2198
|
+
current: a,
|
|
2199
|
+
onChange: (y) => e == null ? void 0 : e(y)
|
|
2176
2200
|
}
|
|
2177
2201
|
)
|
|
2178
2202
|
] }),
|
|
2179
|
-
|
|
2180
|
-
|
|
2203
|
+
g && u && /* @__PURE__ */ t.jsx(
|
|
2204
|
+
fi,
|
|
2181
2205
|
{
|
|
2182
2206
|
activeItem: u,
|
|
2183
|
-
setActiveItem:
|
|
2184
|
-
setIsOpenModal:
|
|
2185
|
-
popupPosition:
|
|
2186
|
-
itemsOptions:
|
|
2207
|
+
setActiveItem: S,
|
|
2208
|
+
setIsOpenModal: w,
|
|
2209
|
+
popupPosition: D,
|
|
2210
|
+
itemsOptions: f
|
|
2187
2211
|
}
|
|
2188
2212
|
),
|
|
2189
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2190
|
-
|
|
2191
|
-
|
|
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(
|
|
2192
2216
|
wt,
|
|
2193
2217
|
{
|
|
2194
|
-
sensors:
|
|
2195
|
-
onDragEnd:
|
|
2218
|
+
sensors: E,
|
|
2219
|
+
onDragEnd: P,
|
|
2196
2220
|
children: /* @__PURE__ */ t.jsx(
|
|
2197
|
-
|
|
2221
|
+
St,
|
|
2198
2222
|
{
|
|
2199
|
-
items: s.map((
|
|
2200
|
-
strategy:
|
|
2201
|
-
children: s.map((
|
|
2223
|
+
items: s.map((y) => String(y.listingId)),
|
|
2224
|
+
strategy: Ct,
|
|
2225
|
+
children: s.map((y, M) => st(y, M))
|
|
2202
2226
|
}
|
|
2203
2227
|
)
|
|
2204
2228
|
}
|
|
2205
|
-
) : s.map((
|
|
2206
|
-
|
|
2229
|
+
) : s.map((y, M) => st(y, M)),
|
|
2230
|
+
p && /* @__PURE__ */ t.jsx(
|
|
2207
2231
|
"div",
|
|
2208
2232
|
{
|
|
2209
2233
|
style: {
|
|
@@ -2215,28 +2239,28 @@ const ka = (d) => {
|
|
|
2215
2239
|
lt,
|
|
2216
2240
|
{
|
|
2217
2241
|
withoutHover: !0,
|
|
2218
|
-
className:
|
|
2242
|
+
className: F.button,
|
|
2219
2243
|
size: "s",
|
|
2220
2244
|
onClick: () => {
|
|
2221
|
-
const
|
|
2222
|
-
for (let
|
|
2223
|
-
if (!s.find((
|
|
2224
|
-
|
|
2225
|
-
listingId:
|
|
2226
|
-
image:
|
|
2245
|
+
const y = [...s];
|
|
2246
|
+
for (let M = 0; M < f.length; M++)
|
|
2247
|
+
if (!s.find((B) => B.listingId === f[M].id)) {
|
|
2248
|
+
y.push({
|
|
2249
|
+
listingId: f[M].id,
|
|
2250
|
+
image: f[M].productData.images.length > 0 ? f[M].productData.images[0].cfId : ""
|
|
2227
2251
|
});
|
|
2228
2252
|
break;
|
|
2229
2253
|
}
|
|
2230
|
-
|
|
2254
|
+
n(y);
|
|
2231
2255
|
},
|
|
2232
|
-
disabled: s.length ===
|
|
2256
|
+
disabled: s.length === f.length,
|
|
2233
2257
|
style: {
|
|
2234
2258
|
width: "fit-content"
|
|
2235
2259
|
},
|
|
2236
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2260
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
2237
2261
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2238
2262
|
/* @__PURE__ */ t.jsx(
|
|
2239
|
-
|
|
2263
|
+
b,
|
|
2240
2264
|
{
|
|
2241
2265
|
name: "Plus",
|
|
2242
2266
|
width: 16,
|
|
@@ -2249,65 +2273,65 @@ const ka = (d) => {
|
|
|
2249
2273
|
}
|
|
2250
2274
|
)
|
|
2251
2275
|
] }),
|
|
2252
|
-
|
|
2276
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
|
|
2253
2277
|
] });
|
|
2254
|
-
},
|
|
2255
|
-
options:
|
|
2256
|
-
price:
|
|
2257
|
-
oldPrice:
|
|
2258
|
-
newPrice:
|
|
2259
|
-
animate:
|
|
2260
|
-
appearAndBounce:
|
|
2261
|
-
meta:
|
|
2262
|
-
info:
|
|
2263
|
-
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,
|
|
2264
2288
|
buttons: Ci,
|
|
2265
2289
|
variants: Bi,
|
|
2266
|
-
variant:
|
|
2267
|
-
stock:
|
|
2268
|
-
variantInfo:
|
|
2269
|
-
quantity:
|
|
2270
|
-
count:
|
|
2271
|
-
focused:
|
|
2272
|
-
button:
|
|
2273
|
-
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,
|
|
2274
2298
|
chargeTypes: Di,
|
|
2275
|
-
charge:
|
|
2276
|
-
chargeActive:
|
|
2277
|
-
title:
|
|
2278
|
-
},
|
|
2279
|
-
wrapper:
|
|
2299
|
+
charge: Hi,
|
|
2300
|
+
chargeActive: Li,
|
|
2301
|
+
title: zi
|
|
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 = {
|
|
2303
|
+
wrapper: Ri,
|
|
2280
2304
|
label: Fi,
|
|
2281
2305
|
input: Vi,
|
|
2282
|
-
paddingless:
|
|
2283
|
-
content:
|
|
2284
|
-
contentBorder:
|
|
2285
|
-
borderless:
|
|
2286
|
-
rightIcon:
|
|
2287
|
-
},
|
|
2306
|
+
paddingless: Yi,
|
|
2307
|
+
content: Gi,
|
|
2308
|
+
contentBorder: Xi,
|
|
2309
|
+
borderless: Wi,
|
|
2310
|
+
rightIcon: Ji
|
|
2311
|
+
}, Qi = (d) => {
|
|
2288
2312
|
const {
|
|
2289
|
-
onChange:
|
|
2313
|
+
onChange: a,
|
|
2290
2314
|
style: e,
|
|
2291
2315
|
label: s,
|
|
2292
|
-
value:
|
|
2293
|
-
type:
|
|
2294
|
-
min:
|
|
2295
|
-
max:
|
|
2296
|
-
placeholder:
|
|
2297
|
-
disabled:
|
|
2298
|
-
required:
|
|
2299
|
-
regex:
|
|
2300
|
-
paddingless:
|
|
2301
|
-
borderless:
|
|
2302
|
-
editable:
|
|
2316
|
+
value: n,
|
|
2317
|
+
type: c,
|
|
2318
|
+
min: r,
|
|
2319
|
+
max: o,
|
|
2320
|
+
placeholder: i,
|
|
2321
|
+
disabled: l = !1,
|
|
2322
|
+
required: j = !1,
|
|
2323
|
+
regex: h,
|
|
2324
|
+
paddingless: p = !1,
|
|
2325
|
+
borderless: m = !1,
|
|
2326
|
+
editable: f = !1,
|
|
2303
2327
|
isSearch: u = !1,
|
|
2304
|
-
centered:
|
|
2305
|
-
} = d, { themeSettings:
|
|
2306
|
-
function
|
|
2307
|
-
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;
|
|
2308
2332
|
}
|
|
2309
|
-
function
|
|
2310
|
-
return !
|
|
2333
|
+
function R(C) {
|
|
2334
|
+
return !j || !h ? !0 : new RegExp(h).test(C);
|
|
2311
2335
|
}
|
|
2312
2336
|
return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
|
|
2313
2337
|
s && /* @__PURE__ */ t.jsx(
|
|
@@ -2321,55 +2345,55 @@ const ka = (d) => {
|
|
|
2321
2345
|
/* @__PURE__ */ t.jsxs(
|
|
2322
2346
|
"div",
|
|
2323
2347
|
{
|
|
2324
|
-
className:
|
|
2325
|
-
[nt.contentBorder]:
|
|
2348
|
+
className: V(nt.content, {
|
|
2349
|
+
[nt.contentBorder]: I.border.active
|
|
2326
2350
|
}),
|
|
2327
2351
|
style: {
|
|
2328
|
-
paddingRight: u ? v.general.height + 15 : "auto",
|
|
2329
2352
|
...e,
|
|
2330
|
-
background:
|
|
2353
|
+
background: I.field.active ? I.field.color : "transparent",
|
|
2354
|
+
padding: u ? `7px ${Number(I.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2331
2355
|
},
|
|
2332
2356
|
children: [
|
|
2333
2357
|
/* @__PURE__ */ t.jsx(
|
|
2334
2358
|
"input",
|
|
2335
2359
|
{
|
|
2336
2360
|
id: s,
|
|
2337
|
-
type:
|
|
2338
|
-
onChange: (
|
|
2339
|
-
if (
|
|
2361
|
+
type: c || "text",
|
|
2362
|
+
onChange: (C) => {
|
|
2363
|
+
if (c === "text") a(C.target.value);
|
|
2340
2364
|
else {
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2365
|
+
const P = E(C.target.value);
|
|
2366
|
+
a(P);
|
|
2343
2367
|
}
|
|
2344
2368
|
},
|
|
2345
|
-
value:
|
|
2369
|
+
value: n,
|
|
2346
2370
|
autoComplete: "off",
|
|
2347
|
-
placeholder:
|
|
2348
|
-
className:
|
|
2349
|
-
[nt.required]:
|
|
2350
|
-
[nt.paddingless]:
|
|
2351
|
-
[nt.borderless]:
|
|
2371
|
+
placeholder: i || "Type something...",
|
|
2372
|
+
className: V(nt.input, {
|
|
2373
|
+
[nt.required]: g && j && !R(n),
|
|
2374
|
+
[nt.paddingless]: p,
|
|
2375
|
+
[nt.borderless]: m
|
|
2352
2376
|
}),
|
|
2353
|
-
min:
|
|
2354
|
-
max:
|
|
2355
|
-
disabled:
|
|
2356
|
-
onFocus: () =>
|
|
2377
|
+
min: c === "number" ? r : void 0,
|
|
2378
|
+
max: c === "number" ? o : void 0,
|
|
2379
|
+
disabled: l,
|
|
2380
|
+
onFocus: () => w(!0),
|
|
2357
2381
|
style: {
|
|
2358
|
-
textAlign:
|
|
2382
|
+
textAlign: S ? "center" : "left"
|
|
2359
2383
|
}
|
|
2360
2384
|
}
|
|
2361
2385
|
),
|
|
2362
2386
|
u && /* @__PURE__ */ t.jsx("div", { className: nt.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2363
|
-
|
|
2387
|
+
b,
|
|
2364
2388
|
{
|
|
2365
2389
|
name: "MagnifyingGlass",
|
|
2366
2390
|
fill: "var(--icon-secondary)",
|
|
2367
|
-
width:
|
|
2368
|
-
height:
|
|
2391
|
+
width: I.general.size,
|
|
2392
|
+
height: I.general.size
|
|
2369
2393
|
}
|
|
2370
2394
|
) }),
|
|
2371
|
-
|
|
2372
|
-
|
|
2395
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2396
|
+
b,
|
|
2373
2397
|
{
|
|
2374
2398
|
name: "Sliders",
|
|
2375
2399
|
width: 20,
|
|
@@ -2381,37 +2405,37 @@ const ka = (d) => {
|
|
|
2381
2405
|
}
|
|
2382
2406
|
)
|
|
2383
2407
|
] });
|
|
2384
|
-
},
|
|
2385
|
-
button:
|
|
2386
|
-
primary:
|
|
2387
|
-
primaryHovered:
|
|
2388
|
-
secondary:
|
|
2389
|
-
secondaryHovered:
|
|
2390
|
-
tertiary:
|
|
2391
|
-
tertiaryHovered:
|
|
2392
|
-
content:
|
|
2393
|
-
},
|
|
2394
|
-
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();
|
|
2395
2419
|
return /* @__PURE__ */ t.jsx(
|
|
2396
2420
|
"button",
|
|
2397
2421
|
{
|
|
2398
|
-
className:
|
|
2399
|
-
[ot.primary]:
|
|
2400
|
-
[ot.secondary]:
|
|
2401
|
-
[ot.tertiary]:
|
|
2402
|
-
[ot.primaryHovered]:
|
|
2403
|
-
[ot.secondaryHovered]:
|
|
2404
|
-
[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
|
|
2405
2429
|
}),
|
|
2406
2430
|
onClick: e,
|
|
2407
2431
|
style: {
|
|
2408
2432
|
...s
|
|
2409
2433
|
},
|
|
2410
|
-
disabled:
|
|
2411
|
-
children:
|
|
2412
|
-
|
|
2434
|
+
disabled: c,
|
|
2435
|
+
children: r === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
|
|
2436
|
+
a,
|
|
2413
2437
|
/* @__PURE__ */ t.jsx(
|
|
2414
|
-
|
|
2438
|
+
b,
|
|
2415
2439
|
{
|
|
2416
2440
|
name: "ArrowRight",
|
|
2417
2441
|
fill: "var(--icon-tertiary)",
|
|
@@ -2419,78 +2443,77 @@ const ka = (d) => {
|
|
|
2419
2443
|
height: 20
|
|
2420
2444
|
}
|
|
2421
2445
|
)
|
|
2422
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2446
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2423
2447
|
}
|
|
2424
2448
|
);
|
|
2425
2449
|
};
|
|
2426
2450
|
var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
|
|
2427
|
-
const
|
|
2428
|
-
var
|
|
2429
|
-
const { variants:
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
const g = setTimeout(() =>
|
|
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);
|
|
2433
2457
|
return () => clearTimeout(g);
|
|
2434
|
-
}, [
|
|
2435
|
-
async function
|
|
2436
|
-
await
|
|
2458
|
+
}, [o]);
|
|
2459
|
+
async function f() {
|
|
2460
|
+
await h(), await j({
|
|
2437
2461
|
productId: d.id,
|
|
2438
2462
|
productVariantId: e.id,
|
|
2439
|
-
quantity:
|
|
2463
|
+
quantity: o
|
|
2440
2464
|
});
|
|
2441
2465
|
}
|
|
2442
2466
|
function u() {
|
|
2443
|
-
|
|
2467
|
+
l(), f(), r("/checkout");
|
|
2444
2468
|
}
|
|
2445
|
-
function
|
|
2469
|
+
function S(g) {
|
|
2446
2470
|
if (g >= 864e5) {
|
|
2447
|
-
const
|
|
2448
|
-
return `${
|
|
2471
|
+
const P = Math.floor(g / 864e5);
|
|
2472
|
+
return `${P} ${P === 1 ? "day" : "days"}`;
|
|
2449
2473
|
} else if (g >= 36e5) {
|
|
2450
|
-
const
|
|
2451
|
-
return `${
|
|
2474
|
+
const P = Math.floor(g / 36e5);
|
|
2475
|
+
return `${P} ${P === 1 ? "hour" : "hours"}`;
|
|
2452
2476
|
} else if (g >= 6e4) {
|
|
2453
|
-
const
|
|
2454
|
-
return `${
|
|
2477
|
+
const P = Math.floor(g / 6e4);
|
|
2478
|
+
return `${P} ${P === 1 ? "minute" : "minutes"}`;
|
|
2455
2479
|
} else {
|
|
2456
|
-
const
|
|
2457
|
-
return `${
|
|
2480
|
+
const P = Math.floor(g / 1e3);
|
|
2481
|
+
return `${P} ${P === 1 ? "second" : "seconds"}`;
|
|
2458
2482
|
}
|
|
2459
2483
|
}
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
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(
|
|
2465
2488
|
"div",
|
|
2466
2489
|
{
|
|
2467
|
-
className:
|
|
2468
|
-
[
|
|
2490
|
+
className: V(N.charge, {
|
|
2491
|
+
[N.chargeActive]: n === g
|
|
2469
2492
|
}),
|
|
2470
|
-
onClick: () =>
|
|
2493
|
+
onClick: () => c(g),
|
|
2471
2494
|
children: zt[g]
|
|
2472
2495
|
},
|
|
2473
2496
|
g
|
|
2474
2497
|
)) }),
|
|
2475
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2476
|
-
var
|
|
2498
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: a.map((g) => {
|
|
2499
|
+
var w;
|
|
2477
2500
|
return /* @__PURE__ */ t.jsxs(
|
|
2478
2501
|
"div",
|
|
2479
2502
|
{
|
|
2480
|
-
className:
|
|
2481
|
-
[
|
|
2503
|
+
className: V(N.variant, {
|
|
2504
|
+
[N.activeVariant]: e.id === g.id
|
|
2482
2505
|
}),
|
|
2483
2506
|
onClick: () => s(g),
|
|
2484
2507
|
children: [
|
|
2485
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2486
|
-
/* @__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 }),
|
|
2487
2510
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2488
2511
|
"$",
|
|
2489
|
-
|
|
2512
|
+
n === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
2490
2513
|
] })
|
|
2491
2514
|
] }),
|
|
2492
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2493
|
-
((
|
|
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,
|
|
2494
2517
|
" in stock"
|
|
2495
2518
|
] }) })
|
|
2496
2519
|
]
|
|
@@ -2498,49 +2521,50 @@ const Ia = (d) => {
|
|
|
2498
2521
|
g.id
|
|
2499
2522
|
);
|
|
2500
2523
|
}) }),
|
|
2501
|
-
|
|
2524
|
+
n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
2502
2525
|
/* @__PURE__ */ t.jsx(
|
|
2503
|
-
|
|
2526
|
+
W,
|
|
2504
2527
|
{
|
|
2505
2528
|
type: "Secondary",
|
|
2506
2529
|
onClick: () => {
|
|
2507
|
-
|
|
2530
|
+
o > 1 ? i((g) => g - 1) : i(1);
|
|
2508
2531
|
},
|
|
2509
|
-
className:
|
|
2510
|
-
disabled: e.quantity.restrictions &&
|
|
2511
|
-
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" })
|
|
2512
2535
|
}
|
|
2513
2536
|
),
|
|
2514
2537
|
/* @__PURE__ */ t.jsx(
|
|
2515
|
-
|
|
2538
|
+
Qi,
|
|
2516
2539
|
{
|
|
2517
2540
|
type: "number",
|
|
2518
|
-
value: String(
|
|
2519
|
-
onChange: (g) =>
|
|
2520
|
-
max: ((
|
|
2521
|
-
min: ((
|
|
2522
|
-
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
|
|
2523
2547
|
}
|
|
2524
2548
|
),
|
|
2525
2549
|
/* @__PURE__ */ t.jsx(
|
|
2526
|
-
|
|
2550
|
+
W,
|
|
2527
2551
|
{
|
|
2528
2552
|
type: "Secondary",
|
|
2529
2553
|
onClick: () => {
|
|
2530
|
-
|
|
2554
|
+
i((g) => g + 1);
|
|
2531
2555
|
},
|
|
2532
|
-
className:
|
|
2533
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2534
|
-
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" })
|
|
2535
2559
|
}
|
|
2536
2560
|
)
|
|
2537
2561
|
] }),
|
|
2538
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2539
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2562
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
|
|
2563
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2540
2564
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2541
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2565
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
2542
2566
|
/* @__PURE__ */ t.jsx(
|
|
2543
|
-
|
|
2567
|
+
b,
|
|
2544
2568
|
{
|
|
2545
2569
|
name: "Lightning",
|
|
2546
2570
|
fill: "#FF3F19",
|
|
@@ -2548,201 +2572,203 @@ const Ia = (d) => {
|
|
|
2548
2572
|
height: 20
|
|
2549
2573
|
}
|
|
2550
2574
|
),
|
|
2551
|
-
/* @__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) })
|
|
2552
2576
|
] })
|
|
2553
2577
|
] }),
|
|
2554
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2578
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2555
2579
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2556
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2557
|
-
/* @__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: [
|
|
2558
2582
|
"$ ",
|
|
2559
|
-
(e.price.amount || 0) *
|
|
2583
|
+
(e.price.amount || 0) * o
|
|
2560
2584
|
] }),
|
|
2561
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2585
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2562
2586
|
"$ ",
|
|
2563
|
-
(e.compareAtPrice.amount || 0) *
|
|
2587
|
+
(e.compareAtPrice.amount || 0) * o
|
|
2564
2588
|
] })
|
|
2565
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2589
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2566
2590
|
"$ ",
|
|
2567
|
-
(e.price.amount || 0) *
|
|
2568
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2569
|
-
/* @__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: [
|
|
2570
2594
|
"$ ",
|
|
2571
2595
|
e.subscriptionSettings.price.amount || 0
|
|
2572
2596
|
] }),
|
|
2573
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2597
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2574
2598
|
"$ ",
|
|
2575
2599
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2576
2600
|
] })
|
|
2577
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2601
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
|
|
2578
2602
|
"$ ",
|
|
2579
2603
|
e.subscriptionSettings.price.amount || 0
|
|
2580
2604
|
] }) })
|
|
2581
2605
|
] })
|
|
2582
2606
|
] }),
|
|
2583
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2607
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
2584
2608
|
/* @__PURE__ */ t.jsx(
|
|
2585
|
-
|
|
2609
|
+
W,
|
|
2586
2610
|
{
|
|
2587
2611
|
type: "Primary",
|
|
2588
2612
|
onClick: () => u(),
|
|
2589
|
-
|
|
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"
|
|
2590
2615
|
}
|
|
2591
2616
|
),
|
|
2592
|
-
|
|
2593
|
-
|
|
2617
|
+
n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2618
|
+
W,
|
|
2594
2619
|
{
|
|
2595
2620
|
type: "Secondary",
|
|
2596
|
-
onClick: () =>
|
|
2621
|
+
onClick: () => f(),
|
|
2622
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2597
2623
|
children: "Add to Cart"
|
|
2598
2624
|
}
|
|
2599
2625
|
)
|
|
2600
2626
|
] })
|
|
2601
2627
|
] });
|
|
2602
|
-
},
|
|
2603
|
-
button:
|
|
2604
|
-
login:
|
|
2605
|
-
signUp:
|
|
2606
|
-
buttons:
|
|
2607
|
-
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,
|
|
2608
2634
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2609
2635
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2610
|
-
closing:
|
|
2636
|
+
closing: _o,
|
|
2611
2637
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2612
2638
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2613
2639
|
info: mo,
|
|
2614
|
-
top:
|
|
2640
|
+
top: ho,
|
|
2615
2641
|
title: po,
|
|
2616
|
-
clear:
|
|
2617
|
-
activeClear:
|
|
2618
|
-
count:
|
|
2619
|
-
cart:
|
|
2620
|
-
empty:
|
|
2621
|
-
product:
|
|
2622
|
-
products:
|
|
2623
|
-
image:
|
|
2624
|
-
productInfo:
|
|
2625
|
-
content:
|
|
2626
|
-
name:
|
|
2627
|
-
price:
|
|
2628
|
-
productButtons:
|
|
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,
|
|
2629
2655
|
productButton: Co,
|
|
2630
2656
|
productCount: Bo,
|
|
2631
|
-
bottom:
|
|
2632
|
-
subtotal:
|
|
2633
|
-
block:
|
|
2634
|
-
shoppingCount:
|
|
2635
|
-
total:
|
|
2636
|
-
link:
|
|
2637
|
-
userInfo:
|
|
2638
|
-
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,
|
|
2639
2665
|
pagesMobileModalContent: Do,
|
|
2640
|
-
pagesMobileModalHeader:
|
|
2641
|
-
pagesMobileModalFooter:
|
|
2666
|
+
pagesMobileModalHeader: Ho,
|
|
2667
|
+
pagesMobileModalFooter: Lo
|
|
2642
2668
|
};
|
|
2643
2669
|
class gt extends Error {
|
|
2644
2670
|
}
|
|
2645
2671
|
gt.prototype.name = "InvalidTokenError";
|
|
2646
|
-
function
|
|
2647
|
-
return decodeURIComponent(atob(d).replace(/(.)/g, (
|
|
2672
|
+
function zo(d) {
|
|
2673
|
+
return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
|
|
2648
2674
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2649
2675
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2650
2676
|
}));
|
|
2651
2677
|
}
|
|
2652
|
-
function
|
|
2653
|
-
let
|
|
2654
|
-
switch (
|
|
2678
|
+
function Ro(d) {
|
|
2679
|
+
let a = d.replace(/-/g, "+").replace(/_/g, "/");
|
|
2680
|
+
switch (a.length % 4) {
|
|
2655
2681
|
case 0:
|
|
2656
2682
|
break;
|
|
2657
2683
|
case 2:
|
|
2658
|
-
|
|
2684
|
+
a += "==";
|
|
2659
2685
|
break;
|
|
2660
2686
|
case 3:
|
|
2661
|
-
|
|
2687
|
+
a += "=";
|
|
2662
2688
|
break;
|
|
2663
2689
|
default:
|
|
2664
2690
|
throw new Error("base64 string is not of the correct length");
|
|
2665
2691
|
}
|
|
2666
2692
|
try {
|
|
2667
|
-
return
|
|
2693
|
+
return zo(a);
|
|
2668
2694
|
} catch {
|
|
2669
|
-
return atob(
|
|
2695
|
+
return atob(a);
|
|
2670
2696
|
}
|
|
2671
2697
|
}
|
|
2672
|
-
function Fo(d,
|
|
2698
|
+
function Fo(d, a) {
|
|
2673
2699
|
if (typeof d != "string")
|
|
2674
2700
|
throw new gt("Invalid token specified: must be a string");
|
|
2675
|
-
|
|
2676
|
-
const e =
|
|
2701
|
+
a || (a = {});
|
|
2702
|
+
const e = a.header === !0 ? 0 : 1, s = d.split(".")[e];
|
|
2677
2703
|
if (typeof s != "string")
|
|
2678
2704
|
throw new gt(`Invalid token specified: missing part #${e + 1}`);
|
|
2679
|
-
let
|
|
2705
|
+
let n;
|
|
2680
2706
|
try {
|
|
2681
|
-
|
|
2682
|
-
} catch (
|
|
2683
|
-
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})`);
|
|
2684
2710
|
}
|
|
2685
2711
|
try {
|
|
2686
|
-
return JSON.parse(
|
|
2687
|
-
} catch (
|
|
2688
|
-
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})`);
|
|
2689
2715
|
}
|
|
2690
2716
|
}
|
|
2691
|
-
const
|
|
2692
|
-
const { shopping:
|
|
2693
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2694
|
-
|
|
2695
|
-
s && /* @__PURE__ */ t.jsx(
|
|
2717
|
+
const Ca = (d) => {
|
|
2718
|
+
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
|
|
2719
|
+
return /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
|
|
2720
|
+
a && /* @__PURE__ */ t.jsx(Vo, {}),
|
|
2721
|
+
s && /* @__PURE__ */ t.jsx(Rt, { signUp: e })
|
|
2696
2722
|
] });
|
|
2697
2723
|
}, Vo = () => {
|
|
2698
|
-
const [d,
|
|
2699
|
-
function
|
|
2700
|
-
for (let
|
|
2701
|
-
for (let
|
|
2702
|
-
if (
|
|
2703
|
-
return
|
|
2724
|
+
const [d, a] = x.useState(!1), [e, s] = x.useState([]), { cart: n, getProducts: c } = At();
|
|
2725
|
+
function r(p) {
|
|
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;
|
|
2704
2730
|
}
|
|
2705
|
-
function
|
|
2706
|
-
for (let
|
|
2707
|
-
for (let
|
|
2708
|
-
if (
|
|
2709
|
-
return
|
|
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;
|
|
2710
2736
|
}
|
|
2711
|
-
|
|
2737
|
+
x.useEffect(() => {
|
|
2712
2738
|
(async () => {
|
|
2713
|
-
const
|
|
2714
|
-
...
|
|
2715
|
-
activeVariantId:
|
|
2716
|
-
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)
|
|
2717
2743
|
}));
|
|
2718
2744
|
s(u);
|
|
2719
2745
|
})();
|
|
2720
|
-
}, [
|
|
2721
|
-
function
|
|
2722
|
-
var
|
|
2723
|
-
return !
|
|
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;
|
|
2724
2750
|
}
|
|
2725
|
-
const
|
|
2751
|
+
const l = n.parts.length > 0 && e.length > 0 && !i(e[0]), [j, h] = x.useState(!1);
|
|
2726
2752
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2727
2753
|
/* @__PURE__ */ t.jsxs(
|
|
2728
|
-
|
|
2754
|
+
W,
|
|
2729
2755
|
{
|
|
2730
2756
|
type: "Secondary",
|
|
2731
2757
|
style: {
|
|
2732
2758
|
padding: 10
|
|
2733
2759
|
},
|
|
2734
|
-
onClick: (
|
|
2735
|
-
|
|
2760
|
+
onClick: (p) => {
|
|
2761
|
+
p.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), h(!0));
|
|
2736
2762
|
},
|
|
2737
2763
|
children: [
|
|
2738
2764
|
/* @__PURE__ */ t.jsx(
|
|
2739
|
-
|
|
2765
|
+
b,
|
|
2740
2766
|
{
|
|
2741
2767
|
name: "Handbag",
|
|
2742
2768
|
fill: "var(--icon-primary)"
|
|
2743
2769
|
}
|
|
2744
2770
|
),
|
|
2745
|
-
|
|
2771
|
+
l && /* @__PURE__ */ t.jsx("div", { className: $.shoppingCount, children: n.parts.length })
|
|
2746
2772
|
]
|
|
2747
2773
|
}
|
|
2748
2774
|
),
|
|
@@ -2750,101 +2776,101 @@ const $a = (d) => {
|
|
|
2750
2776
|
Mt,
|
|
2751
2777
|
{
|
|
2752
2778
|
close: () => {
|
|
2753
|
-
|
|
2754
|
-
|
|
2779
|
+
h(!1), setTimeout(() => {
|
|
2780
|
+
a(!1);
|
|
2755
2781
|
}, 300);
|
|
2756
2782
|
},
|
|
2757
2783
|
withAnimation: !1,
|
|
2758
2784
|
children: /* @__PURE__ */ t.jsx(
|
|
2759
|
-
|
|
2785
|
+
Yo,
|
|
2760
2786
|
{
|
|
2761
2787
|
activeProducts: e,
|
|
2762
|
-
isCartNotEmpty:
|
|
2763
|
-
isOpen:
|
|
2788
|
+
isCartNotEmpty: l,
|
|
2789
|
+
isOpen: j
|
|
2764
2790
|
}
|
|
2765
2791
|
)
|
|
2766
2792
|
}
|
|
2767
2793
|
)
|
|
2768
2794
|
] });
|
|
2769
|
-
},
|
|
2770
|
-
const { activeProducts:
|
|
2771
|
-
function
|
|
2772
|
-
|
|
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);
|
|
2773
2799
|
}
|
|
2774
|
-
function
|
|
2775
|
-
|
|
2776
|
-
productId:
|
|
2777
|
-
productVariantId:
|
|
2778
|
-
quantity:
|
|
2800
|
+
function j(p) {
|
|
2801
|
+
o({
|
|
2802
|
+
productId: p.id,
|
|
2803
|
+
productVariantId: p.activeVariantId,
|
|
2804
|
+
quantity: p.quantity + 1
|
|
2779
2805
|
});
|
|
2780
2806
|
}
|
|
2781
|
-
function p
|
|
2782
|
-
|
|
2783
|
-
productId:
|
|
2784
|
-
productVariantId:
|
|
2785
|
-
quantity:
|
|
2807
|
+
function h(p) {
|
|
2808
|
+
o({
|
|
2809
|
+
productId: p.id,
|
|
2810
|
+
productVariantId: p.activeVariantId,
|
|
2811
|
+
quantity: p.quantity - 1
|
|
2786
2812
|
});
|
|
2787
2813
|
}
|
|
2788
2814
|
return /* @__PURE__ */ t.jsxs(
|
|
2789
2815
|
"div",
|
|
2790
2816
|
{
|
|
2791
|
-
className:
|
|
2792
|
-
[
|
|
2817
|
+
className: V($.modal, {
|
|
2818
|
+
[$.closing]: !s
|
|
2793
2819
|
}),
|
|
2794
|
-
onClick: (
|
|
2820
|
+
onClick: (p) => p.stopPropagation(),
|
|
2795
2821
|
children: [
|
|
2796
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2797
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2798
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2799
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2822
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.top, children: [
|
|
2823
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
|
|
2824
|
+
/* @__PURE__ */ t.jsx("span", { className: $.title, children: "Cart" }),
|
|
2825
|
+
e && /* @__PURE__ */ t.jsx("div", { className: $.count, children: n.parts.length })
|
|
2800
2826
|
] }),
|
|
2801
2827
|
/* @__PURE__ */ t.jsx(
|
|
2802
2828
|
"button",
|
|
2803
2829
|
{
|
|
2804
|
-
className:
|
|
2805
|
-
[
|
|
2830
|
+
className: V($.clear, {
|
|
2831
|
+
[$.activeClear]: e
|
|
2806
2832
|
}),
|
|
2807
2833
|
disabled: !e,
|
|
2808
|
-
onClick:
|
|
2834
|
+
onClick: c,
|
|
2809
2835
|
children: "Clear all"
|
|
2810
2836
|
}
|
|
2811
2837
|
)
|
|
2812
2838
|
] }),
|
|
2813
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2814
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2839
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: $.cart, children: [
|
|
2840
|
+
/* @__PURE__ */ t.jsx("div", { className: $.products, children: a.map((p) => /* @__PURE__ */ t.jsxs(
|
|
2815
2841
|
"div",
|
|
2816
2842
|
{
|
|
2817
|
-
className:
|
|
2843
|
+
className: $.product,
|
|
2818
2844
|
children: [
|
|
2819
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2845
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.productInfo, children: [
|
|
2820
2846
|
/* @__PURE__ */ t.jsx(
|
|
2821
2847
|
"img",
|
|
2822
2848
|
{
|
|
2823
|
-
src: `https://imagedelivery.net/${
|
|
2849
|
+
src: `https://imagedelivery.net/${p.images[0].cfId}/w=500`,
|
|
2824
2850
|
alt: "image",
|
|
2825
2851
|
width: "100%",
|
|
2826
2852
|
height: "100%",
|
|
2827
|
-
className:
|
|
2853
|
+
className: $.image
|
|
2828
2854
|
}
|
|
2829
2855
|
),
|
|
2830
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2831
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2832
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2856
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.content, children: [
|
|
2857
|
+
/* @__PURE__ */ t.jsx("div", { className: $.name, children: p.name }),
|
|
2858
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
|
|
2833
2859
|
"$",
|
|
2834
|
-
|
|
2860
|
+
p.variants.find((m) => m.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
|
|
2835
2861
|
] })
|
|
2836
2862
|
] })
|
|
2837
2863
|
] }),
|
|
2838
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2864
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.productButtons, children: [
|
|
2839
2865
|
/* @__PURE__ */ t.jsx(
|
|
2840
2866
|
"div",
|
|
2841
2867
|
{
|
|
2842
2868
|
onClick: () => {
|
|
2843
|
-
|
|
2869
|
+
p.quantity !== 1 && h(p);
|
|
2844
2870
|
},
|
|
2845
|
-
className:
|
|
2871
|
+
className: $.productButton,
|
|
2846
2872
|
children: /* @__PURE__ */ t.jsx(
|
|
2847
|
-
|
|
2873
|
+
b,
|
|
2848
2874
|
{
|
|
2849
2875
|
name: "Minus",
|
|
2850
2876
|
fill: "#757575",
|
|
@@ -2854,14 +2880,14 @@ const $a = (d) => {
|
|
|
2854
2880
|
)
|
|
2855
2881
|
}
|
|
2856
2882
|
),
|
|
2857
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2883
|
+
/* @__PURE__ */ t.jsx("div", { className: $.productCount, children: p.quantity }),
|
|
2858
2884
|
/* @__PURE__ */ t.jsx(
|
|
2859
2885
|
"div",
|
|
2860
2886
|
{
|
|
2861
|
-
onClick: () =>
|
|
2862
|
-
className:
|
|
2887
|
+
onClick: () => j(p),
|
|
2888
|
+
className: $.productButton,
|
|
2863
2889
|
children: /* @__PURE__ */ t.jsx(
|
|
2864
|
-
|
|
2890
|
+
b,
|
|
2865
2891
|
{
|
|
2866
2892
|
name: "Plus",
|
|
2867
2893
|
fill: "#757575",
|
|
@@ -2874,14 +2900,14 @@ const $a = (d) => {
|
|
|
2874
2900
|
] })
|
|
2875
2901
|
]
|
|
2876
2902
|
},
|
|
2877
|
-
|
|
2903
|
+
p.id
|
|
2878
2904
|
)) }),
|
|
2879
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2880
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2881
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2905
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.bottom, children: [
|
|
2906
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.subtotal, children: [
|
|
2907
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.block, children: [
|
|
2882
2908
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2883
2909
|
/* @__PURE__ */ t.jsx(
|
|
2884
|
-
|
|
2910
|
+
b,
|
|
2885
2911
|
{
|
|
2886
2912
|
name: "Info",
|
|
2887
2913
|
width: 20,
|
|
@@ -2890,20 +2916,20 @@ const $a = (d) => {
|
|
|
2890
2916
|
}
|
|
2891
2917
|
)
|
|
2892
2918
|
] }),
|
|
2893
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2919
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.total, children: [
|
|
2894
2920
|
"$",
|
|
2895
|
-
|
|
2921
|
+
r().total
|
|
2896
2922
|
] })
|
|
2897
2923
|
] }),
|
|
2898
|
-
/* @__PURE__ */ t.jsx(
|
|
2924
|
+
/* @__PURE__ */ t.jsx(W, { onClick: () => l("/checkout"), children: "Checkout" })
|
|
2899
2925
|
] })
|
|
2900
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2926
|
+
] }) : /* @__PURE__ */ t.jsx(Go, {})
|
|
2901
2927
|
]
|
|
2902
2928
|
}
|
|
2903
2929
|
);
|
|
2904
|
-
},
|
|
2930
|
+
}, Go = () => /* @__PURE__ */ t.jsxs("div", { className: $.empty, children: [
|
|
2905
2931
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2906
|
-
|
|
2932
|
+
b,
|
|
2907
2933
|
{
|
|
2908
2934
|
name: "Handbag",
|
|
2909
2935
|
fill: "var(--icon-secondary)"
|
|
@@ -2917,22 +2943,22 @@ const $a = (d) => {
|
|
|
2917
2943
|
"a",
|
|
2918
2944
|
{
|
|
2919
2945
|
href: "/products",
|
|
2920
|
-
className:
|
|
2946
|
+
className: $.link,
|
|
2921
2947
|
children: "view products"
|
|
2922
2948
|
}
|
|
2923
2949
|
)
|
|
2924
2950
|
] })
|
|
2925
|
-
] }),
|
|
2926
|
-
const
|
|
2927
|
-
function
|
|
2928
|
-
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);
|
|
2929
2955
|
}
|
|
2930
2956
|
if (!e)
|
|
2931
2957
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2932
2958
|
/* @__PURE__ */ t.jsx(
|
|
2933
|
-
|
|
2959
|
+
W,
|
|
2934
2960
|
{
|
|
2935
|
-
onClick: () =>
|
|
2961
|
+
onClick: () => n("/customer-dash"),
|
|
2936
2962
|
type: "Secondary",
|
|
2937
2963
|
style: {
|
|
2938
2964
|
padding: 10
|
|
@@ -2941,9 +2967,9 @@ const $a = (d) => {
|
|
|
2941
2967
|
}
|
|
2942
2968
|
),
|
|
2943
2969
|
d && /* @__PURE__ */ t.jsx(
|
|
2944
|
-
|
|
2970
|
+
W,
|
|
2945
2971
|
{
|
|
2946
|
-
onClick: () =>
|
|
2972
|
+
onClick: () => n("/customer-dash"),
|
|
2947
2973
|
type: "Primary",
|
|
2948
2974
|
style: {
|
|
2949
2975
|
padding: 10
|
|
@@ -2952,46 +2978,46 @@ const $a = (d) => {
|
|
|
2952
2978
|
}
|
|
2953
2979
|
)
|
|
2954
2980
|
] });
|
|
2955
|
-
const [
|
|
2956
|
-
return
|
|
2981
|
+
const [c, r] = x.useState("test-email@gmail.com");
|
|
2982
|
+
return x.useEffect(() => {
|
|
2957
2983
|
(async () => {
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2984
|
+
const i = Fo(e);
|
|
2985
|
+
r(i.email);
|
|
2960
2986
|
})();
|
|
2961
2987
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
2962
2988
|
"div",
|
|
2963
2989
|
{
|
|
2964
|
-
className:
|
|
2965
|
-
onClick: () =>
|
|
2966
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2990
|
+
className: $.userInfo,
|
|
2991
|
+
onClick: () => n("/customer-dash"),
|
|
2992
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2967
2993
|
}
|
|
2968
2994
|
);
|
|
2969
|
-
},
|
|
2995
|
+
}, Xo = ({
|
|
2970
2996
|
children: d,
|
|
2971
|
-
logo:
|
|
2997
|
+
logo: a,
|
|
2972
2998
|
setIsOpen: e,
|
|
2973
2999
|
signUp: s
|
|
2974
3000
|
}) => {
|
|
2975
|
-
const { setIsOpen:
|
|
2976
|
-
|
|
2977
|
-
e(!1),
|
|
3001
|
+
const { setIsOpen: n } = Ut(), c = () => {
|
|
3002
|
+
n(!1), setTimeout(() => {
|
|
3003
|
+
e(!1), n(!0);
|
|
2978
3004
|
}, 300);
|
|
2979
3005
|
};
|
|
2980
3006
|
return /* @__PURE__ */ t.jsxs(
|
|
2981
3007
|
"div",
|
|
2982
3008
|
{
|
|
2983
|
-
className:
|
|
2984
|
-
onClick: (
|
|
3009
|
+
className: $.pagesMobileModal,
|
|
3010
|
+
onClick: (r) => r.stopPropagation(),
|
|
2985
3011
|
children: [
|
|
2986
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2987
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
3012
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.pagesMobileModalHeader, children: [
|
|
3013
|
+
/* @__PURE__ */ t.jsx("div", { children: a }),
|
|
2988
3014
|
/* @__PURE__ */ t.jsx(
|
|
2989
|
-
|
|
3015
|
+
W,
|
|
2990
3016
|
{
|
|
2991
3017
|
type: "Secondary",
|
|
2992
|
-
onClick:
|
|
3018
|
+
onClick: c,
|
|
2993
3019
|
children: /* @__PURE__ */ t.jsx(
|
|
2994
|
-
|
|
3020
|
+
b,
|
|
2995
3021
|
{
|
|
2996
3022
|
name: "X",
|
|
2997
3023
|
fill: "var(--icon-primary)"
|
|
@@ -3000,43 +3026,43 @@ const $a = (d) => {
|
|
|
3000
3026
|
}
|
|
3001
3027
|
)
|
|
3002
3028
|
] }),
|
|
3003
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3004
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3029
|
+
/* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalContent, children: d }),
|
|
3030
|
+
/* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Rt, { signUp: s }) })
|
|
3005
3031
|
]
|
|
3006
3032
|
}
|
|
3007
3033
|
);
|
|
3008
|
-
},
|
|
3034
|
+
}, Ba = ({
|
|
3009
3035
|
children: d,
|
|
3010
|
-
logo:
|
|
3036
|
+
logo: a,
|
|
3011
3037
|
signUp: e
|
|
3012
3038
|
}) => {
|
|
3013
|
-
const [s,
|
|
3039
|
+
const [s, n] = x.useState(!1);
|
|
3014
3040
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3015
|
-
/* @__PURE__ */ t.jsx(
|
|
3016
|
-
s && /* @__PURE__ */ t.jsx(Mt, { close: () =>
|
|
3017
|
-
|
|
3041
|
+
/* @__PURE__ */ t.jsx(Wo, { setIsOpenModal: n }),
|
|
3042
|
+
s && /* @__PURE__ */ t.jsx(Mt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
|
|
3043
|
+
Xo,
|
|
3018
3044
|
{
|
|
3019
|
-
logo:
|
|
3020
|
-
setIsOpen:
|
|
3045
|
+
logo: a,
|
|
3046
|
+
setIsOpen: n,
|
|
3021
3047
|
signUp: e,
|
|
3022
3048
|
children: d
|
|
3023
3049
|
}
|
|
3024
3050
|
) })
|
|
3025
3051
|
] });
|
|
3026
|
-
},
|
|
3027
|
-
const { setIsOpenModal:
|
|
3052
|
+
}, Wo = (d) => {
|
|
3053
|
+
const { setIsOpenModal: a } = d;
|
|
3028
3054
|
return /* @__PURE__ */ t.jsx(
|
|
3029
|
-
|
|
3055
|
+
W,
|
|
3030
3056
|
{
|
|
3031
3057
|
type: "Secondary",
|
|
3032
3058
|
style: {
|
|
3033
3059
|
padding: 10
|
|
3034
3060
|
},
|
|
3035
3061
|
onClick: (e) => {
|
|
3036
|
-
e.stopPropagation(),
|
|
3062
|
+
e.stopPropagation(), a(!0);
|
|
3037
3063
|
},
|
|
3038
3064
|
children: /* @__PURE__ */ t.jsx(
|
|
3039
|
-
|
|
3065
|
+
b,
|
|
3040
3066
|
{
|
|
3041
3067
|
name: "List",
|
|
3042
3068
|
fill: "var(--icon-primary)"
|
|
@@ -3044,22 +3070,22 @@ const $a = (d) => {
|
|
|
3044
3070
|
)
|
|
3045
3071
|
}
|
|
3046
3072
|
);
|
|
3047
|
-
},
|
|
3048
|
-
share:
|
|
3049
|
-
modal:
|
|
3050
|
-
header:
|
|
3051
|
-
socials:
|
|
3052
|
-
social:
|
|
3053
|
-
copy:
|
|
3054
|
-
title:
|
|
3055
|
-
copyWrapper:
|
|
3056
|
-
copyText:
|
|
3057
|
-
copyTextMobile:
|
|
3058
|
-
copyTextMiniMobile:
|
|
3059
|
-
},
|
|
3060
|
-
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();
|
|
3061
3087
|
function e() {
|
|
3062
|
-
|
|
3088
|
+
a(!0);
|
|
3063
3089
|
}
|
|
3064
3090
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3065
3091
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3071,7 +3097,7 @@ const $a = (d) => {
|
|
|
3071
3097
|
},
|
|
3072
3098
|
type: "Secondary",
|
|
3073
3099
|
children: /* @__PURE__ */ t.jsx(
|
|
3074
|
-
|
|
3100
|
+
b,
|
|
3075
3101
|
{
|
|
3076
3102
|
name: "Share",
|
|
3077
3103
|
fill: "#757575",
|
|
@@ -3080,38 +3106,38 @@ const $a = (d) => {
|
|
|
3080
3106
|
)
|
|
3081
3107
|
}
|
|
3082
3108
|
),
|
|
3083
|
-
d && /* @__PURE__ */ t.jsx(Mt, { close:
|
|
3109
|
+
d && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(ca, {}) })
|
|
3084
3110
|
] });
|
|
3085
|
-
},
|
|
3086
|
-
const { setIsOpenModal: d } =
|
|
3087
|
-
function
|
|
3088
|
-
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({
|
|
3089
3115
|
message: "Link copied to clipboard",
|
|
3090
3116
|
status: "success"
|
|
3091
3117
|
});
|
|
3092
3118
|
}
|
|
3093
|
-
function
|
|
3119
|
+
function r() {
|
|
3094
3120
|
s(!1), setTimeout(() => {
|
|
3095
3121
|
d(!1), s(!0);
|
|
3096
3122
|
}, 300);
|
|
3097
3123
|
}
|
|
3098
|
-
function
|
|
3099
|
-
return
|
|
3124
|
+
function o(i, l) {
|
|
3125
|
+
return i.length > l ? i.slice(0, l) + "..." : i;
|
|
3100
3126
|
}
|
|
3101
3127
|
return /* @__PURE__ */ t.jsxs(
|
|
3102
3128
|
"div",
|
|
3103
3129
|
{
|
|
3104
3130
|
className: at.modal,
|
|
3105
|
-
onClick: (
|
|
3131
|
+
onClick: (i) => i.stopPropagation(),
|
|
3106
3132
|
children: [
|
|
3107
3133
|
/* @__PURE__ */ t.jsxs("div", { className: at.header, children: [
|
|
3108
3134
|
/* @__PURE__ */ t.jsx("div", { className: at.title, children: "Copy Product Link" }),
|
|
3109
3135
|
/* @__PURE__ */ t.jsx(
|
|
3110
|
-
|
|
3136
|
+
b,
|
|
3111
3137
|
{
|
|
3112
3138
|
name: "X",
|
|
3113
3139
|
fill: "#757575",
|
|
3114
|
-
onClick:
|
|
3140
|
+
onClick: r,
|
|
3115
3141
|
hoverable: !0
|
|
3116
3142
|
}
|
|
3117
3143
|
)
|
|
@@ -3121,14 +3147,14 @@ const $a = (d) => {
|
|
|
3121
3147
|
lt,
|
|
3122
3148
|
{
|
|
3123
3149
|
type: "Secondary",
|
|
3124
|
-
onClick:
|
|
3150
|
+
onClick: c,
|
|
3125
3151
|
style: {
|
|
3126
3152
|
flex: 1
|
|
3127
3153
|
},
|
|
3128
3154
|
children: [
|
|
3129
|
-
/* @__PURE__ */ t.jsx("div", { className: at.copyText, children:
|
|
3130
|
-
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children:
|
|
3131
|
-
/* @__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) })
|
|
3132
3158
|
]
|
|
3133
3159
|
}
|
|
3134
3160
|
),
|
|
@@ -3136,70 +3162,88 @@ const $a = (d) => {
|
|
|
3136
3162
|
lt,
|
|
3137
3163
|
{
|
|
3138
3164
|
type: "Secondary",
|
|
3139
|
-
onClick:
|
|
3140
|
-
children:
|
|
3165
|
+
onClick: c,
|
|
3166
|
+
children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
3141
3167
|
}
|
|
3142
3168
|
)
|
|
3143
3169
|
] })
|
|
3144
3170
|
]
|
|
3145
3171
|
}
|
|
3146
3172
|
);
|
|
3147
|
-
},
|
|
3148
|
-
accordion:
|
|
3149
|
-
header:
|
|
3150
|
-
icon:
|
|
3151
|
-
open:
|
|
3152
|
-
content:
|
|
3153
|
-
},
|
|
3154
|
-
const [s,
|
|
3155
|
-
|
|
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);
|
|
3156
3182
|
};
|
|
3157
|
-
return
|
|
3158
|
-
|
|
3183
|
+
return x.useEffect(() => {
|
|
3184
|
+
o.current && r(s ? o.current.scrollHeight : 0);
|
|
3159
3185
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
|
|
3160
3186
|
/* @__PURE__ */ t.jsxs(
|
|
3161
3187
|
"div",
|
|
3162
3188
|
{
|
|
3163
3189
|
className: xt.header,
|
|
3164
|
-
onClick:
|
|
3190
|
+
onClick: i,
|
|
3165
3191
|
children: [
|
|
3166
3192
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
|
|
3167
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3193
|
+
/* @__PURE__ */ t.jsx("div", { className: V(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3168
3194
|
]
|
|
3169
3195
|
}
|
|
3170
3196
|
),
|
|
3171
3197
|
/* @__PURE__ */ t.jsx(
|
|
3172
3198
|
"div",
|
|
3173
3199
|
{
|
|
3174
|
-
ref:
|
|
3200
|
+
ref: o,
|
|
3175
3201
|
className: xt.content,
|
|
3176
|
-
style: { height: `${
|
|
3177
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
3202
|
+
style: { height: `${c}px` },
|
|
3203
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3178
3204
|
}
|
|
3179
3205
|
)
|
|
3180
3206
|
] });
|
|
3181
|
-
},
|
|
3182
|
-
const
|
|
3183
|
-
|
|
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 }));
|
|
3184
3210
|
};
|
|
3185
3211
|
return /* @__PURE__ */ t.jsx(
|
|
3186
3212
|
"div",
|
|
3187
3213
|
{
|
|
3188
|
-
onClick:
|
|
3214
|
+
onClick: o,
|
|
3189
3215
|
className: e,
|
|
3190
3216
|
role: "link",
|
|
3191
3217
|
style: { cursor: "pointer" },
|
|
3192
|
-
id:
|
|
3218
|
+
id: n,
|
|
3193
3219
|
children: d
|
|
3194
3220
|
}
|
|
3195
3221
|
);
|
|
3196
|
-
}, ma = "
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
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);
|
|
3203
3247
|
return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
|
|
3204
3248
|
e && /* @__PURE__ */ t.jsx(
|
|
3205
3249
|
"label",
|
|
@@ -3214,54 +3258,55 @@ const $a = (d) => {
|
|
|
3214
3258
|
{
|
|
3215
3259
|
id: e,
|
|
3216
3260
|
defaultValue: s,
|
|
3217
|
-
onChange: (
|
|
3218
|
-
|
|
3261
|
+
onChange: (i) => {
|
|
3262
|
+
o(i.target.value.length), a(i.target.value);
|
|
3219
3263
|
},
|
|
3220
|
-
placeholder:
|
|
3264
|
+
placeholder: c,
|
|
3221
3265
|
className: vt.textarea,
|
|
3222
|
-
maxLength:
|
|
3266
|
+
maxLength: n
|
|
3223
3267
|
}
|
|
3224
3268
|
),
|
|
3225
|
-
|
|
3226
|
-
|
|
3269
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: vt.length, children: [
|
|
3270
|
+
r,
|
|
3227
3271
|
"/",
|
|
3228
|
-
|
|
3272
|
+
n
|
|
3229
3273
|
] })
|
|
3230
3274
|
] });
|
|
3231
3275
|
};
|
|
3232
3276
|
export {
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3277
|
+
Pa as Accordion,
|
|
3278
|
+
Wo as BurgerMenuButton,
|
|
3279
|
+
W as Button,
|
|
3280
|
+
Mn as ButtonTypeSettings,
|
|
3281
|
+
Na as ButtonsSettings,
|
|
3282
|
+
Ia as CategorySettings,
|
|
3239
3283
|
ft as ChooseImage,
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3284
|
+
Ua as ChooseImageModal,
|
|
3285
|
+
Go as EmptyCart,
|
|
3286
|
+
$a as FormSettings,
|
|
3287
|
+
Ca as HeaderButtons,
|
|
3288
|
+
b as Icon,
|
|
3245
3289
|
K as InputSettings,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3290
|
+
Qi as InputUI,
|
|
3291
|
+
Ye as ItemsSettings,
|
|
3292
|
+
ka as LayoutSettings,
|
|
3293
|
+
Aa as Link,
|
|
3294
|
+
wa as ListingSelector,
|
|
3295
|
+
Da as Loader,
|
|
3252
3296
|
Mt as Modal,
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3297
|
+
Ba as PagesMobileMenu,
|
|
3298
|
+
Xo as PagesMobileModal,
|
|
3299
|
+
Ma as ProductCardButtons,
|
|
3300
|
+
Sa as ProductOptions,
|
|
3256
3301
|
Ot as RangeSelector,
|
|
3257
|
-
|
|
3258
|
-
|
|
3302
|
+
tt as Select,
|
|
3303
|
+
Ta as ShareLink,
|
|
3259
3304
|
Vo as ShoppingButton,
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3305
|
+
Yo as ShoppingModalCart,
|
|
3306
|
+
et as Switch,
|
|
3307
|
+
Lt as TextSettings,
|
|
3263
3308
|
qt as TextareaSettings,
|
|
3264
|
-
|
|
3309
|
+
Oa as TextareaUI,
|
|
3265
3310
|
Ht as TypesText,
|
|
3266
|
-
|
|
3311
|
+
Rt as UserInfo
|
|
3267
3312
|
};
|