@billgangcom/theme-lib 1.52.0 → 1.52.2
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/ui/Submodal/index.d.ts +1 -0
- package/dist/builder.cjs.js +5 -5
- package/dist/builder.es.js +368 -360
- package/dist/{index-CSt-42JF.js → index-B2Rk8_zm.js} +9439 -9337
- package/dist/index-Dxxdn8DO.cjs +154 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui/ListingSelector/popup.d.ts +2 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +955 -1029
- package/package.json +1 -1
- package/dist/index-BhPRECBt.cjs +0 -154
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, I as b, c as V, a as rt, S as it, R as vt, B as tt, O as dt, b as ot, u as ut, d as mt, P as ht, D as pt, e as _t, v as gt, f as ft, C as xt, g as U, h as Ct, i as nt, k as St, l as wt, m as $t, n as lt, o as F, L as Bt, p as ct, q as bt, r as Y, t as Pt, M as jt, w as yt, x as Mt, y as Nt, z as Tt } from "./index-B2Rk8_zm.js";
|
|
2
|
+
import { H as mi, E as hi, G as pi, A as _i, T as gi, F as fi } from "./index-B2Rk8_zm.js";
|
|
3
3
|
import f from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
5
|
+
const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1ibay_15", Et = "_subtitle_1ibay_22", zt = "_alignmentContent_1ibay_29", Rt = "_alignments_1ibay_37", Dt = "_alignment_1ibay_8", Lt = "_circle_1ibay_60", Ht = "_paddings_1ibay_67", Ut = "_padding_1ibay_67", Ft = "_active_1ibay_91", Vt = "_input_1ibay_98", W = {
|
|
6
|
+
wrapper: qt,
|
|
7
|
+
alignmentBlock: At,
|
|
8
|
+
title: Ot,
|
|
9
|
+
subtitle: Et,
|
|
10
|
+
alignmentContent: zt,
|
|
11
|
+
alignments: Rt,
|
|
12
|
+
alignment: Dt,
|
|
13
13
|
circle: Lt,
|
|
14
|
-
paddings:
|
|
14
|
+
paddings: Ht,
|
|
15
15
|
padding: Ut,
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
16
|
+
active: Ft,
|
|
17
|
+
input: Vt
|
|
18
|
+
}, Yt = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment: o, padding: e, setPadding: s, setAlignment: n } =
|
|
30
|
-
function
|
|
31
|
-
switch (
|
|
28
|
+
], Wt = ["left", "top", "right", "bottom"], Xn = (r) => {
|
|
29
|
+
const { alignment: o, padding: e, setPadding: s, setAlignment: n } = r;
|
|
30
|
+
function g(d) {
|
|
31
|
+
switch (d) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function h(d) {
|
|
49
|
+
switch (d) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,40 +57,40 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
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 [c, p] = f.useState(null), [I, O] = f.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
|
|
63
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
|
|
64
|
+
/* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
|
|
65
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Yt.map((d) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
n(
|
|
70
|
+
n(d);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: W.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
p(
|
|
74
|
+
p(d);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
p(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
d !== o && c !== d && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
|
|
81
|
+
d !== o && c === d && /* @__PURE__ */ t.jsx(
|
|
82
|
+
b,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: g(c),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
d === o && /* @__PURE__ */ t.jsx(
|
|
91
|
+
b,
|
|
92
92
|
{
|
|
93
|
-
name:
|
|
93
|
+
name: g(o),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,25 +98,25 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
d
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((d) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
106
|
+
className: V(W.padding, {
|
|
107
|
+
[W.active]: I === d
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
O(d);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
O(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
b,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: h(d),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
@@ -125,10 +125,10 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
125
125
|
rt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
128
|
+
value: String(e[d]),
|
|
129
129
|
onChange: (i) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[d]: Number(i)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,66 +136,66 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
d
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
144
|
+
}, Gt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Xt = "_header_82zux_12", Jt = "_text_82zux_13", Kt = "_productsBlock_82zux_14", Zt = "_top_82zux_26", te = "_itemsBlock_82zux_35", ee = "_typeTexts_82zux_41", se = "_block_82zux_48", ne = "_active_82zux_61", ie = "_products_82zux_14", oe = "_product_82zux_14", ae = "_button_82zux_80", ce = "_disabled_82zux_91", le = "_image_82zux_95", re = "_info_82zux_102", de = "_name_82zux_114", ue = "_buttons_82zux_118", me = "_modal_82zux_125", he = "_link_82zux_145", pe = "_modalOptions_82zux_151", _e = "_addButton_82zux_157", ge = "_deleteButton_82zux_179", G = {
|
|
145
|
+
title: Gt,
|
|
146
|
+
subtitle: Qt,
|
|
147
147
|
header: Xt,
|
|
148
|
-
text:
|
|
149
|
-
productsBlock:
|
|
150
|
-
top:
|
|
151
|
-
itemsBlock:
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
products:
|
|
156
|
-
product:
|
|
157
|
-
button:
|
|
158
|
-
disabled:
|
|
159
|
-
image:
|
|
160
|
-
info:
|
|
161
|
-
name:
|
|
162
|
-
buttons:
|
|
163
|
-
modal:
|
|
164
|
-
link:
|
|
148
|
+
text: Jt,
|
|
149
|
+
productsBlock: Kt,
|
|
150
|
+
top: Zt,
|
|
151
|
+
itemsBlock: te,
|
|
152
|
+
typeTexts: ee,
|
|
153
|
+
block: se,
|
|
154
|
+
active: ne,
|
|
155
|
+
products: ie,
|
|
156
|
+
product: oe,
|
|
157
|
+
button: ae,
|
|
158
|
+
disabled: ce,
|
|
159
|
+
image: le,
|
|
160
|
+
info: re,
|
|
161
|
+
name: de,
|
|
162
|
+
buttons: ue,
|
|
163
|
+
modal: me,
|
|
164
|
+
link: he,
|
|
165
165
|
modalOptions: pe,
|
|
166
166
|
addButton: _e,
|
|
167
|
-
deleteButton:
|
|
168
|
-
},
|
|
167
|
+
deleteButton: ge
|
|
168
|
+
}, Jn = (r) => {
|
|
169
169
|
const {
|
|
170
170
|
isActiveItems: o,
|
|
171
171
|
setIsActiveItems: e,
|
|
172
172
|
items: s,
|
|
173
173
|
setItems: n,
|
|
174
|
-
other:
|
|
175
|
-
title:
|
|
176
|
-
subtitle:
|
|
174
|
+
other: g,
|
|
175
|
+
title: h,
|
|
176
|
+
subtitle: c,
|
|
177
177
|
draggable: p = !1,
|
|
178
|
-
withImage:
|
|
179
|
-
addable:
|
|
180
|
-
itemsOptions:
|
|
178
|
+
withImage: I = !1,
|
|
179
|
+
addable: O = !0,
|
|
180
|
+
itemsOptions: d,
|
|
181
181
|
hasRangeSelector: i = !1,
|
|
182
|
-
rangeSelectorOptions:
|
|
183
|
-
limit:
|
|
184
|
-
autoScrollInterval:
|
|
182
|
+
rangeSelectorOptions: x,
|
|
183
|
+
limit: v,
|
|
184
|
+
autoScrollInterval: _,
|
|
185
185
|
deletable: y
|
|
186
|
-
} =
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
186
|
+
} = r;
|
|
187
|
+
function w(a) {
|
|
188
|
+
if (I)
|
|
189
|
+
return a ? /* @__PURE__ */ t.jsx(
|
|
190
190
|
"img",
|
|
191
191
|
{
|
|
192
|
-
src: `https://imagedelivery.net/${
|
|
192
|
+
src: `https://imagedelivery.net/${a[0]}/w=1000`,
|
|
193
193
|
alt: "image",
|
|
194
194
|
width: 16,
|
|
195
195
|
height: 16
|
|
196
196
|
}
|
|
197
197
|
) : /* @__PURE__ */ t.jsx(
|
|
198
|
-
|
|
198
|
+
b,
|
|
199
199
|
{
|
|
200
200
|
name: "Image",
|
|
201
201
|
width: 16,
|
|
@@ -204,12 +204,12 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
}
|
|
207
|
-
const L = (
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
210
|
-
const
|
|
207
|
+
const L = (a, $ = !1) => {
|
|
208
|
+
const T = d.find((E) => E.id === a);
|
|
209
|
+
if (!T) return;
|
|
210
|
+
const Q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
211
211
|
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
212
|
-
|
|
212
|
+
b,
|
|
213
213
|
{
|
|
214
214
|
name: "DotsSixVertical",
|
|
215
215
|
hoverable: !0,
|
|
@@ -221,53 +221,53 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
221
221
|
ot,
|
|
222
222
|
{
|
|
223
223
|
onChange: (E) => {
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
226
|
-
const
|
|
227
|
-
n([...
|
|
224
|
+
const u = [...s], C = d.find((j) => j.name === E);
|
|
225
|
+
if (!C) return;
|
|
226
|
+
const M = C.id, l = u.map((j) => j === a ? M : j);
|
|
227
|
+
n([...l]);
|
|
228
228
|
},
|
|
229
|
-
value:
|
|
230
|
-
options:
|
|
231
|
-
leftAddon:
|
|
229
|
+
value: T.name,
|
|
230
|
+
options: d.filter((E) => !s.find((u) => u === E.id)).map((E) => E.name),
|
|
231
|
+
leftAddon: w(T.images)
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
$ && /* @__PURE__ */ t.jsx("div", { className: G.buttons, children: /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
235
|
+
b,
|
|
236
236
|
{
|
|
237
237
|
name: "Trash",
|
|
238
238
|
hoverable: !0,
|
|
239
239
|
width: 20,
|
|
240
240
|
height: 20,
|
|
241
241
|
fill: "#C12A2A",
|
|
242
|
-
onClick: () => n(s.filter((E) => E !==
|
|
242
|
+
onClick: () => n(s.filter((E) => E !== a))
|
|
243
243
|
}
|
|
244
244
|
) }) })
|
|
245
245
|
] });
|
|
246
246
|
return /* @__PURE__ */ t.jsx(
|
|
247
247
|
"div",
|
|
248
248
|
{
|
|
249
|
-
className:
|
|
250
|
-
children:
|
|
249
|
+
className: G.product,
|
|
250
|
+
children: Q
|
|
251
251
|
},
|
|
252
|
-
|
|
252
|
+
a
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
256
|
-
(
|
|
257
|
-
|
|
255
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
256
|
+
(h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
257
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: h }),
|
|
258
258
|
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
259
259
|
it,
|
|
260
260
|
{
|
|
261
261
|
current: o,
|
|
262
|
-
onChange: (
|
|
262
|
+
onChange: (a) => e == null ? void 0 : e(a)
|
|
263
263
|
}
|
|
264
264
|
)
|
|
265
265
|
] }),
|
|
266
|
-
i &&
|
|
267
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
268
|
-
|
|
269
|
-
s.map((
|
|
270
|
-
|
|
266
|
+
i && x && /* @__PURE__ */ t.jsx(vt, { ...x }),
|
|
267
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
268
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: c }),
|
|
269
|
+
s.map((a) => L(a, y)),
|
|
270
|
+
O && /* @__PURE__ */ t.jsx(
|
|
271
271
|
"div",
|
|
272
272
|
{
|
|
273
273
|
style: {
|
|
@@ -277,33 +277,33 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
277
277
|
gap: 5
|
|
278
278
|
},
|
|
279
279
|
children: /* @__PURE__ */ t.jsx(
|
|
280
|
-
|
|
280
|
+
tt,
|
|
281
281
|
{
|
|
282
282
|
withoutHover: !0,
|
|
283
|
-
className:
|
|
284
|
-
[
|
|
283
|
+
className: V(G.button, {
|
|
284
|
+
[G.disabled]: !!(v && v <= s.length || s.length === d.length)
|
|
285
285
|
}),
|
|
286
286
|
size: "s",
|
|
287
|
-
disabled: !!(
|
|
287
|
+
disabled: !!(v && v <= s.length || s.length === d.length),
|
|
288
288
|
onClick: () => {
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
if (
|
|
292
|
-
for (let
|
|
293
|
-
if (!s.find((
|
|
294
|
-
|
|
289
|
+
const a = [...s];
|
|
290
|
+
let $ = null;
|
|
291
|
+
if (d) {
|
|
292
|
+
for (let T = 0; T < d.length; T++)
|
|
293
|
+
if (!s.find((Q) => Q === d[T].id)) {
|
|
294
|
+
$ = d[T];
|
|
295
295
|
break;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
|
|
298
|
+
a.push(($ == null ? void 0 : $.id) || d[0].id), n(a);
|
|
299
299
|
},
|
|
300
300
|
style: {
|
|
301
301
|
width: "fit-content"
|
|
302
302
|
},
|
|
303
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
303
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
304
304
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
305
305
|
/* @__PURE__ */ t.jsx(
|
|
306
|
-
|
|
306
|
+
b,
|
|
307
307
|
{
|
|
308
308
|
name: "Plus",
|
|
309
309
|
width: 16,
|
|
@@ -316,14 +316,14 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
316
316
|
}
|
|
317
317
|
)
|
|
318
318
|
] }),
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g }),
|
|
320
|
+
_ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
321
321
|
rt,
|
|
322
322
|
{
|
|
323
323
|
label: "Auto scroll interval",
|
|
324
324
|
type: "number",
|
|
325
|
-
value: String(
|
|
326
|
-
onChange: (
|
|
325
|
+
value: String(_.scrollInterval),
|
|
326
|
+
onChange: (a) => _.setScrollInterval(Number(a)),
|
|
327
327
|
min: 0.1,
|
|
328
328
|
max: 100,
|
|
329
329
|
style: {
|
|
@@ -333,109 +333,109 @@ const Tt = "_wrapper_1ibay_2", qt = "_alignmentBlock_1ibay_8", At = "_title_1iba
|
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
] });
|
|
336
|
-
},
|
|
337
|
-
title:
|
|
338
|
-
subtitle:
|
|
339
|
-
header:
|
|
340
|
-
text:
|
|
341
|
-
productsBlock:
|
|
342
|
-
top:
|
|
343
|
-
itemsBlock:
|
|
336
|
+
}, fe = "_title_roi3a_1", xe = "_subtitle_roi3a_5", be = "_header_roi3a_12", je = "_text_roi3a_13", ve = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", Ne = "_itemsBlock_roi3a_35", ke = "_typeTexts_roi3a_41", Ie = "_block_roi3a_48", Ce = "_active_roi3a_61", Se = "_products_roi3a_14", we = "_product_roi3a_14", $e = "_button_roi3a_80", Be = "_disabled_roi3a_91", Pe = "_image_roi3a_95", Me = "_info_roi3a_102", Te = "_name_roi3a_114", qe = "_buttons_roi3a_118", Ae = "_modal_roi3a_125", Oe = "_link_roi3a_145", Ee = "_modalOptions_roi3a_151", ze = "_addButton_roi3a_164", Re = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", D = {
|
|
337
|
+
title: fe,
|
|
338
|
+
subtitle: xe,
|
|
339
|
+
header: be,
|
|
340
|
+
text: je,
|
|
341
|
+
productsBlock: ve,
|
|
342
|
+
top: ye,
|
|
343
|
+
itemsBlock: Ne,
|
|
344
344
|
typeTexts: ke,
|
|
345
345
|
block: Ie,
|
|
346
|
-
active:
|
|
347
|
-
products:
|
|
348
|
-
product:
|
|
349
|
-
button:
|
|
346
|
+
active: Ce,
|
|
347
|
+
products: Se,
|
|
348
|
+
product: we,
|
|
349
|
+
button: $e,
|
|
350
350
|
disabled: Be,
|
|
351
|
-
image:
|
|
352
|
-
info:
|
|
353
|
-
name:
|
|
354
|
-
buttons:
|
|
355
|
-
modal:
|
|
356
|
-
link:
|
|
357
|
-
modalOptions:
|
|
358
|
-
addButton:
|
|
359
|
-
deleteButton:
|
|
360
|
-
closeIcon:
|
|
351
|
+
image: Pe,
|
|
352
|
+
info: Me,
|
|
353
|
+
name: Te,
|
|
354
|
+
buttons: qe,
|
|
355
|
+
modal: Ae,
|
|
356
|
+
link: Oe,
|
|
357
|
+
modalOptions: Ee,
|
|
358
|
+
addButton: ze,
|
|
359
|
+
deleteButton: Re,
|
|
360
|
+
closeIcon: De
|
|
361
361
|
};
|
|
362
|
-
function Le({ product:
|
|
362
|
+
function Le({ product: r, children: o }) {
|
|
363
363
|
const {
|
|
364
364
|
attributes: e,
|
|
365
365
|
listeners: s,
|
|
366
366
|
setNodeRef: n,
|
|
367
|
-
transform:
|
|
368
|
-
transition:
|
|
369
|
-
isDragging:
|
|
367
|
+
transform: g,
|
|
368
|
+
transition: h,
|
|
369
|
+
isDragging: c
|
|
370
370
|
} = ft({
|
|
371
|
-
id:
|
|
371
|
+
id: r.id
|
|
372
372
|
}), p = {
|
|
373
|
-
transform: xt.Transform.toString(
|
|
374
|
-
transition:
|
|
373
|
+
transform: xt.Transform.toString(g),
|
|
374
|
+
transition: h
|
|
375
375
|
};
|
|
376
376
|
return /* @__PURE__ */ t.jsx(
|
|
377
377
|
"div",
|
|
378
378
|
{
|
|
379
379
|
ref: n,
|
|
380
380
|
style: p,
|
|
381
|
-
className: `${
|
|
381
|
+
className: `${D.product} ${c ? D.dragging : ""}`,
|
|
382
382
|
...e,
|
|
383
383
|
...s,
|
|
384
384
|
children: o
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const Kn = (r) => {
|
|
389
389
|
const {
|
|
390
390
|
isActiveItems: o,
|
|
391
391
|
setIsActiveItems: e,
|
|
392
392
|
items: s,
|
|
393
393
|
setItems: n,
|
|
394
|
-
title:
|
|
395
|
-
subtitle:
|
|
396
|
-
editable:
|
|
394
|
+
title: g,
|
|
395
|
+
subtitle: h,
|
|
396
|
+
editable: c = !0,
|
|
397
397
|
draggable: p = !1,
|
|
398
|
-
deletable:
|
|
399
|
-
addable:
|
|
400
|
-
itemsType:
|
|
398
|
+
deletable: I = !0,
|
|
399
|
+
addable: O = !0,
|
|
400
|
+
itemsType: d,
|
|
401
401
|
itemsOptions: i,
|
|
402
|
-
addableOptions:
|
|
403
|
-
limit:
|
|
404
|
-
} =
|
|
405
|
-
mt(
|
|
402
|
+
addableOptions: x = {},
|
|
403
|
+
limit: v
|
|
404
|
+
} = r, [_, y] = f.useState(null), [w, L] = f.useState(null), a = f.useRef(null), $ = ut(
|
|
405
|
+
mt(ht, {
|
|
406
406
|
activationConstraint: {
|
|
407
407
|
distance: 5
|
|
408
408
|
}
|
|
409
409
|
})
|
|
410
410
|
);
|
|
411
411
|
f.useEffect(() => {
|
|
412
|
-
if (
|
|
413
|
-
const
|
|
414
|
-
n(
|
|
412
|
+
if (_) {
|
|
413
|
+
const u = [...s].map((C) => C.id === _.id ? _ : C);
|
|
414
|
+
n(u);
|
|
415
415
|
}
|
|
416
|
-
}, [
|
|
417
|
-
|
|
418
|
-
}, [
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
const
|
|
416
|
+
}, [_]), f.useEffect(() => {
|
|
417
|
+
a.current && w && (a.current.getBoundingClientRect().height, w.top);
|
|
418
|
+
}, [a.current, w]);
|
|
419
|
+
const T = (u, C) => {
|
|
420
|
+
u.stopPropagation();
|
|
421
|
+
const M = u.target.getBoundingClientRect();
|
|
422
422
|
L({
|
|
423
|
-
top:
|
|
424
|
-
left:
|
|
425
|
-
}), y(
|
|
426
|
-
},
|
|
427
|
-
const { active:
|
|
428
|
-
if (
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
|
|
423
|
+
top: M.top + window.scrollY,
|
|
424
|
+
left: M.left - 30
|
|
425
|
+
}), y(C);
|
|
426
|
+
}, Q = (u) => {
|
|
427
|
+
const { active: C, over: M } = u;
|
|
428
|
+
if (M && C.id !== M.id) {
|
|
429
|
+
const l = s.findIndex((S) => S.id === C.id), j = s.findIndex((S) => S.id === M.id);
|
|
430
|
+
if (l !== -1 && j !== -1) {
|
|
431
|
+
const S = [...s], [R] = S.splice(l, 1);
|
|
432
|
+
S.splice(j, 0, R), n(S);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
}, E = (
|
|
436
|
-
const
|
|
435
|
+
}, E = (u, C) => {
|
|
436
|
+
const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
437
437
|
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
438
|
-
|
|
438
|
+
b,
|
|
439
439
|
{
|
|
440
440
|
name: "DotsSixVertical",
|
|
441
441
|
hoverable: !0,
|
|
@@ -443,49 +443,49 @@ const vi = (u) => {
|
|
|
443
443
|
height: 20
|
|
444
444
|
}
|
|
445
445
|
) }),
|
|
446
|
-
|
|
446
|
+
d === "select" && i && /* @__PURE__ */ t.jsx(
|
|
447
447
|
ot,
|
|
448
448
|
{
|
|
449
|
-
onChange: (
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
452
|
-
const
|
|
453
|
-
...
|
|
449
|
+
onChange: (l) => {
|
|
450
|
+
const j = [...s], S = i.find((P) => P.name === l);
|
|
451
|
+
if (!S) return;
|
|
452
|
+
const R = j.map((P) => P.id === u.id ? {
|
|
453
|
+
...S,
|
|
454
454
|
name: {
|
|
455
|
-
"en-US":
|
|
455
|
+
"en-US": l
|
|
456
456
|
}
|
|
457
|
-
} :
|
|
457
|
+
} : P);
|
|
458
458
|
y({
|
|
459
|
-
...
|
|
459
|
+
...u,
|
|
460
460
|
name: {
|
|
461
|
-
"en-US":
|
|
461
|
+
"en-US": l
|
|
462
462
|
}
|
|
463
|
-
}), n([...
|
|
463
|
+
}), n([...R]);
|
|
464
464
|
},
|
|
465
|
-
value:
|
|
466
|
-
options: i.filter((
|
|
465
|
+
value: u.name,
|
|
466
|
+
options: i.filter((l) => !s.find((j) => j.name === l.name)).map((l) => l.name)
|
|
467
467
|
}
|
|
468
468
|
),
|
|
469
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.buttons, children: [
|
|
470
|
+
c && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
471
|
+
b,
|
|
472
472
|
{
|
|
473
473
|
name: "Sliders",
|
|
474
474
|
hoverable: !0,
|
|
475
475
|
width: 20,
|
|
476
476
|
height: 20,
|
|
477
|
-
onClick: (
|
|
477
|
+
onClick: (l) => T(l, u)
|
|
478
478
|
}
|
|
479
479
|
) }),
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
I && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
481
|
+
b,
|
|
482
482
|
{
|
|
483
483
|
name: "Trash",
|
|
484
484
|
hoverable: !0,
|
|
485
485
|
width: 20,
|
|
486
486
|
height: 20,
|
|
487
487
|
fill: "#C12A2A",
|
|
488
|
-
onClick: () => n(s.filter((
|
|
488
|
+
onClick: () => n(s.filter((l) => l.id !== u.id))
|
|
489
489
|
}
|
|
490
490
|
) })
|
|
491
491
|
] })
|
|
@@ -493,49 +493,49 @@ const vi = (u) => {
|
|
|
493
493
|
return p ? /* @__PURE__ */ t.jsx(
|
|
494
494
|
Le,
|
|
495
495
|
{
|
|
496
|
-
product:
|
|
497
|
-
index:
|
|
498
|
-
children:
|
|
496
|
+
product: u,
|
|
497
|
+
index: C,
|
|
498
|
+
children: M
|
|
499
499
|
},
|
|
500
|
-
|
|
500
|
+
u.id
|
|
501
501
|
) : /* @__PURE__ */ t.jsx(
|
|
502
502
|
"div",
|
|
503
503
|
{
|
|
504
|
-
className:
|
|
505
|
-
children:
|
|
504
|
+
className: D.product,
|
|
505
|
+
children: M
|
|
506
506
|
},
|
|
507
|
-
|
|
507
|
+
u.id
|
|
508
508
|
);
|
|
509
509
|
};
|
|
510
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
511
|
-
(
|
|
512
|
-
|
|
510
|
+
return /* @__PURE__ */ t.jsxs("div", { className: D.productsBlock, children: [
|
|
511
|
+
(g || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: D.top, children: [
|
|
512
|
+
g && /* @__PURE__ */ t.jsx("h3", { className: D.title, children: g }),
|
|
513
513
|
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
514
514
|
it,
|
|
515
515
|
{
|
|
516
516
|
current: o,
|
|
517
|
-
onChange: (
|
|
517
|
+
onChange: (u) => e == null ? void 0 : e(u)
|
|
518
518
|
}
|
|
519
519
|
)
|
|
520
520
|
] }),
|
|
521
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
522
|
-
|
|
521
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.products, children: [
|
|
522
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: h }),
|
|
523
523
|
p ? /* @__PURE__ */ t.jsx(
|
|
524
|
-
|
|
524
|
+
pt,
|
|
525
525
|
{
|
|
526
|
-
sensors:
|
|
527
|
-
onDragEnd:
|
|
526
|
+
sensors: $,
|
|
527
|
+
onDragEnd: Q,
|
|
528
528
|
children: /* @__PURE__ */ t.jsx(
|
|
529
|
-
|
|
529
|
+
_t,
|
|
530
530
|
{
|
|
531
|
-
items: s.map((
|
|
531
|
+
items: s.map((u) => u.id),
|
|
532
532
|
strategy: gt,
|
|
533
|
-
children: s.map((
|
|
533
|
+
children: s.map((u, C) => E(u, C))
|
|
534
534
|
}
|
|
535
535
|
)
|
|
536
536
|
}
|
|
537
|
-
) : s.map((
|
|
538
|
-
|
|
537
|
+
) : s.map((u, C) => E(u, C)),
|
|
538
|
+
O && /* @__PURE__ */ t.jsx(
|
|
539
539
|
"div",
|
|
540
540
|
{
|
|
541
541
|
style: {
|
|
@@ -544,37 +544,37 @@ const vi = (u) => {
|
|
|
544
544
|
justifyContent: "center"
|
|
545
545
|
},
|
|
546
546
|
children: /* @__PURE__ */ t.jsx(
|
|
547
|
-
|
|
547
|
+
tt,
|
|
548
548
|
{
|
|
549
549
|
withoutHover: !0,
|
|
550
|
-
className:
|
|
551
|
-
[
|
|
550
|
+
className: V(D.button, {
|
|
551
|
+
[D.disabled]: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length))
|
|
552
552
|
}),
|
|
553
553
|
size: "s",
|
|
554
|
-
disabled: !!(
|
|
554
|
+
disabled: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length)),
|
|
555
555
|
onClick: () => {
|
|
556
|
-
const
|
|
557
|
-
let
|
|
556
|
+
const u = [...s];
|
|
557
|
+
let C = null;
|
|
558
558
|
if (i) {
|
|
559
|
-
for (let
|
|
560
|
-
if (!s.find((
|
|
561
|
-
|
|
559
|
+
for (let M = 0; M < i.length; M++)
|
|
560
|
+
if (!s.find((l) => l.id === i[M].id)) {
|
|
561
|
+
C = i[M];
|
|
562
562
|
break;
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
|
|
566
|
-
name:
|
|
567
|
-
id: (
|
|
568
|
-
...
|
|
569
|
-
}), n(
|
|
565
|
+
d === "select" && i && u.push({
|
|
566
|
+
name: C ? C.name : i[0].name,
|
|
567
|
+
id: (C == null ? void 0 : C.id) || i[0].id,
|
|
568
|
+
...x
|
|
569
|
+
}), n(u);
|
|
570
570
|
},
|
|
571
571
|
style: {
|
|
572
572
|
width: "fit-content"
|
|
573
573
|
},
|
|
574
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
574
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: D.addButton, children: [
|
|
575
575
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
576
576
|
/* @__PURE__ */ t.jsx(
|
|
577
|
-
|
|
577
|
+
b,
|
|
578
578
|
{
|
|
579
579
|
name: "Plus",
|
|
580
580
|
width: 16,
|
|
@@ -589,98 +589,98 @@ const vi = (u) => {
|
|
|
589
589
|
] })
|
|
590
590
|
] });
|
|
591
591
|
};
|
|
592
|
-
function
|
|
593
|
-
const { product: o, children: e } =
|
|
592
|
+
function He(r) {
|
|
593
|
+
const { product: o, children: e } = r, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: p } = ft({
|
|
594
594
|
id: o.id
|
|
595
|
-
}),
|
|
596
|
-
transform: xt.Transform.toString(
|
|
597
|
-
transition:
|
|
595
|
+
}), I = {
|
|
596
|
+
transform: xt.Transform.toString(h),
|
|
597
|
+
transition: c
|
|
598
598
|
};
|
|
599
599
|
return /* @__PURE__ */ t.jsx(
|
|
600
600
|
"div",
|
|
601
601
|
{
|
|
602
|
-
ref:
|
|
603
|
-
style:
|
|
604
|
-
className: `${
|
|
602
|
+
ref: g,
|
|
603
|
+
style: I,
|
|
604
|
+
className: `${U.product} ${p ? U.dragging : ""}`,
|
|
605
605
|
...s,
|
|
606
606
|
...n,
|
|
607
607
|
children: e
|
|
608
608
|
}
|
|
609
609
|
);
|
|
610
610
|
}
|
|
611
|
-
const
|
|
611
|
+
const Zn = (r) => {
|
|
612
612
|
const {
|
|
613
613
|
isActiveItems: o,
|
|
614
614
|
setIsActiveItems: e,
|
|
615
615
|
items: s,
|
|
616
616
|
setItems: n,
|
|
617
|
-
other:
|
|
618
|
-
title:
|
|
619
|
-
subtitle:
|
|
617
|
+
other: g,
|
|
618
|
+
title: h,
|
|
619
|
+
subtitle: c,
|
|
620
620
|
editable: p = !0,
|
|
621
|
-
draggable:
|
|
622
|
-
withImage:
|
|
623
|
-
deletable:
|
|
621
|
+
draggable: I = !1,
|
|
622
|
+
withImage: O = !1,
|
|
623
|
+
deletable: d = !0,
|
|
624
624
|
addable: i = !0,
|
|
625
|
-
itemsType:
|
|
626
|
-
itemsPlaceholder:
|
|
627
|
-
itemsOptions:
|
|
625
|
+
itemsType: x,
|
|
626
|
+
itemsPlaceholder: v = "",
|
|
627
|
+
itemsOptions: _,
|
|
628
628
|
hasRangeSelector: y = !1,
|
|
629
|
-
rangeSelectorOptions:
|
|
629
|
+
rangeSelectorOptions: w,
|
|
630
630
|
modalOptions: L,
|
|
631
|
-
addableOptions:
|
|
632
|
-
} =
|
|
631
|
+
addableOptions: a = {}
|
|
632
|
+
} = r, [$, T] = f.useState(null), [Q, E] = f.useState({
|
|
633
633
|
top: 0,
|
|
634
634
|
left: 0
|
|
635
|
-
}), [
|
|
636
|
-
mt(
|
|
635
|
+
}), [u, C] = f.useState(null), M = f.useRef(null), [l, j] = f.useState(!1), S = ut(
|
|
636
|
+
mt(ht, {
|
|
637
637
|
activationConstraint: {
|
|
638
638
|
distance: 5
|
|
639
639
|
}
|
|
640
640
|
})
|
|
641
641
|
);
|
|
642
642
|
f.useEffect(() => {
|
|
643
|
-
const
|
|
644
|
-
|
|
643
|
+
const m = () => {
|
|
644
|
+
T(null), j(!1);
|
|
645
645
|
};
|
|
646
|
-
return document.body.addEventListener("click",
|
|
647
|
-
|
|
646
|
+
return document.body.addEventListener("click", m), T(null), j(!1), () => {
|
|
647
|
+
T(null), j(!1), document.body.removeEventListener("click", m);
|
|
648
648
|
};
|
|
649
649
|
}, []), f.useEffect(() => {
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
n(
|
|
650
|
+
if ($) {
|
|
651
|
+
const m = [...s].map((q) => q.id === $.id ? $ : q);
|
|
652
|
+
n(m);
|
|
653
653
|
}
|
|
654
|
-
}, [
|
|
655
|
-
if (
|
|
656
|
-
const
|
|
657
|
-
let
|
|
658
|
-
|
|
659
|
-
top:
|
|
660
|
-
left:
|
|
654
|
+
}, [$]), f.useEffect(() => {
|
|
655
|
+
if (M.current && u) {
|
|
656
|
+
const m = M.current.getBoundingClientRect().height, q = window.innerHeight;
|
|
657
|
+
let B = u.top;
|
|
658
|
+
B + m > q + window.scrollY - 200 && (B = q + window.scrollY - m - 200), B < 0 && (B = 10), E({
|
|
659
|
+
top: B,
|
|
660
|
+
left: u.left
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
}, [
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
top:
|
|
669
|
-
left:
|
|
670
|
-
}), q
|
|
663
|
+
}, [M.current, u]);
|
|
664
|
+
const R = (m, q) => {
|
|
665
|
+
m.stopPropagation();
|
|
666
|
+
const B = m.target.getBoundingClientRect();
|
|
667
|
+
C({
|
|
668
|
+
top: B.top + window.scrollY,
|
|
669
|
+
left: B.left - 30
|
|
670
|
+
}), T(q), j(!0);
|
|
671
671
|
};
|
|
672
|
-
function
|
|
673
|
-
if (
|
|
674
|
-
return
|
|
672
|
+
function P(m) {
|
|
673
|
+
if (O)
|
|
674
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
675
675
|
"img",
|
|
676
676
|
{
|
|
677
|
-
src: `https://imagedelivery.net/${
|
|
677
|
+
src: `https://imagedelivery.net/${m[0]}/w=1000`,
|
|
678
678
|
alt: "image",
|
|
679
679
|
width: 16,
|
|
680
680
|
height: 16
|
|
681
681
|
}
|
|
682
682
|
) : /* @__PURE__ */ t.jsx(
|
|
683
|
-
|
|
683
|
+
b,
|
|
684
684
|
{
|
|
685
685
|
name: "Image",
|
|
686
686
|
width: 16,
|
|
@@ -689,20 +689,20 @@ const yi = (u) => {
|
|
|
689
689
|
}
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
const { active:
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
|
|
692
|
+
const z = (m) => {
|
|
693
|
+
const { active: q, over: B } = m;
|
|
694
|
+
if (B && q.id !== B.id) {
|
|
695
|
+
const A = s.findIndex((H) => H.id === q.id), et = s.findIndex((H) => H.id === B.id);
|
|
696
|
+
if (A !== -1 && et !== -1) {
|
|
697
|
+
const H = [...s], [X] = H.splice(A, 1);
|
|
698
|
+
H.splice(et, 0, X), n(H);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
},
|
|
702
|
-
var
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
701
|
+
}, J = (m) => {
|
|
702
|
+
var B;
|
|
703
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
704
|
+
I && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
705
|
+
b,
|
|
706
706
|
{
|
|
707
707
|
name: "DotsSixVertical",
|
|
708
708
|
hoverable: !0,
|
|
@@ -710,139 +710,139 @@ const yi = (u) => {
|
|
|
710
710
|
height: 20
|
|
711
711
|
}
|
|
712
712
|
) }),
|
|
713
|
-
|
|
713
|
+
x === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
714
714
|
ot,
|
|
715
715
|
{
|
|
716
|
-
onChange: (
|
|
717
|
-
const
|
|
718
|
-
...
|
|
716
|
+
onChange: (A) => {
|
|
717
|
+
const H = [...s].map((X) => X.id === m.id ? {
|
|
718
|
+
...m,
|
|
719
719
|
name: {
|
|
720
|
-
"en-US":
|
|
720
|
+
"en-US": A
|
|
721
721
|
}
|
|
722
722
|
} : X);
|
|
723
|
-
|
|
724
|
-
...
|
|
723
|
+
T({
|
|
724
|
+
...m,
|
|
725
725
|
name: {
|
|
726
|
-
"en-US":
|
|
726
|
+
"en-US": A
|
|
727
727
|
}
|
|
728
|
-
}), n([...
|
|
728
|
+
}), n([...H]);
|
|
729
729
|
},
|
|
730
|
-
value:
|
|
731
|
-
options:
|
|
732
|
-
(
|
|
730
|
+
value: m.name["en-US"],
|
|
731
|
+
options: _.filter(
|
|
732
|
+
(A) => !s.find((et) => et.name["en-US"] === A)
|
|
733
733
|
),
|
|
734
|
-
leftAddon:
|
|
734
|
+
leftAddon: P(m.images)
|
|
735
735
|
}
|
|
736
736
|
),
|
|
737
|
-
|
|
737
|
+
x === "input" && /* @__PURE__ */ t.jsx(
|
|
738
738
|
rt,
|
|
739
739
|
{
|
|
740
|
-
onChange: (
|
|
741
|
-
const
|
|
742
|
-
...
|
|
740
|
+
onChange: (A) => {
|
|
741
|
+
const H = [...s].map((X) => X.id === m.id ? {
|
|
742
|
+
...m,
|
|
743
743
|
name: {
|
|
744
|
-
"en-US":
|
|
744
|
+
"en-US": A
|
|
745
745
|
}
|
|
746
746
|
} : X);
|
|
747
|
-
n([...
|
|
747
|
+
n([...H]);
|
|
748
748
|
},
|
|
749
|
-
value:
|
|
750
|
-
placeholder:
|
|
749
|
+
value: m.name["en-US"],
|
|
750
|
+
placeholder: v
|
|
751
751
|
}
|
|
752
752
|
),
|
|
753
|
-
|
|
754
|
-
|
|
753
|
+
x === "image" && /* @__PURE__ */ t.jsx(
|
|
754
|
+
St,
|
|
755
755
|
{
|
|
756
|
-
onChange: (
|
|
757
|
-
const
|
|
758
|
-
...
|
|
759
|
-
images:
|
|
756
|
+
onChange: (A) => {
|
|
757
|
+
const H = [...s].map((X) => X.id === m.id ? {
|
|
758
|
+
...m,
|
|
759
|
+
images: A
|
|
760
760
|
} : X);
|
|
761
|
-
n([...
|
|
761
|
+
n([...H]);
|
|
762
762
|
},
|
|
763
|
-
activeImage: (
|
|
763
|
+
activeImage: (B = s.find((A) => A.id === m.id)) == null ? void 0 : B.images[0]
|
|
764
764
|
}
|
|
765
765
|
),
|
|
766
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
767
|
-
p && /* @__PURE__ */ t.jsx("div", { className:
|
|
768
|
-
|
|
766
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
|
|
767
|
+
p && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
768
|
+
b,
|
|
769
769
|
{
|
|
770
770
|
name: "Sliders",
|
|
771
771
|
hoverable: !0,
|
|
772
772
|
width: 20,
|
|
773
773
|
height: 20,
|
|
774
|
-
onClick: (
|
|
774
|
+
onClick: (A) => R(A, m)
|
|
775
775
|
}
|
|
776
776
|
) }),
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
d && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
778
|
+
b,
|
|
779
779
|
{
|
|
780
780
|
name: "Trash",
|
|
781
781
|
hoverable: !0,
|
|
782
782
|
width: 20,
|
|
783
783
|
height: 20,
|
|
784
784
|
fill: "#C12A2A",
|
|
785
|
-
onClick: () => n(s.filter((
|
|
785
|
+
onClick: () => n(s.filter((A) => A.id !== m.id))
|
|
786
786
|
}
|
|
787
787
|
) })
|
|
788
788
|
] })
|
|
789
789
|
] });
|
|
790
|
-
return
|
|
791
|
-
|
|
790
|
+
return I ? /* @__PURE__ */ t.jsx(
|
|
791
|
+
He,
|
|
792
792
|
{
|
|
793
|
-
product:
|
|
794
|
-
children:
|
|
793
|
+
product: m,
|
|
794
|
+
children: q
|
|
795
795
|
},
|
|
796
|
-
|
|
796
|
+
m.id
|
|
797
797
|
) : /* @__PURE__ */ t.jsx(
|
|
798
798
|
"div",
|
|
799
799
|
{
|
|
800
|
-
className:
|
|
801
|
-
children:
|
|
800
|
+
className: U.product,
|
|
801
|
+
children: q
|
|
802
802
|
},
|
|
803
|
-
|
|
803
|
+
m.id
|
|
804
804
|
);
|
|
805
805
|
};
|
|
806
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
807
|
-
(
|
|
808
|
-
|
|
806
|
+
return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
|
|
807
|
+
(h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
|
|
808
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
|
|
809
809
|
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
810
810
|
it,
|
|
811
811
|
{
|
|
812
812
|
current: o,
|
|
813
|
-
onChange: (
|
|
813
|
+
onChange: (m) => e == null ? void 0 : e(m)
|
|
814
814
|
}
|
|
815
815
|
)
|
|
816
816
|
] }),
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
$ && p && L && l && /* @__PURE__ */ t.jsx(
|
|
818
|
+
Ct,
|
|
819
819
|
{
|
|
820
|
-
ref:
|
|
821
|
-
activeItem:
|
|
822
|
-
setActiveItem:
|
|
823
|
-
popupPosition:
|
|
820
|
+
ref: M,
|
|
821
|
+
activeItem: $,
|
|
822
|
+
setActiveItem: T,
|
|
823
|
+
popupPosition: Q,
|
|
824
824
|
modalOptions: L,
|
|
825
|
-
setIsOpenModal:
|
|
825
|
+
setIsOpenModal: j
|
|
826
826
|
}
|
|
827
827
|
),
|
|
828
|
-
y &&
|
|
829
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
828
|
+
y && w && /* @__PURE__ */ t.jsx(vt, { ...w }),
|
|
829
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
|
|
830
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: c }),
|
|
831
|
+
I ? /* @__PURE__ */ t.jsx(
|
|
832
|
+
pt,
|
|
833
833
|
{
|
|
834
|
-
sensors:
|
|
835
|
-
onDragEnd:
|
|
834
|
+
sensors: S,
|
|
835
|
+
onDragEnd: z,
|
|
836
836
|
children: /* @__PURE__ */ t.jsx(
|
|
837
|
-
|
|
837
|
+
_t,
|
|
838
838
|
{
|
|
839
|
-
items: s.map((
|
|
839
|
+
items: s.map((m) => m.id),
|
|
840
840
|
strategy: gt,
|
|
841
|
-
children: s.map((
|
|
841
|
+
children: s.map((m) => J(m))
|
|
842
842
|
}
|
|
843
843
|
)
|
|
844
844
|
}
|
|
845
|
-
) : s.map((
|
|
845
|
+
) : s.map((m) => J(m)),
|
|
846
846
|
i && /* @__PURE__ */ t.jsx(
|
|
847
847
|
"div",
|
|
848
848
|
{
|
|
@@ -852,52 +852,52 @@ const yi = (u) => {
|
|
|
852
852
|
justifyContent: "center"
|
|
853
853
|
},
|
|
854
854
|
children: /* @__PURE__ */ t.jsx(
|
|
855
|
-
|
|
855
|
+
tt,
|
|
856
856
|
{
|
|
857
857
|
withoutHover: !0,
|
|
858
|
-
className:
|
|
858
|
+
className: U.button,
|
|
859
859
|
size: "s",
|
|
860
860
|
onClick: () => {
|
|
861
|
-
const
|
|
862
|
-
let
|
|
863
|
-
if (
|
|
864
|
-
for (let
|
|
865
|
-
if (!s.find((
|
|
866
|
-
|
|
861
|
+
const m = [...s];
|
|
862
|
+
let q = null;
|
|
863
|
+
if (_) {
|
|
864
|
+
for (let B = 0; B < _.length; B++)
|
|
865
|
+
if (!s.find((A) => A.name["en-US"] === _[B])) {
|
|
866
|
+
q = _[B];
|
|
867
867
|
break;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
|
|
870
|
+
x === "select" && _ ? m.push({
|
|
871
871
|
name: {
|
|
872
|
-
"en-US":
|
|
872
|
+
"en-US": q || _[0]
|
|
873
873
|
},
|
|
874
874
|
id: nt(),
|
|
875
|
-
...
|
|
875
|
+
...a,
|
|
876
876
|
maxSymbols: 100
|
|
877
877
|
// пример значения
|
|
878
|
-
}) :
|
|
878
|
+
}) : x === "input" ? m.push({
|
|
879
879
|
name: {
|
|
880
880
|
"en-US": ""
|
|
881
881
|
},
|
|
882
882
|
id: nt(),
|
|
883
|
-
...
|
|
883
|
+
...a,
|
|
884
884
|
maxSymbols: 100
|
|
885
|
-
}) :
|
|
885
|
+
}) : m.push({
|
|
886
886
|
name: {
|
|
887
887
|
"en-US": `Image ${s.length + 1}`
|
|
888
888
|
},
|
|
889
889
|
id: nt(),
|
|
890
|
-
...
|
|
890
|
+
...a,
|
|
891
891
|
maxSymbols: 100
|
|
892
|
-
}), n(
|
|
892
|
+
}), n(m);
|
|
893
893
|
},
|
|
894
894
|
style: {
|
|
895
895
|
width: "fit-content"
|
|
896
896
|
},
|
|
897
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
897
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
|
|
898
898
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
899
899
|
/* @__PURE__ */ t.jsx(
|
|
900
|
-
|
|
900
|
+
b,
|
|
901
901
|
{
|
|
902
902
|
name: "Plus",
|
|
903
903
|
width: 16,
|
|
@@ -910,108 +910,101 @@ const yi = (u) => {
|
|
|
910
910
|
}
|
|
911
911
|
)
|
|
912
912
|
] }),
|
|
913
|
-
|
|
913
|
+
g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
|
|
914
914
|
] });
|
|
915
|
-
}, Ue = "_subtitle_jql1y_1",
|
|
915
|
+
}, Ue = "_subtitle_jql1y_1", Fe = "_header_jql1y_8", Ve = "_text_jql1y_9", Ye = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Ge = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Xe = "_typeTexts_jql1y_38", Je = "_block_jql1y_45", Ke = "_active_jql1y_58", Ze = "_products_jql1y_10", ts = "_product_jql1y_10", es = "_button_jql1y_11", ss = "_image_jql1y_88", ns = "_info_jql1y_95", is = "_name_jql1y_107", os = "_buttons_jql1y_11", as = "_modal_jql1y_118", cs = "_other_jql1y_138", ls = "_options_jql1y_144", rs = "_addButton_jql1y_150", ds = "_deleteButton_jql1y_165", K = {
|
|
916
916
|
subtitle: Ue,
|
|
917
|
-
header:
|
|
918
|
-
text:
|
|
919
|
-
productsBlock:
|
|
920
|
-
buttonsBlock:
|
|
921
|
-
top:
|
|
922
|
-
itemsBlock:
|
|
917
|
+
header: Fe,
|
|
918
|
+
text: Ve,
|
|
919
|
+
productsBlock: Ye,
|
|
920
|
+
buttonsBlock: We,
|
|
921
|
+
top: Ge,
|
|
922
|
+
itemsBlock: Qe,
|
|
923
923
|
typeTexts: Xe,
|
|
924
|
-
block:
|
|
925
|
-
active:
|
|
926
|
-
products:
|
|
927
|
-
product:
|
|
928
|
-
button:
|
|
929
|
-
image:
|
|
930
|
-
info:
|
|
931
|
-
name:
|
|
932
|
-
buttons:
|
|
933
|
-
modal:
|
|
934
|
-
other:
|
|
935
|
-
options:
|
|
936
|
-
addButton:
|
|
937
|
-
deleteButton:
|
|
938
|
-
},
|
|
939
|
-
const { buttons: o, setButtons: e, deletable: s = !0, addable: n = !0, editableLink:
|
|
924
|
+
block: Je,
|
|
925
|
+
active: Ke,
|
|
926
|
+
products: Ze,
|
|
927
|
+
product: ts,
|
|
928
|
+
button: es,
|
|
929
|
+
image: ss,
|
|
930
|
+
info: ns,
|
|
931
|
+
name: is,
|
|
932
|
+
buttons: os,
|
|
933
|
+
modal: as,
|
|
934
|
+
other: cs,
|
|
935
|
+
options: ls,
|
|
936
|
+
addButton: rs,
|
|
937
|
+
deleteButton: ds
|
|
938
|
+
}, us = (r) => {
|
|
939
|
+
const { buttons: o, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: g = !0 } = r, { pages: h } = wt(), [c, p] = f.useState(null), [I, O] = f.useState({
|
|
940
940
|
top: 0,
|
|
941
941
|
left: 0
|
|
942
|
-
}), [
|
|
942
|
+
}), [d, i] = f.useState(null), x = f.useRef(null);
|
|
943
943
|
f.useEffect(() => {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
return document.body.addEventListener("click", l), a(null), () => {
|
|
948
|
-
a(null), document.body.removeEventListener("click", l);
|
|
949
|
-
};
|
|
950
|
-
}, []), f.useEffect(() => {
|
|
951
|
-
if (r) {
|
|
952
|
-
const l = [...o].map((x) => x.id === r.id ? r : x);
|
|
953
|
-
e(l);
|
|
944
|
+
if (c) {
|
|
945
|
+
const _ = [...o].map((y) => y.id === c.id ? c : y);
|
|
946
|
+
e(_);
|
|
954
947
|
}
|
|
955
|
-
}, [
|
|
956
|
-
if (
|
|
957
|
-
const
|
|
958
|
-
let
|
|
959
|
-
|
|
960
|
-
top:
|
|
961
|
-
left:
|
|
948
|
+
}, [c]), f.useEffect(() => {
|
|
949
|
+
if (x.current && d) {
|
|
950
|
+
const _ = x.current.getBoundingClientRect().height, y = window.innerHeight;
|
|
951
|
+
let w = d.top;
|
|
952
|
+
w + _ > y + window.scrollY - 200 && (w = y + window.scrollY - _ - 200), w < 0 && (w = 10), O({
|
|
953
|
+
top: w,
|
|
954
|
+
left: d.left
|
|
962
955
|
});
|
|
963
956
|
}
|
|
964
|
-
}, [
|
|
965
|
-
const v = (
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
top:
|
|
970
|
-
left:
|
|
971
|
-
}),
|
|
957
|
+
}, [x.current, d]);
|
|
958
|
+
const v = (_, y) => {
|
|
959
|
+
_.stopPropagation();
|
|
960
|
+
const w = _.target.getBoundingClientRect();
|
|
961
|
+
i({
|
|
962
|
+
top: w.top + window.scrollY - 70,
|
|
963
|
+
left: w.left - (n ? 30 : 65)
|
|
964
|
+
}), p(y);
|
|
972
965
|
};
|
|
973
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
974
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
975
|
-
o.map((
|
|
966
|
+
return /* @__PURE__ */ t.jsxs("div", { className: K.products, children: [
|
|
967
|
+
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Button Type" }),
|
|
968
|
+
o.map((_) => /* @__PURE__ */ t.jsxs(
|
|
976
969
|
"div",
|
|
977
970
|
{
|
|
978
|
-
className:
|
|
971
|
+
className: K.product,
|
|
979
972
|
children: [
|
|
980
973
|
/* @__PURE__ */ t.jsx(
|
|
981
974
|
ot,
|
|
982
975
|
{
|
|
983
|
-
onChange: (
|
|
984
|
-
const
|
|
985
|
-
...
|
|
986
|
-
type:
|
|
987
|
-
} :
|
|
988
|
-
e(
|
|
976
|
+
onChange: (y) => {
|
|
977
|
+
const L = [...o].map((a) => a.id === _.id ? {
|
|
978
|
+
..._,
|
|
979
|
+
type: y
|
|
980
|
+
} : a);
|
|
981
|
+
e(L);
|
|
989
982
|
},
|
|
990
|
-
value:
|
|
983
|
+
value: _.type,
|
|
991
984
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
992
985
|
}
|
|
993
986
|
),
|
|
994
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
995
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
996
|
-
|
|
987
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.buttons, children: [
|
|
988
|
+
/* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
989
|
+
b,
|
|
997
990
|
{
|
|
998
991
|
name: "Sliders",
|
|
999
992
|
hoverable: !0,
|
|
1000
993
|
width: 20,
|
|
1001
994
|
height: 20,
|
|
1002
|
-
onClick: (
|
|
1003
|
-
v(
|
|
995
|
+
onClick: (y) => {
|
|
996
|
+
v(y, _);
|
|
1004
997
|
}
|
|
1005
998
|
}
|
|
1006
999
|
) }),
|
|
1007
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1008
|
-
|
|
1000
|
+
s && /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1001
|
+
b,
|
|
1009
1002
|
{
|
|
1010
1003
|
name: "Trash",
|
|
1011
1004
|
hoverable: !0,
|
|
1012
1005
|
onClick: () => {
|
|
1013
|
-
const
|
|
1014
|
-
e(
|
|
1006
|
+
const y = o.filter((w) => w.id !== _.id);
|
|
1007
|
+
e(y);
|
|
1015
1008
|
},
|
|
1016
1009
|
width: 20,
|
|
1017
1010
|
height: 20,
|
|
@@ -1021,16 +1014,16 @@ const yi = (u) => {
|
|
|
1021
1014
|
] })
|
|
1022
1015
|
]
|
|
1023
1016
|
},
|
|
1024
|
-
|
|
1017
|
+
_.id
|
|
1025
1018
|
)),
|
|
1026
|
-
|
|
1027
|
-
|
|
1019
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1020
|
+
$t,
|
|
1028
1021
|
{
|
|
1029
|
-
ref:
|
|
1030
|
-
activeButton:
|
|
1031
|
-
setActiveButton:
|
|
1032
|
-
popupPosition:
|
|
1033
|
-
editableLink:
|
|
1022
|
+
ref: x,
|
|
1023
|
+
activeButton: c,
|
|
1024
|
+
setActiveButton: p,
|
|
1025
|
+
popupPosition: I,
|
|
1026
|
+
editableLink: g
|
|
1034
1027
|
}
|
|
1035
1028
|
),
|
|
1036
1029
|
n && /* @__PURE__ */ t.jsx(
|
|
@@ -1042,14 +1035,14 @@ const yi = (u) => {
|
|
|
1042
1035
|
justifyContent: "center"
|
|
1043
1036
|
},
|
|
1044
1037
|
children: /* @__PURE__ */ t.jsx(
|
|
1045
|
-
|
|
1038
|
+
tt,
|
|
1046
1039
|
{
|
|
1047
1040
|
withoutHover: !0,
|
|
1048
|
-
className:
|
|
1041
|
+
className: K.button,
|
|
1049
1042
|
size: "s",
|
|
1050
1043
|
onClick: () => {
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1044
|
+
const _ = [...o];
|
|
1045
|
+
g ? _.push({
|
|
1053
1046
|
type: "Primary",
|
|
1054
1047
|
id: nt(),
|
|
1055
1048
|
typesText: [],
|
|
@@ -1057,9 +1050,9 @@ const yi = (u) => {
|
|
|
1057
1050
|
"en-US": "Button Name"
|
|
1058
1051
|
},
|
|
1059
1052
|
destination: "Go to Page",
|
|
1060
|
-
page: "",
|
|
1053
|
+
page: h ? Object.values(h)[0].name : "Home",
|
|
1061
1054
|
openInNewTab: !1
|
|
1062
|
-
}) :
|
|
1055
|
+
}) : _.push({
|
|
1063
1056
|
type: "Primary",
|
|
1064
1057
|
id: nt(),
|
|
1065
1058
|
typesText: [],
|
|
@@ -1067,17 +1060,17 @@ const yi = (u) => {
|
|
|
1067
1060
|
"en-US": "Create Ticket"
|
|
1068
1061
|
},
|
|
1069
1062
|
destination: "Go to Page",
|
|
1070
|
-
page: "",
|
|
1063
|
+
page: h ? Object.values(h)[0].name : "Home",
|
|
1071
1064
|
openInNewTab: !1
|
|
1072
|
-
}), e(
|
|
1065
|
+
}), e(_);
|
|
1073
1066
|
},
|
|
1074
1067
|
style: {
|
|
1075
1068
|
width: "fit-content"
|
|
1076
1069
|
},
|
|
1077
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1070
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: K.addButton, children: [
|
|
1078
1071
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1079
1072
|
/* @__PURE__ */ t.jsx(
|
|
1080
|
-
|
|
1073
|
+
b,
|
|
1081
1074
|
{
|
|
1082
1075
|
name: "Plus",
|
|
1083
1076
|
width: 16,
|
|
@@ -1090,8 +1083,8 @@ const yi = (u) => {
|
|
|
1090
1083
|
}
|
|
1091
1084
|
)
|
|
1092
1085
|
] });
|
|
1093
|
-
},
|
|
1094
|
-
const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: n, editableLink:
|
|
1086
|
+
}, ti = (r) => {
|
|
1087
|
+
const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: n, editableLink: g = !0 } = r;
|
|
1095
1088
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: lt.buttonsBlock, children: [
|
|
1096
1089
|
/* @__PURE__ */ t.jsxs("div", { className: lt.top, children: [
|
|
1097
1090
|
/* @__PURE__ */ t.jsx("h3", { className: lt.title, children: "Buttons" }),
|
|
@@ -1099,170 +1092,101 @@ const yi = (u) => {
|
|
|
1099
1092
|
it,
|
|
1100
1093
|
{
|
|
1101
1094
|
current: o,
|
|
1102
|
-
onChange: (
|
|
1095
|
+
onChange: (h) => e(h)
|
|
1103
1096
|
}
|
|
1104
1097
|
)
|
|
1105
1098
|
] }),
|
|
1106
|
-
/* @__PURE__ */ t.jsx(
|
|
1107
|
-
|
|
1099
|
+
o && /* @__PURE__ */ t.jsx(
|
|
1100
|
+
us,
|
|
1108
1101
|
{
|
|
1109
1102
|
buttons: s,
|
|
1110
1103
|
setButtons: n,
|
|
1111
|
-
editableLink:
|
|
1104
|
+
editableLink: g
|
|
1112
1105
|
}
|
|
1113
1106
|
)
|
|
1114
1107
|
] }) });
|
|
1115
|
-
}, us = "_title_1ropb_1", ms = "_subtitle_1ropb_5", ps = "_header_1ropb_12", _s = "_text_1ropb_13", hs = "_productsBlock_1ropb_14", gs = "_top_1ropb_26", fs = "_itemsBlock_1ropb_35", xs = "_typeTexts_1ropb_41", bs = "_block_1ropb_48", js = "_active_1ropb_61", vs = "_products_1ropb_14", ys = "_product_1ropb_14", ks = "_button_1ropb_80", Is = "_image_1ropb_91", Ns = "_info_1ropb_98", Cs = "_name_1ropb_110", $s = "_buttons_1ropb_114", Ss = "_modal_1ropb_121", Bs = "_link_1ropb_142", ws = "_modalOptions_1ropb_148", Ps = "_addButton_1ropb_161", Ms = "_deleteButton_1ropb_176", Ts = "_closeIcon_1ropb_188", D = {
|
|
1116
|
-
title: us,
|
|
1117
|
-
subtitle: ms,
|
|
1118
|
-
header: ps,
|
|
1119
|
-
text: _s,
|
|
1120
|
-
productsBlock: hs,
|
|
1121
|
-
top: gs,
|
|
1122
|
-
itemsBlock: fs,
|
|
1123
|
-
typeTexts: xs,
|
|
1124
|
-
block: bs,
|
|
1125
|
-
active: js,
|
|
1126
|
-
products: vs,
|
|
1127
|
-
product: ys,
|
|
1128
|
-
button: ks,
|
|
1129
|
-
image: Is,
|
|
1130
|
-
info: Ns,
|
|
1131
|
-
name: Cs,
|
|
1132
|
-
buttons: $s,
|
|
1133
|
-
modal: Ss,
|
|
1134
|
-
link: Bs,
|
|
1135
|
-
modalOptions: ws,
|
|
1136
|
-
addButton: Ps,
|
|
1137
|
-
deleteButton: Ms,
|
|
1138
|
-
closeIcon: Ts
|
|
1139
|
-
}, qs = (u) => {
|
|
1140
|
-
const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: n, itemsOptions: _ } = u, r = _.find((a) => a.id === o.listingId);
|
|
1141
|
-
return r ? /* @__PURE__ */ t.jsxs(
|
|
1142
|
-
"div",
|
|
1143
|
-
{
|
|
1144
|
-
className: D.modal,
|
|
1145
|
-
onClick: (a) => {
|
|
1146
|
-
a.stopPropagation();
|
|
1147
|
-
},
|
|
1148
|
-
style: {
|
|
1149
|
-
top: `${s.top}px`,
|
|
1150
|
-
left: `${s.left}px`
|
|
1151
|
-
},
|
|
1152
|
-
children: [
|
|
1153
|
-
/* @__PURE__ */ t.jsxs("div", { className: D.top, children: [
|
|
1154
|
-
/* @__PURE__ */ t.jsx("h3", { children: Bt(r.productData.name) }),
|
|
1155
|
-
/* @__PURE__ */ t.jsx("div", { className: D.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1156
|
-
j,
|
|
1157
|
-
{
|
|
1158
|
-
name: "X",
|
|
1159
|
-
height: 20,
|
|
1160
|
-
width: 20,
|
|
1161
|
-
onClick: () => {
|
|
1162
|
-
n(!1), e(null);
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
) })
|
|
1166
|
-
] }),
|
|
1167
|
-
/* @__PURE__ */ t.jsx("div", { className: D.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1168
|
-
yt,
|
|
1169
|
-
{
|
|
1170
|
-
label: "Put up an attractive image",
|
|
1171
|
-
activeImage: r.productData.images.length > 0 ? r.productData.images[0].cfId : void 0,
|
|
1172
|
-
onChange: (a) => {
|
|
1173
|
-
const p = {
|
|
1174
|
-
...o,
|
|
1175
|
-
image: a[0]
|
|
1176
|
-
};
|
|
1177
|
-
e(p);
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
) })
|
|
1181
|
-
]
|
|
1182
|
-
}
|
|
1183
|
-
) : null;
|
|
1184
1108
|
};
|
|
1185
|
-
function
|
|
1186
|
-
const { product: o, children: e } =
|
|
1109
|
+
function ms(r) {
|
|
1110
|
+
const { product: o, children: e } = r, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: p } = ft({
|
|
1187
1111
|
id: String(o.listingId)
|
|
1188
|
-
}),
|
|
1189
|
-
transform: xt.Transform.toString(
|
|
1190
|
-
transition:
|
|
1112
|
+
}), I = {
|
|
1113
|
+
transform: xt.Transform.toString(h),
|
|
1114
|
+
transition: c
|
|
1191
1115
|
};
|
|
1192
1116
|
return /* @__PURE__ */ t.jsx(
|
|
1193
1117
|
"div",
|
|
1194
1118
|
{
|
|
1195
|
-
ref:
|
|
1196
|
-
style:
|
|
1197
|
-
className: `${
|
|
1119
|
+
ref: g,
|
|
1120
|
+
style: I,
|
|
1121
|
+
className: `${F.product} ${p ? F.dragging : ""}`,
|
|
1198
1122
|
...s,
|
|
1199
1123
|
...n,
|
|
1200
1124
|
children: e
|
|
1201
1125
|
}
|
|
1202
1126
|
);
|
|
1203
1127
|
}
|
|
1204
|
-
const
|
|
1128
|
+
const ei = (r) => {
|
|
1205
1129
|
const {
|
|
1206
1130
|
isActiveItems: o,
|
|
1207
1131
|
setIsActiveItems: e,
|
|
1208
1132
|
items: s,
|
|
1209
1133
|
setItems: n,
|
|
1210
|
-
other:
|
|
1211
|
-
title:
|
|
1212
|
-
subtitle:
|
|
1134
|
+
other: g,
|
|
1135
|
+
title: h,
|
|
1136
|
+
subtitle: c,
|
|
1213
1137
|
editable: p = !0,
|
|
1214
|
-
draggable:
|
|
1215
|
-
withImage:
|
|
1216
|
-
deletable:
|
|
1138
|
+
draggable: I = !1,
|
|
1139
|
+
withImage: O = !1,
|
|
1140
|
+
deletable: d = !0,
|
|
1217
1141
|
addable: i = !0,
|
|
1218
|
-
itemsType:
|
|
1219
|
-
itemsOptions:
|
|
1220
|
-
} =
|
|
1142
|
+
itemsType: x,
|
|
1143
|
+
itemsOptions: v
|
|
1144
|
+
} = r, [_, y] = f.useState(
|
|
1221
1145
|
null
|
|
1222
|
-
), [
|
|
1146
|
+
), [w, L] = f.useState({
|
|
1223
1147
|
top: 0,
|
|
1224
1148
|
left: 0
|
|
1225
|
-
}), [
|
|
1226
|
-
mt(
|
|
1149
|
+
}), [a, $] = f.useState(!1), T = ut(
|
|
1150
|
+
mt(ht, {
|
|
1227
1151
|
activationConstraint: {
|
|
1228
1152
|
distance: 5
|
|
1229
1153
|
}
|
|
1230
1154
|
})
|
|
1231
1155
|
);
|
|
1232
1156
|
f.useEffect(() => {
|
|
1233
|
-
const
|
|
1234
|
-
y(null),
|
|
1157
|
+
const l = () => {
|
|
1158
|
+
y(null), $(!1);
|
|
1235
1159
|
};
|
|
1236
|
-
return document.body.addEventListener("click",
|
|
1237
|
-
y(null),
|
|
1160
|
+
return document.body.addEventListener("click", l), y(null), $(!1), () => {
|
|
1161
|
+
y(null), $(!1), document.body.removeEventListener("click", l);
|
|
1238
1162
|
};
|
|
1239
1163
|
}, []), f.useEffect(() => {
|
|
1240
|
-
if (
|
|
1241
|
-
const
|
|
1242
|
-
n(
|
|
1164
|
+
if (_) {
|
|
1165
|
+
const l = [...s].map((j) => j.listingId === _.listingId ? _ : j);
|
|
1166
|
+
n(l);
|
|
1243
1167
|
}
|
|
1244
|
-
}, [
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1248
|
-
let
|
|
1249
|
-
|
|
1250
|
-
top:
|
|
1251
|
-
left:
|
|
1252
|
-
}), y(
|
|
1168
|
+
}, [_]);
|
|
1169
|
+
const Q = (l, j) => {
|
|
1170
|
+
l.stopPropagation();
|
|
1171
|
+
const S = l.target.getBoundingClientRect(), R = 100, P = window.innerHeight;
|
|
1172
|
+
let z = S.top + window.scrollY;
|
|
1173
|
+
z + R > P && (z = P - R - 20), $(!0), L({
|
|
1174
|
+
top: z - 80,
|
|
1175
|
+
left: S.left - 30
|
|
1176
|
+
}), y(j);
|
|
1253
1177
|
};
|
|
1254
|
-
function E(
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1178
|
+
function E(l) {
|
|
1179
|
+
if (O)
|
|
1180
|
+
return l ? /* @__PURE__ */ t.jsx(
|
|
1257
1181
|
"img",
|
|
1258
1182
|
{
|
|
1259
|
-
src: `https://imagedelivery.net/${
|
|
1183
|
+
src: `https://imagedelivery.net/${l}/w=1000`,
|
|
1260
1184
|
alt: "image",
|
|
1261
1185
|
width: 16,
|
|
1262
1186
|
height: 16
|
|
1263
1187
|
}
|
|
1264
1188
|
) : /* @__PURE__ */ t.jsx(
|
|
1265
|
-
|
|
1189
|
+
b,
|
|
1266
1190
|
{
|
|
1267
1191
|
name: "Image",
|
|
1268
1192
|
width: 16,
|
|
@@ -1271,21 +1195,21 @@ const Ii = (u) => {
|
|
|
1271
1195
|
}
|
|
1272
1196
|
);
|
|
1273
1197
|
}
|
|
1274
|
-
const
|
|
1275
|
-
const { active:
|
|
1276
|
-
if (
|
|
1277
|
-
const
|
|
1278
|
-
if (
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1198
|
+
const u = (l) => {
|
|
1199
|
+
const { active: j, over: S } = l;
|
|
1200
|
+
if (S && j.id !== S.id) {
|
|
1201
|
+
const R = s.findIndex((z) => String(z.listingId) === j.id), P = s.findIndex((z) => String(z.listingId) === S.id);
|
|
1202
|
+
if (R !== -1 && P !== -1) {
|
|
1203
|
+
const z = [...s], [J] = z.splice(R, 1);
|
|
1204
|
+
z.splice(P, 0, J), n(z);
|
|
1281
1205
|
}
|
|
1282
1206
|
}
|
|
1283
|
-
},
|
|
1284
|
-
const
|
|
1285
|
-
if (!
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
|
|
1207
|
+
}, C = (l, j) => {
|
|
1208
|
+
const S = v.find((P) => l.listingId === P.id);
|
|
1209
|
+
if (!S) return null;
|
|
1210
|
+
const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1211
|
+
I && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1212
|
+
b,
|
|
1289
1213
|
{
|
|
1290
1214
|
name: "DotsSixVertical",
|
|
1291
1215
|
hoverable: !0,
|
|
@@ -1293,106 +1217,107 @@ const Ii = (u) => {
|
|
|
1293
1217
|
height: 20
|
|
1294
1218
|
}
|
|
1295
1219
|
) }),
|
|
1296
|
-
|
|
1220
|
+
x === "select" && /* @__PURE__ */ t.jsx(
|
|
1297
1221
|
ot,
|
|
1298
1222
|
{
|
|
1299
|
-
onChange: (
|
|
1300
|
-
const
|
|
1301
|
-
if (!
|
|
1302
|
-
const
|
|
1303
|
-
listingId:
|
|
1304
|
-
image:
|
|
1305
|
-
},
|
|
1306
|
-
y(
|
|
1223
|
+
onChange: (P) => {
|
|
1224
|
+
const z = [...s], J = v.find((B) => B.productData.name === P);
|
|
1225
|
+
if (!J) return;
|
|
1226
|
+
const m = {
|
|
1227
|
+
listingId: J.id,
|
|
1228
|
+
image: J.productData.images.length > 0 ? J.productData.images[0].cfId : ""
|
|
1229
|
+
}, q = z.map((B) => B.listingId === l.listingId ? m : B);
|
|
1230
|
+
y(m), n([...q]);
|
|
1307
1231
|
},
|
|
1308
|
-
value:
|
|
1232
|
+
value: S.productData.name,
|
|
1309
1233
|
options: [
|
|
1310
|
-
...
|
|
1234
|
+
...v.filter((P) => !s.find((z) => z.listingId === P.id)).map((P) => P.productData.name)
|
|
1311
1235
|
],
|
|
1312
1236
|
leftAddon: E(
|
|
1313
|
-
|
|
1237
|
+
l.image || S.productData.images.length > 0 && S.productData.images[0].cfId || ""
|
|
1314
1238
|
)
|
|
1315
1239
|
},
|
|
1316
|
-
|
|
1240
|
+
j
|
|
1317
1241
|
),
|
|
1318
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1319
|
-
p && /* @__PURE__ */ t.jsx("div", { className:
|
|
1320
|
-
|
|
1242
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
1243
|
+
p && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1244
|
+
b,
|
|
1321
1245
|
{
|
|
1322
1246
|
name: "Sliders",
|
|
1323
1247
|
hoverable: !0,
|
|
1324
1248
|
width: 20,
|
|
1325
1249
|
height: 20,
|
|
1326
|
-
onClick: (
|
|
1250
|
+
onClick: (P) => Q(P, l)
|
|
1327
1251
|
}
|
|
1328
1252
|
) }),
|
|
1329
|
-
|
|
1330
|
-
|
|
1253
|
+
d && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1254
|
+
b,
|
|
1331
1255
|
{
|
|
1332
1256
|
name: "Trash",
|
|
1333
1257
|
hoverable: !0,
|
|
1334
1258
|
width: 20,
|
|
1335
1259
|
height: 20,
|
|
1336
1260
|
fill: "#C12A2A",
|
|
1337
|
-
onClick: () => n(s.filter((
|
|
1261
|
+
onClick: () => n(s.filter((P) => P !== l))
|
|
1338
1262
|
}
|
|
1339
1263
|
) })
|
|
1340
1264
|
] })
|
|
1341
1265
|
] });
|
|
1342
|
-
return
|
|
1343
|
-
|
|
1266
|
+
return I ? /* @__PURE__ */ t.jsx(
|
|
1267
|
+
ms,
|
|
1344
1268
|
{
|
|
1345
|
-
product:
|
|
1346
|
-
children:
|
|
1269
|
+
product: l,
|
|
1270
|
+
children: R
|
|
1347
1271
|
},
|
|
1348
|
-
|
|
1272
|
+
l.listingId
|
|
1349
1273
|
) : /* @__PURE__ */ t.jsx(
|
|
1350
1274
|
"div",
|
|
1351
1275
|
{
|
|
1352
|
-
className:
|
|
1353
|
-
children:
|
|
1276
|
+
className: F.product,
|
|
1277
|
+
children: R
|
|
1354
1278
|
},
|
|
1355
|
-
|
|
1279
|
+
l.listingId
|
|
1356
1280
|
);
|
|
1357
|
-
};
|
|
1358
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1359
|
-
(
|
|
1360
|
-
|
|
1281
|
+
}, M = f.useRef(null);
|
|
1282
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
1283
|
+
(h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1284
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: h }),
|
|
1361
1285
|
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1362
1286
|
it,
|
|
1363
1287
|
{
|
|
1364
1288
|
current: o,
|
|
1365
|
-
onChange: (
|
|
1289
|
+
onChange: (l) => e == null ? void 0 : e(l)
|
|
1366
1290
|
}
|
|
1367
1291
|
)
|
|
1368
1292
|
] }),
|
|
1369
|
-
|
|
1370
|
-
|
|
1293
|
+
a && _ && /* @__PURE__ */ t.jsx(
|
|
1294
|
+
Bt,
|
|
1371
1295
|
{
|
|
1372
|
-
|
|
1296
|
+
ref: M,
|
|
1297
|
+
activeItem: _,
|
|
1373
1298
|
setActiveItem: y,
|
|
1374
|
-
setIsOpenModal:
|
|
1375
|
-
popupPosition:
|
|
1376
|
-
itemsOptions:
|
|
1299
|
+
setIsOpenModal: $,
|
|
1300
|
+
popupPosition: w,
|
|
1301
|
+
itemsOptions: v
|
|
1377
1302
|
}
|
|
1378
1303
|
),
|
|
1379
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1304
|
+
o && /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
1305
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: c }),
|
|
1306
|
+
I ? /* @__PURE__ */ t.jsx(
|
|
1307
|
+
pt,
|
|
1383
1308
|
{
|
|
1384
|
-
sensors:
|
|
1385
|
-
onDragEnd:
|
|
1309
|
+
sensors: T,
|
|
1310
|
+
onDragEnd: u,
|
|
1386
1311
|
children: /* @__PURE__ */ t.jsx(
|
|
1387
|
-
|
|
1312
|
+
_t,
|
|
1388
1313
|
{
|
|
1389
|
-
items: s.map((
|
|
1314
|
+
items: s.map((l) => String(l.listingId)),
|
|
1390
1315
|
strategy: gt,
|
|
1391
|
-
children: s.map((
|
|
1316
|
+
children: s.map((l, j) => C(l, j))
|
|
1392
1317
|
}
|
|
1393
1318
|
)
|
|
1394
1319
|
}
|
|
1395
|
-
) : s.map((
|
|
1320
|
+
) : s.map((l, j) => C(l, j)),
|
|
1396
1321
|
i && /* @__PURE__ */ t.jsx(
|
|
1397
1322
|
"div",
|
|
1398
1323
|
{
|
|
@@ -1402,31 +1327,31 @@ const Ii = (u) => {
|
|
|
1402
1327
|
justifyContent: "center"
|
|
1403
1328
|
},
|
|
1404
1329
|
children: /* @__PURE__ */ t.jsx(
|
|
1405
|
-
|
|
1330
|
+
tt,
|
|
1406
1331
|
{
|
|
1407
1332
|
withoutHover: !0,
|
|
1408
|
-
className:
|
|
1333
|
+
className: F.button,
|
|
1409
1334
|
size: "s",
|
|
1410
1335
|
onClick: () => {
|
|
1411
|
-
const
|
|
1412
|
-
for (let
|
|
1413
|
-
if (!s.find((
|
|
1414
|
-
|
|
1415
|
-
listingId:
|
|
1416
|
-
image:
|
|
1336
|
+
const l = [...s];
|
|
1337
|
+
for (let j = 0; j < v.length; j++)
|
|
1338
|
+
if (!s.find((S) => S.listingId === v[j].id)) {
|
|
1339
|
+
l.push({
|
|
1340
|
+
listingId: v[j].id,
|
|
1341
|
+
image: v[j].productData.images.length > 0 ? v[j].productData.images[0].cfId : ""
|
|
1417
1342
|
});
|
|
1418
1343
|
break;
|
|
1419
1344
|
}
|
|
1420
|
-
n(
|
|
1345
|
+
n(l);
|
|
1421
1346
|
},
|
|
1422
|
-
disabled: s.length ===
|
|
1347
|
+
disabled: s.length === v.length,
|
|
1423
1348
|
style: {
|
|
1424
1349
|
width: "fit-content"
|
|
1425
1350
|
},
|
|
1426
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1351
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
1427
1352
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1428
1353
|
/* @__PURE__ */ t.jsx(
|
|
1429
|
-
|
|
1354
|
+
b,
|
|
1430
1355
|
{
|
|
1431
1356
|
name: "Plus",
|
|
1432
1357
|
width: 16,
|
|
@@ -1439,151 +1364,151 @@ const Ii = (u) => {
|
|
|
1439
1364
|
}
|
|
1440
1365
|
)
|
|
1441
1366
|
] }),
|
|
1442
|
-
|
|
1367
|
+
o && g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
|
|
1443
1368
|
] });
|
|
1444
|
-
},
|
|
1445
|
-
options:
|
|
1446
|
-
price:
|
|
1447
|
-
oldPrice:
|
|
1448
|
-
newPrice:
|
|
1449
|
-
animate:
|
|
1450
|
-
appearAndBounce:
|
|
1451
|
-
meta:
|
|
1452
|
-
info:
|
|
1453
|
-
infoRight:
|
|
1454
|
-
buttons:
|
|
1455
|
-
variants:
|
|
1456
|
-
variant:
|
|
1457
|
-
stock:
|
|
1458
|
-
variantInfo:
|
|
1459
|
-
quantity:
|
|
1460
|
-
count:
|
|
1461
|
-
focused:
|
|
1462
|
-
button:
|
|
1463
|
-
activeVariant:
|
|
1464
|
-
chargeTypes:
|
|
1465
|
-
charge:
|
|
1466
|
-
chargeActive:
|
|
1467
|
-
title:
|
|
1369
|
+
}, hs = "_options_6cemk_1", ps = "_price_6cemk_12", _s = "_oldPrice_6cemk_19", gs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", xs = "_appearAndBounce_6cemk_1", bs = "_meta_6cemk_52", js = "_info_6cemk_58", vs = "_infoRight_6cemk_66", ys = "_buttons_6cemk_73", Ns = "_variants_6cemk_80", ks = "_variant_6cemk_80", Is = "_stock_6cemk_98", Cs = "_variantInfo_6cemk_105", Ss = "_quantity_6cemk_111", ws = "_count_6cemk_118", $s = "_focused_6cemk_135", Bs = "_button_6cemk_73", Ps = "_activeVariant_6cemk_161", Ms = "_chargeTypes_6cemk_165", Ts = "_charge_6cemk_165", qs = "_chargeActive_6cemk_190", As = "_title_6cemk_198", k = {
|
|
1370
|
+
options: hs,
|
|
1371
|
+
price: ps,
|
|
1372
|
+
oldPrice: _s,
|
|
1373
|
+
newPrice: gs,
|
|
1374
|
+
animate: fs,
|
|
1375
|
+
appearAndBounce: xs,
|
|
1376
|
+
meta: bs,
|
|
1377
|
+
info: js,
|
|
1378
|
+
infoRight: vs,
|
|
1379
|
+
buttons: ys,
|
|
1380
|
+
variants: Ns,
|
|
1381
|
+
variant: ks,
|
|
1382
|
+
stock: Is,
|
|
1383
|
+
variantInfo: Cs,
|
|
1384
|
+
quantity: Ss,
|
|
1385
|
+
count: ws,
|
|
1386
|
+
focused: $s,
|
|
1387
|
+
button: Bs,
|
|
1388
|
+
activeVariant: Ps,
|
|
1389
|
+
chargeTypes: Ms,
|
|
1390
|
+
charge: Ts,
|
|
1391
|
+
chargeActive: qs,
|
|
1392
|
+
title: As
|
|
1468
1393
|
};
|
|
1469
|
-
var
|
|
1470
|
-
const
|
|
1471
|
-
var
|
|
1472
|
-
const { variants: o } =
|
|
1394
|
+
var kt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(kt || {});
|
|
1395
|
+
const si = (r) => {
|
|
1396
|
+
var w, L;
|
|
1397
|
+
const { variants: o } = r, [e, s] = f.useState(o[0]), [n, g] = f.useState(e.chargeTypes[0]), h = ct(), [c, p] = f.useState(1), { reset: I, addProductToCart: O, getProducts: d } = bt(), [i, x] = f.useState(!1);
|
|
1473
1398
|
f.useEffect(() => {
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
return () => clearTimeout(
|
|
1477
|
-
}, [
|
|
1478
|
-
async function
|
|
1479
|
-
await
|
|
1480
|
-
productId:
|
|
1399
|
+
x(!0);
|
|
1400
|
+
const a = setTimeout(() => x(!1), 600);
|
|
1401
|
+
return () => clearTimeout(a);
|
|
1402
|
+
}, [c]);
|
|
1403
|
+
async function v() {
|
|
1404
|
+
await d(), await O({
|
|
1405
|
+
productId: r.id,
|
|
1481
1406
|
productVariantId: e.id,
|
|
1482
|
-
quantity:
|
|
1407
|
+
quantity: c
|
|
1483
1408
|
});
|
|
1484
1409
|
}
|
|
1485
|
-
function
|
|
1486
|
-
|
|
1410
|
+
function _() {
|
|
1411
|
+
I(), v(), h("/checkout");
|
|
1487
1412
|
}
|
|
1488
|
-
function y(
|
|
1489
|
-
if (
|
|
1490
|
-
const
|
|
1491
|
-
return `${
|
|
1492
|
-
} else if (
|
|
1493
|
-
const
|
|
1494
|
-
return `${
|
|
1495
|
-
} else if (
|
|
1496
|
-
const
|
|
1497
|
-
return `${
|
|
1413
|
+
function y(a) {
|
|
1414
|
+
if (a >= 864e5) {
|
|
1415
|
+
const u = Math.floor(a / 864e5);
|
|
1416
|
+
return `${u} ${u === 1 ? "day" : "days"}`;
|
|
1417
|
+
} else if (a >= 36e5) {
|
|
1418
|
+
const u = Math.floor(a / 36e5);
|
|
1419
|
+
return `${u} ${u === 1 ? "hour" : "hours"}`;
|
|
1420
|
+
} else if (a >= 6e4) {
|
|
1421
|
+
const u = Math.floor(a / 6e4);
|
|
1422
|
+
return `${u} ${u === 1 ? "minute" : "minutes"}`;
|
|
1498
1423
|
} else {
|
|
1499
|
-
const
|
|
1500
|
-
return `${
|
|
1424
|
+
const u = Math.floor(a / 1e3);
|
|
1425
|
+
return `${u} ${u === 1 ? "second" : "seconds"}`;
|
|
1501
1426
|
}
|
|
1502
1427
|
}
|
|
1503
1428
|
return f.useEffect(() => {
|
|
1504
1429
|
(e.quantity.available === 0 || !e.quantity.available) && p(0);
|
|
1505
|
-
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
1506
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
1430
|
+
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
|
|
1431
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
|
|
1507
1432
|
"div",
|
|
1508
1433
|
{
|
|
1509
|
-
className:
|
|
1510
|
-
[
|
|
1434
|
+
className: V(k.charge, {
|
|
1435
|
+
[k.chargeActive]: n === a
|
|
1511
1436
|
}),
|
|
1512
|
-
onClick: () =>
|
|
1513
|
-
children:
|
|
1437
|
+
onClick: () => g(a),
|
|
1438
|
+
children: kt[a]
|
|
1514
1439
|
},
|
|
1515
|
-
|
|
1440
|
+
a
|
|
1516
1441
|
)) }),
|
|
1517
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1518
|
-
var
|
|
1442
|
+
/* @__PURE__ */ t.jsx("div", { className: k.variants, children: o.map((a) => {
|
|
1443
|
+
var $;
|
|
1519
1444
|
return /* @__PURE__ */ t.jsxs(
|
|
1520
1445
|
"div",
|
|
1521
1446
|
{
|
|
1522
|
-
className:
|
|
1523
|
-
[
|
|
1447
|
+
className: V(k.variant, {
|
|
1448
|
+
[k.activeVariant]: e.id === a.id
|
|
1524
1449
|
}),
|
|
1525
|
-
onClick: () => s(
|
|
1450
|
+
onClick: () => s(a),
|
|
1526
1451
|
children: [
|
|
1527
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1528
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1452
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.variantInfo, children: [
|
|
1453
|
+
/* @__PURE__ */ t.jsx("span", { className: k.title, children: a.name }),
|
|
1529
1454
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1530
1455
|
"$",
|
|
1531
|
-
n === "ONE_TIME" ?
|
|
1456
|
+
n === "ONE_TIME" ? a.price.amount : a.subscriptionSettings ? a.subscriptionSettings.price.amount : "Price Not Found"
|
|
1532
1457
|
] })
|
|
1533
1458
|
] }),
|
|
1534
|
-
/* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1535
|
-
((
|
|
1459
|
+
/* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: k.stock, children: [
|
|
1460
|
+
(($ = a.quantity.restrictions) == null ? void 0 : $.max) || a.quantity.available || 0,
|
|
1536
1461
|
" in stock"
|
|
1537
1462
|
] }) })
|
|
1538
1463
|
]
|
|
1539
1464
|
},
|
|
1540
|
-
|
|
1465
|
+
a.id
|
|
1541
1466
|
);
|
|
1542
1467
|
}) }),
|
|
1543
|
-
n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1468
|
+
n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
|
|
1544
1469
|
/* @__PURE__ */ t.jsx(
|
|
1545
|
-
|
|
1470
|
+
Y,
|
|
1546
1471
|
{
|
|
1547
1472
|
type: "Secondary",
|
|
1548
1473
|
onClick: () => {
|
|
1549
|
-
|
|
1474
|
+
c > 1 ? p((a) => a - 1) : p(1);
|
|
1550
1475
|
},
|
|
1551
|
-
className:
|
|
1552
|
-
disabled: e.quantity.available === 0 || e.quantity.restrictions &&
|
|
1553
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1476
|
+
className: k.button,
|
|
1477
|
+
disabled: e.quantity.available === 0 || e.quantity.restrictions && c <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1478
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
1554
1479
|
}
|
|
1555
1480
|
),
|
|
1556
1481
|
/* @__PURE__ */ t.jsx(
|
|
1557
|
-
|
|
1482
|
+
Pt,
|
|
1558
1483
|
{
|
|
1559
1484
|
type: "number",
|
|
1560
|
-
value: String(
|
|
1561
|
-
onChange: (
|
|
1562
|
-
max: ((
|
|
1485
|
+
value: String(c),
|
|
1486
|
+
onChange: (a) => p(Number(a)),
|
|
1487
|
+
max: ((w = e.quantity.restrictions) == null ? void 0 : w.max) || e.quantity.available || 1 / 0,
|
|
1563
1488
|
min: ((L = e.quantity.restrictions) == null ? void 0 : L.min) || 0,
|
|
1564
1489
|
centered: !0,
|
|
1565
1490
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
1566
1491
|
}
|
|
1567
1492
|
),
|
|
1568
1493
|
/* @__PURE__ */ t.jsx(
|
|
1569
|
-
|
|
1494
|
+
Y,
|
|
1570
1495
|
{
|
|
1571
1496
|
type: "Secondary",
|
|
1572
1497
|
onClick: () => {
|
|
1573
|
-
p((
|
|
1498
|
+
p((a) => a + 1);
|
|
1574
1499
|
},
|
|
1575
|
-
className:
|
|
1576
|
-
disabled: !!(e.quantity.restrictions &&
|
|
1577
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1500
|
+
className: k.button,
|
|
1501
|
+
disabled: !!(e.quantity.restrictions && c >= e.quantity.restrictions.max || e.quantity.available !== void 0 && c >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
|
|
1502
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
1578
1503
|
}
|
|
1579
1504
|
)
|
|
1580
1505
|
] }),
|
|
1581
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1582
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1506
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.meta, children: [
|
|
1507
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
|
|
1583
1508
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1584
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1509
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.infoRight, children: [
|
|
1585
1510
|
/* @__PURE__ */ t.jsx(
|
|
1586
|
-
|
|
1511
|
+
b,
|
|
1587
1512
|
{
|
|
1588
1513
|
name: "Lightning",
|
|
1589
1514
|
fill: "#FF3F19",
|
|
@@ -1594,188 +1519,188 @@ const Ni = (u) => {
|
|
|
1594
1519
|
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
|
|
1595
1520
|
] })
|
|
1596
1521
|
] }),
|
|
1597
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1522
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
|
|
1598
1523
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1599
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1600
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1524
|
+
/* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1525
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
|
|
1601
1526
|
"$ ",
|
|
1602
|
-
(e.price.amount || 0) *
|
|
1527
|
+
(e.price.amount || 0) * c
|
|
1603
1528
|
] }),
|
|
1604
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1529
|
+
/* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
|
|
1605
1530
|
"$ ",
|
|
1606
|
-
(e.compareAtPrice.amount || 0) *
|
|
1531
|
+
(e.compareAtPrice.amount || 0) * c
|
|
1607
1532
|
] })
|
|
1608
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1533
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
|
|
1609
1534
|
"$ ",
|
|
1610
|
-
(e.price.amount || 0) *
|
|
1611
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1612
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1535
|
+
(e.price.amount || 0) * c
|
|
1536
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1537
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
|
|
1613
1538
|
"$ ",
|
|
1614
1539
|
e.subscriptionSettings.price.amount || 0
|
|
1615
1540
|
] }),
|
|
1616
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1541
|
+
/* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
|
|
1617
1542
|
"$ ",
|
|
1618
1543
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1619
1544
|
] })
|
|
1620
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1545
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
|
|
1621
1546
|
"$ ",
|
|
1622
1547
|
e.subscriptionSettings.price.amount || 0
|
|
1623
1548
|
] }) })
|
|
1624
1549
|
] })
|
|
1625
1550
|
] }),
|
|
1626
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1551
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
|
|
1627
1552
|
/* @__PURE__ */ t.jsx(
|
|
1628
|
-
|
|
1553
|
+
Y,
|
|
1629
1554
|
{
|
|
1630
1555
|
type: "Primary",
|
|
1631
|
-
onClick: () =>
|
|
1556
|
+
onClick: () => _(),
|
|
1632
1557
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1633
1558
|
children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1634
1559
|
}
|
|
1635
1560
|
),
|
|
1636
1561
|
n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1637
|
-
|
|
1562
|
+
Y,
|
|
1638
1563
|
{
|
|
1639
1564
|
type: "Secondary",
|
|
1640
|
-
onClick: () =>
|
|
1565
|
+
onClick: () => v(),
|
|
1641
1566
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1642
1567
|
children: "Add to Cart"
|
|
1643
1568
|
}
|
|
1644
1569
|
)
|
|
1645
1570
|
] })
|
|
1646
1571
|
] });
|
|
1647
|
-
},
|
|
1648
|
-
button:
|
|
1649
|
-
login:
|
|
1650
|
-
signUp:
|
|
1651
|
-
buttons:
|
|
1652
|
-
modal:
|
|
1572
|
+
}, Os = "_button_1tdo3_1", Es = "_login_1tdo3_14", zs = "_signUp_1tdo3_18", Rs = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Ls = "_closing_1tdo3_64", Hs = "_info_1tdo3_113", Us = "_top_1tdo3_120", Fs = "_title_1tdo3_131", Vs = "_clear_1tdo3_138", Ys = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Gs = "_cart_1tdo3_164", Qs = "_empty_1tdo3_172", Xs = "_product_1tdo3_198", Js = "_products_1tdo3_207", Ks = "_image_1tdo3_215", Zs = "_productInfo_1tdo3_221", tn = "_content_1tdo3_228", en = "_name_1tdo3_234", sn = "_price_1tdo3_240", nn = "_productButtons_1tdo3_246", on = "_productButton_1tdo3_246", an = "_productCount_1tdo3_266", cn = "_bottom_1tdo3_282", ln = "_subtotal_1tdo3_290", rn = "_block_1tdo3_298", dn = "_shoppingCount_1tdo3_305", un = "_total_1tdo3_325", mn = "_link_1tdo3_331", hn = "_userInfo_1tdo3_338", pn = "_pagesMobileModal_1tdo3_349", _n = "_pagesMobileModalContent_1tdo3_363", gn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", N = {
|
|
1573
|
+
button: Os,
|
|
1574
|
+
login: Es,
|
|
1575
|
+
signUp: zs,
|
|
1576
|
+
buttons: Rs,
|
|
1577
|
+
modal: Ds,
|
|
1653
1578
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
1654
1579
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
1655
|
-
closing:
|
|
1580
|
+
closing: Ls,
|
|
1656
1581
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
1657
1582
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
1658
|
-
info:
|
|
1659
|
-
top:
|
|
1660
|
-
title:
|
|
1661
|
-
clear:
|
|
1662
|
-
activeClear:
|
|
1663
|
-
count:
|
|
1664
|
-
cart:
|
|
1665
|
-
empty:
|
|
1666
|
-
product:
|
|
1667
|
-
products:
|
|
1668
|
-
image:
|
|
1669
|
-
productInfo:
|
|
1670
|
-
content:
|
|
1671
|
-
name:
|
|
1672
|
-
price:
|
|
1673
|
-
productButtons:
|
|
1674
|
-
productButton:
|
|
1675
|
-
productCount:
|
|
1676
|
-
bottom:
|
|
1677
|
-
subtotal:
|
|
1678
|
-
block:
|
|
1679
|
-
shoppingCount:
|
|
1680
|
-
total:
|
|
1681
|
-
link:
|
|
1682
|
-
userInfo:
|
|
1683
|
-
pagesMobileModal:
|
|
1684
|
-
pagesMobileModalContent:
|
|
1685
|
-
pagesMobileModalHeader:
|
|
1686
|
-
pagesMobileModalFooter:
|
|
1687
|
-
},
|
|
1688
|
-
const { shopping: o, signUp: e, isShowUserInfo: s = !0 } =
|
|
1689
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1690
|
-
o && /* @__PURE__ */ t.jsx(
|
|
1691
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1583
|
+
info: Hs,
|
|
1584
|
+
top: Us,
|
|
1585
|
+
title: Fs,
|
|
1586
|
+
clear: Vs,
|
|
1587
|
+
activeClear: Ys,
|
|
1588
|
+
count: Ws,
|
|
1589
|
+
cart: Gs,
|
|
1590
|
+
empty: Qs,
|
|
1591
|
+
product: Xs,
|
|
1592
|
+
products: Js,
|
|
1593
|
+
image: Ks,
|
|
1594
|
+
productInfo: Zs,
|
|
1595
|
+
content: tn,
|
|
1596
|
+
name: en,
|
|
1597
|
+
price: sn,
|
|
1598
|
+
productButtons: nn,
|
|
1599
|
+
productButton: on,
|
|
1600
|
+
productCount: an,
|
|
1601
|
+
bottom: cn,
|
|
1602
|
+
subtotal: ln,
|
|
1603
|
+
block: rn,
|
|
1604
|
+
shoppingCount: dn,
|
|
1605
|
+
total: un,
|
|
1606
|
+
link: mn,
|
|
1607
|
+
userInfo: hn,
|
|
1608
|
+
pagesMobileModal: pn,
|
|
1609
|
+
pagesMobileModalContent: _n,
|
|
1610
|
+
pagesMobileModalHeader: gn,
|
|
1611
|
+
pagesMobileModalFooter: fn
|
|
1612
|
+
}, ni = (r) => {
|
|
1613
|
+
const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = r;
|
|
1614
|
+
return /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
1615
|
+
o && /* @__PURE__ */ t.jsx(xn, {}),
|
|
1616
|
+
s && /* @__PURE__ */ t.jsx(It, { signUp: e })
|
|
1692
1617
|
] });
|
|
1693
|
-
},
|
|
1694
|
-
const [
|
|
1695
|
-
function
|
|
1696
|
-
for (let
|
|
1697
|
-
for (let
|
|
1698
|
-
if (n.parts[
|
|
1699
|
-
return n.parts[
|
|
1618
|
+
}, xn = () => {
|
|
1619
|
+
const [r, o] = f.useState(!1), [e, s] = f.useState([]), { cart: n, getProducts: g } = bt();
|
|
1620
|
+
function h(i) {
|
|
1621
|
+
for (let x = 0; x < n.parts.length; x++)
|
|
1622
|
+
for (let v = 0; v < i.variants.length; v++)
|
|
1623
|
+
if (n.parts[x].productVariantId === i.variants[x].id)
|
|
1624
|
+
return n.parts[x].productVariantId;
|
|
1700
1625
|
}
|
|
1701
|
-
function
|
|
1702
|
-
for (let
|
|
1703
|
-
for (let
|
|
1704
|
-
if (n.parts[
|
|
1705
|
-
return n.parts[
|
|
1626
|
+
function c(i) {
|
|
1627
|
+
for (let x = 0; x < n.parts.length; x++)
|
|
1628
|
+
for (let v = 0; v < i.variants.length; v++)
|
|
1629
|
+
if (n.parts[x].productVariantId === i.variants[x].id)
|
|
1630
|
+
return n.parts[x].quantity;
|
|
1706
1631
|
}
|
|
1707
1632
|
f.useEffect(() => {
|
|
1708
1633
|
(async () => {
|
|
1709
|
-
const
|
|
1634
|
+
const x = n.parts.map((y) => String(y.productId)), _ = (await g([...x])).map((y) => ({
|
|
1710
1635
|
...y,
|
|
1711
|
-
activeVariantId:
|
|
1712
|
-
quantity:
|
|
1636
|
+
activeVariantId: h(y),
|
|
1637
|
+
quantity: c(y)
|
|
1713
1638
|
}));
|
|
1714
|
-
s(
|
|
1639
|
+
s(_);
|
|
1715
1640
|
})();
|
|
1716
1641
|
}, [n.parts.length]);
|
|
1717
1642
|
function p(i) {
|
|
1718
|
-
var
|
|
1719
|
-
return !i || !(i != null && i.variants) ? !1 : (
|
|
1643
|
+
var x;
|
|
1644
|
+
return !i || !(i != null && i.variants) ? !1 : (x = i.variants.find((v) => v.id === i.activeVariantId)) == null ? void 0 : x.subscriptionSettings;
|
|
1720
1645
|
}
|
|
1721
|
-
const
|
|
1646
|
+
const I = n.parts.length > 0 && e.length > 0 && !p(e[0]), [O, d] = f.useState(!1);
|
|
1722
1647
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1723
1648
|
/* @__PURE__ */ t.jsxs(
|
|
1724
|
-
|
|
1649
|
+
Y,
|
|
1725
1650
|
{
|
|
1726
1651
|
type: "Secondary",
|
|
1727
1652
|
style: {
|
|
1728
1653
|
padding: 10
|
|
1729
1654
|
},
|
|
1730
1655
|
onClick: (i) => {
|
|
1731
|
-
i.stopPropagation(), window.location.pathname.includes("/admin/builder") || (o(!0),
|
|
1656
|
+
i.stopPropagation(), window.location.pathname.includes("/admin/builder") || (o(!0), d(!0));
|
|
1732
1657
|
},
|
|
1733
1658
|
children: [
|
|
1734
1659
|
/* @__PURE__ */ t.jsx(
|
|
1735
|
-
|
|
1660
|
+
b,
|
|
1736
1661
|
{
|
|
1737
1662
|
name: "Handbag",
|
|
1738
1663
|
fill: "var(--icon-primary)"
|
|
1739
1664
|
}
|
|
1740
1665
|
),
|
|
1741
|
-
|
|
1666
|
+
I && /* @__PURE__ */ t.jsx("div", { className: N.shoppingCount, children: n.parts.length })
|
|
1742
1667
|
]
|
|
1743
1668
|
}
|
|
1744
1669
|
),
|
|
1745
|
-
|
|
1670
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1746
1671
|
jt,
|
|
1747
1672
|
{
|
|
1748
1673
|
close: () => {
|
|
1749
|
-
|
|
1674
|
+
d(!1), setTimeout(() => {
|
|
1750
1675
|
o(!1);
|
|
1751
1676
|
}, 300);
|
|
1752
1677
|
},
|
|
1753
1678
|
withAnimation: !1,
|
|
1754
1679
|
children: /* @__PURE__ */ t.jsx(
|
|
1755
|
-
|
|
1680
|
+
bn,
|
|
1756
1681
|
{
|
|
1757
1682
|
activeProducts: e,
|
|
1758
|
-
isCartNotEmpty:
|
|
1759
|
-
isOpen:
|
|
1683
|
+
isCartNotEmpty: I,
|
|
1684
|
+
isOpen: O
|
|
1760
1685
|
}
|
|
1761
1686
|
)
|
|
1762
1687
|
}
|
|
1763
1688
|
)
|
|
1764
1689
|
] });
|
|
1765
|
-
},
|
|
1766
|
-
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } =
|
|
1767
|
-
function
|
|
1690
|
+
}, bn = (r) => {
|
|
1691
|
+
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = r, { cart: n, reset: g, getTotalAndDiscount: h, updateQuantityOfProduct: c } = bt(), p = ct();
|
|
1692
|
+
function I(i) {
|
|
1768
1693
|
p(i);
|
|
1769
1694
|
}
|
|
1770
|
-
function
|
|
1771
|
-
|
|
1695
|
+
function O(i) {
|
|
1696
|
+
c({
|
|
1772
1697
|
productId: i.id,
|
|
1773
1698
|
productVariantId: i.activeVariantId,
|
|
1774
1699
|
quantity: i.quantity + 1
|
|
1775
1700
|
});
|
|
1776
1701
|
}
|
|
1777
|
-
function
|
|
1778
|
-
|
|
1702
|
+
function d(i) {
|
|
1703
|
+
c({
|
|
1779
1704
|
productId: i.id,
|
|
1780
1705
|
productVariantId: i.activeVariantId,
|
|
1781
1706
|
quantity: i.quantity - 1
|
|
@@ -1784,35 +1709,35 @@ const Ni = (u) => {
|
|
|
1784
1709
|
return /* @__PURE__ */ t.jsxs(
|
|
1785
1710
|
"div",
|
|
1786
1711
|
{
|
|
1787
|
-
className:
|
|
1788
|
-
[
|
|
1712
|
+
className: V(N.modal, {
|
|
1713
|
+
[N.closing]: !s
|
|
1789
1714
|
}),
|
|
1790
1715
|
onClick: (i) => i.stopPropagation(),
|
|
1791
1716
|
children: [
|
|
1792
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1793
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1794
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1795
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
1717
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
|
|
1718
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
1719
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: "Cart" }),
|
|
1720
|
+
e && /* @__PURE__ */ t.jsx("div", { className: N.count, children: n.parts.length })
|
|
1796
1721
|
] }),
|
|
1797
1722
|
/* @__PURE__ */ t.jsx(
|
|
1798
1723
|
"button",
|
|
1799
1724
|
{
|
|
1800
|
-
className:
|
|
1801
|
-
[
|
|
1725
|
+
className: V(N.clear, {
|
|
1726
|
+
[N.activeClear]: e
|
|
1802
1727
|
}),
|
|
1803
1728
|
disabled: !e,
|
|
1804
|
-
onClick:
|
|
1729
|
+
onClick: g,
|
|
1805
1730
|
children: "Clear all"
|
|
1806
1731
|
}
|
|
1807
1732
|
)
|
|
1808
1733
|
] }),
|
|
1809
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1810
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1734
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: N.cart, children: [
|
|
1735
|
+
/* @__PURE__ */ t.jsx("div", { className: N.products, children: o.map((i) => /* @__PURE__ */ t.jsxs(
|
|
1811
1736
|
"div",
|
|
1812
1737
|
{
|
|
1813
|
-
className:
|
|
1738
|
+
className: N.product,
|
|
1814
1739
|
children: [
|
|
1815
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1740
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.productInfo, children: [
|
|
1816
1741
|
/* @__PURE__ */ t.jsx(
|
|
1817
1742
|
"img",
|
|
1818
1743
|
{
|
|
@@ -1820,27 +1745,27 @@ const Ni = (u) => {
|
|
|
1820
1745
|
alt: "image",
|
|
1821
1746
|
width: "100%",
|
|
1822
1747
|
height: "100%",
|
|
1823
|
-
className:
|
|
1748
|
+
className: N.image
|
|
1824
1749
|
}
|
|
1825
1750
|
),
|
|
1826
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1827
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1828
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1751
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.content, children: [
|
|
1752
|
+
/* @__PURE__ */ t.jsx("div", { className: N.name, children: i.name }),
|
|
1753
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
1829
1754
|
"$",
|
|
1830
|
-
i.variants.find((
|
|
1755
|
+
i.variants.find((x) => x.id === i.activeVariantId).price.amount * ((i == null ? void 0 : i.quantity) || 1)
|
|
1831
1756
|
] })
|
|
1832
1757
|
] })
|
|
1833
1758
|
] }),
|
|
1834
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1759
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.productButtons, children: [
|
|
1835
1760
|
/* @__PURE__ */ t.jsx(
|
|
1836
1761
|
"div",
|
|
1837
1762
|
{
|
|
1838
1763
|
onClick: () => {
|
|
1839
|
-
i.quantity !== 1 &&
|
|
1764
|
+
i.quantity !== 1 && d(i);
|
|
1840
1765
|
},
|
|
1841
|
-
className:
|
|
1766
|
+
className: N.productButton,
|
|
1842
1767
|
children: /* @__PURE__ */ t.jsx(
|
|
1843
|
-
|
|
1768
|
+
b,
|
|
1844
1769
|
{
|
|
1845
1770
|
name: "Minus",
|
|
1846
1771
|
fill: "#757575",
|
|
@@ -1850,14 +1775,14 @@ const Ni = (u) => {
|
|
|
1850
1775
|
)
|
|
1851
1776
|
}
|
|
1852
1777
|
),
|
|
1853
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1778
|
+
/* @__PURE__ */ t.jsx("div", { className: N.productCount, children: i.quantity }),
|
|
1854
1779
|
/* @__PURE__ */ t.jsx(
|
|
1855
1780
|
"div",
|
|
1856
1781
|
{
|
|
1857
|
-
onClick: () =>
|
|
1858
|
-
className:
|
|
1782
|
+
onClick: () => O(i),
|
|
1783
|
+
className: N.productButton,
|
|
1859
1784
|
children: /* @__PURE__ */ t.jsx(
|
|
1860
|
-
|
|
1785
|
+
b,
|
|
1861
1786
|
{
|
|
1862
1787
|
name: "Plus",
|
|
1863
1788
|
fill: "#757575",
|
|
@@ -1872,12 +1797,12 @@ const Ni = (u) => {
|
|
|
1872
1797
|
},
|
|
1873
1798
|
i.id
|
|
1874
1799
|
)) }),
|
|
1875
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1876
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1877
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1800
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.bottom, children: [
|
|
1801
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.subtotal, children: [
|
|
1802
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.block, children: [
|
|
1878
1803
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1879
1804
|
/* @__PURE__ */ t.jsx(
|
|
1880
|
-
|
|
1805
|
+
b,
|
|
1881
1806
|
{
|
|
1882
1807
|
name: "Info",
|
|
1883
1808
|
width: 20,
|
|
@@ -1886,20 +1811,20 @@ const Ni = (u) => {
|
|
|
1886
1811
|
}
|
|
1887
1812
|
)
|
|
1888
1813
|
] }),
|
|
1889
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1814
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.total, children: [
|
|
1890
1815
|
"$",
|
|
1891
|
-
|
|
1816
|
+
h().total
|
|
1892
1817
|
] })
|
|
1893
1818
|
] }),
|
|
1894
|
-
/* @__PURE__ */ t.jsx(
|
|
1819
|
+
/* @__PURE__ */ t.jsx(Y, { onClick: () => I("/checkout"), children: "Checkout" })
|
|
1895
1820
|
] })
|
|
1896
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1821
|
+
] }) : /* @__PURE__ */ t.jsx(jn, {})
|
|
1897
1822
|
]
|
|
1898
1823
|
}
|
|
1899
1824
|
);
|
|
1900
|
-
},
|
|
1825
|
+
}, jn = () => /* @__PURE__ */ t.jsxs("div", { className: N.empty, children: [
|
|
1901
1826
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1902
|
-
|
|
1827
|
+
b,
|
|
1903
1828
|
{
|
|
1904
1829
|
name: "Handbag",
|
|
1905
1830
|
fill: "var(--icon-secondary)"
|
|
@@ -1913,20 +1838,20 @@ const Ni = (u) => {
|
|
|
1913
1838
|
"a",
|
|
1914
1839
|
{
|
|
1915
1840
|
href: "/products",
|
|
1916
|
-
className:
|
|
1841
|
+
className: N.link,
|
|
1917
1842
|
children: "view products"
|
|
1918
1843
|
}
|
|
1919
1844
|
)
|
|
1920
1845
|
] })
|
|
1921
|
-
] }),
|
|
1846
|
+
] }), It = ({ signUp: r }) => {
|
|
1922
1847
|
const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = ct();
|
|
1923
|
-
function n(
|
|
1924
|
-
window.location.pathname.includes("/admin/builder") || s(
|
|
1848
|
+
function n(c) {
|
|
1849
|
+
window.location.pathname.includes("/admin/builder") || s(c);
|
|
1925
1850
|
}
|
|
1926
1851
|
if (!e)
|
|
1927
1852
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1928
1853
|
/* @__PURE__ */ t.jsx(
|
|
1929
|
-
|
|
1854
|
+
Y,
|
|
1930
1855
|
{
|
|
1931
1856
|
onClick: () => n("/customer-dash"),
|
|
1932
1857
|
type: "Secondary",
|
|
@@ -1936,39 +1861,40 @@ const Ni = (u) => {
|
|
|
1936
1861
|
children: "Login"
|
|
1937
1862
|
}
|
|
1938
1863
|
),
|
|
1939
|
-
|
|
1940
|
-
|
|
1864
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1865
|
+
Y,
|
|
1941
1866
|
{
|
|
1942
1867
|
onClick: () => n("/customer-dash"),
|
|
1943
1868
|
type: "Primary",
|
|
1944
1869
|
style: {
|
|
1945
|
-
padding: 10
|
|
1870
|
+
padding: 10,
|
|
1871
|
+
whiteSpace: "nowrap"
|
|
1946
1872
|
},
|
|
1947
1873
|
children: "Sign Up"
|
|
1948
1874
|
}
|
|
1949
1875
|
)
|
|
1950
1876
|
] });
|
|
1951
|
-
const [
|
|
1877
|
+
const [g, h] = f.useState("test-email@gmail.com");
|
|
1952
1878
|
return f.useEffect(() => {
|
|
1953
1879
|
(async () => {
|
|
1954
|
-
const p =
|
|
1955
|
-
|
|
1880
|
+
const p = Mt(e);
|
|
1881
|
+
h(p.email);
|
|
1956
1882
|
})();
|
|
1957
1883
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
1958
1884
|
"div",
|
|
1959
1885
|
{
|
|
1960
|
-
className:
|
|
1886
|
+
className: N.userInfo,
|
|
1961
1887
|
onClick: () => n("/customer-dash"),
|
|
1962
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
1888
|
+
children: /* @__PURE__ */ t.jsx("div", { children: g || "test-email@gmail.com" })
|
|
1963
1889
|
}
|
|
1964
1890
|
);
|
|
1965
|
-
},
|
|
1966
|
-
children:
|
|
1891
|
+
}, vn = ({
|
|
1892
|
+
children: r,
|
|
1967
1893
|
logo: o,
|
|
1968
1894
|
setIsOpen: e,
|
|
1969
1895
|
signUp: s
|
|
1970
1896
|
}) => {
|
|
1971
|
-
const { setIsOpen: n } =
|
|
1897
|
+
const { setIsOpen: n } = yt(), g = () => {
|
|
1972
1898
|
n(!1), setTimeout(() => {
|
|
1973
1899
|
e(!1), n(!0);
|
|
1974
1900
|
}, 300);
|
|
@@ -1976,18 +1902,18 @@ const Ni = (u) => {
|
|
|
1976
1902
|
return /* @__PURE__ */ t.jsxs(
|
|
1977
1903
|
"div",
|
|
1978
1904
|
{
|
|
1979
|
-
className:
|
|
1980
|
-
onClick: (
|
|
1905
|
+
className: N.pagesMobileModal,
|
|
1906
|
+
onClick: (h) => h.stopPropagation(),
|
|
1981
1907
|
children: [
|
|
1982
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1908
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.pagesMobileModalHeader, children: [
|
|
1983
1909
|
/* @__PURE__ */ t.jsx("div", { children: o }),
|
|
1984
1910
|
/* @__PURE__ */ t.jsx(
|
|
1985
|
-
|
|
1911
|
+
Y,
|
|
1986
1912
|
{
|
|
1987
1913
|
type: "Secondary",
|
|
1988
|
-
onClick:
|
|
1914
|
+
onClick: g,
|
|
1989
1915
|
children: /* @__PURE__ */ t.jsx(
|
|
1990
|
-
|
|
1916
|
+
b,
|
|
1991
1917
|
{
|
|
1992
1918
|
name: "X",
|
|
1993
1919
|
fill: "var(--icon-primary)"
|
|
@@ -1996,33 +1922,33 @@ const Ni = (u) => {
|
|
|
1996
1922
|
}
|
|
1997
1923
|
)
|
|
1998
1924
|
] }),
|
|
1999
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2000
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1925
|
+
/* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalContent, children: r }),
|
|
1926
|
+
/* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(It, { signUp: s }) })
|
|
2001
1927
|
]
|
|
2002
1928
|
}
|
|
2003
1929
|
);
|
|
2004
|
-
},
|
|
2005
|
-
children:
|
|
1930
|
+
}, ii = ({
|
|
1931
|
+
children: r,
|
|
2006
1932
|
logo: o,
|
|
2007
1933
|
signUp: e
|
|
2008
1934
|
}) => {
|
|
2009
1935
|
const [s, n] = f.useState(!1);
|
|
2010
1936
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2011
|
-
/* @__PURE__ */ t.jsx(
|
|
1937
|
+
/* @__PURE__ */ t.jsx(yn, { setIsOpenModal: n }),
|
|
2012
1938
|
s && /* @__PURE__ */ t.jsx(jt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
|
|
2013
|
-
|
|
1939
|
+
vn,
|
|
2014
1940
|
{
|
|
2015
1941
|
logo: o,
|
|
2016
1942
|
setIsOpen: n,
|
|
2017
1943
|
signUp: e,
|
|
2018
|
-
children:
|
|
1944
|
+
children: r
|
|
2019
1945
|
}
|
|
2020
1946
|
) })
|
|
2021
1947
|
] });
|
|
2022
|
-
},
|
|
2023
|
-
const { setIsOpenModal: o } =
|
|
1948
|
+
}, yn = (r) => {
|
|
1949
|
+
const { setIsOpenModal: o } = r;
|
|
2024
1950
|
return /* @__PURE__ */ t.jsx(
|
|
2025
|
-
|
|
1951
|
+
Y,
|
|
2026
1952
|
{
|
|
2027
1953
|
type: "Secondary",
|
|
2028
1954
|
style: {
|
|
@@ -2032,7 +1958,7 @@ const Ni = (u) => {
|
|
|
2032
1958
|
e.stopPropagation(), o(!0);
|
|
2033
1959
|
},
|
|
2034
1960
|
children: /* @__PURE__ */ t.jsx(
|
|
2035
|
-
|
|
1961
|
+
b,
|
|
2036
1962
|
{
|
|
2037
1963
|
name: "List",
|
|
2038
1964
|
fill: "var(--icon-primary)"
|
|
@@ -2040,34 +1966,34 @@ const Ni = (u) => {
|
|
|
2040
1966
|
)
|
|
2041
1967
|
}
|
|
2042
1968
|
);
|
|
2043
|
-
},
|
|
2044
|
-
share:
|
|
2045
|
-
modal:
|
|
2046
|
-
header:
|
|
2047
|
-
socials:
|
|
2048
|
-
social:
|
|
2049
|
-
copy:
|
|
2050
|
-
title:
|
|
2051
|
-
copyWrapper:
|
|
2052
|
-
copyText:
|
|
2053
|
-
copyTextMobile:
|
|
2054
|
-
copyTextMiniMobile:
|
|
2055
|
-
},
|
|
2056
|
-
const { isOpenModal:
|
|
1969
|
+
}, Nn = "_share_xddz7_1", kn = "_modal_xddz7_8", In = "_header_xddz7_20", Cn = "_socials_xddz7_30", Sn = "_social_xddz7_30", wn = "_copy_xddz7_40", $n = "_title_xddz7_47", Bn = "_copyWrapper_xddz7_53", Pn = "_copyText_xddz7_62", Mn = "_copyTextMobile_xddz7_75", Tn = "_copyTextMiniMobile_xddz7_94", Z = {
|
|
1970
|
+
share: Nn,
|
|
1971
|
+
modal: kn,
|
|
1972
|
+
header: In,
|
|
1973
|
+
socials: Cn,
|
|
1974
|
+
social: Sn,
|
|
1975
|
+
copy: wn,
|
|
1976
|
+
title: $n,
|
|
1977
|
+
copyWrapper: Bn,
|
|
1978
|
+
copyText: Pn,
|
|
1979
|
+
copyTextMobile: Mn,
|
|
1980
|
+
copyTextMiniMobile: Tn
|
|
1981
|
+
}, oi = () => {
|
|
1982
|
+
const { isOpenModal: r, setIsOpenModal: o } = Nt();
|
|
2057
1983
|
function e() {
|
|
2058
1984
|
o(!0);
|
|
2059
1985
|
}
|
|
2060
1986
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2061
1987
|
/* @__PURE__ */ t.jsx(
|
|
2062
|
-
|
|
1988
|
+
tt,
|
|
2063
1989
|
{
|
|
2064
|
-
className:
|
|
1990
|
+
className: Z.share,
|
|
2065
1991
|
onClick: (s) => {
|
|
2066
1992
|
s.stopPropagation(), e();
|
|
2067
1993
|
},
|
|
2068
1994
|
type: "Secondary",
|
|
2069
1995
|
children: /* @__PURE__ */ t.jsx(
|
|
2070
|
-
|
|
1996
|
+
b,
|
|
2071
1997
|
{
|
|
2072
1998
|
name: "Share",
|
|
2073
1999
|
fill: "#757575",
|
|
@@ -2076,82 +2002,82 @@ const Ni = (u) => {
|
|
|
2076
2002
|
)
|
|
2077
2003
|
}
|
|
2078
2004
|
),
|
|
2079
|
-
|
|
2005
|
+
r && /* @__PURE__ */ t.jsx(jt, { close: o, children: /* @__PURE__ */ t.jsx(qn, {}) })
|
|
2080
2006
|
] });
|
|
2081
|
-
},
|
|
2082
|
-
const { setIsOpenModal:
|
|
2083
|
-
function
|
|
2007
|
+
}, qn = () => {
|
|
2008
|
+
const { setIsOpenModal: r } = Nt(), { notification: o, setNotification: e } = Tt(), { setIsOpen: s } = yt(), n = window.location.href;
|
|
2009
|
+
function g() {
|
|
2084
2010
|
navigator.clipboard.writeText(n), e({
|
|
2085
2011
|
message: "Link copied to clipboard",
|
|
2086
2012
|
status: "success"
|
|
2087
2013
|
});
|
|
2088
2014
|
}
|
|
2089
|
-
function
|
|
2015
|
+
function h() {
|
|
2090
2016
|
s(!1), setTimeout(() => {
|
|
2091
|
-
|
|
2017
|
+
r(!1), s(!0);
|
|
2092
2018
|
}, 300);
|
|
2093
2019
|
}
|
|
2094
|
-
function
|
|
2095
|
-
return p.length >
|
|
2020
|
+
function c(p, I) {
|
|
2021
|
+
return p.length > I ? p.slice(0, I) + "..." : p;
|
|
2096
2022
|
}
|
|
2097
2023
|
return /* @__PURE__ */ t.jsxs(
|
|
2098
2024
|
"div",
|
|
2099
2025
|
{
|
|
2100
|
-
className:
|
|
2026
|
+
className: Z.modal,
|
|
2101
2027
|
onClick: (p) => p.stopPropagation(),
|
|
2102
2028
|
children: [
|
|
2103
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2104
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2029
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.header, children: [
|
|
2030
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.title, children: "Copy Product Link" }),
|
|
2105
2031
|
/* @__PURE__ */ t.jsx(
|
|
2106
|
-
|
|
2032
|
+
b,
|
|
2107
2033
|
{
|
|
2108
2034
|
name: "X",
|
|
2109
2035
|
fill: "#757575",
|
|
2110
|
-
onClick:
|
|
2036
|
+
onClick: h,
|
|
2111
2037
|
hoverable: !0
|
|
2112
2038
|
}
|
|
2113
2039
|
)
|
|
2114
2040
|
] }),
|
|
2115
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2041
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.copyWrapper, children: [
|
|
2116
2042
|
/* @__PURE__ */ t.jsxs(
|
|
2117
|
-
|
|
2043
|
+
tt,
|
|
2118
2044
|
{
|
|
2119
2045
|
type: "Secondary",
|
|
2120
|
-
onClick:
|
|
2046
|
+
onClick: g,
|
|
2121
2047
|
style: {
|
|
2122
2048
|
flex: 1
|
|
2123
2049
|
},
|
|
2124
2050
|
children: [
|
|
2125
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2126
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2127
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2051
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: c(n, 100) }),
|
|
2052
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: c(n, 40) }),
|
|
2053
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: c(n, 20) })
|
|
2128
2054
|
]
|
|
2129
2055
|
}
|
|
2130
2056
|
),
|
|
2131
2057
|
/* @__PURE__ */ t.jsx(
|
|
2132
|
-
|
|
2058
|
+
tt,
|
|
2133
2059
|
{
|
|
2134
2060
|
type: "Secondary",
|
|
2135
|
-
onClick:
|
|
2136
|
-
children: o ? /* @__PURE__ */ t.jsx(
|
|
2061
|
+
onClick: g,
|
|
2062
|
+
children: o ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2137
2063
|
}
|
|
2138
2064
|
)
|
|
2139
2065
|
] })
|
|
2140
2066
|
]
|
|
2141
2067
|
}
|
|
2142
2068
|
);
|
|
2143
|
-
},
|
|
2144
|
-
accordion:
|
|
2145
|
-
header:
|
|
2146
|
-
icon:
|
|
2147
|
-
open:
|
|
2148
|
-
content:
|
|
2149
|
-
},
|
|
2150
|
-
const [s, n] = f.useState(e), [
|
|
2069
|
+
}, An = "_accordion_1s1lq_1", On = "_header_1s1lq_9", En = "_icon_1s1lq_18", zn = "_open_1s1lq_21", Rn = "_content_1s1lq_25", st = {
|
|
2070
|
+
accordion: An,
|
|
2071
|
+
header: On,
|
|
2072
|
+
icon: En,
|
|
2073
|
+
open: zn,
|
|
2074
|
+
content: Rn
|
|
2075
|
+
}, ai = ({ title: r, content: o, defaultOpen: e = !1 }) => {
|
|
2076
|
+
const [s, n] = f.useState(e), [g, h] = f.useState(0), c = f.useRef(null), p = () => {
|
|
2151
2077
|
n(!s);
|
|
2152
2078
|
};
|
|
2153
2079
|
return f.useEffect(() => {
|
|
2154
|
-
|
|
2080
|
+
c.current && h(s ? c.current.scrollHeight : 0);
|
|
2155
2081
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: st.accordion, children: [
|
|
2156
2082
|
/* @__PURE__ */ t.jsxs(
|
|
2157
2083
|
"div",
|
|
@@ -2159,22 +2085,22 @@ const Ni = (u) => {
|
|
|
2159
2085
|
className: st.header,
|
|
2160
2086
|
onClick: p,
|
|
2161
2087
|
children: [
|
|
2162
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
2163
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2088
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2089
|
+
/* @__PURE__ */ t.jsx("div", { className: V(st.icon, { [st.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2164
2090
|
]
|
|
2165
2091
|
}
|
|
2166
2092
|
),
|
|
2167
2093
|
/* @__PURE__ */ t.jsx(
|
|
2168
2094
|
"div",
|
|
2169
2095
|
{
|
|
2170
|
-
ref:
|
|
2096
|
+
ref: c,
|
|
2171
2097
|
className: st.content,
|
|
2172
|
-
style: { height: `${
|
|
2098
|
+
style: { height: `${g}px` },
|
|
2173
2099
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
|
|
2174
2100
|
}
|
|
2175
2101
|
)
|
|
2176
2102
|
] });
|
|
2177
|
-
},
|
|
2103
|
+
}, ci = ({ children: r, path: o, className: e, target: s = "_self", id: n }) => {
|
|
2178
2104
|
if (window.location.pathname.includes("/admin/builder"))
|
|
2179
2105
|
return /* @__PURE__ */ t.jsx(
|
|
2180
2106
|
"div",
|
|
@@ -2183,29 +2109,29 @@ const Ni = (u) => {
|
|
|
2183
2109
|
role: "link",
|
|
2184
2110
|
style: { cursor: "pointer" },
|
|
2185
2111
|
id: n,
|
|
2186
|
-
children:
|
|
2112
|
+
children: r
|
|
2187
2113
|
}
|
|
2188
2114
|
);
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2115
|
+
const g = ct(), h = /^https?:\/\//.test(o), c = (p) => {
|
|
2116
|
+
h || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (p.preventDefault(), g(o, { replace: !0 }));
|
|
2191
2117
|
};
|
|
2192
2118
|
return /* @__PURE__ */ t.jsx(
|
|
2193
2119
|
"div",
|
|
2194
2120
|
{
|
|
2195
|
-
onClick:
|
|
2121
|
+
onClick: c,
|
|
2196
2122
|
className: e,
|
|
2197
2123
|
role: "link",
|
|
2198
2124
|
style: { cursor: "pointer" },
|
|
2199
2125
|
id: n,
|
|
2200
|
-
children:
|
|
2126
|
+
children: r
|
|
2201
2127
|
}
|
|
2202
2128
|
);
|
|
2203
|
-
},
|
|
2204
|
-
buttonsBlock:
|
|
2205
|
-
slideUp:
|
|
2206
|
-
},
|
|
2129
|
+
}, Dn = "_buttonsBlock_1b2rb_1", Ln = "_slideUp_1b2rb_1", Hn = {
|
|
2130
|
+
buttonsBlock: Dn,
|
|
2131
|
+
slideUp: Ln
|
|
2132
|
+
}, li = () => /* @__PURE__ */ t.jsxs("div", { className: Hn.buttonsBlock, children: [
|
|
2207
2133
|
/* @__PURE__ */ t.jsx(
|
|
2208
|
-
|
|
2134
|
+
Y,
|
|
2209
2135
|
{
|
|
2210
2136
|
type: "Primary",
|
|
2211
2137
|
style: {
|
|
@@ -2214,14 +2140,14 @@ const Ni = (u) => {
|
|
|
2214
2140
|
children: "Add to Cart"
|
|
2215
2141
|
}
|
|
2216
2142
|
),
|
|
2217
|
-
/* @__PURE__ */ t.jsx(
|
|
2218
|
-
] }),
|
|
2219
|
-
wrapper:
|
|
2220
|
-
label:
|
|
2221
|
-
textarea:
|
|
2222
|
-
length:
|
|
2223
|
-
},
|
|
2224
|
-
const { onChange: o, label: e, value: s, maxLength: n, placeholder:
|
|
2143
|
+
/* @__PURE__ */ t.jsx(Y, { type: "Secondary", children: "Buy" })
|
|
2144
|
+
] }), Un = "_wrapper_st58d_1", Fn = "_label_st58d_10", Vn = "_textarea_st58d_18", Yn = "_length_st58d_33", at = {
|
|
2145
|
+
wrapper: Un,
|
|
2146
|
+
label: Fn,
|
|
2147
|
+
textarea: Vn,
|
|
2148
|
+
length: Yn
|
|
2149
|
+
}, ri = (r) => {
|
|
2150
|
+
const { onChange: o, label: e, value: s, maxLength: n, placeholder: g = "Type something..." } = r, [h, c] = f.useState(s.length);
|
|
2225
2151
|
return /* @__PURE__ */ t.jsxs("div", { className: at.wrapper, children: [
|
|
2226
2152
|
e && /* @__PURE__ */ t.jsx(
|
|
2227
2153
|
"label",
|
|
@@ -2237,55 +2163,55 @@ const Ni = (u) => {
|
|
|
2237
2163
|
id: e,
|
|
2238
2164
|
defaultValue: s,
|
|
2239
2165
|
onChange: (p) => {
|
|
2240
|
-
|
|
2166
|
+
c(p.target.value.length), o(p.target.value);
|
|
2241
2167
|
},
|
|
2242
|
-
placeholder:
|
|
2168
|
+
placeholder: g,
|
|
2243
2169
|
className: at.textarea,
|
|
2244
2170
|
maxLength: n
|
|
2245
2171
|
}
|
|
2246
2172
|
),
|
|
2247
2173
|
n && /* @__PURE__ */ t.jsxs("div", { className: at.length, children: [
|
|
2248
|
-
|
|
2174
|
+
h,
|
|
2249
2175
|
"/",
|
|
2250
2176
|
n
|
|
2251
2177
|
] })
|
|
2252
2178
|
] });
|
|
2253
2179
|
};
|
|
2254
2180
|
export {
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2181
|
+
ai as Accordion,
|
|
2182
|
+
yn as BurgerMenuButton,
|
|
2183
|
+
Y as Button,
|
|
2184
|
+
us as ButtonTypeSettings,
|
|
2185
|
+
ti as ButtonsSettings,
|
|
2186
|
+
Jn as CategorySettings,
|
|
2187
|
+
St as ChooseImage,
|
|
2188
|
+
mi as ChooseImageModal,
|
|
2189
|
+
jn as EmptyCart,
|
|
2190
|
+
Zn as FormSettings,
|
|
2191
|
+
ni as HeaderButtons,
|
|
2192
|
+
b as Icon,
|
|
2267
2193
|
rt as InputSettings,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2194
|
+
Pt as InputUI,
|
|
2195
|
+
hi as ItemsSettings,
|
|
2196
|
+
Xn as LayoutSettings,
|
|
2197
|
+
ci as Link,
|
|
2198
|
+
ei as ListingSelector,
|
|
2199
|
+
pi as Loader,
|
|
2274
2200
|
jt as Modal,
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2201
|
+
ii as PagesMobileMenu,
|
|
2202
|
+
vn as PagesMobileModal,
|
|
2203
|
+
Kn as PagesSettings,
|
|
2204
|
+
li as ProductCardButtons,
|
|
2205
|
+
si as ProductOptions,
|
|
2280
2206
|
vt as RangeSelector,
|
|
2281
2207
|
ot as Select,
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2208
|
+
oi as ShareLink,
|
|
2209
|
+
xn as ShoppingButton,
|
|
2210
|
+
bn as ShoppingModalCart,
|
|
2285
2211
|
it as Switch,
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2212
|
+
_i as TextSettings,
|
|
2213
|
+
gi as TextareaSettings,
|
|
2214
|
+
ri as TextareaUI,
|
|
2215
|
+
fi as TypesText,
|
|
2216
|
+
It as UserInfo
|
|
2291
2217
|
};
|