@billgangcom/theme-lib 1.37.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/constants/block-icons.d.ts +2 -1
- package/dist/builder/store/index.d.ts +1 -0
- package/dist/builder/store/useModalStore.d.ts +6 -0
- package/dist/builder/ui/Modal/index.d.ts +1 -0
- package/dist/builder.cjs.js +5 -5
- package/dist/builder.es.js +1654 -1613
- package/dist/{index-BHI15yI7.cjs → index-q8zCWetF.cjs} +32 -32
- package/dist/{index-CncZkk5o.js → index-rUpOzmAy.js} +4876 -4864
- package/dist/ui/HeaderButtons/index.d.ts +15 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1257 -1149
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
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:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
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
|
+
alignmentContent: Wt,
|
|
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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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":
|
|
@@ -57,40 +57,40 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [d, n] = p.useState(null), [c,
|
|
60
|
+
const [d, n] = p.useState(null), [c, b] = p.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children:
|
|
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
|
-
|
|
82
|
-
|
|
80
|
+
g !== o && d !== g && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
g !== o && d === g && /* @__PURE__ */ t.jsx(
|
|
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
|
-
|
|
91
|
-
|
|
90
|
+
g === o && /* @__PURE__ */ t.jsx(
|
|
91
|
+
v,
|
|
92
92
|
{
|
|
93
|
-
name: o
|
|
93
|
+
name: a(o),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,37 +98,37 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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
|
-
|
|
110
|
+
b(g);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
b(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
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[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[g]),
|
|
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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
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
|
+
active: me
|
|
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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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,11 +196,11 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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"
|
|
@@ -209,7 +209,7 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
209
209
|
(d || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
210
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)
|
|
@@ -221,7 +221,7 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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:
|
|
241
|
-
header:
|
|
242
|
-
text:
|
|
243
|
-
productsBlock:
|
|
244
|
-
top:
|
|
245
|
-
itemsBlock:
|
|
246
|
-
typeTexts:
|
|
247
|
-
block:
|
|
248
|
-
active:
|
|
249
|
-
products:
|
|
250
|
-
product:
|
|
251
|
-
button:
|
|
252
|
-
disabled:
|
|
253
|
-
image:
|
|
254
|
-
info:
|
|
255
|
-
name:
|
|
256
|
-
buttons:
|
|
257
|
-
modal:
|
|
258
|
-
link:
|
|
259
|
-
modalOptions:
|
|
260
|
-
addButton:
|
|
261
|
-
deleteButton:
|
|
262
|
-
closeIcon:
|
|
263
|
-
},
|
|
264
|
-
(r,
|
|
265
|
-
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions:
|
|
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
|
+
header: ge,
|
|
242
|
+
text: fe,
|
|
243
|
+
productsBlock: be,
|
|
244
|
+
top: ve,
|
|
245
|
+
itemsBlock: je,
|
|
246
|
+
typeTexts: ye,
|
|
247
|
+
block: Ie,
|
|
248
|
+
active: ke,
|
|
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
|
+
modalOptions: Oe,
|
|
260
|
+
addButton: qe,
|
|
261
|
+
deleteButton: Ee,
|
|
262
|
+
closeIcon: De
|
|
263
|
+
}, Le = p.forwardRef(
|
|
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,10 +279,10 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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:
|
|
285
|
-
|
|
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
|
+
v,
|
|
286
286
|
{
|
|
287
287
|
name: "X",
|
|
288
288
|
height: 20,
|
|
@@ -293,7 +293,7 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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,
|
|
@@ -301,11 +301,11 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
301
301
|
label: "Put up an attractive image",
|
|
302
302
|
activeImage: e[n.field],
|
|
303
303
|
onChange: (c) => {
|
|
304
|
-
const
|
|
304
|
+
const b = {
|
|
305
305
|
...e,
|
|
306
306
|
[n.field]: c
|
|
307
307
|
};
|
|
308
|
-
s(
|
|
308
|
+
s(b);
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
String(n.field)
|
|
@@ -316,33 +316,33 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
316
316
|
{
|
|
317
317
|
typesText: e[n.field.type],
|
|
318
318
|
setTypesText: (c) => {
|
|
319
|
-
const
|
|
319
|
+
const b = {
|
|
320
320
|
...e,
|
|
321
321
|
[n.field.type]: c
|
|
322
322
|
};
|
|
323
|
-
s(
|
|
323
|
+
s(b);
|
|
324
324
|
},
|
|
325
325
|
text: e[n.field.text] || "",
|
|
326
326
|
setText: (c) => {
|
|
327
|
-
const
|
|
327
|
+
const b = {
|
|
328
328
|
...e,
|
|
329
329
|
[n.field.text]: c
|
|
330
330
|
};
|
|
331
|
-
s(
|
|
331
|
+
s(b);
|
|
332
332
|
},
|
|
333
333
|
subtitle: n.label
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
336
|
if (n.type === "input")
|
|
337
337
|
return /* @__PURE__ */ t.jsx(
|
|
338
|
-
|
|
338
|
+
X,
|
|
339
339
|
{
|
|
340
340
|
onChange: (c) => {
|
|
341
|
-
const
|
|
341
|
+
const b = {
|
|
342
342
|
...e,
|
|
343
343
|
[n.field]: c
|
|
344
344
|
};
|
|
345
|
-
s(
|
|
345
|
+
s(b);
|
|
346
346
|
},
|
|
347
347
|
value: e[n.field] || "",
|
|
348
348
|
label: n.label,
|
|
@@ -350,16 +350,16 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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
|
-
const
|
|
358
|
+
const b = {
|
|
359
359
|
...e,
|
|
360
360
|
[n.field.text]: c
|
|
361
361
|
};
|
|
362
|
-
s(
|
|
362
|
+
s(b);
|
|
363
363
|
},
|
|
364
364
|
value: e[n.field.text] || "",
|
|
365
365
|
label: n.inputLabel,
|
|
@@ -367,31 +367,31 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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,
|
|
374
374
|
onChange: (c) => {
|
|
375
|
-
const
|
|
375
|
+
const b = {
|
|
376
376
|
...e,
|
|
377
377
|
[n.field.switch]: c
|
|
378
378
|
};
|
|
379
|
-
s(
|
|
379
|
+
s(b);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
)
|
|
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) => {
|
|
390
|
-
const
|
|
390
|
+
const b = {
|
|
391
391
|
...e,
|
|
392
392
|
[n.field]: c
|
|
393
393
|
};
|
|
394
|
-
s(
|
|
394
|
+
s(b);
|
|
395
395
|
},
|
|
396
396
|
itemsType: "select",
|
|
397
397
|
draggable: n.draggable || !1,
|
|
@@ -404,19 +404,19 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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) => {
|
|
411
|
-
const
|
|
411
|
+
const b = {
|
|
412
412
|
...e,
|
|
413
413
|
[n.field]: c
|
|
414
414
|
};
|
|
415
|
-
s(
|
|
415
|
+
s(b);
|
|
416
416
|
},
|
|
417
417
|
label: n.label,
|
|
418
418
|
value: e[n.field] || "String",
|
|
419
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
419
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
422
|
}) })
|
|
@@ -424,19 +424,19 @@ const Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_title_1iba
|
|
|
424
424
|
}
|
|
425
425
|
);
|
|
426
426
|
}
|
|
427
|
-
),
|
|
428
|
-
other:
|
|
429
|
-
subtitle:
|
|
430
|
-
items:
|
|
431
|
-
},
|
|
432
|
-
const { items:
|
|
427
|
+
), Re = "_other_g74jx_1", He = "_subtitle_g74jx_7", ze = "_items_g74jx_14", yt = {
|
|
428
|
+
other: Re,
|
|
429
|
+
subtitle: He,
|
|
430
|
+
items: ze
|
|
431
|
+
}, vt = (r) => {
|
|
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 Ft = "_wrapper_1ibay_2", Vt = "_alignmentBlock_1ibay_8", Ut = "_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,41 +464,41 @@ function He({ 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
|
-
withImage:
|
|
486
|
-
deletable:
|
|
487
|
-
addable:
|
|
488
|
-
itemsType:
|
|
489
|
-
itemsPlaceholder:
|
|
485
|
+
withImage: b = !1,
|
|
486
|
+
deletable: g = !0,
|
|
487
|
+
addable: h = !0,
|
|
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, [
|
|
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
|
}
|
|
@@ -506,36 +506,36 @@ const ze = (r) => {
|
|
|
506
506
|
);
|
|
507
507
|
p.useEffect(() => {
|
|
508
508
|
const _ = () => {
|
|
509
|
-
|
|
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
|
-
if (
|
|
516
|
-
const _ = [...s].map((
|
|
515
|
+
if (f) {
|
|
516
|
+
const _ = [...s].map((k) => k.id === f.id ? f : k);
|
|
517
517
|
i(_);
|
|
518
518
|
}
|
|
519
|
-
}, [
|
|
520
|
-
if (
|
|
521
|
-
const _ =
|
|
519
|
+
}, [f]), p.useEffect(() => {
|
|
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 = (_,
|
|
528
|
+
}, [q.current, y]);
|
|
529
|
+
const K = (_, k) => {
|
|
530
530
|
_.stopPropagation();
|
|
531
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
537
|
function lt(_) {
|
|
538
|
-
if (
|
|
538
|
+
if (b)
|
|
539
539
|
return _ ? /* @__PURE__ */ t.jsx(
|
|
540
540
|
"img",
|
|
541
541
|
{
|
|
@@ -545,7 +545,7 @@ const ze = (r) => {
|
|
|
545
545
|
height: 16
|
|
546
546
|
}
|
|
547
547
|
) : /* @__PURE__ */ t.jsx(
|
|
548
|
-
|
|
548
|
+
v,
|
|
549
549
|
{
|
|
550
550
|
name: "Image",
|
|
551
551
|
width: 16,
|
|
@@ -555,19 +555,19 @@ const ze = (r) => {
|
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
557
|
const j = (_) => {
|
|
558
|
-
const { active:
|
|
559
|
-
if (T &&
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
const P = [...s], [rt] = P.splice(
|
|
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,
|
|
571
571
|
{
|
|
572
572
|
name: "DotsSixVertical",
|
|
573
573
|
hoverable: !0,
|
|
@@ -575,8 +575,8 @@ const ze = (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
582
|
const rt = [...s], ut = u.find((ft) => ft.name === P);
|
|
@@ -585,7 +585,7 @@ const ze = (r) => {
|
|
|
585
585
|
...ut,
|
|
586
586
|
name: P
|
|
587
587
|
} : ft);
|
|
588
|
-
|
|
588
|
+
E({
|
|
589
589
|
..._,
|
|
590
590
|
name: P
|
|
591
591
|
}), i([...dt]);
|
|
@@ -595,8 +595,8 @@ const ze = (r) => {
|
|
|
595
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
602
|
const ut = [...s].map((dt) => dt.id === _.id ? {
|
|
@@ -606,10 +606,10 @@ const ze = (r) => {
|
|
|
606
606
|
i([...ut]);
|
|
607
607
|
},
|
|
608
608
|
value: _.name,
|
|
609
|
-
placeholder:
|
|
609
|
+
placeholder: x
|
|
610
610
|
}
|
|
611
611
|
),
|
|
612
|
-
|
|
612
|
+
m === "image" && /* @__PURE__ */ t.jsx(
|
|
613
613
|
gt,
|
|
614
614
|
{
|
|
615
615
|
onChange: (P) => {
|
|
@@ -619,12 +619,12 @@ const ze = (r) => {
|
|
|
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:
|
|
627
|
-
|
|
625
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
|
|
626
|
+
n && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
627
|
+
v,
|
|
628
628
|
{
|
|
629
629
|
name: "Sliders",
|
|
630
630
|
hoverable: !0,
|
|
@@ -633,8 +633,8 @@ const ze = (r) => {
|
|
|
633
633
|
onClick: (P) => K(P, _)
|
|
634
634
|
}
|
|
635
635
|
) }),
|
|
636
|
-
|
|
637
|
-
|
|
636
|
+
g && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
637
|
+
v,
|
|
638
638
|
{
|
|
639
639
|
name: "Trash",
|
|
640
640
|
hoverable: !0,
|
|
@@ -647,63 +647,63 @@ const ze = (r) => {
|
|
|
647
647
|
] })
|
|
648
648
|
] });
|
|
649
649
|
return c ? /* @__PURE__ */ t.jsx(
|
|
650
|
-
|
|
650
|
+
Fe,
|
|
651
651
|
{
|
|
652
652
|
product: _,
|
|
653
|
-
index:
|
|
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:
|
|
672
|
+
current: o,
|
|
673
673
|
onChange: (_) => e == null ? void 0 : e(_)
|
|
674
674
|
}
|
|
675
675
|
)
|
|
676
676
|
] }),
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
f && n && I && G && /* @__PURE__ */ t.jsx(
|
|
678
|
+
Le,
|
|
679
679
|
{
|
|
680
|
-
ref:
|
|
681
|
-
activeItem:
|
|
682
|
-
setActiveItem:
|
|
683
|
-
popupPosition:
|
|
684
|
-
modalOptions:
|
|
680
|
+
ref: q,
|
|
681
|
+
activeItem: f,
|
|
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
699
|
items: s.map((_) => _.id),
|
|
700
|
-
strategy:
|
|
701
|
-
children: s.map((_,
|
|
700
|
+
strategy: wt,
|
|
701
|
+
children: s.map((_, k) => M(_, k))
|
|
702
702
|
}
|
|
703
703
|
)
|
|
704
704
|
}
|
|
705
|
-
) : s.map((_,
|
|
706
|
-
|
|
705
|
+
) : s.map((_, k) => M(_, k)),
|
|
706
|
+
h && /* @__PURE__ */ t.jsx(
|
|
707
707
|
"div",
|
|
708
708
|
{
|
|
709
709
|
style: {
|
|
@@ -712,45 +712,45 @@ const ze = (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
724
|
const _ = [...s];
|
|
725
|
-
let
|
|
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
739
|
id: _t(),
|
|
740
|
-
...
|
|
740
|
+
...D
|
|
741
741
|
}) : _.push({
|
|
742
742
|
name: `Image ${s.length + 1}`,
|
|
743
743
|
id: _t(),
|
|
744
|
-
...
|
|
744
|
+
...D
|
|
745
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,
|
|
754
754
|
{
|
|
755
755
|
name: "Plus",
|
|
756
756
|
width: 16,
|
|
@@ -763,9 +763,9 @@ const ze = (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",
|
|
@@ -780,60 +780,60 @@ const ze = (r) => {
|
|
|
780
780
|
}
|
|
781
781
|
)
|
|
782
782
|
] });
|
|
783
|
-
},
|
|
784
|
-
title:
|
|
785
|
-
subtitle:
|
|
786
|
-
header:
|
|
787
|
-
text:
|
|
788
|
-
productsBlock:
|
|
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:
|
|
806
|
-
deleteButton:
|
|
807
|
-
},
|
|
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
|
+
productsBlock: We,
|
|
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
|
+
deleteButton: ms
|
|
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
|
-
addable:
|
|
819
|
-
itemsOptions:
|
|
820
|
-
hasRangeSelector:
|
|
821
|
-
rangeSelectorOptions:
|
|
822
|
-
limit:
|
|
818
|
+
addable: b = !0,
|
|
819
|
+
itemsOptions: g,
|
|
820
|
+
hasRangeSelector: h = !1,
|
|
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
|
|
834
834
|
}
|
|
835
835
|
) : /* @__PURE__ */ t.jsx(
|
|
836
|
-
|
|
836
|
+
v,
|
|
837
837
|
{
|
|
838
838
|
name: "Image",
|
|
839
839
|
width: 16,
|
|
@@ -842,12 +842,12 @@ const ze = (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,
|
|
851
851
|
{
|
|
852
852
|
name: "DotsSixVertical",
|
|
853
853
|
hoverable: !0,
|
|
@@ -856,28 +856,28 @@ const ze = (r) => {
|
|
|
856
856
|
}
|
|
857
857
|
) }),
|
|
858
858
|
/* @__PURE__ */ t.jsx(
|
|
859
|
-
|
|
859
|
+
nt,
|
|
860
860
|
{
|
|
861
861
|
onChange: (S) => {
|
|
862
|
-
const
|
|
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(
|
|
873
|
-
|
|
873
|
+
v,
|
|
874
874
|
{
|
|
875
875
|
name: "Trash",
|
|
876
876
|
hoverable: !0,
|
|
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,25 +887,25 @@ const ze = (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
|
-
|
|
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((
|
|
908
|
-
|
|
907
|
+
s.map((I) => O(I)),
|
|
908
|
+
b && /* @__PURE__ */ t.jsx(
|
|
909
909
|
"div",
|
|
910
910
|
{
|
|
911
911
|
style: {
|
|
@@ -915,25 +915,25 @@ const ze = (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"
|
|
@@ -941,7 +941,7 @@ const ze = (r) => {
|
|
|
941
941
|
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
942
942
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
943
943
|
/* @__PURE__ */ t.jsx(
|
|
944
|
-
|
|
944
|
+
v,
|
|
945
945
|
{
|
|
946
946
|
name: "Plus",
|
|
947
947
|
width: 16,
|
|
@@ -954,14 +954,14 @@ const ze = (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 ze = (r) => {
|
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
] });
|
|
974
|
-
},
|
|
975
|
-
title:
|
|
976
|
-
subtitle:
|
|
977
|
-
header:
|
|
978
|
-
text:
|
|
979
|
-
productsBlock:
|
|
980
|
-
top:
|
|
981
|
-
itemsBlock:
|
|
982
|
-
typeTexts:
|
|
983
|
-
block:
|
|
984
|
-
active:
|
|
985
|
-
products:
|
|
986
|
-
product:
|
|
987
|
-
button:
|
|
988
|
-
disabled:
|
|
989
|
-
image:
|
|
990
|
-
info:
|
|
991
|
-
name:
|
|
992
|
-
buttons:
|
|
993
|
-
modal:
|
|
994
|
-
link:
|
|
995
|
-
modalOptions:
|
|
996
|
-
addButton:
|
|
997
|
-
deleteButton:
|
|
998
|
-
closeIcon:
|
|
999
|
-
},
|
|
1000
|
-
(r,
|
|
1001
|
-
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions:
|
|
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
|
+
text: gs,
|
|
979
|
+
productsBlock: fs,
|
|
980
|
+
top: bs,
|
|
981
|
+
itemsBlock: vs,
|
|
982
|
+
typeTexts: js,
|
|
983
|
+
block: ys,
|
|
984
|
+
active: Is,
|
|
985
|
+
products: ks,
|
|
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
|
+
addButton: Os,
|
|
997
|
+
deleteButton: qs,
|
|
998
|
+
closeIcon: Es
|
|
999
|
+
}, Ds = p.forwardRef(
|
|
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();
|
|
@@ -1018,7 +1018,7 @@ const ze = (r) => {
|
|
|
1018
1018
|
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
1019
1019
|
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: d(e.name, 20) }),
|
|
1020
1020
|
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1021
|
-
|
|
1021
|
+
v,
|
|
1022
1022
|
{
|
|
1023
1023
|
name: "X",
|
|
1024
1024
|
height: 20,
|
|
@@ -1030,7 +1030,7 @@ const ze = (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,
|
|
@@ -1038,11 +1038,11 @@ const ze = (r) => {
|
|
|
1038
1038
|
label: "Put up an attractive image",
|
|
1039
1039
|
activeImage: e[n.field],
|
|
1040
1040
|
onChange: (c) => {
|
|
1041
|
-
const
|
|
1041
|
+
const b = {
|
|
1042
1042
|
...e,
|
|
1043
1043
|
[n.field]: c
|
|
1044
1044
|
};
|
|
1045
|
-
s(
|
|
1045
|
+
s(b);
|
|
1046
1046
|
}
|
|
1047
1047
|
},
|
|
1048
1048
|
String(n.field)
|
|
@@ -1053,33 +1053,33 @@ const ze = (r) => {
|
|
|
1053
1053
|
{
|
|
1054
1054
|
typesText: e[n.field.type],
|
|
1055
1055
|
setTypesText: (c) => {
|
|
1056
|
-
const
|
|
1056
|
+
const b = {
|
|
1057
1057
|
...e,
|
|
1058
1058
|
[n.field.type]: c
|
|
1059
1059
|
};
|
|
1060
|
-
s(
|
|
1060
|
+
s(b);
|
|
1061
1061
|
},
|
|
1062
1062
|
text: e[n.field.text] || "",
|
|
1063
1063
|
setText: (c) => {
|
|
1064
|
-
const
|
|
1064
|
+
const b = {
|
|
1065
1065
|
...e,
|
|
1066
1066
|
[n.field.text]: c
|
|
1067
1067
|
};
|
|
1068
|
-
s(
|
|
1068
|
+
s(b);
|
|
1069
1069
|
},
|
|
1070
1070
|
subtitle: n.label
|
|
1071
1071
|
}
|
|
1072
1072
|
);
|
|
1073
1073
|
if (n.type === "input")
|
|
1074
1074
|
return /* @__PURE__ */ t.jsx(
|
|
1075
|
-
|
|
1075
|
+
X,
|
|
1076
1076
|
{
|
|
1077
1077
|
onChange: (c) => {
|
|
1078
|
-
const
|
|
1078
|
+
const b = {
|
|
1079
1079
|
...e,
|
|
1080
1080
|
[n.field]: c
|
|
1081
1081
|
};
|
|
1082
|
-
s(
|
|
1082
|
+
s(b);
|
|
1083
1083
|
},
|
|
1084
1084
|
value: e[n.field] || "",
|
|
1085
1085
|
label: n.label,
|
|
@@ -1089,14 +1089,14 @@ const ze = (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
|
-
const
|
|
1095
|
+
const b = {
|
|
1096
1096
|
...e,
|
|
1097
1097
|
[n.field.text]: c
|
|
1098
1098
|
};
|
|
1099
|
-
s(
|
|
1099
|
+
s(b);
|
|
1100
1100
|
},
|
|
1101
1101
|
value: e[n.field.text] || "",
|
|
1102
1102
|
label: n.inputLabel,
|
|
@@ -1104,35 +1104,35 @@ const ze = (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,
|
|
1111
1111
|
onChange: (c) => {
|
|
1112
|
-
const
|
|
1112
|
+
const b = {
|
|
1113
1113
|
...e,
|
|
1114
1114
|
[n.field.switch]: c
|
|
1115
1115
|
};
|
|
1116
|
-
s(
|
|
1116
|
+
s(b);
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
)
|
|
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) => {
|
|
1127
|
-
const
|
|
1127
|
+
const b = {
|
|
1128
1128
|
...e,
|
|
1129
1129
|
[n.field]: c
|
|
1130
1130
|
};
|
|
1131
|
-
s(
|
|
1131
|
+
s(b);
|
|
1132
1132
|
},
|
|
1133
1133
|
label: n.label,
|
|
1134
1134
|
value: e[n.field] || "String",
|
|
1135
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
1135
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
|
|
1136
1136
|
}
|
|
1137
1137
|
);
|
|
1138
1138
|
}) })
|
|
@@ -1141,17 +1141,17 @@ const ze = (r) => {
|
|
|
1141
1141
|
);
|
|
1142
1142
|
}
|
|
1143
1143
|
);
|
|
1144
|
-
function
|
|
1145
|
-
const { product:
|
|
1146
|
-
id:
|
|
1144
|
+
function Ls(r) {
|
|
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 Ds(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
|
-
withImage:
|
|
1175
|
-
deletable:
|
|
1176
|
-
addable:
|
|
1177
|
-
itemsType:
|
|
1178
|
-
itemsPlaceholder:
|
|
1174
|
+
withImage: b = !1,
|
|
1175
|
+
deletable: g = !0,
|
|
1176
|
+
addable: h = !0,
|
|
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), [
|
|
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,36 +1193,36 @@ const da = (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
|
-
_ + j >
|
|
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
1211
|
top: _,
|
|
1212
|
-
left:
|
|
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
1218
|
const _ = j.target.getBoundingClientRect();
|
|
1219
|
-
|
|
1219
|
+
et({
|
|
1220
1220
|
top: _.top + window.scrollY,
|
|
1221
1221
|
left: _.left - 30
|
|
1222
|
-
}), S(
|
|
1222
|
+
}), S(M), q(!0);
|
|
1223
1223
|
};
|
|
1224
1224
|
function H(j) {
|
|
1225
|
-
if (
|
|
1225
|
+
if (b)
|
|
1226
1226
|
return j ? /* @__PURE__ */ t.jsx(
|
|
1227
1227
|
"img",
|
|
1228
1228
|
{
|
|
@@ -1232,7 +1232,7 @@ const da = (r) => {
|
|
|
1232
1232
|
height: 16
|
|
1233
1233
|
}
|
|
1234
1234
|
) : /* @__PURE__ */ t.jsx(
|
|
1235
|
-
|
|
1235
|
+
v,
|
|
1236
1236
|
{
|
|
1237
1237
|
name: "Image",
|
|
1238
1238
|
width: 16,
|
|
@@ -1242,19 +1242,19 @@ const da = (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
1254
|
var _;
|
|
1255
|
-
const
|
|
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
|
{
|
|
1259
1259
|
name: "DotsSixVertical",
|
|
1260
1260
|
hoverable: !0,
|
|
@@ -1262,132 +1262,132 @@ const da = (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: (_ = s.find((
|
|
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: [
|
|
1311
1311
|
n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1312
|
-
|
|
1312
|
+
v,
|
|
1313
1313
|
{
|
|
1314
1314
|
name: "Sliders",
|
|
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
|
-
|
|
1322
|
-
|
|
1321
|
+
g && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1322
|
+
v,
|
|
1323
1323
|
{
|
|
1324
1324
|
name: "Trash",
|
|
1325
1325
|
hoverable: !0,
|
|
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
|
] })
|
|
1333
1333
|
] });
|
|
1334
1334
|
return c ? /* @__PURE__ */ t.jsx(
|
|
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 &&
|
|
1362
|
-
|
|
1361
|
+
B && n && I && $ && /* @__PURE__ */ t.jsx(
|
|
1362
|
+
Ds,
|
|
1363
1363
|
{
|
|
1364
1364
|
ref: y,
|
|
1365
1365
|
activeItem: B,
|
|
1366
1366
|
setActiveItem: S,
|
|
1367
|
-
popupPosition:
|
|
1368
|
-
modalOptions:
|
|
1369
|
-
setIsOpenModal:
|
|
1367
|
+
popupPosition: f,
|
|
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
|
)
|
|
1388
1388
|
}
|
|
1389
1389
|
) : s.map((j) => lt(j)),
|
|
1390
|
-
|
|
1390
|
+
h && /* @__PURE__ */ t.jsx(
|
|
1391
1391
|
"div",
|
|
1392
1392
|
{
|
|
1393
1393
|
style: {
|
|
@@ -1396,36 +1396,36 @@ const da = (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
1408
|
for (let _ = 0; _ < u.length; _++)
|
|
1409
|
-
if (!s.find((
|
|
1410
|
-
|
|
1409
|
+
if (!s.find((k) => k.name === u[_])) {
|
|
1410
|
+
M = u[_];
|
|
1411
1411
|
break;
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
|
-
|
|
1415
|
-
name:
|
|
1414
|
+
m === "select" && u ? j.push({
|
|
1415
|
+
name: M || u[0],
|
|
1416
1416
|
id: _t(),
|
|
1417
|
-
...
|
|
1417
|
+
...D,
|
|
1418
1418
|
maxSymbols: 100
|
|
1419
1419
|
// пример значения
|
|
1420
|
-
}) :
|
|
1420
|
+
}) : m === "input" ? j.push({
|
|
1421
1421
|
name: "",
|
|
1422
1422
|
id: _t(),
|
|
1423
|
-
...
|
|
1423
|
+
...D,
|
|
1424
1424
|
maxSymbols: 100
|
|
1425
1425
|
}) : j.push({
|
|
1426
1426
|
name: `Image ${s.length + 1}`,
|
|
1427
1427
|
id: _t(),
|
|
1428
|
-
...
|
|
1428
|
+
...D,
|
|
1429
1429
|
maxSymbols: 100
|
|
1430
1430
|
}), i(j);
|
|
1431
1431
|
},
|
|
@@ -1435,7 +1435,7 @@ const da = (r) => {
|
|
|
1435
1435
|
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
1436
1436
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1437
1437
|
/* @__PURE__ */ t.jsx(
|
|
1438
|
-
|
|
1438
|
+
v,
|
|
1439
1439
|
{
|
|
1440
1440
|
name: "Plus",
|
|
1441
1441
|
width: 16,
|
|
@@ -1448,62 +1448,62 @@ const da = (r) => {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
)
|
|
1450
1450
|
] }),
|
|
1451
|
-
|
|
1451
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(vt, { items: a })
|
|
1452
1452
|
] });
|
|
1453
|
-
},
|
|
1454
|
-
title:
|
|
1455
|
-
subtitle:
|
|
1456
|
-
header:
|
|
1457
|
-
text:
|
|
1458
|
-
productsBlock:
|
|
1459
|
-
buttonsBlock:
|
|
1460
|
-
top:
|
|
1461
|
-
itemsBlock:
|
|
1462
|
-
typeTexts:
|
|
1463
|
-
block:
|
|
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, [
|
|
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
|
+
title: Rs,
|
|
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
|
+
block: Ws,
|
|
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:
|
|
1506
|
-
|
|
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
|
+
v,
|
|
1507
1507
|
{
|
|
1508
1508
|
name: "X",
|
|
1509
1509
|
height: 20,
|
|
@@ -1513,46 +1513,46 @@ const da = (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 da = (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 da = (r) => {
|
|
|
1568
1568
|
]
|
|
1569
1569
|
}
|
|
1570
1570
|
);
|
|
1571
|
-
}),
|
|
1572
|
-
subtitle:
|
|
1573
|
-
header:
|
|
1574
|
-
text:
|
|
1575
|
-
productsBlock:
|
|
1576
|
-
buttonsBlock:
|
|
1577
|
-
top:
|
|
1578
|
-
itemsBlock:
|
|
1579
|
-
typeTexts:
|
|
1580
|
-
block:
|
|
1581
|
-
active:
|
|
1582
|
-
products:
|
|
1583
|
-
product:
|
|
1584
|
-
button:
|
|
1585
|
-
image:
|
|
1586
|
-
info:
|
|
1587
|
-
name:
|
|
1588
|
-
buttons:
|
|
1589
|
-
modal:
|
|
1590
|
-
other:
|
|
1591
|
-
options:
|
|
1592
|
-
addButton:
|
|
1593
|
-
deleteButton:
|
|
1594
|
-
},
|
|
1595
|
-
const { buttons:
|
|
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
|
+
productsBlock: mn,
|
|
1576
|
+
buttonsBlock: hn,
|
|
1577
|
+
top: pn,
|
|
1578
|
+
itemsBlock: xn,
|
|
1579
|
+
typeTexts: gn,
|
|
1580
|
+
block: fn,
|
|
1581
|
+
active: bn,
|
|
1582
|
+
products: vn,
|
|
1583
|
+
product: jn,
|
|
1584
|
+
button: yn,
|
|
1585
|
+
image: In,
|
|
1586
|
+
info: kn,
|
|
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,
|
|
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
|
|
1622
|
-
|
|
1623
|
-
const u =
|
|
1624
|
-
|
|
1620
|
+
}, [g.current, c]);
|
|
1621
|
+
const h = (m, x) => {
|
|
1622
|
+
m.stopPropagation();
|
|
1623
|
+
const u = m.target.getBoundingClientRect();
|
|
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:
|
|
1652
|
-
|
|
1650
|
+
/* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
|
|
1651
|
+
/* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1652
|
+
v,
|
|
1653
1653
|
{
|
|
1654
1654
|
name: "Sliders",
|
|
1655
1655
|
hoverable: !0,
|
|
1656
1656
|
width: 20,
|
|
1657
1657
|
height: 20,
|
|
1658
|
-
onClick: (
|
|
1659
|
-
|
|
1658
|
+
onClick: (x) => {
|
|
1659
|
+
h(x, m);
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
1662
1662
|
) }),
|
|
1663
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1664
|
-
|
|
1663
|
+
s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
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 da = (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,14 +1697,14 @@ const da = (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
1709
|
id: _t(),
|
|
1710
1710
|
typesText: [],
|
|
@@ -1712,15 +1712,15 @@ const da = (r) => {
|
|
|
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,
|
|
1724
1724
|
{
|
|
1725
1725
|
name: "Plus",
|
|
1726
1726
|
width: 16,
|
|
@@ -1733,53 +1733,53 @@ const da = (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:
|
|
1760
|
-
content:
|
|
1761
|
-
range:
|
|
1762
|
-
track:
|
|
1763
|
-
progress:
|
|
1764
|
-
dots:
|
|
1765
|
-
dot:
|
|
1766
|
-
active:
|
|
1767
|
-
input:
|
|
1768
|
-
countBlock:
|
|
1769
|
-
count:
|
|
1770
|
-
controls:
|
|
1771
|
-
button:
|
|
1772
|
-
},
|
|
1773
|
-
const { label:
|
|
1774
|
-
|
|
1775
|
-
},
|
|
1776
|
-
|
|
1777
|
-
},
|
|
1778
|
-
const u = e +
|
|
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
|
+
content: On,
|
|
1761
|
+
range: qn,
|
|
1762
|
+
track: En,
|
|
1763
|
+
progress: Dn,
|
|
1764
|
+
dots: Ln,
|
|
1765
|
+
dot: Rn,
|
|
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
|
+
}, h = () => {
|
|
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 }),
|
|
@@ -1787,18 +1787,18 @@ const da = (r) => {
|
|
|
1787
1787
|
"div",
|
|
1788
1788
|
{
|
|
1789
1789
|
className: Y.progress,
|
|
1790
|
-
style: { width: `${
|
|
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 da = (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,29 +1825,29 @@ const da = (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(
|
|
1850
|
-
|
|
1850
|
+
v,
|
|
1851
1851
|
{
|
|
1852
1852
|
name: "CaretUp",
|
|
1853
1853
|
width: 15,
|
|
@@ -1859,12 +1859,12 @@ const da = (r) => {
|
|
|
1859
1859
|
/* @__PURE__ */ t.jsx(
|
|
1860
1860
|
"button",
|
|
1861
1861
|
{
|
|
1862
|
-
onClick:
|
|
1863
|
-
disabled:
|
|
1862
|
+
onClick: h,
|
|
1863
|
+
disabled: a <= e,
|
|
1864
1864
|
className: Y.button,
|
|
1865
1865
|
"aria-label": "Decrement count",
|
|
1866
1866
|
children: /* @__PURE__ */ t.jsx(
|
|
1867
|
-
|
|
1867
|
+
v,
|
|
1868
1868
|
{
|
|
1869
1869
|
name: "CaretDown",
|
|
1870
1870
|
width: 15,
|
|
@@ -1877,32 +1877,32 @@ const da = (r) => {
|
|
|
1877
1877
|
] })
|
|
1878
1878
|
] })
|
|
1879
1879
|
] });
|
|
1880
|
-
},
|
|
1881
|
-
title:
|
|
1882
|
-
subtitle:
|
|
1883
|
-
header:
|
|
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:
|
|
1901
|
-
addButton:
|
|
1902
|
-
deleteButton:
|
|
1903
|
-
closeIcon:
|
|
1904
|
-
},
|
|
1905
|
-
const { activeItem:
|
|
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
|
+
header: Wn,
|
|
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
|
+
addButton: mi,
|
|
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;
|
|
@@ -1922,7 +1922,7 @@ const da = (r) => {
|
|
|
1922
1922
|
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1923
1923
|
/* @__PURE__ */ t.jsx("h3", { children: d(l.productData.name, 20) }),
|
|
1924
1924
|
/* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1925
|
-
|
|
1925
|
+
v,
|
|
1926
1926
|
{
|
|
1927
1927
|
name: "X",
|
|
1928
1928
|
height: 20,
|
|
@@ -1940,7 +1940,7 @@ const da = (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);
|
|
@@ -1951,17 +1951,17 @@ const da = (r) => {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
);
|
|
1953
1953
|
};
|
|
1954
|
-
function
|
|
1955
|
-
const { product:
|
|
1956
|
-
id: String(
|
|
1954
|
+
function gi(r) {
|
|
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 pi(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
|
-
withImage:
|
|
1985
|
-
deletable:
|
|
1986
|
-
addable:
|
|
1987
|
-
itemsType:
|
|
1988
|
-
itemsOptions:
|
|
1989
|
-
} = r, [u,
|
|
1984
|
+
withImage: b = !1,
|
|
1985
|
+
deletable: g = !0,
|
|
1986
|
+
addable: h = !0,
|
|
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) {
|
|
@@ -2011,17 +2011,17 @@ const _a = (r) => {
|
|
|
2011
2011
|
i(y);
|
|
2012
2012
|
}
|
|
2013
2013
|
}, [u]);
|
|
2014
|
-
const
|
|
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
|
|
2024
|
-
if (
|
|
2023
|
+
function E(y) {
|
|
2024
|
+
if (b)
|
|
2025
2025
|
return y ? /* @__PURE__ */ t.jsx(
|
|
2026
2026
|
"img",
|
|
2027
2027
|
{
|
|
@@ -2031,7 +2031,7 @@ const _a = (r) => {
|
|
|
2031
2031
|
height: 16
|
|
2032
2032
|
}
|
|
2033
2033
|
) : /* @__PURE__ */ t.jsx(
|
|
2034
|
-
|
|
2034
|
+
v,
|
|
2035
2035
|
{
|
|
2036
2036
|
name: "Image",
|
|
2037
2037
|
width: 16,
|
|
@@ -2040,21 +2040,21 @@ 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,
|
|
2058
2058
|
{
|
|
2059
2059
|
name: "DotsSixVertical",
|
|
2060
2060
|
hoverable: !0,
|
|
@@ -2062,41 +2062,41 @@ 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
|
$
|
|
2086
2086
|
),
|
|
2087
2087
|
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
2088
2088
|
n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2089
|
-
|
|
2089
|
+
v,
|
|
2090
2090
|
{
|
|
2091
2091
|
name: "Sliders",
|
|
2092
2092
|
hoverable: !0,
|
|
2093
2093
|
width: 20,
|
|
2094
2094
|
height: 20,
|
|
2095
|
-
onClick: (A) =>
|
|
2095
|
+
onClick: (A) => f(A, y)
|
|
2096
2096
|
}
|
|
2097
2097
|
) }),
|
|
2098
|
-
|
|
2099
|
-
|
|
2098
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2099
|
+
v,
|
|
2100
2100
|
{
|
|
2101
2101
|
name: "Trash",
|
|
2102
2102
|
hoverable: !0,
|
|
@@ -2109,7 +2109,7 @@ const _a = (r) => {
|
|
|
2109
2109
|
] })
|
|
2110
2110
|
] });
|
|
2111
2111
|
return c ? /* @__PURE__ */ t.jsx(
|
|
2112
|
-
|
|
2112
|
+
gi,
|
|
2113
2113
|
{
|
|
2114
2114
|
product: y,
|
|
2115
2115
|
children: G
|
|
@@ -2125,44 +2125,44 @@ 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, $) =>
|
|
2165
|
-
|
|
2164
|
+
) : s.map((y, $) => et(y, $)),
|
|
2165
|
+
h && /* @__PURE__ */ t.jsx(
|
|
2166
2166
|
"div",
|
|
2167
2167
|
{
|
|
2168
2168
|
style: {
|
|
@@ -2171,31 +2171,31 @@ 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
|
},
|
|
2195
2195
|
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
2196
2196
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2197
2197
|
/* @__PURE__ */ t.jsx(
|
|
2198
|
-
|
|
2198
|
+
v,
|
|
2199
2199
|
{
|
|
2200
2200
|
name: "Plus",
|
|
2201
2201
|
width: 16,
|
|
@@ -2208,106 +2208,106 @@ 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:
|
|
2220
|
-
meta:
|
|
2221
|
-
info:
|
|
2222
|
-
infoRight:
|
|
2223
|
-
buttons:
|
|
2224
|
-
variants:
|
|
2225
|
-
variant:
|
|
2226
|
-
stock:
|
|
2227
|
-
variantInfo:
|
|
2228
|
-
quantity:
|
|
2229
|
-
count:
|
|
2230
|
-
focused:
|
|
2231
|
-
button:
|
|
2232
|
-
activeVariant:
|
|
2233
|
-
chargeTypes:
|
|
2234
|
-
charge:
|
|
2235
|
-
chargeActive:
|
|
2236
|
-
title:
|
|
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
|
+
meta: ki,
|
|
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
|
+
button: Oi,
|
|
2232
|
+
activeVariant: qi,
|
|
2233
|
+
chargeTypes: Ei,
|
|
2234
|
+
charge: Di,
|
|
2235
|
+
chargeActive: Li,
|
|
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
|
-
const
|
|
2245
|
-
return () => clearTimeout(
|
|
2244
|
+
const f = setTimeout(() => u(!1), 600);
|
|
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
|
|
2258
|
-
if (
|
|
2259
|
-
const $ = Math.floor(
|
|
2257
|
+
function I(f) {
|
|
2258
|
+
if (f >= 864e5) {
|
|
2259
|
+
const $ = Math.floor(f / 864e5);
|
|
2260
2260
|
return `${$} ${$ === 1 ? "day" : "days"}`;
|
|
2261
|
-
} else if (
|
|
2262
|
-
const $ = Math.floor(
|
|
2261
|
+
} else if (f >= 36e5) {
|
|
2262
|
+
const $ = Math.floor(f / 36e5);
|
|
2263
2263
|
return `${$} ${$ === 1 ? "hour" : "hours"}`;
|
|
2264
|
-
} else if (
|
|
2265
|
-
const $ = Math.floor(
|
|
2264
|
+
} else if (f >= 6e4) {
|
|
2265
|
+
const $ = Math.floor(f / 6e4);
|
|
2266
2266
|
return `${$} ${$ === 1 ? "minute" : "minutes"}`;
|
|
2267
2267
|
} else {
|
|
2268
|
-
const $ = Math.floor(
|
|
2268
|
+
const $ = Math.floor(f / 1e3);
|
|
2269
2269
|
return `${$} ${$ === 1 ? "second" : "seconds"}`;
|
|
2270
2270
|
}
|
|
2271
2271
|
}
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
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
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((
|
|
2276
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
2277
2277
|
"div",
|
|
2278
2278
|
{
|
|
2279
2279
|
className: F(N.charge, {
|
|
2280
|
-
[N.chargeActive]: i ===
|
|
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
|
{
|
|
2292
2292
|
className: F(N.variant, {
|
|
2293
|
-
[N.activeVariant]: e.id ===
|
|
2293
|
+
[N.activeVariant]: e.id === f.id
|
|
2294
2294
|
}),
|
|
2295
|
-
onClick: () => s(
|
|
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
|
-
i === "ONE_TIME" ?
|
|
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
|
]
|
|
2309
2309
|
},
|
|
2310
|
-
|
|
2310
|
+
f.id
|
|
2311
2311
|
);
|
|
2312
2312
|
}) }),
|
|
2313
2313
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
@@ -2315,11 +2315,11 @@ const ha = (r) => {
|
|
|
2315
2315
|
"button",
|
|
2316
2316
|
{
|
|
2317
2317
|
onClick: () => {
|
|
2318
|
-
d > 1 ? n((
|
|
2318
|
+
d > 1 ? n((f) => f - 1) : n(1);
|
|
2319
2319
|
},
|
|
2320
2320
|
className: N.button,
|
|
2321
2321
|
disabled: e.quantity.restrictions && d <= e.quantity.restrictions.min,
|
|
2322
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2322
|
+
children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
|
|
2323
2323
|
}
|
|
2324
2324
|
),
|
|
2325
2325
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2328,14 +2328,14 @@ const ha = (r) => {
|
|
|
2328
2328
|
className: F(N.count, {
|
|
2329
2329
|
[N.focused]: c
|
|
2330
2330
|
}),
|
|
2331
|
-
onFocus: () =>
|
|
2332
|
-
onBlur: () =>
|
|
2331
|
+
onFocus: () => b(!0),
|
|
2332
|
+
onBlur: () => b(!1),
|
|
2333
2333
|
children: /* @__PURE__ */ t.jsx(
|
|
2334
|
-
|
|
2334
|
+
X,
|
|
2335
2335
|
{
|
|
2336
2336
|
type: "number",
|
|
2337
2337
|
value: String(d),
|
|
2338
|
-
onChange: (
|
|
2338
|
+
onChange: (f) => n(Number(f)),
|
|
2339
2339
|
max: ((B = e.quantity.restrictions) == null ? void 0 : B.max) || e.quantity.available || 1 / 0,
|
|
2340
2340
|
min: ((S = e.quantity.restrictions) == null ? void 0 : S.min) || 0,
|
|
2341
2341
|
style: {
|
|
@@ -2351,11 +2351,11 @@ const ha = (r) => {
|
|
|
2351
2351
|
"button",
|
|
2352
2352
|
{
|
|
2353
2353
|
onClick: () => {
|
|
2354
|
-
n((
|
|
2354
|
+
n((f) => f + 1);
|
|
2355
2355
|
},
|
|
2356
2356
|
className: N.button,
|
|
2357
2357
|
disabled: !!(e.quantity.restrictions && d >= e.quantity.restrictions.max || e.quantity.available && d >= e.quantity.available),
|
|
2358
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2358
|
+
children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
|
|
2359
2359
|
}
|
|
2360
2360
|
)
|
|
2361
2361
|
] }),
|
|
@@ -2364,7 +2364,7 @@ const ha = (r) => {
|
|
|
2364
2364
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2365
2365
|
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
2366
2366
|
/* @__PURE__ */ t.jsx(
|
|
2367
|
-
|
|
2367
|
+
v,
|
|
2368
2368
|
{
|
|
2369
2369
|
name: "Lightning",
|
|
2370
2370
|
fill: "#FF3F19",
|
|
@@ -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,326 +2406,310 @@ 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
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
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,
|
|
2439
|
+
title: Wi,
|
|
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,
|
|
2456
|
+
subtotal: mo,
|
|
2457
|
+
block: ho,
|
|
2458
|
+
shoppingCount: po,
|
|
2459
|
+
total: xo,
|
|
2460
|
+
link: go,
|
|
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:
|
|
2492
|
+
disabled: a,
|
|
2493
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
|
|
2494
|
+
o,
|
|
2488
2495
|
/* @__PURE__ */ t.jsx(
|
|
2489
|
-
|
|
2496
|
+
v,
|
|
2490
2497
|
{
|
|
2491
2498
|
name: "ArrowRight",
|
|
2492
2499
|
fill: "#757575",
|
|
2493
2500
|
width: 20,
|
|
2494
2501
|
height: 20
|
|
2495
2502
|
}
|
|
2496
|
-
)
|
|
2497
|
-
|
|
2498
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2503
|
+
)
|
|
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(Co, {}),
|
|
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(To, { 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,
|
|
2584
|
-
function l(
|
|
2585
|
-
for (let
|
|
2586
|
-
for (let
|
|
2587
|
-
if (i.parts[
|
|
2588
|
-
return i.parts[
|
|
2562
|
+
}, Mo = () => {
|
|
2563
|
+
const [r, o] = p.useState(!1), [e, s] = p.useState([]), { cart: i, getProducts: a } = Pt();
|
|
2564
|
+
function l(h) {
|
|
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
|
-
function d(
|
|
2591
|
-
for (let
|
|
2592
|
-
for (let
|
|
2593
|
-
if (i.parts[
|
|
2594
|
-
return i.parts[
|
|
2570
|
+
function d(h) {
|
|
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
|
-
function n(
|
|
2607
|
-
var
|
|
2608
|
-
return !
|
|
2586
|
+
function n(h) {
|
|
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]), [
|
|
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
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2595
|
+
type: "Secondary",
|
|
2596
|
+
style: {
|
|
2597
|
+
padding: 10
|
|
2598
|
+
},
|
|
2599
|
+
onClick: (h) => {
|
|
2600
|
+
h.stopPropagation(), window.location.pathname !== "/admin/builder" && (o(!0), g(!0));
|
|
2618
2601
|
},
|
|
2619
2602
|
children: [
|
|
2620
2603
|
/* @__PURE__ */ t.jsx(
|
|
2621
|
-
|
|
2604
|
+
v,
|
|
2622
2605
|
{
|
|
2623
2606
|
name: "Handbag",
|
|
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
|
},
|
|
2622
|
+
withAnimation: !1,
|
|
2639
2623
|
children: /* @__PURE__ */ t.jsx(
|
|
2640
|
-
|
|
2624
|
+
Oo,
|
|
2641
2625
|
{
|
|
2642
2626
|
activeProducts: e,
|
|
2643
2627
|
isCartNotEmpty: c,
|
|
2644
|
-
isOpen:
|
|
2628
|
+
isOpen: b
|
|
2645
2629
|
}
|
|
2646
2630
|
)
|
|
2647
2631
|
}
|
|
2648
2632
|
)
|
|
2649
2633
|
] });
|
|
2650
|
-
},
|
|
2651
|
-
const { activeProducts:
|
|
2652
|
-
function c(
|
|
2653
|
-
n(
|
|
2634
|
+
}, Oo = (r) => {
|
|
2635
|
+
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: d } = Pt(), n = Tt();
|
|
2636
|
+
function c(h) {
|
|
2637
|
+
n(h);
|
|
2654
2638
|
}
|
|
2655
|
-
function
|
|
2639
|
+
function b(h) {
|
|
2656
2640
|
d({
|
|
2657
|
-
productId:
|
|
2658
|
-
productVariantId:
|
|
2659
|
-
quantity:
|
|
2641
|
+
productId: h.id,
|
|
2642
|
+
productVariantId: h.activeVariantId,
|
|
2643
|
+
quantity: h.quantity + 1
|
|
2660
2644
|
});
|
|
2661
2645
|
}
|
|
2662
|
-
function
|
|
2646
|
+
function g(h) {
|
|
2663
2647
|
d({
|
|
2664
|
-
productId:
|
|
2665
|
-
productVariantId:
|
|
2666
|
-
quantity:
|
|
2648
|
+
productId: h.id,
|
|
2649
|
+
productVariantId: h.activeVariantId,
|
|
2650
|
+
quantity: h.quantity - 1
|
|
2667
2651
|
});
|
|
2668
2652
|
}
|
|
2669
2653
|
return /* @__PURE__ */ t.jsxs(
|
|
2670
2654
|
"div",
|
|
2671
2655
|
{
|
|
2672
|
-
className: F(
|
|
2673
|
-
[
|
|
2656
|
+
className: F(w.modal, {
|
|
2657
|
+
[w.closing]: !s
|
|
2674
2658
|
}),
|
|
2675
|
-
onClick: (
|
|
2659
|
+
onClick: (h) => h.stopPropagation(),
|
|
2676
2660
|
children: [
|
|
2677
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2678
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2679
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2680
|
-
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 })
|
|
2681
2665
|
] }),
|
|
2682
2666
|
/* @__PURE__ */ t.jsx(
|
|
2683
2667
|
"button",
|
|
2684
2668
|
{
|
|
2685
|
-
className: F(
|
|
2686
|
-
[
|
|
2669
|
+
className: F(w.clear, {
|
|
2670
|
+
[w.activeClear]: e
|
|
2687
2671
|
}),
|
|
2688
2672
|
disabled: !e,
|
|
2689
|
-
onClick:
|
|
2673
|
+
onClick: a,
|
|
2690
2674
|
children: "Clear all"
|
|
2691
2675
|
}
|
|
2692
2676
|
)
|
|
2693
2677
|
] }),
|
|
2694
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2695
|
-
/* @__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(
|
|
2696
2680
|
"div",
|
|
2697
2681
|
{
|
|
2698
|
-
className:
|
|
2682
|
+
className: w.product,
|
|
2699
2683
|
children: [
|
|
2700
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2684
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
|
|
2701
2685
|
/* @__PURE__ */ t.jsx(
|
|
2702
2686
|
"img",
|
|
2703
2687
|
{
|
|
2704
|
-
src: `https://imagedelivery.net/${
|
|
2688
|
+
src: `https://imagedelivery.net/${h.images[0].cfId}/w=500`,
|
|
2705
2689
|
alt: "image",
|
|
2706
2690
|
width: "100%",
|
|
2707
2691
|
height: "100%",
|
|
2708
|
-
className:
|
|
2692
|
+
className: w.image
|
|
2709
2693
|
}
|
|
2710
2694
|
),
|
|
2711
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2712
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2713
|
-
/* @__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: [
|
|
2714
2698
|
"$",
|
|
2715
|
-
|
|
2699
|
+
h.variants.find((m) => m.id === h.activeVariantId).price.amount * ((h == null ? void 0 : h.quantity) || 1)
|
|
2716
2700
|
] })
|
|
2717
2701
|
] })
|
|
2718
2702
|
] }),
|
|
2719
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2703
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
|
|
2720
2704
|
/* @__PURE__ */ t.jsx(
|
|
2721
2705
|
"div",
|
|
2722
2706
|
{
|
|
2723
2707
|
onClick: () => {
|
|
2724
|
-
|
|
2708
|
+
h.quantity !== 1 && g(h);
|
|
2725
2709
|
},
|
|
2726
|
-
className:
|
|
2710
|
+
className: w.productButton,
|
|
2727
2711
|
children: /* @__PURE__ */ t.jsx(
|
|
2728
|
-
|
|
2712
|
+
v,
|
|
2729
2713
|
{
|
|
2730
2714
|
name: "Minus",
|
|
2731
2715
|
fill: "#757575",
|
|
@@ -2735,14 +2719,14 @@ const ma = (r) => {
|
|
|
2735
2719
|
)
|
|
2736
2720
|
}
|
|
2737
2721
|
),
|
|
2738
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2722
|
+
/* @__PURE__ */ t.jsx("div", { className: w.productCount, children: h.quantity }),
|
|
2739
2723
|
/* @__PURE__ */ t.jsx(
|
|
2740
2724
|
"div",
|
|
2741
2725
|
{
|
|
2742
|
-
onClick: () =>
|
|
2743
|
-
className:
|
|
2726
|
+
onClick: () => b(h),
|
|
2727
|
+
className: w.productButton,
|
|
2744
2728
|
children: /* @__PURE__ */ t.jsx(
|
|
2745
|
-
|
|
2729
|
+
v,
|
|
2746
2730
|
{
|
|
2747
2731
|
name: "Plus",
|
|
2748
2732
|
fill: "#757575",
|
|
@@ -2755,14 +2739,14 @@ const ma = (r) => {
|
|
|
2755
2739
|
] })
|
|
2756
2740
|
]
|
|
2757
2741
|
},
|
|
2758
|
-
|
|
2742
|
+
h.id
|
|
2759
2743
|
)) }),
|
|
2760
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2761
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2762
|
-
/* @__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: [
|
|
2763
2747
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2764
2748
|
/* @__PURE__ */ t.jsx(
|
|
2765
|
-
|
|
2749
|
+
v,
|
|
2766
2750
|
{
|
|
2767
2751
|
name: "Info",
|
|
2768
2752
|
width: 20,
|
|
@@ -2771,20 +2755,20 @@ const ma = (r) => {
|
|
|
2771
2755
|
}
|
|
2772
2756
|
)
|
|
2773
2757
|
] }),
|
|
2774
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2758
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
|
|
2775
2759
|
"$",
|
|
2776
2760
|
l().total
|
|
2777
2761
|
] })
|
|
2778
2762
|
] }),
|
|
2779
|
-
/* @__PURE__ */ t.jsx(
|
|
2763
|
+
/* @__PURE__ */ t.jsx(mt, { onClick: () => c("/checkout"), children: "Checkout" })
|
|
2780
2764
|
] })
|
|
2781
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2765
|
+
] }) : /* @__PURE__ */ t.jsx(qo, {})
|
|
2782
2766
|
]
|
|
2783
2767
|
}
|
|
2784
2768
|
);
|
|
2785
|
-
},
|
|
2769
|
+
}, qo = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
|
|
2786
2770
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2787
|
-
|
|
2771
|
+
v,
|
|
2788
2772
|
{
|
|
2789
2773
|
name: "Handbag",
|
|
2790
2774
|
fill: "var(--icon-secondary)"
|
|
@@ -2798,56 +2782,162 @@ const ma = (r) => {
|
|
|
2798
2782
|
"a",
|
|
2799
2783
|
{
|
|
2800
2784
|
href: "/products",
|
|
2801
|
-
className:
|
|
2785
|
+
className: w.link,
|
|
2802
2786
|
children: "view products"
|
|
2803
2787
|
}
|
|
2804
2788
|
)
|
|
2805
2789
|
] })
|
|
2806
|
-
] }),
|
|
2807
|
-
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();
|
|
2808
2818
|
p.useEffect(() => {
|
|
2809
2819
|
(async () => {
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2820
|
+
const n = Ao(e);
|
|
2821
|
+
i(n.email);
|
|
2812
2822
|
})();
|
|
2813
|
-
}, [
|
|
2814
|
-
function
|
|
2815
|
-
|
|
2823
|
+
}, [e]);
|
|
2824
|
+
function l(d) {
|
|
2825
|
+
a(d);
|
|
2816
2826
|
}
|
|
2817
2827
|
return /* @__PURE__ */ t.jsx(
|
|
2818
2828
|
"div",
|
|
2819
2829
|
{
|
|
2820
|
-
className:
|
|
2821
|
-
onClick: () =>
|
|
2822
|
-
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
|
+
]
|
|
2872
|
+
}
|
|
2873
|
+
);
|
|
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
|
+
)
|
|
2823
2911
|
}
|
|
2824
2912
|
);
|
|
2825
|
-
},
|
|
2826
|
-
share:
|
|
2827
|
-
modal:
|
|
2828
|
-
header:
|
|
2829
|
-
socials:
|
|
2830
|
-
social:
|
|
2831
|
-
copy:
|
|
2832
|
-
title:
|
|
2833
|
-
copyWrapper:
|
|
2834
|
-
copyText:
|
|
2835
|
-
|
|
2836
|
-
|
|
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();
|
|
2837
2927
|
function e() {
|
|
2838
|
-
|
|
2928
|
+
o(!0);
|
|
2839
2929
|
}
|
|
2840
2930
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2841
2931
|
/* @__PURE__ */ t.jsx(
|
|
2842
|
-
|
|
2932
|
+
Z,
|
|
2843
2933
|
{
|
|
2844
|
-
className:
|
|
2934
|
+
className: at.share,
|
|
2845
2935
|
onClick: (s) => {
|
|
2846
2936
|
s.stopPropagation(), e();
|
|
2847
2937
|
},
|
|
2848
2938
|
type: "Secondary",
|
|
2849
2939
|
children: /* @__PURE__ */ t.jsx(
|
|
2850
|
-
|
|
2940
|
+
v,
|
|
2851
2941
|
{
|
|
2852
2942
|
name: "Share",
|
|
2853
2943
|
fill: "#757575",
|
|
@@ -2856,76 +2946,91 @@ const ma = (r) => {
|
|
|
2856
2946
|
)
|
|
2857
2947
|
}
|
|
2858
2948
|
),
|
|
2859
|
-
r && /* @__PURE__ */ t.jsx(
|
|
2949
|
+
r && /* @__PURE__ */ t.jsx(At, { close: o, children: /* @__PURE__ */ t.jsx(Jo, {}) })
|
|
2860
2950
|
] });
|
|
2861
|
-
},
|
|
2862
|
-
const { setIsOpenModal: r } = Dt(), { notification:
|
|
2863
|
-
function
|
|
2864
|
-
navigator.clipboard.writeText(
|
|
2951
|
+
}, Jo = () => {
|
|
2952
|
+
const { setIsOpenModal: r } = Dt(), { notification: o, setNotification: e } = Vt(), { setIsOpen: s } = Et(), i = window.location.href;
|
|
2953
|
+
function a() {
|
|
2954
|
+
navigator.clipboard.writeText(i), e({
|
|
2865
2955
|
message: "Link copied to clipboard",
|
|
2866
2956
|
status: "success"
|
|
2867
2957
|
});
|
|
2868
2958
|
}
|
|
2959
|
+
function l() {
|
|
2960
|
+
s(!1), setTimeout(() => {
|
|
2961
|
+
r(!1), s(!0);
|
|
2962
|
+
}, 300);
|
|
2963
|
+
}
|
|
2964
|
+
function d(n, c) {
|
|
2965
|
+
return n.length > c ? n.slice(0, c) + "..." : n;
|
|
2966
|
+
}
|
|
2869
2967
|
return /* @__PURE__ */ t.jsxs(
|
|
2870
2968
|
"div",
|
|
2871
2969
|
{
|
|
2872
|
-
className:
|
|
2873
|
-
onClick: (
|
|
2970
|
+
className: at.modal,
|
|
2971
|
+
onClick: (n) => n.stopPropagation(),
|
|
2874
2972
|
children: [
|
|
2875
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2876
|
-
/* @__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" }),
|
|
2877
2975
|
/* @__PURE__ */ t.jsx(
|
|
2878
|
-
|
|
2976
|
+
v,
|
|
2879
2977
|
{
|
|
2880
2978
|
name: "X",
|
|
2881
2979
|
fill: "#757575",
|
|
2882
|
-
onClick:
|
|
2980
|
+
onClick: l,
|
|
2883
2981
|
hoverable: !0
|
|
2884
2982
|
}
|
|
2885
2983
|
)
|
|
2886
2984
|
] }),
|
|
2887
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2888
|
-
/* @__PURE__ */ t.
|
|
2889
|
-
|
|
2985
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.copyWrapper, children: [
|
|
2986
|
+
/* @__PURE__ */ t.jsxs(
|
|
2987
|
+
Z,
|
|
2890
2988
|
{
|
|
2891
|
-
|
|
2892
|
-
onClick:
|
|
2893
|
-
|
|
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
|
+
]
|
|
2894
2999
|
}
|
|
2895
3000
|
),
|
|
2896
3001
|
/* @__PURE__ */ t.jsx(
|
|
2897
|
-
|
|
3002
|
+
Z,
|
|
2898
3003
|
{
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
children:
|
|
3004
|
+
type: "Secondary",
|
|
3005
|
+
onClick: a,
|
|
3006
|
+
children: o ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
|
|
2902
3007
|
}
|
|
2903
3008
|
)
|
|
2904
3009
|
] })
|
|
2905
3010
|
]
|
|
2906
3011
|
}
|
|
2907
3012
|
);
|
|
2908
|
-
},
|
|
2909
|
-
accordion:
|
|
2910
|
-
header:
|
|
2911
|
-
icon:
|
|
2912
|
-
open:
|
|
2913
|
-
content:
|
|
2914
|
-
},
|
|
2915
|
-
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 = () => {
|
|
2916
3021
|
s(!e);
|
|
2917
3022
|
};
|
|
2918
3023
|
return p.useEffect(() => {
|
|
2919
|
-
l.current &&
|
|
2920
|
-
}, [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: [
|
|
2921
3026
|
/* @__PURE__ */ t.jsxs(
|
|
2922
3027
|
"div",
|
|
2923
3028
|
{
|
|
2924
|
-
className:
|
|
3029
|
+
className: pt.header,
|
|
2925
3030
|
onClick: d,
|
|
2926
3031
|
children: [
|
|
2927
3032
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2928
|
-
/* @__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" }) })
|
|
2929
3034
|
]
|
|
2930
3035
|
}
|
|
2931
3036
|
),
|
|
@@ -2933,50 +3038,50 @@ const ma = (r) => {
|
|
|
2933
3038
|
"div",
|
|
2934
3039
|
{
|
|
2935
3040
|
ref: l,
|
|
2936
|
-
className:
|
|
3041
|
+
className: pt.content,
|
|
2937
3042
|
style: { height: `${i}px` },
|
|
2938
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
3043
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
|
|
2939
3044
|
}
|
|
2940
3045
|
)
|
|
2941
3046
|
] });
|
|
2942
|
-
},
|
|
2943
|
-
wrapper:
|
|
2944
|
-
label:
|
|
2945
|
-
input:
|
|
2946
|
-
paddingless:
|
|
2947
|
-
content:
|
|
2948
|
-
contentBorder:
|
|
2949
|
-
borderless:
|
|
2950
|
-
rightIcon:
|
|
2951
|
-
},
|
|
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) => {
|
|
2952
3057
|
const {
|
|
2953
|
-
onChange:
|
|
3058
|
+
onChange: o,
|
|
2954
3059
|
style: e,
|
|
2955
3060
|
label: s,
|
|
2956
3061
|
value: i,
|
|
2957
|
-
type:
|
|
3062
|
+
type: a,
|
|
2958
3063
|
min: l,
|
|
2959
3064
|
max: d,
|
|
2960
3065
|
placeholder: n,
|
|
2961
3066
|
disabled: c = !1,
|
|
2962
|
-
required:
|
|
2963
|
-
regex:
|
|
2964
|
-
paddingless:
|
|
2965
|
-
borderless:
|
|
2966
|
-
editable:
|
|
3067
|
+
required: b = !1,
|
|
3068
|
+
regex: g,
|
|
3069
|
+
paddingless: h = !1,
|
|
3070
|
+
borderless: m = !1,
|
|
3071
|
+
editable: x = !1,
|
|
2967
3072
|
isSearch: u = !1
|
|
2968
|
-
} = r, { themeSettings:
|
|
2969
|
-
function B(
|
|
2970
|
-
return Number(
|
|
3073
|
+
} = r, { themeSettings: C } = qt(), { inputs: O } = C, [I, D] = p.useState(!1);
|
|
3074
|
+
function B(f) {
|
|
3075
|
+
return Number(f) < 0 ? String(l) : f;
|
|
2971
3076
|
}
|
|
2972
|
-
function S(
|
|
2973
|
-
return !
|
|
3077
|
+
function S(f) {
|
|
3078
|
+
return !b || !g ? !0 : new RegExp(g).test(f);
|
|
2974
3079
|
}
|
|
2975
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3080
|
+
return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
|
|
2976
3081
|
s && /* @__PURE__ */ t.jsx(
|
|
2977
3082
|
"label",
|
|
2978
3083
|
{
|
|
2979
|
-
className:
|
|
3084
|
+
className: st.label,
|
|
2980
3085
|
htmlFor: s,
|
|
2981
3086
|
children: s
|
|
2982
3087
|
}
|
|
@@ -2984,52 +3089,52 @@ const ma = (r) => {
|
|
|
2984
3089
|
/* @__PURE__ */ t.jsxs(
|
|
2985
3090
|
"div",
|
|
2986
3091
|
{
|
|
2987
|
-
className: F(
|
|
2988
|
-
[
|
|
3092
|
+
className: F(st.content, {
|
|
3093
|
+
[st.contentBorder]: O.border.active
|
|
2989
3094
|
}),
|
|
2990
3095
|
style: {
|
|
2991
|
-
paddingRight:
|
|
3096
|
+
paddingRight: O.general.height + 15,
|
|
2992
3097
|
...e,
|
|
2993
|
-
background:
|
|
3098
|
+
background: O.field.active ? O.field.color : "transparent"
|
|
2994
3099
|
},
|
|
2995
3100
|
children: [
|
|
2996
3101
|
/* @__PURE__ */ t.jsx(
|
|
2997
3102
|
"input",
|
|
2998
3103
|
{
|
|
2999
3104
|
id: s,
|
|
3000
|
-
type:
|
|
3001
|
-
onChange: (
|
|
3002
|
-
if (
|
|
3105
|
+
type: a || "text",
|
|
3106
|
+
onChange: (f) => {
|
|
3107
|
+
if (a === "text") o(f.target.value);
|
|
3003
3108
|
else {
|
|
3004
|
-
const
|
|
3005
|
-
|
|
3109
|
+
const E = B(f.target.value);
|
|
3110
|
+
o(E);
|
|
3006
3111
|
}
|
|
3007
3112
|
},
|
|
3008
3113
|
value: i,
|
|
3009
3114
|
autoComplete: "off",
|
|
3010
3115
|
placeholder: n || "Type something...",
|
|
3011
|
-
className: F(
|
|
3012
|
-
[
|
|
3013
|
-
[
|
|
3014
|
-
[
|
|
3116
|
+
className: F(st.input, {
|
|
3117
|
+
[st.required]: I && b && !S(i),
|
|
3118
|
+
[st.paddingless]: h,
|
|
3119
|
+
[st.borderless]: m
|
|
3015
3120
|
}),
|
|
3016
|
-
min:
|
|
3017
|
-
max:
|
|
3121
|
+
min: a === "number" ? l : void 0,
|
|
3122
|
+
max: a === "number" ? d : void 0,
|
|
3018
3123
|
disabled: c,
|
|
3019
|
-
onFocus: () =>
|
|
3124
|
+
onFocus: () => D(!0)
|
|
3020
3125
|
}
|
|
3021
3126
|
),
|
|
3022
|
-
u && /* @__PURE__ */ t.jsx("div", { className:
|
|
3023
|
-
|
|
3127
|
+
u && /* @__PURE__ */ t.jsx("div", { className: st.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
3128
|
+
v,
|
|
3024
3129
|
{
|
|
3025
3130
|
name: "MagnifyingGlass",
|
|
3026
3131
|
fill: "var(--icon-secondary)",
|
|
3027
|
-
width:
|
|
3028
|
-
height:
|
|
3132
|
+
width: O.general.height,
|
|
3133
|
+
height: O.general.height
|
|
3029
3134
|
}
|
|
3030
3135
|
) }),
|
|
3031
|
-
|
|
3032
|
-
|
|
3136
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
3137
|
+
v,
|
|
3033
3138
|
{
|
|
3034
3139
|
name: "Sliders",
|
|
3035
3140
|
width: 20,
|
|
@@ -3041,18 +3146,18 @@ const ma = (r) => {
|
|
|
3041
3146
|
}
|
|
3042
3147
|
)
|
|
3043
3148
|
] });
|
|
3044
|
-
},
|
|
3045
|
-
wrapper:
|
|
3046
|
-
label:
|
|
3047
|
-
textarea:
|
|
3048
|
-
length:
|
|
3049
|
-
},
|
|
3050
|
-
const { onChange:
|
|
3051
|
-
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: [
|
|
3052
3157
|
e && /* @__PURE__ */ t.jsx(
|
|
3053
3158
|
"label",
|
|
3054
3159
|
{
|
|
3055
|
-
className:
|
|
3160
|
+
className: bt.label,
|
|
3056
3161
|
htmlFor: e,
|
|
3057
3162
|
children: e
|
|
3058
3163
|
}
|
|
@@ -3063,14 +3168,14 @@ const ma = (r) => {
|
|
|
3063
3168
|
id: e,
|
|
3064
3169
|
defaultValue: s,
|
|
3065
3170
|
onChange: (n) => {
|
|
3066
|
-
d(n.target.value.length),
|
|
3171
|
+
d(n.target.value.length), o(n.target.value);
|
|
3067
3172
|
},
|
|
3068
|
-
placeholder:
|
|
3069
|
-
className:
|
|
3173
|
+
placeholder: a,
|
|
3174
|
+
className: bt.textarea,
|
|
3070
3175
|
maxLength: i
|
|
3071
3176
|
}
|
|
3072
3177
|
),
|
|
3073
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
3178
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: bt.length, children: [
|
|
3074
3179
|
l,
|
|
3075
3180
|
"/",
|
|
3076
3181
|
i
|
|
@@ -3078,34 +3183,37 @@ const ma = (r) => {
|
|
|
3078
3183
|
] });
|
|
3079
3184
|
};
|
|
3080
3185
|
export {
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3186
|
+
Na as Accordion,
|
|
3187
|
+
Do as BurgerMenuButton,
|
|
3188
|
+
mt as Button,
|
|
3189
|
+
Pn as ButtonTypeSettings,
|
|
3190
|
+
va as ButtonsSettings,
|
|
3191
|
+
fa as CategorySettings,
|
|
3086
3192
|
gt as ChooseImage,
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3193
|
+
Ta as ChooseImageModal,
|
|
3194
|
+
qo as EmptyCart,
|
|
3195
|
+
ba as FormSettings,
|
|
3196
|
+
Ia as HeaderButtons,
|
|
3197
|
+
v as Icon,
|
|
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,
|
|
3106
3214
|
Rt as TextSettings,
|
|
3107
3215
|
Ot as TextareaSettings,
|
|
3108
|
-
|
|
3216
|
+
Ca as TextareaUI,
|
|
3109
3217
|
Lt as TypesText,
|
|
3110
|
-
|
|
3218
|
+
zt as UserInfo
|
|
3111
3219
|
};
|