@billgangcom/theme-lib 1.33.0 → 1.33.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/builder.cjs.js +4 -4
- package/dist/builder.es.js +601 -587
- package/dist/{index-CZcNDk0w.cjs → index-CLg_NJ6J.cjs} +4 -4
- package/dist/{index-DSREXVyt.js → index-Dfo5ydyB.js} +28 -23
- package/dist/ui/ItemsSettings/popup.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1416 -1394
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { l as
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, a as W, c as F, S as K, T as Ct, C as ht, b as Z, D as yt, H as kt, B as it, v as dt, u as $t, d as wt, e as Ot, f as ft, g as Nt, h as Bt, M as St, i as Pt, k as Dt } from "./index-Dfo5ydyB.js";
|
|
2
|
+
import { l as no, L as io } from "./index-Dfo5ydyB.js";
|
|
3
|
+
import g from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5j_15", Mt = "_subtitle_9rr5j_22", Ht = "_alignmentContent_9rr5j_29",
|
|
5
|
+
const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5j_15", Mt = "_subtitle_9rr5j_22", Ht = "_alignmentContent_9rr5j_29", zt = "_alignments_9rr5j_37", Vt = "_alignment_9rr5j_8", Ft = "_circle_9rr5j_58", Ut = "_paddings_9rr5j_65", Yt = "_padding_9rr5j_65", Gt = "_input_9rr5j_84", J = {
|
|
6
6
|
wrapper: Et,
|
|
7
7
|
alignmentBlock: Lt,
|
|
8
8
|
title: Rt,
|
|
9
9
|
subtitle: Mt,
|
|
10
10
|
alignmentContent: Ht,
|
|
11
|
-
alignments:
|
|
11
|
+
alignments: zt,
|
|
12
12
|
alignment: Vt,
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
13
|
+
circle: Ft,
|
|
14
|
+
paddings: Ut,
|
|
15
15
|
padding: Yt,
|
|
16
16
|
input: Gt
|
|
17
17
|
}, Wt = [
|
|
@@ -24,10 +24,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
24
24
|
"bottomLeft",
|
|
25
25
|
"bottom",
|
|
26
26
|
"bottomRight"
|
|
27
|
-
], Xt = ["left", "top", "right", "bottom"],
|
|
28
|
-
const { alignment:
|
|
29
|
-
function
|
|
30
|
-
switch (
|
|
27
|
+
], Xt = ["left", "top", "right", "bottom"], Fa = (u) => {
|
|
28
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
|
|
29
|
+
function c() {
|
|
30
|
+
switch (a) {
|
|
31
31
|
case "left":
|
|
32
32
|
case "topLeft":
|
|
33
33
|
case "bottomLeft":
|
|
@@ -44,8 +44,8 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
44
44
|
return "TextAlignCenter";
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
switch (
|
|
47
|
+
function l(o) {
|
|
48
|
+
switch (o) {
|
|
49
49
|
case "left":
|
|
50
50
|
return "AlignLeft";
|
|
51
51
|
case "right":
|
|
@@ -61,19 +61,19 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
61
61
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
64
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Wt.map((
|
|
64
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Wt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
onClick: () => {
|
|
68
|
-
i(
|
|
68
|
+
i(o);
|
|
69
69
|
},
|
|
70
70
|
className: J.alignment,
|
|
71
71
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
o !== a && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
73
|
+
o === a && /* @__PURE__ */ t.jsx(
|
|
74
|
+
b,
|
|
75
75
|
{
|
|
76
|
-
name:
|
|
76
|
+
name: c(),
|
|
77
77
|
fill: "#FF3F19",
|
|
78
78
|
width: 22,
|
|
79
79
|
height: 22
|
|
@@ -81,17 +81,17 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
81
81
|
)
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
|
|
84
|
+
o
|
|
85
85
|
)) }),
|
|
86
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((
|
|
86
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
87
87
|
"label",
|
|
88
88
|
{
|
|
89
89
|
className: J.padding,
|
|
90
90
|
children: [
|
|
91
91
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
92
|
-
|
|
92
|
+
b,
|
|
93
93
|
{
|
|
94
|
-
name:
|
|
94
|
+
name: l(o),
|
|
95
95
|
width: 20,
|
|
96
96
|
height: 20
|
|
97
97
|
}
|
|
@@ -99,11 +99,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
99
99
|
/* @__PURE__ */ t.jsx(
|
|
100
100
|
W,
|
|
101
101
|
{
|
|
102
|
-
type: "
|
|
103
|
-
value: String(e[
|
|
104
|
-
onChange: (
|
|
102
|
+
type: "number",
|
|
103
|
+
value: String(e[o]),
|
|
104
|
+
onChange: (n) => s({
|
|
105
105
|
...e,
|
|
106
|
-
[
|
|
106
|
+
[o]: Number(n)
|
|
107
107
|
}),
|
|
108
108
|
paddingless: !0,
|
|
109
109
|
borderless: !0
|
|
@@ -111,25 +111,25 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
111
111
|
)
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
|
-
|
|
114
|
+
o
|
|
115
115
|
)) })
|
|
116
116
|
] })
|
|
117
117
|
] })
|
|
118
118
|
] });
|
|
119
|
-
}, Jt = "
|
|
119
|
+
}, Jt = "_title_voimd_1", Qt = "_subtitle_voimd_5", Kt = "_header_voimd_12", Zt = "_text_voimd_13", te = "_top_voimd_20", ee = "_itemsBlock_voimd_29", ut = {
|
|
120
120
|
title: Jt,
|
|
121
121
|
subtitle: Qt,
|
|
122
122
|
header: Kt,
|
|
123
123
|
text: Zt,
|
|
124
124
|
top: te,
|
|
125
125
|
itemsBlock: ee
|
|
126
|
-
}, se = "
|
|
126
|
+
}, se = "_typeTexts_167ez_1", ne = "_block_167ez_8", ie = "_active_167ez_25", bt = {
|
|
127
127
|
typeTexts: se,
|
|
128
128
|
block: ne,
|
|
129
129
|
active: ie
|
|
130
|
-
},
|
|
131
|
-
const { typesText:
|
|
132
|
-
function
|
|
130
|
+
}, ae = ["bold", "italic", "underline", "strike-through", "code"], Tt = (u) => {
|
|
131
|
+
const { typesText: a, setTypesText: e } = u;
|
|
132
|
+
function s(i) {
|
|
133
133
|
switch (i) {
|
|
134
134
|
case "bold":
|
|
135
135
|
return "TextB";
|
|
@@ -143,25 +143,25 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
143
143
|
return "TextUnderline";
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
146
|
+
return /* @__PURE__ */ t.jsx("div", { className: bt.typeTexts, children: ae.map((i) => /* @__PURE__ */ t.jsx(
|
|
147
147
|
"div",
|
|
148
148
|
{
|
|
149
|
-
className:
|
|
150
|
-
[
|
|
149
|
+
className: F(bt.block, {
|
|
150
|
+
[bt.active]: a.includes(i)
|
|
151
151
|
}),
|
|
152
152
|
onClick: () => {
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
e(
|
|
153
|
+
const c = [...a];
|
|
154
|
+
if (c.includes(i)) {
|
|
155
|
+
const l = c.filter((o) => o !== i);
|
|
156
|
+
e(l);
|
|
157
157
|
} else
|
|
158
|
-
|
|
158
|
+
c.push(i), e(c);
|
|
159
159
|
},
|
|
160
160
|
children: /* @__PURE__ */ t.jsx(
|
|
161
|
-
|
|
161
|
+
b,
|
|
162
162
|
{
|
|
163
|
-
name:
|
|
164
|
-
fill:
|
|
163
|
+
name: s(i),
|
|
164
|
+
fill: a.includes(i) ? "#252525" : "#757575",
|
|
165
165
|
width: 20,
|
|
166
166
|
height: 20
|
|
167
167
|
}
|
|
@@ -169,58 +169,58 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
169
169
|
},
|
|
170
170
|
String(i)
|
|
171
171
|
)) });
|
|
172
|
-
},
|
|
172
|
+
}, qt = (u) => {
|
|
173
173
|
const {
|
|
174
|
-
typesText:
|
|
174
|
+
typesText: a,
|
|
175
175
|
isActiveText: e,
|
|
176
|
-
setIsActiveText:
|
|
176
|
+
setIsActiveText: s,
|
|
177
177
|
text: i,
|
|
178
|
-
setText:
|
|
179
|
-
setTypesText:
|
|
180
|
-
title:
|
|
181
|
-
subtitle:
|
|
178
|
+
setText: c,
|
|
179
|
+
setTypesText: l,
|
|
180
|
+
title: o,
|
|
181
|
+
subtitle: n = "Items"
|
|
182
182
|
} = u;
|
|
183
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
e !== void 0 &&
|
|
183
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ut.text, children: [
|
|
184
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ut.top, children: [
|
|
185
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: ut.title, children: o }),
|
|
186
|
+
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
187
187
|
K,
|
|
188
188
|
{
|
|
189
189
|
current: e,
|
|
190
|
-
onChange: (
|
|
190
|
+
onChange: (r) => s(r)
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
] }),
|
|
194
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
195
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
194
|
+
/* @__PURE__ */ t.jsxs("div", { className: ut.itemsBlock, children: [
|
|
195
|
+
/* @__PURE__ */ t.jsx("h5", { className: ut.subtitle, children: n }),
|
|
196
196
|
/* @__PURE__ */ t.jsx(
|
|
197
197
|
Ct,
|
|
198
198
|
{
|
|
199
|
-
onChange: (
|
|
199
|
+
onChange: (r) => c(r),
|
|
200
200
|
value: i,
|
|
201
201
|
maxLength: 150
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
204
|
/* @__PURE__ */ t.jsx(
|
|
205
|
-
|
|
205
|
+
Tt,
|
|
206
206
|
{
|
|
207
|
-
typesText:
|
|
208
|
-
setTypesText:
|
|
207
|
+
typesText: a,
|
|
208
|
+
setTypesText: l
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] })
|
|
212
212
|
] });
|
|
213
|
-
},
|
|
214
|
-
title:
|
|
213
|
+
}, oe = "_title_vzbkd_1", ce = "_subtitle_vzbkd_5", le = "_header_vzbkd_12", re = "_text_vzbkd_13", de = "_productsBlock_vzbkd_14", ue = "_top_vzbkd_26", me = "_itemsBlock_vzbkd_35", _e = "_typeTexts_vzbkd_41", he = "_block_vzbkd_48", pe = "_active_vzbkd_61", ge = "_products_vzbkd_14", fe = "_product_vzbkd_14", xe = "_button_vzbkd_80", be = "_disabled_vzbkd_91", ve = "_image_vzbkd_95", je = "_info_vzbkd_102", ye = "_name_vzbkd_114", ke = "_buttons_vzbkd_118", $e = "_modal_vzbkd_125", we = "_link_vzbkd_145", Ne = "_modalOptions_vzbkd_151", Ie = "_addButton_vzbkd_163", H = {
|
|
214
|
+
title: oe,
|
|
215
215
|
subtitle: ce,
|
|
216
216
|
header: le,
|
|
217
217
|
text: re,
|
|
218
218
|
productsBlock: de,
|
|
219
219
|
top: ue,
|
|
220
|
-
itemsBlock:
|
|
221
|
-
typeTexts:
|
|
220
|
+
itemsBlock: me,
|
|
221
|
+
typeTexts: _e,
|
|
222
222
|
block: he,
|
|
223
|
-
active:
|
|
223
|
+
active: pe,
|
|
224
224
|
products: ge,
|
|
225
225
|
product: fe,
|
|
226
226
|
button: xe,
|
|
@@ -231,161 +231,166 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
231
231
|
buttons: ke,
|
|
232
232
|
modal: $e,
|
|
233
233
|
link: we,
|
|
234
|
-
modalOptions: Ne
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
modalOptions: Ne,
|
|
235
|
+
addButton: Ie
|
|
236
|
+
}, Ce = g.forwardRef(
|
|
237
|
+
(u, a) => {
|
|
238
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
239
|
+
function o(n, r) {
|
|
240
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
241
|
+
}
|
|
238
242
|
return /* @__PURE__ */ t.jsxs(
|
|
239
243
|
"div",
|
|
240
244
|
{
|
|
241
|
-
ref:
|
|
242
|
-
className:
|
|
243
|
-
onClick: (
|
|
244
|
-
|
|
245
|
+
ref: a,
|
|
246
|
+
className: H.modal,
|
|
247
|
+
onClick: (n) => {
|
|
248
|
+
n.stopPropagation();
|
|
245
249
|
},
|
|
246
250
|
style: {
|
|
247
251
|
top: `${i.top}px`,
|
|
248
252
|
left: `${i.left}px`
|
|
249
253
|
},
|
|
250
254
|
children: [
|
|
251
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
252
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
255
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
256
|
+
/* @__PURE__ */ t.jsx("h3", { className: H.title, children: o(e.name, 20) }),
|
|
253
257
|
/* @__PURE__ */ t.jsx(
|
|
254
|
-
|
|
258
|
+
b,
|
|
255
259
|
{
|
|
256
260
|
name: "X",
|
|
257
261
|
height: 20,
|
|
258
262
|
width: 20,
|
|
259
263
|
hoverable: !0,
|
|
260
264
|
onClick: () => {
|
|
261
|
-
|
|
265
|
+
s(null), l(!1);
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
268
|
)
|
|
265
269
|
] }),
|
|
266
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
267
|
-
if (
|
|
270
|
+
/* @__PURE__ */ t.jsx("div", { className: H.modalOptions, children: c.map((n) => {
|
|
271
|
+
if (n.type === "image")
|
|
268
272
|
return /* @__PURE__ */ t.jsx(
|
|
269
273
|
ht,
|
|
270
274
|
{
|
|
271
275
|
label: "Put up an attractive image",
|
|
272
|
-
activeImage: e[
|
|
273
|
-
onChange: (
|
|
274
|
-
const
|
|
276
|
+
activeImage: e[n.field],
|
|
277
|
+
onChange: (r) => {
|
|
278
|
+
const _ = {
|
|
275
279
|
...e,
|
|
276
|
-
[
|
|
280
|
+
[n.field]: r
|
|
277
281
|
};
|
|
278
|
-
|
|
282
|
+
s(_);
|
|
279
283
|
}
|
|
280
284
|
},
|
|
281
|
-
String(
|
|
285
|
+
String(n.field)
|
|
282
286
|
);
|
|
283
|
-
if (
|
|
287
|
+
if (n.type === "text")
|
|
284
288
|
return /* @__PURE__ */ t.jsx(
|
|
285
|
-
|
|
289
|
+
qt,
|
|
286
290
|
{
|
|
287
|
-
typesText: e[
|
|
288
|
-
setTypesText: (
|
|
289
|
-
const
|
|
291
|
+
typesText: e[n.field.type],
|
|
292
|
+
setTypesText: (r) => {
|
|
293
|
+
const _ = {
|
|
290
294
|
...e,
|
|
291
|
-
[
|
|
295
|
+
[n.field.type]: r
|
|
292
296
|
};
|
|
293
|
-
|
|
297
|
+
s(_);
|
|
294
298
|
},
|
|
295
|
-
text: e[
|
|
296
|
-
setText: (
|
|
297
|
-
const
|
|
299
|
+
text: e[n.field.text] || "",
|
|
300
|
+
setText: (r) => {
|
|
301
|
+
const _ = {
|
|
298
302
|
...e,
|
|
299
|
-
[
|
|
303
|
+
[n.field.text]: r
|
|
300
304
|
};
|
|
301
|
-
|
|
305
|
+
s(_);
|
|
302
306
|
},
|
|
303
|
-
subtitle:
|
|
307
|
+
subtitle: n.label
|
|
304
308
|
}
|
|
305
309
|
);
|
|
306
|
-
if (
|
|
310
|
+
if (n.type === "input")
|
|
307
311
|
return /* @__PURE__ */ t.jsx(
|
|
308
312
|
W,
|
|
309
313
|
{
|
|
310
|
-
onChange: (
|
|
311
|
-
const
|
|
314
|
+
onChange: (r) => {
|
|
315
|
+
const _ = {
|
|
312
316
|
...e,
|
|
313
|
-
[
|
|
317
|
+
[n.field]: r
|
|
314
318
|
};
|
|
315
|
-
|
|
319
|
+
s(_);
|
|
316
320
|
},
|
|
317
|
-
value: e[
|
|
318
|
-
label:
|
|
319
|
-
placeholder:
|
|
321
|
+
value: e[n.field] || "",
|
|
322
|
+
label: n.label,
|
|
323
|
+
placeholder: n.placeholder
|
|
320
324
|
}
|
|
321
325
|
);
|
|
322
|
-
if (
|
|
323
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
326
|
+
if (n.type === "inputSwitch")
|
|
327
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.link, children: [
|
|
324
328
|
/* @__PURE__ */ t.jsx(
|
|
325
329
|
W,
|
|
326
330
|
{
|
|
327
|
-
onChange: (
|
|
328
|
-
const
|
|
331
|
+
onChange: (r) => {
|
|
332
|
+
const _ = {
|
|
329
333
|
...e,
|
|
330
|
-
[
|
|
334
|
+
[n.field.text]: r
|
|
331
335
|
};
|
|
332
|
-
|
|
336
|
+
s(_);
|
|
333
337
|
},
|
|
334
|
-
value: e[
|
|
335
|
-
label:
|
|
336
|
-
placeholder:
|
|
338
|
+
value: e[n.field.text] || "",
|
|
339
|
+
label: n.inputLabel,
|
|
340
|
+
placeholder: n.placeholder
|
|
337
341
|
}
|
|
338
342
|
),
|
|
339
343
|
/* @__PURE__ */ t.jsx(
|
|
340
344
|
K,
|
|
341
345
|
{
|
|
342
|
-
current: !!e[
|
|
343
|
-
label:
|
|
344
|
-
onChange: (
|
|
345
|
-
const
|
|
346
|
+
current: !!e[n.field.switch] || !1,
|
|
347
|
+
label: n.switchLabel,
|
|
348
|
+
onChange: (r) => {
|
|
349
|
+
const _ = {
|
|
346
350
|
...e,
|
|
347
|
-
[
|
|
351
|
+
[n.field.switch]: r
|
|
348
352
|
};
|
|
349
|
-
|
|
353
|
+
s(_);
|
|
350
354
|
}
|
|
351
355
|
}
|
|
352
356
|
)
|
|
353
357
|
] });
|
|
354
|
-
if (
|
|
358
|
+
if (n.type === "list")
|
|
355
359
|
return /* @__PURE__ */ t.jsx(
|
|
356
|
-
|
|
360
|
+
qe,
|
|
357
361
|
{
|
|
358
|
-
items: e[
|
|
359
|
-
setItems: (
|
|
360
|
-
const
|
|
362
|
+
items: e[n.field] || [],
|
|
363
|
+
setItems: (r) => {
|
|
364
|
+
const _ = {
|
|
361
365
|
...e,
|
|
362
|
-
[
|
|
366
|
+
[n.field]: r
|
|
363
367
|
};
|
|
364
|
-
|
|
368
|
+
s(_);
|
|
365
369
|
},
|
|
366
370
|
itemsType: "select",
|
|
367
|
-
draggable:
|
|
368
|
-
itemsOptions:
|
|
369
|
-
deletable:
|
|
371
|
+
draggable: n.draggable || !1,
|
|
372
|
+
itemsOptions: n.itemsOptions,
|
|
373
|
+
deletable: n.deletable || !1,
|
|
370
374
|
editable: !1,
|
|
371
|
-
subtitle:
|
|
375
|
+
subtitle: n.label,
|
|
376
|
+
addableOptions: n.addableOptions
|
|
372
377
|
}
|
|
373
378
|
);
|
|
374
|
-
if (
|
|
379
|
+
if (n.type === "select")
|
|
375
380
|
return /* @__PURE__ */ t.jsx(
|
|
376
|
-
|
|
381
|
+
Z,
|
|
377
382
|
{
|
|
378
|
-
options:
|
|
379
|
-
onChange: (
|
|
380
|
-
const
|
|
383
|
+
options: n.itemsOptions,
|
|
384
|
+
onChange: (r) => {
|
|
385
|
+
const _ = {
|
|
381
386
|
...e,
|
|
382
|
-
[
|
|
387
|
+
[n.field]: r
|
|
383
388
|
};
|
|
384
|
-
|
|
389
|
+
s(_);
|
|
385
390
|
},
|
|
386
|
-
label:
|
|
387
|
-
value: e[
|
|
388
|
-
leftAddon:
|
|
391
|
+
label: n.label,
|
|
392
|
+
value: e[n.field] || "String",
|
|
393
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
389
394
|
}
|
|
390
395
|
);
|
|
391
396
|
}) })
|
|
@@ -393,109 +398,109 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
393
398
|
}
|
|
394
399
|
);
|
|
395
400
|
}
|
|
396
|
-
),
|
|
397
|
-
other:
|
|
401
|
+
), Be = "_other_g74jx_1", Se = "_subtitle_g74jx_7", Pe = "_items_g74jx_14", vt = {
|
|
402
|
+
other: Be,
|
|
398
403
|
subtitle: Se,
|
|
399
|
-
items:
|
|
400
|
-
},
|
|
401
|
-
const { items:
|
|
402
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
403
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
404
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
404
|
+
items: Pe
|
|
405
|
+
}, xt = (u) => {
|
|
406
|
+
const { items: a, title: e = "Other" } = u;
|
|
407
|
+
return /* @__PURE__ */ t.jsxs("div", { className: vt.other, children: [
|
|
408
|
+
/* @__PURE__ */ t.jsx("h5", { className: vt.subtitle, children: e }),
|
|
409
|
+
/* @__PURE__ */ t.jsx("div", { className: vt.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
405
410
|
K,
|
|
406
411
|
{
|
|
407
|
-
current:
|
|
408
|
-
onChange: (
|
|
409
|
-
label:
|
|
412
|
+
current: s.isItem,
|
|
413
|
+
onChange: (c) => s.setIsItem(c),
|
|
414
|
+
label: s.label,
|
|
410
415
|
hasBackground: !0,
|
|
411
416
|
paddingless: !1
|
|
412
417
|
},
|
|
413
418
|
i
|
|
414
419
|
)) })
|
|
415
420
|
] });
|
|
416
|
-
},
|
|
417
|
-
const { index:
|
|
421
|
+
}, Te = (u) => {
|
|
422
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
418
423
|
accept: "product",
|
|
419
|
-
hover(
|
|
420
|
-
|
|
424
|
+
hover(o) {
|
|
425
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
421
426
|
}
|
|
422
|
-
}), [{ isDragging:
|
|
427
|
+
}), [{ isDragging: c }, l] = wt({
|
|
423
428
|
type: "product",
|
|
424
|
-
item: { index:
|
|
425
|
-
collect: (
|
|
426
|
-
isDragging:
|
|
429
|
+
item: { index: a },
|
|
430
|
+
collect: (o) => ({
|
|
431
|
+
isDragging: o.isDragging()
|
|
427
432
|
})
|
|
428
433
|
});
|
|
429
434
|
return /* @__PURE__ */ t.jsx(
|
|
430
435
|
"div",
|
|
431
436
|
{
|
|
432
|
-
ref: (
|
|
433
|
-
className: `${
|
|
434
|
-
children:
|
|
437
|
+
ref: (o) => l(i(o)),
|
|
438
|
+
className: `${H.product} ${c ? H.dragging : ""}`,
|
|
439
|
+
children: s
|
|
435
440
|
}
|
|
436
441
|
);
|
|
437
|
-
},
|
|
442
|
+
}, qe = (u) => {
|
|
438
443
|
const {
|
|
439
|
-
isActiveItems:
|
|
444
|
+
isActiveItems: a,
|
|
440
445
|
setIsActiveItems: e,
|
|
441
|
-
items:
|
|
446
|
+
items: s,
|
|
442
447
|
setItems: i,
|
|
443
|
-
other:
|
|
444
|
-
title:
|
|
445
|
-
subtitle:
|
|
446
|
-
editable:
|
|
447
|
-
draggable:
|
|
448
|
-
withImage:
|
|
449
|
-
deletable:
|
|
450
|
-
addable:
|
|
448
|
+
other: c,
|
|
449
|
+
title: l,
|
|
450
|
+
subtitle: o,
|
|
451
|
+
editable: n = !0,
|
|
452
|
+
draggable: r = !1,
|
|
453
|
+
withImage: _ = !1,
|
|
454
|
+
deletable: d = !0,
|
|
455
|
+
addable: P = !0,
|
|
451
456
|
itemsType: x,
|
|
452
|
-
itemsPlaceholder:
|
|
453
|
-
itemsOptions:
|
|
454
|
-
hasRangeSelector:
|
|
455
|
-
rangeSelectorOptions:
|
|
456
|
-
modalOptions:
|
|
457
|
-
addableOptions:
|
|
458
|
-
limit:
|
|
459
|
-
autoScrollInterval:
|
|
460
|
-
} = u, [
|
|
457
|
+
itemsPlaceholder: f = "",
|
|
458
|
+
itemsOptions: h,
|
|
459
|
+
hasRangeSelector: q = !1,
|
|
460
|
+
rangeSelectorOptions: A,
|
|
461
|
+
modalOptions: v,
|
|
462
|
+
addableOptions: E = {},
|
|
463
|
+
limit: I,
|
|
464
|
+
autoScrollInterval: C
|
|
465
|
+
} = u, [M, m] = g.useState(null), [O, k] = g.useState({
|
|
461
466
|
top: 0,
|
|
462
467
|
left: 0
|
|
463
|
-
}), [y,
|
|
464
|
-
const
|
|
465
|
-
|
|
468
|
+
}), [y, L] = g.useState(null), w = g.useRef(null), [R, U] = g.useState(!1), tt = (p, B) => {
|
|
469
|
+
const $ = [...s], [X] = $.splice(p, 1);
|
|
470
|
+
$.splice(B, 0, X), i($);
|
|
466
471
|
};
|
|
467
|
-
|
|
472
|
+
g.useEffect(() => {
|
|
468
473
|
const p = () => {
|
|
469
|
-
|
|
474
|
+
m(null), U(!1);
|
|
470
475
|
};
|
|
471
|
-
return document.body.addEventListener("click", p),
|
|
472
|
-
|
|
476
|
+
return document.body.addEventListener("click", p), m(null), U(!1), () => {
|
|
477
|
+
m(null), U(!1), document.body.removeEventListener("click", p);
|
|
473
478
|
};
|
|
474
|
-
}, []),
|
|
475
|
-
if (
|
|
476
|
-
const p = [...
|
|
479
|
+
}, []), g.useEffect(() => {
|
|
480
|
+
if (M) {
|
|
481
|
+
const p = [...s].map((B) => B.id === M.id ? M : B);
|
|
477
482
|
i(p);
|
|
478
483
|
}
|
|
479
|
-
}, [
|
|
480
|
-
if (
|
|
481
|
-
const p =
|
|
482
|
-
let
|
|
483
|
-
|
|
484
|
-
top:
|
|
484
|
+
}, [M]), g.useEffect(() => {
|
|
485
|
+
if (w.current && y) {
|
|
486
|
+
const p = w.current.getBoundingClientRect().height, B = window.innerHeight;
|
|
487
|
+
let $ = y.top;
|
|
488
|
+
$ + p > B + window.scrollY - 200 && ($ = B + window.scrollY - p - 200), $ < 0 && ($ = 10), k({
|
|
489
|
+
top: $,
|
|
485
490
|
left: y.left
|
|
486
491
|
});
|
|
487
492
|
}
|
|
488
|
-
}, [
|
|
489
|
-
const at = (p,
|
|
493
|
+
}, [w.current, y]);
|
|
494
|
+
const at = (p, B) => {
|
|
490
495
|
p.stopPropagation();
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
top:
|
|
494
|
-
left:
|
|
495
|
-
}),
|
|
496
|
+
const $ = p.target.getBoundingClientRect();
|
|
497
|
+
L({
|
|
498
|
+
top: $.top + window.scrollY,
|
|
499
|
+
left: $.left - 30
|
|
500
|
+
}), m(B), U(!0);
|
|
496
501
|
};
|
|
497
|
-
function
|
|
498
|
-
if (
|
|
502
|
+
function j(p) {
|
|
503
|
+
if (_)
|
|
499
504
|
return p ? /* @__PURE__ */ t.jsx(
|
|
500
505
|
"img",
|
|
501
506
|
{
|
|
@@ -505,7 +510,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
505
510
|
height: 16
|
|
506
511
|
}
|
|
507
512
|
) : /* @__PURE__ */ t.jsx(
|
|
508
|
-
|
|
513
|
+
b,
|
|
509
514
|
{
|
|
510
515
|
name: "Image",
|
|
511
516
|
width: 16,
|
|
@@ -514,11 +519,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
514
519
|
}
|
|
515
520
|
);
|
|
516
521
|
}
|
|
517
|
-
const
|
|
522
|
+
const T = (p, B) => {
|
|
518
523
|
var X;
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
|
|
524
|
+
const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
525
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
526
|
+
b,
|
|
522
527
|
{
|
|
523
528
|
name: "DotsSixVertical",
|
|
524
529
|
hoverable: !0,
|
|
@@ -527,155 +532,160 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
527
532
|
}
|
|
528
533
|
) }),
|
|
529
534
|
x === "select" && /* @__PURE__ */ t.jsx(
|
|
530
|
-
|
|
535
|
+
Z,
|
|
531
536
|
{
|
|
532
|
-
onChange: (
|
|
533
|
-
const
|
|
537
|
+
onChange: (D) => {
|
|
538
|
+
const Y = [...s], lt = h.find((pt) => pt.name === D);
|
|
539
|
+
if (!lt) return;
|
|
540
|
+
const ot = Y.map((pt) => pt.id === p.id ? {
|
|
541
|
+
...lt,
|
|
542
|
+
name: D
|
|
543
|
+
} : pt);
|
|
544
|
+
m({
|
|
534
545
|
...p,
|
|
535
|
-
name:
|
|
536
|
-
}
|
|
537
|
-
j({
|
|
538
|
-
...p,
|
|
539
|
-
name: R
|
|
540
|
-
}), i([...rt]);
|
|
546
|
+
name: D
|
|
547
|
+
}), i([...ot]);
|
|
541
548
|
},
|
|
542
549
|
value: p.name,
|
|
543
|
-
options:
|
|
544
|
-
leftAddon:
|
|
550
|
+
options: h.filter((D) => !s.find((Y) => Y.name === D.name)).map((D) => D.name),
|
|
551
|
+
leftAddon: j(p.images)
|
|
545
552
|
}
|
|
546
553
|
),
|
|
547
554
|
x === "input" && /* @__PURE__ */ t.jsx(
|
|
548
555
|
W,
|
|
549
556
|
{
|
|
550
|
-
onChange: (
|
|
551
|
-
const
|
|
557
|
+
onChange: (D) => {
|
|
558
|
+
const lt = [...s].map((ot) => ot.id === p.id ? {
|
|
552
559
|
...p,
|
|
553
|
-
name:
|
|
554
|
-
} :
|
|
555
|
-
i([...
|
|
560
|
+
name: D
|
|
561
|
+
} : ot);
|
|
562
|
+
i([...lt]);
|
|
556
563
|
},
|
|
557
564
|
value: p.name,
|
|
558
|
-
placeholder:
|
|
565
|
+
placeholder: f
|
|
559
566
|
}
|
|
560
567
|
),
|
|
561
568
|
x === "image" && /* @__PURE__ */ t.jsx(
|
|
562
569
|
ht,
|
|
563
570
|
{
|
|
564
|
-
onChange: (
|
|
565
|
-
const
|
|
571
|
+
onChange: (D) => {
|
|
572
|
+
const lt = [...s].map((ot) => ot.id === p.id ? {
|
|
566
573
|
...p,
|
|
567
|
-
images:
|
|
568
|
-
} :
|
|
569
|
-
i([...
|
|
574
|
+
images: D
|
|
575
|
+
} : ot);
|
|
576
|
+
i([...lt]);
|
|
570
577
|
},
|
|
571
|
-
activeImage: (X =
|
|
578
|
+
activeImage: (X = s.find((D) => D.id === p.id)) == null ? void 0 : X.images[0]
|
|
572
579
|
}
|
|
573
580
|
),
|
|
574
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
575
|
-
|
|
576
|
-
|
|
581
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
582
|
+
n && /* @__PURE__ */ t.jsx(
|
|
583
|
+
b,
|
|
577
584
|
{
|
|
578
585
|
name: "Sliders",
|
|
579
586
|
hoverable: !0,
|
|
580
587
|
width: 20,
|
|
581
588
|
height: 20,
|
|
582
|
-
onClick: (
|
|
589
|
+
onClick: (D) => at(D, p)
|
|
583
590
|
}
|
|
584
591
|
),
|
|
585
|
-
|
|
586
|
-
|
|
592
|
+
d && /* @__PURE__ */ t.jsx(
|
|
593
|
+
b,
|
|
587
594
|
{
|
|
588
595
|
name: "Trash",
|
|
589
596
|
hoverable: !0,
|
|
590
597
|
width: 20,
|
|
591
598
|
height: 20,
|
|
592
599
|
fill: "#C12A2A",
|
|
593
|
-
onClick: () => i(
|
|
600
|
+
onClick: () => i(s.filter((D) => D.id !== p.id))
|
|
594
601
|
}
|
|
595
602
|
)
|
|
596
603
|
] })
|
|
597
604
|
] });
|
|
598
|
-
return
|
|
599
|
-
|
|
605
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
606
|
+
Te,
|
|
600
607
|
{
|
|
601
608
|
product: p,
|
|
602
|
-
index:
|
|
603
|
-
moveProduct:
|
|
604
|
-
children:
|
|
609
|
+
index: B,
|
|
610
|
+
moveProduct: tt,
|
|
611
|
+
children: $
|
|
605
612
|
},
|
|
606
613
|
p.id
|
|
607
614
|
) : /* @__PURE__ */ t.jsx(
|
|
608
615
|
"div",
|
|
609
616
|
{
|
|
610
|
-
className:
|
|
611
|
-
children:
|
|
617
|
+
className: H.product,
|
|
618
|
+
children: $
|
|
612
619
|
},
|
|
613
620
|
p.id
|
|
614
621
|
);
|
|
615
622
|
};
|
|
616
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
617
|
-
(
|
|
618
|
-
|
|
619
|
-
|
|
623
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
|
|
624
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
625
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: l }),
|
|
626
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
620
627
|
K,
|
|
621
628
|
{
|
|
622
|
-
current:
|
|
629
|
+
current: a,
|
|
623
630
|
onChange: (p) => e == null ? void 0 : e(p)
|
|
624
631
|
}
|
|
625
632
|
)
|
|
626
633
|
] }),
|
|
627
|
-
|
|
628
|
-
|
|
634
|
+
M && n && v && R && /* @__PURE__ */ t.jsx(
|
|
635
|
+
Ce,
|
|
629
636
|
{
|
|
630
|
-
ref:
|
|
631
|
-
activeItem:
|
|
632
|
-
setActiveItem:
|
|
633
|
-
popupPosition:
|
|
634
|
-
modalOptions:
|
|
637
|
+
ref: w,
|
|
638
|
+
activeItem: M,
|
|
639
|
+
setActiveItem: m,
|
|
640
|
+
popupPosition: O,
|
|
641
|
+
modalOptions: v,
|
|
635
642
|
setIsOpenModal: U
|
|
636
643
|
}
|
|
637
644
|
),
|
|
638
|
-
|
|
639
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
645
|
+
q && A && /* @__PURE__ */ t.jsx(It, { ...A }),
|
|
646
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
647
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
|
|
648
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((p, B) => T(p, B)) }) : s.map((p, B) => T(p, B)),
|
|
649
|
+
P && /* @__PURE__ */ t.jsx("div", { className: H.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
650
|
+
it,
|
|
644
651
|
{
|
|
645
652
|
withoutHover: !0,
|
|
646
|
-
className:
|
|
647
|
-
[
|
|
653
|
+
className: F(H.button, {
|
|
654
|
+
[H.disabled]: !!(I && I <= s.length || s.length === (h == null ? void 0 : h.length))
|
|
648
655
|
}),
|
|
649
656
|
size: "s",
|
|
650
|
-
disabled: !!(
|
|
657
|
+
disabled: !!(I && I <= s.length || s.length === (h == null ? void 0 : h.length)),
|
|
651
658
|
onClick: () => {
|
|
652
|
-
const p = [...
|
|
653
|
-
let
|
|
654
|
-
if (
|
|
655
|
-
for (let
|
|
656
|
-
if (!
|
|
657
|
-
|
|
659
|
+
const p = [...s];
|
|
660
|
+
let B = null;
|
|
661
|
+
if (h) {
|
|
662
|
+
for (let $ = 0; $ < h.length; $++)
|
|
663
|
+
if (!s.find((X) => X.id === h[$].id)) {
|
|
664
|
+
B = h[$];
|
|
658
665
|
break;
|
|
659
666
|
}
|
|
660
667
|
}
|
|
661
668
|
x === "select" ? p.push({
|
|
662
|
-
name:
|
|
663
|
-
id: (
|
|
664
|
-
...
|
|
669
|
+
name: B ? B.name : h[0].name,
|
|
670
|
+
id: (B == null ? void 0 : B.id) || h[0].id,
|
|
671
|
+
...E
|
|
665
672
|
}) : x === "input" ? p.push({
|
|
666
673
|
name: "",
|
|
667
|
-
id:
|
|
668
|
-
...
|
|
674
|
+
id: dt(),
|
|
675
|
+
...E
|
|
669
676
|
}) : p.push({
|
|
670
|
-
name: `Image ${
|
|
671
|
-
id:
|
|
672
|
-
...
|
|
677
|
+
name: `Image ${s.length + 1}`,
|
|
678
|
+
id: dt(),
|
|
679
|
+
...E
|
|
673
680
|
}), i(p);
|
|
674
681
|
},
|
|
682
|
+
style: {
|
|
683
|
+
width: "fit-content"
|
|
684
|
+
},
|
|
675
685
|
children: [
|
|
676
686
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
677
687
|
/* @__PURE__ */ t.jsx(
|
|
678
|
-
|
|
688
|
+
b,
|
|
679
689
|
{
|
|
680
690
|
name: "Plus",
|
|
681
691
|
width: 16,
|
|
@@ -684,16 +694,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
684
694
|
)
|
|
685
695
|
]
|
|
686
696
|
}
|
|
687
|
-
)
|
|
697
|
+
) })
|
|
688
698
|
] }),
|
|
689
|
-
|
|
690
|
-
|
|
699
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
|
|
700
|
+
C !== void 0 && /* @__PURE__ */ t.jsx(
|
|
691
701
|
W,
|
|
692
702
|
{
|
|
693
703
|
label: "Auto scroll interval",
|
|
694
704
|
type: "number",
|
|
695
|
-
value: String(
|
|
696
|
-
onChange: (p) =>
|
|
705
|
+
value: String(C.scrollInterval),
|
|
706
|
+
onChange: (p) => C.setScrollInterval(Number(p)),
|
|
697
707
|
min: 0.1,
|
|
698
708
|
max: 100,
|
|
699
709
|
style: {
|
|
@@ -703,58 +713,59 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
703
713
|
}
|
|
704
714
|
)
|
|
705
715
|
] });
|
|
706
|
-
}, Ae = "
|
|
716
|
+
}, Ae = "_title_1jjcw_1", Oe = "_subtitle_1jjcw_5", De = "_header_1jjcw_12", Ee = "_text_1jjcw_13", Le = "_productsBlock_1jjcw_14", Re = "_top_1jjcw_26", Me = "_itemsBlock_1jjcw_35", He = "_typeTexts_1jjcw_41", ze = "_block_1jjcw_48", Ve = "_active_1jjcw_61", Fe = "_products_1jjcw_14", Ue = "_product_1jjcw_14", Ye = "_button_1jjcw_80", Ge = "_disabled_1jjcw_91", We = "_image_1jjcw_95", Xe = "_info_1jjcw_102", Je = "_name_1jjcw_114", Qe = "_buttons_1jjcw_118", Ke = "_modal_1jjcw_125", Ze = "_link_1jjcw_145", ts = "_modalOptions_1jjcw_151", es = "_addButton_1jjcw_157", Q = {
|
|
707
717
|
title: Ae,
|
|
708
718
|
subtitle: Oe,
|
|
709
|
-
header:
|
|
710
|
-
text:
|
|
711
|
-
productsBlock:
|
|
712
|
-
top:
|
|
713
|
-
itemsBlock:
|
|
714
|
-
typeTexts:
|
|
715
|
-
block:
|
|
716
|
-
active:
|
|
717
|
-
products:
|
|
719
|
+
header: De,
|
|
720
|
+
text: Ee,
|
|
721
|
+
productsBlock: Le,
|
|
722
|
+
top: Re,
|
|
723
|
+
itemsBlock: Me,
|
|
724
|
+
typeTexts: He,
|
|
725
|
+
block: ze,
|
|
726
|
+
active: Ve,
|
|
727
|
+
products: Fe,
|
|
718
728
|
product: Ue,
|
|
719
|
-
button:
|
|
720
|
-
disabled:
|
|
721
|
-
image:
|
|
722
|
-
info:
|
|
723
|
-
name:
|
|
724
|
-
buttons:
|
|
725
|
-
modal:
|
|
726
|
-
link:
|
|
727
|
-
modalOptions:
|
|
728
|
-
|
|
729
|
+
button: Ye,
|
|
730
|
+
disabled: Ge,
|
|
731
|
+
image: We,
|
|
732
|
+
info: Xe,
|
|
733
|
+
name: Je,
|
|
734
|
+
buttons: Qe,
|
|
735
|
+
modal: Ke,
|
|
736
|
+
link: Ze,
|
|
737
|
+
modalOptions: ts,
|
|
738
|
+
addButton: es
|
|
739
|
+
}, Ua = (u) => {
|
|
729
740
|
const {
|
|
730
|
-
isActiveItems:
|
|
741
|
+
isActiveItems: a,
|
|
731
742
|
setIsActiveItems: e,
|
|
732
|
-
items:
|
|
743
|
+
items: s,
|
|
733
744
|
setItems: i,
|
|
734
|
-
other:
|
|
735
|
-
title:
|
|
736
|
-
subtitle:
|
|
737
|
-
draggable:
|
|
738
|
-
withImage:
|
|
739
|
-
addable:
|
|
740
|
-
itemsOptions:
|
|
741
|
-
hasRangeSelector:
|
|
745
|
+
other: c,
|
|
746
|
+
title: l,
|
|
747
|
+
subtitle: o,
|
|
748
|
+
draggable: n = !1,
|
|
749
|
+
withImage: r = !1,
|
|
750
|
+
addable: _ = !0,
|
|
751
|
+
itemsOptions: d,
|
|
752
|
+
hasRangeSelector: P = !1,
|
|
742
753
|
rangeSelectorOptions: x,
|
|
743
|
-
limit:
|
|
744
|
-
autoScrollInterval:
|
|
754
|
+
limit: f,
|
|
755
|
+
autoScrollInterval: h
|
|
745
756
|
} = u;
|
|
746
|
-
function
|
|
747
|
-
if (
|
|
748
|
-
return
|
|
757
|
+
function q(v) {
|
|
758
|
+
if (r)
|
|
759
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
749
760
|
"img",
|
|
750
761
|
{
|
|
751
|
-
src: `https://imagedelivery.net/${
|
|
762
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
752
763
|
alt: "image",
|
|
753
764
|
width: 16,
|
|
754
765
|
height: 16
|
|
755
766
|
}
|
|
756
767
|
) : /* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
768
|
+
b,
|
|
758
769
|
{
|
|
759
770
|
name: "Image",
|
|
760
771
|
width: 16,
|
|
@@ -763,12 +774,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
763
774
|
}
|
|
764
775
|
);
|
|
765
776
|
}
|
|
766
|
-
const
|
|
767
|
-
const
|
|
768
|
-
if (!
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
|
|
777
|
+
const A = (v) => {
|
|
778
|
+
const E = d.find((C) => C.id === v);
|
|
779
|
+
if (!E) return;
|
|
780
|
+
const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
781
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
782
|
+
b,
|
|
772
783
|
{
|
|
773
784
|
name: "DotsSixVertical",
|
|
774
785
|
hoverable: !0,
|
|
@@ -777,80 +788,83 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
777
788
|
}
|
|
778
789
|
) }),
|
|
779
790
|
/* @__PURE__ */ t.jsx(
|
|
780
|
-
|
|
791
|
+
Z,
|
|
781
792
|
{
|
|
782
|
-
onChange: (
|
|
783
|
-
const
|
|
784
|
-
if (!
|
|
785
|
-
const
|
|
793
|
+
onChange: (C) => {
|
|
794
|
+
const M = [...s], m = d.find((y) => y.name === C);
|
|
795
|
+
if (!m) return;
|
|
796
|
+
const O = m.id, k = M.map((y) => y === v ? O : y);
|
|
786
797
|
i([...k]);
|
|
787
798
|
},
|
|
788
|
-
value:
|
|
789
|
-
options:
|
|
790
|
-
leftAddon:
|
|
799
|
+
value: E.name,
|
|
800
|
+
options: d.filter((C) => !s.find((M) => M === C.id)).map((C) => C.name),
|
|
801
|
+
leftAddon: q(E.images)
|
|
791
802
|
}
|
|
792
803
|
),
|
|
793
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
794
|
-
|
|
804
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx(
|
|
805
|
+
b,
|
|
795
806
|
{
|
|
796
807
|
name: "Trash",
|
|
797
808
|
hoverable: !0,
|
|
798
809
|
width: 20,
|
|
799
810
|
height: 20,
|
|
800
811
|
fill: "#C12A2A",
|
|
801
|
-
onClick: () => i(
|
|
812
|
+
onClick: () => i(s.filter((C) => C !== v))
|
|
802
813
|
}
|
|
803
814
|
) })
|
|
804
815
|
] });
|
|
805
816
|
return /* @__PURE__ */ t.jsx(
|
|
806
817
|
"div",
|
|
807
818
|
{
|
|
808
|
-
className:
|
|
809
|
-
children:
|
|
819
|
+
className: Q.product,
|
|
820
|
+
children: I
|
|
810
821
|
},
|
|
811
|
-
|
|
822
|
+
v
|
|
812
823
|
);
|
|
813
824
|
};
|
|
814
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
815
|
-
(
|
|
816
|
-
|
|
817
|
-
|
|
825
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
826
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
827
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
|
|
828
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
818
829
|
K,
|
|
819
830
|
{
|
|
820
|
-
current:
|
|
821
|
-
onChange: (
|
|
831
|
+
current: a,
|
|
832
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
822
833
|
}
|
|
823
834
|
)
|
|
824
835
|
] }),
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
836
|
+
P && x && /* @__PURE__ */ t.jsx(It, { ...x }),
|
|
837
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
838
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: o }),
|
|
839
|
+
s.map((v) => A(v)),
|
|
840
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: Q.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
841
|
+
it,
|
|
831
842
|
{
|
|
832
843
|
withoutHover: !0,
|
|
833
|
-
className:
|
|
834
|
-
[
|
|
844
|
+
className: F(Q.button, {
|
|
845
|
+
[Q.disabled]: !!(f && f <= s.length || s.length === d.length)
|
|
835
846
|
}),
|
|
836
847
|
size: "s",
|
|
837
|
-
disabled: !!(
|
|
848
|
+
disabled: !!(f && f <= s.length || s.length === d.length),
|
|
838
849
|
onClick: () => {
|
|
839
|
-
const
|
|
840
|
-
let
|
|
841
|
-
if (
|
|
842
|
-
for (let
|
|
843
|
-
if (!
|
|
844
|
-
|
|
850
|
+
const v = [...s];
|
|
851
|
+
let E = null;
|
|
852
|
+
if (d) {
|
|
853
|
+
for (let I = 0; I < d.length; I++)
|
|
854
|
+
if (!s.find((C) => C === d[I].id)) {
|
|
855
|
+
E = d[I];
|
|
845
856
|
break;
|
|
846
857
|
}
|
|
847
858
|
}
|
|
848
|
-
|
|
859
|
+
v.push((E == null ? void 0 : E.id) || d[0].id), i(v);
|
|
860
|
+
},
|
|
861
|
+
style: {
|
|
862
|
+
width: "fit-content"
|
|
849
863
|
},
|
|
850
864
|
children: [
|
|
851
865
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
852
866
|
/* @__PURE__ */ t.jsx(
|
|
853
|
-
|
|
867
|
+
b,
|
|
854
868
|
{
|
|
855
869
|
name: "Plus",
|
|
856
870
|
width: 16,
|
|
@@ -859,16 +873,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
859
873
|
)
|
|
860
874
|
]
|
|
861
875
|
}
|
|
862
|
-
)
|
|
876
|
+
) })
|
|
863
877
|
] }),
|
|
864
|
-
|
|
865
|
-
|
|
878
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
|
|
879
|
+
h !== void 0 && /* @__PURE__ */ t.jsx(
|
|
866
880
|
W,
|
|
867
881
|
{
|
|
868
882
|
label: "Auto scroll interval",
|
|
869
883
|
type: "number",
|
|
870
|
-
value: String(
|
|
871
|
-
onChange: (
|
|
884
|
+
value: String(h.scrollInterval),
|
|
885
|
+
onChange: (v) => h.setScrollInterval(Number(v)),
|
|
872
886
|
min: 0.1,
|
|
873
887
|
max: 100,
|
|
874
888
|
style: {
|
|
@@ -878,162 +892,166 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
878
892
|
}
|
|
879
893
|
)
|
|
880
894
|
] });
|
|
881
|
-
},
|
|
882
|
-
title:
|
|
883
|
-
subtitle:
|
|
884
|
-
header:
|
|
885
|
-
text:
|
|
886
|
-
productsBlock:
|
|
887
|
-
top:
|
|
888
|
-
itemsBlock:
|
|
889
|
-
typeTexts:
|
|
890
|
-
block:
|
|
891
|
-
active:
|
|
892
|
-
products:
|
|
893
|
-
product:
|
|
894
|
-
button:
|
|
895
|
-
disabled:
|
|
896
|
-
image:
|
|
897
|
-
info:
|
|
898
|
-
name:
|
|
899
|
-
buttons:
|
|
900
|
-
modal:
|
|
901
|
-
link:
|
|
902
|
-
modalOptions:
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
895
|
+
}, ss = "_title_iqcxl_1", ns = "_subtitle_iqcxl_5", is = "_header_iqcxl_12", as = "_text_iqcxl_13", os = "_productsBlock_iqcxl_14", cs = "_top_iqcxl_26", ls = "_itemsBlock_iqcxl_35", rs = "_typeTexts_iqcxl_41", ds = "_block_iqcxl_48", us = "_active_iqcxl_61", ms = "_products_iqcxl_14", _s = "_product_iqcxl_14", hs = "_button_iqcxl_80", ps = "_disabled_iqcxl_91", gs = "_image_iqcxl_95", fs = "_info_iqcxl_102", xs = "_name_iqcxl_114", bs = "_buttons_iqcxl_118", vs = "_modal_iqcxl_125", js = "_link_iqcxl_146", ys = "_modalOptions_iqcxl_152", ks = "_addButton_iqcxl_164", V = {
|
|
896
|
+
title: ss,
|
|
897
|
+
subtitle: ns,
|
|
898
|
+
header: is,
|
|
899
|
+
text: as,
|
|
900
|
+
productsBlock: os,
|
|
901
|
+
top: cs,
|
|
902
|
+
itemsBlock: ls,
|
|
903
|
+
typeTexts: rs,
|
|
904
|
+
block: ds,
|
|
905
|
+
active: us,
|
|
906
|
+
products: ms,
|
|
907
|
+
product: _s,
|
|
908
|
+
button: hs,
|
|
909
|
+
disabled: ps,
|
|
910
|
+
image: gs,
|
|
911
|
+
info: fs,
|
|
912
|
+
name: xs,
|
|
913
|
+
buttons: bs,
|
|
914
|
+
modal: vs,
|
|
915
|
+
link: js,
|
|
916
|
+
modalOptions: ys,
|
|
917
|
+
addButton: ks
|
|
918
|
+
}, $s = g.forwardRef(
|
|
919
|
+
(u, a) => {
|
|
920
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
921
|
+
function o(n, r) {
|
|
922
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
923
|
+
}
|
|
906
924
|
return /* @__PURE__ */ t.jsxs(
|
|
907
925
|
"div",
|
|
908
926
|
{
|
|
909
|
-
ref:
|
|
910
|
-
className:
|
|
911
|
-
onClick: (
|
|
912
|
-
|
|
927
|
+
ref: a,
|
|
928
|
+
className: V.modal,
|
|
929
|
+
onClick: (n) => {
|
|
930
|
+
n.stopPropagation();
|
|
913
931
|
},
|
|
914
932
|
style: {
|
|
915
933
|
top: `${i.top}px`,
|
|
916
934
|
left: `${i.left}px`
|
|
917
935
|
},
|
|
918
936
|
children: [
|
|
919
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
920
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
937
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
938
|
+
/* @__PURE__ */ t.jsx("h3", { className: V.title, children: o(e.name, 20) }),
|
|
921
939
|
/* @__PURE__ */ t.jsx(
|
|
922
|
-
|
|
940
|
+
b,
|
|
923
941
|
{
|
|
924
942
|
name: "X",
|
|
925
943
|
height: 20,
|
|
926
944
|
width: 20,
|
|
927
945
|
hoverable: !0,
|
|
928
946
|
onClick: () => {
|
|
929
|
-
|
|
947
|
+
s(null), l(!1);
|
|
930
948
|
}
|
|
931
949
|
}
|
|
932
950
|
)
|
|
933
951
|
] }),
|
|
934
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
935
|
-
if (
|
|
952
|
+
/* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((n) => {
|
|
953
|
+
if (n.type === "image")
|
|
936
954
|
return /* @__PURE__ */ t.jsx(
|
|
937
955
|
ht,
|
|
938
956
|
{
|
|
939
957
|
label: "Put up an attractive image",
|
|
940
|
-
activeImage: e[
|
|
941
|
-
onChange: (
|
|
942
|
-
const
|
|
958
|
+
activeImage: e[n.field],
|
|
959
|
+
onChange: (r) => {
|
|
960
|
+
const _ = {
|
|
943
961
|
...e,
|
|
944
|
-
[
|
|
962
|
+
[n.field]: r
|
|
945
963
|
};
|
|
946
|
-
|
|
964
|
+
s(_);
|
|
947
965
|
}
|
|
948
966
|
},
|
|
949
|
-
String(
|
|
967
|
+
String(n.field)
|
|
950
968
|
);
|
|
951
|
-
if (
|
|
969
|
+
if (n.type === "text")
|
|
952
970
|
return /* @__PURE__ */ t.jsx(
|
|
953
|
-
|
|
971
|
+
qt,
|
|
954
972
|
{
|
|
955
|
-
typesText: e[
|
|
956
|
-
setTypesText: (
|
|
957
|
-
const
|
|
973
|
+
typesText: e[n.field.type],
|
|
974
|
+
setTypesText: (r) => {
|
|
975
|
+
const _ = {
|
|
958
976
|
...e,
|
|
959
|
-
[
|
|
977
|
+
[n.field.type]: r
|
|
960
978
|
};
|
|
961
|
-
|
|
979
|
+
s(_);
|
|
962
980
|
},
|
|
963
|
-
text: e[
|
|
964
|
-
setText: (
|
|
965
|
-
const
|
|
981
|
+
text: e[n.field.text] || "",
|
|
982
|
+
setText: (r) => {
|
|
983
|
+
const _ = {
|
|
966
984
|
...e,
|
|
967
|
-
[
|
|
985
|
+
[n.field.text]: r
|
|
968
986
|
};
|
|
969
|
-
|
|
987
|
+
s(_);
|
|
970
988
|
},
|
|
971
|
-
subtitle:
|
|
989
|
+
subtitle: n.label
|
|
972
990
|
}
|
|
973
991
|
);
|
|
974
|
-
if (
|
|
992
|
+
if (n.type === "input")
|
|
975
993
|
return /* @__PURE__ */ t.jsx(
|
|
976
994
|
W,
|
|
977
995
|
{
|
|
978
|
-
onChange: (
|
|
979
|
-
const
|
|
996
|
+
onChange: (r) => {
|
|
997
|
+
const _ = {
|
|
980
998
|
...e,
|
|
981
|
-
[
|
|
999
|
+
[n.field]: r
|
|
982
1000
|
};
|
|
983
|
-
|
|
1001
|
+
s(_);
|
|
984
1002
|
},
|
|
985
|
-
value: e[
|
|
986
|
-
label:
|
|
987
|
-
placeholder:
|
|
1003
|
+
value: e[n.field] || "",
|
|
1004
|
+
label: n.label,
|
|
1005
|
+
placeholder: n.placeholder
|
|
988
1006
|
}
|
|
989
1007
|
);
|
|
990
|
-
if (
|
|
991
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1008
|
+
if (n.type === "inputSwitch")
|
|
1009
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
|
|
992
1010
|
/* @__PURE__ */ t.jsx(
|
|
993
1011
|
W,
|
|
994
1012
|
{
|
|
995
|
-
onChange: (
|
|
996
|
-
const
|
|
1013
|
+
onChange: (r) => {
|
|
1014
|
+
const _ = {
|
|
997
1015
|
...e,
|
|
998
|
-
[
|
|
1016
|
+
[n.field.text]: r
|
|
999
1017
|
};
|
|
1000
|
-
|
|
1018
|
+
s(_);
|
|
1001
1019
|
},
|
|
1002
|
-
value: e[
|
|
1003
|
-
label:
|
|
1004
|
-
placeholder:
|
|
1020
|
+
value: e[n.field.text] || "",
|
|
1021
|
+
label: n.inputLabel,
|
|
1022
|
+
placeholder: n.placeholder
|
|
1005
1023
|
}
|
|
1006
1024
|
),
|
|
1007
1025
|
/* @__PURE__ */ t.jsx(
|
|
1008
1026
|
K,
|
|
1009
1027
|
{
|
|
1010
|
-
current: !!e[
|
|
1011
|
-
label:
|
|
1012
|
-
onChange: (
|
|
1013
|
-
const
|
|
1028
|
+
current: !!e[n.field.switch] || !1,
|
|
1029
|
+
label: n.switchLabel,
|
|
1030
|
+
onChange: (r) => {
|
|
1031
|
+
const _ = {
|
|
1014
1032
|
...e,
|
|
1015
|
-
[
|
|
1033
|
+
[n.field.switch]: r
|
|
1016
1034
|
};
|
|
1017
|
-
|
|
1035
|
+
s(_);
|
|
1018
1036
|
}
|
|
1019
1037
|
}
|
|
1020
1038
|
)
|
|
1021
1039
|
] });
|
|
1022
|
-
if (
|
|
1040
|
+
if (n.type === "select")
|
|
1023
1041
|
return /* @__PURE__ */ t.jsx(
|
|
1024
|
-
|
|
1042
|
+
Z,
|
|
1025
1043
|
{
|
|
1026
|
-
options:
|
|
1027
|
-
onChange: (
|
|
1028
|
-
const
|
|
1044
|
+
options: n.itemsOptions,
|
|
1045
|
+
onChange: (r) => {
|
|
1046
|
+
const _ = {
|
|
1029
1047
|
...e,
|
|
1030
|
-
[
|
|
1048
|
+
[n.field]: r
|
|
1031
1049
|
};
|
|
1032
|
-
|
|
1050
|
+
s(_);
|
|
1033
1051
|
},
|
|
1034
|
-
label:
|
|
1035
|
-
value: e[
|
|
1036
|
-
leftAddon:
|
|
1052
|
+
label: n.label,
|
|
1053
|
+
value: e[n.field] || "String",
|
|
1054
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
1037
1055
|
}
|
|
1038
1056
|
);
|
|
1039
1057
|
}) })
|
|
@@ -1041,97 +1059,97 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1041
1059
|
}
|
|
1042
1060
|
);
|
|
1043
1061
|
}
|
|
1044
|
-
),
|
|
1045
|
-
const { index:
|
|
1062
|
+
), ws = (u) => {
|
|
1063
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
1046
1064
|
accept: "product",
|
|
1047
|
-
hover(
|
|
1048
|
-
|
|
1065
|
+
hover(o) {
|
|
1066
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
1049
1067
|
}
|
|
1050
|
-
}), [{ isDragging:
|
|
1068
|
+
}), [{ isDragging: c }, l] = wt({
|
|
1051
1069
|
type: "product",
|
|
1052
|
-
item: { index:
|
|
1053
|
-
collect: (
|
|
1054
|
-
isDragging:
|
|
1070
|
+
item: { index: a },
|
|
1071
|
+
collect: (o) => ({
|
|
1072
|
+
isDragging: o.isDragging()
|
|
1055
1073
|
})
|
|
1056
1074
|
});
|
|
1057
1075
|
return /* @__PURE__ */ t.jsx(
|
|
1058
1076
|
"div",
|
|
1059
1077
|
{
|
|
1060
|
-
ref: (
|
|
1061
|
-
className: `${
|
|
1062
|
-
children:
|
|
1078
|
+
ref: (o) => l(i(o)),
|
|
1079
|
+
className: `${V.product} ${c ? V.dragging : ""}`,
|
|
1080
|
+
children: s
|
|
1063
1081
|
}
|
|
1064
1082
|
);
|
|
1065
|
-
},
|
|
1083
|
+
}, Ya = (u) => {
|
|
1066
1084
|
const {
|
|
1067
|
-
isActiveItems:
|
|
1085
|
+
isActiveItems: a,
|
|
1068
1086
|
setIsActiveItems: e,
|
|
1069
|
-
items:
|
|
1087
|
+
items: s,
|
|
1070
1088
|
setItems: i,
|
|
1071
|
-
other:
|
|
1072
|
-
title:
|
|
1073
|
-
subtitle:
|
|
1074
|
-
editable:
|
|
1075
|
-
draggable:
|
|
1076
|
-
withImage:
|
|
1077
|
-
deletable:
|
|
1078
|
-
addable:
|
|
1089
|
+
other: c,
|
|
1090
|
+
title: l,
|
|
1091
|
+
subtitle: o,
|
|
1092
|
+
editable: n = !0,
|
|
1093
|
+
draggable: r = !1,
|
|
1094
|
+
withImage: _ = !1,
|
|
1095
|
+
deletable: d = !0,
|
|
1096
|
+
addable: P = !0,
|
|
1079
1097
|
itemsType: x,
|
|
1080
|
-
itemsPlaceholder:
|
|
1081
|
-
itemsOptions:
|
|
1082
|
-
hasRangeSelector:
|
|
1083
|
-
rangeSelectorOptions:
|
|
1084
|
-
modalOptions:
|
|
1085
|
-
addableOptions:
|
|
1086
|
-
} = u, [
|
|
1098
|
+
itemsPlaceholder: f = "",
|
|
1099
|
+
itemsOptions: h,
|
|
1100
|
+
hasRangeSelector: q = !1,
|
|
1101
|
+
rangeSelectorOptions: A,
|
|
1102
|
+
modalOptions: v,
|
|
1103
|
+
addableOptions: E = {}
|
|
1104
|
+
} = u, [I, C] = g.useState(null), [M, m] = g.useState({
|
|
1087
1105
|
top: 0,
|
|
1088
1106
|
left: 0
|
|
1089
|
-
}), [
|
|
1090
|
-
const p = [...
|
|
1091
|
-
p.splice(
|
|
1107
|
+
}), [O, k] = g.useState(null), y = g.useRef(null), [L, w] = g.useState(!1), R = (j, T) => {
|
|
1108
|
+
const p = [...s], [B] = p.splice(j, 1);
|
|
1109
|
+
p.splice(T, 0, B), i(p);
|
|
1092
1110
|
};
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1111
|
+
g.useEffect(() => {
|
|
1112
|
+
const j = () => {
|
|
1113
|
+
C(null), w(!1);
|
|
1096
1114
|
};
|
|
1097
|
-
return document.body.addEventListener("click",
|
|
1098
|
-
|
|
1115
|
+
return document.body.addEventListener("click", j), C(null), w(!1), () => {
|
|
1116
|
+
C(null), w(!1), document.body.removeEventListener("click", j);
|
|
1099
1117
|
};
|
|
1100
|
-
}, []),
|
|
1101
|
-
if (
|
|
1102
|
-
const
|
|
1103
|
-
i(
|
|
1118
|
+
}, []), g.useEffect(() => {
|
|
1119
|
+
if (I) {
|
|
1120
|
+
const j = [...s].map((T) => T.id === I.id ? I : T);
|
|
1121
|
+
i(j);
|
|
1104
1122
|
}
|
|
1105
|
-
}, [
|
|
1106
|
-
if (y.current &&
|
|
1107
|
-
const
|
|
1108
|
-
let p =
|
|
1109
|
-
p +
|
|
1123
|
+
}, [I]), g.useEffect(() => {
|
|
1124
|
+
if (y.current && O) {
|
|
1125
|
+
const j = y.current.getBoundingClientRect().height, T = window.innerHeight;
|
|
1126
|
+
let p = O.top;
|
|
1127
|
+
p + j > T + window.scrollY - 200 && (p = T + window.scrollY - j - 200), p < 0 && (p = 10), m({
|
|
1110
1128
|
top: p,
|
|
1111
|
-
left:
|
|
1129
|
+
left: O.left
|
|
1112
1130
|
});
|
|
1113
1131
|
}
|
|
1114
|
-
}, [y.current,
|
|
1115
|
-
const U = (
|
|
1116
|
-
|
|
1117
|
-
const p =
|
|
1132
|
+
}, [y.current, O]);
|
|
1133
|
+
const U = (j, T) => {
|
|
1134
|
+
j.stopPropagation();
|
|
1135
|
+
const p = j.target.getBoundingClientRect();
|
|
1118
1136
|
k({
|
|
1119
1137
|
top: p.top + window.scrollY,
|
|
1120
1138
|
left: p.left - 30
|
|
1121
|
-
}),
|
|
1139
|
+
}), C(T), w(!0);
|
|
1122
1140
|
};
|
|
1123
|
-
function
|
|
1124
|
-
if (
|
|
1125
|
-
return
|
|
1141
|
+
function tt(j) {
|
|
1142
|
+
if (_)
|
|
1143
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
1126
1144
|
"img",
|
|
1127
1145
|
{
|
|
1128
|
-
src: `https://imagedelivery.net/${
|
|
1146
|
+
src: `https://imagedelivery.net/${j[0]}/w=1000`,
|
|
1129
1147
|
alt: "image",
|
|
1130
1148
|
width: 16,
|
|
1131
1149
|
height: 16
|
|
1132
1150
|
}
|
|
1133
1151
|
) : /* @__PURE__ */ t.jsx(
|
|
1134
|
-
|
|
1152
|
+
b,
|
|
1135
1153
|
{
|
|
1136
1154
|
name: "Image",
|
|
1137
1155
|
width: 16,
|
|
@@ -1140,11 +1158,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1140
1158
|
}
|
|
1141
1159
|
);
|
|
1142
1160
|
}
|
|
1143
|
-
const at = (
|
|
1144
|
-
var
|
|
1161
|
+
const at = (j, T) => {
|
|
1162
|
+
var B;
|
|
1145
1163
|
const p = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1146
|
-
|
|
1147
|
-
|
|
1164
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1165
|
+
b,
|
|
1148
1166
|
{
|
|
1149
1167
|
name: "DotsSixVertical",
|
|
1150
1168
|
hoverable: !0,
|
|
@@ -1153,152 +1171,155 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1153
1171
|
}
|
|
1154
1172
|
) }),
|
|
1155
1173
|
x === "select" && /* @__PURE__ */ t.jsx(
|
|
1156
|
-
|
|
1174
|
+
Z,
|
|
1157
1175
|
{
|
|
1158
|
-
onChange: (
|
|
1159
|
-
const
|
|
1160
|
-
...
|
|
1161
|
-
name:
|
|
1176
|
+
onChange: ($) => {
|
|
1177
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1178
|
+
...j,
|
|
1179
|
+
name: $
|
|
1162
1180
|
} : Y);
|
|
1163
|
-
|
|
1164
|
-
...
|
|
1165
|
-
name:
|
|
1166
|
-
}), i([...
|
|
1181
|
+
C({
|
|
1182
|
+
...j,
|
|
1183
|
+
name: $
|
|
1184
|
+
}), i([...D]);
|
|
1167
1185
|
},
|
|
1168
|
-
value:
|
|
1169
|
-
options:
|
|
1170
|
-
leftAddon:
|
|
1186
|
+
value: j.name,
|
|
1187
|
+
options: h.filter(($) => !s.find((X) => X.name === $)),
|
|
1188
|
+
leftAddon: tt(j.images)
|
|
1171
1189
|
}
|
|
1172
1190
|
),
|
|
1173
1191
|
x === "input" && /* @__PURE__ */ t.jsx(
|
|
1174
1192
|
W,
|
|
1175
1193
|
{
|
|
1176
|
-
onChange: (
|
|
1177
|
-
const
|
|
1178
|
-
...
|
|
1179
|
-
name:
|
|
1194
|
+
onChange: ($) => {
|
|
1195
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1196
|
+
...j,
|
|
1197
|
+
name: $
|
|
1180
1198
|
} : Y);
|
|
1181
|
-
i([...
|
|
1199
|
+
i([...D]);
|
|
1182
1200
|
},
|
|
1183
|
-
value:
|
|
1184
|
-
placeholder:
|
|
1201
|
+
value: j.name,
|
|
1202
|
+
placeholder: f
|
|
1185
1203
|
}
|
|
1186
1204
|
),
|
|
1187
1205
|
x === "image" && /* @__PURE__ */ t.jsx(
|
|
1188
1206
|
ht,
|
|
1189
1207
|
{
|
|
1190
|
-
onChange: (
|
|
1191
|
-
const
|
|
1192
|
-
...
|
|
1193
|
-
images:
|
|
1208
|
+
onChange: ($) => {
|
|
1209
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1210
|
+
...j,
|
|
1211
|
+
images: $
|
|
1194
1212
|
} : Y);
|
|
1195
|
-
i([...
|
|
1213
|
+
i([...D]);
|
|
1196
1214
|
},
|
|
1197
|
-
activeImage: (
|
|
1215
|
+
activeImage: (B = s.find(($) => $.id === j.id)) == null ? void 0 : B.images[0]
|
|
1198
1216
|
}
|
|
1199
1217
|
),
|
|
1200
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1201
|
-
|
|
1202
|
-
|
|
1218
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1219
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1220
|
+
b,
|
|
1203
1221
|
{
|
|
1204
1222
|
name: "Sliders",
|
|
1205
1223
|
hoverable: !0,
|
|
1206
1224
|
width: 20,
|
|
1207
1225
|
height: 20,
|
|
1208
|
-
onClick: (
|
|
1226
|
+
onClick: ($) => U($, j)
|
|
1209
1227
|
}
|
|
1210
1228
|
),
|
|
1211
|
-
|
|
1212
|
-
|
|
1229
|
+
d && /* @__PURE__ */ t.jsx(
|
|
1230
|
+
b,
|
|
1213
1231
|
{
|
|
1214
1232
|
name: "Trash",
|
|
1215
1233
|
hoverable: !0,
|
|
1216
1234
|
width: 20,
|
|
1217
1235
|
height: 20,
|
|
1218
1236
|
fill: "#C12A2A",
|
|
1219
|
-
onClick: () => i(
|
|
1237
|
+
onClick: () => i(s.filter(($) => $.id !== j.id))
|
|
1220
1238
|
}
|
|
1221
1239
|
)
|
|
1222
1240
|
] })
|
|
1223
1241
|
] });
|
|
1224
|
-
return
|
|
1225
|
-
|
|
1242
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
1243
|
+
ws,
|
|
1226
1244
|
{
|
|
1227
|
-
product:
|
|
1228
|
-
index:
|
|
1229
|
-
moveProduct:
|
|
1245
|
+
product: j,
|
|
1246
|
+
index: T,
|
|
1247
|
+
moveProduct: R,
|
|
1230
1248
|
children: p
|
|
1231
1249
|
},
|
|
1232
|
-
|
|
1250
|
+
j.id
|
|
1233
1251
|
) : /* @__PURE__ */ t.jsx(
|
|
1234
1252
|
"div",
|
|
1235
1253
|
{
|
|
1236
|
-
className:
|
|
1254
|
+
className: V.product,
|
|
1237
1255
|
children: p
|
|
1238
1256
|
},
|
|
1239
|
-
|
|
1257
|
+
j.id
|
|
1240
1258
|
);
|
|
1241
1259
|
};
|
|
1242
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1243
|
-
(
|
|
1244
|
-
|
|
1245
|
-
|
|
1260
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1261
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1262
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
1263
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1246
1264
|
K,
|
|
1247
1265
|
{
|
|
1248
|
-
current:
|
|
1249
|
-
onChange: (
|
|
1266
|
+
current: a,
|
|
1267
|
+
onChange: (j) => e == null ? void 0 : e(j)
|
|
1250
1268
|
}
|
|
1251
1269
|
)
|
|
1252
1270
|
] }),
|
|
1253
|
-
|
|
1254
|
-
|
|
1271
|
+
I && n && v && L && /* @__PURE__ */ t.jsx(
|
|
1272
|
+
$s,
|
|
1255
1273
|
{
|
|
1256
1274
|
ref: y,
|
|
1257
|
-
activeItem:
|
|
1258
|
-
setActiveItem:
|
|
1259
|
-
popupPosition:
|
|
1260
|
-
modalOptions:
|
|
1261
|
-
setIsOpenModal:
|
|
1275
|
+
activeItem: I,
|
|
1276
|
+
setActiveItem: C,
|
|
1277
|
+
popupPosition: M,
|
|
1278
|
+
modalOptions: v,
|
|
1279
|
+
setIsOpenModal: w
|
|
1262
1280
|
}
|
|
1263
1281
|
),
|
|
1264
|
-
|
|
1265
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1282
|
+
q && A && /* @__PURE__ */ t.jsx(It, { ...A }),
|
|
1283
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1284
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1285
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((j, T) => at(j, T)) }) : s.map((j, T) => at(j, T)),
|
|
1286
|
+
P && /* @__PURE__ */ t.jsx("div", { className: V.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
1287
|
+
it,
|
|
1270
1288
|
{
|
|
1271
1289
|
withoutHover: !0,
|
|
1272
|
-
className:
|
|
1290
|
+
className: V.button,
|
|
1273
1291
|
size: "s",
|
|
1274
1292
|
onClick: () => {
|
|
1275
|
-
const
|
|
1276
|
-
let
|
|
1277
|
-
if (
|
|
1278
|
-
for (let p = 0; p <
|
|
1279
|
-
if (!
|
|
1280
|
-
|
|
1293
|
+
const j = [...s];
|
|
1294
|
+
let T = null;
|
|
1295
|
+
if (h) {
|
|
1296
|
+
for (let p = 0; p < h.length; p++)
|
|
1297
|
+
if (!s.find((B) => B.name === h[p])) {
|
|
1298
|
+
T = h[p];
|
|
1281
1299
|
break;
|
|
1282
1300
|
}
|
|
1283
1301
|
}
|
|
1284
|
-
x === "select" ?
|
|
1285
|
-
name:
|
|
1286
|
-
id:
|
|
1287
|
-
...
|
|
1288
|
-
}) : x === "input" ?
|
|
1302
|
+
x === "select" ? j.push({
|
|
1303
|
+
name: T || h[0],
|
|
1304
|
+
id: dt(),
|
|
1305
|
+
...E
|
|
1306
|
+
}) : x === "input" ? j.push({
|
|
1289
1307
|
name: "",
|
|
1290
|
-
id:
|
|
1291
|
-
...
|
|
1292
|
-
}) :
|
|
1293
|
-
name: `Image ${
|
|
1294
|
-
id:
|
|
1295
|
-
...
|
|
1296
|
-
}), i(
|
|
1308
|
+
id: dt(),
|
|
1309
|
+
...E
|
|
1310
|
+
}) : j.push({
|
|
1311
|
+
name: `Image ${s.length + 1}`,
|
|
1312
|
+
id: dt(),
|
|
1313
|
+
...E
|
|
1314
|
+
}), i(j);
|
|
1315
|
+
},
|
|
1316
|
+
style: {
|
|
1317
|
+
width: "fit-content"
|
|
1297
1318
|
},
|
|
1298
1319
|
children: [
|
|
1299
1320
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1300
1321
|
/* @__PURE__ */ t.jsx(
|
|
1301
|
-
|
|
1322
|
+
b,
|
|
1302
1323
|
{
|
|
1303
1324
|
name: "Plus",
|
|
1304
1325
|
width: 16,
|
|
@@ -1307,95 +1328,95 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1307
1328
|
)
|
|
1308
1329
|
]
|
|
1309
1330
|
}
|
|
1310
|
-
)
|
|
1331
|
+
) })
|
|
1311
1332
|
] }),
|
|
1312
|
-
|
|
1333
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
|
|
1313
1334
|
] });
|
|
1314
|
-
},
|
|
1315
|
-
title:
|
|
1316
|
-
subtitle:
|
|
1317
|
-
header:
|
|
1318
|
-
text:
|
|
1319
|
-
productsBlock:
|
|
1320
|
-
buttonsBlock:
|
|
1321
|
-
top:
|
|
1322
|
-
itemsBlock:
|
|
1323
|
-
typeTexts:
|
|
1324
|
-
block:
|
|
1325
|
-
active:
|
|
1326
|
-
products:
|
|
1327
|
-
product:
|
|
1328
|
-
button:
|
|
1329
|
-
image:
|
|
1330
|
-
info:
|
|
1331
|
-
name:
|
|
1332
|
-
buttons:
|
|
1333
|
-
modal:
|
|
1334
|
-
other:
|
|
1335
|
-
options:
|
|
1336
|
-
},
|
|
1337
|
-
const { activeButton: e, setActiveButton:
|
|
1338
|
-
return
|
|
1339
|
-
|
|
1335
|
+
}, Ns = "_title_oravb_1", Is = "_subtitle_oravb_5", Cs = "_header_oravb_12", Bs = "_text_oravb_13", Ss = "_productsBlock_oravb_14", Ps = "_buttonsBlock_oravb_15", Ts = "_top_oravb_26", qs = "_itemsBlock_oravb_35", As = "_typeTexts_oravb_41", Os = "_block_oravb_48", Ds = "_active_oravb_60", Es = "_products_oravb_14", Ls = "_product_oravb_14", Rs = "_button_oravb_15", Ms = "_image_oravb_90", Hs = "_info_oravb_97", zs = "_name_oravb_109", Vs = "_buttons_oravb_15", Fs = "_modal_oravb_120", Us = "_other_oravb_139", Ys = "_options_oravb_145", ct = {
|
|
1336
|
+
title: Ns,
|
|
1337
|
+
subtitle: Is,
|
|
1338
|
+
header: Cs,
|
|
1339
|
+
text: Bs,
|
|
1340
|
+
productsBlock: Ss,
|
|
1341
|
+
buttonsBlock: Ps,
|
|
1342
|
+
top: Ts,
|
|
1343
|
+
itemsBlock: qs,
|
|
1344
|
+
typeTexts: As,
|
|
1345
|
+
block: Os,
|
|
1346
|
+
active: Ds,
|
|
1347
|
+
products: Es,
|
|
1348
|
+
product: Ls,
|
|
1349
|
+
button: Rs,
|
|
1350
|
+
image: Ms,
|
|
1351
|
+
info: Hs,
|
|
1352
|
+
name: zs,
|
|
1353
|
+
buttons: Vs,
|
|
1354
|
+
modal: Fs,
|
|
1355
|
+
other: Us,
|
|
1356
|
+
options: Ys
|
|
1357
|
+
}, Gs = g.forwardRef((u, a) => {
|
|
1358
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = g.useState(e.typesText), [o, n] = g.useState(e.destination), [r, _] = g.useState(e.page), [d, P] = g.useState(e.link || ""), [x, f] = g.useState(e.text || ""), [h, q] = g.useState(e.openInNewTab), { pages: A } = Ot();
|
|
1359
|
+
return g.useEffect(() => {
|
|
1360
|
+
s({
|
|
1340
1361
|
...e,
|
|
1341
1362
|
...{
|
|
1342
1363
|
text: x,
|
|
1343
|
-
link:
|
|
1344
|
-
destination:
|
|
1345
|
-
typesText:
|
|
1346
|
-
page:
|
|
1347
|
-
openInNewTab:
|
|
1364
|
+
link: d,
|
|
1365
|
+
destination: o,
|
|
1366
|
+
typesText: c,
|
|
1367
|
+
page: r,
|
|
1368
|
+
openInNewTab: h
|
|
1348
1369
|
}
|
|
1349
1370
|
});
|
|
1350
|
-
}, [
|
|
1371
|
+
}, [c, o, d, x, r, h]), /* @__PURE__ */ t.jsxs(
|
|
1351
1372
|
"div",
|
|
1352
1373
|
{
|
|
1353
1374
|
className: ct.modal,
|
|
1354
|
-
onClick: (
|
|
1355
|
-
|
|
1375
|
+
onClick: (v) => {
|
|
1376
|
+
v.stopPropagation();
|
|
1356
1377
|
},
|
|
1357
1378
|
style: {
|
|
1358
1379
|
top: `${i.top}px`,
|
|
1359
1380
|
left: `${i.left}px`
|
|
1360
1381
|
},
|
|
1361
|
-
ref:
|
|
1382
|
+
ref: a,
|
|
1362
1383
|
children: [
|
|
1363
1384
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1364
1385
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
|
|
1365
1386
|
/* @__PURE__ */ t.jsx(
|
|
1366
|
-
|
|
1387
|
+
b,
|
|
1367
1388
|
{
|
|
1368
1389
|
name: "X",
|
|
1369
1390
|
height: 20,
|
|
1370
1391
|
width: 20,
|
|
1371
1392
|
hoverable: !0,
|
|
1372
|
-
onClick: () =>
|
|
1393
|
+
onClick: () => s(null)
|
|
1373
1394
|
}
|
|
1374
1395
|
)
|
|
1375
1396
|
] }),
|
|
1376
1397
|
/* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
|
|
1377
1398
|
/* @__PURE__ */ t.jsx(
|
|
1378
|
-
|
|
1399
|
+
Z,
|
|
1379
1400
|
{
|
|
1380
1401
|
label: "Destination",
|
|
1381
|
-
onChange: (
|
|
1382
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1383
|
-
value:
|
|
1402
|
+
onChange: (v) => n(v),
|
|
1403
|
+
options: ["Go to Page", "Open Link"].filter((v) => v !== o),
|
|
1404
|
+
value: o
|
|
1384
1405
|
}
|
|
1385
1406
|
),
|
|
1386
|
-
|
|
1387
|
-
|
|
1407
|
+
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1408
|
+
Z,
|
|
1388
1409
|
{
|
|
1389
1410
|
label: "Go to",
|
|
1390
|
-
onChange: (
|
|
1391
|
-
options:
|
|
1392
|
-
value:
|
|
1411
|
+
onChange: (v) => _(v),
|
|
1412
|
+
options: A ? Object.values(A).filter((v) => v.name !== r).map((v) => v.name) : [],
|
|
1413
|
+
value: r
|
|
1393
1414
|
}
|
|
1394
1415
|
) : /* @__PURE__ */ t.jsx(
|
|
1395
1416
|
W,
|
|
1396
1417
|
{
|
|
1397
|
-
onChange: (
|
|
1398
|
-
value:
|
|
1418
|
+
onChange: (v) => P(v),
|
|
1419
|
+
value: d,
|
|
1399
1420
|
placeholder: "https://",
|
|
1400
1421
|
label: "Link"
|
|
1401
1422
|
}
|
|
@@ -1405,127 +1426,128 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1405
1426
|
{
|
|
1406
1427
|
current: e.openInNewTab,
|
|
1407
1428
|
label: "Open in new tab",
|
|
1408
|
-
onChange: (
|
|
1429
|
+
onChange: (v) => q(v)
|
|
1409
1430
|
}
|
|
1410
1431
|
),
|
|
1411
1432
|
/* @__PURE__ */ t.jsx(
|
|
1412
1433
|
Ct,
|
|
1413
1434
|
{
|
|
1414
|
-
onChange: (
|
|
1435
|
+
onChange: (v) => f(v),
|
|
1415
1436
|
value: x,
|
|
1416
1437
|
label: "Text",
|
|
1417
1438
|
maxLength: 150
|
|
1418
1439
|
}
|
|
1419
1440
|
),
|
|
1420
1441
|
/* @__PURE__ */ t.jsx(
|
|
1421
|
-
|
|
1442
|
+
Tt,
|
|
1422
1443
|
{
|
|
1423
|
-
typesText:
|
|
1424
|
-
setTypesText:
|
|
1444
|
+
typesText: c,
|
|
1445
|
+
setTypesText: l
|
|
1425
1446
|
}
|
|
1426
1447
|
)
|
|
1427
1448
|
] })
|
|
1428
1449
|
]
|
|
1429
1450
|
}
|
|
1430
1451
|
);
|
|
1431
|
-
}),
|
|
1432
|
-
subtitle:
|
|
1433
|
-
header:
|
|
1434
|
-
text:
|
|
1435
|
-
productsBlock:
|
|
1436
|
-
buttonsBlock:
|
|
1437
|
-
top:
|
|
1438
|
-
itemsBlock:
|
|
1439
|
-
typeTexts:
|
|
1440
|
-
block:
|
|
1441
|
-
active:
|
|
1442
|
-
products:
|
|
1443
|
-
product:
|
|
1444
|
-
button:
|
|
1445
|
-
image:
|
|
1446
|
-
info:
|
|
1447
|
-
name:
|
|
1448
|
-
buttons:
|
|
1449
|
-
modal:
|
|
1450
|
-
other:
|
|
1451
|
-
options:
|
|
1452
|
-
|
|
1453
|
-
|
|
1452
|
+
}), Ws = "_subtitle_w0d5g_1", Xs = "_header_w0d5g_8", Js = "_text_w0d5g_9", Qs = "_productsBlock_w0d5g_10", Ks = "_buttonsBlock_w0d5g_11", Zs = "_top_w0d5g_23", tn = "_itemsBlock_w0d5g_32", en = "_typeTexts_w0d5g_38", sn = "_block_w0d5g_45", nn = "_active_w0d5g_58", an = "_products_w0d5g_10", on = "_product_w0d5g_10", cn = "_button_w0d5g_11", ln = "_image_w0d5g_88", rn = "_info_w0d5g_95", dn = "_name_w0d5g_107", un = "_buttons_w0d5g_11", mn = "_modal_w0d5g_118", _n = "_other_w0d5g_138", hn = "_options_w0d5g_144", pn = "_addButton_w0d5g_150", rt = {
|
|
1453
|
+
subtitle: Ws,
|
|
1454
|
+
header: Xs,
|
|
1455
|
+
text: Js,
|
|
1456
|
+
productsBlock: Qs,
|
|
1457
|
+
buttonsBlock: Ks,
|
|
1458
|
+
top: Zs,
|
|
1459
|
+
itemsBlock: tn,
|
|
1460
|
+
typeTexts: en,
|
|
1461
|
+
block: sn,
|
|
1462
|
+
active: nn,
|
|
1463
|
+
products: an,
|
|
1464
|
+
product: on,
|
|
1465
|
+
button: cn,
|
|
1466
|
+
image: ln,
|
|
1467
|
+
info: rn,
|
|
1468
|
+
name: dn,
|
|
1469
|
+
buttons: un,
|
|
1470
|
+
modal: mn,
|
|
1471
|
+
other: _n,
|
|
1472
|
+
options: hn,
|
|
1473
|
+
addButton: pn
|
|
1474
|
+
}, gn = (u) => {
|
|
1475
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0 } = u, [c, l] = g.useState(null), [o, n] = g.useState({
|
|
1454
1476
|
top: 0,
|
|
1455
1477
|
left: 0
|
|
1456
|
-
}), [
|
|
1457
|
-
|
|
1478
|
+
}), [r, _] = g.useState(null), d = g.useRef(null);
|
|
1479
|
+
g.useEffect(() => {
|
|
1458
1480
|
const x = () => {
|
|
1459
|
-
|
|
1481
|
+
l(null);
|
|
1460
1482
|
};
|
|
1461
|
-
return document.body.addEventListener("click", x),
|
|
1462
|
-
|
|
1483
|
+
return document.body.addEventListener("click", x), l(null), () => {
|
|
1484
|
+
l(null), document.body.removeEventListener("click", x);
|
|
1463
1485
|
};
|
|
1464
|
-
}, []),
|
|
1465
|
-
if (
|
|
1466
|
-
const x = [...
|
|
1486
|
+
}, []), g.useEffect(() => {
|
|
1487
|
+
if (c) {
|
|
1488
|
+
const x = [...a].map((f) => f.id === c.id ? c : f);
|
|
1467
1489
|
e(x);
|
|
1468
1490
|
}
|
|
1469
|
-
}, [
|
|
1470
|
-
if (
|
|
1471
|
-
const x =
|
|
1472
|
-
let
|
|
1473
|
-
|
|
1474
|
-
top:
|
|
1475
|
-
left:
|
|
1491
|
+
}, [c]), g.useEffect(() => {
|
|
1492
|
+
if (d.current && r) {
|
|
1493
|
+
const x = d.current.getBoundingClientRect().height, f = window.innerHeight;
|
|
1494
|
+
let h = r.top;
|
|
1495
|
+
h + x > f + window.scrollY - 200 && (h = f + window.scrollY - x - 200), h < 0 && (h = 10), n({
|
|
1496
|
+
top: h,
|
|
1497
|
+
left: r.left
|
|
1476
1498
|
});
|
|
1477
1499
|
}
|
|
1478
|
-
}, [
|
|
1479
|
-
const
|
|
1500
|
+
}, [d.current, r]);
|
|
1501
|
+
const P = (x, f) => {
|
|
1480
1502
|
x.stopPropagation();
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1483
|
-
top:
|
|
1484
|
-
left:
|
|
1485
|
-
}),
|
|
1503
|
+
const h = x.target.getBoundingClientRect();
|
|
1504
|
+
_({
|
|
1505
|
+
top: h.top + window.scrollY,
|
|
1506
|
+
left: h.left - 30
|
|
1507
|
+
}), l(f);
|
|
1486
1508
|
};
|
|
1487
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1488
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1489
|
-
|
|
1509
|
+
return /* @__PURE__ */ t.jsxs("div", { className: rt.products, children: [
|
|
1510
|
+
/* @__PURE__ */ t.jsx("h5", { className: rt.subtitle, children: "Button Type" }),
|
|
1511
|
+
a.map((x) => /* @__PURE__ */ t.jsxs(
|
|
1490
1512
|
"div",
|
|
1491
1513
|
{
|
|
1492
|
-
className:
|
|
1514
|
+
className: rt.product,
|
|
1493
1515
|
children: [
|
|
1494
1516
|
/* @__PURE__ */ t.jsx(
|
|
1495
|
-
|
|
1517
|
+
Z,
|
|
1496
1518
|
{
|
|
1497
|
-
onChange: (
|
|
1498
|
-
const
|
|
1519
|
+
onChange: (f) => {
|
|
1520
|
+
const q = [...a].map((A) => A.id === x.id ? {
|
|
1499
1521
|
...x,
|
|
1500
|
-
type:
|
|
1501
|
-
} :
|
|
1502
|
-
e(
|
|
1522
|
+
type: f
|
|
1523
|
+
} : A);
|
|
1524
|
+
e(q);
|
|
1503
1525
|
},
|
|
1504
1526
|
value: x.type,
|
|
1505
1527
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1506
1528
|
}
|
|
1507
1529
|
),
|
|
1508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1530
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.buttons, children: [
|
|
1509
1531
|
/* @__PURE__ */ t.jsx(
|
|
1510
|
-
|
|
1532
|
+
b,
|
|
1511
1533
|
{
|
|
1512
1534
|
name: "Sliders",
|
|
1513
1535
|
hoverable: !0,
|
|
1514
1536
|
width: 20,
|
|
1515
1537
|
height: 20,
|
|
1516
|
-
onClick: (
|
|
1517
|
-
|
|
1538
|
+
onClick: (f) => {
|
|
1539
|
+
P(f, x);
|
|
1518
1540
|
}
|
|
1519
1541
|
}
|
|
1520
1542
|
),
|
|
1521
|
-
|
|
1522
|
-
|
|
1543
|
+
s && /* @__PURE__ */ t.jsx(
|
|
1544
|
+
b,
|
|
1523
1545
|
{
|
|
1524
1546
|
name: "Trash",
|
|
1525
1547
|
hoverable: !0,
|
|
1526
1548
|
onClick: () => {
|
|
1527
|
-
const
|
|
1528
|
-
e(
|
|
1549
|
+
const f = a.filter((h) => h.id !== x.id);
|
|
1550
|
+
e(f);
|
|
1529
1551
|
},
|
|
1530
1552
|
width: 20,
|
|
1531
1553
|
height: 20,
|
|
@@ -1537,26 +1559,26 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1537
1559
|
},
|
|
1538
1560
|
x.id
|
|
1539
1561
|
)),
|
|
1540
|
-
|
|
1541
|
-
|
|
1562
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1563
|
+
Gs,
|
|
1542
1564
|
{
|
|
1543
|
-
ref:
|
|
1544
|
-
activeButton:
|
|
1545
|
-
setActiveButton:
|
|
1546
|
-
popupPosition:
|
|
1565
|
+
ref: d,
|
|
1566
|
+
activeButton: c,
|
|
1567
|
+
setActiveButton: l,
|
|
1568
|
+
popupPosition: o
|
|
1547
1569
|
}
|
|
1548
1570
|
),
|
|
1549
|
-
i && /* @__PURE__ */ t.jsxs(
|
|
1550
|
-
|
|
1571
|
+
i && /* @__PURE__ */ t.jsx("div", { className: rt.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
1572
|
+
it,
|
|
1551
1573
|
{
|
|
1552
1574
|
withoutHover: !0,
|
|
1553
|
-
className:
|
|
1575
|
+
className: rt.button,
|
|
1554
1576
|
size: "s",
|
|
1555
1577
|
onClick: () => {
|
|
1556
|
-
const x = [...
|
|
1578
|
+
const x = [...a];
|
|
1557
1579
|
x.push({
|
|
1558
1580
|
type: "Primary",
|
|
1559
|
-
id:
|
|
1581
|
+
id: dt(),
|
|
1560
1582
|
typesText: [],
|
|
1561
1583
|
destination: "Go to Page",
|
|
1562
1584
|
text: "Button Name",
|
|
@@ -1564,10 +1586,13 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1564
1586
|
openInNewTab: !0
|
|
1565
1587
|
}), e(x);
|
|
1566
1588
|
},
|
|
1589
|
+
style: {
|
|
1590
|
+
width: "fit-content"
|
|
1591
|
+
},
|
|
1567
1592
|
children: [
|
|
1568
1593
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1569
1594
|
/* @__PURE__ */ t.jsx(
|
|
1570
|
-
|
|
1595
|
+
b,
|
|
1571
1596
|
{
|
|
1572
1597
|
name: "Plus",
|
|
1573
1598
|
width: 16,
|
|
@@ -1576,79 +1601,79 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1576
1601
|
)
|
|
1577
1602
|
]
|
|
1578
1603
|
}
|
|
1579
|
-
)
|
|
1604
|
+
) })
|
|
1580
1605
|
] });
|
|
1581
|
-
},
|
|
1582
|
-
const { isActiveButtons:
|
|
1606
|
+
}, Ga = (u) => {
|
|
1607
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i } = u;
|
|
1583
1608
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
|
|
1584
1609
|
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1585
1610
|
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
|
|
1586
1611
|
/* @__PURE__ */ t.jsx(
|
|
1587
1612
|
K,
|
|
1588
1613
|
{
|
|
1589
|
-
current:
|
|
1590
|
-
onChange: (
|
|
1614
|
+
current: a,
|
|
1615
|
+
onChange: (c) => e(c)
|
|
1591
1616
|
}
|
|
1592
1617
|
)
|
|
1593
1618
|
] }),
|
|
1594
1619
|
/* @__PURE__ */ t.jsx(
|
|
1595
|
-
|
|
1620
|
+
gn,
|
|
1596
1621
|
{
|
|
1597
|
-
buttons:
|
|
1622
|
+
buttons: s,
|
|
1598
1623
|
setButtons: i
|
|
1599
1624
|
}
|
|
1600
1625
|
)
|
|
1601
1626
|
] }) });
|
|
1602
|
-
},
|
|
1603
|
-
wrapper:
|
|
1604
|
-
subtitle:
|
|
1605
|
-
content:
|
|
1606
|
-
range:
|
|
1607
|
-
track:
|
|
1608
|
-
progress:
|
|
1609
|
-
dots:
|
|
1610
|
-
dot:
|
|
1611
|
-
active:
|
|
1612
|
-
input:
|
|
1613
|
-
countBlock:
|
|
1614
|
-
count:
|
|
1615
|
-
controls:
|
|
1616
|
-
button:
|
|
1617
|
-
},
|
|
1618
|
-
const { label:
|
|
1619
|
-
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1622
|
-
}, x = (
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1627
|
+
}, fn = "_wrapper_m18qi_1", xn = "_subtitle_m18qi_7", bn = "_content_m18qi_14", vn = "_range_m18qi_22", jn = "_track_m18qi_27", yn = "_progress_m18qi_36", kn = "_dots_m18qi_46", $n = "_dot_m18qi_46", wn = "_active_m18qi_65", Nn = "_input_m18qi_77", In = "_countBlock_m18qi_91", Cn = "_count_m18qi_91", Bn = "_controls_m18qi_107", Sn = "_button_m18qi_113", z = {
|
|
1628
|
+
wrapper: fn,
|
|
1629
|
+
subtitle: xn,
|
|
1630
|
+
content: bn,
|
|
1631
|
+
range: vn,
|
|
1632
|
+
track: jn,
|
|
1633
|
+
progress: yn,
|
|
1634
|
+
dots: kn,
|
|
1635
|
+
dot: $n,
|
|
1636
|
+
active: wn,
|
|
1637
|
+
input: Nn,
|
|
1638
|
+
countBlock: In,
|
|
1639
|
+
count: Cn,
|
|
1640
|
+
controls: Bn,
|
|
1641
|
+
button: Sn
|
|
1642
|
+
}, It = (u) => {
|
|
1643
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = g.useState(!1), r = Array.from({ length: (s - e) / i + 1 }), _ = (c - e) / (s - e) * 100, d = () => {
|
|
1644
|
+
c < s && l(c + i);
|
|
1645
|
+
}, P = () => {
|
|
1646
|
+
c > e && l(c - i);
|
|
1647
|
+
}, x = (f) => {
|
|
1648
|
+
const h = e + f * i;
|
|
1649
|
+
l(h);
|
|
1625
1650
|
};
|
|
1626
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1627
|
-
|
|
1628
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1629
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1630
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1651
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.wrapper, children: [
|
|
1652
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: a }),
|
|
1653
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.content, children: [
|
|
1654
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.range, children: [
|
|
1655
|
+
/* @__PURE__ */ t.jsx("div", { className: z.track }),
|
|
1631
1656
|
/* @__PURE__ */ t.jsx(
|
|
1632
1657
|
"div",
|
|
1633
1658
|
{
|
|
1634
|
-
className:
|
|
1635
|
-
style: { width: `${
|
|
1659
|
+
className: z.progress,
|
|
1660
|
+
style: { width: `${_}%` }
|
|
1636
1661
|
}
|
|
1637
1662
|
),
|
|
1638
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1639
|
-
const
|
|
1663
|
+
/* @__PURE__ */ t.jsx("div", { className: z.dots, children: r.map((f, h) => {
|
|
1664
|
+
const q = h <= (c - e) / i;
|
|
1640
1665
|
return /* @__PURE__ */ t.jsx(
|
|
1641
1666
|
"button",
|
|
1642
1667
|
{
|
|
1643
|
-
onClick: () => x(
|
|
1644
|
-
className:
|
|
1645
|
-
[
|
|
1646
|
-
[
|
|
1647
|
-
[
|
|
1668
|
+
onClick: () => x(h),
|
|
1669
|
+
className: F(z.dot, {
|
|
1670
|
+
[z.active]: q,
|
|
1671
|
+
[z.inactive]: !q,
|
|
1672
|
+
[z.dragging]: o
|
|
1648
1673
|
}),
|
|
1649
|
-
"aria-label": `Set value to ${e +
|
|
1674
|
+
"aria-label": `Set value to ${e + h * i}`
|
|
1650
1675
|
},
|
|
1651
|
-
|
|
1676
|
+
h
|
|
1652
1677
|
);
|
|
1653
1678
|
}) }),
|
|
1654
1679
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1656,43 +1681,43 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1656
1681
|
{
|
|
1657
1682
|
type: "range",
|
|
1658
1683
|
min: e,
|
|
1659
|
-
max:
|
|
1684
|
+
max: s,
|
|
1660
1685
|
step: i,
|
|
1661
|
-
value:
|
|
1662
|
-
onChange: (
|
|
1663
|
-
onMouseDown: () =>
|
|
1664
|
-
onMouseUp: () =>
|
|
1665
|
-
onTouchStart: () =>
|
|
1666
|
-
onTouchEnd: () =>
|
|
1667
|
-
className:
|
|
1686
|
+
value: c,
|
|
1687
|
+
onChange: (f) => l(Number(f.target.value)),
|
|
1688
|
+
onMouseDown: () => n(!0),
|
|
1689
|
+
onMouseUp: () => n(!1),
|
|
1690
|
+
onTouchStart: () => n(!0),
|
|
1691
|
+
onTouchEnd: () => n(!1),
|
|
1692
|
+
className: z.input
|
|
1668
1693
|
}
|
|
1669
1694
|
)
|
|
1670
1695
|
] }),
|
|
1671
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1696
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.countBlock, children: [
|
|
1672
1697
|
/* @__PURE__ */ t.jsx(
|
|
1673
1698
|
W,
|
|
1674
1699
|
{
|
|
1675
1700
|
type: "number",
|
|
1676
1701
|
min: e,
|
|
1677
|
-
max:
|
|
1702
|
+
max: s,
|
|
1678
1703
|
paddingless: !0,
|
|
1679
|
-
onChange: (
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1704
|
+
onChange: (f) => {
|
|
1705
|
+
const h = Number(f);
|
|
1706
|
+
h > s ? l(s) : h < e ? l(e) : l(h);
|
|
1682
1707
|
},
|
|
1683
|
-
value: String(
|
|
1708
|
+
value: String(c)
|
|
1684
1709
|
}
|
|
1685
1710
|
),
|
|
1686
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1711
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.controls, children: [
|
|
1687
1712
|
/* @__PURE__ */ t.jsx(
|
|
1688
1713
|
"button",
|
|
1689
1714
|
{
|
|
1690
|
-
onClick:
|
|
1691
|
-
disabled:
|
|
1692
|
-
className:
|
|
1715
|
+
onClick: d,
|
|
1716
|
+
disabled: c >= s,
|
|
1717
|
+
className: z.button,
|
|
1693
1718
|
"aria-label": "Increment count",
|
|
1694
1719
|
children: /* @__PURE__ */ t.jsx(
|
|
1695
|
-
|
|
1720
|
+
b,
|
|
1696
1721
|
{
|
|
1697
1722
|
name: "CaretUp",
|
|
1698
1723
|
width: 15,
|
|
@@ -1704,12 +1729,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1704
1729
|
/* @__PURE__ */ t.jsx(
|
|
1705
1730
|
"button",
|
|
1706
1731
|
{
|
|
1707
|
-
onClick:
|
|
1708
|
-
disabled:
|
|
1709
|
-
className:
|
|
1732
|
+
onClick: P,
|
|
1733
|
+
disabled: c <= e,
|
|
1734
|
+
className: z.button,
|
|
1710
1735
|
"aria-label": "Decrement count",
|
|
1711
1736
|
children: /* @__PURE__ */ t.jsx(
|
|
1712
|
-
|
|
1737
|
+
b,
|
|
1713
1738
|
{
|
|
1714
1739
|
name: "CaretDown",
|
|
1715
1740
|
width: 15,
|
|
@@ -1722,49 +1747,50 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1722
1747
|
] })
|
|
1723
1748
|
] })
|
|
1724
1749
|
] });
|
|
1725
|
-
},
|
|
1726
|
-
title:
|
|
1727
|
-
subtitle:
|
|
1728
|
-
header:
|
|
1729
|
-
text:
|
|
1730
|
-
productsBlock:
|
|
1731
|
-
top:
|
|
1732
|
-
itemsBlock:
|
|
1733
|
-
typeTexts:
|
|
1734
|
-
block:
|
|
1735
|
-
active:
|
|
1736
|
-
products:
|
|
1737
|
-
product:
|
|
1738
|
-
button:
|
|
1739
|
-
image:
|
|
1740
|
-
info:
|
|
1741
|
-
name:
|
|
1742
|
-
buttons:
|
|
1743
|
-
modal:
|
|
1744
|
-
link:
|
|
1745
|
-
modalOptions:
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1750
|
+
}, Pn = "_title_w64fy_1", Tn = "_subtitle_w64fy_5", qn = "_header_w64fy_12", An = "_text_w64fy_13", On = "_productsBlock_w64fy_14", Dn = "_top_w64fy_26", En = "_itemsBlock_w64fy_35", Ln = "_typeTexts_w64fy_41", Rn = "_block_w64fy_48", Mn = "_active_w64fy_61", Hn = "_products_w64fy_14", zn = "_product_w64fy_14", Vn = "_button_w64fy_80", Fn = "_image_w64fy_91", Un = "_info_w64fy_98", Yn = "_name_w64fy_110", Gn = "_buttons_w64fy_114", Wn = "_modal_w64fy_121", Xn = "_link_w64fy_141", Jn = "_modalOptions_w64fy_147", Qn = "_addButton_w64fy_159", G = {
|
|
1751
|
+
title: Pn,
|
|
1752
|
+
subtitle: Tn,
|
|
1753
|
+
header: qn,
|
|
1754
|
+
text: An,
|
|
1755
|
+
productsBlock: On,
|
|
1756
|
+
top: Dn,
|
|
1757
|
+
itemsBlock: En,
|
|
1758
|
+
typeTexts: Ln,
|
|
1759
|
+
block: Rn,
|
|
1760
|
+
active: Mn,
|
|
1761
|
+
products: Hn,
|
|
1762
|
+
product: zn,
|
|
1763
|
+
button: Vn,
|
|
1764
|
+
image: Fn,
|
|
1765
|
+
info: Un,
|
|
1766
|
+
name: Yn,
|
|
1767
|
+
buttons: Gn,
|
|
1768
|
+
modal: Wn,
|
|
1769
|
+
link: Xn,
|
|
1770
|
+
modalOptions: Jn,
|
|
1771
|
+
addButton: Qn
|
|
1772
|
+
}, Kn = (u) => {
|
|
1773
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((n) => n.id === a.listingId);
|
|
1774
|
+
if (!l) return null;
|
|
1775
|
+
function o(n, r) {
|
|
1776
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
1751
1777
|
}
|
|
1752
1778
|
return /* @__PURE__ */ t.jsxs(
|
|
1753
1779
|
"div",
|
|
1754
1780
|
{
|
|
1755
1781
|
className: G.modal,
|
|
1756
|
-
onClick: (
|
|
1757
|
-
|
|
1782
|
+
onClick: (n) => {
|
|
1783
|
+
n.stopPropagation();
|
|
1758
1784
|
},
|
|
1759
1785
|
style: {
|
|
1760
|
-
top: `${
|
|
1761
|
-
left: `${
|
|
1786
|
+
top: `${s.top}px`,
|
|
1787
|
+
left: `${s.left}px`
|
|
1762
1788
|
},
|
|
1763
1789
|
children: [
|
|
1764
1790
|
/* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
1765
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1791
|
+
/* @__PURE__ */ t.jsx("h3", { children: o(l.productData.name, 20) }),
|
|
1766
1792
|
/* @__PURE__ */ t.jsx(
|
|
1767
|
-
|
|
1793
|
+
b,
|
|
1768
1794
|
{
|
|
1769
1795
|
name: "X",
|
|
1770
1796
|
height: 20,
|
|
@@ -1780,87 +1806,87 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1780
1806
|
ht,
|
|
1781
1807
|
{
|
|
1782
1808
|
label: "Put up an attractive image",
|
|
1783
|
-
activeImage:
|
|
1784
|
-
onChange: (
|
|
1785
|
-
const
|
|
1786
|
-
...
|
|
1787
|
-
image:
|
|
1809
|
+
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
1810
|
+
onChange: (n) => {
|
|
1811
|
+
const r = {
|
|
1812
|
+
...a,
|
|
1813
|
+
image: n[0]
|
|
1788
1814
|
};
|
|
1789
|
-
e(
|
|
1815
|
+
e(r);
|
|
1790
1816
|
}
|
|
1791
1817
|
}
|
|
1792
1818
|
) })
|
|
1793
1819
|
]
|
|
1794
1820
|
}
|
|
1795
1821
|
);
|
|
1796
|
-
},
|
|
1797
|
-
const { index:
|
|
1822
|
+
}, Zn = (u) => {
|
|
1823
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
1798
1824
|
accept: "product",
|
|
1799
|
-
hover(
|
|
1800
|
-
|
|
1825
|
+
hover(o) {
|
|
1826
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
1801
1827
|
}
|
|
1802
|
-
}), [{ isDragging:
|
|
1828
|
+
}), [{ isDragging: c }, l] = wt({
|
|
1803
1829
|
type: "product",
|
|
1804
|
-
item: { index:
|
|
1805
|
-
collect: (
|
|
1806
|
-
isDragging:
|
|
1830
|
+
item: { index: a },
|
|
1831
|
+
collect: (o) => ({
|
|
1832
|
+
isDragging: o.isDragging()
|
|
1807
1833
|
})
|
|
1808
1834
|
});
|
|
1809
1835
|
return /* @__PURE__ */ t.jsx(
|
|
1810
1836
|
"div",
|
|
1811
1837
|
{
|
|
1812
|
-
ref: (
|
|
1813
|
-
className: `${G.product} ${
|
|
1814
|
-
children:
|
|
1838
|
+
ref: (o) => l(i(o)),
|
|
1839
|
+
className: `${G.product} ${c ? G.dragging : ""}`,
|
|
1840
|
+
children: s
|
|
1815
1841
|
}
|
|
1816
1842
|
);
|
|
1817
|
-
},
|
|
1843
|
+
}, Wa = (u) => {
|
|
1818
1844
|
const {
|
|
1819
|
-
isActiveItems:
|
|
1845
|
+
isActiveItems: a,
|
|
1820
1846
|
setIsActiveItems: e,
|
|
1821
|
-
items:
|
|
1847
|
+
items: s,
|
|
1822
1848
|
setItems: i,
|
|
1823
|
-
other:
|
|
1824
|
-
title:
|
|
1825
|
-
subtitle:
|
|
1826
|
-
editable:
|
|
1827
|
-
draggable:
|
|
1828
|
-
withImage:
|
|
1829
|
-
deletable:
|
|
1830
|
-
addable:
|
|
1849
|
+
other: c,
|
|
1850
|
+
title: l,
|
|
1851
|
+
subtitle: o,
|
|
1852
|
+
editable: n = !0,
|
|
1853
|
+
draggable: r = !1,
|
|
1854
|
+
withImage: _ = !1,
|
|
1855
|
+
deletable: d = !0,
|
|
1856
|
+
addable: P = !0,
|
|
1831
1857
|
itemsType: x,
|
|
1832
|
-
itemsOptions:
|
|
1833
|
-
} = u, [
|
|
1858
|
+
itemsOptions: f
|
|
1859
|
+
} = u, [h, q] = g.useState(null), [A, v] = g.useState({
|
|
1834
1860
|
top: 0,
|
|
1835
1861
|
left: 0
|
|
1836
|
-
}), [
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1862
|
+
}), [E, I] = g.useState(!1), C = (k, y) => {
|
|
1863
|
+
const L = [...s], [w] = L.splice(k, 1);
|
|
1864
|
+
L.splice(y, 0, w), i(L);
|
|
1839
1865
|
};
|
|
1840
|
-
|
|
1866
|
+
g.useEffect(() => {
|
|
1841
1867
|
const k = () => {
|
|
1842
|
-
|
|
1868
|
+
q(null), I(!1);
|
|
1843
1869
|
};
|
|
1844
|
-
return document.body.addEventListener("click", k),
|
|
1845
|
-
|
|
1870
|
+
return document.body.addEventListener("click", k), q(null), I(!1), () => {
|
|
1871
|
+
q(null), I(!1), document.body.removeEventListener("click", k);
|
|
1846
1872
|
};
|
|
1847
|
-
}, []),
|
|
1848
|
-
if (
|
|
1849
|
-
const k = [...
|
|
1873
|
+
}, []), g.useEffect(() => {
|
|
1874
|
+
if (h) {
|
|
1875
|
+
const k = [...s].map((y) => y.listingId === h.listingId ? h : y);
|
|
1850
1876
|
i(k);
|
|
1851
1877
|
}
|
|
1852
|
-
}, [
|
|
1853
|
-
const
|
|
1878
|
+
}, [h]);
|
|
1879
|
+
const M = (k, y) => {
|
|
1854
1880
|
k.stopPropagation();
|
|
1855
|
-
const
|
|
1856
|
-
let U =
|
|
1857
|
-
U +
|
|
1881
|
+
const L = k.target.getBoundingClientRect(), w = 100, R = window.innerHeight;
|
|
1882
|
+
let U = L.top + window.scrollY;
|
|
1883
|
+
U + w > R && (U = R - w - 20), I(!0), v({
|
|
1858
1884
|
top: U - 80,
|
|
1859
|
-
left:
|
|
1860
|
-
}),
|
|
1885
|
+
left: L.left - 30
|
|
1886
|
+
}), q(y);
|
|
1861
1887
|
};
|
|
1862
|
-
function
|
|
1863
|
-
if (
|
|
1888
|
+
function m(k) {
|
|
1889
|
+
if (_)
|
|
1864
1890
|
return k ? /* @__PURE__ */ t.jsx(
|
|
1865
1891
|
"img",
|
|
1866
1892
|
{
|
|
@@ -1870,7 +1896,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1870
1896
|
height: 16
|
|
1871
1897
|
}
|
|
1872
1898
|
) : /* @__PURE__ */ t.jsx(
|
|
1873
|
-
|
|
1899
|
+
b,
|
|
1874
1900
|
{
|
|
1875
1901
|
name: "Image",
|
|
1876
1902
|
width: 16,
|
|
@@ -1879,12 +1905,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1879
1905
|
}
|
|
1880
1906
|
);
|
|
1881
1907
|
}
|
|
1882
|
-
const
|
|
1883
|
-
const
|
|
1884
|
-
if (!
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1887
|
-
|
|
1908
|
+
const O = (k, y) => {
|
|
1909
|
+
const L = f.find((R) => k.listingId === R.id);
|
|
1910
|
+
if (!L) return null;
|
|
1911
|
+
const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1912
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1913
|
+
b,
|
|
1888
1914
|
{
|
|
1889
1915
|
name: "DotsSixVertical",
|
|
1890
1916
|
hoverable: !0,
|
|
@@ -1893,116 +1919,119 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1893
1919
|
}
|
|
1894
1920
|
) }, y),
|
|
1895
1921
|
x === "select" && /* @__PURE__ */ t.jsx(
|
|
1896
|
-
|
|
1922
|
+
Z,
|
|
1897
1923
|
{
|
|
1898
|
-
onChange: (
|
|
1899
|
-
const U = [...
|
|
1900
|
-
if (!
|
|
1924
|
+
onChange: (R) => {
|
|
1925
|
+
const U = [...s], tt = f.find((T) => T.productData.name === R);
|
|
1926
|
+
if (!tt) return;
|
|
1901
1927
|
const at = {
|
|
1902
|
-
listingId:
|
|
1903
|
-
image:
|
|
1904
|
-
},
|
|
1905
|
-
|
|
1928
|
+
listingId: tt.id,
|
|
1929
|
+
image: tt.productData.images.length > 0 ? tt.productData.images[0].cfId : ""
|
|
1930
|
+
}, j = U.map((T) => T.listingId === k.listingId ? at : T);
|
|
1931
|
+
q(at), i([...j]);
|
|
1906
1932
|
},
|
|
1907
|
-
value:
|
|
1933
|
+
value: L.productData.name,
|
|
1908
1934
|
options: [
|
|
1909
|
-
...
|
|
1935
|
+
...f.filter((R) => !s.find((U) => U.listingId === R.id)).map((R) => R.productData.name)
|
|
1910
1936
|
],
|
|
1911
|
-
leftAddon:
|
|
1912
|
-
k.image ||
|
|
1937
|
+
leftAddon: m(
|
|
1938
|
+
k.image || L.productData.images.length > 0 && L.productData.images[0].cfId || ""
|
|
1913
1939
|
)
|
|
1914
1940
|
},
|
|
1915
1941
|
y
|
|
1916
1942
|
),
|
|
1917
1943
|
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
1918
|
-
|
|
1919
|
-
|
|
1944
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1945
|
+
b,
|
|
1920
1946
|
{
|
|
1921
1947
|
name: "Sliders",
|
|
1922
1948
|
hoverable: !0,
|
|
1923
1949
|
width: 20,
|
|
1924
1950
|
height: 20,
|
|
1925
|
-
onClick: (
|
|
1951
|
+
onClick: (R) => M(R, k)
|
|
1926
1952
|
}
|
|
1927
1953
|
),
|
|
1928
|
-
|
|
1929
|
-
|
|
1954
|
+
d && /* @__PURE__ */ t.jsx(
|
|
1955
|
+
b,
|
|
1930
1956
|
{
|
|
1931
1957
|
name: "Trash",
|
|
1932
1958
|
hoverable: !0,
|
|
1933
1959
|
width: 20,
|
|
1934
1960
|
height: 20,
|
|
1935
1961
|
fill: "#C12A2A",
|
|
1936
|
-
onClick: () => i(
|
|
1962
|
+
onClick: () => i(s.filter((R) => R !== k))
|
|
1937
1963
|
}
|
|
1938
1964
|
)
|
|
1939
1965
|
] })
|
|
1940
1966
|
] });
|
|
1941
|
-
return
|
|
1942
|
-
|
|
1967
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
1968
|
+
Zn,
|
|
1943
1969
|
{
|
|
1944
1970
|
product: k,
|
|
1945
1971
|
index: y,
|
|
1946
|
-
moveProduct:
|
|
1947
|
-
children:
|
|
1972
|
+
moveProduct: C,
|
|
1973
|
+
children: w
|
|
1948
1974
|
},
|
|
1949
1975
|
k.listingId
|
|
1950
1976
|
) : /* @__PURE__ */ t.jsx(
|
|
1951
1977
|
"div",
|
|
1952
1978
|
{
|
|
1953
1979
|
className: G.product,
|
|
1954
|
-
children:
|
|
1980
|
+
children: w
|
|
1955
1981
|
},
|
|
1956
1982
|
k.listingId
|
|
1957
1983
|
);
|
|
1958
1984
|
};
|
|
1959
1985
|
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
1960
|
-
(
|
|
1961
|
-
|
|
1962
|
-
|
|
1986
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
1987
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
|
|
1988
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1963
1989
|
K,
|
|
1964
1990
|
{
|
|
1965
|
-
current:
|
|
1991
|
+
current: a,
|
|
1966
1992
|
onChange: (k) => e == null ? void 0 : e(k)
|
|
1967
1993
|
}
|
|
1968
1994
|
)
|
|
1969
1995
|
] }),
|
|
1970
|
-
|
|
1971
|
-
|
|
1996
|
+
E && h && /* @__PURE__ */ t.jsx(
|
|
1997
|
+
Kn,
|
|
1972
1998
|
{
|
|
1973
|
-
activeItem:
|
|
1974
|
-
setActiveItem:
|
|
1975
|
-
setIsOpenModal:
|
|
1976
|
-
popupPosition:
|
|
1977
|
-
itemsOptions:
|
|
1999
|
+
activeItem: h,
|
|
2000
|
+
setActiveItem: q,
|
|
2001
|
+
setIsOpenModal: I,
|
|
2002
|
+
popupPosition: A,
|
|
2003
|
+
itemsOptions: f
|
|
1978
2004
|
}
|
|
1979
2005
|
),
|
|
1980
2006
|
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2007
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2008
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((k, y) => O(k, y)) }) : s.map((k, y) => O(k, y)),
|
|
2009
|
+
P && /* @__PURE__ */ t.jsx("div", { className: G.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
2010
|
+
it,
|
|
1985
2011
|
{
|
|
1986
2012
|
withoutHover: !0,
|
|
1987
2013
|
className: G.button,
|
|
1988
2014
|
size: "s",
|
|
1989
2015
|
onClick: () => {
|
|
1990
|
-
const k = [...
|
|
1991
|
-
for (let y = 0; y <
|
|
1992
|
-
if (!
|
|
2016
|
+
const k = [...s];
|
|
2017
|
+
for (let y = 0; y < f.length; y++)
|
|
2018
|
+
if (!s.find((L) => L.listingId === f[y].id)) {
|
|
1993
2019
|
k.push({
|
|
1994
|
-
listingId:
|
|
1995
|
-
image:
|
|
2020
|
+
listingId: f[y].id,
|
|
2021
|
+
image: f[y].productData.images.length > 0 ? f[y].productData.images[0].cfId : ""
|
|
1996
2022
|
});
|
|
1997
2023
|
break;
|
|
1998
2024
|
}
|
|
1999
2025
|
i(k);
|
|
2000
2026
|
},
|
|
2001
|
-
disabled:
|
|
2027
|
+
disabled: s.length === f.length,
|
|
2028
|
+
style: {
|
|
2029
|
+
width: "fit-content"
|
|
2030
|
+
},
|
|
2002
2031
|
children: [
|
|
2003
2032
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2004
2033
|
/* @__PURE__ */ t.jsx(
|
|
2005
|
-
|
|
2034
|
+
b,
|
|
2006
2035
|
{
|
|
2007
2036
|
name: "Plus",
|
|
2008
2037
|
width: 16,
|
|
@@ -2011,138 +2040,139 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
2011
2040
|
)
|
|
2012
2041
|
]
|
|
2013
2042
|
}
|
|
2014
|
-
)
|
|
2043
|
+
) })
|
|
2015
2044
|
] }),
|
|
2016
|
-
|
|
2045
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
|
|
2017
2046
|
] });
|
|
2018
|
-
},
|
|
2019
|
-
options:
|
|
2020
|
-
price:
|
|
2021
|
-
oldPrice:
|
|
2022
|
-
newPrice:
|
|
2023
|
-
animate:
|
|
2024
|
-
appearAndBounce:
|
|
2025
|
-
meta:
|
|
2026
|
-
info:
|
|
2027
|
-
infoRight:
|
|
2028
|
-
buttons:
|
|
2029
|
-
variants:
|
|
2030
|
-
variant:
|
|
2031
|
-
stock:
|
|
2032
|
-
variantInfo:
|
|
2033
|
-
quantity:
|
|
2034
|
-
count:
|
|
2035
|
-
focused:
|
|
2036
|
-
button:
|
|
2037
|
-
activeVariant:
|
|
2038
|
-
chargeTypes:
|
|
2039
|
-
charge:
|
|
2040
|
-
chargeActive:
|
|
2041
|
-
title:
|
|
2047
|
+
}, ti = "_options_jdafm_1", ei = "_price_jdafm_12", si = "_oldPrice_jdafm_19", ni = "_newPrice_jdafm_27", ii = "_animate_jdafm_34", ai = "_appearAndBounce_jdafm_1", oi = "_meta_jdafm_52", ci = "_info_jdafm_58", li = "_infoRight_jdafm_66", ri = "_buttons_jdafm_73", di = "_variants_jdafm_80", ui = "_variant_jdafm_80", mi = "_stock_jdafm_97", _i = "_variantInfo_jdafm_104", hi = "_quantity_jdafm_110", pi = "_count_jdafm_117", gi = "_focused_jdafm_134", fi = "_button_jdafm_73", xi = "_activeVariant_jdafm_160", bi = "_chargeTypes_jdafm_164", vi = "_charge_jdafm_164", ji = "_chargeActive_jdafm_189", yi = "_title_jdafm_197", N = {
|
|
2048
|
+
options: ti,
|
|
2049
|
+
price: ei,
|
|
2050
|
+
oldPrice: si,
|
|
2051
|
+
newPrice: ni,
|
|
2052
|
+
animate: ii,
|
|
2053
|
+
appearAndBounce: ai,
|
|
2054
|
+
meta: oi,
|
|
2055
|
+
info: ci,
|
|
2056
|
+
infoRight: li,
|
|
2057
|
+
buttons: ri,
|
|
2058
|
+
variants: di,
|
|
2059
|
+
variant: ui,
|
|
2060
|
+
stock: mi,
|
|
2061
|
+
variantInfo: _i,
|
|
2062
|
+
quantity: hi,
|
|
2063
|
+
count: pi,
|
|
2064
|
+
focused: gi,
|
|
2065
|
+
button: fi,
|
|
2066
|
+
activeVariant: xi,
|
|
2067
|
+
chargeTypes: bi,
|
|
2068
|
+
charge: vi,
|
|
2069
|
+
chargeActive: ji,
|
|
2070
|
+
title: yi
|
|
2042
2071
|
};
|
|
2043
|
-
var
|
|
2044
|
-
const
|
|
2045
|
-
var C,
|
|
2046
|
-
const { variants:
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
const
|
|
2050
|
-
return () => clearTimeout(
|
|
2051
|
-
}, [
|
|
2052
|
-
async function
|
|
2053
|
-
await x(), await
|
|
2072
|
+
var At = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(At || {});
|
|
2073
|
+
const Xa = (u) => {
|
|
2074
|
+
var C, M;
|
|
2075
|
+
const { variants: a } = u, [e, s] = g.useState(a[0]), [i, c] = g.useState(e.chargeTypes[0]), l = ft(), [o, n] = g.useState(1), [r, _] = g.useState(!1), { reset: d, addProductToCart: P, getProducts: x, cart: f } = Nt(), [h, q] = g.useState(!1);
|
|
2076
|
+
g.useEffect(() => {
|
|
2077
|
+
q(!0);
|
|
2078
|
+
const m = setTimeout(() => q(!1), 600);
|
|
2079
|
+
return () => clearTimeout(m);
|
|
2080
|
+
}, [o]);
|
|
2081
|
+
async function A() {
|
|
2082
|
+
await x(), await P({
|
|
2054
2083
|
productId: u.id,
|
|
2055
2084
|
productVariantId: e.id,
|
|
2056
|
-
quantity:
|
|
2085
|
+
quantity: o
|
|
2057
2086
|
});
|
|
2058
2087
|
}
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2088
|
+
function v() {
|
|
2089
|
+
d(), A(), l("/checkout");
|
|
2061
2090
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2091
|
+
console.log(f);
|
|
2092
|
+
function E(m) {
|
|
2093
|
+
if (m >= 864e5) {
|
|
2094
|
+
const w = Math.floor(m / 864e5);
|
|
2095
|
+
return `${w} ${w === 1 ? "day" : "days"}`;
|
|
2096
|
+
} else if (m >= 36e5) {
|
|
2097
|
+
const w = Math.floor(m / 36e5);
|
|
2098
|
+
return `${w} ${w === 1 ? "hour" : "hours"}`;
|
|
2099
|
+
} else if (m >= 6e4) {
|
|
2100
|
+
const w = Math.floor(m / 6e4);
|
|
2101
|
+
return `${w} ${w === 1 ? "minute" : "minutes"}`;
|
|
2072
2102
|
} else {
|
|
2073
|
-
const
|
|
2074
|
-
return `${
|
|
2103
|
+
const w = Math.floor(m / 1e3);
|
|
2104
|
+
return `${w} ${w === 1 ? "second" : "seconds"}`;
|
|
2075
2105
|
}
|
|
2076
2106
|
}
|
|
2077
|
-
function
|
|
2078
|
-
return
|
|
2107
|
+
function I(m, O) {
|
|
2108
|
+
return m.length > O ? m.slice(0, O) + "..." : m;
|
|
2079
2109
|
}
|
|
2080
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2081
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2110
|
+
return /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
|
|
2111
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((m) => /* @__PURE__ */ t.jsx(
|
|
2082
2112
|
"div",
|
|
2083
2113
|
{
|
|
2084
|
-
className:
|
|
2085
|
-
[
|
|
2114
|
+
className: F(N.charge, {
|
|
2115
|
+
[N.chargeActive]: i === m
|
|
2086
2116
|
}),
|
|
2087
|
-
onClick: () =>
|
|
2088
|
-
children:
|
|
2117
|
+
onClick: () => c(m),
|
|
2118
|
+
children: At[m]
|
|
2089
2119
|
},
|
|
2090
|
-
|
|
2120
|
+
m
|
|
2091
2121
|
)) }),
|
|
2092
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2093
|
-
var
|
|
2122
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: a.map((m) => {
|
|
2123
|
+
var O;
|
|
2094
2124
|
return /* @__PURE__ */ t.jsxs(
|
|
2095
2125
|
"div",
|
|
2096
2126
|
{
|
|
2097
|
-
className:
|
|
2098
|
-
[
|
|
2127
|
+
className: F(N.variant, {
|
|
2128
|
+
[N.activeVariant]: e.id === m.id
|
|
2099
2129
|
}),
|
|
2100
|
-
onClick: () =>
|
|
2130
|
+
onClick: () => s(m),
|
|
2101
2131
|
children: [
|
|
2102
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2103
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2132
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
|
|
2133
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: I(m.name, 15) }),
|
|
2104
2134
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2105
2135
|
"$",
|
|
2106
|
-
i === "ONE_TIME" ?
|
|
2136
|
+
i === "ONE_TIME" ? m.price.amount : m.subscriptionSettings ? m.subscriptionSettings.price.amount : "Price Not Found"
|
|
2107
2137
|
] })
|
|
2108
2138
|
] }),
|
|
2109
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2110
|
-
((
|
|
2139
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
|
|
2140
|
+
((O = m.quantity.restrictions) == null ? void 0 : O.max) || m.quantity.available || 0,
|
|
2111
2141
|
" in stock"
|
|
2112
2142
|
] }) })
|
|
2113
2143
|
]
|
|
2114
2144
|
},
|
|
2115
|
-
|
|
2145
|
+
m.id
|
|
2116
2146
|
);
|
|
2117
2147
|
}) }),
|
|
2118
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2148
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
2119
2149
|
/* @__PURE__ */ t.jsx(
|
|
2120
2150
|
"button",
|
|
2121
2151
|
{
|
|
2122
2152
|
onClick: () => {
|
|
2123
|
-
|
|
2153
|
+
o > 1 ? n((m) => m - 1) : n(1);
|
|
2124
2154
|
},
|
|
2125
|
-
className:
|
|
2126
|
-
disabled: e.quantity.restrictions &&
|
|
2127
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2155
|
+
className: N.button,
|
|
2156
|
+
disabled: e.quantity.restrictions && o <= e.quantity.restrictions.min,
|
|
2157
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2128
2158
|
}
|
|
2129
2159
|
),
|
|
2130
2160
|
/* @__PURE__ */ t.jsx(
|
|
2131
2161
|
"label",
|
|
2132
2162
|
{
|
|
2133
|
-
className:
|
|
2134
|
-
[
|
|
2163
|
+
className: F(N.count, {
|
|
2164
|
+
[N.focused]: r
|
|
2135
2165
|
}),
|
|
2136
|
-
onFocus: () =>
|
|
2137
|
-
onBlur: () =>
|
|
2166
|
+
onFocus: () => _(!0),
|
|
2167
|
+
onBlur: () => _(!1),
|
|
2138
2168
|
children: /* @__PURE__ */ t.jsx(
|
|
2139
2169
|
W,
|
|
2140
2170
|
{
|
|
2141
2171
|
type: "number",
|
|
2142
|
-
value: String(
|
|
2143
|
-
onChange: (
|
|
2172
|
+
value: String(o),
|
|
2173
|
+
onChange: (m) => n(Number(m)),
|
|
2144
2174
|
max: ((C = e.quantity.restrictions) == null ? void 0 : C.max) || e.quantity.available || 1 / 0,
|
|
2145
|
-
min: ((
|
|
2175
|
+
min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
|
|
2146
2176
|
style: {
|
|
2147
2177
|
backgroundColor: "transparent",
|
|
2148
2178
|
border: "none",
|
|
@@ -2156,20 +2186,20 @@ const zo = (u) => {
|
|
|
2156
2186
|
"button",
|
|
2157
2187
|
{
|
|
2158
2188
|
onClick: () => {
|
|
2159
|
-
|
|
2189
|
+
n((m) => m + 1);
|
|
2160
2190
|
},
|
|
2161
|
-
className:
|
|
2162
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2163
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2191
|
+
className: N.button,
|
|
2192
|
+
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available && o >= e.quantity.available),
|
|
2193
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2164
2194
|
}
|
|
2165
2195
|
)
|
|
2166
2196
|
] }),
|
|
2167
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2168
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2197
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
|
|
2198
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2169
2199
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2170
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2200
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
2171
2201
|
/* @__PURE__ */ t.jsx(
|
|
2172
|
-
|
|
2202
|
+
b,
|
|
2173
2203
|
{
|
|
2174
2204
|
name: "Lightning",
|
|
2175
2205
|
fill: "#FF3F19",
|
|
@@ -2177,118 +2207,118 @@ const zo = (u) => {
|
|
|
2177
2207
|
height: 20
|
|
2178
2208
|
}
|
|
2179
2209
|
),
|
|
2180
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2210
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : E(e.deliveryTime) })
|
|
2181
2211
|
] })
|
|
2182
2212
|
] }),
|
|
2183
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2213
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2184
2214
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2185
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2186
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2215
|
+
/* @__PURE__ */ t.jsx("div", { className: N.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2216
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
|
|
2187
2217
|
"$ ",
|
|
2188
|
-
(e.price.amount || 0) *
|
|
2218
|
+
(e.price.amount || 0) * o
|
|
2189
2219
|
] }),
|
|
2190
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2220
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2191
2221
|
"$ ",
|
|
2192
|
-
(e.compareAtPrice.amount || 0) *
|
|
2222
|
+
(e.compareAtPrice.amount || 0) * o
|
|
2193
2223
|
] })
|
|
2194
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2224
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
|
|
2195
2225
|
"$ ",
|
|
2196
|
-
(e.price.amount || 0) *
|
|
2197
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2198
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2226
|
+
(e.price.amount || 0) * o
|
|
2227
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2228
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
|
|
2199
2229
|
"$ ",
|
|
2200
2230
|
e.subscriptionSettings.price.amount || 0
|
|
2201
2231
|
] }),
|
|
2202
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2232
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2203
2233
|
"$ ",
|
|
2204
2234
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2205
2235
|
] })
|
|
2206
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2236
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: h }), children: [
|
|
2207
2237
|
"$ ",
|
|
2208
2238
|
e.subscriptionSettings.price.amount || 0
|
|
2209
2239
|
] }) })
|
|
2210
2240
|
] })
|
|
2211
2241
|
] }),
|
|
2212
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2242
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
2213
2243
|
/* @__PURE__ */ t.jsx(
|
|
2214
|
-
|
|
2244
|
+
it,
|
|
2215
2245
|
{
|
|
2216
2246
|
type: "Primary",
|
|
2217
|
-
onClick: () =>
|
|
2247
|
+
onClick: () => v(),
|
|
2218
2248
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2219
2249
|
}
|
|
2220
2250
|
),
|
|
2221
2251
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2222
|
-
|
|
2252
|
+
it,
|
|
2223
2253
|
{
|
|
2224
2254
|
type: "Secondary",
|
|
2225
|
-
onClick: () =>
|
|
2255
|
+
onClick: () => A(),
|
|
2226
2256
|
children: "Add to Cart"
|
|
2227
2257
|
}
|
|
2228
2258
|
)
|
|
2229
2259
|
] })
|
|
2230
2260
|
] });
|
|
2231
|
-
},
|
|
2232
|
-
button:
|
|
2233
|
-
login:
|
|
2234
|
-
signUp:
|
|
2235
|
-
buttons:
|
|
2236
|
-
modal:
|
|
2237
|
-
info:
|
|
2238
|
-
top:
|
|
2239
|
-
title:
|
|
2240
|
-
clear:
|
|
2241
|
-
activeClear:
|
|
2242
|
-
count:
|
|
2243
|
-
cart:
|
|
2244
|
-
empty:
|
|
2245
|
-
product:
|
|
2246
|
-
products:
|
|
2247
|
-
image:
|
|
2248
|
-
productInfo:
|
|
2249
|
-
content:
|
|
2250
|
-
name:
|
|
2251
|
-
price:
|
|
2252
|
-
productButtons:
|
|
2253
|
-
productButton:
|
|
2254
|
-
productCount:
|
|
2255
|
-
bottom:
|
|
2256
|
-
subtotal:
|
|
2257
|
-
block:
|
|
2258
|
-
shoppingCount:
|
|
2259
|
-
total:
|
|
2260
|
-
link:
|
|
2261
|
-
userInfo:
|
|
2262
|
-
},
|
|
2263
|
-
button:
|
|
2264
|
-
primary:
|
|
2265
|
-
primaryHovered:
|
|
2266
|
-
secondary:
|
|
2267
|
-
secondaryHovered:
|
|
2268
|
-
tertiary:
|
|
2269
|
-
tertiaryHovered:
|
|
2270
|
-
content:
|
|
2271
|
-
},
|
|
2272
|
-
const { children:
|
|
2261
|
+
}, ki = "_button_nq46k_1", $i = "_login_nq46k_14", wi = "_signUp_nq46k_18", Ni = "_buttons_nq46k_23", Ii = "_modal_nq46k_32", Ci = "_info_nq46k_60", Bi = "_top_nq46k_67", Si = "_title_nq46k_78", Pi = "_clear_nq46k_85", Ti = "_activeClear_nq46k_92", qi = "_count_nq46k_96", Ai = "_cart_nq46k_111", Oi = "_empty_nq46k_119", Di = "_product_nq46k_145", Ei = "_products_nq46k_154", Li = "_image_nq46k_162", Ri = "_productInfo_nq46k_168", Mi = "_content_nq46k_175", Hi = "_name_nq46k_181", zi = "_price_nq46k_187", Vi = "_productButtons_nq46k_193", Fi = "_productButton_nq46k_193", Ui = "_productCount_nq46k_213", Yi = "_bottom_nq46k_229", Gi = "_subtotal_nq46k_237", Wi = "_block_nq46k_245", Xi = "_shoppingCount_nq46k_252", Ji = "_total_nq46k_272", Qi = "_link_nq46k_278", Ki = "_userInfo_nq46k_285", S = {
|
|
2262
|
+
button: ki,
|
|
2263
|
+
login: $i,
|
|
2264
|
+
signUp: wi,
|
|
2265
|
+
buttons: Ni,
|
|
2266
|
+
modal: Ii,
|
|
2267
|
+
info: Ci,
|
|
2268
|
+
top: Bi,
|
|
2269
|
+
title: Si,
|
|
2270
|
+
clear: Pi,
|
|
2271
|
+
activeClear: Ti,
|
|
2272
|
+
count: qi,
|
|
2273
|
+
cart: Ai,
|
|
2274
|
+
empty: Oi,
|
|
2275
|
+
product: Di,
|
|
2276
|
+
products: Ei,
|
|
2277
|
+
image: Li,
|
|
2278
|
+
productInfo: Ri,
|
|
2279
|
+
content: Mi,
|
|
2280
|
+
name: Hi,
|
|
2281
|
+
price: zi,
|
|
2282
|
+
productButtons: Vi,
|
|
2283
|
+
productButton: Fi,
|
|
2284
|
+
productCount: Ui,
|
|
2285
|
+
bottom: Yi,
|
|
2286
|
+
subtotal: Gi,
|
|
2287
|
+
block: Wi,
|
|
2288
|
+
shoppingCount: Xi,
|
|
2289
|
+
total: Ji,
|
|
2290
|
+
link: Qi,
|
|
2291
|
+
userInfo: Ki
|
|
2292
|
+
}, Zi = "_button_85085_1", ta = "_primary_85085_20", ea = "_primaryHovered_85085_30", sa = "_secondary_85085_34", na = "_secondaryHovered_85085_44", ia = "_tertiary_85085_48", aa = "_tertiaryHovered_85085_58", oa = "_content_85085_62", et = {
|
|
2293
|
+
button: Zi,
|
|
2294
|
+
primary: ta,
|
|
2295
|
+
primaryHovered: ea,
|
|
2296
|
+
secondary: sa,
|
|
2297
|
+
secondaryHovered: na,
|
|
2298
|
+
tertiary: ia,
|
|
2299
|
+
tertiaryHovered: aa,
|
|
2300
|
+
content: oa
|
|
2301
|
+
}, jt = (u) => {
|
|
2302
|
+
const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Bt();
|
|
2273
2303
|
return /* @__PURE__ */ t.jsx(
|
|
2274
2304
|
"button",
|
|
2275
2305
|
{
|
|
2276
|
-
className:
|
|
2277
|
-
[
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2280
|
-
[
|
|
2281
|
-
[
|
|
2282
|
-
[
|
|
2306
|
+
className: F(et.button, i, {
|
|
2307
|
+
[et.primary]: l === "Primary",
|
|
2308
|
+
[et.secondary]: l === "Secondary",
|
|
2309
|
+
[et.tertiary]: l === "Tertiary",
|
|
2310
|
+
[et.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
|
|
2311
|
+
[et.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2312
|
+
[et.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2283
2313
|
}),
|
|
2284
2314
|
onClick: e,
|
|
2285
2315
|
style: {
|
|
2286
|
-
...
|
|
2316
|
+
...s
|
|
2287
2317
|
},
|
|
2288
|
-
disabled:
|
|
2289
|
-
children:
|
|
2318
|
+
disabled: c,
|
|
2319
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: et.content, children: [
|
|
2290
2320
|
/* @__PURE__ */ t.jsx(
|
|
2291
|
-
|
|
2321
|
+
b,
|
|
2292
2322
|
{
|
|
2293
2323
|
name: "ArrowRight",
|
|
2294
2324
|
fill: "#757575",
|
|
@@ -2296,69 +2326,69 @@ const zo = (u) => {
|
|
|
2296
2326
|
height: 20
|
|
2297
2327
|
}
|
|
2298
2328
|
),
|
|
2299
|
-
|
|
2300
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2329
|
+
a
|
|
2330
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2301
2331
|
}
|
|
2302
2332
|
);
|
|
2303
2333
|
};
|
|
2304
|
-
class
|
|
2334
|
+
class _t extends Error {
|
|
2305
2335
|
}
|
|
2306
|
-
|
|
2307
|
-
function
|
|
2308
|
-
return decodeURIComponent(atob(u).replace(/(.)/g, (
|
|
2309
|
-
let
|
|
2310
|
-
return
|
|
2336
|
+
_t.prototype.name = "InvalidTokenError";
|
|
2337
|
+
function ca(u) {
|
|
2338
|
+
return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
|
|
2339
|
+
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2340
|
+
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2311
2341
|
}));
|
|
2312
2342
|
}
|
|
2313
|
-
function
|
|
2314
|
-
let
|
|
2315
|
-
switch (
|
|
2343
|
+
function la(u) {
|
|
2344
|
+
let a = u.replace(/-/g, "+").replace(/_/g, "/");
|
|
2345
|
+
switch (a.length % 4) {
|
|
2316
2346
|
case 0:
|
|
2317
2347
|
break;
|
|
2318
2348
|
case 2:
|
|
2319
|
-
|
|
2349
|
+
a += "==";
|
|
2320
2350
|
break;
|
|
2321
2351
|
case 3:
|
|
2322
|
-
|
|
2352
|
+
a += "=";
|
|
2323
2353
|
break;
|
|
2324
2354
|
default:
|
|
2325
2355
|
throw new Error("base64 string is not of the correct length");
|
|
2326
2356
|
}
|
|
2327
2357
|
try {
|
|
2328
|
-
return
|
|
2358
|
+
return ca(a);
|
|
2329
2359
|
} catch {
|
|
2330
|
-
return atob(
|
|
2360
|
+
return atob(a);
|
|
2331
2361
|
}
|
|
2332
2362
|
}
|
|
2333
|
-
function
|
|
2363
|
+
function ra(u, a) {
|
|
2334
2364
|
if (typeof u != "string")
|
|
2335
|
-
throw new
|
|
2336
|
-
|
|
2337
|
-
const e =
|
|
2338
|
-
if (typeof
|
|
2339
|
-
throw new
|
|
2365
|
+
throw new _t("Invalid token specified: must be a string");
|
|
2366
|
+
a || (a = {});
|
|
2367
|
+
const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
|
|
2368
|
+
if (typeof s != "string")
|
|
2369
|
+
throw new _t(`Invalid token specified: missing part #${e + 1}`);
|
|
2340
2370
|
let i;
|
|
2341
2371
|
try {
|
|
2342
|
-
i =
|
|
2343
|
-
} catch (
|
|
2344
|
-
throw new
|
|
2372
|
+
i = la(s);
|
|
2373
|
+
} catch (c) {
|
|
2374
|
+
throw new _t(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2345
2375
|
}
|
|
2346
2376
|
try {
|
|
2347
2377
|
return JSON.parse(i);
|
|
2348
|
-
} catch (
|
|
2349
|
-
throw new
|
|
2378
|
+
} catch (c) {
|
|
2379
|
+
throw new _t(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2350
2380
|
}
|
|
2351
2381
|
}
|
|
2352
|
-
const
|
|
2353
|
-
const { shopping:
|
|
2354
|
-
function i(
|
|
2355
|
-
|
|
2382
|
+
const Ja = (u) => {
|
|
2383
|
+
const { shopping: a, signUp: e } = u, s = ft();
|
|
2384
|
+
function i(l) {
|
|
2385
|
+
s(l);
|
|
2356
2386
|
}
|
|
2357
|
-
const
|
|
2358
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2359
|
-
|
|
2360
|
-
!
|
|
2361
|
-
|
|
2387
|
+
const c = JSON.parse(localStorage.getItem("token") || "{}");
|
|
2388
|
+
return /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
|
|
2389
|
+
a && /* @__PURE__ */ t.jsx(da, {}),
|
|
2390
|
+
!c.data && /* @__PURE__ */ t.jsx(
|
|
2391
|
+
jt,
|
|
2362
2392
|
{
|
|
2363
2393
|
onClick: () => i("/customer-dash"),
|
|
2364
2394
|
type: "Secondary",
|
|
@@ -2368,8 +2398,8 @@ const Yo = (u) => {
|
|
|
2368
2398
|
children: "Login"
|
|
2369
2399
|
}
|
|
2370
2400
|
),
|
|
2371
|
-
!
|
|
2372
|
-
|
|
2401
|
+
!c.data && e && /* @__PURE__ */ t.jsx(
|
|
2402
|
+
jt,
|
|
2373
2403
|
{
|
|
2374
2404
|
onClick: () => i("/customer-dash"),
|
|
2375
2405
|
type: "Primary",
|
|
@@ -2379,100 +2409,100 @@ const Yo = (u) => {
|
|
|
2379
2409
|
children: "Sign Up"
|
|
2380
2410
|
}
|
|
2381
2411
|
),
|
|
2382
|
-
|
|
2412
|
+
c.data && /* @__PURE__ */ t.jsx(_a, { token: c.data })
|
|
2383
2413
|
] });
|
|
2384
|
-
},
|
|
2385
|
-
const [u,
|
|
2386
|
-
function
|
|
2387
|
-
for (let
|
|
2388
|
-
for (let
|
|
2389
|
-
if (i.parts[
|
|
2390
|
-
return i.parts[
|
|
2414
|
+
}, da = () => {
|
|
2415
|
+
const [u, a] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: c } = Nt();
|
|
2416
|
+
function l(_) {
|
|
2417
|
+
for (let d = 0; d < i.parts.length; d++)
|
|
2418
|
+
for (let P = 0; P < _.variants.length; P++)
|
|
2419
|
+
if (i.parts[d].productVariantId === _.variants[d].id)
|
|
2420
|
+
return i.parts[d].productVariantId;
|
|
2391
2421
|
}
|
|
2392
|
-
function
|
|
2393
|
-
for (let
|
|
2394
|
-
for (let
|
|
2395
|
-
if (i.parts[
|
|
2396
|
-
return i.parts[
|
|
2422
|
+
function o(_) {
|
|
2423
|
+
for (let d = 0; d < i.parts.length; d++)
|
|
2424
|
+
for (let P = 0; P < _.variants.length; P++)
|
|
2425
|
+
if (i.parts[d].productVariantId === _.variants[d].id)
|
|
2426
|
+
return i.parts[d].quantity;
|
|
2397
2427
|
}
|
|
2398
|
-
|
|
2428
|
+
g.useEffect(() => {
|
|
2399
2429
|
(async () => {
|
|
2400
|
-
const
|
|
2401
|
-
...
|
|
2402
|
-
activeVariantId:
|
|
2403
|
-
quantity:
|
|
2430
|
+
const d = i.parts.map((f) => String(f.productId)), x = (await c([...d])).map((f) => ({
|
|
2431
|
+
...f,
|
|
2432
|
+
activeVariantId: l(f),
|
|
2433
|
+
quantity: o(f)
|
|
2404
2434
|
}));
|
|
2405
|
-
|
|
2435
|
+
s(x);
|
|
2406
2436
|
})();
|
|
2407
|
-
}, [i]);
|
|
2408
|
-
function
|
|
2409
|
-
var
|
|
2410
|
-
return
|
|
2437
|
+
}, [i.parts.length]);
|
|
2438
|
+
function n(_) {
|
|
2439
|
+
var d;
|
|
2440
|
+
return !_ || !(_ != null && _.variants) ? !1 : (d = _.variants.find((P) => P.id === _.activeVariantId)) == null ? void 0 : d.subscriptionSettings;
|
|
2411
2441
|
}
|
|
2412
|
-
const
|
|
2413
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2442
|
+
const r = i.parts.length > 0 && e.length > 0 && !n(e[0]);
|
|
2443
|
+
return console.log(i.parts.length > 0, e.length > 0, !n(e[0])), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2414
2444
|
/* @__PURE__ */ t.jsxs(
|
|
2415
2445
|
"div",
|
|
2416
2446
|
{
|
|
2417
|
-
className:
|
|
2418
|
-
onClick: (
|
|
2419
|
-
|
|
2447
|
+
className: S.button,
|
|
2448
|
+
onClick: (_) => {
|
|
2449
|
+
_.stopPropagation(), a(!0);
|
|
2420
2450
|
},
|
|
2421
2451
|
children: [
|
|
2422
2452
|
/* @__PURE__ */ t.jsx(
|
|
2423
|
-
|
|
2453
|
+
b,
|
|
2424
2454
|
{
|
|
2425
2455
|
name: "Handbag",
|
|
2426
2456
|
fill: "var(--icon-primary)"
|
|
2427
2457
|
}
|
|
2428
2458
|
),
|
|
2429
|
-
|
|
2459
|
+
r && /* @__PURE__ */ t.jsx("div", { className: S.shoppingCount, children: i.parts.length })
|
|
2430
2460
|
]
|
|
2431
2461
|
}
|
|
2432
2462
|
),
|
|
2433
|
-
u && /* @__PURE__ */ t.jsx(
|
|
2434
|
-
|
|
2463
|
+
u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(
|
|
2464
|
+
ua,
|
|
2435
2465
|
{
|
|
2436
2466
|
activeProducts: e,
|
|
2437
|
-
isCartNotEmpty:
|
|
2467
|
+
isCartNotEmpty: r
|
|
2438
2468
|
}
|
|
2439
2469
|
) })
|
|
2440
2470
|
] });
|
|
2441
|
-
},
|
|
2442
|
-
const { activeProducts:
|
|
2443
|
-
function
|
|
2444
|
-
|
|
2471
|
+
}, ua = (u) => {
|
|
2472
|
+
const { activeProducts: a, isCartNotEmpty: e } = u, { cart: s, reset: i, getTotalAndDiscount: c, updateQuantityOfProduct: l } = Nt(), o = ft();
|
|
2473
|
+
function n(d) {
|
|
2474
|
+
o(d);
|
|
2445
2475
|
}
|
|
2446
|
-
function d
|
|
2447
|
-
|
|
2448
|
-
productId:
|
|
2449
|
-
productVariantId:
|
|
2450
|
-
quantity:
|
|
2476
|
+
function r(d) {
|
|
2477
|
+
l({
|
|
2478
|
+
productId: d.id,
|
|
2479
|
+
productVariantId: d.activeVariantId,
|
|
2480
|
+
quantity: d.quantity + 1
|
|
2451
2481
|
});
|
|
2452
2482
|
}
|
|
2453
|
-
function
|
|
2454
|
-
|
|
2455
|
-
productId:
|
|
2456
|
-
productVariantId:
|
|
2457
|
-
quantity:
|
|
2483
|
+
function _(d) {
|
|
2484
|
+
l({
|
|
2485
|
+
productId: d.id,
|
|
2486
|
+
productVariantId: d.activeVariantId,
|
|
2487
|
+
quantity: d.quantity - 1
|
|
2458
2488
|
});
|
|
2459
2489
|
}
|
|
2460
2490
|
return /* @__PURE__ */ t.jsxs(
|
|
2461
2491
|
"div",
|
|
2462
2492
|
{
|
|
2463
|
-
className:
|
|
2464
|
-
onClick: (
|
|
2493
|
+
className: S.modal,
|
|
2494
|
+
onClick: (d) => d.stopPropagation(),
|
|
2465
2495
|
children: [
|
|
2466
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2467
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2468
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2469
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2496
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
2497
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.info, children: [
|
|
2498
|
+
/* @__PURE__ */ t.jsx("span", { className: S.title, children: "Cart" }),
|
|
2499
|
+
e && /* @__PURE__ */ t.jsx("div", { className: S.count, children: s.parts.length })
|
|
2470
2500
|
] }),
|
|
2471
2501
|
/* @__PURE__ */ t.jsx(
|
|
2472
2502
|
"button",
|
|
2473
2503
|
{
|
|
2474
|
-
className:
|
|
2475
|
-
[
|
|
2504
|
+
className: F(S.clear, {
|
|
2505
|
+
[S.activeClear]: e
|
|
2476
2506
|
}),
|
|
2477
2507
|
disabled: !e,
|
|
2478
2508
|
onClick: () => i(),
|
|
@@ -2480,41 +2510,41 @@ const Yo = (u) => {
|
|
|
2480
2510
|
}
|
|
2481
2511
|
)
|
|
2482
2512
|
] }),
|
|
2483
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2484
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2513
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: S.cart, children: [
|
|
2514
|
+
/* @__PURE__ */ t.jsx("div", { className: S.products, children: a.map((d) => /* @__PURE__ */ t.jsxs(
|
|
2485
2515
|
"div",
|
|
2486
2516
|
{
|
|
2487
|
-
className:
|
|
2517
|
+
className: S.product,
|
|
2488
2518
|
children: [
|
|
2489
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2519
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productInfo, children: [
|
|
2490
2520
|
/* @__PURE__ */ t.jsx(
|
|
2491
2521
|
"img",
|
|
2492
2522
|
{
|
|
2493
|
-
src: `https://imagedelivery.net/${
|
|
2523
|
+
src: `https://imagedelivery.net/${d.images[0].cfId}/w=500`,
|
|
2494
2524
|
alt: "image",
|
|
2495
2525
|
width: "100%",
|
|
2496
2526
|
height: "100%",
|
|
2497
|
-
className:
|
|
2527
|
+
className: S.image
|
|
2498
2528
|
}
|
|
2499
2529
|
),
|
|
2500
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2501
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2502
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2530
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.content, children: [
|
|
2531
|
+
/* @__PURE__ */ t.jsx("div", { className: S.name, children: d.name }),
|
|
2532
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.price, children: [
|
|
2503
2533
|
"$",
|
|
2504
|
-
|
|
2534
|
+
d.variants.find((P) => P.id === d.activeVariantId).price.amount * ((d == null ? void 0 : d.quantity) || 1)
|
|
2505
2535
|
] })
|
|
2506
2536
|
] })
|
|
2507
2537
|
] }),
|
|
2508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2538
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productButtons, children: [
|
|
2509
2539
|
/* @__PURE__ */ t.jsx(
|
|
2510
2540
|
"div",
|
|
2511
2541
|
{
|
|
2512
2542
|
onClick: () => {
|
|
2513
|
-
|
|
2543
|
+
d.quantity !== 1 && _(d);
|
|
2514
2544
|
},
|
|
2515
|
-
className:
|
|
2545
|
+
className: S.productButton,
|
|
2516
2546
|
children: /* @__PURE__ */ t.jsx(
|
|
2517
|
-
|
|
2547
|
+
b,
|
|
2518
2548
|
{
|
|
2519
2549
|
name: "Minus",
|
|
2520
2550
|
fill: "#757575",
|
|
@@ -2524,14 +2554,14 @@ const Yo = (u) => {
|
|
|
2524
2554
|
)
|
|
2525
2555
|
}
|
|
2526
2556
|
),
|
|
2527
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2557
|
+
/* @__PURE__ */ t.jsx("div", { className: S.productCount, children: d.quantity }),
|
|
2528
2558
|
/* @__PURE__ */ t.jsx(
|
|
2529
2559
|
"div",
|
|
2530
2560
|
{
|
|
2531
|
-
onClick: () => d
|
|
2532
|
-
className:
|
|
2561
|
+
onClick: () => r(d),
|
|
2562
|
+
className: S.productButton,
|
|
2533
2563
|
children: /* @__PURE__ */ t.jsx(
|
|
2534
|
-
|
|
2564
|
+
b,
|
|
2535
2565
|
{
|
|
2536
2566
|
name: "Plus",
|
|
2537
2567
|
fill: "#757575",
|
|
@@ -2544,14 +2574,14 @@ const Yo = (u) => {
|
|
|
2544
2574
|
] })
|
|
2545
2575
|
]
|
|
2546
2576
|
},
|
|
2547
|
-
|
|
2577
|
+
d.id
|
|
2548
2578
|
)) }),
|
|
2549
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2550
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2551
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2579
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.bottom, children: [
|
|
2580
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.subtotal, children: [
|
|
2581
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.block, children: [
|
|
2552
2582
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2553
2583
|
/* @__PURE__ */ t.jsx(
|
|
2554
|
-
|
|
2584
|
+
b,
|
|
2555
2585
|
{
|
|
2556
2586
|
name: "Info",
|
|
2557
2587
|
width: 20,
|
|
@@ -2560,19 +2590,19 @@ const Yo = (u) => {
|
|
|
2560
2590
|
}
|
|
2561
2591
|
)
|
|
2562
2592
|
] }),
|
|
2563
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2593
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.total, children: [
|
|
2564
2594
|
"$",
|
|
2565
|
-
|
|
2595
|
+
c().total
|
|
2566
2596
|
] })
|
|
2567
2597
|
] }),
|
|
2568
|
-
/* @__PURE__ */ t.jsx(
|
|
2598
|
+
/* @__PURE__ */ t.jsx(jt, { onClick: () => n("/checkout"), children: "Checkout" })
|
|
2569
2599
|
] })
|
|
2570
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2600
|
+
] }) : /* @__PURE__ */ t.jsx(ma, {})
|
|
2571
2601
|
]
|
|
2572
2602
|
}
|
|
2573
2603
|
);
|
|
2574
|
-
},
|
|
2575
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2604
|
+
}, ma = () => /* @__PURE__ */ t.jsxs("div", { className: S.empty, children: [
|
|
2605
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(b, { name: "Handbag" }) }),
|
|
2576
2606
|
/* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
|
|
2577
2607
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2578
2608
|
"Check out the store's products and add them",
|
|
@@ -2581,56 +2611,56 @@ const Yo = (u) => {
|
|
|
2581
2611
|
"a",
|
|
2582
2612
|
{
|
|
2583
2613
|
href: "/products",
|
|
2584
|
-
className:
|
|
2614
|
+
className: S.link,
|
|
2585
2615
|
children: "here"
|
|
2586
2616
|
}
|
|
2587
2617
|
)
|
|
2588
2618
|
] })
|
|
2589
|
-
] }),
|
|
2590
|
-
const [
|
|
2591
|
-
|
|
2619
|
+
] }), _a = ({ token: u }) => {
|
|
2620
|
+
const [a, e] = g.useState("test-email@gmail.com"), s = ft();
|
|
2621
|
+
g.useEffect(() => {
|
|
2592
2622
|
(async () => {
|
|
2593
|
-
const
|
|
2594
|
-
e(
|
|
2623
|
+
const l = ra(u);
|
|
2624
|
+
e(l.email);
|
|
2595
2625
|
})();
|
|
2596
2626
|
}, [u]);
|
|
2597
|
-
function i(
|
|
2598
|
-
|
|
2627
|
+
function i(c) {
|
|
2628
|
+
s(c);
|
|
2599
2629
|
}
|
|
2600
2630
|
return /* @__PURE__ */ t.jsx(
|
|
2601
2631
|
"div",
|
|
2602
2632
|
{
|
|
2603
|
-
className:
|
|
2633
|
+
className: S.userInfo,
|
|
2604
2634
|
onClick: () => i("/customer-dash"),
|
|
2605
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2635
|
+
children: /* @__PURE__ */ t.jsx("div", { children: a || "test-email@gmail.com" })
|
|
2606
2636
|
}
|
|
2607
2637
|
);
|
|
2608
|
-
},
|
|
2609
|
-
share:
|
|
2610
|
-
modal:
|
|
2611
|
-
header:
|
|
2612
|
-
socials:
|
|
2613
|
-
social:
|
|
2614
|
-
copy:
|
|
2615
|
-
title:
|
|
2616
|
-
copyWrapper:
|
|
2617
|
-
copyText:
|
|
2618
|
-
},
|
|
2619
|
-
const { isOpenModal: u, setIsOpenModal:
|
|
2638
|
+
}, ha = "_share_11u0d_1", pa = "_modal_11u0d_8", ga = "_header_11u0d_14", fa = "_socials_11u0d_24", xa = "_social_11u0d_24", ba = "_copy_11u0d_34", va = "_title_11u0d_41", ja = "_copyWrapper_11u0d_47", ya = "_copyText_11u0d_56", nt = {
|
|
2639
|
+
share: ha,
|
|
2640
|
+
modal: pa,
|
|
2641
|
+
header: ga,
|
|
2642
|
+
socials: fa,
|
|
2643
|
+
social: xa,
|
|
2644
|
+
copy: ba,
|
|
2645
|
+
title: va,
|
|
2646
|
+
copyWrapper: ja,
|
|
2647
|
+
copyText: ya
|
|
2648
|
+
}, Qa = () => {
|
|
2649
|
+
const { isOpenModal: u, setIsOpenModal: a } = Pt();
|
|
2620
2650
|
function e() {
|
|
2621
|
-
|
|
2651
|
+
a(!0);
|
|
2622
2652
|
}
|
|
2623
2653
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2624
2654
|
/* @__PURE__ */ t.jsx(
|
|
2625
|
-
|
|
2655
|
+
it,
|
|
2626
2656
|
{
|
|
2627
|
-
className:
|
|
2628
|
-
onClick: (
|
|
2629
|
-
|
|
2657
|
+
className: nt.share,
|
|
2658
|
+
onClick: (s) => {
|
|
2659
|
+
s.stopPropagation(), e();
|
|
2630
2660
|
},
|
|
2631
2661
|
type: "Secondary",
|
|
2632
2662
|
children: /* @__PURE__ */ t.jsx(
|
|
2633
|
-
|
|
2663
|
+
b,
|
|
2634
2664
|
{
|
|
2635
2665
|
name: "Share",
|
|
2636
2666
|
fill: "#757575",
|
|
@@ -2639,19 +2669,12 @@ const Yo = (u) => {
|
|
|
2639
2669
|
)
|
|
2640
2670
|
}
|
|
2641
2671
|
),
|
|
2642
|
-
u && /* @__PURE__ */ t.jsx(
|
|
2672
|
+
u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(ka, {}) })
|
|
2643
2673
|
] });
|
|
2644
|
-
},
|
|
2645
|
-
|
|
2646
|
-
"x.com": "TwitterLogo",
|
|
2647
|
-
telegram: "TelegramLogo",
|
|
2648
|
-
instagram: "InstagramLogo",
|
|
2649
|
-
discord: "MessengerLogo",
|
|
2650
|
-
tiktok: "TiktokLogo"
|
|
2651
|
-
}, bo = () => {
|
|
2652
|
-
const { setIsOpenModal: u } = Pt(), { notification: o, setNotification: e } = Dt(), n = window.location.href;
|
|
2674
|
+
}, ka = () => {
|
|
2675
|
+
const { setIsOpenModal: u } = Pt(), { notification: a, setNotification: e } = Dt(), s = window.location.href;
|
|
2653
2676
|
function i() {
|
|
2654
|
-
navigator.clipboard.writeText(
|
|
2677
|
+
navigator.clipboard.writeText(s), e({
|
|
2655
2678
|
message: "Link copied to clipboard",
|
|
2656
2679
|
status: "success"
|
|
2657
2680
|
});
|
|
@@ -2659,13 +2682,13 @@ const Yo = (u) => {
|
|
|
2659
2682
|
return /* @__PURE__ */ t.jsxs(
|
|
2660
2683
|
"div",
|
|
2661
2684
|
{
|
|
2662
|
-
className:
|
|
2663
|
-
onClick: (
|
|
2685
|
+
className: nt.modal,
|
|
2686
|
+
onClick: (c) => c.stopPropagation(),
|
|
2664
2687
|
children: [
|
|
2665
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2666
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2688
|
+
/* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
|
|
2689
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.title, children: "Share this Post" }),
|
|
2667
2690
|
/* @__PURE__ */ t.jsx(
|
|
2668
|
-
|
|
2691
|
+
b,
|
|
2669
2692
|
{
|
|
2670
2693
|
name: "X",
|
|
2671
2694
|
fill: "#757575",
|
|
@@ -2674,93 +2697,92 @@ const Yo = (u) => {
|
|
|
2674
2697
|
}
|
|
2675
2698
|
)
|
|
2676
2699
|
] }),
|
|
2677
|
-
/* @__PURE__ */ t.
|
|
2678
|
-
/* @__PURE__ */ t.jsxs("div", { className: Q.copyWrapper, children: [
|
|
2700
|
+
/* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
|
|
2679
2701
|
/* @__PURE__ */ t.jsx(
|
|
2680
2702
|
"div",
|
|
2681
2703
|
{
|
|
2682
|
-
className:
|
|
2704
|
+
className: F(nt.copy, nt.copyText),
|
|
2683
2705
|
onClick: i,
|
|
2684
|
-
children:
|
|
2706
|
+
children: s
|
|
2685
2707
|
}
|
|
2686
2708
|
),
|
|
2687
2709
|
/* @__PURE__ */ t.jsx(
|
|
2688
2710
|
"div",
|
|
2689
2711
|
{
|
|
2690
2712
|
onClick: i,
|
|
2691
|
-
className:
|
|
2692
|
-
children:
|
|
2713
|
+
className: nt.copy,
|
|
2714
|
+
children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2693
2715
|
}
|
|
2694
2716
|
)
|
|
2695
2717
|
] })
|
|
2696
2718
|
]
|
|
2697
2719
|
}
|
|
2698
2720
|
);
|
|
2699
|
-
},
|
|
2700
|
-
accordion:
|
|
2701
|
-
header:
|
|
2702
|
-
icon:
|
|
2703
|
-
open:
|
|
2704
|
-
content:
|
|
2705
|
-
},
|
|
2706
|
-
const [e,
|
|
2707
|
-
|
|
2721
|
+
}, $a = "_accordion_1s1lq_1", wa = "_header_1s1lq_9", Na = "_icon_1s1lq_18", Ia = "_open_1s1lq_21", Ca = "_content_1s1lq_25", mt = {
|
|
2722
|
+
accordion: $a,
|
|
2723
|
+
header: wa,
|
|
2724
|
+
icon: Na,
|
|
2725
|
+
open: Ia,
|
|
2726
|
+
content: Ca
|
|
2727
|
+
}, Ka = ({ title: u, content: a }) => {
|
|
2728
|
+
const [e, s] = g.useState(!1), [i, c] = g.useState(0), l = g.useRef(null), o = () => {
|
|
2729
|
+
s(!e);
|
|
2708
2730
|
};
|
|
2709
|
-
return
|
|
2710
|
-
|
|
2711
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2731
|
+
return g.useEffect(() => {
|
|
2732
|
+
l.current && c(e ? l.current.scrollHeight : 0);
|
|
2733
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: mt.accordion, children: [
|
|
2712
2734
|
/* @__PURE__ */ t.jsxs(
|
|
2713
2735
|
"div",
|
|
2714
2736
|
{
|
|
2715
|
-
className:
|
|
2716
|
-
onClick:
|
|
2737
|
+
className: mt.header,
|
|
2738
|
+
onClick: o,
|
|
2717
2739
|
children: [
|
|
2718
2740
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
2719
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2741
|
+
/* @__PURE__ */ t.jsx("div", { className: F(mt.icon, { [mt.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2720
2742
|
]
|
|
2721
2743
|
}
|
|
2722
2744
|
),
|
|
2723
2745
|
/* @__PURE__ */ t.jsx(
|
|
2724
2746
|
"div",
|
|
2725
2747
|
{
|
|
2726
|
-
ref:
|
|
2727
|
-
className:
|
|
2748
|
+
ref: l,
|
|
2749
|
+
className: mt.content,
|
|
2728
2750
|
style: { height: `${i}px` },
|
|
2729
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2751
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
2730
2752
|
}
|
|
2731
2753
|
)
|
|
2732
2754
|
] });
|
|
2733
|
-
},
|
|
2734
|
-
wrapper:
|
|
2735
|
-
label:
|
|
2736
|
-
input:
|
|
2737
|
-
required:
|
|
2738
|
-
paddingless:
|
|
2739
|
-
content:
|
|
2740
|
-
borderless:
|
|
2741
|
-
rightIcon:
|
|
2742
|
-
},
|
|
2755
|
+
}, Ba = "_wrapper_1r14x_1", Sa = "_label_1r14x_9", Pa = "_input_1r14x_18", Ta = "_required_1r14x_35", qa = "_paddingless_1r14x_39", Aa = "_content_1r14x_43", Oa = "_borderless_1r14x_58", Da = "_rightIcon_1r14x_63", st = {
|
|
2756
|
+
wrapper: Ba,
|
|
2757
|
+
label: Sa,
|
|
2758
|
+
input: Pa,
|
|
2759
|
+
required: Ta,
|
|
2760
|
+
paddingless: qa,
|
|
2761
|
+
content: Aa,
|
|
2762
|
+
borderless: Oa,
|
|
2763
|
+
rightIcon: Da
|
|
2764
|
+
}, Za = (u) => {
|
|
2743
2765
|
const {
|
|
2744
|
-
onChange:
|
|
2766
|
+
onChange: a,
|
|
2745
2767
|
style: e,
|
|
2746
|
-
label:
|
|
2768
|
+
label: s,
|
|
2747
2769
|
value: i,
|
|
2748
|
-
type:
|
|
2749
|
-
min:
|
|
2750
|
-
max:
|
|
2751
|
-
placeholder:
|
|
2752
|
-
disabled:
|
|
2753
|
-
required:
|
|
2754
|
-
regex:
|
|
2755
|
-
paddingless:
|
|
2770
|
+
type: c,
|
|
2771
|
+
min: l,
|
|
2772
|
+
max: o,
|
|
2773
|
+
placeholder: n,
|
|
2774
|
+
disabled: r = !1,
|
|
2775
|
+
required: _ = !1,
|
|
2776
|
+
regex: d,
|
|
2777
|
+
paddingless: P = !1,
|
|
2756
2778
|
borderless: x = !1,
|
|
2757
|
-
editable:
|
|
2758
|
-
isSearch:
|
|
2759
|
-
} = u, { themeSettings:
|
|
2760
|
-
function
|
|
2761
|
-
if (
|
|
2762
|
-
let
|
|
2763
|
-
return
|
|
2779
|
+
editable: f = !1,
|
|
2780
|
+
isSearch: h = !1
|
|
2781
|
+
} = u, { themeSettings: q } = Bt(), { inputs: A } = q, [v, E] = g.useState(!1);
|
|
2782
|
+
function I(m, O) {
|
|
2783
|
+
if (m.startsWith("#")) {
|
|
2784
|
+
let L, w, R;
|
|
2785
|
+
return m.length === 7 ? (L = parseInt(m.slice(1, 3), 16), w = parseInt(m.slice(3, 5), 16), R = parseInt(m.slice(5, 7), 16)) : m.length === 4 && (L = parseInt(m[1] + m[1], 16), w = parseInt(m[2] + m[2], 16), R = parseInt(m[3] + m[3], 16)), `rgba(${L}, ${w}, ${R}, ${O})`;
|
|
2764
2786
|
}
|
|
2765
2787
|
const y = {
|
|
2766
2788
|
black: "#000000",
|
|
@@ -2769,71 +2791,71 @@ const Yo = (u) => {
|
|
|
2769
2791
|
green: "#00ff00",
|
|
2770
2792
|
blue: "#0000ff"
|
|
2771
2793
|
// Можно добавить больше цветов
|
|
2772
|
-
}[
|
|
2773
|
-
return y ?
|
|
2794
|
+
}[m.toLowerCase()];
|
|
2795
|
+
return y ? I(y, O) : m;
|
|
2774
2796
|
}
|
|
2775
|
-
function
|
|
2776
|
-
return Number(
|
|
2797
|
+
function C(m) {
|
|
2798
|
+
return Number(m) < 0 ? String(l) : m;
|
|
2777
2799
|
}
|
|
2778
|
-
function
|
|
2779
|
-
return
|
|
2800
|
+
function M(m) {
|
|
2801
|
+
return !_ || !d ? !0 : new RegExp(d).test(m);
|
|
2780
2802
|
}
|
|
2781
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2782
|
-
|
|
2803
|
+
return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
|
|
2804
|
+
s && /* @__PURE__ */ t.jsx(
|
|
2783
2805
|
"label",
|
|
2784
2806
|
{
|
|
2785
|
-
className:
|
|
2786
|
-
htmlFor:
|
|
2787
|
-
children:
|
|
2807
|
+
className: st.label,
|
|
2808
|
+
htmlFor: s,
|
|
2809
|
+
children: s
|
|
2788
2810
|
}
|
|
2789
2811
|
),
|
|
2790
2812
|
/* @__PURE__ */ t.jsxs(
|
|
2791
2813
|
"div",
|
|
2792
2814
|
{
|
|
2793
|
-
className:
|
|
2815
|
+
className: st.content,
|
|
2794
2816
|
style: {
|
|
2795
|
-
paddingRight:
|
|
2817
|
+
paddingRight: A.general.height + 15,
|
|
2796
2818
|
...e,
|
|
2797
|
-
backgroundColor:
|
|
2819
|
+
backgroundColor: I(A.field.color, A.field.opacity / 100)
|
|
2798
2820
|
},
|
|
2799
2821
|
children: [
|
|
2800
2822
|
/* @__PURE__ */ t.jsx(
|
|
2801
2823
|
"input",
|
|
2802
2824
|
{
|
|
2803
|
-
id:
|
|
2804
|
-
type:
|
|
2805
|
-
onChange: (
|
|
2806
|
-
if (
|
|
2825
|
+
id: s,
|
|
2826
|
+
type: c || "text",
|
|
2827
|
+
onChange: (m) => {
|
|
2828
|
+
if (c === "text") a(m.target.value);
|
|
2807
2829
|
else {
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2830
|
+
const O = C(m.target.value);
|
|
2831
|
+
a(O);
|
|
2810
2832
|
}
|
|
2811
2833
|
},
|
|
2812
2834
|
value: i,
|
|
2813
2835
|
autoComplete: "off",
|
|
2814
|
-
placeholder:
|
|
2815
|
-
className:
|
|
2816
|
-
[
|
|
2817
|
-
[
|
|
2818
|
-
[
|
|
2836
|
+
placeholder: n || "Type something...",
|
|
2837
|
+
className: F(st.input, {
|
|
2838
|
+
[st.required]: v && _ && !M(i),
|
|
2839
|
+
[st.paddingless]: P,
|
|
2840
|
+
[st.borderless]: x
|
|
2819
2841
|
}),
|
|
2820
|
-
min:
|
|
2821
|
-
max:
|
|
2822
|
-
disabled:
|
|
2823
|
-
onFocus: () =>
|
|
2842
|
+
min: c === "number" ? l : void 0,
|
|
2843
|
+
max: c === "number" ? o : void 0,
|
|
2844
|
+
disabled: r,
|
|
2845
|
+
onFocus: () => E(!0)
|
|
2824
2846
|
}
|
|
2825
2847
|
),
|
|
2826
|
-
|
|
2827
|
-
|
|
2848
|
+
h && /* @__PURE__ */ t.jsx("div", { className: st.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2849
|
+
b,
|
|
2828
2850
|
{
|
|
2829
2851
|
name: "MagnifyingGlass",
|
|
2830
2852
|
fill: "var(--icon-secondary)",
|
|
2831
|
-
width:
|
|
2832
|
-
height:
|
|
2853
|
+
width: A.general.height,
|
|
2854
|
+
height: A.general.height
|
|
2833
2855
|
}
|
|
2834
2856
|
) }),
|
|
2835
|
-
|
|
2836
|
-
|
|
2857
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2858
|
+
b,
|
|
2837
2859
|
{
|
|
2838
2860
|
name: "Sliders",
|
|
2839
2861
|
width: 20,
|
|
@@ -2845,18 +2867,18 @@ const Yo = (u) => {
|
|
|
2845
2867
|
}
|
|
2846
2868
|
)
|
|
2847
2869
|
] });
|
|
2848
|
-
},
|
|
2849
|
-
wrapper:
|
|
2850
|
-
label:
|
|
2851
|
-
textarea:
|
|
2852
|
-
length:
|
|
2853
|
-
},
|
|
2854
|
-
const { onChange:
|
|
2855
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2870
|
+
}, Ea = "_wrapper_st58d_1", La = "_label_st58d_10", Ra = "_textarea_st58d_18", Ma = "_length_st58d_33", gt = {
|
|
2871
|
+
wrapper: Ea,
|
|
2872
|
+
label: La,
|
|
2873
|
+
textarea: Ra,
|
|
2874
|
+
length: Ma
|
|
2875
|
+
}, to = (u) => {
|
|
2876
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = g.useState(s.length);
|
|
2877
|
+
return /* @__PURE__ */ t.jsxs("div", { className: gt.wrapper, children: [
|
|
2856
2878
|
e && /* @__PURE__ */ t.jsx(
|
|
2857
2879
|
"label",
|
|
2858
2880
|
{
|
|
2859
|
-
className:
|
|
2881
|
+
className: gt.label,
|
|
2860
2882
|
htmlFor: e,
|
|
2861
2883
|
children: e
|
|
2862
2884
|
}
|
|
@@ -2865,51 +2887,51 @@ const Yo = (u) => {
|
|
|
2865
2887
|
"textarea",
|
|
2866
2888
|
{
|
|
2867
2889
|
id: e,
|
|
2868
|
-
defaultValue:
|
|
2869
|
-
onChange: (
|
|
2870
|
-
|
|
2890
|
+
defaultValue: s,
|
|
2891
|
+
onChange: (n) => {
|
|
2892
|
+
o(n.target.value.length), a(n.target.value);
|
|
2871
2893
|
},
|
|
2872
|
-
placeholder:
|
|
2873
|
-
className:
|
|
2894
|
+
placeholder: c,
|
|
2895
|
+
className: gt.textarea,
|
|
2874
2896
|
maxLength: i
|
|
2875
2897
|
}
|
|
2876
2898
|
),
|
|
2877
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2878
|
-
|
|
2899
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: gt.length, children: [
|
|
2900
|
+
l,
|
|
2879
2901
|
"/",
|
|
2880
2902
|
i
|
|
2881
2903
|
] })
|
|
2882
2904
|
] });
|
|
2883
2905
|
};
|
|
2884
2906
|
export {
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2907
|
+
Ka as Accordion,
|
|
2908
|
+
jt as Button,
|
|
2909
|
+
gn as ButtonTypeSettings,
|
|
2910
|
+
Ga as ButtonsSettings,
|
|
2911
|
+
Ua as CategorySettings,
|
|
2890
2912
|
ht as ChooseImage,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2913
|
+
no as ChooseImageModal,
|
|
2914
|
+
ma as EmptyCart,
|
|
2915
|
+
Ya as FormSettings,
|
|
2916
|
+
Ja as HeaderButtons,
|
|
2917
|
+
b as Icon,
|
|
2896
2918
|
W as InputSettings,
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2919
|
+
Za as InputUI,
|
|
2920
|
+
qe as ItemsSettings,
|
|
2921
|
+
Fa as LayoutSettings,
|
|
2922
|
+
Wa as ListingSelector,
|
|
2923
|
+
io as Loader,
|
|
2924
|
+
St as Modal,
|
|
2925
|
+
Xa as ProductOptions,
|
|
2926
|
+
It as RangeSelector,
|
|
2927
|
+
Z as Select,
|
|
2928
|
+
Qa as ShareLink,
|
|
2929
|
+
da as ShoppingButton,
|
|
2930
|
+
ua as ShoppingModalCart,
|
|
2909
2931
|
K as Switch,
|
|
2910
|
-
|
|
2932
|
+
qt as TextSettings,
|
|
2911
2933
|
Ct as TextareaSettings,
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2934
|
+
to as TextareaUI,
|
|
2935
|
+
Tt as TypesText,
|
|
2936
|
+
_a as UserInfo
|
|
2915
2937
|
};
|