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