@superlc/md-react 0.2.0 → 0.2.1
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/components/mermaid/MermaidBlock.d.ts.map +1 -1
- package/dist/components/mermaid/index.d.ts +1 -1
- package/dist/components/mermaid/index.d.ts.map +1 -1
- package/dist/components/mermaid/types.d.ts +9 -0
- package/dist/components/mermaid/types.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +456 -439
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as C, jsx as e, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { detectColorScheme as
|
|
4
|
-
import { toJsxRuntime as
|
|
5
|
-
async function
|
|
1
|
+
import { jsxs as C, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import q, { useState as E, useCallback as g, useRef as h, useEffect as z, useMemo as _, memo as X, useLayoutEffect as ge } from "react";
|
|
3
|
+
import { detectColorScheme as ve, observeColorScheme as be, downloadAsPng as ye, MermaidRenderer as ke, parseToHast as ne, createStreamingParser as re, OutputRateController as ae } from "@superlc/md-core";
|
|
4
|
+
import { toJsxRuntime as K } from "hast-util-to-jsx-runtime";
|
|
5
|
+
async function we(t) {
|
|
6
6
|
try {
|
|
7
7
|
return await navigator.clipboard.writeText(t), !0;
|
|
8
8
|
} catch {
|
|
9
|
-
return
|
|
9
|
+
return Ce(t);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ce(t) {
|
|
13
13
|
const n = document.createElement("textarea");
|
|
14
14
|
n.value = t, n.style.position = "fixed", n.style.left = "-9999px", document.body.appendChild(n), n.select();
|
|
15
15
|
try {
|
|
@@ -20,102 +20,102 @@ function ge(t) {
|
|
|
20
20
|
document.body.removeChild(n);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const xe = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }) }), Me = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }), Q = ({
|
|
24
24
|
children: t,
|
|
25
25
|
showCopyButton: n = !0,
|
|
26
26
|
onCopy: c,
|
|
27
|
-
className:
|
|
27
|
+
className: i
|
|
28
28
|
}) => {
|
|
29
|
-
const [
|
|
30
|
-
const
|
|
31
|
-
await
|
|
29
|
+
const [r, m] = E(!1), o = g(async () => {
|
|
30
|
+
const a = G(t);
|
|
31
|
+
await we(a) && (m(!0), c == null || c(a), setTimeout(() => m(!1), 2e3));
|
|
32
32
|
}, [t, c]);
|
|
33
|
-
return /* @__PURE__ */ C("div", { className: `md-code-block-wrapper${
|
|
33
|
+
return /* @__PURE__ */ C("div", { className: `md-code-block-wrapper${i ? ` ${i}` : ""}`, children: [
|
|
34
34
|
/* @__PURE__ */ e("pre", { children: t }),
|
|
35
35
|
n && /* @__PURE__ */ e(
|
|
36
36
|
"button",
|
|
37
37
|
{
|
|
38
38
|
type: "button",
|
|
39
|
-
className: `md-copy-button${
|
|
39
|
+
className: `md-copy-button${r ? " md-copy-button--copied" : ""}`,
|
|
40
40
|
onClick: o,
|
|
41
|
-
title:
|
|
42
|
-
"aria-label":
|
|
43
|
-
children:
|
|
41
|
+
title: r ? "已复制" : "复制代码",
|
|
42
|
+
"aria-label": r ? "已复制" : "复制代码",
|
|
43
|
+
children: r ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(xe, {})
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
] });
|
|
47
47
|
};
|
|
48
|
-
function
|
|
49
|
-
return typeof t == "string" ? t : typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(
|
|
48
|
+
function G(t) {
|
|
49
|
+
return typeof t == "string" ? t : typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(G).join("") : q.isValidElement(t) ? G(t.props.children) : "";
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
const
|
|
51
|
+
Q.displayName = "CodeBlock";
|
|
52
|
+
const Ne = {
|
|
53
53
|
min: 0.25,
|
|
54
54
|
max: 4,
|
|
55
55
|
step: 0.25,
|
|
56
56
|
default: 1
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function ce(t = {}) {
|
|
59
59
|
const {
|
|
60
60
|
config: n,
|
|
61
61
|
enableDrag: c = !1,
|
|
62
|
-
enableWheelZoom:
|
|
63
|
-
} = t,
|
|
64
|
-
scale:
|
|
62
|
+
enableWheelZoom: i = !1
|
|
63
|
+
} = t, r = { ...Ne, ...n }, m = h(null), o = h(!1), a = h({ x: 0, y: 0 }), l = h({ x: 0, y: 0 }), [d, p] = E({
|
|
64
|
+
scale: r.default,
|
|
65
65
|
translateX: 0,
|
|
66
66
|
translateY: 0
|
|
67
|
-
}),
|
|
68
|
-
(s) => Math.max(
|
|
69
|
-
[
|
|
70
|
-
),
|
|
71
|
-
|
|
67
|
+
}), u = g(
|
|
68
|
+
(s) => Math.max(r.min, Math.min(r.max, s)),
|
|
69
|
+
[r.min, r.max]
|
|
70
|
+
), y = g(() => {
|
|
71
|
+
p((s) => ({
|
|
72
72
|
...s,
|
|
73
|
-
scale:
|
|
73
|
+
scale: u(s.scale + r.step)
|
|
74
74
|
}));
|
|
75
|
-
}, [
|
|
76
|
-
|
|
75
|
+
}, [u, r.step]), b = g(() => {
|
|
76
|
+
p((s) => ({
|
|
77
77
|
...s,
|
|
78
|
-
scale:
|
|
78
|
+
scale: u(s.scale - r.step)
|
|
79
79
|
}));
|
|
80
|
-
}, [
|
|
81
|
-
|
|
82
|
-
scale:
|
|
80
|
+
}, [u, r.step]), v = g(() => {
|
|
81
|
+
p({
|
|
82
|
+
scale: r.default,
|
|
83
83
|
translateX: 0,
|
|
84
84
|
translateY: 0
|
|
85
85
|
});
|
|
86
|
-
}, [
|
|
86
|
+
}, [r.default]), x = g(
|
|
87
87
|
(s) => {
|
|
88
|
-
|
|
88
|
+
p((w) => ({
|
|
89
89
|
...w,
|
|
90
|
-
scale:
|
|
90
|
+
scale: u(s)
|
|
91
91
|
}));
|
|
92
92
|
},
|
|
93
|
-
[
|
|
94
|
-
),
|
|
93
|
+
[u]
|
|
94
|
+
), T = g(
|
|
95
95
|
(s, w) => {
|
|
96
96
|
const L = s.width / w.width, D = s.height / w.height, F = Math.min(L, D) * 0.95;
|
|
97
|
-
|
|
98
|
-
scale:
|
|
97
|
+
p({
|
|
98
|
+
scale: u(F),
|
|
99
99
|
translateX: 0,
|
|
100
100
|
translateY: 0
|
|
101
101
|
});
|
|
102
102
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
103
|
+
[u]
|
|
104
|
+
), k = g(
|
|
105
105
|
(s) => {
|
|
106
|
-
c && (s.preventDefault(), o.current = !0,
|
|
106
|
+
c && (s.preventDefault(), o.current = !0, a.current = { x: s.clientX, y: s.clientY }, l.current = { x: d.translateX, y: d.translateY });
|
|
107
107
|
},
|
|
108
|
-
[c,
|
|
108
|
+
[c, d.translateX, d.translateY]
|
|
109
109
|
);
|
|
110
110
|
z(() => {
|
|
111
111
|
if (!c) return;
|
|
112
112
|
const s = (L) => {
|
|
113
113
|
if (!o.current) return;
|
|
114
|
-
const D = L.clientX -
|
|
115
|
-
|
|
116
|
-
...
|
|
117
|
-
translateX:
|
|
118
|
-
translateY:
|
|
114
|
+
const D = L.clientX - a.current.x, F = L.clientY - a.current.y;
|
|
115
|
+
p((f) => ({
|
|
116
|
+
...f,
|
|
117
|
+
translateX: l.current.x + D,
|
|
118
|
+
translateY: l.current.y + F
|
|
119
119
|
}));
|
|
120
120
|
}, w = () => {
|
|
121
121
|
o.current = !1;
|
|
@@ -124,116 +124,116 @@ function te(t = {}) {
|
|
|
124
124
|
document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", w);
|
|
125
125
|
};
|
|
126
126
|
}, [c]);
|
|
127
|
-
const
|
|
127
|
+
const R = g(
|
|
128
128
|
(s) => {
|
|
129
|
-
if (!
|
|
129
|
+
if (!i) return;
|
|
130
130
|
s.preventDefault();
|
|
131
|
-
const w = s.deltaY > 0 ? -
|
|
132
|
-
|
|
131
|
+
const w = s.deltaY > 0 ? -r.step : r.step;
|
|
132
|
+
p((L) => ({
|
|
133
133
|
...L,
|
|
134
|
-
scale:
|
|
134
|
+
scale: u(L.scale + w)
|
|
135
135
|
}));
|
|
136
136
|
},
|
|
137
|
-
[
|
|
138
|
-
),
|
|
139
|
-
|
|
140
|
-
}, [
|
|
141
|
-
transform: `translate(${
|
|
137
|
+
[i, r.step, u]
|
|
138
|
+
), N = g(() => {
|
|
139
|
+
v();
|
|
140
|
+
}, [v]), S = {
|
|
141
|
+
transform: `translate(${d.translateX}px, ${d.translateY}px) scale(${d.scale})`,
|
|
142
142
|
transformOrigin: "center center",
|
|
143
143
|
transition: o.current ? "none" : "transform 0.2s ease-out",
|
|
144
144
|
cursor: c ? o.current ? "grabbing" : "grab" : "default"
|
|
145
145
|
};
|
|
146
146
|
return {
|
|
147
|
-
state:
|
|
148
|
-
zoomIn:
|
|
149
|
-
zoomOut:
|
|
150
|
-
reset:
|
|
151
|
-
fitToContainer:
|
|
147
|
+
state: d,
|
|
148
|
+
zoomIn: y,
|
|
149
|
+
zoomOut: b,
|
|
150
|
+
reset: v,
|
|
151
|
+
fitToContainer: T,
|
|
152
152
|
setScale: x,
|
|
153
|
-
canZoomIn:
|
|
154
|
-
canZoomOut:
|
|
155
|
-
containerRef:
|
|
156
|
-
contentStyle:
|
|
153
|
+
canZoomIn: d.scale < r.max,
|
|
154
|
+
canZoomOut: d.scale > r.min,
|
|
155
|
+
containerRef: m,
|
|
156
|
+
contentStyle: S,
|
|
157
157
|
handlers: {
|
|
158
|
-
onMouseDown:
|
|
159
|
-
onWheel:
|
|
160
|
-
onDoubleClick:
|
|
158
|
+
onMouseDown: k,
|
|
159
|
+
onWheel: R,
|
|
160
|
+
onDoubleClick: N
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const Se = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }) }), ze = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }) }), oe = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm.5-7H9v2H7v1h2v2h1v-2h2V9h-2V7z" }) }), se = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7V9z" }) }), le = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z" }) }), Le = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" }) }), Be = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z" }) }), ie = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" }) }), Re = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }), Ie = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }) }), Ee = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }), ue = ({
|
|
165
165
|
svg: t,
|
|
166
166
|
open: n,
|
|
167
167
|
onClose: c,
|
|
168
|
-
onDownload:
|
|
168
|
+
onDownload: i
|
|
169
169
|
}) => {
|
|
170
|
-
const
|
|
171
|
-
state:
|
|
172
|
-
zoomIn:
|
|
173
|
-
zoomOut:
|
|
174
|
-
reset:
|
|
175
|
-
fitToContainer:
|
|
176
|
-
canZoomIn:
|
|
170
|
+
const r = h(null), m = h(null), o = h(null), [a, l] = E(!1), {
|
|
171
|
+
state: d,
|
|
172
|
+
zoomIn: p,
|
|
173
|
+
zoomOut: u,
|
|
174
|
+
reset: y,
|
|
175
|
+
fitToContainer: b,
|
|
176
|
+
canZoomIn: v,
|
|
177
177
|
canZoomOut: x,
|
|
178
|
-
contentStyle:
|
|
179
|
-
handlers:
|
|
180
|
-
} =
|
|
178
|
+
contentStyle: T,
|
|
179
|
+
handlers: k
|
|
180
|
+
} = ce({
|
|
181
181
|
enableDrag: !0,
|
|
182
182
|
enableWheelZoom: !0
|
|
183
|
-
}),
|
|
184
|
-
if (
|
|
183
|
+
}), R = g(async () => {
|
|
184
|
+
if (r.current)
|
|
185
185
|
try {
|
|
186
|
-
await
|
|
186
|
+
await r.current.requestFullscreen(), l(!0);
|
|
187
187
|
} catch {
|
|
188
|
-
|
|
188
|
+
l(!0);
|
|
189
189
|
}
|
|
190
|
-
}, []),
|
|
190
|
+
}, []), N = g(() => {
|
|
191
191
|
document.fullscreenElement && document.exitFullscreen().catch(() => {
|
|
192
|
-
}),
|
|
192
|
+
}), l(!1), c();
|
|
193
193
|
}, [c]);
|
|
194
194
|
z(() => {
|
|
195
|
-
n ?
|
|
196
|
-
}, [n,
|
|
195
|
+
n ? R() : a && N();
|
|
196
|
+
}, [n, R, N, a]), z(() => {
|
|
197
197
|
const s = () => {
|
|
198
|
-
!document.fullscreenElement &&
|
|
198
|
+
!document.fullscreenElement && a && (l(!1), c());
|
|
199
199
|
};
|
|
200
200
|
return document.addEventListener("fullscreenchange", s), () => document.removeEventListener("fullscreenchange", s);
|
|
201
|
-
}, [
|
|
202
|
-
if (!
|
|
201
|
+
}, [a, c]), z(() => {
|
|
202
|
+
if (!a) return;
|
|
203
203
|
const s = (w) => {
|
|
204
204
|
switch (w.key) {
|
|
205
205
|
case "+":
|
|
206
206
|
case "=":
|
|
207
|
-
|
|
207
|
+
p();
|
|
208
208
|
break;
|
|
209
209
|
case "-":
|
|
210
|
-
|
|
210
|
+
u();
|
|
211
211
|
break;
|
|
212
212
|
case "0":
|
|
213
|
-
|
|
213
|
+
y();
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
218
|
-
}, [
|
|
219
|
-
const
|
|
220
|
-
if (!
|
|
221
|
-
const s =
|
|
218
|
+
}, [a, p, u, y]);
|
|
219
|
+
const S = g(() => {
|
|
220
|
+
if (!m.current || !o.current) return;
|
|
221
|
+
const s = m.current.getBoundingClientRect(), w = o.current.querySelector("svg");
|
|
222
222
|
if (w) {
|
|
223
223
|
const L = w.getBoundingClientRect();
|
|
224
|
-
|
|
224
|
+
b(s, L);
|
|
225
225
|
}
|
|
226
|
-
}, [
|
|
226
|
+
}, [b]);
|
|
227
227
|
return /* @__PURE__ */ e(
|
|
228
228
|
"div",
|
|
229
229
|
{
|
|
230
|
-
ref:
|
|
231
|
-
className: `md-mermaid-fullscreen-wrapper${
|
|
230
|
+
ref: r,
|
|
231
|
+
className: `md-mermaid-fullscreen-wrapper${a ? " md-mermaid-fullscreen-wrapper--active" : ""}`,
|
|
232
232
|
role: "dialog",
|
|
233
233
|
"aria-modal": "true",
|
|
234
234
|
"aria-label": "Mermaid 图表全屏预览",
|
|
235
|
-
"aria-hidden": !
|
|
236
|
-
children:
|
|
235
|
+
"aria-hidden": !a,
|
|
236
|
+
children: a && /* @__PURE__ */ C($, { children: [
|
|
237
237
|
/* @__PURE__ */ C("div", { className: "md-mermaid-fullscreen-toolbar", children: [
|
|
238
238
|
/* @__PURE__ */ C("div", { className: "md-mermaid-toolbar-group", children: [
|
|
239
239
|
/* @__PURE__ */ e(
|
|
@@ -241,15 +241,15 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
241
241
|
{
|
|
242
242
|
type: "button",
|
|
243
243
|
className: "md-mermaid-toolbar-btn",
|
|
244
|
-
onClick:
|
|
244
|
+
onClick: u,
|
|
245
245
|
disabled: !x,
|
|
246
246
|
title: "缩小 (-)",
|
|
247
247
|
"aria-label": "缩小",
|
|
248
|
-
children: /* @__PURE__ */ e(
|
|
248
|
+
children: /* @__PURE__ */ e(se, {})
|
|
249
249
|
}
|
|
250
250
|
),
|
|
251
251
|
/* @__PURE__ */ C("span", { className: "md-mermaid-zoom-label", children: [
|
|
252
|
-
Math.round(
|
|
252
|
+
Math.round(d.scale * 100),
|
|
253
253
|
"%"
|
|
254
254
|
] }),
|
|
255
255
|
/* @__PURE__ */ e(
|
|
@@ -257,11 +257,11 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
257
257
|
{
|
|
258
258
|
type: "button",
|
|
259
259
|
className: "md-mermaid-toolbar-btn",
|
|
260
|
-
onClick:
|
|
261
|
-
disabled: !
|
|
260
|
+
onClick: p,
|
|
261
|
+
disabled: !v,
|
|
262
262
|
title: "放大 (+)",
|
|
263
263
|
"aria-label": "放大",
|
|
264
|
-
children: /* @__PURE__ */ e(
|
|
264
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
265
265
|
}
|
|
266
266
|
),
|
|
267
267
|
/* @__PURE__ */ e("span", { className: "md-mermaid-toolbar-divider" }),
|
|
@@ -270,10 +270,10 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
270
270
|
{
|
|
271
271
|
type: "button",
|
|
272
272
|
className: "md-mermaid-toolbar-btn",
|
|
273
|
-
onClick:
|
|
273
|
+
onClick: y,
|
|
274
274
|
title: "重置 (0)",
|
|
275
275
|
"aria-label": "重置",
|
|
276
|
-
children: /* @__PURE__ */ e(
|
|
276
|
+
children: /* @__PURE__ */ e(le, {})
|
|
277
277
|
}
|
|
278
278
|
),
|
|
279
279
|
/* @__PURE__ */ e(
|
|
@@ -281,23 +281,23 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
281
281
|
{
|
|
282
282
|
type: "button",
|
|
283
283
|
className: "md-mermaid-toolbar-btn",
|
|
284
|
-
onClick:
|
|
284
|
+
onClick: S,
|
|
285
285
|
title: "适应窗口",
|
|
286
286
|
"aria-label": "适应窗口",
|
|
287
|
-
children: /* @__PURE__ */ e(
|
|
287
|
+
children: /* @__PURE__ */ e(Be, {})
|
|
288
288
|
}
|
|
289
289
|
)
|
|
290
290
|
] }),
|
|
291
291
|
/* @__PURE__ */ C("div", { className: "md-mermaid-toolbar-group", children: [
|
|
292
|
-
|
|
292
|
+
i && /* @__PURE__ */ e(
|
|
293
293
|
"button",
|
|
294
294
|
{
|
|
295
295
|
type: "button",
|
|
296
296
|
className: "md-mermaid-toolbar-btn",
|
|
297
|
-
onClick:
|
|
297
|
+
onClick: i,
|
|
298
298
|
title: "下载 PNG",
|
|
299
299
|
"aria-label": "下载",
|
|
300
|
-
children: /* @__PURE__ */ e(
|
|
300
|
+
children: /* @__PURE__ */ e(ie, {})
|
|
301
301
|
}
|
|
302
302
|
),
|
|
303
303
|
/* @__PURE__ */ e(
|
|
@@ -305,10 +305,10 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
305
305
|
{
|
|
306
306
|
type: "button",
|
|
307
307
|
className: "md-mermaid-toolbar-btn",
|
|
308
|
-
onClick:
|
|
308
|
+
onClick: N,
|
|
309
309
|
title: "退出全屏 (Esc)",
|
|
310
310
|
"aria-label": "退出全屏",
|
|
311
|
-
children: /* @__PURE__ */ e(
|
|
311
|
+
children: /* @__PURE__ */ e(Re, {})
|
|
312
312
|
}
|
|
313
313
|
)
|
|
314
314
|
] })
|
|
@@ -316,17 +316,17 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
316
316
|
/* @__PURE__ */ e(
|
|
317
317
|
"div",
|
|
318
318
|
{
|
|
319
|
-
ref:
|
|
319
|
+
ref: m,
|
|
320
320
|
className: "md-mermaid-fullscreen-content",
|
|
321
|
-
onWheel:
|
|
321
|
+
onWheel: k.onWheel,
|
|
322
322
|
children: /* @__PURE__ */ e(
|
|
323
323
|
"div",
|
|
324
324
|
{
|
|
325
325
|
ref: o,
|
|
326
326
|
className: "md-mermaid-fullscreen-svg",
|
|
327
|
-
style:
|
|
328
|
-
onMouseDown:
|
|
329
|
-
onDoubleClick:
|
|
327
|
+
style: T,
|
|
328
|
+
onMouseDown: k.onMouseDown,
|
|
329
|
+
onDoubleClick: k.onDoubleClick,
|
|
330
330
|
dangerouslySetInnerHTML: { __html: t }
|
|
331
331
|
}
|
|
332
332
|
)
|
|
@@ -336,12 +336,13 @@ const Ce = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "current
|
|
|
336
336
|
}
|
|
337
337
|
);
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
339
|
+
ue.displayName = "MermaidFullscreenViewer";
|
|
340
|
+
const Te = 150;
|
|
341
|
+
let U = null;
|
|
342
|
+
function Ve(t = "auto") {
|
|
343
|
+
return U ? U.setTheme(t ?? "auto") : U = new ke({ theme: t }), U;
|
|
343
344
|
}
|
|
344
|
-
async function
|
|
345
|
+
async function De(t) {
|
|
345
346
|
try {
|
|
346
347
|
return await navigator.clipboard.writeText(t), !0;
|
|
347
348
|
} catch {
|
|
@@ -356,97 +357,113 @@ async function Ee(t) {
|
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
|
-
const
|
|
360
|
+
const de = ({
|
|
360
361
|
code: t,
|
|
361
362
|
theme: n = "auto",
|
|
362
363
|
showToolbar: c = !0,
|
|
363
|
-
onCopy:
|
|
364
|
-
className:
|
|
364
|
+
onCopy: i,
|
|
365
|
+
className: r,
|
|
366
|
+
streamStatus: m = "done"
|
|
365
367
|
}) => {
|
|
366
|
-
const [
|
|
367
|
-
state:
|
|
368
|
-
zoomIn:
|
|
369
|
-
zoomOut:
|
|
370
|
-
reset:
|
|
371
|
-
canZoomIn:
|
|
372
|
-
canZoomOut:
|
|
373
|
-
contentStyle:
|
|
374
|
-
} =
|
|
368
|
+
const [o, a] = E("preview"), [l, d] = E(null), [p, u] = E(!0), [y, b] = E(!1), [v, x] = E(!1), T = h(null), [k, R] = E(() => ve()), N = h(null), S = h(null), {
|
|
369
|
+
state: s,
|
|
370
|
+
zoomIn: w,
|
|
371
|
+
zoomOut: L,
|
|
372
|
+
reset: D,
|
|
373
|
+
canZoomIn: F,
|
|
374
|
+
canZoomOut: f,
|
|
375
|
+
contentStyle: M
|
|
376
|
+
} = ce();
|
|
375
377
|
z(() => {
|
|
376
378
|
if (n === "auto")
|
|
377
|
-
return
|
|
378
|
-
|
|
379
|
+
return be((V) => {
|
|
380
|
+
R(V);
|
|
379
381
|
});
|
|
380
|
-
}, [n])
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
382
|
+
}, [n]);
|
|
383
|
+
const I = h(t), H = h(m);
|
|
384
|
+
I.current = t, H.current = m, z(() => {
|
|
385
|
+
const V = async (Y) => {
|
|
386
|
+
console.log("[MermaidBlock] doRender start", { codeLength: Y.length });
|
|
387
|
+
const O = await Ve(n).render(Y), ee = H.current;
|
|
388
|
+
console.log("[MermaidBlock] render result", {
|
|
389
|
+
success: O.success,
|
|
390
|
+
hasSvg: !!O.svg,
|
|
391
|
+
error: O.error,
|
|
392
|
+
currentStreamStatus: ee
|
|
393
|
+
}), O.success && O.svg ? (N.current = O.svg, d(O), u(!1), a("preview"), console.log("[MermaidBlock] render success, cached SVG")) : ee === "loading" ? N.current ? (d({
|
|
394
|
+
success: !0,
|
|
395
|
+
svg: N.current
|
|
396
|
+
}), u(!1), console.log("[MermaidBlock] render failed, using cache")) : console.log("[MermaidBlock] render failed, no cache, keep loading") : (d(O), u(!1), a("code"), console.log("[MermaidBlock] render failed, showing error"));
|
|
388
397
|
};
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
398
|
+
console.log("[MermaidBlock] useEffect triggered", {
|
|
399
|
+
streamStatus: m,
|
|
400
|
+
codeLength: t.length,
|
|
401
|
+
hasTimer: !!S.current,
|
|
402
|
+
hasCache: !!N.current
|
|
403
|
+
}), m === "loading" ? S.current ? console.log("[MermaidBlock] timer already exists, skipping") : (N.current || u(!0), console.log("[MermaidBlock] setting timer"), S.current = setTimeout(() => {
|
|
404
|
+
console.log("[MermaidBlock] timer fired, rendering with latest code"), S.current = null, V(I.current);
|
|
405
|
+
}, Te)) : (console.log("[MermaidBlock] immediate render (not loading)"), S.current && (clearTimeout(S.current), S.current = null), u(!0), V(t));
|
|
406
|
+
}, [t, n, k, m]);
|
|
407
|
+
const Z = g(async () => {
|
|
408
|
+
await De(t) && (x(!0), i == null || i(t), setTimeout(() => x(!1), 2e3));
|
|
409
|
+
}, [t, i]), B = g(async () => {
|
|
410
|
+
var V;
|
|
411
|
+
if (l != null && l.svg)
|
|
395
412
|
try {
|
|
396
|
-
const
|
|
397
|
-
await
|
|
398
|
-
backgroundColor:
|
|
413
|
+
const Y = ((V = window.matchMedia) == null ? void 0 : V.call(window, "(prefers-color-scheme: dark)").matches) ?? !1;
|
|
414
|
+
await ye(l.svg, {
|
|
415
|
+
backgroundColor: Y ? "#1a1a2e" : "#ffffff",
|
|
399
416
|
padding: 20,
|
|
400
417
|
scale: 2
|
|
401
418
|
});
|
|
402
|
-
} catch (
|
|
403
|
-
console.error("Download failed:",
|
|
419
|
+
} catch (Y) {
|
|
420
|
+
console.error("Download failed:", Y);
|
|
404
421
|
}
|
|
405
|
-
}, [
|
|
406
|
-
|
|
407
|
-
}, []),
|
|
408
|
-
return /* @__PURE__ */ C("div", { className: `md-mermaid-block${
|
|
422
|
+
}, [l]), P = g(() => {
|
|
423
|
+
b((V) => !V);
|
|
424
|
+
}, []), A = (l == null ? void 0 : l.success) && l.svg;
|
|
425
|
+
return /* @__PURE__ */ C("div", { className: `md-mermaid-block${r ? ` ${r}` : ""}`, children: [
|
|
409
426
|
c && /* @__PURE__ */ C("div", { className: "md-mermaid-toolbar", children: [
|
|
410
427
|
/* @__PURE__ */ C("div", { className: "md-mermaid-toolbar-group md-mermaid-mode-switch", children: [
|
|
411
428
|
/* @__PURE__ */ e(
|
|
412
429
|
"button",
|
|
413
430
|
{
|
|
414
431
|
type: "button",
|
|
415
|
-
className: `md-mermaid-toolbar-btn${
|
|
416
|
-
onClick: () =>
|
|
417
|
-
disabled: !
|
|
432
|
+
className: `md-mermaid-toolbar-btn${o === "preview" ? " md-mermaid-toolbar-btn--active" : ""}`,
|
|
433
|
+
onClick: () => a("preview"),
|
|
434
|
+
disabled: !A,
|
|
418
435
|
title: "图片模式",
|
|
419
436
|
"aria-label": "图片模式",
|
|
420
|
-
children: /* @__PURE__ */ e(
|
|
437
|
+
children: /* @__PURE__ */ e(Se, {})
|
|
421
438
|
}
|
|
422
439
|
),
|
|
423
440
|
/* @__PURE__ */ e(
|
|
424
441
|
"button",
|
|
425
442
|
{
|
|
426
443
|
type: "button",
|
|
427
|
-
className: `md-mermaid-toolbar-btn${
|
|
428
|
-
onClick: () =>
|
|
444
|
+
className: `md-mermaid-toolbar-btn${o === "code" ? " md-mermaid-toolbar-btn--active" : ""}`,
|
|
445
|
+
onClick: () => a("code"),
|
|
429
446
|
title: "代码模式",
|
|
430
447
|
"aria-label": "代码模式",
|
|
431
|
-
children: /* @__PURE__ */ e(
|
|
448
|
+
children: /* @__PURE__ */ e(ze, {})
|
|
432
449
|
}
|
|
433
450
|
)
|
|
434
451
|
] }),
|
|
435
|
-
|
|
452
|
+
o === "preview" && A && /* @__PURE__ */ C("div", { className: "md-mermaid-toolbar-group", children: [
|
|
436
453
|
/* @__PURE__ */ e(
|
|
437
454
|
"button",
|
|
438
455
|
{
|
|
439
456
|
type: "button",
|
|
440
457
|
className: "md-mermaid-toolbar-btn",
|
|
441
|
-
onClick:
|
|
442
|
-
disabled: !
|
|
458
|
+
onClick: L,
|
|
459
|
+
disabled: !f,
|
|
443
460
|
title: "缩小",
|
|
444
461
|
"aria-label": "缩小",
|
|
445
|
-
children: /* @__PURE__ */ e(
|
|
462
|
+
children: /* @__PURE__ */ e(se, {})
|
|
446
463
|
}
|
|
447
464
|
),
|
|
448
465
|
/* @__PURE__ */ C("span", { className: "md-mermaid-zoom-label", children: [
|
|
449
|
-
Math.round(
|
|
466
|
+
Math.round(s.scale * 100),
|
|
450
467
|
"%"
|
|
451
468
|
] }),
|
|
452
469
|
/* @__PURE__ */ e(
|
|
@@ -454,11 +471,11 @@ const oe = ({
|
|
|
454
471
|
{
|
|
455
472
|
type: "button",
|
|
456
473
|
className: "md-mermaid-toolbar-btn",
|
|
457
|
-
onClick:
|
|
458
|
-
disabled: !
|
|
474
|
+
onClick: w,
|
|
475
|
+
disabled: !F,
|
|
459
476
|
title: "放大",
|
|
460
477
|
"aria-label": "放大",
|
|
461
|
-
children: /* @__PURE__ */ e(
|
|
478
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
462
479
|
}
|
|
463
480
|
),
|
|
464
481
|
/* @__PURE__ */ e(
|
|
@@ -466,24 +483,24 @@ const oe = ({
|
|
|
466
483
|
{
|
|
467
484
|
type: "button",
|
|
468
485
|
className: "md-mermaid-toolbar-btn",
|
|
469
|
-
onClick:
|
|
486
|
+
onClick: D,
|
|
470
487
|
title: "重置",
|
|
471
488
|
"aria-label": "重置缩放",
|
|
472
|
-
children: /* @__PURE__ */ e(
|
|
489
|
+
children: /* @__PURE__ */ e(le, {})
|
|
473
490
|
}
|
|
474
491
|
)
|
|
475
492
|
] }),
|
|
476
493
|
/* @__PURE__ */ C("div", { className: "md-mermaid-toolbar-group", children: [
|
|
477
|
-
|
|
494
|
+
o === "preview" && A && /* @__PURE__ */ C($, { children: [
|
|
478
495
|
/* @__PURE__ */ e(
|
|
479
496
|
"button",
|
|
480
497
|
{
|
|
481
498
|
type: "button",
|
|
482
499
|
className: "md-mermaid-toolbar-btn",
|
|
483
|
-
onClick:
|
|
500
|
+
onClick: P,
|
|
484
501
|
title: "全屏",
|
|
485
502
|
"aria-label": "全屏查看",
|
|
486
|
-
children: /* @__PURE__ */ e(
|
|
503
|
+
children: /* @__PURE__ */ e(Le, {})
|
|
487
504
|
}
|
|
488
505
|
),
|
|
489
506
|
/* @__PURE__ */ e(
|
|
@@ -491,134 +508,134 @@ const oe = ({
|
|
|
491
508
|
{
|
|
492
509
|
type: "button",
|
|
493
510
|
className: "md-mermaid-toolbar-btn",
|
|
494
|
-
onClick:
|
|
511
|
+
onClick: B,
|
|
495
512
|
title: "下载 PNG",
|
|
496
513
|
"aria-label": "下载",
|
|
497
|
-
children: /* @__PURE__ */ e(
|
|
514
|
+
children: /* @__PURE__ */ e(ie, {})
|
|
498
515
|
}
|
|
499
516
|
)
|
|
500
517
|
] }),
|
|
501
|
-
|
|
518
|
+
o === "code" && /* @__PURE__ */ e(
|
|
502
519
|
"button",
|
|
503
520
|
{
|
|
504
521
|
type: "button",
|
|
505
|
-
className: `md-mermaid-toolbar-btn${
|
|
506
|
-
onClick:
|
|
507
|
-
title:
|
|
508
|
-
"aria-label":
|
|
509
|
-
children:
|
|
522
|
+
className: `md-mermaid-toolbar-btn${v ? " md-mermaid-toolbar-btn--success" : ""}`,
|
|
523
|
+
onClick: Z,
|
|
524
|
+
title: v ? "已复制" : "复制代码",
|
|
525
|
+
"aria-label": v ? "已复制" : "复制代码",
|
|
526
|
+
children: v ? /* @__PURE__ */ e(Ee, {}) : /* @__PURE__ */ e(Ie, {})
|
|
510
527
|
}
|
|
511
528
|
)
|
|
512
529
|
] })
|
|
513
530
|
] }),
|
|
514
|
-
/* @__PURE__ */ e("div", { className: "md-mermaid-content", ref:
|
|
531
|
+
/* @__PURE__ */ e("div", { className: "md-mermaid-content", ref: T, children: p ? (
|
|
515
532
|
// Loading 骨架屏
|
|
516
533
|
/* @__PURE__ */ e("div", { className: "md-mermaid-skeleton", children: /* @__PURE__ */ e("div", { className: "md-mermaid-skeleton-box" }) })
|
|
517
|
-
) :
|
|
534
|
+
) : o === "preview" && A && (l != null && l.svg) ? (
|
|
518
535
|
// 图片模式
|
|
519
536
|
/* @__PURE__ */ e("div", { className: "md-mermaid-preview", style: { overflow: "hidden" }, children: /* @__PURE__ */ e(
|
|
520
537
|
"div",
|
|
521
538
|
{
|
|
522
539
|
className: "md-mermaid-svg-container",
|
|
523
|
-
style:
|
|
524
|
-
dangerouslySetInnerHTML: { __html:
|
|
540
|
+
style: M,
|
|
541
|
+
dangerouslySetInnerHTML: { __html: l.svg }
|
|
525
542
|
}
|
|
526
543
|
) })
|
|
527
544
|
) : (
|
|
528
545
|
// 代码模式
|
|
529
546
|
/* @__PURE__ */ C("div", { className: "md-mermaid-code", children: [
|
|
530
547
|
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: "language-mermaid", children: t }) }),
|
|
531
|
-
|
|
548
|
+
l && !l.success && m === "done" && /* @__PURE__ */ C("div", { className: "md-mermaid-error", children: [
|
|
532
549
|
/* @__PURE__ */ e("span", { children: "渲染失败: " }),
|
|
533
|
-
/* @__PURE__ */ e("span", { children:
|
|
550
|
+
/* @__PURE__ */ e("span", { children: l.error })
|
|
534
551
|
] })
|
|
535
552
|
] })
|
|
536
553
|
) }),
|
|
537
|
-
|
|
538
|
-
|
|
554
|
+
A && (l == null ? void 0 : l.svg) && /* @__PURE__ */ e(
|
|
555
|
+
ue,
|
|
539
556
|
{
|
|
540
|
-
svg:
|
|
541
|
-
open:
|
|
542
|
-
onClose: () =>
|
|
543
|
-
onDownload:
|
|
557
|
+
svg: l.svg,
|
|
558
|
+
open: y,
|
|
559
|
+
onClose: () => b(!1),
|
|
560
|
+
onDownload: B
|
|
544
561
|
}
|
|
545
562
|
)
|
|
546
563
|
] });
|
|
547
564
|
};
|
|
548
|
-
|
|
549
|
-
function
|
|
565
|
+
de.displayName = "MermaidBlock";
|
|
566
|
+
function Fe(t) {
|
|
550
567
|
const n = t.children;
|
|
551
|
-
if (!
|
|
552
|
-
const c = n.props,
|
|
553
|
-
return typeof
|
|
568
|
+
if (!q.isValidElement(n)) return !1;
|
|
569
|
+
const c = n.props, i = c == null ? void 0 : c.className;
|
|
570
|
+
return typeof i == "string" ? i.includes("language-mermaid") : !1;
|
|
554
571
|
}
|
|
555
|
-
function
|
|
556
|
-
if (!
|
|
572
|
+
function He(t) {
|
|
573
|
+
if (!q.isValidElement(t)) return "";
|
|
557
574
|
const n = t.props, c = n == null ? void 0 : n.children;
|
|
558
|
-
return typeof c == "string" ? c : Array.isArray(c) ? c.map((
|
|
575
|
+
return typeof c == "string" ? c : Array.isArray(c) ? c.map((i) => typeof i == "string" ? i : "").join("") : "";
|
|
559
576
|
}
|
|
560
|
-
function
|
|
577
|
+
function Ae(t) {
|
|
561
578
|
return t ? t === !0 ? { enabled: !0 } : t.enabled !== !1 ? t : null : null;
|
|
562
579
|
}
|
|
563
|
-
const
|
|
580
|
+
const $e = ({
|
|
564
581
|
children: t,
|
|
565
582
|
components: n,
|
|
566
583
|
className: c,
|
|
567
|
-
copyButton:
|
|
568
|
-
onCodeCopy:
|
|
569
|
-
mermaid:
|
|
584
|
+
copyButton: i = !0,
|
|
585
|
+
onCodeCopy: r,
|
|
586
|
+
mermaid: m,
|
|
570
587
|
...o
|
|
571
588
|
}) => {
|
|
572
|
-
const
|
|
589
|
+
const a = Ae(m), l = _(() => {
|
|
573
590
|
if (!t) return null;
|
|
574
|
-
const
|
|
575
|
-
pre: (
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
591
|
+
const d = ne(t, o), u = {
|
|
592
|
+
pre: (y) => {
|
|
593
|
+
if (a && Fe(y)) {
|
|
594
|
+
const b = He(y.children);
|
|
578
595
|
return /* @__PURE__ */ e(
|
|
579
|
-
|
|
596
|
+
de,
|
|
580
597
|
{
|
|
581
|
-
code:
|
|
582
|
-
theme:
|
|
583
|
-
onCopy:
|
|
598
|
+
code: b,
|
|
599
|
+
theme: a.theme,
|
|
600
|
+
onCopy: r
|
|
584
601
|
}
|
|
585
602
|
);
|
|
586
603
|
}
|
|
587
|
-
return
|
|
604
|
+
return i ? /* @__PURE__ */ e(Q, { showCopyButton: i, onCopy: r, ...y }) : /* @__PURE__ */ e("pre", { ...y });
|
|
588
605
|
},
|
|
589
606
|
...n
|
|
590
607
|
};
|
|
591
|
-
return
|
|
592
|
-
Fragment:
|
|
608
|
+
return K(d, {
|
|
609
|
+
Fragment: $,
|
|
593
610
|
jsx: e,
|
|
594
611
|
jsxs: C,
|
|
595
|
-
components:
|
|
612
|
+
components: u
|
|
596
613
|
});
|
|
597
|
-
}, [t, n,
|
|
598
|
-
return /* @__PURE__ */ e("div", { className: c, children:
|
|
614
|
+
}, [t, n, i, r, a, o]);
|
|
615
|
+
return /* @__PURE__ */ e("div", { className: c, children: l });
|
|
599
616
|
};
|
|
600
|
-
|
|
601
|
-
function
|
|
602
|
-
const { components: c = {}, ...
|
|
603
|
-
return
|
|
617
|
+
$e.displayName = "Markdown";
|
|
618
|
+
function Je(t, n = {}) {
|
|
619
|
+
const { components: c = {}, ...i } = n;
|
|
620
|
+
return _(() => {
|
|
604
621
|
if (!t) return null;
|
|
605
|
-
const
|
|
606
|
-
return
|
|
607
|
-
Fragment:
|
|
622
|
+
const r = ne(t, i);
|
|
623
|
+
return K(r, {
|
|
624
|
+
Fragment: $,
|
|
608
625
|
jsx: e,
|
|
609
626
|
jsxs: C,
|
|
610
627
|
components: c
|
|
611
628
|
});
|
|
612
|
-
}, [t, c,
|
|
629
|
+
}, [t, c, i]);
|
|
613
630
|
}
|
|
614
|
-
const
|
|
631
|
+
const me = X(
|
|
615
632
|
({ block: t, components: n }) => {
|
|
616
633
|
if (!t.hast) return null;
|
|
617
634
|
try {
|
|
618
|
-
return
|
|
635
|
+
return K(t.hast, {
|
|
619
636
|
jsx: e,
|
|
620
637
|
jsxs: C,
|
|
621
|
-
Fragment:
|
|
638
|
+
Fragment: $,
|
|
622
639
|
components: n
|
|
623
640
|
});
|
|
624
641
|
} catch {
|
|
@@ -627,146 +644,146 @@ const le = P(
|
|
|
627
644
|
},
|
|
628
645
|
(t, n) => t.block.key === n.block.key && t.block.stable && n.block.stable
|
|
629
646
|
);
|
|
630
|
-
|
|
631
|
-
function
|
|
647
|
+
me.displayName = "StableBlock";
|
|
648
|
+
function Qe(t = {}) {
|
|
632
649
|
const {
|
|
633
650
|
components: n,
|
|
634
651
|
minUpdateInterval: c = 16,
|
|
635
|
-
immediate:
|
|
636
|
-
outputRate:
|
|
637
|
-
...
|
|
638
|
-
} = t, o =
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
|
|
652
|
+
immediate: i = !1,
|
|
653
|
+
outputRate: r = "medium",
|
|
654
|
+
...m
|
|
655
|
+
} = t, o = h(re(m)), a = h(new ae(r)), [l, d] = E(0), [p, u] = E(!1), [y, b] = E(0), [v, x] = E("idle"), T = h(0), k = h(null), R = g(() => {
|
|
656
|
+
const B = performance.now(), P = B - T.current;
|
|
657
|
+
i || P >= c ? (T.current = B, d((A) => A + 1)) : k.current === null && (k.current = window.requestAnimationFrame(() => {
|
|
658
|
+
k.current = null, T.current = performance.now(), d((A) => A + 1);
|
|
642
659
|
}));
|
|
643
|
-
}, [c,
|
|
644
|
-
(
|
|
645
|
-
o.current.append(
|
|
660
|
+
}, [c, i]), N = g(
|
|
661
|
+
(B) => {
|
|
662
|
+
o.current.append(B), R();
|
|
646
663
|
},
|
|
647
|
-
[
|
|
648
|
-
),
|
|
649
|
-
(
|
|
650
|
-
o.current.reset(),
|
|
651
|
-
|
|
652
|
-
(
|
|
653
|
-
|
|
664
|
+
[R]
|
|
665
|
+
), S = g(
|
|
666
|
+
(B) => {
|
|
667
|
+
o.current.reset(), u(!1), b(0), x("running"), a.current.start(
|
|
668
|
+
B,
|
|
669
|
+
(P) => {
|
|
670
|
+
P && o.current.append(P), b(a.current.progress), R();
|
|
654
671
|
},
|
|
655
672
|
() => {
|
|
656
|
-
o.current.finish(),
|
|
673
|
+
o.current.finish(), u(!0), b(1), x("complete"), R();
|
|
657
674
|
}
|
|
658
675
|
);
|
|
659
676
|
},
|
|
660
|
-
[
|
|
661
|
-
), s =
|
|
662
|
-
|
|
663
|
-
}, []), w =
|
|
664
|
-
|
|
665
|
-
}, []), L =
|
|
666
|
-
|
|
667
|
-
}, []), D =
|
|
668
|
-
|
|
669
|
-
}, []), F =
|
|
670
|
-
|
|
677
|
+
[R]
|
|
678
|
+
), s = g(() => {
|
|
679
|
+
a.current.pause(), x(a.current.status);
|
|
680
|
+
}, []), w = g(() => {
|
|
681
|
+
a.current.resume(), x(a.current.status);
|
|
682
|
+
}, []), L = g(() => {
|
|
683
|
+
a.current.skipToEnd(), x(a.current.status), b(1);
|
|
684
|
+
}, []), D = g(() => {
|
|
685
|
+
a.current.stop(), o.current.finish(), u(!0), x("complete"), k.current !== null && (cancelAnimationFrame(k.current), k.current = null), d((B) => B + 1);
|
|
686
|
+
}, []), F = g(() => {
|
|
687
|
+
a.current.stop(), o.current.reset(), u(!1), b(0), x("idle"), k.current !== null && (cancelAnimationFrame(k.current), k.current = null), d((B) => B + 1);
|
|
671
688
|
}, []);
|
|
672
689
|
z(() => {
|
|
673
|
-
|
|
674
|
-
}, [
|
|
675
|
-
|
|
690
|
+
a.current.setRate(r);
|
|
691
|
+
}, [r]), z(() => () => {
|
|
692
|
+
a.current.stop(), k.current !== null && cancelAnimationFrame(k.current);
|
|
676
693
|
}, []);
|
|
677
|
-
const
|
|
678
|
-
(
|
|
679
|
-
|
|
694
|
+
const f = o.current.getState(), M = o.current.getStats(), I = o.current.getContent(), H = _(() => f.blocks.map(
|
|
695
|
+
(B) => e(
|
|
696
|
+
me,
|
|
680
697
|
{
|
|
681
|
-
block:
|
|
698
|
+
block: B,
|
|
682
699
|
components: n
|
|
683
700
|
},
|
|
684
|
-
|
|
701
|
+
B.key
|
|
685
702
|
)
|
|
686
|
-
), [
|
|
703
|
+
), [f.blocks, n, l]);
|
|
687
704
|
return {
|
|
688
|
-
element:
|
|
689
|
-
append:
|
|
690
|
-
start:
|
|
705
|
+
element: _(() => f.blocks.length === 0 ? null : e($, { children: H }), [H, f.blocks.length]),
|
|
706
|
+
append: N,
|
|
707
|
+
start: S,
|
|
691
708
|
pause: s,
|
|
692
709
|
resume: w,
|
|
693
710
|
skipToEnd: L,
|
|
694
711
|
reset: F,
|
|
695
712
|
finish: D,
|
|
696
|
-
blocks:
|
|
697
|
-
stats:
|
|
698
|
-
isComplete:
|
|
699
|
-
content:
|
|
700
|
-
progress:
|
|
701
|
-
outputStatus:
|
|
713
|
+
blocks: f.blocks,
|
|
714
|
+
stats: M,
|
|
715
|
+
isComplete: p,
|
|
716
|
+
content: I,
|
|
717
|
+
progress: y,
|
|
718
|
+
outputStatus: v
|
|
702
719
|
};
|
|
703
720
|
}
|
|
704
|
-
const
|
|
721
|
+
const Oe = 16, Pe = "data:image/svg+xml,", Ye = () => /* @__PURE__ */ C("svg", { width: "48", height: "36", viewBox: "0 0 48 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
705
722
|
/* @__PURE__ */ e("rect", { x: "0", y: "0", width: "48", height: "36", rx: "3", className: "md-image-skeleton-icon" }),
|
|
706
723
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "10", r: "5", className: "md-image-skeleton-icon-detail" }),
|
|
707
724
|
/* @__PURE__ */ e("path", { d: "M0 36 L0 24 L16 16 L28 26 L48 12 L48 36 Z", className: "md-image-skeleton-icon-detail" })
|
|
708
|
-
] }),
|
|
725
|
+
] }), fe = X(({
|
|
709
726
|
src: t,
|
|
710
727
|
alt: n,
|
|
711
728
|
className: c,
|
|
712
|
-
"data-width":
|
|
713
|
-
"data-height":
|
|
714
|
-
...
|
|
729
|
+
"data-width": i,
|
|
730
|
+
"data-height": r,
|
|
731
|
+
...m
|
|
715
732
|
}) => {
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}, [
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
},
|
|
733
|
+
const a = (t == null ? void 0 : t.startsWith(Pe)) ? void 0 : t, l = i ? Number(i) : 200, d = r ? Number(r) : 120, [p, u] = E(!0), y = h(null), b = h(null);
|
|
734
|
+
ge(() => {
|
|
735
|
+
y.current && a && y.current.complete && y.current.naturalWidth > 0 && u(!1);
|
|
736
|
+
}, [a]);
|
|
737
|
+
const v = g(() => {
|
|
738
|
+
b.current && clearTimeout(b.current), b.current = setTimeout(() => {
|
|
739
|
+
u(!1);
|
|
740
|
+
}, Oe);
|
|
724
741
|
}, []);
|
|
725
742
|
return /* @__PURE__ */ C(
|
|
726
743
|
"span",
|
|
727
744
|
{
|
|
728
745
|
className: `md-image-container ${c || ""}`,
|
|
729
|
-
style: { width:
|
|
746
|
+
style: { width: l, height: d },
|
|
730
747
|
children: [
|
|
731
|
-
|
|
748
|
+
a && /* @__PURE__ */ e(
|
|
732
749
|
"img",
|
|
733
750
|
{
|
|
734
|
-
ref:
|
|
735
|
-
src:
|
|
751
|
+
ref: y,
|
|
752
|
+
src: a,
|
|
736
753
|
alt: n,
|
|
737
|
-
onLoad:
|
|
754
|
+
onLoad: v,
|
|
738
755
|
className: "md-image",
|
|
739
|
-
...
|
|
756
|
+
...m
|
|
740
757
|
}
|
|
741
758
|
),
|
|
742
|
-
|
|
759
|
+
p && /* @__PURE__ */ e("span", { className: "md-image-skeleton", children: /* @__PURE__ */ e(Ye, {}) })
|
|
743
760
|
]
|
|
744
761
|
}
|
|
745
762
|
);
|
|
746
763
|
});
|
|
747
|
-
|
|
748
|
-
let
|
|
749
|
-
async function
|
|
750
|
-
if (!
|
|
751
|
-
return
|
|
752
|
-
await import("katex/dist/katex.min.css"),
|
|
753
|
-
})(),
|
|
764
|
+
fe.displayName = "StreamingImage";
|
|
765
|
+
let J = !1, W = null;
|
|
766
|
+
async function he() {
|
|
767
|
+
if (!J)
|
|
768
|
+
return W || (W = (async () => {
|
|
769
|
+
await import("katex/dist/katex.min.css"), J = !0;
|
|
770
|
+
})(), W);
|
|
754
771
|
}
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
}, []), /* @__PURE__ */ e(
|
|
758
|
-
|
|
759
|
-
function
|
|
760
|
-
return
|
|
772
|
+
const Ze = X(({ children: t }) => (z(() => {
|
|
773
|
+
J || he();
|
|
774
|
+
}, []), /* @__PURE__ */ e($, { children: t })));
|
|
775
|
+
Ze.displayName = "MathProvider";
|
|
776
|
+
function _e() {
|
|
777
|
+
return he();
|
|
761
778
|
}
|
|
762
|
-
const
|
|
779
|
+
const pe = X(
|
|
763
780
|
({ block: t, components: n }) => {
|
|
764
781
|
if (!t.hast) return null;
|
|
765
782
|
try {
|
|
766
|
-
return
|
|
783
|
+
return K(t.hast, {
|
|
767
784
|
jsx: e,
|
|
768
785
|
jsxs: C,
|
|
769
|
-
Fragment:
|
|
786
|
+
Fragment: $,
|
|
770
787
|
components: n
|
|
771
788
|
});
|
|
772
789
|
} catch {
|
|
@@ -775,179 +792,179 @@ const de = P(
|
|
|
775
792
|
},
|
|
776
793
|
(t, n) => t.block.key === n.block.key && t.block.stable && n.block.stable
|
|
777
794
|
);
|
|
778
|
-
|
|
779
|
-
const
|
|
795
|
+
pe.displayName = "StableBlock";
|
|
796
|
+
const Xe = ({
|
|
780
797
|
content: t,
|
|
781
798
|
source: n,
|
|
782
799
|
outputRate: c = "medium",
|
|
783
|
-
isComplete:
|
|
784
|
-
onComplete:
|
|
785
|
-
onBlockStable:
|
|
800
|
+
isComplete: i = !1,
|
|
801
|
+
onComplete: r,
|
|
802
|
+
onBlockStable: m,
|
|
786
803
|
onProgress: o,
|
|
787
|
-
components:
|
|
788
|
-
className:
|
|
789
|
-
minUpdateInterval:
|
|
790
|
-
autoStart:
|
|
791
|
-
copyButton:
|
|
792
|
-
onCodeCopy:
|
|
793
|
-
...
|
|
804
|
+
components: a,
|
|
805
|
+
className: l,
|
|
806
|
+
minUpdateInterval: d = 16,
|
|
807
|
+
autoStart: p = !0,
|
|
808
|
+
copyButton: u = !0,
|
|
809
|
+
onCodeCopy: y,
|
|
810
|
+
...b
|
|
794
811
|
}) => {
|
|
795
812
|
z(() => {
|
|
796
|
-
|
|
797
|
-
}, [
|
|
798
|
-
const
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
s.current = null,
|
|
813
|
+
b.math && _e();
|
|
814
|
+
}, [b.math]);
|
|
815
|
+
const v = h(re(b)), x = h(new ae(c)), T = h(""), k = h(void 0), R = h([]), [, N] = q.useReducer((f) => f + 1, 0), S = h(0), s = h(null), w = () => {
|
|
816
|
+
const f = performance.now();
|
|
817
|
+
f - S.current >= d ? (S.current = f, N()) : s.current === null && (s.current = window.requestAnimationFrame(() => {
|
|
818
|
+
s.current = null, S.current = performance.now(), N();
|
|
802
819
|
}));
|
|
803
820
|
};
|
|
804
821
|
z(() => {
|
|
805
|
-
n !== void 0 && n !==
|
|
822
|
+
n !== void 0 && n !== k.current && (k.current = n, p && n && (v.current.reset(), T.current = "", x.current.start(
|
|
806
823
|
n,
|
|
807
|
-
(
|
|
808
|
-
|
|
824
|
+
(f) => {
|
|
825
|
+
f && (v.current.append(f), T.current += f), o == null || o(x.current.progress), w();
|
|
809
826
|
},
|
|
810
827
|
() => {
|
|
811
|
-
|
|
828
|
+
v.current.finish(), r == null || r(), w();
|
|
812
829
|
}
|
|
813
830
|
)));
|
|
814
|
-
}, [n,
|
|
831
|
+
}, [n, p, r, o]), z(() => {
|
|
815
832
|
if (n !== void 0)
|
|
816
833
|
return;
|
|
817
|
-
const
|
|
818
|
-
if (
|
|
819
|
-
if (
|
|
820
|
-
const
|
|
821
|
-
|
|
834
|
+
const f = T.current, M = t || "";
|
|
835
|
+
if (M !== f) {
|
|
836
|
+
if (M.startsWith(f)) {
|
|
837
|
+
const I = M.slice(f.length);
|
|
838
|
+
I && v.current.append(I);
|
|
822
839
|
} else
|
|
823
|
-
|
|
824
|
-
|
|
840
|
+
v.current.reset(), M && v.current.append(M);
|
|
841
|
+
T.current = M, w();
|
|
825
842
|
}
|
|
826
843
|
}, [t, n]), z(() => {
|
|
827
|
-
n === void 0 &&
|
|
828
|
-
}, [
|
|
844
|
+
n === void 0 && i && (v.current.finish(), s.current !== null && (cancelAnimationFrame(s.current), s.current = null), N(), r == null || r());
|
|
845
|
+
}, [i, r, n]), z(() => {
|
|
829
846
|
x.current.setRate(c);
|
|
830
847
|
}, [c]), z(() => {
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
const
|
|
835
|
-
|
|
836
|
-
}),
|
|
848
|
+
if (m) {
|
|
849
|
+
const f = v.current.getState().blocks, M = R.current;
|
|
850
|
+
f.forEach((I, H) => {
|
|
851
|
+
const Z = M[H];
|
|
852
|
+
I.stable && (!Z || !Z.stable) && m(I);
|
|
853
|
+
}), R.current = f;
|
|
837
854
|
}
|
|
838
855
|
}), z(() => () => {
|
|
839
856
|
x.current.stop(), s.current !== null && cancelAnimationFrame(s.current);
|
|
840
857
|
}, []);
|
|
841
|
-
const L =
|
|
842
|
-
const
|
|
843
|
-
if (
|
|
844
|
-
return (
|
|
845
|
-
|
|
858
|
+
const L = v.current.getState(), D = n !== void 0 ? x.current.status === "complete" : i, F = _(() => {
|
|
859
|
+
const f = (M) => {
|
|
860
|
+
if (u)
|
|
861
|
+
return (I) => /* @__PURE__ */ e(
|
|
862
|
+
Q,
|
|
846
863
|
{
|
|
847
|
-
showCopyButton:
|
|
848
|
-
onCopy:
|
|
849
|
-
...
|
|
864
|
+
showCopyButton: M.stable && u,
|
|
865
|
+
onCopy: y,
|
|
866
|
+
...I
|
|
850
867
|
}
|
|
851
868
|
);
|
|
852
869
|
};
|
|
853
|
-
return L.blocks.map((
|
|
854
|
-
const
|
|
855
|
-
img:
|
|
856
|
-
...
|
|
857
|
-
...
|
|
870
|
+
return L.blocks.map((M) => {
|
|
871
|
+
const I = f(M), H = {
|
|
872
|
+
img: fe,
|
|
873
|
+
...I ? { pre: I } : {},
|
|
874
|
+
...a
|
|
858
875
|
};
|
|
859
876
|
return /* @__PURE__ */ e(
|
|
860
|
-
|
|
877
|
+
pe,
|
|
861
878
|
{
|
|
862
|
-
block:
|
|
863
|
-
components:
|
|
879
|
+
block: M,
|
|
880
|
+
components: H
|
|
864
881
|
},
|
|
865
|
-
|
|
882
|
+
M.key
|
|
866
883
|
);
|
|
867
884
|
});
|
|
868
|
-
}, [L.blocks,
|
|
869
|
-
return /* @__PURE__ */ e("div", { className:
|
|
885
|
+
}, [L.blocks, a, u, y]);
|
|
886
|
+
return /* @__PURE__ */ e("div", { className: l, "data-streaming": !D, children: F });
|
|
870
887
|
};
|
|
871
|
-
|
|
872
|
-
const
|
|
873
|
-
const { text: n, animationConfig: c } = t, { fadeDuration:
|
|
888
|
+
Xe.displayName = "StreamingMarkdown";
|
|
889
|
+
const Ue = X((t) => {
|
|
890
|
+
const { text: n, animationConfig: c } = t, { fadeDuration: i = 200, easing: r = "ease-in-out" } = c || {}, [m, o] = E([]), a = h("");
|
|
874
891
|
z(() => {
|
|
875
|
-
if (n ===
|
|
876
|
-
if (!(
|
|
877
|
-
o([n]),
|
|
892
|
+
if (n === a.current) return;
|
|
893
|
+
if (!(a.current && n.indexOf(a.current) === 0)) {
|
|
894
|
+
o([n]), a.current = n;
|
|
878
895
|
return;
|
|
879
896
|
}
|
|
880
|
-
const
|
|
881
|
-
|
|
897
|
+
const d = n.slice(a.current.length);
|
|
898
|
+
d && (o((p) => [...p, d]), a.current = n);
|
|
882
899
|
}, [n]);
|
|
883
|
-
const
|
|
884
|
-
return /* @__PURE__ */ e(
|
|
900
|
+
const l = `md-fade-in ${i}ms ${r} forwards`;
|
|
901
|
+
return /* @__PURE__ */ e($, { children: m.map((d, p) => /* @__PURE__ */ e(
|
|
885
902
|
"span",
|
|
886
903
|
{
|
|
887
904
|
className: "md-animation-text",
|
|
888
|
-
style: { animation:
|
|
889
|
-
children:
|
|
905
|
+
style: { animation: l },
|
|
906
|
+
children: d
|
|
890
907
|
},
|
|
891
|
-
`animation-text-${
|
|
908
|
+
`animation-text-${p}`
|
|
892
909
|
)) });
|
|
893
910
|
});
|
|
894
|
-
|
|
895
|
-
let
|
|
911
|
+
Ue.displayName = "AnimationText";
|
|
912
|
+
let j = null;
|
|
896
913
|
try {
|
|
897
|
-
|
|
914
|
+
j = require("dompurify");
|
|
898
915
|
} catch {
|
|
899
916
|
}
|
|
900
|
-
function
|
|
901
|
-
return
|
|
917
|
+
function et() {
|
|
918
|
+
return j !== null;
|
|
902
919
|
}
|
|
903
|
-
function
|
|
904
|
-
if (!
|
|
920
|
+
function tt(t, n) {
|
|
921
|
+
if (!j)
|
|
905
922
|
return t;
|
|
906
923
|
const c = {
|
|
907
924
|
ADD_ATTR: ["target", "rel", "data-block-key", "data-pending", "data-predicted"],
|
|
908
925
|
...n
|
|
909
926
|
};
|
|
910
|
-
return
|
|
927
|
+
return j.default.sanitize(t, c);
|
|
911
928
|
}
|
|
912
|
-
function
|
|
929
|
+
function te(t) {
|
|
913
930
|
if (t.type === "root")
|
|
914
931
|
return {
|
|
915
932
|
...t,
|
|
916
933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
917
|
-
children: t.children.map((
|
|
934
|
+
children: t.children.map((r) => r.type === "element" ? te(r) : r)
|
|
918
935
|
};
|
|
919
|
-
const n = ["onclick", "onerror", "onload", "onmouseover", "onfocus", "onblur"], c = ["javascript:", "vbscript:", "data:text/html"],
|
|
936
|
+
const n = ["onclick", "onerror", "onload", "onmouseover", "onfocus", "onblur"], c = ["javascript:", "vbscript:", "data:text/html"], i = {};
|
|
920
937
|
if (t.properties)
|
|
921
|
-
for (const [
|
|
922
|
-
const o =
|
|
938
|
+
for (const [r, m] of Object.entries(t.properties)) {
|
|
939
|
+
const o = r.toLowerCase();
|
|
923
940
|
if (!(n.includes(o) || o.startsWith("on"))) {
|
|
924
|
-
if ((o === "href" || o === "src") && typeof
|
|
925
|
-
const
|
|
926
|
-
if (c.some((
|
|
941
|
+
if ((o === "href" || o === "src") && typeof m == "string") {
|
|
942
|
+
const a = m.toLowerCase().trim();
|
|
943
|
+
if (c.some((l) => a.startsWith(l)))
|
|
927
944
|
continue;
|
|
928
945
|
}
|
|
929
|
-
|
|
946
|
+
i[r] = m;
|
|
930
947
|
}
|
|
931
948
|
}
|
|
932
949
|
return {
|
|
933
950
|
...t,
|
|
934
|
-
properties:
|
|
951
|
+
properties: i,
|
|
935
952
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
936
|
-
children: t.children.map((
|
|
953
|
+
children: t.children.map((r) => r.type === "element" ? te(r) : r)
|
|
937
954
|
};
|
|
938
955
|
}
|
|
939
956
|
export {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
957
|
+
Ue as AnimationText,
|
|
958
|
+
Q as CodeBlock,
|
|
959
|
+
$e as Markdown,
|
|
960
|
+
de as MermaidBlock,
|
|
961
|
+
ue as MermaidFullscreenViewer,
|
|
962
|
+
fe as StreamingImage,
|
|
963
|
+
Xe as StreamingMarkdown,
|
|
964
|
+
et as isDOMPurifyAvailable,
|
|
965
|
+
te as sanitizeHast,
|
|
966
|
+
tt as sanitizeHtml,
|
|
967
|
+
Je as useMarkdown,
|
|
968
|
+
Qe as useStreamingMarkdown,
|
|
969
|
+
ce as useZoom
|
|
953
970
|
};
|