@billgangcom/theme-lib 1.123.5 → 1.123.6
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-C3dJm9Z0.cjs → builder--8Ry7cQ4.cjs} +2 -2
- package/dist/{builder-ByDXET1Y.js → builder-DJQh1c1e.js} +5 -5
- package/dist/{builder-components-UursaaCl.cjs → builder-components-Bgg9F62l.cjs} +1 -1
- package/dist/{builder-components-DSJHI2nu.js → builder-components-CpOz_SUG.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +23 -23
- package/dist/{charge-CV6CDlyS.cjs → charge-DywF6LWF.cjs} +1 -1
- package/dist/{charge-DqIKczKZ.js → charge-z48cLi-k.js} +6 -6
- package/dist/{checkout-4O6cOTX0.cjs → checkout-DTwC9CX7.cjs} +1 -1
- package/dist/{checkout-CpLxUTON.js → checkout-M3jKk4q6.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-DqTNA6ZA.cjs → index-9XqQn8Cq.cjs} +1 -1
- package/dist/{index-DM90koCO.cjs → index-BSrpJXEj.cjs} +1 -1
- package/dist/{index-grjjFhjk.js → index-BTjeATna.js} +1 -1
- package/dist/{index-CjZTkIzC.cjs → index-Bidor65E.cjs} +1 -1
- package/dist/{index-DyJO8nFm.js → index-CElp6y2B.js} +5 -5
- package/dist/{index-DUiPXMuo.js → index-CYANU9EG.js} +5 -5
- package/dist/{index-BsyHbaJG.js → index-CcM2U332.js} +2 -2
- package/dist/{index-DLPCB60C.js → index-CloS3B1y.js} +5 -5
- package/dist/{index-C2wWbxDq.cjs → index-D9rOdRq1.cjs} +1 -1
- package/dist/{index-B53jXp02.cjs → index-DD71JxVQ.cjs} +1 -1
- package/dist/{index-ZR7QDi-m.js → index-DHPgQ7DA.js} +5 -5
- package/dist/{index-r_f_fFTF.cjs → index-DO-nVcAG.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{order-moxkWNd6.cjs → order-2fi-ASUJ.cjs} +1 -1
- package/dist/{order-D3rU8IVq.js → order-P0fQ9MtH.js} +5 -5
- package/dist/src/ui/ItemsSettings/popup.d.ts +6 -1
- package/dist/{subscription-BFpuXkwj.cjs → subscription-BXILybzC.cjs} +1 -1
- package/dist/{subscription-B_y-731V.js → subscription-S3Q0J-LT.js} +5 -5
- package/dist/{ticket-DyOQCnLn.js → ticket-CF6WDvC5.js} +5 -5
- package/dist/{ticket-cyzamZMr.cjs → ticket-D67XjuXI.cjs} +1 -1
- package/dist/{top-up-DBqmwfD8.cjs → top-up-Cl5gOjYY.cjs} +1 -1
- package/dist/{top-up-CZwhTxBd.js → top-up-DkwIdCFZ.js} +5 -5
- package/dist/{ui-components-CP7ozRE2.js → ui-components-CNP0TL7h.js} +303 -288
- package/dist/ui-components-DnpGt0Lr.cjs +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-BUi4M8nH.js → validation-C8mTX1VQ.js} +5 -5
- package/dist/{validation-B8Uc_LfB.cjs → validation-CFXeO04y.cjs} +1 -1
- package/package.json +1 -1
- package/dist/ui-components-Xre_swDE.cjs +0 -1
|
@@ -3,11 +3,11 @@ var In = (e, n, o) => n in e ? mn(e, n, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ot = (e, n, o) => In(e, typeof n != "symbol" ? n + "" : n, o);
|
|
4
4
|
import { jsx as t, jsxs as d, Fragment as Y } from "react/jsx-runtime";
|
|
5
5
|
import _, { useState as st, useRef as ft, useCallback as Xe, useEffect as un, createElement as yt, PureComponent as gn } from "react";
|
|
6
|
-
import { f as R, ad as lt, z as xe, j as Qt, r as Zt, m as _t, ae as en, K as Pe, v as me, af as Dt, ag as Ft, b as Ye, l as fn, e as Ge, p as St, _ as Ce, a5 as _n, N as Sn, ah as bn, ai as tn, k as Cn } from "./builder-
|
|
7
|
-
import { X as yn, Y as vn, u as We, I as wn } from "./charge-
|
|
8
|
-
import { u as Je, d as Qe, D as Ze, e as et, v as tt, f as nt, g as ot, C as rt, F as Mt } from "./builder-components-
|
|
6
|
+
import { f as R, ad as lt, z as xe, j as Qt, r as Zt, m as _t, ae as en, K as Pe, v as me, af as Dt, ag as Ft, b as Ye, l as fn, e as Ge, p as St, _ as Ce, a5 as _n, N as Sn, ah as bn, ai as tn, k as Cn } from "./builder-DJQh1c1e.js";
|
|
7
|
+
import { X as yn, Y as vn, u as We, I as wn } from "./charge-z48cLi-k.js";
|
|
8
|
+
import { u as Je, d as Qe, D as Ze, e as et, v as tt, f as nt, g as ot, C as rt, F as Mt } from "./builder-components-CpOz_SUG.js";
|
|
9
9
|
import kn, { createPortal as Tn } from "react-dom";
|
|
10
|
-
import { s as Me, g as Nn, u as Pn } from "./ticket-
|
|
10
|
+
import { s as Me, g as Nn, u as Pn } from "./ticket-CF6WDvC5.js";
|
|
11
11
|
const An = "_wrapper_5w9s8_1", Ln = {
|
|
12
12
|
wrapper: An
|
|
13
13
|
}, Oh = (e) => {
|
|
@@ -134,7 +134,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
134
134
|
placeholder: p,
|
|
135
135
|
disabled: a = !1,
|
|
136
136
|
required: I = !1,
|
|
137
|
-
regex:
|
|
137
|
+
regex: S,
|
|
138
138
|
paddingless: u = !1,
|
|
139
139
|
borderless: g = !1,
|
|
140
140
|
editable: y = !1,
|
|
@@ -146,7 +146,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
146
146
|
return Number(O) < 0 ? String(l) : O;
|
|
147
147
|
}
|
|
148
148
|
function P(O) {
|
|
149
|
-
return !I || !
|
|
149
|
+
return !I || !S ? !0 : new RegExp(S).test(O);
|
|
150
150
|
}
|
|
151
151
|
return /* @__PURE__ */ d("div", { className: Ae.wrapper, children: [
|
|
152
152
|
r && /* @__PURE__ */ t(
|
|
@@ -257,7 +257,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
257
257
|
return "AlignBottom";
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
const [a, I] = _.useState(null), [
|
|
260
|
+
const [a, I] = _.useState(null), [S, u] = _.useState(null);
|
|
261
261
|
return /* @__PURE__ */ d("div", { className: Se.layout, children: [
|
|
262
262
|
/* @__PURE__ */ t("h3", { className: Se.title, children: "Layout (for Desktop version)" }),
|
|
263
263
|
/* @__PURE__ */ d("div", { className: Se.alignmentContent, children: [
|
|
@@ -307,7 +307,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
307
307
|
"label",
|
|
308
308
|
{
|
|
309
309
|
className: R(Se.padding, {
|
|
310
|
-
[Se.active]:
|
|
310
|
+
[Se.active]: S === g
|
|
311
311
|
}),
|
|
312
312
|
onFocus: () => {
|
|
313
313
|
u(g);
|
|
@@ -453,7 +453,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
453
453
|
const l = i();
|
|
454
454
|
l.every((h) => h) && c(l);
|
|
455
455
|
}, []), /* @__PURE__ */ t(
|
|
456
|
-
|
|
456
|
+
_e,
|
|
457
457
|
{
|
|
458
458
|
label: "Type Text",
|
|
459
459
|
options: Object.values(lt),
|
|
@@ -515,14 +515,14 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
515
515
|
subtitle: p = "Items",
|
|
516
516
|
typeFont: a,
|
|
517
517
|
setTypeFont: I,
|
|
518
|
-
alignText:
|
|
518
|
+
alignText: S,
|
|
519
519
|
setAlignText: u
|
|
520
520
|
} = e, { isAntistock: g } = xe();
|
|
521
521
|
return /* @__PURE__ */ d("div", { className: Ee.text, children: [
|
|
522
522
|
(h || o !== void 0) && /* @__PURE__ */ d("div", { className: Ee.top, children: [
|
|
523
523
|
h && /* @__PURE__ */ t("h3", { className: Ee.title, children: h }),
|
|
524
524
|
o !== void 0 && r && /* @__PURE__ */ t(
|
|
525
|
-
|
|
525
|
+
ue,
|
|
526
526
|
{
|
|
527
527
|
current: o,
|
|
528
528
|
onChange: (y) => r(y)
|
|
@@ -549,7 +549,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
549
549
|
/* @__PURE__ */ t(
|
|
550
550
|
yo,
|
|
551
551
|
{
|
|
552
|
-
alignText:
|
|
552
|
+
alignText: S,
|
|
553
553
|
setAlignText: u
|
|
554
554
|
}
|
|
555
555
|
)
|
|
@@ -639,7 +639,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
639
639
|
disabled: i = !1,
|
|
640
640
|
type: l = "Primary",
|
|
641
641
|
dangerouslySetInnerHTML: h
|
|
642
|
-
} = e, { themeSettings: p } = _t(), { isAntistock: a } = xe(), I = (s) => typeof s == "string" ? /* @__PURE__ */ t(yn, { children: s }) : s,
|
|
642
|
+
} = e, { themeSettings: p } = _t(), { isAntistock: a } = xe(), I = (s) => typeof s == "string" ? /* @__PURE__ */ t(yn, { children: s }) : s, S = {
|
|
643
643
|
onClick: o,
|
|
644
644
|
disabled: i,
|
|
645
645
|
style: r,
|
|
@@ -658,7 +658,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
658
658
|
return /* @__PURE__ */ t(
|
|
659
659
|
"button",
|
|
660
660
|
{
|
|
661
|
-
...
|
|
661
|
+
...S,
|
|
662
662
|
className: we.special,
|
|
663
663
|
...h ? { dangerouslySetInnerHTML: h } : { children: I(n) }
|
|
664
664
|
}
|
|
@@ -678,7 +678,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
678
678
|
return /* @__PURE__ */ t(
|
|
679
679
|
"button",
|
|
680
680
|
{
|
|
681
|
-
...
|
|
681
|
+
...S,
|
|
682
682
|
style: {
|
|
683
683
|
...r,
|
|
684
684
|
textAlign: g.alignment
|
|
@@ -747,7 +747,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
747
747
|
const { setOpenModal: e, onChange: n, tip: o, setTip: r } = en(), { setIsOpen: c } = Pe(), [i, l] = _.useState(!1), h = () => {
|
|
748
748
|
var C;
|
|
749
749
|
(C = p.current) == null || C.click();
|
|
750
|
-
}, p = _.useRef(null), [a, I] = _.useState([]), [
|
|
750
|
+
}, p = _.useRef(null), [a, I] = _.useState([]), [S, u] = _.useState(!1), g = async (C) => {
|
|
751
751
|
var M;
|
|
752
752
|
const k = ((M = C.target.files) == null ? void 0 : M[0]) || null;
|
|
753
753
|
if (!k) return;
|
|
@@ -867,7 +867,7 @@ const Mn = "_block_kh9z8_8", $n = "_title_kh9z8_16", On = "_subtitle_kh9z8_23",
|
|
|
867
867
|
]
|
|
868
868
|
}
|
|
869
869
|
),
|
|
870
|
-
|
|
870
|
+
S && /* @__PURE__ */ t(Et, {}),
|
|
871
871
|
a.map((C) => /* @__PURE__ */ t(
|
|
872
872
|
Sr,
|
|
873
873
|
{
|
|
@@ -997,11 +997,11 @@ const br = _.forwardRef(
|
|
|
997
997
|
label: "Put up an attractive image",
|
|
998
998
|
activeImage: o[a.field],
|
|
999
999
|
onChange: (I) => {
|
|
1000
|
-
const
|
|
1000
|
+
const S = {
|
|
1001
1001
|
...o,
|
|
1002
1002
|
[a.field]: I
|
|
1003
1003
|
};
|
|
1004
|
-
r(
|
|
1004
|
+
r(S);
|
|
1005
1005
|
}
|
|
1006
1006
|
},
|
|
1007
1007
|
String(a.field)
|
|
@@ -1013,37 +1013,37 @@ const br = _.forwardRef(
|
|
|
1013
1013
|
isActiveText: !0,
|
|
1014
1014
|
typesText: o[a.field.type],
|
|
1015
1015
|
setTypesText: (I) => {
|
|
1016
|
-
const
|
|
1016
|
+
const S = {
|
|
1017
1017
|
...o,
|
|
1018
1018
|
[a.field.type]: I
|
|
1019
1019
|
};
|
|
1020
|
-
r(
|
|
1020
|
+
r(S);
|
|
1021
1021
|
},
|
|
1022
1022
|
alignText: o[a.field.alignText],
|
|
1023
1023
|
setAlignText: (I) => {
|
|
1024
|
-
const
|
|
1024
|
+
const S = {
|
|
1025
1025
|
...o,
|
|
1026
1026
|
[a.field.alignText]: I
|
|
1027
1027
|
};
|
|
1028
|
-
r(
|
|
1028
|
+
r(S);
|
|
1029
1029
|
},
|
|
1030
1030
|
text: o[a.field.text]["en-US"] || "",
|
|
1031
1031
|
setText: (I) => {
|
|
1032
|
-
const
|
|
1032
|
+
const S = {
|
|
1033
1033
|
...o,
|
|
1034
1034
|
[a.field.text]: {
|
|
1035
1035
|
"en-US": I
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
|
-
r(
|
|
1038
|
+
r(S);
|
|
1039
1039
|
},
|
|
1040
1040
|
typeFont: o[a.field.typeFont],
|
|
1041
1041
|
setTypeFont: (I) => {
|
|
1042
|
-
const
|
|
1042
|
+
const S = {
|
|
1043
1043
|
...o,
|
|
1044
1044
|
[a.field.typeFont]: I
|
|
1045
1045
|
};
|
|
1046
|
-
r(
|
|
1046
|
+
r(S);
|
|
1047
1047
|
},
|
|
1048
1048
|
subtitle: a.label
|
|
1049
1049
|
}
|
|
@@ -1053,11 +1053,11 @@ const br = _.forwardRef(
|
|
|
1053
1053
|
ye,
|
|
1054
1054
|
{
|
|
1055
1055
|
onChange: (I) => {
|
|
1056
|
-
const
|
|
1056
|
+
const S = {
|
|
1057
1057
|
...o,
|
|
1058
1058
|
[a.field]: I
|
|
1059
1059
|
};
|
|
1060
|
-
r(
|
|
1060
|
+
r(S);
|
|
1061
1061
|
},
|
|
1062
1062
|
value: o[a.field] || "",
|
|
1063
1063
|
label: a.label,
|
|
@@ -1070,11 +1070,11 @@ const br = _.forwardRef(
|
|
|
1070
1070
|
ye,
|
|
1071
1071
|
{
|
|
1072
1072
|
onChange: (I) => {
|
|
1073
|
-
const
|
|
1073
|
+
const S = {
|
|
1074
1074
|
...o,
|
|
1075
1075
|
[a.field.text]: I
|
|
1076
1076
|
};
|
|
1077
|
-
r(
|
|
1077
|
+
r(S);
|
|
1078
1078
|
},
|
|
1079
1079
|
value: o[a.field.text] || "",
|
|
1080
1080
|
label: a.inputLabel,
|
|
@@ -1082,31 +1082,46 @@ const br = _.forwardRef(
|
|
|
1082
1082
|
}
|
|
1083
1083
|
),
|
|
1084
1084
|
/* @__PURE__ */ t(
|
|
1085
|
-
|
|
1085
|
+
ue,
|
|
1086
1086
|
{
|
|
1087
1087
|
current: !!o[a.field.switch] || !1,
|
|
1088
1088
|
label: a.switchLabel,
|
|
1089
1089
|
onChange: (I) => {
|
|
1090
|
-
const
|
|
1090
|
+
const S = {
|
|
1091
1091
|
...o,
|
|
1092
1092
|
[a.field.switch]: I
|
|
1093
1093
|
};
|
|
1094
|
-
r(
|
|
1094
|
+
r(S);
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
1097
|
)
|
|
1098
1098
|
] });
|
|
1099
|
+
if (a.type === "Switch")
|
|
1100
|
+
return /* @__PURE__ */ t(
|
|
1101
|
+
ue,
|
|
1102
|
+
{
|
|
1103
|
+
current: !!o[a.field] || !1,
|
|
1104
|
+
label: a.label,
|
|
1105
|
+
onChange: (I) => {
|
|
1106
|
+
const S = {
|
|
1107
|
+
...o,
|
|
1108
|
+
[a.field]: I
|
|
1109
|
+
};
|
|
1110
|
+
r(S);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
);
|
|
1099
1114
|
if (a.type === "list")
|
|
1100
1115
|
return /* @__PURE__ */ t(
|
|
1101
1116
|
kr,
|
|
1102
1117
|
{
|
|
1103
1118
|
items: o[a.field] || [],
|
|
1104
1119
|
setItems: (I) => {
|
|
1105
|
-
const
|
|
1120
|
+
const S = {
|
|
1106
1121
|
...o,
|
|
1107
1122
|
[a.field]: I
|
|
1108
1123
|
};
|
|
1109
|
-
r(
|
|
1124
|
+
r(S);
|
|
1110
1125
|
},
|
|
1111
1126
|
itemsType: "select",
|
|
1112
1127
|
draggable: a.draggable || !1,
|
|
@@ -1120,15 +1135,15 @@ const br = _.forwardRef(
|
|
|
1120
1135
|
);
|
|
1121
1136
|
if (a.type === "select")
|
|
1122
1137
|
return /* @__PURE__ */ t(
|
|
1123
|
-
|
|
1138
|
+
_e,
|
|
1124
1139
|
{
|
|
1125
1140
|
options: a.itemsOptions,
|
|
1126
1141
|
onChange: (I) => {
|
|
1127
|
-
const
|
|
1142
|
+
const S = {
|
|
1128
1143
|
...o,
|
|
1129
1144
|
[a.field]: I
|
|
1130
1145
|
};
|
|
1131
|
-
r(
|
|
1146
|
+
r(S);
|
|
1132
1147
|
},
|
|
1133
1148
|
label: a.label,
|
|
1134
1149
|
value: o[a.field] || "String",
|
|
@@ -1137,11 +1152,11 @@ const br = _.forwardRef(
|
|
|
1137
1152
|
value: !!o[a.switcher],
|
|
1138
1153
|
onChange: (I) => {
|
|
1139
1154
|
if (a.switcher === "isActive") {
|
|
1140
|
-
const
|
|
1155
|
+
const S = {
|
|
1141
1156
|
...o,
|
|
1142
1157
|
[a.switcher]: I
|
|
1143
1158
|
};
|
|
1144
|
-
r(
|
|
1159
|
+
r(S);
|
|
1145
1160
|
}
|
|
1146
1161
|
}
|
|
1147
1162
|
} : void 0
|
|
@@ -1153,11 +1168,11 @@ const br = _.forwardRef(
|
|
|
1153
1168
|
{
|
|
1154
1169
|
typeFont: o[a.field],
|
|
1155
1170
|
setTypeFont: (I) => {
|
|
1156
|
-
const
|
|
1171
|
+
const S = {
|
|
1157
1172
|
...o,
|
|
1158
1173
|
[a.field]: I
|
|
1159
1174
|
};
|
|
1160
|
-
r(
|
|
1175
|
+
r(S);
|
|
1161
1176
|
}
|
|
1162
1177
|
}
|
|
1163
1178
|
);
|
|
@@ -1167,11 +1182,11 @@ const br = _.forwardRef(
|
|
|
1167
1182
|
{
|
|
1168
1183
|
options: a.itemsOptions,
|
|
1169
1184
|
onChange: (I) => {
|
|
1170
|
-
const
|
|
1185
|
+
const S = {
|
|
1171
1186
|
...o,
|
|
1172
1187
|
[a.field]: I
|
|
1173
1188
|
};
|
|
1174
|
-
r(
|
|
1189
|
+
r(S);
|
|
1175
1190
|
},
|
|
1176
1191
|
label: a.label,
|
|
1177
1192
|
value: o[a.field] || "String",
|
|
@@ -1181,11 +1196,11 @@ const br = _.forwardRef(
|
|
|
1181
1196
|
value: !!o[a.switcher],
|
|
1182
1197
|
onChange: (I) => {
|
|
1183
1198
|
if (a.switcher === "isActive") {
|
|
1184
|
-
const
|
|
1199
|
+
const S = {
|
|
1185
1200
|
...o,
|
|
1186
1201
|
[a.switcher]: I
|
|
1187
1202
|
};
|
|
1188
|
-
r(
|
|
1203
|
+
r(S);
|
|
1189
1204
|
}
|
|
1190
1205
|
}
|
|
1191
1206
|
} : void 0
|
|
@@ -1205,7 +1220,7 @@ const br = _.forwardRef(
|
|
|
1205
1220
|
return /* @__PURE__ */ d("div", { className: Tt.other, children: [
|
|
1206
1221
|
/* @__PURE__ */ t("h5", { className: Tt.subtitle, children: o || r }),
|
|
1207
1222
|
/* @__PURE__ */ t("div", { className: Tt.items, children: n.map((c, i) => /* @__PURE__ */ t(
|
|
1208
|
-
|
|
1223
|
+
ue,
|
|
1209
1224
|
{
|
|
1210
1225
|
current: c.isItem,
|
|
1211
1226
|
onChange: (l) => c.setIsItem(l),
|
|
@@ -1255,7 +1270,7 @@ const kr = (e) => {
|
|
|
1255
1270
|
editable: p = !0,
|
|
1256
1271
|
draggable: a = !1,
|
|
1257
1272
|
withImage: I = !1,
|
|
1258
|
-
deletable:
|
|
1273
|
+
deletable: S = !0,
|
|
1259
1274
|
addable: u = !0,
|
|
1260
1275
|
itemsType: g,
|
|
1261
1276
|
itemsPlaceholder: y = "",
|
|
@@ -1268,7 +1283,7 @@ const kr = (e) => {
|
|
|
1268
1283
|
autoInterval: P,
|
|
1269
1284
|
tip: O,
|
|
1270
1285
|
aspectRatio: M,
|
|
1271
|
-
setAspectRatio:
|
|
1286
|
+
setAspectRatio: b
|
|
1272
1287
|
} = e, [L, x] = _.useState(null), [G, v] = _.useState({
|
|
1273
1288
|
top: 0,
|
|
1274
1289
|
left: 0
|
|
@@ -1351,12 +1366,12 @@ const kr = (e) => {
|
|
|
1351
1366
|
}
|
|
1352
1367
|
) }),
|
|
1353
1368
|
g === "select" && s && /* @__PURE__ */ t(
|
|
1354
|
-
|
|
1369
|
+
_e,
|
|
1355
1370
|
{
|
|
1356
1371
|
onChange: (E) => {
|
|
1357
1372
|
const J = [...r], Ie = s.find((ie) => ie.name["en-US"] === E);
|
|
1358
1373
|
if (!Ie) return;
|
|
1359
|
-
const
|
|
1374
|
+
const ge = J.map((ie) => ie.id === D.id ? {
|
|
1360
1375
|
...Ie,
|
|
1361
1376
|
name: {
|
|
1362
1377
|
"en-US": E
|
|
@@ -1367,7 +1382,7 @@ const kr = (e) => {
|
|
|
1367
1382
|
name: {
|
|
1368
1383
|
"en-US": E
|
|
1369
1384
|
}
|
|
1370
|
-
}), c([...
|
|
1385
|
+
}), c([...ge]);
|
|
1371
1386
|
},
|
|
1372
1387
|
value: D.name["en-US"],
|
|
1373
1388
|
options: s.filter((E) => !r.find((J) => J.name["en-US"] === E.name["en-US"])).map((E) => E.name["en-US"]),
|
|
@@ -1387,7 +1402,7 @@ const kr = (e) => {
|
|
|
1387
1402
|
onChange: (E) => {
|
|
1388
1403
|
const J = [...r], Ie = s.find((ie) => ie.name["en-US"] === E);
|
|
1389
1404
|
if (!Ie) return;
|
|
1390
|
-
const
|
|
1405
|
+
const ge = J.map((ie) => ie.id === D.id ? {
|
|
1391
1406
|
...Ie,
|
|
1392
1407
|
name: {
|
|
1393
1408
|
"en-US": E
|
|
@@ -1398,7 +1413,7 @@ const kr = (e) => {
|
|
|
1398
1413
|
name: {
|
|
1399
1414
|
"en-US": E
|
|
1400
1415
|
}
|
|
1401
|
-
}), c([...
|
|
1416
|
+
}), c([...ge]);
|
|
1402
1417
|
},
|
|
1403
1418
|
value: D.name["en-US"],
|
|
1404
1419
|
options: s.filter((E) => !r.find((J) => J.name["en-US"] === E.name["en-US"])).map((E) => E.name["en-US"]),
|
|
@@ -1415,12 +1430,12 @@ const kr = (e) => {
|
|
|
1415
1430
|
ye,
|
|
1416
1431
|
{
|
|
1417
1432
|
onChange: (E) => {
|
|
1418
|
-
const Ie = [...r].map((
|
|
1433
|
+
const Ie = [...r].map((ge) => ge.id === D.id ? {
|
|
1419
1434
|
...D,
|
|
1420
1435
|
name: {
|
|
1421
1436
|
"en-US": E
|
|
1422
1437
|
}
|
|
1423
|
-
} :
|
|
1438
|
+
} : ge);
|
|
1424
1439
|
c([...Ie]);
|
|
1425
1440
|
},
|
|
1426
1441
|
value: D.name["en-US"],
|
|
@@ -1431,10 +1446,10 @@ const kr = (e) => {
|
|
|
1431
1446
|
it,
|
|
1432
1447
|
{
|
|
1433
1448
|
onChange: (E) => {
|
|
1434
|
-
const Ie = [...r].map((
|
|
1449
|
+
const Ie = [...r].map((ge) => ge.id === D.id ? {
|
|
1435
1450
|
...D,
|
|
1436
1451
|
images: E
|
|
1437
|
-
} :
|
|
1452
|
+
} : ge);
|
|
1438
1453
|
c([...Ie]);
|
|
1439
1454
|
},
|
|
1440
1455
|
activeImage: (ae = r.find((E) => E.id === D.id)) != null && ae.images ? (ve = r.find((E) => E.id === D.id)) == null ? void 0 : ve.images[0] : void 0,
|
|
@@ -1466,7 +1481,7 @@ const kr = (e) => {
|
|
|
1466
1481
|
}
|
|
1467
1482
|
}
|
|
1468
1483
|
) }),
|
|
1469
|
-
|
|
1484
|
+
S && /* @__PURE__ */ t("div", { className: re.deleteButton, children: /* @__PURE__ */ t(
|
|
1470
1485
|
A,
|
|
1471
1486
|
{
|
|
1472
1487
|
name: "Trash",
|
|
@@ -1500,7 +1515,7 @@ const kr = (e) => {
|
|
|
1500
1515
|
(l || n !== void 0) && /* @__PURE__ */ d("div", { className: re.top, children: [
|
|
1501
1516
|
l && /* @__PURE__ */ t("h3", { className: re.title, children: l }),
|
|
1502
1517
|
n !== void 0 && /* @__PURE__ */ t(
|
|
1503
|
-
|
|
1518
|
+
ue,
|
|
1504
1519
|
{
|
|
1505
1520
|
current: n,
|
|
1506
1521
|
onChange: (D) => o == null ? void 0 : o(D)
|
|
@@ -1600,13 +1615,13 @@ const kr = (e) => {
|
|
|
1600
1615
|
}
|
|
1601
1616
|
)
|
|
1602
1617
|
] }),
|
|
1603
|
-
M &&
|
|
1604
|
-
|
|
1618
|
+
M && b && /* @__PURE__ */ t(
|
|
1619
|
+
_e,
|
|
1605
1620
|
{
|
|
1606
1621
|
value: M,
|
|
1607
1622
|
label: "Aspect Ratio",
|
|
1608
1623
|
options: Object.keys(Ft),
|
|
1609
|
-
onChange: (D) =>
|
|
1624
|
+
onChange: (D) => b(D),
|
|
1610
1625
|
leftAddonOptions: Dt
|
|
1611
1626
|
}
|
|
1612
1627
|
),
|
|
@@ -1731,7 +1746,7 @@ const zh = (e) => {
|
|
|
1731
1746
|
subtitle: p,
|
|
1732
1747
|
draggable: a = !1,
|
|
1733
1748
|
withImage: I = !1,
|
|
1734
|
-
addable:
|
|
1749
|
+
addable: S = !0,
|
|
1735
1750
|
itemsOptions: u,
|
|
1736
1751
|
hasRangeSelector: g = !1,
|
|
1737
1752
|
rangeSelectorOptions: y,
|
|
@@ -1746,8 +1761,8 @@ const zh = (e) => {
|
|
|
1746
1761
|
distance: 5
|
|
1747
1762
|
}
|
|
1748
1763
|
})
|
|
1749
|
-
), P = (
|
|
1750
|
-
const { active: L, over: x } =
|
|
1764
|
+
), P = (b) => {
|
|
1765
|
+
const { active: L, over: x } = b;
|
|
1751
1766
|
if (x && L.id !== x.id) {
|
|
1752
1767
|
const G = r.findIndex((N) => N === L.id), v = r.findIndex((N) => N === x.id);
|
|
1753
1768
|
if (G !== -1 && v !== -1) {
|
|
@@ -1756,12 +1771,12 @@ const zh = (e) => {
|
|
|
1756
1771
|
}
|
|
1757
1772
|
}
|
|
1758
1773
|
};
|
|
1759
|
-
function O(
|
|
1774
|
+
function O(b) {
|
|
1760
1775
|
if (I)
|
|
1761
|
-
return
|
|
1776
|
+
return b ? /* @__PURE__ */ t(
|
|
1762
1777
|
"img",
|
|
1763
1778
|
{
|
|
1764
|
-
src: `https://imagedelivery.net/${
|
|
1779
|
+
src: `https://imagedelivery.net/${b[0]}/w=1000`,
|
|
1765
1780
|
alt: "image",
|
|
1766
1781
|
width: 16,
|
|
1767
1782
|
height: 16
|
|
@@ -1776,8 +1791,8 @@ const zh = (e) => {
|
|
|
1776
1791
|
}
|
|
1777
1792
|
);
|
|
1778
1793
|
}
|
|
1779
|
-
const M = (
|
|
1780
|
-
const x = u.find((v) => v.id ===
|
|
1794
|
+
const M = (b, L = !1) => {
|
|
1795
|
+
const x = u.find((v) => v.id === b);
|
|
1781
1796
|
if (!x) return;
|
|
1782
1797
|
const G = /* @__PURE__ */ d(Y, { children: [
|
|
1783
1798
|
a && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -1790,12 +1805,12 @@ const zh = (e) => {
|
|
|
1790
1805
|
}
|
|
1791
1806
|
) }),
|
|
1792
1807
|
/* @__PURE__ */ t(
|
|
1793
|
-
|
|
1808
|
+
_e,
|
|
1794
1809
|
{
|
|
1795
1810
|
onChange: (v) => {
|
|
1796
1811
|
const N = [...r], U = u.find((T) => T.name === v);
|
|
1797
1812
|
if (!U) return;
|
|
1798
|
-
const H = U.id, B = N.map((T) => T ===
|
|
1813
|
+
const H = U.id, B = N.map((T) => T === b ? H : T);
|
|
1799
1814
|
c([...B]);
|
|
1800
1815
|
},
|
|
1801
1816
|
value: x.name,
|
|
@@ -1814,14 +1829,14 @@ const zh = (e) => {
|
|
|
1814
1829
|
width: 20,
|
|
1815
1830
|
height: 20,
|
|
1816
1831
|
fill: "#C12A2A",
|
|
1817
|
-
onClick: () => c(r.filter((v) => v !==
|
|
1832
|
+
onClick: () => c(r.filter((v) => v !== b))
|
|
1818
1833
|
}
|
|
1819
1834
|
) }) })
|
|
1820
1835
|
] });
|
|
1821
1836
|
return a ? /* @__PURE__ */ t(
|
|
1822
1837
|
zr,
|
|
1823
1838
|
{
|
|
1824
|
-
id:
|
|
1839
|
+
id: b,
|
|
1825
1840
|
children: G
|
|
1826
1841
|
},
|
|
1827
1842
|
me()
|
|
@@ -1838,10 +1853,10 @@ const zh = (e) => {
|
|
|
1838
1853
|
(h || n !== void 0) && /* @__PURE__ */ d("div", { className: be.top, children: [
|
|
1839
1854
|
h && /* @__PURE__ */ t("h3", { className: be.title, children: h }),
|
|
1840
1855
|
n !== void 0 && /* @__PURE__ */ t(
|
|
1841
|
-
|
|
1856
|
+
ue,
|
|
1842
1857
|
{
|
|
1843
1858
|
current: n,
|
|
1844
|
-
onChange: (
|
|
1859
|
+
onChange: (b) => o == null ? void 0 : o(b)
|
|
1845
1860
|
}
|
|
1846
1861
|
)
|
|
1847
1862
|
] }),
|
|
@@ -1858,12 +1873,12 @@ const zh = (e) => {
|
|
|
1858
1873
|
{
|
|
1859
1874
|
items: r,
|
|
1860
1875
|
strategy: tt,
|
|
1861
|
-
children: r.map((
|
|
1876
|
+
children: r.map((b) => M(b, m))
|
|
1862
1877
|
}
|
|
1863
1878
|
)
|
|
1864
1879
|
}
|
|
1865
|
-
) : r.map((
|
|
1866
|
-
|
|
1880
|
+
) : r.map((b) => M(b, m)),
|
|
1881
|
+
S && /* @__PURE__ */ t(
|
|
1867
1882
|
"div",
|
|
1868
1883
|
{
|
|
1869
1884
|
style: {
|
|
@@ -1882,7 +1897,7 @@ const zh = (e) => {
|
|
|
1882
1897
|
size: "s",
|
|
1883
1898
|
disabled: !!(s && s <= r.length || r.length === u.length),
|
|
1884
1899
|
onClick: () => {
|
|
1885
|
-
const
|
|
1900
|
+
const b = [...r];
|
|
1886
1901
|
let L = null;
|
|
1887
1902
|
if (u) {
|
|
1888
1903
|
for (let x = 0; x < u.length; x++)
|
|
@@ -1891,7 +1906,7 @@ const zh = (e) => {
|
|
|
1891
1906
|
break;
|
|
1892
1907
|
}
|
|
1893
1908
|
}
|
|
1894
|
-
|
|
1909
|
+
b.push((L == null ? void 0 : L.id) || u[0].id), c(b);
|
|
1895
1910
|
},
|
|
1896
1911
|
style: {
|
|
1897
1912
|
width: "fit-content"
|
|
@@ -1913,12 +1928,12 @@ const zh = (e) => {
|
|
|
1913
1928
|
)
|
|
1914
1929
|
] }),
|
|
1915
1930
|
C && k && /* @__PURE__ */ t(
|
|
1916
|
-
|
|
1931
|
+
_e,
|
|
1917
1932
|
{
|
|
1918
1933
|
value: C,
|
|
1919
1934
|
label: "Aspect Ratio",
|
|
1920
1935
|
options: Object.keys(Ft),
|
|
1921
|
-
onChange: (
|
|
1936
|
+
onChange: (b) => k(b),
|
|
1922
1937
|
leftAddonOptions: Dt
|
|
1923
1938
|
}
|
|
1924
1939
|
),
|
|
@@ -1942,7 +1957,7 @@ const zh = (e) => {
|
|
|
1942
1957
|
label: "Auto scroll interval",
|
|
1943
1958
|
type: "number",
|
|
1944
1959
|
value: String(f.scrollInterval),
|
|
1945
|
-
onChange: (
|
|
1960
|
+
onChange: (b) => f.setScrollInterval(Number(b)),
|
|
1946
1961
|
min: 0.1,
|
|
1947
1962
|
max: 100,
|
|
1948
1963
|
style: {
|
|
@@ -1952,7 +1967,7 @@ const zh = (e) => {
|
|
|
1952
1967
|
}
|
|
1953
1968
|
)
|
|
1954
1969
|
] });
|
|
1955
|
-
}, Gr = "_title_11ar5_1", Wr = "_subtitle_11ar5_5", Vr = "_productsBlock_11ar5_14", jr = "_top_11ar5_26", Xr = "_products_11ar5_14", Kr = "_product_11ar5_14", Yr = "_button_11ar5_80", Jr = "_disabled_11ar5_91", Qr = "_buttons_11ar5_118", Zr = "_addButton_11ar5_164", ei = "_deleteButton_11ar5_179",
|
|
1970
|
+
}, Gr = "_title_11ar5_1", Wr = "_subtitle_11ar5_5", Vr = "_productsBlock_11ar5_14", jr = "_top_11ar5_26", Xr = "_products_11ar5_14", Kr = "_product_11ar5_14", Yr = "_button_11ar5_80", Jr = "_disabled_11ar5_91", Qr = "_buttons_11ar5_118", Zr = "_addButton_11ar5_164", ei = "_deleteButton_11ar5_179", fe = {
|
|
1956
1971
|
title: Gr,
|
|
1957
1972
|
subtitle: Wr,
|
|
1958
1973
|
productsBlock: Vr,
|
|
@@ -1984,7 +1999,7 @@ function ti({ product: e, children: n }) {
|
|
|
1984
1999
|
{
|
|
1985
2000
|
ref: c,
|
|
1986
2001
|
style: p,
|
|
1987
|
-
className: `${
|
|
2002
|
+
className: `${fe.product} ${h ? fe.dragging : ""}`,
|
|
1988
2003
|
...o,
|
|
1989
2004
|
...r,
|
|
1990
2005
|
children: n
|
|
@@ -2003,7 +2018,7 @@ const Gh = (e) => {
|
|
|
2003
2018
|
draggable: p = !1,
|
|
2004
2019
|
deletable: a = !0,
|
|
2005
2020
|
addable: I = !0,
|
|
2006
|
-
itemsType:
|
|
2021
|
+
itemsType: S,
|
|
2007
2022
|
itemsOptions: u,
|
|
2008
2023
|
addableOptions: g = {},
|
|
2009
2024
|
limit: y
|
|
@@ -2016,21 +2031,21 @@ const Gh = (e) => {
|
|
|
2016
2031
|
);
|
|
2017
2032
|
_.useEffect(() => {
|
|
2018
2033
|
if (s) {
|
|
2019
|
-
const
|
|
2020
|
-
c(
|
|
2034
|
+
const b = [...r].map((L) => L.id === s.id ? s : L);
|
|
2035
|
+
c(b);
|
|
2021
2036
|
}
|
|
2022
2037
|
}, [s]), _.useEffect(() => {
|
|
2023
2038
|
k.current && m && (k.current.getBoundingClientRect().height, m.top);
|
|
2024
2039
|
}, [k.current, m]);
|
|
2025
|
-
const P = (
|
|
2026
|
-
|
|
2027
|
-
const x =
|
|
2040
|
+
const P = (b, L) => {
|
|
2041
|
+
b.stopPropagation();
|
|
2042
|
+
const x = b.target.getBoundingClientRect();
|
|
2028
2043
|
C({
|
|
2029
2044
|
top: x.top + window.scrollY,
|
|
2030
2045
|
left: x.left - 30
|
|
2031
2046
|
}), f(L);
|
|
2032
|
-
}, O = (
|
|
2033
|
-
const { active: L, over: x } =
|
|
2047
|
+
}, O = (b) => {
|
|
2048
|
+
const { active: L, over: x } = b;
|
|
2034
2049
|
if (x && L.id !== x.id) {
|
|
2035
2050
|
const G = r.findIndex((N) => N.id === L.id), v = r.findIndex((N) => N.id === x.id);
|
|
2036
2051
|
if (G !== -1 && v !== -1) {
|
|
@@ -2038,7 +2053,7 @@ const Gh = (e) => {
|
|
|
2038
2053
|
N.splice(v, 0, U), c(N);
|
|
2039
2054
|
}
|
|
2040
2055
|
}
|
|
2041
|
-
}, M = (
|
|
2056
|
+
}, M = (b, L) => {
|
|
2042
2057
|
const x = /* @__PURE__ */ d(Y, { children: [
|
|
2043
2058
|
p && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
2044
2059
|
A,
|
|
@@ -2049,41 +2064,41 @@ const Gh = (e) => {
|
|
|
2049
2064
|
height: 20
|
|
2050
2065
|
}
|
|
2051
2066
|
) }),
|
|
2052
|
-
|
|
2053
|
-
|
|
2067
|
+
S === "select" && u && /* @__PURE__ */ t(
|
|
2068
|
+
_e,
|
|
2054
2069
|
{
|
|
2055
2070
|
onChange: (G) => {
|
|
2056
2071
|
const v = [...r], N = u.find((H) => H.name === G);
|
|
2057
2072
|
if (!N) return;
|
|
2058
|
-
const U = v.map((H) => H.id ===
|
|
2073
|
+
const U = v.map((H) => H.id === b.id ? {
|
|
2059
2074
|
...N,
|
|
2060
2075
|
name: {
|
|
2061
2076
|
"en-US": G
|
|
2062
2077
|
}
|
|
2063
2078
|
} : H);
|
|
2064
2079
|
f({
|
|
2065
|
-
...
|
|
2080
|
+
...b,
|
|
2066
2081
|
name: {
|
|
2067
2082
|
"en-US": G
|
|
2068
2083
|
}
|
|
2069
2084
|
}), c([...U]);
|
|
2070
2085
|
},
|
|
2071
|
-
value:
|
|
2086
|
+
value: b.name,
|
|
2072
2087
|
options: u.filter((G) => !r.find((v) => v.name === G.name)).map((G) => G.name)
|
|
2073
2088
|
}
|
|
2074
2089
|
),
|
|
2075
|
-
/* @__PURE__ */ d("div", { className:
|
|
2076
|
-
h && /* @__PURE__ */ t("div", { className:
|
|
2090
|
+
/* @__PURE__ */ d("div", { className: fe.buttons, children: [
|
|
2091
|
+
h && /* @__PURE__ */ t("div", { className: fe.deleteButton, children: /* @__PURE__ */ t(
|
|
2077
2092
|
A,
|
|
2078
2093
|
{
|
|
2079
2094
|
name: "Sliders",
|
|
2080
2095
|
hoverable: !0,
|
|
2081
2096
|
width: 20,
|
|
2082
2097
|
height: 20,
|
|
2083
|
-
onClick: (G) => P(G,
|
|
2098
|
+
onClick: (G) => P(G, b)
|
|
2084
2099
|
}
|
|
2085
2100
|
) }),
|
|
2086
|
-
a && /* @__PURE__ */ t("div", { className:
|
|
2101
|
+
a && /* @__PURE__ */ t("div", { className: fe.deleteButton, children: /* @__PURE__ */ t(
|
|
2087
2102
|
A,
|
|
2088
2103
|
{
|
|
2089
2104
|
name: "Trash",
|
|
@@ -2091,7 +2106,7 @@ const Gh = (e) => {
|
|
|
2091
2106
|
width: 20,
|
|
2092
2107
|
height: 20,
|
|
2093
2108
|
fill: "#C12A2A",
|
|
2094
|
-
onClick: () => c(r.filter((G) => G.id !==
|
|
2109
|
+
onClick: () => c(r.filter((G) => G.id !== b.id))
|
|
2095
2110
|
}
|
|
2096
2111
|
) })
|
|
2097
2112
|
] })
|
|
@@ -2099,33 +2114,33 @@ const Gh = (e) => {
|
|
|
2099
2114
|
return p ? /* @__PURE__ */ t(
|
|
2100
2115
|
ti,
|
|
2101
2116
|
{
|
|
2102
|
-
product:
|
|
2117
|
+
product: b,
|
|
2103
2118
|
index: L,
|
|
2104
2119
|
children: x
|
|
2105
2120
|
},
|
|
2106
|
-
|
|
2121
|
+
b.id
|
|
2107
2122
|
) : /* @__PURE__ */ t(
|
|
2108
2123
|
"div",
|
|
2109
2124
|
{
|
|
2110
|
-
className:
|
|
2125
|
+
className: fe.product,
|
|
2111
2126
|
children: x
|
|
2112
2127
|
},
|
|
2113
|
-
|
|
2128
|
+
b.id
|
|
2114
2129
|
);
|
|
2115
2130
|
};
|
|
2116
|
-
return /* @__PURE__ */ d("div", { className:
|
|
2117
|
-
(i || n !== void 0) && /* @__PURE__ */ d("div", { className:
|
|
2118
|
-
i && /* @__PURE__ */ t("h3", { className:
|
|
2131
|
+
return /* @__PURE__ */ d("div", { className: fe.productsBlock, children: [
|
|
2132
|
+
(i || n !== void 0) && /* @__PURE__ */ d("div", { className: fe.top, children: [
|
|
2133
|
+
i && /* @__PURE__ */ t("h3", { className: fe.title, children: i }),
|
|
2119
2134
|
n !== void 0 && /* @__PURE__ */ t(
|
|
2120
|
-
|
|
2135
|
+
ue,
|
|
2121
2136
|
{
|
|
2122
2137
|
current: n,
|
|
2123
|
-
onChange: (
|
|
2138
|
+
onChange: (b) => o == null ? void 0 : o(b)
|
|
2124
2139
|
}
|
|
2125
2140
|
)
|
|
2126
2141
|
] }),
|
|
2127
|
-
/* @__PURE__ */ d("div", { className:
|
|
2128
|
-
l && /* @__PURE__ */ t("h5", { className:
|
|
2142
|
+
/* @__PURE__ */ d("div", { className: fe.products, children: [
|
|
2143
|
+
l && /* @__PURE__ */ t("h5", { className: fe.subtitle, children: l }),
|
|
2129
2144
|
p ? /* @__PURE__ */ t(
|
|
2130
2145
|
Ze,
|
|
2131
2146
|
{
|
|
@@ -2134,13 +2149,13 @@ const Gh = (e) => {
|
|
|
2134
2149
|
children: /* @__PURE__ */ t(
|
|
2135
2150
|
et,
|
|
2136
2151
|
{
|
|
2137
|
-
items: r.map((
|
|
2152
|
+
items: r.map((b) => b.id),
|
|
2138
2153
|
strategy: tt,
|
|
2139
|
-
children: r.map((
|
|
2154
|
+
children: r.map((b, L) => M(b, L))
|
|
2140
2155
|
}
|
|
2141
2156
|
)
|
|
2142
2157
|
}
|
|
2143
|
-
) : r.map((
|
|
2158
|
+
) : r.map((b, L) => M(b, L)),
|
|
2144
2159
|
I && /* @__PURE__ */ t(
|
|
2145
2160
|
"div",
|
|
2146
2161
|
{
|
|
@@ -2153,13 +2168,13 @@ const Gh = (e) => {
|
|
|
2153
2168
|
$e,
|
|
2154
2169
|
{
|
|
2155
2170
|
withoutHover: !0,
|
|
2156
|
-
className: R(
|
|
2157
|
-
[
|
|
2171
|
+
className: R(fe.button, {
|
|
2172
|
+
[fe.disabled]: !!(y && y <= r.length || r.length === (u == null ? void 0 : u.length))
|
|
2158
2173
|
}),
|
|
2159
2174
|
size: "s",
|
|
2160
2175
|
disabled: !!(y && y <= r.length || r.length === (u == null ? void 0 : u.length)),
|
|
2161
2176
|
onClick: () => {
|
|
2162
|
-
const
|
|
2177
|
+
const b = [...r];
|
|
2163
2178
|
let L = null;
|
|
2164
2179
|
if (u) {
|
|
2165
2180
|
for (let x = 0; x < u.length; x++)
|
|
@@ -2168,16 +2183,16 @@ const Gh = (e) => {
|
|
|
2168
2183
|
break;
|
|
2169
2184
|
}
|
|
2170
2185
|
}
|
|
2171
|
-
|
|
2186
|
+
S === "select" && u && b.push({
|
|
2172
2187
|
name: L ? L.name : u[0].name,
|
|
2173
2188
|
id: (L == null ? void 0 : L.id) || u[0].id,
|
|
2174
2189
|
...g
|
|
2175
|
-
}), c(
|
|
2190
|
+
}), c(b);
|
|
2176
2191
|
},
|
|
2177
2192
|
style: {
|
|
2178
2193
|
width: "fit-content"
|
|
2179
2194
|
},
|
|
2180
|
-
children: /* @__PURE__ */ d("div", { className:
|
|
2195
|
+
children: /* @__PURE__ */ d("div", { className: fe.addButton, children: [
|
|
2181
2196
|
/* @__PURE__ */ t("span", { children: "Add Option" }),
|
|
2182
2197
|
/* @__PURE__ */ t(
|
|
2183
2198
|
A,
|
|
@@ -2358,7 +2373,7 @@ const Gh = (e) => {
|
|
|
2358
2373
|
}
|
|
2359
2374
|
),
|
|
2360
2375
|
/* @__PURE__ */ t(
|
|
2361
|
-
|
|
2376
|
+
ue,
|
|
2362
2377
|
{
|
|
2363
2378
|
current: !!o[p.field.switch] || !1,
|
|
2364
2379
|
label: p.switchLabel,
|
|
@@ -2374,7 +2389,7 @@ const Gh = (e) => {
|
|
|
2374
2389
|
] });
|
|
2375
2390
|
if (p.type === "select")
|
|
2376
2391
|
return /* @__PURE__ */ t(
|
|
2377
|
-
|
|
2392
|
+
_e,
|
|
2378
2393
|
{
|
|
2379
2394
|
options: p.itemsOptions,
|
|
2380
2395
|
onChange: (a) => {
|
|
@@ -2426,7 +2441,7 @@ const Wh = (e) => {
|
|
|
2426
2441
|
editable: p = !0,
|
|
2427
2442
|
draggable: a = !1,
|
|
2428
2443
|
deletable: I = !0,
|
|
2429
|
-
addable:
|
|
2444
|
+
addable: S = !0,
|
|
2430
2445
|
itemsType: u,
|
|
2431
2446
|
itemsPlaceholder: g = "",
|
|
2432
2447
|
itemsOptions: y,
|
|
@@ -2438,7 +2453,7 @@ const Wh = (e) => {
|
|
|
2438
2453
|
} = e, [w, P] = _.useState(null), [O, M] = _.useState({
|
|
2439
2454
|
top: 0,
|
|
2440
2455
|
left: 0
|
|
2441
|
-
}), [
|
|
2456
|
+
}), [b, L] = _.useState(null), x = _.useRef(null), [G, v] = _.useState(!1), N = Je(
|
|
2442
2457
|
Qe(nt, {
|
|
2443
2458
|
activationConstraint: {
|
|
2444
2459
|
distance: 5
|
|
@@ -2458,15 +2473,15 @@ const Wh = (e) => {
|
|
|
2458
2473
|
c(T);
|
|
2459
2474
|
}
|
|
2460
2475
|
}, [w]), _.useEffect(() => {
|
|
2461
|
-
if (x.current &&
|
|
2476
|
+
if (x.current && b) {
|
|
2462
2477
|
const T = x.current.getBoundingClientRect().height, F = window.innerHeight;
|
|
2463
|
-
let W =
|
|
2478
|
+
let W = b.top;
|
|
2464
2479
|
W + T > F + window.scrollY - 200 && (W = F + window.scrollY - T - 200), W < 0 && (W = 10), M({
|
|
2465
2480
|
top: W,
|
|
2466
|
-
left:
|
|
2481
|
+
left: b.left
|
|
2467
2482
|
});
|
|
2468
2483
|
}
|
|
2469
|
-
}, [x.current,
|
|
2484
|
+
}, [x.current, b]);
|
|
2470
2485
|
const U = (T, F) => {
|
|
2471
2486
|
T.stopPropagation();
|
|
2472
2487
|
const W = T.target.getBoundingClientRect();
|
|
@@ -2496,7 +2511,7 @@ const Wh = (e) => {
|
|
|
2496
2511
|
}
|
|
2497
2512
|
) }),
|
|
2498
2513
|
u === "select" && y && /* @__PURE__ */ t(
|
|
2499
|
-
|
|
2514
|
+
_e,
|
|
2500
2515
|
{
|
|
2501
2516
|
onChange: (z) => {
|
|
2502
2517
|
const $ = [...r].map((q) => q.id === T.id ? {
|
|
@@ -2591,7 +2606,7 @@ const Wh = (e) => {
|
|
|
2591
2606
|
(l || n !== void 0) && /* @__PURE__ */ d("div", { className: ce.top, children: [
|
|
2592
2607
|
l && /* @__PURE__ */ t("h3", { className: ce.title, children: l }),
|
|
2593
2608
|
n !== void 0 && /* @__PURE__ */ t(
|
|
2594
|
-
|
|
2609
|
+
ue,
|
|
2595
2610
|
{
|
|
2596
2611
|
current: n,
|
|
2597
2612
|
onChange: (T) => o == null ? void 0 : o(T)
|
|
@@ -2627,7 +2642,7 @@ const Wh = (e) => {
|
|
|
2627
2642
|
)
|
|
2628
2643
|
}
|
|
2629
2644
|
) : r.map((T) => B(T)),
|
|
2630
|
-
|
|
2645
|
+
S && /* @__PURE__ */ t(
|
|
2631
2646
|
"div",
|
|
2632
2647
|
{
|
|
2633
2648
|
style: {
|
|
@@ -2714,7 +2729,7 @@ const Wh = (e) => {
|
|
|
2714
2729
|
closeIcon: wi
|
|
2715
2730
|
}, ki = _.forwardRef((e, n) => {
|
|
2716
2731
|
var k;
|
|
2717
|
-
const { activeButton: o, setActiveButton: r, popupPosition: c, editableLink: i = !0 } = e, [l, h] = _.useState(o.typesText), [p, a] = _.useState(o.destination), [I,
|
|
2732
|
+
const { activeButton: o, setActiveButton: r, popupPosition: c, editableLink: i = !0 } = e, [l, h] = _.useState(o.typesText), [p, a] = _.useState(o.destination), [I, S] = _.useState(o.page), [u, g] = _.useState(o.link || ""), [y, s] = _.useState(o.text || { "en-US": "" }), [f, m] = _.useState(o.openInNewTab), { pages: C } = Ye();
|
|
2718
2733
|
return ct(n, () => {
|
|
2719
2734
|
r(null);
|
|
2720
2735
|
}), _.useEffect(() => {
|
|
@@ -2757,7 +2772,7 @@ const Wh = (e) => {
|
|
|
2757
2772
|
] }),
|
|
2758
2773
|
/* @__PURE__ */ d("div", { className: Fe.options, children: [
|
|
2759
2774
|
i && /* @__PURE__ */ t(
|
|
2760
|
-
|
|
2775
|
+
_e,
|
|
2761
2776
|
{
|
|
2762
2777
|
label: "Destination",
|
|
2763
2778
|
onChange: (w) => a(w),
|
|
@@ -2766,20 +2781,20 @@ const Wh = (e) => {
|
|
|
2766
2781
|
}
|
|
2767
2782
|
),
|
|
2768
2783
|
i && (p === "Go to Page" ? /* @__PURE__ */ t(
|
|
2769
|
-
|
|
2784
|
+
_e,
|
|
2770
2785
|
{
|
|
2771
2786
|
label: "Go to",
|
|
2772
2787
|
onChange: (w) => {
|
|
2773
2788
|
if (w === "Sign In")
|
|
2774
|
-
|
|
2789
|
+
S("/customer-dash");
|
|
2775
2790
|
else if (C) {
|
|
2776
2791
|
for (const P in C)
|
|
2777
2792
|
if (C[P].name === w) {
|
|
2778
|
-
|
|
2793
|
+
S(C[P].path);
|
|
2779
2794
|
break;
|
|
2780
2795
|
}
|
|
2781
2796
|
} else
|
|
2782
|
-
|
|
2797
|
+
S(fn[0]);
|
|
2783
2798
|
},
|
|
2784
2799
|
options: C ? [
|
|
2785
2800
|
...Object.values(C).filter((w) => w.path !== I).map((w) => w.name),
|
|
@@ -2797,7 +2812,7 @@ const Wh = (e) => {
|
|
|
2797
2812
|
}
|
|
2798
2813
|
)),
|
|
2799
2814
|
i && /* @__PURE__ */ t(
|
|
2800
|
-
|
|
2815
|
+
ue,
|
|
2801
2816
|
{
|
|
2802
2817
|
current: o.openInNewTab,
|
|
2803
2818
|
label: "Open in new tab",
|
|
@@ -2835,22 +2850,22 @@ const Wh = (e) => {
|
|
|
2835
2850
|
const { buttons: n, setButtons: o, deletable: r = !0, addable: c = !0, editableLink: i = !0 } = e, { pages: l } = Ye(), [h, p] = _.useState(null), [a, I] = _.useState({
|
|
2836
2851
|
top: 0,
|
|
2837
2852
|
left: 0
|
|
2838
|
-
}), [
|
|
2853
|
+
}), [S, u] = _.useState(null), g = _.useRef(null);
|
|
2839
2854
|
_.useEffect(() => {
|
|
2840
2855
|
if (h) {
|
|
2841
2856
|
const f = [...n].map((m) => m.id === h.id ? h : m);
|
|
2842
2857
|
o(f);
|
|
2843
2858
|
}
|
|
2844
2859
|
}, [h]), _.useEffect(() => {
|
|
2845
|
-
if (g.current &&
|
|
2860
|
+
if (g.current && S) {
|
|
2846
2861
|
const f = g.current.getBoundingClientRect().height, m = window.innerHeight;
|
|
2847
|
-
let C =
|
|
2862
|
+
let C = S.top;
|
|
2848
2863
|
C + f > m + window.scrollY - 200 && (C = m + window.scrollY - f - 200), C < 0 && (C = 10), I({
|
|
2849
2864
|
top: C,
|
|
2850
|
-
left:
|
|
2865
|
+
left: S.left
|
|
2851
2866
|
});
|
|
2852
2867
|
}
|
|
2853
|
-
}, [g.current,
|
|
2868
|
+
}, [g.current, S]);
|
|
2854
2869
|
const y = (f, m) => {
|
|
2855
2870
|
f.stopPropagation();
|
|
2856
2871
|
const C = f.target.getBoundingClientRect();
|
|
@@ -2874,7 +2889,7 @@ const Wh = (e) => {
|
|
|
2874
2889
|
className: Le.product,
|
|
2875
2890
|
children: [
|
|
2876
2891
|
/* @__PURE__ */ t(
|
|
2877
|
-
|
|
2892
|
+
_e,
|
|
2878
2893
|
{
|
|
2879
2894
|
onChange: (C) => {
|
|
2880
2895
|
const w = [...n].map((P) => P.id === f.id ? {
|
|
@@ -3012,7 +3027,7 @@ const Wh = (e) => {
|
|
|
3012
3027
|
/* @__PURE__ */ d("div", { className: Fe.top, children: [
|
|
3013
3028
|
/* @__PURE__ */ t("h3", { className: Fe.title, children: "Buttons" }),
|
|
3014
3029
|
/* @__PURE__ */ t(
|
|
3015
|
-
|
|
3030
|
+
ue,
|
|
3016
3031
|
{
|
|
3017
3032
|
current: n,
|
|
3018
3033
|
onChange: (p) => o(p)
|
|
@@ -3045,7 +3060,7 @@ const Wh = (e) => {
|
|
|
3045
3060
|
controls: Wi,
|
|
3046
3061
|
button: Vi
|
|
3047
3062
|
}, $t = (e) => {
|
|
3048
|
-
const { label: n, min: o = 1, max: r = 4, step: c = 1, count: i, setCount: l } = e, [h, p] = _.useState(!1), a = Array.from({ length: (r - o) / c + 1 }), I = (i - o) / (r - o) * 100,
|
|
3063
|
+
const { label: n, min: o = 1, max: r = 4, step: c = 1, count: i, setCount: l } = e, [h, p] = _.useState(!1), a = Array.from({ length: (r - o) / c + 1 }), I = (i - o) / (r - o) * 100, S = () => {
|
|
3049
3064
|
i < r && l(i + c);
|
|
3050
3065
|
}, u = () => {
|
|
3051
3066
|
i > o && l(i - c);
|
|
@@ -3117,7 +3132,7 @@ const Wh = (e) => {
|
|
|
3117
3132
|
/* @__PURE__ */ t(
|
|
3118
3133
|
"button",
|
|
3119
3134
|
{
|
|
3120
|
-
onClick:
|
|
3135
|
+
onClick: S,
|
|
3121
3136
|
disabled: i >= r,
|
|
3122
3137
|
className: he.button,
|
|
3123
3138
|
"aria-label": "Increment count",
|
|
@@ -3254,7 +3269,7 @@ const jh = (e) => {
|
|
|
3254
3269
|
editable: p = !0,
|
|
3255
3270
|
draggable: a = !1,
|
|
3256
3271
|
withImage: I = !1,
|
|
3257
|
-
deletable:
|
|
3272
|
+
deletable: S = !0,
|
|
3258
3273
|
addable: u = !0,
|
|
3259
3274
|
itemsType: g,
|
|
3260
3275
|
itemsOptions: y,
|
|
@@ -3266,7 +3281,7 @@ const jh = (e) => {
|
|
|
3266
3281
|
), [w, P] = _.useState({
|
|
3267
3282
|
top: 0,
|
|
3268
3283
|
left: 0
|
|
3269
|
-
}), [O, M] = _.useState(!1),
|
|
3284
|
+
}), [O, M] = _.useState(!1), b = Je(
|
|
3270
3285
|
Qe(nt, {
|
|
3271
3286
|
activationConstraint: {
|
|
3272
3287
|
distance: 5
|
|
@@ -3340,7 +3355,7 @@ const jh = (e) => {
|
|
|
3340
3355
|
}
|
|
3341
3356
|
) }),
|
|
3342
3357
|
g === "select" && /* @__PURE__ */ t(
|
|
3343
|
-
|
|
3358
|
+
_e,
|
|
3344
3359
|
{
|
|
3345
3360
|
onChange: (F) => {
|
|
3346
3361
|
const W = [...r], z = y.find((q) => q.productData.name === F);
|
|
@@ -3375,7 +3390,7 @@ const jh = (e) => {
|
|
|
3375
3390
|
onClick: (F) => L(F, H)
|
|
3376
3391
|
}
|
|
3377
3392
|
) }),
|
|
3378
|
-
|
|
3393
|
+
S && /* @__PURE__ */ t("div", { className: pe.deleteButton, children: /* @__PURE__ */ t(
|
|
3379
3394
|
A,
|
|
3380
3395
|
{
|
|
3381
3396
|
name: "Trash",
|
|
@@ -3408,7 +3423,7 @@ const jh = (e) => {
|
|
|
3408
3423
|
(l || n !== void 0) && /* @__PURE__ */ d("div", { className: pe.top, children: [
|
|
3409
3424
|
l && /* @__PURE__ */ t("h3", { className: pe.title, children: l }),
|
|
3410
3425
|
n !== void 0 && /* @__PURE__ */ t(
|
|
3411
|
-
|
|
3426
|
+
ue,
|
|
3412
3427
|
{
|
|
3413
3428
|
current: n,
|
|
3414
3429
|
onChange: (H) => o == null ? void 0 : o(H)
|
|
@@ -3431,7 +3446,7 @@ const jh = (e) => {
|
|
|
3431
3446
|
a ? /* @__PURE__ */ t(
|
|
3432
3447
|
Ze,
|
|
3433
3448
|
{
|
|
3434
|
-
sensors:
|
|
3449
|
+
sensors: b,
|
|
3435
3450
|
onDragEnd: G,
|
|
3436
3451
|
onDragStart: v,
|
|
3437
3452
|
children: /* @__PURE__ */ t(
|
|
@@ -3491,7 +3506,7 @@ const jh = (e) => {
|
|
|
3491
3506
|
)
|
|
3492
3507
|
] }),
|
|
3493
3508
|
f && m && /* @__PURE__ */ t(
|
|
3494
|
-
|
|
3509
|
+
_e,
|
|
3495
3510
|
{
|
|
3496
3511
|
value: f,
|
|
3497
3512
|
options: Object.keys(Ft),
|
|
@@ -3556,7 +3571,7 @@ const jh = (e) => {
|
|
|
3556
3571
|
placeholder: p,
|
|
3557
3572
|
disabled: a = !1,
|
|
3558
3573
|
required: I = !1,
|
|
3559
|
-
regex:
|
|
3574
|
+
regex: S,
|
|
3560
3575
|
paddingless: u = !1,
|
|
3561
3576
|
borderless: g = !1,
|
|
3562
3577
|
editable: y = !1,
|
|
@@ -3567,18 +3582,18 @@ const jh = (e) => {
|
|
|
3567
3582
|
onFocus: k,
|
|
3568
3583
|
leftIcon: w,
|
|
3569
3584
|
error: P
|
|
3570
|
-
} = e, { themeSettings: O } = _t(), { isAntistock: M } = xe(), { inputs:
|
|
3585
|
+
} = e, { themeSettings: O } = _t(), { isAntistock: M } = xe(), { inputs: b } = O, [L, x] = _.useState(!1);
|
|
3571
3586
|
function G(N) {
|
|
3572
3587
|
if (Number(N) < 0) return String(l);
|
|
3573
3588
|
const U = N.replace(/[^\d-]/g, "");
|
|
3574
3589
|
return Number(U) < 0 ? String(l) : U;
|
|
3575
3590
|
}
|
|
3576
3591
|
function v(N) {
|
|
3577
|
-
if (!I || !
|
|
3592
|
+
if (!I || !S) return !0;
|
|
3578
3593
|
try {
|
|
3579
|
-
return new RegExp(
|
|
3594
|
+
return new RegExp(S).test(N);
|
|
3580
3595
|
} catch (U) {
|
|
3581
|
-
return console.error("Invalid regex pattern:",
|
|
3596
|
+
return console.error("Invalid regex pattern:", S, U), !0;
|
|
3582
3597
|
}
|
|
3583
3598
|
}
|
|
3584
3599
|
return /* @__PURE__ */ d("div", { className: le.wrapper, children: [
|
|
@@ -3600,8 +3615,8 @@ const jh = (e) => {
|
|
|
3600
3615
|
"div",
|
|
3601
3616
|
{
|
|
3602
3617
|
className: R(le.content, {
|
|
3603
|
-
[le.contentBorder]: !M &&
|
|
3604
|
-
[le.contentField]:
|
|
3618
|
+
[le.contentBorder]: !M && b.border.active,
|
|
3619
|
+
[le.contentField]: b.field.active,
|
|
3605
3620
|
[le.disabled]: a,
|
|
3606
3621
|
[le.contentIsAntistock]: M,
|
|
3607
3622
|
[le.contentError]: P
|
|
@@ -3640,7 +3655,7 @@ const jh = (e) => {
|
|
|
3640
3655
|
disabled: a,
|
|
3641
3656
|
style: {
|
|
3642
3657
|
textAlign: f ? "center" : "left",
|
|
3643
|
-
padding: s ? `7px ${Number(
|
|
3658
|
+
padding: s ? `7px ${Number(b.general.size) + 20}px 7px ${w ? 35 : 11}px` : M ? `4.5px ${C ? 35 : 11}px 4px ${w ? 35 : 11}px` : `7px ${C ? 35 : 11}px 7px ${w ? 35 : 11}px`
|
|
3644
3659
|
}
|
|
3645
3660
|
}
|
|
3646
3661
|
),
|
|
@@ -3650,8 +3665,8 @@ const jh = (e) => {
|
|
|
3650
3665
|
{
|
|
3651
3666
|
name: "MagnifyingGlass",
|
|
3652
3667
|
fill: "var(--text-secondary)",
|
|
3653
|
-
width:
|
|
3654
|
-
height:
|
|
3668
|
+
width: b.general.size,
|
|
3669
|
+
height: b.general.size
|
|
3655
3670
|
}
|
|
3656
3671
|
) }),
|
|
3657
3672
|
y && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -3710,7 +3725,7 @@ const jh = (e) => {
|
|
|
3710
3725
|
className: a,
|
|
3711
3726
|
showImageLoading: I = !1
|
|
3712
3727
|
}) => {
|
|
3713
|
-
const [
|
|
3728
|
+
const [S, u] = st(!1), [g, y] = st(!1), [s, f] = st(), [m, C] = st({}), k = ft(null), w = ft(null), { setNotifications: P, notifications: O } = Ge(), M = Array.isArray(e) ? e : e ? [e] : [], b = ($, q) => {
|
|
3714
3729
|
f($), P([
|
|
3715
3730
|
...O,
|
|
3716
3731
|
{
|
|
@@ -3733,12 +3748,12 @@ const jh = (e) => {
|
|
|
3733
3748
|
} catch (E) {
|
|
3734
3749
|
console.error("Upload error:", E);
|
|
3735
3750
|
let J = o ? "Failed to upload images" : "Failed to upload image", Ie = "";
|
|
3736
|
-
const
|
|
3737
|
-
if ((ve =
|
|
3738
|
-
const ie =
|
|
3751
|
+
const ge = E;
|
|
3752
|
+
if ((ve = ge == null ? void 0 : ge.response) != null && ve.data) {
|
|
3753
|
+
const ie = ge.response.data;
|
|
3739
3754
|
ie.message && ie.errors && Array.isArray(ie.errors) ? (Ie = ie.message, J = ie.errors.join(", ")) : ie.errors && Array.isArray(ie.errors) ? J = ie.errors.join(", ") : ie.message && (J = ie.message);
|
|
3740
3755
|
} else E instanceof Error && (J = E.message);
|
|
3741
|
-
throw
|
|
3756
|
+
throw b(J, Ie), E;
|
|
3742
3757
|
}
|
|
3743
3758
|
}, v = Xe(
|
|
3744
3759
|
async ($) => {
|
|
@@ -3747,7 +3762,7 @@ const jh = (e) => {
|
|
|
3747
3762
|
for (const V of q) {
|
|
3748
3763
|
const X = x(V);
|
|
3749
3764
|
if (X) {
|
|
3750
|
-
|
|
3765
|
+
b(X);
|
|
3751
3766
|
return;
|
|
3752
3767
|
}
|
|
3753
3768
|
}
|
|
@@ -3814,7 +3829,7 @@ const jh = (e) => {
|
|
|
3814
3829
|
"div",
|
|
3815
3830
|
{
|
|
3816
3831
|
className: R(ee.uploadArea, {
|
|
3817
|
-
[ee.uploadAreaDragOver]:
|
|
3832
|
+
[ee.uploadAreaDragOver]: S,
|
|
3818
3833
|
[ee.uploadAreaUploading]: g,
|
|
3819
3834
|
[ee.uploadAreaError]: s
|
|
3820
3835
|
}),
|
|
@@ -4015,7 +4030,7 @@ const jh = (e) => {
|
|
|
4015
4030
|
type: l = "text",
|
|
4016
4031
|
required: h = !1,
|
|
4017
4032
|
error: p
|
|
4018
|
-
} = e, [a, I] = _.useState(r.length), { themeSettings:
|
|
4033
|
+
} = e, [a, I] = _.useState(r.length), { themeSettings: S } = _t(), { isAntistock: u } = xe();
|
|
4019
4034
|
function g(y) {
|
|
4020
4035
|
return l === "number" ? y.replace(/[^\d\n]+/g, "") : y;
|
|
4021
4036
|
}
|
|
@@ -4048,8 +4063,8 @@ const jh = (e) => {
|
|
|
4048
4063
|
},
|
|
4049
4064
|
placeholder: i,
|
|
4050
4065
|
className: R(Te.textarea, {
|
|
4051
|
-
[Te.contentBorder]:
|
|
4052
|
-
[Te.contentField]:
|
|
4066
|
+
[Te.contentBorder]: S.inputs.border.active,
|
|
4067
|
+
[Te.contentField]: S.inputs.field.active,
|
|
4053
4068
|
[Te.antistock]: u,
|
|
4054
4069
|
[Te.contentError]: p
|
|
4055
4070
|
}),
|
|
@@ -4068,11 +4083,11 @@ const La = (e) => {
|
|
|
4068
4083
|
var O, M;
|
|
4069
4084
|
const { product: n, setIsOpen: o, isCartEnabled: r = !0 } = e, { variants: c } = n, [i, l] = _.useState(c[0]), [h, p] = _.useState(
|
|
4070
4085
|
i.chargeTypes ? i.chargeTypes[0] : "ONE_TIME"
|
|
4071
|
-
), { notifications: a, setNotifications: I } = Ge(),
|
|
4086
|
+
), { notifications: a, setNotifications: I } = Ge(), S = St(), [u, g] = _.useState(1), { cart: y, reset: s, addProductToCart: f } = We(), [m, C] = _.useState(!1);
|
|
4072
4087
|
_.useEffect(() => {
|
|
4073
4088
|
C(!0);
|
|
4074
|
-
const
|
|
4075
|
-
return () => clearTimeout(
|
|
4089
|
+
const b = setTimeout(() => C(!1), 600);
|
|
4090
|
+
return () => clearTimeout(b);
|
|
4076
4091
|
}, [u]);
|
|
4077
4092
|
async function k() {
|
|
4078
4093
|
try {
|
|
@@ -4089,8 +4104,8 @@ const La = (e) => {
|
|
|
4089
4104
|
status: "success"
|
|
4090
4105
|
}
|
|
4091
4106
|
]);
|
|
4092
|
-
} catch (
|
|
4093
|
-
const L =
|
|
4107
|
+
} catch (b) {
|
|
4108
|
+
const L = b;
|
|
4094
4109
|
I([
|
|
4095
4110
|
...a,
|
|
4096
4111
|
{
|
|
@@ -4103,20 +4118,20 @@ const La = (e) => {
|
|
|
4103
4118
|
o == null || o(!1);
|
|
4104
4119
|
}
|
|
4105
4120
|
function w() {
|
|
4106
|
-
s(), k(),
|
|
4121
|
+
s(), k(), S("/checkout");
|
|
4107
4122
|
}
|
|
4108
|
-
function P(
|
|
4109
|
-
if (
|
|
4110
|
-
const N = Math.floor(
|
|
4123
|
+
function P(b) {
|
|
4124
|
+
if (b >= 864e5) {
|
|
4125
|
+
const N = Math.floor(b / 864e5);
|
|
4111
4126
|
return `${N} ${N === 1 ? "day" : "days"}`;
|
|
4112
|
-
} else if (
|
|
4113
|
-
const N = Math.floor(
|
|
4127
|
+
} else if (b >= 36e5) {
|
|
4128
|
+
const N = Math.floor(b / 36e5);
|
|
4114
4129
|
return `${N} ${N === 1 ? "hour" : "hours"}`;
|
|
4115
|
-
} else if (
|
|
4116
|
-
const N = Math.floor(
|
|
4130
|
+
} else if (b >= 6e4) {
|
|
4131
|
+
const N = Math.floor(b / 6e4);
|
|
4117
4132
|
return `${N} ${N === 1 ? "minute" : "minutes"}`;
|
|
4118
4133
|
} else {
|
|
4119
|
-
const N = Math.floor(
|
|
4134
|
+
const N = Math.floor(b / 1e3);
|
|
4120
4135
|
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
4121
4136
|
}
|
|
4122
4137
|
}
|
|
@@ -4127,30 +4142,30 @@ const La = (e) => {
|
|
|
4127
4142
|
i.chargeTypes.includes(h) ? h : i.chargeTypes[0]
|
|
4128
4143
|
);
|
|
4129
4144
|
}, [i.chargeTypes]), /* @__PURE__ */ d("div", { className: K.options, children: [
|
|
4130
|
-
i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t("div", { className: K.chargeTypes, children: i.chargeTypes.map((
|
|
4145
|
+
i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t("div", { className: K.chargeTypes, children: i.chargeTypes.map((b) => /* @__PURE__ */ t(
|
|
4131
4146
|
"div",
|
|
4132
4147
|
{
|
|
4133
4148
|
className: R(K.charge, {
|
|
4134
|
-
[K.chargeActive]: h ===
|
|
4149
|
+
[K.chargeActive]: h === b
|
|
4135
4150
|
}),
|
|
4136
|
-
onClick: () => p(
|
|
4137
|
-
children: ln[
|
|
4151
|
+
onClick: () => p(b),
|
|
4152
|
+
children: ln[b]
|
|
4138
4153
|
},
|
|
4139
|
-
|
|
4154
|
+
b
|
|
4140
4155
|
)) }),
|
|
4141
|
-
/* @__PURE__ */ t("div", { className: K.variants, children: c.filter((
|
|
4156
|
+
/* @__PURE__ */ t("div", { className: K.variants, children: c.filter((b) => {
|
|
4142
4157
|
var L;
|
|
4143
|
-
return (L =
|
|
4144
|
-
}).map((
|
|
4158
|
+
return (L = b.chargeTypes) == null ? void 0 : L.includes(h);
|
|
4159
|
+
}).map((b) => {
|
|
4145
4160
|
var L, x;
|
|
4146
4161
|
return /* @__PURE__ */ d(
|
|
4147
4162
|
"div",
|
|
4148
4163
|
{
|
|
4149
4164
|
className: R(K.variant, {
|
|
4150
|
-
[K.activeVariant]: i.id ===
|
|
4165
|
+
[K.activeVariant]: i.id === b.id
|
|
4151
4166
|
}),
|
|
4152
4167
|
onClick: () => {
|
|
4153
|
-
l(
|
|
4168
|
+
l(b), g(1);
|
|
4154
4169
|
},
|
|
4155
4170
|
children: [
|
|
4156
4171
|
/* @__PURE__ */ d("div", { className: K.variantInfo, children: [
|
|
@@ -4160,17 +4175,17 @@ const La = (e) => {
|
|
|
4160
4175
|
className: K.title,
|
|
4161
4176
|
id: "h4",
|
|
4162
4177
|
dangerouslySetInnerHTML: {
|
|
4163
|
-
__html: Me(
|
|
4178
|
+
__html: Me(b.name)
|
|
4164
4179
|
}
|
|
4165
4180
|
}
|
|
4166
4181
|
),
|
|
4167
4182
|
/* @__PURE__ */ d("span", { id: "md", children: [
|
|
4168
4183
|
Ce({
|
|
4169
|
-
amount: h === "ONE_TIME" ?
|
|
4170
|
-
currency: h === "ONE_TIME" ?
|
|
4184
|
+
amount: h === "ONE_TIME" ? b.price.amount : b.subscriptionSettings ? b.subscriptionSettings.price.amount : 0,
|
|
4185
|
+
currency: h === "ONE_TIME" ? b.price.currency : b.subscriptionSettings ? b.subscriptionSettings.price.currency : "USD"
|
|
4171
4186
|
}),
|
|
4172
4187
|
" ",
|
|
4173
|
-
h === "RECURRING" &&
|
|
4188
|
+
h === "RECURRING" && b.subscriptionSettings && ` / ${_n(b.subscriptionSettings.recurringIntervalDays || 0)}`
|
|
4174
4189
|
] })
|
|
4175
4190
|
] }),
|
|
4176
4191
|
/* @__PURE__ */ t("div", { id: "md", children: h === "ONE_TIME" && /* @__PURE__ */ d(
|
|
@@ -4179,7 +4194,7 @@ const La = (e) => {
|
|
|
4179
4194
|
className: K.stock,
|
|
4180
4195
|
id: "md",
|
|
4181
4196
|
children: [
|
|
4182
|
-
(L =
|
|
4197
|
+
(L = b.quantity.restrictions) != null && L.max || b.quantity.available !== void 0 ? ((x = b.quantity.restrictions) == null ? void 0 : x.max) || b.quantity.available : "∞",
|
|
4183
4198
|
" ",
|
|
4184
4199
|
"in stock"
|
|
4185
4200
|
]
|
|
@@ -4187,7 +4202,7 @@ const La = (e) => {
|
|
|
4187
4202
|
) })
|
|
4188
4203
|
]
|
|
4189
4204
|
},
|
|
4190
|
-
|
|
4205
|
+
b.id
|
|
4191
4206
|
);
|
|
4192
4207
|
}) }),
|
|
4193
4208
|
h === "ONE_TIME" && /* @__PURE__ */ d(
|
|
@@ -4201,7 +4216,7 @@ const La = (e) => {
|
|
|
4201
4216
|
{
|
|
4202
4217
|
type: "Secondary",
|
|
4203
4218
|
onClick: () => {
|
|
4204
|
-
u > 1 ? g((
|
|
4219
|
+
u > 1 ? g((b) => b - 1) : g(1);
|
|
4205
4220
|
},
|
|
4206
4221
|
className: K.button,
|
|
4207
4222
|
disabled: i.quantity.available && i.quantity.restrictions && u <= i.quantity.restrictions.min || i.quantity.available === 0,
|
|
@@ -4213,8 +4228,8 @@ const La = (e) => {
|
|
|
4213
4228
|
{
|
|
4214
4229
|
type: "number",
|
|
4215
4230
|
value: String(u),
|
|
4216
|
-
onChange: (
|
|
4217
|
-
i.quantity.available && Number(
|
|
4231
|
+
onChange: (b) => {
|
|
4232
|
+
i.quantity.available && Number(b) > i.quantity.available ? g(i.quantity.available) : g(Number(b));
|
|
4218
4233
|
},
|
|
4219
4234
|
max: ((O = i.quantity.restrictions) == null ? void 0 : O.max) || i.quantity.available || Number.POSITIVE_INFINITY,
|
|
4220
4235
|
min: ((M = i.quantity.restrictions) == null ? void 0 : M.min) || 0,
|
|
@@ -4227,7 +4242,7 @@ const La = (e) => {
|
|
|
4227
4242
|
{
|
|
4228
4243
|
type: "Secondary",
|
|
4229
4244
|
onClick: () => {
|
|
4230
|
-
g((
|
|
4245
|
+
g((b) => b + 1);
|
|
4231
4246
|
},
|
|
4232
4247
|
className: K.button,
|
|
4233
4248
|
disabled: !!(i.quantity.available && i.quantity.restrictions && u >= i.quantity.restrictions.max || i.quantity.available === 0 || i.quantity.available && u >= i.quantity.available),
|
|
@@ -4348,7 +4363,7 @@ const La = (e) => {
|
|
|
4348
4363
|
onClick: () => k(),
|
|
4349
4364
|
disabled: i.quantity && i.quantity.available === 0 || u === 0,
|
|
4350
4365
|
children: y.parts.some(
|
|
4351
|
-
(
|
|
4366
|
+
(b) => b.productId === n.id && b.productVariantId === i.id
|
|
4352
4367
|
) ? "Add More" : "Add to Cart"
|
|
4353
4368
|
}
|
|
4354
4369
|
)
|
|
@@ -4412,8 +4427,8 @@ const La = (e) => {
|
|
|
4412
4427
|
r(y);
|
|
4413
4428
|
})();
|
|
4414
4429
|
}, [l.parts, h]);
|
|
4415
|
-
function p(
|
|
4416
|
-
return !
|
|
4430
|
+
function p(S) {
|
|
4431
|
+
return !S || !(S != null && S.variants) ? !1 : S.chargeType === "RECURRING";
|
|
4417
4432
|
}
|
|
4418
4433
|
const a = l.parts.length > 0 && o.length > 0 && !p(o[0]);
|
|
4419
4434
|
function I() {
|
|
@@ -4430,8 +4445,8 @@ const La = (e) => {
|
|
|
4430
4445
|
padding: 10,
|
|
4431
4446
|
position: "relative"
|
|
4432
4447
|
},
|
|
4433
|
-
onClick: (
|
|
4434
|
-
|
|
4448
|
+
onClick: (S) => {
|
|
4449
|
+
S.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), i(!0));
|
|
4435
4450
|
},
|
|
4436
4451
|
children: [
|
|
4437
4452
|
/* @__PURE__ */ t(
|
|
@@ -4464,7 +4479,7 @@ const La = (e) => {
|
|
|
4464
4479
|
}, ds = (e) => {
|
|
4465
4480
|
var s, f;
|
|
4466
4481
|
const { activeProducts: n, isCartNotEmpty: o, isOpen: r, close: c } = e, { cart: i, reset: l, getTotalAndDiscount: h, updateQuantityOfProduct: p, removeProduct: a } = We(), I = St();
|
|
4467
|
-
function
|
|
4482
|
+
function S(m, C) {
|
|
4468
4483
|
I(m, { replace: C });
|
|
4469
4484
|
}
|
|
4470
4485
|
function u(m) {
|
|
@@ -4690,7 +4705,7 @@ const La = (e) => {
|
|
|
4690
4705
|
currency: i.parts.length > 0 && ((f = (s = n.find((m) => m.id === i.parts[0].productId)) == null ? void 0 : s.variants.find((m) => m.id === i.parts[0].productVariantId)) == null ? void 0 : f.price.currency) || "USD"
|
|
4691
4706
|
}) })
|
|
4692
4707
|
] }),
|
|
4693
|
-
/* @__PURE__ */ t(te, { onClick: () =>
|
|
4708
|
+
/* @__PURE__ */ t(te, { onClick: () => S("/checkout", !1), children: "Checkout" })
|
|
4694
4709
|
] })
|
|
4695
4710
|
] }) : /* @__PURE__ */ t(ms, {})
|
|
4696
4711
|
]
|
|
@@ -4873,10 +4888,10 @@ const La = (e) => {
|
|
|
4873
4888
|
content: Ts,
|
|
4874
4889
|
close: Ns
|
|
4875
4890
|
}, at = (e) => {
|
|
4876
|
-
const { close: n, children: o, withAnimation: r = !0, hasPadding: c = !0 } = e, { isOpen: i, setIsOpen: l } = Pe(), { themeSettings: h } = _t(), { isAntistock: p } = wn(), a = (
|
|
4877
|
-
const u =
|
|
4891
|
+
const { close: n, children: o, withAnimation: r = !0, hasPadding: c = !0 } = e, { isOpen: i, setIsOpen: l } = Pe(), { themeSettings: h } = _t(), { isAntistock: p } = wn(), a = (S) => {
|
|
4892
|
+
const u = S.replace("#", "");
|
|
4878
4893
|
if (!/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(u))
|
|
4879
|
-
return console.warn("Invalid hex color:",
|
|
4894
|
+
return console.warn("Invalid hex color:", S), S;
|
|
4880
4895
|
let g = u;
|
|
4881
4896
|
return u.length === 3 && (g = u.split("").map((y) => y + y).join("")), `#${g}e6`;
|
|
4882
4897
|
}, I = () => {
|
|
@@ -4885,11 +4900,11 @@ const La = (e) => {
|
|
|
4885
4900
|
}, 300) : (n(!1), l(!0));
|
|
4886
4901
|
};
|
|
4887
4902
|
return _.useEffect(() => {
|
|
4888
|
-
const
|
|
4903
|
+
const S = (u) => {
|
|
4889
4904
|
u.key === "Escape" && I();
|
|
4890
4905
|
};
|
|
4891
|
-
return document.addEventListener("keydown",
|
|
4892
|
-
document.removeEventListener("keydown",
|
|
4906
|
+
return document.addEventListener("keydown", S), () => {
|
|
4907
|
+
document.removeEventListener("keydown", S);
|
|
4893
4908
|
};
|
|
4894
4909
|
}, []), kn.createPortal(
|
|
4895
4910
|
/* @__PURE__ */ t(
|
|
@@ -5092,11 +5107,11 @@ const La = (e) => {
|
|
|
5092
5107
|
buttonsBlock: $s,
|
|
5093
5108
|
cartDisabled: Os
|
|
5094
5109
|
}, ed = (e) => {
|
|
5095
|
-
var I,
|
|
5110
|
+
var I, S;
|
|
5096
5111
|
const { setIsOpen: n, setModalType: o, productId: r, isCartEnabled: c = !0 } = e, { cart: i } = We(), { pageContext: l } = Ye(), h = (I = l == null ? void 0 : l.listings) == null ? void 0 : I.find((u) => u.id === r);
|
|
5097
5112
|
if (!h)
|
|
5098
5113
|
return null;
|
|
5099
|
-
const p = (
|
|
5114
|
+
const p = (S = l == null ? void 0 : l.products) == null ? void 0 : S.find(
|
|
5100
5115
|
(u) => u.uniquePath === h.productData.uniquePath
|
|
5101
5116
|
);
|
|
5102
5117
|
if (!p)
|
|
@@ -5192,7 +5207,7 @@ const La = (e) => {
|
|
|
5192
5207
|
var u;
|
|
5193
5208
|
const { pageContext: n } = Ye(), o = (u = n == null ? void 0 : n.listings) == null ? void 0 : u.find((g) => g.id === e.productId), [r, c] = _.useState(!0), [i, l] = _.useState(null), h = (i == null ? void 0 : i.variants[0]) || null, [p, a] = _.useState(
|
|
5194
5209
|
"ONE_TIME"
|
|
5195
|
-
), { addProducts: I } = We(), { setIsOpen:
|
|
5210
|
+
), { addProducts: I } = We(), { setIsOpen: S } = Pe();
|
|
5196
5211
|
return _.useEffect(() => {
|
|
5197
5212
|
(async () => {
|
|
5198
5213
|
c(!0);
|
|
@@ -5204,7 +5219,7 @@ const La = (e) => {
|
|
|
5204
5219
|
I(y == null ? void 0 : y.data.products), l(y == null ? void 0 : y.data.products[0]), c(!1);
|
|
5205
5220
|
})();
|
|
5206
5221
|
}, []), _.useEffect(() => {
|
|
5207
|
-
|
|
5222
|
+
S(!0);
|
|
5208
5223
|
}, []), /* @__PURE__ */ t(at, { close: e.setIsOpen, children: /* @__PURE__ */ d(
|
|
5209
5224
|
"div",
|
|
5210
5225
|
{
|
|
@@ -5235,7 +5250,7 @@ const La = (e) => {
|
|
|
5235
5250
|
}
|
|
5236
5251
|
) });
|
|
5237
5252
|
}, Ys = (e) => {
|
|
5238
|
-
const { variants: n, activeChargeType: o, productId: r, setIsOpen: c } = e, { cart: i, addProductToCart: l, addProducts: h, updateQuantityOfProduct: p } = We(), { notifications: a, setNotifications: I } = Ge(), { pageContext:
|
|
5253
|
+
const { variants: n, activeChargeType: o, productId: r, setIsOpen: c } = e, { cart: i, addProductToCart: l, addProducts: h, updateQuantityOfProduct: p } = We(), { notifications: a, setNotifications: I } = Ge(), { pageContext: S } = Ye(), { setIsOpen: u } = Pe(), g = () => {
|
|
5239
5254
|
u(!1), setTimeout(() => {
|
|
5240
5255
|
c(!1);
|
|
5241
5256
|
}, 300);
|
|
@@ -5259,7 +5274,7 @@ const La = (e) => {
|
|
|
5259
5274
|
chargeType: o
|
|
5260
5275
|
});
|
|
5261
5276
|
else {
|
|
5262
|
-
|
|
5277
|
+
S != null && S.products && h(S.products);
|
|
5263
5278
|
try {
|
|
5264
5279
|
l({
|
|
5265
5280
|
productId: r,
|
|
@@ -5413,7 +5428,7 @@ const La = (e) => {
|
|
|
5413
5428
|
setProductId: c,
|
|
5414
5429
|
setIsProductModalOpen: i,
|
|
5415
5430
|
setShowDropdown: l
|
|
5416
|
-
} = e, [h, p] = _.useState(null), [a, I] = _.useState(!0), { setIsOpen:
|
|
5431
|
+
} = e, [h, p] = _.useState(null), [a, I] = _.useState(!0), { setIsOpen: S } = Pe();
|
|
5417
5432
|
_.useEffect(() => {
|
|
5418
5433
|
var y;
|
|
5419
5434
|
I(!0);
|
|
@@ -5422,10 +5437,10 @@ const La = (e) => {
|
|
|
5422
5437
|
);
|
|
5423
5438
|
g && p([...g]), I(!1);
|
|
5424
5439
|
}, [o]), _.useEffect(() => {
|
|
5425
|
-
|
|
5440
|
+
S(!0);
|
|
5426
5441
|
}, []);
|
|
5427
5442
|
const u = () => {
|
|
5428
|
-
|
|
5443
|
+
S(!1), setTimeout(() => {
|
|
5429
5444
|
n(!1);
|
|
5430
5445
|
}, 300);
|
|
5431
5446
|
};
|
|
@@ -5630,7 +5645,7 @@ const La = (e) => {
|
|
|
5630
5645
|
leftAddonOptions: p,
|
|
5631
5646
|
isMaxLength: a = !0,
|
|
5632
5647
|
error: I
|
|
5633
|
-
} = e, [
|
|
5648
|
+
} = e, [S, u] = _.useState(!1), [g, y] = _.useState(""), [s, f] = _.useState(null), [m, C] = _.useState(!1), k = _.useRef(null);
|
|
5634
5649
|
ct(k, () => u(!1));
|
|
5635
5650
|
function w(v) {
|
|
5636
5651
|
y(""), n(v), u(!1), f(null);
|
|
@@ -5639,7 +5654,7 @@ const La = (e) => {
|
|
|
5639
5654
|
return v ? v.length > N + 3 ? `${v.slice(0, N)}...` : v : "";
|
|
5640
5655
|
}
|
|
5641
5656
|
function O(v) {
|
|
5642
|
-
if (!
|
|
5657
|
+
if (!S) {
|
|
5643
5658
|
(v.key === "Enter" || v.key === "ArrowDown") && u(!0);
|
|
5644
5659
|
return;
|
|
5645
5660
|
}
|
|
@@ -5650,10 +5665,10 @@ const La = (e) => {
|
|
|
5650
5665
|
(U) => U === null || U === 0 ? N.length - 1 : U - 1
|
|
5651
5666
|
)), v.key === "Enter" && s !== null && (v.preventDefault(), w(N[s])), v.key === "Escape" && u(!1);
|
|
5652
5667
|
}
|
|
5653
|
-
const M = _.useRef(null),
|
|
5668
|
+
const M = _.useRef(null), b = _.useMemo(() => new Mt(c, {
|
|
5654
5669
|
threshold: 0.4,
|
|
5655
5670
|
minMatchCharLength: 2
|
|
5656
|
-
}), [c]), L = _.useMemo(() => m && g.trim() !== "" ?
|
|
5671
|
+
}), [c]), L = _.useMemo(() => m && g.trim() !== "" ? b.search(g).map((v) => v.item) : c, [g, c, m, b]);
|
|
5657
5672
|
return /* @__PURE__ */ d(
|
|
5658
5673
|
"div",
|
|
5659
5674
|
{
|
|
@@ -5673,7 +5688,7 @@ const La = (e) => {
|
|
|
5673
5688
|
}
|
|
5674
5689
|
),
|
|
5675
5690
|
l && /* @__PURE__ */ t(
|
|
5676
|
-
|
|
5691
|
+
ue,
|
|
5677
5692
|
{
|
|
5678
5693
|
current: l.value,
|
|
5679
5694
|
onChange: l.onChange
|
|
@@ -5690,7 +5705,7 @@ const La = (e) => {
|
|
|
5690
5705
|
"div",
|
|
5691
5706
|
{
|
|
5692
5707
|
className: R(ne.select, {
|
|
5693
|
-
[ne.borderFocused]:
|
|
5708
|
+
[ne.borderFocused]: S,
|
|
5694
5709
|
[ne.selectError]: I
|
|
5695
5710
|
}),
|
|
5696
5711
|
onKeyDown: O,
|
|
@@ -5712,7 +5727,7 @@ const La = (e) => {
|
|
|
5712
5727
|
/* @__PURE__ */ t(
|
|
5713
5728
|
"div",
|
|
5714
5729
|
{
|
|
5715
|
-
className: R(ne.icon, { [ne.rotate]:
|
|
5730
|
+
className: R(ne.icon, { [ne.rotate]: S }),
|
|
5716
5731
|
onClick: (v) => {
|
|
5717
5732
|
v.stopPropagation(), u((N) => !N);
|
|
5718
5733
|
},
|
|
@@ -5733,7 +5748,7 @@ const La = (e) => {
|
|
|
5733
5748
|
/* @__PURE__ */ d(
|
|
5734
5749
|
"div",
|
|
5735
5750
|
{
|
|
5736
|
-
className: R(ne.options, { [ne.open]:
|
|
5751
|
+
className: R(ne.options, { [ne.open]: S }),
|
|
5737
5752
|
style: {
|
|
5738
5753
|
top: ((G = M.current) == null ? void 0 : G.clientHeight) + 10
|
|
5739
5754
|
},
|
|
@@ -5805,7 +5820,7 @@ const La = (e) => {
|
|
|
5805
5820
|
toggle: Ol,
|
|
5806
5821
|
background: Rl,
|
|
5807
5822
|
padding: Hl
|
|
5808
|
-
},
|
|
5823
|
+
}, ue = (e) => {
|
|
5809
5824
|
const { onChange: n, style: o, current: r, label: c, hasBackground: i = !1, paddingless: l = !0 } = e, [h, p] = _.useState(r), a = () => {
|
|
5810
5825
|
p((I) => !I), n == null || n(!h);
|
|
5811
5826
|
};
|
|
@@ -5933,11 +5948,11 @@ var Wl = 150, Vl = function(n, o) {
|
|
|
5933
5948
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (ut = /* @__PURE__ */ new WeakSet(), gt = /* @__PURE__ */ new WeakSet());
|
|
5934
5949
|
function jl(e) {
|
|
5935
5950
|
var n, o = e.getItemOffset, r = e.getEstimatedTotalSize, c = e.getItemSize, i = e.getOffsetForIndexAndAlignment, l = e.getStartIndexForOffset, h = e.getStopIndexForStartIndex, p = e.initInstanceProps, a = e.shouldResetStyleCacheOnItemSizeChange, I = e.validateProps;
|
|
5936
|
-
return n = /* @__PURE__ */ function(
|
|
5937
|
-
El(u,
|
|
5951
|
+
return n = /* @__PURE__ */ function(S) {
|
|
5952
|
+
El(u, S);
|
|
5938
5953
|
function u(y) {
|
|
5939
5954
|
var s;
|
|
5940
|
-
return s =
|
|
5955
|
+
return s = S.call(this, y) || this, s._instanceProps = p(s.props, Wt(s)), s._outerRef = void 0, s._resetIsScrollingTimeoutId = null, s.state = {
|
|
5941
5956
|
instance: Wt(s),
|
|
5942
5957
|
isScrolling: !1,
|
|
5943
5958
|
scrollDirection: "forward",
|
|
@@ -5961,14 +5976,14 @@ function jl(e) {
|
|
|
5961
5976
|
if (P.hasOwnProperty(f))
|
|
5962
5977
|
O = P[f];
|
|
5963
5978
|
else {
|
|
5964
|
-
var M = o(s.props, f, s._instanceProps),
|
|
5979
|
+
var M = o(s.props, f, s._instanceProps), b = c(s.props, f, s._instanceProps), L = C === "horizontal" || w === "horizontal", x = C === "rtl", G = L ? M : 0;
|
|
5965
5980
|
P[f] = O = {
|
|
5966
5981
|
position: "absolute",
|
|
5967
5982
|
left: x ? void 0 : G,
|
|
5968
5983
|
right: x ? G : void 0,
|
|
5969
5984
|
top: L ? 0 : M,
|
|
5970
|
-
height: L ? "100%" :
|
|
5971
|
-
width: L ?
|
|
5985
|
+
height: L ? "100%" : b,
|
|
5986
|
+
width: L ? b : "100%"
|
|
5972
5987
|
};
|
|
5973
5988
|
}
|
|
5974
5989
|
return O;
|
|
@@ -6078,12 +6093,12 @@ function jl(e) {
|
|
|
6078
6093
|
}, g.componentWillUnmount = function() {
|
|
6079
6094
|
this._resetIsScrollingTimeoutId !== null && Xt(this._resetIsScrollingTimeoutId);
|
|
6080
6095
|
}, g.render = function() {
|
|
6081
|
-
var s = this.props, f = s.children, m = s.className, C = s.direction, k = s.height, w = s.innerRef, P = s.innerElementType, O = s.innerTagName, M = s.itemCount,
|
|
6096
|
+
var s = this.props, f = s.children, m = s.className, C = s.direction, k = s.height, w = s.innerRef, P = s.innerElementType, O = s.innerTagName, M = s.itemCount, b = s.itemData, L = s.itemKey, x = L === void 0 ? Vl : L, G = s.layout, v = s.outerElementType, N = s.outerTagName, U = s.style, H = s.useIsScrolling, B = s.width, T = this.state.isScrolling, F = C === "horizontal" || G === "horizontal", W = F ? this._onScrollHorizontal : this._onScrollVertical, z = this._getRangeToRender(), Q = z[0], $ = z[1], q = [];
|
|
6082
6097
|
if (M > 0)
|
|
6083
6098
|
for (var D = Q; D <= $; D++)
|
|
6084
6099
|
q.push(yt(f, {
|
|
6085
|
-
data:
|
|
6086
|
-
key: x(D,
|
|
6100
|
+
data: b,
|
|
6101
|
+
key: x(D, b),
|
|
6087
6102
|
index: D,
|
|
6088
6103
|
isScrolling: H ? T : void 0,
|
|
6089
6104
|
style: this._getItemStyle(D)
|
|
@@ -6120,15 +6135,15 @@ function jl(e) {
|
|
|
6120
6135
|
}
|
|
6121
6136
|
}
|
|
6122
6137
|
if (typeof this.props.onScroll == "function") {
|
|
6123
|
-
var P = this.state, O = P.scrollDirection, M = P.scrollOffset,
|
|
6124
|
-
this._callOnScroll(O, M,
|
|
6138
|
+
var P = this.state, O = P.scrollDirection, M = P.scrollOffset, b = P.scrollUpdateWasRequested;
|
|
6139
|
+
this._callOnScroll(O, M, b);
|
|
6125
6140
|
}
|
|
6126
6141
|
}, g._getRangeToRender = function() {
|
|
6127
6142
|
var s = this.props, f = s.itemCount, m = s.overscanCount, C = this.state, k = C.isScrolling, w = C.scrollDirection, P = C.scrollOffset;
|
|
6128
6143
|
if (f === 0)
|
|
6129
6144
|
return [0, 0, 0, 0];
|
|
6130
|
-
var O = l(this.props, P, this._instanceProps), M = h(this.props, O, P, this._instanceProps),
|
|
6131
|
-
return [Math.max(0, O -
|
|
6145
|
+
var O = l(this.props, P, this._instanceProps), M = h(this.props, O, P, this._instanceProps), b = !k || w === "backward" ? Math.max(1, m) : 1, L = !k || w === "forward" ? Math.max(1, m) : 1;
|
|
6146
|
+
return [Math.max(0, O - b), Math.max(0, Math.min(f - 1, M + L)), O, M];
|
|
6132
6147
|
}, u;
|
|
6133
6148
|
}(gn), n.defaultProps = {
|
|
6134
6149
|
direction: "ltr",
|
|
@@ -6142,7 +6157,7 @@ var Xl = function(n, o) {
|
|
|
6142
6157
|
var r = n.children, c = n.direction, i = n.height, l = n.layout, h = n.innerTagName, p = n.outerTagName, a = n.width, I = o.instance;
|
|
6143
6158
|
if (process.env.NODE_ENV !== "production") {
|
|
6144
6159
|
(h != null || p != null) && gt && !gt.has(I) && (gt.add(I), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
|
|
6145
|
-
var
|
|
6160
|
+
var S = c === "horizontal" || l === "horizontal";
|
|
6146
6161
|
switch (c) {
|
|
6147
6162
|
case "horizontal":
|
|
6148
6163
|
case "vertical":
|
|
@@ -6163,9 +6178,9 @@ var Xl = function(n, o) {
|
|
|
6163
6178
|
}
|
|
6164
6179
|
if (r == null)
|
|
6165
6180
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
6166
|
-
if (
|
|
6181
|
+
if (S && typeof a != "number")
|
|
6167
6182
|
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
6168
|
-
if (!
|
|
6183
|
+
if (!S && typeof i != "number")
|
|
6169
6184
|
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
6170
6185
|
}
|
|
6171
6186
|
}, Kl = /* @__PURE__ */ jl({
|
|
@@ -6182,7 +6197,7 @@ var Xl = function(n, o) {
|
|
|
6182
6197
|
return r * o;
|
|
6183
6198
|
},
|
|
6184
6199
|
getOffsetForIndexAndAlignment: function(n, o, r, c, i, l) {
|
|
6185
|
-
var h = n.direction, p = n.height, a = n.itemCount, I = n.itemSize,
|
|
6200
|
+
var h = n.direction, p = n.height, a = n.itemCount, I = n.itemSize, S = n.layout, u = n.width, g = h === "horizontal" || S === "horizontal", y = g ? u : p, s = Math.max(0, a * I - y), f = Math.min(s, o * I), m = Math.max(0, o * I - y + I + l);
|
|
6186
6201
|
switch (r === "smart" && (c >= m - y && c <= f + y ? r = "auto" : r = "center"), r) {
|
|
6187
6202
|
case "start":
|
|
6188
6203
|
return f;
|
|
@@ -6202,7 +6217,7 @@ var Xl = function(n, o) {
|
|
|
6202
6217
|
return Math.max(0, Math.min(r - 1, Math.floor(o / c)));
|
|
6203
6218
|
},
|
|
6204
6219
|
getStopIndexForStartIndex: function(n, o, r) {
|
|
6205
|
-
var c = n.direction, i = n.height, l = n.itemCount, h = n.itemSize, p = n.layout, a = n.width, I = c === "horizontal" || p === "horizontal",
|
|
6220
|
+
var c = n.direction, i = n.height, l = n.itemCount, h = n.itemSize, p = n.layout, a = n.width, I = c === "horizontal" || p === "horizontal", S = o * h, u = I ? a : i, g = Math.ceil((u + r - S) / h);
|
|
6206
6221
|
return Math.max(0, Math.min(
|
|
6207
6222
|
l - 1,
|
|
6208
6223
|
o + g - 1
|
|
@@ -7846,11 +7861,11 @@ const dn = (e) => {
|
|
|
7846
7861
|
postfixs: h,
|
|
7847
7862
|
leftAddonOptions: p,
|
|
7848
7863
|
enableIconLazyLoading: a = !1
|
|
7849
|
-
} = e, [I,
|
|
7850
|
-
Ip(k, () =>
|
|
7864
|
+
} = e, [I, S] = _.useState(!1), [u, g] = _.useState(""), [y, s] = _.useState(null), [f, m] = _.useState(!1), [, C] = _.useReducer((B) => B + 1, 0), k = _.useRef(null);
|
|
7865
|
+
Ip(k, () => S(!1));
|
|
7851
7866
|
const { registerIconsRange: w } = fp(), P = _.useCallback(
|
|
7852
7867
|
(B) => {
|
|
7853
|
-
g(""), n(B),
|
|
7868
|
+
g(""), n(B), S(!1), s(null);
|
|
7854
7869
|
},
|
|
7855
7870
|
[n]
|
|
7856
7871
|
);
|
|
@@ -7859,7 +7874,7 @@ const dn = (e) => {
|
|
|
7859
7874
|
}
|
|
7860
7875
|
function M(B) {
|
|
7861
7876
|
if (!I) {
|
|
7862
|
-
(B.key === "Enter" || B.key === "ArrowDown") &&
|
|
7877
|
+
(B.key === "Enter" || B.key === "ArrowDown") && S(!0);
|
|
7863
7878
|
return;
|
|
7864
7879
|
}
|
|
7865
7880
|
const T = x;
|
|
@@ -7867,9 +7882,9 @@ const dn = (e) => {
|
|
|
7867
7882
|
(F) => F === null || F === T.length - 1 ? 0 : F + 1
|
|
7868
7883
|
)), B.key === "ArrowUp" && (B.preventDefault(), s(
|
|
7869
7884
|
(F) => F === null || F === 0 ? T.length - 1 : F - 1
|
|
7870
|
-
)), B.key === "Enter" && y !== null && (B.preventDefault(), P(T[y])), B.key === "Escape" &&
|
|
7885
|
+
)), B.key === "Enter" && y !== null && (B.preventDefault(), P(T[y])), B.key === "Escape" && S(!1);
|
|
7871
7886
|
}
|
|
7872
|
-
const
|
|
7887
|
+
const b = _.useRef(null), L = _.useMemo(() => new Mt(c, {
|
|
7873
7888
|
threshold: 0.4,
|
|
7874
7889
|
minMatchCharLength: 2
|
|
7875
7890
|
}), [c]), x = _.useMemo(() => f && u.trim() !== "" ? L.search(u).map((B) => B.item) : c, [u, c, f, L]);
|
|
@@ -7946,7 +7961,7 @@ const dn = (e) => {
|
|
|
7946
7961
|
}
|
|
7947
7962
|
),
|
|
7948
7963
|
l && /* @__PURE__ */ t(
|
|
7949
|
-
|
|
7964
|
+
ue,
|
|
7950
7965
|
{
|
|
7951
7966
|
current: l.value,
|
|
7952
7967
|
onChange: l.onChange
|
|
@@ -7965,9 +7980,9 @@ const dn = (e) => {
|
|
|
7965
7980
|
className: R(se.select, { [se.borderFocused]: I }),
|
|
7966
7981
|
onKeyDown: M,
|
|
7967
7982
|
onClick: (B) => {
|
|
7968
|
-
B.stopPropagation(),
|
|
7983
|
+
B.stopPropagation(), S((T) => !T), m(!1);
|
|
7969
7984
|
},
|
|
7970
|
-
ref:
|
|
7985
|
+
ref: b,
|
|
7971
7986
|
tabIndex: 0,
|
|
7972
7987
|
children: [
|
|
7973
7988
|
p && /* @__PURE__ */ t("div", { className: se.addon, children: v.get(r) }),
|
|
@@ -7977,7 +7992,7 @@ const dn = (e) => {
|
|
|
7977
7992
|
{
|
|
7978
7993
|
className: R(se.icon, { [se.rotate]: I }),
|
|
7979
7994
|
onClick: (B) => {
|
|
7980
|
-
B.stopPropagation(),
|
|
7995
|
+
B.stopPropagation(), S((T) => !T);
|
|
7981
7996
|
},
|
|
7982
7997
|
children: /* @__PURE__ */ t(
|
|
7983
7998
|
A,
|
|
@@ -7997,7 +8012,7 @@ const dn = (e) => {
|
|
|
7997
8012
|
{
|
|
7998
8013
|
className: R(se.options, { [se.open]: I }),
|
|
7999
8014
|
style: {
|
|
8000
|
-
top: (((H =
|
|
8015
|
+
top: (((H = b.current) == null ? void 0 : H.clientHeight) ?? 0) + 10
|
|
8001
8016
|
},
|
|
8002
8017
|
children: [
|
|
8003
8018
|
c.length > 6 && /* @__PURE__ */ t(
|
|
@@ -8179,10 +8194,10 @@ const dn = (e) => {
|
|
|
8179
8194
|
error: "#FF3F19",
|
|
8180
8195
|
success: "#338B13"
|
|
8181
8196
|
}, sd = (e) => {
|
|
8182
|
-
const { type: n, message: o, style: r, padding: c, timer: i, id: l, element: h, label: p } = e, [a, I] = _.useState(i), { setNotifications:
|
|
8197
|
+
const { type: n, message: o, style: r, padding: c, timer: i, id: l, element: h, label: p } = e, [a, I] = _.useState(i), { setNotifications: S } = Ge();
|
|
8183
8198
|
function u() {
|
|
8184
8199
|
const y = Ge.getState().notifications.filter((s) => s.id !== l);
|
|
8185
|
-
|
|
8200
|
+
S([...y]);
|
|
8186
8201
|
}
|
|
8187
8202
|
return _.useEffect(() => {
|
|
8188
8203
|
const g = setTimeout(() => {
|
|
@@ -8331,7 +8346,7 @@ function Ih(e, n) {
|
|
|
8331
8346
|
};
|
|
8332
8347
|
}, [e, n]);
|
|
8333
8348
|
}
|
|
8334
|
-
const
|
|
8349
|
+
const _e = (e) => {
|
|
8335
8350
|
var x, G;
|
|
8336
8351
|
const {
|
|
8337
8352
|
onChange: n,
|
|
@@ -8344,7 +8359,7 @@ const fe = (e) => {
|
|
|
8344
8359
|
leftAddonOptions: p,
|
|
8345
8360
|
isMaxLength: a = !0,
|
|
8346
8361
|
error: I
|
|
8347
|
-
} = e, [
|
|
8362
|
+
} = e, [S, u] = _.useState(!1), [g, y] = _.useState(""), [s, f] = _.useState(null), [m, C] = _.useState(!1), k = _.useRef(null);
|
|
8348
8363
|
Ih(k, () => u(!1));
|
|
8349
8364
|
function w(v) {
|
|
8350
8365
|
y(""), n(v), u(!1), f(null);
|
|
@@ -8353,7 +8368,7 @@ const fe = (e) => {
|
|
|
8353
8368
|
return v ? v.length > N + 3 ? `${v.slice(0, N)}...` : v : "";
|
|
8354
8369
|
}
|
|
8355
8370
|
function O(v) {
|
|
8356
|
-
if (!
|
|
8371
|
+
if (!S) {
|
|
8357
8372
|
(v.key === "Enter" || v.key === "ArrowDown") && u(!0);
|
|
8358
8373
|
return;
|
|
8359
8374
|
}
|
|
@@ -8364,10 +8379,10 @@ const fe = (e) => {
|
|
|
8364
8379
|
(U) => U === null || U === 0 ? N.length - 1 : U - 1
|
|
8365
8380
|
)), v.key === "Enter" && s !== null && (v.preventDefault(), w(N[s])), v.key === "Escape" && u(!1);
|
|
8366
8381
|
}
|
|
8367
|
-
const M = _.useRef(null),
|
|
8382
|
+
const M = _.useRef(null), b = _.useMemo(() => new Mt(c, {
|
|
8368
8383
|
threshold: 0.4,
|
|
8369
8384
|
minMatchCharLength: 2
|
|
8370
|
-
}), [c]), L = _.useMemo(() => m && g.trim() !== "" ?
|
|
8385
|
+
}), [c]), L = _.useMemo(() => m && g.trim() !== "" ? b.search(g).map((v) => v.item) : c, [g, c, m, b]);
|
|
8371
8386
|
return /* @__PURE__ */ d(
|
|
8372
8387
|
"div",
|
|
8373
8388
|
{
|
|
@@ -8387,7 +8402,7 @@ const fe = (e) => {
|
|
|
8387
8402
|
}
|
|
8388
8403
|
),
|
|
8389
8404
|
l && /* @__PURE__ */ t(
|
|
8390
|
-
|
|
8405
|
+
ue,
|
|
8391
8406
|
{
|
|
8392
8407
|
current: l.value,
|
|
8393
8408
|
onChange: l.onChange
|
|
@@ -8404,7 +8419,7 @@ const fe = (e) => {
|
|
|
8404
8419
|
"div",
|
|
8405
8420
|
{
|
|
8406
8421
|
className: R(oe.select, {
|
|
8407
|
-
[oe.borderFocused]:
|
|
8422
|
+
[oe.borderFocused]: S,
|
|
8408
8423
|
[oe.selectError]: I
|
|
8409
8424
|
}),
|
|
8410
8425
|
onKeyDown: O,
|
|
@@ -8421,7 +8436,7 @@ const fe = (e) => {
|
|
|
8421
8436
|
/* @__PURE__ */ t(
|
|
8422
8437
|
"div",
|
|
8423
8438
|
{
|
|
8424
|
-
className: R(oe.icon, { [oe.rotate]:
|
|
8439
|
+
className: R(oe.icon, { [oe.rotate]: S }),
|
|
8425
8440
|
onClick: (v) => {
|
|
8426
8441
|
v.stopPropagation(), u((N) => !N);
|
|
8427
8442
|
},
|
|
@@ -8442,7 +8457,7 @@ const fe = (e) => {
|
|
|
8442
8457
|
/* @__PURE__ */ d(
|
|
8443
8458
|
"div",
|
|
8444
8459
|
{
|
|
8445
|
-
className: R(oe.options, { [oe.open]:
|
|
8460
|
+
className: R(oe.options, { [oe.open]: S }),
|
|
8446
8461
|
style: {
|
|
8447
8462
|
top: ((G = M.current) == null ? void 0 : G.clientHeight) + 10
|
|
8448
8463
|
},
|
|
@@ -8583,7 +8598,7 @@ export {
|
|
|
8583
8598
|
Gh as P,
|
|
8584
8599
|
jh as Q,
|
|
8585
8600
|
pd as R,
|
|
8586
|
-
|
|
8601
|
+
_e as S,
|
|
8587
8602
|
rn as T,
|
|
8588
8603
|
ln as U,
|
|
8589
8604
|
La as V,
|
|
@@ -8608,7 +8623,7 @@ export {
|
|
|
8608
8623
|
dn as ac,
|
|
8609
8624
|
Uh as b,
|
|
8610
8625
|
ye as c,
|
|
8611
|
-
|
|
8626
|
+
ue as d,
|
|
8612
8627
|
sn as e,
|
|
8613
8628
|
Ct as f,
|
|
8614
8629
|
te as g,
|