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