@billgangcom/theme-lib 1.38.0 → 1.39.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.cjs.js +2 -2
- package/dist/builder.es.js +2 -2
- package/dist/{index-BFKWIiO6.cjs → index-q8zCWetF.cjs} +1 -1
- package/dist/{index-BRelv8dA.js → index-rUpOzmAy.js} +4 -4
- package/dist/ui/HeaderButtons/index.d.ts +15 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1096 -994
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as v, c as F, a as
|
|
2
|
-
import { q as
|
|
1
|
+
import { j as t, I as v, c as F, a as X, S as tt, T as Ot, C as gt, b as nt, u as It, d as kt, D as $t, e as Nt, v as wt, B as Z, f as _t, P as Ct, g as Bt, h as St, i as Ft, k as Tt, l as Pt, m as qt, M as At, n as Et, o as Dt, p as Vt } from "./index-rUpOzmAy.js";
|
|
2
|
+
import { q as Ta, L as Pa } from "./index-rUpOzmAy.js";
|
|
3
3
|
import p from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
5
|
+
const Ut = "_wrapper_1ibay_2", Yt = "_alignmentBlock_1ibay_8", Gt = "_title_1ibay_15", Xt = "_subtitle_1ibay_22", Wt = "_alignmentContent_1ibay_29", Jt = "_alignments_1ibay_37", Qt = "_alignment_1ibay_8", Kt = "_circle_1ibay_60", Zt = "_paddings_1ibay_67", te = "_padding_1ibay_67", ee = "_active_1ibay_91", se = "_input_1ibay_98", J = {
|
|
6
|
+
wrapper: Ut,
|
|
7
|
+
alignmentBlock: Yt,
|
|
8
|
+
title: Gt,
|
|
9
|
+
subtitle: Xt,
|
|
10
10
|
alignmentContent: Wt,
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
11
|
+
alignments: Jt,
|
|
12
|
+
alignment: Qt,
|
|
13
|
+
circle: Kt,
|
|
14
|
+
paddings: Zt,
|
|
15
|
+
padding: te,
|
|
16
|
+
active: ee,
|
|
17
|
+
input: se
|
|
18
|
+
}, ne = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment:
|
|
30
|
-
function
|
|
31
|
-
switch (
|
|
28
|
+
], ie = ["left", "top", "right", "bottom"], ga = (r) => {
|
|
29
|
+
const { alignment: o, padding: e, setPadding: s, setAlignment: i } = r;
|
|
30
|
+
function a(g) {
|
|
31
|
+
switch (g) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function l(
|
|
49
|
-
switch (
|
|
48
|
+
function l(g) {
|
|
49
|
+
switch (g) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -63,34 +63,34 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children:
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: ne.map((g) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(g);
|
|
71
71
|
},
|
|
72
72
|
className: J.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
n(
|
|
74
|
+
n(g);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
g !== o && d !== g && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
g !== o && d === g && /* @__PURE__ */ t.jsx(
|
|
82
82
|
v,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: a(d),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
g === o && /* @__PURE__ */ t.jsx(
|
|
91
91
|
v,
|
|
92
92
|
{
|
|
93
|
-
name: o
|
|
93
|
+
name: a(o),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,16 +98,16 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
g
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: ie.map((g) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
106
|
className: F(J.padding, {
|
|
107
|
-
[J.active]: c ===
|
|
107
|
+
[J.active]: c === g
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
b(
|
|
110
|
+
b(g);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
113
|
b(null);
|
|
@@ -116,19 +116,19 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
117
|
v,
|
|
118
118
|
{
|
|
119
|
-
name: l(
|
|
119
|
+
name: l(g),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
X,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
128
|
+
value: String(e[g]),
|
|
129
129
|
onChange: (h) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[g]: Number(h)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,24 +136,24 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
g
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
144
|
+
}, oe = "_title_1jkiw_1", ae = "_subtitle_1jkiw_5", ce = "_header_1jkiw_12", le = "_text_1jkiw_13", re = "_top_1jkiw_20", de = "_itemsBlock_1jkiw_29", ht = {
|
|
145
|
+
title: oe,
|
|
146
|
+
subtitle: ae,
|
|
147
|
+
header: ce,
|
|
148
|
+
text: le,
|
|
149
|
+
top: re,
|
|
150
|
+
itemsBlock: de
|
|
151
|
+
}, ue = "_typeTexts_167ez_1", _e = "_block_167ez_8", me = "_active_167ez_25", jt = {
|
|
152
|
+
typeTexts: ue,
|
|
153
|
+
block: _e,
|
|
154
154
|
active: me
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
155
|
+
}, he = ["bold", "italic", "underline", "strike-through", "code"], Lt = (r) => {
|
|
156
|
+
const { typesText: o, setTypesText: e } = r;
|
|
157
157
|
function s(i) {
|
|
158
158
|
switch (i) {
|
|
159
159
|
case "bold":
|
|
@@ -168,25 +168,25 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className: jt.typeTexts, children:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: jt.typeTexts, children: he.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
174
|
className: F(jt.block, {
|
|
175
|
-
[jt.active]:
|
|
175
|
+
[jt.active]: o.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const l =
|
|
178
|
+
const a = [...o];
|
|
179
|
+
if (a.includes(i)) {
|
|
180
|
+
const l = a.filter((d) => d !== i);
|
|
181
181
|
e(l);
|
|
182
182
|
} else
|
|
183
|
-
|
|
183
|
+
a.push(i), e(a);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
186
|
v,
|
|
187
187
|
{
|
|
188
188
|
name: s(i),
|
|
189
|
-
fill:
|
|
189
|
+
fill: o.includes(i) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
@@ -196,32 +196,32 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
196
196
|
)) });
|
|
197
197
|
}, Rt = (r) => {
|
|
198
198
|
const {
|
|
199
|
-
typesText:
|
|
199
|
+
typesText: o,
|
|
200
200
|
isActiveText: e,
|
|
201
201
|
setIsActiveText: s,
|
|
202
202
|
text: i,
|
|
203
|
-
setText:
|
|
203
|
+
setText: a,
|
|
204
204
|
setTypesText: l,
|
|
205
205
|
title: d,
|
|
206
206
|
subtitle: n = "Items"
|
|
207
207
|
} = r;
|
|
208
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
209
|
-
(d || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
210
|
-
d && /* @__PURE__ */ t.jsx("h3", { className:
|
|
208
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
209
|
+
(d || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
210
|
+
d && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: d }),
|
|
211
211
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
212
|
-
|
|
212
|
+
tt,
|
|
213
213
|
{
|
|
214
214
|
current: e,
|
|
215
215
|
onChange: (c) => s(c)
|
|
216
216
|
}
|
|
217
217
|
)
|
|
218
218
|
] }),
|
|
219
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
220
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
219
|
+
/* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
|
|
220
|
+
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
|
|
221
221
|
/* @__PURE__ */ t.jsx(
|
|
222
222
|
Ot,
|
|
223
223
|
{
|
|
224
|
-
onChange: (c) =>
|
|
224
|
+
onChange: (c) => a(c),
|
|
225
225
|
value: i,
|
|
226
226
|
maxLength: 150
|
|
227
227
|
}
|
|
@@ -229,48 +229,48 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
229
229
|
/* @__PURE__ */ t.jsx(
|
|
230
230
|
Lt,
|
|
231
231
|
{
|
|
232
|
-
typesText:
|
|
232
|
+
typesText: o,
|
|
233
233
|
setTypesText: l
|
|
234
234
|
}
|
|
235
235
|
)
|
|
236
236
|
] })
|
|
237
237
|
] });
|
|
238
|
-
},
|
|
239
|
-
title:
|
|
240
|
-
subtitle:
|
|
238
|
+
}, pe = "_title_xma5o_1", xe = "_subtitle_xma5o_5", ge = "_header_xma5o_12", fe = "_text_xma5o_13", be = "_productsBlock_xma5o_14", ve = "_top_xma5o_26", je = "_itemsBlock_xma5o_35", ye = "_typeTexts_xma5o_41", Ie = "_block_xma5o_48", ke = "_active_xma5o_61", $e = "_products_xma5o_14", Ne = "_product_xma5o_14", we = "_button_xma5o_80", Ce = "_disabled_xma5o_91", Be = "_image_xma5o_95", Se = "_info_xma5o_102", Te = "_name_xma5o_114", Pe = "_buttons_xma5o_118", Ae = "_modal_xma5o_125", Me = "_link_xma5o_145", Oe = "_modalOptions_xma5o_151", qe = "_addButton_xma5o_165", Ee = "_deleteButton_xma5o_180", De = "_closeIcon_xma5o_192", R = {
|
|
239
|
+
title: pe,
|
|
240
|
+
subtitle: xe,
|
|
241
241
|
header: ge,
|
|
242
|
-
text:
|
|
243
|
-
productsBlock:
|
|
244
|
-
top:
|
|
245
|
-
itemsBlock:
|
|
246
|
-
typeTexts:
|
|
247
|
-
block:
|
|
242
|
+
text: fe,
|
|
243
|
+
productsBlock: be,
|
|
244
|
+
top: ve,
|
|
245
|
+
itemsBlock: je,
|
|
246
|
+
typeTexts: ye,
|
|
247
|
+
block: Ie,
|
|
248
248
|
active: ke,
|
|
249
|
-
products:
|
|
250
|
-
product:
|
|
251
|
-
button:
|
|
252
|
-
disabled:
|
|
253
|
-
image:
|
|
254
|
-
info:
|
|
255
|
-
name:
|
|
256
|
-
buttons:
|
|
257
|
-
modal:
|
|
258
|
-
link:
|
|
249
|
+
products: $e,
|
|
250
|
+
product: Ne,
|
|
251
|
+
button: we,
|
|
252
|
+
disabled: Ce,
|
|
253
|
+
image: Be,
|
|
254
|
+
info: Se,
|
|
255
|
+
name: Te,
|
|
256
|
+
buttons: Pe,
|
|
257
|
+
modal: Ae,
|
|
258
|
+
link: Me,
|
|
259
259
|
modalOptions: Oe,
|
|
260
260
|
addButton: qe,
|
|
261
261
|
deleteButton: Ee,
|
|
262
262
|
closeIcon: De
|
|
263
263
|
}, Le = p.forwardRef(
|
|
264
|
-
(r,
|
|
265
|
-
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions:
|
|
264
|
+
(r, o) => {
|
|
265
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
266
266
|
function d(n, c) {
|
|
267
267
|
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
268
268
|
}
|
|
269
269
|
return /* @__PURE__ */ t.jsxs(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
|
-
ref:
|
|
273
|
-
className:
|
|
272
|
+
ref: o,
|
|
273
|
+
className: R.modal,
|
|
274
274
|
onClick: (n) => {
|
|
275
275
|
n.stopPropagation();
|
|
276
276
|
},
|
|
@@ -279,9 +279,9 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
279
279
|
left: `${i.left}px`
|
|
280
280
|
},
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
283
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
284
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
282
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
|
|
283
|
+
/* @__PURE__ */ t.jsx("h3", { className: R.title, children: d(e.name, 20) }),
|
|
284
|
+
/* @__PURE__ */ t.jsx("div", { className: R.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
285
285
|
v,
|
|
286
286
|
{
|
|
287
287
|
name: "X",
|
|
@@ -293,7 +293,7 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
293
293
|
}
|
|
294
294
|
) })
|
|
295
295
|
] }),
|
|
296
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
296
|
+
/* @__PURE__ */ t.jsx("div", { className: R.modalOptions, children: a.map((n) => {
|
|
297
297
|
if (n.type === "image")
|
|
298
298
|
return /* @__PURE__ */ t.jsx(
|
|
299
299
|
gt,
|
|
@@ -335,7 +335,7 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
335
335
|
);
|
|
336
336
|
if (n.type === "input")
|
|
337
337
|
return /* @__PURE__ */ t.jsx(
|
|
338
|
-
|
|
338
|
+
X,
|
|
339
339
|
{
|
|
340
340
|
onChange: (c) => {
|
|
341
341
|
const b = {
|
|
@@ -350,9 +350,9 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
350
350
|
}
|
|
351
351
|
);
|
|
352
352
|
if (n.type === "inputSwitch")
|
|
353
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
353
|
+
return /* @__PURE__ */ t.jsxs("div", { className: R.link, children: [
|
|
354
354
|
/* @__PURE__ */ t.jsx(
|
|
355
|
-
|
|
355
|
+
X,
|
|
356
356
|
{
|
|
357
357
|
onChange: (c) => {
|
|
358
358
|
const b = {
|
|
@@ -367,7 +367,7 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
367
367
|
}
|
|
368
368
|
),
|
|
369
369
|
/* @__PURE__ */ t.jsx(
|
|
370
|
-
|
|
370
|
+
tt,
|
|
371
371
|
{
|
|
372
372
|
current: !!e[n.field.switch] || !1,
|
|
373
373
|
label: n.switchLabel,
|
|
@@ -383,7 +383,7 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
383
383
|
] });
|
|
384
384
|
if (n.type === "list")
|
|
385
385
|
return /* @__PURE__ */ t.jsx(
|
|
386
|
-
|
|
386
|
+
Ve,
|
|
387
387
|
{
|
|
388
388
|
items: e[n.field] || [],
|
|
389
389
|
setItems: (c) => {
|
|
@@ -404,7 +404,7 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
404
404
|
);
|
|
405
405
|
if (n.type === "select")
|
|
406
406
|
return /* @__PURE__ */ t.jsx(
|
|
407
|
-
|
|
407
|
+
nt,
|
|
408
408
|
{
|
|
409
409
|
options: n.itemsOptions,
|
|
410
410
|
onChange: (c) => {
|
|
@@ -424,19 +424,19 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
424
424
|
}
|
|
425
425
|
);
|
|
426
426
|
}
|
|
427
|
-
), Re = "_other_g74jx_1",
|
|
427
|
+
), Re = "_other_g74jx_1", He = "_subtitle_g74jx_7", ze = "_items_g74jx_14", yt = {
|
|
428
428
|
other: Re,
|
|
429
|
-
subtitle:
|
|
430
|
-
items:
|
|
429
|
+
subtitle: He,
|
|
430
|
+
items: ze
|
|
431
431
|
}, vt = (r) => {
|
|
432
|
-
const { items:
|
|
432
|
+
const { items: o, title: e = "Other" } = r;
|
|
433
433
|
return /* @__PURE__ */ t.jsxs("div", { className: yt.other, children: [
|
|
434
434
|
/* @__PURE__ */ t.jsx("h5", { className: yt.subtitle, children: e }),
|
|
435
|
-
/* @__PURE__ */ t.jsx("div", { className: yt.items, children:
|
|
436
|
-
|
|
435
|
+
/* @__PURE__ */ t.jsx("div", { className: yt.items, children: o.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
436
|
+
tt,
|
|
437
437
|
{
|
|
438
438
|
current: s.isItem,
|
|
439
|
-
onChange: (
|
|
439
|
+
onChange: (a) => s.setIsItem(a),
|
|
440
440
|
label: s.label,
|
|
441
441
|
hasBackground: !0,
|
|
442
442
|
paddingless: !1
|
|
@@ -445,18 +445,18 @@ const Vt = "_wrapper_1ibay_2", Ut = "_alignmentBlock_1ibay_8", Yt = "_title_1iba
|
|
|
445
445
|
)) })
|
|
446
446
|
] });
|
|
447
447
|
};
|
|
448
|
-
function
|
|
448
|
+
function Fe({ product: r, children: o }) {
|
|
449
449
|
const {
|
|
450
450
|
attributes: e,
|
|
451
451
|
listeners: s,
|
|
452
452
|
setNodeRef: i,
|
|
453
|
-
transform:
|
|
453
|
+
transform: a,
|
|
454
454
|
transition: l,
|
|
455
455
|
isDragging: d
|
|
456
|
-
} =
|
|
456
|
+
} = Bt({
|
|
457
457
|
id: r.id
|
|
458
458
|
}), n = {
|
|
459
|
-
transform:
|
|
459
|
+
transform: St.Transform.toString(a),
|
|
460
460
|
transition: l
|
|
461
461
|
};
|
|
462
462
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -464,82 +464,82 @@ function ze({ product: r, children: a }) {
|
|
|
464
464
|
{
|
|
465
465
|
ref: i,
|
|
466
466
|
style: n,
|
|
467
|
-
className: `${
|
|
467
|
+
className: `${R.product} ${d ? R.dragging : ""}`,
|
|
468
468
|
...e,
|
|
469
469
|
...s,
|
|
470
|
-
children:
|
|
470
|
+
children: o
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const Ve = (r) => {
|
|
475
475
|
const {
|
|
476
|
-
isActiveItems:
|
|
476
|
+
isActiveItems: o,
|
|
477
477
|
setIsActiveItems: e,
|
|
478
478
|
items: s,
|
|
479
479
|
setItems: i,
|
|
480
|
-
other:
|
|
480
|
+
other: a,
|
|
481
481
|
title: l,
|
|
482
482
|
subtitle: d,
|
|
483
483
|
editable: n = !0,
|
|
484
484
|
draggable: c = !1,
|
|
485
485
|
withImage: b = !1,
|
|
486
|
-
deletable:
|
|
486
|
+
deletable: g = !0,
|
|
487
487
|
addable: h = !0,
|
|
488
|
-
itemsType:
|
|
489
|
-
itemsPlaceholder:
|
|
488
|
+
itemsType: m,
|
|
489
|
+
itemsPlaceholder: x = "",
|
|
490
490
|
itemsOptions: u,
|
|
491
|
-
hasRangeSelector:
|
|
492
|
-
rangeSelectorOptions:
|
|
493
|
-
modalOptions:
|
|
494
|
-
addableOptions:
|
|
491
|
+
hasRangeSelector: C = !1,
|
|
492
|
+
rangeSelectorOptions: O,
|
|
493
|
+
modalOptions: I,
|
|
494
|
+
addableOptions: D = {},
|
|
495
495
|
limit: B,
|
|
496
496
|
autoScrollInterval: S
|
|
497
|
-
} = r, [f,
|
|
497
|
+
} = r, [f, E] = p.useState(null), [W, et] = p.useState({
|
|
498
498
|
top: 0,
|
|
499
499
|
left: 0
|
|
500
|
-
}), [y, $] = p.useState(null),
|
|
501
|
-
|
|
500
|
+
}), [y, $] = p.useState(null), q = p.useRef(null), [G, A] = p.useState(!1), H = It(
|
|
501
|
+
kt(Ct, {
|
|
502
502
|
activationConstraint: {
|
|
503
503
|
distance: 5
|
|
504
504
|
}
|
|
505
505
|
})
|
|
506
506
|
);
|
|
507
507
|
p.useEffect(() => {
|
|
508
|
-
const
|
|
509
|
-
|
|
508
|
+
const _ = () => {
|
|
509
|
+
E(null), A(!1);
|
|
510
510
|
};
|
|
511
|
-
return document.body.addEventListener("click",
|
|
512
|
-
|
|
511
|
+
return document.body.addEventListener("click", _), E(null), A(!1), () => {
|
|
512
|
+
E(null), A(!1), document.body.removeEventListener("click", _);
|
|
513
513
|
};
|
|
514
514
|
}, []), p.useEffect(() => {
|
|
515
515
|
if (f) {
|
|
516
|
-
const
|
|
517
|
-
i(
|
|
516
|
+
const _ = [...s].map((k) => k.id === f.id ? f : k);
|
|
517
|
+
i(_);
|
|
518
518
|
}
|
|
519
519
|
}, [f]), p.useEffect(() => {
|
|
520
|
-
if (
|
|
521
|
-
const
|
|
520
|
+
if (q.current && y) {
|
|
521
|
+
const _ = q.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
522
522
|
let T = y.top;
|
|
523
|
-
T +
|
|
523
|
+
T + _ > k + window.scrollY - 200 && (T = k + window.scrollY - _ - 200), T < 0 && (T = 10), et({
|
|
524
524
|
top: T,
|
|
525
525
|
left: y.left
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
}, [
|
|
529
|
-
const K = (
|
|
530
|
-
|
|
531
|
-
const T =
|
|
528
|
+
}, [q.current, y]);
|
|
529
|
+
const K = (_, k) => {
|
|
530
|
+
_.stopPropagation();
|
|
531
|
+
const T = _.target.getBoundingClientRect();
|
|
532
532
|
$({
|
|
533
533
|
top: T.top + window.scrollY,
|
|
534
534
|
left: T.left - 30
|
|
535
|
-
}),
|
|
535
|
+
}), E(k), A(!0);
|
|
536
536
|
};
|
|
537
|
-
function lt(
|
|
537
|
+
function lt(_) {
|
|
538
538
|
if (b)
|
|
539
|
-
return
|
|
539
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
540
540
|
"img",
|
|
541
541
|
{
|
|
542
|
-
src: `https://imagedelivery.net/${
|
|
542
|
+
src: `https://imagedelivery.net/${_[0]}/w=1000`,
|
|
543
543
|
alt: "image",
|
|
544
544
|
width: 16,
|
|
545
545
|
height: 16
|
|
@@ -554,17 +554,17 @@ const Fe = (r) => {
|
|
|
554
554
|
}
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
|
-
const j = (
|
|
558
|
-
const { active:
|
|
559
|
-
if (T &&
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
const P = [...s], [rt] = P.splice(
|
|
557
|
+
const j = (_) => {
|
|
558
|
+
const { active: k, over: T } = _;
|
|
559
|
+
if (T && k.id !== T.id) {
|
|
560
|
+
const L = s.findIndex((P) => P.id === k.id), U = s.findIndex((P) => P.id === T.id);
|
|
561
|
+
if (L !== -1 && U !== -1) {
|
|
562
|
+
const P = [...s], [rt] = P.splice(L, 1);
|
|
563
563
|
P.splice(U, 0, rt), i(P);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
},
|
|
567
|
-
var
|
|
566
|
+
}, M = (_, k) => {
|
|
567
|
+
var L, U;
|
|
568
568
|
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
569
569
|
c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
570
570
|
v,
|
|
@@ -575,65 +575,65 @@ const Fe = (r) => {
|
|
|
575
575
|
height: 20
|
|
576
576
|
}
|
|
577
577
|
) }),
|
|
578
|
-
|
|
579
|
-
|
|
578
|
+
m === "select" && u && /* @__PURE__ */ t.jsx(
|
|
579
|
+
nt,
|
|
580
580
|
{
|
|
581
581
|
onChange: (P) => {
|
|
582
|
-
const rt = [...s], ut = u.find((
|
|
582
|
+
const rt = [...s], ut = u.find((ft) => ft.name === P);
|
|
583
583
|
if (!ut) return;
|
|
584
|
-
const dt = rt.map((
|
|
584
|
+
const dt = rt.map((ft) => ft.id === _.id ? {
|
|
585
585
|
...ut,
|
|
586
586
|
name: P
|
|
587
|
-
} :
|
|
588
|
-
|
|
589
|
-
...
|
|
587
|
+
} : ft);
|
|
588
|
+
E({
|
|
589
|
+
..._,
|
|
590
590
|
name: P
|
|
591
591
|
}), i([...dt]);
|
|
592
592
|
},
|
|
593
|
-
value:
|
|
593
|
+
value: _.name,
|
|
594
594
|
options: u.filter((P) => !s.find((rt) => rt.name === P.name)).map((P) => P.name),
|
|
595
|
-
leftAddon: lt(
|
|
595
|
+
leftAddon: lt(_.images)
|
|
596
596
|
}
|
|
597
597
|
),
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
m === "input" && /* @__PURE__ */ t.jsx(
|
|
599
|
+
X,
|
|
600
600
|
{
|
|
601
601
|
onChange: (P) => {
|
|
602
|
-
const ut = [...s].map((dt) => dt.id ===
|
|
603
|
-
...
|
|
602
|
+
const ut = [...s].map((dt) => dt.id === _.id ? {
|
|
603
|
+
..._,
|
|
604
604
|
name: P
|
|
605
605
|
} : dt);
|
|
606
606
|
i([...ut]);
|
|
607
607
|
},
|
|
608
|
-
value:
|
|
609
|
-
placeholder:
|
|
608
|
+
value: _.name,
|
|
609
|
+
placeholder: x
|
|
610
610
|
}
|
|
611
611
|
),
|
|
612
|
-
|
|
612
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
613
613
|
gt,
|
|
614
614
|
{
|
|
615
615
|
onChange: (P) => {
|
|
616
|
-
const ut = [...s].map((dt) => dt.id ===
|
|
617
|
-
...
|
|
616
|
+
const ut = [...s].map((dt) => dt.id === _.id ? {
|
|
617
|
+
..._,
|
|
618
618
|
images: P
|
|
619
619
|
} : dt);
|
|
620
620
|
i([...ut]);
|
|
621
621
|
},
|
|
622
|
-
activeImage: (
|
|
622
|
+
activeImage: (L = s.find((P) => P.id === _.id)) != null && L.images ? (U = s.find((P) => P.id === _.id)) == null ? void 0 : U.images[0] : void 0
|
|
623
623
|
}
|
|
624
624
|
),
|
|
625
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
626
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
625
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
|
|
626
|
+
n && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
627
627
|
v,
|
|
628
628
|
{
|
|
629
629
|
name: "Sliders",
|
|
630
630
|
hoverable: !0,
|
|
631
631
|
width: 20,
|
|
632
632
|
height: 20,
|
|
633
|
-
onClick: (P) => K(P,
|
|
633
|
+
onClick: (P) => K(P, _)
|
|
634
634
|
}
|
|
635
635
|
) }),
|
|
636
|
-
|
|
636
|
+
g && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
637
637
|
v,
|
|
638
638
|
{
|
|
639
639
|
name: "Trash",
|
|
@@ -641,68 +641,68 @@ const Fe = (r) => {
|
|
|
641
641
|
width: 20,
|
|
642
642
|
height: 20,
|
|
643
643
|
fill: "#C12A2A",
|
|
644
|
-
onClick: () => i(s.filter((P) => P.id !==
|
|
644
|
+
onClick: () => i(s.filter((P) => P.id !== _.id))
|
|
645
645
|
}
|
|
646
646
|
) })
|
|
647
647
|
] })
|
|
648
648
|
] });
|
|
649
649
|
return c ? /* @__PURE__ */ t.jsx(
|
|
650
|
-
|
|
650
|
+
Fe,
|
|
651
651
|
{
|
|
652
|
-
product:
|
|
653
|
-
index:
|
|
652
|
+
product: _,
|
|
653
|
+
index: k,
|
|
654
654
|
children: T
|
|
655
655
|
},
|
|
656
|
-
|
|
656
|
+
_.id
|
|
657
657
|
) : /* @__PURE__ */ t.jsx(
|
|
658
658
|
"div",
|
|
659
659
|
{
|
|
660
|
-
className:
|
|
660
|
+
className: R.product,
|
|
661
661
|
children: T
|
|
662
662
|
},
|
|
663
|
-
|
|
663
|
+
_.id
|
|
664
664
|
);
|
|
665
665
|
};
|
|
666
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
667
|
-
(l ||
|
|
668
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
669
|
-
|
|
670
|
-
|
|
666
|
+
return /* @__PURE__ */ t.jsxs("div", { className: R.productsBlock, children: [
|
|
667
|
+
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
|
|
668
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: R.title, children: l }),
|
|
669
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
670
|
+
tt,
|
|
671
671
|
{
|
|
672
|
-
current:
|
|
673
|
-
onChange: (
|
|
672
|
+
current: o,
|
|
673
|
+
onChange: (_) => e == null ? void 0 : e(_)
|
|
674
674
|
}
|
|
675
675
|
)
|
|
676
676
|
] }),
|
|
677
|
-
f && n &&
|
|
677
|
+
f && n && I && G && /* @__PURE__ */ t.jsx(
|
|
678
678
|
Le,
|
|
679
679
|
{
|
|
680
|
-
ref:
|
|
680
|
+
ref: q,
|
|
681
681
|
activeItem: f,
|
|
682
|
-
setActiveItem:
|
|
683
|
-
popupPosition:
|
|
684
|
-
modalOptions:
|
|
682
|
+
setActiveItem: E,
|
|
683
|
+
popupPosition: W,
|
|
684
|
+
modalOptions: I,
|
|
685
685
|
setIsOpenModal: A
|
|
686
686
|
}
|
|
687
687
|
),
|
|
688
|
-
|
|
689
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
690
|
-
d && /* @__PURE__ */ t.jsx("h5", { className:
|
|
688
|
+
C && O && /* @__PURE__ */ t.jsx(Mt, { ...O }),
|
|
689
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.products, children: [
|
|
690
|
+
d && /* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: d }),
|
|
691
691
|
c ? /* @__PURE__ */ t.jsx(
|
|
692
|
-
|
|
692
|
+
$t,
|
|
693
693
|
{
|
|
694
694
|
sensors: H,
|
|
695
695
|
onDragEnd: j,
|
|
696
696
|
children: /* @__PURE__ */ t.jsx(
|
|
697
|
-
|
|
697
|
+
Nt,
|
|
698
698
|
{
|
|
699
|
-
items: s.map((
|
|
700
|
-
strategy:
|
|
701
|
-
children: s.map((
|
|
699
|
+
items: s.map((_) => _.id),
|
|
700
|
+
strategy: wt,
|
|
701
|
+
children: s.map((_, k) => M(_, k))
|
|
702
702
|
}
|
|
703
703
|
)
|
|
704
704
|
}
|
|
705
|
-
) : s.map((
|
|
705
|
+
) : s.map((_, k) => M(_, k)),
|
|
706
706
|
h && /* @__PURE__ */ t.jsx(
|
|
707
707
|
"div",
|
|
708
708
|
{
|
|
@@ -712,42 +712,42 @@ const Fe = (r) => {
|
|
|
712
712
|
justifyContent: "center"
|
|
713
713
|
},
|
|
714
714
|
children: /* @__PURE__ */ t.jsx(
|
|
715
|
-
|
|
715
|
+
Z,
|
|
716
716
|
{
|
|
717
717
|
withoutHover: !0,
|
|
718
|
-
className: F(
|
|
719
|
-
[
|
|
718
|
+
className: F(R.button, {
|
|
719
|
+
[R.disabled]: !!(B && B <= s.length || s.length === (u == null ? void 0 : u.length))
|
|
720
720
|
}),
|
|
721
721
|
size: "s",
|
|
722
722
|
disabled: !!(B && B <= s.length || s.length === (u == null ? void 0 : u.length)),
|
|
723
723
|
onClick: () => {
|
|
724
|
-
const
|
|
725
|
-
let
|
|
724
|
+
const _ = [...s];
|
|
725
|
+
let k = null;
|
|
726
726
|
if (u) {
|
|
727
727
|
for (let T = 0; T < u.length; T++)
|
|
728
|
-
if (!s.find((
|
|
729
|
-
|
|
728
|
+
if (!s.find((L) => L.id === u[T].id)) {
|
|
729
|
+
k = u[T];
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
|
|
734
|
-
name:
|
|
735
|
-
id: (
|
|
736
|
-
...
|
|
737
|
-
}) :
|
|
733
|
+
m === "select" && u ? _.push({
|
|
734
|
+
name: k ? k.name : u[0].name,
|
|
735
|
+
id: (k == null ? void 0 : k.id) || u[0].id,
|
|
736
|
+
...D
|
|
737
|
+
}) : m === "input" ? _.push({
|
|
738
738
|
name: "",
|
|
739
|
-
id:
|
|
740
|
-
...
|
|
741
|
-
}) :
|
|
739
|
+
id: _t(),
|
|
740
|
+
...D
|
|
741
|
+
}) : _.push({
|
|
742
742
|
name: `Image ${s.length + 1}`,
|
|
743
|
-
id:
|
|
744
|
-
...
|
|
745
|
-
}), i(
|
|
743
|
+
id: _t(),
|
|
744
|
+
...D
|
|
745
|
+
}), i(_);
|
|
746
746
|
},
|
|
747
747
|
style: {
|
|
748
748
|
width: "fit-content"
|
|
749
749
|
},
|
|
750
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
750
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: R.addButton, children: [
|
|
751
751
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
752
752
|
/* @__PURE__ */ t.jsx(
|
|
753
753
|
v,
|
|
@@ -763,14 +763,14 @@ const Fe = (r) => {
|
|
|
763
763
|
}
|
|
764
764
|
)
|
|
765
765
|
] }),
|
|
766
|
-
|
|
766
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(vt, { items: a }),
|
|
767
767
|
S !== void 0 && /* @__PURE__ */ t.jsx(
|
|
768
|
-
|
|
768
|
+
X,
|
|
769
769
|
{
|
|
770
770
|
label: "Auto scroll interval",
|
|
771
771
|
type: "number",
|
|
772
772
|
value: String(S.scrollInterval),
|
|
773
|
-
onChange: (
|
|
773
|
+
onChange: (_) => S.setScrollInterval(Number(_)),
|
|
774
774
|
min: 0.1,
|
|
775
775
|
max: 100,
|
|
776
776
|
style: {
|
|
@@ -780,54 +780,54 @@ const Fe = (r) => {
|
|
|
780
780
|
}
|
|
781
781
|
)
|
|
782
782
|
] });
|
|
783
|
-
},
|
|
784
|
-
title:
|
|
785
|
-
subtitle:
|
|
786
|
-
header:
|
|
787
|
-
text:
|
|
783
|
+
}, Ue = "_title_82zux_1", Ye = "_subtitle_82zux_5", Ge = "_header_82zux_12", Xe = "_text_82zux_13", We = "_productsBlock_82zux_14", Je = "_top_82zux_26", Qe = "_itemsBlock_82zux_35", Ke = "_typeTexts_82zux_41", Ze = "_block_82zux_48", ts = "_active_82zux_61", es = "_products_82zux_14", ss = "_product_82zux_14", ns = "_button_82zux_80", is = "_disabled_82zux_91", os = "_image_82zux_95", as = "_info_82zux_102", cs = "_name_82zux_114", ls = "_buttons_82zux_118", rs = "_modal_82zux_125", ds = "_link_82zux_145", us = "_modalOptions_82zux_151", _s = "_addButton_82zux_157", ms = "_deleteButton_82zux_179", Q = {
|
|
784
|
+
title: Ue,
|
|
785
|
+
subtitle: Ye,
|
|
786
|
+
header: Ge,
|
|
787
|
+
text: Xe,
|
|
788
788
|
productsBlock: We,
|
|
789
|
-
top:
|
|
790
|
-
itemsBlock:
|
|
791
|
-
typeTexts:
|
|
792
|
-
block:
|
|
793
|
-
active:
|
|
794
|
-
products:
|
|
795
|
-
product:
|
|
796
|
-
button:
|
|
797
|
-
disabled:
|
|
798
|
-
image:
|
|
799
|
-
info:
|
|
800
|
-
name:
|
|
801
|
-
buttons:
|
|
802
|
-
modal:
|
|
803
|
-
link:
|
|
804
|
-
modalOptions:
|
|
805
|
-
addButton:
|
|
789
|
+
top: Je,
|
|
790
|
+
itemsBlock: Qe,
|
|
791
|
+
typeTexts: Ke,
|
|
792
|
+
block: Ze,
|
|
793
|
+
active: ts,
|
|
794
|
+
products: es,
|
|
795
|
+
product: ss,
|
|
796
|
+
button: ns,
|
|
797
|
+
disabled: is,
|
|
798
|
+
image: os,
|
|
799
|
+
info: as,
|
|
800
|
+
name: cs,
|
|
801
|
+
buttons: ls,
|
|
802
|
+
modal: rs,
|
|
803
|
+
link: ds,
|
|
804
|
+
modalOptions: us,
|
|
805
|
+
addButton: _s,
|
|
806
806
|
deleteButton: ms
|
|
807
|
-
},
|
|
807
|
+
}, fa = (r) => {
|
|
808
808
|
const {
|
|
809
|
-
isActiveItems:
|
|
809
|
+
isActiveItems: o,
|
|
810
810
|
setIsActiveItems: e,
|
|
811
811
|
items: s,
|
|
812
812
|
setItems: i,
|
|
813
|
-
other:
|
|
813
|
+
other: a,
|
|
814
814
|
title: l,
|
|
815
815
|
subtitle: d,
|
|
816
816
|
draggable: n = !1,
|
|
817
817
|
withImage: c = !1,
|
|
818
818
|
addable: b = !0,
|
|
819
|
-
itemsOptions:
|
|
819
|
+
itemsOptions: g,
|
|
820
820
|
hasRangeSelector: h = !1,
|
|
821
|
-
rangeSelectorOptions:
|
|
822
|
-
limit:
|
|
821
|
+
rangeSelectorOptions: m,
|
|
822
|
+
limit: x,
|
|
823
823
|
autoScrollInterval: u
|
|
824
824
|
} = r;
|
|
825
|
-
function
|
|
825
|
+
function C(I) {
|
|
826
826
|
if (c)
|
|
827
|
-
return
|
|
827
|
+
return I ? /* @__PURE__ */ t.jsx(
|
|
828
828
|
"img",
|
|
829
829
|
{
|
|
830
|
-
src: `https://imagedelivery.net/${
|
|
830
|
+
src: `https://imagedelivery.net/${I[0]}/w=1000`,
|
|
831
831
|
alt: "image",
|
|
832
832
|
width: 16,
|
|
833
833
|
height: 16
|
|
@@ -842,9 +842,9 @@ const Fe = (r) => {
|
|
|
842
842
|
}
|
|
843
843
|
);
|
|
844
844
|
}
|
|
845
|
-
const
|
|
846
|
-
const
|
|
847
|
-
if (!
|
|
845
|
+
const O = (I) => {
|
|
846
|
+
const D = g.find((S) => S.id === I);
|
|
847
|
+
if (!D) return;
|
|
848
848
|
const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
849
849
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
850
850
|
v,
|
|
@@ -856,17 +856,17 @@ const Fe = (r) => {
|
|
|
856
856
|
}
|
|
857
857
|
) }),
|
|
858
858
|
/* @__PURE__ */ t.jsx(
|
|
859
|
-
|
|
859
|
+
nt,
|
|
860
860
|
{
|
|
861
861
|
onChange: (S) => {
|
|
862
|
-
const f = [...s],
|
|
863
|
-
if (!
|
|
864
|
-
const
|
|
865
|
-
i([...
|
|
862
|
+
const f = [...s], E = g.find((y) => y.name === S);
|
|
863
|
+
if (!E) return;
|
|
864
|
+
const W = E.id, et = f.map((y) => y === I ? W : y);
|
|
865
|
+
i([...et]);
|
|
866
866
|
},
|
|
867
|
-
value:
|
|
868
|
-
options:
|
|
869
|
-
leftAddon:
|
|
867
|
+
value: D.name,
|
|
868
|
+
options: g.filter((S) => !s.find((f) => f === S.id)).map((S) => S.name),
|
|
869
|
+
leftAddon: C(D.images)
|
|
870
870
|
}
|
|
871
871
|
),
|
|
872
872
|
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
@@ -877,7 +877,7 @@ const Fe = (r) => {
|
|
|
877
877
|
width: 20,
|
|
878
878
|
height: 20,
|
|
879
879
|
fill: "#C12A2A",
|
|
880
|
-
onClick: () => i(s.filter((S) => S !==
|
|
880
|
+
onClick: () => i(s.filter((S) => S !== I))
|
|
881
881
|
}
|
|
882
882
|
) }) })
|
|
883
883
|
] });
|
|
@@ -887,24 +887,24 @@ const Fe = (r) => {
|
|
|
887
887
|
className: Q.product,
|
|
888
888
|
children: B
|
|
889
889
|
},
|
|
890
|
-
|
|
890
|
+
I
|
|
891
891
|
);
|
|
892
892
|
};
|
|
893
893
|
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
894
|
-
(l ||
|
|
894
|
+
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
895
895
|
l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
897
|
+
tt,
|
|
898
898
|
{
|
|
899
|
-
current:
|
|
900
|
-
onChange: (
|
|
899
|
+
current: o,
|
|
900
|
+
onChange: (I) => e == null ? void 0 : e(I)
|
|
901
901
|
}
|
|
902
902
|
)
|
|
903
903
|
] }),
|
|
904
|
-
h &&
|
|
904
|
+
h && m && /* @__PURE__ */ t.jsx(Mt, { ...m }),
|
|
905
905
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
906
906
|
d && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: d }),
|
|
907
|
-
s.map((
|
|
907
|
+
s.map((I) => O(I)),
|
|
908
908
|
b && /* @__PURE__ */ t.jsx(
|
|
909
909
|
"div",
|
|
910
910
|
{
|
|
@@ -915,25 +915,25 @@ const Fe = (r) => {
|
|
|
915
915
|
gap: 5
|
|
916
916
|
},
|
|
917
917
|
children: /* @__PURE__ */ t.jsx(
|
|
918
|
-
|
|
918
|
+
Z,
|
|
919
919
|
{
|
|
920
920
|
withoutHover: !0,
|
|
921
921
|
className: F(Q.button, {
|
|
922
|
-
[Q.disabled]: !!(
|
|
922
|
+
[Q.disabled]: !!(x && x <= s.length || s.length === g.length)
|
|
923
923
|
}),
|
|
924
924
|
size: "s",
|
|
925
|
-
disabled: !!(
|
|
925
|
+
disabled: !!(x && x <= s.length || s.length === g.length),
|
|
926
926
|
onClick: () => {
|
|
927
|
-
const
|
|
928
|
-
let
|
|
929
|
-
if (
|
|
930
|
-
for (let B = 0; B <
|
|
931
|
-
if (!s.find((S) => S ===
|
|
932
|
-
|
|
927
|
+
const I = [...s];
|
|
928
|
+
let D = null;
|
|
929
|
+
if (g) {
|
|
930
|
+
for (let B = 0; B < g.length; B++)
|
|
931
|
+
if (!s.find((S) => S === g[B].id)) {
|
|
932
|
+
D = g[B];
|
|
933
933
|
break;
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
|
-
|
|
936
|
+
I.push((D == null ? void 0 : D.id) || g[0].id), i(I);
|
|
937
937
|
},
|
|
938
938
|
style: {
|
|
939
939
|
width: "fit-content"
|
|
@@ -954,14 +954,14 @@ const Fe = (r) => {
|
|
|
954
954
|
}
|
|
955
955
|
)
|
|
956
956
|
] }),
|
|
957
|
-
|
|
957
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(vt, { items: a }),
|
|
958
958
|
u !== void 0 && /* @__PURE__ */ t.jsx(
|
|
959
|
-
|
|
959
|
+
X,
|
|
960
960
|
{
|
|
961
961
|
label: "Auto scroll interval",
|
|
962
962
|
type: "number",
|
|
963
963
|
value: String(u.scrollInterval),
|
|
964
|
-
onChange: (
|
|
964
|
+
onChange: (I) => u.setScrollInterval(Number(I)),
|
|
965
965
|
min: 0.1,
|
|
966
966
|
max: 100,
|
|
967
967
|
style: {
|
|
@@ -971,41 +971,41 @@ const Fe = (r) => {
|
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
] });
|
|
974
|
-
},
|
|
975
|
-
title:
|
|
976
|
-
subtitle:
|
|
977
|
-
header:
|
|
974
|
+
}, hs = "_title_1vfw9_1", ps = "_subtitle_1vfw9_5", xs = "_header_1vfw9_12", gs = "_text_1vfw9_13", fs = "_productsBlock_1vfw9_14", bs = "_top_1vfw9_26", vs = "_itemsBlock_1vfw9_35", js = "_typeTexts_1vfw9_41", ys = "_block_1vfw9_48", Is = "_active_1vfw9_61", ks = "_products_1vfw9_14", $s = "_product_1vfw9_14", Ns = "_button_1vfw9_80", ws = "_disabled_1vfw9_91", Cs = "_image_1vfw9_95", Bs = "_info_1vfw9_102", Ss = "_name_1vfw9_114", Ts = "_buttons_1vfw9_118", Ps = "_modal_1vfw9_125", As = "_link_1vfw9_145", Ms = "_modalOptions_1vfw9_151", Os = "_addButton_1vfw9_164", qs = "_deleteButton_1vfw9_179", Es = "_closeIcon_1vfw9_191", z = {
|
|
975
|
+
title: hs,
|
|
976
|
+
subtitle: ps,
|
|
977
|
+
header: xs,
|
|
978
978
|
text: gs,
|
|
979
|
-
productsBlock:
|
|
980
|
-
top:
|
|
981
|
-
itemsBlock:
|
|
982
|
-
typeTexts:
|
|
983
|
-
block:
|
|
984
|
-
active:
|
|
979
|
+
productsBlock: fs,
|
|
980
|
+
top: bs,
|
|
981
|
+
itemsBlock: vs,
|
|
982
|
+
typeTexts: js,
|
|
983
|
+
block: ys,
|
|
984
|
+
active: Is,
|
|
985
985
|
products: ks,
|
|
986
|
-
product:
|
|
987
|
-
button:
|
|
988
|
-
disabled:
|
|
989
|
-
image:
|
|
990
|
-
info:
|
|
991
|
-
name:
|
|
992
|
-
buttons:
|
|
993
|
-
modal:
|
|
994
|
-
link:
|
|
995
|
-
modalOptions:
|
|
986
|
+
product: $s,
|
|
987
|
+
button: Ns,
|
|
988
|
+
disabled: ws,
|
|
989
|
+
image: Cs,
|
|
990
|
+
info: Bs,
|
|
991
|
+
name: Ss,
|
|
992
|
+
buttons: Ts,
|
|
993
|
+
modal: Ps,
|
|
994
|
+
link: As,
|
|
995
|
+
modalOptions: Ms,
|
|
996
996
|
addButton: Os,
|
|
997
997
|
deleteButton: qs,
|
|
998
998
|
closeIcon: Es
|
|
999
999
|
}, Ds = p.forwardRef(
|
|
1000
|
-
(r,
|
|
1001
|
-
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions:
|
|
1000
|
+
(r, o) => {
|
|
1001
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
1002
1002
|
function d(n, c) {
|
|
1003
1003
|
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1004
1004
|
}
|
|
1005
1005
|
return /* @__PURE__ */ t.jsxs(
|
|
1006
1006
|
"div",
|
|
1007
1007
|
{
|
|
1008
|
-
ref:
|
|
1008
|
+
ref: o,
|
|
1009
1009
|
className: z.modal,
|
|
1010
1010
|
onClick: (n) => {
|
|
1011
1011
|
n.stopPropagation();
|
|
@@ -1030,7 +1030,7 @@ const Fe = (r) => {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
) })
|
|
1032
1032
|
] }),
|
|
1033
|
-
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children:
|
|
1033
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: a.map((n) => {
|
|
1034
1034
|
if (n.type === "image")
|
|
1035
1035
|
return /* @__PURE__ */ t.jsx(
|
|
1036
1036
|
gt,
|
|
@@ -1072,7 +1072,7 @@ const Fe = (r) => {
|
|
|
1072
1072
|
);
|
|
1073
1073
|
if (n.type === "input")
|
|
1074
1074
|
return /* @__PURE__ */ t.jsx(
|
|
1075
|
-
|
|
1075
|
+
X,
|
|
1076
1076
|
{
|
|
1077
1077
|
onChange: (c) => {
|
|
1078
1078
|
const b = {
|
|
@@ -1089,7 +1089,7 @@ const Fe = (r) => {
|
|
|
1089
1089
|
if (n.type === "inputSwitch")
|
|
1090
1090
|
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
1091
1091
|
/* @__PURE__ */ t.jsx(
|
|
1092
|
-
|
|
1092
|
+
X,
|
|
1093
1093
|
{
|
|
1094
1094
|
onChange: (c) => {
|
|
1095
1095
|
const b = {
|
|
@@ -1104,7 +1104,7 @@ const Fe = (r) => {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
),
|
|
1106
1106
|
/* @__PURE__ */ t.jsx(
|
|
1107
|
-
|
|
1107
|
+
tt,
|
|
1108
1108
|
{
|
|
1109
1109
|
current: !!e[n.field.switch] || !1,
|
|
1110
1110
|
label: n.switchLabel,
|
|
@@ -1120,7 +1120,7 @@ const Fe = (r) => {
|
|
|
1120
1120
|
] });
|
|
1121
1121
|
if (n.type === "select")
|
|
1122
1122
|
return /* @__PURE__ */ t.jsx(
|
|
1123
|
-
|
|
1123
|
+
nt,
|
|
1124
1124
|
{
|
|
1125
1125
|
options: n.itemsOptions,
|
|
1126
1126
|
onChange: (c) => {
|
|
@@ -1142,16 +1142,16 @@ const Fe = (r) => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
);
|
|
1144
1144
|
function Ls(r) {
|
|
1145
|
-
const { product:
|
|
1146
|
-
id:
|
|
1145
|
+
const { product: o, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: d, isDragging: n } = Bt({
|
|
1146
|
+
id: o.id
|
|
1147
1147
|
}), c = {
|
|
1148
|
-
transform:
|
|
1148
|
+
transform: St.Transform.toString(l),
|
|
1149
1149
|
transition: d
|
|
1150
1150
|
};
|
|
1151
1151
|
return /* @__PURE__ */ t.jsx(
|
|
1152
1152
|
"div",
|
|
1153
1153
|
{
|
|
1154
|
-
ref:
|
|
1154
|
+
ref: a,
|
|
1155
1155
|
style: c,
|
|
1156
1156
|
className: `${z.product} ${n ? z.dragging : ""}`,
|
|
1157
1157
|
...s,
|
|
@@ -1160,32 +1160,32 @@ function Ls(r) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
);
|
|
1162
1162
|
}
|
|
1163
|
-
const
|
|
1163
|
+
const ba = (r) => {
|
|
1164
1164
|
const {
|
|
1165
|
-
isActiveItems:
|
|
1165
|
+
isActiveItems: o,
|
|
1166
1166
|
setIsActiveItems: e,
|
|
1167
1167
|
items: s,
|
|
1168
1168
|
setItems: i,
|
|
1169
|
-
other:
|
|
1169
|
+
other: a,
|
|
1170
1170
|
title: l,
|
|
1171
1171
|
subtitle: d,
|
|
1172
1172
|
editable: n = !0,
|
|
1173
1173
|
draggable: c = !1,
|
|
1174
1174
|
withImage: b = !1,
|
|
1175
|
-
deletable:
|
|
1175
|
+
deletable: g = !0,
|
|
1176
1176
|
addable: h = !0,
|
|
1177
|
-
itemsType:
|
|
1178
|
-
itemsPlaceholder:
|
|
1177
|
+
itemsType: m,
|
|
1178
|
+
itemsPlaceholder: x = "",
|
|
1179
1179
|
itemsOptions: u,
|
|
1180
|
-
hasRangeSelector:
|
|
1181
|
-
rangeSelectorOptions:
|
|
1182
|
-
modalOptions:
|
|
1183
|
-
addableOptions:
|
|
1184
|
-
} = r, [B, S] = p.useState(null), [f,
|
|
1180
|
+
hasRangeSelector: C = !1,
|
|
1181
|
+
rangeSelectorOptions: O,
|
|
1182
|
+
modalOptions: I,
|
|
1183
|
+
addableOptions: D = {}
|
|
1184
|
+
} = r, [B, S] = p.useState(null), [f, E] = p.useState({
|
|
1185
1185
|
top: 0,
|
|
1186
1186
|
left: 0
|
|
1187
|
-
}), [
|
|
1188
|
-
|
|
1187
|
+
}), [W, et] = p.useState(null), y = p.useRef(null), [$, q] = p.useState(!1), G = It(
|
|
1188
|
+
kt(Ct, {
|
|
1189
1189
|
activationConstraint: {
|
|
1190
1190
|
distance: 5
|
|
1191
1191
|
}
|
|
@@ -1193,33 +1193,33 @@ const ua = (r) => {
|
|
|
1193
1193
|
);
|
|
1194
1194
|
p.useEffect(() => {
|
|
1195
1195
|
const j = () => {
|
|
1196
|
-
S(null),
|
|
1196
|
+
S(null), q(!1);
|
|
1197
1197
|
};
|
|
1198
|
-
return document.body.addEventListener("click", j), S(null),
|
|
1199
|
-
S(null),
|
|
1198
|
+
return document.body.addEventListener("click", j), S(null), q(!1), () => {
|
|
1199
|
+
S(null), q(!1), document.body.removeEventListener("click", j);
|
|
1200
1200
|
};
|
|
1201
1201
|
}, []), p.useEffect(() => {
|
|
1202
1202
|
if (B) {
|
|
1203
|
-
const j = [...s].map((
|
|
1203
|
+
const j = [...s].map((M) => M.id === B.id ? B : M);
|
|
1204
1204
|
i(j);
|
|
1205
1205
|
}
|
|
1206
1206
|
}, [B]), p.useEffect(() => {
|
|
1207
|
-
if (y.current &&
|
|
1208
|
-
const j = y.current.getBoundingClientRect().height,
|
|
1209
|
-
let
|
|
1210
|
-
|
|
1211
|
-
top:
|
|
1212
|
-
left:
|
|
1207
|
+
if (y.current && W) {
|
|
1208
|
+
const j = y.current.getBoundingClientRect().height, M = window.innerHeight;
|
|
1209
|
+
let _ = W.top;
|
|
1210
|
+
_ + j > M + window.scrollY - 200 && (_ = M + window.scrollY - j - 200), _ < 0 && (_ = 10), E({
|
|
1211
|
+
top: _,
|
|
1212
|
+
left: W.left
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
|
-
}, [y.current,
|
|
1216
|
-
const A = (j,
|
|
1215
|
+
}, [y.current, W]);
|
|
1216
|
+
const A = (j, M) => {
|
|
1217
1217
|
j.stopPropagation();
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1220
|
-
top:
|
|
1221
|
-
left:
|
|
1222
|
-
}), S(
|
|
1218
|
+
const _ = j.target.getBoundingClientRect();
|
|
1219
|
+
et({
|
|
1220
|
+
top: _.top + window.scrollY,
|
|
1221
|
+
left: _.left - 30
|
|
1222
|
+
}), S(M), q(!0);
|
|
1223
1223
|
};
|
|
1224
1224
|
function H(j) {
|
|
1225
1225
|
if (b)
|
|
@@ -1242,17 +1242,17 @@ const ua = (r) => {
|
|
|
1242
1242
|
);
|
|
1243
1243
|
}
|
|
1244
1244
|
const K = (j) => {
|
|
1245
|
-
const { active:
|
|
1246
|
-
if (
|
|
1247
|
-
const
|
|
1248
|
-
if (
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1245
|
+
const { active: M, over: _ } = j;
|
|
1246
|
+
if (_ && M.id !== _.id) {
|
|
1247
|
+
const k = s.findIndex((L) => L.id === M.id), T = s.findIndex((L) => L.id === _.id);
|
|
1248
|
+
if (k !== -1 && T !== -1) {
|
|
1249
|
+
const L = [...s], [U] = L.splice(k, 1);
|
|
1250
|
+
L.splice(T, 0, U), i(L);
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
1253
|
}, lt = (j) => {
|
|
1254
|
-
var
|
|
1255
|
-
const
|
|
1254
|
+
var _;
|
|
1255
|
+
const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1256
1256
|
c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1257
1257
|
v,
|
|
1258
1258
|
{
|
|
@@ -1262,49 +1262,49 @@ const ua = (r) => {
|
|
|
1262
1262
|
height: 20
|
|
1263
1263
|
}
|
|
1264
1264
|
) }),
|
|
1265
|
-
|
|
1266
|
-
|
|
1265
|
+
m === "select" && u && /* @__PURE__ */ t.jsx(
|
|
1266
|
+
nt,
|
|
1267
1267
|
{
|
|
1268
|
-
onChange: (
|
|
1269
|
-
const
|
|
1268
|
+
onChange: (k) => {
|
|
1269
|
+
const L = [...s].map((U) => U.id === j.id ? {
|
|
1270
1270
|
...j,
|
|
1271
|
-
name:
|
|
1271
|
+
name: k
|
|
1272
1272
|
} : U);
|
|
1273
1273
|
S({
|
|
1274
1274
|
...j,
|
|
1275
|
-
name:
|
|
1276
|
-
}), i([...
|
|
1275
|
+
name: k
|
|
1276
|
+
}), i([...L]);
|
|
1277
1277
|
},
|
|
1278
1278
|
value: j.name,
|
|
1279
|
-
options: u.filter((
|
|
1279
|
+
options: u.filter((k) => !s.find((T) => T.name === k)),
|
|
1280
1280
|
leftAddon: H(j.images)
|
|
1281
1281
|
}
|
|
1282
1282
|
),
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
m === "input" && /* @__PURE__ */ t.jsx(
|
|
1284
|
+
X,
|
|
1285
1285
|
{
|
|
1286
|
-
onChange: (
|
|
1287
|
-
const
|
|
1286
|
+
onChange: (k) => {
|
|
1287
|
+
const L = [...s].map((U) => U.id === j.id ? {
|
|
1288
1288
|
...j,
|
|
1289
|
-
name:
|
|
1289
|
+
name: k
|
|
1290
1290
|
} : U);
|
|
1291
|
-
i([...
|
|
1291
|
+
i([...L]);
|
|
1292
1292
|
},
|
|
1293
1293
|
value: j.name,
|
|
1294
|
-
placeholder:
|
|
1294
|
+
placeholder: x
|
|
1295
1295
|
}
|
|
1296
1296
|
),
|
|
1297
|
-
|
|
1297
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
1298
1298
|
gt,
|
|
1299
1299
|
{
|
|
1300
|
-
onChange: (
|
|
1301
|
-
const
|
|
1300
|
+
onChange: (k) => {
|
|
1301
|
+
const L = [...s].map((U) => U.id === j.id ? {
|
|
1302
1302
|
...j,
|
|
1303
|
-
images:
|
|
1303
|
+
images: k
|
|
1304
1304
|
} : U);
|
|
1305
|
-
i([...
|
|
1305
|
+
i([...L]);
|
|
1306
1306
|
},
|
|
1307
|
-
activeImage: (
|
|
1307
|
+
activeImage: (_ = s.find((k) => k.id === j.id)) == null ? void 0 : _.images[0]
|
|
1308
1308
|
}
|
|
1309
1309
|
),
|
|
1310
1310
|
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
@@ -1315,10 +1315,10 @@ const ua = (r) => {
|
|
|
1315
1315
|
hoverable: !0,
|
|
1316
1316
|
width: 20,
|
|
1317
1317
|
height: 20,
|
|
1318
|
-
onClick: (
|
|
1318
|
+
onClick: (k) => A(k, j)
|
|
1319
1319
|
}
|
|
1320
1320
|
) }),
|
|
1321
|
-
|
|
1321
|
+
g && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1322
1322
|
v,
|
|
1323
1323
|
{
|
|
1324
1324
|
name: "Trash",
|
|
@@ -1326,7 +1326,7 @@ const ua = (r) => {
|
|
|
1326
1326
|
width: 20,
|
|
1327
1327
|
height: 20,
|
|
1328
1328
|
fill: "#C12A2A",
|
|
1329
|
-
onClick: () => i(s.filter((
|
|
1329
|
+
onClick: () => i(s.filter((k) => k.id !== j.id))
|
|
1330
1330
|
}
|
|
1331
1331
|
) })
|
|
1332
1332
|
] })
|
|
@@ -1335,53 +1335,53 @@ const ua = (r) => {
|
|
|
1335
1335
|
Ls,
|
|
1336
1336
|
{
|
|
1337
1337
|
product: j,
|
|
1338
|
-
children:
|
|
1338
|
+
children: M
|
|
1339
1339
|
},
|
|
1340
1340
|
j.id
|
|
1341
1341
|
) : /* @__PURE__ */ t.jsx(
|
|
1342
1342
|
"div",
|
|
1343
1343
|
{
|
|
1344
1344
|
className: z.product,
|
|
1345
|
-
children:
|
|
1345
|
+
children: M
|
|
1346
1346
|
},
|
|
1347
1347
|
j.id
|
|
1348
1348
|
);
|
|
1349
1349
|
};
|
|
1350
1350
|
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
1351
|
-
(l ||
|
|
1351
|
+
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
1352
1352
|
l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
|
|
1353
|
-
|
|
1354
|
-
|
|
1353
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1354
|
+
tt,
|
|
1355
1355
|
{
|
|
1356
|
-
current:
|
|
1356
|
+
current: o,
|
|
1357
1357
|
onChange: (j) => e == null ? void 0 : e(j)
|
|
1358
1358
|
}
|
|
1359
1359
|
)
|
|
1360
1360
|
] }),
|
|
1361
|
-
B && n &&
|
|
1361
|
+
B && n && I && $ && /* @__PURE__ */ t.jsx(
|
|
1362
1362
|
Ds,
|
|
1363
1363
|
{
|
|
1364
1364
|
ref: y,
|
|
1365
1365
|
activeItem: B,
|
|
1366
1366
|
setActiveItem: S,
|
|
1367
1367
|
popupPosition: f,
|
|
1368
|
-
modalOptions:
|
|
1369
|
-
setIsOpenModal:
|
|
1368
|
+
modalOptions: I,
|
|
1369
|
+
setIsOpenModal: q
|
|
1370
1370
|
}
|
|
1371
1371
|
),
|
|
1372
|
-
|
|
1372
|
+
C && O && /* @__PURE__ */ t.jsx(Mt, { ...O }),
|
|
1373
1373
|
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
1374
1374
|
d && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: d }),
|
|
1375
1375
|
c ? /* @__PURE__ */ t.jsx(
|
|
1376
|
-
|
|
1376
|
+
$t,
|
|
1377
1377
|
{
|
|
1378
1378
|
sensors: G,
|
|
1379
1379
|
onDragEnd: K,
|
|
1380
1380
|
children: /* @__PURE__ */ t.jsx(
|
|
1381
|
-
|
|
1381
|
+
Nt,
|
|
1382
1382
|
{
|
|
1383
1383
|
items: s.map((j) => j.id),
|
|
1384
|
-
strategy:
|
|
1384
|
+
strategy: wt,
|
|
1385
1385
|
children: s.map((j) => lt(j))
|
|
1386
1386
|
}
|
|
1387
1387
|
)
|
|
@@ -1396,36 +1396,36 @@ const ua = (r) => {
|
|
|
1396
1396
|
justifyContent: "center"
|
|
1397
1397
|
},
|
|
1398
1398
|
children: /* @__PURE__ */ t.jsx(
|
|
1399
|
-
|
|
1399
|
+
Z,
|
|
1400
1400
|
{
|
|
1401
1401
|
withoutHover: !0,
|
|
1402
1402
|
className: z.button,
|
|
1403
1403
|
size: "s",
|
|
1404
1404
|
onClick: () => {
|
|
1405
1405
|
const j = [...s];
|
|
1406
|
-
let
|
|
1406
|
+
let M = null;
|
|
1407
1407
|
if (u) {
|
|
1408
|
-
for (let
|
|
1409
|
-
if (!s.find((
|
|
1410
|
-
|
|
1408
|
+
for (let _ = 0; _ < u.length; _++)
|
|
1409
|
+
if (!s.find((k) => k.name === u[_])) {
|
|
1410
|
+
M = u[_];
|
|
1411
1411
|
break;
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
|
-
|
|
1415
|
-
name:
|
|
1416
|
-
id:
|
|
1417
|
-
...
|
|
1414
|
+
m === "select" && u ? j.push({
|
|
1415
|
+
name: M || u[0],
|
|
1416
|
+
id: _t(),
|
|
1417
|
+
...D,
|
|
1418
1418
|
maxSymbols: 100
|
|
1419
1419
|
// пример значения
|
|
1420
|
-
}) :
|
|
1420
|
+
}) : m === "input" ? j.push({
|
|
1421
1421
|
name: "",
|
|
1422
|
-
id:
|
|
1423
|
-
...
|
|
1422
|
+
id: _t(),
|
|
1423
|
+
...D,
|
|
1424
1424
|
maxSymbols: 100
|
|
1425
1425
|
}) : j.push({
|
|
1426
1426
|
name: `Image ${s.length + 1}`,
|
|
1427
|
-
id:
|
|
1428
|
-
...
|
|
1427
|
+
id: _t(),
|
|
1428
|
+
...D,
|
|
1429
1429
|
maxSymbols: 100
|
|
1430
1430
|
}), i(j);
|
|
1431
1431
|
},
|
|
@@ -1448,61 +1448,61 @@ const ua = (r) => {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
)
|
|
1450
1450
|
] }),
|
|
1451
|
-
|
|
1451
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(vt, { items: a })
|
|
1452
1452
|
] });
|
|
1453
|
-
}, Rs = "_title_bn7sv_1",
|
|
1453
|
+
}, Rs = "_title_bn7sv_1", Hs = "_subtitle_bn7sv_5", zs = "_header_bn7sv_12", Fs = "_text_bn7sv_13", Vs = "_productsBlock_bn7sv_14", Us = "_buttonsBlock_bn7sv_15", Ys = "_top_bn7sv_26", Gs = "_itemsBlock_bn7sv_35", Xs = "_typeTexts_bn7sv_41", Ws = "_block_bn7sv_48", Js = "_active_bn7sv_60", Qs = "_products_bn7sv_14", Ks = "_product_bn7sv_14", Zs = "_button_bn7sv_15", tn = "_image_bn7sv_90", en = "_info_bn7sv_97", sn = "_name_bn7sv_109", nn = "_buttons_bn7sv_15", on = "_modal_bn7sv_120", an = "_other_bn7sv_139", cn = "_options_bn7sv_145", ln = "_closeIcon_bn7sv_153", ct = {
|
|
1454
1454
|
title: Rs,
|
|
1455
|
-
subtitle:
|
|
1456
|
-
header:
|
|
1457
|
-
text:
|
|
1458
|
-
productsBlock:
|
|
1459
|
-
buttonsBlock:
|
|
1460
|
-
top:
|
|
1461
|
-
itemsBlock:
|
|
1462
|
-
typeTexts:
|
|
1455
|
+
subtitle: Hs,
|
|
1456
|
+
header: zs,
|
|
1457
|
+
text: Fs,
|
|
1458
|
+
productsBlock: Vs,
|
|
1459
|
+
buttonsBlock: Us,
|
|
1460
|
+
top: Ys,
|
|
1461
|
+
itemsBlock: Gs,
|
|
1462
|
+
typeTexts: Xs,
|
|
1463
1463
|
block: Ws,
|
|
1464
|
-
active:
|
|
1465
|
-
products:
|
|
1466
|
-
product:
|
|
1467
|
-
button:
|
|
1468
|
-
image:
|
|
1469
|
-
info:
|
|
1470
|
-
name:
|
|
1471
|
-
buttons:
|
|
1472
|
-
modal:
|
|
1473
|
-
other:
|
|
1474
|
-
options:
|
|
1475
|
-
closeIcon:
|
|
1476
|
-
},
|
|
1477
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [
|
|
1464
|
+
active: Js,
|
|
1465
|
+
products: Qs,
|
|
1466
|
+
product: Ks,
|
|
1467
|
+
button: Zs,
|
|
1468
|
+
image: tn,
|
|
1469
|
+
info: en,
|
|
1470
|
+
name: sn,
|
|
1471
|
+
buttons: nn,
|
|
1472
|
+
modal: on,
|
|
1473
|
+
other: an,
|
|
1474
|
+
options: cn,
|
|
1475
|
+
closeIcon: ln
|
|
1476
|
+
}, rn = p.forwardRef((r, o) => {
|
|
1477
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [a, l] = p.useState(e.typesText), [d, n] = p.useState(e.destination), [c, b] = p.useState(e.page), [g, h] = p.useState(e.link || ""), [m, x] = p.useState(e.text || ""), [u, C] = p.useState(e.openInNewTab), { pages: O } = Ft();
|
|
1478
1478
|
return p.useEffect(() => {
|
|
1479
1479
|
s({
|
|
1480
1480
|
...e,
|
|
1481
1481
|
...{
|
|
1482
|
-
text:
|
|
1483
|
-
link:
|
|
1482
|
+
text: m,
|
|
1483
|
+
link: g,
|
|
1484
1484
|
destination: d,
|
|
1485
|
-
typesText:
|
|
1485
|
+
typesText: a,
|
|
1486
1486
|
page: c,
|
|
1487
1487
|
openInNewTab: u
|
|
1488
1488
|
}
|
|
1489
1489
|
});
|
|
1490
|
-
}, [
|
|
1490
|
+
}, [a, d, g, m, c, u]), /* @__PURE__ */ t.jsxs(
|
|
1491
1491
|
"div",
|
|
1492
1492
|
{
|
|
1493
|
-
className:
|
|
1494
|
-
onClick: (
|
|
1495
|
-
|
|
1493
|
+
className: ct.modal,
|
|
1494
|
+
onClick: (I) => {
|
|
1495
|
+
I.stopPropagation();
|
|
1496
1496
|
},
|
|
1497
1497
|
style: {
|
|
1498
1498
|
top: `${i.top}px`,
|
|
1499
1499
|
left: `${i.left}px`
|
|
1500
1500
|
},
|
|
1501
|
-
ref:
|
|
1501
|
+
ref: o,
|
|
1502
1502
|
children: [
|
|
1503
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1504
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1505
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1503
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1504
|
+
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
|
|
1505
|
+
/* @__PURE__ */ t.jsx("div", { className: ct.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1506
1506
|
v,
|
|
1507
1507
|
{
|
|
1508
1508
|
name: "X",
|
|
@@ -1513,46 +1513,46 @@ const ua = (r) => {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
) })
|
|
1515
1515
|
] }),
|
|
1516
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1516
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
|
|
1517
1517
|
/* @__PURE__ */ t.jsx(
|
|
1518
|
-
|
|
1518
|
+
nt,
|
|
1519
1519
|
{
|
|
1520
1520
|
label: "Destination",
|
|
1521
|
-
onChange: (
|
|
1522
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1521
|
+
onChange: (I) => n(I),
|
|
1522
|
+
options: ["Go to Page", "Open Link"].filter((I) => I !== d),
|
|
1523
1523
|
value: d
|
|
1524
1524
|
}
|
|
1525
1525
|
),
|
|
1526
1526
|
d === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1527
|
-
|
|
1527
|
+
nt,
|
|
1528
1528
|
{
|
|
1529
1529
|
label: "Go to",
|
|
1530
|
-
onChange: (
|
|
1531
|
-
options:
|
|
1530
|
+
onChange: (I) => b(I),
|
|
1531
|
+
options: O ? Object.values(O).filter((I) => I.name !== c).map((I) => I.name) : [],
|
|
1532
1532
|
value: c
|
|
1533
1533
|
}
|
|
1534
1534
|
) : /* @__PURE__ */ t.jsx(
|
|
1535
|
-
|
|
1535
|
+
X,
|
|
1536
1536
|
{
|
|
1537
|
-
onChange: (
|
|
1538
|
-
value:
|
|
1537
|
+
onChange: (I) => h(I),
|
|
1538
|
+
value: g,
|
|
1539
1539
|
placeholder: "https://",
|
|
1540
1540
|
label: "Link"
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
1543
|
/* @__PURE__ */ t.jsx(
|
|
1544
|
-
|
|
1544
|
+
tt,
|
|
1545
1545
|
{
|
|
1546
1546
|
current: e.openInNewTab,
|
|
1547
1547
|
label: "Open in new tab",
|
|
1548
|
-
onChange: (
|
|
1548
|
+
onChange: (I) => C(I)
|
|
1549
1549
|
}
|
|
1550
1550
|
),
|
|
1551
1551
|
/* @__PURE__ */ t.jsx(
|
|
1552
1552
|
Ot,
|
|
1553
1553
|
{
|
|
1554
|
-
onChange: (
|
|
1555
|
-
value:
|
|
1554
|
+
onChange: (I) => x(I),
|
|
1555
|
+
value: m,
|
|
1556
1556
|
label: "Text",
|
|
1557
1557
|
maxLength: 150
|
|
1558
1558
|
}
|
|
@@ -1560,7 +1560,7 @@ const ua = (r) => {
|
|
|
1560
1560
|
/* @__PURE__ */ t.jsx(
|
|
1561
1561
|
Lt,
|
|
1562
1562
|
{
|
|
1563
|
-
typesText:
|
|
1563
|
+
typesText: a,
|
|
1564
1564
|
setTypesText: l
|
|
1565
1565
|
}
|
|
1566
1566
|
)
|
|
@@ -1568,106 +1568,106 @@ const ua = (r) => {
|
|
|
1568
1568
|
]
|
|
1569
1569
|
}
|
|
1570
1570
|
);
|
|
1571
|
-
}),
|
|
1572
|
-
subtitle:
|
|
1573
|
-
header:
|
|
1574
|
-
text:
|
|
1571
|
+
}), dn = "_subtitle_jql1y_1", un = "_header_jql1y_8", _n = "_text_jql1y_9", mn = "_productsBlock_jql1y_10", hn = "_buttonsBlock_jql1y_11", pn = "_top_jql1y_23", xn = "_itemsBlock_jql1y_32", gn = "_typeTexts_jql1y_38", fn = "_block_jql1y_45", bn = "_active_jql1y_58", vn = "_products_jql1y_10", jn = "_product_jql1y_10", yn = "_button_jql1y_11", In = "_image_jql1y_88", kn = "_info_jql1y_95", $n = "_name_jql1y_107", Nn = "_buttons_jql1y_11", wn = "_modal_jql1y_118", Cn = "_other_jql1y_138", Bn = "_options_jql1y_144", Sn = "_addButton_jql1y_150", Tn = "_deleteButton_jql1y_165", it = {
|
|
1572
|
+
subtitle: dn,
|
|
1573
|
+
header: un,
|
|
1574
|
+
text: _n,
|
|
1575
1575
|
productsBlock: mn,
|
|
1576
|
-
buttonsBlock:
|
|
1577
|
-
top:
|
|
1578
|
-
itemsBlock:
|
|
1576
|
+
buttonsBlock: hn,
|
|
1577
|
+
top: pn,
|
|
1578
|
+
itemsBlock: xn,
|
|
1579
1579
|
typeTexts: gn,
|
|
1580
|
-
block:
|
|
1581
|
-
active:
|
|
1582
|
-
products:
|
|
1583
|
-
product:
|
|
1584
|
-
button:
|
|
1585
|
-
image:
|
|
1580
|
+
block: fn,
|
|
1581
|
+
active: bn,
|
|
1582
|
+
products: vn,
|
|
1583
|
+
product: jn,
|
|
1584
|
+
button: yn,
|
|
1585
|
+
image: In,
|
|
1586
1586
|
info: kn,
|
|
1587
|
-
name:
|
|
1588
|
-
buttons:
|
|
1589
|
-
modal:
|
|
1590
|
-
other:
|
|
1591
|
-
options:
|
|
1592
|
-
addButton:
|
|
1593
|
-
deleteButton:
|
|
1594
|
-
},
|
|
1595
|
-
const { buttons:
|
|
1587
|
+
name: $n,
|
|
1588
|
+
buttons: Nn,
|
|
1589
|
+
modal: wn,
|
|
1590
|
+
other: Cn,
|
|
1591
|
+
options: Bn,
|
|
1592
|
+
addButton: Sn,
|
|
1593
|
+
deleteButton: Tn
|
|
1594
|
+
}, Pn = (r) => {
|
|
1595
|
+
const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = r, [a, l] = p.useState(null), [d, n] = p.useState({
|
|
1596
1596
|
top: 0,
|
|
1597
1597
|
left: 0
|
|
1598
|
-
}), [c, b] = p.useState(null),
|
|
1598
|
+
}), [c, b] = p.useState(null), g = p.useRef(null);
|
|
1599
1599
|
p.useEffect(() => {
|
|
1600
|
-
const
|
|
1600
|
+
const m = () => {
|
|
1601
1601
|
l(null);
|
|
1602
1602
|
};
|
|
1603
|
-
return document.body.addEventListener("click",
|
|
1604
|
-
l(null), document.body.removeEventListener("click",
|
|
1603
|
+
return document.body.addEventListener("click", m), l(null), () => {
|
|
1604
|
+
l(null), document.body.removeEventListener("click", m);
|
|
1605
1605
|
};
|
|
1606
1606
|
}, []), p.useEffect(() => {
|
|
1607
|
-
if (
|
|
1608
|
-
const
|
|
1609
|
-
e(
|
|
1607
|
+
if (a) {
|
|
1608
|
+
const m = [...o].map((x) => x.id === a.id ? a : x);
|
|
1609
|
+
e(m);
|
|
1610
1610
|
}
|
|
1611
|
-
}, [
|
|
1612
|
-
if (
|
|
1613
|
-
const
|
|
1611
|
+
}, [a]), p.useEffect(() => {
|
|
1612
|
+
if (g.current && c) {
|
|
1613
|
+
const m = g.current.getBoundingClientRect().height, x = window.innerHeight;
|
|
1614
1614
|
let u = c.top;
|
|
1615
|
-
u +
|
|
1615
|
+
u + m > x + window.scrollY - 200 && (u = x + window.scrollY - m - 200), u < 0 && (u = 10), n({
|
|
1616
1616
|
top: u,
|
|
1617
1617
|
left: c.left
|
|
1618
1618
|
});
|
|
1619
1619
|
}
|
|
1620
|
-
}, [
|
|
1621
|
-
const h = (
|
|
1622
|
-
|
|
1623
|
-
const u =
|
|
1620
|
+
}, [g.current, c]);
|
|
1621
|
+
const h = (m, x) => {
|
|
1622
|
+
m.stopPropagation();
|
|
1623
|
+
const u = m.target.getBoundingClientRect();
|
|
1624
1624
|
b({
|
|
1625
1625
|
top: u.top + window.scrollY,
|
|
1626
1626
|
left: u.left - 30
|
|
1627
|
-
}), l(
|
|
1627
|
+
}), l(x);
|
|
1628
1628
|
};
|
|
1629
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1630
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1631
|
-
|
|
1629
|
+
return /* @__PURE__ */ t.jsxs("div", { className: it.products, children: [
|
|
1630
|
+
/* @__PURE__ */ t.jsx("h5", { className: it.subtitle, children: "Button Type" }),
|
|
1631
|
+
o.map((m) => /* @__PURE__ */ t.jsxs(
|
|
1632
1632
|
"div",
|
|
1633
1633
|
{
|
|
1634
|
-
className:
|
|
1634
|
+
className: it.product,
|
|
1635
1635
|
children: [
|
|
1636
1636
|
/* @__PURE__ */ t.jsx(
|
|
1637
|
-
|
|
1637
|
+
nt,
|
|
1638
1638
|
{
|
|
1639
|
-
onChange: (
|
|
1640
|
-
const
|
|
1641
|
-
...
|
|
1642
|
-
type:
|
|
1643
|
-
} :
|
|
1644
|
-
e(
|
|
1639
|
+
onChange: (x) => {
|
|
1640
|
+
const C = [...o].map((O) => O.id === m.id ? {
|
|
1641
|
+
...m,
|
|
1642
|
+
type: x
|
|
1643
|
+
} : O);
|
|
1644
|
+
e(C);
|
|
1645
1645
|
},
|
|
1646
|
-
value:
|
|
1646
|
+
value: m.type,
|
|
1647
1647
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1648
1648
|
}
|
|
1649
1649
|
),
|
|
1650
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1651
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1650
|
+
/* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
|
|
1651
|
+
/* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1652
1652
|
v,
|
|
1653
1653
|
{
|
|
1654
1654
|
name: "Sliders",
|
|
1655
1655
|
hoverable: !0,
|
|
1656
1656
|
width: 20,
|
|
1657
1657
|
height: 20,
|
|
1658
|
-
onClick: (
|
|
1659
|
-
h(
|
|
1658
|
+
onClick: (x) => {
|
|
1659
|
+
h(x, m);
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
1662
1662
|
) }),
|
|
1663
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1663
|
+
s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1664
1664
|
v,
|
|
1665
1665
|
{
|
|
1666
1666
|
name: "Trash",
|
|
1667
1667
|
hoverable: !0,
|
|
1668
1668
|
onClick: () => {
|
|
1669
|
-
const
|
|
1670
|
-
e(
|
|
1669
|
+
const x = o.filter((u) => u.id !== m.id);
|
|
1670
|
+
e(x);
|
|
1671
1671
|
},
|
|
1672
1672
|
width: 20,
|
|
1673
1673
|
height: 20,
|
|
@@ -1677,13 +1677,13 @@ const ua = (r) => {
|
|
|
1677
1677
|
] })
|
|
1678
1678
|
]
|
|
1679
1679
|
},
|
|
1680
|
-
|
|
1680
|
+
m.id
|
|
1681
1681
|
)),
|
|
1682
|
-
|
|
1683
|
-
|
|
1682
|
+
a && /* @__PURE__ */ t.jsx(
|
|
1683
|
+
rn,
|
|
1684
1684
|
{
|
|
1685
|
-
ref:
|
|
1686
|
-
activeButton:
|
|
1685
|
+
ref: g,
|
|
1686
|
+
activeButton: a,
|
|
1687
1687
|
setActiveButton: l,
|
|
1688
1688
|
popupPosition: d
|
|
1689
1689
|
}
|
|
@@ -1697,27 +1697,27 @@ const ua = (r) => {
|
|
|
1697
1697
|
justifyContent: "center"
|
|
1698
1698
|
},
|
|
1699
1699
|
children: /* @__PURE__ */ t.jsx(
|
|
1700
|
-
|
|
1700
|
+
Z,
|
|
1701
1701
|
{
|
|
1702
1702
|
withoutHover: !0,
|
|
1703
|
-
className:
|
|
1703
|
+
className: it.button,
|
|
1704
1704
|
size: "s",
|
|
1705
1705
|
onClick: () => {
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1706
|
+
const m = [...o];
|
|
1707
|
+
m.push({
|
|
1708
1708
|
type: "Primary",
|
|
1709
|
-
id:
|
|
1709
|
+
id: _t(),
|
|
1710
1710
|
typesText: [],
|
|
1711
1711
|
destination: "Go to Page",
|
|
1712
1712
|
text: "Button Name",
|
|
1713
1713
|
page: "home",
|
|
1714
1714
|
openInNewTab: !0
|
|
1715
|
-
}), e(
|
|
1715
|
+
}), e(m);
|
|
1716
1716
|
},
|
|
1717
1717
|
style: {
|
|
1718
1718
|
width: "fit-content"
|
|
1719
1719
|
},
|
|
1720
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1720
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: it.addButton, children: [
|
|
1721
1721
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1722
1722
|
/* @__PURE__ */ t.jsx(
|
|
1723
1723
|
v,
|
|
@@ -1733,53 +1733,53 @@ const ua = (r) => {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
)
|
|
1735
1735
|
] });
|
|
1736
|
-
},
|
|
1737
|
-
const { isActiveButtons:
|
|
1738
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1739
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1740
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1736
|
+
}, va = (r) => {
|
|
1737
|
+
const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = r;
|
|
1738
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
|
|
1739
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1740
|
+
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
|
|
1741
1741
|
/* @__PURE__ */ t.jsx(
|
|
1742
|
-
|
|
1742
|
+
tt,
|
|
1743
1743
|
{
|
|
1744
|
-
current:
|
|
1745
|
-
onChange: (
|
|
1744
|
+
current: o,
|
|
1745
|
+
onChange: (a) => e(a)
|
|
1746
1746
|
}
|
|
1747
1747
|
)
|
|
1748
1748
|
] }),
|
|
1749
1749
|
/* @__PURE__ */ t.jsx(
|
|
1750
|
-
|
|
1750
|
+
Pn,
|
|
1751
1751
|
{
|
|
1752
1752
|
buttons: s,
|
|
1753
1753
|
setButtons: i
|
|
1754
1754
|
}
|
|
1755
1755
|
)
|
|
1756
1756
|
] }) });
|
|
1757
|
-
},
|
|
1758
|
-
wrapper:
|
|
1759
|
-
subtitle:
|
|
1757
|
+
}, An = "_wrapper_m18qi_1", Mn = "_subtitle_m18qi_7", On = "_content_m18qi_14", qn = "_range_m18qi_22", En = "_track_m18qi_27", Dn = "_progress_m18qi_36", Ln = "_dots_m18qi_46", Rn = "_dot_m18qi_46", Hn = "_active_m18qi_65", zn = "_input_m18qi_77", Fn = "_countBlock_m18qi_91", Vn = "_count_m18qi_91", Un = "_controls_m18qi_107", Yn = "_button_m18qi_113", Y = {
|
|
1758
|
+
wrapper: An,
|
|
1759
|
+
subtitle: Mn,
|
|
1760
1760
|
content: On,
|
|
1761
1761
|
range: qn,
|
|
1762
1762
|
track: En,
|
|
1763
1763
|
progress: Dn,
|
|
1764
1764
|
dots: Ln,
|
|
1765
1765
|
dot: Rn,
|
|
1766
|
-
active:
|
|
1767
|
-
input:
|
|
1768
|
-
countBlock:
|
|
1769
|
-
count:
|
|
1770
|
-
controls:
|
|
1771
|
-
button:
|
|
1772
|
-
},
|
|
1773
|
-
const { label:
|
|
1774
|
-
|
|
1766
|
+
active: Hn,
|
|
1767
|
+
input: zn,
|
|
1768
|
+
countBlock: Fn,
|
|
1769
|
+
count: Vn,
|
|
1770
|
+
controls: Un,
|
|
1771
|
+
button: Yn
|
|
1772
|
+
}, Mt = (r) => {
|
|
1773
|
+
const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = r, [d, n] = p.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), b = (a - e) / (s - e) * 100, g = () => {
|
|
1774
|
+
a < s && l(a + i);
|
|
1775
1775
|
}, h = () => {
|
|
1776
|
-
|
|
1777
|
-
},
|
|
1778
|
-
const u = e +
|
|
1776
|
+
a > e && l(a - i);
|
|
1777
|
+
}, m = (x) => {
|
|
1778
|
+
const u = e + x * i;
|
|
1779
1779
|
l(u);
|
|
1780
1780
|
};
|
|
1781
1781
|
return /* @__PURE__ */ t.jsxs("div", { className: Y.wrapper, children: [
|
|
1782
|
-
|
|
1782
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: o }),
|
|
1783
1783
|
/* @__PURE__ */ t.jsxs("div", { className: Y.content, children: [
|
|
1784
1784
|
/* @__PURE__ */ t.jsxs("div", { className: Y.range, children: [
|
|
1785
1785
|
/* @__PURE__ */ t.jsx("div", { className: Y.track }),
|
|
@@ -1790,15 +1790,15 @@ const ua = (r) => {
|
|
|
1790
1790
|
style: { width: `${b}%` }
|
|
1791
1791
|
}
|
|
1792
1792
|
),
|
|
1793
|
-
/* @__PURE__ */ t.jsx("div", { className: Y.dots, children: c.map((
|
|
1794
|
-
const
|
|
1793
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.dots, children: c.map((x, u) => {
|
|
1794
|
+
const C = u <= (a - e) / i;
|
|
1795
1795
|
return /* @__PURE__ */ t.jsx(
|
|
1796
1796
|
"button",
|
|
1797
1797
|
{
|
|
1798
|
-
onClick: () =>
|
|
1798
|
+
onClick: () => m(u),
|
|
1799
1799
|
className: F(Y.dot, {
|
|
1800
|
-
[Y.active]:
|
|
1801
|
-
[Y.inactive]: !
|
|
1800
|
+
[Y.active]: C,
|
|
1801
|
+
[Y.inactive]: !C,
|
|
1802
1802
|
[Y.dragging]: d
|
|
1803
1803
|
}),
|
|
1804
1804
|
"aria-label": `Set value to ${e + u * i}`
|
|
@@ -1813,8 +1813,8 @@ const ua = (r) => {
|
|
|
1813
1813
|
min: e,
|
|
1814
1814
|
max: s,
|
|
1815
1815
|
step: i,
|
|
1816
|
-
value:
|
|
1817
|
-
onChange: (
|
|
1816
|
+
value: a,
|
|
1817
|
+
onChange: (x) => l(Number(x.target.value)),
|
|
1818
1818
|
onMouseDown: () => n(!0),
|
|
1819
1819
|
onMouseUp: () => n(!1),
|
|
1820
1820
|
onTouchStart: () => n(!0),
|
|
@@ -1825,25 +1825,25 @@ const ua = (r) => {
|
|
|
1825
1825
|
] }),
|
|
1826
1826
|
/* @__PURE__ */ t.jsxs("div", { className: Y.countBlock, children: [
|
|
1827
1827
|
/* @__PURE__ */ t.jsx(
|
|
1828
|
-
|
|
1828
|
+
X,
|
|
1829
1829
|
{
|
|
1830
1830
|
type: "number",
|
|
1831
1831
|
min: e,
|
|
1832
1832
|
max: s,
|
|
1833
1833
|
paddingless: !0,
|
|
1834
|
-
onChange: (
|
|
1835
|
-
const u = Number(
|
|
1834
|
+
onChange: (x) => {
|
|
1835
|
+
const u = Number(x);
|
|
1836
1836
|
u > s ? l(s) : u < e ? l(e) : l(u);
|
|
1837
1837
|
},
|
|
1838
|
-
value: String(
|
|
1838
|
+
value: String(a)
|
|
1839
1839
|
}
|
|
1840
1840
|
),
|
|
1841
1841
|
/* @__PURE__ */ t.jsxs("div", { className: Y.controls, children: [
|
|
1842
1842
|
/* @__PURE__ */ t.jsx(
|
|
1843
1843
|
"button",
|
|
1844
1844
|
{
|
|
1845
|
-
onClick:
|
|
1846
|
-
disabled:
|
|
1845
|
+
onClick: g,
|
|
1846
|
+
disabled: a >= s,
|
|
1847
1847
|
className: Y.button,
|
|
1848
1848
|
"aria-label": "Increment count",
|
|
1849
1849
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1860,7 +1860,7 @@ const ua = (r) => {
|
|
|
1860
1860
|
"button",
|
|
1861
1861
|
{
|
|
1862
1862
|
onClick: h,
|
|
1863
|
-
disabled:
|
|
1863
|
+
disabled: a <= e,
|
|
1864
1864
|
className: Y.button,
|
|
1865
1865
|
"aria-label": "Decrement count",
|
|
1866
1866
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1877,32 +1877,32 @@ const ua = (r) => {
|
|
|
1877
1877
|
] })
|
|
1878
1878
|
] })
|
|
1879
1879
|
] });
|
|
1880
|
-
},
|
|
1881
|
-
title:
|
|
1882
|
-
subtitle:
|
|
1880
|
+
}, Gn = "_title_ix5ax_1", Xn = "_subtitle_ix5ax_5", Wn = "_header_ix5ax_12", Jn = "_text_ix5ax_13", Qn = "_productsBlock_ix5ax_14", Kn = "_top_ix5ax_26", Zn = "_itemsBlock_ix5ax_35", ti = "_typeTexts_ix5ax_41", ei = "_block_ix5ax_48", si = "_active_ix5ax_61", ni = "_products_ix5ax_14", ii = "_product_ix5ax_14", oi = "_button_ix5ax_80", ai = "_image_ix5ax_91", ci = "_info_ix5ax_98", li = "_name_ix5ax_110", ri = "_buttons_ix5ax_114", di = "_modal_ix5ax_121", ui = "_link_ix5ax_141", _i = "_modalOptions_ix5ax_147", mi = "_addButton_ix5ax_160", hi = "_deleteButton_ix5ax_175", pi = "_closeIcon_ix5ax_187", V = {
|
|
1881
|
+
title: Gn,
|
|
1882
|
+
subtitle: Xn,
|
|
1883
1883
|
header: Wn,
|
|
1884
|
-
text:
|
|
1885
|
-
productsBlock:
|
|
1886
|
-
top:
|
|
1887
|
-
itemsBlock:
|
|
1888
|
-
typeTexts:
|
|
1889
|
-
block:
|
|
1890
|
-
active:
|
|
1891
|
-
products:
|
|
1892
|
-
product:
|
|
1893
|
-
button:
|
|
1894
|
-
image:
|
|
1895
|
-
info:
|
|
1896
|
-
name:
|
|
1897
|
-
buttons:
|
|
1898
|
-
modal:
|
|
1899
|
-
link:
|
|
1900
|
-
modalOptions:
|
|
1884
|
+
text: Jn,
|
|
1885
|
+
productsBlock: Qn,
|
|
1886
|
+
top: Kn,
|
|
1887
|
+
itemsBlock: Zn,
|
|
1888
|
+
typeTexts: ti,
|
|
1889
|
+
block: ei,
|
|
1890
|
+
active: si,
|
|
1891
|
+
products: ni,
|
|
1892
|
+
product: ii,
|
|
1893
|
+
button: oi,
|
|
1894
|
+
image: ai,
|
|
1895
|
+
info: ci,
|
|
1896
|
+
name: li,
|
|
1897
|
+
buttons: ri,
|
|
1898
|
+
modal: di,
|
|
1899
|
+
link: ui,
|
|
1900
|
+
modalOptions: _i,
|
|
1901
1901
|
addButton: mi,
|
|
1902
|
-
deleteButton:
|
|
1903
|
-
closeIcon:
|
|
1904
|
-
},
|
|
1905
|
-
const { activeItem:
|
|
1902
|
+
deleteButton: hi,
|
|
1903
|
+
closeIcon: pi
|
|
1904
|
+
}, xi = (r) => {
|
|
1905
|
+
const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = r, l = a.find((n) => n.id === o.listingId);
|
|
1906
1906
|
if (!l) return null;
|
|
1907
1907
|
function d(n, c) {
|
|
1908
1908
|
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
@@ -1940,7 +1940,7 @@ const ua = (r) => {
|
|
|
1940
1940
|
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
1941
1941
|
onChange: (n) => {
|
|
1942
1942
|
const c = {
|
|
1943
|
-
...
|
|
1943
|
+
...o,
|
|
1944
1944
|
image: n[0]
|
|
1945
1945
|
};
|
|
1946
1946
|
e(c);
|
|
@@ -1952,16 +1952,16 @@ const ua = (r) => {
|
|
|
1952
1952
|
);
|
|
1953
1953
|
};
|
|
1954
1954
|
function gi(r) {
|
|
1955
|
-
const { product:
|
|
1956
|
-
id: String(
|
|
1955
|
+
const { product: o, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: d, isDragging: n } = Bt({
|
|
1956
|
+
id: String(o.listingId)
|
|
1957
1957
|
}), c = {
|
|
1958
|
-
transform:
|
|
1958
|
+
transform: St.Transform.toString(l),
|
|
1959
1959
|
transition: d
|
|
1960
1960
|
};
|
|
1961
1961
|
return /* @__PURE__ */ t.jsx(
|
|
1962
1962
|
"div",
|
|
1963
1963
|
{
|
|
1964
|
-
ref:
|
|
1964
|
+
ref: a,
|
|
1965
1965
|
style: c,
|
|
1966
1966
|
className: `${V.product} ${n ? V.dragging : ""}`,
|
|
1967
1967
|
...s,
|
|
@@ -1970,29 +1970,29 @@ function gi(r) {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
);
|
|
1972
1972
|
}
|
|
1973
|
-
const
|
|
1973
|
+
const ja = (r) => {
|
|
1974
1974
|
const {
|
|
1975
|
-
isActiveItems:
|
|
1975
|
+
isActiveItems: o,
|
|
1976
1976
|
setIsActiveItems: e,
|
|
1977
1977
|
items: s,
|
|
1978
1978
|
setItems: i,
|
|
1979
|
-
other:
|
|
1979
|
+
other: a,
|
|
1980
1980
|
title: l,
|
|
1981
1981
|
subtitle: d,
|
|
1982
1982
|
editable: n = !0,
|
|
1983
1983
|
draggable: c = !1,
|
|
1984
1984
|
withImage: b = !1,
|
|
1985
|
-
deletable:
|
|
1985
|
+
deletable: g = !0,
|
|
1986
1986
|
addable: h = !0,
|
|
1987
|
-
itemsType:
|
|
1988
|
-
itemsOptions:
|
|
1989
|
-
} = r, [u,
|
|
1987
|
+
itemsType: m,
|
|
1988
|
+
itemsOptions: x
|
|
1989
|
+
} = r, [u, C] = p.useState(
|
|
1990
1990
|
null
|
|
1991
|
-
), [
|
|
1991
|
+
), [O, I] = p.useState({
|
|
1992
1992
|
top: 0,
|
|
1993
1993
|
left: 0
|
|
1994
|
-
}), [
|
|
1995
|
-
|
|
1994
|
+
}), [D, B] = p.useState(!1), S = It(
|
|
1995
|
+
kt(Ct, {
|
|
1996
1996
|
activationConstraint: {
|
|
1997
1997
|
distance: 5
|
|
1998
1998
|
}
|
|
@@ -2000,10 +2000,10 @@ const _a = (r) => {
|
|
|
2000
2000
|
);
|
|
2001
2001
|
p.useEffect(() => {
|
|
2002
2002
|
const y = () => {
|
|
2003
|
-
|
|
2003
|
+
C(null), B(!1);
|
|
2004
2004
|
};
|
|
2005
|
-
return document.body.addEventListener("click", y),
|
|
2006
|
-
|
|
2005
|
+
return document.body.addEventListener("click", y), C(null), B(!1), () => {
|
|
2006
|
+
C(null), B(!1), document.body.removeEventListener("click", y);
|
|
2007
2007
|
};
|
|
2008
2008
|
}, []), p.useEffect(() => {
|
|
2009
2009
|
if (u) {
|
|
@@ -2013,14 +2013,14 @@ const _a = (r) => {
|
|
|
2013
2013
|
}, [u]);
|
|
2014
2014
|
const f = (y, $) => {
|
|
2015
2015
|
y.stopPropagation();
|
|
2016
|
-
const
|
|
2017
|
-
let H =
|
|
2018
|
-
H + G > A && (H = A - G - 20), B(!0),
|
|
2016
|
+
const q = y.target.getBoundingClientRect(), G = 100, A = window.innerHeight;
|
|
2017
|
+
let H = q.top + window.scrollY;
|
|
2018
|
+
H + G > A && (H = A - G - 20), B(!0), I({
|
|
2019
2019
|
top: H - 80,
|
|
2020
|
-
left:
|
|
2021
|
-
}),
|
|
2020
|
+
left: q.left - 30
|
|
2021
|
+
}), C($);
|
|
2022
2022
|
};
|
|
2023
|
-
function
|
|
2023
|
+
function E(y) {
|
|
2024
2024
|
if (b)
|
|
2025
2025
|
return y ? /* @__PURE__ */ t.jsx(
|
|
2026
2026
|
"img",
|
|
@@ -2040,18 +2040,18 @@ const _a = (r) => {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
);
|
|
2042
2042
|
}
|
|
2043
|
-
const
|
|
2044
|
-
const { active: $, over:
|
|
2045
|
-
if (
|
|
2046
|
-
const G = s.findIndex((H) => String(H.listingId) === $.id), A = s.findIndex((H) => String(H.listingId) ===
|
|
2043
|
+
const W = (y) => {
|
|
2044
|
+
const { active: $, over: q } = y;
|
|
2045
|
+
if (q && $.id !== q.id) {
|
|
2046
|
+
const G = s.findIndex((H) => String(H.listingId) === $.id), A = s.findIndex((H) => String(H.listingId) === q.id);
|
|
2047
2047
|
if (G !== -1 && A !== -1) {
|
|
2048
2048
|
const H = [...s], [K] = H.splice(G, 1);
|
|
2049
2049
|
H.splice(A, 0, K), i(H);
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
},
|
|
2053
|
-
const
|
|
2054
|
-
if (!
|
|
2052
|
+
}, et = (y, $) => {
|
|
2053
|
+
const q = x.find((A) => y.listingId === A.id);
|
|
2054
|
+
if (!q) return null;
|
|
2055
2055
|
const G = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2056
2056
|
c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2057
2057
|
v,
|
|
@@ -2062,24 +2062,24 @@ const _a = (r) => {
|
|
|
2062
2062
|
height: 20
|
|
2063
2063
|
}
|
|
2064
2064
|
) }),
|
|
2065
|
-
|
|
2066
|
-
|
|
2065
|
+
m === "select" && /* @__PURE__ */ t.jsx(
|
|
2066
|
+
nt,
|
|
2067
2067
|
{
|
|
2068
2068
|
onChange: (A) => {
|
|
2069
|
-
const H = [...s], K =
|
|
2069
|
+
const H = [...s], K = x.find((M) => M.productData.name === A);
|
|
2070
2070
|
if (!K) return;
|
|
2071
2071
|
const lt = {
|
|
2072
2072
|
listingId: K.id,
|
|
2073
2073
|
image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
|
|
2074
|
-
}, j = H.map((
|
|
2075
|
-
|
|
2074
|
+
}, j = H.map((M) => M.listingId === y.listingId ? lt : M);
|
|
2075
|
+
C(lt), i([...j]);
|
|
2076
2076
|
},
|
|
2077
|
-
value:
|
|
2077
|
+
value: q.productData.name,
|
|
2078
2078
|
options: [
|
|
2079
|
-
...
|
|
2079
|
+
...x.filter((A) => !s.find((H) => H.listingId === A.id)).map((A) => A.productData.name)
|
|
2080
2080
|
],
|
|
2081
|
-
leftAddon:
|
|
2082
|
-
y.image ||
|
|
2081
|
+
leftAddon: E(
|
|
2082
|
+
y.image || q.productData.images.length > 0 && q.productData.images[0].cfId || ""
|
|
2083
2083
|
)
|
|
2084
2084
|
},
|
|
2085
2085
|
$
|
|
@@ -2095,7 +2095,7 @@ const _a = (r) => {
|
|
|
2095
2095
|
onClick: (A) => f(A, y)
|
|
2096
2096
|
}
|
|
2097
2097
|
) }),
|
|
2098
|
-
|
|
2098
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2099
2099
|
v,
|
|
2100
2100
|
{
|
|
2101
2101
|
name: "Trash",
|
|
@@ -2125,43 +2125,43 @@ const _a = (r) => {
|
|
|
2125
2125
|
);
|
|
2126
2126
|
};
|
|
2127
2127
|
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
2128
|
-
(l ||
|
|
2128
|
+
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
2129
2129
|
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
2130
|
-
|
|
2131
|
-
|
|
2130
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2131
|
+
tt,
|
|
2132
2132
|
{
|
|
2133
|
-
current:
|
|
2133
|
+
current: o,
|
|
2134
2134
|
onChange: (y) => e == null ? void 0 : e(y)
|
|
2135
2135
|
}
|
|
2136
2136
|
)
|
|
2137
2137
|
] }),
|
|
2138
|
-
|
|
2139
|
-
|
|
2138
|
+
D && u && /* @__PURE__ */ t.jsx(
|
|
2139
|
+
xi,
|
|
2140
2140
|
{
|
|
2141
2141
|
activeItem: u,
|
|
2142
|
-
setActiveItem:
|
|
2142
|
+
setActiveItem: C,
|
|
2143
2143
|
setIsOpenModal: B,
|
|
2144
|
-
popupPosition:
|
|
2145
|
-
itemsOptions:
|
|
2144
|
+
popupPosition: O,
|
|
2145
|
+
itemsOptions: x
|
|
2146
2146
|
}
|
|
2147
2147
|
),
|
|
2148
2148
|
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
2149
2149
|
d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
|
|
2150
2150
|
c ? /* @__PURE__ */ t.jsx(
|
|
2151
|
-
|
|
2151
|
+
$t,
|
|
2152
2152
|
{
|
|
2153
2153
|
sensors: S,
|
|
2154
|
-
onDragEnd:
|
|
2154
|
+
onDragEnd: W,
|
|
2155
2155
|
children: /* @__PURE__ */ t.jsx(
|
|
2156
|
-
|
|
2156
|
+
Nt,
|
|
2157
2157
|
{
|
|
2158
2158
|
items: s.map((y) => String(y.listingId)),
|
|
2159
|
-
strategy:
|
|
2160
|
-
children: s.map((y, $) =>
|
|
2159
|
+
strategy: wt,
|
|
2160
|
+
children: s.map((y, $) => et(y, $))
|
|
2161
2161
|
}
|
|
2162
2162
|
)
|
|
2163
2163
|
}
|
|
2164
|
-
) : s.map((y, $) =>
|
|
2164
|
+
) : s.map((y, $) => et(y, $)),
|
|
2165
2165
|
h && /* @__PURE__ */ t.jsx(
|
|
2166
2166
|
"div",
|
|
2167
2167
|
{
|
|
@@ -2171,24 +2171,24 @@ const _a = (r) => {
|
|
|
2171
2171
|
justifyContent: "center"
|
|
2172
2172
|
},
|
|
2173
2173
|
children: /* @__PURE__ */ t.jsx(
|
|
2174
|
-
|
|
2174
|
+
Z,
|
|
2175
2175
|
{
|
|
2176
2176
|
withoutHover: !0,
|
|
2177
2177
|
className: V.button,
|
|
2178
2178
|
size: "s",
|
|
2179
2179
|
onClick: () => {
|
|
2180
2180
|
const y = [...s];
|
|
2181
|
-
for (let $ = 0; $ <
|
|
2182
|
-
if (!s.find((
|
|
2181
|
+
for (let $ = 0; $ < x.length; $++)
|
|
2182
|
+
if (!s.find((q) => q.listingId === x[$].id)) {
|
|
2183
2183
|
y.push({
|
|
2184
|
-
listingId:
|
|
2185
|
-
image:
|
|
2184
|
+
listingId: x[$].id,
|
|
2185
|
+
image: x[$].productData.images.length > 0 ? x[$].productData.images[0].cfId : ""
|
|
2186
2186
|
});
|
|
2187
2187
|
break;
|
|
2188
2188
|
}
|
|
2189
2189
|
i(y);
|
|
2190
2190
|
},
|
|
2191
|
-
disabled: s.length ===
|
|
2191
|
+
disabled: s.length === x.length,
|
|
2192
2192
|
style: {
|
|
2193
2193
|
width: "fit-content"
|
|
2194
2194
|
},
|
|
@@ -2208,26 +2208,26 @@ const _a = (r) => {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
)
|
|
2210
2210
|
] }),
|
|
2211
|
-
|
|
2211
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(vt, { items: a })
|
|
2212
2212
|
] });
|
|
2213
|
-
},
|
|
2214
|
-
options:
|
|
2215
|
-
price:
|
|
2216
|
-
oldPrice:
|
|
2217
|
-
newPrice:
|
|
2218
|
-
animate:
|
|
2219
|
-
appearAndBounce:
|
|
2213
|
+
}, fi = "_options_d1lk6_1", bi = "_price_d1lk6_12", vi = "_oldPrice_d1lk6_19", ji = "_newPrice_d1lk6_27", yi = "_animate_d1lk6_34", Ii = "_appearAndBounce_d1lk6_1", ki = "_meta_d1lk6_52", $i = "_info_d1lk6_58", Ni = "_infoRight_d1lk6_66", wi = "_buttons_d1lk6_73", Ci = "_variants_d1lk6_80", Bi = "_variant_d1lk6_80", Si = "_stock_d1lk6_98", Ti = "_variantInfo_d1lk6_105", Pi = "_quantity_d1lk6_111", Ai = "_count_d1lk6_118", Mi = "_focused_d1lk6_135", Oi = "_button_d1lk6_73", qi = "_activeVariant_d1lk6_161", Ei = "_chargeTypes_d1lk6_165", Di = "_charge_d1lk6_165", Li = "_chargeActive_d1lk6_190", Ri = "_title_d1lk6_198", N = {
|
|
2214
|
+
options: fi,
|
|
2215
|
+
price: bi,
|
|
2216
|
+
oldPrice: vi,
|
|
2217
|
+
newPrice: ji,
|
|
2218
|
+
animate: yi,
|
|
2219
|
+
appearAndBounce: Ii,
|
|
2220
2220
|
meta: ki,
|
|
2221
|
-
info:
|
|
2222
|
-
infoRight:
|
|
2223
|
-
buttons:
|
|
2224
|
-
variants:
|
|
2225
|
-
variant:
|
|
2226
|
-
stock:
|
|
2227
|
-
variantInfo:
|
|
2228
|
-
quantity:
|
|
2229
|
-
count:
|
|
2230
|
-
focused:
|
|
2221
|
+
info: $i,
|
|
2222
|
+
infoRight: Ni,
|
|
2223
|
+
buttons: wi,
|
|
2224
|
+
variants: Ci,
|
|
2225
|
+
variant: Bi,
|
|
2226
|
+
stock: Si,
|
|
2227
|
+
variantInfo: Ti,
|
|
2228
|
+
quantity: Pi,
|
|
2229
|
+
count: Ai,
|
|
2230
|
+
focused: Mi,
|
|
2231
2231
|
button: Oi,
|
|
2232
2232
|
activeVariant: qi,
|
|
2233
2233
|
chargeTypes: Ei,
|
|
@@ -2235,26 +2235,26 @@ const _a = (r) => {
|
|
|
2235
2235
|
chargeActive: Li,
|
|
2236
2236
|
title: Ri
|
|
2237
2237
|
};
|
|
2238
|
-
var
|
|
2239
|
-
const
|
|
2238
|
+
var Ht = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(Ht || {});
|
|
2239
|
+
const ya = (r) => {
|
|
2240
2240
|
var B, S;
|
|
2241
|
-
const { variants:
|
|
2241
|
+
const { variants: o } = r, [e, s] = p.useState(o[0]), [i, a] = p.useState(e.chargeTypes[0]), l = Tt(), [d, n] = p.useState(1), [c, b] = p.useState(!1), { reset: g, addProductToCart: h, getProducts: m } = Pt(), [x, u] = p.useState(!1);
|
|
2242
2242
|
p.useEffect(() => {
|
|
2243
2243
|
u(!0);
|
|
2244
2244
|
const f = setTimeout(() => u(!1), 600);
|
|
2245
2245
|
return () => clearTimeout(f);
|
|
2246
2246
|
}, [d]);
|
|
2247
|
-
async function
|
|
2248
|
-
await
|
|
2247
|
+
async function C() {
|
|
2248
|
+
await m(), await h({
|
|
2249
2249
|
productId: r.id,
|
|
2250
2250
|
productVariantId: e.id,
|
|
2251
2251
|
quantity: d
|
|
2252
2252
|
});
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2255
|
-
|
|
2254
|
+
function O() {
|
|
2255
|
+
g(), C(), l("/checkout");
|
|
2256
2256
|
}
|
|
2257
|
-
function
|
|
2257
|
+
function I(f) {
|
|
2258
2258
|
if (f >= 864e5) {
|
|
2259
2259
|
const $ = Math.floor(f / 864e5);
|
|
2260
2260
|
return `${$} ${$ === 1 ? "day" : "days"}`;
|
|
@@ -2269,8 +2269,8 @@ const ha = (r) => {
|
|
|
2269
2269
|
return `${$} ${$ === 1 ? "second" : "seconds"}`;
|
|
2270
2270
|
}
|
|
2271
2271
|
}
|
|
2272
|
-
function
|
|
2273
|
-
return f.length >
|
|
2272
|
+
function D(f, E) {
|
|
2273
|
+
return f.length > E ? f.slice(0, E) + "..." : f;
|
|
2274
2274
|
}
|
|
2275
2275
|
return /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
|
|
2276
2276
|
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
@@ -2279,13 +2279,13 @@ const ha = (r) => {
|
|
|
2279
2279
|
className: F(N.charge, {
|
|
2280
2280
|
[N.chargeActive]: i === f
|
|
2281
2281
|
}),
|
|
2282
|
-
onClick: () =>
|
|
2283
|
-
children:
|
|
2282
|
+
onClick: () => a(f),
|
|
2283
|
+
children: Ht[f]
|
|
2284
2284
|
},
|
|
2285
2285
|
f
|
|
2286
2286
|
)) }),
|
|
2287
|
-
/* @__PURE__ */ t.jsx("div", { className: N.variants, children:
|
|
2288
|
-
var
|
|
2287
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: o.map((f) => {
|
|
2288
|
+
var E;
|
|
2289
2289
|
return /* @__PURE__ */ t.jsxs(
|
|
2290
2290
|
"div",
|
|
2291
2291
|
{
|
|
@@ -2295,14 +2295,14 @@ const ha = (r) => {
|
|
|
2295
2295
|
onClick: () => s(f),
|
|
2296
2296
|
children: [
|
|
2297
2297
|
/* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
|
|
2298
|
-
/* @__PURE__ */ t.jsx("span", { className: N.title, children:
|
|
2298
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: D(f.name, 15) }),
|
|
2299
2299
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2300
2300
|
"$",
|
|
2301
2301
|
i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
2302
2302
|
] })
|
|
2303
2303
|
] }),
|
|
2304
2304
|
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
|
|
2305
|
-
((
|
|
2305
|
+
((E = f.quantity.restrictions) == null ? void 0 : E.max) || f.quantity.available || 0,
|
|
2306
2306
|
" in stock"
|
|
2307
2307
|
] }) })
|
|
2308
2308
|
]
|
|
@@ -2331,7 +2331,7 @@ const ha = (r) => {
|
|
|
2331
2331
|
onFocus: () => b(!0),
|
|
2332
2332
|
onBlur: () => b(!1),
|
|
2333
2333
|
children: /* @__PURE__ */ t.jsx(
|
|
2334
|
-
|
|
2334
|
+
X,
|
|
2335
2335
|
{
|
|
2336
2336
|
type: "number",
|
|
2337
2337
|
value: String(d),
|
|
@@ -2372,13 +2372,13 @@ const ha = (r) => {
|
|
|
2372
2372
|
height: 20
|
|
2373
2373
|
}
|
|
2374
2374
|
),
|
|
2375
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2375
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : I(e.deliveryTime) })
|
|
2376
2376
|
] })
|
|
2377
2377
|
] }),
|
|
2378
2378
|
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2379
2379
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2380
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]:
|
|
2381
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: x }), children: [
|
|
2382
2382
|
"$ ",
|
|
2383
2383
|
(e.price.amount || 0) * d
|
|
2384
2384
|
] }),
|
|
@@ -2386,11 +2386,11 @@ const ha = (r) => {
|
|
|
2386
2386
|
"$ ",
|
|
2387
2387
|
(e.compareAtPrice.amount || 0) * d
|
|
2388
2388
|
] })
|
|
2389
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]:
|
|
2389
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: x }), children: [
|
|
2390
2390
|
"$ ",
|
|
2391
2391
|
(e.price.amount || 0) * d
|
|
2392
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]:
|
|
2393
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: x }), children: [
|
|
2394
2394
|
"$ ",
|
|
2395
2395
|
e.subscriptionSettings.price.amount || 0
|
|
2396
2396
|
] }),
|
|
@@ -2398,7 +2398,7 @@ const ha = (r) => {
|
|
|
2398
2398
|
"$ ",
|
|
2399
2399
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2400
2400
|
] })
|
|
2401
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]:
|
|
2401
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(N.newPrice, { [N.animate]: x }), children: [
|
|
2402
2402
|
"$ ",
|
|
2403
2403
|
e.subscriptionSettings.price.amount || 0
|
|
2404
2404
|
] }) })
|
|
@@ -2406,86 +2406,92 @@ const ha = (r) => {
|
|
|
2406
2406
|
] }),
|
|
2407
2407
|
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
2408
2408
|
/* @__PURE__ */ t.jsx(
|
|
2409
|
-
|
|
2409
|
+
Z,
|
|
2410
2410
|
{
|
|
2411
2411
|
type: "Primary",
|
|
2412
|
-
onClick: () =>
|
|
2412
|
+
onClick: () => O(),
|
|
2413
2413
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2414
2414
|
}
|
|
2415
2415
|
),
|
|
2416
2416
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2417
|
-
|
|
2417
|
+
Z,
|
|
2418
2418
|
{
|
|
2419
2419
|
type: "Secondary",
|
|
2420
|
-
onClick: () =>
|
|
2420
|
+
onClick: () => C(),
|
|
2421
2421
|
children: "Add to Cart"
|
|
2422
2422
|
}
|
|
2423
2423
|
)
|
|
2424
2424
|
] })
|
|
2425
2425
|
] });
|
|
2426
|
-
},
|
|
2427
|
-
button:
|
|
2428
|
-
login:
|
|
2429
|
-
signUp:
|
|
2430
|
-
buttons:
|
|
2431
|
-
modal:
|
|
2432
|
-
"slide-in-fade": "_slide-in-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2426
|
+
}, Hi = "_button_1tdo3_1", zi = "_login_1tdo3_14", Fi = "_signUp_1tdo3_18", Vi = "_buttons_1tdo3_23", Ui = "_modal_1tdo3_32", Yi = "_closing_1tdo3_64", Gi = "_info_1tdo3_113", Xi = "_top_1tdo3_120", Wi = "_title_1tdo3_131", Ji = "_clear_1tdo3_138", Qi = "_activeClear_1tdo3_145", Ki = "_count_1tdo3_149", Zi = "_cart_1tdo3_164", to = "_empty_1tdo3_172", eo = "_product_1tdo3_198", so = "_products_1tdo3_207", no = "_image_1tdo3_215", io = "_productInfo_1tdo3_221", oo = "_content_1tdo3_228", ao = "_name_1tdo3_234", co = "_price_1tdo3_240", lo = "_productButtons_1tdo3_246", ro = "_productButton_1tdo3_246", uo = "_productCount_1tdo3_266", _o = "_bottom_1tdo3_282", mo = "_subtotal_1tdo3_290", ho = "_block_1tdo3_298", po = "_shoppingCount_1tdo3_305", xo = "_total_1tdo3_325", go = "_link_1tdo3_331", fo = "_userInfo_1tdo3_338", bo = "_pagesMobileModal_1tdo3_349", vo = "_pagesMobileModalContent_1tdo3_363", jo = "_pagesMobileModalHeader_1tdo3_369", yo = "_pagesMobileModalFooter_1tdo3_379", w = {
|
|
2427
|
+
button: Hi,
|
|
2428
|
+
login: zi,
|
|
2429
|
+
signUp: Fi,
|
|
2430
|
+
buttons: Vi,
|
|
2431
|
+
modal: Ui,
|
|
2432
|
+
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2433
|
+
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2434
|
+
closing: Yi,
|
|
2435
|
+
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2436
|
+
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2437
|
+
info: Gi,
|
|
2438
|
+
top: Xi,
|
|
2437
2439
|
title: Wi,
|
|
2438
|
-
clear:
|
|
2439
|
-
activeClear:
|
|
2440
|
-
count:
|
|
2441
|
-
cart:
|
|
2442
|
-
empty:
|
|
2443
|
-
product:
|
|
2444
|
-
products:
|
|
2445
|
-
image:
|
|
2446
|
-
productInfo:
|
|
2447
|
-
content:
|
|
2448
|
-
name:
|
|
2449
|
-
price:
|
|
2450
|
-
productButtons:
|
|
2451
|
-
productButton:
|
|
2452
|
-
productCount:
|
|
2453
|
-
bottom:
|
|
2440
|
+
clear: Ji,
|
|
2441
|
+
activeClear: Qi,
|
|
2442
|
+
count: Ki,
|
|
2443
|
+
cart: Zi,
|
|
2444
|
+
empty: to,
|
|
2445
|
+
product: eo,
|
|
2446
|
+
products: so,
|
|
2447
|
+
image: no,
|
|
2448
|
+
productInfo: io,
|
|
2449
|
+
content: oo,
|
|
2450
|
+
name: ao,
|
|
2451
|
+
price: co,
|
|
2452
|
+
productButtons: lo,
|
|
2453
|
+
productButton: ro,
|
|
2454
|
+
productCount: uo,
|
|
2455
|
+
bottom: _o,
|
|
2454
2456
|
subtotal: mo,
|
|
2455
|
-
block:
|
|
2456
|
-
shoppingCount:
|
|
2457
|
-
total:
|
|
2457
|
+
block: ho,
|
|
2458
|
+
shoppingCount: po,
|
|
2459
|
+
total: xo,
|
|
2458
2460
|
link: go,
|
|
2459
|
-
userInfo:
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2461
|
+
userInfo: fo,
|
|
2462
|
+
pagesMobileModal: bo,
|
|
2463
|
+
pagesMobileModalContent: vo,
|
|
2464
|
+
pagesMobileModalHeader: jo,
|
|
2465
|
+
pagesMobileModalFooter: yo
|
|
2466
|
+
}, Io = "_button_85085_1", ko = "_primary_85085_20", $o = "_primaryHovered_85085_30", No = "_secondary_85085_34", wo = "_secondaryHovered_85085_44", Co = "_tertiary_85085_48", Bo = "_tertiaryHovered_85085_58", So = "_content_85085_62", ot = {
|
|
2467
|
+
button: Io,
|
|
2468
|
+
primary: ko,
|
|
2469
|
+
primaryHovered: $o,
|
|
2470
|
+
secondary: No,
|
|
2471
|
+
secondaryHovered: wo,
|
|
2472
|
+
tertiary: Co,
|
|
2473
|
+
tertiaryHovered: Bo,
|
|
2474
|
+
content: So
|
|
2475
|
+
}, mt = (r) => {
|
|
2476
|
+
const { children: o, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings: d } = qt();
|
|
2471
2477
|
return /* @__PURE__ */ t.jsx(
|
|
2472
2478
|
"button",
|
|
2473
2479
|
{
|
|
2474
|
-
className: F(
|
|
2475
|
-
[
|
|
2476
|
-
[
|
|
2477
|
-
[
|
|
2478
|
-
[
|
|
2479
|
-
[
|
|
2480
|
-
[
|
|
2480
|
+
className: F(ot.button, i, {
|
|
2481
|
+
[ot.primary]: l === "Primary",
|
|
2482
|
+
[ot.secondary]: l === "Secondary",
|
|
2483
|
+
[ot.tertiary]: l === "Tertiary",
|
|
2484
|
+
[ot.primaryHovered]: l === "Primary" && !a && d.buttons.primary.hover,
|
|
2485
|
+
[ot.secondaryHovered]: l === "Secondary" && !a && d.buttons.secondary.hover,
|
|
2486
|
+
[ot.tertiaryHovered]: l === "Tertiary" && !a && d.buttons.tertiary.hover
|
|
2481
2487
|
}),
|
|
2482
2488
|
onClick: e,
|
|
2483
2489
|
style: {
|
|
2484
2490
|
...s
|
|
2485
2491
|
},
|
|
2486
|
-
disabled:
|
|
2487
|
-
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2488
|
-
|
|
2492
|
+
disabled: a,
|
|
2493
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
|
|
2494
|
+
o,
|
|
2489
2495
|
/* @__PURE__ */ t.jsx(
|
|
2490
2496
|
v,
|
|
2491
2497
|
{
|
|
@@ -2495,126 +2501,103 @@ const ha = (r) => {
|
|
|
2495
2501
|
height: 20
|
|
2496
2502
|
}
|
|
2497
2503
|
)
|
|
2498
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2504
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: o })
|
|
2499
2505
|
}
|
|
2500
2506
|
);
|
|
2501
2507
|
};
|
|
2502
|
-
class
|
|
2508
|
+
class xt extends Error {
|
|
2503
2509
|
}
|
|
2504
|
-
|
|
2505
|
-
function
|
|
2506
|
-
return decodeURIComponent(atob(r).replace(/(.)/g, (
|
|
2510
|
+
xt.prototype.name = "InvalidTokenError";
|
|
2511
|
+
function To(r) {
|
|
2512
|
+
return decodeURIComponent(atob(r).replace(/(.)/g, (o, e) => {
|
|
2507
2513
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2508
2514
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2509
2515
|
}));
|
|
2510
2516
|
}
|
|
2511
|
-
function
|
|
2512
|
-
let
|
|
2513
|
-
switch (
|
|
2517
|
+
function Po(r) {
|
|
2518
|
+
let o = r.replace(/-/g, "+").replace(/_/g, "/");
|
|
2519
|
+
switch (o.length % 4) {
|
|
2514
2520
|
case 0:
|
|
2515
2521
|
break;
|
|
2516
2522
|
case 2:
|
|
2517
|
-
|
|
2523
|
+
o += "==";
|
|
2518
2524
|
break;
|
|
2519
2525
|
case 3:
|
|
2520
|
-
|
|
2526
|
+
o += "=";
|
|
2521
2527
|
break;
|
|
2522
2528
|
default:
|
|
2523
2529
|
throw new Error("base64 string is not of the correct length");
|
|
2524
2530
|
}
|
|
2525
2531
|
try {
|
|
2526
|
-
return
|
|
2532
|
+
return To(o);
|
|
2527
2533
|
} catch {
|
|
2528
|
-
return atob(
|
|
2534
|
+
return atob(o);
|
|
2529
2535
|
}
|
|
2530
2536
|
}
|
|
2531
|
-
function
|
|
2537
|
+
function Ao(r, o) {
|
|
2532
2538
|
if (typeof r != "string")
|
|
2533
|
-
throw new
|
|
2534
|
-
|
|
2535
|
-
const e =
|
|
2539
|
+
throw new xt("Invalid token specified: must be a string");
|
|
2540
|
+
o || (o = {});
|
|
2541
|
+
const e = o.header === !0 ? 0 : 1, s = r.split(".")[e];
|
|
2536
2542
|
if (typeof s != "string")
|
|
2537
|
-
throw new
|
|
2543
|
+
throw new xt(`Invalid token specified: missing part #${e + 1}`);
|
|
2538
2544
|
let i;
|
|
2539
2545
|
try {
|
|
2540
|
-
i =
|
|
2541
|
-
} catch (
|
|
2542
|
-
throw new
|
|
2546
|
+
i = Po(s);
|
|
2547
|
+
} catch (a) {
|
|
2548
|
+
throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${a.message})`);
|
|
2543
2549
|
}
|
|
2544
2550
|
try {
|
|
2545
2551
|
return JSON.parse(i);
|
|
2546
|
-
} catch (
|
|
2547
|
-
throw new
|
|
2552
|
+
} catch (a) {
|
|
2553
|
+
throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${a.message})`);
|
|
2548
2554
|
}
|
|
2549
2555
|
}
|
|
2550
|
-
const
|
|
2551
|
-
const { shopping:
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
const o = JSON.parse(localStorage.getItem("token") || "{}");
|
|
2556
|
-
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
2557
|
-
a && /* @__PURE__ */ t.jsx(Bo, {}),
|
|
2558
|
-
!o.data && /* @__PURE__ */ t.jsx(
|
|
2559
|
-
kt,
|
|
2560
|
-
{
|
|
2561
|
-
onClick: () => i("/customer-dash"),
|
|
2562
|
-
type: "Secondary",
|
|
2563
|
-
style: {
|
|
2564
|
-
padding: 10
|
|
2565
|
-
},
|
|
2566
|
-
children: "Login"
|
|
2567
|
-
}
|
|
2568
|
-
),
|
|
2569
|
-
!o.data && e && /* @__PURE__ */ t.jsx(
|
|
2570
|
-
kt,
|
|
2571
|
-
{
|
|
2572
|
-
onClick: () => i("/customer-dash"),
|
|
2573
|
-
type: "Primary",
|
|
2574
|
-
style: {
|
|
2575
|
-
padding: 10
|
|
2576
|
-
},
|
|
2577
|
-
children: "Sign Up"
|
|
2578
|
-
}
|
|
2579
|
-
),
|
|
2580
|
-
o.data && /* @__PURE__ */ t.jsx(Po, { token: o.data })
|
|
2556
|
+
const Ia = (r) => {
|
|
2557
|
+
const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = r;
|
|
2558
|
+
return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
|
|
2559
|
+
o && /* @__PURE__ */ t.jsx(Mo, {}),
|
|
2560
|
+
s && /* @__PURE__ */ t.jsx(zt, { signUp: e })
|
|
2581
2561
|
] });
|
|
2582
|
-
},
|
|
2583
|
-
const [r,
|
|
2562
|
+
}, Mo = () => {
|
|
2563
|
+
const [r, o] = p.useState(!1), [e, s] = p.useState([]), { cart: i, getProducts: a } = Pt();
|
|
2584
2564
|
function l(h) {
|
|
2585
|
-
for (let
|
|
2586
|
-
for (let
|
|
2587
|
-
if (i.parts[
|
|
2588
|
-
return i.parts[
|
|
2565
|
+
for (let m = 0; m < i.parts.length; m++)
|
|
2566
|
+
for (let x = 0; x < h.variants.length; x++)
|
|
2567
|
+
if (i.parts[m].productVariantId === h.variants[m].id)
|
|
2568
|
+
return i.parts[m].productVariantId;
|
|
2589
2569
|
}
|
|
2590
2570
|
function d(h) {
|
|
2591
|
-
for (let
|
|
2592
|
-
for (let
|
|
2593
|
-
if (i.parts[
|
|
2594
|
-
return i.parts[
|
|
2571
|
+
for (let m = 0; m < i.parts.length; m++)
|
|
2572
|
+
for (let x = 0; x < h.variants.length; x++)
|
|
2573
|
+
if (i.parts[m].productVariantId === h.variants[m].id)
|
|
2574
|
+
return i.parts[m].quantity;
|
|
2595
2575
|
}
|
|
2596
2576
|
p.useEffect(() => {
|
|
2597
2577
|
(async () => {
|
|
2598
|
-
const
|
|
2599
|
-
...
|
|
2600
|
-
activeVariantId: l(
|
|
2601
|
-
quantity: d(
|
|
2578
|
+
const m = i.parts.map((C) => String(C.productId)), u = (await a([...m])).map((C) => ({
|
|
2579
|
+
...C,
|
|
2580
|
+
activeVariantId: l(C),
|
|
2581
|
+
quantity: d(C)
|
|
2602
2582
|
}));
|
|
2603
2583
|
s(u);
|
|
2604
2584
|
})();
|
|
2605
2585
|
}, [i.parts.length]);
|
|
2606
2586
|
function n(h) {
|
|
2607
|
-
var
|
|
2608
|
-
return !h || !(h != null && h.variants) ? !1 : (
|
|
2587
|
+
var m;
|
|
2588
|
+
return !h || !(h != null && h.variants) ? !1 : (m = h.variants.find((x) => x.id === h.activeVariantId)) == null ? void 0 : m.subscriptionSettings;
|
|
2609
2589
|
}
|
|
2610
|
-
const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [b,
|
|
2590
|
+
const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [b, g] = p.useState(!1);
|
|
2611
2591
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2612
2592
|
/* @__PURE__ */ t.jsxs(
|
|
2613
|
-
|
|
2593
|
+
mt,
|
|
2614
2594
|
{
|
|
2615
|
-
|
|
2595
|
+
type: "Secondary",
|
|
2596
|
+
style: {
|
|
2597
|
+
padding: 10
|
|
2598
|
+
},
|
|
2616
2599
|
onClick: (h) => {
|
|
2617
|
-
h.stopPropagation(),
|
|
2600
|
+
h.stopPropagation(), window.location.pathname !== "/admin/builder" && (o(!0), g(!0));
|
|
2618
2601
|
},
|
|
2619
2602
|
children: [
|
|
2620
2603
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2624,21 +2607,21 @@ const pa = (r) => {
|
|
|
2624
2607
|
fill: "var(--icon-primary)"
|
|
2625
2608
|
}
|
|
2626
2609
|
),
|
|
2627
|
-
c && /* @__PURE__ */ t.jsx("div", { className:
|
|
2610
|
+
c && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: i.parts.length })
|
|
2628
2611
|
]
|
|
2629
2612
|
}
|
|
2630
2613
|
),
|
|
2631
2614
|
r && /* @__PURE__ */ t.jsx(
|
|
2632
|
-
|
|
2615
|
+
At,
|
|
2633
2616
|
{
|
|
2634
2617
|
close: () => {
|
|
2635
|
-
|
|
2636
|
-
|
|
2618
|
+
g(!1), setTimeout(() => {
|
|
2619
|
+
o(!1);
|
|
2637
2620
|
}, 300);
|
|
2638
2621
|
},
|
|
2639
2622
|
withAnimation: !1,
|
|
2640
2623
|
children: /* @__PURE__ */ t.jsx(
|
|
2641
|
-
|
|
2624
|
+
Oo,
|
|
2642
2625
|
{
|
|
2643
2626
|
activeProducts: e,
|
|
2644
2627
|
isCartNotEmpty: c,
|
|
@@ -2648,8 +2631,8 @@ const pa = (r) => {
|
|
|
2648
2631
|
}
|
|
2649
2632
|
)
|
|
2650
2633
|
] });
|
|
2651
|
-
},
|
|
2652
|
-
const { activeProducts:
|
|
2634
|
+
}, Oo = (r) => {
|
|
2635
|
+
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: d } = Pt(), n = Tt();
|
|
2653
2636
|
function c(h) {
|
|
2654
2637
|
n(h);
|
|
2655
2638
|
}
|
|
@@ -2660,7 +2643,7 @@ const pa = (r) => {
|
|
|
2660
2643
|
quantity: h.quantity + 1
|
|
2661
2644
|
});
|
|
2662
2645
|
}
|
|
2663
|
-
function
|
|
2646
|
+
function g(h) {
|
|
2664
2647
|
d({
|
|
2665
2648
|
productId: h.id,
|
|
2666
2649
|
productVariantId: h.activeVariantId,
|
|
@@ -2670,35 +2653,35 @@ const pa = (r) => {
|
|
|
2670
2653
|
return /* @__PURE__ */ t.jsxs(
|
|
2671
2654
|
"div",
|
|
2672
2655
|
{
|
|
2673
|
-
className: F(
|
|
2674
|
-
[
|
|
2656
|
+
className: F(w.modal, {
|
|
2657
|
+
[w.closing]: !s
|
|
2675
2658
|
}),
|
|
2676
2659
|
onClick: (h) => h.stopPropagation(),
|
|
2677
2660
|
children: [
|
|
2678
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2679
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2680
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2681
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2661
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
2662
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
|
|
2663
|
+
/* @__PURE__ */ t.jsx("span", { className: w.title, children: "Cart" }),
|
|
2664
|
+
e && /* @__PURE__ */ t.jsx("div", { className: w.count, children: i.parts.length })
|
|
2682
2665
|
] }),
|
|
2683
2666
|
/* @__PURE__ */ t.jsx(
|
|
2684
2667
|
"button",
|
|
2685
2668
|
{
|
|
2686
|
-
className: F(
|
|
2687
|
-
[
|
|
2669
|
+
className: F(w.clear, {
|
|
2670
|
+
[w.activeClear]: e
|
|
2688
2671
|
}),
|
|
2689
2672
|
disabled: !e,
|
|
2690
|
-
onClick:
|
|
2673
|
+
onClick: a,
|
|
2691
2674
|
children: "Clear all"
|
|
2692
2675
|
}
|
|
2693
2676
|
)
|
|
2694
2677
|
] }),
|
|
2695
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2696
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2678
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
|
|
2679
|
+
/* @__PURE__ */ t.jsx("div", { className: w.products, children: o.map((h) => /* @__PURE__ */ t.jsxs(
|
|
2697
2680
|
"div",
|
|
2698
2681
|
{
|
|
2699
|
-
className:
|
|
2682
|
+
className: w.product,
|
|
2700
2683
|
children: [
|
|
2701
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2684
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
|
|
2702
2685
|
/* @__PURE__ */ t.jsx(
|
|
2703
2686
|
"img",
|
|
2704
2687
|
{
|
|
@@ -2706,25 +2689,25 @@ const pa = (r) => {
|
|
|
2706
2689
|
alt: "image",
|
|
2707
2690
|
width: "100%",
|
|
2708
2691
|
height: "100%",
|
|
2709
|
-
className:
|
|
2692
|
+
className: w.image
|
|
2710
2693
|
}
|
|
2711
2694
|
),
|
|
2712
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2713
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2714
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2695
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
|
|
2696
|
+
/* @__PURE__ */ t.jsx("div", { className: w.name, children: h.name }),
|
|
2697
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
|
|
2715
2698
|
"$",
|
|
2716
|
-
h.variants.find((
|
|
2699
|
+
h.variants.find((m) => m.id === h.activeVariantId).price.amount * ((h == null ? void 0 : h.quantity) || 1)
|
|
2717
2700
|
] })
|
|
2718
2701
|
] })
|
|
2719
2702
|
] }),
|
|
2720
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2703
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
|
|
2721
2704
|
/* @__PURE__ */ t.jsx(
|
|
2722
2705
|
"div",
|
|
2723
2706
|
{
|
|
2724
2707
|
onClick: () => {
|
|
2725
|
-
h.quantity !== 1 &&
|
|
2708
|
+
h.quantity !== 1 && g(h);
|
|
2726
2709
|
},
|
|
2727
|
-
className:
|
|
2710
|
+
className: w.productButton,
|
|
2728
2711
|
children: /* @__PURE__ */ t.jsx(
|
|
2729
2712
|
v,
|
|
2730
2713
|
{
|
|
@@ -2736,12 +2719,12 @@ const pa = (r) => {
|
|
|
2736
2719
|
)
|
|
2737
2720
|
}
|
|
2738
2721
|
),
|
|
2739
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2722
|
+
/* @__PURE__ */ t.jsx("div", { className: w.productCount, children: h.quantity }),
|
|
2740
2723
|
/* @__PURE__ */ t.jsx(
|
|
2741
2724
|
"div",
|
|
2742
2725
|
{
|
|
2743
2726
|
onClick: () => b(h),
|
|
2744
|
-
className:
|
|
2727
|
+
className: w.productButton,
|
|
2745
2728
|
children: /* @__PURE__ */ t.jsx(
|
|
2746
2729
|
v,
|
|
2747
2730
|
{
|
|
@@ -2758,9 +2741,9 @@ const pa = (r) => {
|
|
|
2758
2741
|
},
|
|
2759
2742
|
h.id
|
|
2760
2743
|
)) }),
|
|
2761
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2762
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2763
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2744
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
|
|
2745
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.subtotal, children: [
|
|
2746
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
|
|
2764
2747
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2765
2748
|
/* @__PURE__ */ t.jsx(
|
|
2766
2749
|
v,
|
|
@@ -2772,18 +2755,18 @@ const pa = (r) => {
|
|
|
2772
2755
|
}
|
|
2773
2756
|
)
|
|
2774
2757
|
] }),
|
|
2775
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2758
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
|
|
2776
2759
|
"$",
|
|
2777
2760
|
l().total
|
|
2778
2761
|
] })
|
|
2779
2762
|
] }),
|
|
2780
|
-
/* @__PURE__ */ t.jsx(
|
|
2763
|
+
/* @__PURE__ */ t.jsx(mt, { onClick: () => c("/checkout"), children: "Checkout" })
|
|
2781
2764
|
] })
|
|
2782
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2765
|
+
] }) : /* @__PURE__ */ t.jsx(qo, {})
|
|
2783
2766
|
]
|
|
2784
2767
|
}
|
|
2785
2768
|
);
|
|
2786
|
-
},
|
|
2769
|
+
}, qo = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
|
|
2787
2770
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2788
2771
|
v,
|
|
2789
2772
|
{
|
|
@@ -2799,50 +2782,156 @@ const pa = (r) => {
|
|
|
2799
2782
|
"a",
|
|
2800
2783
|
{
|
|
2801
2784
|
href: "/products",
|
|
2802
|
-
className:
|
|
2785
|
+
className: w.link,
|
|
2803
2786
|
children: "view products"
|
|
2804
2787
|
}
|
|
2805
2788
|
)
|
|
2806
2789
|
] })
|
|
2807
|
-
] }),
|
|
2808
|
-
const
|
|
2790
|
+
] }), zt = ({ signUp: r }) => {
|
|
2791
|
+
const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o;
|
|
2792
|
+
if (!e)
|
|
2793
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2794
|
+
/* @__PURE__ */ t.jsx(
|
|
2795
|
+
mt,
|
|
2796
|
+
{
|
|
2797
|
+
onClick: () => l("/customer-dash"),
|
|
2798
|
+
type: "Secondary",
|
|
2799
|
+
style: {
|
|
2800
|
+
padding: 10
|
|
2801
|
+
},
|
|
2802
|
+
children: "Login"
|
|
2803
|
+
}
|
|
2804
|
+
),
|
|
2805
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2806
|
+
mt,
|
|
2807
|
+
{
|
|
2808
|
+
onClick: () => l("/customer-dash"),
|
|
2809
|
+
type: "Primary",
|
|
2810
|
+
style: {
|
|
2811
|
+
padding: 10
|
|
2812
|
+
},
|
|
2813
|
+
children: "Sign Up"
|
|
2814
|
+
}
|
|
2815
|
+
)
|
|
2816
|
+
] });
|
|
2817
|
+
const [s, i] = p.useState("test-email@gmail.com"), a = Tt();
|
|
2809
2818
|
p.useEffect(() => {
|
|
2810
2819
|
(async () => {
|
|
2811
|
-
const
|
|
2812
|
-
|
|
2820
|
+
const n = Ao(e);
|
|
2821
|
+
i(n.email);
|
|
2813
2822
|
})();
|
|
2814
|
-
}, [
|
|
2815
|
-
function
|
|
2816
|
-
|
|
2823
|
+
}, [e]);
|
|
2824
|
+
function l(d) {
|
|
2825
|
+
a(d);
|
|
2817
2826
|
}
|
|
2818
2827
|
return /* @__PURE__ */ t.jsx(
|
|
2819
2828
|
"div",
|
|
2820
2829
|
{
|
|
2821
|
-
className:
|
|
2822
|
-
onClick: () =>
|
|
2823
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2830
|
+
className: w.userInfo,
|
|
2831
|
+
onClick: () => l("/customer-dash"),
|
|
2832
|
+
children: /* @__PURE__ */ t.jsx("div", { children: s || "test-email@gmail.com" })
|
|
2833
|
+
}
|
|
2834
|
+
);
|
|
2835
|
+
}, Eo = ({
|
|
2836
|
+
children: r,
|
|
2837
|
+
logo: o,
|
|
2838
|
+
setIsOpen: e,
|
|
2839
|
+
signUp: s
|
|
2840
|
+
}) => {
|
|
2841
|
+
const { setIsOpen: i } = Et(), a = () => {
|
|
2842
|
+
i(!1), setTimeout(() => {
|
|
2843
|
+
e(!1), i(!0);
|
|
2844
|
+
}, 300);
|
|
2845
|
+
};
|
|
2846
|
+
return /* @__PURE__ */ t.jsxs(
|
|
2847
|
+
"div",
|
|
2848
|
+
{
|
|
2849
|
+
className: w.pagesMobileModal,
|
|
2850
|
+
onClick: (l) => l.stopPropagation(),
|
|
2851
|
+
children: [
|
|
2852
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
|
|
2853
|
+
/* @__PURE__ */ t.jsx("div", { children: o }),
|
|
2854
|
+
/* @__PURE__ */ t.jsx(
|
|
2855
|
+
mt,
|
|
2856
|
+
{
|
|
2857
|
+
type: "Secondary",
|
|
2858
|
+
onClick: a,
|
|
2859
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2860
|
+
v,
|
|
2861
|
+
{
|
|
2862
|
+
name: "X",
|
|
2863
|
+
fill: "var(--icon-primary)"
|
|
2864
|
+
}
|
|
2865
|
+
)
|
|
2866
|
+
}
|
|
2867
|
+
)
|
|
2868
|
+
] }),
|
|
2869
|
+
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
|
|
2870
|
+
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(zt, { signUp: s }) })
|
|
2871
|
+
]
|
|
2824
2872
|
}
|
|
2825
2873
|
);
|
|
2826
|
-
},
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2874
|
+
}, ka = ({
|
|
2875
|
+
children: r,
|
|
2876
|
+
logo: o,
|
|
2877
|
+
signUp: e
|
|
2878
|
+
}) => {
|
|
2879
|
+
const [s, i] = p.useState(!1);
|
|
2880
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2881
|
+
/* @__PURE__ */ t.jsx(Do, { setIsOpenModal: i }),
|
|
2882
|
+
s && /* @__PURE__ */ t.jsx(At, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
2883
|
+
Eo,
|
|
2884
|
+
{
|
|
2885
|
+
logo: o,
|
|
2886
|
+
setIsOpen: i,
|
|
2887
|
+
signUp: e,
|
|
2888
|
+
children: r
|
|
2889
|
+
}
|
|
2890
|
+
) })
|
|
2891
|
+
] });
|
|
2892
|
+
}, Do = (r) => {
|
|
2893
|
+
const { setIsOpenModal: o } = r;
|
|
2894
|
+
return /* @__PURE__ */ t.jsx(
|
|
2895
|
+
mt,
|
|
2896
|
+
{
|
|
2897
|
+
type: "Secondary",
|
|
2898
|
+
style: {
|
|
2899
|
+
padding: 10
|
|
2900
|
+
},
|
|
2901
|
+
onClick: (e) => {
|
|
2902
|
+
e.stopPropagation(), o(!0);
|
|
2903
|
+
},
|
|
2904
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2905
|
+
v,
|
|
2906
|
+
{
|
|
2907
|
+
name: "List",
|
|
2908
|
+
fill: "var(--icon-primary)"
|
|
2909
|
+
}
|
|
2910
|
+
)
|
|
2911
|
+
}
|
|
2912
|
+
);
|
|
2913
|
+
}, Lo = "_share_xddz7_1", Ro = "_modal_xddz7_8", Ho = "_header_xddz7_20", zo = "_socials_xddz7_30", Fo = "_social_xddz7_30", Vo = "_copy_xddz7_40", Uo = "_title_xddz7_47", Yo = "_copyWrapper_xddz7_53", Go = "_copyText_xddz7_62", Xo = "_copyTextMobile_xddz7_75", Wo = "_copyTextMiniMobile_xddz7_94", at = {
|
|
2914
|
+
share: Lo,
|
|
2915
|
+
modal: Ro,
|
|
2916
|
+
header: Ho,
|
|
2917
|
+
socials: zo,
|
|
2918
|
+
social: Fo,
|
|
2919
|
+
copy: Vo,
|
|
2920
|
+
title: Uo,
|
|
2921
|
+
copyWrapper: Yo,
|
|
2922
|
+
copyText: Go,
|
|
2923
|
+
copyTextMobile: Xo,
|
|
2924
|
+
copyTextMiniMobile: Wo
|
|
2925
|
+
}, $a = () => {
|
|
2926
|
+
const { isOpenModal: r, setIsOpenModal: o } = Dt();
|
|
2838
2927
|
function e() {
|
|
2839
|
-
|
|
2928
|
+
o(!0);
|
|
2840
2929
|
}
|
|
2841
2930
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2842
2931
|
/* @__PURE__ */ t.jsx(
|
|
2843
|
-
|
|
2932
|
+
Z,
|
|
2844
2933
|
{
|
|
2845
|
-
className:
|
|
2934
|
+
className: at.share,
|
|
2846
2935
|
onClick: (s) => {
|
|
2847
2936
|
s.stopPropagation(), e();
|
|
2848
2937
|
},
|
|
@@ -2857,11 +2946,11 @@ const pa = (r) => {
|
|
|
2857
2946
|
)
|
|
2858
2947
|
}
|
|
2859
2948
|
),
|
|
2860
|
-
r && /* @__PURE__ */ t.jsx(
|
|
2949
|
+
r && /* @__PURE__ */ t.jsx(At, { close: o, children: /* @__PURE__ */ t.jsx(Jo, {}) })
|
|
2861
2950
|
] });
|
|
2862
|
-
},
|
|
2863
|
-
const { setIsOpenModal: r } = Dt(), { notification:
|
|
2864
|
-
function
|
|
2951
|
+
}, Jo = () => {
|
|
2952
|
+
const { setIsOpenModal: r } = Dt(), { notification: o, setNotification: e } = Vt(), { setIsOpen: s } = Et(), i = window.location.href;
|
|
2953
|
+
function a() {
|
|
2865
2954
|
navigator.clipboard.writeText(i), e({
|
|
2866
2955
|
message: "Link copied to clipboard",
|
|
2867
2956
|
status: "success"
|
|
@@ -2872,14 +2961,17 @@ const pa = (r) => {
|
|
|
2872
2961
|
r(!1), s(!0);
|
|
2873
2962
|
}, 300);
|
|
2874
2963
|
}
|
|
2964
|
+
function d(n, c) {
|
|
2965
|
+
return n.length > c ? n.slice(0, c) + "..." : n;
|
|
2966
|
+
}
|
|
2875
2967
|
return /* @__PURE__ */ t.jsxs(
|
|
2876
2968
|
"div",
|
|
2877
2969
|
{
|
|
2878
|
-
className:
|
|
2879
|
-
onClick: (
|
|
2970
|
+
className: at.modal,
|
|
2971
|
+
onClick: (n) => n.stopPropagation(),
|
|
2880
2972
|
children: [
|
|
2881
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2882
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2973
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.header, children: [
|
|
2974
|
+
/* @__PURE__ */ t.jsx("div", { className: at.title, children: "Copy Product Link" }),
|
|
2883
2975
|
/* @__PURE__ */ t.jsx(
|
|
2884
2976
|
v,
|
|
2885
2977
|
{
|
|
@@ -2890,48 +2982,55 @@ const pa = (r) => {
|
|
|
2890
2982
|
}
|
|
2891
2983
|
)
|
|
2892
2984
|
] }),
|
|
2893
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2894
|
-
/* @__PURE__ */ t.
|
|
2895
|
-
|
|
2985
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.copyWrapper, children: [
|
|
2986
|
+
/* @__PURE__ */ t.jsxs(
|
|
2987
|
+
Z,
|
|
2896
2988
|
{
|
|
2897
|
-
|
|
2898
|
-
onClick:
|
|
2899
|
-
|
|
2989
|
+
type: "Secondary",
|
|
2990
|
+
onClick: a,
|
|
2991
|
+
style: {
|
|
2992
|
+
flex: 1
|
|
2993
|
+
},
|
|
2994
|
+
children: [
|
|
2995
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyText, children: d(i, 100) }),
|
|
2996
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: d(i, 40) }),
|
|
2997
|
+
/* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children: d(i, 20) })
|
|
2998
|
+
]
|
|
2900
2999
|
}
|
|
2901
3000
|
),
|
|
2902
3001
|
/* @__PURE__ */ t.jsx(
|
|
2903
|
-
|
|
3002
|
+
Z,
|
|
2904
3003
|
{
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
children:
|
|
3004
|
+
type: "Secondary",
|
|
3005
|
+
onClick: a,
|
|
3006
|
+
children: o ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
|
|
2908
3007
|
}
|
|
2909
3008
|
)
|
|
2910
3009
|
] })
|
|
2911
3010
|
]
|
|
2912
3011
|
}
|
|
2913
3012
|
);
|
|
2914
|
-
},
|
|
2915
|
-
accordion:
|
|
2916
|
-
header:
|
|
2917
|
-
icon:
|
|
2918
|
-
open:
|
|
2919
|
-
content:
|
|
2920
|
-
},
|
|
2921
|
-
const [e, s] = p.useState(!1), [i,
|
|
3013
|
+
}, Qo = "_accordion_1s1lq_1", Ko = "_header_1s1lq_9", Zo = "_icon_1s1lq_18", ta = "_open_1s1lq_21", ea = "_content_1s1lq_25", pt = {
|
|
3014
|
+
accordion: Qo,
|
|
3015
|
+
header: Ko,
|
|
3016
|
+
icon: Zo,
|
|
3017
|
+
open: ta,
|
|
3018
|
+
content: ea
|
|
3019
|
+
}, Na = ({ title: r, content: o }) => {
|
|
3020
|
+
const [e, s] = p.useState(!1), [i, a] = p.useState(0), l = p.useRef(null), d = () => {
|
|
2922
3021
|
s(!e);
|
|
2923
3022
|
};
|
|
2924
3023
|
return p.useEffect(() => {
|
|
2925
|
-
l.current &&
|
|
2926
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
3024
|
+
l.current && a(e ? l.current.scrollHeight : 0);
|
|
3025
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: pt.accordion, children: [
|
|
2927
3026
|
/* @__PURE__ */ t.jsxs(
|
|
2928
3027
|
"div",
|
|
2929
3028
|
{
|
|
2930
|
-
className:
|
|
3029
|
+
className: pt.header,
|
|
2931
3030
|
onClick: d,
|
|
2932
3031
|
children: [
|
|
2933
3032
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2934
|
-
/* @__PURE__ */ t.jsx("div", { className: F(
|
|
3033
|
+
/* @__PURE__ */ t.jsx("div", { className: F(pt.icon, { [pt.open]: e }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
|
|
2935
3034
|
]
|
|
2936
3035
|
}
|
|
2937
3036
|
),
|
|
@@ -2939,50 +3038,50 @@ const pa = (r) => {
|
|
|
2939
3038
|
"div",
|
|
2940
3039
|
{
|
|
2941
3040
|
ref: l,
|
|
2942
|
-
className:
|
|
3041
|
+
className: pt.content,
|
|
2943
3042
|
style: { height: `${i}px` },
|
|
2944
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
3043
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
|
|
2945
3044
|
}
|
|
2946
3045
|
)
|
|
2947
3046
|
] });
|
|
2948
|
-
},
|
|
2949
|
-
wrapper:
|
|
2950
|
-
label:
|
|
2951
|
-
input:
|
|
2952
|
-
paddingless:
|
|
2953
|
-
content:
|
|
2954
|
-
contentBorder:
|
|
2955
|
-
borderless:
|
|
2956
|
-
rightIcon:
|
|
2957
|
-
},
|
|
3047
|
+
}, sa = "_wrapper_p74l6_1", na = "_label_p74l6_9", ia = "_input_p74l6_18", oa = "_paddingless_p74l6_31", aa = "_content_p74l6_35", ca = "_contentBorder_p74l6_48", la = "_borderless_p74l6_53", ra = "_rightIcon_p74l6_58", st = {
|
|
3048
|
+
wrapper: sa,
|
|
3049
|
+
label: na,
|
|
3050
|
+
input: ia,
|
|
3051
|
+
paddingless: oa,
|
|
3052
|
+
content: aa,
|
|
3053
|
+
contentBorder: ca,
|
|
3054
|
+
borderless: la,
|
|
3055
|
+
rightIcon: ra
|
|
3056
|
+
}, wa = (r) => {
|
|
2958
3057
|
const {
|
|
2959
|
-
onChange:
|
|
3058
|
+
onChange: o,
|
|
2960
3059
|
style: e,
|
|
2961
3060
|
label: s,
|
|
2962
3061
|
value: i,
|
|
2963
|
-
type:
|
|
3062
|
+
type: a,
|
|
2964
3063
|
min: l,
|
|
2965
3064
|
max: d,
|
|
2966
3065
|
placeholder: n,
|
|
2967
3066
|
disabled: c = !1,
|
|
2968
3067
|
required: b = !1,
|
|
2969
|
-
regex:
|
|
3068
|
+
regex: g,
|
|
2970
3069
|
paddingless: h = !1,
|
|
2971
|
-
borderless:
|
|
2972
|
-
editable:
|
|
3070
|
+
borderless: m = !1,
|
|
3071
|
+
editable: x = !1,
|
|
2973
3072
|
isSearch: u = !1
|
|
2974
|
-
} = r, { themeSettings:
|
|
3073
|
+
} = r, { themeSettings: C } = qt(), { inputs: O } = C, [I, D] = p.useState(!1);
|
|
2975
3074
|
function B(f) {
|
|
2976
3075
|
return Number(f) < 0 ? String(l) : f;
|
|
2977
3076
|
}
|
|
2978
3077
|
function S(f) {
|
|
2979
|
-
return !b || !
|
|
3078
|
+
return !b || !g ? !0 : new RegExp(g).test(f);
|
|
2980
3079
|
}
|
|
2981
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3080
|
+
return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
|
|
2982
3081
|
s && /* @__PURE__ */ t.jsx(
|
|
2983
3082
|
"label",
|
|
2984
3083
|
{
|
|
2985
|
-
className:
|
|
3084
|
+
className: st.label,
|
|
2986
3085
|
htmlFor: s,
|
|
2987
3086
|
children: s
|
|
2988
3087
|
}
|
|
@@ -2990,51 +3089,51 @@ const pa = (r) => {
|
|
|
2990
3089
|
/* @__PURE__ */ t.jsxs(
|
|
2991
3090
|
"div",
|
|
2992
3091
|
{
|
|
2993
|
-
className: F(
|
|
2994
|
-
[
|
|
3092
|
+
className: F(st.content, {
|
|
3093
|
+
[st.contentBorder]: O.border.active
|
|
2995
3094
|
}),
|
|
2996
3095
|
style: {
|
|
2997
|
-
paddingRight:
|
|
3096
|
+
paddingRight: O.general.height + 15,
|
|
2998
3097
|
...e,
|
|
2999
|
-
background:
|
|
3098
|
+
background: O.field.active ? O.field.color : "transparent"
|
|
3000
3099
|
},
|
|
3001
3100
|
children: [
|
|
3002
3101
|
/* @__PURE__ */ t.jsx(
|
|
3003
3102
|
"input",
|
|
3004
3103
|
{
|
|
3005
3104
|
id: s,
|
|
3006
|
-
type:
|
|
3105
|
+
type: a || "text",
|
|
3007
3106
|
onChange: (f) => {
|
|
3008
|
-
if (
|
|
3107
|
+
if (a === "text") o(f.target.value);
|
|
3009
3108
|
else {
|
|
3010
|
-
const
|
|
3011
|
-
|
|
3109
|
+
const E = B(f.target.value);
|
|
3110
|
+
o(E);
|
|
3012
3111
|
}
|
|
3013
3112
|
},
|
|
3014
3113
|
value: i,
|
|
3015
3114
|
autoComplete: "off",
|
|
3016
3115
|
placeholder: n || "Type something...",
|
|
3017
|
-
className: F(
|
|
3018
|
-
[
|
|
3019
|
-
[
|
|
3020
|
-
[
|
|
3116
|
+
className: F(st.input, {
|
|
3117
|
+
[st.required]: I && b && !S(i),
|
|
3118
|
+
[st.paddingless]: h,
|
|
3119
|
+
[st.borderless]: m
|
|
3021
3120
|
}),
|
|
3022
|
-
min:
|
|
3023
|
-
max:
|
|
3121
|
+
min: a === "number" ? l : void 0,
|
|
3122
|
+
max: a === "number" ? d : void 0,
|
|
3024
3123
|
disabled: c,
|
|
3025
|
-
onFocus: () =>
|
|
3124
|
+
onFocus: () => D(!0)
|
|
3026
3125
|
}
|
|
3027
3126
|
),
|
|
3028
|
-
u && /* @__PURE__ */ t.jsx("div", { className:
|
|
3127
|
+
u && /* @__PURE__ */ t.jsx("div", { className: st.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
3029
3128
|
v,
|
|
3030
3129
|
{
|
|
3031
3130
|
name: "MagnifyingGlass",
|
|
3032
3131
|
fill: "var(--icon-secondary)",
|
|
3033
|
-
width:
|
|
3034
|
-
height:
|
|
3132
|
+
width: O.general.height,
|
|
3133
|
+
height: O.general.height
|
|
3035
3134
|
}
|
|
3036
3135
|
) }),
|
|
3037
|
-
|
|
3136
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
3038
3137
|
v,
|
|
3039
3138
|
{
|
|
3040
3139
|
name: "Sliders",
|
|
@@ -3047,18 +3146,18 @@ const pa = (r) => {
|
|
|
3047
3146
|
}
|
|
3048
3147
|
)
|
|
3049
3148
|
] });
|
|
3050
|
-
},
|
|
3051
|
-
wrapper:
|
|
3052
|
-
label:
|
|
3053
|
-
textarea:
|
|
3054
|
-
length:
|
|
3055
|
-
},
|
|
3056
|
-
const { onChange:
|
|
3057
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3149
|
+
}, da = "_wrapper_st58d_1", ua = "_label_st58d_10", _a = "_textarea_st58d_18", ma = "_length_st58d_33", bt = {
|
|
3150
|
+
wrapper: da,
|
|
3151
|
+
label: ua,
|
|
3152
|
+
textarea: _a,
|
|
3153
|
+
length: ma
|
|
3154
|
+
}, Ca = (r) => {
|
|
3155
|
+
const { onChange: o, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = r, [l, d] = p.useState(s.length);
|
|
3156
|
+
return /* @__PURE__ */ t.jsxs("div", { className: bt.wrapper, children: [
|
|
3058
3157
|
e && /* @__PURE__ */ t.jsx(
|
|
3059
3158
|
"label",
|
|
3060
3159
|
{
|
|
3061
|
-
className:
|
|
3160
|
+
className: bt.label,
|
|
3062
3161
|
htmlFor: e,
|
|
3063
3162
|
children: e
|
|
3064
3163
|
}
|
|
@@ -3069,14 +3168,14 @@ const pa = (r) => {
|
|
|
3069
3168
|
id: e,
|
|
3070
3169
|
defaultValue: s,
|
|
3071
3170
|
onChange: (n) => {
|
|
3072
|
-
d(n.target.value.length),
|
|
3171
|
+
d(n.target.value.length), o(n.target.value);
|
|
3073
3172
|
},
|
|
3074
|
-
placeholder:
|
|
3075
|
-
className:
|
|
3173
|
+
placeholder: a,
|
|
3174
|
+
className: bt.textarea,
|
|
3076
3175
|
maxLength: i
|
|
3077
3176
|
}
|
|
3078
3177
|
),
|
|
3079
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
3178
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: bt.length, children: [
|
|
3080
3179
|
l,
|
|
3081
3180
|
"/",
|
|
3082
3181
|
i
|
|
@@ -3084,34 +3183,37 @@ const pa = (r) => {
|
|
|
3084
3183
|
] });
|
|
3085
3184
|
};
|
|
3086
3185
|
export {
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3186
|
+
Na as Accordion,
|
|
3187
|
+
Do as BurgerMenuButton,
|
|
3188
|
+
mt as Button,
|
|
3189
|
+
Pn as ButtonTypeSettings,
|
|
3190
|
+
va as ButtonsSettings,
|
|
3191
|
+
fa as CategorySettings,
|
|
3092
3192
|
gt as ChooseImage,
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3193
|
+
Ta as ChooseImageModal,
|
|
3194
|
+
qo as EmptyCart,
|
|
3195
|
+
ba as FormSettings,
|
|
3196
|
+
Ia as HeaderButtons,
|
|
3097
3197
|
v as Icon,
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3198
|
+
X as InputSettings,
|
|
3199
|
+
wa as InputUI,
|
|
3200
|
+
Ve as ItemsSettings,
|
|
3201
|
+
ga as LayoutSettings,
|
|
3202
|
+
ja as ListingSelector,
|
|
3203
|
+
Pa as Loader,
|
|
3204
|
+
At as Modal,
|
|
3205
|
+
ka as PagesMobileMenu,
|
|
3206
|
+
Eo as PagesMobileModal,
|
|
3207
|
+
ya as ProductOptions,
|
|
3208
|
+
Mt as RangeSelector,
|
|
3209
|
+
nt as Select,
|
|
3210
|
+
$a as ShareLink,
|
|
3211
|
+
Mo as ShoppingButton,
|
|
3212
|
+
Oo as ShoppingModalCart,
|
|
3213
|
+
tt as Switch,
|
|
3112
3214
|
Rt as TextSettings,
|
|
3113
3215
|
Ot as TextareaSettings,
|
|
3114
|
-
|
|
3216
|
+
Ca as TextareaUI,
|
|
3115
3217
|
Lt as TypesText,
|
|
3116
|
-
|
|
3218
|
+
zt as UserInfo
|
|
3117
3219
|
};
|