md-editor-v3 6.1.1-0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/MdEditor.cjs +13 -13
- package/lib/cjs/ModalToolbar.cjs +1 -1
- package/lib/cjs/chunks/index.cjs +1 -1
- package/lib/cjs/chunks/index3.cjs +37 -38
- package/lib/cjs/chunks/index4.cjs +1 -1
- package/lib/es/MdEditor.mjs +931 -915
- package/lib/es/ModalToolbar.mjs +24 -23
- package/lib/es/chunks/index.mjs +32 -32
- package/lib/es/chunks/index3.mjs +670 -632
- package/lib/es/chunks/index4.mjs +250 -254
- package/lib/style.css +1 -1
- package/lib/types/MdEditor/Editor.d.ts +9 -0
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +9 -0
- package/lib/types/MdEditor/layouts/Content/UpdateOnDemand.d.ts +16 -0
- package/lib/types/MdEditor/layouts/Content/index.d.ts +3 -0
- package/lib/types/MdEditor/layouts/Content/props.d.ts +9 -1
- package/lib/types/MdEditor/props.d.ts +9 -1
- package/lib/types/MdPreview/MdPreview.d.ts +3 -0
- package/package.json +2 -1
package/lib/es/chunks/index3.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useId as
|
|
2
|
-
import { deepMerge as Me, deepClone as Pe, randomId as
|
|
3
|
-
import { p as
|
|
4
|
-
import { b as y, U as
|
|
5
|
-
import { a as
|
|
1
|
+
import { useId as Fe, provide as T, computed as R, reactive as re, watch as E, onMounted as H, ref as G, inject as w, nextTick as U, shallowRef as ee, onBeforeUnmount as te, toRef as Re, defineComponent as ce, createVNode as N, Fragment as Ae, h as He } from "vue";
|
|
2
|
+
import { deepMerge as Me, deepClone as Pe, randomId as le, debounce as Le } from "@vavt/util";
|
|
3
|
+
import { p as f, g as P, f as ue, s as me, b as Oe, a as _e } from "./config.mjs";
|
|
4
|
+
import { b as y, U as je, C as Ee, B as X, O as ke, E as Q, P as fe, F as he, f as pe, g as ge, H as ve, h as ye, R as ie, e as Ne, i as de, d as Be, j as oe, k as De, T as Ve } from "./event-bus.mjs";
|
|
5
|
+
import { a as O, u as Ge, S as Ue, c as ze, z as We } from "./dom.mjs";
|
|
6
6
|
import qe from "@vavt/copy2clipboard";
|
|
7
7
|
import Ke from "markdown-it";
|
|
8
8
|
import Ze from "markdown-it-image-figures";
|
|
@@ -11,107 +11,107 @@ import Xe from "markdown-it-sup";
|
|
|
11
11
|
import { g as Ye } from "./index5.mjs";
|
|
12
12
|
import { LRUCache as Qe } from "lru-cache";
|
|
13
13
|
import et from "medium-zoom";
|
|
14
|
-
const
|
|
15
|
-
hljs: `${
|
|
16
|
-
hlcss: `${
|
|
17
|
-
prettier: `${
|
|
18
|
-
prettierMD: `${
|
|
19
|
-
cropperjs: `${
|
|
20
|
-
croppercss: `${
|
|
21
|
-
screenfull: `${
|
|
22
|
-
mermaidM: `${
|
|
23
|
-
mermaid: `${
|
|
24
|
-
katexjs: `${
|
|
25
|
-
katexcss: `${
|
|
26
|
-
echarts: `${
|
|
27
|
-
},
|
|
28
|
-
const { editorId: n } = r, o =
|
|
14
|
+
const M = {
|
|
15
|
+
hljs: `${f}-hljs`,
|
|
16
|
+
hlcss: `${f}-hlCss`,
|
|
17
|
+
prettier: `${f}-prettier`,
|
|
18
|
+
prettierMD: `${f}-prettierMD`,
|
|
19
|
+
cropperjs: `${f}-cropper`,
|
|
20
|
+
croppercss: `${f}-cropperCss`,
|
|
21
|
+
screenfull: `${f}-screenfull`,
|
|
22
|
+
mermaidM: `${f}-mermaid-m`,
|
|
23
|
+
mermaid: `${f}-mermaid`,
|
|
24
|
+
katexjs: `${f}-katex`,
|
|
25
|
+
katexcss: `${f}-katexCss`,
|
|
26
|
+
echarts: `${f}-echarts`
|
|
27
|
+
}, Jt = (e, t, r) => {
|
|
28
|
+
const { editorId: n } = r, o = re({
|
|
29
29
|
// 是否已编译成html
|
|
30
30
|
buildFinished: !1,
|
|
31
31
|
// 存储当前最新的html
|
|
32
32
|
html: ""
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
E(
|
|
35
35
|
() => e.modelValue,
|
|
36
36
|
() => {
|
|
37
37
|
o.buildFinished = !1;
|
|
38
38
|
}
|
|
39
|
-
),
|
|
39
|
+
), H(() => {
|
|
40
40
|
y.on(n, {
|
|
41
41
|
name: X,
|
|
42
|
-
callback(
|
|
43
|
-
o.buildFinished = !0, o.html =
|
|
42
|
+
callback(u) {
|
|
43
|
+
o.buildFinished = !0, o.html = u;
|
|
44
44
|
}
|
|
45
45
|
}), y.on(n, {
|
|
46
|
-
name:
|
|
46
|
+
name: ke,
|
|
47
47
|
callback() {
|
|
48
|
-
const
|
|
48
|
+
const u = new Promise((c) => {
|
|
49
49
|
if (o.buildFinished)
|
|
50
|
-
|
|
50
|
+
c(o.html);
|
|
51
51
|
else {
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const m = (s) => {
|
|
53
|
+
c(s), y.remove(n, X, m);
|
|
54
54
|
};
|
|
55
55
|
y.on(n, {
|
|
56
56
|
name: X,
|
|
57
|
-
callback:
|
|
57
|
+
callback: m
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
-
e.onSave ? e.onSave(e.modelValue,
|
|
61
|
+
e.onSave ? e.onSave(e.modelValue, u) : t.emit("onSave", e.modelValue, u);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
-
},
|
|
65
|
+
}, Te = (e, {
|
|
66
66
|
editorId: t,
|
|
67
67
|
rootRef: r,
|
|
68
68
|
setting: n
|
|
69
69
|
}) => {
|
|
70
|
-
const o =
|
|
70
|
+
const o = P.editorExtensions.highlight, u = P.editorExtensionsAttrs.highlight;
|
|
71
71
|
T("editorId", t), T("rootRef", r), T(
|
|
72
72
|
"theme",
|
|
73
|
-
|
|
73
|
+
R(() => e.theme)
|
|
74
74
|
), T(
|
|
75
75
|
"language",
|
|
76
|
-
|
|
76
|
+
R(() => e.language)
|
|
77
77
|
), T(
|
|
78
78
|
"highlight",
|
|
79
|
-
|
|
80
|
-
const { js:
|
|
79
|
+
R(() => {
|
|
80
|
+
const { js: m } = o, s = {
|
|
81
81
|
...ue,
|
|
82
82
|
...o.css
|
|
83
|
-
}, { js:
|
|
83
|
+
}, { js: l, css: i = {} } = u || {}, a = e.codeStyleReverse && e.codeStyleReverseList.includes(e.previewTheme) ? "dark" : e.theme, d = s[e.codeTheme] ? s[e.codeTheme][a] : ue.atom[a], $ = s[e.codeTheme] && i[e.codeTheme] ? i[e.codeTheme][a] : i.atom ? i.atom[a] : {};
|
|
84
84
|
return {
|
|
85
85
|
js: {
|
|
86
|
-
src:
|
|
87
|
-
...
|
|
86
|
+
src: m,
|
|
87
|
+
...l
|
|
88
88
|
},
|
|
89
89
|
css: {
|
|
90
|
-
href:
|
|
91
|
-
|
|
90
|
+
href: d,
|
|
91
|
+
...$
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
})
|
|
95
95
|
), T("showCodeRowNumber", e.showCodeRowNumber);
|
|
96
|
-
const
|
|
97
|
-
const
|
|
96
|
+
const c = R(() => {
|
|
97
|
+
const m = {
|
|
98
98
|
...me,
|
|
99
|
-
...
|
|
99
|
+
...P.editorConfig.languageUserDefined
|
|
100
100
|
};
|
|
101
101
|
return Me(
|
|
102
102
|
Pe(me["en-US"]),
|
|
103
|
-
|
|
103
|
+
m[e.language] || {}
|
|
104
104
|
);
|
|
105
105
|
});
|
|
106
|
-
return T("usedLanguageText",
|
|
106
|
+
return T("usedLanguageText", c), T(
|
|
107
107
|
"previewTheme",
|
|
108
|
-
|
|
108
|
+
R(() => e.previewTheme)
|
|
109
109
|
), T(
|
|
110
110
|
"customIcon",
|
|
111
|
-
|
|
111
|
+
R(() => e.customIcon)
|
|
112
112
|
), T(
|
|
113
113
|
"setting",
|
|
114
|
-
|
|
114
|
+
R(() => n ? {
|
|
115
115
|
// setting是reactive,不转化是可以直接赋值的
|
|
116
116
|
...n
|
|
117
117
|
} : {
|
|
@@ -122,60 +122,60 @@ const P = {
|
|
|
122
122
|
fullscreen: !1
|
|
123
123
|
})
|
|
124
124
|
), { editorId: t };
|
|
125
|
-
},
|
|
125
|
+
}, Xt = (e, t) => (T("tabWidth", e.tabWidth), T(
|
|
126
126
|
"disabled",
|
|
127
|
-
|
|
127
|
+
R(() => e.disabled)
|
|
128
128
|
), T(
|
|
129
129
|
"showToolbarName",
|
|
130
|
-
|
|
130
|
+
R(() => e.showToolbarName)
|
|
131
131
|
), T("noUploadImg", e.noUploadImg), T(
|
|
132
132
|
"tableShape",
|
|
133
|
-
|
|
133
|
+
R(() => e.tableShape)
|
|
134
134
|
), T("noPrettier", e.noPrettier), T(
|
|
135
135
|
"codeTheme",
|
|
136
|
-
|
|
136
|
+
R(() => e.codeTheme)
|
|
137
137
|
), T("updateSetting", t.updateSetting), T(
|
|
138
138
|
"catalogVisible",
|
|
139
|
-
|
|
139
|
+
R(() => t.catalogVisible.value)
|
|
140
140
|
), T("defToolbars", t.defToolbars), T(
|
|
141
141
|
"floatingToolbars",
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
-
const { noPrettier: t, noUploadImg: r } = e, { editorExtensions: n, editorExtensionsAttrs: o } =
|
|
145
|
-
|
|
146
|
-
if (!
|
|
147
|
-
const { js:
|
|
148
|
-
|
|
149
|
-
...
|
|
142
|
+
R(() => e.floatingToolbars)
|
|
143
|
+
), Te(e, t)), Yt = (e) => {
|
|
144
|
+
const { noPrettier: t, noUploadImg: r } = e, { editorExtensions: n, editorExtensionsAttrs: o } = P, u = t || n.prettier.prettierInstance, c = t || n.prettier.parserMarkdownInstance, m = r || n.cropper.instance;
|
|
145
|
+
H(() => {
|
|
146
|
+
if (!m) {
|
|
147
|
+
const { js: s = {}, css: l = {} } = o.cropper || {};
|
|
148
|
+
O("link", {
|
|
149
|
+
...l,
|
|
150
150
|
rel: "stylesheet",
|
|
151
151
|
href: n.cropper.css,
|
|
152
|
-
id:
|
|
153
|
-
}),
|
|
154
|
-
...
|
|
152
|
+
id: M.croppercss
|
|
153
|
+
}), O("script", {
|
|
154
|
+
...s,
|
|
155
155
|
src: n.cropper.js,
|
|
156
|
-
id:
|
|
156
|
+
id: M.cropperjs
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
if (!
|
|
160
|
-
const { standaloneJs:
|
|
161
|
-
|
|
162
|
-
...
|
|
159
|
+
if (!u) {
|
|
160
|
+
const { standaloneJs: s = {} } = o.prettier || {};
|
|
161
|
+
O("script", {
|
|
162
|
+
...s,
|
|
163
163
|
src: n.prettier.standaloneJs,
|
|
164
|
-
id:
|
|
164
|
+
id: M.prettier
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
if (!
|
|
168
|
-
const { parserMarkdownJs:
|
|
169
|
-
|
|
170
|
-
...
|
|
167
|
+
if (!c) {
|
|
168
|
+
const { parserMarkdownJs: s = {} } = o.prettier || {};
|
|
169
|
+
O("script", {
|
|
170
|
+
...s,
|
|
171
171
|
src: n.prettier.parserMarkdownJs,
|
|
172
|
-
id:
|
|
172
|
+
id: M.prettierMD
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
-
},
|
|
176
|
+
}, Qt = (e, t, r) => {
|
|
177
177
|
const { editorId: n } = r;
|
|
178
|
-
|
|
178
|
+
H(() => {
|
|
179
179
|
y.on(n, {
|
|
180
180
|
name: Q,
|
|
181
181
|
callback: (o) => {
|
|
@@ -183,16 +183,16 @@ const P = {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
});
|
|
186
|
-
},
|
|
187
|
-
const { editorId: n } = r, o =
|
|
186
|
+
}, en = (e, t, r) => {
|
|
187
|
+
const { editorId: n } = r, o = re({
|
|
188
188
|
pageFullscreen: e.pageFullscreen,
|
|
189
189
|
fullscreen: !1,
|
|
190
190
|
preview: e.preview,
|
|
191
191
|
htmlPreview: e.preview ? !1 : e.htmlPreview,
|
|
192
192
|
previewOnly: !1
|
|
193
|
-
}),
|
|
194
|
-
const a =
|
|
195
|
-
switch (
|
|
193
|
+
}), u = re({ ...o }), c = (l, i) => {
|
|
194
|
+
const a = i === void 0 ? !o[l] : i;
|
|
195
|
+
switch (l) {
|
|
196
196
|
case "preview": {
|
|
197
197
|
o.htmlPreview = !1, o.previewOnly = !1;
|
|
198
198
|
break;
|
|
@@ -202,33 +202,33 @@ const P = {
|
|
|
202
202
|
break;
|
|
203
203
|
}
|
|
204
204
|
case "previewOnly": {
|
|
205
|
-
a ? !o.preview && !o.htmlPreview && (o.preview = !0) : (
|
|
205
|
+
a ? !o.preview && !o.htmlPreview && (o.preview = !0) : (u.preview || (o.preview = !1), u.htmlPreview || (o.htmlPreview = !1));
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
|
|
209
|
+
u[l] = a, o[l] = a;
|
|
210
210
|
};
|
|
211
|
-
let
|
|
212
|
-
const
|
|
213
|
-
o.pageFullscreen || o.fullscreen ? document.body.style.overflow = "hidden" : document.body.style.overflow =
|
|
211
|
+
let m = "";
|
|
212
|
+
const s = () => {
|
|
213
|
+
o.pageFullscreen || o.fullscreen ? document.body.style.overflow = "hidden" : document.body.style.overflow = m;
|
|
214
214
|
};
|
|
215
|
-
return
|
|
215
|
+
return E(() => [o.pageFullscreen, o.fullscreen], s), H(() => {
|
|
216
216
|
y.on(n, {
|
|
217
|
-
name:
|
|
218
|
-
callback(
|
|
219
|
-
const a = (
|
|
220
|
-
y.emit(n,
|
|
217
|
+
name: je,
|
|
218
|
+
callback(l, i) {
|
|
219
|
+
const a = (d) => {
|
|
220
|
+
y.emit(n, ie, "image", {
|
|
221
221
|
desc: "",
|
|
222
|
-
urls:
|
|
223
|
-
}),
|
|
222
|
+
urls: d
|
|
223
|
+
}), i?.();
|
|
224
224
|
};
|
|
225
|
-
e.onUploadImg ? e.onUploadImg(
|
|
225
|
+
e.onUploadImg ? e.onUploadImg(l, a) : t.emit("onUploadImg", l, a);
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
228
|
-
}), [o,
|
|
229
|
-
},
|
|
230
|
-
const { editorId: r } = t, n =
|
|
231
|
-
return
|
|
227
|
+
}), m = document.body.style.overflow, s();
|
|
228
|
+
}), [o, c];
|
|
229
|
+
}, tn = (e, t) => {
|
|
230
|
+
const { editorId: r } = t, n = G(!1);
|
|
231
|
+
return H(() => {
|
|
232
232
|
y.on(r, {
|
|
233
233
|
name: Ee,
|
|
234
234
|
callback: (o) => {
|
|
@@ -236,44 +236,44 @@ const P = {
|
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
}), n;
|
|
239
|
-
},
|
|
240
|
-
const { editorId: n, catalogVisible: o, setting:
|
|
241
|
-
|
|
242
|
-
() =>
|
|
243
|
-
(
|
|
244
|
-
y.emit(n, fe,
|
|
239
|
+
}, nn = (e, t, r) => {
|
|
240
|
+
const { editorId: n, catalogVisible: o, setting: u, updateSetting: c, codeRef: m } = r;
|
|
241
|
+
E(
|
|
242
|
+
() => u.pageFullscreen,
|
|
243
|
+
(l) => {
|
|
244
|
+
y.emit(n, fe, l);
|
|
245
245
|
}
|
|
246
|
-
),
|
|
247
|
-
() =>
|
|
248
|
-
(
|
|
249
|
-
y.emit(n, he,
|
|
246
|
+
), E(
|
|
247
|
+
() => u.fullscreen,
|
|
248
|
+
(l) => {
|
|
249
|
+
y.emit(n, he, l);
|
|
250
250
|
}
|
|
251
|
-
),
|
|
252
|
-
() =>
|
|
253
|
-
(
|
|
254
|
-
y.emit(n, pe,
|
|
251
|
+
), E(
|
|
252
|
+
() => u.preview,
|
|
253
|
+
(l) => {
|
|
254
|
+
y.emit(n, pe, l);
|
|
255
255
|
}
|
|
256
|
-
),
|
|
257
|
-
() =>
|
|
258
|
-
(
|
|
259
|
-
y.emit(n, ge,
|
|
256
|
+
), E(
|
|
257
|
+
() => u.previewOnly,
|
|
258
|
+
(l) => {
|
|
259
|
+
y.emit(n, ge, l);
|
|
260
260
|
}
|
|
261
|
-
),
|
|
262
|
-
() =>
|
|
263
|
-
(
|
|
264
|
-
y.emit(n, ve,
|
|
261
|
+
), E(
|
|
262
|
+
() => u.htmlPreview,
|
|
263
|
+
(l) => {
|
|
264
|
+
y.emit(n, ve, l);
|
|
265
265
|
}
|
|
266
|
-
),
|
|
267
|
-
y.emit(n, ye,
|
|
266
|
+
), E(o, (l) => {
|
|
267
|
+
y.emit(n, ye, l);
|
|
268
268
|
});
|
|
269
|
-
const
|
|
270
|
-
on(
|
|
271
|
-
switch (
|
|
269
|
+
const s = {
|
|
270
|
+
on(l, i) {
|
|
271
|
+
switch (l) {
|
|
272
272
|
case "pageFullscreen": {
|
|
273
273
|
y.on(n, {
|
|
274
274
|
name: fe,
|
|
275
275
|
callback(a) {
|
|
276
|
-
|
|
276
|
+
i(a);
|
|
277
277
|
}
|
|
278
278
|
});
|
|
279
279
|
break;
|
|
@@ -282,7 +282,7 @@ const P = {
|
|
|
282
282
|
y.on(n, {
|
|
283
283
|
name: he,
|
|
284
284
|
callback(a) {
|
|
285
|
-
|
|
285
|
+
i(a);
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
break;
|
|
@@ -291,7 +291,7 @@ const P = {
|
|
|
291
291
|
y.on(n, {
|
|
292
292
|
name: pe,
|
|
293
293
|
callback(a) {
|
|
294
|
-
|
|
294
|
+
i(a);
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
break;
|
|
@@ -300,7 +300,7 @@ const P = {
|
|
|
300
300
|
y.on(n, {
|
|
301
301
|
name: ge,
|
|
302
302
|
callback(a) {
|
|
303
|
-
|
|
303
|
+
i(a);
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
break;
|
|
@@ -309,7 +309,7 @@ const P = {
|
|
|
309
309
|
y.on(n, {
|
|
310
310
|
name: ve,
|
|
311
311
|
callback(a) {
|
|
312
|
-
|
|
312
|
+
i(a);
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
315
|
break;
|
|
@@ -318,213 +318,213 @@ const P = {
|
|
|
318
318
|
y.on(n, {
|
|
319
319
|
name: ye,
|
|
320
320
|
callback(a) {
|
|
321
|
-
|
|
321
|
+
i(a);
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
break;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
},
|
|
328
|
-
togglePageFullscreen(
|
|
329
|
-
|
|
328
|
+
togglePageFullscreen(l) {
|
|
329
|
+
c("pageFullscreen", l);
|
|
330
330
|
},
|
|
331
|
-
toggleFullscreen(
|
|
332
|
-
y.emit(n, Be,
|
|
331
|
+
toggleFullscreen(l) {
|
|
332
|
+
y.emit(n, Be, l);
|
|
333
333
|
},
|
|
334
|
-
togglePreview(
|
|
335
|
-
|
|
334
|
+
togglePreview(l) {
|
|
335
|
+
c("preview", l);
|
|
336
336
|
},
|
|
337
|
-
togglePreviewOnly(
|
|
338
|
-
|
|
337
|
+
togglePreviewOnly(l) {
|
|
338
|
+
c("previewOnly", l);
|
|
339
339
|
},
|
|
340
|
-
toggleHtmlPreview(
|
|
341
|
-
|
|
340
|
+
toggleHtmlPreview(l) {
|
|
341
|
+
c("htmlPreview", l);
|
|
342
342
|
},
|
|
343
|
-
toggleCatalog(
|
|
344
|
-
y.emit(n, Ee,
|
|
343
|
+
toggleCatalog(l) {
|
|
344
|
+
y.emit(n, Ee, l);
|
|
345
345
|
},
|
|
346
346
|
triggerSave() {
|
|
347
|
-
y.emit(n,
|
|
347
|
+
y.emit(n, ke);
|
|
348
348
|
},
|
|
349
|
-
insert(
|
|
350
|
-
y.emit(n,
|
|
349
|
+
insert(l) {
|
|
350
|
+
y.emit(n, ie, "universal", { generate: l });
|
|
351
351
|
},
|
|
352
|
-
focus(
|
|
353
|
-
|
|
352
|
+
focus(l) {
|
|
353
|
+
m.value?.focus(l);
|
|
354
354
|
},
|
|
355
355
|
rerender() {
|
|
356
356
|
y.emit(n, de);
|
|
357
357
|
},
|
|
358
358
|
getSelectedText() {
|
|
359
|
-
return
|
|
359
|
+
return m.value?.getSelectedText();
|
|
360
360
|
},
|
|
361
361
|
resetHistory() {
|
|
362
|
-
|
|
362
|
+
m.value?.resetHistory();
|
|
363
363
|
},
|
|
364
|
-
domEventHandlers(
|
|
365
|
-
y.emit(n,
|
|
364
|
+
domEventHandlers(l) {
|
|
365
|
+
y.emit(n, Ne, l);
|
|
366
366
|
},
|
|
367
|
-
execCommand(
|
|
368
|
-
y.emit(n,
|
|
367
|
+
execCommand(l) {
|
|
368
|
+
y.emit(n, ie, l);
|
|
369
369
|
},
|
|
370
370
|
getEditorView() {
|
|
371
|
-
return
|
|
371
|
+
return m.value?.getEditorView();
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
|
-
t.expose(
|
|
374
|
+
t.expose(s);
|
|
375
375
|
}, tt = (e) => {
|
|
376
|
-
const t =
|
|
377
|
-
return e.id || e.editorId || `${
|
|
376
|
+
const t = Fe();
|
|
377
|
+
return e.id || e.editorId || `${f}-${t}`;
|
|
378
378
|
}, nt = (e, t, r) => {
|
|
379
|
-
const n =
|
|
380
|
-
o.value.querySelectorAll(`#${n} .${
|
|
379
|
+
const n = w("editorId"), o = w("rootRef"), u = w("usedLanguageText"), c = w("setting"), m = () => {
|
|
380
|
+
o.value.querySelectorAll(`#${n} .${f}-preview .${f}-code`).forEach((i) => {
|
|
381
381
|
let a = -1;
|
|
382
|
-
const
|
|
383
|
-
`.${
|
|
382
|
+
const d = i.querySelector(
|
|
383
|
+
`.${f}-copy-button:not([data-processed])`
|
|
384
384
|
);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const p = (
|
|
388
|
-
let C =
|
|
385
|
+
d && (d.onclick = ($) => {
|
|
386
|
+
$.preventDefault(), clearTimeout(a);
|
|
387
|
+
const p = (i.querySelector("input:checked + pre code") || i.querySelector("pre code")).textContent, { text: g, successTips: I, failTips: v } = u.value.copyCode;
|
|
388
|
+
let C = I;
|
|
389
389
|
qe(e.formatCopiedText(p || "")).catch(() => {
|
|
390
390
|
C = v;
|
|
391
391
|
}).finally(() => {
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
d.dataset.isIcon ? d.dataset.tips = C : d.innerHTML = C, a = window.setTimeout(() => {
|
|
393
|
+
d.dataset.isIcon ? d.dataset.tips = g : d.innerHTML = g;
|
|
394
394
|
}, 1500);
|
|
395
395
|
});
|
|
396
|
-
},
|
|
396
|
+
}, d.setAttribute("data-processed", "true"));
|
|
397
397
|
});
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
|
|
398
|
+
}, s = () => {
|
|
399
|
+
U(m);
|
|
400
|
+
}, l = (i) => {
|
|
401
|
+
i && U(m);
|
|
402
402
|
};
|
|
403
|
-
|
|
403
|
+
E([t, r], s), E(() => c.value.preview, l), E(() => c.value.htmlPreview, l), H(m);
|
|
404
404
|
}, ot = (e) => {
|
|
405
|
-
const t =
|
|
406
|
-
let
|
|
407
|
-
const
|
|
408
|
-
!e.noEcharts &&
|
|
405
|
+
const t = w("editorId"), r = w("theme"), n = w("rootRef"), { editorExtensions: o, editorExtensionsAttrs: u } = P;
|
|
406
|
+
let c = o.echarts.instance;
|
|
407
|
+
const m = ee(-1), s = () => {
|
|
408
|
+
!e.noEcharts && c && (m.value = m.value + 1);
|
|
409
409
|
};
|
|
410
|
-
|
|
410
|
+
E(
|
|
411
411
|
() => r.value,
|
|
412
412
|
() => {
|
|
413
|
-
|
|
413
|
+
s();
|
|
414
414
|
}
|
|
415
|
-
),
|
|
416
|
-
if (e.noEcharts ||
|
|
415
|
+
), H(() => {
|
|
416
|
+
if (e.noEcharts || c)
|
|
417
417
|
return;
|
|
418
|
-
const
|
|
419
|
-
|
|
418
|
+
const h = o.echarts.js;
|
|
419
|
+
O(
|
|
420
420
|
"script",
|
|
421
421
|
{
|
|
422
|
-
...
|
|
423
|
-
src:
|
|
424
|
-
id:
|
|
422
|
+
...u.echarts?.js,
|
|
423
|
+
src: h,
|
|
424
|
+
id: M.echarts,
|
|
425
425
|
onload() {
|
|
426
|
-
|
|
426
|
+
c = window.echarts, s();
|
|
427
427
|
}
|
|
428
428
|
},
|
|
429
429
|
"echarts"
|
|
430
430
|
);
|
|
431
431
|
});
|
|
432
|
-
let
|
|
433
|
-
const
|
|
434
|
-
if (!
|
|
435
|
-
|
|
432
|
+
let l = [], i = [], a = [];
|
|
433
|
+
const d = (h = !1) => {
|
|
434
|
+
if (!l.length) {
|
|
435
|
+
h && (i.forEach((v) => {
|
|
436
436
|
v.dispose?.();
|
|
437
437
|
}), a.forEach((v) => {
|
|
438
438
|
v.disconnect?.();
|
|
439
|
-
}),
|
|
439
|
+
}), i = [], a = []);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
const p = [],
|
|
443
|
-
|
|
444
|
-
const x =
|
|
445
|
-
if (
|
|
446
|
-
x?.dispose?.(),
|
|
442
|
+
const p = [], g = [], I = [];
|
|
443
|
+
l.forEach((v, C) => {
|
|
444
|
+
const x = i[C], b = a[C];
|
|
445
|
+
if (h || !v || !v.isConnected || (n?.value ? !n.value.contains(v) : !1)) {
|
|
446
|
+
x?.dispose?.(), b?.disconnect?.();
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
|
-
p.push(v), x &&
|
|
450
|
-
}),
|
|
451
|
-
},
|
|
452
|
-
|
|
449
|
+
p.push(v), x && g.push(x), b && I.push(b);
|
|
450
|
+
}), l = p, i = g, a = I;
|
|
451
|
+
}, $ = () => {
|
|
452
|
+
d(), !e.noEcharts && c && Array.from(
|
|
453
453
|
n.value.querySelectorAll(
|
|
454
|
-
`#${t} div.${
|
|
454
|
+
`#${t} div.${f}-echarts:not([data-processed])`
|
|
455
455
|
)
|
|
456
456
|
).forEach((p) => {
|
|
457
457
|
if (p.dataset.closed === "false")
|
|
458
458
|
return !1;
|
|
459
459
|
try {
|
|
460
|
-
const
|
|
461
|
-
|
|
460
|
+
const g = new Function(`return ${p.innerText}`)(), I = c.init(p, r.value);
|
|
461
|
+
I.setOption(g), p.setAttribute("data-processed", ""), l.push(p), i.push(I);
|
|
462
462
|
const v = new ResizeObserver(() => {
|
|
463
|
-
|
|
463
|
+
I.resize();
|
|
464
464
|
});
|
|
465
465
|
v.observe(p), a.push(v);
|
|
466
|
-
} catch (
|
|
466
|
+
} catch (g) {
|
|
467
467
|
y.emit(t, Q, {
|
|
468
468
|
name: "echarts",
|
|
469
|
-
message:
|
|
470
|
-
error:
|
|
469
|
+
message: g?.message,
|
|
470
|
+
error: g
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
});
|
|
474
474
|
};
|
|
475
|
-
return
|
|
476
|
-
|
|
477
|
-
}), { reRenderEcharts:
|
|
475
|
+
return te(() => {
|
|
476
|
+
d(!0);
|
|
477
|
+
}), { reRenderEcharts: m, replaceEcharts: $ };
|
|
478
478
|
}, at = (e) => {
|
|
479
|
-
const t =
|
|
480
|
-
return
|
|
481
|
-
e.noHighlight || r.value || (
|
|
479
|
+
const t = w("highlight"), r = ee(P.editorExtensions.highlight.instance);
|
|
480
|
+
return H(() => {
|
|
481
|
+
e.noHighlight || r.value || (O("link", {
|
|
482
482
|
...t.value.css,
|
|
483
483
|
rel: "stylesheet",
|
|
484
|
-
id:
|
|
485
|
-
}),
|
|
484
|
+
id: M.hlcss
|
|
485
|
+
}), O(
|
|
486
486
|
"script",
|
|
487
487
|
{
|
|
488
488
|
...t.value.js,
|
|
489
|
-
id:
|
|
489
|
+
id: M.hljs,
|
|
490
490
|
onload() {
|
|
491
491
|
r.value = window.hljs;
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
494
|
"hljs"
|
|
495
495
|
));
|
|
496
|
-
}),
|
|
496
|
+
}), E(
|
|
497
497
|
() => t.value.css,
|
|
498
498
|
() => {
|
|
499
|
-
e.noHighlight ||
|
|
499
|
+
e.noHighlight || P.editorExtensions.highlight.instance || Ge("link", {
|
|
500
500
|
...t.value.css,
|
|
501
501
|
rel: "stylesheet",
|
|
502
|
-
id:
|
|
502
|
+
id: M.hlcss
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
), r;
|
|
506
506
|
}, rt = (e) => {
|
|
507
|
-
const t =
|
|
508
|
-
return
|
|
507
|
+
const t = ee(P.editorExtensions.katex.instance);
|
|
508
|
+
return H(() => {
|
|
509
509
|
if (e.noKatex || t.value)
|
|
510
510
|
return;
|
|
511
|
-
const { editorExtensions: r, editorExtensionsAttrs: n } =
|
|
512
|
-
|
|
511
|
+
const { editorExtensions: r, editorExtensionsAttrs: n } = P;
|
|
512
|
+
O(
|
|
513
513
|
"script",
|
|
514
514
|
{
|
|
515
515
|
...n.katex?.js,
|
|
516
516
|
src: r.katex.js,
|
|
517
|
-
id:
|
|
517
|
+
id: M.katexjs,
|
|
518
518
|
onload() {
|
|
519
519
|
t.value = window.katex;
|
|
520
520
|
}
|
|
521
521
|
},
|
|
522
522
|
"katex"
|
|
523
|
-
),
|
|
523
|
+
), O("link", {
|
|
524
524
|
...n.katex?.css,
|
|
525
525
|
rel: "stylesheet",
|
|
526
526
|
href: r.katex.css,
|
|
527
|
-
id:
|
|
527
|
+
id: M.katexcss
|
|
528
528
|
});
|
|
529
529
|
}), t;
|
|
530
530
|
}, Y = new Qe({
|
|
@@ -532,229 +532,229 @@ const P = {
|
|
|
532
532
|
// 缓存10分钟
|
|
533
533
|
ttl: 6e5
|
|
534
534
|
}), lt = (e) => {
|
|
535
|
-
const t =
|
|
536
|
-
let
|
|
537
|
-
const
|
|
538
|
-
!e.noMermaid &&
|
|
539
|
-
|
|
535
|
+
const t = w("editorId"), r = w("theme"), n = w("rootRef"), { editorExtensions: o, editorExtensionsAttrs: u, mermaidConfig: c } = P;
|
|
536
|
+
let m = o.mermaid.instance;
|
|
537
|
+
const s = ee(-1), l = () => {
|
|
538
|
+
!e.noMermaid && m && (m.initialize(
|
|
539
|
+
c({
|
|
540
540
|
startOnLoad: !1,
|
|
541
541
|
theme: r.value === "dark" ? "dark" : "default"
|
|
542
542
|
})
|
|
543
|
-
),
|
|
543
|
+
), s.value = s.value + 1);
|
|
544
544
|
};
|
|
545
|
-
return
|
|
545
|
+
return E(
|
|
546
546
|
() => r.value,
|
|
547
547
|
() => {
|
|
548
|
-
Y.clear(),
|
|
548
|
+
Y.clear(), l();
|
|
549
549
|
}
|
|
550
|
-
),
|
|
551
|
-
if (e.noMermaid ||
|
|
550
|
+
), H(() => {
|
|
551
|
+
if (e.noMermaid || m)
|
|
552
552
|
return;
|
|
553
553
|
const a = o.mermaid.js;
|
|
554
|
-
/\.mjs/.test(a) ? (
|
|
555
|
-
...
|
|
554
|
+
/\.mjs/.test(a) ? (O("link", {
|
|
555
|
+
...u.mermaid?.js,
|
|
556
556
|
rel: "modulepreload",
|
|
557
557
|
href: a,
|
|
558
|
-
id:
|
|
558
|
+
id: M.mermaidM
|
|
559
559
|
}), import(
|
|
560
560
|
/* @vite-ignore */
|
|
561
561
|
/* webpackIgnore: true */
|
|
562
562
|
a
|
|
563
|
-
).then((
|
|
564
|
-
|
|
565
|
-
}).catch((
|
|
563
|
+
).then((d) => {
|
|
564
|
+
m = d.default, l();
|
|
565
|
+
}).catch((d) => {
|
|
566
566
|
y.emit(t, Q, {
|
|
567
567
|
name: "mermaid",
|
|
568
|
-
message: `Failed to load mermaid module: ${
|
|
569
|
-
error:
|
|
568
|
+
message: `Failed to load mermaid module: ${d.message}`,
|
|
569
|
+
error: d
|
|
570
570
|
});
|
|
571
|
-
})) :
|
|
571
|
+
})) : O(
|
|
572
572
|
"script",
|
|
573
573
|
{
|
|
574
|
-
...
|
|
574
|
+
...u.mermaid?.js,
|
|
575
575
|
src: a,
|
|
576
|
-
id:
|
|
576
|
+
id: M.mermaid,
|
|
577
577
|
onload() {
|
|
578
|
-
|
|
578
|
+
m = window.mermaid, l();
|
|
579
579
|
}
|
|
580
580
|
},
|
|
581
581
|
"mermaid"
|
|
582
582
|
);
|
|
583
|
-
}), { reRenderRef:
|
|
584
|
-
if (!e.noMermaid &&
|
|
583
|
+
}), { reRenderRef: s, replaceMermaid: async () => {
|
|
584
|
+
if (!e.noMermaid && m) {
|
|
585
585
|
const a = n.value.querySelectorAll(
|
|
586
|
-
`div.${
|
|
587
|
-
),
|
|
588
|
-
|
|
586
|
+
`div.${f}-mermaid`
|
|
587
|
+
), d = document.createElement("div"), $ = document.body.offsetWidth > 1366 ? document.body.offsetWidth : 1366, h = document.body.offsetHeight > 768 ? document.body.offsetHeight : 768;
|
|
588
|
+
d.style.width = $ + "px", d.style.height = h + "px", d.style.position = "fixed", d.style.zIndex = "-10000", d.style.top = "-10000";
|
|
589
589
|
let p = a.length;
|
|
590
|
-
p > 0 && document.body.appendChild(
|
|
591
|
-
Array.from(a).map((
|
|
590
|
+
p > 0 && document.body.appendChild(d), await Promise.allSettled(
|
|
591
|
+
Array.from(a).map((g) => (async (v) => {
|
|
592
592
|
if (v.dataset.closed === "false")
|
|
593
593
|
return !1;
|
|
594
594
|
const C = v.innerText;
|
|
595
595
|
let x = Y.get(C);
|
|
596
596
|
if (!x) {
|
|
597
|
-
const
|
|
598
|
-
let
|
|
597
|
+
const b = le();
|
|
598
|
+
let F = { svg: "" };
|
|
599
599
|
try {
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
} catch (
|
|
600
|
+
F = await m.render(b, C, d), x = await e.sanitizeMermaid(F.svg);
|
|
601
|
+
const S = document.createElement("p");
|
|
602
|
+
S.className = `${f}-mermaid`, S.setAttribute("data-processed", ""), S.setAttribute("data-content", C), S.innerHTML = x, S.children[0]?.removeAttribute("height"), Y.set(C, S.innerHTML), v.dataset.line !== void 0 && (S.dataset.line = v.dataset.line), v.replaceWith(S);
|
|
603
|
+
} catch (S) {
|
|
604
604
|
y.emit(t, Q, {
|
|
605
605
|
name: "mermaid",
|
|
606
|
-
message:
|
|
607
|
-
error:
|
|
606
|
+
message: S.message,
|
|
607
|
+
error: S
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
--p === 0 &&
|
|
610
|
+
--p === 0 && d.remove();
|
|
611
611
|
}
|
|
612
|
-
})(
|
|
612
|
+
})(g))
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
615
|
} };
|
|
616
616
|
}, it = (e, t) => {
|
|
617
617
|
t = t || {};
|
|
618
|
-
const r = 3, n = t.marker || "!", o = n.charCodeAt(0),
|
|
619
|
-
let
|
|
620
|
-
const
|
|
621
|
-
const p =
|
|
622
|
-
return p.type === "admonition_open" ?
|
|
618
|
+
const r = 3, n = t.marker || "!", o = n.charCodeAt(0), u = n.length;
|
|
619
|
+
let c = "", m = "";
|
|
620
|
+
const s = (i, a, d, $, h) => {
|
|
621
|
+
const p = i[a];
|
|
622
|
+
return p.type === "admonition_open" ? i[a].attrPush([
|
|
623
623
|
"class",
|
|
624
|
-
`${
|
|
625
|
-
]) : p.type === "admonition_title_open" &&
|
|
626
|
-
},
|
|
627
|
-
const a =
|
|
628
|
-
|
|
624
|
+
`${f}-admonition ${f}-admonition-${p.info}`
|
|
625
|
+
]) : p.type === "admonition_title_open" && i[a].attrPush(["class", `${f}-admonition-title`]), h.renderToken(i, a, d);
|
|
626
|
+
}, l = (i) => {
|
|
627
|
+
const a = i.trim().split(" ", 2);
|
|
628
|
+
m = "", c = a[0], a.length > 1 && (m = i.substring(c.length + 2));
|
|
629
629
|
};
|
|
630
630
|
e.block.ruler.before(
|
|
631
631
|
"code",
|
|
632
632
|
"admonition",
|
|
633
|
-
(
|
|
634
|
-
let
|
|
635
|
-
if (o !==
|
|
633
|
+
(i, a, d, $) => {
|
|
634
|
+
let h, p, g, I = !1, v = i.bMarks[a] + i.tShift[a], C = i.eMarks[a];
|
|
635
|
+
if (o !== i.src.charCodeAt(v))
|
|
636
636
|
return !1;
|
|
637
|
-
for (
|
|
637
|
+
for (h = v + 1; h <= C && n[(h - v) % u] === i.src[h]; h++)
|
|
638
638
|
;
|
|
639
|
-
const x = Math.floor((
|
|
639
|
+
const x = Math.floor((h - v) / u);
|
|
640
640
|
if (x !== r)
|
|
641
641
|
return !1;
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
if (
|
|
642
|
+
h -= (h - v) % u;
|
|
643
|
+
const b = i.src.slice(v, h), F = i.src.slice(h, C);
|
|
644
|
+
if (l(F), $)
|
|
645
645
|
return !0;
|
|
646
|
-
for (p = a; p++, !(p >=
|
|
647
|
-
if (o ===
|
|
648
|
-
for (
|
|
646
|
+
for (p = a; p++, !(p >= d || (v = i.bMarks[p] + i.tShift[p], C = i.eMarks[p], v < C && i.sCount[p] < i.blkIndent)); )
|
|
647
|
+
if (o === i.src.charCodeAt(v) && !(i.sCount[p] - i.blkIndent >= 4)) {
|
|
648
|
+
for (h = v + 1; h <= C && n[(h - v) % u] === i.src[h]; h++)
|
|
649
649
|
;
|
|
650
|
-
if (!(Math.floor((
|
|
651
|
-
|
|
650
|
+
if (!(Math.floor((h - v) / u) < x) && (h -= (h - v) % u, h = i.skipSpaces(h), !(h < C))) {
|
|
651
|
+
I = !0;
|
|
652
652
|
break;
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
const
|
|
656
|
-
return
|
|
655
|
+
const S = i.parentType, L = i.lineMax;
|
|
656
|
+
return i.parentType = "root", i.lineMax = p, g = i.push("admonition_open", "div", 1), g.markup = b, g.block = !0, g.info = c, g.map = [a, p], m && (g = i.push("admonition_title_open", "p", 1), g.markup = b + " " + c, g.map = [a, p], g = i.push("inline", "", 0), g.content = m, g.map = [a, i.line - 1], g.children = [], g = i.push("admonition_title_close", "p", -1), g.markup = b + " " + c), i.md.block.tokenize(i, a + 1, p), g = i.push("admonition_close", "div", -1), g.markup = i.src.slice(v, h), g.block = !0, i.parentType = S, i.lineMax = L, i.line = p + (I ? 1 : 0), !0;
|
|
657
657
|
},
|
|
658
658
|
{
|
|
659
659
|
alt: ["paragraph", "reference", "blockquote", "list"]
|
|
660
660
|
}
|
|
661
|
-
), e.renderer.rules.admonition_open =
|
|
662
|
-
},
|
|
661
|
+
), e.renderer.rules.admonition_open = s, e.renderer.rules.admonition_title_open = s, e.renderer.rules.admonition_title_close = s, e.renderer.rules.admonition_close = s;
|
|
662
|
+
}, se = (e, t) => {
|
|
663
663
|
const r = e.attrs ? e.attrs.slice() : [];
|
|
664
664
|
return t.forEach((n) => {
|
|
665
665
|
const o = e.attrIndex(n[0]);
|
|
666
666
|
o < 0 ? r.push(n) : (r[o] = r[o].slice(), r[o][1] += ` ${n[1]}`);
|
|
667
667
|
}), r;
|
|
668
668
|
}, st = (e, t) => {
|
|
669
|
-
const r = e.renderer.rules.fence, n = e.utils.unescapeAll, o = /\[(\w*)(?::([\w ]*))?\]/,
|
|
670
|
-
const
|
|
671
|
-
return [
|
|
672
|
-
},
|
|
673
|
-
const
|
|
674
|
-
return
|
|
675
|
-
},
|
|
676
|
-
const
|
|
677
|
-
`).length < t.autoFoldThreshold,
|
|
678
|
-
return { open:
|
|
679
|
-
},
|
|
680
|
-
if (a[
|
|
669
|
+
const r = e.renderer.rules.fence, n = e.utils.unescapeAll, o = /\[(\w*)(?::([\w ]*))?\]/, u = /::(open|close)/, c = (a) => a.info ? n(a.info).trim() : "", m = (a) => {
|
|
670
|
+
const d = c(a), [$ = null, h = ""] = (o.exec(d) || []).slice(1);
|
|
671
|
+
return [$, h];
|
|
672
|
+
}, s = (a) => {
|
|
673
|
+
const d = c(a);
|
|
674
|
+
return d ? d.split(/(\s+)/g)[0] : "";
|
|
675
|
+
}, l = (a) => {
|
|
676
|
+
const d = a.info.match(u) || [], $ = d[1] === "open" || d[1] !== "close" && t.codeFoldable && a.content.trim().split(`
|
|
677
|
+
`).length < t.autoFoldThreshold, h = d[1] || t.codeFoldable ? "details" : "div", p = d[1] || t.codeFoldable ? "summary" : "div";
|
|
678
|
+
return { open: $, tagContainer: h, tagHeader: p };
|
|
679
|
+
}, i = (a, d, $, h, p) => {
|
|
680
|
+
if (a[d].hidden)
|
|
681
681
|
return "";
|
|
682
|
-
const
|
|
682
|
+
const g = t.usedLanguageTextRef.value?.copyCode.text, I = t.customIconRef.value.copy || g, v = !!t.customIconRef.value.copy, C = `<span class="${f}-collapse-tips">${Ue("collapse-tips", t.customIconRef.value)}</span>`, [x] = m(a[d]);
|
|
683
683
|
if (x === null) {
|
|
684
|
-
const { open:
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
-
attrs:
|
|
684
|
+
const { open: k, tagContainer: A, tagHeader: J } = l(a[d]), j = [["class", `${f}-code`]];
|
|
685
|
+
k && j.push(["open", ""]);
|
|
686
|
+
const ne = {
|
|
687
|
+
attrs: se(a[d], j)
|
|
688
688
|
};
|
|
689
|
-
a[
|
|
690
|
-
const W = r(a,
|
|
689
|
+
a[d].info = a[d].info.replace(u, "");
|
|
690
|
+
const W = r(a, d, $, h, p);
|
|
691
691
|
return `
|
|
692
|
-
<${
|
|
693
|
-
<${J} class="${
|
|
694
|
-
<div class="${
|
|
695
|
-
<div class="${
|
|
696
|
-
<span class="${
|
|
697
|
-
<span class="${
|
|
698
|
-
${t.extraTools instanceof Function ? t.extraTools({ lang: a[
|
|
699
|
-
${
|
|
692
|
+
<${A} ${p.renderAttrs(ne)}>
|
|
693
|
+
<${J} class="${f}-code-head">
|
|
694
|
+
<div class="${f}-code-flag"><span></span><span></span><span></span></div>
|
|
695
|
+
<div class="${f}-code-action">
|
|
696
|
+
<span class="${f}-code-lang">${e.utils.escapeHtml(a[d].info.trim())}</span>
|
|
697
|
+
<span class="${f}-copy-button" data-tips="${g}"${v ? " data-is-icon=true" : ""}>${I}</span>
|
|
698
|
+
${t.extraTools instanceof Function ? t.extraTools({ lang: a[d].info.trim() }) : t.extraTools || ""}
|
|
699
|
+
${A === "details" ? C : ""}
|
|
700
700
|
</div>
|
|
701
701
|
</${J}>
|
|
702
702
|
${W}
|
|
703
|
-
</${
|
|
703
|
+
</${A}>
|
|
704
704
|
`;
|
|
705
705
|
}
|
|
706
|
-
let
|
|
707
|
-
const { open: q, tagContainer: V, tagHeader: z } =
|
|
706
|
+
let b, F, S, L, _ = "", B = "", D = "";
|
|
707
|
+
const { open: q, tagContainer: V, tagHeader: z } = l(a[d]), K = [["class", `${f}-code`]];
|
|
708
708
|
q && K.push(["open", ""]);
|
|
709
709
|
const Z = {
|
|
710
|
-
attrs:
|
|
710
|
+
attrs: se(a[d], K)
|
|
711
711
|
};
|
|
712
|
-
for (let
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
|
|
712
|
+
for (let k = d; k < a.length && (b = a[k], [F, S] = m(b), F === x); k++) {
|
|
713
|
+
b.info = b.info.replace(o, "").replace(u, ""), b.hidden = !0;
|
|
714
|
+
const A = `${f}-codetab-${t.editorId}-${d}-${k - d}`;
|
|
715
|
+
L = k - d > 0 ? "" : "checked", _ += `
|
|
716
716
|
<li>
|
|
717
717
|
<input
|
|
718
718
|
type="radio"
|
|
719
|
-
id="label-${
|
|
720
|
-
name="${
|
|
721
|
-
class="${
|
|
722
|
-
${
|
|
719
|
+
id="label-${f}-codetab-label-1-${t.editorId}-${d}-${k - d}"
|
|
720
|
+
name="${f}-codetab-label-${t.editorId}-${d}"
|
|
721
|
+
class="${A}"
|
|
722
|
+
${L}
|
|
723
723
|
>
|
|
724
724
|
<label
|
|
725
|
-
for="label-${
|
|
726
|
-
onclick="this.getRootNode().querySelectorAll('.${
|
|
725
|
+
for="label-${f}-codetab-label-1-${t.editorId}-${d}-${k - d}"
|
|
726
|
+
onclick="this.getRootNode().querySelectorAll('.${A}').forEach(e => e.click())"
|
|
727
727
|
>
|
|
728
|
-
${e.utils.escapeHtml(
|
|
728
|
+
${e.utils.escapeHtml(S || s(b))}
|
|
729
729
|
</label>
|
|
730
730
|
</li>`, B += `
|
|
731
731
|
<div role="tabpanel">
|
|
732
732
|
<input
|
|
733
733
|
type="radio"
|
|
734
|
-
name="${
|
|
735
|
-
class="${
|
|
736
|
-
${
|
|
734
|
+
name="${f}-codetab-pre-${t.editorId}-${d}"
|
|
735
|
+
class="${A}"
|
|
736
|
+
${L}
|
|
737
737
|
role="presentation">
|
|
738
|
-
${r(a,
|
|
738
|
+
${r(a, k, $, h, p)}
|
|
739
739
|
</div>`, D += `
|
|
740
740
|
<input
|
|
741
741
|
type="radio"
|
|
742
|
-
name="${
|
|
743
|
-
class="${
|
|
744
|
-
${
|
|
742
|
+
name="${f}-codetab-lang-${t.editorId}-${d}"
|
|
743
|
+
class="${A}"
|
|
744
|
+
${L}
|
|
745
745
|
role="presentation">
|
|
746
|
-
<span class=${
|
|
746
|
+
<span class=${f}-code-lang role="note">${e.utils.escapeHtml(s(b))}</span>`;
|
|
747
747
|
}
|
|
748
748
|
return `
|
|
749
749
|
<${V} ${p.renderAttrs(Z)}>
|
|
750
|
-
<${z} class="${
|
|
751
|
-
<div class="${
|
|
752
|
-
<ul class="${
|
|
750
|
+
<${z} class="${f}-code-head">
|
|
751
|
+
<div class="${f}-code-flag">
|
|
752
|
+
<ul class="${f}-codetab-label" role="tablist">${_}</ul>
|
|
753
753
|
</div>
|
|
754
|
-
<div class="${
|
|
755
|
-
<span class="${
|
|
756
|
-
<span class="${
|
|
757
|
-
${t.extraTools instanceof Function ? t.extraTools({ lang: a[
|
|
754
|
+
<div class="${f}-code-action">
|
|
755
|
+
<span class="${f}-codetab-lang">${D}</span>
|
|
756
|
+
<span class="${f}-copy-button" data-tips="${g}"${v ? " data-is-icon=true" : ""}>${I}</span>
|
|
757
|
+
${t.extraTools instanceof Function ? t.extraTools({ lang: a[d].info.trim() }) : t.extraTools || ""}
|
|
758
758
|
${V === "details" ? C : ""}
|
|
759
759
|
</div>
|
|
760
760
|
</${z}>
|
|
@@ -762,40 +762,40 @@ const P = {
|
|
|
762
762
|
</${V}>
|
|
763
763
|
`;
|
|
764
764
|
};
|
|
765
|
-
e.renderer.rules.fence =
|
|
765
|
+
e.renderer.rules.fence = i, e.renderer.rules.code_block = i;
|
|
766
766
|
}, ct = (e, t) => {
|
|
767
767
|
const r = e.renderer.rules.fence.bind(e.renderer.rules);
|
|
768
|
-
e.renderer.rules.fence = (n, o,
|
|
769
|
-
const
|
|
770
|
-
if (
|
|
771
|
-
if (
|
|
772
|
-
const
|
|
773
|
-
|
|
768
|
+
e.renderer.rules.fence = (n, o, u, c, m) => {
|
|
769
|
+
const s = n[o], l = s.content.trim();
|
|
770
|
+
if (s.info === "echarts") {
|
|
771
|
+
if (s.attrSet("class", `${f}-echarts`), s.attrSet("data-echarts-theme", t.themeRef.value), s.map && s.level === 0) {
|
|
772
|
+
const i = s.map[1] - 1, d = !!c.srcLines[i]?.trim()?.startsWith("```");
|
|
773
|
+
s.attrSet("data-closed", `${d}`), s.attrSet("data-line", String(s.map[0]));
|
|
774
774
|
}
|
|
775
|
-
return `<div ${
|
|
775
|
+
return `<div ${m.renderAttrs(s)} style="width: 100%; aspect-ratio: 4 / 3;">${e.utils.escapeHtml(l)}</div>`;
|
|
776
776
|
}
|
|
777
|
-
return r(n, o,
|
|
777
|
+
return r(n, o, u, c, m);
|
|
778
778
|
};
|
|
779
779
|
}, dt = (e, t) => {
|
|
780
780
|
e.renderer.rules.heading_open = (r, n) => {
|
|
781
|
-
const o = r[n],
|
|
781
|
+
const o = r[n], u = r[n + 1].children?.reduce((m, s) => m + (["text", "code_inline", "math_inline"].includes(s.type) && s.content || ""), "") || "", c = o.markup.length;
|
|
782
782
|
return t.headsRef.value.push({
|
|
783
|
-
text:
|
|
784
|
-
level:
|
|
783
|
+
text: u,
|
|
784
|
+
level: c,
|
|
785
785
|
line: o.map[0],
|
|
786
786
|
currentToken: o,
|
|
787
787
|
nextToken: r[n + 1]
|
|
788
788
|
}), o.map && o.level === 0 && o.attrSet(
|
|
789
789
|
"id",
|
|
790
790
|
t.mdHeadingId({
|
|
791
|
-
text:
|
|
792
|
-
level:
|
|
791
|
+
text: u,
|
|
792
|
+
level: c,
|
|
793
793
|
index: t.headsRef.value.length,
|
|
794
794
|
currentToken: o,
|
|
795
795
|
nextToken: r[n + 1]
|
|
796
796
|
})
|
|
797
797
|
), e.renderer.renderToken(r, n, t);
|
|
798
|
-
}, e.renderer.rules.heading_close = (r, n, o,
|
|
798
|
+
}, e.renderer.rules.heading_close = (r, n, o, u, c) => c.renderToken(r, n, o);
|
|
799
799
|
}, be = {
|
|
800
800
|
block: [
|
|
801
801
|
{ open: "$$", close: "$$" },
|
|
@@ -809,74 +809,84 @@ const P = {
|
|
|
809
809
|
]
|
|
810
810
|
}, ut = (e) => (t, r) => {
|
|
811
811
|
const n = e.delimiters;
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
812
|
+
for (const o of n) {
|
|
813
|
+
if (!t.src.startsWith(o.open, t.pos))
|
|
814
|
+
continue;
|
|
815
|
+
const u = t.pos + o.open.length;
|
|
816
|
+
let c = u;
|
|
817
|
+
for (; (c = t.src.indexOf(o.close, c)) !== -1; ) {
|
|
818
|
+
let m = 0, s = c - 1;
|
|
819
|
+
for (; s >= 0 && t.src[s] === "\\"; )
|
|
820
|
+
m++, s--;
|
|
821
|
+
if (m % 2 === 0)
|
|
822
|
+
break;
|
|
823
|
+
c += o.close.length;
|
|
824
|
+
}
|
|
825
|
+
if (c !== -1) {
|
|
826
|
+
if (c - u === 0)
|
|
827
|
+
return r || (t.pending += o.open + o.close), t.pos = c + o.close.length, !0;
|
|
827
828
|
if (!r) {
|
|
828
|
-
const
|
|
829
|
-
m
|
|
829
|
+
const m = t.push("math_inline", "math", 0);
|
|
830
|
+
m.markup = o.open, m.content = t.src.slice(u, c);
|
|
830
831
|
}
|
|
831
|
-
return t.pos =
|
|
832
|
+
return t.pos = c + o.close.length, !0;
|
|
832
833
|
}
|
|
834
|
+
}
|
|
833
835
|
return !1;
|
|
834
836
|
}, mt = (e) => (t, r, n, o) => {
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
837
|
+
const u = e.delimiters, c = t.bMarks[r] + t.tShift[r], m = t.eMarks[r], s = (l, i, a) => {
|
|
838
|
+
t.line = i;
|
|
839
|
+
const d = t.push("math_block", "math", 0);
|
|
840
|
+
return d.block = !0, d.content = l, d.map = [r, t.line], d.markup = a, !0;
|
|
841
|
+
};
|
|
842
|
+
for (const l of u) {
|
|
843
|
+
const i = c;
|
|
844
|
+
if (t.src.slice(i, i + l.open.length) !== l.open)
|
|
845
|
+
continue;
|
|
846
|
+
const a = i + l.open.length, d = t.src.slice(a, m).trim(), $ = d === "", h = d === l.close, p = d.endsWith(l.close);
|
|
847
|
+
if (!$ && !h && !p)
|
|
848
|
+
continue;
|
|
849
|
+
if (o)
|
|
850
|
+
return !0;
|
|
851
|
+
if (h)
|
|
852
|
+
return s("", r + 1, l.open);
|
|
853
|
+
if (!$ && p) {
|
|
854
|
+
const b = d.slice(0, -l.close.length);
|
|
855
|
+
return s(b, r + 1, l.open);
|
|
856
|
+
}
|
|
857
|
+
let g = r + 1, I = !1, v = "";
|
|
858
|
+
for (; g < n; g++) {
|
|
859
|
+
const b = t.bMarks[g] + t.tShift[g], F = t.eMarks[g];
|
|
860
|
+
if (b < F && t.tShift[g] < t.blkIndent)
|
|
861
|
+
break;
|
|
862
|
+
if (t.src.slice(b, F).trim().endsWith(l.close)) {
|
|
863
|
+
const L = t.src.slice(0, F).lastIndexOf(l.close);
|
|
864
|
+
v = t.src.slice(b, L), I = !0;
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
847
867
|
}
|
|
868
|
+
if (!I)
|
|
869
|
+
continue;
|
|
870
|
+
const x = t.getLines(r + 1, g, t.tShift[r], !0) + (v.trim() ? v : "");
|
|
871
|
+
return s(x, g + 1, l.open);
|
|
872
|
+
}
|
|
848
873
|
return !1;
|
|
849
874
|
}, ft = (e, { katexRef: t, inlineDelimiters: r, blockDelimiters: n }) => {
|
|
850
|
-
const o = (
|
|
851
|
-
const
|
|
852
|
-
attrs:
|
|
853
|
-
};
|
|
854
|
-
if (t.value)
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
const a = d[c], s = {
|
|
866
|
-
attrs: ee(a, [["class", `${h}-katex-block`]])
|
|
867
|
-
};
|
|
868
|
-
if (t.value) {
|
|
869
|
-
const g = t.value.renderToString(
|
|
870
|
-
a.content,
|
|
871
|
-
M.katexConfig({
|
|
872
|
-
throwOnError: !1,
|
|
873
|
-
displayMode: !0
|
|
874
|
-
})
|
|
875
|
-
);
|
|
876
|
-
return `<p ${l.renderAttrs(s)} data-processed>${g}</p>`;
|
|
877
|
-
} else
|
|
878
|
-
return `<p ${l.renderAttrs(s)}>${a.content}</p>`;
|
|
879
|
-
};
|
|
875
|
+
const o = (m, s, l, i, a = !1) => {
|
|
876
|
+
const d = {
|
|
877
|
+
attrs: se(m, [["class", s]])
|
|
878
|
+
}, $ = i.renderAttrs(d);
|
|
879
|
+
if (!t.value)
|
|
880
|
+
return `<${l} ${$}>${m.content}</${l}>`;
|
|
881
|
+
const h = t.value.renderToString(
|
|
882
|
+
m.content,
|
|
883
|
+
P.katexConfig({
|
|
884
|
+
throwOnError: !1,
|
|
885
|
+
displayMode: a
|
|
886
|
+
})
|
|
887
|
+
);
|
|
888
|
+
return `<${l} ${$} data-processed>${h}</${l}>`;
|
|
889
|
+
}, u = (m, s, l, i, a) => o(m[s], `${f}-katex-inline`, "span", a), c = (m, s, l, i, a) => o(m[s], `${f}-katex-block`, "p", a, !0);
|
|
880
890
|
e.inline.ruler.before(
|
|
881
891
|
"escape",
|
|
882
892
|
"math_inline",
|
|
@@ -892,20 +902,20 @@ const P = {
|
|
|
892
902
|
{
|
|
893
903
|
alt: ["paragraph", "reference", "blockquote", "list"]
|
|
894
904
|
}
|
|
895
|
-
), e.renderer.rules.math_inline =
|
|
905
|
+
), e.renderer.rules.math_inline = u, e.renderer.rules.math_block = c;
|
|
896
906
|
}, ht = (e, t) => {
|
|
897
907
|
const r = e.renderer.rules.fence.bind(e.renderer.rules);
|
|
898
|
-
e.renderer.rules.fence = (n, o,
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
901
|
-
if (
|
|
902
|
-
const a =
|
|
903
|
-
|
|
908
|
+
e.renderer.rules.fence = (n, o, u, c, m) => {
|
|
909
|
+
const s = n[o], l = s.content.trim();
|
|
910
|
+
if (s.info === "mermaid") {
|
|
911
|
+
if (s.attrSet("class", `${f}-mermaid`), s.attrSet("data-mermaid-theme", t.themeRef.value), s.map && s.level === 0) {
|
|
912
|
+
const a = s.map[1] - 1, $ = !!c.srcLines[a]?.trim()?.startsWith("```");
|
|
913
|
+
s.attrSet("data-closed", `${$}`), s.attrSet("data-line", String(s.map[0]));
|
|
904
914
|
}
|
|
905
|
-
const
|
|
906
|
-
return
|
|
915
|
+
const i = Y.get(l);
|
|
916
|
+
return i ? (s.attrSet("data-processed", ""), s.attrSet("data-content", l), `<p ${m.renderAttrs(s)}>${i}</p>`) : `<div ${m.renderAttrs(s)}>${e.utils.escapeHtml(l)}</div>`;
|
|
907
917
|
}
|
|
908
|
-
return r(n, o,
|
|
918
|
+
return r(n, o, u, c, m);
|
|
909
919
|
};
|
|
910
920
|
}, $e = (e, t, r) => {
|
|
911
921
|
const n = e.attrIndex(t), o = [t, r];
|
|
@@ -922,18 +932,18 @@ const P = {
|
|
|
922
932
|
}, Ct = (e) => {
|
|
923
933
|
const t = new e("html_inline", "", 0);
|
|
924
934
|
return t.content = "</label>", t;
|
|
925
|
-
},
|
|
935
|
+
}, Et = (e, t, r) => {
|
|
926
936
|
const n = new r("html_inline", "", 0);
|
|
927
937
|
return n.content = '<label class="task-list-item-label" for="' + t + '">' + e + "</label>", n.attrs = [["for", t]], n;
|
|
928
|
-
},
|
|
938
|
+
}, kt = (e, t, r) => {
|
|
929
939
|
const n = new t("html_inline", "", 0), o = r.enabled ? " " : ' disabled="" ';
|
|
930
940
|
return e.content.indexOf("[ ] ") === 0 ? n.content = '<input class="task-list-item-checkbox"' + o + 'type="checkbox">' : (e.content.indexOf("[x] ") === 0 || e.content.indexOf("[X] ") === 0) && (n.content = '<input class="task-list-item-checkbox" checked=""' + o + 'type="checkbox">'), n;
|
|
931
941
|
}, Tt = (e, t, r) => {
|
|
932
|
-
if (e.children = e.children || [], e.children.unshift(
|
|
942
|
+
if (e.children = e.children || [], e.children.unshift(kt(e, t, r)), e.children[1].content = e.children[1].content.slice(3), e.content = e.content.slice(3), r.label)
|
|
933
943
|
if (r.labelAfter) {
|
|
934
944
|
e.children.pop();
|
|
935
945
|
const n = "task-item-" + Math.ceil(Math.random() * (1e4 * 1e3) - 1e3);
|
|
936
|
-
e.children[0].content = e.children[0].content.slice(0, -1) + ' id="' + n + '">', e.children.push(
|
|
946
|
+
e.children[0].content = e.children[0].content.slice(0, -1) + ' id="' + n + '">', e.children.push(Et(e.content, n, t));
|
|
937
947
|
} else
|
|
938
948
|
e.children.unshift(wt(t)), e.children.push(Ct(t));
|
|
939
949
|
}, It = (e, t = {}) => {
|
|
@@ -951,17 +961,17 @@ const P = {
|
|
|
951
961
|
r.map && (r.attrs || (r.attrs = []), r.attrs.push(["data-line", r.map[0].toString()]));
|
|
952
962
|
}), !0));
|
|
953
963
|
}, xt = (e, t) => {
|
|
954
|
-
const { editorConfig: r, markdownItConfig: n, markdownItPlugins: o, editorExtensions:
|
|
964
|
+
const { editorConfig: r, markdownItConfig: n, markdownItPlugins: o, editorExtensions: u } = P, c = w("editorId"), m = w("language"), s = w(
|
|
955
965
|
"usedLanguageText"
|
|
956
|
-
),
|
|
966
|
+
), l = w("showCodeRowNumber"), i = w("theme"), a = w("customIcon"), d = w("rootRef"), $ = w("setting"), h = G([]), p = at(e), g = rt(e), { reRenderRef: I, replaceMermaid: v } = lt(e), { reRenderEcharts: C, replaceEcharts: x } = ot(e), b = Ke({
|
|
957
967
|
html: !0,
|
|
958
968
|
breaks: !0,
|
|
959
969
|
linkify: !0
|
|
960
970
|
});
|
|
961
|
-
n(
|
|
962
|
-
editorId:
|
|
971
|
+
n(b, {
|
|
972
|
+
editorId: c
|
|
963
973
|
});
|
|
964
|
-
const
|
|
974
|
+
const F = [
|
|
965
975
|
{
|
|
966
976
|
type: "image",
|
|
967
977
|
plugin: Ze,
|
|
@@ -980,14 +990,14 @@ const P = {
|
|
|
980
990
|
{
|
|
981
991
|
type: "heading",
|
|
982
992
|
plugin: dt,
|
|
983
|
-
options: { mdHeadingId: e.mdHeadingId, headsRef:
|
|
993
|
+
options: { mdHeadingId: e.mdHeadingId, headsRef: h }
|
|
984
994
|
},
|
|
985
995
|
{
|
|
986
996
|
type: "code",
|
|
987
997
|
plugin: st,
|
|
988
998
|
options: {
|
|
989
|
-
editorId:
|
|
990
|
-
usedLanguageTextRef:
|
|
999
|
+
editorId: c,
|
|
1000
|
+
usedLanguageTextRef: s,
|
|
991
1001
|
// showCodeRowNumber,
|
|
992
1002
|
codeFoldable: e.codeFoldable,
|
|
993
1003
|
autoFoldThreshold: e.autoFoldThreshold,
|
|
@@ -1005,46 +1015,46 @@ const P = {
|
|
|
1005
1015
|
options: {}
|
|
1006
1016
|
}
|
|
1007
1017
|
];
|
|
1008
|
-
e.noKatex ||
|
|
1018
|
+
e.noKatex || F.push({
|
|
1009
1019
|
type: "katex",
|
|
1010
1020
|
plugin: ft,
|
|
1011
|
-
options: { katexRef:
|
|
1012
|
-
}), e.noMermaid ||
|
|
1021
|
+
options: { katexRef: g }
|
|
1022
|
+
}), e.noMermaid || F.push({
|
|
1013
1023
|
type: "mermaid",
|
|
1014
1024
|
plugin: ht,
|
|
1015
|
-
options: { themeRef:
|
|
1016
|
-
}), e.noEcharts ||
|
|
1025
|
+
options: { themeRef: i }
|
|
1026
|
+
}), e.noEcharts || F.push({
|
|
1017
1027
|
type: "echarts",
|
|
1018
1028
|
plugin: ct,
|
|
1019
|
-
options: { themeRef:
|
|
1020
|
-
}), o(
|
|
1021
|
-
editorId:
|
|
1022
|
-
}).forEach((
|
|
1023
|
-
|
|
1029
|
+
options: { themeRef: i }
|
|
1030
|
+
}), o(F, {
|
|
1031
|
+
editorId: c
|
|
1032
|
+
}).forEach((k) => {
|
|
1033
|
+
b.use(k.plugin, k.options);
|
|
1024
1034
|
});
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
highlight: (
|
|
1028
|
-
if (
|
|
1029
|
-
const W =
|
|
1035
|
+
const S = b.options.highlight;
|
|
1036
|
+
b.set({
|
|
1037
|
+
highlight: (k, A, J) => {
|
|
1038
|
+
if (S) {
|
|
1039
|
+
const W = S(k, A, J);
|
|
1030
1040
|
if (W)
|
|
1031
1041
|
return W;
|
|
1032
1042
|
}
|
|
1033
1043
|
let j;
|
|
1034
|
-
!e.noHighlight && p.value ? p.value.getLanguage(
|
|
1035
|
-
language:
|
|
1044
|
+
!e.noHighlight && p.value ? p.value.getLanguage(A) ? j = p.value.highlight(k, {
|
|
1045
|
+
language: A,
|
|
1036
1046
|
ignoreIllegals: !0
|
|
1037
|
-
}).value : j = p.value.highlightAuto(
|
|
1038
|
-
const
|
|
1047
|
+
}).value : j = p.value.highlightAuto(k).value : j = b.utils.escapeHtml(k);
|
|
1048
|
+
const ne = l ? Ye(
|
|
1039
1049
|
j.replace(/^\n+|\n+$/g, ""),
|
|
1040
|
-
|
|
1041
|
-
) : `<span class="${
|
|
1042
|
-
return `<pre><code class="language-${
|
|
1050
|
+
k.replace(/^\n+|\n+$/g, "")
|
|
1051
|
+
) : `<span class="${f}-code-block">${j.replace(/^\n+|\n+$/g, "")}</span>`;
|
|
1052
|
+
return `<pre><code class="language-${A}" language=${A}>${ne}</code></pre>`;
|
|
1043
1053
|
}
|
|
1044
|
-
}), St(
|
|
1045
|
-
const
|
|
1054
|
+
}), St(b);
|
|
1055
|
+
const L = G(`_article-key_${le()}`), _ = G(
|
|
1046
1056
|
e.sanitize(
|
|
1047
|
-
|
|
1057
|
+
b.render(e.modelValue, {
|
|
1048
1058
|
srcLines: e.modelValue.split(`
|
|
1049
1059
|
`)
|
|
1050
1060
|
})
|
|
@@ -1054,71 +1064,71 @@ const P = {
|
|
|
1054
1064
|
}, D = () => {
|
|
1055
1065
|
};
|
|
1056
1066
|
const q = () => {
|
|
1057
|
-
const
|
|
1058
|
-
`#${
|
|
1067
|
+
const k = d.value?.querySelectorAll(
|
|
1068
|
+
`#${c} p.${f}-mermaid:not([data-closed=false])`
|
|
1059
1069
|
);
|
|
1060
|
-
D(), D = ze(
|
|
1070
|
+
D(), D = ze(k, {
|
|
1061
1071
|
customIcon: a.value
|
|
1062
|
-
}),
|
|
1072
|
+
}), u.mermaid?.enableZoom && (B(), B = We(k, {
|
|
1063
1073
|
customIcon: a.value
|
|
1064
1074
|
}));
|
|
1065
1075
|
}, V = () => {
|
|
1066
|
-
y.emit(
|
|
1076
|
+
y.emit(c, X, _.value), e.onHtmlChanged(_.value), e.onGetCatalog(h.value), y.emit(c, oe, h.value), U(() => {
|
|
1067
1077
|
v().then(q), x();
|
|
1068
1078
|
});
|
|
1069
1079
|
}, z = () => {
|
|
1070
|
-
|
|
1071
|
-
|
|
1080
|
+
h.value = [], _.value = e.sanitize(
|
|
1081
|
+
b.render(e.modelValue, {
|
|
1072
1082
|
srcLines: e.modelValue.split(`
|
|
1073
1083
|
`)
|
|
1074
1084
|
})
|
|
1075
1085
|
);
|
|
1076
|
-
}, K =
|
|
1086
|
+
}, K = R(() => (e.noKatex || !!g.value) && (e.noHighlight || !!p.value));
|
|
1077
1087
|
let Z = -1;
|
|
1078
|
-
return
|
|
1088
|
+
return E([Re(e, "modelValue"), K, I, m], () => {
|
|
1079
1089
|
Z = window.setTimeout(
|
|
1080
1090
|
() => {
|
|
1081
1091
|
z();
|
|
1082
1092
|
},
|
|
1083
1093
|
t ? 0 : r.renderDelay
|
|
1084
1094
|
);
|
|
1085
|
-
}),
|
|
1086
|
-
() =>
|
|
1095
|
+
}), E(
|
|
1096
|
+
() => $.value.preview,
|
|
1087
1097
|
() => {
|
|
1088
|
-
|
|
1089
|
-
v().then(q), x(), y.emit(
|
|
1098
|
+
$.value.preview && U(() => {
|
|
1099
|
+
v().then(q), x(), y.emit(c, oe, h.value);
|
|
1090
1100
|
});
|
|
1091
1101
|
}
|
|
1092
|
-
),
|
|
1102
|
+
), E([_, C], () => {
|
|
1093
1103
|
V();
|
|
1094
|
-
}),
|
|
1095
|
-
y.on(
|
|
1104
|
+
}), H(V), H(() => {
|
|
1105
|
+
y.on(c, {
|
|
1096
1106
|
name: De,
|
|
1097
1107
|
callback() {
|
|
1098
|
-
y.emit(
|
|
1108
|
+
y.emit(c, oe, h.value);
|
|
1099
1109
|
}
|
|
1100
|
-
}), y.on(
|
|
1110
|
+
}), y.on(c, {
|
|
1101
1111
|
name: de,
|
|
1102
1112
|
callback: () => {
|
|
1103
|
-
|
|
1113
|
+
L.value = `_article-key_${le()}`, z();
|
|
1104
1114
|
}
|
|
1105
1115
|
});
|
|
1106
|
-
}),
|
|
1116
|
+
}), te(() => {
|
|
1107
1117
|
B(), D(), clearTimeout(Z);
|
|
1108
|
-
}), { html:
|
|
1118
|
+
}), { html: _, key: L };
|
|
1109
1119
|
}, Ft = (e, t) => {
|
|
1110
|
-
const r =
|
|
1111
|
-
const
|
|
1120
|
+
const r = w("editorId"), n = w("setting"), { noImgZoomIn: o } = e, u = Le(() => {
|
|
1121
|
+
const c = document.querySelectorAll(
|
|
1112
1122
|
`#${r}-preview img:not(.not-zoom):not(.medium-zoom-image)`
|
|
1113
1123
|
);
|
|
1114
|
-
|
|
1124
|
+
c.length !== 0 && et(c, {
|
|
1115
1125
|
background: "#00000073"
|
|
1116
1126
|
});
|
|
1117
1127
|
});
|
|
1118
|
-
|
|
1119
|
-
!o && n.value.preview && await
|
|
1120
|
-
}),
|
|
1121
|
-
!o && n.value.preview && await
|
|
1128
|
+
H(async () => {
|
|
1129
|
+
!o && n.value.preview && await u();
|
|
1130
|
+
}), E([t, () => n.value.preview], async () => {
|
|
1131
|
+
!o && n.value.preview && await u();
|
|
1122
1132
|
});
|
|
1123
1133
|
}, we = {
|
|
1124
1134
|
checked: {
|
|
@@ -1129,55 +1139,55 @@ const P = {
|
|
|
1129
1139
|
regexp: /- \[\s\]/,
|
|
1130
1140
|
value: "- [x]"
|
|
1131
1141
|
}
|
|
1132
|
-
},
|
|
1133
|
-
const r =
|
|
1142
|
+
}, Rt = (e, t) => {
|
|
1143
|
+
const r = w("editorId"), n = w("rootRef");
|
|
1134
1144
|
let o = () => {
|
|
1135
1145
|
};
|
|
1136
|
-
const
|
|
1146
|
+
const u = () => {
|
|
1137
1147
|
if (!n.value)
|
|
1138
1148
|
return !1;
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
if (!
|
|
1149
|
+
const c = n.value.querySelectorAll(".task-list-item.enabled"), m = (s) => {
|
|
1150
|
+
s.preventDefault();
|
|
1151
|
+
const l = s.target.checked ? "unChecked" : "checked", i = s.target.parentElement?.dataset.line;
|
|
1152
|
+
if (!i)
|
|
1143
1153
|
return;
|
|
1144
|
-
const a = Number(
|
|
1145
|
-
`),
|
|
1146
|
-
we[
|
|
1147
|
-
we[
|
|
1154
|
+
const a = Number(i), d = e.modelValue.split(`
|
|
1155
|
+
`), $ = d[Number(a)].replace(
|
|
1156
|
+
we[l].regexp,
|
|
1157
|
+
we[l].value
|
|
1148
1158
|
);
|
|
1149
|
-
e.previewOnly ? (
|
|
1150
|
-
`))) : y.emit(r, Ve, a + 1,
|
|
1159
|
+
e.previewOnly ? (d[Number(a)] = $, e.onChange(d.join(`
|
|
1160
|
+
`))) : y.emit(r, Ve, a + 1, $);
|
|
1151
1161
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1162
|
+
c.forEach((s) => {
|
|
1163
|
+
s.addEventListener("click", m);
|
|
1154
1164
|
}), o = () => {
|
|
1155
|
-
|
|
1156
|
-
|
|
1165
|
+
c.forEach((s) => {
|
|
1166
|
+
s.removeEventListener("click", m);
|
|
1157
1167
|
});
|
|
1158
1168
|
};
|
|
1159
1169
|
};
|
|
1160
|
-
|
|
1170
|
+
te(() => {
|
|
1161
1171
|
o();
|
|
1162
|
-
}),
|
|
1172
|
+
}), E(
|
|
1163
1173
|
[t],
|
|
1164
1174
|
() => {
|
|
1165
|
-
o(),
|
|
1175
|
+
o(), U(u);
|
|
1166
1176
|
},
|
|
1167
1177
|
{
|
|
1168
1178
|
immediate: !0
|
|
1169
1179
|
}
|
|
1170
1180
|
);
|
|
1171
|
-
},
|
|
1172
|
-
const n =
|
|
1173
|
-
|
|
1181
|
+
}, At = (e, t, r) => {
|
|
1182
|
+
const n = w("setting"), o = () => {
|
|
1183
|
+
U(() => {
|
|
1174
1184
|
e.onRemount?.();
|
|
1175
1185
|
});
|
|
1176
|
-
},
|
|
1177
|
-
|
|
1186
|
+
}, u = (c) => {
|
|
1187
|
+
c && o();
|
|
1178
1188
|
};
|
|
1179
|
-
|
|
1180
|
-
},
|
|
1189
|
+
E([t, r], o), E(() => n.value.preview, u), E(() => n.value.htmlPreview, u), H(o);
|
|
1190
|
+
}, Ie = {
|
|
1181
1191
|
modelValue: {
|
|
1182
1192
|
type: String,
|
|
1183
1193
|
default: ""
|
|
@@ -1243,9 +1253,13 @@ const P = {
|
|
|
1243
1253
|
},
|
|
1244
1254
|
noEcharts: {
|
|
1245
1255
|
type: Boolean
|
|
1256
|
+
},
|
|
1257
|
+
previewComponent: {
|
|
1258
|
+
type: [Object, Function],
|
|
1259
|
+
default: void 0
|
|
1246
1260
|
}
|
|
1247
|
-
},
|
|
1248
|
-
...
|
|
1261
|
+
}, on = {
|
|
1262
|
+
...Ie,
|
|
1249
1263
|
updateModelValue: {
|
|
1250
1264
|
type: Function,
|
|
1251
1265
|
default: () => {
|
|
@@ -1316,74 +1330,91 @@ const P = {
|
|
|
1316
1330
|
}, Ce = (e) => {
|
|
1317
1331
|
const r = new DOMParser().parseFromString(e, "text/html");
|
|
1318
1332
|
return Array.from(r.body.childNodes);
|
|
1319
|
-
}, Ht = (e, t) => e.nodeType !== t.nodeType ? !1 : e.nodeType === Node.TEXT_NODE || e.nodeType === Node.COMMENT_NODE ? e.textContent === t.textContent : e.nodeType === Node.ELEMENT_NODE ? e.outerHTML === t.outerHTML : e.isEqualNode ? e.isEqualNode(t) : !1,
|
|
1333
|
+
}, Ht = (e, t) => e.nodeType !== t.nodeType ? !1 : e.nodeType === Node.TEXT_NODE || e.nodeType === Node.COMMENT_NODE ? e.textContent === t.textContent : e.nodeType === Node.ELEMENT_NODE ? e.outerHTML === t.outerHTML : e.isEqualNode ? e.isEqualNode(t) : !1, Mt = /* @__PURE__ */ ce({
|
|
1320
1334
|
name: "UpdateOnDemand",
|
|
1321
1335
|
props: {
|
|
1336
|
+
id: {
|
|
1337
|
+
type: String,
|
|
1338
|
+
required: !0
|
|
1339
|
+
},
|
|
1340
|
+
class: {
|
|
1341
|
+
type: [String, Array, Object],
|
|
1342
|
+
required: !0
|
|
1343
|
+
},
|
|
1322
1344
|
html: {
|
|
1323
1345
|
type: String,
|
|
1324
1346
|
required: !0
|
|
1325
1347
|
}
|
|
1326
1348
|
},
|
|
1327
1349
|
setup(e) {
|
|
1328
|
-
const t =
|
|
1329
|
-
if (!
|
|
1330
|
-
const
|
|
1331
|
-
let
|
|
1332
|
-
for (let
|
|
1333
|
-
if (!Ht(
|
|
1334
|
-
|
|
1350
|
+
const t = G(), r = e.html, n = (o, u) => {
|
|
1351
|
+
if (!t.value) return;
|
|
1352
|
+
const c = t.value, m = Array.from(c.childNodes), s = Math.min(o.length, u.length);
|
|
1353
|
+
let l = -1;
|
|
1354
|
+
for (let a = 0; a < s; a++)
|
|
1355
|
+
if (!Ht(o[a], u[a])) {
|
|
1356
|
+
l = a;
|
|
1335
1357
|
break;
|
|
1336
1358
|
}
|
|
1337
|
-
if (
|
|
1338
|
-
if (
|
|
1339
|
-
|
|
1340
|
-
else if (
|
|
1341
|
-
|
|
1359
|
+
if (l === -1)
|
|
1360
|
+
if (u.length > o.length)
|
|
1361
|
+
l = o.length;
|
|
1362
|
+
else if (o.length > u.length)
|
|
1363
|
+
l = u.length;
|
|
1342
1364
|
else
|
|
1343
1365
|
return;
|
|
1344
|
-
const
|
|
1345
|
-
for (let
|
|
1346
|
-
|
|
1347
|
-
for (let
|
|
1348
|
-
|
|
1366
|
+
const i = Math.min(l, m.length);
|
|
1367
|
+
for (let a = m.length - 1; a >= i; a--)
|
|
1368
|
+
m[a].remove();
|
|
1369
|
+
for (let a = l; a < o.length; a++)
|
|
1370
|
+
c.appendChild(o[a].cloneNode(!0));
|
|
1349
1371
|
};
|
|
1350
|
-
return
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1353
|
-
}), () =>
|
|
1354
|
-
id:
|
|
1355
|
-
class:
|
|
1356
|
-
innerHTML:
|
|
1357
|
-
ref:
|
|
1372
|
+
return E(() => e.html, (o, u) => {
|
|
1373
|
+
const c = Ce(o), m = Ce(u || "");
|
|
1374
|
+
n(c, m);
|
|
1375
|
+
}), () => N("div", {
|
|
1376
|
+
id: e.id,
|
|
1377
|
+
class: e.class,
|
|
1378
|
+
innerHTML: r,
|
|
1379
|
+
ref: t
|
|
1358
1380
|
}, null);
|
|
1359
1381
|
}
|
|
1360
|
-
}),
|
|
1382
|
+
}), Pt = /* @__PURE__ */ ce({
|
|
1361
1383
|
name: "ContentPreview",
|
|
1362
|
-
props:
|
|
1384
|
+
props: Ie,
|
|
1363
1385
|
setup(e) {
|
|
1364
|
-
const t =
|
|
1365
|
-
html:
|
|
1366
|
-
key:
|
|
1386
|
+
const t = w("editorId"), r = w("setting"), n = w("previewTheme"), o = w("showCodeRowNumber"), {
|
|
1387
|
+
html: u,
|
|
1388
|
+
key: c
|
|
1367
1389
|
} = xt(e, e.previewOnly);
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1390
|
+
nt(e, u, c), Ft(e, u), Rt(e, u), At(e, u, c);
|
|
1391
|
+
const m = R(() => [`${f}-preview`, `${n?.value}-theme`, o && `${f}-scrn`].filter(Boolean)), s = () => {
|
|
1392
|
+
const l = `${t}-preview`;
|
|
1393
|
+
return e.previewComponent ? He(e.previewComponent, {
|
|
1394
|
+
key: c.value,
|
|
1395
|
+
html: u.value,
|
|
1396
|
+
id: l,
|
|
1397
|
+
class: m.value
|
|
1398
|
+
}) : N(Mt, {
|
|
1399
|
+
key: c.value,
|
|
1400
|
+
html: u.value,
|
|
1401
|
+
id: l,
|
|
1402
|
+
class: m.value
|
|
1403
|
+
}, null);
|
|
1404
|
+
};
|
|
1405
|
+
return () => N(Ae, null, [r.value.preview && (e.previewOnly ? s() : N("div", {
|
|
1372
1406
|
id: `${t}-preview-wrapper`,
|
|
1373
|
-
class: `${
|
|
1407
|
+
class: `${f}-preview-wrapper`,
|
|
1374
1408
|
key: "content-preview-wrapper"
|
|
1375
|
-
}, [
|
|
1376
|
-
key: o.value,
|
|
1377
|
-
html: n.value
|
|
1378
|
-
}, null)])), r.value.htmlPreview && O("div", {
|
|
1409
|
+
}, [s()])), r.value.htmlPreview && N("div", {
|
|
1379
1410
|
id: `${t}-html-wrapper`,
|
|
1380
|
-
class: `${
|
|
1411
|
+
class: `${f}-preview-wrapper`,
|
|
1381
1412
|
key: "html-preview-wrapper"
|
|
1382
|
-
}, [
|
|
1383
|
-
class: `${
|
|
1384
|
-
}, [
|
|
1413
|
+
}, [N("div", {
|
|
1414
|
+
class: `${f}-html`
|
|
1415
|
+
}, [u.value])])]);
|
|
1385
1416
|
}
|
|
1386
|
-
}),
|
|
1417
|
+
}), Lt = ({ text: e }) => e, Se = {
|
|
1387
1418
|
/**
|
|
1388
1419
|
* markdown content.
|
|
1389
1420
|
*
|
|
@@ -1492,7 +1523,7 @@ const P = {
|
|
|
1492
1523
|
*/
|
|
1493
1524
|
mdHeadingId: {
|
|
1494
1525
|
type: Function,
|
|
1495
|
-
default:
|
|
1526
|
+
default: Lt
|
|
1496
1527
|
},
|
|
1497
1528
|
/**
|
|
1498
1529
|
*
|
|
@@ -1616,9 +1647,13 @@ const P = {
|
|
|
1616
1647
|
noEcharts: {
|
|
1617
1648
|
type: Boolean,
|
|
1618
1649
|
default: !1
|
|
1650
|
+
},
|
|
1651
|
+
previewComponent: {
|
|
1652
|
+
type: [Object, Function],
|
|
1653
|
+
default: void 0
|
|
1619
1654
|
}
|
|
1620
|
-
},
|
|
1621
|
-
...
|
|
1655
|
+
}, an = {
|
|
1656
|
+
...Se,
|
|
1622
1657
|
/**
|
|
1623
1658
|
* input回调事件
|
|
1624
1659
|
*/
|
|
@@ -1678,7 +1713,7 @@ const P = {
|
|
|
1678
1713
|
*/
|
|
1679
1714
|
toolbars: {
|
|
1680
1715
|
type: Array,
|
|
1681
|
-
default:
|
|
1716
|
+
default: _e
|
|
1682
1717
|
},
|
|
1683
1718
|
/**
|
|
1684
1719
|
* 浮动工具栏
|
|
@@ -1756,7 +1791,7 @@ const P = {
|
|
|
1756
1791
|
*/
|
|
1757
1792
|
footers: {
|
|
1758
1793
|
type: Array,
|
|
1759
|
-
default:
|
|
1794
|
+
default: Oe
|
|
1760
1795
|
},
|
|
1761
1796
|
/**
|
|
1762
1797
|
* 是否默认激活输入框和预览框同步滚动
|
|
@@ -1923,14 +1958,14 @@ const P = {
|
|
|
1923
1958
|
type: Number,
|
|
1924
1959
|
default: void 0
|
|
1925
1960
|
}
|
|
1926
|
-
},
|
|
1961
|
+
}, xe = [
|
|
1927
1962
|
"onHtmlChanged",
|
|
1928
1963
|
"onGetCatalog",
|
|
1929
1964
|
"onChange",
|
|
1930
1965
|
"onRemount",
|
|
1931
1966
|
"update:modelValue"
|
|
1932
|
-
],
|
|
1933
|
-
...
|
|
1967
|
+
], rn = [
|
|
1968
|
+
...xe,
|
|
1934
1969
|
"onSave",
|
|
1935
1970
|
"onUploadImg",
|
|
1936
1971
|
"onError",
|
|
@@ -1939,46 +1974,50 @@ const P = {
|
|
|
1939
1974
|
"onInput",
|
|
1940
1975
|
"onDrop",
|
|
1941
1976
|
"oninputBoxWidthChange"
|
|
1942
|
-
],
|
|
1977
|
+
], Ot = (e, t, r) => {
|
|
1943
1978
|
const { editorId: n } = r, o = {
|
|
1944
1979
|
rerender() {
|
|
1945
1980
|
y.emit(n, de);
|
|
1946
1981
|
}
|
|
1947
1982
|
};
|
|
1948
1983
|
t.expose(o);
|
|
1949
|
-
},
|
|
1984
|
+
}, ae = /* @__PURE__ */ ce({
|
|
1950
1985
|
name: "MdPreview",
|
|
1951
|
-
props:
|
|
1952
|
-
emits:
|
|
1986
|
+
props: Se,
|
|
1987
|
+
emits: xe,
|
|
1953
1988
|
setup(e, t) {
|
|
1954
1989
|
const {
|
|
1955
1990
|
noKatex: r,
|
|
1956
1991
|
noMermaid: n,
|
|
1957
1992
|
noHighlight: o
|
|
1958
|
-
} = e,
|
|
1959
|
-
|
|
1960
|
-
rootRef:
|
|
1961
|
-
editorId:
|
|
1962
|
-
}),
|
|
1963
|
-
editorId:
|
|
1964
|
-
}),
|
|
1965
|
-
y.clear(
|
|
1966
|
-
})
|
|
1967
|
-
|
|
1968
|
-
|
|
1993
|
+
} = e, u = G(), c = tt(e);
|
|
1994
|
+
Te(e, {
|
|
1995
|
+
rootRef: u,
|
|
1996
|
+
editorId: c
|
|
1997
|
+
}), Ot(e, t, {
|
|
1998
|
+
editorId: c
|
|
1999
|
+
}), te(() => {
|
|
2000
|
+
y.clear(c);
|
|
2001
|
+
});
|
|
2002
|
+
const m = (a) => {
|
|
2003
|
+
e.onChange?.(a), t.emit("onChange", a), t.emit("update:modelValue", a);
|
|
2004
|
+
}, s = (a) => {
|
|
2005
|
+
e.onHtmlChanged?.(a), t.emit("onHtmlChanged", a);
|
|
2006
|
+
}, l = (a) => {
|
|
2007
|
+
e.onGetCatalog?.(a), t.emit("onGetCatalog", a);
|
|
2008
|
+
}, i = () => {
|
|
2009
|
+
e.onRemount?.(), t.emit("onRemount");
|
|
2010
|
+
};
|
|
2011
|
+
return () => N("div", {
|
|
2012
|
+
id: c,
|
|
2013
|
+
class: [f, e.class, e.theme === "dark" && `${f}-dark`, `${f}-previewOnly`],
|
|
1969
2014
|
style: e.style,
|
|
1970
|
-
ref:
|
|
1971
|
-
}, [
|
|
2015
|
+
ref: u
|
|
2016
|
+
}, [N(Pt, {
|
|
1972
2017
|
modelValue: e.modelValue,
|
|
1973
|
-
onChange:
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
onHtmlChanged: (c) => {
|
|
1977
|
-
e.onHtmlChanged?.(c), t.emit("onHtmlChanged", c);
|
|
1978
|
-
},
|
|
1979
|
-
onGetCatalog: (c) => {
|
|
1980
|
-
e.onGetCatalog?.(c), t.emit("onGetCatalog", c);
|
|
1981
|
-
},
|
|
2018
|
+
onChange: m,
|
|
2019
|
+
onHtmlChanged: s,
|
|
2020
|
+
onGetCatalog: l,
|
|
1982
2021
|
mdHeadingId: e.mdHeadingId,
|
|
1983
2022
|
noMermaid: n,
|
|
1984
2023
|
sanitize: e.sanitize,
|
|
@@ -1990,27 +2029,26 @@ const P = {
|
|
|
1990
2029
|
sanitizeMermaid: e.sanitizeMermaid,
|
|
1991
2030
|
codeFoldable: e.codeFoldable,
|
|
1992
2031
|
autoFoldThreshold: e.autoFoldThreshold,
|
|
1993
|
-
onRemount:
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
noEcharts: e.noEcharts
|
|
2032
|
+
onRemount: i,
|
|
2033
|
+
noEcharts: e.noEcharts,
|
|
2034
|
+
previewComponent: e.previewComponent
|
|
1997
2035
|
}, null)]);
|
|
1998
2036
|
}
|
|
1999
2037
|
});
|
|
2000
|
-
|
|
2038
|
+
ae.install = (e) => (e.component(ae.name, ae), e);
|
|
2001
2039
|
export {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2040
|
+
M as C,
|
|
2041
|
+
ae as M,
|
|
2042
|
+
Pt as a,
|
|
2043
|
+
an as b,
|
|
2044
|
+
on as c,
|
|
2045
|
+
en as d,
|
|
2046
|
+
rn as e,
|
|
2047
|
+
tn as f,
|
|
2048
|
+
Jt as g,
|
|
2049
|
+
Yt as h,
|
|
2050
|
+
Qt as i,
|
|
2051
|
+
nn as j,
|
|
2052
|
+
Xt as k,
|
|
2015
2053
|
tt as u
|
|
2016
2054
|
};
|