@billgangcom/theme-lib 1.44.4 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/store/useLayersStore.d.ts +1 -1
- package/dist/builder/ui/Submodal/index.d.ts +1 -0
- package/dist/builder.cjs.js +5 -5
- package/dist/builder.es.js +1575 -1593
- package/dist/{index-B7M_zl3r.cjs → index-BAwpl1N-.cjs} +32 -32
- package/dist/{index-_swnDkZg.js → index-COq92Nlh.js} +5266 -5249
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +518 -521
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
2
|
-
import { q as uc, L 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 wt, B as ot, f as _t, P as Nt, g as Ct, h as St, i as Vt, s as Yt, k as Ut, l as Bt, m as Ot, M as Mt, n as Dt, o as Lt, p as Gt } from "./index-COq92Nlh.js";
|
|
2
|
+
import { q as uc, L as mc } from "./index-COq92Nlh.js";
|
|
3
|
+
import g from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
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
6
|
wrapper: Xt,
|
|
@@ -27,8 +27,8 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
27
27
|
"bottomRight"
|
|
28
28
|
], ce = ["left", "top", "right", "bottom"], Wa = (d) => {
|
|
29
29
|
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = d;
|
|
30
|
-
function c(
|
|
31
|
-
switch (
|
|
30
|
+
function c(f) {
|
|
31
|
+
switch (f) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function l(
|
|
49
|
-
switch (
|
|
48
|
+
function l(f) {
|
|
49
|
+
switch (f) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,28 +57,28 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [o, n] =
|
|
60
|
+
const [o, n] = g.useState(null), [m, v] = g.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((f) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(f);
|
|
71
71
|
},
|
|
72
72
|
className: K.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
n(
|
|
74
|
+
n(f);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
f !== a && o !== f && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
|
|
81
|
+
f !== a && o === f && /* @__PURE__ */ t.jsx(
|
|
82
82
|
b,
|
|
83
83
|
{
|
|
84
84
|
name: c(o),
|
|
@@ -87,7 +87,7 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
f === a && /* @__PURE__ */ t.jsx(
|
|
91
91
|
b,
|
|
92
92
|
{
|
|
93
93
|
name: c(a),
|
|
@@ -98,16 +98,16 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
f
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((f) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
106
|
className: Y(K.padding, {
|
|
107
|
-
[K.active]:
|
|
107
|
+
[K.active]: m === f
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
v(
|
|
110
|
+
v(f);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
113
|
v(null);
|
|
@@ -116,7 +116,7 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
117
|
b,
|
|
118
118
|
{
|
|
119
|
-
name: l(
|
|
119
|
+
name: l(f),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
@@ -125,10 +125,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
125
125
|
tt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
128
|
+
value: String(e[f]),
|
|
129
129
|
onChange: (r) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[f]: Number(r)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,23 +136,23 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
f
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
}, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13",
|
|
144
|
+
}, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", me = "_top_1jkiw_20", _e = "_itemsBlock_1jkiw_29", pt = {
|
|
145
145
|
title: le,
|
|
146
146
|
subtitle: re,
|
|
147
147
|
header: de,
|
|
148
148
|
text: ue,
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
149
|
+
top: me,
|
|
150
|
+
itemsBlock: _e
|
|
151
|
+
}, he = "_typeTexts_167ez_1", pe = "_block_167ez_8", ge = "_active_167ez_25", Pt = {
|
|
152
|
+
typeTexts: he,
|
|
153
|
+
block: pe,
|
|
154
|
+
active: ge
|
|
155
|
+
}, fe = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
|
|
156
156
|
const { typesText: a, setTypesText: e } = d;
|
|
157
157
|
function s(i) {
|
|
158
158
|
switch (i) {
|
|
@@ -168,7 +168,7 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: fe.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
174
|
className: Y(Pt.block, {
|
|
@@ -194,7 +194,7 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
194
194
|
},
|
|
195
195
|
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, gt = {
|
|
198
198
|
h1: "Heading 1",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -212,26 +212,26 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
212
212
|
setTypesText: l,
|
|
213
213
|
title: o,
|
|
214
214
|
subtitle: n = "Items",
|
|
215
|
-
typeFont:
|
|
215
|
+
typeFont: m,
|
|
216
216
|
setTypeFont: v
|
|
217
217
|
} = d;
|
|
218
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
219
|
-
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
220
|
-
o && /* @__PURE__ */ t.jsx("h3", { className:
|
|
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: (f) => s(f)
|
|
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: (
|
|
234
|
+
onChange: (f) => c(f),
|
|
235
235
|
value: i,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
@@ -247,20 +247,20 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
247
247
|
et,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(gt).filter(
|
|
251
|
+
(f) => f !== gt[m]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(r) =>
|
|
253
|
+
onChange: (f) => v(
|
|
254
|
+
Object.keys(gt).find(
|
|
255
|
+
(r) => gt[r] === f
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
258
|
+
value: gt[m]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
}, xe = "
|
|
263
|
+
}, xe = "_title_120bw_1", be = "_subtitle_120bw_5", ve = "_header_120bw_12", je = "_text_120bw_13", ye = "_productsBlock_120bw_14", ke = "_top_120bw_26", $e = "_itemsBlock_120bw_35", Ie = "_typeTexts_120bw_41", we = "_block_120bw_48", Ne = "_active_120bw_61", Ce = "_products_120bw_14", Se = "_product_120bw_14", Be = "_button_120bw_80", Te = "_disabled_120bw_91", Pe = "_image_120bw_95", Ae = "_info_120bw_102", Oe = "_name_120bw_114", Me = "_buttons_120bw_118", qe = "_modal_120bw_125", Ee = "_link_120bw_146", Ue = "_modalOptions_120bw_152", De = "_addButton_120bw_165", Le = "_deleteButton_120bw_180", He = "_closeIcon_120bw_192", z = {
|
|
264
264
|
title: xe,
|
|
265
265
|
subtitle: be,
|
|
266
266
|
header: ve,
|
|
@@ -269,8 +269,8 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
269
269
|
top: ke,
|
|
270
270
|
itemsBlock: $e,
|
|
271
271
|
typeTexts: Ie,
|
|
272
|
-
block:
|
|
273
|
-
active:
|
|
272
|
+
block: we,
|
|
273
|
+
active: Ne,
|
|
274
274
|
products: Ce,
|
|
275
275
|
product: Se,
|
|
276
276
|
button: Be,
|
|
@@ -285,11 +285,11 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
285
285
|
addButton: De,
|
|
286
286
|
deleteButton: Le,
|
|
287
287
|
closeIcon: He
|
|
288
|
-
}, Re =
|
|
288
|
+
}, Re = g.forwardRef(
|
|
289
289
|
(d, a) => {
|
|
290
290
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
|
|
291
|
-
function o(n,
|
|
292
|
-
return n.length >
|
|
291
|
+
function o(n, m) {
|
|
292
|
+
return n.length > m ? `${n.slice(0, m)}...` : n;
|
|
293
293
|
}
|
|
294
294
|
return /* @__PURE__ */ t.jsxs(
|
|
295
295
|
"div",
|
|
@@ -325,10 +325,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
325
325
|
{
|
|
326
326
|
label: "Put up an attractive image",
|
|
327
327
|
activeImage: e[n.field],
|
|
328
|
-
onChange: (
|
|
328
|
+
onChange: (m) => {
|
|
329
329
|
const v = {
|
|
330
330
|
...e,
|
|
331
|
-
[n.field]:
|
|
331
|
+
[n.field]: m
|
|
332
332
|
};
|
|
333
333
|
s(v);
|
|
334
334
|
}
|
|
@@ -340,28 +340,28 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
340
340
|
Rt,
|
|
341
341
|
{
|
|
342
342
|
typesText: e[n.field.type],
|
|
343
|
-
setTypesText: (
|
|
343
|
+
setTypesText: (m) => {
|
|
344
344
|
const v = {
|
|
345
345
|
...e,
|
|
346
|
-
[n.field.type]:
|
|
346
|
+
[n.field.type]: m
|
|
347
347
|
};
|
|
348
348
|
s(v);
|
|
349
349
|
},
|
|
350
350
|
text: e[n.field.text]["en-US"] || "",
|
|
351
|
-
setText: (
|
|
351
|
+
setText: (m) => {
|
|
352
352
|
const v = {
|
|
353
353
|
...e,
|
|
354
354
|
[n.field.text]: {
|
|
355
|
-
"en-US":
|
|
355
|
+
"en-US": m
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
s(v);
|
|
359
359
|
},
|
|
360
360
|
typeFont: e[n.field.typeFont],
|
|
361
|
-
setTypeFont: (
|
|
361
|
+
setTypeFont: (m) => {
|
|
362
362
|
const v = {
|
|
363
363
|
...e,
|
|
364
|
-
[n.field.typeFont]:
|
|
364
|
+
[n.field.typeFont]: m
|
|
365
365
|
};
|
|
366
366
|
s(v);
|
|
367
367
|
},
|
|
@@ -372,10 +372,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
372
372
|
return /* @__PURE__ */ t.jsx(
|
|
373
373
|
tt,
|
|
374
374
|
{
|
|
375
|
-
onChange: (
|
|
375
|
+
onChange: (m) => {
|
|
376
376
|
const v = {
|
|
377
377
|
...e,
|
|
378
|
-
[n.field]:
|
|
378
|
+
[n.field]: m
|
|
379
379
|
};
|
|
380
380
|
s(v);
|
|
381
381
|
},
|
|
@@ -389,10 +389,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
389
389
|
/* @__PURE__ */ t.jsx(
|
|
390
390
|
tt,
|
|
391
391
|
{
|
|
392
|
-
onChange: (
|
|
392
|
+
onChange: (m) => {
|
|
393
393
|
const v = {
|
|
394
394
|
...e,
|
|
395
|
-
[n.field.text]:
|
|
395
|
+
[n.field.text]: m
|
|
396
396
|
};
|
|
397
397
|
s(v);
|
|
398
398
|
},
|
|
@@ -406,10 +406,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
406
406
|
{
|
|
407
407
|
current: !!e[n.field.switch] || !1,
|
|
408
408
|
label: n.switchLabel,
|
|
409
|
-
onChange: (
|
|
409
|
+
onChange: (m) => {
|
|
410
410
|
const v = {
|
|
411
411
|
...e,
|
|
412
|
-
[n.field.switch]:
|
|
412
|
+
[n.field.switch]: m
|
|
413
413
|
};
|
|
414
414
|
s(v);
|
|
415
415
|
}
|
|
@@ -421,10 +421,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
421
421
|
Ge,
|
|
422
422
|
{
|
|
423
423
|
items: e[n.field] || [],
|
|
424
|
-
setItems: (
|
|
424
|
+
setItems: (m) => {
|
|
425
425
|
const v = {
|
|
426
426
|
...e,
|
|
427
|
-
[n.field]:
|
|
427
|
+
[n.field]: m
|
|
428
428
|
};
|
|
429
429
|
s(v);
|
|
430
430
|
},
|
|
@@ -443,10 +443,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
443
443
|
et,
|
|
444
444
|
{
|
|
445
445
|
options: n.itemsOptions,
|
|
446
|
-
onChange: (
|
|
446
|
+
onChange: (m) => {
|
|
447
447
|
const v = {
|
|
448
448
|
...e,
|
|
449
|
-
[n.field]:
|
|
449
|
+
[n.field]: m
|
|
450
450
|
};
|
|
451
451
|
s(v);
|
|
452
452
|
},
|
|
@@ -455,11 +455,11 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
|
|
|
455
455
|
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
|
|
456
456
|
switcher: n.switcher ? {
|
|
457
457
|
value: !!e[n.switcher],
|
|
458
|
-
onChange: (
|
|
458
|
+
onChange: (m) => {
|
|
459
459
|
if (n.switcher === "isActive") {
|
|
460
460
|
const v = {
|
|
461
461
|
...e,
|
|
462
|
-
[n.switcher]:
|
|
462
|
+
[n.switcher]: m
|
|
463
463
|
};
|
|
464
464
|
s(v);
|
|
465
465
|
}
|
|
@@ -529,65 +529,65 @@ const Ge = (d) => {
|
|
|
529
529
|
title: l,
|
|
530
530
|
subtitle: o,
|
|
531
531
|
editable: n = !0,
|
|
532
|
-
draggable:
|
|
532
|
+
draggable: m = !1,
|
|
533
533
|
withImage: v = !1,
|
|
534
|
-
deletable:
|
|
534
|
+
deletable: f = !0,
|
|
535
535
|
addable: r = !0,
|
|
536
536
|
itemsType: k,
|
|
537
|
-
itemsPlaceholder:
|
|
538
|
-
itemsOptions:
|
|
537
|
+
itemsPlaceholder: h = "",
|
|
538
|
+
itemsOptions: _,
|
|
539
539
|
hasRangeSelector: $ = !1,
|
|
540
540
|
rangeSelectorOptions: H,
|
|
541
|
-
modalOptions:
|
|
541
|
+
modalOptions: M,
|
|
542
542
|
addableOptions: u = {},
|
|
543
543
|
limit: S,
|
|
544
|
-
autoInterval:
|
|
545
|
-
} = d, [F, B] =
|
|
544
|
+
autoInterval: q
|
|
545
|
+
} = d, [F, B] = g.useState(null), [j, P] = g.useState({
|
|
546
546
|
top: 0,
|
|
547
547
|
left: 0
|
|
548
|
-
}), [x, I] =
|
|
549
|
-
kt(
|
|
548
|
+
}), [x, I] = g.useState(null), N = g.useRef(null), [L, A] = g.useState(!1), D = yt(
|
|
549
|
+
kt(Nt, {
|
|
550
550
|
activationConstraint: {
|
|
551
551
|
distance: 5
|
|
552
552
|
}
|
|
553
553
|
})
|
|
554
554
|
);
|
|
555
|
-
|
|
556
|
-
const
|
|
555
|
+
g.useEffect(() => {
|
|
556
|
+
const p = () => {
|
|
557
557
|
B(null), A(!1);
|
|
558
558
|
};
|
|
559
|
-
return document.body.addEventListener("click",
|
|
560
|
-
B(null), A(!1), document.body.removeEventListener("click",
|
|
559
|
+
return document.body.addEventListener("click", p), B(null), A(!1), () => {
|
|
560
|
+
B(null), A(!1), document.body.removeEventListener("click", p);
|
|
561
561
|
};
|
|
562
|
-
}, []),
|
|
562
|
+
}, []), g.useEffect(() => {
|
|
563
563
|
if (F) {
|
|
564
|
-
const
|
|
565
|
-
i(
|
|
564
|
+
const p = [...s].map((w) => w.id === F.id ? F : w);
|
|
565
|
+
i(p);
|
|
566
566
|
}
|
|
567
|
-
}, [F]),
|
|
568
|
-
if (
|
|
569
|
-
const
|
|
567
|
+
}, [F]), g.useEffect(() => {
|
|
568
|
+
if (N.current && x) {
|
|
569
|
+
const p = N.current.getBoundingClientRect().height, w = window.innerHeight;
|
|
570
570
|
let O = x.top;
|
|
571
|
-
O +
|
|
571
|
+
O + p > w + window.scrollY - 200 && (O = w + window.scrollY - p - 200), O < 0 && (O = 10), P({
|
|
572
572
|
top: O,
|
|
573
573
|
left: x.left
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
|
-
}, [
|
|
577
|
-
const nt = (
|
|
578
|
-
|
|
579
|
-
const O =
|
|
576
|
+
}, [N.current, x]);
|
|
577
|
+
const nt = (p, w) => {
|
|
578
|
+
p.stopPropagation();
|
|
579
|
+
const O = p.target.getBoundingClientRect();
|
|
580
580
|
I({
|
|
581
581
|
top: O.top + window.scrollY - 70,
|
|
582
582
|
left: O.left - (r ? 30 : 65)
|
|
583
|
-
}), B(
|
|
583
|
+
}), B(w), A(!0);
|
|
584
584
|
};
|
|
585
|
-
function dt(
|
|
585
|
+
function dt(p) {
|
|
586
586
|
if (v)
|
|
587
|
-
return
|
|
587
|
+
return p ? /* @__PURE__ */ t.jsx(
|
|
588
588
|
"img",
|
|
589
589
|
{
|
|
590
|
-
src: `https://imagedelivery.net/${
|
|
590
|
+
src: `https://imagedelivery.net/${p[0]}/w=1000`,
|
|
591
591
|
alt: "image",
|
|
592
592
|
width: 16,
|
|
593
593
|
height: 16
|
|
@@ -602,19 +602,19 @@ const Ge = (d) => {
|
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
604
|
}
|
|
605
|
-
const y = (
|
|
606
|
-
const { active:
|
|
607
|
-
if (O &&
|
|
608
|
-
const R = s.findIndex((
|
|
605
|
+
const y = (p) => {
|
|
606
|
+
const { active: w, over: O } = p;
|
|
607
|
+
if (O && w.id !== O.id) {
|
|
608
|
+
const R = s.findIndex((E) => E.id === w.id), X = s.findIndex((E) => E.id === O.id);
|
|
609
609
|
if (R !== -1 && X !== -1) {
|
|
610
|
-
const
|
|
611
|
-
|
|
610
|
+
const E = [...s], [ut] = E.splice(R, 1);
|
|
611
|
+
E.splice(X, 0, ut), i(E);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
}, U = (
|
|
614
|
+
}, U = (p, w) => {
|
|
615
615
|
var R, X;
|
|
616
616
|
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
617
|
-
|
|
617
|
+
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
618
618
|
b,
|
|
619
619
|
{
|
|
620
620
|
name: "DotsSixVertical",
|
|
@@ -623,57 +623,57 @@ const Ge = (d) => {
|
|
|
623
623
|
height: 20
|
|
624
624
|
}
|
|
625
625
|
) }),
|
|
626
|
-
k === "select" &&
|
|
626
|
+
k === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
627
627
|
et,
|
|
628
628
|
{
|
|
629
|
-
onChange: (
|
|
630
|
-
const ut = [...s],
|
|
631
|
-
if (!
|
|
632
|
-
const
|
|
633
|
-
...
|
|
629
|
+
onChange: (E) => {
|
|
630
|
+
const ut = [...s], ht = _.find((vt) => vt.name["en-US"] === E);
|
|
631
|
+
if (!ht) return;
|
|
632
|
+
const mt = ut.map((vt) => vt.id === p.id ? {
|
|
633
|
+
...ht,
|
|
634
634
|
name: {
|
|
635
|
-
"en-US":
|
|
635
|
+
"en-US": E
|
|
636
636
|
}
|
|
637
637
|
} : vt);
|
|
638
638
|
B({
|
|
639
|
-
...
|
|
639
|
+
...p,
|
|
640
640
|
name: {
|
|
641
|
-
"en-US":
|
|
641
|
+
"en-US": E
|
|
642
642
|
}
|
|
643
|
-
}), i([...
|
|
643
|
+
}), i([...mt]);
|
|
644
644
|
},
|
|
645
|
-
value:
|
|
646
|
-
options:
|
|
647
|
-
leftAddon: dt(
|
|
645
|
+
value: p.name["en-US"],
|
|
646
|
+
options: _.filter((E) => !s.find((ut) => ut.name["en-US"] === E.name["en-US"])).map((E) => E.name["en-US"]),
|
|
647
|
+
leftAddon: dt(p.images)
|
|
648
648
|
}
|
|
649
649
|
),
|
|
650
650
|
k === "input" && /* @__PURE__ */ t.jsx(
|
|
651
651
|
tt,
|
|
652
652
|
{
|
|
653
|
-
onChange: (
|
|
654
|
-
const
|
|
655
|
-
...
|
|
653
|
+
onChange: (E) => {
|
|
654
|
+
const ht = [...s].map((mt) => mt.id === p.id ? {
|
|
655
|
+
...p,
|
|
656
656
|
name: {
|
|
657
|
-
"en-US":
|
|
657
|
+
"en-US": E
|
|
658
658
|
}
|
|
659
|
-
} :
|
|
660
|
-
i([...
|
|
659
|
+
} : mt);
|
|
660
|
+
i([...ht]);
|
|
661
661
|
},
|
|
662
|
-
value:
|
|
663
|
-
placeholder:
|
|
662
|
+
value: p.name["en-US"],
|
|
663
|
+
placeholder: h
|
|
664
664
|
}
|
|
665
665
|
),
|
|
666
666
|
k === "image" && /* @__PURE__ */ t.jsx(
|
|
667
667
|
bt,
|
|
668
668
|
{
|
|
669
|
-
onChange: (
|
|
670
|
-
const
|
|
671
|
-
...
|
|
672
|
-
images:
|
|
673
|
-
} :
|
|
674
|
-
i([...
|
|
669
|
+
onChange: (E) => {
|
|
670
|
+
const ht = [...s].map((mt) => mt.id === p.id ? {
|
|
671
|
+
...p,
|
|
672
|
+
images: E
|
|
673
|
+
} : mt);
|
|
674
|
+
i([...ht]);
|
|
675
675
|
},
|
|
676
|
-
activeImage: (R = s.find((
|
|
676
|
+
activeImage: (R = s.find((E) => E.id === p.id)) != null && R.images ? (X = s.find((E) => E.id === p.id)) == null ? void 0 : X.images[0] : void 0
|
|
677
677
|
}
|
|
678
678
|
),
|
|
679
679
|
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
@@ -684,12 +684,12 @@ const Ge = (d) => {
|
|
|
684
684
|
hoverable: !0,
|
|
685
685
|
width: 20,
|
|
686
686
|
height: 20,
|
|
687
|
-
onClick: (
|
|
688
|
-
|
|
687
|
+
onClick: (E) => {
|
|
688
|
+
nt(E, p);
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
) }),
|
|
692
|
-
|
|
692
|
+
f && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
693
693
|
b,
|
|
694
694
|
{
|
|
695
695
|
name: "Trash",
|
|
@@ -697,26 +697,26 @@ const Ge = (d) => {
|
|
|
697
697
|
width: 20,
|
|
698
698
|
height: 20,
|
|
699
699
|
fill: "#C12A2A",
|
|
700
|
-
onClick: () => i(s.filter((
|
|
700
|
+
onClick: () => i(s.filter((E) => E.id !== p.id))
|
|
701
701
|
}
|
|
702
702
|
) })
|
|
703
703
|
] })
|
|
704
704
|
] });
|
|
705
|
-
return
|
|
705
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
706
706
|
Ye,
|
|
707
707
|
{
|
|
708
|
-
product:
|
|
709
|
-
index:
|
|
708
|
+
product: p,
|
|
709
|
+
index: w,
|
|
710
710
|
children: O
|
|
711
711
|
},
|
|
712
|
-
|
|
712
|
+
p.id
|
|
713
713
|
) : /* @__PURE__ */ t.jsx(
|
|
714
714
|
"div",
|
|
715
715
|
{
|
|
716
716
|
className: z.product,
|
|
717
717
|
children: O
|
|
718
718
|
},
|
|
719
|
-
|
|
719
|
+
p.id
|
|
720
720
|
);
|
|
721
721
|
};
|
|
722
722
|
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
@@ -726,25 +726,25 @@ const Ge = (d) => {
|
|
|
726
726
|
st,
|
|
727
727
|
{
|
|
728
728
|
current: a,
|
|
729
|
-
onChange: (
|
|
729
|
+
onChange: (p) => e == null ? void 0 : e(p)
|
|
730
730
|
}
|
|
731
731
|
)
|
|
732
732
|
] }),
|
|
733
|
-
F && n &&
|
|
733
|
+
F && n && M && L && /* @__PURE__ */ t.jsx(
|
|
734
734
|
Re,
|
|
735
735
|
{
|
|
736
|
-
ref:
|
|
736
|
+
ref: N,
|
|
737
737
|
activeItem: F,
|
|
738
738
|
setActiveItem: B,
|
|
739
739
|
popupPosition: j,
|
|
740
|
-
modalOptions:
|
|
740
|
+
modalOptions: M,
|
|
741
741
|
setIsOpenModal: A
|
|
742
742
|
}
|
|
743
743
|
),
|
|
744
744
|
$ && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
745
745
|
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
746
746
|
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
747
|
-
|
|
747
|
+
m ? /* @__PURE__ */ t.jsx(
|
|
748
748
|
$t,
|
|
749
749
|
{
|
|
750
750
|
sensors: D,
|
|
@@ -752,13 +752,13 @@ const Ge = (d) => {
|
|
|
752
752
|
children: /* @__PURE__ */ t.jsx(
|
|
753
753
|
It,
|
|
754
754
|
{
|
|
755
|
-
items: s.map((
|
|
756
|
-
strategy:
|
|
757
|
-
children: s.map((
|
|
755
|
+
items: s.map((p) => p.id),
|
|
756
|
+
strategy: wt,
|
|
757
|
+
children: s.map((p, w) => U(p, w))
|
|
758
758
|
}
|
|
759
759
|
)
|
|
760
760
|
}
|
|
761
|
-
) : s.map((
|
|
761
|
+
) : s.map((p, w) => U(p, w)),
|
|
762
762
|
r && /* @__PURE__ */ t.jsx(
|
|
763
763
|
"div",
|
|
764
764
|
{
|
|
@@ -772,37 +772,37 @@ const Ge = (d) => {
|
|
|
772
772
|
{
|
|
773
773
|
withoutHover: !0,
|
|
774
774
|
className: Y(z.button, {
|
|
775
|
-
[z.disabled]: !!(S && S <= s.length || s.length === (
|
|
775
|
+
[z.disabled]: !!(S && S <= s.length || s.length === (_ == null ? void 0 : _.length))
|
|
776
776
|
}),
|
|
777
777
|
size: "s",
|
|
778
|
-
disabled: !!(S && S <= s.length || s.length === (
|
|
778
|
+
disabled: !!(S && S <= s.length || s.length === (_ == null ? void 0 : _.length)),
|
|
779
779
|
onClick: () => {
|
|
780
|
-
const
|
|
781
|
-
let
|
|
782
|
-
if (
|
|
783
|
-
for (let O = 0; O <
|
|
784
|
-
if (!s.find((R) => R.id ===
|
|
785
|
-
|
|
780
|
+
const p = [...s];
|
|
781
|
+
let w = null;
|
|
782
|
+
if (_) {
|
|
783
|
+
for (let O = 0; O < _.length; O++)
|
|
784
|
+
if (!s.find((R) => R.id === _[O].id)) {
|
|
785
|
+
w = _[O];
|
|
786
786
|
break;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
k === "select" &&
|
|
790
|
-
name:
|
|
791
|
-
id: (
|
|
789
|
+
k === "select" && _ ? p.push({
|
|
790
|
+
name: w ? w.name : _[0].name,
|
|
791
|
+
id: (w == null ? void 0 : w.id) || _[0].id,
|
|
792
792
|
...u
|
|
793
|
-
}) : k === "input" ?
|
|
793
|
+
}) : k === "input" ? p.push({
|
|
794
794
|
name: {
|
|
795
795
|
"en-US": ""
|
|
796
796
|
},
|
|
797
|
-
id:
|
|
797
|
+
id: _t(),
|
|
798
798
|
...u
|
|
799
|
-
}) :
|
|
799
|
+
}) : p.push({
|
|
800
800
|
name: {
|
|
801
801
|
"en-US": `Image ${s.length + 1}`
|
|
802
802
|
},
|
|
803
|
-
id:
|
|
803
|
+
id: _t(),
|
|
804
804
|
...u
|
|
805
|
-
}), i(
|
|
805
|
+
}), i(p);
|
|
806
806
|
},
|
|
807
807
|
style: {
|
|
808
808
|
width: "fit-content"
|
|
@@ -824,13 +824,13 @@ const Ge = (d) => {
|
|
|
824
824
|
)
|
|
825
825
|
] }),
|
|
826
826
|
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
827
|
-
|
|
827
|
+
q !== void 0 && /* @__PURE__ */ t.jsx(
|
|
828
828
|
tt,
|
|
829
829
|
{
|
|
830
|
-
label:
|
|
830
|
+
label: q.title || "Auto scroll interval",
|
|
831
831
|
type: "number",
|
|
832
|
-
value: String(
|
|
833
|
-
onChange: (
|
|
832
|
+
value: String(q.autoInterval),
|
|
833
|
+
onChange: (p) => q.setAutoInterval(Number(p)),
|
|
834
834
|
min: 0.1,
|
|
835
835
|
max: 100,
|
|
836
836
|
style: {
|
|
@@ -840,7 +840,7 @@ const Ge = (d) => {
|
|
|
840
840
|
}
|
|
841
841
|
)
|
|
842
842
|
] });
|
|
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",
|
|
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", ms = "_modal_82zux_125", _s = "_link_82zux_145", hs = "_modalOptions_82zux_151", ps = "_addButton_82zux_157", gs = "_deleteButton_82zux_179", Z = {
|
|
844
844
|
title: Xe,
|
|
845
845
|
subtitle: We,
|
|
846
846
|
header: Je,
|
|
@@ -859,11 +859,11 @@ const Ge = (d) => {
|
|
|
859
859
|
info: rs,
|
|
860
860
|
name: ds,
|
|
861
861
|
buttons: us,
|
|
862
|
-
modal:
|
|
863
|
-
link:
|
|
864
|
-
modalOptions:
|
|
865
|
-
addButton:
|
|
866
|
-
deleteButton:
|
|
862
|
+
modal: ms,
|
|
863
|
+
link: _s,
|
|
864
|
+
modalOptions: hs,
|
|
865
|
+
addButton: ps,
|
|
866
|
+
deleteButton: gs
|
|
867
867
|
}, Ja = (d) => {
|
|
868
868
|
const {
|
|
869
869
|
isActiveItems: a,
|
|
@@ -874,17 +874,17 @@ const Ge = (d) => {
|
|
|
874
874
|
title: l,
|
|
875
875
|
subtitle: o,
|
|
876
876
|
draggable: n = !1,
|
|
877
|
-
withImage:
|
|
877
|
+
withImage: m = !1,
|
|
878
878
|
addable: v = !0,
|
|
879
|
-
itemsOptions:
|
|
879
|
+
itemsOptions: f,
|
|
880
880
|
hasRangeSelector: r = !1,
|
|
881
881
|
rangeSelectorOptions: k,
|
|
882
|
-
limit:
|
|
883
|
-
autoScrollInterval:
|
|
882
|
+
limit: h,
|
|
883
|
+
autoScrollInterval: _,
|
|
884
884
|
deletable: $
|
|
885
885
|
} = d;
|
|
886
886
|
function H(u) {
|
|
887
|
-
if (
|
|
887
|
+
if (m)
|
|
888
888
|
return u ? /* @__PURE__ */ t.jsx(
|
|
889
889
|
"img",
|
|
890
890
|
{
|
|
@@ -903,9 +903,9 @@ const Ge = (d) => {
|
|
|
903
903
|
}
|
|
904
904
|
);
|
|
905
905
|
}
|
|
906
|
-
const
|
|
907
|
-
const
|
|
908
|
-
if (!
|
|
906
|
+
const M = (u, S = !1) => {
|
|
907
|
+
const q = f.find((B) => B.id === u);
|
|
908
|
+
if (!q) return;
|
|
909
909
|
const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
910
910
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
911
911
|
b,
|
|
@@ -920,14 +920,14 @@ const Ge = (d) => {
|
|
|
920
920
|
et,
|
|
921
921
|
{
|
|
922
922
|
onChange: (B) => {
|
|
923
|
-
const j = [...s], P =
|
|
923
|
+
const j = [...s], P = f.find((N) => N.name === B);
|
|
924
924
|
if (!P) return;
|
|
925
|
-
const x = P.id, I = j.map((
|
|
925
|
+
const x = P.id, I = j.map((N) => N === u ? x : N);
|
|
926
926
|
i([...I]);
|
|
927
927
|
},
|
|
928
|
-
value:
|
|
929
|
-
options:
|
|
930
|
-
leftAddon: H(
|
|
928
|
+
value: q.name,
|
|
929
|
+
options: f.filter((B) => !s.find((j) => j === B.id)).map((B) => B.name),
|
|
930
|
+
leftAddon: H(q.images)
|
|
931
931
|
}
|
|
932
932
|
),
|
|
933
933
|
S && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
@@ -965,7 +965,7 @@ const Ge = (d) => {
|
|
|
965
965
|
r && k && /* @__PURE__ */ t.jsx(qt, { ...k }),
|
|
966
966
|
/* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
967
967
|
o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
|
|
968
|
-
s.map((u) =>
|
|
968
|
+
s.map((u) => M(u, $)),
|
|
969
969
|
v && /* @__PURE__ */ t.jsx(
|
|
970
970
|
"div",
|
|
971
971
|
{
|
|
@@ -980,21 +980,21 @@ const Ge = (d) => {
|
|
|
980
980
|
{
|
|
981
981
|
withoutHover: !0,
|
|
982
982
|
className: Y(Z.button, {
|
|
983
|
-
[Z.disabled]: !!(
|
|
983
|
+
[Z.disabled]: !!(h && h <= s.length || s.length === f.length)
|
|
984
984
|
}),
|
|
985
985
|
size: "s",
|
|
986
|
-
disabled: !!(
|
|
986
|
+
disabled: !!(h && h <= s.length || s.length === f.length),
|
|
987
987
|
onClick: () => {
|
|
988
988
|
const u = [...s];
|
|
989
989
|
let S = null;
|
|
990
|
-
if (
|
|
991
|
-
for (let
|
|
992
|
-
if (!s.find((F) => F ===
|
|
993
|
-
S =
|
|
990
|
+
if (f) {
|
|
991
|
+
for (let q = 0; q < f.length; q++)
|
|
992
|
+
if (!s.find((F) => F === f[q].id)) {
|
|
993
|
+
S = f[q];
|
|
994
994
|
break;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
u.push((S == null ? void 0 : S.id) ||
|
|
997
|
+
u.push((S == null ? void 0 : S.id) || f[0].id), i(u);
|
|
998
998
|
},
|
|
999
999
|
style: {
|
|
1000
1000
|
width: "fit-content"
|
|
@@ -1016,13 +1016,13 @@ const Ge = (d) => {
|
|
|
1016
1016
|
)
|
|
1017
1017
|
] }),
|
|
1018
1018
|
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
1019
|
-
|
|
1019
|
+
_ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1020
1020
|
tt,
|
|
1021
1021
|
{
|
|
1022
1022
|
label: "Auto scroll interval",
|
|
1023
1023
|
type: "number",
|
|
1024
|
-
value: String(
|
|
1025
|
-
onChange: (u) =>
|
|
1024
|
+
value: String(_.scrollInterval),
|
|
1025
|
+
onChange: (u) => _.setScrollInterval(Number(u)),
|
|
1026
1026
|
min: 0.1,
|
|
1027
1027
|
max: 100,
|
|
1028
1028
|
style: {
|
|
@@ -1032,8 +1032,8 @@ const Ge = (d) => {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
] });
|
|
1035
|
-
},
|
|
1036
|
-
title:
|
|
1035
|
+
}, fs = "_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", ws = "_active_roi3a_61", Ns = "_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", Us = "_addButton_roi3a_164", Ds = "_deleteButton_roi3a_179", Ls = "_closeIcon_roi3a_191", J = {
|
|
1036
|
+
title: fs,
|
|
1037
1037
|
subtitle: xs,
|
|
1038
1038
|
header: bs,
|
|
1039
1039
|
text: vs,
|
|
@@ -1042,8 +1042,8 @@ const Ge = (d) => {
|
|
|
1042
1042
|
itemsBlock: ks,
|
|
1043
1043
|
typeTexts: $s,
|
|
1044
1044
|
block: Is,
|
|
1045
|
-
active:
|
|
1046
|
-
products:
|
|
1045
|
+
active: ws,
|
|
1046
|
+
products: Ns,
|
|
1047
1047
|
product: Cs,
|
|
1048
1048
|
button: Ss,
|
|
1049
1049
|
disabled: Bs,
|
|
@@ -1094,41 +1094,41 @@ const Qa = (d) => {
|
|
|
1094
1094
|
subtitle: l,
|
|
1095
1095
|
editable: o = !0,
|
|
1096
1096
|
draggable: n = !1,
|
|
1097
|
-
deletable:
|
|
1097
|
+
deletable: m = !0,
|
|
1098
1098
|
addable: v = !0,
|
|
1099
|
-
itemsType:
|
|
1099
|
+
itemsType: f,
|
|
1100
1100
|
itemsOptions: r,
|
|
1101
1101
|
addableOptions: k = {},
|
|
1102
|
-
limit:
|
|
1103
|
-
} = d, [
|
|
1104
|
-
kt(
|
|
1102
|
+
limit: h
|
|
1103
|
+
} = d, [_, $] = g.useState(null), [H, M] = g.useState(null), u = g.useRef(null), S = yt(
|
|
1104
|
+
kt(Nt, {
|
|
1105
1105
|
activationConstraint: {
|
|
1106
1106
|
distance: 5
|
|
1107
1107
|
}
|
|
1108
1108
|
})
|
|
1109
1109
|
);
|
|
1110
|
-
|
|
1111
|
-
if (
|
|
1112
|
-
const j = [...s].map((P) => P.id ===
|
|
1110
|
+
g.useEffect(() => {
|
|
1111
|
+
if (_) {
|
|
1112
|
+
const j = [...s].map((P) => P.id === _.id ? _ : P);
|
|
1113
1113
|
i(j);
|
|
1114
1114
|
}
|
|
1115
|
-
}, [
|
|
1115
|
+
}, [_]), g.useEffect(() => {
|
|
1116
1116
|
u.current && H && (u.current.getBoundingClientRect().height, H.top);
|
|
1117
1117
|
}, [u.current, H]);
|
|
1118
|
-
const
|
|
1118
|
+
const q = (j, P) => {
|
|
1119
1119
|
j.stopPropagation();
|
|
1120
1120
|
const x = j.target.getBoundingClientRect();
|
|
1121
|
-
|
|
1121
|
+
M({
|
|
1122
1122
|
top: x.top + window.scrollY,
|
|
1123
1123
|
left: x.left - 30
|
|
1124
1124
|
}), $(P);
|
|
1125
1125
|
}, F = (j) => {
|
|
1126
1126
|
const { active: P, over: x } = j;
|
|
1127
1127
|
if (x && P.id !== x.id) {
|
|
1128
|
-
const I = s.findIndex((L) => L.id === P.id),
|
|
1129
|
-
if (I !== -1 &&
|
|
1128
|
+
const I = s.findIndex((L) => L.id === P.id), N = s.findIndex((L) => L.id === x.id);
|
|
1129
|
+
if (I !== -1 && N !== -1) {
|
|
1130
1130
|
const L = [...s], [A] = L.splice(I, 1);
|
|
1131
|
-
L.splice(
|
|
1131
|
+
L.splice(N, 0, A), i(L);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
}, B = (j, P) => {
|
|
@@ -1142,13 +1142,13 @@ const Qa = (d) => {
|
|
|
1142
1142
|
height: 20
|
|
1143
1143
|
}
|
|
1144
1144
|
) }),
|
|
1145
|
-
|
|
1145
|
+
f === "select" && r && /* @__PURE__ */ t.jsx(
|
|
1146
1146
|
et,
|
|
1147
1147
|
{
|
|
1148
1148
|
onChange: (I) => {
|
|
1149
|
-
const
|
|
1149
|
+
const N = [...s], L = r.find((D) => D.name === I);
|
|
1150
1150
|
if (!L) return;
|
|
1151
|
-
const A =
|
|
1151
|
+
const A = N.map((D) => D.id === j.id ? {
|
|
1152
1152
|
...L,
|
|
1153
1153
|
name: {
|
|
1154
1154
|
"en-US": I
|
|
@@ -1162,7 +1162,7 @@ const Qa = (d) => {
|
|
|
1162
1162
|
}), i([...A]);
|
|
1163
1163
|
},
|
|
1164
1164
|
value: j.name,
|
|
1165
|
-
options: r.filter((I) => !s.find((
|
|
1165
|
+
options: r.filter((I) => !s.find((N) => N.name === I.name)).map((I) => I.name)
|
|
1166
1166
|
}
|
|
1167
1167
|
),
|
|
1168
1168
|
/* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
|
|
@@ -1173,10 +1173,10 @@ const Qa = (d) => {
|
|
|
1173
1173
|
hoverable: !0,
|
|
1174
1174
|
width: 20,
|
|
1175
1175
|
height: 20,
|
|
1176
|
-
onClick: (I) =>
|
|
1176
|
+
onClick: (I) => q(I, j)
|
|
1177
1177
|
}
|
|
1178
1178
|
) }),
|
|
1179
|
-
|
|
1179
|
+
m && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1180
1180
|
b,
|
|
1181
1181
|
{
|
|
1182
1182
|
name: "Trash",
|
|
@@ -1228,7 +1228,7 @@ const Qa = (d) => {
|
|
|
1228
1228
|
It,
|
|
1229
1229
|
{
|
|
1230
1230
|
items: s.map((j) => j.id),
|
|
1231
|
-
strategy:
|
|
1231
|
+
strategy: wt,
|
|
1232
1232
|
children: s.map((j, P) => B(j, P))
|
|
1233
1233
|
}
|
|
1234
1234
|
)
|
|
@@ -1247,10 +1247,10 @@ const Qa = (d) => {
|
|
|
1247
1247
|
{
|
|
1248
1248
|
withoutHover: !0,
|
|
1249
1249
|
className: Y(J.button, {
|
|
1250
|
-
[J.disabled]: !!(
|
|
1250
|
+
[J.disabled]: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
1251
1251
|
}),
|
|
1252
1252
|
size: "s",
|
|
1253
|
-
disabled: !!(
|
|
1253
|
+
disabled: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
1254
1254
|
onClick: () => {
|
|
1255
1255
|
const j = [...s];
|
|
1256
1256
|
let P = null;
|
|
@@ -1261,7 +1261,7 @@ const Qa = (d) => {
|
|
|
1261
1261
|
break;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
|
|
1264
|
+
f === "select" && r && j.push({
|
|
1265
1265
|
name: P ? P.name : r[0].name,
|
|
1266
1266
|
id: (P == null ? void 0 : P.id) || r[0].id,
|
|
1267
1267
|
...k
|
|
@@ -1287,7 +1287,7 @@ const Qa = (d) => {
|
|
|
1287
1287
|
)
|
|
1288
1288
|
] })
|
|
1289
1289
|
] });
|
|
1290
|
-
}, Rs = "
|
|
1290
|
+
}, Rs = "_title_dbm6h_1", zs = "_subtitle_dbm6h_5", Fs = "_header_dbm6h_12", Vs = "_text_dbm6h_13", Ys = "_productsBlock_dbm6h_14", Gs = "_top_dbm6h_26", Xs = "_itemsBlock_dbm6h_35", Ws = "_typeTexts_dbm6h_41", Js = "_block_dbm6h_48", Qs = "_active_dbm6h_61", Ks = "_products_dbm6h_14", Zs = "_product_dbm6h_14", tn = "_button_dbm6h_80", en = "_disabled_dbm6h_91", sn = "_image_dbm6h_95", nn = "_info_dbm6h_102", on = "_name_dbm6h_114", an = "_buttons_dbm6h_118", cn = "_modal_dbm6h_125", ln = "_link_dbm6h_146", rn = "_modalOptions_dbm6h_152", dn = "_addButton_dbm6h_165", un = "_deleteButton_dbm6h_180", mn = "_closeIcon_dbm6h_192", V = {
|
|
1291
1291
|
title: Rs,
|
|
1292
1292
|
subtitle: zs,
|
|
1293
1293
|
header: Fs,
|
|
@@ -1311,8 +1311,8 @@ const Qa = (d) => {
|
|
|
1311
1311
|
modalOptions: rn,
|
|
1312
1312
|
addButton: dn,
|
|
1313
1313
|
deleteButton: un,
|
|
1314
|
-
closeIcon:
|
|
1315
|
-
},
|
|
1314
|
+
closeIcon: mn
|
|
1315
|
+
}, _n = g.forwardRef(
|
|
1316
1316
|
(d, a) => {
|
|
1317
1317
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
|
|
1318
1318
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1351,11 +1351,11 @@ const Qa = (d) => {
|
|
|
1351
1351
|
label: "Put up an attractive image",
|
|
1352
1352
|
activeImage: e[o.field],
|
|
1353
1353
|
onChange: (n) => {
|
|
1354
|
-
const
|
|
1354
|
+
const m = {
|
|
1355
1355
|
...e,
|
|
1356
1356
|
[o.field]: n
|
|
1357
1357
|
};
|
|
1358
|
-
s(
|
|
1358
|
+
s(m);
|
|
1359
1359
|
}
|
|
1360
1360
|
},
|
|
1361
1361
|
String(o.field)
|
|
@@ -1366,29 +1366,29 @@ const Qa = (d) => {
|
|
|
1366
1366
|
{
|
|
1367
1367
|
typesText: e[o.field.type],
|
|
1368
1368
|
setTypesText: (n) => {
|
|
1369
|
-
const
|
|
1369
|
+
const m = {
|
|
1370
1370
|
...e,
|
|
1371
1371
|
[o.field.type]: n
|
|
1372
1372
|
};
|
|
1373
|
-
s(
|
|
1373
|
+
s(m);
|
|
1374
1374
|
},
|
|
1375
1375
|
text: e[o.field.text]["en-US"] || "",
|
|
1376
1376
|
setText: (n) => {
|
|
1377
|
-
const
|
|
1377
|
+
const m = {
|
|
1378
1378
|
...e,
|
|
1379
1379
|
[o.field.text]: {
|
|
1380
1380
|
"en-US": n
|
|
1381
1381
|
}
|
|
1382
1382
|
};
|
|
1383
|
-
s(
|
|
1383
|
+
s(m);
|
|
1384
1384
|
},
|
|
1385
1385
|
typeFont: e[o.field.type],
|
|
1386
1386
|
setTypeFont: (n) => {
|
|
1387
|
-
const
|
|
1387
|
+
const m = {
|
|
1388
1388
|
...e,
|
|
1389
1389
|
[o.field.type]: n
|
|
1390
1390
|
};
|
|
1391
|
-
s(
|
|
1391
|
+
s(m);
|
|
1392
1392
|
},
|
|
1393
1393
|
subtitle: o.label
|
|
1394
1394
|
}
|
|
@@ -1398,11 +1398,11 @@ const Qa = (d) => {
|
|
|
1398
1398
|
tt,
|
|
1399
1399
|
{
|
|
1400
1400
|
onChange: (n) => {
|
|
1401
|
-
const
|
|
1401
|
+
const m = {
|
|
1402
1402
|
...e,
|
|
1403
1403
|
[o.field]: n
|
|
1404
1404
|
};
|
|
1405
|
-
s(
|
|
1405
|
+
s(m);
|
|
1406
1406
|
},
|
|
1407
1407
|
value: e[o.field] || "",
|
|
1408
1408
|
label: o.label,
|
|
@@ -1415,11 +1415,11 @@ const Qa = (d) => {
|
|
|
1415
1415
|
tt,
|
|
1416
1416
|
{
|
|
1417
1417
|
onChange: (n) => {
|
|
1418
|
-
const
|
|
1418
|
+
const m = {
|
|
1419
1419
|
...e,
|
|
1420
1420
|
[o.field.text]: n
|
|
1421
1421
|
};
|
|
1422
|
-
s(
|
|
1422
|
+
s(m);
|
|
1423
1423
|
},
|
|
1424
1424
|
value: e[o.field.text] || "",
|
|
1425
1425
|
label: o.inputLabel,
|
|
@@ -1432,11 +1432,11 @@ const Qa = (d) => {
|
|
|
1432
1432
|
current: !!e[o.field.switch] || !1,
|
|
1433
1433
|
label: o.switchLabel,
|
|
1434
1434
|
onChange: (n) => {
|
|
1435
|
-
const
|
|
1435
|
+
const m = {
|
|
1436
1436
|
...e,
|
|
1437
1437
|
[o.field.switch]: n
|
|
1438
1438
|
};
|
|
1439
|
-
s(
|
|
1439
|
+
s(m);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
)
|
|
@@ -1447,11 +1447,11 @@ const Qa = (d) => {
|
|
|
1447
1447
|
{
|
|
1448
1448
|
options: o.itemsOptions,
|
|
1449
1449
|
onChange: (n) => {
|
|
1450
|
-
const
|
|
1450
|
+
const m = {
|
|
1451
1451
|
...e,
|
|
1452
1452
|
[o.field]: n
|
|
1453
1453
|
};
|
|
1454
|
-
s(
|
|
1454
|
+
s(m);
|
|
1455
1455
|
},
|
|
1456
1456
|
label: o.label,
|
|
1457
1457
|
value: e[o.field] || "String",
|
|
@@ -1464,10 +1464,10 @@ const Qa = (d) => {
|
|
|
1464
1464
|
);
|
|
1465
1465
|
}
|
|
1466
1466
|
);
|
|
1467
|
-
function
|
|
1467
|
+
function hn(d) {
|
|
1468
1468
|
const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
1469
1469
|
id: a.id
|
|
1470
|
-
}),
|
|
1470
|
+
}), m = {
|
|
1471
1471
|
transform: St.Transform.toString(l),
|
|
1472
1472
|
transition: o
|
|
1473
1473
|
};
|
|
@@ -1475,7 +1475,7 @@ function pn(d) {
|
|
|
1475
1475
|
"div",
|
|
1476
1476
|
{
|
|
1477
1477
|
ref: c,
|
|
1478
|
-
style:
|
|
1478
|
+
style: m,
|
|
1479
1479
|
className: `${V.product} ${n ? V.dragging : ""}`,
|
|
1480
1480
|
...s,
|
|
1481
1481
|
...i,
|
|
@@ -1493,56 +1493,56 @@ const Ka = (d) => {
|
|
|
1493
1493
|
title: l,
|
|
1494
1494
|
subtitle: o,
|
|
1495
1495
|
editable: n = !0,
|
|
1496
|
-
draggable:
|
|
1496
|
+
draggable: m = !1,
|
|
1497
1497
|
withImage: v = !1,
|
|
1498
|
-
deletable:
|
|
1498
|
+
deletable: f = !0,
|
|
1499
1499
|
addable: r = !0,
|
|
1500
1500
|
itemsType: k,
|
|
1501
|
-
itemsPlaceholder:
|
|
1502
|
-
itemsOptions:
|
|
1501
|
+
itemsPlaceholder: h = "",
|
|
1502
|
+
itemsOptions: _,
|
|
1503
1503
|
hasRangeSelector: $ = !1,
|
|
1504
1504
|
rangeSelectorOptions: H,
|
|
1505
|
-
modalOptions:
|
|
1505
|
+
modalOptions: M,
|
|
1506
1506
|
addableOptions: u = {}
|
|
1507
|
-
} = d, [S,
|
|
1507
|
+
} = d, [S, q] = g.useState(null), [F, B] = g.useState({
|
|
1508
1508
|
top: 0,
|
|
1509
1509
|
left: 0
|
|
1510
|
-
}), [j, P] =
|
|
1511
|
-
kt(
|
|
1510
|
+
}), [j, P] = g.useState(null), x = g.useRef(null), [I, N] = g.useState(!1), L = yt(
|
|
1511
|
+
kt(Nt, {
|
|
1512
1512
|
activationConstraint: {
|
|
1513
1513
|
distance: 5
|
|
1514
1514
|
}
|
|
1515
1515
|
})
|
|
1516
1516
|
);
|
|
1517
|
-
|
|
1517
|
+
g.useEffect(() => {
|
|
1518
1518
|
const y = () => {
|
|
1519
|
-
|
|
1519
|
+
q(null), N(!1);
|
|
1520
1520
|
};
|
|
1521
|
-
return document.body.addEventListener("click", y),
|
|
1522
|
-
|
|
1521
|
+
return document.body.addEventListener("click", y), q(null), N(!1), () => {
|
|
1522
|
+
q(null), N(!1), document.body.removeEventListener("click", y);
|
|
1523
1523
|
};
|
|
1524
|
-
}, []),
|
|
1524
|
+
}, []), g.useEffect(() => {
|
|
1525
1525
|
if (S) {
|
|
1526
1526
|
const y = [...s].map((U) => U.id === S.id ? S : U);
|
|
1527
1527
|
i(y);
|
|
1528
1528
|
}
|
|
1529
|
-
}, [S]),
|
|
1529
|
+
}, [S]), g.useEffect(() => {
|
|
1530
1530
|
if (x.current && j) {
|
|
1531
1531
|
const y = x.current.getBoundingClientRect().height, U = window.innerHeight;
|
|
1532
|
-
let
|
|
1533
|
-
|
|
1534
|
-
top:
|
|
1532
|
+
let p = j.top;
|
|
1533
|
+
p + y > U + window.scrollY - 200 && (p = U + window.scrollY - y - 200), p < 0 && (p = 10), B({
|
|
1534
|
+
top: p,
|
|
1535
1535
|
left: j.left
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
}, [x.current, j]);
|
|
1539
1539
|
const A = (y, U) => {
|
|
1540
1540
|
y.stopPropagation();
|
|
1541
|
-
const
|
|
1541
|
+
const p = y.target.getBoundingClientRect();
|
|
1542
1542
|
P({
|
|
1543
|
-
top:
|
|
1544
|
-
left:
|
|
1545
|
-
}),
|
|
1543
|
+
top: p.top + window.scrollY,
|
|
1544
|
+
left: p.left - 30
|
|
1545
|
+
}), q(U), N(!0);
|
|
1546
1546
|
};
|
|
1547
1547
|
function D(y) {
|
|
1548
1548
|
if (v)
|
|
@@ -1565,18 +1565,18 @@ const Ka = (d) => {
|
|
|
1565
1565
|
);
|
|
1566
1566
|
}
|
|
1567
1567
|
const nt = (y) => {
|
|
1568
|
-
const { active: U, over:
|
|
1569
|
-
if (
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1572
|
-
const R = [...s], [X] = R.splice(
|
|
1568
|
+
const { active: U, over: p } = y;
|
|
1569
|
+
if (p && U.id !== p.id) {
|
|
1570
|
+
const w = s.findIndex((R) => R.id === U.id), O = s.findIndex((R) => R.id === p.id);
|
|
1571
|
+
if (w !== -1 && O !== -1) {
|
|
1572
|
+
const R = [...s], [X] = R.splice(w, 1);
|
|
1573
1573
|
R.splice(O, 0, X), i(R);
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
}, dt = (y) => {
|
|
1577
|
-
var
|
|
1577
|
+
var p;
|
|
1578
1578
|
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1579
|
-
|
|
1579
|
+
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1580
1580
|
b,
|
|
1581
1581
|
{
|
|
1582
1582
|
name: "DotsSixVertical",
|
|
@@ -1585,26 +1585,26 @@ const Ka = (d) => {
|
|
|
1585
1585
|
height: 20
|
|
1586
1586
|
}
|
|
1587
1587
|
) }),
|
|
1588
|
-
k === "select" &&
|
|
1588
|
+
k === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
1589
1589
|
et,
|
|
1590
1590
|
{
|
|
1591
|
-
onChange: (
|
|
1591
|
+
onChange: (w) => {
|
|
1592
1592
|
const R = [...s].map((X) => X.id === y.id ? {
|
|
1593
1593
|
...y,
|
|
1594
1594
|
name: {
|
|
1595
|
-
"en-US":
|
|
1595
|
+
"en-US": w
|
|
1596
1596
|
}
|
|
1597
1597
|
} : X);
|
|
1598
|
-
|
|
1598
|
+
q({
|
|
1599
1599
|
...y,
|
|
1600
1600
|
name: {
|
|
1601
|
-
"en-US":
|
|
1601
|
+
"en-US": w
|
|
1602
1602
|
}
|
|
1603
1603
|
}), i([...R]);
|
|
1604
1604
|
},
|
|
1605
1605
|
value: y.name["en-US"],
|
|
1606
|
-
options:
|
|
1607
|
-
(
|
|
1606
|
+
options: _.filter(
|
|
1607
|
+
(w) => !s.find((O) => O.name["en-US"] === w)
|
|
1608
1608
|
),
|
|
1609
1609
|
leftAddon: D(y.images)
|
|
1610
1610
|
}
|
|
@@ -1612,30 +1612,30 @@ const Ka = (d) => {
|
|
|
1612
1612
|
k === "input" && /* @__PURE__ */ t.jsx(
|
|
1613
1613
|
tt,
|
|
1614
1614
|
{
|
|
1615
|
-
onChange: (
|
|
1615
|
+
onChange: (w) => {
|
|
1616
1616
|
const R = [...s].map((X) => X.id === y.id ? {
|
|
1617
1617
|
...y,
|
|
1618
1618
|
name: {
|
|
1619
|
-
"en-US":
|
|
1619
|
+
"en-US": w
|
|
1620
1620
|
}
|
|
1621
1621
|
} : X);
|
|
1622
1622
|
i([...R]);
|
|
1623
1623
|
},
|
|
1624
1624
|
value: y.name["en-US"],
|
|
1625
|
-
placeholder:
|
|
1625
|
+
placeholder: h
|
|
1626
1626
|
}
|
|
1627
1627
|
),
|
|
1628
1628
|
k === "image" && /* @__PURE__ */ t.jsx(
|
|
1629
1629
|
bt,
|
|
1630
1630
|
{
|
|
1631
|
-
onChange: (
|
|
1631
|
+
onChange: (w) => {
|
|
1632
1632
|
const R = [...s].map((X) => X.id === y.id ? {
|
|
1633
1633
|
...y,
|
|
1634
|
-
images:
|
|
1634
|
+
images: w
|
|
1635
1635
|
} : X);
|
|
1636
1636
|
i([...R]);
|
|
1637
1637
|
},
|
|
1638
|
-
activeImage: (
|
|
1638
|
+
activeImage: (p = s.find((w) => w.id === y.id)) == null ? void 0 : p.images[0]
|
|
1639
1639
|
}
|
|
1640
1640
|
),
|
|
1641
1641
|
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
@@ -1646,10 +1646,10 @@ const Ka = (d) => {
|
|
|
1646
1646
|
hoverable: !0,
|
|
1647
1647
|
width: 20,
|
|
1648
1648
|
height: 20,
|
|
1649
|
-
onClick: (
|
|
1649
|
+
onClick: (w) => A(w, y)
|
|
1650
1650
|
}
|
|
1651
1651
|
) }),
|
|
1652
|
-
|
|
1652
|
+
f && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1653
1653
|
b,
|
|
1654
1654
|
{
|
|
1655
1655
|
name: "Trash",
|
|
@@ -1657,13 +1657,13 @@ const Ka = (d) => {
|
|
|
1657
1657
|
width: 20,
|
|
1658
1658
|
height: 20,
|
|
1659
1659
|
fill: "#C12A2A",
|
|
1660
|
-
onClick: () => i(s.filter((
|
|
1660
|
+
onClick: () => i(s.filter((w) => w.id !== y.id))
|
|
1661
1661
|
}
|
|
1662
1662
|
) })
|
|
1663
1663
|
] })
|
|
1664
1664
|
] });
|
|
1665
|
-
return
|
|
1666
|
-
|
|
1665
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
1666
|
+
hn,
|
|
1667
1667
|
{
|
|
1668
1668
|
product: y,
|
|
1669
1669
|
children: U
|
|
@@ -1689,21 +1689,21 @@ const Ka = (d) => {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
)
|
|
1691
1691
|
] }),
|
|
1692
|
-
S && n &&
|
|
1693
|
-
|
|
1692
|
+
S && n && M && I && /* @__PURE__ */ t.jsx(
|
|
1693
|
+
_n,
|
|
1694
1694
|
{
|
|
1695
1695
|
ref: x,
|
|
1696
1696
|
activeItem: S,
|
|
1697
|
-
setActiveItem:
|
|
1697
|
+
setActiveItem: q,
|
|
1698
1698
|
popupPosition: F,
|
|
1699
|
-
modalOptions:
|
|
1700
|
-
setIsOpenModal:
|
|
1699
|
+
modalOptions: M,
|
|
1700
|
+
setIsOpenModal: N
|
|
1701
1701
|
}
|
|
1702
1702
|
),
|
|
1703
1703
|
$ && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
1704
1704
|
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1705
1705
|
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1706
|
-
|
|
1706
|
+
m ? /* @__PURE__ */ t.jsx(
|
|
1707
1707
|
$t,
|
|
1708
1708
|
{
|
|
1709
1709
|
sensors: L,
|
|
@@ -1712,7 +1712,7 @@ const Ka = (d) => {
|
|
|
1712
1712
|
It,
|
|
1713
1713
|
{
|
|
1714
1714
|
items: s.map((y) => y.id),
|
|
1715
|
-
strategy:
|
|
1715
|
+
strategy: wt,
|
|
1716
1716
|
children: s.map((y) => dt(y))
|
|
1717
1717
|
}
|
|
1718
1718
|
)
|
|
@@ -1735,18 +1735,18 @@ const Ka = (d) => {
|
|
|
1735
1735
|
onClick: () => {
|
|
1736
1736
|
const y = [...s];
|
|
1737
1737
|
let U = null;
|
|
1738
|
-
if (
|
|
1739
|
-
for (let
|
|
1740
|
-
if (!s.find((
|
|
1741
|
-
U =
|
|
1738
|
+
if (_) {
|
|
1739
|
+
for (let p = 0; p < _.length; p++)
|
|
1740
|
+
if (!s.find((w) => w.name["en-US"] === _[p])) {
|
|
1741
|
+
U = _[p];
|
|
1742
1742
|
break;
|
|
1743
1743
|
}
|
|
1744
1744
|
}
|
|
1745
|
-
k === "select" &&
|
|
1745
|
+
k === "select" && _ ? y.push({
|
|
1746
1746
|
name: {
|
|
1747
|
-
"en-US": U ||
|
|
1747
|
+
"en-US": U || _[0]
|
|
1748
1748
|
},
|
|
1749
|
-
id:
|
|
1749
|
+
id: _t(),
|
|
1750
1750
|
...u,
|
|
1751
1751
|
maxSymbols: 100
|
|
1752
1752
|
// пример значения
|
|
@@ -1754,14 +1754,14 @@ const Ka = (d) => {
|
|
|
1754
1754
|
name: {
|
|
1755
1755
|
"en-US": ""
|
|
1756
1756
|
},
|
|
1757
|
-
id:
|
|
1757
|
+
id: _t(),
|
|
1758
1758
|
...u,
|
|
1759
1759
|
maxSymbols: 100
|
|
1760
1760
|
}) : y.push({
|
|
1761
1761
|
name: {
|
|
1762
1762
|
"en-US": `Image ${s.length + 1}`
|
|
1763
1763
|
},
|
|
1764
|
-
id:
|
|
1764
|
+
id: _t(),
|
|
1765
1765
|
...u,
|
|
1766
1766
|
maxSymbols: 100
|
|
1767
1767
|
}), i(y);
|
|
@@ -1787,10 +1787,10 @@ const Ka = (d) => {
|
|
|
1787
1787
|
] }),
|
|
1788
1788
|
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
1789
1789
|
] });
|
|
1790
|
-
},
|
|
1791
|
-
title:
|
|
1792
|
-
subtitle:
|
|
1793
|
-
header:
|
|
1790
|
+
}, pn = "_title_4we8s_1", gn = "_subtitle_4we8s_5", fn = "_header_4we8s_12", xn = "_text_4we8s_13", bn = "_productsBlock_4we8s_14", vn = "_buttonsBlock_4we8s_15", jn = "_top_4we8s_26", yn = "_itemsBlock_4we8s_35", kn = "_typeTexts_4we8s_41", $n = "_block_4we8s_48", In = "_active_4we8s_60", wn = "_products_4we8s_14", Nn = "_product_4we8s_14", Cn = "_button_4we8s_15", Sn = "_image_4we8s_90", Bn = "_info_4we8s_97", Tn = "_name_4we8s_109", Pn = "_buttons_4we8s_15", An = "_modal_4we8s_120", On = "_other_4we8s_140", Mn = "_options_4we8s_146", qn = "_closeIcon_4we8s_154", rt = {
|
|
1791
|
+
title: pn,
|
|
1792
|
+
subtitle: gn,
|
|
1793
|
+
header: fn,
|
|
1794
1794
|
text: xn,
|
|
1795
1795
|
productsBlock: bn,
|
|
1796
1796
|
buttonsBlock: vn,
|
|
@@ -1799,8 +1799,8 @@ const Ka = (d) => {
|
|
|
1799
1799
|
typeTexts: kn,
|
|
1800
1800
|
block: $n,
|
|
1801
1801
|
active: In,
|
|
1802
|
-
products:
|
|
1803
|
-
product:
|
|
1802
|
+
products: wn,
|
|
1803
|
+
product: Nn,
|
|
1804
1804
|
button: Cn,
|
|
1805
1805
|
image: Sn,
|
|
1806
1806
|
info: Bn,
|
|
@@ -1810,13 +1810,13 @@ const Ka = (d) => {
|
|
|
1810
1810
|
other: On,
|
|
1811
1811
|
options: Mn,
|
|
1812
1812
|
closeIcon: qn
|
|
1813
|
-
}, En =
|
|
1814
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i, editableLink: c = !0 } = d, [l, o] =
|
|
1815
|
-
return
|
|
1813
|
+
}, En = g.forwardRef((d, a) => {
|
|
1814
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i, editableLink: c = !0 } = d, [l, o] = g.useState(e.typesText), [n, m] = g.useState(e.destination), [v, f] = g.useState(e.page), [r, k] = g.useState(e.link || ""), [h, _] = g.useState(e.text || { "en-US": "" }), [$, H] = g.useState(e.openInNewTab), { pages: M } = Vt();
|
|
1815
|
+
return g.useEffect(() => {
|
|
1816
1816
|
s({
|
|
1817
1817
|
...e,
|
|
1818
1818
|
...{
|
|
1819
|
-
text:
|
|
1819
|
+
text: h,
|
|
1820
1820
|
link: r,
|
|
1821
1821
|
destination: n,
|
|
1822
1822
|
typesText: l,
|
|
@@ -1824,7 +1824,7 @@ const Ka = (d) => {
|
|
|
1824
1824
|
openInNewTab: $
|
|
1825
1825
|
}
|
|
1826
1826
|
});
|
|
1827
|
-
}, [l, n, r,
|
|
1827
|
+
}, [l, n, r, h, v, $]), /* @__PURE__ */ t.jsxs(
|
|
1828
1828
|
"div",
|
|
1829
1829
|
{
|
|
1830
1830
|
className: rt.modal,
|
|
@@ -1855,7 +1855,7 @@ const Ka = (d) => {
|
|
|
1855
1855
|
et,
|
|
1856
1856
|
{
|
|
1857
1857
|
label: "Destination",
|
|
1858
|
-
onChange: (u) =>
|
|
1858
|
+
onChange: (u) => m(u),
|
|
1859
1859
|
options: ["Go to Page", "Open Link"].filter((u) => u !== n),
|
|
1860
1860
|
value: n
|
|
1861
1861
|
}
|
|
@@ -1864,8 +1864,8 @@ const Ka = (d) => {
|
|
|
1864
1864
|
et,
|
|
1865
1865
|
{
|
|
1866
1866
|
label: "Go to",
|
|
1867
|
-
onChange: (u) =>
|
|
1868
|
-
options:
|
|
1867
|
+
onChange: (u) => f(u),
|
|
1868
|
+
options: M ? Object.values(M).filter((u) => u.name !== v).map((u) => u.name) : [],
|
|
1869
1869
|
value: v
|
|
1870
1870
|
}
|
|
1871
1871
|
) : /* @__PURE__ */ t.jsx(
|
|
@@ -1888,8 +1888,8 @@ const Ka = (d) => {
|
|
|
1888
1888
|
/* @__PURE__ */ t.jsx(
|
|
1889
1889
|
Et,
|
|
1890
1890
|
{
|
|
1891
|
-
onChange: (u) =>
|
|
1892
|
-
value:
|
|
1891
|
+
onChange: (u) => _({ "en-US": u }),
|
|
1892
|
+
value: h["en-US"],
|
|
1893
1893
|
label: "Text",
|
|
1894
1894
|
maxLength: 150
|
|
1895
1895
|
}
|
|
@@ -1929,43 +1929,43 @@ const Ka = (d) => {
|
|
|
1929
1929
|
addButton: ii,
|
|
1930
1930
|
deleteButton: oi
|
|
1931
1931
|
}, ai = (d) => {
|
|
1932
|
-
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: c = !0 } = d, [l, o] =
|
|
1932
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: c = !0 } = d, [l, o] = g.useState(null), [n, m] = g.useState({
|
|
1933
1933
|
top: 0,
|
|
1934
1934
|
left: 0
|
|
1935
|
-
}), [v,
|
|
1936
|
-
|
|
1937
|
-
const
|
|
1935
|
+
}), [v, f] = g.useState(null), r = g.useRef(null);
|
|
1936
|
+
g.useEffect(() => {
|
|
1937
|
+
const h = () => {
|
|
1938
1938
|
o(null);
|
|
1939
1939
|
};
|
|
1940
|
-
return document.body.addEventListener("click",
|
|
1941
|
-
o(null), document.body.removeEventListener("click",
|
|
1940
|
+
return document.body.addEventListener("click", h), o(null), () => {
|
|
1941
|
+
o(null), document.body.removeEventListener("click", h);
|
|
1942
1942
|
};
|
|
1943
|
-
}, []),
|
|
1943
|
+
}, []), g.useEffect(() => {
|
|
1944
1944
|
if (l) {
|
|
1945
|
-
const
|
|
1946
|
-
e(
|
|
1945
|
+
const h = [...a].map((_) => _.id === l.id ? l : _);
|
|
1946
|
+
e(h);
|
|
1947
1947
|
}
|
|
1948
|
-
}, [l]),
|
|
1948
|
+
}, [l]), g.useEffect(() => {
|
|
1949
1949
|
if (r.current && v) {
|
|
1950
|
-
const
|
|
1950
|
+
const h = r.current.getBoundingClientRect().height, _ = window.innerHeight;
|
|
1951
1951
|
let $ = v.top;
|
|
1952
|
-
$ +
|
|
1952
|
+
$ + h > _ + window.scrollY - 200 && ($ = _ + window.scrollY - h - 200), $ < 0 && ($ = 10), m({
|
|
1953
1953
|
top: $,
|
|
1954
1954
|
left: v.left
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
1957
|
}, [r.current, v]);
|
|
1958
|
-
const k = (
|
|
1959
|
-
|
|
1960
|
-
const $ =
|
|
1961
|
-
|
|
1958
|
+
const k = (h, _) => {
|
|
1959
|
+
h.stopPropagation();
|
|
1960
|
+
const $ = h.target.getBoundingClientRect();
|
|
1961
|
+
f({
|
|
1962
1962
|
top: $.top + window.scrollY - 70,
|
|
1963
1963
|
left: $.left - (i ? 30 : 65)
|
|
1964
|
-
}), o(
|
|
1964
|
+
}), o(_);
|
|
1965
1965
|
};
|
|
1966
1966
|
return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
|
|
1967
1967
|
/* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
|
|
1968
|
-
a.map((
|
|
1968
|
+
a.map((h) => /* @__PURE__ */ t.jsxs(
|
|
1969
1969
|
"div",
|
|
1970
1970
|
{
|
|
1971
1971
|
className: at.product,
|
|
@@ -1973,14 +1973,14 @@ const Ka = (d) => {
|
|
|
1973
1973
|
/* @__PURE__ */ t.jsx(
|
|
1974
1974
|
et,
|
|
1975
1975
|
{
|
|
1976
|
-
onChange: (
|
|
1977
|
-
const H = [...a].map((
|
|
1978
|
-
...
|
|
1979
|
-
type:
|
|
1980
|
-
} :
|
|
1976
|
+
onChange: (_) => {
|
|
1977
|
+
const H = [...a].map((M) => M.id === h.id ? {
|
|
1978
|
+
...h,
|
|
1979
|
+
type: _
|
|
1980
|
+
} : M);
|
|
1981
1981
|
e(H);
|
|
1982
1982
|
},
|
|
1983
|
-
value:
|
|
1983
|
+
value: h.type,
|
|
1984
1984
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1985
1985
|
}
|
|
1986
1986
|
),
|
|
@@ -1992,8 +1992,8 @@ const Ka = (d) => {
|
|
|
1992
1992
|
hoverable: !0,
|
|
1993
1993
|
width: 20,
|
|
1994
1994
|
height: 20,
|
|
1995
|
-
onClick: (
|
|
1996
|
-
k(
|
|
1995
|
+
onClick: (_) => {
|
|
1996
|
+
k(_, h);
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
) }),
|
|
@@ -2003,8 +2003,8 @@ const Ka = (d) => {
|
|
|
2003
2003
|
name: "Trash",
|
|
2004
2004
|
hoverable: !0,
|
|
2005
2005
|
onClick: () => {
|
|
2006
|
-
const
|
|
2007
|
-
e(
|
|
2006
|
+
const _ = a.filter(($) => $.id !== h.id);
|
|
2007
|
+
e(_);
|
|
2008
2008
|
},
|
|
2009
2009
|
width: 20,
|
|
2010
2010
|
height: 20,
|
|
@@ -2014,7 +2014,7 @@ const Ka = (d) => {
|
|
|
2014
2014
|
] })
|
|
2015
2015
|
]
|
|
2016
2016
|
},
|
|
2017
|
-
|
|
2017
|
+
h.id
|
|
2018
2018
|
)),
|
|
2019
2019
|
l && /* @__PURE__ */ t.jsx(
|
|
2020
2020
|
En,
|
|
@@ -2041,10 +2041,10 @@ const Ka = (d) => {
|
|
|
2041
2041
|
className: at.button,
|
|
2042
2042
|
size: "s",
|
|
2043
2043
|
onClick: () => {
|
|
2044
|
-
const
|
|
2045
|
-
c ?
|
|
2044
|
+
const h = [...a];
|
|
2045
|
+
c ? h.push({
|
|
2046
2046
|
type: "Primary",
|
|
2047
|
-
id:
|
|
2047
|
+
id: _t(),
|
|
2048
2048
|
typesText: [],
|
|
2049
2049
|
text: {
|
|
2050
2050
|
"en-US": "Button Name"
|
|
@@ -2052,9 +2052,9 @@ const Ka = (d) => {
|
|
|
2052
2052
|
destination: "Go to Page",
|
|
2053
2053
|
page: "",
|
|
2054
2054
|
openInNewTab: !1
|
|
2055
|
-
}) :
|
|
2055
|
+
}) : h.push({
|
|
2056
2056
|
type: "Primary",
|
|
2057
|
-
id:
|
|
2057
|
+
id: _t(),
|
|
2058
2058
|
typesText: [],
|
|
2059
2059
|
text: {
|
|
2060
2060
|
"en-US": "Create Ticket"
|
|
@@ -2062,7 +2062,7 @@ const Ka = (d) => {
|
|
|
2062
2062
|
destination: "Go to Page",
|
|
2063
2063
|
page: "",
|
|
2064
2064
|
openInNewTab: !1
|
|
2065
|
-
}), e(
|
|
2065
|
+
}), e(h);
|
|
2066
2066
|
},
|
|
2067
2067
|
style: {
|
|
2068
2068
|
width: "fit-content"
|
|
@@ -2105,29 +2105,29 @@ const Ka = (d) => {
|
|
|
2105
2105
|
}
|
|
2106
2106
|
)
|
|
2107
2107
|
] }) });
|
|
2108
|
-
}, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27",
|
|
2108
|
+
}, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", mi = "_progress_m18qi_36", _i = "_dots_m18qi_46", hi = "_dot_m18qi_46", pi = "_active_m18qi_65", gi = "_input_m18qi_77", fi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
|
|
2109
2109
|
wrapper: ci,
|
|
2110
2110
|
subtitle: li,
|
|
2111
2111
|
content: ri,
|
|
2112
2112
|
range: di,
|
|
2113
2113
|
track: ui,
|
|
2114
|
-
progress:
|
|
2115
|
-
dots:
|
|
2116
|
-
dot:
|
|
2117
|
-
active:
|
|
2118
|
-
input:
|
|
2119
|
-
countBlock:
|
|
2114
|
+
progress: mi,
|
|
2115
|
+
dots: _i,
|
|
2116
|
+
dot: hi,
|
|
2117
|
+
active: pi,
|
|
2118
|
+
input: gi,
|
|
2119
|
+
countBlock: fi,
|
|
2120
2120
|
count: xi,
|
|
2121
2121
|
controls: bi,
|
|
2122
2122
|
button: vi
|
|
2123
2123
|
}, qt = (d) => {
|
|
2124
|
-
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = d, [o, n] =
|
|
2124
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = d, [o, n] = g.useState(!1), m = Array.from({ length: (s - e) / i + 1 }), v = (c - e) / (s - e) * 100, f = () => {
|
|
2125
2125
|
c < s && l(c + i);
|
|
2126
2126
|
}, r = () => {
|
|
2127
2127
|
c > e && l(c - i);
|
|
2128
|
-
}, k = (
|
|
2129
|
-
const
|
|
2130
|
-
l(
|
|
2128
|
+
}, k = (h) => {
|
|
2129
|
+
const _ = e + h * i;
|
|
2130
|
+
l(_);
|
|
2131
2131
|
};
|
|
2132
2132
|
return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
|
|
2133
2133
|
a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
|
|
@@ -2141,20 +2141,20 @@ const Ka = (d) => {
|
|
|
2141
2141
|
style: { width: `${v}%` }
|
|
2142
2142
|
}
|
|
2143
2143
|
),
|
|
2144
|
-
/* @__PURE__ */ t.jsx("div", { className: W.dots, children:
|
|
2145
|
-
const $ =
|
|
2144
|
+
/* @__PURE__ */ t.jsx("div", { className: W.dots, children: m.map((h, _) => {
|
|
2145
|
+
const $ = _ <= (c - e) / i;
|
|
2146
2146
|
return /* @__PURE__ */ t.jsx(
|
|
2147
2147
|
"button",
|
|
2148
2148
|
{
|
|
2149
|
-
onClick: () => k(
|
|
2149
|
+
onClick: () => k(_),
|
|
2150
2150
|
className: Y(W.dot, {
|
|
2151
2151
|
[W.active]: $,
|
|
2152
2152
|
[W.inactive]: !$,
|
|
2153
2153
|
[W.dragging]: o
|
|
2154
2154
|
}),
|
|
2155
|
-
"aria-label": `Set value to ${e +
|
|
2155
|
+
"aria-label": `Set value to ${e + _ * i}`
|
|
2156
2156
|
},
|
|
2157
|
-
|
|
2157
|
+
_
|
|
2158
2158
|
);
|
|
2159
2159
|
}) }),
|
|
2160
2160
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2165,7 +2165,7 @@ const Ka = (d) => {
|
|
|
2165
2165
|
max: s,
|
|
2166
2166
|
step: i,
|
|
2167
2167
|
value: c,
|
|
2168
|
-
onChange: (
|
|
2168
|
+
onChange: (h) => l(Number(h.target.value)),
|
|
2169
2169
|
onMouseDown: () => n(!0),
|
|
2170
2170
|
onMouseUp: () => n(!1),
|
|
2171
2171
|
onTouchStart: () => n(!0),
|
|
@@ -2182,9 +2182,9 @@ const Ka = (d) => {
|
|
|
2182
2182
|
min: e,
|
|
2183
2183
|
max: s,
|
|
2184
2184
|
paddingless: !0,
|
|
2185
|
-
onChange: (
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2185
|
+
onChange: (h) => {
|
|
2186
|
+
const _ = Number(h);
|
|
2187
|
+
_ > s ? l(s) : _ < e ? l(e) : l(_);
|
|
2188
2188
|
},
|
|
2189
2189
|
value: String(c)
|
|
2190
2190
|
}
|
|
@@ -2193,7 +2193,7 @@ const Ka = (d) => {
|
|
|
2193
2193
|
/* @__PURE__ */ t.jsx(
|
|
2194
2194
|
"button",
|
|
2195
2195
|
{
|
|
2196
|
-
onClick:
|
|
2196
|
+
onClick: f,
|
|
2197
2197
|
disabled: c >= s,
|
|
2198
2198
|
className: W.button,
|
|
2199
2199
|
"aria-label": "Increment count",
|
|
@@ -2228,14 +2228,14 @@ const Ka = (d) => {
|
|
|
2228
2228
|
] })
|
|
2229
2229
|
] })
|
|
2230
2230
|
] });
|
|
2231
|
-
}, ji = "
|
|
2231
|
+
}, ji = "_title_17k8m_1", yi = "_subtitle_17k8m_5", ki = "_header_17k8m_12", $i = "_text_17k8m_13", Ii = "_productsBlock_17k8m_14", wi = "_top_17k8m_26", Ni = "_itemsBlock_17k8m_35", Ci = "_typeTexts_17k8m_41", Si = "_block_17k8m_48", Bi = "_active_17k8m_61", Ti = "_products_17k8m_14", Pi = "_product_17k8m_14", Ai = "_button_17k8m_80", Oi = "_image_17k8m_91", Mi = "_info_17k8m_98", qi = "_name_17k8m_110", Ei = "_buttons_17k8m_114", Ui = "_modal_17k8m_121", Di = "_link_17k8m_142", Li = "_modalOptions_17k8m_148", Hi = "_addButton_17k8m_161", Ri = "_deleteButton_17k8m_176", zi = "_closeIcon_17k8m_188", G = {
|
|
2232
2232
|
title: ji,
|
|
2233
2233
|
subtitle: yi,
|
|
2234
2234
|
header: ki,
|
|
2235
2235
|
text: $i,
|
|
2236
2236
|
productsBlock: Ii,
|
|
2237
|
-
top:
|
|
2238
|
-
itemsBlock:
|
|
2237
|
+
top: wi,
|
|
2238
|
+
itemsBlock: Ni,
|
|
2239
2239
|
typeTexts: Ci,
|
|
2240
2240
|
block: Si,
|
|
2241
2241
|
active: Bi,
|
|
@@ -2301,7 +2301,7 @@ const Ka = (d) => {
|
|
|
2301
2301
|
function Vi(d) {
|
|
2302
2302
|
const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
2303
2303
|
id: String(a.listingId)
|
|
2304
|
-
}),
|
|
2304
|
+
}), m = {
|
|
2305
2305
|
transform: St.Transform.toString(l),
|
|
2306
2306
|
transition: o
|
|
2307
2307
|
};
|
|
@@ -2309,7 +2309,7 @@ function Vi(d) {
|
|
|
2309
2309
|
"div",
|
|
2310
2310
|
{
|
|
2311
2311
|
ref: c,
|
|
2312
|
-
style:
|
|
2312
|
+
style: m,
|
|
2313
2313
|
className: `${G.product} ${n ? G.dragging : ""}`,
|
|
2314
2314
|
...s,
|
|
2315
2315
|
...i,
|
|
@@ -2327,44 +2327,44 @@ const tc = (d) => {
|
|
|
2327
2327
|
title: l,
|
|
2328
2328
|
subtitle: o,
|
|
2329
2329
|
editable: n = !0,
|
|
2330
|
-
draggable:
|
|
2330
|
+
draggable: m = !1,
|
|
2331
2331
|
withImage: v = !1,
|
|
2332
|
-
deletable:
|
|
2332
|
+
deletable: f = !0,
|
|
2333
2333
|
addable: r = !0,
|
|
2334
2334
|
itemsType: k,
|
|
2335
|
-
itemsOptions:
|
|
2336
|
-
} = d, [
|
|
2335
|
+
itemsOptions: h
|
|
2336
|
+
} = d, [_, $] = g.useState(
|
|
2337
2337
|
null
|
|
2338
|
-
), [H,
|
|
2338
|
+
), [H, M] = g.useState({
|
|
2339
2339
|
top: 0,
|
|
2340
2340
|
left: 0
|
|
2341
|
-
}), [u, S] =
|
|
2342
|
-
kt(
|
|
2341
|
+
}), [u, S] = g.useState(!1), q = yt(
|
|
2342
|
+
kt(Nt, {
|
|
2343
2343
|
activationConstraint: {
|
|
2344
2344
|
distance: 5
|
|
2345
2345
|
}
|
|
2346
2346
|
})
|
|
2347
2347
|
);
|
|
2348
|
-
|
|
2348
|
+
g.useEffect(() => {
|
|
2349
2349
|
const x = () => {
|
|
2350
2350
|
$(null), S(!1);
|
|
2351
2351
|
};
|
|
2352
2352
|
return document.body.addEventListener("click", x), $(null), S(!1), () => {
|
|
2353
2353
|
$(null), S(!1), document.body.removeEventListener("click", x);
|
|
2354
2354
|
};
|
|
2355
|
-
}, []),
|
|
2356
|
-
if (
|
|
2357
|
-
const x = [...s].map((I) => I.listingId ===
|
|
2355
|
+
}, []), g.useEffect(() => {
|
|
2356
|
+
if (_) {
|
|
2357
|
+
const x = [...s].map((I) => I.listingId === _.listingId ? _ : I);
|
|
2358
2358
|
i(x);
|
|
2359
2359
|
}
|
|
2360
|
-
}, [
|
|
2360
|
+
}, [_]);
|
|
2361
2361
|
const F = (x, I) => {
|
|
2362
2362
|
x.stopPropagation();
|
|
2363
|
-
const
|
|
2364
|
-
let D =
|
|
2365
|
-
D + L > A && (D = A - L - 20), S(!0),
|
|
2363
|
+
const N = x.target.getBoundingClientRect(), L = 100, A = window.innerHeight;
|
|
2364
|
+
let D = N.top + window.scrollY;
|
|
2365
|
+
D + L > A && (D = A - L - 20), S(!0), M({
|
|
2366
2366
|
top: D - 80,
|
|
2367
|
-
left:
|
|
2367
|
+
left: N.left - 30
|
|
2368
2368
|
}), $(I);
|
|
2369
2369
|
};
|
|
2370
2370
|
function B(x) {
|
|
@@ -2388,19 +2388,19 @@ const tc = (d) => {
|
|
|
2388
2388
|
);
|
|
2389
2389
|
}
|
|
2390
2390
|
const j = (x) => {
|
|
2391
|
-
const { active: I, over:
|
|
2392
|
-
if (
|
|
2393
|
-
const L = s.findIndex((D) => String(D.listingId) === I.id), A = s.findIndex((D) => String(D.listingId) ===
|
|
2391
|
+
const { active: I, over: N } = x;
|
|
2392
|
+
if (N && I.id !== N.id) {
|
|
2393
|
+
const L = s.findIndex((D) => String(D.listingId) === I.id), A = s.findIndex((D) => String(D.listingId) === N.id);
|
|
2394
2394
|
if (L !== -1 && A !== -1) {
|
|
2395
2395
|
const D = [...s], [nt] = D.splice(L, 1);
|
|
2396
2396
|
D.splice(A, 0, nt), i(D);
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
2399
|
}, P = (x, I) => {
|
|
2400
|
-
const
|
|
2401
|
-
if (!
|
|
2400
|
+
const N = h.find((A) => x.listingId === A.id);
|
|
2401
|
+
if (!N) return null;
|
|
2402
2402
|
const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2403
|
-
|
|
2403
|
+
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2404
2404
|
b,
|
|
2405
2405
|
{
|
|
2406
2406
|
name: "DotsSixVertical",
|
|
@@ -2413,7 +2413,7 @@ const tc = (d) => {
|
|
|
2413
2413
|
et,
|
|
2414
2414
|
{
|
|
2415
2415
|
onChange: (A) => {
|
|
2416
|
-
const D = [...s], nt =
|
|
2416
|
+
const D = [...s], nt = h.find((U) => U.productData.name === A);
|
|
2417
2417
|
if (!nt) return;
|
|
2418
2418
|
const dt = {
|
|
2419
2419
|
listingId: nt.id,
|
|
@@ -2421,12 +2421,12 @@ const tc = (d) => {
|
|
|
2421
2421
|
}, y = D.map((U) => U.listingId === x.listingId ? dt : U);
|
|
2422
2422
|
$(dt), i([...y]);
|
|
2423
2423
|
},
|
|
2424
|
-
value:
|
|
2424
|
+
value: N.productData.name,
|
|
2425
2425
|
options: [
|
|
2426
|
-
...
|
|
2426
|
+
...h.filter((A) => !s.find((D) => D.listingId === A.id)).map((A) => A.productData.name)
|
|
2427
2427
|
],
|
|
2428
2428
|
leftAddon: B(
|
|
2429
|
-
x.image ||
|
|
2429
|
+
x.image || N.productData.images.length > 0 && N.productData.images[0].cfId || ""
|
|
2430
2430
|
)
|
|
2431
2431
|
},
|
|
2432
2432
|
I
|
|
@@ -2442,7 +2442,7 @@ const tc = (d) => {
|
|
|
2442
2442
|
onClick: (A) => F(A, x)
|
|
2443
2443
|
}
|
|
2444
2444
|
) }),
|
|
2445
|
-
|
|
2445
|
+
f && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2446
2446
|
b,
|
|
2447
2447
|
{
|
|
2448
2448
|
name: "Trash",
|
|
@@ -2455,7 +2455,7 @@ const tc = (d) => {
|
|
|
2455
2455
|
) })
|
|
2456
2456
|
] })
|
|
2457
2457
|
] });
|
|
2458
|
-
return
|
|
2458
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
2459
2459
|
Vi,
|
|
2460
2460
|
{
|
|
2461
2461
|
product: x,
|
|
@@ -2482,28 +2482,28 @@ const tc = (d) => {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
)
|
|
2484
2484
|
] }),
|
|
2485
|
-
u &&
|
|
2485
|
+
u && _ && /* @__PURE__ */ t.jsx(
|
|
2486
2486
|
Fi,
|
|
2487
2487
|
{
|
|
2488
|
-
activeItem:
|
|
2488
|
+
activeItem: _,
|
|
2489
2489
|
setActiveItem: $,
|
|
2490
2490
|
setIsOpenModal: S,
|
|
2491
2491
|
popupPosition: H,
|
|
2492
|
-
itemsOptions:
|
|
2492
|
+
itemsOptions: h
|
|
2493
2493
|
}
|
|
2494
2494
|
),
|
|
2495
2495
|
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
2496
2496
|
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2497
|
-
|
|
2497
|
+
m ? /* @__PURE__ */ t.jsx(
|
|
2498
2498
|
$t,
|
|
2499
2499
|
{
|
|
2500
|
-
sensors:
|
|
2500
|
+
sensors: q,
|
|
2501
2501
|
onDragEnd: j,
|
|
2502
2502
|
children: /* @__PURE__ */ t.jsx(
|
|
2503
2503
|
It,
|
|
2504
2504
|
{
|
|
2505
2505
|
items: s.map((x) => String(x.listingId)),
|
|
2506
|
-
strategy:
|
|
2506
|
+
strategy: wt,
|
|
2507
2507
|
children: s.map((x, I) => P(x, I))
|
|
2508
2508
|
}
|
|
2509
2509
|
)
|
|
@@ -2525,17 +2525,17 @@ const tc = (d) => {
|
|
|
2525
2525
|
size: "s",
|
|
2526
2526
|
onClick: () => {
|
|
2527
2527
|
const x = [...s];
|
|
2528
|
-
for (let I = 0; I <
|
|
2529
|
-
if (!s.find((
|
|
2528
|
+
for (let I = 0; I < h.length; I++)
|
|
2529
|
+
if (!s.find((N) => N.listingId === h[I].id)) {
|
|
2530
2530
|
x.push({
|
|
2531
|
-
listingId:
|
|
2532
|
-
image:
|
|
2531
|
+
listingId: h[I].id,
|
|
2532
|
+
image: h[I].productData.images.length > 0 ? h[I].productData.images[0].cfId : ""
|
|
2533
2533
|
});
|
|
2534
2534
|
break;
|
|
2535
2535
|
}
|
|
2536
2536
|
i(x);
|
|
2537
2537
|
},
|
|
2538
|
-
disabled: s.length ===
|
|
2538
|
+
disabled: s.length === h.length,
|
|
2539
2539
|
style: {
|
|
2540
2540
|
width: "fit-content"
|
|
2541
2541
|
},
|
|
@@ -2557,7 +2557,7 @@ const tc = (d) => {
|
|
|
2557
2557
|
] }),
|
|
2558
2558
|
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
2559
2559
|
] });
|
|
2560
|
-
}, 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",
|
|
2560
|
+
}, 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", mo = "_chargeTypes_6cemk_165", _o = "_charge_6cemk_165", ho = "_chargeActive_6cemk_190", po = "_title_6cemk_198", T = {
|
|
2561
2561
|
options: Yi,
|
|
2562
2562
|
price: Gi,
|
|
2563
2563
|
oldPrice: Xi,
|
|
@@ -2577,13 +2577,13 @@ const tc = (d) => {
|
|
|
2577
2577
|
focused: lo,
|
|
2578
2578
|
button: ro,
|
|
2579
2579
|
activeVariant: uo,
|
|
2580
|
-
chargeTypes:
|
|
2581
|
-
charge:
|
|
2582
|
-
chargeActive:
|
|
2583
|
-
title:
|
|
2584
|
-
},
|
|
2585
|
-
wrapper:
|
|
2586
|
-
label:
|
|
2580
|
+
chargeTypes: mo,
|
|
2581
|
+
charge: _o,
|
|
2582
|
+
chargeActive: ho,
|
|
2583
|
+
title: po
|
|
2584
|
+
}, go = "_wrapper_c1dht_1", fo = "_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 = {
|
|
2585
|
+
wrapper: go,
|
|
2586
|
+
label: fo,
|
|
2587
2587
|
input: xo,
|
|
2588
2588
|
paddingless: bo,
|
|
2589
2589
|
content: vo,
|
|
@@ -2600,20 +2600,20 @@ const tc = (d) => {
|
|
|
2600
2600
|
min: l,
|
|
2601
2601
|
max: o,
|
|
2602
2602
|
placeholder: n,
|
|
2603
|
-
disabled:
|
|
2603
|
+
disabled: m = !1,
|
|
2604
2604
|
required: v = !1,
|
|
2605
|
-
regex:
|
|
2605
|
+
regex: f,
|
|
2606
2606
|
paddingless: r = !1,
|
|
2607
2607
|
borderless: k = !1,
|
|
2608
|
-
editable:
|
|
2609
|
-
isSearch:
|
|
2608
|
+
editable: h = !1,
|
|
2609
|
+
isSearch: _ = !1,
|
|
2610
2610
|
centered: $ = !1
|
|
2611
|
-
} = d, { themeSettings: H } = Ut(), { inputs:
|
|
2612
|
-
function
|
|
2611
|
+
} = d, { themeSettings: H } = Ut(), { inputs: M } = H, [u, S] = g.useState(!1);
|
|
2612
|
+
function q(B) {
|
|
2613
2613
|
return Number(B) < 0 ? String(l) : B;
|
|
2614
2614
|
}
|
|
2615
2615
|
function F(B) {
|
|
2616
|
-
return !v || !
|
|
2616
|
+
return !v || !f ? !0 : new RegExp(f).test(B);
|
|
2617
2617
|
}
|
|
2618
2618
|
return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
|
|
2619
2619
|
s && /* @__PURE__ */ t.jsx(
|
|
@@ -2628,12 +2628,10 @@ const tc = (d) => {
|
|
|
2628
2628
|
"div",
|
|
2629
2629
|
{
|
|
2630
2630
|
className: Y(it.content, {
|
|
2631
|
-
[it.contentBorder]:
|
|
2631
|
+
[it.contentBorder]: M.border.active
|
|
2632
2632
|
}),
|
|
2633
2633
|
style: {
|
|
2634
|
-
...e
|
|
2635
|
-
background: q.field.active ? q.field.color : "transparent",
|
|
2636
|
-
padding: m ? `7px ${Number(q.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2634
|
+
...e
|
|
2637
2635
|
},
|
|
2638
2636
|
children: [
|
|
2639
2637
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2644,7 +2642,7 @@ const tc = (d) => {
|
|
|
2644
2642
|
onChange: (B) => {
|
|
2645
2643
|
if (c === "text") a(B.target.value);
|
|
2646
2644
|
else {
|
|
2647
|
-
const j =
|
|
2645
|
+
const j = q(B.target.value);
|
|
2648
2646
|
a(j);
|
|
2649
2647
|
}
|
|
2650
2648
|
},
|
|
@@ -2658,23 +2656,25 @@ const tc = (d) => {
|
|
|
2658
2656
|
}),
|
|
2659
2657
|
min: c === "number" ? l : void 0,
|
|
2660
2658
|
max: c === "number" ? o : void 0,
|
|
2661
|
-
disabled:
|
|
2659
|
+
disabled: m,
|
|
2662
2660
|
onFocus: () => S(!0),
|
|
2663
2661
|
style: {
|
|
2664
|
-
textAlign: $ ? "center" : "left"
|
|
2662
|
+
textAlign: $ ? "center" : "left",
|
|
2663
|
+
background: M.field.active ? M.field.color : "transparent",
|
|
2664
|
+
padding: _ ? `7px ${Number(M.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
2667
|
),
|
|
2668
|
-
|
|
2668
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2669
2669
|
b,
|
|
2670
2670
|
{
|
|
2671
2671
|
name: "MagnifyingGlass",
|
|
2672
2672
|
fill: "var(--icon-secondary)",
|
|
2673
|
-
width:
|
|
2674
|
-
height:
|
|
2673
|
+
width: M.general.size,
|
|
2674
|
+
height: M.general.size
|
|
2675
2675
|
}
|
|
2676
2676
|
) }),
|
|
2677
|
-
|
|
2677
|
+
h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2678
2678
|
b,
|
|
2679
2679
|
{
|
|
2680
2680
|
name: "Sliders",
|
|
@@ -2687,10 +2687,10 @@ const tc = (d) => {
|
|
|
2687
2687
|
}
|
|
2688
2688
|
)
|
|
2689
2689
|
] });
|
|
2690
|
-
}, Io = "_button_85085_1",
|
|
2690
|
+
}, Io = "_button_85085_1", wo = "_primary_85085_20", No = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
|
|
2691
2691
|
button: Io,
|
|
2692
|
-
primary:
|
|
2693
|
-
primaryHovered:
|
|
2692
|
+
primary: wo,
|
|
2693
|
+
primaryHovered: No,
|
|
2694
2694
|
secondary: Co,
|
|
2695
2695
|
secondaryHovered: So,
|
|
2696
2696
|
tertiary: Bo,
|
|
@@ -2731,22 +2731,22 @@ const tc = (d) => {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
|
|
2733
2733
|
const ec = (d) => {
|
|
2734
|
-
var H,
|
|
2735
|
-
const { variants: a } = d, [e, s] =
|
|
2736
|
-
|
|
2734
|
+
var H, M;
|
|
2735
|
+
const { variants: a } = d, [e, s] = g.useState(a[0]), [i, c] = g.useState(e.chargeTypes[0]), l = Bt(), [o, n] = g.useState(1), { reset: m, addProductToCart: v, getProducts: f } = Ot(), [r, k] = g.useState(!1);
|
|
2736
|
+
g.useEffect(() => {
|
|
2737
2737
|
k(!0);
|
|
2738
2738
|
const u = setTimeout(() => k(!1), 600);
|
|
2739
2739
|
return () => clearTimeout(u);
|
|
2740
2740
|
}, [o]);
|
|
2741
|
-
async function
|
|
2742
|
-
await
|
|
2741
|
+
async function h() {
|
|
2742
|
+
await f(), await v({
|
|
2743
2743
|
productId: d.id,
|
|
2744
2744
|
productVariantId: e.id,
|
|
2745
2745
|
quantity: o
|
|
2746
2746
|
});
|
|
2747
2747
|
}
|
|
2748
|
-
function
|
|
2749
|
-
|
|
2748
|
+
function _() {
|
|
2749
|
+
m(), h(), l("/checkout");
|
|
2750
2750
|
}
|
|
2751
2751
|
function $(u) {
|
|
2752
2752
|
if (u >= 864e5) {
|
|
@@ -2763,9 +2763,9 @@ const ec = (d) => {
|
|
|
2763
2763
|
return `${j} ${j === 1 ? "second" : "seconds"}`;
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
|
-
return
|
|
2766
|
+
return g.useEffect(() => {
|
|
2767
2767
|
(e.quantity.available === 0 || !e.quantity.available) && n(0);
|
|
2768
|
-
}, [e.quantity.available]),
|
|
2768
|
+
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
|
|
2769
2769
|
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((u) => /* @__PURE__ */ t.jsx(
|
|
2770
2770
|
"div",
|
|
2771
2771
|
{
|
|
@@ -2823,7 +2823,7 @@ const ec = (d) => {
|
|
|
2823
2823
|
value: String(o),
|
|
2824
2824
|
onChange: (u) => n(Number(u)),
|
|
2825
2825
|
max: ((H = e.quantity.restrictions) == null ? void 0 : H.max) || e.quantity.available || 1 / 0,
|
|
2826
|
-
min: ((
|
|
2826
|
+
min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
|
|
2827
2827
|
centered: !0,
|
|
2828
2828
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
2829
2829
|
}
|
|
@@ -2891,7 +2891,7 @@ const ec = (d) => {
|
|
|
2891
2891
|
Q,
|
|
2892
2892
|
{
|
|
2893
2893
|
type: "Primary",
|
|
2894
|
-
onClick: () =>
|
|
2894
|
+
onClick: () => _(),
|
|
2895
2895
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2896
2896
|
children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
2897
2897
|
}
|
|
@@ -2900,14 +2900,14 @@ const ec = (d) => {
|
|
|
2900
2900
|
Q,
|
|
2901
2901
|
{
|
|
2902
2902
|
type: "Secondary",
|
|
2903
|
-
onClick: () =>
|
|
2903
|
+
onClick: () => h(),
|
|
2904
2904
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2905
2905
|
children: "Add to Cart"
|
|
2906
2906
|
}
|
|
2907
2907
|
)
|
|
2908
2908
|
] })
|
|
2909
2909
|
] });
|
|
2910
|
-
}, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Uo = "_closing_1tdo3_64", Do = "_info_1tdo3_113", Lo = "_top_1tdo3_120", Ho = "_title_1tdo3_131", Ro = "_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",
|
|
2910
|
+
}, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Uo = "_closing_1tdo3_64", Do = "_info_1tdo3_113", Lo = "_top_1tdo3_120", Ho = "_title_1tdo3_131", Ro = "_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", ma = "_pagesMobileModalHeader_1tdo3_369", _a = "_pagesMobileModalFooter_1tdo3_379", C = {
|
|
2911
2911
|
button: Ao,
|
|
2912
2912
|
login: Oo,
|
|
2913
2913
|
signUp: Mo,
|
|
@@ -2945,19 +2945,19 @@ const ec = (d) => {
|
|
|
2945
2945
|
userInfo: ra,
|
|
2946
2946
|
pagesMobileModal: da,
|
|
2947
2947
|
pagesMobileModalContent: ua,
|
|
2948
|
-
pagesMobileModalHeader:
|
|
2949
|
-
pagesMobileModalFooter:
|
|
2948
|
+
pagesMobileModalHeader: ma,
|
|
2949
|
+
pagesMobileModalFooter: _a
|
|
2950
2950
|
};
|
|
2951
2951
|
class xt extends Error {
|
|
2952
2952
|
}
|
|
2953
2953
|
xt.prototype.name = "InvalidTokenError";
|
|
2954
|
-
function
|
|
2954
|
+
function ha(d) {
|
|
2955
2955
|
return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
|
|
2956
2956
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2957
2957
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2958
2958
|
}));
|
|
2959
2959
|
}
|
|
2960
|
-
function
|
|
2960
|
+
function pa(d) {
|
|
2961
2961
|
let a = d.replace(/-/g, "+").replace(/_/g, "/");
|
|
2962
2962
|
switch (a.length % 4) {
|
|
2963
2963
|
case 0:
|
|
@@ -2972,12 +2972,12 @@ function ha(d) {
|
|
|
2972
2972
|
throw new Error("base64 string is not of the correct length");
|
|
2973
2973
|
}
|
|
2974
2974
|
try {
|
|
2975
|
-
return
|
|
2975
|
+
return ha(a);
|
|
2976
2976
|
} catch {
|
|
2977
2977
|
return atob(a);
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
|
-
function
|
|
2980
|
+
function ga(d, a) {
|
|
2981
2981
|
if (typeof d != "string")
|
|
2982
2982
|
throw new xt("Invalid token specified: must be a string");
|
|
2983
2983
|
a || (a = {});
|
|
@@ -2986,7 +2986,7 @@ function fa(d, a) {
|
|
|
2986
2986
|
throw new xt(`Invalid token specified: missing part #${e + 1}`);
|
|
2987
2987
|
let i;
|
|
2988
2988
|
try {
|
|
2989
|
-
i =
|
|
2989
|
+
i = pa(s);
|
|
2990
2990
|
} catch (c) {
|
|
2991
2991
|
throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2992
2992
|
}
|
|
@@ -2999,38 +2999,38 @@ function fa(d, a) {
|
|
|
2999
2999
|
const sc = (d) => {
|
|
3000
3000
|
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
|
|
3001
3001
|
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
3002
|
-
a && /* @__PURE__ */ t.jsx(
|
|
3002
|
+
a && /* @__PURE__ */ t.jsx(fa, {}),
|
|
3003
3003
|
s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
|
|
3004
3004
|
] });
|
|
3005
|
-
},
|
|
3006
|
-
const [d, a] =
|
|
3005
|
+
}, fa = () => {
|
|
3006
|
+
const [d, a] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: c } = Ot();
|
|
3007
3007
|
function l(r) {
|
|
3008
3008
|
for (let k = 0; k < i.parts.length; k++)
|
|
3009
|
-
for (let
|
|
3009
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
3010
3010
|
if (i.parts[k].productVariantId === r.variants[k].id)
|
|
3011
3011
|
return i.parts[k].productVariantId;
|
|
3012
3012
|
}
|
|
3013
3013
|
function o(r) {
|
|
3014
3014
|
for (let k = 0; k < i.parts.length; k++)
|
|
3015
|
-
for (let
|
|
3015
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
3016
3016
|
if (i.parts[k].productVariantId === r.variants[k].id)
|
|
3017
3017
|
return i.parts[k].quantity;
|
|
3018
3018
|
}
|
|
3019
|
-
|
|
3019
|
+
g.useEffect(() => {
|
|
3020
3020
|
(async () => {
|
|
3021
|
-
const k = i.parts.map(($) => String($.productId)),
|
|
3021
|
+
const k = i.parts.map(($) => String($.productId)), _ = (await c([...k])).map(($) => ({
|
|
3022
3022
|
...$,
|
|
3023
3023
|
activeVariantId: l($),
|
|
3024
3024
|
quantity: o($)
|
|
3025
3025
|
}));
|
|
3026
|
-
s(
|
|
3026
|
+
s(_);
|
|
3027
3027
|
})();
|
|
3028
3028
|
}, [i.parts.length]);
|
|
3029
3029
|
function n(r) {
|
|
3030
3030
|
var k;
|
|
3031
|
-
return !r || !(r != null && r.variants) ? !1 : (k = r.variants.find((
|
|
3031
|
+
return !r || !(r != null && r.variants) ? !1 : (k = r.variants.find((h) => h.id === r.activeVariantId)) == null ? void 0 : k.subscriptionSettings;
|
|
3032
3032
|
}
|
|
3033
|
-
const
|
|
3033
|
+
const m = i.parts.length > 0 && e.length > 0 && !n(e[0]), [v, f] = g.useState(!1);
|
|
3034
3034
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3035
3035
|
/* @__PURE__ */ t.jsxs(
|
|
3036
3036
|
Q,
|
|
@@ -3040,7 +3040,7 @@ const sc = (d) => {
|
|
|
3040
3040
|
padding: 10
|
|
3041
3041
|
},
|
|
3042
3042
|
onClick: (r) => {
|
|
3043
|
-
r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0),
|
|
3043
|
+
r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), f(!0));
|
|
3044
3044
|
},
|
|
3045
3045
|
children: [
|
|
3046
3046
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3050,7 +3050,7 @@ const sc = (d) => {
|
|
|
3050
3050
|
fill: "var(--icon-primary)"
|
|
3051
3051
|
}
|
|
3052
3052
|
),
|
|
3053
|
-
|
|
3053
|
+
m && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: i.parts.length })
|
|
3054
3054
|
]
|
|
3055
3055
|
}
|
|
3056
3056
|
),
|
|
@@ -3058,7 +3058,7 @@ const sc = (d) => {
|
|
|
3058
3058
|
Mt,
|
|
3059
3059
|
{
|
|
3060
3060
|
close: () => {
|
|
3061
|
-
|
|
3061
|
+
f(!1), setTimeout(() => {
|
|
3062
3062
|
a(!1);
|
|
3063
3063
|
}, 300);
|
|
3064
3064
|
},
|
|
@@ -3067,7 +3067,7 @@ const sc = (d) => {
|
|
|
3067
3067
|
xa,
|
|
3068
3068
|
{
|
|
3069
3069
|
activeProducts: e,
|
|
3070
|
-
isCartNotEmpty:
|
|
3070
|
+
isCartNotEmpty: m,
|
|
3071
3071
|
isOpen: v
|
|
3072
3072
|
}
|
|
3073
3073
|
)
|
|
@@ -3076,7 +3076,7 @@ const sc = (d) => {
|
|
|
3076
3076
|
] });
|
|
3077
3077
|
}, xa = (d) => {
|
|
3078
3078
|
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
|
|
3079
|
-
function
|
|
3079
|
+
function m(r) {
|
|
3080
3080
|
n(r);
|
|
3081
3081
|
}
|
|
3082
3082
|
function v(r) {
|
|
@@ -3086,7 +3086,7 @@ const sc = (d) => {
|
|
|
3086
3086
|
quantity: r.quantity + 1
|
|
3087
3087
|
});
|
|
3088
3088
|
}
|
|
3089
|
-
function
|
|
3089
|
+
function f(r) {
|
|
3090
3090
|
o({
|
|
3091
3091
|
productId: r.id,
|
|
3092
3092
|
productVariantId: r.activeVariantId,
|
|
@@ -3148,7 +3148,7 @@ const sc = (d) => {
|
|
|
3148
3148
|
"div",
|
|
3149
3149
|
{
|
|
3150
3150
|
onClick: () => {
|
|
3151
|
-
r.quantity !== 1 &&
|
|
3151
|
+
r.quantity !== 1 && f(r);
|
|
3152
3152
|
},
|
|
3153
3153
|
className: C.productButton,
|
|
3154
3154
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -3203,7 +3203,7 @@ const sc = (d) => {
|
|
|
3203
3203
|
l().total
|
|
3204
3204
|
] })
|
|
3205
3205
|
] }),
|
|
3206
|
-
/* @__PURE__ */ t.jsx(Q, { onClick: () =>
|
|
3206
|
+
/* @__PURE__ */ t.jsx(Q, { onClick: () => m("/checkout"), children: "Checkout" })
|
|
3207
3207
|
] })
|
|
3208
3208
|
] }) : /* @__PURE__ */ t.jsx(ba, {})
|
|
3209
3209
|
]
|
|
@@ -3260,10 +3260,10 @@ const sc = (d) => {
|
|
|
3260
3260
|
}
|
|
3261
3261
|
)
|
|
3262
3262
|
] });
|
|
3263
|
-
const [c, l] =
|
|
3264
|
-
return
|
|
3263
|
+
const [c, l] = g.useState("test-email@gmail.com");
|
|
3264
|
+
return g.useEffect(() => {
|
|
3265
3265
|
(async () => {
|
|
3266
|
-
const n =
|
|
3266
|
+
const n = ga(e);
|
|
3267
3267
|
l(n.email);
|
|
3268
3268
|
})();
|
|
3269
3269
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
@@ -3318,7 +3318,7 @@ const sc = (d) => {
|
|
|
3318
3318
|
logo: a,
|
|
3319
3319
|
signUp: e
|
|
3320
3320
|
}) => {
|
|
3321
|
-
const [s, i] =
|
|
3321
|
+
const [s, i] = g.useState(!1);
|
|
3322
3322
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3323
3323
|
/* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
|
|
3324
3324
|
s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
@@ -3352,13 +3352,13 @@ const sc = (d) => {
|
|
|
3352
3352
|
)
|
|
3353
3353
|
}
|
|
3354
3354
|
);
|
|
3355
|
-
}, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30",
|
|
3355
|
+
}, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", wa = "_social_xddz7_30", Na = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
|
|
3356
3356
|
share: ya,
|
|
3357
3357
|
modal: ka,
|
|
3358
3358
|
header: $a,
|
|
3359
3359
|
socials: Ia,
|
|
3360
|
-
social:
|
|
3361
|
-
copy:
|
|
3360
|
+
social: wa,
|
|
3361
|
+
copy: Na,
|
|
3362
3362
|
title: Ca,
|
|
3363
3363
|
copyWrapper: Sa,
|
|
3364
3364
|
copyText: Ba,
|
|
@@ -3403,8 +3403,8 @@ const sc = (d) => {
|
|
|
3403
3403
|
d(!1), s(!0);
|
|
3404
3404
|
}, 300);
|
|
3405
3405
|
}
|
|
3406
|
-
function o(n,
|
|
3407
|
-
return n.length >
|
|
3406
|
+
function o(n, m) {
|
|
3407
|
+
return n.length > m ? n.slice(0, m) + "..." : n;
|
|
3408
3408
|
}
|
|
3409
3409
|
return /* @__PURE__ */ t.jsxs(
|
|
3410
3410
|
"div",
|
|
@@ -3452,27 +3452,27 @@ const sc = (d) => {
|
|
|
3452
3452
|
]
|
|
3453
3453
|
}
|
|
3454
3454
|
);
|
|
3455
|
-
}, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Ua = "_content_1s1lq_25",
|
|
3455
|
+
}, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Ua = "_content_1s1lq_25", ft = {
|
|
3456
3456
|
accordion: Oa,
|
|
3457
3457
|
header: Ma,
|
|
3458
3458
|
icon: qa,
|
|
3459
3459
|
open: Ea,
|
|
3460
3460
|
content: Ua
|
|
3461
3461
|
}, oc = ({ title: d, content: a, defaultOpen: e = !1 }) => {
|
|
3462
|
-
const [s, i] =
|
|
3462
|
+
const [s, i] = g.useState(e), [c, l] = g.useState(0), o = g.useRef(null), n = () => {
|
|
3463
3463
|
i(!s);
|
|
3464
3464
|
};
|
|
3465
|
-
return
|
|
3465
|
+
return g.useEffect(() => {
|
|
3466
3466
|
o.current && l(s ? o.current.scrollHeight : 0);
|
|
3467
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
3467
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: ft.accordion, children: [
|
|
3468
3468
|
/* @__PURE__ */ t.jsxs(
|
|
3469
3469
|
"div",
|
|
3470
3470
|
{
|
|
3471
|
-
className:
|
|
3471
|
+
className: ft.header,
|
|
3472
3472
|
onClick: n,
|
|
3473
3473
|
children: [
|
|
3474
3474
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
|
|
3475
|
-
/* @__PURE__ */ t.jsx("div", { className: Y(
|
|
3475
|
+
/* @__PURE__ */ t.jsx("div", { className: Y(ft.icon, { [ft.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3476
3476
|
]
|
|
3477
3477
|
}
|
|
3478
3478
|
),
|
|
@@ -3480,7 +3480,7 @@ const sc = (d) => {
|
|
|
3480
3480
|
"div",
|
|
3481
3481
|
{
|
|
3482
3482
|
ref: o,
|
|
3483
|
-
className:
|
|
3483
|
+
className: ft.content,
|
|
3484
3484
|
style: { height: `${c}px` },
|
|
3485
3485
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3486
3486
|
}
|
|
@@ -3512,9 +3512,6 @@ const sc = (d) => {
|
|
|
3512
3512
|
style: {
|
|
3513
3513
|
width: "100%"
|
|
3514
3514
|
},
|
|
3515
|
-
onClick: () => {
|
|
3516
|
-
console.log("add to cart");
|
|
3517
|
-
},
|
|
3518
3515
|
children: "Add to Cart"
|
|
3519
3516
|
}
|
|
3520
3517
|
),
|
|
@@ -3525,7 +3522,7 @@ const sc = (d) => {
|
|
|
3525
3522
|
textarea: Fa,
|
|
3526
3523
|
length: Va
|
|
3527
3524
|
}, lc = (d) => {
|
|
3528
|
-
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = d, [l, o] =
|
|
3525
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = d, [l, o] = g.useState(s.length);
|
|
3529
3526
|
return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
|
|
3530
3527
|
e && /* @__PURE__ */ t.jsx(
|
|
3531
3528
|
"label",
|
|
@@ -3574,7 +3571,7 @@ export {
|
|
|
3574
3571
|
Wa as LayoutSettings,
|
|
3575
3572
|
ac as Link,
|
|
3576
3573
|
tc as ListingSelector,
|
|
3577
|
-
|
|
3574
|
+
mc as Loader,
|
|
3578
3575
|
Mt as Modal,
|
|
3579
3576
|
nc as PagesMobileMenu,
|
|
3580
3577
|
va as PagesMobileModal,
|
|
@@ -3584,7 +3581,7 @@ export {
|
|
|
3584
3581
|
qt as RangeSelector,
|
|
3585
3582
|
et as Select,
|
|
3586
3583
|
ic as ShareLink,
|
|
3587
|
-
|
|
3584
|
+
fa as ShoppingButton,
|
|
3588
3585
|
xa as ShoppingModalCart,
|
|
3589
3586
|
st as Switch,
|
|
3590
3587
|
Rt as TextSettings,
|