bi-components-library 1.2.2 → 1.2.4
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/index.es.js +722 -713
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +23 -23
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -560,16 +560,16 @@ const { Option: ec } = Hn, tc = ({
|
|
|
560
560
|
total: 0
|
|
561
561
|
}), [m, g] = ne({}), [b, T] = ne({}), [_] = Jn.useForm(), N = Z(y);
|
|
562
562
|
N.current = y;
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const L = Z(!1),
|
|
563
|
+
const A = Z(u);
|
|
564
|
+
A.current = u;
|
|
565
|
+
const L = Z(!1), C = vt(() => e.map((k) => {
|
|
566
566
|
const { sortable: x, render: F, ...$ } = k;
|
|
567
567
|
return {
|
|
568
568
|
...$,
|
|
569
569
|
sorter: x ? !0 : void 0,
|
|
570
570
|
render: F || ((H) => H)
|
|
571
571
|
};
|
|
572
|
-
}), [e]),
|
|
572
|
+
}), [e]), S = oe(async (k = {}) => {
|
|
573
573
|
if (t) {
|
|
574
574
|
c(!0);
|
|
575
575
|
try {
|
|
@@ -578,7 +578,7 @@ const { Option: ec } = Hn, tc = ({
|
|
|
578
578
|
pageSize: N.current.pageSize,
|
|
579
579
|
sortField: b.field,
|
|
580
580
|
sortOrder: b.order,
|
|
581
|
-
searchParams: { ...m, ...
|
|
581
|
+
searchParams: { ...m, ...A.current },
|
|
582
582
|
...k
|
|
583
583
|
}, F = await t(x);
|
|
584
584
|
F.success && (p(F.data), h(($) => ({
|
|
@@ -597,8 +597,8 @@ const { Option: ec } = Hn, tc = ({
|
|
|
597
597
|
}, []), I = oe(() => {
|
|
598
598
|
_.resetFields(), g({}), h((k) => ({ ...k, current: 1 }));
|
|
599
599
|
}, [_]), P = oe(() => {
|
|
600
|
-
|
|
601
|
-
}, [
|
|
600
|
+
S();
|
|
601
|
+
}, [S]), M = oe((k, x, F) => {
|
|
602
602
|
const $ = {
|
|
603
603
|
current: k.current || 1,
|
|
604
604
|
pageSize: k.pageSize || i,
|
|
@@ -611,8 +611,8 @@ const { Option: ec } = Hn, tc = ({
|
|
|
611
611
|
}, [i]);
|
|
612
612
|
return ie(() => {
|
|
613
613
|
const k = Object.keys(u).length > 0;
|
|
614
|
-
(o && !L.current || k) && (
|
|
615
|
-
}, [o, u,
|
|
614
|
+
(o && !L.current || k) && (S(), L.current = !0);
|
|
615
|
+
}, [o, u, S]), /* @__PURE__ */ pe("div", { children: [
|
|
616
616
|
r && n.length > 0 && /* @__PURE__ */ V(Qa, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ pe(
|
|
617
617
|
Jn,
|
|
618
618
|
{
|
|
@@ -648,7 +648,7 @@ const { Option: ec } = Hn, tc = ({
|
|
|
648
648
|
Ja,
|
|
649
649
|
{
|
|
650
650
|
...l,
|
|
651
|
-
columns:
|
|
651
|
+
columns: C,
|
|
652
652
|
dataSource: d,
|
|
653
653
|
loading: E,
|
|
654
654
|
pagination: {
|
|
@@ -753,7 +753,7 @@ const nc = ({ host: e, onChange: t }) => {
|
|
|
753
753
|
}, [u, o, r]), h = _e.useCallback(() => {
|
|
754
754
|
const m = E.current;
|
|
755
755
|
if (!m) return;
|
|
756
|
-
const g = m.querySelector(".ant-select-selection-item"), b = m.querySelector(".ant-select-selection-placeholder"), T = g || b, _ = (T?.textContent || "").trim() || y(), N = m.querySelector(".ant-select-selector"),
|
|
756
|
+
const g = m.querySelector(".ant-select-selection-item"), b = m.querySelector(".ant-select-selection-placeholder"), T = g || b, _ = (T?.textContent || "").trim() || y(), N = m.querySelector(".ant-select-selector"), A = T || N || m, L = window.getComputedStyle(A), C = T ? L.fontSize : "16px", S = L.fontFamily || "sans-serif", w = L.fontWeight || "400", P = `${L.fontStyle || "normal"} ${w} ${C} ${S}`, k = document.createElement("canvas").getContext("2d"), x = k ? Math.ceil((k.font = P, k.measureText(_).width || 0)) : 0;
|
|
757
757
|
let F = 0;
|
|
758
758
|
if (N) {
|
|
759
759
|
const Q = window.getComputedStyle(N);
|
|
@@ -874,27 +874,27 @@ const nc = ({ host: e, onChange: t }) => {
|
|
|
874
874
|
return [];
|
|
875
875
|
}
|
|
876
876
|
}, [a]), [u, l] = ne(s || void 0), [d, p] = ne(""), [E, c] = ne(null), [y, h] = ne(64), m = Z(null), g = vt(() => {
|
|
877
|
-
const
|
|
878
|
-
return E && !o.some((w) => w.value === E) &&
|
|
877
|
+
const S = [...o];
|
|
878
|
+
return E && !o.some((w) => w.value === E) && S.unshift({ label: E, value: E }), S;
|
|
879
879
|
}, [o, E]), b = vt(() => {
|
|
880
880
|
if (!d) return g;
|
|
881
|
-
const
|
|
881
|
+
const S = d.toLowerCase();
|
|
882
882
|
return g.filter(
|
|
883
|
-
(w) => w.label.toLowerCase().includes(
|
|
883
|
+
(w) => w.label.toLowerCase().includes(S) || w.value.toLowerCase().includes(S)
|
|
884
884
|
);
|
|
885
|
-
}, [g, d]), T = (
|
|
886
|
-
|
|
887
|
-
}, _ = (
|
|
888
|
-
p(
|
|
889
|
-
}, N = (
|
|
890
|
-
if (
|
|
891
|
-
|
|
885
|
+
}, [g, d]), T = (S) => {
|
|
886
|
+
S != null && (E && S !== E && c(null), l(S), p(""), e.setAttribute("data-value", S), t(n, S));
|
|
887
|
+
}, _ = (S) => {
|
|
888
|
+
p(S);
|
|
889
|
+
}, N = (S) => {
|
|
890
|
+
if (S.key === "Enter" && d.trim()) {
|
|
891
|
+
S.preventDefault(), S.stopPropagation();
|
|
892
892
|
const w = d.trim(), I = o.find(
|
|
893
893
|
(P) => P.label === w || P.value === w
|
|
894
894
|
);
|
|
895
895
|
I ? T(I.value) : (c(w), l(w), p(""), e.setAttribute("data-value", w), t(n, w));
|
|
896
896
|
}
|
|
897
|
-
},
|
|
897
|
+
}, A = () => {
|
|
898
898
|
c(null), l(void 0), p(""), e.setAttribute("data-value", ""), t(n, "");
|
|
899
899
|
};
|
|
900
900
|
ie(() => {
|
|
@@ -902,22 +902,22 @@ const nc = ({ host: e, onChange: t }) => {
|
|
|
902
902
|
}, [s]);
|
|
903
903
|
const L = _e.useCallback(() => {
|
|
904
904
|
if (u != null && u !== "") {
|
|
905
|
-
const
|
|
906
|
-
return
|
|
905
|
+
const S = g.find((w) => String(w.value) === String(u));
|
|
906
|
+
return S ? typeof S.label == "string" ? S.label : String(S.label ?? u) : String(u);
|
|
907
907
|
}
|
|
908
908
|
return r || "请选择";
|
|
909
|
-
}, [u, g, r]),
|
|
910
|
-
const
|
|
911
|
-
if (!
|
|
912
|
-
const w =
|
|
909
|
+
}, [u, g, r]), C = _e.useCallback(() => {
|
|
910
|
+
const S = m.current;
|
|
911
|
+
if (!S) return;
|
|
912
|
+
const w = S.querySelector(".ant-select-selection-item"), I = S.querySelector(".ant-select-selection-placeholder"), P = w || I, M = (P?.textContent || "").trim() || L(), k = S.querySelector(".ant-select-selector"), x = P || k || S, F = window.getComputedStyle(x), $ = P ? F.fontSize : "16px", H = F.fontFamily || "sans-serif", q = F.fontWeight || "400", G = `${F.fontStyle || "normal"} ${q} ${$} ${H}`, D = document.createElement("canvas").getContext("2d"), ee = D ? Math.ceil((D.font = G, D.measureText(M).width || 0)) : 0;
|
|
913
913
|
let te = 0;
|
|
914
914
|
if (k) {
|
|
915
915
|
const ce = window.getComputedStyle(k);
|
|
916
916
|
te = (Number.parseFloat(ce.paddingLeft) || 0) + (Number.parseFloat(ce.paddingRight) || 0);
|
|
917
917
|
}
|
|
918
|
-
const se =
|
|
918
|
+
const se = S.querySelector(".ant-select-arrow");
|
|
919
919
|
se && Math.ceil(se.getBoundingClientRect().width);
|
|
920
|
-
const K =
|
|
920
|
+
const K = S.querySelector(".ant-select-clear");
|
|
921
921
|
if (K) {
|
|
922
922
|
const ce = window.getComputedStyle(K);
|
|
923
923
|
ce.display !== "none" && ce.visibility !== "hidden" && Math.ceil(K.getBoundingClientRect().width);
|
|
@@ -926,25 +926,25 @@ const nc = ({ host: e, onChange: t }) => {
|
|
|
926
926
|
h((ce) => ce === ae ? ce : ae);
|
|
927
927
|
}, [L]);
|
|
928
928
|
return Ze(() => {
|
|
929
|
-
const
|
|
930
|
-
|
|
929
|
+
const S = window.requestAnimationFrame(() => {
|
|
930
|
+
C();
|
|
931
931
|
}), w = window.setTimeout(() => {
|
|
932
|
-
|
|
932
|
+
C();
|
|
933
933
|
}, 60);
|
|
934
934
|
return () => {
|
|
935
|
-
window.cancelAnimationFrame(
|
|
935
|
+
window.cancelAnimationFrame(S), window.clearTimeout(w);
|
|
936
936
|
};
|
|
937
|
-
}, [
|
|
937
|
+
}, [C]), ie(() => {
|
|
938
938
|
if (!("fonts" in document)) return;
|
|
939
|
-
let
|
|
939
|
+
let S = !1;
|
|
940
940
|
const w = document.fonts;
|
|
941
941
|
if (w?.ready)
|
|
942
942
|
return w.ready.then(() => {
|
|
943
|
-
|
|
943
|
+
S || C();
|
|
944
944
|
}), () => {
|
|
945
|
-
|
|
945
|
+
S = !0;
|
|
946
946
|
};
|
|
947
|
-
}, [
|
|
947
|
+
}, [C]), $n(
|
|
948
948
|
/* @__PURE__ */ V(
|
|
949
949
|
"div",
|
|
950
950
|
{
|
|
@@ -960,7 +960,7 @@ const nc = ({ host: e, onChange: t }) => {
|
|
|
960
960
|
searchValue: d,
|
|
961
961
|
onChange: T,
|
|
962
962
|
onSearch: _,
|
|
963
|
-
onClear:
|
|
963
|
+
onClear: A,
|
|
964
964
|
onInputKeyDown: N,
|
|
965
965
|
filterOption: !1,
|
|
966
966
|
placeholder: r || "搜索或输入",
|
|
@@ -1079,20 +1079,20 @@ const lc = ({ host: e, onChange: t }) => {
|
|
|
1079
1079
|
if (!_) return;
|
|
1080
1080
|
const N = _.querySelector("textarea");
|
|
1081
1081
|
if (!N) return;
|
|
1082
|
-
const
|
|
1082
|
+
const A = window.getComputedStyle(N), L = A.fontStyle || "normal", C = A.fontWeight || "400", S = A.fontSize || "16px", w = A.fontFamily || "sans-serif", I = `${L} ${C} ${S} ${w}`, P = Number.parseFloat(A.paddingLeft) || 0, M = Number.parseFloat(A.paddingRight) || 0, k = (o && o.length > 0 ? o : r) || " ", x = uc(k, I, A.letterSpacing || "0", P, M), $ = Math.max(24, Math.min(600, x + 2));
|
|
1083
1083
|
E((H) => H === $ ? H : $);
|
|
1084
1084
|
}, [r, o]);
|
|
1085
1085
|
ie(() => {
|
|
1086
1086
|
const _ = c.current;
|
|
1087
1087
|
if (!_ || typeof ResizeObserver > "u") return;
|
|
1088
1088
|
let N = 0;
|
|
1089
|
-
const
|
|
1089
|
+
const A = new ResizeObserver(() => {
|
|
1090
1090
|
N && window.cancelAnimationFrame(N), N = window.requestAnimationFrame(() => {
|
|
1091
1091
|
t(n, l.current);
|
|
1092
1092
|
});
|
|
1093
1093
|
});
|
|
1094
|
-
return
|
|
1095
|
-
N && window.cancelAnimationFrame(N),
|
|
1094
|
+
return A.observe(_), () => {
|
|
1095
|
+
N && window.cancelAnimationFrame(N), A.disconnect();
|
|
1096
1096
|
};
|
|
1097
1097
|
}, [n, t]), Ze(() => {
|
|
1098
1098
|
const _ = window.requestAnimationFrame(() => {
|
|
@@ -1402,14 +1402,14 @@ ${(e || "").replace(/\r\n/g, `
|
|
|
1402
1402
|
`已自动过滤 ${T} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`
|
|
1403
1403
|
), m && typeof m.maxCount == "number" && typeof m.minCount == "number") {
|
|
1404
1404
|
const _ = m.maxCount, N = typeof a == "number" ? a : 0;
|
|
1405
|
-
u((
|
|
1406
|
-
const L = { ...
|
|
1407
|
-
let
|
|
1408
|
-
for (const
|
|
1409
|
-
for (;
|
|
1410
|
-
|
|
1411
|
-
if (
|
|
1412
|
-
L[`${h}-${
|
|
1405
|
+
u((A) => {
|
|
1406
|
+
const L = { ...A };
|
|
1407
|
+
let C = Math.min(Math.max(N, 0), _ - 1);
|
|
1408
|
+
for (const S of b) {
|
|
1409
|
+
for (; C < _ && L[`${h}-${C}`] != null; )
|
|
1410
|
+
C += 1;
|
|
1411
|
+
if (C >= _) break;
|
|
1412
|
+
L[`${h}-${C}`] = S, C += 1;
|
|
1413
1413
|
}
|
|
1414
1414
|
return L;
|
|
1415
1415
|
});
|
|
@@ -1699,7 +1699,7 @@ const Ac = (e) => {
|
|
|
1699
1699
|
setMarkdownNameAnalyzeState: p,
|
|
1700
1700
|
nodeValues: E
|
|
1701
1701
|
}) => {
|
|
1702
|
-
const c = Z({}), y = Z({}), h = Z({}), m = Z(s), g = Z(u), b = Z(d), T = oe((
|
|
1702
|
+
const c = Z({}), y = Z({}), h = Z({}), m = Z(s), g = Z(u), b = Z(d), T = oe((A) => A.find((C) => C.type === "tag")?.text || null, []), _ = Z(e), N = Z(null);
|
|
1703
1703
|
ie(() => {
|
|
1704
1704
|
y.current = n;
|
|
1705
1705
|
}, [n]), ie(() => {
|
|
@@ -1711,35 +1711,35 @@ const Ac = (e) => {
|
|
|
1711
1711
|
}, [u]), ie(() => {
|
|
1712
1712
|
b.current = d;
|
|
1713
1713
|
}, [d]), ie(() => {
|
|
1714
|
-
const
|
|
1715
|
-
if (
|
|
1716
|
-
const
|
|
1714
|
+
const A = T(_.current), L = T(e);
|
|
1715
|
+
if (A && A !== L && t.current) {
|
|
1716
|
+
const C = {};
|
|
1717
1717
|
t.current.querySelectorAll('[data-type="variable"]').forEach((M) => {
|
|
1718
1718
|
const k = M.dataset.key;
|
|
1719
1719
|
if (k) {
|
|
1720
1720
|
const x = M.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1721
|
-
x && (
|
|
1721
|
+
x && (C[k] = x);
|
|
1722
1722
|
}
|
|
1723
1723
|
}), t.current.querySelectorAll('[data-type="select"]').forEach((M) => {
|
|
1724
1724
|
const k = M.dataset.key;
|
|
1725
1725
|
if (k) {
|
|
1726
1726
|
const x = (M.getAttribute("data-value") || "").trim();
|
|
1727
|
-
x && (
|
|
1727
|
+
x && (C[k] = x);
|
|
1728
1728
|
}
|
|
1729
1729
|
}), t.current.querySelectorAll('[data-type="searchable-select"]').forEach((M) => {
|
|
1730
1730
|
const k = M.dataset.key;
|
|
1731
1731
|
if (k) {
|
|
1732
1732
|
const x = (M.getAttribute("data-value") || "").trim();
|
|
1733
|
-
x && (
|
|
1733
|
+
x && (C[k] = x);
|
|
1734
1734
|
}
|
|
1735
1735
|
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((M) => {
|
|
1736
1736
|
const k = M.dataset.key;
|
|
1737
1737
|
if (k) {
|
|
1738
1738
|
const x = M.value.replace(/[\u200B]/g, "").trim();
|
|
1739
|
-
x && (
|
|
1739
|
+
x && (C[k] = x);
|
|
1740
1740
|
}
|
|
1741
|
-
}), c.current[
|
|
1742
|
-
variableValues:
|
|
1741
|
+
}), c.current[A] = {
|
|
1742
|
+
variableValues: C,
|
|
1743
1743
|
files: { ...y.current },
|
|
1744
1744
|
multiVariableCounts: { ...h.current },
|
|
1745
1745
|
reportAnalyzeState: { ...m.current },
|
|
@@ -1748,17 +1748,17 @@ const Ac = (e) => {
|
|
|
1748
1748
|
};
|
|
1749
1749
|
}
|
|
1750
1750
|
if (L && c.current[L]) {
|
|
1751
|
-
const
|
|
1752
|
-
N.current =
|
|
1751
|
+
const C = c.current[L];
|
|
1752
|
+
N.current = C, r(C.files), i(C.multiVariableCounts), o(C.reportAnalyzeState), l(C.markdownAnalyzeState), p(C.markdownNameAnalyzeState);
|
|
1753
1753
|
} else if (L) {
|
|
1754
1754
|
N.current = null;
|
|
1755
|
-
const
|
|
1756
|
-
e.forEach((
|
|
1757
|
-
if (
|
|
1758
|
-
const w = E?.[
|
|
1759
|
-
Array.isArray(w) && w.length > 0 ? S
|
|
1755
|
+
const C = {};
|
|
1756
|
+
e.forEach((S) => {
|
|
1757
|
+
if (S.type === "multi-variable" && S.key) {
|
|
1758
|
+
const w = E?.[S.key];
|
|
1759
|
+
Array.isArray(w) && w.length > 0 ? C[S.key] = Math.min(w.length + 1, S.maxCount ?? 9) : C[S.key] = 1;
|
|
1760
1760
|
}
|
|
1761
|
-
}), i(
|
|
1761
|
+
}), i(C), r({}), o({}), l({}), p({});
|
|
1762
1762
|
} else
|
|
1763
1763
|
N.current = null, i({}), r({}), o({}), l({}), p({});
|
|
1764
1764
|
_.current = e;
|
|
@@ -1846,24 +1846,24 @@ const Ac = (e) => {
|
|
|
1846
1846
|
markdownNameAnalyzeStateRef: y
|
|
1847
1847
|
}) => {
|
|
1848
1848
|
const h = oe(() => vc(l), [l]), m = oe(
|
|
1849
|
-
(
|
|
1850
|
-
const
|
|
1851
|
-
if (!
|
|
1852
|
-
if (!
|
|
1849
|
+
(A, L) => {
|
|
1850
|
+
const C = (L || "").trim();
|
|
1851
|
+
if (!A) return;
|
|
1852
|
+
if (!C) {
|
|
1853
1853
|
a((P) => ({
|
|
1854
1854
|
...P,
|
|
1855
|
-
[
|
|
1855
|
+
[A]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
|
|
1856
1856
|
}));
|
|
1857
1857
|
return;
|
|
1858
1858
|
}
|
|
1859
|
-
const
|
|
1860
|
-
if (
|
|
1859
|
+
const S = r[A];
|
|
1860
|
+
if (S?.lastParsedUrl && S.lastParsedUrl === C && (S.status === "loading" || S.status === "success"))
|
|
1861
1861
|
return;
|
|
1862
1862
|
a((P) => ({
|
|
1863
1863
|
...P,
|
|
1864
|
-
[
|
|
1864
|
+
[A]: { ...P[A], status: "loading", error: void 0, lastParsedUrl: C }
|
|
1865
1865
|
}));
|
|
1866
|
-
const w = Ac(
|
|
1866
|
+
const w = Ac(C);
|
|
1867
1867
|
(e || (async (P) => ({
|
|
1868
1868
|
modules: [
|
|
1869
1869
|
{
|
|
@@ -1881,22 +1881,22 @@ const Ac = (e) => {
|
|
|
1881
1881
|
if (l.current) {
|
|
1882
1882
|
const k = h();
|
|
1883
1883
|
M.forEach((x, F) => {
|
|
1884
|
-
k[`${
|
|
1884
|
+
k[`${A}__module_${F}`] = x.content;
|
|
1885
1885
|
}), l.current.__tempVariableValues = k;
|
|
1886
1886
|
}
|
|
1887
1887
|
a((k) => ({
|
|
1888
1888
|
...k,
|
|
1889
|
-
[
|
|
1889
|
+
[A]: { status: "success", error: void 0, lastParsedUrl: C, modules: M }
|
|
1890
1890
|
}));
|
|
1891
1891
|
}).catch((P) => {
|
|
1892
1892
|
const M = P instanceof Error ? P.message : String(P);
|
|
1893
1893
|
a((k) => ({
|
|
1894
1894
|
...k,
|
|
1895
|
-
[
|
|
1896
|
-
...k[
|
|
1895
|
+
[A]: {
|
|
1896
|
+
...k[A] || { modules: [] },
|
|
1897
1897
|
status: "error",
|
|
1898
1898
|
error: M || "解析失败",
|
|
1899
|
-
lastParsedUrl:
|
|
1899
|
+
lastParsedUrl: C,
|
|
1900
1900
|
modules: []
|
|
1901
1901
|
}
|
|
1902
1902
|
}));
|
|
@@ -1904,65 +1904,65 @@ const Ac = (e) => {
|
|
|
1904
1904
|
},
|
|
1905
1905
|
[h, l, e, r, a]
|
|
1906
1906
|
), g = oe(
|
|
1907
|
-
(
|
|
1908
|
-
const
|
|
1909
|
-
if (!
|
|
1910
|
-
if (!
|
|
1907
|
+
(A, L) => {
|
|
1908
|
+
const C = (L || "").trim();
|
|
1909
|
+
if (!A) return;
|
|
1910
|
+
if (!C) {
|
|
1911
1911
|
s((k) => ({
|
|
1912
1912
|
...k,
|
|
1913
|
-
[
|
|
1913
|
+
[A]: { status: "idle", modules: [], lastParsedText: void 0, error: void 0 }
|
|
1914
1914
|
}));
|
|
1915
1915
|
return;
|
|
1916
1916
|
}
|
|
1917
|
-
const
|
|
1918
|
-
if (
|
|
1917
|
+
const S = i[A];
|
|
1918
|
+
if (S?.lastParsedText && S.lastParsedText === C && S.status === "success")
|
|
1919
1919
|
return;
|
|
1920
1920
|
if (!t) {
|
|
1921
|
-
const k = mo(
|
|
1921
|
+
const k = mo(C), x = jr({
|
|
1922
1922
|
modules: [{ title: "内容", content: go(k), markdown: k }]
|
|
1923
1923
|
});
|
|
1924
1924
|
if (l.current) {
|
|
1925
1925
|
const F = h();
|
|
1926
1926
|
x.forEach(($, H) => {
|
|
1927
|
-
F[`${
|
|
1927
|
+
F[`${A}__module_${H}`] = $.content;
|
|
1928
1928
|
}), l.current.__tempVariableValues = F;
|
|
1929
1929
|
}
|
|
1930
1930
|
s((F) => ({
|
|
1931
1931
|
...F,
|
|
1932
|
-
[
|
|
1932
|
+
[A]: { status: "success", error: void 0, lastParsedText: C, modules: x }
|
|
1933
1933
|
}));
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
|
-
const w = c.current[
|
|
1936
|
+
const w = c.current[A]?.status === "loading";
|
|
1937
1937
|
w || s((k) => ({
|
|
1938
1938
|
...k,
|
|
1939
|
-
[
|
|
1939
|
+
[A]: { ...k[A], status: "loading", error: void 0, lastParsedText: C }
|
|
1940
1940
|
}));
|
|
1941
1941
|
const I = 500, P = Date.now();
|
|
1942
1942
|
setTimeout(() => {
|
|
1943
|
-
t({ text:
|
|
1943
|
+
t({ text: C }).then((x) => {
|
|
1944
1944
|
const F = jr(x), $ = Date.now() - P, H = Math.max(0, I - $);
|
|
1945
1945
|
setTimeout(() => {
|
|
1946
1946
|
if (l.current) {
|
|
1947
1947
|
const q = h();
|
|
1948
1948
|
F.forEach((v, G) => {
|
|
1949
|
-
q[`${
|
|
1949
|
+
q[`${A}__module_${G}`] = v.content;
|
|
1950
1950
|
}), l.current.__tempVariableValues = q;
|
|
1951
1951
|
}
|
|
1952
1952
|
s((q) => ({
|
|
1953
1953
|
...q,
|
|
1954
|
-
[
|
|
1954
|
+
[A]: { status: "success", error: void 0, lastParsedText: C, modules: F }
|
|
1955
1955
|
}));
|
|
1956
1956
|
}, H);
|
|
1957
1957
|
}).catch((x) => {
|
|
1958
1958
|
const F = x instanceof Error ? x.message : String(x);
|
|
1959
1959
|
s(($) => ({
|
|
1960
1960
|
...$,
|
|
1961
|
-
[
|
|
1962
|
-
...$[
|
|
1961
|
+
[A]: {
|
|
1962
|
+
...$[A] || { modules: [] },
|
|
1963
1963
|
status: "error",
|
|
1964
1964
|
error: F,
|
|
1965
|
-
lastParsedText:
|
|
1965
|
+
lastParsedText: C
|
|
1966
1966
|
}
|
|
1967
1967
|
}));
|
|
1968
1968
|
});
|
|
@@ -1977,48 +1977,48 @@ const Ac = (e) => {
|
|
|
1977
1977
|
s
|
|
1978
1978
|
]
|
|
1979
1979
|
), b = oe(
|
|
1980
|
-
(
|
|
1981
|
-
const
|
|
1982
|
-
if (!
|
|
1983
|
-
if (!
|
|
1980
|
+
(A, L) => {
|
|
1981
|
+
const C = (L || "").trim();
|
|
1982
|
+
if (!A) return;
|
|
1983
|
+
if (!C) {
|
|
1984
1984
|
u((k) => ({
|
|
1985
1985
|
...k,
|
|
1986
|
-
[
|
|
1986
|
+
[A]: { status: "idle", modules: [], lastParsedText: void 0, error: void 0 }
|
|
1987
1987
|
}));
|
|
1988
1988
|
return;
|
|
1989
1989
|
}
|
|
1990
|
-
const
|
|
1991
|
-
if (
|
|
1992
|
-
const w = y.current[
|
|
1990
|
+
const S = y.current[A];
|
|
1991
|
+
if (S?.lastParsedText && S.lastParsedText === C && S.status === "success" || !n) return;
|
|
1992
|
+
const w = y.current[A]?.status === "loading";
|
|
1993
1993
|
w || u((k) => ({
|
|
1994
1994
|
...k,
|
|
1995
|
-
[
|
|
1995
|
+
[A]: { ...k[A], status: "loading", error: void 0, lastParsedText: C }
|
|
1996
1996
|
}));
|
|
1997
1997
|
const I = 500, P = Date.now();
|
|
1998
1998
|
setTimeout(() => {
|
|
1999
|
-
n({ text:
|
|
1999
|
+
n({ text: C }).then((x) => {
|
|
2000
2000
|
const F = jr(x), $ = Date.now() - P, H = Math.max(0, I - $);
|
|
2001
2001
|
setTimeout(() => {
|
|
2002
2002
|
if (l.current) {
|
|
2003
2003
|
const q = h();
|
|
2004
2004
|
F.forEach((v, G) => {
|
|
2005
|
-
q[`${
|
|
2005
|
+
q[`${A}__module_${G}`] = v.content;
|
|
2006
2006
|
}), l.current.__tempVariableValues = q;
|
|
2007
2007
|
}
|
|
2008
2008
|
u((q) => ({
|
|
2009
2009
|
...q,
|
|
2010
|
-
[
|
|
2010
|
+
[A]: { status: "success", error: void 0, lastParsedText: C, modules: F }
|
|
2011
2011
|
}));
|
|
2012
2012
|
}, H);
|
|
2013
2013
|
}).catch((x) => {
|
|
2014
2014
|
const F = x instanceof Error ? x.message : String(x);
|
|
2015
2015
|
u(($) => ({
|
|
2016
2016
|
...$,
|
|
2017
|
-
[
|
|
2018
|
-
...$[
|
|
2017
|
+
[A]: {
|
|
2018
|
+
...$[A] || { modules: [] },
|
|
2019
2019
|
status: "error",
|
|
2020
2020
|
error: F,
|
|
2021
|
-
lastParsedText:
|
|
2021
|
+
lastParsedText: C
|
|
2022
2022
|
}
|
|
2023
2023
|
}));
|
|
2024
2024
|
});
|
|
@@ -2039,12 +2039,12 @@ const Ac = (e) => {
|
|
|
2039
2039
|
}, [p, g]), Ze(() => {
|
|
2040
2040
|
E.current = b;
|
|
2041
2041
|
}, [E, b]);
|
|
2042
|
-
const T = oe((
|
|
2043
|
-
d.current(
|
|
2044
|
-
}, [d]), _ = oe((
|
|
2045
|
-
p.current(
|
|
2046
|
-
}, [p]), N = oe((
|
|
2047
|
-
E.current(
|
|
2042
|
+
const T = oe((A, L) => {
|
|
2043
|
+
d.current(A, L);
|
|
2044
|
+
}, [d]), _ = oe((A, L) => {
|
|
2045
|
+
p.current(A, L);
|
|
2046
|
+
}, [p]), N = oe((A, L) => {
|
|
2047
|
+
E.current(A, L);
|
|
2048
2048
|
}, [E]);
|
|
2049
2049
|
return { handleReportUrlBlur: T, handleMarkdownBlur: _, handleMarkdownNameBlur: N };
|
|
2050
2050
|
}, Nc = ({
|
|
@@ -2077,20 +2077,20 @@ const Ac = (e) => {
|
|
|
2077
2077
|
try {
|
|
2078
2078
|
const _ = T.getBoundingClientRect(), N = document.createRange();
|
|
2079
2079
|
N.selectNodeContents(T);
|
|
2080
|
-
const
|
|
2080
|
+
const A = Array.from(N.getClientRects());
|
|
2081
2081
|
let L;
|
|
2082
|
-
if (
|
|
2083
|
-
const
|
|
2082
|
+
if (A.length > 0) {
|
|
2083
|
+
const C = Math.min(...A.map((I) => I.top)), S = 2;
|
|
2084
2084
|
let w = 0;
|
|
2085
|
-
for (const I of
|
|
2086
|
-
Math.abs(I.top -
|
|
2085
|
+
for (const I of A)
|
|
2086
|
+
Math.abs(I.top - C) <= S && (w = Math.max(w, I.bottom));
|
|
2087
2087
|
L = w > 0 ? Math.max(0, Math.ceil(w - _.top)) : 58;
|
|
2088
2088
|
} else {
|
|
2089
|
-
const
|
|
2090
|
-
L = Math.max(0, Math.ceil(
|
|
2089
|
+
const C = window.getComputedStyle(T), S = Number.parseFloat(C.paddingTop) || 0, w = Number.parseFloat(C.lineHeight) || 34;
|
|
2090
|
+
L = Math.max(0, Math.ceil(S + w)) || 58;
|
|
2091
2091
|
}
|
|
2092
2092
|
if (!Number.isFinite(L) || L <= 0) return;
|
|
2093
|
-
s((
|
|
2093
|
+
s((C) => C === L ? C : L);
|
|
2094
2094
|
} catch {
|
|
2095
2095
|
}
|
|
2096
2096
|
}, [
|
|
@@ -2112,21 +2112,21 @@ const Ac = (e) => {
|
|
|
2112
2112
|
b.scrollTop = 0, b.scrollLeft = 0, T && (T.scrollTop = 0, T.scrollLeft = 0), _ && (_.scrollTop = 0, _.scrollLeft = 0);
|
|
2113
2113
|
}, L = (typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : 260) + 220;
|
|
2114
2114
|
N();
|
|
2115
|
-
const
|
|
2115
|
+
const C = (M) => {
|
|
2116
2116
|
M.preventDefault(), M.stopPropagation(), N();
|
|
2117
2117
|
};
|
|
2118
|
-
b.addEventListener("wheel",
|
|
2119
|
-
const
|
|
2118
|
+
b.addEventListener("wheel", C, { passive: !1 }), b.addEventListener("touchmove", C, { passive: !1 }), T && (T.addEventListener("wheel", C, { passive: !1 }), T.addEventListener("touchmove", C, { passive: !1 }));
|
|
2119
|
+
const S = performance.now();
|
|
2120
2120
|
let w = 0;
|
|
2121
2121
|
const I = (M) => {
|
|
2122
|
-
N(), M -
|
|
2122
|
+
N(), M - S < L && (w = window.requestAnimationFrame(I));
|
|
2123
2123
|
};
|
|
2124
2124
|
w = window.requestAnimationFrame(I);
|
|
2125
2125
|
const P = window.setTimeout(() => {
|
|
2126
2126
|
N();
|
|
2127
2127
|
}, L);
|
|
2128
2128
|
return () => {
|
|
2129
|
-
b.removeEventListener("wheel",
|
|
2129
|
+
b.removeEventListener("wheel", C), b.removeEventListener("touchmove", C), T && (T.removeEventListener("wheel", C), T.removeEventListener("touchmove", C)), window.cancelAnimationFrame(w), window.clearTimeout(P);
|
|
2130
2130
|
};
|
|
2131
2131
|
}, [e, t, r, n, i, a]);
|
|
2132
2132
|
const g = l.filter((b) => b.key && b.type !== "report-module" && b.type !== "markdown-module").map((b) => `${b.type}:${b.key}`).join("|");
|
|
@@ -2367,8 +2367,8 @@ function Ar(e, t) {
|
|
|
2367
2367
|
try {
|
|
2368
2368
|
const L = Lc(h, r);
|
|
2369
2369
|
if (!L || !Number.isFinite(L)) {
|
|
2370
|
-
const
|
|
2371
|
-
return Math.max(0,
|
|
2370
|
+
const C = pr(h);
|
|
2371
|
+
return Math.max(0, C - 22);
|
|
2372
2372
|
}
|
|
2373
2373
|
return L;
|
|
2374
2374
|
} catch {
|
|
@@ -2380,18 +2380,18 @@ function Ar(e, t) {
|
|
|
2380
2380
|
const L = r.querySelector(".variable-info-icon:not(.hidden)");
|
|
2381
2381
|
if (!L) return 24;
|
|
2382
2382
|
try {
|
|
2383
|
-
const
|
|
2384
|
-
return Math.max(16, Math.min(120,
|
|
2383
|
+
const C = window.getComputedStyle(L), S = Math.ceil(L.getBoundingClientRect().width || 0) || 16, w = Math.ceil(Number.parseFloat(C.right || "0")) || 4;
|
|
2384
|
+
return Math.max(16, Math.min(120, S + w + 2));
|
|
2385
2385
|
} catch {
|
|
2386
2386
|
return 24;
|
|
2387
2387
|
}
|
|
2388
2388
|
})();
|
|
2389
2389
|
T > 0 ? r.style.setProperty("--rte-icon-pad-right", `${T}px`) : r.style.removeProperty("--rte-icon-pad-right");
|
|
2390
|
-
const _ = 2, N = T > 0 ? T : 8,
|
|
2390
|
+
const _ = 2, N = T > 0 ? T : 8, A = Math.max(
|
|
2391
2391
|
24,
|
|
2392
2392
|
Math.min(600, Math.ceil(b + 8 + N + _))
|
|
2393
2393
|
);
|
|
2394
|
-
r.style.minWidth = `${
|
|
2394
|
+
r.style.minWidth = `${A}px`;
|
|
2395
2395
|
} else
|
|
2396
2396
|
r.style.minWidth = "";
|
|
2397
2397
|
} else
|
|
@@ -2433,19 +2433,19 @@ function ei(e, t, n, r) {
|
|
|
2433
2433
|
if (o) {
|
|
2434
2434
|
const h = [];
|
|
2435
2435
|
let m = [];
|
|
2436
|
-
for (const
|
|
2437
|
-
if (
|
|
2436
|
+
for (const S of t) {
|
|
2437
|
+
if (S.exclusionGroup === "separator") {
|
|
2438
2438
|
m.length && h.push(m), m = [];
|
|
2439
2439
|
continue;
|
|
2440
2440
|
}
|
|
2441
|
-
!
|
|
2441
|
+
!S.exclusionGroup || S.exclusionGroup === "separator" || (S.type === "upload" && S.key ? m.push({ type: "upload", key: S.key }) : (S.type === "video-url" || S.type === "video-upload") && S.key ? m.push({ type: S.type, key: S.key }) : (S.type === "variable" || S.type === "multi-variable" || S.type === "markdown" || S.type === "markdown-name" || S.type === "markdown-module") && S.key ? m.push({ type: S.type === "multi-variable" ? "multi-variable" : "variable", key: S.key }) : m.push({ type: "other", nodeType: S.type }));
|
|
2442
2442
|
}
|
|
2443
2443
|
m.length && h.push(m);
|
|
2444
|
-
const g = (
|
|
2445
|
-
const w = t.find((I) => I.type === "upload" && I.key ===
|
|
2444
|
+
const g = (S) => {
|
|
2445
|
+
const w = t.find((I) => I.type === "upload" && I.key === S);
|
|
2446
2446
|
return w ? typeof w.maxCount == "number" && w.maxCount > 1 ? w.maxCount : 1 : 0;
|
|
2447
|
-
}, b = h.map((
|
|
2448
|
-
for (const w of
|
|
2447
|
+
}, b = h.map((S) => {
|
|
2448
|
+
for (const w of S)
|
|
2449
2449
|
if (w.type !== "other") {
|
|
2450
2450
|
if (w.type === "video-url" || w.type === "video-upload") {
|
|
2451
2451
|
const I = r?.[w.key];
|
|
@@ -2510,10 +2510,10 @@ function ei(e, t, n, r) {
|
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
2512
|
return !1;
|
|
2513
|
-
}), T = b.some(Boolean), _ = T ? b.findIndex(Boolean) : -1, N = (
|
|
2514
|
-
`[data-type="video-url"][data-key="${
|
|
2515
|
-
),
|
|
2516
|
-
for (const w of h[
|
|
2513
|
+
}), T = b.some(Boolean), _ = T ? b.findIndex(Boolean) : -1, N = (S) => e.current.querySelector(
|
|
2514
|
+
`[data-type="video-url"][data-key="${S}"], [data-type="video-upload"][data-key="${S}"], [data-type="variable"][data-node-type="video-url"][data-key="${S}"]`
|
|
2515
|
+
), A = (S) => {
|
|
2516
|
+
for (const w of h[S] || [])
|
|
2517
2517
|
if (w.type !== "other") {
|
|
2518
2518
|
if (w.type === "video-url" || w.type === "video-upload") {
|
|
2519
2519
|
const I = N(w.key);
|
|
@@ -2545,8 +2545,8 @@ function ei(e, t, n, r) {
|
|
|
2545
2545
|
});
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
|
-
}, L = (
|
|
2549
|
-
for (const w of h[
|
|
2548
|
+
}, L = (S) => {
|
|
2549
|
+
for (const w of h[S] || [])
|
|
2550
2550
|
if (w.type !== "other") {
|
|
2551
2551
|
if (w.type === "video-url" || w.type === "video-upload") {
|
|
2552
2552
|
const I = N(w.key);
|
|
@@ -2576,10 +2576,10 @@ function ei(e, t, n, r) {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
}
|
|
2578
2578
|
};
|
|
2579
|
-
for (let
|
|
2580
|
-
!T ||
|
|
2581
|
-
e.current.querySelectorAll('[data-group="separator"]').forEach((
|
|
2582
|
-
|
|
2579
|
+
for (let S = 0; S < h.length; S++)
|
|
2580
|
+
!T || S === _ ? A(S) : L(S);
|
|
2581
|
+
e.current.querySelectorAll('[data-group="separator"]').forEach((S) => {
|
|
2582
|
+
S.closest('[data-rte-force-hidden="1"]') || (T ? s(S) : S.style.setProperty("display", "inline-flex", "important"));
|
|
2583
2583
|
});
|
|
2584
2584
|
return;
|
|
2585
2585
|
}
|
|
@@ -2691,12 +2691,12 @@ function ti(e, t, n, r, a) {
|
|
|
2691
2691
|
if (b.length === 0)
|
|
2692
2692
|
return g;
|
|
2693
2693
|
let T = -1;
|
|
2694
|
-
for (let
|
|
2695
|
-
if ((b[
|
|
2696
|
-
T =
|
|
2694
|
+
for (let A = 0; A < b.length; A++)
|
|
2695
|
+
if ((b[A].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
|
|
2696
|
+
T = A;
|
|
2697
2697
|
break;
|
|
2698
2698
|
}
|
|
2699
|
-
return b.filter((
|
|
2699
|
+
return b.filter((A, L) => L !== T).map((A) => (A.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
|
|
2700
2700
|
`).trim() || g;
|
|
2701
2701
|
}, s = (h) => h ? !!h.closest('[data-rte-force-hidden="1"]') : !1, o = [];
|
|
2702
2702
|
for (let h = 0; h < t.length; h++) {
|
|
@@ -2748,7 +2748,7 @@ function ti(e, t, n, r, a) {
|
|
|
2748
2748
|
m.exclusionGroup === "separator" && h.push(g);
|
|
2749
2749
|
});
|
|
2750
2750
|
for (const m of h) {
|
|
2751
|
-
const b = o.filter((N) => typeof N.__index == "number" && N.__index < m).sort((N,
|
|
2751
|
+
const b = o.filter((N) => typeof N.__index == "number" && N.__index < m).sort((N, A) => (A.__index ?? 0) - (N.__index ?? 0))[0], _ = o.filter((N) => typeof N.__index == "number" && N.__index > m).sort((N, A) => (N.__index ?? 0) - (A.__index ?? 0))[0];
|
|
2752
2752
|
b && _ && l.push([b, _]);
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
@@ -2905,10 +2905,10 @@ function ti(e, t, n, r, a) {
|
|
|
2905
2905
|
`[data-type="variable"][data-multi-key="${b.key}"]`
|
|
2906
2906
|
);
|
|
2907
2907
|
let _ = 0;
|
|
2908
|
-
for (const
|
|
2909
|
-
if (
|
|
2908
|
+
for (const A of Array.from(T)) {
|
|
2909
|
+
if (A.classList.contains("show-placeholder"))
|
|
2910
2910
|
continue;
|
|
2911
|
-
|
|
2911
|
+
A.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (_ += 1);
|
|
2912
2912
|
}
|
|
2913
2913
|
const N = b.minCount && b.minCount > 0 ? b.minCount : 1;
|
|
2914
2914
|
if (_ >= N) {
|
|
@@ -3137,12 +3137,12 @@ const Oc = ({
|
|
|
3137
3137
|
return;
|
|
3138
3138
|
const T = g.dataset.multiKey, _ = g.dataset.key, N = g.dataset.index;
|
|
3139
3139
|
if (!T || !_ || N === void 0) return;
|
|
3140
|
-
const
|
|
3141
|
-
if (!(!
|
|
3140
|
+
const A = h.relatedTarget;
|
|
3141
|
+
if (!(!A || !r.current.contains(A)))
|
|
3142
3142
|
return;
|
|
3143
|
-
const
|
|
3144
|
-
if (
|
|
3145
|
-
const P =
|
|
3143
|
+
const C = g.innerText.replace(/[\u200B\n]/g, "").trim(), S = /[、,,\s]+/;
|
|
3144
|
+
if (S.test(C)) {
|
|
3145
|
+
const P = C.split(S).map((M) => M.trim()).filter((M) => M.length > 0).slice(0, 9);
|
|
3146
3146
|
if (P.length > 1) {
|
|
3147
3147
|
const M = e.find((k) => k.type === "multi-variable" && k.key === T);
|
|
3148
3148
|
if (M) {
|
|
@@ -3222,23 +3222,23 @@ const Oc = ({
|
|
|
3222
3222
|
activeVideoKeyRef: _
|
|
3223
3223
|
}) => {
|
|
3224
3224
|
const N = (...L) => {
|
|
3225
|
-
},
|
|
3225
|
+
}, A = (L) => {
|
|
3226
3226
|
try {
|
|
3227
|
-
const
|
|
3228
|
-
if (!
|
|
3229
|
-
const
|
|
3227
|
+
const C = window.getSelection();
|
|
3228
|
+
if (!C) return N(L, "no selection");
|
|
3229
|
+
const S = C.rangeCount > 0 ? C.getRangeAt(0) : null;
|
|
3230
3230
|
N(L, {
|
|
3231
|
-
rangeCount:
|
|
3232
|
-
isCollapsed:
|
|
3233
|
-
anchorNode:
|
|
3234
|
-
anchorOffset:
|
|
3235
|
-
focusNode:
|
|
3236
|
-
focusOffset:
|
|
3237
|
-
range:
|
|
3238
|
-
startContainer:
|
|
3239
|
-
startOffset:
|
|
3240
|
-
endContainer:
|
|
3241
|
-
endOffset:
|
|
3231
|
+
rangeCount: C.rangeCount,
|
|
3232
|
+
isCollapsed: C.isCollapsed,
|
|
3233
|
+
anchorNode: C.anchorNode?.nodeType === Node.TEXT_NODE ? "TEXT" : C.anchorNode?.nodeName,
|
|
3234
|
+
anchorOffset: C.anchorOffset,
|
|
3235
|
+
focusNode: C.focusNode?.nodeType === Node.TEXT_NODE ? "TEXT" : C.focusNode?.nodeName,
|
|
3236
|
+
focusOffset: C.focusOffset,
|
|
3237
|
+
range: S ? {
|
|
3238
|
+
startContainer: S.startContainer.nodeType === Node.TEXT_NODE ? "TEXT" : S.startContainer.nodeName,
|
|
3239
|
+
startOffset: S.startOffset,
|
|
3240
|
+
endContainer: S.endContainer.nodeType === Node.TEXT_NODE ? "TEXT" : S.endContainer.nodeName,
|
|
3241
|
+
endOffset: S.endOffset
|
|
3242
3242
|
} : null
|
|
3243
3243
|
});
|
|
3244
3244
|
} catch {
|
|
@@ -3249,10 +3249,10 @@ const Oc = ({
|
|
|
3249
3249
|
if (e)
|
|
3250
3250
|
return;
|
|
3251
3251
|
t && n?.(!1);
|
|
3252
|
-
const
|
|
3253
|
-
if (N("click", { tag:
|
|
3252
|
+
const C = L.target;
|
|
3253
|
+
if (N("click", { tag: C.tagName, cls: C.className }), A("before click"), C.closest('[data-type="datepicker"]'))
|
|
3254
3254
|
return;
|
|
3255
|
-
if (
|
|
3255
|
+
if (C.closest(".tag-close-btn")) {
|
|
3256
3256
|
L.preventDefault(), L.stopPropagation();
|
|
3257
3257
|
return;
|
|
3258
3258
|
}
|
|
@@ -3273,7 +3273,7 @@ const Oc = ({
|
|
|
3273
3273
|
delete D.dataset.rteForceHidden;
|
|
3274
3274
|
}
|
|
3275
3275
|
});
|
|
3276
|
-
}, P =
|
|
3276
|
+
}, P = C.closest(".rte-textarea-toggle");
|
|
3277
3277
|
if (P) {
|
|
3278
3278
|
L.preventDefault(), L.stopPropagation();
|
|
3279
3279
|
const v = P.closest(".rte-textarea-wrapper"), G = v?.querySelector('[data-type="textarea"]'), D = !(P.getAttribute("data-expanded") === "true");
|
|
@@ -3290,7 +3290,7 @@ const Oc = ({
|
|
|
3290
3290
|
i.current && (D ? i.current.classList.add("rte-overlay-active") : i.current.classList.remove("rte-overlay-active"));
|
|
3291
3291
|
return;
|
|
3292
3292
|
}
|
|
3293
|
-
const M =
|
|
3293
|
+
const M = C.closest(".rte-richtext-toggle");
|
|
3294
3294
|
if (M) {
|
|
3295
3295
|
L.preventDefault(), L.stopPropagation();
|
|
3296
3296
|
const v = M.closest(".rte-richtext-wrapper"), G = v?.querySelector('[data-type="richtext"]'), D = !(M.getAttribute("data-expanded") === "true");
|
|
@@ -3323,24 +3323,24 @@ const Oc = ({
|
|
|
3323
3323
|
}
|
|
3324
3324
|
return;
|
|
3325
3325
|
}
|
|
3326
|
-
if (
|
|
3326
|
+
if (C.closest('[data-type="text"]')) {
|
|
3327
3327
|
L.preventDefault(), L.stopPropagation();
|
|
3328
3328
|
const v = window.getSelection();
|
|
3329
3329
|
v && v.removeAllRanges();
|
|
3330
3330
|
return;
|
|
3331
3331
|
}
|
|
3332
|
-
if (a &&
|
|
3332
|
+
if (a && C.closest(".tag-node")) {
|
|
3333
3333
|
L.preventDefault(), L.stopPropagation();
|
|
3334
3334
|
const G = window.getSelection();
|
|
3335
3335
|
G && G.removeAllRanges();
|
|
3336
3336
|
return;
|
|
3337
3337
|
}
|
|
3338
|
-
const x =
|
|
3338
|
+
const x = C.closest('[data-type="variable"]');
|
|
3339
3339
|
if (x) {
|
|
3340
3340
|
if (h.current)
|
|
3341
3341
|
return;
|
|
3342
3342
|
if (x.dataset.variableRender !== "antd-textarea") {
|
|
3343
|
-
const v = !!
|
|
3343
|
+
const v = !!C.closest(".variable-info-icon"), G = x.classList.contains("show-placeholder") || (x.innerText || "").replace(/[\u200B\n]/g, "").trim().length === 0;
|
|
3344
3344
|
if (N("v1 variable click", {
|
|
3345
3345
|
key: x.dataset.key,
|
|
3346
3346
|
isPlaceholder: G,
|
|
@@ -3355,12 +3355,12 @@ const Oc = ({
|
|
|
3355
3355
|
const D = window.getSelection();
|
|
3356
3356
|
if (!D) return;
|
|
3357
3357
|
const ee = document.createTreeWalker(x, NodeFilter.SHOW_TEXT), te = ee.nextNode() ? ee.currentNode : null, se = document.createRange();
|
|
3358
|
-
te ? (se.setStart(te, 0), se.collapse(!0)) : (se.selectNodeContents(x), se.collapse(!0)), D.removeAllRanges(), D.addRange(se),
|
|
3358
|
+
te ? (se.setStart(te, 0), se.collapse(!0)) : (se.selectNodeContents(x), se.collapse(!0)), D.removeAllRanges(), D.addRange(se), A("after placeCaretLeft()");
|
|
3359
3359
|
} catch {
|
|
3360
3360
|
}
|
|
3361
3361
|
};
|
|
3362
3362
|
setTimeout(() => {
|
|
3363
|
-
window.requestAnimationFrame(Q), window.requestAnimationFrame(() =>
|
|
3363
|
+
window.requestAnimationFrame(Q), window.requestAnimationFrame(() => A("post-raf (click)"));
|
|
3364
3364
|
}, 0);
|
|
3365
3365
|
}
|
|
3366
3366
|
}
|
|
@@ -3370,7 +3370,7 @@ const Oc = ({
|
|
|
3370
3370
|
}, 10);
|
|
3371
3371
|
return;
|
|
3372
3372
|
}
|
|
3373
|
-
const F =
|
|
3373
|
+
const F = C.closest(".video-remove-btn");
|
|
3374
3374
|
if (F) {
|
|
3375
3375
|
L.preventDefault(), L.stopPropagation();
|
|
3376
3376
|
const G = F.closest('[data-type="video-url"], [data-type="video-upload"]')?.dataset.key;
|
|
@@ -3380,14 +3380,14 @@ const Oc = ({
|
|
|
3380
3380
|
});
|
|
3381
3381
|
return;
|
|
3382
3382
|
}
|
|
3383
|
-
const $ =
|
|
3383
|
+
const $ = C.closest('[data-type="video-upload"]');
|
|
3384
3384
|
if ($) {
|
|
3385
3385
|
L.preventDefault(), L.stopPropagation();
|
|
3386
3386
|
const v = $.dataset.key;
|
|
3387
3387
|
v && T?.current && _ && (_.current = v, T.current.value = "", T.current.click());
|
|
3388
3388
|
return;
|
|
3389
3389
|
}
|
|
3390
|
-
const H =
|
|
3390
|
+
const H = C.closest(".file-remove-btn");
|
|
3391
3391
|
if (H) {
|
|
3392
3392
|
L.preventDefault(), L.stopPropagation();
|
|
3393
3393
|
const v = H.closest('[data-type="upload"]'), G = v?.dataset.key, Q = v?.dataset.batchKey;
|
|
@@ -3416,7 +3416,7 @@ const Oc = ({
|
|
|
3416
3416
|
p(G);
|
|
3417
3417
|
return;
|
|
3418
3418
|
}
|
|
3419
|
-
const q =
|
|
3419
|
+
const q = C.closest('[data-type="upload"]');
|
|
3420
3420
|
if (q) {
|
|
3421
3421
|
const v = q.dataset.key, G = q.dataset.batchKey, Q = q.dataset.batchIndex;
|
|
3422
3422
|
if (v) {
|
|
@@ -3547,24 +3547,24 @@ const Oc = ({
|
|
|
3547
3547
|
if (g.dataset.variableRender === "antd-textarea")
|
|
3548
3548
|
return;
|
|
3549
3549
|
const b = g.innerText || "", T = !!g.querySelector("br") || b.includes(`
|
|
3550
|
-
`), _ = g.offsetHeight > 32,
|
|
3551
|
-
g.classList.toggle("rte-variable-multiline",
|
|
3550
|
+
`), _ = g.offsetHeight > 32, A = b.replace(/\u200B/g, "").trim().length > 0 && (T || _);
|
|
3551
|
+
g.classList.toggle("rte-variable-multiline", A), g.classList.toggle("rte-variable-force-block", A);
|
|
3552
3552
|
const L = g.closest(".rte-inline-group");
|
|
3553
|
-
L && L.classList.toggle("rte-inline-group-force-block",
|
|
3554
|
-
const
|
|
3555
|
-
|
|
3556
|
-
const
|
|
3557
|
-
if (
|
|
3553
|
+
L && L.classList.toggle("rte-inline-group-force-block", A);
|
|
3554
|
+
const C = g.closest(".required-upload-group, .required-multi-first");
|
|
3555
|
+
C && C.classList.toggle("rte-required-group-force-block", A);
|
|
3556
|
+
const S = g.querySelector(".variable-info-icon");
|
|
3557
|
+
if (S) {
|
|
3558
3558
|
let w = !1;
|
|
3559
3559
|
const I = document.createTreeWalker(g, NodeFilter.SHOW_TEXT, {
|
|
3560
|
-
acceptNode: (P) =>
|
|
3560
|
+
acceptNode: (P) => S.contains(P) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
3561
3561
|
});
|
|
3562
3562
|
for (; I.nextNode(); )
|
|
3563
3563
|
if (I.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
3564
3564
|
w = !0;
|
|
3565
3565
|
break;
|
|
3566
3566
|
}
|
|
3567
|
-
w ?
|
|
3567
|
+
w ? S.classList.add("hidden") : S.classList.remove("hidden"), g.classList.toggle("rte-variable-with-icon", !S.classList.contains("hidden"));
|
|
3568
3568
|
}
|
|
3569
3569
|
}), o || window.requestAnimationFrame(() => {
|
|
3570
3570
|
u();
|
|
@@ -3572,9 +3572,9 @@ const Oc = ({
|
|
|
3572
3572
|
e.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
|
|
3573
3573
|
if (!m.key) return;
|
|
3574
3574
|
const g = m.maxCount || 9, b = p[m.key] || 1, T = [];
|
|
3575
|
-
for (let
|
|
3576
|
-
const
|
|
3577
|
-
`[data-type="variable"][data-key="${
|
|
3575
|
+
for (let C = 0; C < b; C++) {
|
|
3576
|
+
const S = `${m.key}_${C}`, w = t.current.querySelector(
|
|
3577
|
+
`[data-type="variable"][data-key="${S}"][data-multi-key="${m.key}"]`
|
|
3578
3578
|
);
|
|
3579
3579
|
if (w) {
|
|
3580
3580
|
const I = (w.innerText || "").replace(/\u200B/g, "").replace(/\r\n/g, `
|
|
@@ -3583,16 +3583,16 @@ const Oc = ({
|
|
|
3583
3583
|
}
|
|
3584
3584
|
}
|
|
3585
3585
|
const N = (T[T.length - 1] || "") === "";
|
|
3586
|
-
let
|
|
3587
|
-
for (let
|
|
3588
|
-
if (T[
|
|
3589
|
-
|
|
3586
|
+
let A = !1, L = -1;
|
|
3587
|
+
for (let C = 0; C < T.length - 1; C++)
|
|
3588
|
+
if (T[C] === "") {
|
|
3589
|
+
A = !0, L = C;
|
|
3590
3590
|
break;
|
|
3591
3591
|
}
|
|
3592
|
-
if (
|
|
3593
|
-
const
|
|
3594
|
-
if (
|
|
3595
|
-
const M =
|
|
3592
|
+
if (A && L >= 0) {
|
|
3593
|
+
const C = window.getSelection();
|
|
3594
|
+
if (C && C.rangeCount > 0) {
|
|
3595
|
+
const M = C.getRangeAt(0), k = M.startContainer, x = k.nodeType === Node.ELEMENT_NODE ? k.closest('[data-type="variable"][data-multi-key]') : k.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
3596
3596
|
if (x) {
|
|
3597
3597
|
const F = x.dataset.key;
|
|
3598
3598
|
if (F) {
|
|
@@ -3603,15 +3603,15 @@ const Oc = ({
|
|
|
3603
3603
|
}
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
|
-
const
|
|
3607
|
-
for (let M = L; M <
|
|
3608
|
-
|
|
3609
|
-
|
|
3606
|
+
const S = [...T];
|
|
3607
|
+
for (let M = L; M < S.length - 1; M++)
|
|
3608
|
+
S[M] = S[M + 1];
|
|
3609
|
+
S.pop();
|
|
3610
3610
|
const w = {};
|
|
3611
|
-
|
|
3611
|
+
S.forEach((M, k) => {
|
|
3612
3612
|
M && (w[`${m.key}_${k}`] = M);
|
|
3613
3613
|
});
|
|
3614
|
-
const I = Math.max(N ?
|
|
3614
|
+
const I = Math.max(N ? S.length : S.length + 1, 1);
|
|
3615
3615
|
t.current.querySelectorAll('[data-type="variable"]').forEach((M) => {
|
|
3616
3616
|
const k = M.dataset.key, x = M.dataset.multiKey;
|
|
3617
3617
|
if (k && x !== m.key) {
|
|
@@ -3626,8 +3626,8 @@ const Oc = ({
|
|
|
3626
3626
|
return;
|
|
3627
3627
|
}
|
|
3628
3628
|
if (!N) {
|
|
3629
|
-
const
|
|
3630
|
-
`[data-type="variable"][data-key="${
|
|
3629
|
+
const C = b - 1, S = `${m.key}_${C}`, w = t.current.querySelector(
|
|
3630
|
+
`[data-type="variable"][data-key="${S}"][data-multi-key="${m.key}"]`
|
|
3631
3631
|
);
|
|
3632
3632
|
if (w && (w.innerText || "").replace(/\u200B/g, "").replace(/\r\n/g, `
|
|
3633
3633
|
`).trim().length > 0 && b < g) {
|
|
@@ -3870,8 +3870,8 @@ const Oc = ({
|
|
|
3870
3870
|
if (!b) return;
|
|
3871
3871
|
const T = h;
|
|
3872
3872
|
T.focus();
|
|
3873
|
-
const _ = document.createTreeWalker(T, NodeFilter.SHOW_TEXT), N = _.nextNode() ? _.currentNode : null,
|
|
3874
|
-
N ? (
|
|
3873
|
+
const _ = document.createTreeWalker(T, NodeFilter.SHOW_TEXT), N = _.nextNode() ? _.currentNode : null, A = document.createRange();
|
|
3874
|
+
N ? (A.setStart(N, 0), A.collapse(!0)) : (A.selectNodeContents(T), A.collapse(!0)), b.removeAllRanges(), b.addRange(A), o("raf after setRange (mousedown)");
|
|
3875
3875
|
});
|
|
3876
3876
|
return;
|
|
3877
3877
|
}
|
|
@@ -3957,21 +3957,21 @@ const Oc = ({
|
|
|
3957
3957
|
if (_) {
|
|
3958
3958
|
let N = null;
|
|
3959
3959
|
if (_.nodeType === Node.ELEMENT_NODE ? N = _.closest('[data-type="variable"]') : _.nodeType === Node.TEXT_NODE && _.parentElement && (N = _.parentElement.closest('[data-type="variable"]')), N) {
|
|
3960
|
-
const
|
|
3961
|
-
if (
|
|
3962
|
-
const
|
|
3960
|
+
const A = N.dataset.multiKey;
|
|
3961
|
+
if (A) {
|
|
3962
|
+
const S = /[、,,\s\n\r\t]+/, w = h.split(S).map((I) => I.trim()).filter((I) => I.length > 0);
|
|
3963
3963
|
if (w.length > 1) {
|
|
3964
3964
|
const I = parseInt(N.dataset.index || "0", 10), P = t.find(
|
|
3965
|
-
(G) => G.type === "multi-variable" && G.key ===
|
|
3966
|
-
)?.maxCount || 9, M = n[
|
|
3965
|
+
(G) => G.type === "multi-variable" && G.key === A
|
|
3966
|
+
)?.maxCount || 9, M = n[A] || 1, k = Math.min(I + w.length, P);
|
|
3967
3967
|
k > M && r((v) => ({
|
|
3968
3968
|
...v,
|
|
3969
|
-
[
|
|
3969
|
+
[A]: k
|
|
3970
3970
|
}));
|
|
3971
3971
|
const x = [];
|
|
3972
3972
|
for (let v = 0; v < M; v++) {
|
|
3973
|
-
const G = `${
|
|
3974
|
-
`[data-type="variable"][data-key="${G}"][data-multi-key="${
|
|
3973
|
+
const G = `${A}_${v}`, Q = a.current.querySelector(
|
|
3974
|
+
`[data-type="variable"][data-key="${G}"][data-multi-key="${A}"]`
|
|
3975
3975
|
);
|
|
3976
3976
|
if (Q) {
|
|
3977
3977
|
const D = Q.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
@@ -3987,25 +3987,25 @@ const Oc = ({
|
|
|
3987
3987
|
F.length > 0 && F[F.length - 1] !== "" && F.length < P && F.push("");
|
|
3988
3988
|
const $ = Math.max(F.length, 1), H = {};
|
|
3989
3989
|
F.forEach((v, G) => {
|
|
3990
|
-
v && (H[`${
|
|
3990
|
+
v && (H[`${A}_${G}`] = v);
|
|
3991
3991
|
}), a.current.querySelectorAll(
|
|
3992
3992
|
'[data-type="variable"]'
|
|
3993
3993
|
).forEach((v) => {
|
|
3994
3994
|
const G = v.dataset.key, Q = v.dataset.multiKey;
|
|
3995
|
-
if (G && Q !==
|
|
3995
|
+
if (G && Q !== A) {
|
|
3996
3996
|
const D = v.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3997
3997
|
D && (H[G] = D);
|
|
3998
3998
|
}
|
|
3999
3999
|
}), a.current.__tempVariableValues = H, r((v) => ({
|
|
4000
4000
|
...v,
|
|
4001
|
-
[
|
|
4001
|
+
[A]: $
|
|
4002
4002
|
}));
|
|
4003
4003
|
return;
|
|
4004
4004
|
}
|
|
4005
4005
|
}
|
|
4006
4006
|
const L = N.getAttribute("data-node-type") || "";
|
|
4007
4007
|
if (!(L === "markdown" || L === "report-url" || L === "markdown-name")) {
|
|
4008
|
-
const
|
|
4008
|
+
const S = (() => {
|
|
4009
4009
|
const I = N.getAttribute("data-node-type") || "";
|
|
4010
4010
|
if (I === "report-url" || I === "markdown" || I === "markdown-name") return !1;
|
|
4011
4011
|
const P = N.dataset.multiKey;
|
|
@@ -4019,10 +4019,10 @@ const Oc = ({
|
|
|
4019
4019
|
if (w && w.rangeCount > 0) {
|
|
4020
4020
|
const I = w.getRangeAt(0);
|
|
4021
4021
|
I.deleteContents();
|
|
4022
|
-
const P = document.createDocumentFragment(), k = (
|
|
4022
|
+
const P = document.createDocumentFragment(), k = (S ? h : h.replace(/\n+/g, " ")).split(`
|
|
4023
4023
|
`);
|
|
4024
4024
|
for (let F = 0; F < k.length; F++)
|
|
4025
|
-
P.appendChild(document.createTextNode(k[F])),
|
|
4025
|
+
P.appendChild(document.createTextNode(k[F])), S && F < k.length - 1 && P.appendChild(document.createElement("br"));
|
|
4026
4026
|
I.insertNode(P), w.removeAllRanges();
|
|
4027
4027
|
const x = document.createRange();
|
|
4028
4028
|
x.selectNodeContents(N), x.collapse(!1), w.addRange(x);
|
|
@@ -4040,22 +4040,22 @@ const Oc = ({
|
|
|
4040
4040
|
if (_) {
|
|
4041
4041
|
let N = null;
|
|
4042
4042
|
if (_.nodeType === Node.ELEMENT_NODE ? N = _.closest('[data-type="variable"]') : _.nodeType === Node.TEXT_NODE && _.parentElement && (N = _.parentElement.closest('[data-type="variable"]')), N) {
|
|
4043
|
-
const
|
|
4044
|
-
if (
|
|
4045
|
-
g = !0, b = L, d.current[L] = h, p((
|
|
4046
|
-
...
|
|
4047
|
-
[L]: { ...
|
|
4043
|
+
const A = N.getAttribute("data-node-type") || "", L = N.dataset.key;
|
|
4044
|
+
if (A === "markdown" && L && /20\d{2}-\d{2}-\d{2}/.test(h))
|
|
4045
|
+
g = !0, b = L, d.current[L] = h, p((C) => ({
|
|
4046
|
+
...C,
|
|
4047
|
+
[L]: { ...C[L], status: "loading", error: void 0 }
|
|
4048
4048
|
}));
|
|
4049
|
-
else if (
|
|
4049
|
+
else if (A === "report-url" && L) {
|
|
4050
4050
|
document.execCommand("insertText", !1, h), i(), setTimeout(() => {
|
|
4051
|
-
const
|
|
4052
|
-
o.current(L,
|
|
4051
|
+
const C = N.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
4052
|
+
o.current(L, C);
|
|
4053
4053
|
}, 0);
|
|
4054
4054
|
return;
|
|
4055
|
-
} else if (
|
|
4055
|
+
} else if (A === "markdown-name" && L) {
|
|
4056
4056
|
document.execCommand("insertText", !1, h), i(), setTimeout(() => {
|
|
4057
|
-
const
|
|
4058
|
-
u.current(L,
|
|
4057
|
+
const C = N.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
4058
|
+
u.current(L, C);
|
|
4059
4059
|
}, 0);
|
|
4060
4060
|
return;
|
|
4061
4061
|
}
|
|
@@ -4142,43 +4142,43 @@ const Fc = ({
|
|
|
4142
4142
|
NodeFilter.SHOW_TEXT,
|
|
4143
4143
|
{
|
|
4144
4144
|
acceptNode: (L) => {
|
|
4145
|
-
const
|
|
4146
|
-
return
|
|
4145
|
+
const C = g.querySelector(".variable-info-icon");
|
|
4146
|
+
return C && C.contains(L) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
4147
4147
|
}
|
|
4148
4148
|
}
|
|
4149
4149
|
);
|
|
4150
4150
|
for (; N.nextNode(); )
|
|
4151
4151
|
_ += N.currentNode.textContent || "";
|
|
4152
|
-
const
|
|
4153
|
-
if (
|
|
4152
|
+
const A = _.replace(/[\u200B\n]/g, "").trim();
|
|
4153
|
+
if (A) {
|
|
4154
4154
|
const L = g.dataset.multiKey;
|
|
4155
4155
|
if (L) {
|
|
4156
4156
|
(!c[L] || !Array.isArray(c[L])) && (c[L] = []);
|
|
4157
|
-
const
|
|
4158
|
-
|
|
4157
|
+
const C = c[L];
|
|
4158
|
+
C.push(A), C.length > 1 && (E += " "), E += A;
|
|
4159
4159
|
} else
|
|
4160
|
-
c[T] =
|
|
4160
|
+
c[T] = A, E += A;
|
|
4161
4161
|
if (g.dataset.nodeType === "report-url")
|
|
4162
4162
|
if (c.url === void 0)
|
|
4163
|
-
c.url =
|
|
4163
|
+
c.url = A;
|
|
4164
4164
|
else {
|
|
4165
|
-
const
|
|
4166
|
-
Array.isArray(
|
|
4165
|
+
const C = c.url;
|
|
4166
|
+
Array.isArray(C) ? C.push(A) : c.url = [String(C), A];
|
|
4167
4167
|
}
|
|
4168
4168
|
if (g.dataset.nodeType === "markdown-name") {
|
|
4169
|
-
const
|
|
4170
|
-
c[
|
|
4169
|
+
const C = `${T}__sourceText`;
|
|
4170
|
+
c[C] === void 0 && (c[C] = A);
|
|
4171
4171
|
}
|
|
4172
4172
|
if (g.dataset.nodeType === "markdown") {
|
|
4173
|
-
const
|
|
4174
|
-
if (c[
|
|
4175
|
-
c[
|
|
4173
|
+
const C = g.dataset.sourceTextKey || `${T}__sourceText`;
|
|
4174
|
+
if (c[C] === void 0)
|
|
4175
|
+
c[C] = A;
|
|
4176
4176
|
else {
|
|
4177
|
-
const w = c[
|
|
4178
|
-
Array.isArray(w) ? w.push(
|
|
4177
|
+
const w = c[C];
|
|
4178
|
+
Array.isArray(w) ? w.push(A) : c[C] = [String(w), A];
|
|
4179
4179
|
}
|
|
4180
|
-
const
|
|
4181
|
-
c[
|
|
4180
|
+
const S = `${T}__markdown`;
|
|
4181
|
+
c[S] === void 0 && (c[S] = [mo(A)]);
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
4184
|
} else if ((b === "select" || b === "searchable-select") && T) {
|
|
@@ -4188,20 +4188,20 @@ const Fc = ({
|
|
|
4188
4188
|
const N = (g.value || "").replace(/\u200B/g, "").trim();
|
|
4189
4189
|
N && (c[T] = N, E += N);
|
|
4190
4190
|
} else if (b === "richtext" && T) {
|
|
4191
|
-
const _ = g, N = _.dataset.nodeType,
|
|
4192
|
-
if (
|
|
4191
|
+
const _ = g, N = _.dataset.nodeType, A = (_.textContent || "").replace(/\u200B/g, "").trim();
|
|
4192
|
+
if (A)
|
|
4193
4193
|
if (N === "report-module" || N === "markdown-module") {
|
|
4194
4194
|
(!c[T] || !Array.isArray(c[T])) && (c[T] = []);
|
|
4195
4195
|
const L = c[T];
|
|
4196
|
-
L.push(
|
|
4196
|
+
L.push(A), L.length > 1 && (E += " "), E += A;
|
|
4197
4197
|
} else
|
|
4198
|
-
c[T] =
|
|
4198
|
+
c[T] = A, E += A;
|
|
4199
4199
|
} else if (b === "datepicker" && T) {
|
|
4200
4200
|
const N = (g.getAttribute("data-value") || "").trim();
|
|
4201
4201
|
if (N)
|
|
4202
4202
|
if (N.includes(",")) {
|
|
4203
|
-
const
|
|
4204
|
-
|
|
4203
|
+
const A = N.split(",");
|
|
4204
|
+
A.length === 2 ? (c[T] = A, E += `[${A[0]}, ${A[1]}]`) : (c[T] = N, E += N);
|
|
4205
4205
|
} else
|
|
4206
4206
|
c[T] = N, E += N;
|
|
4207
4207
|
} else if (b === "number-input" && T) {
|
|
@@ -4210,17 +4210,17 @@ const Fc = ({
|
|
|
4210
4210
|
} else if (b === "upload" && T) {
|
|
4211
4211
|
const _ = g.dataset.batchKey;
|
|
4212
4212
|
if (_) {
|
|
4213
|
-
const N = e.find((
|
|
4213
|
+
const N = e.find((A) => A.type === "upload" && A.key === _);
|
|
4214
4214
|
if (N && typeof N.maxCount == "number" && typeof N.minCount == "number") {
|
|
4215
|
-
const
|
|
4215
|
+
const A = [];
|
|
4216
4216
|
for (let L = 0; L < N.maxCount; L++) {
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4217
|
+
const C = `${_}-${L}`, S = t[C];
|
|
4218
|
+
S && A.push(S);
|
|
4219
4219
|
}
|
|
4220
|
-
c[_] || (c[_] =
|
|
4220
|
+
c[_] || (c[_] = A.length > 0 ? A : null, A.length > 0 && (E += ` [附带${A.length}个文件: ${A.map((L) => typeof L == "string" ? L.split("/").pop() || "file" : L.name).join(", ")}] `));
|
|
4221
4221
|
} else if (c[T] = t[T] ?? null, t[T]) {
|
|
4222
|
-
const
|
|
4223
|
-
E += ` [附带文件: ${typeof
|
|
4222
|
+
const A = t[T];
|
|
4223
|
+
E += ` [附带文件: ${typeof A == "string" ? A.split("/").pop() || "file" : A.name}] `;
|
|
4224
4224
|
}
|
|
4225
4225
|
} else if (c[T] = t[T] ?? null, t[T]) {
|
|
4226
4226
|
const N = t[T];
|
|
@@ -4281,8 +4281,8 @@ const Fc = ({
|
|
|
4281
4281
|
), N = g.endsWith("__markdown");
|
|
4282
4282
|
T || _ || N || g === "url" ? b.forEach((L) => {
|
|
4283
4283
|
L != null && L !== "" && m.append(g, String(L));
|
|
4284
|
-
}) : b.forEach((L,
|
|
4285
|
-
L != null && (L instanceof File ? m.append(`${g}[${
|
|
4284
|
+
}) : b.forEach((L, C) => {
|
|
4285
|
+
L != null && (L instanceof File ? m.append(`${g}[${C}]`, L) : typeof L == "string" ? m.append(`${g}[${C}]`, L) : m.append(`${g}[${C}]`, String(L)));
|
|
4286
4286
|
});
|
|
4287
4287
|
} else typeof b == "string" ? m.append(g, b) : m.append(g, String(b));
|
|
4288
4288
|
}), n(m, E);
|
|
@@ -4808,7 +4808,7 @@ function nd() {
|
|
|
4808
4808
|
let h = n.slidesOffsetAfter;
|
|
4809
4809
|
typeof h == "function" && (h = n.slidesOffsetAfter.call(e));
|
|
4810
4810
|
const m = e.snapGrid.length, g = e.slidesGrid.length, b = e.size - y - h;
|
|
4811
|
-
let T = n.spaceBetween, _ = -y, N = 0,
|
|
4811
|
+
let T = n.spaceBetween, _ = -y, N = 0, A = 0;
|
|
4812
4812
|
if (typeof b > "u")
|
|
4813
4813
|
return;
|
|
4814
4814
|
typeof T == "string" && T.indexOf("%") >= 0 ? T = parseFloat(T.replace("%", "")) / 100 * b : typeof T == "string" && (T = parseFloat(T)), e.virtualSize = -T - y - h, l.forEach((w) => {
|
|
@@ -4816,38 +4816,38 @@ function nd() {
|
|
|
4816
4816
|
}), n.centeredSlides && n.cssMode && (Wt(r, "--swiper-centered-offset-before", ""), Wt(r, "--swiper-centered-offset-after", "")), n.cssMode && (Wt(r, "--swiper-slides-offset-before", `${y}px`), Wt(r, "--swiper-slides-offset-after", `${h}px`));
|
|
4817
4817
|
const L = n.grid && n.grid.rows > 1 && e.grid;
|
|
4818
4818
|
L ? e.grid.initSlides(l) : e.grid && e.grid.unsetSlides();
|
|
4819
|
-
let
|
|
4820
|
-
const
|
|
4819
|
+
let C;
|
|
4820
|
+
const S = n.slidesPerView === "auto" && n.breakpoints && Object.keys(n.breakpoints).filter((w) => typeof n.breakpoints[w].slidesPerView < "u").length > 0;
|
|
4821
4821
|
for (let w = 0; w < d; w += 1) {
|
|
4822
|
-
|
|
4822
|
+
C = 0;
|
|
4823
4823
|
const I = l[w];
|
|
4824
4824
|
if (!(I && (L && e.grid.updateSlide(w, I, l), St(I, "display") === "none"))) {
|
|
4825
4825
|
if (o && n.slidesPerView === "auto")
|
|
4826
|
-
n.virtual.slidesPerViewAutoSlideSize && (
|
|
4826
|
+
n.virtual.slidesPerViewAutoSlideSize && (C = n.virtual.slidesPerViewAutoSlideSize), C && I && (n.roundLengths && (C = Math.floor(C)), I.style[e.getDirectionLabel("width")] = `${C}px`);
|
|
4827
4827
|
else if (n.slidesPerView === "auto") {
|
|
4828
|
-
|
|
4828
|
+
S && (I.style[e.getDirectionLabel("width")] = "");
|
|
4829
4829
|
const P = getComputedStyle(I), M = I.style.transform, k = I.style.webkitTransform;
|
|
4830
4830
|
if (M && (I.style.transform = "none"), k && (I.style.webkitTransform = "none"), n.roundLengths)
|
|
4831
|
-
|
|
4831
|
+
C = e.isHorizontal() ? La(I, "width") : La(I, "height");
|
|
4832
4832
|
else {
|
|
4833
4833
|
const x = t(P, "width"), F = t(P, "padding-left"), $ = t(P, "padding-right"), H = t(P, "margin-left"), q = t(P, "margin-right"), v = P.getPropertyValue("box-sizing");
|
|
4834
4834
|
if (v && v === "border-box")
|
|
4835
|
-
|
|
4835
|
+
C = x + H + q;
|
|
4836
4836
|
else {
|
|
4837
4837
|
const {
|
|
4838
4838
|
clientWidth: G,
|
|
4839
4839
|
offsetWidth: Q
|
|
4840
4840
|
} = I;
|
|
4841
|
-
|
|
4841
|
+
C = x + F + $ + H + q + (Q - G);
|
|
4842
4842
|
}
|
|
4843
4843
|
}
|
|
4844
|
-
M && (I.style.transform = M), k && (I.style.webkitTransform = k), n.roundLengths && (
|
|
4844
|
+
M && (I.style.transform = M), k && (I.style.webkitTransform = k), n.roundLengths && (C = Math.floor(C));
|
|
4845
4845
|
} else
|
|
4846
|
-
|
|
4847
|
-
I && (I.swiperSlideSize =
|
|
4846
|
+
C = (b - (n.slidesPerView - 1) * T) / n.slidesPerView, n.roundLengths && (C = Math.floor(C)), I && (I.style[e.getDirectionLabel("width")] = `${C}px`);
|
|
4847
|
+
I && (I.swiperSlideSize = C), c.push(C), n.centeredSlides ? (_ = _ + C / 2 + N / 2 + T, N === 0 && w !== 0 && (_ = _ - b / 2 - T), w === 0 && (_ = _ - b / 2 - T), Math.abs(_) < 1 / 1e3 && (_ = 0), n.roundLengths && (_ = Math.floor(_)), A % n.slidesPerGroup === 0 && p.push(_), E.push(_)) : (n.roundLengths && (_ = Math.floor(_)), (A - Math.min(e.params.slidesPerGroupSkip, A)) % e.params.slidesPerGroup === 0 && p.push(_), E.push(_), _ = _ + C + T), e.virtualSize += C + T, N = C, A += 1;
|
|
4848
4848
|
}
|
|
4849
4849
|
}
|
|
4850
|
-
if (e.virtualSize = Math.max(e.virtualSize, b) + h, i && s && (n.effect === "slide" || n.effect === "coverflow") && (r.style.width = `${e.virtualSize + T}px`), n.setWrapperSize && (r.style[e.getDirectionLabel("width")] = `${e.virtualSize + T}px`), L && e.grid.updateWrapperSize(
|
|
4850
|
+
if (e.virtualSize = Math.max(e.virtualSize, b) + h, i && s && (n.effect === "slide" || n.effect === "coverflow") && (r.style.width = `${e.virtualSize + T}px`), n.setWrapperSize && (r.style[e.getDirectionLabel("width")] = `${e.virtualSize + T}px`), L && e.grid.updateWrapperSize(C, p), !n.centeredSlides) {
|
|
4851
4851
|
const w = n.slidesPerView !== "auto" && n.slidesPerView % 1 !== 0, I = n.snapToSlideEdge && !n.loop && (n.slidesPerView === "auto" || w);
|
|
4852
4852
|
let P = p.length;
|
|
4853
4853
|
if (I) {
|
|
@@ -5301,8 +5301,8 @@ function Cd(e = 0, t, n = !0, r, a) {
|
|
|
5301
5301
|
const g = -u[m];
|
|
5302
5302
|
if (o.normalizeSlideIndex)
|
|
5303
5303
|
for (let L = 0; L < l.length; L += 1) {
|
|
5304
|
-
const
|
|
5305
|
-
typeof l[L + 1] < "u" ?
|
|
5304
|
+
const C = -Math.floor(g * 100), S = Math.floor(l[L] * 100), w = Math.floor(l[L + 1] * 100);
|
|
5305
|
+
typeof l[L + 1] < "u" ? C >= S && C < w - (w - S) / 2 ? s = L : C >= S && C < w && (s = L + 1) : C >= S && (s = L);
|
|
5306
5306
|
}
|
|
5307
5307
|
if (i.initialized && s !== p && (!i.allowSlideNext && (E ? g > i.translate && g > i.minTranslate() : g < i.translate && g < i.minTranslate()) || !i.allowSlidePrev && g > i.translate && g > i.maxTranslate() && (p || 0) !== s))
|
|
5308
5308
|
return !1;
|
|
@@ -5313,30 +5313,30 @@ function Cd(e = 0, t, n = !0, r, a) {
|
|
|
5313
5313
|
if (!(T && a) && (E && -g === i.translate || !E && g === i.translate))
|
|
5314
5314
|
return i.updateActiveIndex(s), o.autoHeight && i.updateAutoHeight(), i.updateSlidesClasses(), o.effect !== "slide" && i.setTranslate(g), b !== "reset" && (i.transitionStart(n, b), i.transitionEnd(n, b)), !1;
|
|
5315
5315
|
if (o.cssMode) {
|
|
5316
|
-
const L = i.isHorizontal(),
|
|
5316
|
+
const L = i.isHorizontal(), C = E ? g : -g;
|
|
5317
5317
|
if (t === 0)
|
|
5318
5318
|
T && (i.wrapperEl.style.scrollSnapType = "none", i._immediateVirtual = !0), T && !i._cssModeVirtualInitialSet && i.params.initialSlide > 0 ? (i._cssModeVirtualInitialSet = !0, requestAnimationFrame(() => {
|
|
5319
|
-
c[L ? "scrollLeft" : "scrollTop"] =
|
|
5320
|
-
})) : c[L ? "scrollLeft" : "scrollTop"] =
|
|
5319
|
+
c[L ? "scrollLeft" : "scrollTop"] = C;
|
|
5320
|
+
})) : c[L ? "scrollLeft" : "scrollTop"] = C, T && requestAnimationFrame(() => {
|
|
5321
5321
|
i.wrapperEl.style.scrollSnapType = "", i._immediateVirtual = !1;
|
|
5322
5322
|
});
|
|
5323
5323
|
else {
|
|
5324
5324
|
if (!i.support.smoothScroll)
|
|
5325
5325
|
return To({
|
|
5326
5326
|
swiper: i,
|
|
5327
|
-
targetPosition:
|
|
5327
|
+
targetPosition: C,
|
|
5328
5328
|
side: L ? "left" : "top"
|
|
5329
5329
|
}), !0;
|
|
5330
5330
|
c.scrollTo({
|
|
5331
|
-
[L ? "left" : "top"]:
|
|
5331
|
+
[L ? "left" : "top"]: C,
|
|
5332
5332
|
behavior: "smooth"
|
|
5333
5333
|
});
|
|
5334
5334
|
}
|
|
5335
5335
|
return !0;
|
|
5336
5336
|
}
|
|
5337
|
-
const
|
|
5338
|
-
return T && !a &&
|
|
5339
|
-
!i || i.destroyed ||
|
|
5337
|
+
const A = Ao().isSafari;
|
|
5338
|
+
return T && !a && A && i.isElement && i.virtual.update(!1, !1, s), i.setTransition(t), i.setTranslate(g), i.updateActiveIndex(s), i.updateSlidesClasses(), i.emit("beforeTransitionStart", t, r), i.transitionStart(n, b), t === 0 ? i.transitionEnd(n, b) : i.animating || (i.animating = !0, i.onSlideToWrapperTransitionEnd || (i.onSlideToWrapperTransitionEnd = function(C) {
|
|
5339
|
+
!i || i.destroyed || C.target === this && (i.wrapperEl.removeEventListener("transitionend", i.onSlideToWrapperTransitionEnd), i.onSlideToWrapperTransitionEnd = null, delete i.onSlideToWrapperTransitionEnd, i.transitionEnd(n, b));
|
|
5340
5340
|
}), i.wrapperEl.addEventListener("transitionend", i.onSlideToWrapperTransitionEnd)), !0;
|
|
5341
5341
|
}
|
|
5342
5342
|
function Ad(e = 0, t, n = !0, r) {
|
|
@@ -5571,41 +5571,41 @@ function Ld({
|
|
|
5571
5571
|
const _ = c.slidesPerGroupAuto ? T : c.slidesPerGroup;
|
|
5572
5572
|
let N = b ? Math.max(_, Math.ceil(T / 2)) : _;
|
|
5573
5573
|
N % _ !== 0 && (N += _ - N % _), N += c.loopAdditionalSlides, u.loopedSlides = N;
|
|
5574
|
-
const
|
|
5575
|
-
l.length < T + N || u.params.effect === "cards" && l.length < T + N * 2 ? mr("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") :
|
|
5576
|
-
const L = [],
|
|
5574
|
+
const A = u.grid && c.grid && c.grid.rows > 1;
|
|
5575
|
+
l.length < T + N || u.params.effect === "cards" && l.length < T + N * 2 ? mr("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : A && c.grid.fill === "row" && mr("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
|
|
5576
|
+
const L = [], C = [], S = A ? Math.ceil(l.length / c.grid.rows) : l.length, w = i && S - g < T && !b;
|
|
5577
5577
|
let I = w ? g : u.activeIndex;
|
|
5578
5578
|
typeof a > "u" ? a = u.getSlideIndex(l.find((H) => H.classList.contains(c.slideActiveClass))) : I = a;
|
|
5579
5579
|
const P = n === "next" || !n, M = n === "prev" || !n;
|
|
5580
5580
|
let k = 0, x = 0;
|
|
5581
|
-
const $ = (
|
|
5581
|
+
const $ = (A ? l[a].column : a) + (b && typeof r > "u" ? -T / 2 + 0.5 : 0);
|
|
5582
5582
|
if ($ < N) {
|
|
5583
5583
|
k = Math.max(N - $, _);
|
|
5584
5584
|
for (let H = 0; H < N - $; H += 1) {
|
|
5585
|
-
const q = H - Math.floor(H /
|
|
5586
|
-
if (
|
|
5587
|
-
const v =
|
|
5585
|
+
const q = H - Math.floor(H / S) * S;
|
|
5586
|
+
if (A) {
|
|
5587
|
+
const v = S - q - 1;
|
|
5588
5588
|
for (let G = l.length - 1; G >= 0; G -= 1)
|
|
5589
5589
|
l[G].column === v && L.push(G);
|
|
5590
5590
|
} else
|
|
5591
|
-
L.push(
|
|
5591
|
+
L.push(S - q - 1);
|
|
5592
5592
|
}
|
|
5593
|
-
} else if ($ + T >
|
|
5594
|
-
x = Math.max($ - (
|
|
5593
|
+
} else if ($ + T > S - N) {
|
|
5594
|
+
x = Math.max($ - (S - N * 2), _), w && (x = Math.max(x, T - S + g + 1));
|
|
5595
5595
|
for (let H = 0; H < x; H += 1) {
|
|
5596
|
-
const q = H - Math.floor(H /
|
|
5597
|
-
|
|
5598
|
-
v.column === q &&
|
|
5599
|
-
}) :
|
|
5596
|
+
const q = H - Math.floor(H / S) * S;
|
|
5597
|
+
A ? l.forEach((v, G) => {
|
|
5598
|
+
v.column === q && C.push(G);
|
|
5599
|
+
}) : C.push(q);
|
|
5600
5600
|
}
|
|
5601
5601
|
}
|
|
5602
5602
|
if (u.__preventObserver__ = !0, requestAnimationFrame(() => {
|
|
5603
5603
|
u.__preventObserver__ = !1;
|
|
5604
|
-
}), u.params.effect === "cards" && l.length < T + N * 2 && (
|
|
5604
|
+
}), u.params.effect === "cards" && l.length < T + N * 2 && (C.includes(a) && C.splice(C.indexOf(a), 1), L.includes(a) && L.splice(L.indexOf(a), 1)), M && L.forEach((H) => {
|
|
5605
5605
|
l[H].swiperLoopMoveDOM = !0, E.prepend(l[H]), l[H].swiperLoopMoveDOM = !1;
|
|
5606
|
-
}), P &&
|
|
5606
|
+
}), P && C.forEach((H) => {
|
|
5607
5607
|
l[H].swiperLoopMoveDOM = !0, E.append(l[H]), l[H].swiperLoopMoveDOM = !1;
|
|
5608
|
-
}), u.recalcSlides(), c.slidesPerView === "auto" ? u.updateSlides() :
|
|
5608
|
+
}), u.recalcSlides(), c.slidesPerView === "auto" ? u.updateSlides() : A && (L.length > 0 && M || C.length > 0 && P) && u.slides.forEach((H, q) => {
|
|
5609
5609
|
u.grid.updateSlide(q, H, u.slides);
|
|
5610
5610
|
}), c.watchSlidesProgress && u.updateSlidesOffset(), t) {
|
|
5611
5611
|
if (L.length > 0 && M) {
|
|
@@ -5613,15 +5613,15 @@ function Ld({
|
|
|
5613
5613
|
const H = u.slidesGrid[I], v = u.slidesGrid[I + k] - H;
|
|
5614
5614
|
o ? u.setTranslate(u.translate - v) : (u.slideTo(I + Math.ceil(k), 0, !1, !0), r && (u.touchEventsData.startTranslate = u.touchEventsData.startTranslate - v, u.touchEventsData.currentTranslate = u.touchEventsData.currentTranslate - v));
|
|
5615
5615
|
} else if (r) {
|
|
5616
|
-
const H =
|
|
5616
|
+
const H = A ? L.length / c.grid.rows : L.length;
|
|
5617
5617
|
u.slideTo(u.activeIndex + H, 0, !1, !0), u.touchEventsData.currentTranslate = u.translate;
|
|
5618
5618
|
}
|
|
5619
|
-
} else if (
|
|
5619
|
+
} else if (C.length > 0 && P)
|
|
5620
5620
|
if (typeof e > "u") {
|
|
5621
5621
|
const H = u.slidesGrid[I], v = u.slidesGrid[I - x] - H;
|
|
5622
5622
|
o ? u.setTranslate(u.translate - v) : (u.slideTo(I - x, 0, !1, !0), r && (u.touchEventsData.startTranslate = u.touchEventsData.startTranslate - v, u.touchEventsData.currentTranslate = u.touchEventsData.currentTranslate - v));
|
|
5623
5623
|
} else {
|
|
5624
|
-
const H =
|
|
5624
|
+
const H = A ? C.length / c.grid.rows : C.length;
|
|
5625
5625
|
u.slideTo(u.activeIndex - H, 0, !1, !0);
|
|
5626
5626
|
}
|
|
5627
5627
|
}
|
|
@@ -5916,8 +5916,8 @@ function $d(e) {
|
|
|
5916
5916
|
const y = c >= -t.maxTranslate() && !t.params.loop;
|
|
5917
5917
|
let h = 0, m = t.slidesSizesGrid[0];
|
|
5918
5918
|
for (let N = 0; N < l.length; N += N < s.slidesPerGroupSkip ? 1 : s.slidesPerGroup) {
|
|
5919
|
-
const
|
|
5920
|
-
typeof l[N +
|
|
5919
|
+
const A = N < s.slidesPerGroupSkip - 1 ? 1 : s.slidesPerGroup;
|
|
5920
|
+
typeof l[N + A] < "u" ? (y || c >= l[N] && c < l[N + A]) && (h = N, m = l[N + A] - l[N]) : (y || c >= l[N]) && (h = N, m = l[l.length - 1] - l[l.length - 2]);
|
|
5921
5921
|
}
|
|
5922
5922
|
let g = null, b = null;
|
|
5923
5923
|
s.rewind && (t.isBeginning ? b = s.virtual && s.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1 : t.isEnd && (g = 0));
|
|
@@ -6041,10 +6041,10 @@ function jd() {
|
|
|
6041
6041
|
const s = $t(), o = r.breakpointsBase === "window" || !r.breakpointsBase ? r.breakpointsBase : "container", u = ["window", "container"].includes(r.breakpointsBase) || !r.breakpointsBase ? e.el : s.querySelector(r.breakpointsBase), l = e.getBreakpoint(i, o, u);
|
|
6042
6042
|
if (!l || e.currentBreakpoint === l) return;
|
|
6043
6043
|
const p = (l in i ? i[l] : void 0) || e.originalParams, E = Gi(e, r), c = Gi(e, p), y = e.params.grabCursor, h = p.grabCursor, m = r.enabled;
|
|
6044
|
-
E && !c ? (a.classList.remove(`${r.containerModifierClass}grid`, `${r.containerModifierClass}grid-column`), e.emitContainerClasses()) : !E && c && (a.classList.add(`${r.containerModifierClass}grid`), (p.grid.fill && p.grid.fill === "column" || !p.grid.fill && r.grid.fill === "column") && a.classList.add(`${r.containerModifierClass}grid-column`), e.emitContainerClasses()), y && !h ? e.unsetGrabCursor() : !y && h && e.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((
|
|
6045
|
-
if (typeof p[
|
|
6046
|
-
const L = r[
|
|
6047
|
-
L && !
|
|
6044
|
+
E && !c ? (a.classList.remove(`${r.containerModifierClass}grid`, `${r.containerModifierClass}grid-column`), e.emitContainerClasses()) : !E && c && (a.classList.add(`${r.containerModifierClass}grid`), (p.grid.fill && p.grid.fill === "column" || !p.grid.fill && r.grid.fill === "column") && a.classList.add(`${r.containerModifierClass}grid-column`), e.emitContainerClasses()), y && !h ? e.unsetGrabCursor() : !y && h && e.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((A) => {
|
|
6045
|
+
if (typeof p[A] > "u") return;
|
|
6046
|
+
const L = r[A] && r[A].enabled, C = p[A] && p[A].enabled;
|
|
6047
|
+
L && !C && e[A].disable(), !L && C && e[A].enable();
|
|
6048
6048
|
});
|
|
6049
6049
|
const g = p.direction && p.direction !== r.direction, b = r.loop && (p.slidesPerView !== r.slidesPerView || g), T = r.loop;
|
|
6050
6050
|
g && n && e.changeDirection(), Qe(e.params, p);
|
|
@@ -6767,7 +6767,7 @@ function sf({
|
|
|
6767
6767
|
scrollbarEl: s,
|
|
6768
6768
|
paginationEl: o
|
|
6769
6769
|
}) {
|
|
6770
|
-
const u = r.filter((
|
|
6770
|
+
const u = r.filter((C) => C !== "children" && C !== "direction" && C !== "wrapperClass"), {
|
|
6771
6771
|
params: l,
|
|
6772
6772
|
pagination: d,
|
|
6773
6773
|
navigation: p,
|
|
@@ -6775,19 +6775,19 @@ function sf({
|
|
|
6775
6775
|
virtual: c,
|
|
6776
6776
|
thumbs: y
|
|
6777
6777
|
} = e;
|
|
6778
|
-
let h, m, g, b, T, _, N,
|
|
6778
|
+
let h, m, g, b, T, _, N, A;
|
|
6779
6779
|
r.includes("thumbs") && n.thumbs && n.thumbs.swiper && !n.thumbs.swiper.destroyed && l.thumbs && (!l.thumbs.swiper || l.thumbs.swiper.destroyed) && (h = !0), r.includes("controller") && n.controller && n.controller.control && l.controller && !l.controller.control && (m = !0), r.includes("pagination") && n.pagination && (n.pagination.el || o) && (l.pagination || l.pagination === !1) && d && !d.el && (g = !0), r.includes("scrollbar") && n.scrollbar && (n.scrollbar.el || s) && (l.scrollbar || l.scrollbar === !1) && E && !E.el && (b = !0), r.includes("navigation") && n.navigation && (n.navigation.prevEl || i) && (n.navigation.nextEl || a) && (l.navigation || l.navigation === !1) && p && !p.prevEl && !p.nextEl && (T = !0);
|
|
6780
|
-
const L = (
|
|
6781
|
-
e[
|
|
6780
|
+
const L = (C) => {
|
|
6781
|
+
e[C] && (e[C].destroy(), C === "navigation" ? (e.isElement && (e[C].prevEl.remove(), e[C].nextEl.remove()), l[C].prevEl = void 0, l[C].nextEl = void 0, e[C].prevEl = void 0, e[C].nextEl = void 0) : (e.isElement && e[C].el.remove(), l[C].el = void 0, e[C].el = void 0));
|
|
6782
6782
|
};
|
|
6783
|
-
r.includes("loop") && e.isElement && (l.loop && !n.loop ? _ = !0 : !l.loop && n.loop ? N = !0 :
|
|
6784
|
-
if (Ft(l[
|
|
6785
|
-
Object.assign(l[
|
|
6783
|
+
r.includes("loop") && e.isElement && (l.loop && !n.loop ? _ = !0 : !l.loop && n.loop ? N = !0 : A = !0), u.forEach((C) => {
|
|
6784
|
+
if (Ft(l[C]) && Ft(n[C]))
|
|
6785
|
+
Object.assign(l[C], n[C]), (C === "navigation" || C === "pagination" || C === "scrollbar") && "enabled" in n[C] && !n[C].enabled && L(C);
|
|
6786
6786
|
else {
|
|
6787
|
-
const
|
|
6788
|
-
(
|
|
6787
|
+
const S = n[C];
|
|
6788
|
+
(S === !0 || S === !1) && (C === "navigation" || C === "pagination" || C === "scrollbar") ? S === !1 && L(C) : l[C] = n[C];
|
|
6789
6789
|
}
|
|
6790
|
-
}), u.includes("controller") && !m && e.controller && e.controller.control && l.controller && l.controller.control && (e.controller.control = l.controller.control), r.includes("children") && t && c && l.virtual.enabled ? (c.slides = t, c.update(!0)) : r.includes("virtual") && c && l.virtual.enabled && (t && (c.slides = t), c.update(!0)), r.includes("children") && t && l.loop && (
|
|
6790
|
+
}), u.includes("controller") && !m && e.controller && e.controller.control && l.controller && l.controller.control && (e.controller.control = l.controller.control), r.includes("children") && t && c && l.virtual.enabled ? (c.slides = t, c.update(!0)) : r.includes("virtual") && c && l.virtual.enabled && (t && (c.slides = t), c.update(!0)), r.includes("children") && t && l.loop && (A = !0), h && y.init() && y.update(!0), m && (e.controller.control = l.controller.control), g && (e.isElement && (!o || typeof o == "string") && (o = document.createElement("div"), o.classList.add("swiper-pagination"), o.part.add("pagination"), e.el.appendChild(o)), o && (l.pagination.el = o), d.init(), d.render(), d.update()), b && (e.isElement && (!s || typeof s == "string") && (s = document.createElement("div"), s.classList.add("swiper-scrollbar"), s.part.add("scrollbar"), e.el.appendChild(s)), s && (l.scrollbar.el = s), E.init(), E.updateSize(), E.setTranslate()), T && (e.isElement && ((!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-next"), Ln(a, e.navigation.arrowSvg), a.part.add("button-next"), e.el.appendChild(a)), (!i || typeof i == "string") && (i = document.createElement("div"), i.classList.add("swiper-button-prev"), Ln(i, e.navigation.arrowSvg), i.part.add("button-prev"), e.el.appendChild(i))), a && (l.navigation.nextEl = a), i && (l.navigation.prevEl = i), p.init(), p.update()), r.includes("allowSlideNext") && (e.allowSlideNext = n.allowSlideNext), r.includes("allowSlidePrev") && (e.allowSlidePrev = n.allowSlidePrev), r.includes("direction") && e.changeDirection(n.direction, !1), (_ || A) && e.loopDestroy(), (N || A) && e.loopCreate(), e.update();
|
|
6791
6791
|
}
|
|
6792
6792
|
function of(e = {}, t = !0) {
|
|
6793
6793
|
const n = {
|
|
@@ -6915,10 +6915,10 @@ const Yi = /* @__PURE__ */ ho(null), pf = /* @__PURE__ */ ho(null), Do = /* @__P
|
|
|
6915
6915
|
...i
|
|
6916
6916
|
} = {}, s) => {
|
|
6917
6917
|
let o = !1;
|
|
6918
|
-
const [u, l] = ne("swiper"), [d, p] = ne(null), [E, c] = ne(!1), y = Z(!1), h = Z(null), m = Z(null), g = Z(null), b = Z(null), T = Z(null), _ = Z(null), N = Z(null),
|
|
6918
|
+
const [u, l] = ne("swiper"), [d, p] = ne(null), [E, c] = ne(!1), y = Z(!1), h = Z(null), m = Z(null), g = Z(null), b = Z(null), T = Z(null), _ = Z(null), N = Z(null), A = Z(null), {
|
|
6919
6919
|
params: L,
|
|
6920
|
-
passedParams:
|
|
6921
|
-
rest:
|
|
6920
|
+
passedParams: C,
|
|
6921
|
+
rest: S,
|
|
6922
6922
|
events: w
|
|
6923
6923
|
} = of(i), {
|
|
6924
6924
|
slides: I,
|
|
@@ -6968,22 +6968,22 @@ const Yi = /* @__PURE__ */ ho(null), pf = /* @__PURE__ */ ho(null), Do = /* @__P
|
|
|
6968
6968
|
nextEl: T.current,
|
|
6969
6969
|
prevEl: _.current,
|
|
6970
6970
|
paginationEl: N.current,
|
|
6971
|
-
scrollbarEl:
|
|
6971
|
+
scrollbarEl: A.current,
|
|
6972
6972
|
swiper: m.current
|
|
6973
6973
|
}, L), a && !m.current.destroyed && a(m.current), () => {
|
|
6974
6974
|
m.current && !m.current.destroyed && m.current.destroy(!0, !1);
|
|
6975
6975
|
};
|
|
6976
6976
|
}, []), Cn(() => {
|
|
6977
6977
|
x();
|
|
6978
|
-
const H = lf(
|
|
6979
|
-
return g.current =
|
|
6978
|
+
const H = lf(C, g.current, I, b.current, (q) => q.key);
|
|
6979
|
+
return g.current = C, b.current = I, H.length && m.current && !m.current.destroyed && sf({
|
|
6980
6980
|
swiper: m.current,
|
|
6981
6981
|
slides: I,
|
|
6982
|
-
passedParams:
|
|
6982
|
+
passedParams: C,
|
|
6983
6983
|
changedParams: H,
|
|
6984
6984
|
nextEl: T.current,
|
|
6985
6985
|
prevEl: _.current,
|
|
6986
|
-
scrollbarEl:
|
|
6986
|
+
scrollbarEl: A.current,
|
|
6987
6987
|
paginationEl: N.current
|
|
6988
6988
|
}), () => {
|
|
6989
6989
|
F();
|
|
@@ -7000,7 +7000,7 @@ const Yi = /* @__PURE__ */ ho(null), pf = /* @__PURE__ */ ho(null), Do = /* @__P
|
|
|
7000
7000
|
return /* @__PURE__ */ _e.createElement(t, br({
|
|
7001
7001
|
ref: h,
|
|
7002
7002
|
className: Io(`${u}${e ? ` ${e}` : ""}`)
|
|
7003
|
-
},
|
|
7003
|
+
}, S), /* @__PURE__ */ _e.createElement(pf.Provider, {
|
|
7004
7004
|
value: m.current
|
|
7005
7005
|
}, P["container-start"], /* @__PURE__ */ _e.createElement(n, {
|
|
7006
7006
|
className: af(L.wrapperClass)
|
|
@@ -7011,7 +7011,7 @@ const Yi = /* @__PURE__ */ ho(null), pf = /* @__PURE__ */ ho(null), Do = /* @__P
|
|
|
7011
7011
|
ref: T,
|
|
7012
7012
|
className: "swiper-button-next"
|
|
7013
7013
|
})), ko(L) && /* @__PURE__ */ _e.createElement("div", {
|
|
7014
|
-
ref:
|
|
7014
|
+
ref: A,
|
|
7015
7015
|
className: "swiper-scrollbar"
|
|
7016
7016
|
}), No(L) && /* @__PURE__ */ _e.createElement("div", {
|
|
7017
7017
|
ref: N,
|
|
@@ -7299,53 +7299,53 @@ function mf({
|
|
|
7299
7299
|
let T = e.pagination.el;
|
|
7300
7300
|
T = Me(T);
|
|
7301
7301
|
let _, N;
|
|
7302
|
-
const
|
|
7302
|
+
const A = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, L = e.params.loop ? Math.ceil(A / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
7303
7303
|
if (e.params.loop ? (N = e.previousRealIndex || 0, _ = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (_ = e.snapIndex, N = e.previousSnapIndex) : (N = e.previousIndex || 0, _ = e.activeIndex || 0), b.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
7304
|
-
const
|
|
7305
|
-
let
|
|
7306
|
-
if (b.dynamicBullets && (i = La(
|
|
7304
|
+
const C = e.pagination.bullets;
|
|
7305
|
+
let S, w, I;
|
|
7306
|
+
if (b.dynamicBullets && (i = La(C[0], e.isHorizontal() ? "width" : "height"), T.forEach((P) => {
|
|
7307
7307
|
P.style[e.isHorizontal() ? "width" : "height"] = `${i * (b.dynamicMainBullets + 4)}px`;
|
|
7308
|
-
}), b.dynamicMainBullets > 1 && N !== void 0 && (s += _ - (N || 0), s > b.dynamicMainBullets - 1 ? s = b.dynamicMainBullets - 1 : s < 0 && (s = 0)),
|
|
7308
|
+
}), b.dynamicMainBullets > 1 && N !== void 0 && (s += _ - (N || 0), s > b.dynamicMainBullets - 1 ? s = b.dynamicMainBullets - 1 : s < 0 && (s = 0)), S = Math.max(_ - s, 0), w = S + (Math.min(C.length, b.dynamicMainBullets) - 1), I = (w + S) / 2), C.forEach((P) => {
|
|
7309
7309
|
const M = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((k) => `${b.bulletActiveClass}${k}`)].map((k) => typeof k == "string" && k.includes(" ") ? k.split(" ") : k).flat();
|
|
7310
7310
|
P.classList.remove(...M);
|
|
7311
7311
|
}), T.length > 1)
|
|
7312
|
-
|
|
7312
|
+
C.forEach((P) => {
|
|
7313
7313
|
const M = Er(P);
|
|
7314
|
-
M === _ ? P.classList.add(...b.bulletActiveClass.split(" ")) : e.isElement && P.setAttribute("part", "bullet"), b.dynamicBullets && (M >=
|
|
7314
|
+
M === _ ? P.classList.add(...b.bulletActiveClass.split(" ")) : e.isElement && P.setAttribute("part", "bullet"), b.dynamicBullets && (M >= S && M <= w && P.classList.add(...`${b.bulletActiveClass}-main`.split(" ")), M === S && u(P, "prev"), M === w && u(P, "next"));
|
|
7315
7315
|
});
|
|
7316
7316
|
else {
|
|
7317
|
-
const P =
|
|
7318
|
-
if (P && P.classList.add(...b.bulletActiveClass.split(" ")), e.isElement &&
|
|
7317
|
+
const P = C[_];
|
|
7318
|
+
if (P && P.classList.add(...b.bulletActiveClass.split(" ")), e.isElement && C.forEach((M, k) => {
|
|
7319
7319
|
M.setAttribute("part", k === _ ? "bullet-active" : "bullet");
|
|
7320
7320
|
}), b.dynamicBullets) {
|
|
7321
|
-
const M = S
|
|
7322
|
-
for (let x =
|
|
7323
|
-
|
|
7321
|
+
const M = C[S], k = C[w];
|
|
7322
|
+
for (let x = S; x <= w; x += 1)
|
|
7323
|
+
C[x] && C[x].classList.add(...`${b.bulletActiveClass}-main`.split(" "));
|
|
7324
7324
|
u(M, "prev"), u(k, "next");
|
|
7325
7325
|
}
|
|
7326
7326
|
}
|
|
7327
7327
|
if (b.dynamicBullets) {
|
|
7328
|
-
const P = Math.min(
|
|
7329
|
-
|
|
7328
|
+
const P = Math.min(C.length, b.dynamicMainBullets + 4), M = (i * P - i) / 2 - I * i, k = g ? "right" : "left";
|
|
7329
|
+
C.forEach((x) => {
|
|
7330
7330
|
x.style[e.isHorizontal() ? k : "top"] = `${M}px`;
|
|
7331
7331
|
});
|
|
7332
7332
|
}
|
|
7333
7333
|
}
|
|
7334
|
-
T.forEach((
|
|
7335
|
-
if (b.type === "fraction" && (
|
|
7334
|
+
T.forEach((C, S) => {
|
|
7335
|
+
if (b.type === "fraction" && (C.querySelectorAll(pn(b.currentClass)).forEach((w) => {
|
|
7336
7336
|
w.textContent = b.formatFractionCurrent(_ + 1);
|
|
7337
|
-
}),
|
|
7337
|
+
}), C.querySelectorAll(pn(b.totalClass)).forEach((w) => {
|
|
7338
7338
|
w.textContent = b.formatFractionTotal(L);
|
|
7339
7339
|
})), b.type === "progressbar") {
|
|
7340
7340
|
let w;
|
|
7341
7341
|
b.progressbarOpposite ? w = e.isHorizontal() ? "vertical" : "horizontal" : w = e.isHorizontal() ? "horizontal" : "vertical";
|
|
7342
7342
|
const I = (_ + 1) / L;
|
|
7343
7343
|
let P = 1, M = 1;
|
|
7344
|
-
w === "horizontal" ? P = I : M = I,
|
|
7344
|
+
w === "horizontal" ? P = I : M = I, C.querySelectorAll(pn(b.progressbarFillClass)).forEach((k) => {
|
|
7345
7345
|
k.style.transform = `translate3d(0,0,0) scaleX(${P}) scaleY(${M})`, k.style.transitionDuration = `${e.params.speed}ms`;
|
|
7346
7346
|
});
|
|
7347
7347
|
}
|
|
7348
|
-
b.type === "custom" && b.renderCustom ? (Ln(
|
|
7348
|
+
b.type === "custom" && b.renderCustom ? (Ln(C, b.renderCustom(e, _ + 1, L)), S === 0 && r("paginationRender", C)) : (S === 0 && r("paginationRender", C), r("paginationUpdate", C)), e.params.watchOverflow && e.enabled && C.classList[e.isLocked ? "add" : "remove"](b.lockClass);
|
|
7349
7349
|
});
|
|
7350
7350
|
}
|
|
7351
7351
|
function E() {
|
|
@@ -7358,8 +7358,8 @@ function mf({
|
|
|
7358
7358
|
if (g.type === "bullets") {
|
|
7359
7359
|
let N = e.params.loop ? Math.ceil(b / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
7360
7360
|
e.params.freeMode && e.params.freeMode.enabled && N > b && (N = b);
|
|
7361
|
-
for (let
|
|
7362
|
-
g.renderBullet ? _ += g.renderBullet.call(e,
|
|
7361
|
+
for (let A = 0; A < N; A += 1)
|
|
7362
|
+
g.renderBullet ? _ += g.renderBullet.call(e, A, g.bulletClass) : _ += `<${g.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${g.bulletClass}"></${g.bulletElement}>`;
|
|
7363
7363
|
}
|
|
7364
7364
|
g.type === "fraction" && (g.renderFraction ? _ = g.renderFraction.call(e, g.currentClass, g.totalClass) : _ = `<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`), g.type === "progressbar" && (g.renderProgressbar ? _ = g.renderProgressbar.call(e, g.progressbarFillClass) : _ = `<span class="${g.progressbarFillClass}"></span>`), e.pagination.bullets = [], T.forEach((N) => {
|
|
7365
7365
|
g.type !== "custom" && Ln(N, _ || ""), g.type === "bullets" && e.pagination.bullets.push(...N.querySelectorAll(pn(g.bulletClass)));
|
|
@@ -7417,7 +7417,7 @@ function mf({
|
|
|
7417
7417
|
if (e.params.pagination.el && e.params.pagination.hideOnClick && _ && _.length > 0 && !T.classList.contains(e.params.pagination.bulletClass)) {
|
|
7418
7418
|
if (e.navigation && (e.navigation.nextEl && T === e.navigation.nextEl || e.navigation.prevEl && T === e.navigation.prevEl)) return;
|
|
7419
7419
|
const N = _[0].classList.contains(e.params.pagination.hiddenClass);
|
|
7420
|
-
r(N === !0 ? "paginationShow" : "paginationHide"), _.forEach((
|
|
7420
|
+
r(N === !0 ? "paginationShow" : "paginationHide"), _.forEach((A) => A.classList.toggle(e.params.pagination.hiddenClass));
|
|
7421
7421
|
}
|
|
7422
7422
|
});
|
|
7423
7423
|
const h = () => {
|
|
@@ -8663,28 +8663,28 @@ function kf() {
|
|
|
8663
8663
|
function N() {
|
|
8664
8664
|
var k = { line: b, column: T };
|
|
8665
8665
|
return function(x) {
|
|
8666
|
-
return x.position = new
|
|
8666
|
+
return x.position = new A(k), S(), x;
|
|
8667
8667
|
};
|
|
8668
8668
|
}
|
|
8669
|
-
function
|
|
8669
|
+
function A(k) {
|
|
8670
8670
|
this.start = k, this.end = { line: b, column: T }, this.source = g.source;
|
|
8671
8671
|
}
|
|
8672
|
-
|
|
8672
|
+
A.prototype.content = m;
|
|
8673
8673
|
function L(k) {
|
|
8674
8674
|
var x = new Error(
|
|
8675
8675
|
g.source + ":" + b + ":" + T + ": " + k
|
|
8676
8676
|
);
|
|
8677
8677
|
if (x.reason = k, x.filename = g.source, x.line = b, x.column = T, x.source = m, !g.silent) throw x;
|
|
8678
8678
|
}
|
|
8679
|
-
function
|
|
8679
|
+
function C(k) {
|
|
8680
8680
|
var x = k.exec(m);
|
|
8681
8681
|
if (x) {
|
|
8682
8682
|
var F = x[0];
|
|
8683
8683
|
return _(F), m = m.slice(F.length), x;
|
|
8684
8684
|
}
|
|
8685
8685
|
}
|
|
8686
|
-
function
|
|
8687
|
-
|
|
8686
|
+
function S() {
|
|
8687
|
+
C(n);
|
|
8688
8688
|
}
|
|
8689
8689
|
function w(k) {
|
|
8690
8690
|
var x;
|
|
@@ -8707,15 +8707,15 @@ function kf() {
|
|
|
8707
8707
|
}
|
|
8708
8708
|
}
|
|
8709
8709
|
function P() {
|
|
8710
|
-
var k = N(), x =
|
|
8710
|
+
var k = N(), x = C(r);
|
|
8711
8711
|
if (x) {
|
|
8712
|
-
if (I(), !
|
|
8713
|
-
var F =
|
|
8712
|
+
if (I(), !C(a)) return L("property missing ':'");
|
|
8713
|
+
var F = C(i), $ = k({
|
|
8714
8714
|
type: c,
|
|
8715
8715
|
property: h(x[0].replace(e, p)),
|
|
8716
8716
|
value: F ? h(F[0].replace(e, p)) : p
|
|
8717
8717
|
});
|
|
8718
|
-
return
|
|
8718
|
+
return C(s), $;
|
|
8719
8719
|
}
|
|
8720
8720
|
}
|
|
8721
8721
|
function M() {
|
|
@@ -8725,7 +8725,7 @@ function kf() {
|
|
|
8725
8725
|
x !== !1 && (k.push(x), w(k));
|
|
8726
8726
|
return k;
|
|
8727
8727
|
}
|
|
8728
|
-
return
|
|
8728
|
+
return S(), M();
|
|
8729
8729
|
}
|
|
8730
8730
|
function h(m) {
|
|
8731
8731
|
return m ? m.replace(o, p) : p;
|
|
@@ -9413,17 +9413,17 @@ function pp(e) {
|
|
|
9413
9413
|
if (r++, t.containerState._closeFlow) {
|
|
9414
9414
|
t.containerState._closeFlow = void 0, a && b();
|
|
9415
9415
|
const _ = t.events.length;
|
|
9416
|
-
let N = _,
|
|
9416
|
+
let N = _, A;
|
|
9417
9417
|
for (; N--; )
|
|
9418
9418
|
if (t.events[N][0] === "exit" && t.events[N][1].type === "chunkFlow") {
|
|
9419
|
-
|
|
9419
|
+
A = t.events[N][1].end;
|
|
9420
9420
|
break;
|
|
9421
9421
|
}
|
|
9422
9422
|
g(r);
|
|
9423
9423
|
let L = _;
|
|
9424
9424
|
for (; L < t.events.length; )
|
|
9425
9425
|
t.events[L][1].end = {
|
|
9426
|
-
...
|
|
9426
|
+
...A
|
|
9427
9427
|
}, L++;
|
|
9428
9428
|
return ft(t.events, N + 1, 0, t.events.slice(_)), t.events.length = L, l(T);
|
|
9429
9429
|
}
|
|
@@ -9472,30 +9472,30 @@ function pp(e) {
|
|
|
9472
9472
|
function m(T, _) {
|
|
9473
9473
|
const N = t.sliceStream(T);
|
|
9474
9474
|
if (_ && N.push(null), T.previous = i, i && (i.next = T), i = T, a.defineSkip(T.start), a.write(N), t.parser.lazy[T.start.line]) {
|
|
9475
|
-
let
|
|
9476
|
-
for (;
|
|
9475
|
+
let A = a.events.length;
|
|
9476
|
+
for (; A--; )
|
|
9477
9477
|
if (
|
|
9478
9478
|
// The token starts before the line ending…
|
|
9479
|
-
a.events[
|
|
9480
|
-
(!a.events[
|
|
9481
|
-
a.events[
|
|
9479
|
+
a.events[A][1].start.offset < s && // …and either is not ended yet…
|
|
9480
|
+
(!a.events[A][1].end || // …or ends after it.
|
|
9481
|
+
a.events[A][1].end.offset > s)
|
|
9482
9482
|
)
|
|
9483
9483
|
return;
|
|
9484
9484
|
const L = t.events.length;
|
|
9485
|
-
let
|
|
9486
|
-
for (;
|
|
9487
|
-
if (t.events[
|
|
9488
|
-
if (
|
|
9489
|
-
w = t.events[
|
|
9485
|
+
let C = L, S, w;
|
|
9486
|
+
for (; C--; )
|
|
9487
|
+
if (t.events[C][0] === "exit" && t.events[C][1].type === "chunkFlow") {
|
|
9488
|
+
if (S) {
|
|
9489
|
+
w = t.events[C][1].end;
|
|
9490
9490
|
break;
|
|
9491
9491
|
}
|
|
9492
|
-
|
|
9492
|
+
S = !0;
|
|
9493
9493
|
}
|
|
9494
|
-
for (g(r),
|
|
9495
|
-
t.events[
|
|
9494
|
+
for (g(r), A = L; A < t.events.length; )
|
|
9495
|
+
t.events[A][1].end = {
|
|
9496
9496
|
...w
|
|
9497
|
-
},
|
|
9498
|
-
ft(t.events,
|
|
9497
|
+
}, A++;
|
|
9498
|
+
ft(t.events, C + 1, 0, t.events.slice(L)), t.events.length = A;
|
|
9499
9499
|
}
|
|
9500
9500
|
}
|
|
9501
9501
|
function g(T) {
|
|
@@ -9747,67 +9747,67 @@ function _p(e, t, n) {
|
|
|
9747
9747
|
};
|
|
9748
9748
|
let i = 0, s = 0, o;
|
|
9749
9749
|
return u;
|
|
9750
|
-
function u(
|
|
9751
|
-
return l(
|
|
9750
|
+
function u(A) {
|
|
9751
|
+
return l(A);
|
|
9752
9752
|
}
|
|
9753
|
-
function l(
|
|
9753
|
+
function l(A) {
|
|
9754
9754
|
const L = r.events[r.events.length - 1];
|
|
9755
|
-
return i = L && L[1].type === "linePrefix" ? L[2].sliceSerialize(L[1], !0).length : 0, o =
|
|
9755
|
+
return i = L && L[1].type === "linePrefix" ? L[2].sliceSerialize(L[1], !0).length : 0, o = A, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(A);
|
|
9756
9756
|
}
|
|
9757
|
-
function d(
|
|
9758
|
-
return
|
|
9757
|
+
function d(A) {
|
|
9758
|
+
return A === o ? (s++, e.consume(A), d) : s < 3 ? n(A) : (e.exit("codeFencedFenceSequence"), be(A) ? Te(e, p, "whitespace")(A) : p(A));
|
|
9759
9759
|
}
|
|
9760
|
-
function p(
|
|
9761
|
-
return
|
|
9760
|
+
function p(A) {
|
|
9761
|
+
return A === null || re(A) ? (e.exit("codeFencedFence"), r.interrupt ? t(A) : e.check(fs, h, _)(A)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
9762
9762
|
contentType: "string"
|
|
9763
|
-
}), E(
|
|
9763
|
+
}), E(A));
|
|
9764
9764
|
}
|
|
9765
|
-
function E(
|
|
9766
|
-
return
|
|
9765
|
+
function E(A) {
|
|
9766
|
+
return A === null || re(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), p(A)) : be(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Te(e, c, "whitespace")(A)) : A === 96 && A === o ? n(A) : (e.consume(A), E);
|
|
9767
9767
|
}
|
|
9768
|
-
function c(
|
|
9769
|
-
return
|
|
9768
|
+
function c(A) {
|
|
9769
|
+
return A === null || re(A) ? p(A) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
9770
9770
|
contentType: "string"
|
|
9771
|
-
}), y(
|
|
9771
|
+
}), y(A));
|
|
9772
9772
|
}
|
|
9773
|
-
function y(
|
|
9774
|
-
return
|
|
9773
|
+
function y(A) {
|
|
9774
|
+
return A === null || re(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), p(A)) : A === 96 && A === o ? n(A) : (e.consume(A), y);
|
|
9775
9775
|
}
|
|
9776
|
-
function h(
|
|
9777
|
-
return e.attempt(a, _, m)(
|
|
9776
|
+
function h(A) {
|
|
9777
|
+
return e.attempt(a, _, m)(A);
|
|
9778
9778
|
}
|
|
9779
|
-
function m(
|
|
9780
|
-
return e.enter("lineEnding"), e.consume(
|
|
9779
|
+
function m(A) {
|
|
9780
|
+
return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), g;
|
|
9781
9781
|
}
|
|
9782
|
-
function g(
|
|
9783
|
-
return i > 0 && be(
|
|
9782
|
+
function g(A) {
|
|
9783
|
+
return i > 0 && be(A) ? Te(e, b, "linePrefix", i + 1)(A) : b(A);
|
|
9784
9784
|
}
|
|
9785
|
-
function b(
|
|
9786
|
-
return
|
|
9785
|
+
function b(A) {
|
|
9786
|
+
return A === null || re(A) ? e.check(fs, h, _)(A) : (e.enter("codeFlowValue"), T(A));
|
|
9787
9787
|
}
|
|
9788
|
-
function T(
|
|
9789
|
-
return
|
|
9788
|
+
function T(A) {
|
|
9789
|
+
return A === null || re(A) ? (e.exit("codeFlowValue"), b(A)) : (e.consume(A), T);
|
|
9790
9790
|
}
|
|
9791
|
-
function _(
|
|
9792
|
-
return e.exit("codeFenced"), t(
|
|
9791
|
+
function _(A) {
|
|
9792
|
+
return e.exit("codeFenced"), t(A);
|
|
9793
9793
|
}
|
|
9794
|
-
function N(
|
|
9795
|
-
let
|
|
9794
|
+
function N(A, L, C) {
|
|
9795
|
+
let S = 0;
|
|
9796
9796
|
return w;
|
|
9797
9797
|
function w(x) {
|
|
9798
|
-
return
|
|
9798
|
+
return A.enter("lineEnding"), A.consume(x), A.exit("lineEnding"), I;
|
|
9799
9799
|
}
|
|
9800
9800
|
function I(x) {
|
|
9801
|
-
return
|
|
9801
|
+
return A.enter("codeFencedFence"), be(x) ? Te(A, P, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(x) : P(x);
|
|
9802
9802
|
}
|
|
9803
9803
|
function P(x) {
|
|
9804
|
-
return x === o ? (
|
|
9804
|
+
return x === o ? (A.enter("codeFencedFenceSequence"), M(x)) : C(x);
|
|
9805
9805
|
}
|
|
9806
9806
|
function M(x) {
|
|
9807
|
-
return x === o ? (
|
|
9807
|
+
return x === o ? (S++, A.consume(x), M) : S >= s ? (A.exit("codeFencedFenceSequence"), be(x) ? Te(A, k, "whitespace")(x) : k(x)) : C(x);
|
|
9808
9808
|
}
|
|
9809
9809
|
function k(x) {
|
|
9810
|
-
return x === null || re(x) ? (
|
|
9810
|
+
return x === null || re(x) ? (A.exit("codeFencedFence"), L(x)) : C(x);
|
|
9811
9811
|
}
|
|
9812
9812
|
}
|
|
9813
9813
|
}
|
|
@@ -10494,18 +10494,18 @@ function th(e, t, n) {
|
|
|
10494
10494
|
return D === 45 || D === 46 || D === 58 || D === 95 || Je(D) ? (e.consume(D), _) : N(D);
|
|
10495
10495
|
}
|
|
10496
10496
|
function N(D) {
|
|
10497
|
-
return D === 61 ? (e.consume(D),
|
|
10497
|
+
return D === 61 ? (e.consume(D), A) : be(D) ? (e.consume(D), N) : T(D);
|
|
10498
10498
|
}
|
|
10499
|
-
function
|
|
10500
|
-
return D === null || D === 60 || D === 61 || D === 62 || D === 96 ? n(D) : D === 34 || D === 39 ? (e.consume(D), u = D, L) : be(D) ? (e.consume(D),
|
|
10499
|
+
function A(D) {
|
|
10500
|
+
return D === null || D === 60 || D === 61 || D === 62 || D === 96 ? n(D) : D === 34 || D === 39 ? (e.consume(D), u = D, L) : be(D) ? (e.consume(D), A) : C(D);
|
|
10501
10501
|
}
|
|
10502
10502
|
function L(D) {
|
|
10503
|
-
return D === u ? (e.consume(D), u = null,
|
|
10503
|
+
return D === u ? (e.consume(D), u = null, S) : D === null || re(D) ? n(D) : (e.consume(D), L);
|
|
10504
10504
|
}
|
|
10505
|
-
function
|
|
10506
|
-
return D === null || D === 34 || D === 39 || D === 47 || D === 60 || D === 61 || D === 62 || D === 96 || ke(D) ? N(D) : (e.consume(D),
|
|
10505
|
+
function C(D) {
|
|
10506
|
+
return D === null || D === 34 || D === 39 || D === 47 || D === 60 || D === 61 || D === 62 || D === 96 || ke(D) ? N(D) : (e.consume(D), C);
|
|
10507
10507
|
}
|
|
10508
|
-
function
|
|
10508
|
+
function S(D) {
|
|
10509
10509
|
return D === 47 || D === 62 || be(D) ? T(D) : n(D);
|
|
10510
10510
|
}
|
|
10511
10511
|
function w(D) {
|
|
@@ -10580,7 +10580,7 @@ function ih(e, t, n) {
|
|
|
10580
10580
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(v), u;
|
|
10581
10581
|
}
|
|
10582
10582
|
function u(v) {
|
|
10583
|
-
return v === 33 ? (e.consume(v), l) : v === 47 ? (e.consume(v), N) : v === 63 ? (e.consume(v), T) : ct(v) ? (e.consume(v),
|
|
10583
|
+
return v === 33 ? (e.consume(v), l) : v === 47 ? (e.consume(v), N) : v === 63 ? (e.consume(v), T) : ct(v) ? (e.consume(v), C) : n(v);
|
|
10584
10584
|
}
|
|
10585
10585
|
function l(v) {
|
|
10586
10586
|
return v === 45 ? (e.consume(v), d) : v === 91 ? (e.consume(v), i = 0, y) : ct(v) ? (e.consume(v), b) : n(v);
|
|
@@ -10620,25 +10620,25 @@ function ih(e, t, n) {
|
|
|
10620
10620
|
return v === 62 ? F(v) : T(v);
|
|
10621
10621
|
}
|
|
10622
10622
|
function N(v) {
|
|
10623
|
-
return ct(v) ? (e.consume(v),
|
|
10623
|
+
return ct(v) ? (e.consume(v), A) : n(v);
|
|
10624
10624
|
}
|
|
10625
|
-
function
|
|
10626
|
-
return v === 45 || Je(v) ? (e.consume(v),
|
|
10625
|
+
function A(v) {
|
|
10626
|
+
return v === 45 || Je(v) ? (e.consume(v), A) : L(v);
|
|
10627
10627
|
}
|
|
10628
10628
|
function L(v) {
|
|
10629
10629
|
return re(v) ? (s = L, $(v)) : be(v) ? (e.consume(v), L) : F(v);
|
|
10630
10630
|
}
|
|
10631
|
-
function
|
|
10632
|
-
return v === 45 || Je(v) ? (e.consume(v),
|
|
10631
|
+
function C(v) {
|
|
10632
|
+
return v === 45 || Je(v) ? (e.consume(v), C) : v === 47 || v === 62 || ke(v) ? S(v) : n(v);
|
|
10633
10633
|
}
|
|
10634
|
-
function
|
|
10635
|
-
return v === 47 ? (e.consume(v), F) : v === 58 || v === 95 || ct(v) ? (e.consume(v), w) : re(v) ? (s =
|
|
10634
|
+
function S(v) {
|
|
10635
|
+
return v === 47 ? (e.consume(v), F) : v === 58 || v === 95 || ct(v) ? (e.consume(v), w) : re(v) ? (s = S, $(v)) : be(v) ? (e.consume(v), S) : F(v);
|
|
10636
10636
|
}
|
|
10637
10637
|
function w(v) {
|
|
10638
10638
|
return v === 45 || v === 46 || v === 58 || v === 95 || Je(v) ? (e.consume(v), w) : I(v);
|
|
10639
10639
|
}
|
|
10640
10640
|
function I(v) {
|
|
10641
|
-
return v === 61 ? (e.consume(v), P) : re(v) ? (s = I, $(v)) : be(v) ? (e.consume(v), I) :
|
|
10641
|
+
return v === 61 ? (e.consume(v), P) : re(v) ? (s = I, $(v)) : be(v) ? (e.consume(v), I) : S(v);
|
|
10642
10642
|
}
|
|
10643
10643
|
function P(v) {
|
|
10644
10644
|
return v === null || v === 60 || v === 61 || v === 62 || v === 96 ? n(v) : v === 34 || v === 39 ? (e.consume(v), a = v, M) : re(v) ? (s = P, $(v)) : be(v) ? (e.consume(v), P) : (e.consume(v), k);
|
|
@@ -10647,10 +10647,10 @@ function ih(e, t, n) {
|
|
|
10647
10647
|
return v === a ? (e.consume(v), a = void 0, x) : v === null ? n(v) : re(v) ? (s = M, $(v)) : (e.consume(v), M);
|
|
10648
10648
|
}
|
|
10649
10649
|
function k(v) {
|
|
10650
|
-
return v === null || v === 34 || v === 39 || v === 60 || v === 61 || v === 96 ? n(v) : v === 47 || v === 62 || ke(v) ?
|
|
10650
|
+
return v === null || v === 34 || v === 39 || v === 60 || v === 61 || v === 96 ? n(v) : v === 47 || v === 62 || ke(v) ? S(v) : (e.consume(v), k);
|
|
10651
10651
|
}
|
|
10652
10652
|
function x(v) {
|
|
10653
|
-
return v === 47 || v === 62 || ke(v) ?
|
|
10653
|
+
return v === 47 || v === 62 || ke(v) ? S(v) : n(v);
|
|
10654
10654
|
}
|
|
10655
10655
|
function F(v) {
|
|
10656
10656
|
return v === 62 ? (e.consume(v), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(v);
|
|
@@ -11197,11 +11197,11 @@ function Yh(e, t, n) {
|
|
|
11197
11197
|
let s = [], o = [];
|
|
11198
11198
|
const u = {
|
|
11199
11199
|
attempt: L(N),
|
|
11200
|
-
check: L(
|
|
11200
|
+
check: L(A),
|
|
11201
11201
|
consume: b,
|
|
11202
11202
|
enter: T,
|
|
11203
11203
|
exit: _,
|
|
11204
|
-
interrupt: L(
|
|
11204
|
+
interrupt: L(A, {
|
|
11205
11205
|
interrupt: !0
|
|
11206
11206
|
})
|
|
11207
11207
|
}, l = {
|
|
@@ -11219,7 +11219,7 @@ function Yh(e, t, n) {
|
|
|
11219
11219
|
let d = t.tokenize.call(l, u);
|
|
11220
11220
|
return t.resolveAll && i.push(t), l;
|
|
11221
11221
|
function p(I) {
|
|
11222
|
-
return s = et(s, I), m(), s[s.length - 1] !== null ? [] : (
|
|
11222
|
+
return s = et(s, I), m(), s[s.length - 1] !== null ? [] : (C(t, 0), l.events = li(i, l.events, l), l.events);
|
|
11223
11223
|
}
|
|
11224
11224
|
function E(I, P) {
|
|
11225
11225
|
return jh(c(I), P);
|
|
@@ -11275,9 +11275,9 @@ function Yh(e, t, n) {
|
|
|
11275
11275
|
return P.end = y(), l.events.push(["exit", P, l]), P;
|
|
11276
11276
|
}
|
|
11277
11277
|
function N(I, P) {
|
|
11278
|
-
|
|
11278
|
+
C(I, P.from);
|
|
11279
11279
|
}
|
|
11280
|
-
function
|
|
11280
|
+
function A(I, P) {
|
|
11281
11281
|
P.restore();
|
|
11282
11282
|
}
|
|
11283
11283
|
function L(I, P) {
|
|
@@ -11312,7 +11312,7 @@ function Yh(e, t, n) {
|
|
|
11312
11312
|
function D(se) {
|
|
11313
11313
|
return K;
|
|
11314
11314
|
function K(ae) {
|
|
11315
|
-
return v =
|
|
11315
|
+
return v = S(), q = se, se.partial || (l.currentConstruct = se), se.name && l.parser.constructs.disable.null.includes(se.name) ? te() : se.tokenize.call(
|
|
11316
11316
|
// If we do have fields, create an object w/ `context` as its
|
|
11317
11317
|
// prototype.
|
|
11318
11318
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -11331,10 +11331,10 @@ function Yh(e, t, n) {
|
|
|
11331
11331
|
}
|
|
11332
11332
|
}
|
|
11333
11333
|
}
|
|
11334
|
-
function
|
|
11334
|
+
function C(I, P) {
|
|
11335
11335
|
I.resolveAll && !i.includes(I) && i.push(I), I.resolve && ft(l.events, P, l.events.length - P, I.resolve(l.events.slice(P), l)), I.resolveTo && (l.events = I.resolveTo(l.events, l));
|
|
11336
11336
|
}
|
|
11337
|
-
function
|
|
11337
|
+
function S() {
|
|
11338
11338
|
const I = y(), P = l.previous, M = l.currentConstruct, k = l.events.length, x = Array.from(o);
|
|
11339
11339
|
return {
|
|
11340
11340
|
from: k,
|
|
@@ -11488,20 +11488,20 @@ function n0(e) {
|
|
|
11488
11488
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
11489
11489
|
enter: {
|
|
11490
11490
|
autolink: i(Xn),
|
|
11491
|
-
autolinkProtocol:
|
|
11492
|
-
autolinkEmail:
|
|
11491
|
+
autolinkProtocol: S,
|
|
11492
|
+
autolinkEmail: S,
|
|
11493
11493
|
atxHeading: i(Vt),
|
|
11494
11494
|
blockQuote: i(Ee),
|
|
11495
|
-
characterEscape:
|
|
11496
|
-
characterReference:
|
|
11495
|
+
characterEscape: S,
|
|
11496
|
+
characterReference: S,
|
|
11497
11497
|
codeFenced: i(Oe),
|
|
11498
11498
|
codeFencedFenceInfo: s,
|
|
11499
11499
|
codeFencedFenceMeta: s,
|
|
11500
11500
|
codeIndented: i(Oe, s),
|
|
11501
11501
|
codeText: i(Be, s),
|
|
11502
|
-
codeTextData:
|
|
11503
|
-
data:
|
|
11504
|
-
codeFlowValue:
|
|
11502
|
+
codeTextData: S,
|
|
11503
|
+
data: S,
|
|
11504
|
+
codeFlowValue: S,
|
|
11505
11505
|
definition: i(it),
|
|
11506
11506
|
definitionDestinationString: s,
|
|
11507
11507
|
definitionLabelString: s,
|
|
@@ -11510,9 +11510,9 @@ function n0(e) {
|
|
|
11510
11510
|
hardBreakEscape: i(Wn),
|
|
11511
11511
|
hardBreakTrailing: i(Wn),
|
|
11512
11512
|
htmlFlow: i(ht, s),
|
|
11513
|
-
htmlFlowData:
|
|
11513
|
+
htmlFlowData: S,
|
|
11514
11514
|
htmlText: i(ht, s),
|
|
11515
|
-
htmlTextData:
|
|
11515
|
+
htmlTextData: S,
|
|
11516
11516
|
image: i(jn),
|
|
11517
11517
|
label: s,
|
|
11518
11518
|
link: i(Xn),
|
|
@@ -11574,9 +11574,9 @@ function n0(e) {
|
|
|
11574
11574
|
resourceDestinationString: v,
|
|
11575
11575
|
resourceTitleString: G,
|
|
11576
11576
|
resource: Q,
|
|
11577
|
-
setextHeading: u(
|
|
11577
|
+
setextHeading: u(C),
|
|
11578
11578
|
setextHeadingLineSequence: L,
|
|
11579
|
-
setextHeadingText:
|
|
11579
|
+
setextHeadingText: A,
|
|
11580
11580
|
strong: u(),
|
|
11581
11581
|
thematicBreak: u()
|
|
11582
11582
|
}
|
|
@@ -11768,17 +11768,17 @@ function n0(e) {
|
|
|
11768
11768
|
J.depth = le;
|
|
11769
11769
|
}
|
|
11770
11770
|
}
|
|
11771
|
-
function
|
|
11771
|
+
function A() {
|
|
11772
11772
|
this.data.setextHeadingSlurpLineEnding = !0;
|
|
11773
11773
|
}
|
|
11774
11774
|
function L(Y) {
|
|
11775
11775
|
const J = this.stack[this.stack.length - 1];
|
|
11776
11776
|
J.depth = this.sliceSerialize(Y).codePointAt(0) === 61 ? 1 : 2;
|
|
11777
11777
|
}
|
|
11778
|
-
function
|
|
11778
|
+
function C() {
|
|
11779
11779
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
11780
11780
|
}
|
|
11781
|
-
function
|
|
11781
|
+
function S(Y) {
|
|
11782
11782
|
const le = this.stack[this.stack.length - 1].children;
|
|
11783
11783
|
let me = le[le.length - 1];
|
|
11784
11784
|
(!me || me.type !== "text") && (me = Br(), me.position = {
|
|
@@ -11798,7 +11798,7 @@ function n0(e) {
|
|
|
11798
11798
|
le.position.end = yt(Y.end), this.data.atHardBreak = void 0;
|
|
11799
11799
|
return;
|
|
11800
11800
|
}
|
|
11801
|
-
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(J.type) && (
|
|
11801
|
+
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(J.type) && (S.call(this, Y), w.call(this, Y));
|
|
11802
11802
|
}
|
|
11803
11803
|
function P() {
|
|
11804
11804
|
this.data.atHardBreak = !0;
|
|
@@ -21110,28 +21110,28 @@ function Ci(e, t) {
|
|
|
21110
21110
|
M === 88 || M === 120 ? (N = "hexadecimal", _ = ++T) : N = "decimal";
|
|
21111
21111
|
} else
|
|
21112
21112
|
N = "named";
|
|
21113
|
-
let
|
|
21114
|
-
const
|
|
21113
|
+
let A = "", L = "", C = "";
|
|
21114
|
+
const S = N === "named" ? no : N === "decimal" ? al : jE;
|
|
21115
21115
|
for (_--; ++_ <= e.length; ) {
|
|
21116
21116
|
const M = e.charCodeAt(_);
|
|
21117
|
-
if (!
|
|
21117
|
+
if (!S(M))
|
|
21118
21118
|
break;
|
|
21119
|
-
|
|
21119
|
+
C += String.fromCharCode(M), N === "named" && WE.includes(C) && (A = C, L = Pn(C));
|
|
21120
21120
|
}
|
|
21121
21121
|
let w = e.charCodeAt(_) === 59;
|
|
21122
21122
|
if (w) {
|
|
21123
21123
|
_++;
|
|
21124
|
-
const M = N === "named" ? Pn(
|
|
21125
|
-
M && (
|
|
21124
|
+
const M = N === "named" ? Pn(C) : !1;
|
|
21125
|
+
M && (A = C, L = M);
|
|
21126
21126
|
}
|
|
21127
21127
|
let I = 1 + _ - b, P = "";
|
|
21128
|
-
if (!(!w && n.nonTerminated === !1)) if (!
|
|
21128
|
+
if (!(!w && n.nonTerminated === !1)) if (!C)
|
|
21129
21129
|
N !== "named" && h(4, I);
|
|
21130
21130
|
else if (N === "named") {
|
|
21131
21131
|
if (w && !L)
|
|
21132
21132
|
h(5, 1);
|
|
21133
|
-
else if (
|
|
21134
|
-
const M =
|
|
21133
|
+
else if (A !== C && (_ = T + A.length, I = 1 + _ - T, w = !1), !w) {
|
|
21134
|
+
const M = A ? 1 : 3;
|
|
21135
21135
|
if (n.attribute) {
|
|
21136
21136
|
const k = e.charCodeAt(_);
|
|
21137
21137
|
k === 61 ? (h(M, I), L = "") : no(k) ? L = "" : h(M, I);
|
|
@@ -21142,7 +21142,7 @@ function Ci(e, t) {
|
|
|
21142
21142
|
} else {
|
|
21143
21143
|
w || h(2, I);
|
|
21144
21144
|
let M = Number.parseInt(
|
|
21145
|
-
|
|
21145
|
+
C,
|
|
21146
21146
|
N === "hexadecimal" ? 16 : 10
|
|
21147
21147
|
);
|
|
21148
21148
|
if (QE(M))
|
|
@@ -21166,7 +21166,7 @@ function Ci(e, t) {
|
|
|
21166
21166
|
e.slice(b - 1, _)
|
|
21167
21167
|
), E = M;
|
|
21168
21168
|
} else
|
|
21169
|
-
|
|
21169
|
+
C = e.slice(b - 1, _), o += C, p += C.length, i = _ - 1;
|
|
21170
21170
|
} else
|
|
21171
21171
|
c === 10 && (d++, s++, p = 0), Number.isNaN(c) ? m() : (o += String.fromCharCode(c), p++);
|
|
21172
21172
|
return a.join("");
|
|
@@ -21454,7 +21454,7 @@ function Si(e, t, n, r, a, i, s, o, u, l, d, p, E, c, y) {
|
|
|
21454
21454
|
return e.enter(r), e.enter(a), e.consume(x), e.exit(a), b;
|
|
21455
21455
|
}
|
|
21456
21456
|
function b(x) {
|
|
21457
|
-
return x === 35 ? (h = s, T(x)) : x === 46 ? (h = o, T(x)) : y && be(x) ? Te(e, b, "whitespace")(x) : !y && ke(x) ? Et(e, b)(x) : x === null || re(x) || Rn(x) || Mn(x) && x !== 45 && x !== 95 ? k(x) : (e.enter(i), e.enter(u), e.consume(x),
|
|
21457
|
+
return x === 35 ? (h = s, T(x)) : x === 46 ? (h = o, T(x)) : y && be(x) ? Te(e, b, "whitespace")(x) : !y && ke(x) ? Et(e, b)(x) : x === null || re(x) || Rn(x) || Mn(x) && x !== 45 && x !== 95 ? k(x) : (e.enter(i), e.enter(u), e.consume(x), A);
|
|
21458
21458
|
}
|
|
21459
21459
|
function T(x) {
|
|
21460
21460
|
const F = (
|
|
@@ -21484,17 +21484,17 @@ function Si(e, t, n, r, a, i, s, o, u, l, d, p, E, c, y) {
|
|
|
21484
21484
|
}
|
|
21485
21485
|
return e.consume(x), N;
|
|
21486
21486
|
}
|
|
21487
|
-
function
|
|
21488
|
-
return x === null || re(x) || Rn(x) || Mn(x) && x !== 45 && x !== 46 && x !== 58 && x !== 95 ? (e.exit(u), y && be(x) ? Te(e, L, "whitespace")(x) : !y && ke(x) ? Et(e, L)(x) : L(x)) : (e.consume(x),
|
|
21487
|
+
function A(x) {
|
|
21488
|
+
return x === null || re(x) || Rn(x) || Mn(x) && x !== 45 && x !== 46 && x !== 58 && x !== 95 ? (e.exit(u), y && be(x) ? Te(e, L, "whitespace")(x) : !y && ke(x) ? Et(e, L)(x) : L(x)) : (e.consume(x), A);
|
|
21489
21489
|
}
|
|
21490
21490
|
function L(x) {
|
|
21491
|
-
return x === 61 ? (e.enter(l), e.consume(x), e.exit(l),
|
|
21491
|
+
return x === 61 ? (e.enter(l), e.consume(x), e.exit(l), C) : (e.exit(i), b(x));
|
|
21492
21492
|
}
|
|
21493
|
-
function
|
|
21494
|
-
return x === null || x === 60 || x === 61 || x === 62 || x === 96 || x === 125 || y && re(x) ? n(x) : x === 34 || x === 39 ? (e.enter(d), e.enter(E), e.consume(x), e.exit(E), m = x, w) : y && be(x) ? Te(e,
|
|
21493
|
+
function C(x) {
|
|
21494
|
+
return x === null || x === 60 || x === 61 || x === 62 || x === 96 || x === 125 || y && re(x) ? n(x) : x === 34 || x === 39 ? (e.enter(d), e.enter(E), e.consume(x), e.exit(E), m = x, w) : y && be(x) ? Te(e, C, "whitespace")(x) : !y && ke(x) ? Et(e, C)(x) : (e.enter(p), e.enter(c), e.consume(x), m = void 0, S);
|
|
21495
21495
|
}
|
|
21496
|
-
function
|
|
21497
|
-
return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 125 || ke(x) ? (e.exit(c), e.exit(p), e.exit(i), b(x)) : (e.consume(x),
|
|
21496
|
+
function S(x) {
|
|
21497
|
+
return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 125 || ke(x) ? (e.exit(c), e.exit(p), e.exit(i), b(x)) : (e.consume(x), S);
|
|
21498
21498
|
}
|
|
21499
21499
|
function w(x) {
|
|
21500
21500
|
return x === m ? (e.enter(E), e.consume(x), e.exit(E), e.exit(d), e.exit(i), M) : (e.enter(p), I(x));
|
|
@@ -21568,79 +21568,79 @@ function Ab(e, t, n) {
|
|
|
21568
21568
|
const r = this, a = r.events[r.events.length - 1], i = a && a[1].type === "linePrefix" ? a[2].sliceSerialize(a[1], !0).length : 0;
|
|
21569
21569
|
let s = 0, o;
|
|
21570
21570
|
return u;
|
|
21571
|
-
function u(
|
|
21572
|
-
return e.enter("directiveContainer"), e.enter("directiveContainerFence"), e.enter("directiveContainerSequence"), l(
|
|
21571
|
+
function u(S) {
|
|
21572
|
+
return e.enter("directiveContainer"), e.enter("directiveContainerFence"), e.enter("directiveContainerSequence"), l(S);
|
|
21573
21573
|
}
|
|
21574
|
-
function l(
|
|
21575
|
-
return
|
|
21574
|
+
function l(S) {
|
|
21575
|
+
return S === 58 ? (e.consume(S), s++, l) : s < 3 ? n(S) : (e.exit("directiveContainerSequence"), vi.call(r, e, d, n, "directiveContainerName")(S));
|
|
21576
21576
|
}
|
|
21577
|
-
function d(
|
|
21578
|
-
return
|
|
21577
|
+
function d(S) {
|
|
21578
|
+
return S === 91 ? e.attempt(xb, p, p)(S) : p(S);
|
|
21579
21579
|
}
|
|
21580
|
-
function p(
|
|
21581
|
-
return
|
|
21580
|
+
function p(S) {
|
|
21581
|
+
return S === 123 ? e.attempt(Cb, E, E)(S) : E(S);
|
|
21582
21582
|
}
|
|
21583
|
-
function E(
|
|
21584
|
-
return Te(e, c, "whitespace")(
|
|
21583
|
+
function E(S) {
|
|
21584
|
+
return Te(e, c, "whitespace")(S);
|
|
21585
21585
|
}
|
|
21586
|
-
function c(
|
|
21587
|
-
return e.exit("directiveContainerFence"),
|
|
21586
|
+
function c(S) {
|
|
21587
|
+
return e.exit("directiveContainerFence"), S === null ? L(S) : re(S) ? r.interrupt ? t(S) : e.attempt(ar, y, L)(S) : n(S);
|
|
21588
21588
|
}
|
|
21589
|
-
function y(
|
|
21590
|
-
return
|
|
21589
|
+
function y(S) {
|
|
21590
|
+
return S === null ? L(S) : re(S) ? e.check(ar, T, L)(S) : (e.enter("directiveContainerContent"), h(S));
|
|
21591
21591
|
}
|
|
21592
|
-
function h(
|
|
21592
|
+
function h(S) {
|
|
21593
21593
|
return e.attempt({
|
|
21594
|
-
tokenize:
|
|
21594
|
+
tokenize: C,
|
|
21595
21595
|
partial: !0
|
|
21596
|
-
},
|
|
21596
|
+
}, A, i ? Te(e, m, "linePrefix", i + 1) : m)(S);
|
|
21597
21597
|
}
|
|
21598
|
-
function m(
|
|
21599
|
-
return
|
|
21598
|
+
function m(S) {
|
|
21599
|
+
return S === null ? A(S) : re(S) ? e.check(ar, b, A)(S) : b(S);
|
|
21600
21600
|
}
|
|
21601
|
-
function g(
|
|
21602
|
-
if (
|
|
21601
|
+
function g(S) {
|
|
21602
|
+
if (S === null) {
|
|
21603
21603
|
const w = e.exit("chunkDocument");
|
|
21604
|
-
return r.parser.lazy[w.start.line] = !1,
|
|
21604
|
+
return r.parser.lazy[w.start.line] = !1, A(S);
|
|
21605
21605
|
}
|
|
21606
|
-
return re(
|
|
21606
|
+
return re(S) ? e.check(ar, _, N)(S) : (e.consume(S), g);
|
|
21607
21607
|
}
|
|
21608
|
-
function b(
|
|
21608
|
+
function b(S) {
|
|
21609
21609
|
const w = e.enter("chunkDocument", {
|
|
21610
21610
|
contentType: "document",
|
|
21611
21611
|
previous: o
|
|
21612
21612
|
});
|
|
21613
|
-
return o && (o.next = w), o = w, g(
|
|
21613
|
+
return o && (o.next = w), o = w, g(S);
|
|
21614
21614
|
}
|
|
21615
|
-
function T(
|
|
21616
|
-
return e.enter("directiveContainerContent"), h(
|
|
21615
|
+
function T(S) {
|
|
21616
|
+
return e.enter("directiveContainerContent"), h(S);
|
|
21617
21617
|
}
|
|
21618
|
-
function _(
|
|
21619
|
-
e.consume(
|
|
21618
|
+
function _(S) {
|
|
21619
|
+
e.consume(S);
|
|
21620
21620
|
const w = e.exit("chunkDocument");
|
|
21621
21621
|
return r.parser.lazy[w.start.line] = !1, h;
|
|
21622
21622
|
}
|
|
21623
|
-
function N(
|
|
21623
|
+
function N(S) {
|
|
21624
21624
|
const w = e.exit("chunkDocument");
|
|
21625
|
-
return r.parser.lazy[w.start.line] = !1,
|
|
21625
|
+
return r.parser.lazy[w.start.line] = !1, A(S);
|
|
21626
21626
|
}
|
|
21627
|
-
function
|
|
21628
|
-
return e.exit("directiveContainerContent"), L(
|
|
21627
|
+
function A(S) {
|
|
21628
|
+
return e.exit("directiveContainerContent"), L(S);
|
|
21629
21629
|
}
|
|
21630
|
-
function L(
|
|
21631
|
-
return e.exit("directiveContainer"), t(
|
|
21630
|
+
function L(S) {
|
|
21631
|
+
return e.exit("directiveContainer"), t(S);
|
|
21632
21632
|
}
|
|
21633
|
-
function S
|
|
21633
|
+
function C(S, w, I) {
|
|
21634
21634
|
let P = 0;
|
|
21635
|
-
return Te(
|
|
21635
|
+
return Te(S, M, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
21636
21636
|
function M(F) {
|
|
21637
|
-
return
|
|
21637
|
+
return S.enter("directiveContainerFence"), S.enter("directiveContainerSequence"), k(F);
|
|
21638
21638
|
}
|
|
21639
21639
|
function k(F) {
|
|
21640
|
-
return F === 58 ? (
|
|
21640
|
+
return F === 58 ? (S.consume(F), P++, k) : P < s ? I(F) : (S.exit("directiveContainerSequence"), Te(S, x, "whitespace")(F));
|
|
21641
21641
|
}
|
|
21642
21642
|
function x(F) {
|
|
21643
|
-
return F === null || re(F) ? (
|
|
21643
|
+
return F === null || re(F) ? (S.exit("directiveContainerFence"), w(F)) : I(F);
|
|
21644
21644
|
}
|
|
21645
21645
|
}
|
|
21646
21646
|
}
|
|
@@ -21811,9 +21811,9 @@ const ka = {
|
|
|
21811
21811
|
ie(() => () => {
|
|
21812
21812
|
c();
|
|
21813
21813
|
}, [c]);
|
|
21814
|
-
const [m, g] = ne(0), b = Z(null), [T, _] = ne(!1), N = Z(/* @__PURE__ */ new Map()), [
|
|
21814
|
+
const [m, g] = ne(0), b = Z(null), [T, _] = ne(!1), N = Z(/* @__PURE__ */ new Map()), [A, L] = ne(357), [C, S] = ne("bottom");
|
|
21815
21815
|
return ie(() => {
|
|
21816
|
-
g(0), _(!1),
|
|
21816
|
+
g(0), _(!1), S("bottom");
|
|
21817
21817
|
}, [a?.key, a?.type]), ie(() => {
|
|
21818
21818
|
const I = N.current, P = /* @__PURE__ */ new Set(), M = (k) => {
|
|
21819
21819
|
if (!k || P.has(k) || I.has(k)) return;
|
|
@@ -21859,7 +21859,7 @@ const ka = {
|
|
|
21859
21859
|
0,
|
|
21860
21860
|
Math.floor(window.innerHeight - te.bottom)
|
|
21861
21861
|
), ce = Math.max(0, Math.floor(te.top)), Oe = ae < K + 12 && ce > ae;
|
|
21862
|
-
|
|
21862
|
+
S(Oe ? "top" : "bottom");
|
|
21863
21863
|
}
|
|
21864
21864
|
});
|
|
21865
21865
|
return () => cancelAnimationFrame(I);
|
|
@@ -21898,7 +21898,7 @@ const ka = {
|
|
|
21898
21898
|
"div",
|
|
21899
21899
|
{
|
|
21900
21900
|
className: "rte-steps-tooltip",
|
|
21901
|
-
style:
|
|
21901
|
+
style: A ? { width: `${A}px` } : void 0,
|
|
21902
21902
|
onMouseEnter: () => y(),
|
|
21903
21903
|
onMouseLeave: () => {
|
|
21904
21904
|
n || h(null);
|
|
@@ -22072,7 +22072,7 @@ const ka = {
|
|
|
22072
22072
|
boxShadow: "0 4px 20px 0 rgba(129, 124, 143, 0.2)",
|
|
22073
22073
|
border: "0.5px solid #E5E5E5"
|
|
22074
22074
|
});
|
|
22075
|
-
const x = "#0A0A0A", F =
|
|
22075
|
+
const x = "#0A0A0A", F = C;
|
|
22076
22076
|
return $n(
|
|
22077
22077
|
/* @__PURE__ */ V(
|
|
22078
22078
|
Il,
|
|
@@ -22174,18 +22174,18 @@ const jb = (e, t) => {
|
|
|
22174
22174
|
const r = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "";
|
|
22175
22175
|
if (typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
|
|
22176
22176
|
const b = nt(e.tooltip), T = b ? ` data-tooltip="${ue(b)}"` : "", _ = e.minCount || 1, N = e.maxCount || 3;
|
|
22177
|
-
let
|
|
22177
|
+
let A = 0;
|
|
22178
22178
|
for (let w = 0; w < N; w++) {
|
|
22179
22179
|
const I = `${e.key}-${w}`;
|
|
22180
|
-
t[I] != null && (
|
|
22180
|
+
t[I] != null && (A += 1);
|
|
22181
22181
|
}
|
|
22182
|
-
const L = Math.min(N, Math.max(_,
|
|
22183
|
-
let
|
|
22182
|
+
const L = Math.min(N, Math.max(_, A + (A < N ? 1 : 0)));
|
|
22183
|
+
let C = "";
|
|
22184
22184
|
for (let w = 0; w < L; w++) {
|
|
22185
22185
|
const I = `${e.key}-${w}`, { hasFile: P, fileName: M, uploadIcon: k } = ja(t[I], e.text), x = P ? "" : "hidden", F = b && !P ? "" : "hidden", $ = P ? "has-file" : "", H = P && M ? ` data-file-name="${M.replace(/"/g, """)}"` : "", q = ` data-batch-key="${e.key}"`, v = ` data-batch-index="${w}"`, G = `<span contenteditable="false" data-type="upload" data-key="${I}"${q}${v}${T} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${$}"><span class="upload-icon">${k}</span><span class="upload-label"${H}>${M || e.text}</span>${b ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${F}" data-upload-key="${I}" data-tooltip="${ue(b)}" ></i>` : ""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;
|
|
22186
|
-
|
|
22186
|
+
C += G;
|
|
22187
22187
|
}
|
|
22188
|
-
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${so}<span class="rte-upload-batch-chips">${
|
|
22188
|
+
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${so}<span class="rte-upload-batch-chips">${C}${n}</span></span>` : `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${C}${n}</span>`;
|
|
22189
22189
|
}
|
|
22190
22190
|
const i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}"` : "", { hasFile: o, fileName: u, uploadIcon: l } = ja(t[e.key], e.text), d = o ? "" : "hidden", p = i && !o ? "" : "hidden", E = o ? "has-file" : "", c = o && u ? ` data-file-name="${u.replace(/"/g, """)}"` : "", y = (e.text || "").trim(), m = o && e.showHint === !0 && y.length >= 12 ? `<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${y}</span>` : "", g = `<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${E}"><span class="upload-icon">${l}</span><span class="upload-label"${c}>${u || e.text}</span>${i ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${ue(i)}" ></i>` : ""}<span class="file-remove-btn ${d}" title="移除文件">×</span></span></span>`;
|
|
22191
22191
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${so}${g}${n}</span>${m}` : g + n + m;
|
|
@@ -22293,8 +22293,8 @@ function TT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22293
22293
|
const h = t[y], m = y + 1 < t.length ? t[y + 1] : null;
|
|
22294
22294
|
let g = !1;
|
|
22295
22295
|
if (h.type === "text" && (h.text?.includes("icon-bitian") || h.className === "rte-text-required") && m) {
|
|
22296
|
-
const
|
|
22297
|
-
if (
|
|
22296
|
+
const C = m.type === "upload" && m.exclusionGroup === "fileInput" && h.exclusionGroup === "fileInput" && h.exclusionGroup === m.exclusionGroup, S = m.type === "variable" && m.exclusionGroup === "textInput" && h.exclusionGroup === "textInput" && h.exclusionGroup === m.exclusionGroup;
|
|
22297
|
+
if (C) {
|
|
22298
22298
|
const I = `<span ${h.exclusionGroup ? `data-group="${h.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, P = "</span>";
|
|
22299
22299
|
let M = "";
|
|
22300
22300
|
h.className ? M = `<span class="${h.className}">${h.text ?? ""}</span>` : M = h.text ?? "";
|
|
@@ -22302,7 +22302,7 @@ function TT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22302
22302
|
c.push(I + M + x + P + F), y += 2;
|
|
22303
22303
|
continue;
|
|
22304
22304
|
}
|
|
22305
|
-
if (
|
|
22305
|
+
if (S) {
|
|
22306
22306
|
const I = `<span ${h.exclusionGroup ? `data-group="${h.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, P = "</span>";
|
|
22307
22307
|
let M = "";
|
|
22308
22308
|
h.className ? M = `<span class="${h.className}">${h.text ?? ""}</span>` : M = h.text ?? "";
|
|
@@ -22312,35 +22312,35 @@ function TT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22312
22312
|
}
|
|
22313
22313
|
}
|
|
22314
22314
|
const T = h.exclusionGroup ? `data-group="${h.exclusionGroup}"` : "", _ = h.exclusionGroup ? `<span ${T} class="exclusion-wrapper">` : "", N = h.exclusionGroup ? "</span>" : "";
|
|
22315
|
-
let
|
|
22315
|
+
let A = "";
|
|
22316
22316
|
if (h.type === "tag")
|
|
22317
|
-
|
|
22317
|
+
A = zb(h, { lockStructure: r, hideButtons: s });
|
|
22318
22318
|
else if (h.type === "text")
|
|
22319
|
-
|
|
22319
|
+
A = Vb(h, r);
|
|
22320
22320
|
else if (h.type === "variable" && h.key)
|
|
22321
|
-
|
|
22321
|
+
A = Yb(h, a);
|
|
22322
22322
|
else if (h.type === "report-url" && h.key)
|
|
22323
|
-
|
|
22323
|
+
A = nT(h, a);
|
|
22324
22324
|
else if (h.type === "markdown-name" && h.key)
|
|
22325
|
-
|
|
22325
|
+
A = aT(h, a);
|
|
22326
22326
|
else if (h.type === "markdown" && h.key)
|
|
22327
|
-
|
|
22327
|
+
A = sT(h, a);
|
|
22328
22328
|
else if (h.type === "upload" && h.key) {
|
|
22329
|
-
const
|
|
22330
|
-
|
|
22331
|
-
} else h.type === "select" && h.key ?
|
|
22332
|
-
const L = _ +
|
|
22329
|
+
const C = !!m && m.type === "text" && !m.className && !m.exclusionGroup && d(m.text), S = C ? (m.text ?? "").trim() : "", w = S ? E(S) : "";
|
|
22330
|
+
C && (g = !0), A = Xb(h, n, w);
|
|
22331
|
+
} else h.type === "select" && h.key ? A = Qb(h, a) : h.type === "textarea" && h.key ? A = Zb(h, a) : h.type === "richtext" && h.key ? A = eT(h, a) : h.type === "report-module" && h.key ? A = oT(h, a) : h.type === "markdown-module" && h.key ? A = uT(h, a) : h.type === "datepicker" && h.key ? A = cT(h, a) : h.type === "number-input" && h.key ? A = fT(h, a) : h.type === "multi-variable" && h.key ? A = hT(h, a, i) : h.type === "video-url" && h.key ? A = mT(h, u || {}) : h.type === "video-upload" && h.key ? A = gT(h, u || {}) : h.type === "searchable-select" && h.key && (A = bT(h, a));
|
|
22332
|
+
const L = _ + A + N;
|
|
22333
22333
|
if (h.type === "text" && !h.className && !h.exclusionGroup) {
|
|
22334
22334
|
if (d(h.text) && c.length > 0) {
|
|
22335
|
-
const
|
|
22336
|
-
c[c.length - 1] = `<span class="rte-inline-group">${
|
|
22335
|
+
const S = c[c.length - 1], w = (h.text ?? "").trim();
|
|
22336
|
+
c[c.length - 1] = `<span class="rte-inline-group">${S}${E(w)}</span>`, y++;
|
|
22337
22337
|
continue;
|
|
22338
22338
|
}
|
|
22339
|
-
const
|
|
22340
|
-
if (
|
|
22341
|
-
const
|
|
22342
|
-
c[c.length - 1] = `<span class="rte-inline-group">${
|
|
22343
|
-
const w =
|
|
22339
|
+
const C = p(h.text);
|
|
22340
|
+
if (C && c.length > 0) {
|
|
22341
|
+
const S = c[c.length - 1];
|
|
22342
|
+
c[c.length - 1] = `<span class="rte-inline-group">${S}${E(C.punct)}</span>`;
|
|
22343
|
+
const w = C.rest;
|
|
22344
22344
|
if (w) {
|
|
22345
22345
|
const I = w.replace(/\n/g, "<br/>");
|
|
22346
22346
|
c.push(`<span data-type="text" contenteditable="false">${I}</span>`);
|
|
@@ -22359,12 +22359,12 @@ function TT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22359
22359
|
m.classList.remove("show-placeholder");
|
|
22360
22360
|
else {
|
|
22361
22361
|
const T = Array.from(m.childNodes), _ = m.querySelector(".variable-info-icon");
|
|
22362
|
-
T.forEach((
|
|
22363
|
-
if (
|
|
22364
|
-
m.removeChild(
|
|
22362
|
+
T.forEach((A) => {
|
|
22363
|
+
if (A.nodeType === Node.TEXT_NODE) {
|
|
22364
|
+
m.removeChild(A);
|
|
22365
22365
|
return;
|
|
22366
22366
|
}
|
|
22367
|
-
|
|
22367
|
+
A.nodeType === Node.ELEMENT_NODE && A.tagName === "BR" && m.removeChild(A);
|
|
22368
22368
|
});
|
|
22369
22369
|
const N = document.createTextNode("");
|
|
22370
22370
|
_ && _.parentNode === m ? m.insertBefore(N, _) : m.firstChild ? m.insertBefore(N, m.firstChild) : m.appendChild(N), m.classList.add("show-placeholder");
|
|
@@ -22373,47 +22373,51 @@ function TT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22373
22373
|
}, 0));
|
|
22374
22374
|
}
|
|
22375
22375
|
function yT(e, t, n, r, a = {}, i, s, o, u, l, d) {
|
|
22376
|
-
const p = Z(/* @__PURE__ */ new Set()), E = Z(""), c = Z(!1), y = Z(
|
|
22376
|
+
const p = Z(/* @__PURE__ */ new Set()), E = Z(""), c = Z(!1), y = Z({}), h = oe(() => {
|
|
22377
22377
|
if (!e.current) return;
|
|
22378
22378
|
if (t.length === 0) {
|
|
22379
22379
|
e.current.innerHTML = "";
|
|
22380
22380
|
return;
|
|
22381
22381
|
}
|
|
22382
|
-
const m = t.filter((
|
|
22382
|
+
const m = t.filter((A) => A.key && A.type !== "report-module" && A.type !== "markdown-module").map((A) => `${A.type}:${A.key}`).join("|");
|
|
22383
22383
|
E.current !== m && (E.current = m, p.current = /* @__PURE__ */ new Set(), c.current = !0);
|
|
22384
22384
|
const g = c.current;
|
|
22385
22385
|
let b = {};
|
|
22386
22386
|
const T = /* @__PURE__ */ new Set();
|
|
22387
22387
|
e.current && !g && e.current.querySelectorAll('[data-type="variable"]').forEach((L) => {
|
|
22388
|
-
const
|
|
22389
|
-
if (!
|
|
22390
|
-
let
|
|
22388
|
+
const C = L.dataset.key;
|
|
22389
|
+
if (!C) return;
|
|
22390
|
+
let S = "";
|
|
22391
22391
|
if (L.dataset.variableRender === "antd-textarea") {
|
|
22392
22392
|
const w = (L.getAttribute("data-value") || "").trim();
|
|
22393
22393
|
try {
|
|
22394
|
-
|
|
22394
|
+
S = w ? decodeURIComponent(w).replace(/\r\n/g, `
|
|
22395
22395
|
`).trim() : "";
|
|
22396
22396
|
} catch {
|
|
22397
|
-
|
|
22397
|
+
S = w.trim();
|
|
22398
22398
|
}
|
|
22399
22399
|
} else {
|
|
22400
22400
|
const w = (L.innerText || "").replace(/\u200B/g, "").replace(/\r\n/g, `
|
|
22401
22401
|
`);
|
|
22402
|
-
|
|
22402
|
+
S = w.replace(/\n/g, "").trim().length > 0 ? w : "";
|
|
22403
22403
|
}
|
|
22404
|
-
if (
|
|
22405
|
-
p.current.add(
|
|
22406
|
-
else if (p.current.has(
|
|
22407
|
-
T.add(
|
|
22404
|
+
if (S)
|
|
22405
|
+
p.current.add(C);
|
|
22406
|
+
else if (p.current.has(C)) {
|
|
22407
|
+
T.add(C);
|
|
22408
22408
|
const w = L.getAttribute("data-node-type");
|
|
22409
|
-
w === "report-url" ? T.add(`${
|
|
22409
|
+
w === "report-url" ? T.add(`${C}__url`) : w === "markdown-name" && T.add(`${C}__name`);
|
|
22410
22410
|
}
|
|
22411
22411
|
});
|
|
22412
22412
|
const N = e.current.__tempVariableValues;
|
|
22413
|
-
if (
|
|
22413
|
+
if (console.log("[RTE-init] path decision", {
|
|
22414
|
+
hasTempValues: !!N,
|
|
22415
|
+
configJustChanged: g,
|
|
22416
|
+
tempValuesKeys: N ? Object.keys(N) : null
|
|
22417
|
+
}), N ? (b = N, setTimeout(() => {
|
|
22414
22418
|
if (e.current) {
|
|
22415
|
-
const
|
|
22416
|
-
|
|
22419
|
+
const A = e.current;
|
|
22420
|
+
A.__tempVariableValues === N && delete A.__tempVariableValues;
|
|
22417
22421
|
}
|
|
22418
22422
|
}, 100)) : g || (e.current.querySelectorAll('[data-type="variable"]').forEach((M) => {
|
|
22419
22423
|
const k = M.dataset.key;
|
|
@@ -22475,32 +22479,37 @@ function yT(e, t, n, r, a = {}, i, s, o, u, l, d) {
|
|
|
22475
22479
|
x && (b[k] = x);
|
|
22476
22480
|
}
|
|
22477
22481
|
})), l && Object.keys(l).length > 0) {
|
|
22478
|
-
const
|
|
22479
|
-
t.filter((
|
|
22482
|
+
const A = new Set(
|
|
22483
|
+
t.filter((C) => C.type === "upload" && C.key).map((C) => C.key)
|
|
22480
22484
|
), L = {};
|
|
22481
|
-
g || Object.entries(l).forEach(([
|
|
22482
|
-
if (!Array.isArray(
|
|
22483
|
-
let
|
|
22484
|
-
for (let
|
|
22485
|
-
`${
|
|
22486
|
-
let
|
|
22487
|
-
for (let
|
|
22488
|
-
p.current.has(`${
|
|
22489
|
-
if (
|
|
22490
|
-
for (let
|
|
22491
|
-
T.add(`${
|
|
22492
|
-
}), Object.entries(l).forEach(([
|
|
22493
|
-
|
|
22494
|
-
|
|
22495
|
-
}) :
|
|
22496
|
-
})
|
|
22497
|
-
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
|
|
22503
|
-
|
|
22485
|
+
g || Object.entries(l).forEach(([C, S]) => {
|
|
22486
|
+
if (!Array.isArray(S)) return;
|
|
22487
|
+
let w = 0;
|
|
22488
|
+
for (let P = 0; P < S.length; P++)
|
|
22489
|
+
`${C}_${P}` in b && w++;
|
|
22490
|
+
let I = -1;
|
|
22491
|
+
for (let P = 0; P < S.length; P++)
|
|
22492
|
+
p.current.has(`${C}_${P}`) && (I = P);
|
|
22493
|
+
if (I >= w && w < S.length)
|
|
22494
|
+
for (let P = w; P < S.length; P++)
|
|
22495
|
+
T.add(`${C}_${P}`);
|
|
22496
|
+
}), Object.entries(l).forEach(([C, S]) => {
|
|
22497
|
+
A.has(C) || (Array.isArray(S) ? S.forEach((w, I) => {
|
|
22498
|
+
w != null && String(w).trim() !== "" && (L[`${C}_${I}`] = String(w));
|
|
22499
|
+
}) : S != null && String(S).trim() !== "" && (t.find((I) => I.key === C && I.type === "report-url") ? L[`${C}__url`] = String(S) : L[C] = String(S)));
|
|
22500
|
+
}), Object.entries(L).forEach(([C, S]) => {
|
|
22501
|
+
const w = C in b, I = T.has(C), P = y.current[C] !== S;
|
|
22502
|
+
console.log(`[RTE-init] merge key="${C}" action=${I ? "SKIP(cleared)" : w ? P ? "OVERRIDE(changed)" : "SKIP(exists)" : "FILL(empty)"}`, {
|
|
22503
|
+
inVar: w,
|
|
22504
|
+
inCleared: I,
|
|
22505
|
+
keyValueChanged: P,
|
|
22506
|
+
domValue: b[C],
|
|
22507
|
+
nodeValue: S,
|
|
22508
|
+
prevValue: y.current[C]
|
|
22509
|
+
}), !I && (!w || P) && (b[C] = S);
|
|
22510
|
+
}), y.current = L;
|
|
22511
|
+
}
|
|
22512
|
+
if (console.log("[RTE-init] FINAL variableValues", { ...b }), TT(
|
|
22504
22513
|
e,
|
|
22505
22514
|
t,
|
|
22506
22515
|
n,
|
|
@@ -22513,20 +22522,20 @@ function yT(e, t, n, r, a = {}, i, s, o, u, l, d) {
|
|
|
22513
22522
|
), g && (c.current = !1), setTimeout(() => {
|
|
22514
22523
|
Ar(e);
|
|
22515
22524
|
}, 0), i?.current) {
|
|
22516
|
-
const { key:
|
|
22525
|
+
const { key: A, offset: L } = i.current;
|
|
22517
22526
|
setTimeout(() => {
|
|
22518
22527
|
if (!e.current) return;
|
|
22519
|
-
const
|
|
22520
|
-
`[data-type="variable"][data-key="${
|
|
22528
|
+
const C = e.current.querySelector(
|
|
22529
|
+
`[data-type="variable"][data-key="${A}"]`
|
|
22521
22530
|
);
|
|
22522
|
-
if (
|
|
22523
|
-
if (
|
|
22524
|
-
const
|
|
22525
|
-
if (
|
|
22526
|
-
|
|
22531
|
+
if (C) {
|
|
22532
|
+
if (C.dataset.variableRender === "antd-textarea") {
|
|
22533
|
+
const S = C.querySelector("textarea");
|
|
22534
|
+
if (S) {
|
|
22535
|
+
S.focus();
|
|
22527
22536
|
try {
|
|
22528
|
-
const w =
|
|
22529
|
-
|
|
22537
|
+
const w = S.value?.length ?? 0;
|
|
22538
|
+
S.setSelectionRange(Math.min(L, w), Math.min(L, w));
|
|
22530
22539
|
} catch {
|
|
22531
22540
|
}
|
|
22532
22541
|
i.current = null;
|
|
@@ -22534,8 +22543,8 @@ function yT(e, t, n, r, a = {}, i, s, o, u, l, d) {
|
|
|
22534
22543
|
}
|
|
22535
22544
|
}
|
|
22536
22545
|
try {
|
|
22537
|
-
const
|
|
22538
|
-
|
|
22546
|
+
const S = document.createRange(), w = document.createTreeWalker(
|
|
22547
|
+
C,
|
|
22539
22548
|
NodeFilter.SHOW_TEXT,
|
|
22540
22549
|
null
|
|
22541
22550
|
);
|
|
@@ -22549,19 +22558,19 @@ function yT(e, t, n, r, a = {}, i, s, o, u, l, d) {
|
|
|
22549
22558
|
I += x;
|
|
22550
22559
|
}
|
|
22551
22560
|
if (P) {
|
|
22552
|
-
|
|
22561
|
+
S.setStart(P, Math.min(M, P.textContent?.length || 0)), S.collapse(!0);
|
|
22553
22562
|
const k = window.getSelection();
|
|
22554
|
-
k && (k.removeAllRanges(), k.addRange(
|
|
22563
|
+
k && (k.removeAllRanges(), k.addRange(S), C.focus());
|
|
22555
22564
|
} else {
|
|
22556
|
-
|
|
22565
|
+
S.selectNodeContents(C), S.collapse(!1);
|
|
22557
22566
|
const k = window.getSelection();
|
|
22558
|
-
k && (k.removeAllRanges(), k.addRange(
|
|
22567
|
+
k && (k.removeAllRanges(), k.addRange(S), C.focus());
|
|
22559
22568
|
}
|
|
22560
22569
|
} catch {
|
|
22561
|
-
const
|
|
22562
|
-
|
|
22570
|
+
const S = document.createRange();
|
|
22571
|
+
S.selectNodeContents(C), S.collapse(!1);
|
|
22563
22572
|
const w = window.getSelection();
|
|
22564
|
-
w && (w.removeAllRanges(), w.addRange(
|
|
22573
|
+
w && (w.removeAllRanges(), w.addRange(S), C.focus());
|
|
22565
22574
|
}
|
|
22566
22575
|
i.current = null;
|
|
22567
22576
|
}
|
|
@@ -22780,29 +22789,29 @@ function vT(e, t) {
|
|
|
22780
22789
|
const N = T.anchorNode;
|
|
22781
22790
|
if (!N || !e.current.contains(N))
|
|
22782
22791
|
return;
|
|
22783
|
-
let
|
|
22792
|
+
let A = !1, L = !1;
|
|
22784
22793
|
if (N.nodeType === Node.ELEMENT_NODE) {
|
|
22785
|
-
const
|
|
22786
|
-
(
|
|
22794
|
+
const S = N;
|
|
22795
|
+
(S.closest('[data-type="datepicker"]') || S.closest(".rte-datepicker-wrapper") || S.closest(".rte-datepicker-host")) && (A = !0), (S.closest('[data-type="select"]') || S.closest(".rte-select-wrapper") || S.closest(".rte-select-host")) && (L = !0);
|
|
22787
22796
|
} else if (N.parentElement) {
|
|
22788
|
-
const
|
|
22789
|
-
(
|
|
22797
|
+
const S = N.parentElement;
|
|
22798
|
+
(S.closest('[data-type="datepicker"]') || S.closest(".rte-datepicker-wrapper") || S.closest(".rte-datepicker-host")) && (A = !0), (S.closest('[data-type="select"]') || S.closest(".rte-select-wrapper") || S.closest(".rte-select-host")) && (L = !0);
|
|
22790
22799
|
}
|
|
22791
|
-
if (
|
|
22800
|
+
if (A || L)
|
|
22792
22801
|
return;
|
|
22793
|
-
let
|
|
22794
|
-
if (N.nodeType === Node.ELEMENT_NODE ?
|
|
22802
|
+
let C = null;
|
|
22803
|
+
if (N.nodeType === Node.ELEMENT_NODE ? C = N.closest('[data-type="variable"]') : N.nodeType === Node.TEXT_NODE && N.parentElement && (C = N.parentElement.closest('[data-type="variable"]')), !C) {
|
|
22795
22804
|
if (Date.now() - i > 500)
|
|
22796
22805
|
return;
|
|
22797
|
-
const
|
|
22798
|
-
if (
|
|
22806
|
+
const S = e.current.querySelectorAll('[data-type="variable"]');
|
|
22807
|
+
if (S.length > 0) {
|
|
22799
22808
|
let w = null;
|
|
22800
|
-
for (const I of Array.from(
|
|
22809
|
+
for (const I of Array.from(S))
|
|
22801
22810
|
if (I.style.display !== "none") {
|
|
22802
22811
|
w = I;
|
|
22803
22812
|
break;
|
|
22804
22813
|
}
|
|
22805
|
-
if (!w &&
|
|
22814
|
+
if (!w && S.length > 0 && (w = S[0]), w) {
|
|
22806
22815
|
const I = document.createRange();
|
|
22807
22816
|
I.selectNodeContents(w), I.collapse(!1), T.removeAllRanges(), T.addRange(I), w.focus();
|
|
22808
22817
|
} else
|
|
@@ -22841,34 +22850,34 @@ function sl() {
|
|
|
22841
22850
|
return { M: p, y: c, w: d, d: l, D: y, h: u, m: o, s, ms: i, Q: E }[k] || String(k || "").toLowerCase().replace(/s$/, "");
|
|
22842
22851
|
}, u: function(k) {
|
|
22843
22852
|
return k === void 0;
|
|
22844
|
-
} }, N = "en",
|
|
22845
|
-
|
|
22846
|
-
var L = "$isDayjsObject",
|
|
22853
|
+
} }, N = "en", A = {};
|
|
22854
|
+
A[N] = b;
|
|
22855
|
+
var L = "$isDayjsObject", C = function(k) {
|
|
22847
22856
|
return k instanceof P || !(!k || !k[L]);
|
|
22848
|
-
},
|
|
22857
|
+
}, S = function k(x, F, $) {
|
|
22849
22858
|
var H;
|
|
22850
22859
|
if (!x) return N;
|
|
22851
22860
|
if (typeof x == "string") {
|
|
22852
22861
|
var q = x.toLowerCase();
|
|
22853
|
-
|
|
22862
|
+
A[q] && (H = q), F && (A[q] = F, H = q);
|
|
22854
22863
|
var v = x.split("-");
|
|
22855
22864
|
if (!H && v.length > 1) return k(v[0]);
|
|
22856
22865
|
} else {
|
|
22857
22866
|
var G = x.name;
|
|
22858
|
-
|
|
22867
|
+
A[G] = x, H = G;
|
|
22859
22868
|
}
|
|
22860
22869
|
return !$ && H && (N = H), H || !$ && N;
|
|
22861
22870
|
}, w = function(k, x) {
|
|
22862
|
-
if (
|
|
22871
|
+
if (C(k)) return k.clone();
|
|
22863
22872
|
var F = typeof x == "object" ? x : {};
|
|
22864
22873
|
return F.date = k, F.args = arguments, new P(F);
|
|
22865
22874
|
}, I = _;
|
|
22866
|
-
I.l =
|
|
22875
|
+
I.l = S, I.i = C, I.w = function(k, x) {
|
|
22867
22876
|
return w(k, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
|
|
22868
22877
|
};
|
|
22869
22878
|
var P = function() {
|
|
22870
22879
|
function k(F) {
|
|
22871
|
-
this.$L =
|
|
22880
|
+
this.$L = S(F.locale, null, !0), this.parse(F), this.$x = this.$x || F.x || {}, this[L] = !0;
|
|
22872
22881
|
}
|
|
22873
22882
|
var x = k.prototype;
|
|
22874
22883
|
return x.parse = function(F) {
|
|
@@ -23065,10 +23074,10 @@ function sl() {
|
|
|
23065
23074
|
}, x.daysInMonth = function() {
|
|
23066
23075
|
return this.endOf(p).$D;
|
|
23067
23076
|
}, x.$locale = function() {
|
|
23068
|
-
return
|
|
23077
|
+
return A[this.$L];
|
|
23069
23078
|
}, x.locale = function(F, $) {
|
|
23070
23079
|
if (!F) return this.$L;
|
|
23071
|
-
var H = this.clone(), q =
|
|
23080
|
+
var H = this.clone(), q = S(F, $, !0);
|
|
23072
23081
|
return q && (H.$L = q), H;
|
|
23073
23082
|
}, x.clone = function() {
|
|
23074
23083
|
return I.w(this.$d, this);
|
|
@@ -23088,9 +23097,9 @@ function sl() {
|
|
|
23088
23097
|
};
|
|
23089
23098
|
}), w.extend = function(k, x) {
|
|
23090
23099
|
return k.$i || (k(x, P, w), k.$i = !0), w;
|
|
23091
|
-
}, w.locale =
|
|
23100
|
+
}, w.locale = S, w.isDayjs = C, w.unix = function(k) {
|
|
23092
23101
|
return w(1e3 * k);
|
|
23093
|
-
}, w.en =
|
|
23102
|
+
}, w.en = A[N], w.Ls = A, w.p = {}, w;
|
|
23094
23103
|
});
|
|
23095
23104
|
}(cr)), cr.exports;
|
|
23096
23105
|
}
|
|
@@ -23347,10 +23356,10 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23347
23356
|
collapsed: T = !1,
|
|
23348
23357
|
reportAnalyze: _,
|
|
23349
23358
|
markdownAnalyze: N,
|
|
23350
|
-
markdownNameAnalyze:
|
|
23359
|
+
markdownNameAnalyze: A,
|
|
23351
23360
|
onCollapsedChange: L,
|
|
23352
|
-
collapseTransitionMs:
|
|
23353
|
-
debugTooltipSticky:
|
|
23361
|
+
collapseTransitionMs: C = 260,
|
|
23362
|
+
debugTooltipSticky: S = !1,
|
|
23354
23363
|
nodeValues: w,
|
|
23355
23364
|
onFilesChange: I,
|
|
23356
23365
|
showFooterUpload: P = !0,
|
|
@@ -23369,7 +23378,7 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23369
23378
|
const [se, K] = ne(null), [ae, ce] = ne(null), [Ee, Oe] = ne(null), [Be, it] = ne({}), zt = Z(null), Vt = Z(null), { tooltipPortal: Wn, setPopoverVisible: ht } = qb({
|
|
23370
23379
|
config: e,
|
|
23371
23380
|
files: ee,
|
|
23372
|
-
debugTooltipSticky:
|
|
23381
|
+
debugTooltipSticky: S,
|
|
23373
23382
|
videoState: Be
|
|
23374
23383
|
}), { handleFileChange: jn, handleRemoveFile: Xn } = gc({
|
|
23375
23384
|
config: e,
|
|
@@ -23447,7 +23456,7 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23447
23456
|
}), { handleReportUrlBlur: cl, handleMarkdownBlur: dl, handleMarkdownNameBlur: fl } = wc({
|
|
23448
23457
|
reportAnalyze: _,
|
|
23449
23458
|
markdownAnalyze: N,
|
|
23450
|
-
markdownNameAnalyze:
|
|
23459
|
+
markdownNameAnalyze: A,
|
|
23451
23460
|
reportAnalyzeState: $r,
|
|
23452
23461
|
setReportAnalyzeState: Ur,
|
|
23453
23462
|
markdownAnalyzeState: Lt,
|
|
@@ -23561,9 +23570,9 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23561
23570
|
Kn.current(xe, Yt);
|
|
23562
23571
|
}, 100));
|
|
23563
23572
|
}
|
|
23564
|
-
}, [w, e, Kn]), xT(v, Ne, ee, ht,
|
|
23573
|
+
}, [w, e, Kn]), xT(v, Ne, ee, ht, S), CT(v, Ne, ht, c, S), ST(v, Ne, ee, ht, S), AT(v, Ne, ht, S), _T(v, Ne, ee, J, Be, w), yc(v, M, Be, it, [Ne]);
|
|
23565
23574
|
const pl = xc(k, it);
|
|
23566
|
-
Cc(v, Be, ht,
|
|
23575
|
+
Cc(v, Be, ht, S), vT(v, Gt);
|
|
23567
23576
|
const Mi = rc(v), hl = ic(v), Ri = cc(v);
|
|
23568
23577
|
ie(() => {
|
|
23569
23578
|
if (!v.current) return;
|
|
@@ -23574,7 +23583,7 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23574
23583
|
}, [Ne, v]);
|
|
23575
23584
|
const Bi = HT(v), { measureExpandedContentHeight: dn } = Nc({
|
|
23576
23585
|
collapsed: T,
|
|
23577
|
-
collapseTransitionMs:
|
|
23586
|
+
collapseTransitionMs: C,
|
|
23578
23587
|
contentRef: H,
|
|
23579
23588
|
contentBodyRef: q,
|
|
23580
23589
|
editorRef: v,
|
|
@@ -23708,7 +23717,7 @@ const { RangePicker: BT } = Ll, FT = ({ host: e, onChange: t }) => {
|
|
|
23708
23717
|
} : {},
|
|
23709
23718
|
...g ? { "--rte-editor-padding": g } : {},
|
|
23710
23719
|
...b ? { "--rte-footer-padding": b } : {}
|
|
23711
|
-
}, xl = typeof
|
|
23720
|
+
}, xl = typeof C == "number" && Number.isFinite(C) && C >= 0 ? C : 260, Cl = {
|
|
23712
23721
|
overflow: "hidden"
|
|
23713
23722
|
}, Al = ze != null ? `${ze}px` : T ? `${st}px` : `${Math.max(kt, st)}px`, Sl = ze != null || T || Ue ? "hidden" : "auto", _l = ze != null ? "none" : `max-height ${xl}ms cubic-bezier(0.4, 0, 0.2, 1)`;
|
|
23714
23723
|
return /* @__PURE__ */ pe(
|
|
@@ -24234,9 +24243,9 @@ const GT = ({
|
|
|
24234
24243
|
onChange: i,
|
|
24235
24244
|
...s
|
|
24236
24245
|
}) => {
|
|
24237
|
-
const [o, u] = ne(""), [l, d] = ne(0), [p, E] = ne(!1), [c, y] = ne(!1), [h, m] = ne(!1), g = Z(void 0), b = Z(void 0), T = Z(e), _ = Z(l), N = Z(c),
|
|
24246
|
+
const [o, u] = ne(""), [l, d] = ne(0), [p, E] = ne(!1), [c, y] = ne(!1), [h, m] = ne(!1), g = Z(void 0), b = Z(void 0), T = Z(e), _ = Z(l), N = Z(c), A = Z(o);
|
|
24238
24247
|
ie(() => {
|
|
24239
|
-
T.current = e, _.current = l, N.current = c,
|
|
24248
|
+
T.current = e, _.current = l, N.current = c, A.current = o;
|
|
24240
24249
|
});
|
|
24241
24250
|
const L = oe((k, x) => {
|
|
24242
24251
|
let F = 0;
|
|
@@ -24245,17 +24254,17 @@ const GT = ({
|
|
|
24245
24254
|
F < k.length ? (u(k.slice(0, F + 1)), F++, b.current = window.setTimeout($, n)) : (m(!1), x?.());
|
|
24246
24255
|
};
|
|
24247
24256
|
$();
|
|
24248
|
-
}, [n]),
|
|
24249
|
-
let x =
|
|
24257
|
+
}, [n]), C = oe((k) => {
|
|
24258
|
+
let x = A.current.length;
|
|
24250
24259
|
const F = () => {
|
|
24251
|
-
x > 0 ? (u(
|
|
24260
|
+
x > 0 ? (u(A.current.slice(0, x - 1)), x--, b.current = window.setTimeout(F, n / 2)) : k?.();
|
|
24252
24261
|
};
|
|
24253
24262
|
F();
|
|
24254
|
-
}, [n]),
|
|
24263
|
+
}, [n]), S = oe(() => {
|
|
24255
24264
|
if (T.current.length === 0 || N.current) return;
|
|
24256
24265
|
E(!0);
|
|
24257
24266
|
const k = T.current[_.current];
|
|
24258
|
-
|
|
24267
|
+
A.current ? C(() => {
|
|
24259
24268
|
L(k, () => {
|
|
24260
24269
|
g.current = window.setTimeout(() => {
|
|
24261
24270
|
d((x) => (x + 1) % T.current.length), E(!1);
|
|
@@ -24266,12 +24275,12 @@ const GT = ({
|
|
|
24266
24275
|
d((x) => (x + 1) % T.current.length), E(!1);
|
|
24267
24276
|
}, 2e3);
|
|
24268
24277
|
});
|
|
24269
|
-
}, [
|
|
24270
|
-
return ie(() => (r && e.length > 0 && !c &&
|
|
24278
|
+
}, [C, L]);
|
|
24279
|
+
return ie(() => (r && e.length > 0 && !c && S(), () => {
|
|
24271
24280
|
g.current && window.clearTimeout(g.current), b.current && window.clearTimeout(b.current);
|
|
24272
|
-
}), [l, c, r, e.length,
|
|
24273
|
-
!p && r && e.length > 0 && !c &&
|
|
24274
|
-
}, [l, p, r, e.length, c,
|
|
24281
|
+
}), [l, c, r, e.length, S]), ie(() => {
|
|
24282
|
+
!p && r && e.length > 0 && !c && S();
|
|
24283
|
+
}, [l, p, r, e.length, c, S]), /* @__PURE__ */ pe("div", { style: { position: "relative" }, children: [
|
|
24275
24284
|
/* @__PURE__ */ V(
|
|
24276
24285
|
Za,
|
|
24277
24286
|
{
|
|
@@ -24415,7 +24424,7 @@ const YT = ({
|
|
|
24415
24424
|
...c
|
|
24416
24425
|
// 其他原生属性
|
|
24417
24426
|
}) => {
|
|
24418
|
-
const [y, h] = ne(""), [m, g] = ne(0), [b, T] = ne(!1), [_, N] = ne(!1), [
|
|
24427
|
+
const [y, h] = ne(""), [m, g] = ne(0), [b, T] = ne(!1), [_, N] = ne(!1), [A, L] = ne(!1), [C, S] = ne(a || ""), w = Z(void 0), I = Z(void 0), P = Z(e), M = Z(m), k = Z(_), x = Z(y), F = Z(null);
|
|
24419
24428
|
ie(() => {
|
|
24420
24429
|
P.current = e, M.current = m, k.current = _, x.current = y;
|
|
24421
24430
|
});
|
|
@@ -24459,20 +24468,20 @@ const YT = ({
|
|
|
24459
24468
|
N(!1), !a && e.length > 0 && (h(""), g(0)), c.onBlur?.(K);
|
|
24460
24469
|
}, Q = (K) => {
|
|
24461
24470
|
const ae = K.target.value;
|
|
24462
|
-
o && ae.length > o || (i ? i(ae) :
|
|
24471
|
+
o && ae.length > o || (i ? i(ae) : S(ae), c.onChange?.(K));
|
|
24463
24472
|
}, D = () => {
|
|
24464
|
-
const K = i ? a :
|
|
24465
|
-
K.trim() && !d && (s?.(K), i ||
|
|
24473
|
+
const K = i ? a : C;
|
|
24474
|
+
K.trim() && !d && (s?.(K), i || S(""));
|
|
24466
24475
|
}, ee = (K) => {
|
|
24467
24476
|
(K.ctrlKey || K.metaKey) && K.key === "Enter" && (K.preventDefault(), D()), c.onKeyDown?.(K);
|
|
24468
|
-
}, te = i ? a :
|
|
24477
|
+
}, te = i ? a : C, se = d || !te.trim() || (o ? te.length > o : !1);
|
|
24469
24478
|
return /* @__PURE__ */ pe("div", { style: { position: "relative", ...E }, children: [
|
|
24470
24479
|
/* @__PURE__ */ pe("div", { style: { position: "relative" }, children: [
|
|
24471
24480
|
/* @__PURE__ */ V(
|
|
24472
24481
|
"textarea",
|
|
24473
24482
|
{
|
|
24474
24483
|
ref: F,
|
|
24475
|
-
value: i ? a :
|
|
24484
|
+
value: i ? a : C,
|
|
24476
24485
|
onChange: Q,
|
|
24477
24486
|
onFocus: (K) => {
|
|
24478
24487
|
K.target.style.borderColor = "#1890ff", K.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", v(K);
|
|
@@ -24528,7 +24537,7 @@ const YT = ({
|
|
|
24528
24537
|
},
|
|
24529
24538
|
children: [
|
|
24530
24539
|
/* @__PURE__ */ V("span", { children: y }),
|
|
24531
|
-
|
|
24540
|
+
A && /* @__PURE__ */ V(
|
|
24532
24541
|
"span",
|
|
24533
24542
|
{
|
|
24534
24543
|
style: {
|
|
@@ -24705,18 +24714,18 @@ const ul = ({
|
|
|
24705
24714
|
style: y,
|
|
24706
24715
|
...h
|
|
24707
24716
|
}) => {
|
|
24708
|
-
const m = Z(null), [g, b] = ne(!1), [T, _] = ne(!1), [N,
|
|
24717
|
+
const m = Z(null), [g, b] = ne(!1), [T, _] = ne(!1), [N, A] = ne(!1), L = oe(() => {
|
|
24709
24718
|
m.current && (m.current.play(), b(!0), d?.());
|
|
24710
|
-
}, [d]),
|
|
24719
|
+
}, [d]), C = oe(() => {
|
|
24711
24720
|
m.current && (m.current.pause(), b(!1), p?.());
|
|
24712
|
-
}, [p]),
|
|
24713
|
-
$.stopPropagation(), g ?
|
|
24714
|
-
}, [g, L,
|
|
24721
|
+
}, [p]), S = oe(($) => {
|
|
24722
|
+
$.stopPropagation(), g ? C() : L();
|
|
24723
|
+
}, [g, L, C]), w = oe(() => {
|
|
24715
24724
|
_(!0), o && !g && L();
|
|
24716
24725
|
}, [o, g, L]), I = oe(() => {
|
|
24717
|
-
_(!1), o && g &&
|
|
24718
|
-
}, [o, g,
|
|
24719
|
-
|
|
24726
|
+
_(!1), o && g && C();
|
|
24727
|
+
}, [o, g, C]), P = oe(() => {
|
|
24728
|
+
A(!0), l?.();
|
|
24720
24729
|
}, [l]), M = oe(() => {
|
|
24721
24730
|
b(!0), d?.();
|
|
24722
24731
|
}, [d]), k = oe(() => {
|
|
@@ -24765,7 +24774,7 @@ const ul = ({
|
|
|
24765
24774
|
"div",
|
|
24766
24775
|
{
|
|
24767
24776
|
className: `video-play-button ${T ? "hovered" : ""}`,
|
|
24768
|
-
onClick:
|
|
24777
|
+
onClick: S,
|
|
24769
24778
|
children: g ? /* @__PURE__ */ V(zl, { className: "play-icon" }) : /* @__PURE__ */ V(Vl, { className: "play-icon" })
|
|
24770
24779
|
}
|
|
24771
24780
|
),
|
|
@@ -24900,11 +24909,11 @@ const WT = (e) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
24900
24909
|
}, [r, t, a]), c = oe(() => {
|
|
24901
24910
|
if (!u.current) return;
|
|
24902
24911
|
const m = l, g = u.current, T = (g.offsetWidth - n * (m - 1)) / m, _ = new Array(m).fill(0);
|
|
24903
|
-
e.forEach((
|
|
24904
|
-
const
|
|
24905
|
-
if (!
|
|
24912
|
+
e.forEach((A, L) => {
|
|
24913
|
+
const C = A.id || L, S = p.current.get(C);
|
|
24914
|
+
if (!S) return;
|
|
24906
24915
|
const w = Math.min(..._), I = _.indexOf(w), P = I * (T + n), M = _[I];
|
|
24907
|
-
|
|
24916
|
+
S.style.position = "absolute", S.style.left = `${P}px`, S.style.top = `${M}px`, S.style.width = `${T}px`, _[I] += S.offsetHeight + n;
|
|
24908
24917
|
});
|
|
24909
24918
|
const N = Math.max(..._);
|
|
24910
24919
|
g.style.height = `${N}px`;
|
|
@@ -25201,11 +25210,11 @@ const ir = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
25201
25210
|
const T = b + u;
|
|
25202
25211
|
if (T >= a.length) return;
|
|
25203
25212
|
const _ = a[T];
|
|
25204
|
-
let N = _.split(/[\r\n]+/).map((
|
|
25213
|
+
let N = _.split(/[\r\n]+/).map((C) => C.trim()).filter((C) => C !== "");
|
|
25205
25214
|
N.length < d && (N = ey(_));
|
|
25206
|
-
const
|
|
25207
|
-
L[xn("日期")] = g, l.forEach((
|
|
25208
|
-
const w =
|
|
25215
|
+
const A = (C) => N.length === d * 2 ? N[C * 2] ?? "" : N[C] ?? "", L = {};
|
|
25216
|
+
L[xn("日期")] = g, l.forEach((C, S) => {
|
|
25217
|
+
const w = A(S), I = ZT(w), P = xn(C);
|
|
25209
25218
|
L[P] = I;
|
|
25210
25219
|
}), p.push(L);
|
|
25211
25220
|
});
|