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