@billgangcom/theme-lib 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder.cjs.js +7 -7
- package/dist/builder.es.js +164 -164
- package/dist/{index-7EQb7Nur.js → index-BI8lyvsO.js} +2608 -2593
- package/dist/{index-psym68p4.cjs → index-BaWZKIMU.cjs} +26 -26
- package/dist/shared/ui/Input/index.d.ts +1 -0
- package/dist/store/index.d.ts +1 -0
- package/dist/store/useShareLinkStore.d.ts +6 -0
- package/dist/ui/HeaderButtons/index.d.ts +10 -1
- package/dist/ui/ShareLink/index.d.ts +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +908 -797
- package/package.json +2 -2
package/dist/ui.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { j as t, c as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, c as D, I as p, a as G, S as V, T as dt, C as ot, b as W, D as ut, H as _t, B as X, v as et, u as mt, d as pt, e as at, f as lt, M as ht, g as gt } from "./index-BI8lyvsO.js";
|
|
2
|
+
import { l as di, m as ui, i as _i, E as mi, L as pi, P as hi, R as gi, h as xi, k as fi } from "./index-BI8lyvsO.js";
|
|
3
3
|
import f from "react";
|
|
4
|
-
const
|
|
5
|
-
accordion:
|
|
6
|
-
header:
|
|
7
|
-
icon:
|
|
8
|
-
open:
|
|
9
|
-
content:
|
|
10
|
-
},
|
|
11
|
-
const [e,
|
|
12
|
-
|
|
4
|
+
const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18", yt = "_open_9e4oa_21", Nt = "_content_9e4oa_25", K = {
|
|
5
|
+
accordion: jt,
|
|
6
|
+
header: vt,
|
|
7
|
+
icon: kt,
|
|
8
|
+
open: yt,
|
|
9
|
+
content: Nt
|
|
10
|
+
}, ei = ({ title: d, content: n }) => {
|
|
11
|
+
const [e, c] = f.useState(!1), [i, l] = f.useState(0), s = f.useRef(null), o = () => {
|
|
12
|
+
c(!e);
|
|
13
13
|
};
|
|
14
14
|
return f.useEffect(() => {
|
|
15
|
-
s.current &&
|
|
16
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
15
|
+
s.current && l(e ? s.current.scrollHeight : 0);
|
|
16
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
|
|
17
17
|
/* @__PURE__ */ t.jsxs(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
21
|
-
onClick:
|
|
20
|
+
className: K.header,
|
|
21
|
+
onClick: o,
|
|
22
22
|
children: [
|
|
23
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
24
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
23
|
+
/* @__PURE__ */ t.jsx("h3", { children: d }),
|
|
24
|
+
/* @__PURE__ */ t.jsx("div", { className: D(K.icon, { [K.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
),
|
|
@@ -29,25 +29,25 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
ref: s,
|
|
32
|
-
className:
|
|
32
|
+
className: K.content,
|
|
33
33
|
style: { height: `${i}px` },
|
|
34
34
|
children: /* @__PURE__ */ t.jsx("p", { children: n })
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
] });
|
|
38
|
-
},
|
|
39
|
-
wrapper:
|
|
40
|
-
alignmentBlock:
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
alignmentContent:
|
|
44
|
-
alignments:
|
|
45
|
-
alignment:
|
|
46
|
-
circle:
|
|
47
|
-
paddings:
|
|
48
|
-
padding:
|
|
49
|
-
input:
|
|
50
|
-
},
|
|
38
|
+
}, $t = "_wrapper_9rr5j_2", Ct = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Pt = "_subtitle_9rr5j_22", Tt = "_alignmentContent_9rr5j_29", Bt = "_alignments_9rr5j_37", wt = "_alignment_9rr5j_8", St = "_circle_9rr5j_58", qt = "_paddings_9rr5j_65", At = "_padding_9rr5j_65", Ot = "_input_9rr5j_84", O = {
|
|
39
|
+
wrapper: $t,
|
|
40
|
+
alignmentBlock: Ct,
|
|
41
|
+
title: It,
|
|
42
|
+
subtitle: Pt,
|
|
43
|
+
alignmentContent: Tt,
|
|
44
|
+
alignments: Bt,
|
|
45
|
+
alignment: wt,
|
|
46
|
+
circle: St,
|
|
47
|
+
paddings: qt,
|
|
48
|
+
padding: At,
|
|
49
|
+
input: Ot
|
|
50
|
+
}, Lt = [
|
|
51
51
|
"topLeft",
|
|
52
52
|
"top",
|
|
53
53
|
"topRight",
|
|
@@ -57,9 +57,9 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
57
57
|
"bottomLeft",
|
|
58
58
|
"bottom",
|
|
59
59
|
"bottomRight"
|
|
60
|
-
],
|
|
61
|
-
const { alignment: n, padding: e, setPadding:
|
|
62
|
-
function
|
|
60
|
+
], Dt = ["left", "top", "right", "bottom"], si = (d) => {
|
|
61
|
+
const { alignment: n, padding: e, setPadding: c, setAlignment: i } = d;
|
|
62
|
+
function l() {
|
|
63
63
|
switch (n) {
|
|
64
64
|
case "left":
|
|
65
65
|
case "topLeft":
|
|
@@ -77,8 +77,8 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
77
77
|
return "TextAlignCenter";
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function s(
|
|
81
|
-
switch (
|
|
80
|
+
function s(o) {
|
|
81
|
+
switch (o) {
|
|
82
82
|
case "left":
|
|
83
83
|
return "AlignLeft";
|
|
84
84
|
case "right":
|
|
@@ -89,24 +89,24 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
89
89
|
return "AlignBottom";
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
93
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
94
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
95
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
96
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
97
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
92
|
+
return /* @__PURE__ */ t.jsxs("div", { className: O.layout, children: [
|
|
93
|
+
/* @__PURE__ */ t.jsx("h3", { className: O.title, children: "Layout" }),
|
|
94
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.alignmentBlock, children: [
|
|
95
|
+
/* @__PURE__ */ t.jsx("h5", { className: O.subtitle, children: "Alignment" }),
|
|
96
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.alignmentContent, children: [
|
|
97
|
+
/* @__PURE__ */ t.jsx("div", { className: O.alignments, children: Lt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
onClick: () => {
|
|
101
|
-
i(
|
|
101
|
+
i(o);
|
|
102
102
|
},
|
|
103
|
-
className:
|
|
103
|
+
className: O.alignment,
|
|
104
104
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
o !== n && /* @__PURE__ */ t.jsx("div", { className: O.circle }),
|
|
106
|
+
o === n && /* @__PURE__ */ t.jsx(
|
|
107
|
+
p,
|
|
108
108
|
{
|
|
109
|
-
name:
|
|
109
|
+
name: l(),
|
|
110
110
|
fill: "#FF3F19",
|
|
111
111
|
width: 22,
|
|
112
112
|
height: 22
|
|
@@ -114,17 +114,17 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
114
114
|
)
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
o
|
|
118
118
|
)) }),
|
|
119
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
119
|
+
/* @__PURE__ */ t.jsx("div", { className: O.paddings, children: Dt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
120
120
|
"label",
|
|
121
121
|
{
|
|
122
|
-
className:
|
|
122
|
+
className: O.padding,
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
p,
|
|
126
126
|
{
|
|
127
|
-
name: s(
|
|
127
|
+
name: s(o),
|
|
128
128
|
width: 20,
|
|
129
129
|
height: 20
|
|
130
130
|
}
|
|
@@ -133,10 +133,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
133
133
|
G,
|
|
134
134
|
{
|
|
135
135
|
type: "text",
|
|
136
|
-
value: String(e[
|
|
137
|
-
onChange: (m) =>
|
|
136
|
+
value: String(e[o]),
|
|
137
|
+
onChange: (m) => c({
|
|
138
138
|
...e,
|
|
139
|
-
[
|
|
139
|
+
[o]: Number(m)
|
|
140
140
|
}),
|
|
141
141
|
paddingless: !0,
|
|
142
142
|
borderless: !0
|
|
@@ -144,24 +144,24 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
144
144
|
)
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
|
-
|
|
147
|
+
o
|
|
148
148
|
)) })
|
|
149
149
|
] })
|
|
150
150
|
] })
|
|
151
151
|
] });
|
|
152
|
-
},
|
|
153
|
-
subtitle:
|
|
154
|
-
header:
|
|
155
|
-
text:
|
|
156
|
-
top:
|
|
157
|
-
itemsBlock:
|
|
158
|
-
},
|
|
159
|
-
typeTexts:
|
|
160
|
-
block:
|
|
161
|
-
active:
|
|
162
|
-
},
|
|
163
|
-
const { typesText: n, setTypesText: e } =
|
|
164
|
-
function
|
|
152
|
+
}, Et = "_subtitle_1qrz9_1", Mt = "_header_1qrz9_8", Rt = "_text_1qrz9_9", Ht = "_top_1qrz9_17", Vt = "_itemsBlock_1qrz9_26", Z = {
|
|
153
|
+
subtitle: Et,
|
|
154
|
+
header: Mt,
|
|
155
|
+
text: Rt,
|
|
156
|
+
top: Ht,
|
|
157
|
+
itemsBlock: Vt
|
|
158
|
+
}, Ft = "_typeTexts_rcw8p_1", Ut = "_block_rcw8p_8", zt = "_active_rcw8p_21", it = {
|
|
159
|
+
typeTexts: Ft,
|
|
160
|
+
block: Ut,
|
|
161
|
+
active: zt
|
|
162
|
+
}, Gt = ["bold", "italic", "underline", "strike-through", "code"], xt = (d) => {
|
|
163
|
+
const { typesText: n, setTypesText: e } = d;
|
|
164
|
+
function c(i) {
|
|
165
165
|
switch (i) {
|
|
166
166
|
case "bold":
|
|
167
167
|
return "TextB";
|
|
@@ -175,24 +175,24 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
175
175
|
return "TextUnderline";
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
178
|
+
return /* @__PURE__ */ t.jsx("div", { className: it.typeTexts, children: Gt.map((i) => /* @__PURE__ */ t.jsx(
|
|
179
179
|
"div",
|
|
180
180
|
{
|
|
181
|
-
className:
|
|
182
|
-
[
|
|
181
|
+
className: D(it.block, {
|
|
182
|
+
[it.active]: n.includes(i)
|
|
183
183
|
}),
|
|
184
184
|
onClick: () => {
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const s =
|
|
185
|
+
const l = [...n];
|
|
186
|
+
if (l.includes(i)) {
|
|
187
|
+
const s = l.filter((o) => o !== i);
|
|
188
188
|
e(s);
|
|
189
189
|
} else
|
|
190
|
-
|
|
190
|
+
l.push(i), e(l);
|
|
191
191
|
},
|
|
192
192
|
children: /* @__PURE__ */ t.jsx(
|
|
193
|
-
|
|
193
|
+
p,
|
|
194
194
|
{
|
|
195
|
-
name:
|
|
195
|
+
name: c(i),
|
|
196
196
|
fill: n.includes(i) ? "#252525" : "#757575",
|
|
197
197
|
width: 20,
|
|
198
198
|
height: 20
|
|
@@ -201,40 +201,40 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
201
201
|
},
|
|
202
202
|
String(i)
|
|
203
203
|
)) });
|
|
204
|
-
},
|
|
204
|
+
}, Wt = (d) => {
|
|
205
205
|
const {
|
|
206
206
|
typesText: n,
|
|
207
207
|
isActiveText: e,
|
|
208
|
-
setIsActiveText:
|
|
208
|
+
setIsActiveText: c,
|
|
209
209
|
text: i,
|
|
210
|
-
setText:
|
|
210
|
+
setText: l,
|
|
211
211
|
setTypesText: s,
|
|
212
|
-
title:
|
|
212
|
+
title: o,
|
|
213
213
|
subtitle: m = "Items"
|
|
214
|
-
} =
|
|
215
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
e !== void 0 &&
|
|
214
|
+
} = d;
|
|
215
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.text, children: [
|
|
216
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
|
|
217
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: o }),
|
|
218
|
+
e !== void 0 && c && /* @__PURE__ */ t.jsx(
|
|
219
219
|
V,
|
|
220
220
|
{
|
|
221
221
|
current: e,
|
|
222
|
-
onChange: (
|
|
222
|
+
onChange: (v) => c(v)
|
|
223
223
|
}
|
|
224
224
|
)
|
|
225
225
|
] }),
|
|
226
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
227
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
226
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.itemsBlock, children: [
|
|
227
|
+
/* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: m }),
|
|
228
228
|
/* @__PURE__ */ t.jsx(
|
|
229
|
-
|
|
229
|
+
dt,
|
|
230
230
|
{
|
|
231
|
-
onChange: (
|
|
231
|
+
onChange: (v) => l(v),
|
|
232
232
|
value: i,
|
|
233
233
|
maxLength: 150
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
236
|
/* @__PURE__ */ t.jsx(
|
|
237
|
-
|
|
237
|
+
xt,
|
|
238
238
|
{
|
|
239
239
|
typesText: n,
|
|
240
240
|
setTypesText: s
|
|
@@ -242,29 +242,29 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
242
242
|
)
|
|
243
243
|
] })
|
|
244
244
|
] });
|
|
245
|
-
},
|
|
246
|
-
subtitle:
|
|
247
|
-
header:
|
|
248
|
-
text:
|
|
249
|
-
productsBlock:
|
|
250
|
-
top:
|
|
251
|
-
itemsBlock:
|
|
252
|
-
typeTexts:
|
|
253
|
-
block:
|
|
254
|
-
active:
|
|
255
|
-
products:
|
|
256
|
-
product:
|
|
257
|
-
button:
|
|
258
|
-
disabled:
|
|
259
|
-
image:
|
|
260
|
-
info:
|
|
261
|
-
name:
|
|
262
|
-
buttons:
|
|
263
|
-
modal:
|
|
264
|
-
link:
|
|
265
|
-
modalOptions:
|
|
266
|
-
},
|
|
267
|
-
const { activeItem: n, setActiveItem: e, popupPosition:
|
|
245
|
+
}, Xt = "_subtitle_cuny2_1", Yt = "_header_cuny2_8", Qt = "_text_cuny2_9", Jt = "_productsBlock_cuny2_10", Kt = "_top_cuny2_22", Zt = "_itemsBlock_cuny2_31", te = "_typeTexts_cuny2_37", ee = "_block_cuny2_44", se = "_active_cuny2_57", ne = "_products_cuny2_10", ie = "_product_cuny2_10", ce = "_button_cuny2_76", oe = "_disabled_cuny2_87", ae = "_image_cuny2_91", le = "_info_cuny2_98", re = "_name_cuny2_110", de = "_buttons_cuny2_114", ue = "_modal_cuny2_121", _e = "_link_cuny2_141", me = "_modalOptions_cuny2_147", P = {
|
|
246
|
+
subtitle: Xt,
|
|
247
|
+
header: Yt,
|
|
248
|
+
text: Qt,
|
|
249
|
+
productsBlock: Jt,
|
|
250
|
+
top: Kt,
|
|
251
|
+
itemsBlock: Zt,
|
|
252
|
+
typeTexts: te,
|
|
253
|
+
block: ee,
|
|
254
|
+
active: se,
|
|
255
|
+
products: ne,
|
|
256
|
+
product: ie,
|
|
257
|
+
button: ce,
|
|
258
|
+
disabled: oe,
|
|
259
|
+
image: ae,
|
|
260
|
+
info: le,
|
|
261
|
+
name: re,
|
|
262
|
+
buttons: de,
|
|
263
|
+
modal: ue,
|
|
264
|
+
link: _e,
|
|
265
|
+
modalOptions: me
|
|
266
|
+
}, pe = (d) => {
|
|
267
|
+
const { activeItem: n, setActiveItem: e, popupPosition: c, modalOptions: i, setIsOpenModal: l } = d;
|
|
268
268
|
return /* @__PURE__ */ t.jsxs(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
@@ -273,21 +273,21 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
273
273
|
s.stopPropagation();
|
|
274
274
|
},
|
|
275
275
|
style: {
|
|
276
|
-
top: `${
|
|
277
|
-
left: `${
|
|
276
|
+
top: `${c.top}px`,
|
|
277
|
+
left: `${c.left}px`
|
|
278
278
|
},
|
|
279
279
|
children: [
|
|
280
280
|
/* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
|
|
281
281
|
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
282
282
|
/* @__PURE__ */ t.jsx(
|
|
283
|
-
|
|
283
|
+
p,
|
|
284
284
|
{
|
|
285
285
|
name: "X",
|
|
286
286
|
height: 20,
|
|
287
287
|
width: 20,
|
|
288
288
|
hoverable: !0,
|
|
289
289
|
onClick: () => {
|
|
290
|
-
e(null),
|
|
290
|
+
e(null), l(!1);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
)
|
|
@@ -295,13 +295,13 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
295
295
|
/* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: i.map((s) => {
|
|
296
296
|
if (s.type === "image")
|
|
297
297
|
return /* @__PURE__ */ t.jsx(
|
|
298
|
-
|
|
298
|
+
ot,
|
|
299
299
|
{
|
|
300
300
|
label: "Put up an attractive image",
|
|
301
|
-
onChange: (
|
|
301
|
+
onChange: (o) => {
|
|
302
302
|
const m = {
|
|
303
303
|
...n,
|
|
304
|
-
[s.field]:
|
|
304
|
+
[s.field]: o
|
|
305
305
|
};
|
|
306
306
|
e(m);
|
|
307
307
|
}
|
|
@@ -310,21 +310,21 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
310
310
|
);
|
|
311
311
|
if (s.type === "text")
|
|
312
312
|
return /* @__PURE__ */ t.jsx(
|
|
313
|
-
|
|
313
|
+
Wt,
|
|
314
314
|
{
|
|
315
315
|
typesText: n[s.field.type],
|
|
316
|
-
setTypesText: (
|
|
316
|
+
setTypesText: (o) => {
|
|
317
317
|
const m = {
|
|
318
318
|
...n,
|
|
319
|
-
[s.field.type]:
|
|
319
|
+
[s.field.type]: o
|
|
320
320
|
};
|
|
321
321
|
e(m);
|
|
322
322
|
},
|
|
323
323
|
text: n[s.field.text] || "",
|
|
324
|
-
setText: (
|
|
324
|
+
setText: (o) => {
|
|
325
325
|
const m = {
|
|
326
326
|
...n,
|
|
327
|
-
[s.field.text]:
|
|
327
|
+
[s.field.text]: o
|
|
328
328
|
};
|
|
329
329
|
e(m);
|
|
330
330
|
},
|
|
@@ -335,10 +335,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
335
335
|
return /* @__PURE__ */ t.jsx(
|
|
336
336
|
G,
|
|
337
337
|
{
|
|
338
|
-
onChange: (
|
|
338
|
+
onChange: (o) => {
|
|
339
339
|
const m = {
|
|
340
340
|
...n,
|
|
341
|
-
[s.field]:
|
|
341
|
+
[s.field]: o
|
|
342
342
|
};
|
|
343
343
|
e(m);
|
|
344
344
|
},
|
|
@@ -352,10 +352,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
352
352
|
/* @__PURE__ */ t.jsx(
|
|
353
353
|
G,
|
|
354
354
|
{
|
|
355
|
-
onChange: (
|
|
355
|
+
onChange: (o) => {
|
|
356
356
|
const m = {
|
|
357
357
|
...n,
|
|
358
|
-
[s.field.text]:
|
|
358
|
+
[s.field.text]: o
|
|
359
359
|
};
|
|
360
360
|
e(m);
|
|
361
361
|
},
|
|
@@ -369,10 +369,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
369
369
|
{
|
|
370
370
|
current: !!n[s.field.switch] || !1,
|
|
371
371
|
label: s.switchLabel,
|
|
372
|
-
onChange: (
|
|
372
|
+
onChange: (o) => {
|
|
373
373
|
const m = {
|
|
374
374
|
...n,
|
|
375
|
-
[s.field.switch]:
|
|
375
|
+
[s.field.switch]: o
|
|
376
376
|
};
|
|
377
377
|
e(m);
|
|
378
378
|
}
|
|
@@ -381,13 +381,13 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
381
381
|
] });
|
|
382
382
|
if (s.type === "list")
|
|
383
383
|
return /* @__PURE__ */ t.jsx(
|
|
384
|
-
|
|
384
|
+
be,
|
|
385
385
|
{
|
|
386
386
|
items: n[s.field] || [],
|
|
387
|
-
setItems: (
|
|
387
|
+
setItems: (o) => {
|
|
388
388
|
const m = {
|
|
389
389
|
...n,
|
|
390
|
-
[s.field]:
|
|
390
|
+
[s.field]: o
|
|
391
391
|
};
|
|
392
392
|
e(m);
|
|
393
393
|
},
|
|
@@ -401,129 +401,129 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
401
401
|
);
|
|
402
402
|
if (s.type === "select")
|
|
403
403
|
return /* @__PURE__ */ t.jsx(
|
|
404
|
-
|
|
404
|
+
W,
|
|
405
405
|
{
|
|
406
406
|
options: s.itemsOptions,
|
|
407
|
-
onChange: (
|
|
407
|
+
onChange: (o) => {
|
|
408
408
|
const m = {
|
|
409
409
|
...n,
|
|
410
|
-
[s.field]:
|
|
410
|
+
[s.field]: o
|
|
411
411
|
};
|
|
412
412
|
e(m);
|
|
413
413
|
},
|
|
414
414
|
label: s.label,
|
|
415
415
|
value: n[s.field] || "String",
|
|
416
|
-
leftAddon: s.leftAddon && s.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
416
|
+
leftAddon: s.leftAddon && s.leftAddon === "icon" && /* @__PURE__ */ t.jsx(p, { name: n[s.field] })
|
|
417
417
|
}
|
|
418
418
|
);
|
|
419
419
|
}) })
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
},
|
|
424
|
-
other:
|
|
425
|
-
subtitle:
|
|
426
|
-
items:
|
|
427
|
-
},
|
|
428
|
-
const { items: n, title: e = "Other" } =
|
|
423
|
+
}, he = "_other_g74jx_1", ge = "_subtitle_g74jx_7", xe = "_items_g74jx_14", ct = {
|
|
424
|
+
other: he,
|
|
425
|
+
subtitle: ge,
|
|
426
|
+
items: xe
|
|
427
|
+
}, ft = (d) => {
|
|
428
|
+
const { items: n, title: e = "Other" } = d;
|
|
429
429
|
return /* @__PURE__ */ t.jsxs("div", { className: ct.other, children: [
|
|
430
430
|
/* @__PURE__ */ t.jsx("h5", { className: ct.subtitle, children: e }),
|
|
431
|
-
/* @__PURE__ */ t.jsx("div", { className: ct.items, children: n.map((
|
|
431
|
+
/* @__PURE__ */ t.jsx("div", { className: ct.items, children: n.map((c, i) => /* @__PURE__ */ t.jsx(
|
|
432
432
|
V,
|
|
433
433
|
{
|
|
434
|
-
current:
|
|
435
|
-
onChange: (
|
|
436
|
-
label:
|
|
434
|
+
current: c.isItem,
|
|
435
|
+
onChange: (l) => c.setIsItem(l),
|
|
436
|
+
label: c.label,
|
|
437
437
|
hasBackground: !0,
|
|
438
438
|
paddingless: !1
|
|
439
439
|
},
|
|
440
440
|
i
|
|
441
441
|
)) })
|
|
442
442
|
] });
|
|
443
|
-
},
|
|
444
|
-
const { index: n, moveProduct: e, children:
|
|
443
|
+
}, fe = (d) => {
|
|
444
|
+
const { index: n, moveProduct: e, children: c } = d, [, i] = mt({
|
|
445
445
|
accept: "product",
|
|
446
|
-
hover(
|
|
447
|
-
|
|
446
|
+
hover(o) {
|
|
447
|
+
o.index !== n && (e(o.index, n), o.index = n);
|
|
448
448
|
}
|
|
449
|
-
}), [{ isDragging:
|
|
449
|
+
}), [{ isDragging: l }, s] = pt({
|
|
450
450
|
type: "product",
|
|
451
451
|
item: { index: n },
|
|
452
|
-
collect: (
|
|
453
|
-
isDragging:
|
|
452
|
+
collect: (o) => ({
|
|
453
|
+
isDragging: o.isDragging()
|
|
454
454
|
})
|
|
455
455
|
});
|
|
456
456
|
return /* @__PURE__ */ t.jsx(
|
|
457
457
|
"div",
|
|
458
458
|
{
|
|
459
|
-
ref: (
|
|
460
|
-
className: `${P.product} ${
|
|
461
|
-
children:
|
|
459
|
+
ref: (o) => s(i(o)),
|
|
460
|
+
className: `${P.product} ${l ? P.dragging : ""}`,
|
|
461
|
+
children: c
|
|
462
462
|
}
|
|
463
463
|
);
|
|
464
|
-
},
|
|
464
|
+
}, be = (d) => {
|
|
465
465
|
const {
|
|
466
466
|
isActiveItems: n,
|
|
467
467
|
setIsActiveItems: e,
|
|
468
|
-
items:
|
|
468
|
+
items: c,
|
|
469
469
|
setItems: i,
|
|
470
|
-
other:
|
|
470
|
+
other: l,
|
|
471
471
|
title: s,
|
|
472
|
-
subtitle:
|
|
472
|
+
subtitle: o,
|
|
473
473
|
editable: m = !0,
|
|
474
|
-
draggable:
|
|
475
|
-
withImage:
|
|
476
|
-
deletable:
|
|
477
|
-
addable:
|
|
478
|
-
itemsType:
|
|
479
|
-
itemsPlaceholder:
|
|
480
|
-
itemsOptions:
|
|
481
|
-
hasRangeSelector:
|
|
482
|
-
rangeSelectorOptions:
|
|
474
|
+
draggable: v = !1,
|
|
475
|
+
withImage: u = !1,
|
|
476
|
+
deletable: a = !0,
|
|
477
|
+
addable: h = !0,
|
|
478
|
+
itemsType: $,
|
|
479
|
+
itemsPlaceholder: b = "",
|
|
480
|
+
itemsOptions: r,
|
|
481
|
+
hasRangeSelector: w = !1,
|
|
482
|
+
rangeSelectorOptions: Y,
|
|
483
483
|
modalOptions: Q,
|
|
484
484
|
addableOptions: F = {},
|
|
485
485
|
limit: y
|
|
486
|
-
} =
|
|
486
|
+
} = d, [M, R] = f.useState(null), [nt, st] = f.useState({
|
|
487
487
|
top: 0,
|
|
488
488
|
left: 0
|
|
489
|
-
}), [
|
|
490
|
-
const
|
|
491
|
-
|
|
489
|
+
}), [g, k] = f.useState(!1), S = (_, T) => {
|
|
490
|
+
const q = [...c], [N] = q.splice(_, 1);
|
|
491
|
+
q.splice(T, 0, N), i(q);
|
|
492
492
|
};
|
|
493
493
|
f.useEffect(() => {
|
|
494
|
-
const
|
|
495
|
-
R(null),
|
|
494
|
+
const _ = () => {
|
|
495
|
+
R(null), k(!1);
|
|
496
496
|
};
|
|
497
|
-
return document.body.addEventListener("click",
|
|
498
|
-
R(null),
|
|
497
|
+
return document.body.addEventListener("click", _), R(null), k(!1), () => {
|
|
498
|
+
R(null), k(!1), document.body.removeEventListener("click", _);
|
|
499
499
|
};
|
|
500
500
|
}, []), f.useEffect(() => {
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
i(
|
|
501
|
+
if (M) {
|
|
502
|
+
const _ = [...c].map((T) => T.id === M.id ? M : T);
|
|
503
|
+
i(_);
|
|
504
504
|
}
|
|
505
|
-
}, [
|
|
506
|
-
const C = (
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
let E =
|
|
510
|
-
E + N >
|
|
505
|
+
}, [M]);
|
|
506
|
+
const C = (_, T) => {
|
|
507
|
+
_.stopPropagation(), k(!0);
|
|
508
|
+
const q = _.target.getBoundingClientRect(), N = 500, J = window.innerHeight;
|
|
509
|
+
let E = q.top + window.scrollY;
|
|
510
|
+
E + N > J && (E = J - N - 20), st({
|
|
511
511
|
top: E - 80,
|
|
512
|
-
left:
|
|
513
|
-
}), R(
|
|
512
|
+
left: q.left - 30
|
|
513
|
+
}), R(T);
|
|
514
514
|
};
|
|
515
|
-
function U(
|
|
516
|
-
if (
|
|
517
|
-
return
|
|
515
|
+
function U(_) {
|
|
516
|
+
if (u)
|
|
517
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
518
518
|
"img",
|
|
519
519
|
{
|
|
520
|
-
src: `https://imagedelivery.net/${
|
|
520
|
+
src: `https://imagedelivery.net/${_[0]}/w=1000`,
|
|
521
521
|
alt: "image",
|
|
522
522
|
width: 16,
|
|
523
523
|
height: 16
|
|
524
524
|
}
|
|
525
525
|
) : /* @__PURE__ */ t.jsx(
|
|
526
|
-
|
|
526
|
+
p,
|
|
527
527
|
{
|
|
528
528
|
name: "Image",
|
|
529
529
|
width: 16,
|
|
@@ -532,10 +532,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
532
532
|
}
|
|
533
533
|
);
|
|
534
534
|
}
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
|
|
535
|
+
const A = (_, T) => {
|
|
536
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
537
|
+
v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
538
|
+
p,
|
|
539
539
|
{
|
|
540
540
|
name: "DotsSixVertical",
|
|
541
541
|
hoverable: !0,
|
|
@@ -543,44 +543,44 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
543
543
|
height: 20
|
|
544
544
|
}
|
|
545
545
|
) }),
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
$ === "select" && /* @__PURE__ */ t.jsx(
|
|
547
|
+
W,
|
|
548
548
|
{
|
|
549
549
|
onChange: (N) => {
|
|
550
|
-
const E = [...
|
|
551
|
-
...
|
|
550
|
+
const E = [...c].map((H) => H.id === _.id ? {
|
|
551
|
+
..._,
|
|
552
552
|
name: N
|
|
553
553
|
} : H);
|
|
554
554
|
R({
|
|
555
|
-
...
|
|
555
|
+
..._,
|
|
556
556
|
name: N
|
|
557
557
|
}), i([...E]);
|
|
558
558
|
},
|
|
559
|
-
value:
|
|
560
|
-
options:
|
|
561
|
-
leftAddon: U(
|
|
559
|
+
value: _.name,
|
|
560
|
+
options: r,
|
|
561
|
+
leftAddon: U(_.images)
|
|
562
562
|
}
|
|
563
563
|
),
|
|
564
|
-
|
|
564
|
+
$ === "input" && /* @__PURE__ */ t.jsx(
|
|
565
565
|
G,
|
|
566
566
|
{
|
|
567
567
|
onChange: (N) => {
|
|
568
|
-
const E = [...
|
|
569
|
-
...
|
|
568
|
+
const E = [...c].map((H) => H.id === _.id ? {
|
|
569
|
+
..._,
|
|
570
570
|
name: N
|
|
571
571
|
} : H);
|
|
572
572
|
i([...E]);
|
|
573
573
|
},
|
|
574
|
-
value:
|
|
575
|
-
placeholder:
|
|
574
|
+
value: _.name,
|
|
575
|
+
placeholder: b
|
|
576
576
|
}
|
|
577
577
|
),
|
|
578
|
-
|
|
579
|
-
|
|
578
|
+
$ === "image" && /* @__PURE__ */ t.jsx(
|
|
579
|
+
ot,
|
|
580
580
|
{
|
|
581
581
|
onChange: (N) => {
|
|
582
|
-
const E = [...
|
|
583
|
-
...
|
|
582
|
+
const E = [...c].map((H) => H.id === _.id ? {
|
|
583
|
+
..._,
|
|
584
584
|
images: N
|
|
585
585
|
} : H);
|
|
586
586
|
i([...E]);
|
|
@@ -589,44 +589,44 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
589
589
|
),
|
|
590
590
|
/* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
|
|
591
591
|
m && /* @__PURE__ */ t.jsx(
|
|
592
|
-
|
|
592
|
+
p,
|
|
593
593
|
{
|
|
594
594
|
name: "Sliders",
|
|
595
595
|
hoverable: !0,
|
|
596
596
|
width: 20,
|
|
597
597
|
height: 20,
|
|
598
|
-
onClick: (N) => C(N,
|
|
598
|
+
onClick: (N) => C(N, _)
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
a && /* @__PURE__ */ t.jsx(
|
|
602
|
+
p,
|
|
603
603
|
{
|
|
604
604
|
name: "Trash",
|
|
605
605
|
hoverable: !0,
|
|
606
606
|
width: 20,
|
|
607
607
|
height: 20,
|
|
608
608
|
fill: "#C12A2A",
|
|
609
|
-
onClick: () => i(
|
|
609
|
+
onClick: () => i(c.filter((N) => N.id !== _.id))
|
|
610
610
|
}
|
|
611
611
|
)
|
|
612
612
|
] })
|
|
613
613
|
] });
|
|
614
|
-
return
|
|
615
|
-
|
|
614
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
615
|
+
fe,
|
|
616
616
|
{
|
|
617
|
-
product:
|
|
618
|
-
index:
|
|
619
|
-
moveProduct:
|
|
620
|
-
children:
|
|
617
|
+
product: _,
|
|
618
|
+
index: T,
|
|
619
|
+
moveProduct: S,
|
|
620
|
+
children: q
|
|
621
621
|
},
|
|
622
|
-
|
|
622
|
+
_.id
|
|
623
623
|
) : /* @__PURE__ */ t.jsx(
|
|
624
624
|
"div",
|
|
625
625
|
{
|
|
626
626
|
className: P.product,
|
|
627
|
-
children:
|
|
627
|
+
children: q
|
|
628
628
|
},
|
|
629
|
-
|
|
629
|
+
_.id
|
|
630
630
|
);
|
|
631
631
|
};
|
|
632
632
|
return /* @__PURE__ */ t.jsxs("div", { className: P.productsBlock, children: [
|
|
@@ -636,52 +636,52 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
636
636
|
V,
|
|
637
637
|
{
|
|
638
638
|
current: n,
|
|
639
|
-
onChange: (
|
|
639
|
+
onChange: (_) => e == null ? void 0 : e(_)
|
|
640
640
|
}
|
|
641
641
|
)
|
|
642
642
|
] }),
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
M && m && Q && g && /* @__PURE__ */ t.jsx(
|
|
644
|
+
pe,
|
|
645
645
|
{
|
|
646
|
-
activeItem:
|
|
646
|
+
activeItem: M,
|
|
647
647
|
setActiveItem: R,
|
|
648
|
-
popupPosition:
|
|
648
|
+
popupPosition: nt,
|
|
649
649
|
modalOptions: Q,
|
|
650
|
-
setIsOpenModal:
|
|
650
|
+
setIsOpenModal: k
|
|
651
651
|
}
|
|
652
652
|
),
|
|
653
|
-
|
|
653
|
+
w && Y && /* @__PURE__ */ t.jsx(ks, { ...Y }),
|
|
654
654
|
/* @__PURE__ */ t.jsxs("div", { className: P.products, children: [
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: o }),
|
|
656
|
+
v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: c.map((_, T) => A(_, T)) }) : c.map((_, T) => A(_, T)),
|
|
657
|
+
h && /* @__PURE__ */ t.jsxs(
|
|
658
658
|
X,
|
|
659
659
|
{
|
|
660
|
-
className:
|
|
661
|
-
[P.disabled]: !!(y && y <=
|
|
660
|
+
className: D(P.button, {
|
|
661
|
+
[P.disabled]: !!(y && y <= c.length)
|
|
662
662
|
}),
|
|
663
663
|
size: "s",
|
|
664
|
-
disabled: !!(y && y <=
|
|
664
|
+
disabled: !!(y && y <= c.length),
|
|
665
665
|
onClick: () => {
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
name:
|
|
669
|
-
id:
|
|
666
|
+
const _ = [...c];
|
|
667
|
+
$ === "select" ? _.push({
|
|
668
|
+
name: r[0] || `Product ${c.length + 1}`,
|
|
669
|
+
id: et(),
|
|
670
670
|
...F
|
|
671
|
-
}) :
|
|
671
|
+
}) : $ === "input" ? _.push({
|
|
672
672
|
name: "",
|
|
673
|
-
id:
|
|
673
|
+
id: et(),
|
|
674
674
|
...F
|
|
675
|
-
}) :
|
|
676
|
-
name: `Image ${
|
|
677
|
-
id:
|
|
675
|
+
}) : _.push({
|
|
676
|
+
name: `Image ${c.length + 1}`,
|
|
677
|
+
id: et(),
|
|
678
678
|
...F
|
|
679
|
-
}), i(
|
|
679
|
+
}), i(_);
|
|
680
680
|
},
|
|
681
681
|
children: [
|
|
682
682
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
683
683
|
/* @__PURE__ */ t.jsx(
|
|
684
|
-
|
|
684
|
+
p,
|
|
685
685
|
{
|
|
686
686
|
name: "Plus",
|
|
687
687
|
width: 16,
|
|
@@ -692,57 +692,57 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
692
692
|
}
|
|
693
693
|
)
|
|
694
694
|
] }),
|
|
695
|
-
|
|
695
|
+
l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
|
|
696
696
|
] });
|
|
697
|
-
},
|
|
698
|
-
subtitle:
|
|
699
|
-
header:
|
|
700
|
-
text:
|
|
701
|
-
productsBlock:
|
|
702
|
-
buttonsBlock:
|
|
703
|
-
top:
|
|
704
|
-
itemsBlock:
|
|
705
|
-
typeTexts:
|
|
706
|
-
block:
|
|
707
|
-
active:
|
|
708
|
-
products:
|
|
709
|
-
product:
|
|
710
|
-
button:
|
|
711
|
-
image:
|
|
712
|
-
info:
|
|
713
|
-
name:
|
|
714
|
-
buttons:
|
|
715
|
-
modal:
|
|
716
|
-
other:
|
|
717
|
-
options:
|
|
718
|
-
},
|
|
719
|
-
const { activeButton: n, setActiveButton: e, popupPosition:
|
|
697
|
+
}, je = "_subtitle_1fb9q_1", ve = "_header_1fb9q_8", ke = "_text_1fb9q_9", ye = "_productsBlock_1fb9q_10", Ne = "_buttonsBlock_1fb9q_11", $e = "_top_1fb9q_22", Ce = "_itemsBlock_1fb9q_31", Ie = "_typeTexts_1fb9q_37", Pe = "_block_1fb9q_44", Te = "_active_1fb9q_56", Be = "_products_1fb9q_10", we = "_product_1fb9q_10", Se = "_button_1fb9q_11", qe = "_image_1fb9q_86", Ae = "_info_1fb9q_93", Oe = "_name_1fb9q_105", Le = "_buttons_1fb9q_11", De = "_modal_1fb9q_116", Ee = "_other_1fb9q_135", Me = "_options_1fb9q_141", z = {
|
|
698
|
+
subtitle: je,
|
|
699
|
+
header: ve,
|
|
700
|
+
text: ke,
|
|
701
|
+
productsBlock: ye,
|
|
702
|
+
buttonsBlock: Ne,
|
|
703
|
+
top: $e,
|
|
704
|
+
itemsBlock: Ce,
|
|
705
|
+
typeTexts: Ie,
|
|
706
|
+
block: Pe,
|
|
707
|
+
active: Te,
|
|
708
|
+
products: Be,
|
|
709
|
+
product: we,
|
|
710
|
+
button: Se,
|
|
711
|
+
image: qe,
|
|
712
|
+
info: Ae,
|
|
713
|
+
name: Oe,
|
|
714
|
+
buttons: Le,
|
|
715
|
+
modal: De,
|
|
716
|
+
other: Ee,
|
|
717
|
+
options: Me
|
|
718
|
+
}, Re = (d) => {
|
|
719
|
+
const { activeButton: n, setActiveButton: e, popupPosition: c } = d, [i, l] = f.useState(n.typesText), [s, o] = f.useState(n.destination), [m, v] = f.useState(n.link || ""), [u, a] = f.useState(n.text || "");
|
|
720
720
|
return f.useEffect(() => {
|
|
721
721
|
e({
|
|
722
722
|
...n,
|
|
723
723
|
...{
|
|
724
|
-
text:
|
|
724
|
+
text: u,
|
|
725
725
|
link: m,
|
|
726
726
|
destination: s,
|
|
727
727
|
typesText: i
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
|
-
}, [i, s, m,
|
|
730
|
+
}, [i, s, m, u]), /* @__PURE__ */ t.jsxs(
|
|
731
731
|
"div",
|
|
732
732
|
{
|
|
733
733
|
className: z.modal,
|
|
734
|
-
onClick: (
|
|
735
|
-
|
|
734
|
+
onClick: (h) => {
|
|
735
|
+
h.stopPropagation();
|
|
736
736
|
},
|
|
737
737
|
style: {
|
|
738
|
-
top: `${
|
|
739
|
-
left: `${
|
|
738
|
+
top: `${c.top}px`,
|
|
739
|
+
left: `${c.left}px`
|
|
740
740
|
},
|
|
741
741
|
children: [
|
|
742
742
|
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
743
743
|
/* @__PURE__ */ t.jsx("h3", { children: n.type }),
|
|
744
744
|
/* @__PURE__ */ t.jsx(
|
|
745
|
-
|
|
745
|
+
p,
|
|
746
746
|
{
|
|
747
747
|
name: "X",
|
|
748
748
|
height: 20,
|
|
@@ -754,16 +754,16 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
754
754
|
] }),
|
|
755
755
|
/* @__PURE__ */ t.jsxs("div", { className: z.options, children: [
|
|
756
756
|
/* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
757
|
+
W,
|
|
758
758
|
{
|
|
759
759
|
label: "Destination",
|
|
760
|
-
onChange: (
|
|
760
|
+
onChange: (h) => o(h),
|
|
761
761
|
options: ["Go to Page", "Open Link"],
|
|
762
762
|
value: s
|
|
763
763
|
}
|
|
764
764
|
),
|
|
765
765
|
s === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
766
|
-
|
|
766
|
+
W,
|
|
767
767
|
{
|
|
768
768
|
label: "Go to",
|
|
769
769
|
onChange: () => {
|
|
@@ -774,7 +774,7 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
774
774
|
) : /* @__PURE__ */ t.jsx(
|
|
775
775
|
G,
|
|
776
776
|
{
|
|
777
|
-
onChange: (
|
|
777
|
+
onChange: (h) => v(h),
|
|
778
778
|
value: m,
|
|
779
779
|
placeholder: "https://",
|
|
780
780
|
label: "Link"
|
|
@@ -788,115 +788,115 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
788
788
|
}
|
|
789
789
|
),
|
|
790
790
|
/* @__PURE__ */ t.jsx(
|
|
791
|
-
|
|
791
|
+
dt,
|
|
792
792
|
{
|
|
793
|
-
onChange: (
|
|
794
|
-
value:
|
|
793
|
+
onChange: (h) => a(h),
|
|
794
|
+
value: u,
|
|
795
795
|
label: "Text",
|
|
796
796
|
maxLength: 150
|
|
797
797
|
}
|
|
798
798
|
),
|
|
799
799
|
/* @__PURE__ */ t.jsx(
|
|
800
|
-
|
|
800
|
+
xt,
|
|
801
801
|
{
|
|
802
802
|
typesText: i,
|
|
803
|
-
setTypesText:
|
|
803
|
+
setTypesText: l
|
|
804
804
|
}
|
|
805
805
|
)
|
|
806
806
|
] })
|
|
807
807
|
]
|
|
808
808
|
}
|
|
809
809
|
);
|
|
810
|
-
},
|
|
811
|
-
subtitle:
|
|
812
|
-
header:
|
|
813
|
-
text:
|
|
814
|
-
productsBlock:
|
|
815
|
-
buttonsBlock:
|
|
816
|
-
top:
|
|
817
|
-
itemsBlock:
|
|
818
|
-
typeTexts:
|
|
819
|
-
block:
|
|
820
|
-
active:
|
|
821
|
-
products:
|
|
822
|
-
product:
|
|
823
|
-
button:
|
|
824
|
-
image:
|
|
825
|
-
info:
|
|
826
|
-
name:
|
|
827
|
-
buttons:
|
|
828
|
-
modal:
|
|
829
|
-
other:
|
|
830
|
-
options:
|
|
831
|
-
},
|
|
832
|
-
const { buttons: n, setButtons: e, deletable:
|
|
810
|
+
}, He = "_subtitle_m8qel_1", Ve = "_header_m8qel_8", Fe = "_text_m8qel_9", Ue = "_productsBlock_m8qel_10", ze = "_buttonsBlock_m8qel_11", Ge = "_top_m8qel_23", We = "_itemsBlock_m8qel_32", Xe = "_typeTexts_m8qel_38", Ye = "_block_m8qel_45", Qe = "_active_m8qel_58", Je = "_products_m8qel_10", Ke = "_product_m8qel_10", Ze = "_button_m8qel_11", ts = "_image_m8qel_88", es = "_info_m8qel_95", ss = "_name_m8qel_107", ns = "_buttons_m8qel_11", is = "_modal_m8qel_118", cs = "_other_m8qel_137", os = "_options_m8qel_143", tt = {
|
|
811
|
+
subtitle: He,
|
|
812
|
+
header: Ve,
|
|
813
|
+
text: Fe,
|
|
814
|
+
productsBlock: Ue,
|
|
815
|
+
buttonsBlock: ze,
|
|
816
|
+
top: Ge,
|
|
817
|
+
itemsBlock: We,
|
|
818
|
+
typeTexts: Xe,
|
|
819
|
+
block: Ye,
|
|
820
|
+
active: Qe,
|
|
821
|
+
products: Je,
|
|
822
|
+
product: Ke,
|
|
823
|
+
button: Ze,
|
|
824
|
+
image: ts,
|
|
825
|
+
info: es,
|
|
826
|
+
name: ss,
|
|
827
|
+
buttons: ns,
|
|
828
|
+
modal: is,
|
|
829
|
+
other: cs,
|
|
830
|
+
options: os
|
|
831
|
+
}, as = (d) => {
|
|
832
|
+
const { buttons: n, setButtons: e, deletable: c = !0, addable: i = !0 } = d, [l, s] = f.useState(null), [o, m] = f.useState({
|
|
833
833
|
top: 0,
|
|
834
834
|
left: 0
|
|
835
835
|
});
|
|
836
836
|
f.useEffect(() => {
|
|
837
|
-
const
|
|
837
|
+
const u = () => {
|
|
838
838
|
s(null);
|
|
839
839
|
};
|
|
840
|
-
return document.body.addEventListener("click",
|
|
841
|
-
s(null), document.body.removeEventListener("click",
|
|
840
|
+
return document.body.addEventListener("click", u), s(null), () => {
|
|
841
|
+
s(null), document.body.removeEventListener("click", u);
|
|
842
842
|
};
|
|
843
843
|
}, []), f.useEffect(() => {
|
|
844
|
-
if (
|
|
845
|
-
const
|
|
846
|
-
e(
|
|
844
|
+
if (l) {
|
|
845
|
+
const u = [...n].map((a) => a.id === l.id ? l : a);
|
|
846
|
+
e(u);
|
|
847
847
|
}
|
|
848
|
-
}, [
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
const
|
|
852
|
-
let
|
|
853
|
-
|
|
854
|
-
top:
|
|
855
|
-
left:
|
|
856
|
-
}), s(
|
|
848
|
+
}, [l]);
|
|
849
|
+
const v = (u, a) => {
|
|
850
|
+
u.stopPropagation();
|
|
851
|
+
const h = u.target.getBoundingClientRect(), $ = 490, b = window.innerHeight;
|
|
852
|
+
let r = h.top + window.scrollY;
|
|
853
|
+
r + $ > b && (r = b - $ - 20), m({
|
|
854
|
+
top: r,
|
|
855
|
+
left: h.left - 30
|
|
856
|
+
}), s(a);
|
|
857
857
|
};
|
|
858
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
859
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
860
|
-
n.map((
|
|
858
|
+
return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
|
|
859
|
+
/* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
|
|
860
|
+
n.map((u) => /* @__PURE__ */ t.jsxs(
|
|
861
861
|
"div",
|
|
862
862
|
{
|
|
863
|
-
className:
|
|
863
|
+
className: tt.product,
|
|
864
864
|
children: [
|
|
865
865
|
/* @__PURE__ */ t.jsx(
|
|
866
|
-
|
|
866
|
+
W,
|
|
867
867
|
{
|
|
868
|
-
onChange: (
|
|
869
|
-
const
|
|
870
|
-
...
|
|
871
|
-
type:
|
|
872
|
-
} :
|
|
873
|
-
e(
|
|
868
|
+
onChange: (a) => {
|
|
869
|
+
const $ = [...n].map((b) => b.id === u.id ? {
|
|
870
|
+
...u,
|
|
871
|
+
type: a
|
|
872
|
+
} : b);
|
|
873
|
+
e($);
|
|
874
874
|
},
|
|
875
|
-
value:
|
|
875
|
+
value: u.type,
|
|
876
876
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
877
877
|
}
|
|
878
878
|
),
|
|
879
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
879
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
|
|
880
880
|
/* @__PURE__ */ t.jsx(
|
|
881
|
-
|
|
881
|
+
p,
|
|
882
882
|
{
|
|
883
883
|
name: "Sliders",
|
|
884
884
|
hoverable: !0,
|
|
885
885
|
width: 20,
|
|
886
886
|
height: 20,
|
|
887
|
-
onClick: (
|
|
888
|
-
|
|
887
|
+
onClick: (a) => {
|
|
888
|
+
v(a, u);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
),
|
|
892
|
-
|
|
893
|
-
|
|
892
|
+
c && /* @__PURE__ */ t.jsx(
|
|
893
|
+
p,
|
|
894
894
|
{
|
|
895
895
|
name: "Trash",
|
|
896
896
|
hoverable: !0,
|
|
897
897
|
onClick: () => {
|
|
898
|
-
const
|
|
899
|
-
e(
|
|
898
|
+
const a = n.filter((h) => h.id !== u.id);
|
|
899
|
+
e(a);
|
|
900
900
|
},
|
|
901
901
|
width: 20,
|
|
902
902
|
height: 20,
|
|
@@ -906,35 +906,35 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
906
906
|
] })
|
|
907
907
|
]
|
|
908
908
|
},
|
|
909
|
-
|
|
909
|
+
u.id
|
|
910
910
|
)),
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
l && /* @__PURE__ */ t.jsx(
|
|
912
|
+
Re,
|
|
913
913
|
{
|
|
914
|
-
activeButton:
|
|
914
|
+
activeButton: l,
|
|
915
915
|
setActiveButton: s,
|
|
916
|
-
popupPosition:
|
|
916
|
+
popupPosition: o
|
|
917
917
|
}
|
|
918
918
|
),
|
|
919
919
|
i && /* @__PURE__ */ t.jsxs(
|
|
920
920
|
X,
|
|
921
921
|
{
|
|
922
|
-
className:
|
|
922
|
+
className: tt.button,
|
|
923
923
|
size: "s",
|
|
924
924
|
onClick: () => {
|
|
925
|
-
const
|
|
926
|
-
|
|
925
|
+
const u = [...n];
|
|
926
|
+
u.push({
|
|
927
927
|
type: "Primary",
|
|
928
|
-
id:
|
|
928
|
+
id: et(),
|
|
929
929
|
typesText: [],
|
|
930
930
|
destination: "Go to Page",
|
|
931
|
-
text: ""
|
|
932
|
-
}), e(
|
|
931
|
+
text: "Button Name"
|
|
932
|
+
}), e(u);
|
|
933
933
|
},
|
|
934
934
|
children: [
|
|
935
935
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
936
936
|
/* @__PURE__ */ t.jsx(
|
|
937
|
-
|
|
937
|
+
p,
|
|
938
938
|
{
|
|
939
939
|
name: "Plus",
|
|
940
940
|
width: 16,
|
|
@@ -945,8 +945,8 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
945
945
|
}
|
|
946
946
|
)
|
|
947
947
|
] });
|
|
948
|
-
},
|
|
949
|
-
const { isActiveButtons: n, setIsActiveButtons: e, buttons:
|
|
948
|
+
}, ni = (d) => {
|
|
949
|
+
const { isActiveButtons: n, setIsActiveButtons: e, buttons: c, setButtons: i } = d;
|
|
950
950
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: z.buttonsBlock, children: [
|
|
951
951
|
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
952
952
|
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: "Buttons" }),
|
|
@@ -954,41 +954,41 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
954
954
|
V,
|
|
955
955
|
{
|
|
956
956
|
current: n,
|
|
957
|
-
onChange: (
|
|
957
|
+
onChange: (l) => e(l)
|
|
958
958
|
}
|
|
959
959
|
)
|
|
960
960
|
] }),
|
|
961
961
|
/* @__PURE__ */ t.jsx(
|
|
962
|
-
|
|
962
|
+
as,
|
|
963
963
|
{
|
|
964
|
-
buttons:
|
|
964
|
+
buttons: c,
|
|
965
965
|
setButtons: i
|
|
966
966
|
}
|
|
967
967
|
)
|
|
968
968
|
] }) });
|
|
969
|
-
},
|
|
970
|
-
wrapper:
|
|
971
|
-
subtitle:
|
|
972
|
-
content:
|
|
973
|
-
range:
|
|
974
|
-
track:
|
|
975
|
-
progress:
|
|
976
|
-
dots:
|
|
977
|
-
dot:
|
|
978
|
-
active:
|
|
979
|
-
input:
|
|
980
|
-
countBlock:
|
|
981
|
-
count:
|
|
982
|
-
controls:
|
|
983
|
-
button:
|
|
984
|
-
},
|
|
985
|
-
const { label: n, min: e = 1, max:
|
|
986
|
-
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
},
|
|
990
|
-
const
|
|
991
|
-
s(
|
|
969
|
+
}, ls = "_wrapper_m18qi_1", rs = "_subtitle_m18qi_7", ds = "_content_m18qi_14", us = "_range_m18qi_22", _s = "_track_m18qi_27", ms = "_progress_m18qi_36", ps = "_dots_m18qi_46", hs = "_dot_m18qi_46", gs = "_active_m18qi_65", xs = "_input_m18qi_77", fs = "_countBlock_m18qi_91", bs = "_count_m18qi_91", js = "_controls_m18qi_107", vs = "_button_m18qi_113", I = {
|
|
970
|
+
wrapper: ls,
|
|
971
|
+
subtitle: rs,
|
|
972
|
+
content: ds,
|
|
973
|
+
range: us,
|
|
974
|
+
track: _s,
|
|
975
|
+
progress: ms,
|
|
976
|
+
dots: ps,
|
|
977
|
+
dot: hs,
|
|
978
|
+
active: gs,
|
|
979
|
+
input: xs,
|
|
980
|
+
countBlock: fs,
|
|
981
|
+
count: bs,
|
|
982
|
+
controls: js,
|
|
983
|
+
button: vs
|
|
984
|
+
}, ks = (d) => {
|
|
985
|
+
const { label: n, min: e = 1, max: c = 4, step: i = 1, count: l, setCount: s } = d, [o, m] = f.useState(!1), v = Array.from({ length: (c - e) / i + 1 }), u = (l - e) / (c - e) * 100, a = () => {
|
|
986
|
+
l < c && s(l + i);
|
|
987
|
+
}, h = () => {
|
|
988
|
+
l > e && s(l - i);
|
|
989
|
+
}, $ = (b) => {
|
|
990
|
+
const r = e + b * i;
|
|
991
|
+
s(r);
|
|
992
992
|
};
|
|
993
993
|
return /* @__PURE__ */ t.jsxs("div", { className: I.wrapper, children: [
|
|
994
994
|
n && /* @__PURE__ */ t.jsx("h5", { className: I.subtitle, children: n }),
|
|
@@ -999,23 +999,23 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
999
999
|
"div",
|
|
1000
1000
|
{
|
|
1001
1001
|
className: I.progress,
|
|
1002
|
-
style: { width: `${
|
|
1002
|
+
style: { width: `${u}%` }
|
|
1003
1003
|
}
|
|
1004
1004
|
),
|
|
1005
|
-
/* @__PURE__ */ t.jsx("div", { className: I.dots, children:
|
|
1006
|
-
const
|
|
1005
|
+
/* @__PURE__ */ t.jsx("div", { className: I.dots, children: v.map((b, r) => {
|
|
1006
|
+
const w = r <= (l - e) / i;
|
|
1007
1007
|
return /* @__PURE__ */ t.jsx(
|
|
1008
1008
|
"button",
|
|
1009
1009
|
{
|
|
1010
|
-
onClick: () =>
|
|
1011
|
-
className:
|
|
1012
|
-
[I.active]:
|
|
1013
|
-
[I.inactive]: !
|
|
1014
|
-
[I.dragging]:
|
|
1010
|
+
onClick: () => $(r),
|
|
1011
|
+
className: D(I.dot, {
|
|
1012
|
+
[I.active]: w,
|
|
1013
|
+
[I.inactive]: !w,
|
|
1014
|
+
[I.dragging]: o
|
|
1015
1015
|
}),
|
|
1016
|
-
"aria-label": `Set value to ${e +
|
|
1016
|
+
"aria-label": `Set value to ${e + r * i}`
|
|
1017
1017
|
},
|
|
1018
|
-
|
|
1018
|
+
r
|
|
1019
1019
|
);
|
|
1020
1020
|
}) }),
|
|
1021
1021
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1023,10 +1023,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1023
1023
|
{
|
|
1024
1024
|
type: "range",
|
|
1025
1025
|
min: e,
|
|
1026
|
-
max:
|
|
1026
|
+
max: c,
|
|
1027
1027
|
step: i,
|
|
1028
|
-
value:
|
|
1029
|
-
onChange: (
|
|
1028
|
+
value: l,
|
|
1029
|
+
onChange: (b) => s(Number(b.target.value)),
|
|
1030
1030
|
onMouseDown: () => m(!0),
|
|
1031
1031
|
onMouseUp: () => m(!1),
|
|
1032
1032
|
onTouchStart: () => m(!0),
|
|
@@ -1041,25 +1041,25 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1041
1041
|
{
|
|
1042
1042
|
type: "number",
|
|
1043
1043
|
min: e,
|
|
1044
|
-
max:
|
|
1044
|
+
max: c,
|
|
1045
1045
|
paddingless: !0,
|
|
1046
|
-
onChange: (
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1046
|
+
onChange: (b) => {
|
|
1047
|
+
const r = Number(b);
|
|
1048
|
+
r > c ? s(c) : r < e ? s(e) : s(r);
|
|
1049
1049
|
},
|
|
1050
|
-
value: String(
|
|
1050
|
+
value: String(l)
|
|
1051
1051
|
}
|
|
1052
1052
|
),
|
|
1053
1053
|
/* @__PURE__ */ t.jsxs("div", { className: I.controls, children: [
|
|
1054
1054
|
/* @__PURE__ */ t.jsx(
|
|
1055
1055
|
"button",
|
|
1056
1056
|
{
|
|
1057
|
-
onClick:
|
|
1058
|
-
disabled:
|
|
1057
|
+
onClick: a,
|
|
1058
|
+
disabled: l >= c,
|
|
1059
1059
|
className: I.button,
|
|
1060
1060
|
"aria-label": "Increment count",
|
|
1061
1061
|
children: /* @__PURE__ */ t.jsx(
|
|
1062
|
-
|
|
1062
|
+
p,
|
|
1063
1063
|
{
|
|
1064
1064
|
name: "CaretUp",
|
|
1065
1065
|
width: 15,
|
|
@@ -1071,12 +1071,12 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1071
1071
|
/* @__PURE__ */ t.jsx(
|
|
1072
1072
|
"button",
|
|
1073
1073
|
{
|
|
1074
|
-
onClick:
|
|
1075
|
-
disabled:
|
|
1074
|
+
onClick: h,
|
|
1075
|
+
disabled: l <= e,
|
|
1076
1076
|
className: I.button,
|
|
1077
1077
|
"aria-label": "Decrement count",
|
|
1078
1078
|
children: /* @__PURE__ */ t.jsx(
|
|
1079
|
-
|
|
1079
|
+
p,
|
|
1080
1080
|
{
|
|
1081
1081
|
name: "CaretDown",
|
|
1082
1082
|
width: 15,
|
|
@@ -1089,44 +1089,44 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1089
1089
|
] })
|
|
1090
1090
|
] })
|
|
1091
1091
|
] });
|
|
1092
|
-
},
|
|
1093
|
-
subtitle:
|
|
1094
|
-
header:
|
|
1095
|
-
text:
|
|
1096
|
-
productsBlock:
|
|
1097
|
-
top:
|
|
1098
|
-
itemsBlock:
|
|
1099
|
-
typeTexts:
|
|
1100
|
-
block:
|
|
1101
|
-
active:
|
|
1102
|
-
products:
|
|
1103
|
-
product:
|
|
1104
|
-
button:
|
|
1105
|
-
image:
|
|
1106
|
-
info:
|
|
1107
|
-
name:
|
|
1108
|
-
buttons:
|
|
1109
|
-
modal:
|
|
1110
|
-
link:
|
|
1111
|
-
modalOptions:
|
|
1112
|
-
},
|
|
1113
|
-
const { activeItem: n, setActiveItem: e, popupPosition:
|
|
1092
|
+
}, ys = "_subtitle_16rdk_1", Ns = "_header_16rdk_8", $s = "_text_16rdk_9", Cs = "_productsBlock_16rdk_10", Is = "_top_16rdk_22", Ps = "_itemsBlock_16rdk_31", Ts = "_typeTexts_16rdk_37", Bs = "_block_16rdk_44", ws = "_active_16rdk_57", Ss = "_products_16rdk_10", qs = "_product_16rdk_10", As = "_button_16rdk_76", Os = "_image_16rdk_87", Ls = "_info_16rdk_94", Ds = "_name_16rdk_106", Es = "_buttons_16rdk_110", Ms = "_modal_16rdk_117", Rs = "_link_16rdk_137", Hs = "_modalOptions_16rdk_143", B = {
|
|
1093
|
+
subtitle: ys,
|
|
1094
|
+
header: Ns,
|
|
1095
|
+
text: $s,
|
|
1096
|
+
productsBlock: Cs,
|
|
1097
|
+
top: Is,
|
|
1098
|
+
itemsBlock: Ps,
|
|
1099
|
+
typeTexts: Ts,
|
|
1100
|
+
block: Bs,
|
|
1101
|
+
active: ws,
|
|
1102
|
+
products: Ss,
|
|
1103
|
+
product: qs,
|
|
1104
|
+
button: As,
|
|
1105
|
+
image: Os,
|
|
1106
|
+
info: Ls,
|
|
1107
|
+
name: Ds,
|
|
1108
|
+
buttons: Es,
|
|
1109
|
+
modal: Ms,
|
|
1110
|
+
link: Rs,
|
|
1111
|
+
modalOptions: Hs
|
|
1112
|
+
}, Vs = (d) => {
|
|
1113
|
+
const { activeItem: n, setActiveItem: e, popupPosition: c, setIsOpenModal: i } = d;
|
|
1114
1114
|
return /* @__PURE__ */ t.jsxs(
|
|
1115
1115
|
"div",
|
|
1116
1116
|
{
|
|
1117
|
-
className:
|
|
1118
|
-
onClick: (
|
|
1119
|
-
|
|
1117
|
+
className: B.modal,
|
|
1118
|
+
onClick: (l) => {
|
|
1119
|
+
l.stopPropagation();
|
|
1120
1120
|
},
|
|
1121
1121
|
style: {
|
|
1122
|
-
top: `${
|
|
1123
|
-
left: `${
|
|
1122
|
+
top: `${c.top}px`,
|
|
1123
|
+
left: `${c.left}px`
|
|
1124
1124
|
},
|
|
1125
1125
|
children: [
|
|
1126
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1126
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
|
|
1127
1127
|
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
1128
1128
|
/* @__PURE__ */ t.jsx(
|
|
1129
|
-
|
|
1129
|
+
p,
|
|
1130
1130
|
{
|
|
1131
1131
|
name: "X",
|
|
1132
1132
|
height: 20,
|
|
@@ -1138,15 +1138,15 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1138
1138
|
}
|
|
1139
1139
|
)
|
|
1140
1140
|
] }),
|
|
1141
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1142
|
-
|
|
1141
|
+
/* @__PURE__ */ t.jsx("div", { className: B.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1142
|
+
ot,
|
|
1143
1143
|
{
|
|
1144
1144
|
label: "Put up an attractive image",
|
|
1145
|
-
onChange: (
|
|
1145
|
+
onChange: (l) => {
|
|
1146
1146
|
const s = {
|
|
1147
1147
|
...n,
|
|
1148
|
-
images:
|
|
1149
|
-
imagePath:
|
|
1148
|
+
images: l,
|
|
1149
|
+
imagePath: l[0]
|
|
1150
1150
|
};
|
|
1151
1151
|
e(s);
|
|
1152
1152
|
}
|
|
@@ -1155,84 +1155,84 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1155
1155
|
]
|
|
1156
1156
|
}
|
|
1157
1157
|
);
|
|
1158
|
-
},
|
|
1159
|
-
const { index: n, moveProduct: e, children:
|
|
1158
|
+
}, Fs = (d) => {
|
|
1159
|
+
const { index: n, moveProduct: e, children: c } = d, [, i] = mt({
|
|
1160
1160
|
accept: "product",
|
|
1161
|
-
hover(
|
|
1162
|
-
|
|
1161
|
+
hover(o) {
|
|
1162
|
+
o.index !== n && (e(o.index, n), o.index = n);
|
|
1163
1163
|
}
|
|
1164
|
-
}), [{ isDragging:
|
|
1164
|
+
}), [{ isDragging: l }, s] = pt({
|
|
1165
1165
|
type: "product",
|
|
1166
1166
|
item: { index: n },
|
|
1167
|
-
collect: (
|
|
1168
|
-
isDragging:
|
|
1167
|
+
collect: (o) => ({
|
|
1168
|
+
isDragging: o.isDragging()
|
|
1169
1169
|
})
|
|
1170
1170
|
});
|
|
1171
1171
|
return /* @__PURE__ */ t.jsx(
|
|
1172
1172
|
"div",
|
|
1173
1173
|
{
|
|
1174
|
-
ref: (
|
|
1175
|
-
className: `${
|
|
1176
|
-
children:
|
|
1174
|
+
ref: (o) => s(i(o)),
|
|
1175
|
+
className: `${B.product} ${l ? B.dragging : ""}`,
|
|
1176
|
+
children: c
|
|
1177
1177
|
}
|
|
1178
1178
|
);
|
|
1179
|
-
},
|
|
1179
|
+
}, ii = (d) => {
|
|
1180
1180
|
const {
|
|
1181
1181
|
isActiveItems: n,
|
|
1182
1182
|
setIsActiveItems: e,
|
|
1183
|
-
items:
|
|
1183
|
+
items: c,
|
|
1184
1184
|
setItems: i,
|
|
1185
|
-
other:
|
|
1185
|
+
other: l,
|
|
1186
1186
|
title: s,
|
|
1187
|
-
subtitle:
|
|
1187
|
+
subtitle: o,
|
|
1188
1188
|
editable: m = !0,
|
|
1189
|
-
draggable:
|
|
1190
|
-
withImage:
|
|
1191
|
-
deletable:
|
|
1192
|
-
addable:
|
|
1193
|
-
itemsType:
|
|
1194
|
-
itemsOptions:
|
|
1195
|
-
} =
|
|
1189
|
+
draggable: v = !1,
|
|
1190
|
+
withImage: u = !1,
|
|
1191
|
+
deletable: a = !0,
|
|
1192
|
+
addable: h = !0,
|
|
1193
|
+
itemsType: $,
|
|
1194
|
+
itemsOptions: b
|
|
1195
|
+
} = d, [r, w] = f.useState(null), [Y, Q] = f.useState({
|
|
1196
1196
|
top: 0,
|
|
1197
1197
|
left: 0
|
|
1198
|
-
}), [F, y] = f.useState(!1),
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1198
|
+
}), [F, y] = f.useState(!1), M = (g, k) => {
|
|
1199
|
+
const S = [...c], [C] = S.splice(g, 1);
|
|
1200
|
+
S.splice(k, 0, C), i(S);
|
|
1201
1201
|
};
|
|
1202
1202
|
f.useEffect(() => {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1203
|
+
const g = () => {
|
|
1204
|
+
w(null), y(!1);
|
|
1205
1205
|
};
|
|
1206
|
-
return document.body.addEventListener("click",
|
|
1207
|
-
|
|
1206
|
+
return document.body.addEventListener("click", g), w(null), y(!1), () => {
|
|
1207
|
+
w(null), y(!1), document.body.removeEventListener("click", g);
|
|
1208
1208
|
};
|
|
1209
1209
|
}, []), f.useEffect(() => {
|
|
1210
|
-
if (
|
|
1211
|
-
const
|
|
1212
|
-
i(
|
|
1210
|
+
if (r) {
|
|
1211
|
+
const g = [...c].map((k) => k.id === r.id ? r : k);
|
|
1212
|
+
i(g);
|
|
1213
1213
|
}
|
|
1214
|
-
}, [
|
|
1215
|
-
const R = (
|
|
1216
|
-
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1220
|
-
top:
|
|
1221
|
-
left:
|
|
1222
|
-
}),
|
|
1214
|
+
}, [r]);
|
|
1215
|
+
const R = (g, k) => {
|
|
1216
|
+
g.stopPropagation();
|
|
1217
|
+
const S = g.target.getBoundingClientRect(), C = 100, U = window.innerHeight;
|
|
1218
|
+
let A = S.top + window.scrollY;
|
|
1219
|
+
A + C > U && (A = U - C - 20), y(!0), Q({
|
|
1220
|
+
top: A - 80,
|
|
1221
|
+
left: S.left - 30
|
|
1222
|
+
}), w(k);
|
|
1223
1223
|
};
|
|
1224
|
-
function
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1224
|
+
function nt(g) {
|
|
1225
|
+
if (u)
|
|
1226
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
1227
1227
|
"img",
|
|
1228
1228
|
{
|
|
1229
|
-
src: `https://imagedelivery.net/${
|
|
1229
|
+
src: `https://imagedelivery.net/${g}/w=1000`,
|
|
1230
1230
|
alt: "image",
|
|
1231
1231
|
width: 16,
|
|
1232
1232
|
height: 16
|
|
1233
1233
|
}
|
|
1234
1234
|
) : /* @__PURE__ */ t.jsx(
|
|
1235
|
-
|
|
1235
|
+
p,
|
|
1236
1236
|
{
|
|
1237
1237
|
name: "Image",
|
|
1238
1238
|
width: 16,
|
|
@@ -1241,134 +1241,134 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
1243
|
}
|
|
1244
|
-
const
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
|
|
1244
|
+
const st = (g, k) => {
|
|
1245
|
+
const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1246
|
+
v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1247
|
+
p,
|
|
1248
1248
|
{
|
|
1249
1249
|
name: "DotsSixVertical",
|
|
1250
1250
|
hoverable: !0,
|
|
1251
1251
|
width: 20,
|
|
1252
1252
|
height: 20
|
|
1253
1253
|
}
|
|
1254
|
-
) },
|
|
1255
|
-
|
|
1256
|
-
|
|
1254
|
+
) }, k),
|
|
1255
|
+
$ === "select" && /* @__PURE__ */ t.jsx(
|
|
1256
|
+
W,
|
|
1257
1257
|
{
|
|
1258
1258
|
onChange: (C) => {
|
|
1259
|
-
const U = [...
|
|
1260
|
-
if (!
|
|
1261
|
-
const
|
|
1262
|
-
...
|
|
1263
|
-
newPrice:
|
|
1264
|
-
oldPrice:
|
|
1265
|
-
},
|
|
1266
|
-
...
|
|
1259
|
+
const U = [...c], A = Number(C.split(" ")[1]), _ = b.find((N) => N.id === A);
|
|
1260
|
+
if (!_) return;
|
|
1261
|
+
const T = {
|
|
1262
|
+
..._.productData.stats,
|
|
1263
|
+
newPrice: _.productData.minPrice.amount,
|
|
1264
|
+
oldPrice: _.productData.compareAtPrice.amount
|
|
1265
|
+
}, q = U.map((N) => N.id === g.id ? {
|
|
1266
|
+
...g,
|
|
1267
1267
|
name: C,
|
|
1268
|
-
listingId:
|
|
1269
|
-
stats:
|
|
1268
|
+
listingId: A,
|
|
1269
|
+
stats: T
|
|
1270
1270
|
} : N);
|
|
1271
|
-
|
|
1272
|
-
...
|
|
1271
|
+
w({
|
|
1272
|
+
...g,
|
|
1273
1273
|
name: C,
|
|
1274
|
-
listingId:
|
|
1275
|
-
}), i([...
|
|
1274
|
+
listingId: A
|
|
1275
|
+
}), i([...q]);
|
|
1276
1276
|
},
|
|
1277
|
-
value:
|
|
1278
|
-
options: [...
|
|
1279
|
-
leftAddon:
|
|
1277
|
+
value: g.name,
|
|
1278
|
+
options: [...b.map((C) => `Product ${C.id}`)],
|
|
1279
|
+
leftAddon: nt(g.images[0])
|
|
1280
1280
|
},
|
|
1281
|
-
|
|
1281
|
+
k
|
|
1282
1282
|
),
|
|
1283
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1283
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
1284
1284
|
m && /* @__PURE__ */ t.jsx(
|
|
1285
|
-
|
|
1285
|
+
p,
|
|
1286
1286
|
{
|
|
1287
1287
|
name: "Sliders",
|
|
1288
1288
|
hoverable: !0,
|
|
1289
1289
|
width: 20,
|
|
1290
1290
|
height: 20,
|
|
1291
|
-
onClick: (C) => R(C,
|
|
1291
|
+
onClick: (C) => R(C, g)
|
|
1292
1292
|
}
|
|
1293
1293
|
),
|
|
1294
|
-
|
|
1295
|
-
|
|
1294
|
+
a && /* @__PURE__ */ t.jsx(
|
|
1295
|
+
p,
|
|
1296
1296
|
{
|
|
1297
1297
|
name: "Trash",
|
|
1298
1298
|
hoverable: !0,
|
|
1299
1299
|
width: 20,
|
|
1300
1300
|
height: 20,
|
|
1301
1301
|
fill: "#C12A2A",
|
|
1302
|
-
onClick: () => i(
|
|
1302
|
+
onClick: () => i(c.filter((C) => C.id !== g.id))
|
|
1303
1303
|
}
|
|
1304
1304
|
)
|
|
1305
1305
|
] })
|
|
1306
1306
|
] });
|
|
1307
|
-
return
|
|
1308
|
-
|
|
1307
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
1308
|
+
Fs,
|
|
1309
1309
|
{
|
|
1310
|
-
product:
|
|
1311
|
-
index:
|
|
1312
|
-
moveProduct:
|
|
1313
|
-
children:
|
|
1310
|
+
product: g,
|
|
1311
|
+
index: k,
|
|
1312
|
+
moveProduct: M,
|
|
1313
|
+
children: S
|
|
1314
1314
|
},
|
|
1315
|
-
|
|
1315
|
+
g.id
|
|
1316
1316
|
) : /* @__PURE__ */ t.jsx(
|
|
1317
1317
|
"div",
|
|
1318
1318
|
{
|
|
1319
|
-
className:
|
|
1320
|
-
children:
|
|
1319
|
+
className: B.product,
|
|
1320
|
+
children: S
|
|
1321
1321
|
},
|
|
1322
|
-
|
|
1322
|
+
g.id
|
|
1323
1323
|
);
|
|
1324
1324
|
};
|
|
1325
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1326
|
-
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1327
|
-
s && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1325
|
+
return /* @__PURE__ */ t.jsxs("div", { className: B.productsBlock, children: [
|
|
1326
|
+
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
|
|
1327
|
+
s && /* @__PURE__ */ t.jsx("h3", { className: B.title, children: s }),
|
|
1328
1328
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1329
1329
|
V,
|
|
1330
1330
|
{
|
|
1331
1331
|
current: n,
|
|
1332
|
-
onChange: (
|
|
1332
|
+
onChange: (g) => e == null ? void 0 : e(g)
|
|
1333
1333
|
}
|
|
1334
1334
|
)
|
|
1335
1335
|
] }),
|
|
1336
|
-
F &&
|
|
1337
|
-
|
|
1336
|
+
F && r && /* @__PURE__ */ t.jsx(
|
|
1337
|
+
Vs,
|
|
1338
1338
|
{
|
|
1339
|
-
activeItem:
|
|
1340
|
-
setActiveItem:
|
|
1339
|
+
activeItem: r,
|
|
1340
|
+
setActiveItem: w,
|
|
1341
1341
|
setIsOpenModal: y,
|
|
1342
|
-
popupPosition:
|
|
1342
|
+
popupPosition: Y
|
|
1343
1343
|
}
|
|
1344
1344
|
),
|
|
1345
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1345
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
|
|
1346
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: o }),
|
|
1347
|
+
v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: c.map((g, k) => st(g, k)) }) : c.map((g, k) => st(g, k)),
|
|
1348
|
+
h && /* @__PURE__ */ t.jsxs(
|
|
1349
1349
|
X,
|
|
1350
1350
|
{
|
|
1351
|
-
className:
|
|
1351
|
+
className: B.button,
|
|
1352
1352
|
size: "s",
|
|
1353
1353
|
onClick: () => {
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1356
|
-
name: `Product ${
|
|
1357
|
-
id:
|
|
1358
|
-
listingId:
|
|
1354
|
+
const g = [...c], k = b[0].id;
|
|
1355
|
+
g.push({
|
|
1356
|
+
name: `Product ${k}`,
|
|
1357
|
+
id: et(),
|
|
1358
|
+
listingId: k,
|
|
1359
1359
|
imagePath: "",
|
|
1360
1360
|
images: [],
|
|
1361
1361
|
stats: {
|
|
1362
|
-
...
|
|
1363
|
-
newPrice:
|
|
1364
|
-
oldPrice:
|
|
1362
|
+
...b[0].productData.stats,
|
|
1363
|
+
newPrice: b[0].productData.minPrice.amount,
|
|
1364
|
+
oldPrice: b[0].productData.compareAtPrice.amount
|
|
1365
1365
|
}
|
|
1366
|
-
}), i(
|
|
1366
|
+
}), i(g);
|
|
1367
1367
|
},
|
|
1368
1368
|
children: [
|
|
1369
1369
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1370
1370
|
/* @__PURE__ */ t.jsx(
|
|
1371
|
-
|
|
1371
|
+
p,
|
|
1372
1372
|
{
|
|
1373
1373
|
name: "Plus",
|
|
1374
1374
|
width: 16,
|
|
@@ -1379,122 +1379,122 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
|
|
|
1379
1379
|
}
|
|
1380
1380
|
)
|
|
1381
1381
|
] }),
|
|
1382
|
-
|
|
1382
|
+
l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
|
|
1383
1383
|
] });
|
|
1384
|
-
},
|
|
1385
|
-
options:
|
|
1386
|
-
price:
|
|
1387
|
-
oldPrice:
|
|
1388
|
-
newPrice:
|
|
1389
|
-
meta:
|
|
1390
|
-
info:
|
|
1391
|
-
infoRight:
|
|
1392
|
-
buttons:
|
|
1393
|
-
variants:
|
|
1394
|
-
variant:
|
|
1395
|
-
stock:
|
|
1396
|
-
variantInfo:
|
|
1397
|
-
quantity:
|
|
1398
|
-
count:
|
|
1399
|
-
button:
|
|
1400
|
-
activeVariant:
|
|
1401
|
-
chargeTypes:
|
|
1402
|
-
charge:
|
|
1403
|
-
chargeActive:
|
|
1404
|
-
title:
|
|
1384
|
+
}, Us = "_options_11lki_1", zs = "_price_11lki_12", Gs = "_oldPrice_11lki_19", Ws = "_newPrice_11lki_27", Xs = "_meta_11lki_34", Ys = "_info_11lki_40", Qs = "_infoRight_11lki_48", Js = "_buttons_11lki_55", Ks = "_variants_11lki_62", Zs = "_variant_11lki_62", tn = "_stock_11lki_79", en = "_variantInfo_11lki_86", sn = "_quantity_11lki_92", nn = "_count_11lki_99", cn = "_button_11lki_55", on = "_activeVariant_11lki_120", an = "_chargeTypes_11lki_124", ln = "_charge_11lki_124", rn = "_chargeActive_11lki_145", dn = "_title_11lki_150", j = {
|
|
1385
|
+
options: Us,
|
|
1386
|
+
price: zs,
|
|
1387
|
+
oldPrice: Gs,
|
|
1388
|
+
newPrice: Ws,
|
|
1389
|
+
meta: Xs,
|
|
1390
|
+
info: Ys,
|
|
1391
|
+
infoRight: Qs,
|
|
1392
|
+
buttons: Js,
|
|
1393
|
+
variants: Ks,
|
|
1394
|
+
variant: Zs,
|
|
1395
|
+
stock: tn,
|
|
1396
|
+
variantInfo: en,
|
|
1397
|
+
quantity: sn,
|
|
1398
|
+
count: nn,
|
|
1399
|
+
button: cn,
|
|
1400
|
+
activeVariant: on,
|
|
1401
|
+
chargeTypes: an,
|
|
1402
|
+
charge: ln,
|
|
1403
|
+
chargeActive: rn,
|
|
1404
|
+
title: dn
|
|
1405
1405
|
};
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1408
|
-
const { variants: n } =
|
|
1409
|
-
async function
|
|
1410
|
-
await
|
|
1411
|
-
productId:
|
|
1406
|
+
var bt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(bt || {});
|
|
1407
|
+
const ci = (d) => {
|
|
1408
|
+
const { variants: n } = d, [e, c] = f.useState(n[0]), [i, l] = f.useState(e.chargeTypes[0]), s = at(), [o, m] = f.useState(1), { reset: v, addProductToCart: u, getProducts: a } = lt();
|
|
1409
|
+
async function h() {
|
|
1410
|
+
await a(), await u({
|
|
1411
|
+
productId: d.id,
|
|
1412
1412
|
productVariantId: e.id,
|
|
1413
|
-
quantity:
|
|
1413
|
+
quantity: o
|
|
1414
1414
|
});
|
|
1415
1415
|
}
|
|
1416
|
-
function
|
|
1417
|
-
|
|
1416
|
+
function $() {
|
|
1417
|
+
v(), h(), s("/checkout");
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1420
|
-
if (
|
|
1421
|
-
const y = Math.floor(
|
|
1419
|
+
function b(r) {
|
|
1420
|
+
if (r >= 864e5) {
|
|
1421
|
+
const y = Math.floor(r / 864e5);
|
|
1422
1422
|
return `${y} ${y === 1 ? "day" : "days"}`;
|
|
1423
|
-
} else if (
|
|
1424
|
-
const y = Math.floor(
|
|
1423
|
+
} else if (r >= 36e5) {
|
|
1424
|
+
const y = Math.floor(r / 36e5);
|
|
1425
1425
|
return `${y} ${y === 1 ? "hour" : "hours"}`;
|
|
1426
|
-
} else if (
|
|
1427
|
-
const y = Math.floor(
|
|
1426
|
+
} else if (r >= 6e4) {
|
|
1427
|
+
const y = Math.floor(r / 6e4);
|
|
1428
1428
|
return `${y} ${y === 1 ? "minute" : "minutes"}`;
|
|
1429
1429
|
} else {
|
|
1430
|
-
const y = Math.floor(
|
|
1430
|
+
const y = Math.floor(r / 1e3);
|
|
1431
1431
|
return `${y} ${y === 1 ? "second" : "seconds"}`;
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1435
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1434
|
+
return /* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
|
|
1435
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: j.chargeTypes, children: e.chargeTypes.map((r) => /* @__PURE__ */ t.jsx(
|
|
1436
1436
|
"div",
|
|
1437
1437
|
{
|
|
1438
|
-
className:
|
|
1439
|
-
[
|
|
1438
|
+
className: D(j.charge, {
|
|
1439
|
+
[j.chargeActive]: i === r
|
|
1440
1440
|
}),
|
|
1441
|
-
onClick: () =>
|
|
1442
|
-
children:
|
|
1441
|
+
onClick: () => l(r),
|
|
1442
|
+
children: bt[r]
|
|
1443
1443
|
},
|
|
1444
|
-
|
|
1444
|
+
r
|
|
1445
1445
|
)) }),
|
|
1446
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1446
|
+
/* @__PURE__ */ t.jsx("div", { className: j.variants, children: n.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1447
1447
|
"div",
|
|
1448
1448
|
{
|
|
1449
|
-
className:
|
|
1450
|
-
[
|
|
1449
|
+
className: D(j.variant, {
|
|
1450
|
+
[j.activeVariant]: e.id === r.id
|
|
1451
1451
|
}),
|
|
1452
|
-
onClick: () =>
|
|
1452
|
+
onClick: () => c(r),
|
|
1453
1453
|
children: [
|
|
1454
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1455
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1454
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.variantInfo, children: [
|
|
1455
|
+
/* @__PURE__ */ t.jsx("span", { className: j.title, children: r.name }),
|
|
1456
1456
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1457
1457
|
"$",
|
|
1458
|
-
i === "ONE_TIME" ?
|
|
1458
|
+
i === "ONE_TIME" ? r.price.amount : r.subscriptionSettings.price.amount
|
|
1459
1459
|
] })
|
|
1460
1460
|
] }),
|
|
1461
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1462
|
-
|
|
1461
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: j.stock, children: [
|
|
1462
|
+
r.quantity.restrictions.max || 0,
|
|
1463
1463
|
" in stock"
|
|
1464
1464
|
] }) })
|
|
1465
1465
|
]
|
|
1466
1466
|
},
|
|
1467
|
-
|
|
1467
|
+
r.id
|
|
1468
1468
|
)) }),
|
|
1469
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1469
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: j.quantity, children: [
|
|
1470
1470
|
/* @__PURE__ */ t.jsx(
|
|
1471
1471
|
"div",
|
|
1472
1472
|
{
|
|
1473
1473
|
onClick: () => {
|
|
1474
|
-
|
|
1474
|
+
o > 1 ? m((r) => r - 1) : m(1);
|
|
1475
1475
|
},
|
|
1476
|
-
className:
|
|
1477
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1476
|
+
className: j.button,
|
|
1477
|
+
children: /* @__PURE__ */ t.jsx(p, { name: "Minus" })
|
|
1478
1478
|
}
|
|
1479
1479
|
),
|
|
1480
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1480
|
+
/* @__PURE__ */ t.jsx("div", { className: j.count, children: o }),
|
|
1481
1481
|
/* @__PURE__ */ t.jsx(
|
|
1482
1482
|
"div",
|
|
1483
1483
|
{
|
|
1484
1484
|
onClick: () => {
|
|
1485
|
-
|
|
1485
|
+
m((r) => r + 1);
|
|
1486
1486
|
},
|
|
1487
|
-
className:
|
|
1488
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1487
|
+
className: j.button,
|
|
1488
|
+
children: /* @__PURE__ */ t.jsx(p, { name: "Plus" })
|
|
1489
1489
|
}
|
|
1490
1490
|
)
|
|
1491
1491
|
] }),
|
|
1492
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1493
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1492
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.meta, children: [
|
|
1493
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
|
|
1494
1494
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1495
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1495
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.infoRight, children: [
|
|
1496
1496
|
/* @__PURE__ */ t.jsx(
|
|
1497
|
-
|
|
1497
|
+
p,
|
|
1498
1498
|
{
|
|
1499
1499
|
name: "Lightning",
|
|
1500
1500
|
fill: "#FF3F19",
|
|
@@ -1502,44 +1502,44 @@ const Un = (r) => {
|
|
|
1502
1502
|
height: 20
|
|
1503
1503
|
}
|
|
1504
1504
|
),
|
|
1505
|
-
/* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" :
|
|
1505
|
+
/* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : b(e.deliveryTime) })
|
|
1506
1506
|
] })
|
|
1507
1507
|
] }),
|
|
1508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1508
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
|
|
1509
1509
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1510
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1511
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1510
|
+
/* @__PURE__ */ t.jsx("div", { className: j.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
|
|
1511
|
+
/* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
|
|
1512
1512
|
"$ ",
|
|
1513
|
-
(e.price.amount || 0) *
|
|
1513
|
+
(e.price.amount || 0) * o
|
|
1514
1514
|
] }),
|
|
1515
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1515
|
+
/* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
|
|
1516
1516
|
"$ ",
|
|
1517
|
-
(e.compareAtPrice.amount || 0) *
|
|
1517
|
+
(e.compareAtPrice.amount || 0) * o
|
|
1518
1518
|
] })
|
|
1519
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1519
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
|
|
1520
1520
|
"$ ",
|
|
1521
|
-
(e.price.amount || 0) *
|
|
1522
|
-
] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1523
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1521
|
+
(e.price.amount || 0) * o
|
|
1522
|
+
] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
|
|
1523
|
+
/* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
|
|
1524
1524
|
"$ ",
|
|
1525
1525
|
e.subscriptionSettings.price.amount || 0
|
|
1526
1526
|
] }),
|
|
1527
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1527
|
+
/* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
|
|
1528
1528
|
"$ ",
|
|
1529
1529
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1530
1530
|
] })
|
|
1531
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1531
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
|
|
1532
1532
|
"$ ",
|
|
1533
1533
|
e.subscriptionSettings.price.amount || 0
|
|
1534
1534
|
] }) })
|
|
1535
1535
|
] })
|
|
1536
1536
|
] }),
|
|
1537
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1537
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.buttons, children: [
|
|
1538
1538
|
/* @__PURE__ */ t.jsx(
|
|
1539
1539
|
X,
|
|
1540
1540
|
{
|
|
1541
1541
|
type: "Primary",
|
|
1542
|
-
onClick: () =>
|
|
1542
|
+
onClick: () => $(),
|
|
1543
1543
|
children: "Buy Now"
|
|
1544
1544
|
}
|
|
1545
1545
|
),
|
|
@@ -1547,51 +1547,53 @@ const Un = (r) => {
|
|
|
1547
1547
|
X,
|
|
1548
1548
|
{
|
|
1549
1549
|
type: "Secondary",
|
|
1550
|
-
onClick: () =>
|
|
1550
|
+
onClick: () => h(),
|
|
1551
1551
|
children: "Add to Cart"
|
|
1552
1552
|
}
|
|
1553
1553
|
)
|
|
1554
1554
|
] })
|
|
1555
1555
|
] });
|
|
1556
|
-
},
|
|
1557
|
-
button:
|
|
1558
|
-
login:
|
|
1559
|
-
signUp:
|
|
1560
|
-
buttons:
|
|
1561
|
-
modal:
|
|
1562
|
-
info:
|
|
1563
|
-
top:
|
|
1564
|
-
title:
|
|
1565
|
-
clear:
|
|
1566
|
-
activeClear:
|
|
1567
|
-
count:
|
|
1568
|
-
cart:
|
|
1569
|
-
empty:
|
|
1570
|
-
product:
|
|
1571
|
-
products:
|
|
1572
|
-
image:
|
|
1573
|
-
productInfo:
|
|
1574
|
-
content:
|
|
1575
|
-
name:
|
|
1576
|
-
price:
|
|
1577
|
-
productButtons:
|
|
1578
|
-
productButton:
|
|
1579
|
-
productCount:
|
|
1580
|
-
bottom:
|
|
1581
|
-
subtotal:
|
|
1582
|
-
block:
|
|
1583
|
-
shoppingCount:
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1556
|
+
}, un = "_button_iklta_1", _n = "_login_iklta_14", mn = "_signUp_iklta_18", pn = "_buttons_iklta_23", hn = "_modal_iklta_32", gn = "_info_iklta_48", xn = "_top_iklta_55", fn = "_title_iklta_66", bn = "_clear_iklta_72", jn = "_activeClear_iklta_79", vn = "_count_iklta_83", kn = "_cart_iklta_98", yn = "_empty_iklta_106", Nn = "_product_iklta_132", $n = "_products_iklta_141", Cn = "_image_iklta_149", In = "_productInfo_iklta_155", Pn = "_content_iklta_162", Tn = "_name_iklta_168", Bn = "_price_iklta_174", wn = "_productButtons_iklta_180", Sn = "_productButton_iklta_180", qn = "_productCount_iklta_200", An = "_bottom_iklta_216", On = "_subtotal_iklta_224", Ln = "_block_iklta_232", Dn = "_shoppingCount_iklta_239", En = "_total_iklta_259", Mn = "_link_iklta_265", x = {
|
|
1557
|
+
button: un,
|
|
1558
|
+
login: _n,
|
|
1559
|
+
signUp: mn,
|
|
1560
|
+
buttons: pn,
|
|
1561
|
+
modal: hn,
|
|
1562
|
+
info: gn,
|
|
1563
|
+
top: xn,
|
|
1564
|
+
title: fn,
|
|
1565
|
+
clear: bn,
|
|
1566
|
+
activeClear: jn,
|
|
1567
|
+
count: vn,
|
|
1568
|
+
cart: kn,
|
|
1569
|
+
empty: yn,
|
|
1570
|
+
product: Nn,
|
|
1571
|
+
products: $n,
|
|
1572
|
+
image: Cn,
|
|
1573
|
+
productInfo: In,
|
|
1574
|
+
content: Pn,
|
|
1575
|
+
name: Tn,
|
|
1576
|
+
price: Bn,
|
|
1577
|
+
productButtons: wn,
|
|
1578
|
+
productButton: Sn,
|
|
1579
|
+
productCount: qn,
|
|
1580
|
+
bottom: An,
|
|
1581
|
+
subtotal: On,
|
|
1582
|
+
block: Ln,
|
|
1583
|
+
shoppingCount: Dn,
|
|
1584
|
+
total: En,
|
|
1585
|
+
link: Mn
|
|
1586
|
+
}, oi = (d) => {
|
|
1587
|
+
const { shopping: n, signUp: e } = d, c = at();
|
|
1588
|
+
function i(l) {
|
|
1589
|
+
c(l);
|
|
1588
1590
|
}
|
|
1589
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1590
|
-
n && /* @__PURE__ */ t.jsx(
|
|
1591
|
+
return /* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
|
|
1592
|
+
n && /* @__PURE__ */ t.jsx(Rn, {}),
|
|
1591
1593
|
/* @__PURE__ */ t.jsx(
|
|
1592
1594
|
"div",
|
|
1593
1595
|
{
|
|
1594
|
-
className:
|
|
1596
|
+
className: D(x.button, x.login),
|
|
1595
1597
|
onClick: () => i("/customer-dash"),
|
|
1596
1598
|
children: "Login"
|
|
1597
1599
|
}
|
|
@@ -1599,134 +1601,146 @@ const Un = (r) => {
|
|
|
1599
1601
|
e && /* @__PURE__ */ t.jsx(
|
|
1600
1602
|
"div",
|
|
1601
1603
|
{
|
|
1602
|
-
className:
|
|
1604
|
+
className: D(x.button, x.login, x.signUp),
|
|
1603
1605
|
onClick: () => i("/customer-dash"),
|
|
1604
1606
|
children: "Sign Up"
|
|
1605
1607
|
}
|
|
1606
1608
|
)
|
|
1607
1609
|
] });
|
|
1608
|
-
},
|
|
1609
|
-
const [
|
|
1610
|
+
}, Rn = () => {
|
|
1611
|
+
const [d, n] = f.useState(!1), [e, c] = f.useState([]), { cart: i, getProducts: l } = lt();
|
|
1612
|
+
function s(u) {
|
|
1613
|
+
for (let a = 0; a < i.parts.length; a++)
|
|
1614
|
+
for (let h = 0; h < u.variants.length; h++)
|
|
1615
|
+
if (i.parts[a].productVariantId === u.variants[a].id)
|
|
1616
|
+
return i.parts[a].productVariantId;
|
|
1617
|
+
}
|
|
1618
|
+
function o(u) {
|
|
1619
|
+
for (let a = 0; a < i.parts.length; a++)
|
|
1620
|
+
for (let h = 0; h < u.variants.length; h++)
|
|
1621
|
+
if (i.parts[a].productVariantId === u.variants[a].id)
|
|
1622
|
+
return i.parts[a].quantity;
|
|
1623
|
+
}
|
|
1624
|
+
f.useEffect(() => {
|
|
1625
|
+
(async () => {
|
|
1626
|
+
const a = i.parts.map((b) => String(b.productId)), $ = (await l([...a])).map((b) => ({
|
|
1627
|
+
...b,
|
|
1628
|
+
activeVariantId: s(b),
|
|
1629
|
+
quantity: o(b)
|
|
1630
|
+
}));
|
|
1631
|
+
c($);
|
|
1632
|
+
})();
|
|
1633
|
+
}, [i]);
|
|
1634
|
+
function m(u) {
|
|
1635
|
+
var a;
|
|
1636
|
+
return !u || !(u != null && u.variants) ? !1 : (a = u.variants.find((h) => h.id === u.activeVariantId)) == null ? void 0 : a.subscriptionSettings;
|
|
1637
|
+
}
|
|
1638
|
+
const v = i.parts.length > 0 && e.length > 0 && !m(e[0]);
|
|
1610
1639
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1611
1640
|
/* @__PURE__ */ t.jsxs(
|
|
1612
1641
|
"div",
|
|
1613
1642
|
{
|
|
1614
|
-
className:
|
|
1615
|
-
onClick: (
|
|
1616
|
-
|
|
1643
|
+
className: x.button,
|
|
1644
|
+
onClick: (u) => {
|
|
1645
|
+
u.stopPropagation(), n(!0);
|
|
1617
1646
|
},
|
|
1618
1647
|
children: [
|
|
1619
1648
|
/* @__PURE__ */ t.jsx(
|
|
1620
|
-
|
|
1649
|
+
p,
|
|
1621
1650
|
{
|
|
1622
1651
|
name: "Handbag",
|
|
1623
1652
|
fill: "#252525"
|
|
1624
1653
|
}
|
|
1625
1654
|
),
|
|
1626
|
-
|
|
1655
|
+
v && /* @__PURE__ */ t.jsx("div", { className: x.shoppingCount, children: i.parts.length })
|
|
1627
1656
|
]
|
|
1628
1657
|
}
|
|
1629
1658
|
),
|
|
1630
|
-
|
|
1659
|
+
d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(
|
|
1660
|
+
Hn,
|
|
1661
|
+
{
|
|
1662
|
+
activeProducts: e,
|
|
1663
|
+
isCartNotEmpty: v
|
|
1664
|
+
}
|
|
1665
|
+
) })
|
|
1631
1666
|
] });
|
|
1632
|
-
},
|
|
1633
|
-
const {
|
|
1634
|
-
function m(
|
|
1635
|
-
|
|
1636
|
-
for (let l = 0; l < d.variants.length; l++)
|
|
1637
|
-
if (r.parts[_].productVariantId === d.variants[_].id)
|
|
1638
|
-
return r.parts[_].productVariantId;
|
|
1639
|
-
}
|
|
1640
|
-
function $(d) {
|
|
1641
|
-
for (let _ = 0; _ < r.parts.length; _++)
|
|
1642
|
-
for (let l = 0; l < d.variants.length; l++)
|
|
1643
|
-
if (r.parts[_].productVariantId === d.variants[_].id)
|
|
1644
|
-
return r.parts[_].quantity;
|
|
1645
|
-
}
|
|
1646
|
-
function p(d) {
|
|
1647
|
-
c(d);
|
|
1667
|
+
}, Hn = (d) => {
|
|
1668
|
+
const { activeProducts: n, isCartNotEmpty: e } = d, { cart: c, reset: i, getTotalAndDiscount: l, updateQuantityOfProduct: s } = lt(), o = at();
|
|
1669
|
+
function m(a) {
|
|
1670
|
+
o(a);
|
|
1648
1671
|
}
|
|
1649
|
-
function
|
|
1650
|
-
|
|
1651
|
-
productId:
|
|
1652
|
-
productVariantId:
|
|
1653
|
-
quantity:
|
|
1672
|
+
function v(a) {
|
|
1673
|
+
s({
|
|
1674
|
+
productId: a.id,
|
|
1675
|
+
productVariantId: a.activeVariantId,
|
|
1676
|
+
quantity: a.quantity + 1
|
|
1654
1677
|
});
|
|
1655
1678
|
}
|
|
1656
|
-
function
|
|
1657
|
-
|
|
1658
|
-
productId:
|
|
1659
|
-
productVariantId:
|
|
1660
|
-
quantity:
|
|
1679
|
+
function u(a) {
|
|
1680
|
+
s({
|
|
1681
|
+
productId: a.id,
|
|
1682
|
+
productVariantId: a.activeVariantId,
|
|
1683
|
+
quantity: a.quantity - 1
|
|
1661
1684
|
});
|
|
1662
1685
|
}
|
|
1663
|
-
return
|
|
1664
|
-
(async () => {
|
|
1665
|
-
const _ = r.parts.map((q) => String(q.productId)), B = (await e([..._])).map((q) => ({
|
|
1666
|
-
...q,
|
|
1667
|
-
activeVariantId: m(q),
|
|
1668
|
-
quantity: $(q)
|
|
1669
|
-
}));
|
|
1670
|
-
s(B);
|
|
1671
|
-
})();
|
|
1672
|
-
}, [r]), /* @__PURE__ */ t.jsxs(
|
|
1686
|
+
return /* @__PURE__ */ t.jsxs(
|
|
1673
1687
|
"div",
|
|
1674
1688
|
{
|
|
1675
|
-
className:
|
|
1676
|
-
onClick: (
|
|
1689
|
+
className: x.modal,
|
|
1690
|
+
onClick: (a) => a.stopPropagation(),
|
|
1677
1691
|
children: [
|
|
1678
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1679
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1680
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1681
|
-
|
|
1692
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.top, children: [
|
|
1693
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
|
|
1694
|
+
/* @__PURE__ */ t.jsx("span", { className: x.title, children: "Cart" }),
|
|
1695
|
+
e && /* @__PURE__ */ t.jsx("div", { className: x.count, children: c.parts.length })
|
|
1682
1696
|
] }),
|
|
1683
1697
|
/* @__PURE__ */ t.jsx(
|
|
1684
1698
|
"button",
|
|
1685
1699
|
{
|
|
1686
|
-
className:
|
|
1687
|
-
[
|
|
1700
|
+
className: D(x.clear, {
|
|
1701
|
+
[x.activeClear]: e
|
|
1688
1702
|
}),
|
|
1689
|
-
disabled:
|
|
1690
|
-
onClick: () =>
|
|
1703
|
+
disabled: !e,
|
|
1704
|
+
onClick: () => i(),
|
|
1691
1705
|
children: "Clear all"
|
|
1692
1706
|
}
|
|
1693
1707
|
)
|
|
1694
1708
|
] }),
|
|
1695
|
-
|
|
1696
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1709
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: x.cart, children: [
|
|
1710
|
+
/* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((a) => /* @__PURE__ */ t.jsxs(
|
|
1697
1711
|
"div",
|
|
1698
1712
|
{
|
|
1699
|
-
className:
|
|
1713
|
+
className: x.product,
|
|
1700
1714
|
children: [
|
|
1701
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1715
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.productInfo, children: [
|
|
1702
1716
|
/* @__PURE__ */ t.jsx(
|
|
1703
1717
|
"img",
|
|
1704
1718
|
{
|
|
1705
|
-
src: `https://imagedelivery.net/${
|
|
1719
|
+
src: `https://imagedelivery.net/${a.images[0].cfId}/w=500`,
|
|
1706
1720
|
alt: "image",
|
|
1707
1721
|
width: "100%",
|
|
1708
1722
|
height: "100%",
|
|
1709
|
-
className:
|
|
1723
|
+
className: x.image
|
|
1710
1724
|
}
|
|
1711
1725
|
),
|
|
1712
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1713
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1714
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1726
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.content, children: [
|
|
1727
|
+
/* @__PURE__ */ t.jsx("div", { className: x.name, children: a.name }),
|
|
1728
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
|
|
1715
1729
|
"$",
|
|
1716
|
-
|
|
1730
|
+
a.variants.find((h) => h.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
|
|
1717
1731
|
] })
|
|
1718
1732
|
] })
|
|
1719
1733
|
] }),
|
|
1720
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1734
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.productButtons, children: [
|
|
1721
1735
|
/* @__PURE__ */ t.jsx(
|
|
1722
1736
|
"div",
|
|
1723
1737
|
{
|
|
1724
1738
|
onClick: () => {
|
|
1725
|
-
|
|
1739
|
+
a.quantity !== 1 && u(a);
|
|
1726
1740
|
},
|
|
1727
|
-
className:
|
|
1741
|
+
className: x.productButton,
|
|
1728
1742
|
children: /* @__PURE__ */ t.jsx(
|
|
1729
|
-
|
|
1743
|
+
p,
|
|
1730
1744
|
{
|
|
1731
1745
|
name: "Minus",
|
|
1732
1746
|
fill: "#757575",
|
|
@@ -1736,14 +1750,14 @@ const Un = (r) => {
|
|
|
1736
1750
|
)
|
|
1737
1751
|
}
|
|
1738
1752
|
),
|
|
1739
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1753
|
+
/* @__PURE__ */ t.jsx("div", { className: x.productCount, children: a.quantity }),
|
|
1740
1754
|
/* @__PURE__ */ t.jsx(
|
|
1741
1755
|
"div",
|
|
1742
1756
|
{
|
|
1743
|
-
onClick: () =>
|
|
1744
|
-
className:
|
|
1757
|
+
onClick: () => v(a),
|
|
1758
|
+
className: x.productButton,
|
|
1745
1759
|
children: /* @__PURE__ */ t.jsx(
|
|
1746
|
-
|
|
1760
|
+
p,
|
|
1747
1761
|
{
|
|
1748
1762
|
name: "Plus",
|
|
1749
1763
|
fill: "#757575",
|
|
@@ -1756,14 +1770,14 @@ const Un = (r) => {
|
|
|
1756
1770
|
] })
|
|
1757
1771
|
]
|
|
1758
1772
|
},
|
|
1759
|
-
|
|
1773
|
+
a.id
|
|
1760
1774
|
)) }),
|
|
1761
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1762
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1763
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1775
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.bottom, children: [
|
|
1776
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.subtotal, children: [
|
|
1777
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.block, children: [
|
|
1764
1778
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1765
1779
|
/* @__PURE__ */ t.jsx(
|
|
1766
|
-
|
|
1780
|
+
p,
|
|
1767
1781
|
{
|
|
1768
1782
|
name: "Info",
|
|
1769
1783
|
width: 20,
|
|
@@ -1772,52 +1786,149 @@ const Un = (r) => {
|
|
|
1772
1786
|
}
|
|
1773
1787
|
)
|
|
1774
1788
|
] }),
|
|
1775
|
-
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1789
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.total, children: [
|
|
1776
1790
|
"$",
|
|
1777
|
-
|
|
1791
|
+
l().total
|
|
1778
1792
|
] })
|
|
1779
1793
|
] }),
|
|
1780
|
-
/* @__PURE__ */ t.jsx(X, { onClick: () =>
|
|
1794
|
+
/* @__PURE__ */ t.jsx(X, { onClick: () => m("/checkout"), children: "Checkout" })
|
|
1781
1795
|
] })
|
|
1782
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1796
|
+
] }) : /* @__PURE__ */ t.jsx(Vn, {})
|
|
1783
1797
|
]
|
|
1784
1798
|
}
|
|
1785
1799
|
);
|
|
1786
|
-
},
|
|
1787
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1800
|
+
}, Vn = () => /* @__PURE__ */ t.jsxs("div", { className: x.empty, children: [
|
|
1801
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(p, { name: "Handbag" }) }),
|
|
1788
1802
|
/* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
|
|
1789
|
-
/* @__PURE__ */ t.
|
|
1790
|
-
|
|
1803
|
+
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1804
|
+
"Check out the store's products and add them",
|
|
1805
|
+
" ",
|
|
1806
|
+
/* @__PURE__ */ t.jsx(
|
|
1807
|
+
"a",
|
|
1808
|
+
{
|
|
1809
|
+
href: "/products",
|
|
1810
|
+
className: x.link,
|
|
1811
|
+
children: "here"
|
|
1812
|
+
}
|
|
1813
|
+
)
|
|
1814
|
+
] })
|
|
1815
|
+
] }), Fn = "_share_9g414_1", Un = "_modal_9g414_8", zn = "_header_9g414_14", Gn = "_socials_9g414_24", Wn = "_social_9g414_24", Xn = "_copy_9g414_34", Yn = "_title_9g414_41", Qn = "_copyWrapper_9g414_47", Jn = "_copyText_9g414_56", L = {
|
|
1816
|
+
share: Fn,
|
|
1817
|
+
modal: Un,
|
|
1818
|
+
header: zn,
|
|
1819
|
+
socials: Gn,
|
|
1820
|
+
social: Wn,
|
|
1821
|
+
copy: Xn,
|
|
1822
|
+
title: Yn,
|
|
1823
|
+
copyWrapper: Qn,
|
|
1824
|
+
copyText: Jn
|
|
1825
|
+
}, ai = () => {
|
|
1826
|
+
const { isOpenModal: d, setIsOpenModal: n } = gt();
|
|
1827
|
+
function e() {
|
|
1828
|
+
n(!0);
|
|
1829
|
+
}
|
|
1830
|
+
return console.log(d), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1831
|
+
/* @__PURE__ */ t.jsx(
|
|
1832
|
+
"div",
|
|
1833
|
+
{
|
|
1834
|
+
className: L.share,
|
|
1835
|
+
onClick: (c) => {
|
|
1836
|
+
c.stopPropagation(), e();
|
|
1837
|
+
},
|
|
1838
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1839
|
+
p,
|
|
1840
|
+
{
|
|
1841
|
+
name: "Share",
|
|
1842
|
+
fill: "#757575"
|
|
1843
|
+
}
|
|
1844
|
+
)
|
|
1845
|
+
}
|
|
1846
|
+
),
|
|
1847
|
+
d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(Kn, {}) })
|
|
1848
|
+
] });
|
|
1849
|
+
}, rt = {
|
|
1850
|
+
facebook: "FacebookLogo",
|
|
1851
|
+
"x.com": "TwitterLogo",
|
|
1852
|
+
telegram: "TelegramLogo",
|
|
1853
|
+
instagram: "InstagramLogo",
|
|
1854
|
+
discord: "MessengerLogo",
|
|
1855
|
+
tiktok: "TiktokLogo"
|
|
1856
|
+
}, Kn = () => {
|
|
1857
|
+
const { setIsOpenModal: d } = gt(), n = window.location.href;
|
|
1858
|
+
function e() {
|
|
1859
|
+
navigator.clipboard.writeText(n);
|
|
1860
|
+
}
|
|
1861
|
+
return /* @__PURE__ */ t.jsxs(
|
|
1862
|
+
"div",
|
|
1863
|
+
{
|
|
1864
|
+
className: L.modal,
|
|
1865
|
+
onClick: (c) => c.stopPropagation(),
|
|
1866
|
+
children: [
|
|
1867
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.header, children: [
|
|
1868
|
+
/* @__PURE__ */ t.jsx("div", { className: L.title, children: "Share this Post" }),
|
|
1869
|
+
/* @__PURE__ */ t.jsx(
|
|
1870
|
+
p,
|
|
1871
|
+
{
|
|
1872
|
+
name: "X",
|
|
1873
|
+
fill: "#757575",
|
|
1874
|
+
onClick: () => d(!1)
|
|
1875
|
+
}
|
|
1876
|
+
)
|
|
1877
|
+
] }),
|
|
1878
|
+
/* @__PURE__ */ t.jsx("div", { className: L.socials, children: Object.keys(rt).map((c) => /* @__PURE__ */ t.jsx("div", { className: L.social, children: /* @__PURE__ */ t.jsx(p, { name: rt[c] }) })) }),
|
|
1879
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.copyWrapper, children: [
|
|
1880
|
+
/* @__PURE__ */ t.jsx(
|
|
1881
|
+
"div",
|
|
1882
|
+
{
|
|
1883
|
+
className: D(L.copy, L.copyText),
|
|
1884
|
+
onClick: e,
|
|
1885
|
+
children: n
|
|
1886
|
+
}
|
|
1887
|
+
),
|
|
1888
|
+
/* @__PURE__ */ t.jsx(
|
|
1889
|
+
"div",
|
|
1890
|
+
{
|
|
1891
|
+
onClick: e,
|
|
1892
|
+
className: L.copy,
|
|
1893
|
+
children: /* @__PURE__ */ t.jsx(p, { name: "Copy" })
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
] })
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
);
|
|
1900
|
+
};
|
|
1791
1901
|
export {
|
|
1792
|
-
|
|
1902
|
+
ei as Accordion,
|
|
1793
1903
|
X as Button,
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1904
|
+
as as ButtonTypeSettings,
|
|
1905
|
+
ni as ButtonsSettings,
|
|
1906
|
+
di as Checkbox,
|
|
1907
|
+
ot as ChooseImage,
|
|
1908
|
+
ui as ChooseImageModal,
|
|
1909
|
+
_i as ColorPicker,
|
|
1910
|
+
Vn as EmptyCart,
|
|
1911
|
+
mi as ErrorableBlock,
|
|
1912
|
+
oi as HeaderButtons,
|
|
1913
|
+
p as Icon,
|
|
1804
1914
|
G as Input,
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1915
|
+
be as ItemsSettings,
|
|
1916
|
+
si as LayoutSettings,
|
|
1917
|
+
ii as ListingSelector,
|
|
1918
|
+
pi as Loader,
|
|
1919
|
+
ht as Modal,
|
|
1920
|
+
hi as Picker,
|
|
1921
|
+
ci as ProductOptions,
|
|
1922
|
+
gi as Radio,
|
|
1923
|
+
ks as RangeSelector,
|
|
1924
|
+
W as Select,
|
|
1925
|
+
ai as ShareLink,
|
|
1926
|
+
Rn as ShoppingButton,
|
|
1927
|
+
Hn as ShoppingModalCart,
|
|
1928
|
+
xi as Submodal,
|
|
1818
1929
|
V as Switch,
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1930
|
+
Wt as TextSettings,
|
|
1931
|
+
dt as Textarea,
|
|
1932
|
+
fi as Tip,
|
|
1933
|
+
xt as TypesText
|
|
1823
1934
|
};
|