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