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