@billgangcom/theme-lib 1.64.0 → 1.65.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/theme-settings.d.ts +6 -5
- package/dist/builder/store/useThemeSettingsStore.d.ts +4 -4
- package/dist/builder.cjs.js +4 -4
- package/dist/builder.es.js +553 -533
- package/dist/{index-Dg3k5gYy.js → index-BPn2qi_o.js} +494 -464
- package/dist/{index-CWZkhE-z.cjs → index-Dc4CgFbD.cjs} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui/ItemsSettings/index.d.ts +1 -1
- package/dist/ui/TextSettings/index.d.ts +2 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +756 -692
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { Q as
|
|
1
|
+
import { j as t, I as j, c as V, a as yt, u as ut, d as mt, P as ht, S as ot, R as St, D as pt, e as _t, v as gt, B as ct, O as It, f as rt, g as ft, C as xt, h as H, i as Pt, k as at, l as Tt, m as lt, n as Mt, o as jt, p as G, L as At, r as vt, t as dt, s as Nt, w as F, x as Ot, M as kt, y as $t, z as Et, A as wt, E as qt, F as Dt, G as Rt } from "./index-BPn2qi_o.js";
|
|
2
|
+
import { Q as Zi, J as ta, N as ea, H as na, T as sa, K as ia } from "./index-BPn2qi_o.js";
|
|
3
3
|
import x from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmyb_15", Vt = "_subtitle_1vmyb_22", Ut = "_alignmentContent_1vmyb_29", Ht = "_alignments_1vmyb_37", Yt = "_alignment_1vmyb_8", Wt = "_circle_1vmyb_60", Gt = "_paddings_1vmyb_67", Qt = "_padding_1vmyb_67", Xt = "_active_1vmyb_91", Jt = "_input_1vmyb_98",
|
|
5
|
+
const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmyb_15", Vt = "_subtitle_1vmyb_22", Ut = "_alignmentContent_1vmyb_29", Ht = "_alignments_1vmyb_37", Yt = "_alignment_1vmyb_8", Wt = "_circle_1vmyb_60", Gt = "_paddings_1vmyb_67", Qt = "_padding_1vmyb_67", Xt = "_active_1vmyb_91", Jt = "_input_1vmyb_98", J = {
|
|
6
6
|
wrapper: Lt,
|
|
7
7
|
alignmentBlock: zt,
|
|
8
8
|
title: Ft,
|
|
@@ -25,10 +25,10 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
], Zt = ["left", "top", "right", "bottom"],
|
|
28
|
+
], Zt = ["left", "top", "right", "bottom"], Oi = (o) => {
|
|
29
29
|
const { alignment: s, padding: e, setPadding: n, setAlignment: i } = o;
|
|
30
|
-
function c(
|
|
31
|
-
switch (
|
|
30
|
+
function c(l) {
|
|
31
|
+
switch (l) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function u(
|
|
49
|
-
switch (
|
|
48
|
+
function u(l) {
|
|
49
|
+
switch (l) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,38 +57,38 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [
|
|
61
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
62
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
63
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
64
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
65
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
60
|
+
const [r, m] = x.useState(null), [p, B] = x.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout (for Desktop version)" }),
|
|
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: Kt.map((l) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(l);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: J.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
m(
|
|
74
|
+
m(l);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
m(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
l !== s && r !== l && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
l !== s && r === l && /* @__PURE__ */ t.jsx(
|
|
82
|
+
j,
|
|
83
83
|
{
|
|
84
|
-
name: c(
|
|
84
|
+
name: c(r),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
l === s && /* @__PURE__ */ t.jsx(
|
|
91
|
+
j,
|
|
92
92
|
{
|
|
93
93
|
name: c(s),
|
|
94
94
|
fill: "#FF3F19",
|
|
@@ -98,37 +98,37 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
l
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Zt.map((l) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className: V(
|
|
107
|
-
[
|
|
106
|
+
className: V(J.padding, {
|
|
107
|
+
[J.active]: p === l
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
B(
|
|
110
|
+
B(l);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
113
|
B(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
j,
|
|
118
118
|
{
|
|
119
|
-
name: u(
|
|
119
|
+
name: u(l),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
yt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
128
|
+
value: String(e[l]),
|
|
129
129
|
onChange: (a) => n({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[l]: Math.min(Number(a), 999)
|
|
132
132
|
}),
|
|
133
133
|
max: 999,
|
|
134
134
|
paddingless: !0,
|
|
@@ -137,12 +137,12 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
137
137
|
)
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
l
|
|
141
141
|
)) })
|
|
142
142
|
] })
|
|
143
143
|
] })
|
|
144
144
|
] });
|
|
145
|
-
}, te = "_title_82zux_1", ee = "_subtitle_82zux_5", ne = "_header_82zux_12", se = "_text_82zux_13", ie = "_productsBlock_82zux_14", ae = "_top_82zux_26", oe = "_itemsBlock_82zux_35", ce = "_typeTexts_82zux_41",
|
|
145
|
+
}, te = "_title_82zux_1", ee = "_subtitle_82zux_5", ne = "_header_82zux_12", se = "_text_82zux_13", ie = "_productsBlock_82zux_14", ae = "_top_82zux_26", oe = "_itemsBlock_82zux_35", ce = "_typeTexts_82zux_41", re = "_block_82zux_48", le = "_active_82zux_61", de = "_products_82zux_14", ue = "_product_82zux_14", me = "_button_82zux_80", he = "_disabled_82zux_91", pe = "_image_82zux_95", _e = "_info_82zux_102", ge = "_name_82zux_114", fe = "_buttons_82zux_118", xe = "_modal_82zux_125", ve = "_link_82zux_145", je = "_modalOptions_82zux_151", be = "_addButton_82zux_157", ye = "_deleteButton_82zux_179", Q = {
|
|
146
146
|
title: te,
|
|
147
147
|
subtitle: ee,
|
|
148
148
|
header: ne,
|
|
@@ -151,8 +151,8 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
151
151
|
top: ae,
|
|
152
152
|
itemsBlock: oe,
|
|
153
153
|
typeTexts: ce,
|
|
154
|
-
block:
|
|
155
|
-
active:
|
|
154
|
+
block: re,
|
|
155
|
+
active: le,
|
|
156
156
|
products: de,
|
|
157
157
|
product: ue,
|
|
158
158
|
button: me,
|
|
@@ -166,7 +166,34 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
166
166
|
modalOptions: je,
|
|
167
167
|
addButton: be,
|
|
168
168
|
deleteButton: ye
|
|
169
|
-
}
|
|
169
|
+
};
|
|
170
|
+
function Ie({ id: o, children: s }) {
|
|
171
|
+
const {
|
|
172
|
+
attributes: e,
|
|
173
|
+
listeners: n,
|
|
174
|
+
setNodeRef: i,
|
|
175
|
+
transform: c,
|
|
176
|
+
transition: u,
|
|
177
|
+
isDragging: r
|
|
178
|
+
} = ft({
|
|
179
|
+
id: o
|
|
180
|
+
}), m = {
|
|
181
|
+
transform: xt.Transform.toString(c),
|
|
182
|
+
transition: u
|
|
183
|
+
};
|
|
184
|
+
return /* @__PURE__ */ t.jsx(
|
|
185
|
+
"div",
|
|
186
|
+
{
|
|
187
|
+
ref: i,
|
|
188
|
+
style: m,
|
|
189
|
+
className: `${Q.product} ${r ? Q.dragging : ""}`,
|
|
190
|
+
...e,
|
|
191
|
+
...n,
|
|
192
|
+
children: s
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
const Ei = (o) => {
|
|
170
197
|
const {
|
|
171
198
|
isActiveItems: s,
|
|
172
199
|
setIsActiveItems: e,
|
|
@@ -174,29 +201,45 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
174
201
|
setItems: i,
|
|
175
202
|
other: c,
|
|
176
203
|
title: u,
|
|
177
|
-
subtitle:
|
|
204
|
+
subtitle: r,
|
|
178
205
|
draggable: m = !1,
|
|
179
206
|
withImage: p = !1,
|
|
180
207
|
addable: B = !0,
|
|
181
|
-
itemsOptions:
|
|
208
|
+
itemsOptions: l,
|
|
182
209
|
hasRangeSelector: a = !1,
|
|
183
|
-
rangeSelectorOptions:
|
|
210
|
+
rangeSelectorOptions: b,
|
|
184
211
|
limit: d,
|
|
185
212
|
autoScrollInterval: S,
|
|
186
213
|
deletable: g
|
|
187
|
-
} = o
|
|
188
|
-
|
|
214
|
+
} = o, k = ut(
|
|
215
|
+
mt(ht, {
|
|
216
|
+
activationConstraint: {
|
|
217
|
+
distance: 5
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
), q = (v) => {
|
|
221
|
+
console.log("Trigger?");
|
|
222
|
+
const { active: M, over: O } = v;
|
|
223
|
+
if (O && M.id !== O.id) {
|
|
224
|
+
const I = n.findIndex(($) => $ === M.id), h = n.findIndex(($) => $ === O.id);
|
|
225
|
+
if (I !== -1 && h !== -1) {
|
|
226
|
+
const $ = [...n], [P] = $.splice(I, 1);
|
|
227
|
+
$.splice(h, 0, P), i($);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
function E(v) {
|
|
189
232
|
if (p)
|
|
190
|
-
return
|
|
233
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
191
234
|
"img",
|
|
192
235
|
{
|
|
193
|
-
src: `https://imagedelivery.net/${
|
|
236
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
194
237
|
alt: "image",
|
|
195
238
|
width: 16,
|
|
196
239
|
height: 16
|
|
197
240
|
}
|
|
198
241
|
) : /* @__PURE__ */ t.jsx(
|
|
199
|
-
|
|
242
|
+
j,
|
|
200
243
|
{
|
|
201
244
|
name: "Image",
|
|
202
245
|
width: 16,
|
|
@@ -205,12 +248,12 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
205
248
|
}
|
|
206
249
|
);
|
|
207
250
|
}
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
251
|
+
const f = (v, M = !1) => {
|
|
252
|
+
const O = l.find((h) => h.id === v);
|
|
253
|
+
if (!O) return;
|
|
254
|
+
const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
212
255
|
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
213
|
-
|
|
256
|
+
j,
|
|
214
257
|
{
|
|
215
258
|
name: "DotsSixVertical",
|
|
216
259
|
hoverable: !0,
|
|
@@ -219,55 +262,76 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
219
262
|
}
|
|
220
263
|
) }),
|
|
221
264
|
/* @__PURE__ */ t.jsx(
|
|
222
|
-
|
|
265
|
+
rt,
|
|
223
266
|
{
|
|
224
|
-
onChange: (
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
const
|
|
228
|
-
i([...
|
|
267
|
+
onChange: (h) => {
|
|
268
|
+
const $ = [...n], P = l.find((A) => A.name === h);
|
|
269
|
+
if (!P) return;
|
|
270
|
+
const y = P.id, N = $.map((A) => A === v ? y : A);
|
|
271
|
+
i([...N]);
|
|
229
272
|
},
|
|
230
|
-
value:
|
|
231
|
-
options:
|
|
232
|
-
leftAddon:
|
|
273
|
+
value: O.name,
|
|
274
|
+
options: l.filter((h) => !n.find(($) => $ === h.id)).map((h) => h.name),
|
|
275
|
+
leftAddon: E(O.images)
|
|
233
276
|
}
|
|
234
277
|
),
|
|
235
|
-
|
|
236
|
-
|
|
278
|
+
M && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
279
|
+
j,
|
|
237
280
|
{
|
|
238
281
|
name: "Trash",
|
|
239
282
|
hoverable: !0,
|
|
240
283
|
width: 20,
|
|
241
284
|
height: 20,
|
|
242
285
|
fill: "#C12A2A",
|
|
243
|
-
onClick: () => i(n.filter((
|
|
286
|
+
onClick: () => i(n.filter((h) => h !== v))
|
|
244
287
|
}
|
|
245
288
|
) }) })
|
|
246
289
|
] });
|
|
247
|
-
return /* @__PURE__ */ t.jsx(
|
|
290
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
291
|
+
Ie,
|
|
292
|
+
{
|
|
293
|
+
id: v,
|
|
294
|
+
children: I
|
|
295
|
+
},
|
|
296
|
+
v
|
|
297
|
+
) : /* @__PURE__ */ t.jsx(
|
|
248
298
|
"div",
|
|
249
299
|
{
|
|
250
|
-
className:
|
|
251
|
-
children:
|
|
300
|
+
className: Q.product,
|
|
301
|
+
children: I
|
|
252
302
|
},
|
|
253
|
-
|
|
303
|
+
v
|
|
254
304
|
);
|
|
255
305
|
};
|
|
256
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
257
|
-
(u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
258
|
-
u && /* @__PURE__ */ t.jsx("h3", { className:
|
|
306
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
307
|
+
(u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
308
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
|
|
259
309
|
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
260
310
|
ot,
|
|
261
311
|
{
|
|
262
312
|
current: s,
|
|
263
|
-
onChange: (
|
|
313
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
264
314
|
}
|
|
265
315
|
)
|
|
266
316
|
] }),
|
|
267
|
-
a &&
|
|
268
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
269
|
-
|
|
270
|
-
|
|
317
|
+
a && b && /* @__PURE__ */ t.jsx(St, { ...b }),
|
|
318
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
319
|
+
r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
|
|
320
|
+
m ? /* @__PURE__ */ t.jsx(
|
|
321
|
+
pt,
|
|
322
|
+
{
|
|
323
|
+
sensors: k,
|
|
324
|
+
onDragEnd: q,
|
|
325
|
+
children: /* @__PURE__ */ t.jsx(
|
|
326
|
+
_t,
|
|
327
|
+
{
|
|
328
|
+
items: n,
|
|
329
|
+
strategy: gt,
|
|
330
|
+
children: n.map((v) => f(v, g))
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
}
|
|
334
|
+
) : n.map((v) => f(v, g)),
|
|
271
335
|
B && /* @__PURE__ */ t.jsx(
|
|
272
336
|
"div",
|
|
273
337
|
{
|
|
@@ -281,30 +345,30 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
281
345
|
ct,
|
|
282
346
|
{
|
|
283
347
|
withoutHover: !0,
|
|
284
|
-
className: V(
|
|
285
|
-
[
|
|
348
|
+
className: V(Q.button, {
|
|
349
|
+
[Q.disabled]: !!(d && d <= n.length || n.length === l.length)
|
|
286
350
|
}),
|
|
287
351
|
size: "s",
|
|
288
|
-
disabled: !!(d && d <= n.length || n.length ===
|
|
352
|
+
disabled: !!(d && d <= n.length || n.length === l.length),
|
|
289
353
|
onClick: () => {
|
|
290
|
-
const
|
|
291
|
-
let
|
|
292
|
-
if (
|
|
293
|
-
for (let
|
|
294
|
-
if (!n.find((
|
|
295
|
-
|
|
354
|
+
const v = [...n];
|
|
355
|
+
let M = null;
|
|
356
|
+
if (l) {
|
|
357
|
+
for (let O = 0; O < l.length; O++)
|
|
358
|
+
if (!n.find((I) => I === l[O].id)) {
|
|
359
|
+
M = l[O];
|
|
296
360
|
break;
|
|
297
361
|
}
|
|
298
362
|
}
|
|
299
|
-
|
|
363
|
+
v.push((M == null ? void 0 : M.id) || l[0].id), i(v);
|
|
300
364
|
},
|
|
301
365
|
style: {
|
|
302
366
|
width: "fit-content"
|
|
303
367
|
},
|
|
304
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
368
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
305
369
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
306
370
|
/* @__PURE__ */ t.jsx(
|
|
307
|
-
|
|
371
|
+
j,
|
|
308
372
|
{
|
|
309
373
|
name: "Plus",
|
|
310
374
|
width: 16,
|
|
@@ -317,14 +381,14 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
317
381
|
}
|
|
318
382
|
)
|
|
319
383
|
] }),
|
|
320
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
384
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c }),
|
|
321
385
|
S !== void 0 && /* @__PURE__ */ t.jsx(
|
|
322
|
-
|
|
386
|
+
yt,
|
|
323
387
|
{
|
|
324
388
|
label: "Auto scroll interval",
|
|
325
389
|
type: "number",
|
|
326
390
|
value: String(S.scrollInterval),
|
|
327
|
-
onChange: (
|
|
391
|
+
onChange: (v) => S.setScrollInterval(Number(v)),
|
|
328
392
|
min: 0.1,
|
|
329
393
|
max: 100,
|
|
330
394
|
style: {
|
|
@@ -334,44 +398,44 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
|
|
|
334
398
|
}
|
|
335
399
|
)
|
|
336
400
|
] });
|
|
337
|
-
}, Ne = "_title_roi3a_1",
|
|
401
|
+
}, Ne = "_title_roi3a_1", ke = "_subtitle_roi3a_5", Ce = "_header_roi3a_12", Se = "_text_roi3a_13", $e = "_productsBlock_roi3a_14", we = "_top_roi3a_26", qe = "_itemsBlock_roi3a_35", Be = "_typeTexts_roi3a_41", Pe = "_block_roi3a_48", Te = "_active_roi3a_61", Me = "_products_roi3a_14", Ae = "_product_roi3a_14", Oe = "_button_roi3a_80", Ee = "_disabled_roi3a_91", De = "_image_roi3a_95", Re = "_info_roi3a_102", Le = "_name_roi3a_114", ze = "_buttons_roi3a_118", Fe = "_modal_roi3a_125", Ve = "_link_roi3a_145", Ue = "_modalOptions_roi3a_151", He = "_addButton_roi3a_164", Ye = "_deleteButton_roi3a_179", We = "_closeIcon_roi3a_191", Y = {
|
|
338
402
|
title: Ne,
|
|
339
|
-
subtitle:
|
|
340
|
-
header:
|
|
341
|
-
text:
|
|
342
|
-
productsBlock:
|
|
403
|
+
subtitle: ke,
|
|
404
|
+
header: Ce,
|
|
405
|
+
text: Se,
|
|
406
|
+
productsBlock: $e,
|
|
343
407
|
top: we,
|
|
344
|
-
itemsBlock:
|
|
345
|
-
typeTexts:
|
|
346
|
-
block:
|
|
347
|
-
active:
|
|
348
|
-
products:
|
|
349
|
-
product:
|
|
350
|
-
button:
|
|
351
|
-
disabled:
|
|
352
|
-
image:
|
|
353
|
-
info:
|
|
354
|
-
name:
|
|
355
|
-
buttons:
|
|
356
|
-
modal:
|
|
357
|
-
link:
|
|
358
|
-
modalOptions:
|
|
359
|
-
addButton:
|
|
360
|
-
deleteButton:
|
|
361
|
-
closeIcon:
|
|
408
|
+
itemsBlock: qe,
|
|
409
|
+
typeTexts: Be,
|
|
410
|
+
block: Pe,
|
|
411
|
+
active: Te,
|
|
412
|
+
products: Me,
|
|
413
|
+
product: Ae,
|
|
414
|
+
button: Oe,
|
|
415
|
+
disabled: Ee,
|
|
416
|
+
image: De,
|
|
417
|
+
info: Re,
|
|
418
|
+
name: Le,
|
|
419
|
+
buttons: ze,
|
|
420
|
+
modal: Fe,
|
|
421
|
+
link: Ve,
|
|
422
|
+
modalOptions: Ue,
|
|
423
|
+
addButton: He,
|
|
424
|
+
deleteButton: Ye,
|
|
425
|
+
closeIcon: We
|
|
362
426
|
};
|
|
363
|
-
function
|
|
427
|
+
function Ge({ product: o, children: s }) {
|
|
364
428
|
const {
|
|
365
429
|
attributes: e,
|
|
366
430
|
listeners: n,
|
|
367
431
|
setNodeRef: i,
|
|
368
432
|
transform: c,
|
|
369
433
|
transition: u,
|
|
370
|
-
isDragging:
|
|
371
|
-
} =
|
|
434
|
+
isDragging: r
|
|
435
|
+
} = ft({
|
|
372
436
|
id: o.id
|
|
373
437
|
}), m = {
|
|
374
|
-
transform:
|
|
438
|
+
transform: xt.Transform.toString(c),
|
|
375
439
|
transition: u
|
|
376
440
|
};
|
|
377
441
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -379,14 +443,14 @@ function We({ product: o, children: s }) {
|
|
|
379
443
|
{
|
|
380
444
|
ref: i,
|
|
381
445
|
style: m,
|
|
382
|
-
className: `${Y.product} ${
|
|
446
|
+
className: `${Y.product} ${r ? Y.dragging : ""}`,
|
|
383
447
|
...e,
|
|
384
448
|
...n,
|
|
385
449
|
children: s
|
|
386
450
|
}
|
|
387
451
|
);
|
|
388
452
|
}
|
|
389
|
-
const
|
|
453
|
+
const Di = (o) => {
|
|
390
454
|
const {
|
|
391
455
|
isActiveItems: s,
|
|
392
456
|
setIsActiveItems: e,
|
|
@@ -394,16 +458,16 @@ const Ei = (o) => {
|
|
|
394
458
|
setItems: i,
|
|
395
459
|
title: c,
|
|
396
460
|
subtitle: u,
|
|
397
|
-
editable:
|
|
461
|
+
editable: r = !0,
|
|
398
462
|
draggable: m = !1,
|
|
399
463
|
deletable: p = !0,
|
|
400
464
|
addable: B = !0,
|
|
401
|
-
itemsType:
|
|
465
|
+
itemsType: l,
|
|
402
466
|
itemsOptions: a,
|
|
403
|
-
addableOptions:
|
|
467
|
+
addableOptions: b = {},
|
|
404
468
|
limit: d
|
|
405
|
-
} = o, [S, g] = x.useState(null), [
|
|
406
|
-
|
|
469
|
+
} = o, [S, g] = x.useState(null), [k, q] = x.useState(null), E = x.useRef(null), f = ut(
|
|
470
|
+
mt(ht, {
|
|
407
471
|
activationConstraint: {
|
|
408
472
|
distance: 5
|
|
409
473
|
}
|
|
@@ -411,32 +475,32 @@ const Ei = (o) => {
|
|
|
411
475
|
);
|
|
412
476
|
x.useEffect(() => {
|
|
413
477
|
if (S) {
|
|
414
|
-
const I = [...n].map((
|
|
478
|
+
const I = [...n].map((h) => h.id === S.id ? S : h);
|
|
415
479
|
i(I);
|
|
416
480
|
}
|
|
417
481
|
}, [S]), x.useEffect(() => {
|
|
418
|
-
|
|
419
|
-
}, [
|
|
420
|
-
const
|
|
482
|
+
E.current && k && (E.current.getBoundingClientRect().height, k.top);
|
|
483
|
+
}, [E.current, k]);
|
|
484
|
+
const v = (I, h) => {
|
|
421
485
|
I.stopPropagation();
|
|
422
|
-
const
|
|
486
|
+
const $ = I.target.getBoundingClientRect();
|
|
423
487
|
q({
|
|
424
|
-
top:
|
|
425
|
-
left:
|
|
426
|
-
}), g(
|
|
427
|
-
},
|
|
428
|
-
const { active:
|
|
429
|
-
if (
|
|
430
|
-
const P = n.findIndex((N) => N.id ===
|
|
431
|
-
if (P !== -1 &&
|
|
488
|
+
top: $.top + window.scrollY,
|
|
489
|
+
left: $.left - 30
|
|
490
|
+
}), g(h);
|
|
491
|
+
}, M = (I) => {
|
|
492
|
+
const { active: h, over: $ } = I;
|
|
493
|
+
if ($ && h.id !== $.id) {
|
|
494
|
+
const P = n.findIndex((N) => N.id === h.id), y = n.findIndex((N) => N.id === $.id);
|
|
495
|
+
if (P !== -1 && y !== -1) {
|
|
432
496
|
const N = [...n], [A] = N.splice(P, 1);
|
|
433
|
-
N.splice(
|
|
497
|
+
N.splice(y, 0, A), i(N);
|
|
434
498
|
}
|
|
435
499
|
}
|
|
436
|
-
},
|
|
437
|
-
const
|
|
500
|
+
}, O = (I, h) => {
|
|
501
|
+
const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
438
502
|
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
439
|
-
|
|
503
|
+
j,
|
|
440
504
|
{
|
|
441
505
|
name: "DotsSixVertical",
|
|
442
506
|
hoverable: !0,
|
|
@@ -444,13 +508,13 @@ const Ei = (o) => {
|
|
|
444
508
|
height: 20
|
|
445
509
|
}
|
|
446
510
|
) }),
|
|
447
|
-
|
|
448
|
-
|
|
511
|
+
l === "select" && a && /* @__PURE__ */ t.jsx(
|
|
512
|
+
rt,
|
|
449
513
|
{
|
|
450
514
|
onChange: (P) => {
|
|
451
|
-
const
|
|
515
|
+
const y = [...n], N = a.find((U) => U.name === P);
|
|
452
516
|
if (!N) return;
|
|
453
|
-
const A =
|
|
517
|
+
const A = y.map((U) => U.id === I.id ? {
|
|
454
518
|
...N,
|
|
455
519
|
name: {
|
|
456
520
|
"en-US": P
|
|
@@ -464,22 +528,22 @@ const Ei = (o) => {
|
|
|
464
528
|
}), i([...A]);
|
|
465
529
|
},
|
|
466
530
|
value: I.name,
|
|
467
|
-
options: a.filter((P) => !n.find((
|
|
531
|
+
options: a.filter((P) => !n.find((y) => y.name === P.name)).map((P) => P.name)
|
|
468
532
|
}
|
|
469
533
|
),
|
|
470
534
|
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
471
|
-
|
|
472
|
-
|
|
535
|
+
r && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
536
|
+
j,
|
|
473
537
|
{
|
|
474
538
|
name: "Sliders",
|
|
475
539
|
hoverable: !0,
|
|
476
540
|
width: 20,
|
|
477
541
|
height: 20,
|
|
478
|
-
onClick: (P) =>
|
|
542
|
+
onClick: (P) => v(P, I)
|
|
479
543
|
}
|
|
480
544
|
) }),
|
|
481
545
|
p && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
482
|
-
|
|
546
|
+
j,
|
|
483
547
|
{
|
|
484
548
|
name: "Trash",
|
|
485
549
|
hoverable: !0,
|
|
@@ -492,18 +556,18 @@ const Ei = (o) => {
|
|
|
492
556
|
] })
|
|
493
557
|
] });
|
|
494
558
|
return m ? /* @__PURE__ */ t.jsx(
|
|
495
|
-
|
|
559
|
+
Ge,
|
|
496
560
|
{
|
|
497
561
|
product: I,
|
|
498
|
-
index:
|
|
499
|
-
children:
|
|
562
|
+
index: h,
|
|
563
|
+
children: $
|
|
500
564
|
},
|
|
501
565
|
I.id
|
|
502
566
|
) : /* @__PURE__ */ t.jsx(
|
|
503
567
|
"div",
|
|
504
568
|
{
|
|
505
569
|
className: Y.product,
|
|
506
|
-
children:
|
|
570
|
+
children: $
|
|
507
571
|
},
|
|
508
572
|
I.id
|
|
509
573
|
);
|
|
@@ -522,20 +586,20 @@ const Ei = (o) => {
|
|
|
522
586
|
/* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
523
587
|
u && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: u }),
|
|
524
588
|
m ? /* @__PURE__ */ t.jsx(
|
|
525
|
-
|
|
589
|
+
pt,
|
|
526
590
|
{
|
|
527
|
-
sensors:
|
|
528
|
-
onDragEnd:
|
|
591
|
+
sensors: f,
|
|
592
|
+
onDragEnd: M,
|
|
529
593
|
children: /* @__PURE__ */ t.jsx(
|
|
530
|
-
|
|
594
|
+
_t,
|
|
531
595
|
{
|
|
532
596
|
items: n.map((I) => I.id),
|
|
533
|
-
strategy:
|
|
534
|
-
children: n.map((I,
|
|
597
|
+
strategy: gt,
|
|
598
|
+
children: n.map((I, h) => O(I, h))
|
|
535
599
|
}
|
|
536
600
|
)
|
|
537
601
|
}
|
|
538
|
-
) : n.map((I,
|
|
602
|
+
) : n.map((I, h) => O(I, h)),
|
|
539
603
|
B && /* @__PURE__ */ t.jsx(
|
|
540
604
|
"div",
|
|
541
605
|
{
|
|
@@ -555,18 +619,18 @@ const Ei = (o) => {
|
|
|
555
619
|
disabled: !!(d && d <= n.length || n.length === (a == null ? void 0 : a.length)),
|
|
556
620
|
onClick: () => {
|
|
557
621
|
const I = [...n];
|
|
558
|
-
let
|
|
622
|
+
let h = null;
|
|
559
623
|
if (a) {
|
|
560
|
-
for (let
|
|
561
|
-
if (!n.find((P) => P.id === a[
|
|
562
|
-
|
|
624
|
+
for (let $ = 0; $ < a.length; $++)
|
|
625
|
+
if (!n.find((P) => P.id === a[$].id)) {
|
|
626
|
+
h = a[$];
|
|
563
627
|
break;
|
|
564
628
|
}
|
|
565
629
|
}
|
|
566
|
-
|
|
567
|
-
name:
|
|
568
|
-
id: (
|
|
569
|
-
...
|
|
630
|
+
l === "select" && a && I.push({
|
|
631
|
+
name: h ? h.name : a[0].name,
|
|
632
|
+
id: (h == null ? void 0 : h.id) || a[0].id,
|
|
633
|
+
...b
|
|
570
634
|
}), i(I);
|
|
571
635
|
},
|
|
572
636
|
style: {
|
|
@@ -575,7 +639,7 @@ const Ei = (o) => {
|
|
|
575
639
|
children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
|
|
576
640
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
577
641
|
/* @__PURE__ */ t.jsx(
|
|
578
|
-
|
|
642
|
+
j,
|
|
579
643
|
{
|
|
580
644
|
name: "Plus",
|
|
581
645
|
width: 16,
|
|
@@ -590,12 +654,12 @@ const Ei = (o) => {
|
|
|
590
654
|
] })
|
|
591
655
|
] });
|
|
592
656
|
};
|
|
593
|
-
function
|
|
594
|
-
const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition:
|
|
657
|
+
function Qe(o) {
|
|
658
|
+
const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: r, isDragging: m } = ft({
|
|
595
659
|
id: s.id
|
|
596
660
|
}), p = {
|
|
597
|
-
transform:
|
|
598
|
-
transition:
|
|
661
|
+
transform: xt.Transform.toString(u),
|
|
662
|
+
transition: r
|
|
599
663
|
};
|
|
600
664
|
return /* @__PURE__ */ t.jsx(
|
|
601
665
|
"div",
|
|
@@ -609,7 +673,7 @@ function Ge(o) {
|
|
|
609
673
|
}
|
|
610
674
|
);
|
|
611
675
|
}
|
|
612
|
-
const
|
|
676
|
+
const Ri = (o) => {
|
|
613
677
|
const {
|
|
614
678
|
isActiveItems: s,
|
|
615
679
|
setIsActiveItems: e,
|
|
@@ -617,25 +681,25 @@ const Di = (o) => {
|
|
|
617
681
|
setItems: i,
|
|
618
682
|
other: c,
|
|
619
683
|
title: u,
|
|
620
|
-
subtitle:
|
|
684
|
+
subtitle: r,
|
|
621
685
|
editable: m = !0,
|
|
622
686
|
draggable: p = !1,
|
|
623
687
|
withImage: B = !1,
|
|
624
|
-
deletable:
|
|
688
|
+
deletable: l = !0,
|
|
625
689
|
addable: a = !0,
|
|
626
|
-
itemsType:
|
|
690
|
+
itemsType: b,
|
|
627
691
|
itemsPlaceholder: d = "",
|
|
628
692
|
itemsOptions: S,
|
|
629
693
|
hasRangeSelector: g = !1,
|
|
630
|
-
rangeSelectorOptions:
|
|
694
|
+
rangeSelectorOptions: k,
|
|
631
695
|
modalOptions: q,
|
|
632
|
-
addableOptions:
|
|
633
|
-
limit:
|
|
634
|
-
} = o, [
|
|
696
|
+
addableOptions: E = {},
|
|
697
|
+
limit: f
|
|
698
|
+
} = o, [v, M] = x.useState(null), [O, I] = x.useState({
|
|
635
699
|
top: 0,
|
|
636
700
|
left: 0
|
|
637
|
-
}), [
|
|
638
|
-
|
|
701
|
+
}), [h, $] = x.useState(null), P = x.useRef(null), [y, N] = x.useState(!1), A = ut(
|
|
702
|
+
mt(ht, {
|
|
639
703
|
activationConstraint: {
|
|
640
704
|
distance: 5
|
|
641
705
|
}
|
|
@@ -643,35 +707,35 @@ const Di = (o) => {
|
|
|
643
707
|
);
|
|
644
708
|
x.useEffect(() => {
|
|
645
709
|
const _ = () => {
|
|
646
|
-
|
|
710
|
+
M(null), N(!1);
|
|
647
711
|
};
|
|
648
|
-
return document.body.addEventListener("click", _),
|
|
649
|
-
|
|
712
|
+
return document.body.addEventListener("click", _), M(null), N(!1), () => {
|
|
713
|
+
M(null), N(!1), document.body.removeEventListener("click", _);
|
|
650
714
|
};
|
|
651
715
|
}, []), x.useEffect(() => {
|
|
652
|
-
if (
|
|
653
|
-
const _ = [...n].map((
|
|
716
|
+
if (v) {
|
|
717
|
+
const _ = [...n].map((R) => R.id === v.id ? v : R);
|
|
654
718
|
i(_);
|
|
655
719
|
}
|
|
656
|
-
}, [
|
|
657
|
-
if (P.current &&
|
|
658
|
-
const _ = P.current.getBoundingClientRect().height,
|
|
659
|
-
let T =
|
|
660
|
-
T + _ >
|
|
720
|
+
}, [v]), x.useEffect(() => {
|
|
721
|
+
if (P.current && h) {
|
|
722
|
+
const _ = P.current.getBoundingClientRect().height, R = window.innerHeight;
|
|
723
|
+
let T = h.top;
|
|
724
|
+
T + _ > R + window.scrollY - 200 && (T = R + window.scrollY - _ - 200), T < 0 && (T = 10), I({
|
|
661
725
|
top: T,
|
|
662
|
-
left:
|
|
726
|
+
left: h.left
|
|
663
727
|
});
|
|
664
728
|
}
|
|
665
|
-
}, [P.current,
|
|
666
|
-
const U = (_,
|
|
729
|
+
}, [P.current, h]);
|
|
730
|
+
const U = (_, R) => {
|
|
667
731
|
_.stopPropagation();
|
|
668
732
|
const T = _.target.getBoundingClientRect();
|
|
669
|
-
|
|
733
|
+
$({
|
|
670
734
|
top: T.top + window.scrollY,
|
|
671
735
|
left: T.left - 30
|
|
672
|
-
}), R
|
|
736
|
+
}), M(R), N(!0);
|
|
673
737
|
};
|
|
674
|
-
function
|
|
738
|
+
function D(_) {
|
|
675
739
|
if (B)
|
|
676
740
|
return _ ? /* @__PURE__ */ t.jsx(
|
|
677
741
|
"img",
|
|
@@ -682,7 +746,7 @@ const Di = (o) => {
|
|
|
682
746
|
height: 16
|
|
683
747
|
}
|
|
684
748
|
) : /* @__PURE__ */ t.jsx(
|
|
685
|
-
|
|
749
|
+
j,
|
|
686
750
|
{
|
|
687
751
|
name: "Image",
|
|
688
752
|
width: 16,
|
|
@@ -692,19 +756,19 @@ const Di = (o) => {
|
|
|
692
756
|
);
|
|
693
757
|
}
|
|
694
758
|
const z = (_) => {
|
|
695
|
-
const { active:
|
|
696
|
-
if (T &&
|
|
697
|
-
const
|
|
698
|
-
if (
|
|
699
|
-
const W = [...n], [K] = W.splice(
|
|
759
|
+
const { active: R, over: T } = _;
|
|
760
|
+
if (T && R.id !== T.id) {
|
|
761
|
+
const L = n.findIndex((W) => W.id === R.id), nt = n.findIndex((W) => W.id === T.id);
|
|
762
|
+
if (L !== -1 && nt !== -1) {
|
|
763
|
+
const W = [...n], [K] = W.splice(L, 1);
|
|
700
764
|
W.splice(nt, 0, K), i(W);
|
|
701
765
|
}
|
|
702
766
|
}
|
|
703
767
|
}, Z = (_) => {
|
|
704
768
|
var T;
|
|
705
|
-
const
|
|
769
|
+
const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
706
770
|
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
707
|
-
|
|
771
|
+
j,
|
|
708
772
|
{
|
|
709
773
|
name: "DotsSixVertical",
|
|
710
774
|
hoverable: !0,
|
|
@@ -712,38 +776,38 @@ const Di = (o) => {
|
|
|
712
776
|
height: 20
|
|
713
777
|
}
|
|
714
778
|
) }),
|
|
715
|
-
|
|
716
|
-
|
|
779
|
+
b === "select" && S && /* @__PURE__ */ t.jsx(
|
|
780
|
+
rt,
|
|
717
781
|
{
|
|
718
|
-
onChange: (
|
|
782
|
+
onChange: (L) => {
|
|
719
783
|
const W = [...n].map((K) => K.id === _.id ? {
|
|
720
784
|
..._,
|
|
721
785
|
name: {
|
|
722
|
-
"en-US":
|
|
786
|
+
"en-US": L
|
|
723
787
|
}
|
|
724
788
|
} : K);
|
|
725
|
-
|
|
789
|
+
M({
|
|
726
790
|
..._,
|
|
727
791
|
name: {
|
|
728
|
-
"en-US":
|
|
792
|
+
"en-US": L
|
|
729
793
|
}
|
|
730
794
|
}), i([...W]);
|
|
731
795
|
},
|
|
732
796
|
value: _.name["en-US"],
|
|
733
797
|
options: S.filter(
|
|
734
|
-
(
|
|
798
|
+
(L) => !n.find((nt) => nt.name["en-US"] === L)
|
|
735
799
|
),
|
|
736
|
-
leftAddon:
|
|
800
|
+
leftAddon: D(_.images)
|
|
737
801
|
}
|
|
738
802
|
),
|
|
739
|
-
|
|
740
|
-
|
|
803
|
+
b === "input" && /* @__PURE__ */ t.jsx(
|
|
804
|
+
yt,
|
|
741
805
|
{
|
|
742
|
-
onChange: (
|
|
806
|
+
onChange: (L) => {
|
|
743
807
|
const W = [...n].map((K) => K.id === _.id ? {
|
|
744
808
|
..._,
|
|
745
809
|
name: {
|
|
746
|
-
"en-US":
|
|
810
|
+
"en-US": L
|
|
747
811
|
}
|
|
748
812
|
} : K);
|
|
749
813
|
i([...W]);
|
|
@@ -752,55 +816,55 @@ const Di = (o) => {
|
|
|
752
816
|
placeholder: d
|
|
753
817
|
}
|
|
754
818
|
),
|
|
755
|
-
|
|
819
|
+
b === "image" && /* @__PURE__ */ t.jsx(
|
|
756
820
|
Tt,
|
|
757
821
|
{
|
|
758
|
-
onChange: (
|
|
822
|
+
onChange: (L) => {
|
|
759
823
|
const W = [...n].map((K) => K.id === _.id ? {
|
|
760
824
|
..._,
|
|
761
|
-
images:
|
|
825
|
+
images: L
|
|
762
826
|
} : K);
|
|
763
827
|
i([...W]);
|
|
764
828
|
},
|
|
765
|
-
activeImage: (T = n.find((
|
|
829
|
+
activeImage: (T = n.find((L) => L.id === _.id)) == null ? void 0 : T.images[0]
|
|
766
830
|
}
|
|
767
831
|
),
|
|
768
832
|
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
769
833
|
m && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
770
|
-
|
|
834
|
+
j,
|
|
771
835
|
{
|
|
772
836
|
name: "Sliders",
|
|
773
837
|
hoverable: !0,
|
|
774
838
|
width: 20,
|
|
775
839
|
height: 20,
|
|
776
|
-
onClick: (
|
|
840
|
+
onClick: (L) => U(L, _)
|
|
777
841
|
}
|
|
778
842
|
) }),
|
|
779
|
-
|
|
780
|
-
|
|
843
|
+
l && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
844
|
+
j,
|
|
781
845
|
{
|
|
782
846
|
name: "Trash",
|
|
783
847
|
hoverable: !0,
|
|
784
848
|
width: 20,
|
|
785
849
|
height: 20,
|
|
786
850
|
fill: "#C12A2A",
|
|
787
|
-
onClick: () => i(n.filter((
|
|
851
|
+
onClick: () => i(n.filter((L) => L.id !== _.id))
|
|
788
852
|
}
|
|
789
853
|
) })
|
|
790
854
|
] })
|
|
791
855
|
] });
|
|
792
856
|
return p ? /* @__PURE__ */ t.jsx(
|
|
793
|
-
|
|
857
|
+
Qe,
|
|
794
858
|
{
|
|
795
859
|
product: _,
|
|
796
|
-
children:
|
|
860
|
+
children: R
|
|
797
861
|
},
|
|
798
862
|
_.id
|
|
799
863
|
) : /* @__PURE__ */ t.jsx(
|
|
800
864
|
"div",
|
|
801
865
|
{
|
|
802
866
|
className: H.product,
|
|
803
|
-
children:
|
|
867
|
+
children: R
|
|
804
868
|
},
|
|
805
869
|
_.id
|
|
806
870
|
);
|
|
@@ -816,30 +880,30 @@ const Di = (o) => {
|
|
|
816
880
|
}
|
|
817
881
|
)
|
|
818
882
|
] }),
|
|
819
|
-
|
|
883
|
+
v && m && q && y && /* @__PURE__ */ t.jsx(
|
|
820
884
|
Pt,
|
|
821
885
|
{
|
|
822
886
|
ref: P,
|
|
823
|
-
activeItem:
|
|
824
|
-
setActiveItem:
|
|
825
|
-
popupPosition:
|
|
887
|
+
activeItem: v,
|
|
888
|
+
setActiveItem: M,
|
|
889
|
+
popupPosition: O,
|
|
826
890
|
modalOptions: q,
|
|
827
891
|
setIsOpenModal: N
|
|
828
892
|
}
|
|
829
893
|
),
|
|
830
|
-
g &&
|
|
894
|
+
g && k && /* @__PURE__ */ t.jsx(St, { ...k }),
|
|
831
895
|
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
832
|
-
|
|
896
|
+
r && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: r }),
|
|
833
897
|
p ? /* @__PURE__ */ t.jsx(
|
|
834
|
-
|
|
898
|
+
pt,
|
|
835
899
|
{
|
|
836
900
|
sensors: A,
|
|
837
901
|
onDragEnd: z,
|
|
838
902
|
children: /* @__PURE__ */ t.jsx(
|
|
839
|
-
|
|
903
|
+
_t,
|
|
840
904
|
{
|
|
841
905
|
items: n.map((_) => _.id),
|
|
842
|
-
strategy:
|
|
906
|
+
strategy: gt,
|
|
843
907
|
children: n.map((_) => Z(_))
|
|
844
908
|
}
|
|
845
909
|
)
|
|
@@ -858,41 +922,41 @@ const Di = (o) => {
|
|
|
858
922
|
{
|
|
859
923
|
withoutHover: !0,
|
|
860
924
|
className: V(H.button, {
|
|
861
|
-
[H.disabled]: !!(
|
|
925
|
+
[H.disabled]: !!(f && f <= n.length)
|
|
862
926
|
}),
|
|
863
927
|
size: "s",
|
|
864
|
-
disabled: !!(
|
|
928
|
+
disabled: !!(f && f <= n.length),
|
|
865
929
|
onClick: () => {
|
|
866
930
|
const _ = [...n];
|
|
867
|
-
let
|
|
931
|
+
let R = null;
|
|
868
932
|
if (S) {
|
|
869
933
|
for (let T = 0; T < S.length; T++)
|
|
870
|
-
if (!n.find((
|
|
871
|
-
|
|
934
|
+
if (!n.find((L) => L.name["en-US"] === S[T])) {
|
|
935
|
+
R = S[T];
|
|
872
936
|
break;
|
|
873
937
|
}
|
|
874
938
|
}
|
|
875
|
-
|
|
939
|
+
b === "select" && S ? _.push({
|
|
876
940
|
name: {
|
|
877
|
-
"en-US":
|
|
941
|
+
"en-US": R || S[0]
|
|
878
942
|
},
|
|
879
943
|
id: at(),
|
|
880
|
-
...
|
|
944
|
+
...E,
|
|
881
945
|
maxSymbols: 100
|
|
882
946
|
// пример значения
|
|
883
|
-
}) :
|
|
947
|
+
}) : b === "input" ? _.push({
|
|
884
948
|
name: {
|
|
885
949
|
"en-US": ""
|
|
886
950
|
},
|
|
887
951
|
id: at(),
|
|
888
|
-
...
|
|
952
|
+
...E,
|
|
889
953
|
maxSymbols: 100
|
|
890
954
|
}) : _.push({
|
|
891
955
|
name: {
|
|
892
956
|
"en-US": `Image ${n.length + 1}`
|
|
893
957
|
},
|
|
894
958
|
id: at(),
|
|
895
|
-
...
|
|
959
|
+
...E,
|
|
896
960
|
maxSymbols: 100
|
|
897
961
|
}), i(_);
|
|
898
962
|
},
|
|
@@ -902,7 +966,7 @@ const Di = (o) => {
|
|
|
902
966
|
children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
|
|
903
967
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
904
968
|
/* @__PURE__ */ t.jsx(
|
|
905
|
-
|
|
969
|
+
j,
|
|
906
970
|
{
|
|
907
971
|
name: "Plus",
|
|
908
972
|
width: 16,
|
|
@@ -915,82 +979,82 @@ const Di = (o) => {
|
|
|
915
979
|
}
|
|
916
980
|
)
|
|
917
981
|
] }),
|
|
918
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
982
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c })
|
|
919
983
|
] });
|
|
920
|
-
},
|
|
921
|
-
subtitle:
|
|
922
|
-
header:
|
|
923
|
-
text:
|
|
924
|
-
productsBlock:
|
|
925
|
-
buttonsBlock:
|
|
926
|
-
top:
|
|
927
|
-
itemsBlock:
|
|
928
|
-
typeTexts:
|
|
929
|
-
block:
|
|
930
|
-
active:
|
|
931
|
-
products:
|
|
932
|
-
product:
|
|
984
|
+
}, Xe = "_subtitle_jql1y_1", Je = "_header_jql1y_8", Ke = "_text_jql1y_9", Ze = "_productsBlock_jql1y_10", tn = "_buttonsBlock_jql1y_11", en = "_top_jql1y_23", nn = "_itemsBlock_jql1y_32", sn = "_typeTexts_jql1y_38", an = "_block_jql1y_45", on = "_active_jql1y_58", cn = "_products_jql1y_10", rn = "_product_jql1y_10", ln = "_button_jql1y_11", dn = "_image_jql1y_88", un = "_info_jql1y_95", mn = "_name_jql1y_107", hn = "_buttons_jql1y_11", pn = "_modal_jql1y_118", _n = "_other_jql1y_138", gn = "_options_jql1y_144", fn = "_addButton_jql1y_150", xn = "_deleteButton_jql1y_165", tt = {
|
|
985
|
+
subtitle: Xe,
|
|
986
|
+
header: Je,
|
|
987
|
+
text: Ke,
|
|
988
|
+
productsBlock: Ze,
|
|
989
|
+
buttonsBlock: tn,
|
|
990
|
+
top: en,
|
|
991
|
+
itemsBlock: nn,
|
|
992
|
+
typeTexts: sn,
|
|
993
|
+
block: an,
|
|
994
|
+
active: on,
|
|
995
|
+
products: cn,
|
|
996
|
+
product: rn,
|
|
933
997
|
button: ln,
|
|
934
|
-
image:
|
|
935
|
-
info:
|
|
936
|
-
name:
|
|
937
|
-
buttons:
|
|
938
|
-
modal:
|
|
939
|
-
other:
|
|
940
|
-
options:
|
|
941
|
-
addButton:
|
|
942
|
-
deleteButton:
|
|
943
|
-
},
|
|
944
|
-
const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: c = !0 } = o, { pages: u } =
|
|
998
|
+
image: dn,
|
|
999
|
+
info: un,
|
|
1000
|
+
name: mn,
|
|
1001
|
+
buttons: hn,
|
|
1002
|
+
modal: pn,
|
|
1003
|
+
other: _n,
|
|
1004
|
+
options: gn,
|
|
1005
|
+
addButton: fn,
|
|
1006
|
+
deleteButton: xn
|
|
1007
|
+
}, vn = (o) => {
|
|
1008
|
+
const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: c = !0 } = o, { pages: u } = lt(), [r, m] = x.useState(null), [p, B] = x.useState({
|
|
945
1009
|
top: 0,
|
|
946
1010
|
left: 0
|
|
947
|
-
}), [
|
|
1011
|
+
}), [l, a] = x.useState(null), b = x.useRef(null);
|
|
948
1012
|
x.useEffect(() => {
|
|
949
|
-
if (
|
|
950
|
-
const g = [...s].map((
|
|
1013
|
+
if (r) {
|
|
1014
|
+
const g = [...s].map((k) => k.id === r.id ? r : k);
|
|
951
1015
|
e(g);
|
|
952
1016
|
}
|
|
953
|
-
}, [
|
|
954
|
-
if (
|
|
955
|
-
const g =
|
|
956
|
-
let q =
|
|
957
|
-
q + g >
|
|
1017
|
+
}, [r]), x.useEffect(() => {
|
|
1018
|
+
if (b.current && l) {
|
|
1019
|
+
const g = b.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
1020
|
+
let q = l.top;
|
|
1021
|
+
q + g > k + window.scrollY - 200 && (q = k + window.scrollY - g - 200), q < 0 && (q = 10), B({
|
|
958
1022
|
top: q,
|
|
959
|
-
left:
|
|
1023
|
+
left: l.left
|
|
960
1024
|
});
|
|
961
1025
|
}
|
|
962
|
-
}, [
|
|
963
|
-
const d = (g,
|
|
1026
|
+
}, [b.current, l]);
|
|
1027
|
+
const d = (g, k) => {
|
|
964
1028
|
g.stopPropagation();
|
|
965
1029
|
const q = g.target.getBoundingClientRect();
|
|
966
1030
|
a({
|
|
967
1031
|
top: q.top + window.scrollY - 70,
|
|
968
1032
|
left: q.left - (i ? 30 : 65)
|
|
969
|
-
}), m(
|
|
970
|
-
}, S = (g,
|
|
971
|
-
const q = [...s],
|
|
1033
|
+
}), m(k);
|
|
1034
|
+
}, S = (g, k) => {
|
|
1035
|
+
const q = [...s], E = {
|
|
972
1036
|
...g,
|
|
973
1037
|
id: Math.random().toString(36).substr(2, 9)
|
|
974
1038
|
// Генерируем новый уникальный ID
|
|
975
1039
|
};
|
|
976
|
-
q.splice(
|
|
1040
|
+
q.splice(k + 1, 0, E), e(q);
|
|
977
1041
|
};
|
|
978
1042
|
return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
|
|
979
1043
|
/* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
|
|
980
|
-
s.map((g,
|
|
1044
|
+
s.map((g, k) => /* @__PURE__ */ t.jsxs(
|
|
981
1045
|
"div",
|
|
982
1046
|
{
|
|
983
1047
|
className: tt.product,
|
|
984
1048
|
children: [
|
|
985
1049
|
/* @__PURE__ */ t.jsx(
|
|
986
|
-
|
|
1050
|
+
rt,
|
|
987
1051
|
{
|
|
988
1052
|
onChange: (q) => {
|
|
989
|
-
const
|
|
1053
|
+
const f = [...s].map((v) => v.id === g.id ? {
|
|
990
1054
|
...g,
|
|
991
1055
|
type: q
|
|
992
|
-
} :
|
|
993
|
-
e(
|
|
1056
|
+
} : v);
|
|
1057
|
+
e(f);
|
|
994
1058
|
},
|
|
995
1059
|
value: g.type,
|
|
996
1060
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
@@ -998,19 +1062,19 @@ const Di = (o) => {
|
|
|
998
1062
|
),
|
|
999
1063
|
/* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
|
|
1000
1064
|
/* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1001
|
-
|
|
1065
|
+
j,
|
|
1002
1066
|
{
|
|
1003
1067
|
name: "Copy",
|
|
1004
1068
|
hoverable: !0,
|
|
1005
1069
|
width: 20,
|
|
1006
1070
|
height: 20,
|
|
1007
1071
|
onClick: () => {
|
|
1008
|
-
S(g,
|
|
1072
|
+
S(g, k);
|
|
1009
1073
|
}
|
|
1010
1074
|
}
|
|
1011
1075
|
) }),
|
|
1012
1076
|
/* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1013
|
-
|
|
1077
|
+
j,
|
|
1014
1078
|
{
|
|
1015
1079
|
name: "Sliders",
|
|
1016
1080
|
hoverable: !0,
|
|
@@ -1022,12 +1086,12 @@ const Di = (o) => {
|
|
|
1022
1086
|
}
|
|
1023
1087
|
) }),
|
|
1024
1088
|
n && /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1025
|
-
|
|
1089
|
+
j,
|
|
1026
1090
|
{
|
|
1027
1091
|
name: "Trash",
|
|
1028
1092
|
hoverable: !0,
|
|
1029
1093
|
onClick: () => {
|
|
1030
|
-
const q = s.filter((
|
|
1094
|
+
const q = s.filter((E) => E.id !== g.id);
|
|
1031
1095
|
e(q);
|
|
1032
1096
|
},
|
|
1033
1097
|
width: 20,
|
|
@@ -1040,11 +1104,11 @@ const Di = (o) => {
|
|
|
1040
1104
|
},
|
|
1041
1105
|
g.id
|
|
1042
1106
|
)),
|
|
1043
|
-
|
|
1107
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1044
1108
|
Mt,
|
|
1045
1109
|
{
|
|
1046
|
-
ref:
|
|
1047
|
-
activeButton:
|
|
1110
|
+
ref: b,
|
|
1111
|
+
activeButton: r,
|
|
1048
1112
|
setActiveButton: m,
|
|
1049
1113
|
popupPosition: p,
|
|
1050
1114
|
editableLink: c
|
|
@@ -1094,7 +1158,7 @@ const Di = (o) => {
|
|
|
1094
1158
|
children: /* @__PURE__ */ t.jsxs("div", { className: tt.addButton, children: [
|
|
1095
1159
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1096
1160
|
/* @__PURE__ */ t.jsx(
|
|
1097
|
-
|
|
1161
|
+
j,
|
|
1098
1162
|
{
|
|
1099
1163
|
name: "Plus",
|
|
1100
1164
|
width: 16,
|
|
@@ -1107,7 +1171,7 @@ const Di = (o) => {
|
|
|
1107
1171
|
}
|
|
1108
1172
|
)
|
|
1109
1173
|
] });
|
|
1110
|
-
},
|
|
1174
|
+
}, Li = (o) => {
|
|
1111
1175
|
const {
|
|
1112
1176
|
isActiveButtons: s,
|
|
1113
1177
|
setIsActiveButtons: e,
|
|
@@ -1115,11 +1179,11 @@ const Di = (o) => {
|
|
|
1115
1179
|
setButtons: i,
|
|
1116
1180
|
editableLink: c = !0,
|
|
1117
1181
|
addable: u = !0,
|
|
1118
|
-
deletable:
|
|
1182
|
+
deletable: r = !0
|
|
1119
1183
|
} = o;
|
|
1120
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1121
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1122
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1184
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: jt.buttonsBlock, children: [
|
|
1185
|
+
/* @__PURE__ */ t.jsxs("div", { className: jt.top, children: [
|
|
1186
|
+
/* @__PURE__ */ t.jsx("h3", { className: jt.title, children: "Buttons" }),
|
|
1123
1187
|
/* @__PURE__ */ t.jsx(
|
|
1124
1188
|
ot,
|
|
1125
1189
|
{
|
|
@@ -1129,23 +1193,23 @@ const Di = (o) => {
|
|
|
1129
1193
|
)
|
|
1130
1194
|
] }),
|
|
1131
1195
|
s && /* @__PURE__ */ t.jsx(
|
|
1132
|
-
|
|
1196
|
+
vn,
|
|
1133
1197
|
{
|
|
1134
1198
|
buttons: n,
|
|
1135
1199
|
setButtons: i,
|
|
1136
1200
|
editableLink: c,
|
|
1137
1201
|
addable: u,
|
|
1138
|
-
deletable:
|
|
1202
|
+
deletable: r
|
|
1139
1203
|
}
|
|
1140
1204
|
)
|
|
1141
1205
|
] }) });
|
|
1142
1206
|
};
|
|
1143
|
-
function
|
|
1144
|
-
const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition:
|
|
1207
|
+
function jn(o) {
|
|
1208
|
+
const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: r, isDragging: m } = ft({
|
|
1145
1209
|
id: String(s.listingId)
|
|
1146
1210
|
}), p = {
|
|
1147
|
-
transform:
|
|
1148
|
-
transition:
|
|
1211
|
+
transform: xt.Transform.toString(u),
|
|
1212
|
+
transition: r
|
|
1149
1213
|
};
|
|
1150
1214
|
return /* @__PURE__ */ t.jsx(
|
|
1151
1215
|
"div",
|
|
@@ -1159,7 +1223,7 @@ function vn(o) {
|
|
|
1159
1223
|
}
|
|
1160
1224
|
);
|
|
1161
1225
|
}
|
|
1162
|
-
const
|
|
1226
|
+
const zi = (o) => {
|
|
1163
1227
|
const {
|
|
1164
1228
|
isActiveItems: s,
|
|
1165
1229
|
setIsActiveItems: e,
|
|
@@ -1167,61 +1231,61 @@ const Li = (o) => {
|
|
|
1167
1231
|
setItems: i,
|
|
1168
1232
|
other: c,
|
|
1169
1233
|
title: u,
|
|
1170
|
-
subtitle:
|
|
1234
|
+
subtitle: r,
|
|
1171
1235
|
editable: m = !0,
|
|
1172
1236
|
draggable: p = !1,
|
|
1173
1237
|
withImage: B = !1,
|
|
1174
|
-
deletable:
|
|
1238
|
+
deletable: l = !0,
|
|
1175
1239
|
addable: a = !0,
|
|
1176
|
-
itemsType:
|
|
1240
|
+
itemsType: b,
|
|
1177
1241
|
itemsOptions: d,
|
|
1178
1242
|
limit: S
|
|
1179
|
-
} = o, [g,
|
|
1243
|
+
} = o, [g, k] = x.useState(
|
|
1180
1244
|
null
|
|
1181
|
-
), [q,
|
|
1245
|
+
), [q, E] = x.useState({
|
|
1182
1246
|
top: 0,
|
|
1183
1247
|
left: 0
|
|
1184
|
-
}), [
|
|
1185
|
-
|
|
1248
|
+
}), [f, v] = x.useState(!1), M = ut(
|
|
1249
|
+
mt(ht, {
|
|
1186
1250
|
activationConstraint: {
|
|
1187
1251
|
distance: 5
|
|
1188
1252
|
}
|
|
1189
1253
|
})
|
|
1190
1254
|
);
|
|
1191
1255
|
x.useEffect(() => {
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1256
|
+
const y = () => {
|
|
1257
|
+
k(null), v(!1);
|
|
1194
1258
|
};
|
|
1195
|
-
return document.body.addEventListener("click",
|
|
1196
|
-
|
|
1259
|
+
return document.body.addEventListener("click", y), k(null), v(!1), () => {
|
|
1260
|
+
k(null), v(!1), document.body.removeEventListener("click", y);
|
|
1197
1261
|
};
|
|
1198
1262
|
}, []), x.useEffect(() => {
|
|
1199
1263
|
if (g) {
|
|
1200
|
-
const
|
|
1201
|
-
i(
|
|
1264
|
+
const y = [...n].map((N) => N.listingId === g.listingId ? g : N);
|
|
1265
|
+
i(y);
|
|
1202
1266
|
}
|
|
1203
1267
|
}, [g]);
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
const A =
|
|
1268
|
+
const O = (y, N) => {
|
|
1269
|
+
y.stopPropagation();
|
|
1270
|
+
const A = y.target.getBoundingClientRect(), U = 100, D = window.innerHeight;
|
|
1207
1271
|
let z = A.top + window.scrollY;
|
|
1208
|
-
z + U >
|
|
1272
|
+
z + U > D && (z = D - U - 20), v(!0), E({
|
|
1209
1273
|
top: z - 80,
|
|
1210
1274
|
left: A.left - 30
|
|
1211
|
-
}),
|
|
1275
|
+
}), k(N);
|
|
1212
1276
|
};
|
|
1213
|
-
function I(
|
|
1277
|
+
function I(y) {
|
|
1214
1278
|
if (B)
|
|
1215
|
-
return
|
|
1279
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
1216
1280
|
"img",
|
|
1217
1281
|
{
|
|
1218
|
-
src: `https://imagedelivery.net/${
|
|
1282
|
+
src: `https://imagedelivery.net/${y}/w=1000`,
|
|
1219
1283
|
alt: "image",
|
|
1220
1284
|
width: 16,
|
|
1221
1285
|
height: 16
|
|
1222
1286
|
}
|
|
1223
1287
|
) : /* @__PURE__ */ t.jsx(
|
|
1224
|
-
|
|
1288
|
+
j,
|
|
1225
1289
|
{
|
|
1226
1290
|
name: "Image",
|
|
1227
1291
|
width: 16,
|
|
@@ -1230,21 +1294,21 @@ const Li = (o) => {
|
|
|
1230
1294
|
}
|
|
1231
1295
|
);
|
|
1232
1296
|
}
|
|
1233
|
-
const
|
|
1234
|
-
const { active: N, over: A } =
|
|
1297
|
+
const h = (y) => {
|
|
1298
|
+
const { active: N, over: A } = y;
|
|
1235
1299
|
if (A && N.id !== A.id) {
|
|
1236
|
-
const U = n.findIndex((z) => String(z.listingId) === N.id),
|
|
1237
|
-
if (U !== -1 &&
|
|
1300
|
+
const U = n.findIndex((z) => String(z.listingId) === N.id), D = n.findIndex((z) => String(z.listingId) === A.id);
|
|
1301
|
+
if (U !== -1 && D !== -1) {
|
|
1238
1302
|
const z = [...n], [Z] = z.splice(U, 1);
|
|
1239
|
-
z.splice(
|
|
1303
|
+
z.splice(D, 0, Z), i(z);
|
|
1240
1304
|
}
|
|
1241
1305
|
}
|
|
1242
|
-
},
|
|
1243
|
-
const A = d.find((
|
|
1306
|
+
}, $ = (y, N) => {
|
|
1307
|
+
const A = d.find((D) => y.listingId === D.id);
|
|
1244
1308
|
if (!A) return null;
|
|
1245
1309
|
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1246
1310
|
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1247
|
-
|
|
1311
|
+
j,
|
|
1248
1312
|
{
|
|
1249
1313
|
name: "DotsSixVertical",
|
|
1250
1314
|
hoverable: !0,
|
|
@@ -1252,66 +1316,66 @@ const Li = (o) => {
|
|
|
1252
1316
|
height: 20
|
|
1253
1317
|
}
|
|
1254
1318
|
) }),
|
|
1255
|
-
|
|
1256
|
-
|
|
1319
|
+
b === "select" && /* @__PURE__ */ t.jsx(
|
|
1320
|
+
rt,
|
|
1257
1321
|
{
|
|
1258
|
-
onChange: (
|
|
1259
|
-
const z = [...n], Z = d.find((T) => T.productData.name ===
|
|
1322
|
+
onChange: (D) => {
|
|
1323
|
+
const z = [...n], Z = d.find((T) => T.productData.name === D);
|
|
1260
1324
|
if (!Z) return;
|
|
1261
1325
|
const _ = {
|
|
1262
1326
|
listingId: Z.id,
|
|
1263
1327
|
image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
|
|
1264
|
-
},
|
|
1265
|
-
|
|
1328
|
+
}, R = z.map((T) => T.listingId === y.listingId ? _ : T);
|
|
1329
|
+
k(_), i([...R]);
|
|
1266
1330
|
},
|
|
1267
1331
|
value: A.productData.name,
|
|
1268
1332
|
options: [
|
|
1269
|
-
...d.filter((
|
|
1333
|
+
...d.filter((D) => !n.find((z) => z.listingId === D.id)).map((D) => D.productData.name)
|
|
1270
1334
|
],
|
|
1271
1335
|
leftAddon: I(
|
|
1272
|
-
|
|
1336
|
+
y.image || A.productData.images.length > 0 && A.productData.images[0].cfId || ""
|
|
1273
1337
|
)
|
|
1274
1338
|
},
|
|
1275
1339
|
N
|
|
1276
1340
|
),
|
|
1277
1341
|
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
1278
1342
|
m && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1279
|
-
|
|
1343
|
+
j,
|
|
1280
1344
|
{
|
|
1281
1345
|
name: "Sliders",
|
|
1282
1346
|
hoverable: !0,
|
|
1283
1347
|
width: 20,
|
|
1284
1348
|
height: 20,
|
|
1285
|
-
onClick: (
|
|
1349
|
+
onClick: (D) => O(D, y)
|
|
1286
1350
|
}
|
|
1287
1351
|
) }),
|
|
1288
|
-
|
|
1289
|
-
|
|
1352
|
+
l && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1353
|
+
j,
|
|
1290
1354
|
{
|
|
1291
1355
|
name: "Trash",
|
|
1292
1356
|
hoverable: !0,
|
|
1293
1357
|
width: 20,
|
|
1294
1358
|
height: 20,
|
|
1295
1359
|
fill: "#C12A2A",
|
|
1296
|
-
onClick: () => i(n.filter((
|
|
1360
|
+
onClick: () => i(n.filter((D) => D !== y))
|
|
1297
1361
|
}
|
|
1298
1362
|
) })
|
|
1299
1363
|
] })
|
|
1300
1364
|
] });
|
|
1301
1365
|
return p ? /* @__PURE__ */ t.jsx(
|
|
1302
|
-
|
|
1366
|
+
jn,
|
|
1303
1367
|
{
|
|
1304
|
-
product:
|
|
1368
|
+
product: y,
|
|
1305
1369
|
children: U
|
|
1306
1370
|
},
|
|
1307
|
-
|
|
1371
|
+
y.listingId
|
|
1308
1372
|
) : /* @__PURE__ */ t.jsx(
|
|
1309
1373
|
"div",
|
|
1310
1374
|
{
|
|
1311
1375
|
className: G.product,
|
|
1312
1376
|
children: U
|
|
1313
1377
|
},
|
|
1314
|
-
|
|
1378
|
+
y.listingId
|
|
1315
1379
|
);
|
|
1316
1380
|
}, P = x.useRef(null);
|
|
1317
1381
|
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
@@ -1321,38 +1385,38 @@ const Li = (o) => {
|
|
|
1321
1385
|
ot,
|
|
1322
1386
|
{
|
|
1323
1387
|
current: s,
|
|
1324
|
-
onChange: (
|
|
1388
|
+
onChange: (y) => e == null ? void 0 : e(y)
|
|
1325
1389
|
}
|
|
1326
1390
|
)
|
|
1327
1391
|
] }),
|
|
1328
|
-
|
|
1392
|
+
f && g && /* @__PURE__ */ t.jsx(
|
|
1329
1393
|
At,
|
|
1330
1394
|
{
|
|
1331
1395
|
ref: P,
|
|
1332
1396
|
activeItem: g,
|
|
1333
|
-
setActiveItem:
|
|
1334
|
-
setIsOpenModal:
|
|
1397
|
+
setActiveItem: k,
|
|
1398
|
+
setIsOpenModal: v,
|
|
1335
1399
|
popupPosition: q,
|
|
1336
1400
|
itemsOptions: d
|
|
1337
1401
|
}
|
|
1338
1402
|
),
|
|
1339
1403
|
s && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
1340
|
-
|
|
1404
|
+
r && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: r }),
|
|
1341
1405
|
p ? /* @__PURE__ */ t.jsx(
|
|
1342
|
-
|
|
1406
|
+
pt,
|
|
1343
1407
|
{
|
|
1344
|
-
sensors:
|
|
1345
|
-
onDragEnd:
|
|
1408
|
+
sensors: M,
|
|
1409
|
+
onDragEnd: h,
|
|
1346
1410
|
children: /* @__PURE__ */ t.jsx(
|
|
1347
|
-
|
|
1411
|
+
_t,
|
|
1348
1412
|
{
|
|
1349
|
-
items: n.map((
|
|
1350
|
-
strategy:
|
|
1351
|
-
children: n.map((
|
|
1413
|
+
items: n.map((y) => String(y.listingId)),
|
|
1414
|
+
strategy: gt,
|
|
1415
|
+
children: n.map((y, N) => $(y, N))
|
|
1352
1416
|
}
|
|
1353
1417
|
)
|
|
1354
1418
|
}
|
|
1355
|
-
) : n.map((
|
|
1419
|
+
) : n.map((y, N) => $(y, N)),
|
|
1356
1420
|
a && /* @__PURE__ */ t.jsx(
|
|
1357
1421
|
"div",
|
|
1358
1422
|
{
|
|
@@ -1368,16 +1432,16 @@ const Li = (o) => {
|
|
|
1368
1432
|
className: G.button,
|
|
1369
1433
|
size: "s",
|
|
1370
1434
|
onClick: () => {
|
|
1371
|
-
const
|
|
1435
|
+
const y = [...n];
|
|
1372
1436
|
for (let N = 0; N < d.length; N++)
|
|
1373
1437
|
if (!n.find((A) => A.listingId === d[N].id)) {
|
|
1374
|
-
|
|
1438
|
+
y.push({
|
|
1375
1439
|
listingId: d[N].id,
|
|
1376
1440
|
image: d[N].productData.images.length > 0 ? d[N].productData.images[0].cfId : ""
|
|
1377
1441
|
});
|
|
1378
1442
|
break;
|
|
1379
1443
|
}
|
|
1380
|
-
i(
|
|
1444
|
+
i(y);
|
|
1381
1445
|
},
|
|
1382
1446
|
disabled: n.length === (S || d.length),
|
|
1383
1447
|
style: {
|
|
@@ -1386,7 +1450,7 @@ const Li = (o) => {
|
|
|
1386
1450
|
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
1387
1451
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1388
1452
|
/* @__PURE__ */ t.jsx(
|
|
1389
|
-
|
|
1453
|
+
j,
|
|
1390
1454
|
{
|
|
1391
1455
|
name: "Plus",
|
|
1392
1456
|
width: 16,
|
|
@@ -1399,108 +1463,108 @@ const Li = (o) => {
|
|
|
1399
1463
|
}
|
|
1400
1464
|
)
|
|
1401
1465
|
] }),
|
|
1402
|
-
s && c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1466
|
+
s && c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c })
|
|
1403
1467
|
] });
|
|
1404
|
-
},
|
|
1405
|
-
options:
|
|
1406
|
-
price:
|
|
1407
|
-
oldPrice:
|
|
1468
|
+
}, bn = "_options_1vlf9_1", yn = "_price_1vlf9_13", In = "_oldPrice_1vlf9_20", Nn = "_newPrice_1vlf9_28", kn = "_animate_1vlf9_35", Cn = "_appearAndBounce_1vlf9_1", Sn = "_meta_1vlf9_53", $n = "_info_1vlf9_59", wn = "_infoRight_1vlf9_67", qn = "_buttons_1vlf9_74", Bn = "_variants_1vlf9_81", Pn = "_variant_1vlf9_81", Tn = "_stock_1vlf9_99", Mn = "_variantInfo_1vlf9_106", An = "_quantity_1vlf9_112", On = "_count_1vlf9_119", En = "_focused_1vlf9_136", Dn = "_button_1vlf9_74", Rn = "_activeVariant_1vlf9_162", Ln = "_chargeTypes_1vlf9_166", zn = "_charge_1vlf9_166", Fn = "_chargeActive_1vlf9_191", Vn = "_title_1vlf9_199", w = {
|
|
1469
|
+
options: bn,
|
|
1470
|
+
price: yn,
|
|
1471
|
+
oldPrice: In,
|
|
1408
1472
|
newPrice: Nn,
|
|
1409
|
-
animate:
|
|
1410
|
-
appearAndBounce:
|
|
1411
|
-
meta:
|
|
1412
|
-
info:
|
|
1473
|
+
animate: kn,
|
|
1474
|
+
appearAndBounce: Cn,
|
|
1475
|
+
meta: Sn,
|
|
1476
|
+
info: $n,
|
|
1413
1477
|
infoRight: wn,
|
|
1414
|
-
buttons:
|
|
1415
|
-
variants:
|
|
1416
|
-
variant:
|
|
1417
|
-
stock:
|
|
1418
|
-
variantInfo:
|
|
1419
|
-
quantity:
|
|
1420
|
-
count:
|
|
1421
|
-
focused:
|
|
1422
|
-
button:
|
|
1423
|
-
activeVariant:
|
|
1424
|
-
chargeTypes:
|
|
1425
|
-
charge:
|
|
1426
|
-
chargeActive:
|
|
1427
|
-
title:
|
|
1478
|
+
buttons: qn,
|
|
1479
|
+
variants: Bn,
|
|
1480
|
+
variant: Pn,
|
|
1481
|
+
stock: Tn,
|
|
1482
|
+
variantInfo: Mn,
|
|
1483
|
+
quantity: An,
|
|
1484
|
+
count: On,
|
|
1485
|
+
focused: En,
|
|
1486
|
+
button: Dn,
|
|
1487
|
+
activeVariant: Rn,
|
|
1488
|
+
chargeTypes: Ln,
|
|
1489
|
+
charge: zn,
|
|
1490
|
+
chargeActive: Fn,
|
|
1491
|
+
title: Vn
|
|
1428
1492
|
};
|
|
1429
1493
|
var Ct = /* @__PURE__ */ ((o) => (o.ONE_TIME = "One-Time", o.RECURRING = "Subscribe & Save", o))(Ct || {});
|
|
1430
|
-
const
|
|
1431
|
-
var q,
|
|
1494
|
+
const Un = (o) => {
|
|
1495
|
+
var q, E;
|
|
1432
1496
|
const { variants: s } = o, [e, n] = x.useState(s[0]), [i, c] = x.useState(
|
|
1433
1497
|
e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
|
|
1434
|
-
), u =
|
|
1498
|
+
), u = vt(), [r, m] = x.useState(1), { products: p, cart: B, reset: l, addProductToCart: a } = dt(), [b, d] = x.useState(!1);
|
|
1435
1499
|
console.log(B), x.useEffect(() => {
|
|
1436
1500
|
d(!0);
|
|
1437
|
-
const
|
|
1438
|
-
return () => clearTimeout(
|
|
1439
|
-
}, [
|
|
1501
|
+
const f = setTimeout(() => d(!1), 600);
|
|
1502
|
+
return () => clearTimeout(f);
|
|
1503
|
+
}, [r]);
|
|
1440
1504
|
async function S() {
|
|
1441
1505
|
console.log("Products P", p), await a({
|
|
1442
1506
|
productId: o.id,
|
|
1443
1507
|
productVariantId: e.id,
|
|
1444
|
-
quantity:
|
|
1508
|
+
quantity: r
|
|
1445
1509
|
});
|
|
1446
1510
|
}
|
|
1447
1511
|
function g() {
|
|
1448
|
-
|
|
1512
|
+
l(), S(), u("/checkout");
|
|
1449
1513
|
}
|
|
1450
|
-
function
|
|
1451
|
-
if (
|
|
1452
|
-
const
|
|
1453
|
-
return `${
|
|
1454
|
-
} else if (
|
|
1455
|
-
const
|
|
1456
|
-
return `${
|
|
1457
|
-
} else if (
|
|
1458
|
-
const
|
|
1459
|
-
return `${
|
|
1514
|
+
function k(f) {
|
|
1515
|
+
if (f >= 864e5) {
|
|
1516
|
+
const h = Math.floor(f / 864e5);
|
|
1517
|
+
return `${h} ${h === 1 ? "day" : "days"}`;
|
|
1518
|
+
} else if (f >= 36e5) {
|
|
1519
|
+
const h = Math.floor(f / 36e5);
|
|
1520
|
+
return `${h} ${h === 1 ? "hour" : "hours"}`;
|
|
1521
|
+
} else if (f >= 6e4) {
|
|
1522
|
+
const h = Math.floor(f / 6e4);
|
|
1523
|
+
return `${h} ${h === 1 ? "minute" : "minutes"}`;
|
|
1460
1524
|
} else {
|
|
1461
|
-
const
|
|
1462
|
-
return `${
|
|
1525
|
+
const h = Math.floor(f / 1e3);
|
|
1526
|
+
return `${h} ${h === 1 ? "second" : "seconds"}`;
|
|
1463
1527
|
}
|
|
1464
1528
|
}
|
|
1465
1529
|
return x.useEffect(() => {
|
|
1466
1530
|
e.quantity && e.quantity.available === 0 && m(0);
|
|
1467
1531
|
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
|
|
1468
|
-
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((
|
|
1532
|
+
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
1469
1533
|
"div",
|
|
1470
1534
|
{
|
|
1471
1535
|
className: V(w.charge, {
|
|
1472
|
-
[w.chargeActive]: i ===
|
|
1536
|
+
[w.chargeActive]: i === f
|
|
1473
1537
|
}),
|
|
1474
|
-
onClick: () => c(
|
|
1475
|
-
children: Ct[
|
|
1538
|
+
onClick: () => c(f),
|
|
1539
|
+
children: Ct[f]
|
|
1476
1540
|
},
|
|
1477
|
-
|
|
1541
|
+
f
|
|
1478
1542
|
)) }),
|
|
1479
|
-
/* @__PURE__ */ t.jsx("div", { className: w.variants, children: s.map((
|
|
1480
|
-
var
|
|
1543
|
+
/* @__PURE__ */ t.jsx("div", { className: w.variants, children: s.map((f) => {
|
|
1544
|
+
var v, M;
|
|
1481
1545
|
return /* @__PURE__ */ t.jsxs(
|
|
1482
1546
|
"div",
|
|
1483
1547
|
{
|
|
1484
1548
|
className: V(w.variant, {
|
|
1485
|
-
[w.activeVariant]: e.id ===
|
|
1549
|
+
[w.activeVariant]: e.id === f.id
|
|
1486
1550
|
}),
|
|
1487
|
-
onClick: () => n(
|
|
1551
|
+
onClick: () => n(f),
|
|
1488
1552
|
children: [
|
|
1489
1553
|
/* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
|
|
1490
|
-
/* @__PURE__ */ t.jsx("span", { className: w.title, children:
|
|
1554
|
+
/* @__PURE__ */ t.jsx("span", { className: w.title, children: Nt(f.name) }),
|
|
1491
1555
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1492
1556
|
"$",
|
|
1493
|
-
i === "ONE_TIME" ?
|
|
1557
|
+
i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
1494
1558
|
] })
|
|
1495
1559
|
] }),
|
|
1496
1560
|
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: w.stock, children: [
|
|
1497
|
-
(
|
|
1561
|
+
(v = f.quantity.restrictions) != null && v.max || f.quantity.available !== void 0 ? ((M = f.quantity.restrictions) == null ? void 0 : M.max) || f.quantity.available : "∞",
|
|
1498
1562
|
" ",
|
|
1499
1563
|
"in stock"
|
|
1500
1564
|
] }) })
|
|
1501
1565
|
]
|
|
1502
1566
|
},
|
|
1503
|
-
|
|
1567
|
+
f.id
|
|
1504
1568
|
);
|
|
1505
1569
|
}) }),
|
|
1506
1570
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: w.quantity, children: [
|
|
@@ -1509,23 +1573,23 @@ const Vn = (o) => {
|
|
|
1509
1573
|
{
|
|
1510
1574
|
type: "Secondary",
|
|
1511
1575
|
onClick: () => {
|
|
1512
|
-
|
|
1576
|
+
r > 1 ? m((f) => f - 1) : m(1);
|
|
1513
1577
|
},
|
|
1514
1578
|
className: w.button,
|
|
1515
|
-
disabled: e.quantity.available && e.quantity.restrictions &&
|
|
1516
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1579
|
+
disabled: e.quantity.available && e.quantity.restrictions && r <= e.quantity.restrictions.min || e.quantity.available === 0,
|
|
1580
|
+
children: /* @__PURE__ */ t.jsx(j, { name: "Minus" })
|
|
1517
1581
|
}
|
|
1518
1582
|
),
|
|
1519
1583
|
/* @__PURE__ */ t.jsx(
|
|
1520
1584
|
Ot,
|
|
1521
1585
|
{
|
|
1522
1586
|
type: "number",
|
|
1523
|
-
value: String(
|
|
1524
|
-
onChange: (
|
|
1587
|
+
value: String(r),
|
|
1588
|
+
onChange: (f) => m(Number(f)),
|
|
1525
1589
|
max: ((q = e.quantity.restrictions) == null ? void 0 : q.max) || e.quantity.available || Number.POSITIVE_INFINITY,
|
|
1526
|
-
min: ((
|
|
1590
|
+
min: ((E = e.quantity.restrictions) == null ? void 0 : E.min) || 0,
|
|
1527
1591
|
centered: !0,
|
|
1528
|
-
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 &&
|
|
1592
|
+
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && r >= e.quantity.restrictions.max
|
|
1529
1593
|
}
|
|
1530
1594
|
),
|
|
1531
1595
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1533,11 +1597,11 @@ const Vn = (o) => {
|
|
|
1533
1597
|
{
|
|
1534
1598
|
type: "Secondary",
|
|
1535
1599
|
onClick: () => {
|
|
1536
|
-
m((
|
|
1600
|
+
m((f) => f + 1);
|
|
1537
1601
|
},
|
|
1538
1602
|
className: w.button,
|
|
1539
|
-
disabled: !!(e.quantity.available && e.quantity.restrictions &&
|
|
1540
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1603
|
+
disabled: !!(e.quantity.available && e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available === 0),
|
|
1604
|
+
children: /* @__PURE__ */ t.jsx(j, { name: "Plus" })
|
|
1541
1605
|
}
|
|
1542
1606
|
)
|
|
1543
1607
|
] }),
|
|
@@ -1546,7 +1610,7 @@ const Vn = (o) => {
|
|
|
1546
1610
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1547
1611
|
/* @__PURE__ */ t.jsxs("div", { className: w.infoRight, children: [
|
|
1548
1612
|
/* @__PURE__ */ t.jsx(
|
|
1549
|
-
|
|
1613
|
+
j,
|
|
1550
1614
|
{
|
|
1551
1615
|
name: "Lightning",
|
|
1552
1616
|
fill: "#FF3F19",
|
|
@@ -1554,25 +1618,25 @@ const Vn = (o) => {
|
|
|
1554
1618
|
height: 20
|
|
1555
1619
|
}
|
|
1556
1620
|
),
|
|
1557
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1621
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : k(e.deliveryTime) })
|
|
1558
1622
|
] })
|
|
1559
1623
|
] }),
|
|
1560
1624
|
/* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
|
|
1561
1625
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1562
1626
|
/* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
|
|
1563
|
-
/* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]:
|
|
1627
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
|
|
1564
1628
|
"$ ",
|
|
1565
|
-
(e.price.amount || 0) *
|
|
1629
|
+
(e.price.amount || 0) * r
|
|
1566
1630
|
] }),
|
|
1567
1631
|
/* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
|
|
1568
1632
|
"$ ",
|
|
1569
|
-
(e.compareAtPrice.amount || 0) *
|
|
1633
|
+
(e.compareAtPrice.amount || 0) * r
|
|
1570
1634
|
] })
|
|
1571
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]:
|
|
1635
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
|
|
1572
1636
|
"$ ",
|
|
1573
|
-
(e.price.amount || 0) *
|
|
1637
|
+
(e.price.amount || 0) * r
|
|
1574
1638
|
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
|
|
1575
|
-
/* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]:
|
|
1639
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
|
|
1576
1640
|
"$ ",
|
|
1577
1641
|
e.subscriptionSettings.price.amount || 0
|
|
1578
1642
|
] }),
|
|
@@ -1580,7 +1644,7 @@ const Vn = (o) => {
|
|
|
1580
1644
|
"$ ",
|
|
1581
1645
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1582
1646
|
] })
|
|
1583
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]:
|
|
1647
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
|
|
1584
1648
|
"$ ",
|
|
1585
1649
|
e.subscriptionSettings.price.amount || 0
|
|
1586
1650
|
] }) })
|
|
@@ -1607,85 +1671,85 @@ const Vn = (o) => {
|
|
|
1607
1671
|
)
|
|
1608
1672
|
] })
|
|
1609
1673
|
] });
|
|
1610
|
-
},
|
|
1611
|
-
button:
|
|
1612
|
-
login:
|
|
1613
|
-
signUp:
|
|
1614
|
-
buttons:
|
|
1615
|
-
modal:
|
|
1674
|
+
}, Hn = "_button_14q75_1", Yn = "_login_14q75_14", Wn = "_signUp_14q75_18", Gn = "_buttons_14q75_23", Qn = "_modal_14q75_32", Xn = "_closing_14q75_64", Jn = "_info_14q75_113", Kn = "_top_14q75_120", Zn = "_title_14q75_131", ts = "_clear_14q75_138", es = "_activeClear_14q75_145", ns = "_count_14q75_149", ss = "_cart_14q75_164", is = "_empty_14q75_172", as = "_product_14q75_198", os = "_products_14q75_207", cs = "_image_14q75_215", rs = "_productInfo_14q75_230", ls = "_content_14q75_237", ds = "_name_14q75_243", us = "_price_14q75_249", ms = "_productButtons_14q75_255", hs = "_productButton_14q75_255", ps = "_productCount_14q75_272", _s = "_bottom_14q75_289", gs = "_subtotal_14q75_297", fs = "_block_14q75_305", xs = "_shoppingCount_14q75_312", vs = "_total_14q75_332", js = "_link_14q75_338", bs = "_userInfo_14q75_345", ys = "_pagesMobileModal_14q75_356", Is = "_pagesMobileModalContent_14q75_370", Ns = "_pagesMobileModalHeader_14q75_376", ks = "_pagesMobileModalFooter_14q75_386", C = {
|
|
1675
|
+
button: Hn,
|
|
1676
|
+
login: Yn,
|
|
1677
|
+
signUp: Wn,
|
|
1678
|
+
buttons: Gn,
|
|
1679
|
+
modal: Qn,
|
|
1616
1680
|
"slide-in-fade": "_slide-in-fade_14q75_1",
|
|
1617
1681
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_14q75_1",
|
|
1618
|
-
closing:
|
|
1682
|
+
closing: Xn,
|
|
1619
1683
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_14q75_1",
|
|
1620
1684
|
"slide-out-fade": "_slide-out-fade_14q75_1",
|
|
1621
|
-
info:
|
|
1622
|
-
top:
|
|
1623
|
-
title:
|
|
1624
|
-
clear:
|
|
1625
|
-
activeClear:
|
|
1626
|
-
count:
|
|
1627
|
-
cart:
|
|
1628
|
-
empty:
|
|
1629
|
-
product:
|
|
1630
|
-
products:
|
|
1631
|
-
image:
|
|
1632
|
-
productInfo:
|
|
1685
|
+
info: Jn,
|
|
1686
|
+
top: Kn,
|
|
1687
|
+
title: Zn,
|
|
1688
|
+
clear: ts,
|
|
1689
|
+
activeClear: es,
|
|
1690
|
+
count: ns,
|
|
1691
|
+
cart: ss,
|
|
1692
|
+
empty: is,
|
|
1693
|
+
product: as,
|
|
1694
|
+
products: os,
|
|
1695
|
+
image: cs,
|
|
1696
|
+
productInfo: rs,
|
|
1633
1697
|
content: ls,
|
|
1634
|
-
name:
|
|
1635
|
-
price:
|
|
1636
|
-
productButtons:
|
|
1637
|
-
productButton:
|
|
1638
|
-
productCount:
|
|
1639
|
-
bottom:
|
|
1640
|
-
subtotal:
|
|
1641
|
-
block:
|
|
1642
|
-
shoppingCount:
|
|
1643
|
-
total:
|
|
1644
|
-
link:
|
|
1645
|
-
userInfo:
|
|
1646
|
-
pagesMobileModal:
|
|
1647
|
-
pagesMobileModalContent:
|
|
1698
|
+
name: ds,
|
|
1699
|
+
price: us,
|
|
1700
|
+
productButtons: ms,
|
|
1701
|
+
productButton: hs,
|
|
1702
|
+
productCount: ps,
|
|
1703
|
+
bottom: _s,
|
|
1704
|
+
subtotal: gs,
|
|
1705
|
+
block: fs,
|
|
1706
|
+
shoppingCount: xs,
|
|
1707
|
+
total: vs,
|
|
1708
|
+
link: js,
|
|
1709
|
+
userInfo: bs,
|
|
1710
|
+
pagesMobileModal: ys,
|
|
1711
|
+
pagesMobileModalContent: Is,
|
|
1648
1712
|
pagesMobileModalHeader: Ns,
|
|
1649
|
-
pagesMobileModalFooter:
|
|
1650
|
-
},
|
|
1713
|
+
pagesMobileModalFooter: ks
|
|
1714
|
+
}, Fi = (o) => {
|
|
1651
1715
|
const { shopping: s, signUp: e, isShowUserInfo: n = !0 } = o;
|
|
1652
1716
|
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
1653
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1717
|
+
s && /* @__PURE__ */ t.jsx(Cs, {}),
|
|
1654
1718
|
n && /* @__PURE__ */ t.jsx(Bt, { signUp: e })
|
|
1655
1719
|
] });
|
|
1656
|
-
},
|
|
1657
|
-
const [o, s] = x.useState(!1), [e, n] = x.useState([]), { cart: i } = dt(), { pageContext: c } =
|
|
1720
|
+
}, Cs = () => {
|
|
1721
|
+
const [o, s] = x.useState(!1), [e, n] = x.useState([]), { cart: i } = dt(), { pageContext: c } = lt();
|
|
1658
1722
|
function u(a) {
|
|
1659
1723
|
if (a.variants.length > 0) {
|
|
1660
|
-
for (let
|
|
1724
|
+
for (let b = 0; b < i.parts.length; b++)
|
|
1661
1725
|
for (let d = 0; d < a.variants.length; d++)
|
|
1662
|
-
if (a.variants[d] && i.parts[
|
|
1663
|
-
return i.parts[
|
|
1726
|
+
if (a.variants[d] && i.parts[b].productVariantId === a.variants[d].id)
|
|
1727
|
+
return i.parts[b].productVariantId;
|
|
1664
1728
|
}
|
|
1665
1729
|
return a.variants[0].id;
|
|
1666
1730
|
}
|
|
1667
|
-
function
|
|
1668
|
-
for (let
|
|
1731
|
+
function r(a) {
|
|
1732
|
+
for (let b = 0; b < i.parts.length; b++)
|
|
1669
1733
|
for (let d = 0; d < a.variants.length; d++)
|
|
1670
|
-
if (a.variants[d] && i.parts[
|
|
1671
|
-
return i.parts[
|
|
1734
|
+
if (a.variants[d] && i.parts[b].productVariantId === a.variants[d].id)
|
|
1735
|
+
return i.parts[b].quantity;
|
|
1672
1736
|
}
|
|
1673
1737
|
x.useEffect(() => {
|
|
1674
1738
|
(async () => {
|
|
1675
1739
|
var g;
|
|
1676
|
-
const
|
|
1677
|
-
...
|
|
1678
|
-
activeVariantId: u(
|
|
1679
|
-
quantity:
|
|
1740
|
+
const b = i.parts.map((k) => String(k.productId)), S = (((g = c == null ? void 0 : c.products) == null ? void 0 : g.filter((k) => b.includes(String(k.id)))) || []).map((k) => ({
|
|
1741
|
+
...k,
|
|
1742
|
+
activeVariantId: u(k),
|
|
1743
|
+
quantity: r(k)
|
|
1680
1744
|
}));
|
|
1681
1745
|
n(S);
|
|
1682
1746
|
})();
|
|
1683
1747
|
}, [i.parts]);
|
|
1684
1748
|
function m(a) {
|
|
1685
|
-
var
|
|
1686
|
-
return !a || !(a != null && a.variants) ? !1 : (
|
|
1749
|
+
var b;
|
|
1750
|
+
return !a || !(a != null && a.variants) ? !1 : (b = a.variants.find((d) => d.id === a.activeVariantId)) == null ? void 0 : b.subscriptionSettings;
|
|
1687
1751
|
}
|
|
1688
|
-
const p = i.parts.length > 0 && e.length > 0 && !m(e[0]), [B,
|
|
1752
|
+
const p = i.parts.length > 0 && e.length > 0 && !m(e[0]), [B, l] = x.useState(!1);
|
|
1689
1753
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1690
1754
|
/* @__PURE__ */ t.jsxs(
|
|
1691
1755
|
F,
|
|
@@ -1696,11 +1760,11 @@ const Vn = (o) => {
|
|
|
1696
1760
|
position: "relative"
|
|
1697
1761
|
},
|
|
1698
1762
|
onClick: (a) => {
|
|
1699
|
-
a.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0),
|
|
1763
|
+
a.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0), l(!0));
|
|
1700
1764
|
},
|
|
1701
1765
|
children: [
|
|
1702
1766
|
/* @__PURE__ */ t.jsx(
|
|
1703
|
-
|
|
1767
|
+
j,
|
|
1704
1768
|
{
|
|
1705
1769
|
name: "Handbag",
|
|
1706
1770
|
fill: "var(--text-primary)"
|
|
@@ -1714,13 +1778,13 @@ const Vn = (o) => {
|
|
|
1714
1778
|
kt,
|
|
1715
1779
|
{
|
|
1716
1780
|
close: () => {
|
|
1717
|
-
|
|
1781
|
+
l(!1), setTimeout(() => {
|
|
1718
1782
|
s(!1);
|
|
1719
1783
|
}, 300);
|
|
1720
1784
|
},
|
|
1721
1785
|
withAnimation: !1,
|
|
1722
1786
|
children: /* @__PURE__ */ t.jsx(
|
|
1723
|
-
|
|
1787
|
+
Ss,
|
|
1724
1788
|
{
|
|
1725
1789
|
activeProducts: e,
|
|
1726
1790
|
isCartNotEmpty: p,
|
|
@@ -1730,20 +1794,20 @@ const Vn = (o) => {
|
|
|
1730
1794
|
}
|
|
1731
1795
|
)
|
|
1732
1796
|
] });
|
|
1733
|
-
},
|
|
1734
|
-
const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = o, { cart: i, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct:
|
|
1797
|
+
}, Ss = (o) => {
|
|
1798
|
+
const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = o, { cart: i, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct: r } = dt(), m = vt();
|
|
1735
1799
|
function p(a) {
|
|
1736
1800
|
m(a);
|
|
1737
1801
|
}
|
|
1738
1802
|
function B(a) {
|
|
1739
|
-
a.quantity &&
|
|
1803
|
+
a.quantity && r({
|
|
1740
1804
|
productId: a.id,
|
|
1741
1805
|
productVariantId: a.activeVariantId,
|
|
1742
1806
|
quantity: a.quantity + 1
|
|
1743
1807
|
});
|
|
1744
1808
|
}
|
|
1745
|
-
function
|
|
1746
|
-
a.quantity &&
|
|
1809
|
+
function l(a) {
|
|
1810
|
+
a.quantity && r({
|
|
1747
1811
|
productId: a.id,
|
|
1748
1812
|
productVariantId: a.activeVariantId,
|
|
1749
1813
|
quantity: a.quantity - 1
|
|
@@ -1791,17 +1855,17 @@ const Vn = (o) => {
|
|
|
1791
1855
|
className: C.image
|
|
1792
1856
|
}
|
|
1793
1857
|
) : /* @__PURE__ */ t.jsx("div", { className: C.image, children: /* @__PURE__ */ t.jsx(
|
|
1794
|
-
|
|
1858
|
+
j,
|
|
1795
1859
|
{
|
|
1796
1860
|
name: "Image",
|
|
1797
1861
|
fill: "var(--text-secondary)"
|
|
1798
1862
|
}
|
|
1799
1863
|
) }),
|
|
1800
1864
|
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
1801
|
-
/* @__PURE__ */ t.jsx("div", { className: C.name, children:
|
|
1865
|
+
/* @__PURE__ */ t.jsx("div", { className: C.name, children: Nt(a.name) }),
|
|
1802
1866
|
/* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
|
|
1803
1867
|
"$",
|
|
1804
|
-
a.variants.find((
|
|
1868
|
+
a.variants.find((b) => b.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
|
|
1805
1869
|
] })
|
|
1806
1870
|
] })
|
|
1807
1871
|
] }),
|
|
@@ -1811,12 +1875,12 @@ const Vn = (o) => {
|
|
|
1811
1875
|
{
|
|
1812
1876
|
type: "Secondary",
|
|
1813
1877
|
onClick: () => {
|
|
1814
|
-
a.quantity !== 1 &&
|
|
1878
|
+
a.quantity !== 1 && l(a);
|
|
1815
1879
|
},
|
|
1816
1880
|
className: C.productButton,
|
|
1817
1881
|
disabled: a.quantity === 1,
|
|
1818
1882
|
children: /* @__PURE__ */ t.jsx(
|
|
1819
|
-
|
|
1883
|
+
j,
|
|
1820
1884
|
{
|
|
1821
1885
|
name: "Minus",
|
|
1822
1886
|
fill: "#757575",
|
|
@@ -1833,9 +1897,9 @@ const Vn = (o) => {
|
|
|
1833
1897
|
type: "Secondary",
|
|
1834
1898
|
onClick: () => B(a),
|
|
1835
1899
|
className: C.productButton,
|
|
1836
|
-
disabled: a.quantity === a.variants.find((
|
|
1900
|
+
disabled: a.quantity === a.variants.find((b) => b.id === a.activeVariantId).quantity.available,
|
|
1837
1901
|
children: /* @__PURE__ */ t.jsx(
|
|
1838
|
-
|
|
1902
|
+
j,
|
|
1839
1903
|
{
|
|
1840
1904
|
name: "Plus",
|
|
1841
1905
|
fill: "#757575",
|
|
@@ -1855,7 +1919,7 @@ const Vn = (o) => {
|
|
|
1855
1919
|
/* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
|
|
1856
1920
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1857
1921
|
/* @__PURE__ */ t.jsx(
|
|
1858
|
-
|
|
1922
|
+
j,
|
|
1859
1923
|
{
|
|
1860
1924
|
name: "Info",
|
|
1861
1925
|
width: 20,
|
|
@@ -1871,13 +1935,13 @@ const Vn = (o) => {
|
|
|
1871
1935
|
] }),
|
|
1872
1936
|
/* @__PURE__ */ t.jsx(F, { onClick: () => p("/checkout"), children: "Checkout" })
|
|
1873
1937
|
] })
|
|
1874
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1938
|
+
] }) : /* @__PURE__ */ t.jsx($s, {})
|
|
1875
1939
|
]
|
|
1876
1940
|
}
|
|
1877
1941
|
);
|
|
1878
|
-
},
|
|
1942
|
+
}, $s = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
|
|
1879
1943
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1880
|
-
|
|
1944
|
+
j,
|
|
1881
1945
|
{
|
|
1882
1946
|
name: "Handbag",
|
|
1883
1947
|
fill: "var(--text-secondary)"
|
|
@@ -1897,7 +1961,7 @@ const Vn = (o) => {
|
|
|
1897
1961
|
)
|
|
1898
1962
|
] })
|
|
1899
1963
|
] }), Bt = ({ signUp: o, close: s }) => {
|
|
1900
|
-
const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i =
|
|
1964
|
+
const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i = vt();
|
|
1901
1965
|
function c(m) {
|
|
1902
1966
|
window.location.pathname.includes("/admin/builder") || i(m);
|
|
1903
1967
|
}
|
|
@@ -1931,11 +1995,11 @@ const Vn = (o) => {
|
|
|
1931
1995
|
}
|
|
1932
1996
|
)
|
|
1933
1997
|
] });
|
|
1934
|
-
const [u,
|
|
1998
|
+
const [u, r] = x.useState("test-email@gmail.com");
|
|
1935
1999
|
return x.useEffect(() => {
|
|
1936
2000
|
(async () => {
|
|
1937
2001
|
const p = Et(n);
|
|
1938
|
-
|
|
2002
|
+
r(p.email);
|
|
1939
2003
|
})();
|
|
1940
2004
|
}, [n]), /* @__PURE__ */ t.jsx(
|
|
1941
2005
|
"div",
|
|
@@ -1953,7 +2017,7 @@ const Vn = (o) => {
|
|
|
1953
2017
|
setIsOpen: e,
|
|
1954
2018
|
signUp: n
|
|
1955
2019
|
}) => {
|
|
1956
|
-
const { setIsOpen: i } =
|
|
2020
|
+
const { setIsOpen: i } = $t(), c = () => {
|
|
1957
2021
|
i(!1), setTimeout(() => {
|
|
1958
2022
|
e(!1), i(!0);
|
|
1959
2023
|
}, 300);
|
|
@@ -1972,7 +2036,7 @@ const Vn = (o) => {
|
|
|
1972
2036
|
type: "Secondary",
|
|
1973
2037
|
onClick: c,
|
|
1974
2038
|
children: /* @__PURE__ */ t.jsx(
|
|
1975
|
-
|
|
2039
|
+
j,
|
|
1976
2040
|
{
|
|
1977
2041
|
name: "X",
|
|
1978
2042
|
fill: "var(--text-primary)"
|
|
@@ -1992,14 +2056,14 @@ const Vn = (o) => {
|
|
|
1992
2056
|
]
|
|
1993
2057
|
}
|
|
1994
2058
|
);
|
|
1995
|
-
},
|
|
2059
|
+
}, Vi = ({
|
|
1996
2060
|
children: o,
|
|
1997
2061
|
logo: s,
|
|
1998
2062
|
signUp: e
|
|
1999
2063
|
}) => {
|
|
2000
2064
|
const [n, i] = x.useState(!1);
|
|
2001
2065
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2002
|
-
/* @__PURE__ */ t.jsx(
|
|
2066
|
+
/* @__PURE__ */ t.jsx(qs, { setIsOpenModal: i }),
|
|
2003
2067
|
n && /* @__PURE__ */ t.jsx(kt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
2004
2068
|
ws,
|
|
2005
2069
|
{
|
|
@@ -2010,7 +2074,7 @@ const Vn = (o) => {
|
|
|
2010
2074
|
}
|
|
2011
2075
|
) })
|
|
2012
2076
|
] });
|
|
2013
|
-
},
|
|
2077
|
+
}, qs = (o) => {
|
|
2014
2078
|
const { setIsOpenModal: s } = o;
|
|
2015
2079
|
return /* @__PURE__ */ t.jsx(
|
|
2016
2080
|
F,
|
|
@@ -2023,7 +2087,7 @@ const Vn = (o) => {
|
|
|
2023
2087
|
e.stopPropagation(), window.location.pathname.includes("/admin/builder") || s(!0);
|
|
2024
2088
|
},
|
|
2025
2089
|
children: /* @__PURE__ */ t.jsx(
|
|
2026
|
-
|
|
2090
|
+
j,
|
|
2027
2091
|
{
|
|
2028
2092
|
name: "List",
|
|
2029
2093
|
fill: "var(--text-primary)"
|
|
@@ -2031,20 +2095,20 @@ const Vn = (o) => {
|
|
|
2031
2095
|
)
|
|
2032
2096
|
}
|
|
2033
2097
|
);
|
|
2034
|
-
},
|
|
2035
|
-
share:
|
|
2036
|
-
modal:
|
|
2037
|
-
header:
|
|
2038
|
-
socials:
|
|
2039
|
-
social:
|
|
2040
|
-
copy:
|
|
2041
|
-
title:
|
|
2042
|
-
copyWrapper:
|
|
2043
|
-
copyText:
|
|
2044
|
-
copyTextMobile:
|
|
2045
|
-
copyTextMiniMobile:
|
|
2046
|
-
},
|
|
2047
|
-
const { isOpenModal: s, setIsOpenModal: e } =
|
|
2098
|
+
}, Bs = "_share_10urc_1", Ps = "_modal_10urc_9", Ts = "_header_10urc_21", Ms = "_socials_10urc_31", As = "_social_10urc_31", Os = "_copy_10urc_41", Es = "_title_10urc_48", Ds = "_copyWrapper_10urc_54", Rs = "_copyText_10urc_63", Ls = "_copyTextMobile_10urc_76", zs = "_copyTextMiniMobile_10urc_95", et = {
|
|
2099
|
+
share: Bs,
|
|
2100
|
+
modal: Ps,
|
|
2101
|
+
header: Ts,
|
|
2102
|
+
socials: Ms,
|
|
2103
|
+
social: As,
|
|
2104
|
+
copy: Os,
|
|
2105
|
+
title: Es,
|
|
2106
|
+
copyWrapper: Ds,
|
|
2107
|
+
copyText: Rs,
|
|
2108
|
+
copyTextMobile: Ls,
|
|
2109
|
+
copyTextMiniMobile: zs
|
|
2110
|
+
}, Ui = ({ title: o = "Copy Product Link" }) => {
|
|
2111
|
+
const { isOpenModal: s, setIsOpenModal: e } = wt();
|
|
2048
2112
|
function n() {
|
|
2049
2113
|
e(!0);
|
|
2050
2114
|
}
|
|
@@ -2058,7 +2122,7 @@ const Vn = (o) => {
|
|
|
2058
2122
|
},
|
|
2059
2123
|
type: "Secondary",
|
|
2060
2124
|
children: /* @__PURE__ */ t.jsx(
|
|
2061
|
-
|
|
2125
|
+
j,
|
|
2062
2126
|
{
|
|
2063
2127
|
name: "Share",
|
|
2064
2128
|
fill: "#757575",
|
|
@@ -2067,17 +2131,17 @@ const Vn = (o) => {
|
|
|
2067
2131
|
)
|
|
2068
2132
|
}
|
|
2069
2133
|
),
|
|
2070
|
-
s && /* @__PURE__ */ t.jsx(kt, { close: e, children: /* @__PURE__ */ t.jsx(
|
|
2134
|
+
s && /* @__PURE__ */ t.jsx(kt, { close: e, children: /* @__PURE__ */ t.jsx(Fs, { title: o }) })
|
|
2071
2135
|
] });
|
|
2072
|
-
},
|
|
2073
|
-
const { setIsOpenModal: s } =
|
|
2136
|
+
}, Fs = ({ title: o = "Copy Product Link" }) => {
|
|
2137
|
+
const { setIsOpenModal: s } = wt(), { notification: e, setNotification: n } = qt(), { setIsOpen: i } = $t(), c = window.location.href;
|
|
2074
2138
|
function u() {
|
|
2075
2139
|
navigator.clipboard.writeText(c), n({
|
|
2076
2140
|
message: "Link copied to clipboard",
|
|
2077
2141
|
status: "success"
|
|
2078
2142
|
});
|
|
2079
2143
|
}
|
|
2080
|
-
function
|
|
2144
|
+
function r() {
|
|
2081
2145
|
i(!1), setTimeout(() => {
|
|
2082
2146
|
s(!1), i(!0);
|
|
2083
2147
|
}, 300);
|
|
@@ -2094,11 +2158,11 @@ const Vn = (o) => {
|
|
|
2094
2158
|
/* @__PURE__ */ t.jsxs("div", { className: et.header, children: [
|
|
2095
2159
|
/* @__PURE__ */ t.jsx("div", { className: et.title, children: o }),
|
|
2096
2160
|
/* @__PURE__ */ t.jsx(
|
|
2097
|
-
|
|
2161
|
+
j,
|
|
2098
2162
|
{
|
|
2099
2163
|
name: "X",
|
|
2100
2164
|
fill: "#757575",
|
|
2101
|
-
onClick:
|
|
2165
|
+
onClick: r,
|
|
2102
2166
|
hoverable: !0
|
|
2103
2167
|
}
|
|
2104
2168
|
)
|
|
@@ -2124,25 +2188,25 @@ const Vn = (o) => {
|
|
|
2124
2188
|
{
|
|
2125
2189
|
type: "Secondary",
|
|
2126
2190
|
onClick: u,
|
|
2127
|
-
children: e ? /* @__PURE__ */ t.jsx(
|
|
2191
|
+
children: e ? /* @__PURE__ */ t.jsx(j, { name: "Check" }) : /* @__PURE__ */ t.jsx(j, { name: "Copy" })
|
|
2128
2192
|
}
|
|
2129
2193
|
)
|
|
2130
2194
|
] })
|
|
2131
2195
|
]
|
|
2132
2196
|
}
|
|
2133
2197
|
);
|
|
2134
|
-
},
|
|
2135
|
-
accordion:
|
|
2136
|
-
header:
|
|
2137
|
-
icon:
|
|
2138
|
-
open:
|
|
2139
|
-
content:
|
|
2140
|
-
},
|
|
2141
|
-
const [n, i] = x.useState(e), [c, u] = x.useState(0),
|
|
2198
|
+
}, Vs = "_accordion_1s1lq_1", Us = "_header_1s1lq_9", Hs = "_icon_1s1lq_18", Ys = "_open_1s1lq_21", Ws = "_content_1s1lq_25", it = {
|
|
2199
|
+
accordion: Vs,
|
|
2200
|
+
header: Us,
|
|
2201
|
+
icon: Hs,
|
|
2202
|
+
open: Ys,
|
|
2203
|
+
content: Ws
|
|
2204
|
+
}, Hi = ({ title: o, content: s, defaultOpen: e = !1 }) => {
|
|
2205
|
+
const [n, i] = x.useState(e), [c, u] = x.useState(0), r = x.useRef(null), m = () => {
|
|
2142
2206
|
i(!n);
|
|
2143
2207
|
};
|
|
2144
2208
|
return x.useEffect(() => {
|
|
2145
|
-
|
|
2209
|
+
r.current && u(n ? r.current.scrollHeight : 0);
|
|
2146
2210
|
}, [n]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
|
|
2147
2211
|
/* @__PURE__ */ t.jsxs(
|
|
2148
2212
|
"div",
|
|
@@ -2151,21 +2215,21 @@ const Vn = (o) => {
|
|
|
2151
2215
|
onClick: m,
|
|
2152
2216
|
children: [
|
|
2153
2217
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: o }),
|
|
2154
|
-
/* @__PURE__ */ t.jsx("div", { className: V(it.icon, { [it.open]: n }), children: /* @__PURE__ */ t.jsx(
|
|
2218
|
+
/* @__PURE__ */ t.jsx("div", { className: V(it.icon, { [it.open]: n }), children: /* @__PURE__ */ t.jsx(j, { name: "CaretDown" }) })
|
|
2155
2219
|
]
|
|
2156
2220
|
}
|
|
2157
2221
|
),
|
|
2158
2222
|
/* @__PURE__ */ t.jsx(
|
|
2159
2223
|
"div",
|
|
2160
2224
|
{
|
|
2161
|
-
ref:
|
|
2225
|
+
ref: r,
|
|
2162
2226
|
className: it.content,
|
|
2163
2227
|
style: { height: `${c}px` },
|
|
2164
2228
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: s })
|
|
2165
2229
|
}
|
|
2166
2230
|
)
|
|
2167
2231
|
] });
|
|
2168
|
-
},
|
|
2232
|
+
}, Yi = ({ children: o, path: s, className: e, target: n = "_self", id: i }) => {
|
|
2169
2233
|
if (window.location.pathname.includes("/admin/builder"))
|
|
2170
2234
|
return /* @__PURE__ */ t.jsx(
|
|
2171
2235
|
"div",
|
|
@@ -2177,13 +2241,13 @@ const Vn = (o) => {
|
|
|
2177
2241
|
children: o
|
|
2178
2242
|
}
|
|
2179
2243
|
);
|
|
2180
|
-
const c =
|
|
2244
|
+
const c = vt(), u = /^https?:\/\//.test(s), r = (m) => {
|
|
2181
2245
|
u || n === "_blank" ? n === "_blank" ? window.open(s, "_blank") : window.open(s, "_self") : (m.preventDefault(), c(s));
|
|
2182
2246
|
};
|
|
2183
2247
|
return /* @__PURE__ */ t.jsx(
|
|
2184
2248
|
"div",
|
|
2185
2249
|
{
|
|
2186
|
-
onClick:
|
|
2250
|
+
onClick: r,
|
|
2187
2251
|
className: e,
|
|
2188
2252
|
role: "link",
|
|
2189
2253
|
style: { cursor: "pointer" },
|
|
@@ -2191,25 +2255,25 @@ const Vn = (o) => {
|
|
|
2191
2255
|
children: o
|
|
2192
2256
|
}
|
|
2193
2257
|
);
|
|
2194
|
-
},
|
|
2195
|
-
buttonsBlock:
|
|
2196
|
-
slideUp:
|
|
2197
|
-
},
|
|
2258
|
+
}, Gs = "_buttonsBlock_1b2rb_1", Qs = "_slideUp_1b2rb_1", Xs = {
|
|
2259
|
+
buttonsBlock: Gs,
|
|
2260
|
+
slideUp: Qs
|
|
2261
|
+
}, Wi = (o) => {
|
|
2198
2262
|
var p, B;
|
|
2199
|
-
const { setIsOpen: s, setModalType: e, productId: n } = o, { cart: i } = dt(), { pageContext: c } =
|
|
2263
|
+
const { setIsOpen: s, setModalType: e, productId: n } = o, { cart: i } = dt(), { pageContext: c } = lt(), u = (p = c == null ? void 0 : c.listings) == null ? void 0 : p.find((l) => l.id === n);
|
|
2200
2264
|
if (!u)
|
|
2201
2265
|
return null;
|
|
2202
|
-
const
|
|
2203
|
-
(
|
|
2266
|
+
const r = (B = c == null ? void 0 : c.products) == null ? void 0 : B.find(
|
|
2267
|
+
(l) => l.uniquePath === u.productData.uniquePath
|
|
2204
2268
|
);
|
|
2205
|
-
if (!
|
|
2269
|
+
if (!r)
|
|
2206
2270
|
return null;
|
|
2207
|
-
const m = i.parts.find((
|
|
2271
|
+
const m = i.parts.find((l) => l.productId === r.id);
|
|
2208
2272
|
return /* @__PURE__ */ t.jsxs(
|
|
2209
2273
|
"div",
|
|
2210
2274
|
{
|
|
2211
|
-
className:
|
|
2212
|
-
onClick: (
|
|
2275
|
+
className: Xs.buttonsBlock,
|
|
2276
|
+
onClick: (l) => l.stopPropagation(),
|
|
2213
2277
|
children: [
|
|
2214
2278
|
/* @__PURE__ */ t.jsx(
|
|
2215
2279
|
F,
|
|
@@ -2237,11 +2301,11 @@ const Vn = (o) => {
|
|
|
2237
2301
|
]
|
|
2238
2302
|
}
|
|
2239
2303
|
);
|
|
2240
|
-
},
|
|
2241
|
-
wrapper:
|
|
2242
|
-
logo:
|
|
2243
|
-
info:
|
|
2244
|
-
},
|
|
2304
|
+
}, Js = "_wrapper_27wzz_1", Ks = "_logo_27wzz_8", Zs = "_info_27wzz_12", bt = {
|
|
2305
|
+
wrapper: Js,
|
|
2306
|
+
logo: Ks,
|
|
2307
|
+
info: Zs
|
|
2308
|
+
}, Gi = ({ date: o }) => {
|
|
2245
2309
|
const { general: s } = Dt();
|
|
2246
2310
|
if (!s) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2247
2311
|
function e(n) {
|
|
@@ -2255,8 +2319,8 @@ const Vn = (o) => {
|
|
|
2255
2319
|
};
|
|
2256
2320
|
return i.toLocaleDateString("en-US", c);
|
|
2257
2321
|
}
|
|
2258
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2259
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2322
|
+
return /* @__PURE__ */ t.jsxs("div", { className: bt.wrapper, children: [
|
|
2323
|
+
/* @__PURE__ */ t.jsx("div", { className: bt.logo, children: s.info.logo ? /* @__PURE__ */ t.jsx(
|
|
2260
2324
|
"img",
|
|
2261
2325
|
{
|
|
2262
2326
|
src: `https://imagedelivery.net/${s.info.logo.cfId}/w=500,h=500`,
|
|
@@ -2264,47 +2328,47 @@ const Vn = (o) => {
|
|
|
2264
2328
|
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2265
2329
|
}
|
|
2266
2330
|
) : /* @__PURE__ */ t.jsx(
|
|
2267
|
-
|
|
2331
|
+
j,
|
|
2268
2332
|
{
|
|
2269
2333
|
name: "Image",
|
|
2270
2334
|
width: 48,
|
|
2271
2335
|
height: 48
|
|
2272
2336
|
}
|
|
2273
2337
|
) }),
|
|
2274
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2338
|
+
/* @__PURE__ */ t.jsxs("div", { className: bt.info, children: [
|
|
2275
2339
|
/* @__PURE__ */ t.jsx("h3", { id: "h4", children: s.info.name }),
|
|
2276
2340
|
/* @__PURE__ */ t.jsx("p", { id: "p", children: e(o) })
|
|
2277
2341
|
] })
|
|
2278
2342
|
] });
|
|
2279
|
-
},
|
|
2280
|
-
options:
|
|
2281
|
-
price:
|
|
2282
|
-
oldPrice:
|
|
2283
|
-
newPrice:
|
|
2284
|
-
animate:
|
|
2285
|
-
appearAndBounce:
|
|
2286
|
-
meta:
|
|
2287
|
-
info:
|
|
2288
|
-
infoRight:
|
|
2343
|
+
}, ti = "_options_mju90_1", ei = "_price_mju90_12", ni = "_oldPrice_mju90_19", si = "_newPrice_mju90_27", ii = "_animate_mju90_34", ai = "_appearAndBounce_mju90_1", oi = "_meta_mju90_52", ci = "_info_mju90_58", ri = "_infoRight_mju90_66", li = "_buttons_mju90_73", di = "_variants_mju90_80", ui = "_variant_mju90_80", mi = "_stock_mju90_98", hi = "_variantInfo_mju90_105", pi = "_quantity_mju90_111", _i = "_count_mju90_118", gi = "_focused_mju90_135", fi = "_button_mju90_73", xi = "_activeVariant_mju90_161", vi = "_chargeTypes_mju90_165", ji = "_charge_mju90_165", bi = "_chargeActive_mju90_190", yi = "_title_mju90_198", Ii = "_modal_mju90_204", Ni = "_header_mju90_218", X = {
|
|
2344
|
+
options: ti,
|
|
2345
|
+
price: ei,
|
|
2346
|
+
oldPrice: ni,
|
|
2347
|
+
newPrice: si,
|
|
2348
|
+
animate: ii,
|
|
2349
|
+
appearAndBounce: ai,
|
|
2350
|
+
meta: oi,
|
|
2351
|
+
info: ci,
|
|
2352
|
+
infoRight: ri,
|
|
2289
2353
|
buttons: li,
|
|
2290
|
-
variants:
|
|
2291
|
-
variant:
|
|
2292
|
-
stock:
|
|
2293
|
-
variantInfo:
|
|
2294
|
-
quantity:
|
|
2295
|
-
count:
|
|
2296
|
-
focused:
|
|
2297
|
-
button:
|
|
2298
|
-
activeVariant:
|
|
2299
|
-
chargeTypes:
|
|
2300
|
-
charge:
|
|
2301
|
-
chargeActive:
|
|
2302
|
-
title:
|
|
2303
|
-
modal:
|
|
2354
|
+
variants: di,
|
|
2355
|
+
variant: ui,
|
|
2356
|
+
stock: mi,
|
|
2357
|
+
variantInfo: hi,
|
|
2358
|
+
quantity: pi,
|
|
2359
|
+
count: _i,
|
|
2360
|
+
focused: gi,
|
|
2361
|
+
button: fi,
|
|
2362
|
+
activeVariant: xi,
|
|
2363
|
+
chargeTypes: vi,
|
|
2364
|
+
charge: ji,
|
|
2365
|
+
chargeActive: bi,
|
|
2366
|
+
title: yi,
|
|
2367
|
+
modal: Ii,
|
|
2304
2368
|
header: Ni
|
|
2305
|
-
},
|
|
2306
|
-
var
|
|
2307
|
-
const { pageContext: s } =
|
|
2369
|
+
}, Qi = (o) => {
|
|
2370
|
+
var r, m;
|
|
2371
|
+
const { pageContext: s } = lt(), e = (r = s == null ? void 0 : s.listings) == null ? void 0 : r.find((p) => p.id === o.productId);
|
|
2308
2372
|
if (!e)
|
|
2309
2373
|
return;
|
|
2310
2374
|
const n = (m = s == null ? void 0 : s.products) == null ? void 0 : m.find(
|
|
@@ -2318,11 +2382,11 @@ const Vn = (o) => {
|
|
|
2318
2382
|
return /* @__PURE__ */ t.jsxs(
|
|
2319
2383
|
"div",
|
|
2320
2384
|
{
|
|
2321
|
-
className:
|
|
2385
|
+
className: X.modal,
|
|
2322
2386
|
onClick: (p) => p.stopPropagation(),
|
|
2323
2387
|
children: [
|
|
2324
2388
|
o.type === "Add To Cart" && /* @__PURE__ */ t.jsx(
|
|
2325
|
-
|
|
2389
|
+
ki,
|
|
2326
2390
|
{
|
|
2327
2391
|
variants: n.variants,
|
|
2328
2392
|
activeVariant: i,
|
|
@@ -2333,7 +2397,7 @@ const Vn = (o) => {
|
|
|
2333
2397
|
}
|
|
2334
2398
|
),
|
|
2335
2399
|
o.type === "Buy Now" && /* @__PURE__ */ t.jsx(
|
|
2336
|
-
|
|
2400
|
+
Ci,
|
|
2337
2401
|
{
|
|
2338
2402
|
product: n,
|
|
2339
2403
|
setIsOpen: o.setIsOpen
|
|
@@ -2342,10 +2406,10 @@ const Vn = (o) => {
|
|
|
2342
2406
|
]
|
|
2343
2407
|
}
|
|
2344
2408
|
);
|
|
2345
|
-
},
|
|
2346
|
-
const { variants: s, activeChargeType: e, setActiveChargeType: n, activeVariant: i, productId: c, setIsOpen: u } = o, { cart:
|
|
2347
|
-
async function
|
|
2348
|
-
const S =
|
|
2409
|
+
}, ki = (o) => {
|
|
2410
|
+
const { variants: s, activeChargeType: e, setActiveChargeType: n, activeVariant: i, productId: c, setIsOpen: u } = o, { cart: r, addProductToCart: m, addProducts: p, updateQuantityOfProduct: B } = dt(), { setNotification: l } = qt(), { pageContext: a } = lt();
|
|
2411
|
+
async function b(d) {
|
|
2412
|
+
const S = r.parts.find(
|
|
2349
2413
|
(g) => g.productId === o.productId && g.productVariantId === d
|
|
2350
2414
|
);
|
|
2351
2415
|
S ? B({
|
|
@@ -2356,16 +2420,16 @@ const Vn = (o) => {
|
|
|
2356
2420
|
productId: c,
|
|
2357
2421
|
productVariantId: d,
|
|
2358
2422
|
quantity: 1
|
|
2359
|
-
})),
|
|
2423
|
+
})), l({
|
|
2360
2424
|
message: "Product added to cart",
|
|
2361
2425
|
status: "success"
|
|
2362
2426
|
});
|
|
2363
2427
|
}
|
|
2364
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2365
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2428
|
+
return /* @__PURE__ */ t.jsxs("div", { className: X.modal, children: [
|
|
2429
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.header, children: [
|
|
2366
2430
|
/* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
|
|
2367
2431
|
/* @__PURE__ */ t.jsx(
|
|
2368
|
-
|
|
2432
|
+
j,
|
|
2369
2433
|
{
|
|
2370
2434
|
name: "X",
|
|
2371
2435
|
width: 24,
|
|
@@ -2376,35 +2440,35 @@ const Vn = (o) => {
|
|
|
2376
2440
|
}
|
|
2377
2441
|
)
|
|
2378
2442
|
] }),
|
|
2379
|
-
i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2443
|
+
i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: X.chargeTypes, children: i.chargeTypes.map((d) => /* @__PURE__ */ t.jsx(
|
|
2380
2444
|
"div",
|
|
2381
2445
|
{
|
|
2382
|
-
className: V(
|
|
2383
|
-
[
|
|
2446
|
+
className: V(X.charge, {
|
|
2447
|
+
[X.chargeActive]: e === d
|
|
2384
2448
|
}),
|
|
2385
2449
|
onClick: () => n(d),
|
|
2386
2450
|
children: Ct[d]
|
|
2387
2451
|
},
|
|
2388
2452
|
d
|
|
2389
2453
|
)) }),
|
|
2390
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2454
|
+
/* @__PURE__ */ t.jsx("div", { className: X.variants, children: s.map((d) => {
|
|
2391
2455
|
var S, g;
|
|
2392
2456
|
return /* @__PURE__ */ t.jsxs(
|
|
2393
2457
|
"div",
|
|
2394
2458
|
{
|
|
2395
|
-
className: V(
|
|
2459
|
+
className: V(X.variant),
|
|
2396
2460
|
onClick: () => {
|
|
2397
|
-
|
|
2461
|
+
b(d.id), u(!1);
|
|
2398
2462
|
},
|
|
2399
2463
|
children: [
|
|
2400
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2401
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2464
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.variantInfo, children: [
|
|
2465
|
+
/* @__PURE__ */ t.jsx("span", { className: X.title, children: d.name }),
|
|
2402
2466
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2403
2467
|
"$",
|
|
2404
2468
|
e === "ONE_TIME" ? d.price.amount : d.subscriptionSettings ? d.subscriptionSettings.price.amount : "Price Not Found"
|
|
2405
2469
|
] })
|
|
2406
2470
|
] }),
|
|
2407
|
-
/* @__PURE__ */ t.jsx("div", { children: e === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2471
|
+
/* @__PURE__ */ t.jsx("div", { children: e === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: X.stock, children: [
|
|
2408
2472
|
(S = d.quantity.restrictions) != null && S.max || d.quantity.available !== void 0 ? ((g = d.quantity.restrictions) == null ? void 0 : g.max) || d.quantity.available : "∞",
|
|
2409
2473
|
" ",
|
|
2410
2474
|
"in stock"
|
|
@@ -2415,16 +2479,16 @@ const Vn = (o) => {
|
|
|
2415
2479
|
);
|
|
2416
2480
|
}) })
|
|
2417
2481
|
] });
|
|
2418
|
-
},
|
|
2482
|
+
}, Ci = (o) => {
|
|
2419
2483
|
const { product: s, setIsOpen: e } = o;
|
|
2420
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2421
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2484
|
+
return /* @__PURE__ */ t.jsxs("div", { className: X.modal, children: [
|
|
2485
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.header, children: [
|
|
2422
2486
|
/* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
|
|
2423
2487
|
"Buy ",
|
|
2424
|
-
|
|
2488
|
+
Nt(s.name)
|
|
2425
2489
|
] }),
|
|
2426
2490
|
/* @__PURE__ */ t.jsx(
|
|
2427
|
-
|
|
2491
|
+
j,
|
|
2428
2492
|
{
|
|
2429
2493
|
name: "X",
|
|
2430
2494
|
width: 24,
|
|
@@ -2439,16 +2503,16 @@ const Vn = (o) => {
|
|
|
2439
2503
|
}
|
|
2440
2504
|
)
|
|
2441
2505
|
] }),
|
|
2442
|
-
/* @__PURE__ */ t.jsx(
|
|
2506
|
+
/* @__PURE__ */ t.jsx(Un, { ...s })
|
|
2443
2507
|
] });
|
|
2444
|
-
},
|
|
2445
|
-
wrapper:
|
|
2446
|
-
label:
|
|
2508
|
+
}, Si = "_wrapper_1efqk_1", $i = "_label_1efqk_10", wi = "_contentBorder_1efqk_19", qi = "_contentField_1efqk_23", Bi = "_textarea_1efqk_27", Pi = "_length_1efqk_42", st = {
|
|
2509
|
+
wrapper: Si,
|
|
2510
|
+
label: $i,
|
|
2447
2511
|
contentBorder: wi,
|
|
2448
|
-
contentField:
|
|
2449
|
-
textarea:
|
|
2450
|
-
length:
|
|
2451
|
-
},
|
|
2512
|
+
contentField: qi,
|
|
2513
|
+
textarea: Bi,
|
|
2514
|
+
length: Pi
|
|
2515
|
+
}, Xi = (o) => {
|
|
2452
2516
|
const {
|
|
2453
2517
|
onChange: s,
|
|
2454
2518
|
label: e,
|
|
@@ -2456,9 +2520,9 @@ const Vn = (o) => {
|
|
|
2456
2520
|
maxLength: i,
|
|
2457
2521
|
placeholder: c = "Type something...",
|
|
2458
2522
|
type: u = "text"
|
|
2459
|
-
} = o, [
|
|
2460
|
-
function B(
|
|
2461
|
-
return u === "number" ?
|
|
2523
|
+
} = o, [r, m] = x.useState(n.length), { themeSettings: p } = Rt();
|
|
2524
|
+
function B(l) {
|
|
2525
|
+
return u === "number" ? l.replace(/[^\d\n]+/g, "") : l;
|
|
2462
2526
|
}
|
|
2463
2527
|
return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
|
|
2464
2528
|
e && /* @__PURE__ */ t.jsx(
|
|
@@ -2474,8 +2538,8 @@ const Vn = (o) => {
|
|
|
2474
2538
|
{
|
|
2475
2539
|
id: e,
|
|
2476
2540
|
value: n,
|
|
2477
|
-
onChange: (
|
|
2478
|
-
const a = B(
|
|
2541
|
+
onChange: (l) => {
|
|
2542
|
+
const a = B(l.target.value);
|
|
2479
2543
|
m(a.length), s(a);
|
|
2480
2544
|
},
|
|
2481
2545
|
placeholder: c,
|
|
@@ -2487,50 +2551,50 @@ const Vn = (o) => {
|
|
|
2487
2551
|
}
|
|
2488
2552
|
),
|
|
2489
2553
|
i && /* @__PURE__ */ t.jsxs("div", { className: st.length, children: [
|
|
2490
|
-
|
|
2554
|
+
r,
|
|
2491
2555
|
"/",
|
|
2492
2556
|
i
|
|
2493
2557
|
] })
|
|
2494
2558
|
] });
|
|
2495
2559
|
};
|
|
2496
2560
|
export {
|
|
2497
|
-
|
|
2498
|
-
|
|
2561
|
+
Hi as Accordion,
|
|
2562
|
+
qs as BurgerMenuButton,
|
|
2499
2563
|
F as Button,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2564
|
+
vn as ButtonTypeSettings,
|
|
2565
|
+
Li as ButtonsSettings,
|
|
2566
|
+
Ei as CategorySettings,
|
|
2503
2567
|
Ct as ChargeTypes,
|
|
2504
2568
|
Tt as ChooseImage,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2569
|
+
Zi as ChooseImageModal,
|
|
2570
|
+
$s as EmptyCart,
|
|
2571
|
+
Ri as FormSettings,
|
|
2572
|
+
Fi as HeaderButtons,
|
|
2573
|
+
j as Icon,
|
|
2574
|
+
yt as InputSettings,
|
|
2511
2575
|
Ot as InputUI,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2576
|
+
ta as ItemsSettings,
|
|
2577
|
+
Oi as LayoutSettings,
|
|
2578
|
+
Yi as Link,
|
|
2579
|
+
zi as ListingSelector,
|
|
2580
|
+
ea as Loader,
|
|
2581
|
+
Gi as MetaInfoPost,
|
|
2518
2582
|
kt as Modal,
|
|
2519
|
-
|
|
2583
|
+
Vi as PagesMobileMenu,
|
|
2520
2584
|
ws as PagesMobileModal,
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2585
|
+
Di as PagesSettings,
|
|
2586
|
+
Wi as ProductCardButtons,
|
|
2587
|
+
Qi as ProductCardModal,
|
|
2588
|
+
Un as ProductOptions,
|
|
2525
2589
|
St as RangeSelector,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2590
|
+
rt as Select,
|
|
2591
|
+
Ui as ShareLink,
|
|
2592
|
+
Cs as ShoppingButton,
|
|
2593
|
+
Ss as ShoppingModalCart,
|
|
2530
2594
|
ot as Switch,
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2595
|
+
na as TextSettings,
|
|
2596
|
+
sa as TextareaSettings,
|
|
2597
|
+
Xi as TextareaUI,
|
|
2598
|
+
ia as TypesText,
|
|
2535
2599
|
Bt as UserInfo
|
|
2536
2600
|
};
|