@billgangcom/theme-lib 1.44.2 → 1.44.3
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 +1 -0
- package/dist/builder/components/Preview/Render/index.d.ts +5 -0
- package/dist/builder/components/Sidebar/Layers/AnnouncementLayer/index.d.ts +1 -0
- package/dist/builder/components/Sidebar/Layers/index.d.ts +1 -0
- package/dist/builder/constants/block-icons.d.ts +1 -0
- package/dist/builder/constants/blocks.d.ts +24 -0
- package/dist/builder/index.d.ts +1 -0
- package/dist/builder/store/useLayersStore.d.ts +2 -0
- package/dist/builder/ui/Select/index.d.ts +4 -0
- package/dist/builder.cjs.js +5 -5
- package/dist/builder.es.js +1864 -1815
- package/dist/{index-X-Olyqgp.cjs → index-DFHUslAr.cjs} +31 -31
- package/dist/{index-CbgVRiD5.js → index-FNbiNtjB.js} +5710 -5696
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/pages/builder/index.d.ts +1 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +1 -0
- package/dist/ui/ButtonsSettings/index.d.ts +1 -0
- package/dist/ui/FormSettings/popup.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +4 -3
- package/dist/ui/ItemsSettings/popup.d.ts +3 -0
- package/dist/ui/PagesSettings/index.d.ts +26 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1735 -1463
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as b, c as
|
|
2
|
-
import { q as
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, c as Y, a as tt, S as st, T as Et, b as et, C as bt, u as yt, d as kt, D as $t, e as It, v as Nt, B as ot, f as ht, P as wt, g as Ct, h as St, i as Vt, s as Yt, k as Dt, l as Bt, m as Ot, M as Mt, n as Ut, o as Ht, p as Gt } from "./index-FNbiNtjB.js";
|
|
2
|
+
import { q as uc, L as _c } from "./index-FNbiNtjB.js";
|
|
3
|
+
import f from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
5
|
+
const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1ibay_15", Qt = "_subtitle_1ibay_22", Kt = "_alignmentContent_1ibay_29", Zt = "_alignments_1ibay_37", te = "_alignment_1ibay_8", ee = "_circle_1ibay_60", se = "_paddings_1ibay_67", ne = "_padding_1ibay_67", ie = "_active_1ibay_91", oe = "_input_1ibay_98", K = {
|
|
6
|
+
wrapper: Xt,
|
|
7
|
+
alignmentBlock: Wt,
|
|
8
|
+
title: Jt,
|
|
9
|
+
subtitle: Qt,
|
|
10
|
+
alignmentContent: Kt,
|
|
11
|
+
alignments: Zt,
|
|
12
|
+
alignment: te,
|
|
13
|
+
circle: ee,
|
|
14
|
+
paddings: se,
|
|
15
|
+
padding: ne,
|
|
16
|
+
active: ie,
|
|
17
|
+
input: oe
|
|
18
|
+
}, ae = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment: a, padding: e, setPadding: s, setAlignment:
|
|
30
|
-
function c(
|
|
31
|
-
switch (
|
|
28
|
+
], ce = ["left", "top", "right", "bottom"], Wa = (u) => {
|
|
29
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
|
|
30
|
+
function c(p) {
|
|
31
|
+
switch (p) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function l(p) {
|
|
49
|
+
switch (p) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,28 +57,28 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [o,
|
|
61
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
62
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
63
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
64
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
65
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
60
|
+
const [o, n] = f.useState(null), [d, j] = f.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
|
|
63
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
|
|
64
|
+
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
|
|
65
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((p) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
|
|
70
|
+
i(p);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: K.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
|
|
74
|
+
n(p);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
|
-
|
|
77
|
+
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
p !== a && o !== p && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
|
|
81
|
+
p !== a && o === p && /* @__PURE__ */ t.jsx(
|
|
82
82
|
b,
|
|
83
83
|
{
|
|
84
84
|
name: c(o),
|
|
@@ -87,7 +87,7 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
p === a && /* @__PURE__ */ t.jsx(
|
|
91
91
|
b,
|
|
92
92
|
{
|
|
93
93
|
name: c(a),
|
|
@@ -98,16 +98,16 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
p
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((p) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
106
|
+
className: Y(K.padding, {
|
|
107
|
+
[K.active]: d === p
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
j(
|
|
110
|
+
j(p);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
113
|
j(null);
|
|
@@ -116,19 +116,19 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
117
|
b,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: l(p),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
tt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[p]),
|
|
129
|
+
onChange: (r) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[p]: Number(r)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,26 +136,26 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
p
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
156
|
-
const { typesText: a, setTypesText: e } =
|
|
157
|
-
function s(
|
|
158
|
-
switch (
|
|
144
|
+
}, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", _e = "_top_1jkiw_20", me = "_itemsBlock_1jkiw_29", pt = {
|
|
145
|
+
title: le,
|
|
146
|
+
subtitle: re,
|
|
147
|
+
header: de,
|
|
148
|
+
text: ue,
|
|
149
|
+
top: _e,
|
|
150
|
+
itemsBlock: me
|
|
151
|
+
}, he = "_typeTexts_167ez_1", pe = "_block_167ez_8", fe = "_active_167ez_25", Pt = {
|
|
152
|
+
typeTexts: he,
|
|
153
|
+
block: pe,
|
|
154
|
+
active: fe
|
|
155
|
+
}, ge = ["bold", "italic", "underline", "strike-through", "code"], Rt = (u) => {
|
|
156
|
+
const { typesText: a, setTypesText: e } = u;
|
|
157
|
+
function s(i) {
|
|
158
|
+
switch (i) {
|
|
159
159
|
case "bold":
|
|
160
160
|
return "TextB";
|
|
161
161
|
case "italic":
|
|
@@ -168,33 +168,33 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: ge.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
[
|
|
174
|
+
className: Y(Pt.block, {
|
|
175
|
+
[Pt.active]: a.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
178
|
const c = [...a];
|
|
179
|
-
if (c.includes(
|
|
180
|
-
const
|
|
181
|
-
e(
|
|
179
|
+
if (c.includes(i)) {
|
|
180
|
+
const l = c.filter((o) => o !== i);
|
|
181
|
+
e(l);
|
|
182
182
|
} else
|
|
183
|
-
c.push(
|
|
183
|
+
c.push(i), e(c);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
186
|
b,
|
|
187
187
|
{
|
|
188
|
-
name: s(
|
|
189
|
-
fill: a.includes(
|
|
188
|
+
name: s(i),
|
|
189
|
+
fill: a.includes(i) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
},
|
|
195
|
-
String(
|
|
195
|
+
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, ft = {
|
|
198
198
|
h1: "Heading 1",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -202,256 +202,269 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
202
202
|
h5: "Heading 5",
|
|
203
203
|
h6: "Heading 6",
|
|
204
204
|
p: "Paragraph"
|
|
205
|
-
}, Lt = (
|
|
205
|
+
}, Lt = (u) => {
|
|
206
206
|
const {
|
|
207
207
|
typesText: a,
|
|
208
208
|
isActiveText: e,
|
|
209
209
|
setIsActiveText: s,
|
|
210
|
-
text:
|
|
210
|
+
text: i,
|
|
211
211
|
setText: c,
|
|
212
|
-
setTypesText:
|
|
212
|
+
setTypesText: l,
|
|
213
213
|
title: o,
|
|
214
|
-
subtitle:
|
|
215
|
-
typeFont:
|
|
214
|
+
subtitle: n = "Items",
|
|
215
|
+
typeFont: d,
|
|
216
216
|
setTypeFont: j
|
|
217
|
-
} =
|
|
218
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
219
|
-
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
220
|
-
o && /* @__PURE__ */ t.jsx("h3", { className:
|
|
217
|
+
} = u;
|
|
218
|
+
return /* @__PURE__ */ t.jsxs("div", { className: pt.text, children: [
|
|
219
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: pt.top, children: [
|
|
220
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: pt.title, children: o }),
|
|
221
221
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
222
|
-
|
|
222
|
+
st,
|
|
223
223
|
{
|
|
224
224
|
current: e,
|
|
225
|
-
onChange: (
|
|
225
|
+
onChange: (p) => s(p)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
229
|
+
/* @__PURE__ */ t.jsxs("div", { className: pt.itemsBlock, children: [
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: pt.subtitle, children: n }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
|
-
|
|
232
|
+
Et,
|
|
233
233
|
{
|
|
234
|
-
onChange: (
|
|
235
|
-
value:
|
|
234
|
+
onChange: (p) => c(p),
|
|
235
|
+
value: i,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ t.jsx(
|
|
240
|
-
|
|
240
|
+
Rt,
|
|
241
241
|
{
|
|
242
242
|
typesText: a,
|
|
243
|
-
setTypesText:
|
|
243
|
+
setTypesText: l
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
246
|
/* @__PURE__ */ t.jsx(
|
|
247
|
-
|
|
247
|
+
et,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(ft).filter(
|
|
251
|
+
(p) => p !== ft[d]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(
|
|
253
|
+
onChange: (p) => j(
|
|
254
|
+
Object.keys(ft).find(
|
|
255
|
+
(r) => ft[r] === p
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
258
|
+
value: ft[d]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
},
|
|
264
|
-
title:
|
|
265
|
-
subtitle:
|
|
266
|
-
header:
|
|
267
|
-
text:
|
|
268
|
-
productsBlock:
|
|
269
|
-
top:
|
|
270
|
-
itemsBlock:
|
|
263
|
+
}, xe = "_title_pef24_1", be = "_subtitle_pef24_5", ve = "_header_pef24_12", je = "_text_pef24_13", ye = "_productsBlock_pef24_14", ke = "_top_pef24_26", $e = "_itemsBlock_pef24_35", Ie = "_typeTexts_pef24_41", Ne = "_block_pef24_48", we = "_active_pef24_61", Ce = "_products_pef24_14", Se = "_product_pef24_14", Be = "_button_pef24_80", Te = "_disabled_pef24_91", Pe = "_image_pef24_95", Ae = "_info_pef24_102", Oe = "_name_pef24_114", Me = "_buttons_pef24_118", qe = "_modal_pef24_125", Ee = "_link_pef24_145", De = "_modalOptions_pef24_151", Ue = "_addButton_pef24_164", He = "_deleteButton_pef24_179", Re = "_closeIcon_pef24_191", z = {
|
|
264
|
+
title: xe,
|
|
265
|
+
subtitle: be,
|
|
266
|
+
header: ve,
|
|
267
|
+
text: je,
|
|
268
|
+
productsBlock: ye,
|
|
269
|
+
top: ke,
|
|
270
|
+
itemsBlock: $e,
|
|
271
271
|
typeTexts: Ie,
|
|
272
|
-
block:
|
|
273
|
-
active:
|
|
274
|
-
products:
|
|
272
|
+
block: Ne,
|
|
273
|
+
active: we,
|
|
274
|
+
products: Ce,
|
|
275
275
|
product: Se,
|
|
276
|
-
button:
|
|
277
|
-
disabled:
|
|
278
|
-
image:
|
|
279
|
-
info:
|
|
280
|
-
name:
|
|
276
|
+
button: Be,
|
|
277
|
+
disabled: Te,
|
|
278
|
+
image: Pe,
|
|
279
|
+
info: Ae,
|
|
280
|
+
name: Oe,
|
|
281
281
|
buttons: Me,
|
|
282
|
-
modal:
|
|
283
|
-
link:
|
|
284
|
-
modalOptions:
|
|
282
|
+
modal: qe,
|
|
283
|
+
link: Ee,
|
|
284
|
+
modalOptions: De,
|
|
285
285
|
addButton: Ue,
|
|
286
|
-
deleteButton:
|
|
287
|
-
closeIcon:
|
|
288
|
-
}, Le =
|
|
289
|
-
(
|
|
290
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
291
|
-
function o(
|
|
292
|
-
return
|
|
286
|
+
deleteButton: He,
|
|
287
|
+
closeIcon: Re
|
|
288
|
+
}, Le = f.forwardRef(
|
|
289
|
+
(u, a) => {
|
|
290
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
291
|
+
function o(n, d) {
|
|
292
|
+
return n.length > d ? `${n.slice(0, d)}...` : n;
|
|
293
293
|
}
|
|
294
294
|
return /* @__PURE__ */ t.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
297
|
ref: a,
|
|
298
|
-
className:
|
|
299
|
-
onClick: (
|
|
300
|
-
|
|
298
|
+
className: z.modal,
|
|
299
|
+
onClick: (n) => {
|
|
300
|
+
n.stopPropagation();
|
|
301
301
|
},
|
|
302
302
|
style: {
|
|
303
|
-
top: `${
|
|
304
|
-
left: `${
|
|
303
|
+
top: `${i.top}px`,
|
|
304
|
+
left: `${i.left}px`
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
309
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
307
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
308
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: o(e.name["en-US"], 20) }),
|
|
309
|
+
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
310
310
|
b,
|
|
311
311
|
{
|
|
312
312
|
name: "X",
|
|
313
313
|
height: 20,
|
|
314
314
|
width: 20,
|
|
315
315
|
onClick: () => {
|
|
316
|
-
s(null),
|
|
316
|
+
s(null), l(!1);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
) })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
322
|
-
if (
|
|
321
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((n) => {
|
|
322
|
+
if (n.type === "image")
|
|
323
323
|
return /* @__PURE__ */ t.jsx(
|
|
324
|
-
|
|
324
|
+
bt,
|
|
325
325
|
{
|
|
326
326
|
label: "Put up an attractive image",
|
|
327
|
-
activeImage: e[
|
|
328
|
-
onChange: (
|
|
327
|
+
activeImage: e[n.field],
|
|
328
|
+
onChange: (d) => {
|
|
329
329
|
const j = {
|
|
330
330
|
...e,
|
|
331
|
-
[
|
|
331
|
+
[n.field]: d
|
|
332
332
|
};
|
|
333
333
|
s(j);
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
|
-
String(
|
|
336
|
+
String(n.field)
|
|
337
337
|
);
|
|
338
|
-
if (
|
|
338
|
+
if (n.type === "text")
|
|
339
339
|
return /* @__PURE__ */ t.jsx(
|
|
340
340
|
Lt,
|
|
341
341
|
{
|
|
342
|
-
typesText: e[
|
|
343
|
-
setTypesText: (
|
|
342
|
+
typesText: e[n.field.type],
|
|
343
|
+
setTypesText: (d) => {
|
|
344
344
|
const j = {
|
|
345
345
|
...e,
|
|
346
|
-
[
|
|
346
|
+
[n.field.type]: d
|
|
347
347
|
};
|
|
348
348
|
s(j);
|
|
349
349
|
},
|
|
350
|
-
text: e[
|
|
351
|
-
setText: (
|
|
350
|
+
text: e[n.field.text]["en-US"] || "",
|
|
351
|
+
setText: (d) => {
|
|
352
352
|
const j = {
|
|
353
353
|
...e,
|
|
354
|
-
[
|
|
355
|
-
"en-US":
|
|
354
|
+
[n.field.text]: {
|
|
355
|
+
"en-US": d
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
s(j);
|
|
359
359
|
},
|
|
360
|
-
typeFont: e[
|
|
361
|
-
setTypeFont: (
|
|
360
|
+
typeFont: e[n.field.typeFont],
|
|
361
|
+
setTypeFont: (d) => {
|
|
362
362
|
const j = {
|
|
363
363
|
...e,
|
|
364
|
-
[
|
|
364
|
+
[n.field.typeFont]: d
|
|
365
365
|
};
|
|
366
366
|
s(j);
|
|
367
367
|
},
|
|
368
|
-
subtitle:
|
|
368
|
+
subtitle: n.label
|
|
369
369
|
}
|
|
370
370
|
);
|
|
371
|
-
if (
|
|
371
|
+
if (n.type === "input")
|
|
372
372
|
return /* @__PURE__ */ t.jsx(
|
|
373
|
-
|
|
373
|
+
tt,
|
|
374
374
|
{
|
|
375
|
-
onChange: (
|
|
375
|
+
onChange: (d) => {
|
|
376
376
|
const j = {
|
|
377
377
|
...e,
|
|
378
|
-
[
|
|
378
|
+
[n.field]: d
|
|
379
379
|
};
|
|
380
380
|
s(j);
|
|
381
381
|
},
|
|
382
|
-
value: e[
|
|
383
|
-
label:
|
|
384
|
-
placeholder:
|
|
382
|
+
value: e[n.field] || "",
|
|
383
|
+
label: n.label,
|
|
384
|
+
placeholder: n.placeholder
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
|
-
if (
|
|
388
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
387
|
+
if (n.type === "inputSwitch")
|
|
388
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
389
389
|
/* @__PURE__ */ t.jsx(
|
|
390
|
-
|
|
390
|
+
tt,
|
|
391
391
|
{
|
|
392
|
-
onChange: (
|
|
392
|
+
onChange: (d) => {
|
|
393
393
|
const j = {
|
|
394
394
|
...e,
|
|
395
|
-
[
|
|
395
|
+
[n.field.text]: d
|
|
396
396
|
};
|
|
397
397
|
s(j);
|
|
398
398
|
},
|
|
399
|
-
value: e[
|
|
400
|
-
label:
|
|
401
|
-
placeholder:
|
|
399
|
+
value: e[n.field.text] || "",
|
|
400
|
+
label: n.inputLabel,
|
|
401
|
+
placeholder: n.placeholder
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ t.jsx(
|
|
405
|
-
|
|
405
|
+
st,
|
|
406
406
|
{
|
|
407
|
-
current: !!e[
|
|
408
|
-
label:
|
|
409
|
-
onChange: (
|
|
407
|
+
current: !!e[n.field.switch] || !1,
|
|
408
|
+
label: n.switchLabel,
|
|
409
|
+
onChange: (d) => {
|
|
410
410
|
const j = {
|
|
411
411
|
...e,
|
|
412
|
-
[
|
|
412
|
+
[n.field.switch]: d
|
|
413
413
|
};
|
|
414
414
|
s(j);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
)
|
|
418
418
|
] });
|
|
419
|
-
if (
|
|
419
|
+
if (n.type === "list")
|
|
420
420
|
return /* @__PURE__ */ t.jsx(
|
|
421
|
-
|
|
421
|
+
Ge,
|
|
422
422
|
{
|
|
423
|
-
items: e[
|
|
424
|
-
setItems: (
|
|
423
|
+
items: e[n.field] || [],
|
|
424
|
+
setItems: (d) => {
|
|
425
425
|
const j = {
|
|
426
426
|
...e,
|
|
427
|
-
[
|
|
427
|
+
[n.field]: d
|
|
428
428
|
};
|
|
429
429
|
s(j);
|
|
430
430
|
},
|
|
431
431
|
itemsType: "select",
|
|
432
|
-
draggable:
|
|
433
|
-
itemsOptions:
|
|
434
|
-
deletable:
|
|
435
|
-
editable: !1,
|
|
436
|
-
subtitle:
|
|
437
|
-
addableOptions:
|
|
432
|
+
draggable: n.draggable || !1,
|
|
433
|
+
itemsOptions: n.itemsOptions,
|
|
434
|
+
deletable: n.deletable || !1,
|
|
435
|
+
editable: n.editable || !1,
|
|
436
|
+
subtitle: n.label,
|
|
437
|
+
addableOptions: n.addableOptions,
|
|
438
|
+
modalOptions: n.modalOptions
|
|
438
439
|
}
|
|
439
440
|
);
|
|
440
|
-
if (
|
|
441
|
+
if (n.type === "select")
|
|
441
442
|
return /* @__PURE__ */ t.jsx(
|
|
442
|
-
|
|
443
|
+
et,
|
|
443
444
|
{
|
|
444
|
-
options:
|
|
445
|
-
onChange: (
|
|
445
|
+
options: n.itemsOptions,
|
|
446
|
+
onChange: (d) => {
|
|
446
447
|
const j = {
|
|
447
448
|
...e,
|
|
448
|
-
[
|
|
449
|
+
[n.field]: d
|
|
449
450
|
};
|
|
450
451
|
s(j);
|
|
451
452
|
},
|
|
452
|
-
label:
|
|
453
|
-
value: e[
|
|
454
|
-
leftAddon:
|
|
453
|
+
label: n.label,
|
|
454
|
+
value: e[n.field] || "String",
|
|
455
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
|
|
456
|
+
switcher: n.switcher ? {
|
|
457
|
+
value: !!e[n.switcher],
|
|
458
|
+
onChange: (d) => {
|
|
459
|
+
if (n.switcher === "isActive") {
|
|
460
|
+
const j = {
|
|
461
|
+
...e,
|
|
462
|
+
[n.switcher]: d
|
|
463
|
+
};
|
|
464
|
+
s(j);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
} : void 0
|
|
455
468
|
}
|
|
456
469
|
);
|
|
457
470
|
}) })
|
|
@@ -459,16 +472,16 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
459
472
|
}
|
|
460
473
|
);
|
|
461
474
|
}
|
|
462
|
-
), ze = "_other_g74jx_1",
|
|
475
|
+
), ze = "_other_g74jx_1", Fe = "_subtitle_g74jx_7", Ve = "_items_g74jx_14", At = {
|
|
463
476
|
other: ze,
|
|
464
|
-
subtitle:
|
|
465
|
-
items:
|
|
466
|
-
},
|
|
467
|
-
const { items: a, title: e = "Other" } =
|
|
468
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
469
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
470
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
471
|
-
|
|
477
|
+
subtitle: Fe,
|
|
478
|
+
items: Ve
|
|
479
|
+
}, Tt = (u) => {
|
|
480
|
+
const { items: a, title: e = "Other" } = u;
|
|
481
|
+
return /* @__PURE__ */ t.jsxs("div", { className: At.other, children: [
|
|
482
|
+
/* @__PURE__ */ t.jsx("h5", { className: At.subtitle, children: e }),
|
|
483
|
+
/* @__PURE__ */ t.jsx("div", { className: At.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
484
|
+
st,
|
|
472
485
|
{
|
|
473
486
|
current: s.isItem,
|
|
474
487
|
onChange: (c) => s.setIsItem(c),
|
|
@@ -476,105 +489,105 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
476
489
|
hasBackground: !0,
|
|
477
490
|
paddingless: !1
|
|
478
491
|
},
|
|
479
|
-
|
|
492
|
+
i
|
|
480
493
|
)) })
|
|
481
494
|
] });
|
|
482
495
|
};
|
|
483
|
-
function
|
|
496
|
+
function Ye({ product: u, children: a }) {
|
|
484
497
|
const {
|
|
485
498
|
attributes: e,
|
|
486
499
|
listeners: s,
|
|
487
|
-
setNodeRef:
|
|
500
|
+
setNodeRef: i,
|
|
488
501
|
transform: c,
|
|
489
|
-
transition:
|
|
502
|
+
transition: l,
|
|
490
503
|
isDragging: o
|
|
491
|
-
} =
|
|
492
|
-
id:
|
|
493
|
-
}),
|
|
494
|
-
transform:
|
|
495
|
-
transition:
|
|
504
|
+
} = Ct({
|
|
505
|
+
id: u.id
|
|
506
|
+
}), n = {
|
|
507
|
+
transform: St.Transform.toString(c),
|
|
508
|
+
transition: l
|
|
496
509
|
};
|
|
497
510
|
return /* @__PURE__ */ t.jsx(
|
|
498
511
|
"div",
|
|
499
512
|
{
|
|
500
|
-
ref:
|
|
501
|
-
style:
|
|
502
|
-
className: `${
|
|
513
|
+
ref: i,
|
|
514
|
+
style: n,
|
|
515
|
+
className: `${z.product} ${o ? z.dragging : ""}`,
|
|
503
516
|
...e,
|
|
504
517
|
...s,
|
|
505
518
|
children: a
|
|
506
519
|
}
|
|
507
520
|
);
|
|
508
521
|
}
|
|
509
|
-
const
|
|
522
|
+
const Ge = (u) => {
|
|
510
523
|
const {
|
|
511
524
|
isActiveItems: a,
|
|
512
525
|
setIsActiveItems: e,
|
|
513
526
|
items: s,
|
|
514
|
-
setItems:
|
|
527
|
+
setItems: i,
|
|
515
528
|
other: c,
|
|
516
|
-
title:
|
|
529
|
+
title: l,
|
|
517
530
|
subtitle: o,
|
|
518
|
-
editable:
|
|
519
|
-
draggable:
|
|
531
|
+
editable: n = !0,
|
|
532
|
+
draggable: d = !1,
|
|
520
533
|
withImage: j = !1,
|
|
521
|
-
deletable:
|
|
522
|
-
addable:
|
|
523
|
-
itemsType:
|
|
524
|
-
itemsPlaceholder:
|
|
525
|
-
itemsOptions:
|
|
526
|
-
hasRangeSelector:
|
|
527
|
-
rangeSelectorOptions:
|
|
528
|
-
modalOptions:
|
|
534
|
+
deletable: p = !0,
|
|
535
|
+
addable: r = !0,
|
|
536
|
+
itemsType: y,
|
|
537
|
+
itemsPlaceholder: h = "",
|
|
538
|
+
itemsOptions: _,
|
|
539
|
+
hasRangeSelector: w = !1,
|
|
540
|
+
rangeSelectorOptions: H,
|
|
541
|
+
modalOptions: $,
|
|
529
542
|
addableOptions: g = {},
|
|
530
|
-
limit:
|
|
531
|
-
|
|
532
|
-
} =
|
|
543
|
+
limit: B,
|
|
544
|
+
autoInterval: E
|
|
545
|
+
} = u, [F, T] = f.useState(null), [v, A] = f.useState({
|
|
533
546
|
top: 0,
|
|
534
547
|
left: 0
|
|
535
|
-
}), [
|
|
536
|
-
|
|
548
|
+
}), [x, I] = f.useState(null), C = f.useRef(null), [R, O] = f.useState(!1), U = yt(
|
|
549
|
+
kt(wt, {
|
|
537
550
|
activationConstraint: {
|
|
538
551
|
distance: 5
|
|
539
552
|
}
|
|
540
553
|
})
|
|
541
554
|
);
|
|
542
|
-
|
|
543
|
-
const
|
|
544
|
-
|
|
555
|
+
f.useEffect(() => {
|
|
556
|
+
const m = () => {
|
|
557
|
+
T(null), O(!1);
|
|
545
558
|
};
|
|
546
|
-
return document.body.addEventListener("click",
|
|
547
|
-
|
|
559
|
+
return document.body.addEventListener("click", m), T(null), O(!1), () => {
|
|
560
|
+
T(null), O(!1), document.body.removeEventListener("click", m);
|
|
548
561
|
};
|
|
549
|
-
}, []),
|
|
550
|
-
if (
|
|
551
|
-
const
|
|
552
|
-
|
|
562
|
+
}, []), f.useEffect(() => {
|
|
563
|
+
if (F) {
|
|
564
|
+
const m = [...s].map((N) => N.id === F.id ? F : N);
|
|
565
|
+
i(m);
|
|
553
566
|
}
|
|
554
|
-
}, [
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
|
|
559
|
-
top:
|
|
560
|
-
left:
|
|
567
|
+
}, [F]), f.useEffect(() => {
|
|
568
|
+
if (C.current && x) {
|
|
569
|
+
const m = C.current.getBoundingClientRect().height, N = window.innerHeight;
|
|
570
|
+
let M = x.top;
|
|
571
|
+
M + m > N + window.scrollY - 200 && (M = N + window.scrollY - m - 200), M < 0 && (M = 10), A({
|
|
572
|
+
top: M,
|
|
573
|
+
left: x.left
|
|
561
574
|
});
|
|
562
575
|
}
|
|
563
|
-
}, [
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
top:
|
|
569
|
-
left:
|
|
570
|
-
}),
|
|
576
|
+
}, [C.current, x]);
|
|
577
|
+
const nt = (m, N) => {
|
|
578
|
+
m.stopPropagation();
|
|
579
|
+
const M = m.target.getBoundingClientRect();
|
|
580
|
+
I({
|
|
581
|
+
top: M.top + window.scrollY - 70,
|
|
582
|
+
left: M.left - (r ? 30 : 65)
|
|
583
|
+
}), T(N), O(!0);
|
|
571
584
|
};
|
|
572
|
-
function
|
|
585
|
+
function dt(m) {
|
|
573
586
|
if (j)
|
|
574
|
-
return
|
|
587
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
575
588
|
"img",
|
|
576
589
|
{
|
|
577
|
-
src: `https://imagedelivery.net/${
|
|
590
|
+
src: `https://imagedelivery.net/${m[0]}/w=1000`,
|
|
578
591
|
alt: "image",
|
|
579
592
|
width: 16,
|
|
580
593
|
height: 16
|
|
@@ -589,19 +602,19 @@ const Ye = (d) => {
|
|
|
589
602
|
}
|
|
590
603
|
);
|
|
591
604
|
}
|
|
592
|
-
const
|
|
593
|
-
const { active:
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
|
|
605
|
+
const k = (m) => {
|
|
606
|
+
const { active: N, over: M } = m;
|
|
607
|
+
if (M && N.id !== M.id) {
|
|
608
|
+
const L = s.findIndex((q) => q.id === N.id), X = s.findIndex((q) => q.id === M.id);
|
|
609
|
+
if (L !== -1 && X !== -1) {
|
|
610
|
+
const q = [...s], [ut] = q.splice(L, 1);
|
|
611
|
+
q.splice(X, 0, ut), i(q);
|
|
599
612
|
}
|
|
600
613
|
}
|
|
601
|
-
},
|
|
602
|
-
var
|
|
603
|
-
const
|
|
604
|
-
|
|
614
|
+
}, D = (m, N) => {
|
|
615
|
+
var L, X;
|
|
616
|
+
const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
617
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
605
618
|
b,
|
|
606
619
|
{
|
|
607
620
|
name: "DotsSixVertical",
|
|
@@ -610,71 +623,73 @@ const Ye = (d) => {
|
|
|
610
623
|
height: 20
|
|
611
624
|
}
|
|
612
625
|
) }),
|
|
613
|
-
|
|
614
|
-
|
|
626
|
+
y === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
627
|
+
et,
|
|
615
628
|
{
|
|
616
|
-
onChange: (
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
...
|
|
629
|
+
onChange: (q) => {
|
|
630
|
+
const ut = [...s], mt = _.find((vt) => vt.name["en-US"] === q);
|
|
631
|
+
if (!mt) return;
|
|
632
|
+
const _t = ut.map((vt) => vt.id === m.id ? {
|
|
633
|
+
...mt,
|
|
621
634
|
name: {
|
|
622
|
-
"en-US":
|
|
635
|
+
"en-US": q
|
|
623
636
|
}
|
|
624
|
-
} :
|
|
625
|
-
|
|
626
|
-
...
|
|
637
|
+
} : vt);
|
|
638
|
+
T({
|
|
639
|
+
...m,
|
|
627
640
|
name: {
|
|
628
|
-
"en-US":
|
|
641
|
+
"en-US": q
|
|
629
642
|
}
|
|
630
|
-
}),
|
|
643
|
+
}), i([..._t]);
|
|
631
644
|
},
|
|
632
|
-
value:
|
|
633
|
-
options:
|
|
634
|
-
leftAddon:
|
|
645
|
+
value: m.name["en-US"],
|
|
646
|
+
options: _.filter((q) => !s.find((ut) => ut.name["en-US"] === q.name["en-US"])).map((q) => q.name["en-US"]),
|
|
647
|
+
leftAddon: dt(m.images)
|
|
635
648
|
}
|
|
636
649
|
),
|
|
637
|
-
|
|
638
|
-
|
|
650
|
+
y === "input" && /* @__PURE__ */ t.jsx(
|
|
651
|
+
tt,
|
|
639
652
|
{
|
|
640
|
-
onChange: (
|
|
641
|
-
const
|
|
642
|
-
...
|
|
653
|
+
onChange: (q) => {
|
|
654
|
+
const mt = [...s].map((_t) => _t.id === m.id ? {
|
|
655
|
+
...m,
|
|
643
656
|
name: {
|
|
644
|
-
"en-US":
|
|
657
|
+
"en-US": q
|
|
645
658
|
}
|
|
646
|
-
} :
|
|
647
|
-
|
|
659
|
+
} : _t);
|
|
660
|
+
i([...mt]);
|
|
648
661
|
},
|
|
649
|
-
value:
|
|
650
|
-
placeholder:
|
|
662
|
+
value: m.name["en-US"],
|
|
663
|
+
placeholder: h
|
|
651
664
|
}
|
|
652
665
|
),
|
|
653
|
-
|
|
654
|
-
|
|
666
|
+
y === "image" && /* @__PURE__ */ t.jsx(
|
|
667
|
+
bt,
|
|
655
668
|
{
|
|
656
|
-
onChange: (
|
|
657
|
-
const
|
|
658
|
-
...
|
|
659
|
-
images:
|
|
660
|
-
} :
|
|
661
|
-
|
|
669
|
+
onChange: (q) => {
|
|
670
|
+
const mt = [...s].map((_t) => _t.id === m.id ? {
|
|
671
|
+
...m,
|
|
672
|
+
images: q
|
|
673
|
+
} : _t);
|
|
674
|
+
i([...mt]);
|
|
662
675
|
},
|
|
663
|
-
activeImage: (
|
|
676
|
+
activeImage: (L = s.find((q) => q.id === m.id)) != null && L.images ? (X = s.find((q) => q.id === m.id)) == null ? void 0 : X.images[0] : void 0
|
|
664
677
|
}
|
|
665
678
|
),
|
|
666
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
667
|
-
|
|
679
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
680
|
+
n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
668
681
|
b,
|
|
669
682
|
{
|
|
670
683
|
name: "Sliders",
|
|
671
684
|
hoverable: !0,
|
|
672
685
|
width: 20,
|
|
673
686
|
height: 20,
|
|
674
|
-
onClick: (
|
|
687
|
+
onClick: (q) => {
|
|
688
|
+
console.log(q, m), nt(q, m);
|
|
689
|
+
}
|
|
675
690
|
}
|
|
676
691
|
) }),
|
|
677
|
-
|
|
692
|
+
p && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
678
693
|
b,
|
|
679
694
|
{
|
|
680
695
|
name: "Trash",
|
|
@@ -682,69 +697,69 @@ const Ye = (d) => {
|
|
|
682
697
|
width: 20,
|
|
683
698
|
height: 20,
|
|
684
699
|
fill: "#C12A2A",
|
|
685
|
-
onClick: () =>
|
|
700
|
+
onClick: () => i(s.filter((q) => q.id !== m.id))
|
|
686
701
|
}
|
|
687
702
|
) })
|
|
688
703
|
] })
|
|
689
704
|
] });
|
|
690
|
-
return
|
|
691
|
-
|
|
705
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
706
|
+
Ye,
|
|
692
707
|
{
|
|
693
|
-
product:
|
|
694
|
-
index:
|
|
695
|
-
children:
|
|
708
|
+
product: m,
|
|
709
|
+
index: N,
|
|
710
|
+
children: M
|
|
696
711
|
},
|
|
697
|
-
|
|
712
|
+
m.id
|
|
698
713
|
) : /* @__PURE__ */ t.jsx(
|
|
699
714
|
"div",
|
|
700
715
|
{
|
|
701
|
-
className:
|
|
702
|
-
children:
|
|
716
|
+
className: z.product,
|
|
717
|
+
children: M
|
|
703
718
|
},
|
|
704
|
-
|
|
719
|
+
m.id
|
|
705
720
|
);
|
|
706
721
|
};
|
|
707
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
708
|
-
(
|
|
709
|
-
|
|
722
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
723
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
724
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
|
|
710
725
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
711
|
-
|
|
726
|
+
st,
|
|
712
727
|
{
|
|
713
728
|
current: a,
|
|
714
|
-
onChange: (
|
|
729
|
+
onChange: (m) => e == null ? void 0 : e(m)
|
|
715
730
|
}
|
|
716
731
|
)
|
|
717
732
|
] }),
|
|
718
|
-
|
|
733
|
+
F && n && $ && R && /* @__PURE__ */ t.jsx(
|
|
719
734
|
Le,
|
|
720
735
|
{
|
|
721
|
-
ref:
|
|
722
|
-
activeItem:
|
|
723
|
-
setActiveItem:
|
|
724
|
-
popupPosition:
|
|
725
|
-
modalOptions:
|
|
736
|
+
ref: C,
|
|
737
|
+
activeItem: F,
|
|
738
|
+
setActiveItem: T,
|
|
739
|
+
popupPosition: v,
|
|
740
|
+
modalOptions: $,
|
|
726
741
|
setIsOpenModal: O
|
|
727
742
|
}
|
|
728
743
|
),
|
|
729
|
-
|
|
730
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
731
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
732
|
-
|
|
733
|
-
|
|
744
|
+
w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
745
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
746
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
747
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
748
|
+
$t,
|
|
734
749
|
{
|
|
735
|
-
sensors:
|
|
736
|
-
onDragEnd:
|
|
750
|
+
sensors: U,
|
|
751
|
+
onDragEnd: k,
|
|
737
752
|
children: /* @__PURE__ */ t.jsx(
|
|
738
|
-
|
|
753
|
+
It,
|
|
739
754
|
{
|
|
740
|
-
items: s.map((
|
|
741
|
-
strategy:
|
|
742
|
-
children: s.map((
|
|
755
|
+
items: s.map((m) => m.id),
|
|
756
|
+
strategy: Nt,
|
|
757
|
+
children: s.map((m, N) => D(m, N))
|
|
743
758
|
}
|
|
744
759
|
)
|
|
745
760
|
}
|
|
746
|
-
) : s.map((
|
|
747
|
-
|
|
761
|
+
) : s.map((m, N) => D(m, N)),
|
|
762
|
+
r && /* @__PURE__ */ t.jsx(
|
|
748
763
|
"div",
|
|
749
764
|
{
|
|
750
765
|
style: {
|
|
@@ -753,46 +768,46 @@ const Ye = (d) => {
|
|
|
753
768
|
justifyContent: "center"
|
|
754
769
|
},
|
|
755
770
|
children: /* @__PURE__ */ t.jsx(
|
|
756
|
-
|
|
771
|
+
ot,
|
|
757
772
|
{
|
|
758
773
|
withoutHover: !0,
|
|
759
|
-
className:
|
|
760
|
-
[
|
|
774
|
+
className: Y(z.button, {
|
|
775
|
+
[z.disabled]: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length))
|
|
761
776
|
}),
|
|
762
777
|
size: "s",
|
|
763
|
-
disabled: !!(
|
|
778
|
+
disabled: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length)),
|
|
764
779
|
onClick: () => {
|
|
765
|
-
const
|
|
766
|
-
let
|
|
767
|
-
if (
|
|
768
|
-
for (let
|
|
769
|
-
if (!s.find((
|
|
770
|
-
|
|
780
|
+
const m = [...s];
|
|
781
|
+
let N = null;
|
|
782
|
+
if (_) {
|
|
783
|
+
for (let M = 0; M < _.length; M++)
|
|
784
|
+
if (!s.find((L) => L.id === _[M].id)) {
|
|
785
|
+
N = _[M];
|
|
771
786
|
break;
|
|
772
787
|
}
|
|
773
788
|
}
|
|
774
|
-
|
|
775
|
-
name:
|
|
776
|
-
id: (
|
|
789
|
+
y === "select" && _ ? m.push({
|
|
790
|
+
name: N ? N.name : _[0].name,
|
|
791
|
+
id: (N == null ? void 0 : N.id) || _[0].id,
|
|
777
792
|
...g
|
|
778
|
-
}) :
|
|
793
|
+
}) : y === "input" ? m.push({
|
|
779
794
|
name: {
|
|
780
795
|
"en-US": ""
|
|
781
796
|
},
|
|
782
|
-
id:
|
|
797
|
+
id: ht(),
|
|
783
798
|
...g
|
|
784
|
-
}) :
|
|
799
|
+
}) : m.push({
|
|
785
800
|
name: {
|
|
786
801
|
"en-US": `Image ${s.length + 1}`
|
|
787
802
|
},
|
|
788
|
-
id:
|
|
803
|
+
id: ht(),
|
|
789
804
|
...g
|
|
790
|
-
}),
|
|
805
|
+
}), i(m);
|
|
791
806
|
},
|
|
792
807
|
style: {
|
|
793
808
|
width: "fit-content"
|
|
794
809
|
},
|
|
795
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
810
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
796
811
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
797
812
|
/* @__PURE__ */ t.jsx(
|
|
798
813
|
b,
|
|
@@ -808,14 +823,14 @@ const Ye = (d) => {
|
|
|
808
823
|
}
|
|
809
824
|
)
|
|
810
825
|
] }),
|
|
811
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
826
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
812
827
|
E !== void 0 && /* @__PURE__ */ t.jsx(
|
|
813
|
-
|
|
828
|
+
tt,
|
|
814
829
|
{
|
|
815
|
-
label: "Auto scroll interval",
|
|
830
|
+
label: E.title || "Auto scroll interval",
|
|
816
831
|
type: "number",
|
|
817
|
-
value: String(E.
|
|
818
|
-
onChange: (
|
|
832
|
+
value: String(E.autoInterval),
|
|
833
|
+
onChange: (m) => E.setAutoInterval(Number(m)),
|
|
819
834
|
min: 0.1,
|
|
820
835
|
max: 100,
|
|
821
836
|
style: {
|
|
@@ -825,51 +840,51 @@ const Ye = (d) => {
|
|
|
825
840
|
}
|
|
826
841
|
)
|
|
827
842
|
] });
|
|
828
|
-
},
|
|
829
|
-
title:
|
|
830
|
-
subtitle:
|
|
831
|
-
header:
|
|
832
|
-
text:
|
|
833
|
-
productsBlock:
|
|
834
|
-
top:
|
|
835
|
-
itemsBlock:
|
|
836
|
-
typeTexts:
|
|
837
|
-
block:
|
|
838
|
-
active:
|
|
839
|
-
products:
|
|
840
|
-
product:
|
|
841
|
-
button:
|
|
842
|
-
disabled:
|
|
843
|
-
image:
|
|
844
|
-
info:
|
|
845
|
-
name:
|
|
846
|
-
buttons:
|
|
847
|
-
modal:
|
|
848
|
-
link:
|
|
849
|
-
modalOptions:
|
|
850
|
-
addButton:
|
|
851
|
-
deleteButton:
|
|
852
|
-
},
|
|
843
|
+
}, Xe = "_title_82zux_1", We = "_subtitle_82zux_5", Je = "_header_82zux_12", Qe = "_text_82zux_13", Ke = "_productsBlock_82zux_14", Ze = "_top_82zux_26", ts = "_itemsBlock_82zux_35", es = "_typeTexts_82zux_41", ss = "_block_82zux_48", ns = "_active_82zux_61", is = "_products_82zux_14", os = "_product_82zux_14", as = "_button_82zux_80", cs = "_disabled_82zux_91", ls = "_image_82zux_95", rs = "_info_82zux_102", ds = "_name_82zux_114", us = "_buttons_82zux_118", _s = "_modal_82zux_125", ms = "_link_82zux_145", hs = "_modalOptions_82zux_151", ps = "_addButton_82zux_157", fs = "_deleteButton_82zux_179", Z = {
|
|
844
|
+
title: Xe,
|
|
845
|
+
subtitle: We,
|
|
846
|
+
header: Je,
|
|
847
|
+
text: Qe,
|
|
848
|
+
productsBlock: Ke,
|
|
849
|
+
top: Ze,
|
|
850
|
+
itemsBlock: ts,
|
|
851
|
+
typeTexts: es,
|
|
852
|
+
block: ss,
|
|
853
|
+
active: ns,
|
|
854
|
+
products: is,
|
|
855
|
+
product: os,
|
|
856
|
+
button: as,
|
|
857
|
+
disabled: cs,
|
|
858
|
+
image: ls,
|
|
859
|
+
info: rs,
|
|
860
|
+
name: ds,
|
|
861
|
+
buttons: us,
|
|
862
|
+
modal: _s,
|
|
863
|
+
link: ms,
|
|
864
|
+
modalOptions: hs,
|
|
865
|
+
addButton: ps,
|
|
866
|
+
deleteButton: fs
|
|
867
|
+
}, Ja = (u) => {
|
|
853
868
|
const {
|
|
854
869
|
isActiveItems: a,
|
|
855
870
|
setIsActiveItems: e,
|
|
856
871
|
items: s,
|
|
857
|
-
setItems:
|
|
872
|
+
setItems: i,
|
|
858
873
|
other: c,
|
|
859
|
-
title:
|
|
874
|
+
title: l,
|
|
860
875
|
subtitle: o,
|
|
861
|
-
draggable:
|
|
862
|
-
withImage:
|
|
876
|
+
draggable: n = !1,
|
|
877
|
+
withImage: d = !1,
|
|
863
878
|
addable: j = !0,
|
|
864
|
-
itemsOptions:
|
|
865
|
-
hasRangeSelector:
|
|
866
|
-
rangeSelectorOptions:
|
|
867
|
-
limit:
|
|
868
|
-
autoScrollInterval:
|
|
869
|
-
deletable:
|
|
870
|
-
} =
|
|
871
|
-
function
|
|
872
|
-
if (
|
|
879
|
+
itemsOptions: p,
|
|
880
|
+
hasRangeSelector: r = !1,
|
|
881
|
+
rangeSelectorOptions: y,
|
|
882
|
+
limit: h,
|
|
883
|
+
autoScrollInterval: _,
|
|
884
|
+
deletable: w
|
|
885
|
+
} = u;
|
|
886
|
+
function H(g) {
|
|
887
|
+
if (d)
|
|
873
888
|
return g ? /* @__PURE__ */ t.jsx(
|
|
874
889
|
"img",
|
|
875
890
|
{
|
|
@@ -888,11 +903,11 @@ const Ye = (d) => {
|
|
|
888
903
|
}
|
|
889
904
|
);
|
|
890
905
|
}
|
|
891
|
-
const
|
|
892
|
-
const E =
|
|
906
|
+
const $ = (g, B = !1) => {
|
|
907
|
+
const E = p.find((T) => T.id === g);
|
|
893
908
|
if (!E) return;
|
|
894
|
-
const
|
|
895
|
-
|
|
909
|
+
const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
910
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
896
911
|
b,
|
|
897
912
|
{
|
|
898
913
|
name: "DotsSixVertical",
|
|
@@ -902,20 +917,20 @@ const Ye = (d) => {
|
|
|
902
917
|
}
|
|
903
918
|
) }),
|
|
904
919
|
/* @__PURE__ */ t.jsx(
|
|
905
|
-
|
|
920
|
+
et,
|
|
906
921
|
{
|
|
907
|
-
onChange: (
|
|
908
|
-
const
|
|
909
|
-
if (!
|
|
910
|
-
const
|
|
911
|
-
|
|
922
|
+
onChange: (T) => {
|
|
923
|
+
const v = [...s], A = p.find((C) => C.name === T);
|
|
924
|
+
if (!A) return;
|
|
925
|
+
const x = A.id, I = v.map((C) => C === g ? x : C);
|
|
926
|
+
i([...I]);
|
|
912
927
|
},
|
|
913
928
|
value: E.name,
|
|
914
|
-
options:
|
|
915
|
-
leftAddon:
|
|
929
|
+
options: p.filter((T) => !s.find((v) => v === T.id)).map((T) => T.name),
|
|
930
|
+
leftAddon: H(E.images)
|
|
916
931
|
}
|
|
917
932
|
),
|
|
918
|
-
|
|
933
|
+
B && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
919
934
|
b,
|
|
920
935
|
{
|
|
921
936
|
name: "Trash",
|
|
@@ -923,34 +938,34 @@ const Ye = (d) => {
|
|
|
923
938
|
width: 20,
|
|
924
939
|
height: 20,
|
|
925
940
|
fill: "#C12A2A",
|
|
926
|
-
onClick: () =>
|
|
941
|
+
onClick: () => i(s.filter((T) => T !== g))
|
|
927
942
|
}
|
|
928
943
|
) }) })
|
|
929
944
|
] });
|
|
930
945
|
return /* @__PURE__ */ t.jsx(
|
|
931
946
|
"div",
|
|
932
947
|
{
|
|
933
|
-
className:
|
|
934
|
-
children:
|
|
948
|
+
className: Z.product,
|
|
949
|
+
children: F
|
|
935
950
|
},
|
|
936
951
|
g
|
|
937
952
|
);
|
|
938
953
|
};
|
|
939
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
940
|
-
(
|
|
941
|
-
|
|
954
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.productsBlock, children: [
|
|
955
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
|
|
956
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: l }),
|
|
942
957
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
943
|
-
|
|
958
|
+
st,
|
|
944
959
|
{
|
|
945
960
|
current: a,
|
|
946
961
|
onChange: (g) => e == null ? void 0 : e(g)
|
|
947
962
|
}
|
|
948
963
|
)
|
|
949
964
|
] }),
|
|
950
|
-
|
|
951
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
952
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
953
|
-
s.map((g) =>
|
|
965
|
+
r && y && /* @__PURE__ */ t.jsx(qt, { ...y }),
|
|
966
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
967
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
|
|
968
|
+
s.map((g) => $(g, w)),
|
|
954
969
|
j && /* @__PURE__ */ t.jsx(
|
|
955
970
|
"div",
|
|
956
971
|
{
|
|
@@ -961,30 +976,30 @@ const Ye = (d) => {
|
|
|
961
976
|
gap: 5
|
|
962
977
|
},
|
|
963
978
|
children: /* @__PURE__ */ t.jsx(
|
|
964
|
-
|
|
979
|
+
ot,
|
|
965
980
|
{
|
|
966
981
|
withoutHover: !0,
|
|
967
|
-
className:
|
|
968
|
-
[
|
|
982
|
+
className: Y(Z.button, {
|
|
983
|
+
[Z.disabled]: !!(h && h <= s.length || s.length === p.length)
|
|
969
984
|
}),
|
|
970
985
|
size: "s",
|
|
971
|
-
disabled: !!(
|
|
986
|
+
disabled: !!(h && h <= s.length || s.length === p.length),
|
|
972
987
|
onClick: () => {
|
|
973
988
|
const g = [...s];
|
|
974
|
-
let
|
|
975
|
-
if (
|
|
976
|
-
for (let E = 0; E <
|
|
977
|
-
if (!s.find((
|
|
978
|
-
|
|
989
|
+
let B = null;
|
|
990
|
+
if (p) {
|
|
991
|
+
for (let E = 0; E < p.length; E++)
|
|
992
|
+
if (!s.find((F) => F === p[E].id)) {
|
|
993
|
+
B = p[E];
|
|
979
994
|
break;
|
|
980
995
|
}
|
|
981
996
|
}
|
|
982
|
-
g.push((
|
|
997
|
+
g.push((B == null ? void 0 : B.id) || p[0].id), i(g);
|
|
983
998
|
},
|
|
984
999
|
style: {
|
|
985
1000
|
width: "fit-content"
|
|
986
1001
|
},
|
|
987
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1002
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
|
|
988
1003
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
989
1004
|
/* @__PURE__ */ t.jsx(
|
|
990
1005
|
b,
|
|
@@ -1000,14 +1015,14 @@ const Ye = (d) => {
|
|
|
1000
1015
|
}
|
|
1001
1016
|
)
|
|
1002
1017
|
] }),
|
|
1003
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1004
|
-
|
|
1005
|
-
|
|
1018
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
1019
|
+
_ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1020
|
+
tt,
|
|
1006
1021
|
{
|
|
1007
1022
|
label: "Auto scroll interval",
|
|
1008
1023
|
type: "number",
|
|
1009
|
-
value: String(
|
|
1010
|
-
onChange: (g) =>
|
|
1024
|
+
value: String(_.scrollInterval),
|
|
1025
|
+
onChange: (g) => _.setScrollInterval(Number(g)),
|
|
1011
1026
|
min: 0.1,
|
|
1012
1027
|
max: 100,
|
|
1013
1028
|
style: {
|
|
@@ -1017,50 +1032,305 @@ const Ye = (d) => {
|
|
|
1017
1032
|
}
|
|
1018
1033
|
)
|
|
1019
1034
|
] });
|
|
1020
|
-
},
|
|
1021
|
-
title:
|
|
1022
|
-
subtitle:
|
|
1023
|
-
header:
|
|
1024
|
-
text:
|
|
1025
|
-
productsBlock:
|
|
1026
|
-
top:
|
|
1027
|
-
itemsBlock:
|
|
1028
|
-
typeTexts:
|
|
1035
|
+
}, gs = "_title_roi3a_1", xs = "_subtitle_roi3a_5", bs = "_header_roi3a_12", vs = "_text_roi3a_13", js = "_productsBlock_roi3a_14", ys = "_top_roi3a_26", ks = "_itemsBlock_roi3a_35", $s = "_typeTexts_roi3a_41", Is = "_block_roi3a_48", Ns = "_active_roi3a_61", ws = "_products_roi3a_14", Cs = "_product_roi3a_14", Ss = "_button_roi3a_80", Bs = "_disabled_roi3a_91", Ts = "_image_roi3a_95", Ps = "_info_roi3a_102", As = "_name_roi3a_114", Os = "_buttons_roi3a_118", Ms = "_modal_roi3a_125", qs = "_link_roi3a_145", Es = "_modalOptions_roi3a_151", Ds = "_addButton_roi3a_164", Us = "_deleteButton_roi3a_179", Hs = "_closeIcon_roi3a_191", J = {
|
|
1036
|
+
title: gs,
|
|
1037
|
+
subtitle: xs,
|
|
1038
|
+
header: bs,
|
|
1039
|
+
text: vs,
|
|
1040
|
+
productsBlock: js,
|
|
1041
|
+
top: ys,
|
|
1042
|
+
itemsBlock: ks,
|
|
1043
|
+
typeTexts: $s,
|
|
1029
1044
|
block: Is,
|
|
1030
|
-
active:
|
|
1031
|
-
products:
|
|
1032
|
-
product:
|
|
1045
|
+
active: Ns,
|
|
1046
|
+
products: ws,
|
|
1047
|
+
product: Cs,
|
|
1033
1048
|
button: Ss,
|
|
1034
|
-
disabled:
|
|
1035
|
-
image:
|
|
1036
|
-
info:
|
|
1037
|
-
name:
|
|
1038
|
-
buttons:
|
|
1049
|
+
disabled: Bs,
|
|
1050
|
+
image: Ts,
|
|
1051
|
+
info: Ps,
|
|
1052
|
+
name: As,
|
|
1053
|
+
buttons: Os,
|
|
1039
1054
|
modal: Ms,
|
|
1040
|
-
link:
|
|
1041
|
-
modalOptions:
|
|
1042
|
-
addButton:
|
|
1055
|
+
link: qs,
|
|
1056
|
+
modalOptions: Es,
|
|
1057
|
+
addButton: Ds,
|
|
1043
1058
|
deleteButton: Us,
|
|
1044
|
-
closeIcon:
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1059
|
+
closeIcon: Hs
|
|
1060
|
+
};
|
|
1061
|
+
function Rs({ product: u, children: a }) {
|
|
1062
|
+
const {
|
|
1063
|
+
attributes: e,
|
|
1064
|
+
listeners: s,
|
|
1065
|
+
setNodeRef: i,
|
|
1066
|
+
transform: c,
|
|
1067
|
+
transition: l,
|
|
1068
|
+
isDragging: o
|
|
1069
|
+
} = Ct({
|
|
1070
|
+
id: u.id
|
|
1071
|
+
}), n = {
|
|
1072
|
+
transform: St.Transform.toString(c),
|
|
1073
|
+
transition: l
|
|
1074
|
+
};
|
|
1075
|
+
return /* @__PURE__ */ t.jsx(
|
|
1076
|
+
"div",
|
|
1077
|
+
{
|
|
1078
|
+
ref: i,
|
|
1079
|
+
style: n,
|
|
1080
|
+
className: `${J.product} ${o ? J.dragging : ""}`,
|
|
1081
|
+
...e,
|
|
1082
|
+
...s,
|
|
1083
|
+
children: a
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
const Qa = (u) => {
|
|
1088
|
+
const {
|
|
1089
|
+
isActiveItems: a,
|
|
1090
|
+
setIsActiveItems: e,
|
|
1091
|
+
items: s,
|
|
1092
|
+
setItems: i,
|
|
1093
|
+
title: c,
|
|
1094
|
+
subtitle: l,
|
|
1095
|
+
editable: o = !0,
|
|
1096
|
+
draggable: n = !1,
|
|
1097
|
+
deletable: d = !0,
|
|
1098
|
+
addable: j = !0,
|
|
1099
|
+
itemsType: p,
|
|
1100
|
+
itemsOptions: r,
|
|
1101
|
+
addableOptions: y = {},
|
|
1102
|
+
limit: h
|
|
1103
|
+
} = u, [_, w] = f.useState(null), [H, $] = f.useState(null), g = f.useRef(null), B = yt(
|
|
1104
|
+
kt(wt, {
|
|
1105
|
+
activationConstraint: {
|
|
1106
|
+
distance: 5
|
|
1107
|
+
}
|
|
1108
|
+
})
|
|
1109
|
+
);
|
|
1110
|
+
f.useEffect(() => {
|
|
1111
|
+
if (_) {
|
|
1112
|
+
const v = [...s].map((A) => A.id === _.id ? _ : A);
|
|
1113
|
+
i(v);
|
|
1114
|
+
}
|
|
1115
|
+
}, [_]), f.useEffect(() => {
|
|
1116
|
+
g.current && H && (g.current.getBoundingClientRect().height, H.top);
|
|
1117
|
+
}, [g.current, H]);
|
|
1118
|
+
const E = (v, A) => {
|
|
1119
|
+
v.stopPropagation();
|
|
1120
|
+
const x = v.target.getBoundingClientRect();
|
|
1121
|
+
$({
|
|
1122
|
+
top: x.top + window.scrollY,
|
|
1123
|
+
left: x.left - 30
|
|
1124
|
+
}), w(A);
|
|
1125
|
+
}, F = (v) => {
|
|
1126
|
+
const { active: A, over: x } = v;
|
|
1127
|
+
if (x && A.id !== x.id) {
|
|
1128
|
+
const I = s.findIndex((R) => R.id === A.id), C = s.findIndex((R) => R.id === x.id);
|
|
1129
|
+
if (I !== -1 && C !== -1) {
|
|
1130
|
+
const R = [...s], [O] = R.splice(I, 1);
|
|
1131
|
+
R.splice(C, 0, O), i(R);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}, T = (v, A) => {
|
|
1135
|
+
const x = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1136
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1137
|
+
b,
|
|
1138
|
+
{
|
|
1139
|
+
name: "DotsSixVertical",
|
|
1140
|
+
hoverable: !0,
|
|
1141
|
+
width: 20,
|
|
1142
|
+
height: 20
|
|
1143
|
+
}
|
|
1144
|
+
) }),
|
|
1145
|
+
p === "select" && r && /* @__PURE__ */ t.jsx(
|
|
1146
|
+
et,
|
|
1147
|
+
{
|
|
1148
|
+
onChange: (I) => {
|
|
1149
|
+
const C = [...s], R = r.find((U) => U.name === I);
|
|
1150
|
+
if (!R) return;
|
|
1151
|
+
const O = C.map((U) => U.id === v.id ? {
|
|
1152
|
+
...R,
|
|
1153
|
+
name: {
|
|
1154
|
+
"en-US": I
|
|
1155
|
+
}
|
|
1156
|
+
} : U);
|
|
1157
|
+
w({
|
|
1158
|
+
...v,
|
|
1159
|
+
name: {
|
|
1160
|
+
"en-US": I
|
|
1161
|
+
}
|
|
1162
|
+
}), i([...O]);
|
|
1163
|
+
},
|
|
1164
|
+
value: v.name,
|
|
1165
|
+
options: r.filter((I) => !s.find((C) => C.name === I.name)).map((I) => I.name)
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
|
|
1169
|
+
o && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1170
|
+
b,
|
|
1171
|
+
{
|
|
1172
|
+
name: "Sliders",
|
|
1173
|
+
hoverable: !0,
|
|
1174
|
+
width: 20,
|
|
1175
|
+
height: 20,
|
|
1176
|
+
onClick: (I) => E(I, v)
|
|
1177
|
+
}
|
|
1178
|
+
) }),
|
|
1179
|
+
d && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1180
|
+
b,
|
|
1181
|
+
{
|
|
1182
|
+
name: "Trash",
|
|
1183
|
+
hoverable: !0,
|
|
1184
|
+
width: 20,
|
|
1185
|
+
height: 20,
|
|
1186
|
+
fill: "#C12A2A",
|
|
1187
|
+
onClick: () => i(s.filter((I) => I.id !== v.id))
|
|
1188
|
+
}
|
|
1189
|
+
) })
|
|
1190
|
+
] })
|
|
1191
|
+
] });
|
|
1192
|
+
return n ? /* @__PURE__ */ t.jsx(
|
|
1193
|
+
Rs,
|
|
1194
|
+
{
|
|
1195
|
+
product: v,
|
|
1196
|
+
index: A,
|
|
1197
|
+
children: x
|
|
1198
|
+
},
|
|
1199
|
+
v.id
|
|
1200
|
+
) : /* @__PURE__ */ t.jsx(
|
|
1201
|
+
"div",
|
|
1202
|
+
{
|
|
1203
|
+
className: J.product,
|
|
1204
|
+
children: x
|
|
1205
|
+
},
|
|
1206
|
+
v.id
|
|
1207
|
+
);
|
|
1208
|
+
};
|
|
1209
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
|
|
1210
|
+
(c || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
|
|
1211
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: c }),
|
|
1212
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1213
|
+
st,
|
|
1214
|
+
{
|
|
1215
|
+
current: a,
|
|
1216
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
] }),
|
|
1220
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
|
|
1221
|
+
l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
|
|
1222
|
+
n ? /* @__PURE__ */ t.jsx(
|
|
1223
|
+
$t,
|
|
1224
|
+
{
|
|
1225
|
+
sensors: B,
|
|
1226
|
+
onDragEnd: F,
|
|
1227
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1228
|
+
It,
|
|
1229
|
+
{
|
|
1230
|
+
items: s.map((v) => v.id),
|
|
1231
|
+
strategy: Nt,
|
|
1232
|
+
children: s.map((v, A) => T(v, A))
|
|
1233
|
+
}
|
|
1234
|
+
)
|
|
1235
|
+
}
|
|
1236
|
+
) : s.map((v, A) => T(v, A)),
|
|
1237
|
+
j && /* @__PURE__ */ t.jsx(
|
|
1238
|
+
"div",
|
|
1239
|
+
{
|
|
1240
|
+
style: {
|
|
1241
|
+
width: "100%",
|
|
1242
|
+
display: "flex",
|
|
1243
|
+
justifyContent: "center"
|
|
1244
|
+
},
|
|
1245
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1246
|
+
ot,
|
|
1247
|
+
{
|
|
1248
|
+
withoutHover: !0,
|
|
1249
|
+
className: Y(J.button, {
|
|
1250
|
+
[J.disabled]: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
1251
|
+
}),
|
|
1252
|
+
size: "s",
|
|
1253
|
+
disabled: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
1254
|
+
onClick: () => {
|
|
1255
|
+
const v = [...s];
|
|
1256
|
+
let A = null;
|
|
1257
|
+
if (r) {
|
|
1258
|
+
for (let x = 0; x < r.length; x++)
|
|
1259
|
+
if (!s.find((I) => I.id === r[x].id)) {
|
|
1260
|
+
A = r[x];
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
p === "select" && r && v.push({
|
|
1265
|
+
name: A ? A.name : r[0].name,
|
|
1266
|
+
id: (A == null ? void 0 : A.id) || r[0].id,
|
|
1267
|
+
...y
|
|
1268
|
+
}), i(v);
|
|
1269
|
+
},
|
|
1270
|
+
style: {
|
|
1271
|
+
width: "fit-content"
|
|
1272
|
+
},
|
|
1273
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
|
|
1274
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1275
|
+
/* @__PURE__ */ t.jsx(
|
|
1276
|
+
b,
|
|
1277
|
+
{
|
|
1278
|
+
name: "Plus",
|
|
1279
|
+
width: 16,
|
|
1280
|
+
height: 16
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
] })
|
|
1284
|
+
}
|
|
1285
|
+
)
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
] })
|
|
1289
|
+
] });
|
|
1290
|
+
}, Ls = "_title_1vfw9_1", zs = "_subtitle_1vfw9_5", Fs = "_header_1vfw9_12", Vs = "_text_1vfw9_13", Ys = "_productsBlock_1vfw9_14", Gs = "_top_1vfw9_26", Xs = "_itemsBlock_1vfw9_35", Ws = "_typeTexts_1vfw9_41", Js = "_block_1vfw9_48", Qs = "_active_1vfw9_61", Ks = "_products_1vfw9_14", Zs = "_product_1vfw9_14", tn = "_button_1vfw9_80", en = "_disabled_1vfw9_91", sn = "_image_1vfw9_95", nn = "_info_1vfw9_102", on = "_name_1vfw9_114", an = "_buttons_1vfw9_118", cn = "_modal_1vfw9_125", ln = "_link_1vfw9_145", rn = "_modalOptions_1vfw9_151", dn = "_addButton_1vfw9_164", un = "_deleteButton_1vfw9_179", _n = "_closeIcon_1vfw9_191", V = {
|
|
1291
|
+
title: Ls,
|
|
1292
|
+
subtitle: zs,
|
|
1293
|
+
header: Fs,
|
|
1294
|
+
text: Vs,
|
|
1295
|
+
productsBlock: Ys,
|
|
1296
|
+
top: Gs,
|
|
1297
|
+
itemsBlock: Xs,
|
|
1298
|
+
typeTexts: Ws,
|
|
1299
|
+
block: Js,
|
|
1300
|
+
active: Qs,
|
|
1301
|
+
products: Ks,
|
|
1302
|
+
product: Zs,
|
|
1303
|
+
button: tn,
|
|
1304
|
+
disabled: en,
|
|
1305
|
+
image: sn,
|
|
1306
|
+
info: nn,
|
|
1307
|
+
name: on,
|
|
1308
|
+
buttons: an,
|
|
1309
|
+
modal: cn,
|
|
1310
|
+
link: ln,
|
|
1311
|
+
modalOptions: rn,
|
|
1312
|
+
addButton: dn,
|
|
1313
|
+
deleteButton: un,
|
|
1314
|
+
closeIcon: _n
|
|
1315
|
+
}, mn = f.forwardRef(
|
|
1316
|
+
(u, a) => {
|
|
1317
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
1048
1318
|
return /* @__PURE__ */ t.jsxs(
|
|
1049
1319
|
"div",
|
|
1050
1320
|
{
|
|
1051
1321
|
ref: a,
|
|
1052
|
-
className:
|
|
1322
|
+
className: V.modal,
|
|
1053
1323
|
onClick: (o) => {
|
|
1054
1324
|
o.stopPropagation();
|
|
1055
1325
|
},
|
|
1056
1326
|
style: {
|
|
1057
|
-
top: `${
|
|
1058
|
-
left: `${
|
|
1327
|
+
top: `${i.top}px`,
|
|
1328
|
+
left: `${i.left}px`
|
|
1059
1329
|
},
|
|
1060
1330
|
children: [
|
|
1061
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1062
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1063
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1331
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1332
|
+
/* @__PURE__ */ t.jsx("h3", { className: V.title, children: e.name["en-US"] }),
|
|
1333
|
+
/* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1064
1334
|
b,
|
|
1065
1335
|
{
|
|
1066
1336
|
name: "X",
|
|
@@ -1068,24 +1338,24 @@ const Ye = (d) => {
|
|
|
1068
1338
|
width: 20,
|
|
1069
1339
|
hoverable: !0,
|
|
1070
1340
|
onClick: () => {
|
|
1071
|
-
s(null),
|
|
1341
|
+
s(null), l(!1);
|
|
1072
1342
|
}
|
|
1073
1343
|
}
|
|
1074
1344
|
) })
|
|
1075
1345
|
] }),
|
|
1076
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1346
|
+
/* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((o) => {
|
|
1077
1347
|
if (o.type === "image")
|
|
1078
1348
|
return /* @__PURE__ */ t.jsx(
|
|
1079
|
-
|
|
1349
|
+
bt,
|
|
1080
1350
|
{
|
|
1081
1351
|
label: "Put up an attractive image",
|
|
1082
1352
|
activeImage: e[o.field],
|
|
1083
|
-
onChange: (
|
|
1084
|
-
const
|
|
1353
|
+
onChange: (n) => {
|
|
1354
|
+
const d = {
|
|
1085
1355
|
...e,
|
|
1086
|
-
[o.field]:
|
|
1356
|
+
[o.field]: n
|
|
1087
1357
|
};
|
|
1088
|
-
s(
|
|
1358
|
+
s(d);
|
|
1089
1359
|
}
|
|
1090
1360
|
},
|
|
1091
1361
|
String(o.field)
|
|
@@ -1095,44 +1365,44 @@ const Ye = (d) => {
|
|
|
1095
1365
|
Lt,
|
|
1096
1366
|
{
|
|
1097
1367
|
typesText: e[o.field.type],
|
|
1098
|
-
setTypesText: (
|
|
1099
|
-
const
|
|
1368
|
+
setTypesText: (n) => {
|
|
1369
|
+
const d = {
|
|
1100
1370
|
...e,
|
|
1101
|
-
[o.field.type]:
|
|
1371
|
+
[o.field.type]: n
|
|
1102
1372
|
};
|
|
1103
|
-
s(
|
|
1373
|
+
s(d);
|
|
1104
1374
|
},
|
|
1105
1375
|
text: e[o.field.text]["en-US"] || "",
|
|
1106
|
-
setText: (
|
|
1107
|
-
const
|
|
1376
|
+
setText: (n) => {
|
|
1377
|
+
const d = {
|
|
1108
1378
|
...e,
|
|
1109
1379
|
[o.field.text]: {
|
|
1110
|
-
"en-US":
|
|
1380
|
+
"en-US": n
|
|
1111
1381
|
}
|
|
1112
1382
|
};
|
|
1113
|
-
s(
|
|
1383
|
+
s(d);
|
|
1114
1384
|
},
|
|
1115
1385
|
typeFont: e[o.field.type],
|
|
1116
|
-
setTypeFont: (
|
|
1117
|
-
const
|
|
1386
|
+
setTypeFont: (n) => {
|
|
1387
|
+
const d = {
|
|
1118
1388
|
...e,
|
|
1119
|
-
[o.field.type]:
|
|
1389
|
+
[o.field.type]: n
|
|
1120
1390
|
};
|
|
1121
|
-
s(
|
|
1391
|
+
s(d);
|
|
1122
1392
|
},
|
|
1123
1393
|
subtitle: o.label
|
|
1124
1394
|
}
|
|
1125
1395
|
);
|
|
1126
1396
|
if (o.type === "input")
|
|
1127
1397
|
return /* @__PURE__ */ t.jsx(
|
|
1128
|
-
|
|
1398
|
+
tt,
|
|
1129
1399
|
{
|
|
1130
|
-
onChange: (
|
|
1131
|
-
const
|
|
1400
|
+
onChange: (n) => {
|
|
1401
|
+
const d = {
|
|
1132
1402
|
...e,
|
|
1133
|
-
[o.field]:
|
|
1403
|
+
[o.field]: n
|
|
1134
1404
|
};
|
|
1135
|
-
s(
|
|
1405
|
+
s(d);
|
|
1136
1406
|
},
|
|
1137
1407
|
value: e[o.field] || "",
|
|
1138
1408
|
label: o.label,
|
|
@@ -1140,16 +1410,16 @@ const Ye = (d) => {
|
|
|
1140
1410
|
}
|
|
1141
1411
|
);
|
|
1142
1412
|
if (o.type === "inputSwitch")
|
|
1143
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1413
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
|
|
1144
1414
|
/* @__PURE__ */ t.jsx(
|
|
1145
|
-
|
|
1415
|
+
tt,
|
|
1146
1416
|
{
|
|
1147
|
-
onChange: (
|
|
1148
|
-
const
|
|
1417
|
+
onChange: (n) => {
|
|
1418
|
+
const d = {
|
|
1149
1419
|
...e,
|
|
1150
|
-
[o.field.text]:
|
|
1420
|
+
[o.field.text]: n
|
|
1151
1421
|
};
|
|
1152
|
-
s(
|
|
1422
|
+
s(d);
|
|
1153
1423
|
},
|
|
1154
1424
|
value: e[o.field.text] || "",
|
|
1155
1425
|
label: o.inputLabel,
|
|
@@ -1157,31 +1427,31 @@ const Ye = (d) => {
|
|
|
1157
1427
|
}
|
|
1158
1428
|
),
|
|
1159
1429
|
/* @__PURE__ */ t.jsx(
|
|
1160
|
-
|
|
1430
|
+
st,
|
|
1161
1431
|
{
|
|
1162
1432
|
current: !!e[o.field.switch] || !1,
|
|
1163
1433
|
label: o.switchLabel,
|
|
1164
|
-
onChange: (
|
|
1165
|
-
const
|
|
1434
|
+
onChange: (n) => {
|
|
1435
|
+
const d = {
|
|
1166
1436
|
...e,
|
|
1167
|
-
[o.field.switch]:
|
|
1437
|
+
[o.field.switch]: n
|
|
1168
1438
|
};
|
|
1169
|
-
s(
|
|
1439
|
+
s(d);
|
|
1170
1440
|
}
|
|
1171
1441
|
}
|
|
1172
1442
|
)
|
|
1173
1443
|
] });
|
|
1174
1444
|
if (o.type === "select")
|
|
1175
1445
|
return /* @__PURE__ */ t.jsx(
|
|
1176
|
-
|
|
1446
|
+
et,
|
|
1177
1447
|
{
|
|
1178
1448
|
options: o.itemsOptions,
|
|
1179
|
-
onChange: (
|
|
1180
|
-
const
|
|
1449
|
+
onChange: (n) => {
|
|
1450
|
+
const d = {
|
|
1181
1451
|
...e,
|
|
1182
|
-
[o.field]:
|
|
1452
|
+
[o.field]: n
|
|
1183
1453
|
};
|
|
1184
|
-
s(
|
|
1454
|
+
s(d);
|
|
1185
1455
|
},
|
|
1186
1456
|
label: o.label,
|
|
1187
1457
|
value: e[o.field] || "String",
|
|
@@ -1194,92 +1464,92 @@ const Ye = (d) => {
|
|
|
1194
1464
|
);
|
|
1195
1465
|
}
|
|
1196
1466
|
);
|
|
1197
|
-
function
|
|
1198
|
-
const { product: a, children: e } =
|
|
1467
|
+
function hn(u) {
|
|
1468
|
+
const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
1199
1469
|
id: a.id
|
|
1200
|
-
}),
|
|
1201
|
-
transform:
|
|
1470
|
+
}), d = {
|
|
1471
|
+
transform: St.Transform.toString(l),
|
|
1202
1472
|
transition: o
|
|
1203
1473
|
};
|
|
1204
1474
|
return /* @__PURE__ */ t.jsx(
|
|
1205
1475
|
"div",
|
|
1206
1476
|
{
|
|
1207
1477
|
ref: c,
|
|
1208
|
-
style:
|
|
1209
|
-
className: `${
|
|
1478
|
+
style: d,
|
|
1479
|
+
className: `${V.product} ${n ? V.dragging : ""}`,
|
|
1210
1480
|
...s,
|
|
1211
|
-
...
|
|
1481
|
+
...i,
|
|
1212
1482
|
children: e
|
|
1213
1483
|
}
|
|
1214
1484
|
);
|
|
1215
1485
|
}
|
|
1216
|
-
const
|
|
1486
|
+
const Ka = (u) => {
|
|
1217
1487
|
const {
|
|
1218
1488
|
isActiveItems: a,
|
|
1219
1489
|
setIsActiveItems: e,
|
|
1220
1490
|
items: s,
|
|
1221
|
-
setItems:
|
|
1491
|
+
setItems: i,
|
|
1222
1492
|
other: c,
|
|
1223
|
-
title:
|
|
1493
|
+
title: l,
|
|
1224
1494
|
subtitle: o,
|
|
1225
|
-
editable:
|
|
1226
|
-
draggable:
|
|
1495
|
+
editable: n = !0,
|
|
1496
|
+
draggable: d = !1,
|
|
1227
1497
|
withImage: j = !1,
|
|
1228
|
-
deletable:
|
|
1229
|
-
addable:
|
|
1230
|
-
itemsType:
|
|
1231
|
-
itemsPlaceholder:
|
|
1232
|
-
itemsOptions:
|
|
1233
|
-
hasRangeSelector:
|
|
1234
|
-
rangeSelectorOptions:
|
|
1235
|
-
modalOptions:
|
|
1498
|
+
deletable: p = !0,
|
|
1499
|
+
addable: r = !0,
|
|
1500
|
+
itemsType: y,
|
|
1501
|
+
itemsPlaceholder: h = "",
|
|
1502
|
+
itemsOptions: _,
|
|
1503
|
+
hasRangeSelector: w = !1,
|
|
1504
|
+
rangeSelectorOptions: H,
|
|
1505
|
+
modalOptions: $,
|
|
1236
1506
|
addableOptions: g = {}
|
|
1237
|
-
} =
|
|
1507
|
+
} = u, [B, E] = f.useState(null), [F, T] = f.useState({
|
|
1238
1508
|
top: 0,
|
|
1239
1509
|
left: 0
|
|
1240
|
-
}), [
|
|
1241
|
-
|
|
1510
|
+
}), [v, A] = f.useState(null), x = f.useRef(null), [I, C] = f.useState(!1), R = yt(
|
|
1511
|
+
kt(wt, {
|
|
1242
1512
|
activationConstraint: {
|
|
1243
1513
|
distance: 5
|
|
1244
1514
|
}
|
|
1245
1515
|
})
|
|
1246
1516
|
);
|
|
1247
|
-
|
|
1248
|
-
const
|
|
1249
|
-
E(null),
|
|
1517
|
+
f.useEffect(() => {
|
|
1518
|
+
const k = () => {
|
|
1519
|
+
E(null), C(!1);
|
|
1250
1520
|
};
|
|
1251
|
-
return document.body.addEventListener("click",
|
|
1252
|
-
E(null),
|
|
1521
|
+
return document.body.addEventListener("click", k), E(null), C(!1), () => {
|
|
1522
|
+
E(null), C(!1), document.body.removeEventListener("click", k);
|
|
1253
1523
|
};
|
|
1254
|
-
}, []),
|
|
1255
|
-
if (
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1524
|
+
}, []), f.useEffect(() => {
|
|
1525
|
+
if (B) {
|
|
1526
|
+
const k = [...s].map((D) => D.id === B.id ? B : D);
|
|
1527
|
+
i(k);
|
|
1258
1528
|
}
|
|
1259
|
-
}, [
|
|
1260
|
-
if (
|
|
1261
|
-
const
|
|
1262
|
-
let
|
|
1263
|
-
|
|
1264
|
-
top:
|
|
1265
|
-
left:
|
|
1529
|
+
}, [B]), f.useEffect(() => {
|
|
1530
|
+
if (x.current && v) {
|
|
1531
|
+
const k = x.current.getBoundingClientRect().height, D = window.innerHeight;
|
|
1532
|
+
let m = v.top;
|
|
1533
|
+
m + k > D + window.scrollY - 200 && (m = D + window.scrollY - k - 200), m < 0 && (m = 10), T({
|
|
1534
|
+
top: m,
|
|
1535
|
+
left: v.left
|
|
1266
1536
|
});
|
|
1267
1537
|
}
|
|
1268
|
-
}, [
|
|
1269
|
-
const O = (
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
top:
|
|
1274
|
-
left:
|
|
1275
|
-
}), E(
|
|
1538
|
+
}, [x.current, v]);
|
|
1539
|
+
const O = (k, D) => {
|
|
1540
|
+
k.stopPropagation();
|
|
1541
|
+
const m = k.target.getBoundingClientRect();
|
|
1542
|
+
A({
|
|
1543
|
+
top: m.top + window.scrollY,
|
|
1544
|
+
left: m.left - 30
|
|
1545
|
+
}), E(D), C(!0);
|
|
1276
1546
|
};
|
|
1277
|
-
function
|
|
1547
|
+
function U(k) {
|
|
1278
1548
|
if (j)
|
|
1279
|
-
return
|
|
1549
|
+
return k ? /* @__PURE__ */ t.jsx(
|
|
1280
1550
|
"img",
|
|
1281
1551
|
{
|
|
1282
|
-
src: `https://imagedelivery.net/${
|
|
1552
|
+
src: `https://imagedelivery.net/${k[0]}/w=1000`,
|
|
1283
1553
|
alt: "image",
|
|
1284
1554
|
width: 16,
|
|
1285
1555
|
height: 16
|
|
@@ -1294,19 +1564,19 @@ const $a = (d) => {
|
|
|
1294
1564
|
}
|
|
1295
1565
|
);
|
|
1296
1566
|
}
|
|
1297
|
-
const
|
|
1298
|
-
const { active:
|
|
1299
|
-
if (
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1567
|
+
const nt = (k) => {
|
|
1568
|
+
const { active: D, over: m } = k;
|
|
1569
|
+
if (m && D.id !== m.id) {
|
|
1570
|
+
const N = s.findIndex((L) => L.id === D.id), M = s.findIndex((L) => L.id === m.id);
|
|
1571
|
+
if (N !== -1 && M !== -1) {
|
|
1572
|
+
const L = [...s], [X] = L.splice(N, 1);
|
|
1573
|
+
L.splice(M, 0, X), i(L);
|
|
1304
1574
|
}
|
|
1305
1575
|
}
|
|
1306
|
-
},
|
|
1307
|
-
var
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1576
|
+
}, dt = (k) => {
|
|
1577
|
+
var m;
|
|
1578
|
+
const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1579
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1310
1580
|
b,
|
|
1311
1581
|
{
|
|
1312
1582
|
name: "DotsSixVertical",
|
|
@@ -1315,71 +1585,71 @@ const $a = (d) => {
|
|
|
1315
1585
|
height: 20
|
|
1316
1586
|
}
|
|
1317
1587
|
) }),
|
|
1318
|
-
|
|
1319
|
-
|
|
1588
|
+
y === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
1589
|
+
et,
|
|
1320
1590
|
{
|
|
1321
|
-
onChange: (
|
|
1322
|
-
const
|
|
1323
|
-
...
|
|
1591
|
+
onChange: (N) => {
|
|
1592
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1593
|
+
...k,
|
|
1324
1594
|
name: {
|
|
1325
|
-
"en-US":
|
|
1595
|
+
"en-US": N
|
|
1326
1596
|
}
|
|
1327
|
-
} :
|
|
1597
|
+
} : X);
|
|
1328
1598
|
E({
|
|
1329
|
-
...
|
|
1599
|
+
...k,
|
|
1330
1600
|
name: {
|
|
1331
|
-
"en-US":
|
|
1601
|
+
"en-US": N
|
|
1332
1602
|
}
|
|
1333
|
-
}),
|
|
1603
|
+
}), i([...L]);
|
|
1334
1604
|
},
|
|
1335
|
-
value:
|
|
1336
|
-
options:
|
|
1337
|
-
(
|
|
1605
|
+
value: k.name["en-US"],
|
|
1606
|
+
options: _.filter(
|
|
1607
|
+
(N) => !s.find((M) => M.name["en-US"] === N)
|
|
1338
1608
|
),
|
|
1339
|
-
leftAddon:
|
|
1609
|
+
leftAddon: U(k.images)
|
|
1340
1610
|
}
|
|
1341
1611
|
),
|
|
1342
|
-
|
|
1343
|
-
|
|
1612
|
+
y === "input" && /* @__PURE__ */ t.jsx(
|
|
1613
|
+
tt,
|
|
1344
1614
|
{
|
|
1345
|
-
onChange: (
|
|
1346
|
-
const
|
|
1347
|
-
...
|
|
1615
|
+
onChange: (N) => {
|
|
1616
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1617
|
+
...k,
|
|
1348
1618
|
name: {
|
|
1349
|
-
"en-US":
|
|
1619
|
+
"en-US": N
|
|
1350
1620
|
}
|
|
1351
|
-
} :
|
|
1352
|
-
|
|
1621
|
+
} : X);
|
|
1622
|
+
i([...L]);
|
|
1353
1623
|
},
|
|
1354
|
-
value:
|
|
1355
|
-
placeholder:
|
|
1624
|
+
value: k.name["en-US"],
|
|
1625
|
+
placeholder: h
|
|
1356
1626
|
}
|
|
1357
1627
|
),
|
|
1358
|
-
|
|
1359
|
-
|
|
1628
|
+
y === "image" && /* @__PURE__ */ t.jsx(
|
|
1629
|
+
bt,
|
|
1360
1630
|
{
|
|
1361
|
-
onChange: (
|
|
1362
|
-
const
|
|
1363
|
-
...
|
|
1364
|
-
images:
|
|
1365
|
-
} :
|
|
1366
|
-
|
|
1631
|
+
onChange: (N) => {
|
|
1632
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1633
|
+
...k,
|
|
1634
|
+
images: N
|
|
1635
|
+
} : X);
|
|
1636
|
+
i([...L]);
|
|
1367
1637
|
},
|
|
1368
|
-
activeImage: (
|
|
1638
|
+
activeImage: (m = s.find((N) => N.id === k.id)) == null ? void 0 : m.images[0]
|
|
1369
1639
|
}
|
|
1370
1640
|
),
|
|
1371
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1372
|
-
|
|
1641
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1642
|
+
n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1373
1643
|
b,
|
|
1374
1644
|
{
|
|
1375
1645
|
name: "Sliders",
|
|
1376
1646
|
hoverable: !0,
|
|
1377
1647
|
width: 20,
|
|
1378
1648
|
height: 20,
|
|
1379
|
-
onClick: (
|
|
1649
|
+
onClick: (N) => O(N, k)
|
|
1380
1650
|
}
|
|
1381
1651
|
) }),
|
|
1382
|
-
|
|
1652
|
+
p && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1383
1653
|
b,
|
|
1384
1654
|
{
|
|
1385
1655
|
name: "Trash",
|
|
@@ -1387,68 +1657,68 @@ const $a = (d) => {
|
|
|
1387
1657
|
width: 20,
|
|
1388
1658
|
height: 20,
|
|
1389
1659
|
fill: "#C12A2A",
|
|
1390
|
-
onClick: () =>
|
|
1660
|
+
onClick: () => i(s.filter((N) => N.id !== k.id))
|
|
1391
1661
|
}
|
|
1392
1662
|
) })
|
|
1393
1663
|
] })
|
|
1394
1664
|
] });
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1665
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
1666
|
+
hn,
|
|
1397
1667
|
{
|
|
1398
|
-
product:
|
|
1399
|
-
children:
|
|
1668
|
+
product: k,
|
|
1669
|
+
children: D
|
|
1400
1670
|
},
|
|
1401
|
-
|
|
1671
|
+
k.id
|
|
1402
1672
|
) : /* @__PURE__ */ t.jsx(
|
|
1403
1673
|
"div",
|
|
1404
1674
|
{
|
|
1405
|
-
className:
|
|
1406
|
-
children:
|
|
1675
|
+
className: V.product,
|
|
1676
|
+
children: D
|
|
1407
1677
|
},
|
|
1408
|
-
|
|
1678
|
+
k.id
|
|
1409
1679
|
);
|
|
1410
1680
|
};
|
|
1411
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1412
|
-
(
|
|
1413
|
-
|
|
1681
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1682
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1683
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
1414
1684
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1415
|
-
|
|
1685
|
+
st,
|
|
1416
1686
|
{
|
|
1417
1687
|
current: a,
|
|
1418
|
-
onChange: (
|
|
1688
|
+
onChange: (k) => e == null ? void 0 : e(k)
|
|
1419
1689
|
}
|
|
1420
1690
|
)
|
|
1421
1691
|
] }),
|
|
1422
|
-
|
|
1423
|
-
|
|
1692
|
+
B && n && $ && I && /* @__PURE__ */ t.jsx(
|
|
1693
|
+
mn,
|
|
1424
1694
|
{
|
|
1425
|
-
ref:
|
|
1426
|
-
activeItem:
|
|
1695
|
+
ref: x,
|
|
1696
|
+
activeItem: B,
|
|
1427
1697
|
setActiveItem: E,
|
|
1428
|
-
popupPosition:
|
|
1429
|
-
modalOptions:
|
|
1430
|
-
setIsOpenModal:
|
|
1698
|
+
popupPosition: F,
|
|
1699
|
+
modalOptions: $,
|
|
1700
|
+
setIsOpenModal: C
|
|
1431
1701
|
}
|
|
1432
1702
|
),
|
|
1433
|
-
|
|
1434
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1435
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1436
|
-
|
|
1437
|
-
|
|
1703
|
+
w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
1704
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1705
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1706
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
1707
|
+
$t,
|
|
1438
1708
|
{
|
|
1439
|
-
sensors:
|
|
1440
|
-
onDragEnd:
|
|
1709
|
+
sensors: R,
|
|
1710
|
+
onDragEnd: nt,
|
|
1441
1711
|
children: /* @__PURE__ */ t.jsx(
|
|
1442
|
-
|
|
1712
|
+
It,
|
|
1443
1713
|
{
|
|
1444
|
-
items: s.map((
|
|
1445
|
-
strategy:
|
|
1446
|
-
children: s.map((
|
|
1714
|
+
items: s.map((k) => k.id),
|
|
1715
|
+
strategy: Nt,
|
|
1716
|
+
children: s.map((k) => dt(k))
|
|
1447
1717
|
}
|
|
1448
1718
|
)
|
|
1449
1719
|
}
|
|
1450
|
-
) : s.map((
|
|
1451
|
-
|
|
1720
|
+
) : s.map((k) => dt(k)),
|
|
1721
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1452
1722
|
"div",
|
|
1453
1723
|
{
|
|
1454
1724
|
style: {
|
|
@@ -1457,49 +1727,49 @@ const $a = (d) => {
|
|
|
1457
1727
|
justifyContent: "center"
|
|
1458
1728
|
},
|
|
1459
1729
|
children: /* @__PURE__ */ t.jsx(
|
|
1460
|
-
|
|
1730
|
+
ot,
|
|
1461
1731
|
{
|
|
1462
1732
|
withoutHover: !0,
|
|
1463
|
-
className:
|
|
1733
|
+
className: V.button,
|
|
1464
1734
|
size: "s",
|
|
1465
1735
|
onClick: () => {
|
|
1466
|
-
const
|
|
1467
|
-
let
|
|
1468
|
-
if (
|
|
1469
|
-
for (let
|
|
1470
|
-
if (!s.find((
|
|
1471
|
-
|
|
1736
|
+
const k = [...s];
|
|
1737
|
+
let D = null;
|
|
1738
|
+
if (_) {
|
|
1739
|
+
for (let m = 0; m < _.length; m++)
|
|
1740
|
+
if (!s.find((N) => N.name["en-US"] === _[m])) {
|
|
1741
|
+
D = _[m];
|
|
1472
1742
|
break;
|
|
1473
1743
|
}
|
|
1474
1744
|
}
|
|
1475
|
-
|
|
1745
|
+
y === "select" && _ ? k.push({
|
|
1476
1746
|
name: {
|
|
1477
|
-
"en-US":
|
|
1747
|
+
"en-US": D || _[0]
|
|
1478
1748
|
},
|
|
1479
|
-
id:
|
|
1749
|
+
id: ht(),
|
|
1480
1750
|
...g,
|
|
1481
1751
|
maxSymbols: 100
|
|
1482
1752
|
// пример значения
|
|
1483
|
-
}) :
|
|
1753
|
+
}) : y === "input" ? k.push({
|
|
1484
1754
|
name: {
|
|
1485
1755
|
"en-US": ""
|
|
1486
1756
|
},
|
|
1487
|
-
id:
|
|
1757
|
+
id: ht(),
|
|
1488
1758
|
...g,
|
|
1489
1759
|
maxSymbols: 100
|
|
1490
|
-
}) :
|
|
1760
|
+
}) : k.push({
|
|
1491
1761
|
name: {
|
|
1492
1762
|
"en-US": `Image ${s.length + 1}`
|
|
1493
1763
|
},
|
|
1494
|
-
id:
|
|
1764
|
+
id: ht(),
|
|
1495
1765
|
...g,
|
|
1496
1766
|
maxSymbols: 100
|
|
1497
|
-
}),
|
|
1767
|
+
}), i(k);
|
|
1498
1768
|
},
|
|
1499
1769
|
style: {
|
|
1500
1770
|
width: "fit-content"
|
|
1501
1771
|
},
|
|
1502
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1772
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
1503
1773
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1504
1774
|
/* @__PURE__ */ t.jsx(
|
|
1505
1775
|
b,
|
|
@@ -1515,61 +1785,61 @@ const $a = (d) => {
|
|
|
1515
1785
|
}
|
|
1516
1786
|
)
|
|
1517
1787
|
] }),
|
|
1518
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1788
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
1519
1789
|
] });
|
|
1520
|
-
},
|
|
1521
|
-
title:
|
|
1522
|
-
subtitle:
|
|
1523
|
-
header:
|
|
1524
|
-
text:
|
|
1525
|
-
productsBlock:
|
|
1526
|
-
buttonsBlock:
|
|
1527
|
-
top:
|
|
1528
|
-
itemsBlock:
|
|
1529
|
-
typeTexts:
|
|
1530
|
-
block:
|
|
1531
|
-
active:
|
|
1532
|
-
products:
|
|
1533
|
-
product:
|
|
1534
|
-
button:
|
|
1535
|
-
image:
|
|
1536
|
-
info:
|
|
1537
|
-
name:
|
|
1538
|
-
buttons:
|
|
1539
|
-
modal:
|
|
1540
|
-
other:
|
|
1541
|
-
options:
|
|
1542
|
-
closeIcon:
|
|
1543
|
-
},
|
|
1544
|
-
const { activeButton: e, setActiveButton: s, popupPosition:
|
|
1545
|
-
return
|
|
1790
|
+
}, pn = "_title_bn7sv_1", fn = "_subtitle_bn7sv_5", gn = "_header_bn7sv_12", xn = "_text_bn7sv_13", bn = "_productsBlock_bn7sv_14", vn = "_buttonsBlock_bn7sv_15", jn = "_top_bn7sv_26", yn = "_itemsBlock_bn7sv_35", kn = "_typeTexts_bn7sv_41", $n = "_block_bn7sv_48", In = "_active_bn7sv_60", Nn = "_products_bn7sv_14", wn = "_product_bn7sv_14", Cn = "_button_bn7sv_15", Sn = "_image_bn7sv_90", Bn = "_info_bn7sv_97", Tn = "_name_bn7sv_109", Pn = "_buttons_bn7sv_15", An = "_modal_bn7sv_120", On = "_other_bn7sv_139", Mn = "_options_bn7sv_145", qn = "_closeIcon_bn7sv_153", rt = {
|
|
1791
|
+
title: pn,
|
|
1792
|
+
subtitle: fn,
|
|
1793
|
+
header: gn,
|
|
1794
|
+
text: xn,
|
|
1795
|
+
productsBlock: bn,
|
|
1796
|
+
buttonsBlock: vn,
|
|
1797
|
+
top: jn,
|
|
1798
|
+
itemsBlock: yn,
|
|
1799
|
+
typeTexts: kn,
|
|
1800
|
+
block: $n,
|
|
1801
|
+
active: In,
|
|
1802
|
+
products: Nn,
|
|
1803
|
+
product: wn,
|
|
1804
|
+
button: Cn,
|
|
1805
|
+
image: Sn,
|
|
1806
|
+
info: Bn,
|
|
1807
|
+
name: Tn,
|
|
1808
|
+
buttons: Pn,
|
|
1809
|
+
modal: An,
|
|
1810
|
+
other: On,
|
|
1811
|
+
options: Mn,
|
|
1812
|
+
closeIcon: qn
|
|
1813
|
+
}, En = f.forwardRef((u, a) => {
|
|
1814
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = f.useState(e.typesText), [o, n] = f.useState(e.destination), [d, j] = f.useState(e.page), [p, r] = f.useState(e.link || ""), [y, h] = f.useState(e.text || { "en-US": "" }), [_, w] = f.useState(e.openInNewTab), { pages: H } = Vt();
|
|
1815
|
+
return f.useEffect(() => {
|
|
1546
1816
|
s({
|
|
1547
1817
|
...e,
|
|
1548
1818
|
...{
|
|
1549
|
-
text:
|
|
1550
|
-
link:
|
|
1819
|
+
text: y,
|
|
1820
|
+
link: p,
|
|
1551
1821
|
destination: o,
|
|
1552
1822
|
typesText: c,
|
|
1553
|
-
page:
|
|
1554
|
-
openInNewTab:
|
|
1823
|
+
page: d,
|
|
1824
|
+
openInNewTab: _
|
|
1555
1825
|
}
|
|
1556
1826
|
});
|
|
1557
|
-
}, [c, o,
|
|
1827
|
+
}, [c, o, p, y, d, _]), console.log(y), /* @__PURE__ */ t.jsxs(
|
|
1558
1828
|
"div",
|
|
1559
1829
|
{
|
|
1560
|
-
className:
|
|
1561
|
-
onClick: (
|
|
1562
|
-
|
|
1830
|
+
className: rt.modal,
|
|
1831
|
+
onClick: ($) => {
|
|
1832
|
+
$.stopPropagation();
|
|
1563
1833
|
},
|
|
1564
1834
|
style: {
|
|
1565
|
-
top: `${
|
|
1566
|
-
left: `${
|
|
1835
|
+
top: `${i.top}px`,
|
|
1836
|
+
left: `${i.left}px`
|
|
1567
1837
|
},
|
|
1568
1838
|
ref: a,
|
|
1569
1839
|
children: [
|
|
1570
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1571
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1572
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1840
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1841
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: e.type }),
|
|
1842
|
+
/* @__PURE__ */ t.jsx("div", { className: rt.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1573
1843
|
b,
|
|
1574
1844
|
{
|
|
1575
1845
|
name: "X",
|
|
@@ -1580,161 +1850,161 @@ const $a = (d) => {
|
|
|
1580
1850
|
}
|
|
1581
1851
|
) })
|
|
1582
1852
|
] }),
|
|
1583
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1853
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.options, children: [
|
|
1584
1854
|
/* @__PURE__ */ t.jsx(
|
|
1585
|
-
|
|
1855
|
+
et,
|
|
1586
1856
|
{
|
|
1587
1857
|
label: "Destination",
|
|
1588
|
-
onChange: (
|
|
1589
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1858
|
+
onChange: ($) => n($),
|
|
1859
|
+
options: ["Go to Page", "Open Link"].filter(($) => $ !== o),
|
|
1590
1860
|
value: o
|
|
1591
1861
|
}
|
|
1592
1862
|
),
|
|
1593
1863
|
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1594
|
-
|
|
1864
|
+
et,
|
|
1595
1865
|
{
|
|
1596
1866
|
label: "Go to",
|
|
1597
|
-
onChange: (
|
|
1598
|
-
options:
|
|
1599
|
-
value:
|
|
1867
|
+
onChange: ($) => j($),
|
|
1868
|
+
options: H ? Object.values(H).filter(($) => $.name !== d).map(($) => $.name) : [],
|
|
1869
|
+
value: d
|
|
1600
1870
|
}
|
|
1601
1871
|
) : /* @__PURE__ */ t.jsx(
|
|
1602
|
-
|
|
1872
|
+
tt,
|
|
1603
1873
|
{
|
|
1604
|
-
onChange: (
|
|
1605
|
-
value:
|
|
1874
|
+
onChange: ($) => r($),
|
|
1875
|
+
value: p,
|
|
1606
1876
|
placeholder: "https://",
|
|
1607
1877
|
label: "Link"
|
|
1608
1878
|
}
|
|
1609
1879
|
),
|
|
1610
1880
|
/* @__PURE__ */ t.jsx(
|
|
1611
|
-
|
|
1881
|
+
st,
|
|
1612
1882
|
{
|
|
1613
1883
|
current: e.openInNewTab,
|
|
1614
1884
|
label: "Open in new tab",
|
|
1615
|
-
onChange: (
|
|
1885
|
+
onChange: ($) => w($)
|
|
1616
1886
|
}
|
|
1617
1887
|
),
|
|
1618
1888
|
/* @__PURE__ */ t.jsx(
|
|
1619
|
-
|
|
1889
|
+
Et,
|
|
1620
1890
|
{
|
|
1621
|
-
onChange: (
|
|
1622
|
-
value:
|
|
1891
|
+
onChange: ($) => h({ "en-US": $ }),
|
|
1892
|
+
value: y["en-US"],
|
|
1623
1893
|
label: "Text",
|
|
1624
1894
|
maxLength: 150
|
|
1625
1895
|
}
|
|
1626
1896
|
),
|
|
1627
1897
|
/* @__PURE__ */ t.jsx(
|
|
1628
|
-
|
|
1898
|
+
Rt,
|
|
1629
1899
|
{
|
|
1630
1900
|
typesText: c,
|
|
1631
|
-
setTypesText:
|
|
1901
|
+
setTypesText: l
|
|
1632
1902
|
}
|
|
1633
1903
|
)
|
|
1634
1904
|
] })
|
|
1635
1905
|
]
|
|
1636
1906
|
}
|
|
1637
1907
|
);
|
|
1638
|
-
}),
|
|
1639
|
-
subtitle:
|
|
1640
|
-
header:
|
|
1641
|
-
text:
|
|
1642
|
-
productsBlock:
|
|
1643
|
-
buttonsBlock:
|
|
1644
|
-
top:
|
|
1645
|
-
itemsBlock:
|
|
1646
|
-
typeTexts:
|
|
1647
|
-
block:
|
|
1648
|
-
active:
|
|
1649
|
-
products:
|
|
1650
|
-
product:
|
|
1651
|
-
button:
|
|
1652
|
-
image:
|
|
1653
|
-
info:
|
|
1654
|
-
name:
|
|
1655
|
-
buttons:
|
|
1656
|
-
modal:
|
|
1657
|
-
other:
|
|
1658
|
-
options:
|
|
1659
|
-
addButton:
|
|
1660
|
-
deleteButton:
|
|
1661
|
-
},
|
|
1662
|
-
const { buttons: a, setButtons: e, deletable: s = !0, addable:
|
|
1908
|
+
}), Dn = "_subtitle_jql1y_1", Un = "_header_jql1y_8", Hn = "_text_jql1y_9", Rn = "_productsBlock_jql1y_10", Ln = "_buttonsBlock_jql1y_11", zn = "_top_jql1y_23", Fn = "_itemsBlock_jql1y_32", Vn = "_typeTexts_jql1y_38", Yn = "_block_jql1y_45", Gn = "_active_jql1y_58", Xn = "_products_jql1y_10", Wn = "_product_jql1y_10", Jn = "_button_jql1y_11", Qn = "_image_jql1y_88", Kn = "_info_jql1y_95", Zn = "_name_jql1y_107", ti = "_buttons_jql1y_11", ei = "_modal_jql1y_118", si = "_other_jql1y_138", ni = "_options_jql1y_144", ii = "_addButton_jql1y_150", oi = "_deleteButton_jql1y_165", at = {
|
|
1909
|
+
subtitle: Dn,
|
|
1910
|
+
header: Un,
|
|
1911
|
+
text: Hn,
|
|
1912
|
+
productsBlock: Rn,
|
|
1913
|
+
buttonsBlock: Ln,
|
|
1914
|
+
top: zn,
|
|
1915
|
+
itemsBlock: Fn,
|
|
1916
|
+
typeTexts: Vn,
|
|
1917
|
+
block: Yn,
|
|
1918
|
+
active: Gn,
|
|
1919
|
+
products: Xn,
|
|
1920
|
+
product: Wn,
|
|
1921
|
+
button: Jn,
|
|
1922
|
+
image: Qn,
|
|
1923
|
+
info: Kn,
|
|
1924
|
+
name: Zn,
|
|
1925
|
+
buttons: ti,
|
|
1926
|
+
modal: ei,
|
|
1927
|
+
other: si,
|
|
1928
|
+
options: ni,
|
|
1929
|
+
addButton: ii,
|
|
1930
|
+
deleteButton: oi
|
|
1931
|
+
}, ai = (u) => {
|
|
1932
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editable: c = !0 } = u, [l, o] = f.useState(null), [n, d] = f.useState({
|
|
1663
1933
|
top: 0,
|
|
1664
1934
|
left: 0
|
|
1665
|
-
}), [
|
|
1666
|
-
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1935
|
+
}), [j, p] = f.useState(null), r = f.useRef(null);
|
|
1936
|
+
f.useEffect(() => {
|
|
1937
|
+
const h = () => {
|
|
1938
|
+
o(null);
|
|
1669
1939
|
};
|
|
1670
|
-
return document.body.addEventListener("click",
|
|
1671
|
-
|
|
1940
|
+
return document.body.addEventListener("click", h), o(null), () => {
|
|
1941
|
+
o(null), document.body.removeEventListener("click", h);
|
|
1672
1942
|
};
|
|
1673
|
-
}, []),
|
|
1674
|
-
if (
|
|
1675
|
-
const
|
|
1676
|
-
e(
|
|
1943
|
+
}, []), f.useEffect(() => {
|
|
1944
|
+
if (l) {
|
|
1945
|
+
const h = [...a].map((_) => _.id === l.id ? l : _);
|
|
1946
|
+
e(h);
|
|
1677
1947
|
}
|
|
1678
|
-
}, [
|
|
1679
|
-
if (
|
|
1680
|
-
const
|
|
1681
|
-
let
|
|
1682
|
-
|
|
1683
|
-
top:
|
|
1684
|
-
left:
|
|
1948
|
+
}, [l]), f.useEffect(() => {
|
|
1949
|
+
if (r.current && j) {
|
|
1950
|
+
const h = r.current.getBoundingClientRect().height, _ = window.innerHeight;
|
|
1951
|
+
let w = j.top;
|
|
1952
|
+
w + h > _ + window.scrollY - 200 && (w = _ + window.scrollY - h - 200), w < 0 && (w = 10), d({
|
|
1953
|
+
top: w,
|
|
1954
|
+
left: j.left
|
|
1685
1955
|
});
|
|
1686
1956
|
}
|
|
1687
|
-
}, [
|
|
1688
|
-
const
|
|
1689
|
-
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1692
|
-
top:
|
|
1693
|
-
left:
|
|
1694
|
-
}),
|
|
1957
|
+
}, [r.current, j]);
|
|
1958
|
+
const y = (h, _) => {
|
|
1959
|
+
h.stopPropagation();
|
|
1960
|
+
const w = h.target.getBoundingClientRect();
|
|
1961
|
+
p({
|
|
1962
|
+
top: w.top + window.scrollY - 70,
|
|
1963
|
+
left: w.left - (i ? 30 : 65)
|
|
1964
|
+
}), o(_);
|
|
1695
1965
|
};
|
|
1696
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1697
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1698
|
-
a.map((
|
|
1966
|
+
return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
|
|
1967
|
+
/* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
|
|
1968
|
+
a.map((h) => /* @__PURE__ */ t.jsxs(
|
|
1699
1969
|
"div",
|
|
1700
1970
|
{
|
|
1701
|
-
className:
|
|
1971
|
+
className: at.product,
|
|
1702
1972
|
children: [
|
|
1703
1973
|
/* @__PURE__ */ t.jsx(
|
|
1704
|
-
|
|
1974
|
+
et,
|
|
1705
1975
|
{
|
|
1706
|
-
onChange: (
|
|
1707
|
-
const
|
|
1708
|
-
...
|
|
1709
|
-
type:
|
|
1710
|
-
} :
|
|
1711
|
-
e(
|
|
1976
|
+
onChange: (_) => {
|
|
1977
|
+
const H = [...a].map(($) => $.id === h.id ? {
|
|
1978
|
+
...h,
|
|
1979
|
+
type: _
|
|
1980
|
+
} : $);
|
|
1981
|
+
e(H);
|
|
1712
1982
|
},
|
|
1713
|
-
value:
|
|
1983
|
+
value: h.type,
|
|
1714
1984
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1715
1985
|
}
|
|
1716
1986
|
),
|
|
1717
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1718
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1987
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.buttons, children: [
|
|
1988
|
+
c && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1719
1989
|
b,
|
|
1720
1990
|
{
|
|
1721
1991
|
name: "Sliders",
|
|
1722
1992
|
hoverable: !0,
|
|
1723
1993
|
width: 20,
|
|
1724
1994
|
height: 20,
|
|
1725
|
-
onClick: (
|
|
1726
|
-
|
|
1995
|
+
onClick: (_) => {
|
|
1996
|
+
y(_, h);
|
|
1727
1997
|
}
|
|
1728
1998
|
}
|
|
1729
1999
|
) }),
|
|
1730
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
2000
|
+
s && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1731
2001
|
b,
|
|
1732
2002
|
{
|
|
1733
2003
|
name: "Trash",
|
|
1734
2004
|
hoverable: !0,
|
|
1735
2005
|
onClick: () => {
|
|
1736
|
-
const
|
|
1737
|
-
e(
|
|
2006
|
+
const _ = a.filter((w) => w.id !== h.id);
|
|
2007
|
+
e(_);
|
|
1738
2008
|
},
|
|
1739
2009
|
width: 20,
|
|
1740
2010
|
height: 20,
|
|
@@ -1744,18 +2014,18 @@ const $a = (d) => {
|
|
|
1744
2014
|
] })
|
|
1745
2015
|
]
|
|
1746
2016
|
},
|
|
1747
|
-
|
|
2017
|
+
h.id
|
|
1748
2018
|
)),
|
|
1749
|
-
|
|
1750
|
-
|
|
2019
|
+
l && /* @__PURE__ */ t.jsx(
|
|
2020
|
+
En,
|
|
1751
2021
|
{
|
|
1752
|
-
ref:
|
|
1753
|
-
activeButton:
|
|
1754
|
-
setActiveButton:
|
|
1755
|
-
popupPosition:
|
|
2022
|
+
ref: r,
|
|
2023
|
+
activeButton: l,
|
|
2024
|
+
setActiveButton: o,
|
|
2025
|
+
popupPosition: n
|
|
1756
2026
|
}
|
|
1757
2027
|
),
|
|
1758
|
-
|
|
2028
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1759
2029
|
"div",
|
|
1760
2030
|
{
|
|
1761
2031
|
style: {
|
|
@@ -1764,16 +2034,16 @@ const $a = (d) => {
|
|
|
1764
2034
|
justifyContent: "center"
|
|
1765
2035
|
},
|
|
1766
2036
|
children: /* @__PURE__ */ t.jsx(
|
|
1767
|
-
|
|
2037
|
+
ot,
|
|
1768
2038
|
{
|
|
1769
2039
|
withoutHover: !0,
|
|
1770
|
-
className:
|
|
2040
|
+
className: at.button,
|
|
1771
2041
|
size: "s",
|
|
1772
2042
|
onClick: () => {
|
|
1773
|
-
const
|
|
1774
|
-
|
|
2043
|
+
const h = [...a];
|
|
2044
|
+
h.push({
|
|
1775
2045
|
type: "Primary",
|
|
1776
|
-
id:
|
|
2046
|
+
id: ht(),
|
|
1777
2047
|
typesText: [],
|
|
1778
2048
|
destination: "Go to Page",
|
|
1779
2049
|
text: {
|
|
@@ -1781,12 +2051,12 @@ const $a = (d) => {
|
|
|
1781
2051
|
},
|
|
1782
2052
|
page: "home",
|
|
1783
2053
|
openInNewTab: !0
|
|
1784
|
-
}), e(
|
|
2054
|
+
}), e(h);
|
|
1785
2055
|
},
|
|
1786
2056
|
style: {
|
|
1787
2057
|
width: "fit-content"
|
|
1788
2058
|
},
|
|
1789
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2059
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: at.addButton, children: [
|
|
1790
2060
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1791
2061
|
/* @__PURE__ */ t.jsx(
|
|
1792
2062
|
b,
|
|
@@ -1802,77 +2072,78 @@ const $a = (d) => {
|
|
|
1802
2072
|
}
|
|
1803
2073
|
)
|
|
1804
2074
|
] });
|
|
1805
|
-
},
|
|
1806
|
-
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons:
|
|
1807
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1808
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1809
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
2075
|
+
}, Za = (u) => {
|
|
2076
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i, editable: c = !0 } = u;
|
|
2077
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
|
|
2078
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
2079
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1810
2080
|
/* @__PURE__ */ t.jsx(
|
|
1811
|
-
|
|
2081
|
+
st,
|
|
1812
2082
|
{
|
|
1813
2083
|
current: a,
|
|
1814
|
-
onChange: (
|
|
2084
|
+
onChange: (l) => e(l)
|
|
1815
2085
|
}
|
|
1816
2086
|
)
|
|
1817
2087
|
] }),
|
|
1818
2088
|
/* @__PURE__ */ t.jsx(
|
|
1819
|
-
|
|
2089
|
+
ai,
|
|
1820
2090
|
{
|
|
1821
2091
|
buttons: s,
|
|
1822
|
-
setButtons:
|
|
2092
|
+
setButtons: i,
|
|
2093
|
+
editable: c
|
|
1823
2094
|
}
|
|
1824
2095
|
)
|
|
1825
2096
|
] }) });
|
|
1826
|
-
},
|
|
1827
|
-
wrapper:
|
|
1828
|
-
subtitle:
|
|
1829
|
-
content:
|
|
1830
|
-
range:
|
|
1831
|
-
track:
|
|
1832
|
-
progress:
|
|
1833
|
-
dots:
|
|
1834
|
-
dot:
|
|
1835
|
-
active:
|
|
1836
|
-
input:
|
|
1837
|
-
countBlock:
|
|
1838
|
-
count:
|
|
1839
|
-
controls:
|
|
1840
|
-
button:
|
|
1841
|
-
},
|
|
1842
|
-
const { label: a, min: e = 1, max: s = 4, step:
|
|
1843
|
-
c < s &&
|
|
1844
|
-
},
|
|
1845
|
-
c > e &&
|
|
1846
|
-
},
|
|
1847
|
-
const
|
|
1848
|
-
|
|
2097
|
+
}, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", _i = "_progress_m18qi_36", mi = "_dots_m18qi_46", hi = "_dot_m18qi_46", pi = "_active_m18qi_65", fi = "_input_m18qi_77", gi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
|
|
2098
|
+
wrapper: ci,
|
|
2099
|
+
subtitle: li,
|
|
2100
|
+
content: ri,
|
|
2101
|
+
range: di,
|
|
2102
|
+
track: ui,
|
|
2103
|
+
progress: _i,
|
|
2104
|
+
dots: mi,
|
|
2105
|
+
dot: hi,
|
|
2106
|
+
active: pi,
|
|
2107
|
+
input: fi,
|
|
2108
|
+
countBlock: gi,
|
|
2109
|
+
count: xi,
|
|
2110
|
+
controls: bi,
|
|
2111
|
+
button: vi
|
|
2112
|
+
}, qt = (u) => {
|
|
2113
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = f.useState(!1), d = Array.from({ length: (s - e) / i + 1 }), j = (c - e) / (s - e) * 100, p = () => {
|
|
2114
|
+
c < s && l(c + i);
|
|
2115
|
+
}, r = () => {
|
|
2116
|
+
c > e && l(c - i);
|
|
2117
|
+
}, y = (h) => {
|
|
2118
|
+
const _ = e + h * i;
|
|
2119
|
+
l(_);
|
|
1849
2120
|
};
|
|
1850
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1851
|
-
a && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1852
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1853
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1854
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2121
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
|
|
2122
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
|
|
2123
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.content, children: [
|
|
2124
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.range, children: [
|
|
2125
|
+
/* @__PURE__ */ t.jsx("div", { className: W.track }),
|
|
1855
2126
|
/* @__PURE__ */ t.jsx(
|
|
1856
2127
|
"div",
|
|
1857
2128
|
{
|
|
1858
|
-
className:
|
|
2129
|
+
className: W.progress,
|
|
1859
2130
|
style: { width: `${j}%` }
|
|
1860
2131
|
}
|
|
1861
2132
|
),
|
|
1862
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1863
|
-
const
|
|
2133
|
+
/* @__PURE__ */ t.jsx("div", { className: W.dots, children: d.map((h, _) => {
|
|
2134
|
+
const w = _ <= (c - e) / i;
|
|
1864
2135
|
return /* @__PURE__ */ t.jsx(
|
|
1865
2136
|
"button",
|
|
1866
2137
|
{
|
|
1867
|
-
onClick: () =>
|
|
1868
|
-
className:
|
|
1869
|
-
[
|
|
1870
|
-
[
|
|
1871
|
-
[
|
|
2138
|
+
onClick: () => y(_),
|
|
2139
|
+
className: Y(W.dot, {
|
|
2140
|
+
[W.active]: w,
|
|
2141
|
+
[W.inactive]: !w,
|
|
2142
|
+
[W.dragging]: o
|
|
1872
2143
|
}),
|
|
1873
|
-
"aria-label": `Set value to ${e +
|
|
2144
|
+
"aria-label": `Set value to ${e + _ * i}`
|
|
1874
2145
|
},
|
|
1875
|
-
|
|
2146
|
+
_
|
|
1876
2147
|
);
|
|
1877
2148
|
}) }),
|
|
1878
2149
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1881,39 +2152,39 @@ const $a = (d) => {
|
|
|
1881
2152
|
type: "range",
|
|
1882
2153
|
min: e,
|
|
1883
2154
|
max: s,
|
|
1884
|
-
step:
|
|
2155
|
+
step: i,
|
|
1885
2156
|
value: c,
|
|
1886
|
-
onChange: (
|
|
1887
|
-
onMouseDown: () =>
|
|
1888
|
-
onMouseUp: () =>
|
|
1889
|
-
onTouchStart: () =>
|
|
1890
|
-
onTouchEnd: () =>
|
|
1891
|
-
className:
|
|
2157
|
+
onChange: (h) => l(Number(h.target.value)),
|
|
2158
|
+
onMouseDown: () => n(!0),
|
|
2159
|
+
onMouseUp: () => n(!1),
|
|
2160
|
+
onTouchStart: () => n(!0),
|
|
2161
|
+
onTouchEnd: () => n(!1),
|
|
2162
|
+
className: W.input
|
|
1892
2163
|
}
|
|
1893
2164
|
)
|
|
1894
2165
|
] }),
|
|
1895
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2166
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.countBlock, children: [
|
|
1896
2167
|
/* @__PURE__ */ t.jsx(
|
|
1897
|
-
|
|
2168
|
+
tt,
|
|
1898
2169
|
{
|
|
1899
2170
|
type: "number",
|
|
1900
2171
|
min: e,
|
|
1901
2172
|
max: s,
|
|
1902
2173
|
paddingless: !0,
|
|
1903
|
-
onChange: (
|
|
1904
|
-
const
|
|
1905
|
-
|
|
2174
|
+
onChange: (h) => {
|
|
2175
|
+
const _ = Number(h);
|
|
2176
|
+
_ > s ? l(s) : _ < e ? l(e) : l(_);
|
|
1906
2177
|
},
|
|
1907
2178
|
value: String(c)
|
|
1908
2179
|
}
|
|
1909
2180
|
),
|
|
1910
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2181
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.controls, children: [
|
|
1911
2182
|
/* @__PURE__ */ t.jsx(
|
|
1912
2183
|
"button",
|
|
1913
2184
|
{
|
|
1914
|
-
onClick:
|
|
2185
|
+
onClick: p,
|
|
1915
2186
|
disabled: c >= s,
|
|
1916
|
-
className:
|
|
2187
|
+
className: W.button,
|
|
1917
2188
|
"aria-label": "Increment count",
|
|
1918
2189
|
children: /* @__PURE__ */ t.jsx(
|
|
1919
2190
|
b,
|
|
@@ -1928,9 +2199,9 @@ const $a = (d) => {
|
|
|
1928
2199
|
/* @__PURE__ */ t.jsx(
|
|
1929
2200
|
"button",
|
|
1930
2201
|
{
|
|
1931
|
-
onClick:
|
|
2202
|
+
onClick: r,
|
|
1932
2203
|
disabled: c <= e,
|
|
1933
|
-
className:
|
|
2204
|
+
className: W.button,
|
|
1934
2205
|
"aria-label": "Decrement count",
|
|
1935
2206
|
children: /* @__PURE__ */ t.jsx(
|
|
1936
2207
|
b,
|
|
@@ -1946,36 +2217,36 @@ const $a = (d) => {
|
|
|
1946
2217
|
] })
|
|
1947
2218
|
] })
|
|
1948
2219
|
] });
|
|
1949
|
-
},
|
|
1950
|
-
title:
|
|
1951
|
-
subtitle:
|
|
1952
|
-
header:
|
|
1953
|
-
text:
|
|
1954
|
-
productsBlock:
|
|
1955
|
-
top:
|
|
1956
|
-
itemsBlock:
|
|
1957
|
-
typeTexts:
|
|
1958
|
-
block:
|
|
1959
|
-
active:
|
|
1960
|
-
products:
|
|
1961
|
-
product:
|
|
1962
|
-
button:
|
|
1963
|
-
image:
|
|
1964
|
-
info:
|
|
1965
|
-
name:
|
|
1966
|
-
buttons:
|
|
1967
|
-
modal:
|
|
1968
|
-
link:
|
|
1969
|
-
modalOptions:
|
|
1970
|
-
addButton:
|
|
1971
|
-
deleteButton:
|
|
1972
|
-
closeIcon:
|
|
1973
|
-
},
|
|
1974
|
-
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal:
|
|
1975
|
-
return
|
|
2220
|
+
}, ji = "_title_ix5ax_1", yi = "_subtitle_ix5ax_5", ki = "_header_ix5ax_12", $i = "_text_ix5ax_13", Ii = "_productsBlock_ix5ax_14", Ni = "_top_ix5ax_26", wi = "_itemsBlock_ix5ax_35", Ci = "_typeTexts_ix5ax_41", Si = "_block_ix5ax_48", Bi = "_active_ix5ax_61", Ti = "_products_ix5ax_14", Pi = "_product_ix5ax_14", Ai = "_button_ix5ax_80", Oi = "_image_ix5ax_91", Mi = "_info_ix5ax_98", qi = "_name_ix5ax_110", Ei = "_buttons_ix5ax_114", Di = "_modal_ix5ax_121", Ui = "_link_ix5ax_141", Hi = "_modalOptions_ix5ax_147", Ri = "_addButton_ix5ax_160", Li = "_deleteButton_ix5ax_175", zi = "_closeIcon_ix5ax_187", G = {
|
|
2221
|
+
title: ji,
|
|
2222
|
+
subtitle: yi,
|
|
2223
|
+
header: ki,
|
|
2224
|
+
text: $i,
|
|
2225
|
+
productsBlock: Ii,
|
|
2226
|
+
top: Ni,
|
|
2227
|
+
itemsBlock: wi,
|
|
2228
|
+
typeTexts: Ci,
|
|
2229
|
+
block: Si,
|
|
2230
|
+
active: Bi,
|
|
2231
|
+
products: Ti,
|
|
2232
|
+
product: Pi,
|
|
2233
|
+
button: Ai,
|
|
2234
|
+
image: Oi,
|
|
2235
|
+
info: Mi,
|
|
2236
|
+
name: qi,
|
|
2237
|
+
buttons: Ei,
|
|
2238
|
+
modal: Di,
|
|
2239
|
+
link: Ui,
|
|
2240
|
+
modalOptions: Hi,
|
|
2241
|
+
addButton: Ri,
|
|
2242
|
+
deleteButton: Li,
|
|
2243
|
+
closeIcon: zi
|
|
2244
|
+
}, Fi = (u) => {
|
|
2245
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((o) => o.id === a.listingId);
|
|
2246
|
+
return l ? /* @__PURE__ */ t.jsxs(
|
|
1976
2247
|
"div",
|
|
1977
2248
|
{
|
|
1978
|
-
className:
|
|
2249
|
+
className: G.modal,
|
|
1979
2250
|
onClick: (o) => {
|
|
1980
2251
|
o.stopPropagation();
|
|
1981
2252
|
},
|
|
@@ -1984,31 +2255,31 @@ const $a = (d) => {
|
|
|
1984
2255
|
left: `${s.left}px`
|
|
1985
2256
|
},
|
|
1986
2257
|
children: [
|
|
1987
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1988
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1989
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2258
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2259
|
+
/* @__PURE__ */ t.jsx("h3", { children: Yt(l.productData.name) }),
|
|
2260
|
+
/* @__PURE__ */ t.jsx("div", { className: G.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1990
2261
|
b,
|
|
1991
2262
|
{
|
|
1992
2263
|
name: "X",
|
|
1993
2264
|
height: 20,
|
|
1994
2265
|
width: 20,
|
|
1995
2266
|
onClick: () => {
|
|
1996
|
-
|
|
2267
|
+
i(!1), e(null);
|
|
1997
2268
|
}
|
|
1998
2269
|
}
|
|
1999
2270
|
) })
|
|
2000
2271
|
] }),
|
|
2001
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2002
|
-
|
|
2272
|
+
/* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
2273
|
+
bt,
|
|
2003
2274
|
{
|
|
2004
2275
|
label: "Put up an attractive image",
|
|
2005
|
-
activeImage:
|
|
2276
|
+
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
2006
2277
|
onChange: (o) => {
|
|
2007
|
-
const
|
|
2278
|
+
const n = {
|
|
2008
2279
|
...a,
|
|
2009
2280
|
image: o[0]
|
|
2010
2281
|
};
|
|
2011
|
-
e(
|
|
2282
|
+
e(n);
|
|
2012
2283
|
}
|
|
2013
2284
|
}
|
|
2014
2285
|
) })
|
|
@@ -2016,81 +2287,81 @@ const $a = (d) => {
|
|
|
2016
2287
|
}
|
|
2017
2288
|
) : null;
|
|
2018
2289
|
};
|
|
2019
|
-
function
|
|
2020
|
-
const { product: a, children: e } =
|
|
2290
|
+
function Vi(u) {
|
|
2291
|
+
const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
2021
2292
|
id: String(a.listingId)
|
|
2022
|
-
}),
|
|
2023
|
-
transform:
|
|
2293
|
+
}), d = {
|
|
2294
|
+
transform: St.Transform.toString(l),
|
|
2024
2295
|
transition: o
|
|
2025
2296
|
};
|
|
2026
2297
|
return /* @__PURE__ */ t.jsx(
|
|
2027
2298
|
"div",
|
|
2028
2299
|
{
|
|
2029
2300
|
ref: c,
|
|
2030
|
-
style:
|
|
2031
|
-
className: `${
|
|
2301
|
+
style: d,
|
|
2302
|
+
className: `${G.product} ${n ? G.dragging : ""}`,
|
|
2032
2303
|
...s,
|
|
2033
|
-
...
|
|
2304
|
+
...i,
|
|
2034
2305
|
children: e
|
|
2035
2306
|
}
|
|
2036
2307
|
);
|
|
2037
2308
|
}
|
|
2038
|
-
const
|
|
2309
|
+
const tc = (u) => {
|
|
2039
2310
|
const {
|
|
2040
2311
|
isActiveItems: a,
|
|
2041
2312
|
setIsActiveItems: e,
|
|
2042
2313
|
items: s,
|
|
2043
|
-
setItems:
|
|
2314
|
+
setItems: i,
|
|
2044
2315
|
other: c,
|
|
2045
|
-
title:
|
|
2316
|
+
title: l,
|
|
2046
2317
|
subtitle: o,
|
|
2047
|
-
editable:
|
|
2048
|
-
draggable:
|
|
2318
|
+
editable: n = !0,
|
|
2319
|
+
draggable: d = !1,
|
|
2049
2320
|
withImage: j = !1,
|
|
2050
|
-
deletable:
|
|
2051
|
-
addable:
|
|
2052
|
-
itemsType:
|
|
2053
|
-
itemsOptions:
|
|
2054
|
-
} =
|
|
2321
|
+
deletable: p = !0,
|
|
2322
|
+
addable: r = !0,
|
|
2323
|
+
itemsType: y,
|
|
2324
|
+
itemsOptions: h
|
|
2325
|
+
} = u, [_, w] = f.useState(
|
|
2055
2326
|
null
|
|
2056
|
-
), [
|
|
2327
|
+
), [H, $] = f.useState({
|
|
2057
2328
|
top: 0,
|
|
2058
2329
|
left: 0
|
|
2059
|
-
}), [g,
|
|
2060
|
-
|
|
2330
|
+
}), [g, B] = f.useState(!1), E = yt(
|
|
2331
|
+
kt(wt, {
|
|
2061
2332
|
activationConstraint: {
|
|
2062
2333
|
distance: 5
|
|
2063
2334
|
}
|
|
2064
2335
|
})
|
|
2065
2336
|
);
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2337
|
+
f.useEffect(() => {
|
|
2338
|
+
const x = () => {
|
|
2339
|
+
w(null), B(!1);
|
|
2069
2340
|
};
|
|
2070
|
-
return document.body.addEventListener("click",
|
|
2071
|
-
|
|
2341
|
+
return document.body.addEventListener("click", x), w(null), B(!1), () => {
|
|
2342
|
+
w(null), B(!1), document.body.removeEventListener("click", x);
|
|
2072
2343
|
};
|
|
2073
|
-
}, []),
|
|
2074
|
-
if (
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2344
|
+
}, []), f.useEffect(() => {
|
|
2345
|
+
if (_) {
|
|
2346
|
+
const x = [...s].map((I) => I.listingId === _.listingId ? _ : I);
|
|
2347
|
+
i(x);
|
|
2077
2348
|
}
|
|
2078
|
-
}, [
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2081
|
-
const
|
|
2082
|
-
let
|
|
2083
|
-
|
|
2084
|
-
top:
|
|
2085
|
-
left:
|
|
2086
|
-
}),
|
|
2349
|
+
}, [_]);
|
|
2350
|
+
const F = (x, I) => {
|
|
2351
|
+
x.stopPropagation();
|
|
2352
|
+
const C = x.target.getBoundingClientRect(), R = 100, O = window.innerHeight;
|
|
2353
|
+
let U = C.top + window.scrollY;
|
|
2354
|
+
U + R > O && (U = O - R - 20), B(!0), $({
|
|
2355
|
+
top: U - 80,
|
|
2356
|
+
left: C.left - 30
|
|
2357
|
+
}), w(I);
|
|
2087
2358
|
};
|
|
2088
|
-
function
|
|
2359
|
+
function T(x) {
|
|
2089
2360
|
if (j)
|
|
2090
|
-
return
|
|
2361
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
2091
2362
|
"img",
|
|
2092
2363
|
{
|
|
2093
|
-
src: `https://imagedelivery.net/${
|
|
2364
|
+
src: `https://imagedelivery.net/${x}/w=1000`,
|
|
2094
2365
|
alt: "image",
|
|
2095
2366
|
width: 16,
|
|
2096
2367
|
height: 16
|
|
@@ -2105,20 +2376,20 @@ const wa = (d) => {
|
|
|
2105
2376
|
}
|
|
2106
2377
|
);
|
|
2107
2378
|
}
|
|
2108
|
-
const
|
|
2109
|
-
const { active:
|
|
2110
|
-
if (
|
|
2111
|
-
const
|
|
2112
|
-
if (
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2379
|
+
const v = (x) => {
|
|
2380
|
+
const { active: I, over: C } = x;
|
|
2381
|
+
if (C && I.id !== C.id) {
|
|
2382
|
+
const R = s.findIndex((U) => String(U.listingId) === I.id), O = s.findIndex((U) => String(U.listingId) === C.id);
|
|
2383
|
+
if (R !== -1 && O !== -1) {
|
|
2384
|
+
const U = [...s], [nt] = U.splice(R, 1);
|
|
2385
|
+
U.splice(O, 0, nt), i(U);
|
|
2115
2386
|
}
|
|
2116
2387
|
}
|
|
2117
|
-
},
|
|
2118
|
-
const
|
|
2119
|
-
if (!
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2388
|
+
}, A = (x, I) => {
|
|
2389
|
+
const C = h.find((O) => x.listingId === O.id);
|
|
2390
|
+
if (!C) return null;
|
|
2391
|
+
const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2392
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2122
2393
|
b,
|
|
2123
2394
|
{
|
|
2124
2395
|
name: "DotsSixVertical",
|
|
@@ -2127,40 +2398,40 @@ const wa = (d) => {
|
|
|
2127
2398
|
height: 20
|
|
2128
2399
|
}
|
|
2129
2400
|
) }),
|
|
2130
|
-
|
|
2131
|
-
|
|
2401
|
+
y === "select" && /* @__PURE__ */ t.jsx(
|
|
2402
|
+
et,
|
|
2132
2403
|
{
|
|
2133
2404
|
onChange: (O) => {
|
|
2134
|
-
const
|
|
2135
|
-
if (!
|
|
2136
|
-
const
|
|
2137
|
-
listingId:
|
|
2138
|
-
image:
|
|
2139
|
-
},
|
|
2140
|
-
|
|
2405
|
+
const U = [...s], nt = h.find((D) => D.productData.name === O);
|
|
2406
|
+
if (!nt) return;
|
|
2407
|
+
const dt = {
|
|
2408
|
+
listingId: nt.id,
|
|
2409
|
+
image: nt.productData.images.length > 0 ? nt.productData.images[0].cfId : ""
|
|
2410
|
+
}, k = U.map((D) => D.listingId === x.listingId ? dt : D);
|
|
2411
|
+
w(dt), i([...k]);
|
|
2141
2412
|
},
|
|
2142
|
-
value:
|
|
2413
|
+
value: C.productData.name,
|
|
2143
2414
|
options: [
|
|
2144
|
-
...
|
|
2415
|
+
...h.filter((O) => !s.find((U) => U.listingId === O.id)).map((O) => O.productData.name)
|
|
2145
2416
|
],
|
|
2146
|
-
leftAddon:
|
|
2147
|
-
|
|
2417
|
+
leftAddon: T(
|
|
2418
|
+
x.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
|
|
2148
2419
|
)
|
|
2149
2420
|
},
|
|
2150
|
-
|
|
2421
|
+
I
|
|
2151
2422
|
),
|
|
2152
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2153
|
-
|
|
2423
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
2424
|
+
n && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2154
2425
|
b,
|
|
2155
2426
|
{
|
|
2156
2427
|
name: "Sliders",
|
|
2157
2428
|
hoverable: !0,
|
|
2158
2429
|
width: 20,
|
|
2159
2430
|
height: 20,
|
|
2160
|
-
onClick: (O) =>
|
|
2431
|
+
onClick: (O) => F(O, x)
|
|
2161
2432
|
}
|
|
2162
2433
|
) }),
|
|
2163
|
-
|
|
2434
|
+
p && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2164
2435
|
b,
|
|
2165
2436
|
{
|
|
2166
2437
|
name: "Trash",
|
|
@@ -2168,66 +2439,66 @@ const wa = (d) => {
|
|
|
2168
2439
|
width: 20,
|
|
2169
2440
|
height: 20,
|
|
2170
2441
|
fill: "#C12A2A",
|
|
2171
|
-
onClick: () =>
|
|
2442
|
+
onClick: () => i(s.filter((O) => O !== x))
|
|
2172
2443
|
}
|
|
2173
2444
|
) })
|
|
2174
2445
|
] })
|
|
2175
2446
|
] });
|
|
2176
|
-
return
|
|
2177
|
-
|
|
2447
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
2448
|
+
Vi,
|
|
2178
2449
|
{
|
|
2179
|
-
product:
|
|
2180
|
-
children:
|
|
2450
|
+
product: x,
|
|
2451
|
+
children: R
|
|
2181
2452
|
},
|
|
2182
|
-
|
|
2453
|
+
x.listingId
|
|
2183
2454
|
) : /* @__PURE__ */ t.jsx(
|
|
2184
2455
|
"div",
|
|
2185
2456
|
{
|
|
2186
|
-
className:
|
|
2187
|
-
children:
|
|
2457
|
+
className: G.product,
|
|
2458
|
+
children: R
|
|
2188
2459
|
},
|
|
2189
|
-
|
|
2460
|
+
x.listingId
|
|
2190
2461
|
);
|
|
2191
2462
|
};
|
|
2192
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2193
|
-
(
|
|
2194
|
-
|
|
2463
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
2464
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2465
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
|
|
2195
2466
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2196
|
-
|
|
2467
|
+
st,
|
|
2197
2468
|
{
|
|
2198
2469
|
current: a,
|
|
2199
|
-
onChange: (
|
|
2470
|
+
onChange: (x) => e == null ? void 0 : e(x)
|
|
2200
2471
|
}
|
|
2201
2472
|
)
|
|
2202
2473
|
] }),
|
|
2203
|
-
g &&
|
|
2204
|
-
|
|
2474
|
+
g && _ && /* @__PURE__ */ t.jsx(
|
|
2475
|
+
Fi,
|
|
2205
2476
|
{
|
|
2206
|
-
activeItem:
|
|
2207
|
-
setActiveItem:
|
|
2208
|
-
setIsOpenModal:
|
|
2209
|
-
popupPosition:
|
|
2210
|
-
itemsOptions:
|
|
2477
|
+
activeItem: _,
|
|
2478
|
+
setActiveItem: w,
|
|
2479
|
+
setIsOpenModal: B,
|
|
2480
|
+
popupPosition: H,
|
|
2481
|
+
itemsOptions: h
|
|
2211
2482
|
}
|
|
2212
2483
|
),
|
|
2213
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2214
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
2215
|
-
|
|
2216
|
-
|
|
2484
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
2485
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2486
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
2487
|
+
$t,
|
|
2217
2488
|
{
|
|
2218
2489
|
sensors: E,
|
|
2219
|
-
onDragEnd:
|
|
2490
|
+
onDragEnd: v,
|
|
2220
2491
|
children: /* @__PURE__ */ t.jsx(
|
|
2221
|
-
|
|
2492
|
+
It,
|
|
2222
2493
|
{
|
|
2223
|
-
items: s.map((
|
|
2224
|
-
strategy:
|
|
2225
|
-
children: s.map((
|
|
2494
|
+
items: s.map((x) => String(x.listingId)),
|
|
2495
|
+
strategy: Nt,
|
|
2496
|
+
children: s.map((x, I) => A(x, I))
|
|
2226
2497
|
}
|
|
2227
2498
|
)
|
|
2228
2499
|
}
|
|
2229
|
-
) : s.map((
|
|
2230
|
-
|
|
2500
|
+
) : s.map((x, I) => A(x, I)),
|
|
2501
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2231
2502
|
"div",
|
|
2232
2503
|
{
|
|
2233
2504
|
style: {
|
|
@@ -2236,28 +2507,28 @@ const wa = (d) => {
|
|
|
2236
2507
|
justifyContent: "center"
|
|
2237
2508
|
},
|
|
2238
2509
|
children: /* @__PURE__ */ t.jsx(
|
|
2239
|
-
|
|
2510
|
+
ot,
|
|
2240
2511
|
{
|
|
2241
2512
|
withoutHover: !0,
|
|
2242
|
-
className:
|
|
2513
|
+
className: G.button,
|
|
2243
2514
|
size: "s",
|
|
2244
2515
|
onClick: () => {
|
|
2245
|
-
const
|
|
2246
|
-
for (let
|
|
2247
|
-
if (!s.find((
|
|
2248
|
-
|
|
2249
|
-
listingId:
|
|
2250
|
-
image:
|
|
2516
|
+
const x = [...s];
|
|
2517
|
+
for (let I = 0; I < h.length; I++)
|
|
2518
|
+
if (!s.find((C) => C.listingId === h[I].id)) {
|
|
2519
|
+
x.push({
|
|
2520
|
+
listingId: h[I].id,
|
|
2521
|
+
image: h[I].productData.images.length > 0 ? h[I].productData.images[0].cfId : ""
|
|
2251
2522
|
});
|
|
2252
2523
|
break;
|
|
2253
2524
|
}
|
|
2254
|
-
|
|
2525
|
+
i(x);
|
|
2255
2526
|
},
|
|
2256
|
-
disabled: s.length ===
|
|
2527
|
+
disabled: s.length === h.length,
|
|
2257
2528
|
style: {
|
|
2258
2529
|
width: "fit-content"
|
|
2259
2530
|
},
|
|
2260
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2531
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
2261
2532
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2262
2533
|
/* @__PURE__ */ t.jsx(
|
|
2263
2534
|
b,
|
|
@@ -2273,71 +2544,71 @@ const wa = (d) => {
|
|
|
2273
2544
|
}
|
|
2274
2545
|
)
|
|
2275
2546
|
] }),
|
|
2276
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2547
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
2277
2548
|
] });
|
|
2278
|
-
},
|
|
2279
|
-
options:
|
|
2280
|
-
price:
|
|
2281
|
-
oldPrice:
|
|
2282
|
-
newPrice:
|
|
2283
|
-
animate:
|
|
2284
|
-
appearAndBounce:
|
|
2285
|
-
meta:
|
|
2286
|
-
info:
|
|
2287
|
-
infoRight:
|
|
2288
|
-
buttons:
|
|
2289
|
-
variants:
|
|
2290
|
-
variant:
|
|
2291
|
-
stock:
|
|
2292
|
-
variantInfo:
|
|
2293
|
-
quantity:
|
|
2294
|
-
count:
|
|
2295
|
-
focused:
|
|
2296
|
-
button:
|
|
2297
|
-
activeVariant:
|
|
2298
|
-
chargeTypes:
|
|
2299
|
-
charge:
|
|
2300
|
-
chargeActive:
|
|
2301
|
-
title:
|
|
2302
|
-
},
|
|
2303
|
-
wrapper:
|
|
2304
|
-
label:
|
|
2305
|
-
input:
|
|
2306
|
-
paddingless:
|
|
2307
|
-
content:
|
|
2308
|
-
contentBorder:
|
|
2309
|
-
borderless:
|
|
2310
|
-
rightIcon:
|
|
2311
|
-
},
|
|
2549
|
+
}, Yi = "_options_6cemk_1", Gi = "_price_6cemk_12", Xi = "_oldPrice_6cemk_19", Wi = "_newPrice_6cemk_27", Ji = "_animate_6cemk_34", Qi = "_appearAndBounce_6cemk_1", Ki = "_meta_6cemk_52", Zi = "_info_6cemk_58", to = "_infoRight_6cemk_66", eo = "_buttons_6cemk_73", so = "_variants_6cemk_80", no = "_variant_6cemk_80", io = "_stock_6cemk_98", oo = "_variantInfo_6cemk_105", ao = "_quantity_6cemk_111", co = "_count_6cemk_118", lo = "_focused_6cemk_135", ro = "_button_6cemk_73", uo = "_activeVariant_6cemk_161", _o = "_chargeTypes_6cemk_165", mo = "_charge_6cemk_165", ho = "_chargeActive_6cemk_190", po = "_title_6cemk_198", P = {
|
|
2550
|
+
options: Yi,
|
|
2551
|
+
price: Gi,
|
|
2552
|
+
oldPrice: Xi,
|
|
2553
|
+
newPrice: Wi,
|
|
2554
|
+
animate: Ji,
|
|
2555
|
+
appearAndBounce: Qi,
|
|
2556
|
+
meta: Ki,
|
|
2557
|
+
info: Zi,
|
|
2558
|
+
infoRight: to,
|
|
2559
|
+
buttons: eo,
|
|
2560
|
+
variants: so,
|
|
2561
|
+
variant: no,
|
|
2562
|
+
stock: io,
|
|
2563
|
+
variantInfo: oo,
|
|
2564
|
+
quantity: ao,
|
|
2565
|
+
count: co,
|
|
2566
|
+
focused: lo,
|
|
2567
|
+
button: ro,
|
|
2568
|
+
activeVariant: uo,
|
|
2569
|
+
chargeTypes: _o,
|
|
2570
|
+
charge: mo,
|
|
2571
|
+
chargeActive: ho,
|
|
2572
|
+
title: po
|
|
2573
|
+
}, fo = "_wrapper_c1dht_1", go = "_label_c1dht_9", xo = "_input_c1dht_18", bo = "_paddingless_c1dht_31", vo = "_content_c1dht_35", jo = "_contentBorder_c1dht_47", yo = "_borderless_c1dht_52", ko = "_rightIcon_c1dht_57", it = {
|
|
2574
|
+
wrapper: fo,
|
|
2575
|
+
label: go,
|
|
2576
|
+
input: xo,
|
|
2577
|
+
paddingless: bo,
|
|
2578
|
+
content: vo,
|
|
2579
|
+
contentBorder: jo,
|
|
2580
|
+
borderless: yo,
|
|
2581
|
+
rightIcon: ko
|
|
2582
|
+
}, $o = (u) => {
|
|
2312
2583
|
const {
|
|
2313
2584
|
onChange: a,
|
|
2314
2585
|
style: e,
|
|
2315
2586
|
label: s,
|
|
2316
|
-
value:
|
|
2587
|
+
value: i,
|
|
2317
2588
|
type: c,
|
|
2318
|
-
min:
|
|
2589
|
+
min: l,
|
|
2319
2590
|
max: o,
|
|
2320
|
-
placeholder:
|
|
2321
|
-
disabled:
|
|
2591
|
+
placeholder: n,
|
|
2592
|
+
disabled: d = !1,
|
|
2322
2593
|
required: j = !1,
|
|
2323
|
-
regex:
|
|
2324
|
-
paddingless:
|
|
2325
|
-
borderless:
|
|
2326
|
-
editable:
|
|
2327
|
-
isSearch:
|
|
2328
|
-
centered:
|
|
2329
|
-
} =
|
|
2330
|
-
function E(
|
|
2331
|
-
return Number(
|
|
2594
|
+
regex: p,
|
|
2595
|
+
paddingless: r = !1,
|
|
2596
|
+
borderless: y = !1,
|
|
2597
|
+
editable: h = !1,
|
|
2598
|
+
isSearch: _ = !1,
|
|
2599
|
+
centered: w = !1
|
|
2600
|
+
} = u, { themeSettings: H } = Dt(), { inputs: $ } = H, [g, B] = f.useState(!1);
|
|
2601
|
+
function E(T) {
|
|
2602
|
+
return Number(T) < 0 ? String(l) : T;
|
|
2332
2603
|
}
|
|
2333
|
-
function
|
|
2334
|
-
return !j || !
|
|
2604
|
+
function F(T) {
|
|
2605
|
+
return !j || !p ? !0 : new RegExp(p).test(T);
|
|
2335
2606
|
}
|
|
2336
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2607
|
+
return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
|
|
2337
2608
|
s && /* @__PURE__ */ t.jsx(
|
|
2338
2609
|
"label",
|
|
2339
2610
|
{
|
|
2340
|
-
className:
|
|
2611
|
+
className: it.label,
|
|
2341
2612
|
htmlFor: s,
|
|
2342
2613
|
children: s
|
|
2343
2614
|
}
|
|
@@ -2345,13 +2616,13 @@ const wa = (d) => {
|
|
|
2345
2616
|
/* @__PURE__ */ t.jsxs(
|
|
2346
2617
|
"div",
|
|
2347
2618
|
{
|
|
2348
|
-
className:
|
|
2349
|
-
[
|
|
2619
|
+
className: Y(it.content, {
|
|
2620
|
+
[it.contentBorder]: $.border.active
|
|
2350
2621
|
}),
|
|
2351
2622
|
style: {
|
|
2352
2623
|
...e,
|
|
2353
|
-
background:
|
|
2354
|
-
padding:
|
|
2624
|
+
background: $.field.active ? $.field.color : "transparent",
|
|
2625
|
+
padding: _ ? `7px ${Number($.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2355
2626
|
},
|
|
2356
2627
|
children: [
|
|
2357
2628
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2359,40 +2630,40 @@ const wa = (d) => {
|
|
|
2359
2630
|
{
|
|
2360
2631
|
id: s,
|
|
2361
2632
|
type: c || "text",
|
|
2362
|
-
onChange: (
|
|
2363
|
-
if (c === "text") a(
|
|
2633
|
+
onChange: (T) => {
|
|
2634
|
+
if (c === "text") a(T.target.value);
|
|
2364
2635
|
else {
|
|
2365
|
-
const
|
|
2366
|
-
a(
|
|
2636
|
+
const v = E(T.target.value);
|
|
2637
|
+
a(v);
|
|
2367
2638
|
}
|
|
2368
2639
|
},
|
|
2369
|
-
value:
|
|
2640
|
+
value: i,
|
|
2370
2641
|
autoComplete: "off",
|
|
2371
|
-
placeholder:
|
|
2372
|
-
className:
|
|
2373
|
-
[
|
|
2374
|
-
[
|
|
2375
|
-
[
|
|
2642
|
+
placeholder: n || "Type something...",
|
|
2643
|
+
className: Y(it.input, {
|
|
2644
|
+
[it.required]: g && j && !F(i),
|
|
2645
|
+
[it.paddingless]: r,
|
|
2646
|
+
[it.borderless]: y
|
|
2376
2647
|
}),
|
|
2377
|
-
min: c === "number" ?
|
|
2648
|
+
min: c === "number" ? l : void 0,
|
|
2378
2649
|
max: c === "number" ? o : void 0,
|
|
2379
|
-
disabled:
|
|
2380
|
-
onFocus: () =>
|
|
2650
|
+
disabled: d,
|
|
2651
|
+
onFocus: () => B(!0),
|
|
2381
2652
|
style: {
|
|
2382
|
-
textAlign:
|
|
2653
|
+
textAlign: w ? "center" : "left"
|
|
2383
2654
|
}
|
|
2384
2655
|
}
|
|
2385
2656
|
),
|
|
2386
|
-
|
|
2657
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2387
2658
|
b,
|
|
2388
2659
|
{
|
|
2389
2660
|
name: "MagnifyingGlass",
|
|
2390
2661
|
fill: "var(--icon-secondary)",
|
|
2391
|
-
width:
|
|
2392
|
-
height:
|
|
2662
|
+
width: $.general.size,
|
|
2663
|
+
height: $.general.size
|
|
2393
2664
|
}
|
|
2394
2665
|
) }),
|
|
2395
|
-
|
|
2666
|
+
h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2396
2667
|
b,
|
|
2397
2668
|
{
|
|
2398
2669
|
name: "Sliders",
|
|
@@ -2405,34 +2676,34 @@ const wa = (d) => {
|
|
|
2405
2676
|
}
|
|
2406
2677
|
)
|
|
2407
2678
|
] });
|
|
2408
|
-
},
|
|
2409
|
-
button:
|
|
2410
|
-
primary:
|
|
2411
|
-
primaryHovered:
|
|
2412
|
-
secondary:
|
|
2413
|
-
secondaryHovered:
|
|
2414
|
-
tertiary:
|
|
2415
|
-
tertiaryHovered:
|
|
2416
|
-
content:
|
|
2417
|
-
},
|
|
2418
|
-
const { children: a, onClick: e, style: s, className:
|
|
2679
|
+
}, Io = "_button_85085_1", No = "_primary_85085_20", wo = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
|
|
2680
|
+
button: Io,
|
|
2681
|
+
primary: No,
|
|
2682
|
+
primaryHovered: wo,
|
|
2683
|
+
secondary: Co,
|
|
2684
|
+
secondaryHovered: So,
|
|
2685
|
+
tertiary: Bo,
|
|
2686
|
+
tertiaryHovered: To,
|
|
2687
|
+
content: Po
|
|
2688
|
+
}, Q = (u) => {
|
|
2689
|
+
const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Dt();
|
|
2419
2690
|
return /* @__PURE__ */ t.jsx(
|
|
2420
2691
|
"button",
|
|
2421
2692
|
{
|
|
2422
|
-
className:
|
|
2423
|
-
[
|
|
2424
|
-
[
|
|
2425
|
-
[
|
|
2426
|
-
[
|
|
2427
|
-
[
|
|
2428
|
-
[
|
|
2693
|
+
className: Y(ct.button, i, {
|
|
2694
|
+
[ct.primary]: l === "Primary",
|
|
2695
|
+
[ct.secondary]: l === "Secondary",
|
|
2696
|
+
[ct.tertiary]: l === "Tertiary",
|
|
2697
|
+
[ct.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
|
|
2698
|
+
[ct.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2699
|
+
[ct.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2429
2700
|
}),
|
|
2430
2701
|
onClick: e,
|
|
2431
2702
|
style: {
|
|
2432
2703
|
...s
|
|
2433
2704
|
},
|
|
2434
2705
|
disabled: c,
|
|
2435
|
-
children:
|
|
2706
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ct.content, children: [
|
|
2436
2707
|
a,
|
|
2437
2708
|
/* @__PURE__ */ t.jsx(
|
|
2438
2709
|
b,
|
|
@@ -2447,73 +2718,73 @@ const wa = (d) => {
|
|
|
2447
2718
|
}
|
|
2448
2719
|
);
|
|
2449
2720
|
};
|
|
2450
|
-
var zt = /* @__PURE__ */ ((
|
|
2451
|
-
const
|
|
2452
|
-
var
|
|
2453
|
-
const { variants: a } =
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
const g = setTimeout(() =>
|
|
2721
|
+
var zt = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(zt || {});
|
|
2722
|
+
const ec = (u) => {
|
|
2723
|
+
var H, $;
|
|
2724
|
+
const { variants: a } = u, [e, s] = f.useState(a[0]), [i, c] = f.useState(e.chargeTypes[0]), l = Bt(), [o, n] = f.useState(1), { reset: d, addProductToCart: j, getProducts: p } = Ot(), [r, y] = f.useState(!1);
|
|
2725
|
+
f.useEffect(() => {
|
|
2726
|
+
y(!0);
|
|
2727
|
+
const g = setTimeout(() => y(!1), 600);
|
|
2457
2728
|
return () => clearTimeout(g);
|
|
2458
2729
|
}, [o]);
|
|
2459
|
-
async function
|
|
2460
|
-
await
|
|
2461
|
-
productId:
|
|
2730
|
+
async function h() {
|
|
2731
|
+
await p(), await j({
|
|
2732
|
+
productId: u.id,
|
|
2462
2733
|
productVariantId: e.id,
|
|
2463
2734
|
quantity: o
|
|
2464
2735
|
});
|
|
2465
2736
|
}
|
|
2466
|
-
function
|
|
2467
|
-
|
|
2737
|
+
function _() {
|
|
2738
|
+
d(), h(), l("/checkout");
|
|
2468
2739
|
}
|
|
2469
|
-
function
|
|
2740
|
+
function w(g) {
|
|
2470
2741
|
if (g >= 864e5) {
|
|
2471
|
-
const
|
|
2472
|
-
return `${
|
|
2742
|
+
const v = Math.floor(g / 864e5);
|
|
2743
|
+
return `${v} ${v === 1 ? "day" : "days"}`;
|
|
2473
2744
|
} else if (g >= 36e5) {
|
|
2474
|
-
const
|
|
2475
|
-
return `${
|
|
2745
|
+
const v = Math.floor(g / 36e5);
|
|
2746
|
+
return `${v} ${v === 1 ? "hour" : "hours"}`;
|
|
2476
2747
|
} else if (g >= 6e4) {
|
|
2477
|
-
const
|
|
2478
|
-
return `${
|
|
2748
|
+
const v = Math.floor(g / 6e4);
|
|
2749
|
+
return `${v} ${v === 1 ? "minute" : "minutes"}`;
|
|
2479
2750
|
} else {
|
|
2480
|
-
const
|
|
2481
|
-
return `${
|
|
2751
|
+
const v = Math.floor(g / 1e3);
|
|
2752
|
+
return `${v} ${v === 1 ? "second" : "seconds"}`;
|
|
2482
2753
|
}
|
|
2483
2754
|
}
|
|
2484
|
-
return
|
|
2485
|
-
(e.quantity.available === 0 || !e.quantity.available) &&
|
|
2486
|
-
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2487
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2755
|
+
return f.useEffect(() => {
|
|
2756
|
+
(e.quantity.available === 0 || !e.quantity.available) && n(0);
|
|
2757
|
+
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className: P.options, children: [
|
|
2758
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: P.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
2488
2759
|
"div",
|
|
2489
2760
|
{
|
|
2490
|
-
className:
|
|
2491
|
-
[
|
|
2761
|
+
className: Y(P.charge, {
|
|
2762
|
+
[P.chargeActive]: i === g
|
|
2492
2763
|
}),
|
|
2493
2764
|
onClick: () => c(g),
|
|
2494
2765
|
children: zt[g]
|
|
2495
2766
|
},
|
|
2496
2767
|
g
|
|
2497
2768
|
)) }),
|
|
2498
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2499
|
-
var
|
|
2769
|
+
/* @__PURE__ */ t.jsx("div", { className: P.variants, children: a.map((g) => {
|
|
2770
|
+
var B;
|
|
2500
2771
|
return /* @__PURE__ */ t.jsxs(
|
|
2501
2772
|
"div",
|
|
2502
2773
|
{
|
|
2503
|
-
className:
|
|
2504
|
-
[
|
|
2774
|
+
className: Y(P.variant, {
|
|
2775
|
+
[P.activeVariant]: e.id === g.id
|
|
2505
2776
|
}),
|
|
2506
2777
|
onClick: () => s(g),
|
|
2507
2778
|
children: [
|
|
2508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2509
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2779
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.variantInfo, children: [
|
|
2780
|
+
/* @__PURE__ */ t.jsx("span", { className: P.title, children: g.name }),
|
|
2510
2781
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2511
2782
|
"$",
|
|
2512
|
-
|
|
2783
|
+
i === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
2513
2784
|
] })
|
|
2514
2785
|
] }),
|
|
2515
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2516
|
-
((
|
|
2786
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: P.stock, children: [
|
|
2787
|
+
((B = g.quantity.restrictions) == null ? void 0 : B.max) || g.quantity.available || 0,
|
|
2517
2788
|
" in stock"
|
|
2518
2789
|
] }) })
|
|
2519
2790
|
]
|
|
@@ -2521,48 +2792,48 @@ const Sa = (d) => {
|
|
|
2521
2792
|
g.id
|
|
2522
2793
|
);
|
|
2523
2794
|
}) }),
|
|
2524
|
-
|
|
2795
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: P.quantity, children: [
|
|
2525
2796
|
/* @__PURE__ */ t.jsx(
|
|
2526
|
-
|
|
2797
|
+
Q,
|
|
2527
2798
|
{
|
|
2528
2799
|
type: "Secondary",
|
|
2529
2800
|
onClick: () => {
|
|
2530
|
-
o > 1 ?
|
|
2801
|
+
o > 1 ? n((g) => g - 1) : n(1);
|
|
2531
2802
|
},
|
|
2532
|
-
className:
|
|
2803
|
+
className: P.button,
|
|
2533
2804
|
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2534
2805
|
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2535
2806
|
}
|
|
2536
2807
|
),
|
|
2537
2808
|
/* @__PURE__ */ t.jsx(
|
|
2538
|
-
|
|
2809
|
+
$o,
|
|
2539
2810
|
{
|
|
2540
2811
|
type: "number",
|
|
2541
2812
|
value: String(o),
|
|
2542
|
-
onChange: (g) =>
|
|
2543
|
-
max: ((
|
|
2544
|
-
min: ((
|
|
2813
|
+
onChange: (g) => n(Number(g)),
|
|
2814
|
+
max: ((H = e.quantity.restrictions) == null ? void 0 : H.max) || e.quantity.available || 1 / 0,
|
|
2815
|
+
min: (($ = e.quantity.restrictions) == null ? void 0 : $.min) || 0,
|
|
2545
2816
|
centered: !0,
|
|
2546
2817
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
2547
2818
|
}
|
|
2548
2819
|
),
|
|
2549
2820
|
/* @__PURE__ */ t.jsx(
|
|
2550
|
-
|
|
2821
|
+
Q,
|
|
2551
2822
|
{
|
|
2552
2823
|
type: "Secondary",
|
|
2553
2824
|
onClick: () => {
|
|
2554
|
-
|
|
2825
|
+
n((g) => g + 1);
|
|
2555
2826
|
},
|
|
2556
|
-
className:
|
|
2827
|
+
className: P.button,
|
|
2557
2828
|
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),
|
|
2558
2829
|
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2559
2830
|
}
|
|
2560
2831
|
)
|
|
2561
2832
|
] }),
|
|
2562
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2563
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2833
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.meta, children: [
|
|
2834
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
|
|
2564
2835
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2565
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2836
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.infoRight, children: [
|
|
2566
2837
|
/* @__PURE__ */ t.jsx(
|
|
2567
2838
|
b,
|
|
2568
2839
|
{
|
|
@@ -2572,111 +2843,111 @@ const Sa = (d) => {
|
|
|
2572
2843
|
height: 20
|
|
2573
2844
|
}
|
|
2574
2845
|
),
|
|
2575
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2846
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : w(e.deliveryTime) })
|
|
2576
2847
|
] })
|
|
2577
2848
|
] }),
|
|
2578
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2849
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
|
|
2579
2850
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2580
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2581
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2851
|
+
/* @__PURE__ */ t.jsx("div", { className: P.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
|
|
2852
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2582
2853
|
"$ ",
|
|
2583
2854
|
(e.price.amount || 0) * o
|
|
2584
2855
|
] }),
|
|
2585
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2856
|
+
/* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
|
|
2586
2857
|
"$ ",
|
|
2587
2858
|
(e.compareAtPrice.amount || 0) * o
|
|
2588
2859
|
] })
|
|
2589
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2860
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2590
2861
|
"$ ",
|
|
2591
2862
|
(e.price.amount || 0) * o
|
|
2592
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2593
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2863
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
|
|
2864
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2594
2865
|
"$ ",
|
|
2595
2866
|
e.subscriptionSettings.price.amount || 0
|
|
2596
2867
|
] }),
|
|
2597
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2868
|
+
/* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
|
|
2598
2869
|
"$ ",
|
|
2599
2870
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2600
2871
|
] })
|
|
2601
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2872
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2602
2873
|
"$ ",
|
|
2603
2874
|
e.subscriptionSettings.price.amount || 0
|
|
2604
2875
|
] }) })
|
|
2605
2876
|
] })
|
|
2606
2877
|
] }),
|
|
2607
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2878
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
|
|
2608
2879
|
/* @__PURE__ */ t.jsx(
|
|
2609
|
-
|
|
2880
|
+
Q,
|
|
2610
2881
|
{
|
|
2611
2882
|
type: "Primary",
|
|
2612
|
-
onClick: () =>
|
|
2883
|
+
onClick: () => _(),
|
|
2613
2884
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2614
|
-
children:
|
|
2885
|
+
children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
2615
2886
|
}
|
|
2616
2887
|
),
|
|
2617
|
-
|
|
2618
|
-
|
|
2888
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2889
|
+
Q,
|
|
2619
2890
|
{
|
|
2620
2891
|
type: "Secondary",
|
|
2621
|
-
onClick: () =>
|
|
2892
|
+
onClick: () => h(),
|
|
2622
2893
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2623
2894
|
children: "Add to Cart"
|
|
2624
2895
|
}
|
|
2625
2896
|
)
|
|
2626
2897
|
] })
|
|
2627
2898
|
] });
|
|
2628
|
-
},
|
|
2629
|
-
button:
|
|
2630
|
-
login:
|
|
2631
|
-
signUp:
|
|
2632
|
-
buttons:
|
|
2633
|
-
modal:
|
|
2899
|
+
}, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Do = "_closing_1tdo3_64", Uo = "_info_1tdo3_113", Ho = "_top_1tdo3_120", Ro = "_title_1tdo3_131", Lo = "_clear_1tdo3_138", zo = "_activeClear_1tdo3_145", Fo = "_count_1tdo3_149", Vo = "_cart_1tdo3_164", Yo = "_empty_1tdo3_172", Go = "_product_1tdo3_198", Xo = "_products_1tdo3_207", Wo = "_image_1tdo3_215", Jo = "_productInfo_1tdo3_221", Qo = "_content_1tdo3_228", Ko = "_name_1tdo3_234", Zo = "_price_1tdo3_240", ta = "_productButtons_1tdo3_246", ea = "_productButton_1tdo3_246", sa = "_productCount_1tdo3_266", na = "_bottom_1tdo3_282", ia = "_subtotal_1tdo3_290", oa = "_block_1tdo3_298", aa = "_shoppingCount_1tdo3_305", ca = "_total_1tdo3_325", la = "_link_1tdo3_331", ra = "_userInfo_1tdo3_338", da = "_pagesMobileModal_1tdo3_349", ua = "_pagesMobileModalContent_1tdo3_363", _a = "_pagesMobileModalHeader_1tdo3_369", ma = "_pagesMobileModalFooter_1tdo3_379", S = {
|
|
2900
|
+
button: Ao,
|
|
2901
|
+
login: Oo,
|
|
2902
|
+
signUp: Mo,
|
|
2903
|
+
buttons: qo,
|
|
2904
|
+
modal: Eo,
|
|
2634
2905
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2635
2906
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2636
|
-
closing:
|
|
2907
|
+
closing: Do,
|
|
2637
2908
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2638
2909
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2639
|
-
info:
|
|
2640
|
-
top:
|
|
2641
|
-
title:
|
|
2642
|
-
clear:
|
|
2643
|
-
activeClear:
|
|
2644
|
-
count:
|
|
2645
|
-
cart:
|
|
2646
|
-
empty:
|
|
2647
|
-
product:
|
|
2648
|
-
products:
|
|
2649
|
-
image:
|
|
2650
|
-
productInfo:
|
|
2651
|
-
content:
|
|
2652
|
-
name:
|
|
2653
|
-
price:
|
|
2654
|
-
productButtons:
|
|
2655
|
-
productButton:
|
|
2656
|
-
productCount:
|
|
2657
|
-
bottom:
|
|
2658
|
-
subtotal:
|
|
2659
|
-
block:
|
|
2660
|
-
shoppingCount:
|
|
2661
|
-
total:
|
|
2662
|
-
link:
|
|
2663
|
-
userInfo:
|
|
2664
|
-
pagesMobileModal:
|
|
2665
|
-
pagesMobileModalContent:
|
|
2666
|
-
pagesMobileModalHeader:
|
|
2667
|
-
pagesMobileModalFooter:
|
|
2910
|
+
info: Uo,
|
|
2911
|
+
top: Ho,
|
|
2912
|
+
title: Ro,
|
|
2913
|
+
clear: Lo,
|
|
2914
|
+
activeClear: zo,
|
|
2915
|
+
count: Fo,
|
|
2916
|
+
cart: Vo,
|
|
2917
|
+
empty: Yo,
|
|
2918
|
+
product: Go,
|
|
2919
|
+
products: Xo,
|
|
2920
|
+
image: Wo,
|
|
2921
|
+
productInfo: Jo,
|
|
2922
|
+
content: Qo,
|
|
2923
|
+
name: Ko,
|
|
2924
|
+
price: Zo,
|
|
2925
|
+
productButtons: ta,
|
|
2926
|
+
productButton: ea,
|
|
2927
|
+
productCount: sa,
|
|
2928
|
+
bottom: na,
|
|
2929
|
+
subtotal: ia,
|
|
2930
|
+
block: oa,
|
|
2931
|
+
shoppingCount: aa,
|
|
2932
|
+
total: ca,
|
|
2933
|
+
link: la,
|
|
2934
|
+
userInfo: ra,
|
|
2935
|
+
pagesMobileModal: da,
|
|
2936
|
+
pagesMobileModalContent: ua,
|
|
2937
|
+
pagesMobileModalHeader: _a,
|
|
2938
|
+
pagesMobileModalFooter: ma
|
|
2668
2939
|
};
|
|
2669
|
-
class
|
|
2940
|
+
class xt extends Error {
|
|
2670
2941
|
}
|
|
2671
|
-
|
|
2672
|
-
function
|
|
2673
|
-
return decodeURIComponent(atob(
|
|
2942
|
+
xt.prototype.name = "InvalidTokenError";
|
|
2943
|
+
function ha(u) {
|
|
2944
|
+
return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
|
|
2674
2945
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2675
2946
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2676
2947
|
}));
|
|
2677
2948
|
}
|
|
2678
|
-
function
|
|
2679
|
-
let a =
|
|
2949
|
+
function pa(u) {
|
|
2950
|
+
let a = u.replace(/-/g, "+").replace(/_/g, "/");
|
|
2680
2951
|
switch (a.length % 4) {
|
|
2681
2952
|
case 0:
|
|
2682
2953
|
break;
|
|
@@ -2690,75 +2961,75 @@ function Ro(d) {
|
|
|
2690
2961
|
throw new Error("base64 string is not of the correct length");
|
|
2691
2962
|
}
|
|
2692
2963
|
try {
|
|
2693
|
-
return
|
|
2964
|
+
return ha(a);
|
|
2694
2965
|
} catch {
|
|
2695
2966
|
return atob(a);
|
|
2696
2967
|
}
|
|
2697
2968
|
}
|
|
2698
|
-
function
|
|
2699
|
-
if (typeof
|
|
2700
|
-
throw new
|
|
2969
|
+
function fa(u, a) {
|
|
2970
|
+
if (typeof u != "string")
|
|
2971
|
+
throw new xt("Invalid token specified: must be a string");
|
|
2701
2972
|
a || (a = {});
|
|
2702
|
-
const e = a.header === !0 ? 0 : 1, s =
|
|
2973
|
+
const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
|
|
2703
2974
|
if (typeof s != "string")
|
|
2704
|
-
throw new
|
|
2705
|
-
let
|
|
2975
|
+
throw new xt(`Invalid token specified: missing part #${e + 1}`);
|
|
2976
|
+
let i;
|
|
2706
2977
|
try {
|
|
2707
|
-
|
|
2978
|
+
i = pa(s);
|
|
2708
2979
|
} catch (c) {
|
|
2709
|
-
throw new
|
|
2980
|
+
throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2710
2981
|
}
|
|
2711
2982
|
try {
|
|
2712
|
-
return JSON.parse(
|
|
2983
|
+
return JSON.parse(i);
|
|
2713
2984
|
} catch (c) {
|
|
2714
|
-
throw new
|
|
2985
|
+
throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2715
2986
|
}
|
|
2716
2987
|
}
|
|
2717
|
-
const
|
|
2718
|
-
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } =
|
|
2719
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2720
|
-
a && /* @__PURE__ */ t.jsx(
|
|
2721
|
-
s && /* @__PURE__ */ t.jsx(
|
|
2988
|
+
const sc = (u) => {
|
|
2989
|
+
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = u;
|
|
2990
|
+
return /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
|
|
2991
|
+
a && /* @__PURE__ */ t.jsx(ga, {}),
|
|
2992
|
+
s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
|
|
2722
2993
|
] });
|
|
2723
|
-
},
|
|
2724
|
-
const [
|
|
2725
|
-
function r
|
|
2726
|
-
for (let
|
|
2727
|
-
for (let
|
|
2728
|
-
if (
|
|
2729
|
-
return
|
|
2994
|
+
}, ga = () => {
|
|
2995
|
+
const [u, a] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: c } = Ot();
|
|
2996
|
+
function l(r) {
|
|
2997
|
+
for (let y = 0; y < i.parts.length; y++)
|
|
2998
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
2999
|
+
if (i.parts[y].productVariantId === r.variants[y].id)
|
|
3000
|
+
return i.parts[y].productVariantId;
|
|
2730
3001
|
}
|
|
2731
|
-
function o(
|
|
2732
|
-
for (let
|
|
2733
|
-
for (let
|
|
2734
|
-
if (
|
|
2735
|
-
return
|
|
3002
|
+
function o(r) {
|
|
3003
|
+
for (let y = 0; y < i.parts.length; y++)
|
|
3004
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
3005
|
+
if (i.parts[y].productVariantId === r.variants[y].id)
|
|
3006
|
+
return i.parts[y].quantity;
|
|
2736
3007
|
}
|
|
2737
|
-
|
|
3008
|
+
f.useEffect(() => {
|
|
2738
3009
|
(async () => {
|
|
2739
|
-
const
|
|
2740
|
-
...
|
|
2741
|
-
activeVariantId:
|
|
2742
|
-
quantity: o(
|
|
3010
|
+
const y = i.parts.map((w) => String(w.productId)), _ = (await c([...y])).map((w) => ({
|
|
3011
|
+
...w,
|
|
3012
|
+
activeVariantId: l(w),
|
|
3013
|
+
quantity: o(w)
|
|
2743
3014
|
}));
|
|
2744
|
-
s(
|
|
3015
|
+
s(_);
|
|
2745
3016
|
})();
|
|
2746
|
-
}, [
|
|
2747
|
-
function
|
|
2748
|
-
var
|
|
2749
|
-
return !
|
|
3017
|
+
}, [i.parts.length]);
|
|
3018
|
+
function n(r) {
|
|
3019
|
+
var y;
|
|
3020
|
+
return !r || !(r != null && r.variants) ? !1 : (y = r.variants.find((h) => h.id === r.activeVariantId)) == null ? void 0 : y.subscriptionSettings;
|
|
2750
3021
|
}
|
|
2751
|
-
const
|
|
3022
|
+
const d = i.parts.length > 0 && e.length > 0 && !n(e[0]), [j, p] = f.useState(!1);
|
|
2752
3023
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2753
3024
|
/* @__PURE__ */ t.jsxs(
|
|
2754
|
-
|
|
3025
|
+
Q,
|
|
2755
3026
|
{
|
|
2756
3027
|
type: "Secondary",
|
|
2757
3028
|
style: {
|
|
2758
3029
|
padding: 10
|
|
2759
3030
|
},
|
|
2760
|
-
onClick: (
|
|
2761
|
-
|
|
3031
|
+
onClick: (r) => {
|
|
3032
|
+
r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), p(!0));
|
|
2762
3033
|
},
|
|
2763
3034
|
children: [
|
|
2764
3035
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2768,67 +3039,67 @@ const Ca = (d) => {
|
|
|
2768
3039
|
fill: "var(--icon-primary)"
|
|
2769
3040
|
}
|
|
2770
3041
|
),
|
|
2771
|
-
|
|
3042
|
+
d && /* @__PURE__ */ t.jsx("div", { className: S.shoppingCount, children: i.parts.length })
|
|
2772
3043
|
]
|
|
2773
3044
|
}
|
|
2774
3045
|
),
|
|
2775
|
-
|
|
3046
|
+
u && /* @__PURE__ */ t.jsx(
|
|
2776
3047
|
Mt,
|
|
2777
3048
|
{
|
|
2778
3049
|
close: () => {
|
|
2779
|
-
|
|
3050
|
+
p(!1), setTimeout(() => {
|
|
2780
3051
|
a(!1);
|
|
2781
3052
|
}, 300);
|
|
2782
3053
|
},
|
|
2783
3054
|
withAnimation: !1,
|
|
2784
3055
|
children: /* @__PURE__ */ t.jsx(
|
|
2785
|
-
|
|
3056
|
+
xa,
|
|
2786
3057
|
{
|
|
2787
3058
|
activeProducts: e,
|
|
2788
|
-
isCartNotEmpty:
|
|
3059
|
+
isCartNotEmpty: d,
|
|
2789
3060
|
isOpen: j
|
|
2790
3061
|
}
|
|
2791
3062
|
)
|
|
2792
3063
|
}
|
|
2793
3064
|
)
|
|
2794
3065
|
] });
|
|
2795
|
-
},
|
|
2796
|
-
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } =
|
|
2797
|
-
function
|
|
2798
|
-
|
|
3066
|
+
}, xa = (u) => {
|
|
3067
|
+
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = u, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
|
|
3068
|
+
function d(r) {
|
|
3069
|
+
n(r);
|
|
2799
3070
|
}
|
|
2800
|
-
function j(
|
|
3071
|
+
function j(r) {
|
|
2801
3072
|
o({
|
|
2802
|
-
productId:
|
|
2803
|
-
productVariantId:
|
|
2804
|
-
quantity:
|
|
3073
|
+
productId: r.id,
|
|
3074
|
+
productVariantId: r.activeVariantId,
|
|
3075
|
+
quantity: r.quantity + 1
|
|
2805
3076
|
});
|
|
2806
3077
|
}
|
|
2807
|
-
function
|
|
3078
|
+
function p(r) {
|
|
2808
3079
|
o({
|
|
2809
|
-
productId:
|
|
2810
|
-
productVariantId:
|
|
2811
|
-
quantity:
|
|
3080
|
+
productId: r.id,
|
|
3081
|
+
productVariantId: r.activeVariantId,
|
|
3082
|
+
quantity: r.quantity - 1
|
|
2812
3083
|
});
|
|
2813
3084
|
}
|
|
2814
3085
|
return /* @__PURE__ */ t.jsxs(
|
|
2815
3086
|
"div",
|
|
2816
3087
|
{
|
|
2817
|
-
className:
|
|
2818
|
-
[
|
|
3088
|
+
className: Y(S.modal, {
|
|
3089
|
+
[S.closing]: !s
|
|
2819
3090
|
}),
|
|
2820
|
-
onClick: (
|
|
3091
|
+
onClick: (r) => r.stopPropagation(),
|
|
2821
3092
|
children: [
|
|
2822
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2823
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2824
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2825
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
3093
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
3094
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.info, children: [
|
|
3095
|
+
/* @__PURE__ */ t.jsx("span", { className: S.title, children: "Cart" }),
|
|
3096
|
+
e && /* @__PURE__ */ t.jsx("div", { className: S.count, children: i.parts.length })
|
|
2826
3097
|
] }),
|
|
2827
3098
|
/* @__PURE__ */ t.jsx(
|
|
2828
3099
|
"button",
|
|
2829
3100
|
{
|
|
2830
|
-
className:
|
|
2831
|
-
[
|
|
3101
|
+
className: Y(S.clear, {
|
|
3102
|
+
[S.activeClear]: e
|
|
2832
3103
|
}),
|
|
2833
3104
|
disabled: !e,
|
|
2834
3105
|
onClick: c,
|
|
@@ -2836,39 +3107,39 @@ const Ca = (d) => {
|
|
|
2836
3107
|
}
|
|
2837
3108
|
)
|
|
2838
3109
|
] }),
|
|
2839
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2840
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3110
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: S.cart, children: [
|
|
3111
|
+
/* @__PURE__ */ t.jsx("div", { className: S.products, children: a.map((r) => /* @__PURE__ */ t.jsxs(
|
|
2841
3112
|
"div",
|
|
2842
3113
|
{
|
|
2843
|
-
className:
|
|
3114
|
+
className: S.product,
|
|
2844
3115
|
children: [
|
|
2845
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3116
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productInfo, children: [
|
|
2846
3117
|
/* @__PURE__ */ t.jsx(
|
|
2847
3118
|
"img",
|
|
2848
3119
|
{
|
|
2849
|
-
src: `https://imagedelivery.net/${
|
|
3120
|
+
src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
|
|
2850
3121
|
alt: "image",
|
|
2851
3122
|
width: "100%",
|
|
2852
3123
|
height: "100%",
|
|
2853
|
-
className:
|
|
3124
|
+
className: S.image
|
|
2854
3125
|
}
|
|
2855
3126
|
),
|
|
2856
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2857
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2858
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3127
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.content, children: [
|
|
3128
|
+
/* @__PURE__ */ t.jsx("div", { className: S.name, children: r.name }),
|
|
3129
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.price, children: [
|
|
2859
3130
|
"$",
|
|
2860
|
-
|
|
3131
|
+
r.variants.find((y) => y.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
|
|
2861
3132
|
] })
|
|
2862
3133
|
] })
|
|
2863
3134
|
] }),
|
|
2864
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3135
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productButtons, children: [
|
|
2865
3136
|
/* @__PURE__ */ t.jsx(
|
|
2866
3137
|
"div",
|
|
2867
3138
|
{
|
|
2868
3139
|
onClick: () => {
|
|
2869
|
-
|
|
3140
|
+
r.quantity !== 1 && p(r);
|
|
2870
3141
|
},
|
|
2871
|
-
className:
|
|
3142
|
+
className: S.productButton,
|
|
2872
3143
|
children: /* @__PURE__ */ t.jsx(
|
|
2873
3144
|
b,
|
|
2874
3145
|
{
|
|
@@ -2880,12 +3151,12 @@ const Ca = (d) => {
|
|
|
2880
3151
|
)
|
|
2881
3152
|
}
|
|
2882
3153
|
),
|
|
2883
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3154
|
+
/* @__PURE__ */ t.jsx("div", { className: S.productCount, children: r.quantity }),
|
|
2884
3155
|
/* @__PURE__ */ t.jsx(
|
|
2885
3156
|
"div",
|
|
2886
3157
|
{
|
|
2887
|
-
onClick: () => j(
|
|
2888
|
-
className:
|
|
3158
|
+
onClick: () => j(r),
|
|
3159
|
+
className: S.productButton,
|
|
2889
3160
|
children: /* @__PURE__ */ t.jsx(
|
|
2890
3161
|
b,
|
|
2891
3162
|
{
|
|
@@ -2900,11 +3171,11 @@ const Ca = (d) => {
|
|
|
2900
3171
|
] })
|
|
2901
3172
|
]
|
|
2902
3173
|
},
|
|
2903
|
-
|
|
3174
|
+
r.id
|
|
2904
3175
|
)) }),
|
|
2905
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2906
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2907
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3176
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.bottom, children: [
|
|
3177
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.subtotal, children: [
|
|
3178
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.block, children: [
|
|
2908
3179
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2909
3180
|
/* @__PURE__ */ t.jsx(
|
|
2910
3181
|
b,
|
|
@@ -2916,18 +3187,18 @@ const Ca = (d) => {
|
|
|
2916
3187
|
}
|
|
2917
3188
|
)
|
|
2918
3189
|
] }),
|
|
2919
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3190
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.total, children: [
|
|
2920
3191
|
"$",
|
|
2921
|
-
|
|
3192
|
+
l().total
|
|
2922
3193
|
] })
|
|
2923
3194
|
] }),
|
|
2924
|
-
/* @__PURE__ */ t.jsx(
|
|
3195
|
+
/* @__PURE__ */ t.jsx(Q, { onClick: () => d("/checkout"), children: "Checkout" })
|
|
2925
3196
|
] })
|
|
2926
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
3197
|
+
] }) : /* @__PURE__ */ t.jsx(ba, {})
|
|
2927
3198
|
]
|
|
2928
3199
|
}
|
|
2929
3200
|
);
|
|
2930
|
-
},
|
|
3201
|
+
}, ba = () => /* @__PURE__ */ t.jsxs("div", { className: S.empty, children: [
|
|
2931
3202
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2932
3203
|
b,
|
|
2933
3204
|
{
|
|
@@ -2943,22 +3214,22 @@ const Ca = (d) => {
|
|
|
2943
3214
|
"a",
|
|
2944
3215
|
{
|
|
2945
3216
|
href: "/products",
|
|
2946
|
-
className:
|
|
3217
|
+
className: S.link,
|
|
2947
3218
|
children: "view products"
|
|
2948
3219
|
}
|
|
2949
3220
|
)
|
|
2950
3221
|
] })
|
|
2951
|
-
] }),
|
|
2952
|
-
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s =
|
|
2953
|
-
function
|
|
3222
|
+
] }), Ft = ({ signUp: u }) => {
|
|
3223
|
+
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = Bt();
|
|
3224
|
+
function i(o) {
|
|
2954
3225
|
s(o);
|
|
2955
3226
|
}
|
|
2956
3227
|
if (!e)
|
|
2957
3228
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2958
3229
|
/* @__PURE__ */ t.jsx(
|
|
2959
|
-
|
|
3230
|
+
Q,
|
|
2960
3231
|
{
|
|
2961
|
-
onClick: () =>
|
|
3232
|
+
onClick: () => i("/customer-dash"),
|
|
2962
3233
|
type: "Secondary",
|
|
2963
3234
|
style: {
|
|
2964
3235
|
padding: 10
|
|
@@ -2966,10 +3237,10 @@ const Ca = (d) => {
|
|
|
2966
3237
|
children: "Login"
|
|
2967
3238
|
}
|
|
2968
3239
|
),
|
|
2969
|
-
|
|
2970
|
-
|
|
3240
|
+
u && /* @__PURE__ */ t.jsx(
|
|
3241
|
+
Q,
|
|
2971
3242
|
{
|
|
2972
|
-
onClick: () =>
|
|
3243
|
+
onClick: () => i("/customer-dash"),
|
|
2973
3244
|
type: "Primary",
|
|
2974
3245
|
style: {
|
|
2975
3246
|
padding: 10
|
|
@@ -2978,41 +3249,41 @@ const Ca = (d) => {
|
|
|
2978
3249
|
}
|
|
2979
3250
|
)
|
|
2980
3251
|
] });
|
|
2981
|
-
const [c,
|
|
2982
|
-
return
|
|
3252
|
+
const [c, l] = f.useState("test-email@gmail.com");
|
|
3253
|
+
return f.useEffect(() => {
|
|
2983
3254
|
(async () => {
|
|
2984
|
-
const
|
|
2985
|
-
|
|
3255
|
+
const n = fa(e);
|
|
3256
|
+
l(n.email);
|
|
2986
3257
|
})();
|
|
2987
3258
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
2988
3259
|
"div",
|
|
2989
3260
|
{
|
|
2990
|
-
className:
|
|
2991
|
-
onClick: () =>
|
|
3261
|
+
className: S.userInfo,
|
|
3262
|
+
onClick: () => i("/customer-dash"),
|
|
2992
3263
|
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2993
3264
|
}
|
|
2994
3265
|
);
|
|
2995
|
-
},
|
|
2996
|
-
children:
|
|
3266
|
+
}, va = ({
|
|
3267
|
+
children: u,
|
|
2997
3268
|
logo: a,
|
|
2998
3269
|
setIsOpen: e,
|
|
2999
3270
|
signUp: s
|
|
3000
3271
|
}) => {
|
|
3001
|
-
const { setIsOpen:
|
|
3002
|
-
|
|
3003
|
-
e(!1),
|
|
3272
|
+
const { setIsOpen: i } = Ut(), c = () => {
|
|
3273
|
+
i(!1), setTimeout(() => {
|
|
3274
|
+
e(!1), i(!0);
|
|
3004
3275
|
}, 300);
|
|
3005
3276
|
};
|
|
3006
3277
|
return /* @__PURE__ */ t.jsxs(
|
|
3007
3278
|
"div",
|
|
3008
3279
|
{
|
|
3009
|
-
className:
|
|
3010
|
-
onClick: (
|
|
3280
|
+
className: S.pagesMobileModal,
|
|
3281
|
+
onClick: (l) => l.stopPropagation(),
|
|
3011
3282
|
children: [
|
|
3012
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3283
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.pagesMobileModalHeader, children: [
|
|
3013
3284
|
/* @__PURE__ */ t.jsx("div", { children: a }),
|
|
3014
3285
|
/* @__PURE__ */ t.jsx(
|
|
3015
|
-
|
|
3286
|
+
Q,
|
|
3016
3287
|
{
|
|
3017
3288
|
type: "Secondary",
|
|
3018
3289
|
onClick: c,
|
|
@@ -3026,33 +3297,33 @@ const Ca = (d) => {
|
|
|
3026
3297
|
}
|
|
3027
3298
|
)
|
|
3028
3299
|
] }),
|
|
3029
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3030
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3300
|
+
/* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalContent, children: u }),
|
|
3301
|
+
/* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
|
|
3031
3302
|
]
|
|
3032
3303
|
}
|
|
3033
3304
|
);
|
|
3034
|
-
},
|
|
3035
|
-
children:
|
|
3305
|
+
}, nc = ({
|
|
3306
|
+
children: u,
|
|
3036
3307
|
logo: a,
|
|
3037
3308
|
signUp: e
|
|
3038
3309
|
}) => {
|
|
3039
|
-
const [s,
|
|
3310
|
+
const [s, i] = f.useState(!1);
|
|
3040
3311
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3041
|
-
/* @__PURE__ */ t.jsx(
|
|
3042
|
-
s && /* @__PURE__ */ t.jsx(Mt, { close: () =>
|
|
3043
|
-
|
|
3312
|
+
/* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
|
|
3313
|
+
s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
3314
|
+
va,
|
|
3044
3315
|
{
|
|
3045
3316
|
logo: a,
|
|
3046
|
-
setIsOpen:
|
|
3317
|
+
setIsOpen: i,
|
|
3047
3318
|
signUp: e,
|
|
3048
|
-
children:
|
|
3319
|
+
children: u
|
|
3049
3320
|
}
|
|
3050
3321
|
) })
|
|
3051
3322
|
] });
|
|
3052
|
-
},
|
|
3053
|
-
const { setIsOpenModal: a } =
|
|
3323
|
+
}, ja = (u) => {
|
|
3324
|
+
const { setIsOpenModal: a } = u;
|
|
3054
3325
|
return /* @__PURE__ */ t.jsx(
|
|
3055
|
-
|
|
3326
|
+
Q,
|
|
3056
3327
|
{
|
|
3057
3328
|
type: "Secondary",
|
|
3058
3329
|
style: {
|
|
@@ -3070,28 +3341,28 @@ const Ca = (d) => {
|
|
|
3070
3341
|
)
|
|
3071
3342
|
}
|
|
3072
3343
|
);
|
|
3073
|
-
},
|
|
3074
|
-
share:
|
|
3075
|
-
modal:
|
|
3076
|
-
header:
|
|
3077
|
-
socials:
|
|
3078
|
-
social:
|
|
3079
|
-
copy:
|
|
3080
|
-
title:
|
|
3081
|
-
copyWrapper:
|
|
3082
|
-
copyText:
|
|
3083
|
-
copyTextMobile:
|
|
3084
|
-
copyTextMiniMobile:
|
|
3085
|
-
},
|
|
3086
|
-
const { isOpenModal:
|
|
3344
|
+
}, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", Na = "_social_xddz7_30", wa = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
|
|
3345
|
+
share: ya,
|
|
3346
|
+
modal: ka,
|
|
3347
|
+
header: $a,
|
|
3348
|
+
socials: Ia,
|
|
3349
|
+
social: Na,
|
|
3350
|
+
copy: wa,
|
|
3351
|
+
title: Ca,
|
|
3352
|
+
copyWrapper: Sa,
|
|
3353
|
+
copyText: Ba,
|
|
3354
|
+
copyTextMobile: Ta,
|
|
3355
|
+
copyTextMiniMobile: Pa
|
|
3356
|
+
}, ic = () => {
|
|
3357
|
+
const { isOpenModal: u, setIsOpenModal: a } = Ht();
|
|
3087
3358
|
function e() {
|
|
3088
3359
|
a(!0);
|
|
3089
3360
|
}
|
|
3090
3361
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3091
3362
|
/* @__PURE__ */ t.jsx(
|
|
3092
|
-
|
|
3363
|
+
ot,
|
|
3093
3364
|
{
|
|
3094
|
-
className:
|
|
3365
|
+
className: lt.share,
|
|
3095
3366
|
onClick: (s) => {
|
|
3096
3367
|
s.stopPropagation(), e();
|
|
3097
3368
|
},
|
|
@@ -3106,45 +3377,45 @@ const Ca = (d) => {
|
|
|
3106
3377
|
)
|
|
3107
3378
|
}
|
|
3108
3379
|
),
|
|
3109
|
-
|
|
3380
|
+
u && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(Aa, {}) })
|
|
3110
3381
|
] });
|
|
3111
|
-
},
|
|
3112
|
-
const { setIsOpenModal:
|
|
3382
|
+
}, Aa = () => {
|
|
3383
|
+
const { setIsOpenModal: u } = Ht(), { notification: a, setNotification: e } = Gt(), { setIsOpen: s } = Ut(), i = window.location.href;
|
|
3113
3384
|
function c() {
|
|
3114
|
-
navigator.clipboard.writeText(
|
|
3385
|
+
navigator.clipboard.writeText(i), e({
|
|
3115
3386
|
message: "Link copied to clipboard",
|
|
3116
3387
|
status: "success"
|
|
3117
3388
|
});
|
|
3118
3389
|
}
|
|
3119
|
-
function
|
|
3390
|
+
function l() {
|
|
3120
3391
|
s(!1), setTimeout(() => {
|
|
3121
|
-
|
|
3392
|
+
u(!1), s(!0);
|
|
3122
3393
|
}, 300);
|
|
3123
3394
|
}
|
|
3124
|
-
function o(
|
|
3125
|
-
return
|
|
3395
|
+
function o(n, d) {
|
|
3396
|
+
return n.length > d ? n.slice(0, d) + "..." : n;
|
|
3126
3397
|
}
|
|
3127
3398
|
return /* @__PURE__ */ t.jsxs(
|
|
3128
3399
|
"div",
|
|
3129
3400
|
{
|
|
3130
|
-
className:
|
|
3131
|
-
onClick: (
|
|
3401
|
+
className: lt.modal,
|
|
3402
|
+
onClick: (n) => n.stopPropagation(),
|
|
3132
3403
|
children: [
|
|
3133
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3134
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3404
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.header, children: [
|
|
3405
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.title, children: "Copy Product Link" }),
|
|
3135
3406
|
/* @__PURE__ */ t.jsx(
|
|
3136
3407
|
b,
|
|
3137
3408
|
{
|
|
3138
3409
|
name: "X",
|
|
3139
3410
|
fill: "#757575",
|
|
3140
|
-
onClick:
|
|
3411
|
+
onClick: l,
|
|
3141
3412
|
hoverable: !0
|
|
3142
3413
|
}
|
|
3143
3414
|
)
|
|
3144
3415
|
] }),
|
|
3145
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3416
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.copyWrapper, children: [
|
|
3146
3417
|
/* @__PURE__ */ t.jsxs(
|
|
3147
|
-
|
|
3418
|
+
ot,
|
|
3148
3419
|
{
|
|
3149
3420
|
type: "Secondary",
|
|
3150
3421
|
onClick: c,
|
|
@@ -3152,14 +3423,14 @@ const Ca = (d) => {
|
|
|
3152
3423
|
flex: 1
|
|
3153
3424
|
},
|
|
3154
3425
|
children: [
|
|
3155
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3156
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3157
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3426
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyText, children: o(i, 100) }),
|
|
3427
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMobile, children: o(i, 40) }),
|
|
3428
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMiniMobile, children: o(i, 20) })
|
|
3158
3429
|
]
|
|
3159
3430
|
}
|
|
3160
3431
|
),
|
|
3161
3432
|
/* @__PURE__ */ t.jsx(
|
|
3162
|
-
|
|
3433
|
+
ot,
|
|
3163
3434
|
{
|
|
3164
3435
|
type: "Secondary",
|
|
3165
3436
|
onClick: c,
|
|
@@ -3170,27 +3441,27 @@ const Ca = (d) => {
|
|
|
3170
3441
|
]
|
|
3171
3442
|
}
|
|
3172
3443
|
);
|
|
3173
|
-
},
|
|
3174
|
-
accordion:
|
|
3175
|
-
header:
|
|
3176
|
-
icon:
|
|
3177
|
-
open:
|
|
3178
|
-
content:
|
|
3179
|
-
},
|
|
3180
|
-
const [s,
|
|
3181
|
-
|
|
3444
|
+
}, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Da = "_content_1s1lq_25", gt = {
|
|
3445
|
+
accordion: Oa,
|
|
3446
|
+
header: Ma,
|
|
3447
|
+
icon: qa,
|
|
3448
|
+
open: Ea,
|
|
3449
|
+
content: Da
|
|
3450
|
+
}, oc = ({ title: u, content: a, defaultOpen: e = !1 }) => {
|
|
3451
|
+
const [s, i] = f.useState(e), [c, l] = f.useState(0), o = f.useRef(null), n = () => {
|
|
3452
|
+
i(!s);
|
|
3182
3453
|
};
|
|
3183
|
-
return
|
|
3184
|
-
o.current &&
|
|
3185
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
3454
|
+
return f.useEffect(() => {
|
|
3455
|
+
o.current && l(s ? o.current.scrollHeight : 0);
|
|
3456
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: gt.accordion, children: [
|
|
3186
3457
|
/* @__PURE__ */ t.jsxs(
|
|
3187
3458
|
"div",
|
|
3188
3459
|
{
|
|
3189
|
-
className:
|
|
3190
|
-
onClick:
|
|
3460
|
+
className: gt.header,
|
|
3461
|
+
onClick: n,
|
|
3191
3462
|
children: [
|
|
3192
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
3193
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3463
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
3464
|
+
/* @__PURE__ */ t.jsx("div", { className: Y(gt.icon, { [gt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3194
3465
|
]
|
|
3195
3466
|
}
|
|
3196
3467
|
),
|
|
@@ -3198,15 +3469,15 @@ const Ca = (d) => {
|
|
|
3198
3469
|
"div",
|
|
3199
3470
|
{
|
|
3200
3471
|
ref: o,
|
|
3201
|
-
className:
|
|
3472
|
+
className: gt.content,
|
|
3202
3473
|
style: { height: `${c}px` },
|
|
3203
3474
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3204
3475
|
}
|
|
3205
3476
|
)
|
|
3206
3477
|
] });
|
|
3207
|
-
},
|
|
3208
|
-
const c =
|
|
3209
|
-
|
|
3478
|
+
}, ac = ({ children: u, path: a, className: e, target: s = "_self", id: i }) => {
|
|
3479
|
+
const c = Bt(), l = /^https?:\/\//.test(a), o = (n) => {
|
|
3480
|
+
l || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (n.preventDefault(), c(a, { replace: !0 }));
|
|
3210
3481
|
};
|
|
3211
3482
|
return /* @__PURE__ */ t.jsx(
|
|
3212
3483
|
"div",
|
|
@@ -3215,16 +3486,16 @@ const Ca = (d) => {
|
|
|
3215
3486
|
className: e,
|
|
3216
3487
|
role: "link",
|
|
3217
3488
|
style: { cursor: "pointer" },
|
|
3218
|
-
id:
|
|
3219
|
-
children:
|
|
3489
|
+
id: i,
|
|
3490
|
+
children: u
|
|
3220
3491
|
}
|
|
3221
3492
|
);
|
|
3222
|
-
},
|
|
3223
|
-
buttonsBlock:
|
|
3224
|
-
slideUp:
|
|
3225
|
-
},
|
|
3493
|
+
}, Ua = "_buttonsBlock_1b2rb_1", Ha = "_slideUp_1b2rb_1", Ra = {
|
|
3494
|
+
buttonsBlock: Ua,
|
|
3495
|
+
slideUp: Ha
|
|
3496
|
+
}, cc = () => /* @__PURE__ */ t.jsxs("div", { className: Ra.buttonsBlock, children: [
|
|
3226
3497
|
/* @__PURE__ */ t.jsx(
|
|
3227
|
-
|
|
3498
|
+
Q,
|
|
3228
3499
|
{
|
|
3229
3500
|
type: "Primary",
|
|
3230
3501
|
style: {
|
|
@@ -3236,19 +3507,19 @@ const Ca = (d) => {
|
|
|
3236
3507
|
children: "Add to Cart"
|
|
3237
3508
|
}
|
|
3238
3509
|
),
|
|
3239
|
-
/* @__PURE__ */ t.jsx(
|
|
3240
|
-
] }),
|
|
3241
|
-
wrapper:
|
|
3242
|
-
label:
|
|
3243
|
-
textarea:
|
|
3244
|
-
length:
|
|
3245
|
-
},
|
|
3246
|
-
const { onChange: a, label: e, value: s, maxLength:
|
|
3247
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3510
|
+
/* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Buy" })
|
|
3511
|
+
] }), La = "_wrapper_st58d_1", za = "_label_st58d_10", Fa = "_textarea_st58d_18", Va = "_length_st58d_33", jt = {
|
|
3512
|
+
wrapper: La,
|
|
3513
|
+
label: za,
|
|
3514
|
+
textarea: Fa,
|
|
3515
|
+
length: Va
|
|
3516
|
+
}, lc = (u) => {
|
|
3517
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = f.useState(s.length);
|
|
3518
|
+
return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
|
|
3248
3519
|
e && /* @__PURE__ */ t.jsx(
|
|
3249
3520
|
"label",
|
|
3250
3521
|
{
|
|
3251
|
-
className:
|
|
3522
|
+
className: jt.label,
|
|
3252
3523
|
htmlFor: e,
|
|
3253
3524
|
children: e
|
|
3254
3525
|
}
|
|
@@ -3258,55 +3529,56 @@ const Ca = (d) => {
|
|
|
3258
3529
|
{
|
|
3259
3530
|
id: e,
|
|
3260
3531
|
defaultValue: s,
|
|
3261
|
-
onChange: (
|
|
3262
|
-
o(
|
|
3532
|
+
onChange: (n) => {
|
|
3533
|
+
o(n.target.value.length), a(n.target.value);
|
|
3263
3534
|
},
|
|
3264
3535
|
placeholder: c,
|
|
3265
|
-
className:
|
|
3266
|
-
maxLength:
|
|
3536
|
+
className: jt.textarea,
|
|
3537
|
+
maxLength: i
|
|
3267
3538
|
}
|
|
3268
3539
|
),
|
|
3269
|
-
|
|
3270
|
-
|
|
3540
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: jt.length, children: [
|
|
3541
|
+
l,
|
|
3271
3542
|
"/",
|
|
3272
|
-
|
|
3543
|
+
i
|
|
3273
3544
|
] })
|
|
3274
3545
|
] });
|
|
3275
3546
|
};
|
|
3276
3547
|
export {
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3548
|
+
oc as Accordion,
|
|
3549
|
+
ja as BurgerMenuButton,
|
|
3550
|
+
Q as Button,
|
|
3551
|
+
ai as ButtonTypeSettings,
|
|
3552
|
+
Za as ButtonsSettings,
|
|
3553
|
+
Ja as CategorySettings,
|
|
3554
|
+
bt as ChooseImage,
|
|
3555
|
+
uc as ChooseImageModal,
|
|
3556
|
+
ba as EmptyCart,
|
|
3557
|
+
Ka as FormSettings,
|
|
3558
|
+
sc as HeaderButtons,
|
|
3288
3559
|
b as Icon,
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3560
|
+
tt as InputSettings,
|
|
3561
|
+
$o as InputUI,
|
|
3562
|
+
Ge as ItemsSettings,
|
|
3563
|
+
Wa as LayoutSettings,
|
|
3564
|
+
ac as Link,
|
|
3565
|
+
tc as ListingSelector,
|
|
3566
|
+
_c as Loader,
|
|
3296
3567
|
Mt as Modal,
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3568
|
+
nc as PagesMobileMenu,
|
|
3569
|
+
va as PagesMobileModal,
|
|
3570
|
+
Qa as PagesSettings,
|
|
3571
|
+
cc as ProductCardButtons,
|
|
3572
|
+
ec as ProductOptions,
|
|
3573
|
+
qt as RangeSelector,
|
|
3574
|
+
et as Select,
|
|
3575
|
+
ic as ShareLink,
|
|
3576
|
+
ga as ShoppingButton,
|
|
3577
|
+
xa as ShoppingModalCart,
|
|
3578
|
+
st as Switch,
|
|
3307
3579
|
Lt as TextSettings,
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3580
|
+
Et as TextareaSettings,
|
|
3581
|
+
lc as TextareaUI,
|
|
3582
|
+
Rt as TypesText,
|
|
3583
|
+
Ft as UserInfo
|
|
3312
3584
|
};
|