md-editor-v3 4.3.0-beta.3 → 4.3.0-beta.5

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.
@@ -1,41 +1,41 @@
1
1
  var wt = Object.defineProperty;
2
- var xt = (e, r, l) => r in e ? wt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[r] = l;
3
- var K = (e, r, l) => (xt(e, typeof r != "symbol" ? r + "" : r, l), l);
4
- import { defineComponent as O, createVNode as t, inject as A, ref as q, onMounted as Y, reactive as J, computed as he, watch as I, nextTick as ce, Fragment as kt, cloneVNode as at, toRef as le, shallowRef as St, onBeforeUnmount as At } from "vue";
2
+ var xt = (e, a, l) => a in e ? wt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[a] = l;
3
+ var K = (e, a, l) => (xt(e, typeof a != "symbol" ? a + "" : a, l), l);
4
+ import { defineComponent as V, createVNode as t, inject as A, ref as q, onMounted as Y, reactive as J, computed as he, watch as H, nextTick as ce, Fragment as kt, cloneVNode as at, toRef as le, shallowRef as St, onBeforeUnmount as At } from "vue";
5
5
  import { p as o, a as z, s as Mt, b as Lt, d as Dt } from "./chunks/config.mjs";
6
- import { draggingScroll as Nt, linkTo as Et, debounce as Ht, throttle as It, smoothScroll as rt } from "@vavt/util";
6
+ import { draggingScroll as It, linkTo as Nt, debounce as Et, throttle as Ht, smoothScroll as rt } from "@vavt/util";
7
7
  import { a as te, D as Bt } from "./chunks/index2.mjs";
8
8
  import { b as h, a as Ft } from "./chunks/index3.mjs";
9
- import { C as Ot, a as Vt, O as pt, T as Rt, b as Pt, e as qt, c as Ut, u as Gt, d as Kt, f as jt, g as _t, h as Wt, i as zt, M as Yt } from "./chunks/index.mjs";
10
- import { a as Zt } from "./chunks/dom.mjs";
9
+ import { C as Vt, a as Ot, O as pt, T as Rt, b as Pt, e as qt, c as Ut, u as Gt, d as Kt, f as jt, g as _t, h as Wt, i as zt, j as Yt, M as Zt } from "./chunks/index.mjs";
10
+ import { a as Jt } from "./chunks/dom.mjs";
11
11
  import Ct from "./MdModal.mjs";
12
- import { minimalSetup as Jt, EditorView as ie } from "codemirror";
13
- import { EditorView as be, placeholder as Xt, keymap as Qt } from "@codemirror/view";
14
- import { languages as el } from "@codemirror/language-data";
15
- import { markdown as tl } from "@codemirror/lang-markdown";
16
- import { htmlCompletionSource as ll, html as ol } from "@codemirror/lang-html";
17
- import { deleteLine as al, indentWithTab as rl, undo as nl, redo as il } from "@codemirror/commands";
18
- import { HighlightStyle as $t, syntaxHighlighting as yt, indentUnit as sl } from "@codemirror/language";
12
+ import { minimalSetup as Xt, EditorView as ie } from "codemirror";
13
+ import { EditorView as be, placeholder as Qt, keymap as el } from "@codemirror/view";
14
+ import { languages as tl } from "@codemirror/language-data";
15
+ import { markdown as ll } from "@codemirror/lang-markdown";
16
+ import { htmlCompletionSource as ol, html as al } from "@codemirror/lang-html";
17
+ import { deleteLine as rl, indentWithTab as nl, undo as il, redo as sl } from "@codemirror/commands";
18
+ import { HighlightStyle as $t, syntaxHighlighting as yt, indentUnit as cl } from "@codemirror/language";
19
19
  import { tags as s } from "@lezer/highlight";
20
- import { EditorSelection as P, EditorState as ue, Compartment as cl, StateEffect as dl } from "@codemirror/state";
21
- import { autocompletion as ul } from "@codemirror/autocomplete";
20
+ import { EditorSelection as P, EditorState as ue, Compartment as dl, StateEffect as ul } from "@codemirror/state";
21
+ import { autocompletion as ml } from "@codemirror/autocomplete";
22
22
  import Tt from "./MdCatalog.mjs";
23
23
  import { g as nt } from "./chunks/vue-tsx.mjs";
24
- import ml from "./NormalToolbar.mjs";
25
- import fl from "./ModalToolbar.mjs";
24
+ import fl from "./NormalToolbar.mjs";
25
+ import gl from "./ModalToolbar.mjs";
26
26
  import "medium-zoom";
27
27
  import "copy-to-clipboard";
28
28
  import "markdown-it";
29
29
  import "markdown-it-image-figures";
30
30
  import "markdown-it-task-lists";
31
31
  import "lru-cache";
32
- const gl = /* @__PURE__ */ O({
32
+ const hl = /* @__PURE__ */ V({
33
33
  setup() {
34
34
  return () => t("div", {
35
35
  class: `${o}-divider`
36
36
  }, null);
37
37
  }
38
- }), hl = {
38
+ }), bl = {
39
39
  noPrettier: {
40
40
  type: Boolean
41
41
  },
@@ -84,13 +84,13 @@ const gl = /* @__PURE__ */ O({
84
84
  showToolbarName: {
85
85
  type: Boolean
86
86
  }
87
- }, bl = (e) => {
88
- var c, m, f, b;
89
- const r = A("editorId");
90
- let l = (m = (c = z.editorExtensions) == null ? void 0 : c.screenfull) == null ? void 0 : m.instance;
91
- const a = (b = (f = z.editorExtensions) == null ? void 0 : f.screenfull) == null ? void 0 : b.js, n = q(!1), i = ($) => {
87
+ }, vl = (e) => {
88
+ var c, f, m, b;
89
+ const a = A("editorId");
90
+ let l = (f = (c = z.editorExtensions) == null ? void 0 : c.screenfull) == null ? void 0 : f.instance;
91
+ const r = (b = (m = z.editorExtensions) == null ? void 0 : m.screenfull) == null ? void 0 : b.js, n = q(!1), i = ($) => {
92
92
  if (!l) {
93
- h.emit(r, "errorCatcher", {
93
+ h.emit(a, "errorCatcher", {
94
94
  name: "fullscreen",
95
95
  message: "fullscreen is undefined"
96
96
  });
@@ -107,15 +107,15 @@ const gl = /* @__PURE__ */ O({
107
107
  return Y(() => {
108
108
  if (u(), !l) {
109
109
  const $ = document.createElement("script");
110
- $.src = a || Mt, $.onload = d, $.id = `${o}-screenfull`, Zt($, "screenfull");
110
+ $.src = r || Mt, $.onload = d, $.id = `${o}-screenfull`, Jt($, "screenfull");
111
111
  }
112
112
  }), Y(() => {
113
- h.on(r, {
114
- name: Ot,
113
+ h.on(a, {
114
+ name: Vt,
115
115
  callback: i
116
116
  });
117
117
  }), { fullscreenHandler: i };
118
- }, vl = {
118
+ }, kl = {
119
119
  tableShape: {
120
120
  type: Array,
121
121
  default: () => [6, 4]
@@ -125,36 +125,36 @@ const gl = /* @__PURE__ */ O({
125
125
  default: () => {
126
126
  }
127
127
  }
128
- }, kl = /* @__PURE__ */ O({
128
+ }, pl = /* @__PURE__ */ V({
129
129
  name: "TableShape",
130
- props: vl,
130
+ props: kl,
131
131
  setup(e) {
132
- const r = J({
132
+ const a = J({
133
133
  x: -1,
134
134
  y: -1
135
135
  });
136
136
  return () => t("div", {
137
137
  class: `${o}-table-shape`,
138
138
  onMouseleave: () => {
139
- r.x = -1, r.y = -1;
139
+ a.x = -1, a.y = -1;
140
140
  }
141
- }, [new Array(e.tableShape[1]).fill("").map((l, a) => t("div", {
141
+ }, [new Array(e.tableShape[1]).fill("").map((l, r) => t("div", {
142
142
  class: `${o}-table-shape-row`,
143
- key: `table-shape-row-${a}`
143
+ key: `table-shape-row-${r}`
144
144
  }, [new Array(e.tableShape[0]).fill("").map((n, i) => t("div", {
145
145
  class: `${o}-table-shape-col`,
146
146
  key: `table-shape-col-${i}`,
147
147
  onMouseenter: () => {
148
- r.x = a, r.y = i;
148
+ a.x = r, a.y = i;
149
149
  },
150
150
  onClick: () => {
151
- e.onSelected(r);
151
+ e.onSelected(a);
152
152
  }
153
153
  }, [t("div", {
154
- class: [`${o}-table-shape-col-default`, a <= r.x && i <= r.y && `${o}-table-shape-col-include`]
154
+ class: [`${o}-table-shape-col-default`, r <= a.x && i <= a.y && `${o}-table-shape-col-include`]
155
155
  }, null)]))]))]);
156
156
  }
157
- }), pl = kl, Cl = {
157
+ }), Cl = pl, $l = {
158
158
  type: {
159
159
  type: String,
160
160
  default: "link"
@@ -173,16 +173,16 @@ const gl = /* @__PURE__ */ O({
173
173
  default: () => {
174
174
  }
175
175
  }
176
- }, $l = /* @__PURE__ */ O({
177
- props: Cl,
176
+ }, yl = /* @__PURE__ */ V({
177
+ props: $l,
178
178
  setup(e) {
179
- const r = A("usedLanguageText"), l = A("editorId"), a = he(() => {
179
+ const a = A("usedLanguageText"), l = A("editorId"), r = he(() => {
180
180
  var i, u;
181
181
  switch (e.type) {
182
182
  case "link":
183
- return (i = r.value.linkModalTips) == null ? void 0 : i.linkTitle;
183
+ return (i = a.value.linkModalTips) == null ? void 0 : i.linkTitle;
184
184
  case "image":
185
- return (u = r.value.linkModalTips) == null ? void 0 : u.imageTitle;
185
+ return (u = a.value.linkModalTips) == null ? void 0 : u.imageTitle;
186
186
  default:
187
187
  return "";
188
188
  }
@@ -190,30 +190,30 @@ const gl = /* @__PURE__ */ O({
190
190
  desc: "",
191
191
  url: ""
192
192
  });
193
- return I(() => e.visible, (i) => {
193
+ return H(() => e.visible, (i) => {
194
194
  i || setTimeout(() => {
195
195
  n.desc = "", n.url = "";
196
196
  }, 200);
197
197
  }), () => t(Ct, {
198
- title: a.value,
198
+ title: r.value,
199
199
  visible: e.visible,
200
200
  onClose: e.onCancel
201
201
  }, {
202
202
  default: () => {
203
- var i, u, d, c, m;
203
+ var i, u, d, c, f;
204
204
  return [t("div", {
205
205
  class: `${o}-form-item`
206
206
  }, [t("label", {
207
207
  class: `${o}-label`,
208
208
  for: `link-desc-${l}`
209
- }, [(i = r.value.linkModalTips) == null ? void 0 : i.descLabel]), t("input", {
210
- placeholder: (u = r.value.linkModalTips) == null ? void 0 : u.descLabelPlaceHolder,
209
+ }, [(i = a.value.linkModalTips) == null ? void 0 : i.descLabel]), t("input", {
210
+ placeholder: (u = a.value.linkModalTips) == null ? void 0 : u.descLabelPlaceHolder,
211
211
  class: `${o}-input`,
212
212
  id: `link-desc-${l}`,
213
213
  type: "text",
214
214
  value: n.desc,
215
- onChange: (f) => {
216
- n.desc = f.target.value;
215
+ onChange: (m) => {
216
+ n.desc = m.target.value;
217
217
  },
218
218
  autocomplete: "off"
219
219
  }, null)]), t("div", {
@@ -221,14 +221,14 @@ const gl = /* @__PURE__ */ O({
221
221
  }, [t("label", {
222
222
  class: `${o}-label`,
223
223
  for: `link-url-${l}`
224
- }, [(d = r.value.linkModalTips) == null ? void 0 : d.urlLabel]), t("input", {
225
- placeholder: (c = r.value.linkModalTips) == null ? void 0 : c.urlLabelPlaceHolder,
224
+ }, [(d = a.value.linkModalTips) == null ? void 0 : d.urlLabel]), t("input", {
225
+ placeholder: (c = a.value.linkModalTips) == null ? void 0 : c.urlLabelPlaceHolder,
226
226
  class: `${o}-input`,
227
227
  id: `link-url-${l}`,
228
228
  type: "text",
229
229
  value: n.url,
230
- onChange: (f) => {
231
- n.url = f.target.value;
230
+ onChange: (m) => {
231
+ n.url = m.target.value;
232
232
  },
233
233
  autocomplete: "off"
234
234
  }, null)]), t("div", {
@@ -239,11 +239,11 @@ const gl = /* @__PURE__ */ O({
239
239
  onClick: () => {
240
240
  e.onOk(n), n.desc = "", n.url = "";
241
241
  }
242
- }, [(m = r.value.linkModalTips) == null ? void 0 : m.buttonOK])])];
242
+ }, [(f = a.value.linkModalTips) == null ? void 0 : f.buttonOK])])];
243
243
  }
244
244
  });
245
245
  }
246
- }), yl = {
246
+ }), Tl = {
247
247
  visible: {
248
248
  type: Boolean,
249
249
  default: !1
@@ -258,12 +258,12 @@ const gl = /* @__PURE__ */ O({
258
258
  default: () => {
259
259
  }
260
260
  }
261
- }, Tl = /* @__PURE__ */ O({
262
- props: yl,
261
+ }, wl = /* @__PURE__ */ V({
262
+ props: Tl,
263
263
  setup(e) {
264
- var f, b, $;
265
- const r = A("usedLanguageText"), l = A("editorId");
266
- let a = ($ = (b = (f = z) == null ? void 0 : f.editorExtensions) == null ? void 0 : b.cropper) == null ? void 0 : $.instance;
264
+ var m, b, $;
265
+ const a = A("usedLanguageText"), l = A("editorId");
266
+ let r = ($ = (b = (m = z) == null ? void 0 : m.editorExtensions) == null ? void 0 : b.cropper) == null ? void 0 : $.instance;
267
267
  const n = q(), i = q(), u = q(), d = J({
268
268
  cropperInited: !1,
269
269
  imgSelected: !1,
@@ -272,9 +272,9 @@ const gl = /* @__PURE__ */ O({
272
272
  isFullscreen: !1
273
273
  });
274
274
  let c = null;
275
- I(() => e.visible, () => {
276
- e.visible && !d.cropperInited && (a = a || window.Cropper, n.value.onchange = () => {
277
- if (!a) {
275
+ H(() => e.visible, () => {
276
+ e.visible && !d.cropperInited && (r = r || window.Cropper, n.value.onchange = () => {
277
+ if (!r) {
278
278
  h.emit(l, "errorCatcher", {
279
279
  name: "Cropper",
280
280
  message: "Cropper is undefined"
@@ -286,7 +286,7 @@ const gl = /* @__PURE__ */ O({
286
286
  const v = new FileReader();
287
287
  v.onload = (g) => {
288
288
  d.imgSrc = g.target.result, ce(() => {
289
- c = new a(i.value, {
289
+ c = new r(i.value, {
290
290
  viewMode: 2,
291
291
  preview: `.${o}-clip-preview-target`
292
292
  // aspectRatio: 16 / 9,
@@ -295,25 +295,25 @@ const gl = /* @__PURE__ */ O({
295
295
  }, v.readAsDataURL(T[0]);
296
296
  }
297
297
  });
298
- }), I(() => [d.imgSelected], () => {
298
+ }), H(() => [d.imgSelected], () => {
299
299
  u.value.style = "";
300
- }), I(() => d.isFullscreen, () => {
300
+ }), H(() => d.isFullscreen, () => {
301
301
  ce(() => {
302
- c == null || c.destroy(), u.value.style = "", i.value && (c = new a(i.value, {
302
+ c == null || c.destroy(), u.value.style = "", i.value && (c = new r(i.value, {
303
303
  viewMode: 2,
304
304
  preview: `.${o}-clip-preview-target`
305
305
  // aspectRatio: 16 / 9,
306
306
  }));
307
307
  });
308
308
  });
309
- const m = () => {
309
+ const f = () => {
310
310
  c.clear(), c.destroy(), c = null, n.value.value = "", d.imgSelected = !1;
311
311
  };
312
312
  return () => {
313
313
  var T;
314
314
  return t(Ct, {
315
315
  class: `${o}-modal-clip`,
316
- title: (T = r.value.clipModalTips) == null ? void 0 : T.title,
316
+ title: (T = a.value.clipModalTips) == null ? void 0 : T.title,
317
317
  visible: e.visible,
318
318
  onClose: e.onCancel,
319
319
  showAdjust: !0,
@@ -341,7 +341,7 @@ const gl = /* @__PURE__ */ O({
341
341
  alt: ""
342
342
  }, null), t("div", {
343
343
  class: `${o}-clip-delete`,
344
- onClick: m
344
+ onClick: f
345
345
  }, [t("svg", {
346
346
  class: `${o}-icon`,
347
347
  "aria-hidden": "true"
@@ -370,10 +370,10 @@ const gl = /* @__PURE__ */ O({
370
370
  onClick: () => {
371
371
  if (c) {
372
372
  const k = c.getCroppedCanvas();
373
- h.emit(l, "uploadImage", [Ft(k.toDataURL("image/png"))], e.onOk), m();
373
+ h.emit(l, "uploadImage", [Ft(k.toDataURL("image/png"))], e.onOk), f();
374
374
  }
375
375
  }
376
- }, [((v = r.value.clipModalTips) == null ? void 0 : v.buttonUpload) || ((g = r.value.linkModalTips) == null ? void 0 : g.buttonOK)])]), t("input", {
376
+ }, [((v = a.value.clipModalTips) == null ? void 0 : v.buttonUpload) || ((g = a.value.linkModalTips) == null ? void 0 : g.buttonOK)])]), t("input", {
377
377
  ref: n,
378
378
  accept: "image/*",
379
379
  type: "file",
@@ -386,7 +386,7 @@ const gl = /* @__PURE__ */ O({
386
386
  });
387
387
  };
388
388
  }
389
- }), wl = {
389
+ }), xl = {
390
390
  type: {
391
391
  type: String,
392
392
  default: "link"
@@ -409,27 +409,27 @@ const gl = /* @__PURE__ */ O({
409
409
  default: () => {
410
410
  }
411
411
  }
412
- }, xl = /* @__PURE__ */ O({
413
- props: wl,
412
+ }, Sl = /* @__PURE__ */ V({
413
+ props: xl,
414
414
  setup(e) {
415
- return () => t(kt, null, [t($l, {
415
+ return () => t(kt, null, [t(yl, {
416
416
  type: e.type,
417
417
  visible: e.linkVisible,
418
418
  onOk: e.onOk,
419
419
  onCancel: e.onCancel
420
- }, null), t(Tl, {
420
+ }, null), t(wl, {
421
421
  visible: e.clipVisible,
422
422
  onOk: e.onOk,
423
423
  onCancel: e.onCancel
424
424
  }, null)]);
425
425
  }
426
- }), Sl = /* @__PURE__ */ O({
426
+ }), Al = /* @__PURE__ */ V({
427
427
  name: "MDEditorToolbar",
428
- props: hl,
428
+ props: bl,
429
429
  setup(e) {
430
- const r = A("editorId"), l = A("usedLanguageText"), {
431
- fullscreenHandler: a
432
- } = bl(e), n = `${r}-toolbar-wrapper`, i = q(), u = J({
430
+ const a = A("editorId"), l = A("usedLanguageText"), {
431
+ fullscreenHandler: r
432
+ } = vl(e), n = `${a}-toolbar-wrapper`, i = q(), u = J({
433
433
  title: !1,
434
434
  catalog: !1,
435
435
  // 图片上传下拉
@@ -440,35 +440,35 @@ const gl = /* @__PURE__ */ O({
440
440
  mermaid: !1,
441
441
  katex: !1
442
442
  }), d = (v, g) => {
443
- h.emit(r, "replace", v, g);
443
+ h.emit(a, "replace", v, g);
444
444
  }, c = J({
445
445
  type: "link",
446
446
  linkVisible: !1,
447
447
  clipVisible: !1
448
- }), m = q();
448
+ }), f = q();
449
449
  Y(() => {
450
- h.on(r, {
450
+ h.on(a, {
451
451
  name: "openModals",
452
452
  callback(v) {
453
453
  c.type = v, c.linkVisible = !0;
454
454
  }
455
455
  });
456
456
  });
457
- const f = he(() => {
457
+ const m = he(() => {
458
458
  const v = e.toolbars.filter((w) => !e.toolbarsExclude.includes(w)), g = v.indexOf("="), k = g === -1 ? v : v.slice(0, g + 1), y = g === -1 ? [] : v.slice(g, Number.MAX_SAFE_INTEGER);
459
459
  return [k, y];
460
460
  }), b = q(), $ = () => {
461
- h.emit(r, "uploadImage", Array.from(b.value.files || [])), b.value.value = "";
461
+ h.emit(a, "uploadImage", Array.from(b.value.files || [])), b.value.value = "";
462
462
  };
463
463
  Y(() => {
464
464
  b.value.addEventListener("change", $);
465
465
  });
466
466
  const T = (v) => {
467
- var g, k, y, w, x, L, C, M, R, D, N, V, B, E, j, U, re, X, _, G, Q, W, H, F, ee, ne, ve, ke, pe, Ce, $e, ye, Te, we, xe, Se, Ae, Me, Le, De, Ne, Ee, He, Ie, Be, Fe, Oe, Ve, Re, Pe, qe, Ue, Ge, Ke, je, _e, We, ze, Ye, Ze, Je, Xe, Qe, et, tt, lt, ot;
467
+ var g, k, y, w, x, L, C, M, R, D, I, O, B, N, j, U, re, X, _, G, Q, W, E, F, ee, ne, ve, ke, pe, Ce, $e, ye, Te, we, xe, Se, Ae, Me, Le, De, Ie, Ne, Ee, He, Be, Fe, Ve, Oe, Re, Pe, qe, Ue, Ge, Ke, je, _e, We, ze, Ye, Ze, Je, Xe, Qe, et, tt, lt, ot;
468
468
  if (Lt.includes(v))
469
469
  switch (v) {
470
470
  case "-":
471
- return t(gl, null, null);
471
+ return t(hl, null, null);
472
472
  case "bold":
473
473
  return t("div", {
474
474
  class: `${o}-toolbar-item`,
@@ -556,12 +556,12 @@ const gl = /* @__PURE__ */ O({
556
556
  onClick: () => {
557
557
  d("h3");
558
558
  }
559
- }, [(N = l.value.titleItem) == null ? void 0 : N.h3]), t("li", {
559
+ }, [(I = l.value.titleItem) == null ? void 0 : I.h3]), t("li", {
560
560
  class: `${o}-menu-item`,
561
561
  onClick: () => {
562
562
  d("h4");
563
563
  }
564
- }, [(V = l.value.titleItem) == null ? void 0 : V.h4]), t("li", {
564
+ }, [(O = l.value.titleItem) == null ? void 0 : O.h4]), t("li", {
565
565
  class: `${o}-menu-item`,
566
566
  onClick: () => {
567
567
  d("h5");
@@ -571,7 +571,7 @@ const gl = /* @__PURE__ */ O({
571
571
  onClick: () => {
572
572
  d("h6");
573
573
  }
574
- }, [(E = l.value.titleItem) == null ? void 0 : E.h6])])
574
+ }, [(N = l.value.titleItem) == null ? void 0 : N.h6])])
575
575
  }, {
576
576
  default: () => {
577
577
  var p, S;
@@ -651,7 +651,7 @@ const gl = /* @__PURE__ */ O({
651
651
  case "orderedList":
652
652
  return t("div", {
653
653
  class: `${o}-toolbar-item`,
654
- title: (H = l.value.toolbarTips) == null ? void 0 : H.orderedList,
654
+ title: (E = l.value.toolbarTips) == null ? void 0 : E.orderedList,
655
655
  onClick: () => {
656
656
  d("orderedList");
657
657
  }
@@ -788,7 +788,7 @@ const gl = /* @__PURE__ */ O({
788
788
  u.table = p;
789
789
  },
790
790
  key: "bar-table",
791
- overlay: t(pl, {
791
+ overlay: t(Cl, {
792
792
  tableShape: e.tableShape,
793
793
  onSelected: (p) => {
794
794
  d("table", {
@@ -817,7 +817,7 @@ const gl = /* @__PURE__ */ O({
817
817
  class: `${o}-toolbar-item`,
818
818
  title: (Me = l.value.toolbarTips) == null ? void 0 : Me.revoke,
819
819
  onClick: () => {
820
- h.emit(r, "ctrlZ");
820
+ h.emit(a, "ctrlZ");
821
821
  }
822
822
  }, [t("svg", {
823
823
  class: `${o}-icon`,
@@ -832,7 +832,7 @@ const gl = /* @__PURE__ */ O({
832
832
  class: `${o}-toolbar-item`,
833
833
  title: (De = l.value.toolbarTips) == null ? void 0 : De.next,
834
834
  onClick: () => {
835
- h.emit(r, "ctrlShiftZ");
835
+ h.emit(a, "ctrlShiftZ");
836
836
  }
837
837
  }, [t("svg", {
838
838
  class: `${o}-icon`,
@@ -841,13 +841,13 @@ const gl = /* @__PURE__ */ O({
841
841
  "xlink:href": "#md-editor-icon-next"
842
842
  }, null)]), e.showToolbarName && t("div", {
843
843
  class: `${o}-toolbar-item-name`
844
- }, [(Ne = l.value.toolbarTips) == null ? void 0 : Ne.next])]);
844
+ }, [(Ie = l.value.toolbarTips) == null ? void 0 : Ie.next])]);
845
845
  case "save":
846
846
  return t("div", {
847
847
  class: `${o}-toolbar-item`,
848
- title: (Ee = l.value.toolbarTips) == null ? void 0 : Ee.save,
848
+ title: (Ne = l.value.toolbarTips) == null ? void 0 : Ne.save,
849
849
  onClick: () => {
850
- h.emit(r, pt);
850
+ h.emit(a, pt);
851
851
  }
852
852
  }, [t("svg", {
853
853
  class: `${o}-icon`,
@@ -856,11 +856,11 @@ const gl = /* @__PURE__ */ O({
856
856
  "xlink:href": "#md-editor-icon-baocun"
857
857
  }, null)]), e.showToolbarName && t("div", {
858
858
  class: `${o}-toolbar-item-name`
859
- }, [(He = l.value.toolbarTips) == null ? void 0 : He.save])]);
859
+ }, [(Ee = l.value.toolbarTips) == null ? void 0 : Ee.save])]);
860
860
  case "prettier":
861
861
  return e.noPrettier ? "" : t("div", {
862
862
  class: `${o}-toolbar-item`,
863
- title: (Ie = l.value.toolbarTips) == null ? void 0 : Ie.prettier,
863
+ title: (He = l.value.toolbarTips) == null ? void 0 : He.prettier,
864
864
  onClick: () => {
865
865
  d("prettier");
866
866
  }
@@ -886,13 +886,13 @@ const gl = /* @__PURE__ */ O({
886
886
  "xlink:href": `#md-editor-icon-${e.setting.pageFullscreen ? "suoxiao" : "fangda"}`
887
887
  }, null)]), e.showToolbarName && t("div", {
888
888
  class: `${o}-toolbar-item-name`
889
- }, [(Oe = l.value.toolbarTips) == null ? void 0 : Oe.pageFullscreen])]);
889
+ }, [(Ve = l.value.toolbarTips) == null ? void 0 : Ve.pageFullscreen])]);
890
890
  case "fullscreen":
891
891
  return t("div", {
892
892
  class: `${o}-toolbar-item`,
893
- title: (Ve = l.value.toolbarTips) == null ? void 0 : Ve.fullscreen,
893
+ title: (Oe = l.value.toolbarTips) == null ? void 0 : Oe.fullscreen,
894
894
  onClick: () => {
895
- a();
895
+ r();
896
896
  }
897
897
  }, [t("svg", {
898
898
  class: `${o}-icon`,
@@ -937,7 +937,7 @@ const gl = /* @__PURE__ */ O({
937
937
  class: `${o}-toolbar-item`,
938
938
  title: (Ke = l.value.toolbarTips) == null ? void 0 : Ke.catalog,
939
939
  onClick: () => {
940
- h.emit(r, Vt);
940
+ h.emit(a, Ot);
941
941
  },
942
942
  key: "bar-catalog"
943
943
  }, [t("svg", {
@@ -952,7 +952,7 @@ const gl = /* @__PURE__ */ O({
952
952
  return t("div", {
953
953
  class: `${o}-toolbar-item`,
954
954
  title: (_e = l.value.toolbarTips) == null ? void 0 : _e.github,
955
- onClick: () => Et("https://github.com/imzbf/md-editor-v3")
955
+ onClick: () => Nt("https://github.com/imzbf/md-editor-v3")
956
956
  }, [t("svg", {
957
957
  class: `${o}-icon`,
958
958
  "aria-hidden": "true"
@@ -1076,7 +1076,7 @@ const gl = /* @__PURE__ */ O({
1076
1076
  const p = e.defToolbars[v];
1077
1077
  return p ? at(p, {
1078
1078
  insert(de) {
1079
- h.emit(r, "replace", "universal", {
1079
+ h.emit(a, "replace", "universal", {
1080
1080
  generate: de
1081
1081
  });
1082
1082
  }
@@ -1085,7 +1085,7 @@ const gl = /* @__PURE__ */ O({
1085
1085
  const p = e.defToolbars.children[v];
1086
1086
  return p ? at(p, {
1087
1087
  insert(de) {
1088
- h.emit(r, "replace", "universal", {
1088
+ h.emit(a, "replace", "universal", {
1089
1089
  generate: de
1090
1090
  });
1091
1091
  }
@@ -1093,14 +1093,14 @@ const gl = /* @__PURE__ */ O({
1093
1093
  } else
1094
1094
  return "";
1095
1095
  };
1096
- return I(() => e.toolbars, () => {
1096
+ return H(() => e.toolbars, () => {
1097
1097
  ce(() => {
1098
- i.value && Nt(i.value);
1098
+ i.value && It(i.value);
1099
1099
  });
1100
1100
  }, {
1101
1101
  immediate: !0
1102
1102
  }), () => {
1103
- const v = f.value[0].map((k) => T(k)), g = f.value[1].map((k) => T(k));
1103
+ const v = m.value[0].map((k) => T(k)), g = m.value[1].map((k) => T(k));
1104
1104
  return t(kt, null, [e.toolbars.length > 0 && t("div", {
1105
1105
  class: `${o}-toolbar-wrapper`,
1106
1106
  ref: i,
@@ -1109,7 +1109,7 @@ const gl = /* @__PURE__ */ O({
1109
1109
  class: [`${o}-toolbar`, e.showToolbarName && `${o}-stn`]
1110
1110
  }, [t("div", {
1111
1111
  class: `${o}-toolbar-left`,
1112
- ref: m
1112
+ ref: f
1113
1113
  }, [v]), t("div", {
1114
1114
  class: `${o}-toolbar-right`
1115
1115
  }, [g])])]), t("input", {
@@ -1120,7 +1120,7 @@ const gl = /* @__PURE__ */ O({
1120
1120
  style: {
1121
1121
  display: "none"
1122
1122
  }
1123
- }, null), t(xl, {
1123
+ }, null), t(Sl, {
1124
1124
  linkVisible: c.linkVisible,
1125
1125
  clipVisible: c.clipVisible,
1126
1126
  type: c.type,
@@ -1136,16 +1136,16 @@ const gl = /* @__PURE__ */ O({
1136
1136
  }, null)]);
1137
1137
  };
1138
1138
  }
1139
- }), Al = (e, r) => {
1140
- const l = Ht(() => {
1141
- e.removeEventListener("scroll", a), e.addEventListener("scroll", a), r.removeEventListener("scroll", a), r.addEventListener("scroll", a);
1142
- }, 50), a = (n) => {
1143
- const i = e.clientHeight, u = r.clientHeight, d = e.scrollHeight, c = r.scrollHeight, m = (d - i) / (c - u);
1144
- n.target === e ? (r.removeEventListener("scroll", a), r.scrollTo({
1145
- top: e.scrollTop / m
1139
+ }), Ml = (e, a) => {
1140
+ const l = Et(() => {
1141
+ e.removeEventListener("scroll", r), e.addEventListener("scroll", r), a.removeEventListener("scroll", r), a.addEventListener("scroll", r);
1142
+ }, 50), r = (n) => {
1143
+ const i = e.clientHeight, u = a.clientHeight, d = e.scrollHeight, c = a.scrollHeight, f = (d - i) / (c - u);
1144
+ n.target === e ? (a.removeEventListener("scroll", r), a.scrollTo({
1145
+ top: e.scrollTop / f
1146
1146
  // behavior: 'smooth'
1147
- }), l()) : (e.removeEventListener("scroll", a), e.scrollTo({
1148
- top: r.scrollTop * m
1147
+ }), l()) : (e.removeEventListener("scroll", r), e.scrollTo({
1148
+ top: a.scrollTop * f
1149
1149
  // behavior: 'smooth'
1150
1150
  }), l());
1151
1151
  };
@@ -1156,17 +1156,17 @@ const gl = /* @__PURE__ */ O({
1156
1156
  });
1157
1157
  },
1158
1158
  () => {
1159
- e.removeEventListener("scroll", a), r.removeEventListener("scroll", a);
1159
+ e.removeEventListener("scroll", r), a.removeEventListener("scroll", r);
1160
1160
  }
1161
1161
  ];
1162
- }, Ml = (e, r, l) => {
1163
- const { view: a } = l, n = (b) => a.lineBlockAt(a.state.doc.line(b).from).top, i = (b) => a.lineBlockAt(a.state.doc.line(b).from).height;
1162
+ }, Ll = (e, a, l) => {
1163
+ const { view: r } = l, n = (b) => r.lineBlockAt(r.state.doc.line(b).from).top, i = (b) => r.lineBlockAt(r.state.doc.line(b).from).height;
1164
1164
  let u = [];
1165
1165
  const d = () => {
1166
1166
  u = [];
1167
- const b = Array.from(r.querySelectorAll("[data-line]")).map(
1167
+ const b = Array.from(a.querySelectorAll("[data-line]")).map(
1168
1168
  (g) => Number(g.dataset.line) + 1
1169
- ), { lines: $ } = a.state.doc;
1169
+ ), { lines: $ } = r.state.doc;
1170
1170
  let T = 1, v = b.shift() ?? $;
1171
1171
  for (let g = 1; g <= $; g++)
1172
1172
  g === v && (T = g, v = b.shift() || $ + 1), u.push({
@@ -1174,115 +1174,115 @@ const gl = /* @__PURE__ */ O({
1174
1174
  end: v - 1
1175
1175
  });
1176
1176
  };
1177
- let c = 0, m = 0;
1178
- const f = It((b) => {
1177
+ let c = 0, f = 0;
1178
+ const m = Ht((b) => {
1179
1179
  var v, g, k, y, w, x, L;
1180
- if (!((v = r.firstElementChild) != null && v.firstElementChild))
1180
+ if (!((v = a.firstElementChild) != null && v.firstElementChild))
1181
1181
  return;
1182
- const $ = a.lineBlockAtHeight(a.scrollDOM.scrollTop), { number: T } = a.state.doc.lineAt($.from);
1183
- if (!(T > u.length) && !(a.state.doc.lines < u[u.length - 1].end))
1182
+ const $ = r.lineBlockAtHeight(r.scrollDOM.scrollTop), { number: T } = r.state.doc.lineAt($.from);
1183
+ if (!(T > u.length) && !(r.state.doc.lines < u[u.length - 1].end))
1184
1184
  if (b.target === e) {
1185
- if (m !== 0)
1185
+ if (f !== 0)
1186
1186
  return;
1187
1187
  c++;
1188
1188
  const C = u[T - 1], M = n(C.end) + i(C.end);
1189
1189
  let R = 0;
1190
- const D = n(C.start), N = r.querySelector(`[data-line="${C.start - 1}"]`) || ((g = r.firstElementChild) == null ? void 0 : g.firstElementChild), V = r.querySelector(`[data-line="${C.end}"]`) || ((k = r.lastElementChild) == null ? void 0 : k.lastElementChild);
1191
- let B = 0, E = 0;
1192
- D === 0 ? (R = (a.scrollDOM.scrollTop - D) / (M - D), B = V.offsetTop) : M > a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight ? (R = (a.scrollDOM.scrollTop - D) / (a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight - D), E = N.offsetTop, B = r.scrollHeight - r.clientHeight - E + 10) : (R = (a.scrollDOM.scrollTop - D) / (M - D), E = N.offsetTop, B = V.offsetTop - E);
1193
- const j = E - 10 + B * R;
1194
- rt(r, j, () => {
1190
+ const D = n(C.start), I = a.querySelector(`[data-line="${C.start - 1}"]`) || ((g = a.firstElementChild) == null ? void 0 : g.firstElementChild), O = a.querySelector(`[data-line="${C.end}"]`) || ((k = a.lastElementChild) == null ? void 0 : k.lastElementChild);
1191
+ let B = 0, N = 0;
1192
+ D === 0 ? (R = (r.scrollDOM.scrollTop - D) / (M - D), B = O.offsetTop) : M > r.scrollDOM.scrollHeight - r.scrollDOM.clientHeight ? (R = (r.scrollDOM.scrollTop - D) / (r.scrollDOM.scrollHeight - r.scrollDOM.clientHeight - D), N = I.offsetTop, B = a.scrollHeight - a.clientHeight - N + 10) : (R = (r.scrollDOM.scrollTop - D) / (M - D), N = I.offsetTop, B = O.offsetTop - N);
1193
+ const j = N - 10 + B * R;
1194
+ rt(a, j, () => {
1195
1195
  c--;
1196
1196
  });
1197
1197
  } else {
1198
1198
  if (c !== 0)
1199
1199
  return;
1200
- m++;
1200
+ f++;
1201
1201
  const C = Array.from(
1202
- r.querySelectorAll("[data-line]")
1203
- ), M = r.scrollTop, R = r.scrollHeight;
1202
+ a.querySelectorAll("[data-line]")
1203
+ ), M = a.scrollTop, R = a.scrollHeight;
1204
1204
  let D = C.length === 0 ? 1 : Math.ceil(
1205
1205
  Number(C[C.length - 1].dataset.line) * (M / R)
1206
- ), N = (y = r.firstElementChild) == null ? void 0 : y.firstElementChild;
1207
- for (let H = D; H >= 0; H--) {
1208
- const F = r.querySelector(`[data-line="${H}"]`);
1206
+ ), I = (y = a.firstElementChild) == null ? void 0 : y.firstElementChild;
1207
+ for (let E = D; E >= 0; E--) {
1208
+ const F = a.querySelector(`[data-line="${E}"]`);
1209
1209
  if (F && F.offsetTop <= M) {
1210
- N = F, D = H;
1210
+ I = F, D = E;
1211
1211
  break;
1212
1212
  }
1213
1213
  }
1214
- let V = (w = r.firstElementChild) == null ? void 0 : w.firstElementChild, B = (x = r.firstElementChild) == null ? void 0 : x.lastElementChild;
1214
+ let O = (w = a.firstElementChild) == null ? void 0 : w.firstElementChild, B = (x = a.firstElementChild) == null ? void 0 : x.lastElementChild;
1215
1215
  for (; C.length > 0; ) {
1216
- const H = C.indexOf(N);
1217
- if (H + 1 >= C.length)
1216
+ const E = C.indexOf(I);
1217
+ if (E + 1 >= C.length)
1218
1218
  break;
1219
- const F = C[H + 1];
1220
- if (H === -1) {
1219
+ const F = C[E + 1];
1220
+ if (E === -1) {
1221
1221
  B = F;
1222
1222
  break;
1223
1223
  }
1224
- const ee = N.offsetTop;
1224
+ const ee = I.offsetTop;
1225
1225
  if (ee > M) {
1226
- if (H === 0) {
1227
- V = N, B = F;
1226
+ if (E === 0) {
1227
+ O = I, B = F;
1228
1228
  break;
1229
1229
  }
1230
- N = C[H - 1];
1230
+ I = C[E - 1];
1231
1231
  continue;
1232
1232
  }
1233
1233
  const ne = F.offsetTop;
1234
1234
  if (ee <= M && ne > M) {
1235
- V = N, B = F;
1235
+ O = I, B = F;
1236
1236
  break;
1237
1237
  }
1238
- N = F;
1238
+ I = F;
1239
1239
  }
1240
- const E = V.offsetTop, j = B.offsetTop;
1240
+ const N = O.offsetTop, j = B.offsetTop;
1241
1241
  let U = 0;
1242
- const { start: re, end: X } = u[Number(V.dataset.line || 0)], _ = n(re);
1242
+ const { start: re, end: X } = u[Number(O.dataset.line || 0)], _ = n(re);
1243
1243
  let G = n(X);
1244
1244
  const Q = i(X);
1245
1245
  let W = 0;
1246
- V === ((L = r.firstElementChild) == null ? void 0 : L.firstElementChild) ? (U = Math.max(M / j, 0), W = G + Q - _) : G > a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight ? (U = Math.max(
1247
- (M - E) / (r.scrollHeight - E - r.clientHeight),
1246
+ O === ((L = a.firstElementChild) == null ? void 0 : L.firstElementChild) ? (U = Math.max(M / j, 0), W = G + Q - _) : G > r.scrollDOM.scrollHeight - r.scrollDOM.clientHeight ? (U = Math.max(
1247
+ (M - N) / (a.scrollHeight - N - a.clientHeight),
1248
1248
  0
1249
- ), G = n(a.state.doc.lines) + i(a.state.doc.lines), W = 8 + G - _ - e.clientHeight) : (U = Math.max(
1250
- (M - E) / (j - E),
1249
+ ), G = n(r.state.doc.lines) + i(r.state.doc.lines), W = 8 + G - _ - e.clientHeight) : (U = Math.max(
1250
+ (M - N) / (j - N),
1251
1251
  0
1252
1252
  ), W = G + Q - _), rt(e, _ + W * U, () => {
1253
- m--;
1253
+ f--;
1254
1254
  });
1255
1255
  }
1256
1256
  }, 10);
1257
1257
  return [
1258
1258
  () => {
1259
- d(), e.addEventListener("scroll", f), r.addEventListener("scroll", f), e.dispatchEvent(new Event("scroll"));
1259
+ d(), e.addEventListener("scroll", m), a.addEventListener("scroll", m), e.dispatchEvent(new Event("scroll"));
1260
1260
  },
1261
1261
  () => {
1262
- u = [], e.removeEventListener("scroll", f), r.removeEventListener("scroll", f);
1262
+ u = [], e.removeEventListener("scroll", m), a.removeEventListener("scroll", m);
1263
1263
  }
1264
1264
  ];
1265
- }, Ll = (e, r, l) => {
1266
- const a = A("editorId");
1265
+ }, Dl = (e, a, l) => {
1266
+ const r = A("editorId");
1267
1267
  let n = () => {
1268
1268
  }, i = () => {
1269
1269
  };
1270
1270
  const u = () => {
1271
1271
  n();
1272
1272
  const d = document.querySelector(".cm-scroller"), c = document.querySelector(
1273
- `[id="${a}-preview-wrapper"][data-show="true"]`
1274
- ), m = document.querySelector(
1275
- `[id="${a}-html-wrapper"][data-show="true"]`
1273
+ `[id="${r}-preview-wrapper"][data-show="true"]`
1274
+ ), f = document.querySelector(
1275
+ `[id="${r}-html-wrapper"][data-show="true"]`
1276
1276
  );
1277
- (c || m) && ([i, n] = (c ? Ml : Al)(
1277
+ (c || f) && ([i, n] = (c ? Ll : Ml)(
1278
1278
  d,
1279
- c || m,
1279
+ c || f,
1280
1280
  l.value
1281
1281
  )), e.scrollAuto && i();
1282
1282
  };
1283
- I(
1283
+ H(
1284
1284
  [
1285
- r,
1285
+ a,
1286
1286
  le(e.setting, "preview"),
1287
1287
  le(e.setting, "htmlPreview"),
1288
1288
  le(e.setting, "fullscreen"),
@@ -1291,19 +1291,19 @@ const gl = /* @__PURE__ */ O({
1291
1291
  () => {
1292
1292
  ce(u);
1293
1293
  }
1294
- ), I(
1294
+ ), H(
1295
1295
  () => e.scrollAuto,
1296
1296
  (d) => {
1297
1297
  d ? i() : n();
1298
1298
  }
1299
1299
  ), Y(u);
1300
- }, Dl = Ll, Nl = (e, r, l) => {
1301
- var f, b, $, T, v, g;
1302
- let a = "", n = 0, i = 0, u = !0, d = !1;
1303
- const c = r.getSelectedText(), m = (f = z.editorConfig) == null ? void 0 : f.mermaidTemplate;
1300
+ }, Il = Dl, Nl = (e, a, l) => {
1301
+ var m, b, $, T, v, g;
1302
+ let r = "", n = 0, i = 0, u = !0, d = !1;
1303
+ const c = a.getSelectedText(), f = (m = z.editorConfig) == null ? void 0 : m.mermaidTemplate;
1304
1304
  if (/^h[1-6]{1}$/.test(e)) {
1305
1305
  const k = e.replace(/^h(\d)/, (y, w) => new Array(Number(w)).fill("#", 0, w).join(""));
1306
- a = `${k} ${c}`, n = k.length + 1;
1306
+ r = `${k} ${c}`, n = k.length + 1;
1307
1307
  } else if (e === "prettier") {
1308
1308
  const k = window.prettier || (($ = (b = z.editorExtensions) == null ? void 0 : b.prettier) == null ? void 0 : $.prettierInstance), y = [
1309
1309
  ((T = window.prettierPlugins) == null ? void 0 : T.markdown) || ((g = (v = z.editorExtensions) == null ? void 0 : v.prettier) == null ? void 0 : g.parserMarkdownInstance)
@@ -1311,163 +1311,163 @@ const gl = /* @__PURE__ */ O({
1311
1311
  !k || y[0] === void 0 ? (h.emit(l.editorId, "errorCatcher", {
1312
1312
  name: "prettier",
1313
1313
  message: "prettier is undefined"
1314
- }), a = r.getValue()) : a = k.format(r.getValue(), {
1314
+ }), r = a.getValue()) : r = k.format(a.getValue(), {
1315
1315
  parser: "markdown",
1316
1316
  plugins: y
1317
1317
  }), u = !1, d = !0;
1318
1318
  } else
1319
1319
  switch (e) {
1320
1320
  case "bold": {
1321
- a = `**${c}**`, n = 2, i = -2;
1321
+ r = `**${c}**`, n = 2, i = -2;
1322
1322
  break;
1323
1323
  }
1324
1324
  case "underline": {
1325
- a = `<u>${c}</u>`, n = 3, i = -4;
1325
+ r = `<u>${c}</u>`, n = 3, i = -4;
1326
1326
  break;
1327
1327
  }
1328
1328
  case "italic": {
1329
- a = `*${c}*`, n = 1, i = -1;
1329
+ r = `*${c}*`, n = 1, i = -1;
1330
1330
  break;
1331
1331
  }
1332
1332
  case "strikeThrough": {
1333
- a = `~~${c}~~`, n = 2, i = -2;
1333
+ r = `~~${c}~~`, n = 2, i = -2;
1334
1334
  break;
1335
1335
  }
1336
1336
  case "sub": {
1337
- a = `<sub>${c}</sub>`, n = 5, i = -6;
1337
+ r = `<sub>${c}</sub>`, n = 5, i = -6;
1338
1338
  break;
1339
1339
  }
1340
1340
  case "sup": {
1341
- a = `<sup>${c}</sup>`, n = 5, i = -6;
1341
+ r = `<sup>${c}</sup>`, n = 5, i = -6;
1342
1342
  break;
1343
1343
  }
1344
1344
  case "codeRow": {
1345
- a = "`" + c + "`", n = 1, i = -1;
1345
+ r = "`" + c + "`", n = 1, i = -1;
1346
1346
  break;
1347
1347
  }
1348
1348
  case "quote": {
1349
- a = `> ${c}`, n = 2;
1349
+ r = `> ${c}`, n = 2;
1350
1350
  break;
1351
1351
  }
1352
1352
  case "orderedList": {
1353
- a = `1. ${c}`, n = 3;
1353
+ r = `1. ${c}`, n = 3;
1354
1354
  break;
1355
1355
  }
1356
1356
  case "unorderedList": {
1357
- a = `- ${c}`, n = 2;
1357
+ r = `- ${c}`, n = 2;
1358
1358
  break;
1359
1359
  }
1360
1360
  case "task": {
1361
- a = `- [ ] ${c}`, n = 6;
1361
+ r = `- [ ] ${c}`, n = 6;
1362
1362
  break;
1363
1363
  }
1364
1364
  case "code": {
1365
1365
  const k = l.text || c || "", y = l.mode || "language";
1366
- a = `\`\`\`${y}
1366
+ r = `\`\`\`${y}
1367
1367
  ${k}
1368
1368
  \`\`\`
1369
- `, n = 3, i = 3 + y.length - a.length;
1369
+ `, n = 3, i = 3 + y.length - r.length;
1370
1370
  break;
1371
1371
  }
1372
1372
  case "table": {
1373
- a = "|";
1373
+ r = "|";
1374
1374
  const { selectedShape: k = { x: 1, y: 1 } } = l, { x: y, y: w } = k;
1375
1375
  for (let x = 0; x <= w; x++)
1376
- a += " col |";
1377
- a += `
1376
+ r += " col |";
1377
+ r += `
1378
1378
  |`;
1379
1379
  for (let x = 0; x <= w; x++)
1380
- a += " - |";
1380
+ r += " - |";
1381
1381
  for (let x = 0; x <= y; x++) {
1382
- a += `
1382
+ r += `
1383
1383
  |`;
1384
1384
  for (let L = 0; L <= w; L++)
1385
- a += " content |";
1385
+ r += " content |";
1386
1386
  }
1387
- n = 2, i = 5 - a.length;
1387
+ n = 2, i = 5 - r.length;
1388
1388
  break;
1389
1389
  }
1390
1390
  case "link": {
1391
1391
  const { desc: k, url: y } = l;
1392
- a = `[${k}](${y})`, u = !1;
1392
+ r = `[${k}](${y})`, u = !1;
1393
1393
  break;
1394
1394
  }
1395
1395
  case "image": {
1396
1396
  const { desc: k, url: y, urls: w } = l;
1397
- w instanceof Array ? a = w.reduce((x, L) => x + `![${k}](${L})
1398
- `, "") : a = `![${k}](${y})
1397
+ w instanceof Array ? r = w.reduce((x, L) => x + `![${k}](${L})
1398
+ `, "") : r = `![${k}](${y})
1399
1399
  `, u = !1;
1400
1400
  break;
1401
1401
  }
1402
1402
  case "flow": {
1403
- a = `\`\`\`mermaid
1404
- ${(m == null ? void 0 : m.flow) || `flowchart TD
1403
+ r = `\`\`\`mermaid
1404
+ ${(f == null ? void 0 : f.flow) || `flowchart TD
1405
1405
  Start --> Stop`}
1406
1406
  \`\`\`
1407
- `, n = 3, i = 10 - a.length;
1407
+ `, n = 3, i = 10 - r.length;
1408
1408
  break;
1409
1409
  }
1410
1410
  case "sequence": {
1411
- a = `\`\`\`mermaid
1412
- ${(m == null ? void 0 : m.sequence) || `sequenceDiagram
1411
+ r = `\`\`\`mermaid
1412
+ ${(f == null ? void 0 : f.sequence) || `sequenceDiagram
1413
1413
  A->>B: hello!
1414
1414
  B-->>A: hi!
1415
1415
  A-)B: bye!`}
1416
1416
  \`\`\`
1417
- `, n = 3, i = 10 - a.length;
1417
+ `, n = 3, i = 10 - r.length;
1418
1418
  break;
1419
1419
  }
1420
1420
  case "gantt": {
1421
- a = `\`\`\`mermaid
1422
- ${(m == null ? void 0 : m.gantt) || `gantt
1421
+ r = `\`\`\`mermaid
1422
+ ${(f == null ? void 0 : f.gantt) || `gantt
1423
1423
  title A Gantt Diagram
1424
1424
  dateFormat YYYY-MM-DD
1425
1425
  section Section
1426
1426
  A task :a1, 2014-01-01, 30d
1427
1427
  Another task :after a1, 20d`}
1428
1428
  \`\`\`
1429
- `, n = 3, i = 10 - a.length;
1429
+ `, n = 3, i = 10 - r.length;
1430
1430
  break;
1431
1431
  }
1432
1432
  case "class": {
1433
- a = `\`\`\`mermaid
1434
- ${(m == null ? void 0 : m.class) || `classDiagram
1433
+ r = `\`\`\`mermaid
1434
+ ${(f == null ? void 0 : f.class) || `classDiagram
1435
1435
  class Animal
1436
1436
  Vehicle <|-- Car`}
1437
1437
  \`\`\`
1438
- `, n = 3, i = 10 - a.length;
1438
+ `, n = 3, i = 10 - r.length;
1439
1439
  break;
1440
1440
  }
1441
1441
  case "state": {
1442
- a = `\`\`\`mermaid
1443
- ${(m == null ? void 0 : m.state) || `stateDiagram-v2
1442
+ r = `\`\`\`mermaid
1443
+ ${(f == null ? void 0 : f.state) || `stateDiagram-v2
1444
1444
  s1 --> s2`}
1445
1445
  \`\`\`
1446
- `, n = 3, i = 10 - a.length;
1446
+ `, n = 3, i = 10 - r.length;
1447
1447
  break;
1448
1448
  }
1449
1449
  case "pie": {
1450
- a = `\`\`\`mermaid
1451
- ${(m == null ? void 0 : m.pie) || `pie title Pets adopted by volunteers
1450
+ r = `\`\`\`mermaid
1451
+ ${(f == null ? void 0 : f.pie) || `pie title Pets adopted by volunteers
1452
1452
  "Dogs" : 386
1453
1453
  "Cats" : 85
1454
1454
  "Rats" : 15`}
1455
1455
  \`\`\`
1456
- `, n = 3, i = 10 - a.length;
1456
+ `, n = 3, i = 10 - r.length;
1457
1457
  break;
1458
1458
  }
1459
1459
  case "relationship": {
1460
- a = `\`\`\`mermaid
1461
- ${(m == null ? void 0 : m.relationship) || `erDiagram
1460
+ r = `\`\`\`mermaid
1461
+ ${(f == null ? void 0 : f.relationship) || `erDiagram
1462
1462
  CAR ||--o{ NAMED-DRIVER : allows
1463
1463
  PERSON ||--o{ NAMED-DRIVER : is`}
1464
1464
  \`\`\`
1465
- `, n = 3, i = 10 - a.length;
1465
+ `, n = 3, i = 10 - r.length;
1466
1466
  break;
1467
1467
  }
1468
1468
  case "journey": {
1469
- a = `\`\`\`mermaid
1470
- ${(m == null ? void 0 : m.journey) || `journey
1469
+ r = `\`\`\`mermaid
1470
+ ${(f == null ? void 0 : f.journey) || `journey
1471
1471
  title My working day
1472
1472
  section Go to work
1473
1473
  Make tea: 5: Me
@@ -1477,15 +1477,15 @@ ${(m == null ? void 0 : m.journey) || `journey
1477
1477
  Go downstairs: 5: Me
1478
1478
  Sit down: 5: Me`}
1479
1479
  \`\`\`
1480
- `, n = 3, i = 10 - a.length;
1480
+ `, n = 3, i = 10 - r.length;
1481
1481
  break;
1482
1482
  }
1483
1483
  case "katexInline": {
1484
- a = "$$", n = 1, i = -1;
1484
+ r = "$$", n = 1, i = -1;
1485
1485
  break;
1486
1486
  }
1487
1487
  case "katexBlock": {
1488
- a = `$$
1488
+ r = `$$
1489
1489
 
1490
1490
  $$
1491
1491
  `, n = 3, i = -4;
@@ -1493,11 +1493,11 @@ $$
1493
1493
  }
1494
1494
  case "universal": {
1495
1495
  const { generate: k } = l, y = k(c);
1496
- a = y.targetValue, u = y.select, n = y.deviationStart, i = y.deviationEnd;
1496
+ r = y.targetValue, u = y.select, n = y.deviationStart, i = y.deviationEnd;
1497
1497
  }
1498
1498
  }
1499
1499
  return {
1500
- text: a,
1500
+ text: r,
1501
1501
  options: {
1502
1502
  // 是否选中
1503
1503
  select: u,
@@ -1509,7 +1509,7 @@ $$
1509
1509
  replaceAll: d
1510
1510
  }
1511
1511
  };
1512
- }, El = "#e5c07b", it = "var(--md-color)", Hl = "#56b6c2", Il = "#ffffff", oe = "var(--md-color)", st = "#e5c07b", Bl = "#e5c07b", Fl = "var(--md-color)", ct = "#d19a66", Ol = "#c678dd", Vl = "#21252b", Rl = "#2c313a", dt = "var(--md-bk-color)", me = "var(--md-bk-color)", Pl = "#ceedfa33", ut = "#528bff", ql = be.theme(
1512
+ }, El = "#e5c07b", it = "var(--md-color)", Hl = "#56b6c2", Bl = "#ffffff", oe = "var(--md-color)", st = "#e5c07b", Fl = "#e5c07b", Vl = "var(--md-color)", ct = "#d19a66", Ol = "#c678dd", Rl = "#21252b", Pl = "#2c313a", dt = "var(--md-bk-color)", me = "var(--md-bk-color)", ql = "#ceedfa33", ut = "#528bff", Ul = be.theme(
1513
1513
  {
1514
1514
  "&": {
1515
1515
  color: oe,
@@ -1519,8 +1519,8 @@ $$
1519
1519
  caretColor: ut
1520
1520
  },
1521
1521
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: ut },
1522
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Pl },
1523
- ".cm-panels": { backgroundColor: Vl, color: oe },
1522
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: ql },
1523
+ ".cm-panels": { backgroundColor: Rl, color: oe },
1524
1524
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
1525
1525
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
1526
1526
  ".cm-searchMatch": {
@@ -1542,7 +1542,7 @@ $$
1542
1542
  borderColor: "var(--md-border-color)"
1543
1543
  },
1544
1544
  ".cm-activeLineGutter": {
1545
- backgroundColor: Rl
1545
+ backgroundColor: Pl
1546
1546
  },
1547
1547
  ".cm-foldPlaceholder": {
1548
1548
  backgroundColor: "transparent",
@@ -1568,10 +1568,10 @@ $$
1568
1568
  }
1569
1569
  },
1570
1570
  { dark: !0 }
1571
- ), Ul = $t.define([
1571
+ ), Gl = $t.define([
1572
1572
  { tag: s.keyword, color: Ol },
1573
1573
  { tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: it },
1574
- { tag: [s.function(s.variableName), s.labelName], color: Bl },
1574
+ { tag: [s.function(s.variableName), s.labelName], color: Fl },
1575
1575
  { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ct },
1576
1576
  { tag: [s.definition(s.name), s.separator], color: oe },
1577
1577
  {
@@ -1606,12 +1606,12 @@ $$
1606
1606
  { tag: s.link, color: st, textDecoration: "underline" },
1607
1607
  { tag: s.heading, fontWeight: "bold", color: it },
1608
1608
  { tag: [s.atom, s.bool, s.special(s.variableName)], color: ct },
1609
- { tag: [s.processingInstruction, s.string, s.inserted], color: Fl },
1610
- { tag: s.invalid, color: Il }
1611
- ]), Gl = [
1612
- ql,
1613
- yt(Ul)
1614
- ], Kl = "#e5c07b", mt = "#3f4a54", jl = "#56b6c2", _l = "#fff", ae = "#3f4a54", ft = "#2d8cf0", Wl = "#2d8cf0", zl = "#3f4a54", gt = "#d19a66", Yl = "#c678dd", Zl = "#21252b", Jl = "#ceedfa33", ht = "var(--md-bk-color)", fe = "var(--md-bk-color)", Xl = "#bad5fa", bt = "#3f4a54", Ql = be.theme(
1609
+ { tag: [s.processingInstruction, s.string, s.inserted], color: Vl },
1610
+ { tag: s.invalid, color: Bl }
1611
+ ]), Kl = [
1612
+ Ul,
1613
+ yt(Gl)
1614
+ ], jl = "#e5c07b", mt = "#3f4a54", _l = "#56b6c2", Wl = "#fff", ae = "#3f4a54", ft = "#2d8cf0", zl = "#2d8cf0", Yl = "#3f4a54", gt = "#d19a66", Zl = "#c678dd", Jl = "#21252b", Xl = "#ceedfa33", ht = "var(--md-bk-color)", fe = "var(--md-bk-color)", Ql = "#bad5fa", bt = "#3f4a54", eo = be.theme(
1615
1615
  {
1616
1616
  "&": {
1617
1617
  color: ae,
@@ -1621,8 +1621,8 @@ $$
1621
1621
  caretColor: bt
1622
1622
  },
1623
1623
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: bt },
1624
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Xl },
1625
- ".cm-panels": { backgroundColor: Zl, color: ae },
1624
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ql },
1625
+ ".cm-panels": { backgroundColor: Jl, color: ae },
1626
1626
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
1627
1627
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
1628
1628
  ".cm-searchMatch": {
@@ -1644,7 +1644,7 @@ $$
1644
1644
  borderColor: "var(--md-border-color)"
1645
1645
  },
1646
1646
  ".cm-activeLineGutter": {
1647
- backgroundColor: Jl
1647
+ backgroundColor: Xl
1648
1648
  },
1649
1649
  ".cm-foldPlaceholder": {
1650
1650
  backgroundColor: "transparent",
@@ -1670,10 +1670,10 @@ $$
1670
1670
  }
1671
1671
  }
1672
1672
  // { dark: true }
1673
- ), eo = $t.define([
1674
- { tag: s.keyword, color: Yl },
1673
+ ), to = $t.define([
1674
+ { tag: s.keyword, color: Zl },
1675
1675
  { tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: mt },
1676
- { tag: [s.function(s.variableName), s.labelName], color: Wl },
1676
+ { tag: [s.function(s.variableName), s.labelName], color: zl },
1677
1677
  { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: gt },
1678
1678
  { tag: [s.definition(s.name), s.separator], color: ae },
1679
1679
  {
@@ -1687,7 +1687,7 @@ $$
1687
1687
  s.self,
1688
1688
  s.namespace
1689
1689
  ],
1690
- color: Kl
1690
+ color: jl
1691
1691
  },
1692
1692
  {
1693
1693
  tag: [
@@ -1699,7 +1699,7 @@ $$
1699
1699
  s.link,
1700
1700
  s.special(s.string)
1701
1701
  ],
1702
- color: jl
1702
+ color: _l
1703
1703
  },
1704
1704
  { tag: [s.meta, s.comment], color: ft },
1705
1705
  { tag: s.strong, fontWeight: "bold" },
@@ -1708,37 +1708,37 @@ $$
1708
1708
  { tag: s.link, color: ft, textDecoration: "underline" },
1709
1709
  { tag: s.heading, fontWeight: "bold", color: mt },
1710
1710
  { tag: [s.atom, s.bool, s.special(s.variableName)], color: gt },
1711
- { tag: [s.processingInstruction, s.string, s.inserted], color: zl },
1712
- { tag: s.invalid, color: _l }
1713
- ]), to = [
1714
- Ql,
1715
- yt(eo)
1716
- ], se = (e, r, l, a, n) => (i, u, d, c) => {
1717
- const m = `${e}${r}`.slice(c - d);
1718
- i.dispatch(i.state.replaceSelection(`${m}${l}${a}`));
1719
- const f = d + u.label.length + (n === "title" ? l.length : 0);
1711
+ { tag: [s.processingInstruction, s.string, s.inserted], color: Yl },
1712
+ { tag: s.invalid, color: Wl }
1713
+ ]), lo = [
1714
+ eo,
1715
+ yt(to)
1716
+ ], se = (e, a, l, r, n) => (i, u, d, c) => {
1717
+ const f = `${e}${a}`.slice(c - d);
1718
+ i.dispatch(i.state.replaceSelection(`${f}${l}${r}`));
1719
+ const m = d + u.label.length + (n === "title" ? l.length : 0);
1720
1720
  i.dispatch({
1721
1721
  selection: P.create(
1722
1722
  [
1723
1723
  P.range(
1724
- d + u.label.length + (n === "title" ? 1 : -r.length),
1725
- f
1724
+ d + u.label.length + (n === "title" ? 1 : -a.length),
1725
+ m
1726
1726
  ),
1727
- P.cursor(f)
1727
+ P.cursor(m)
1728
1728
  ],
1729
1729
  1
1730
1730
  )
1731
1731
  }), i.focus();
1732
- }, vt = (e) => (r, l, a, n) => {
1733
- const i = e.slice(n - a);
1734
- r.dispatch(r.state.replaceSelection(`${i} `));
1735
- }, lo = (e) => {
1736
- const r = (l) => {
1737
- const a = l.matchBefore(
1732
+ }, vt = (e) => (a, l, r, n) => {
1733
+ const i = e.slice(n - r);
1734
+ a.dispatch(a.state.replaceSelection(`${i} `));
1735
+ }, oo = (e) => {
1736
+ const a = (l) => {
1737
+ const r = l.matchBefore(
1738
1738
  /^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s?\|?|^\$\$?|!+\s*\w*/
1739
1739
  );
1740
- return a === null || a.from == a.to && l.explicit ? null : {
1741
- from: a.from,
1740
+ return r === null || r.from == r.to && l.explicit ? null : {
1741
+ from: r.from,
1742
1742
  options: [
1743
1743
  // 标题
1744
1744
  ...["h1", "h2", "h3", "h4", "h5", "h6"].map((n, i) => {
@@ -1828,17 +1828,17 @@ $$`, "title")
1828
1828
  ]
1829
1829
  };
1830
1830
  };
1831
- return ul({
1832
- override: e ? [r, ll, ...e] : [r]
1831
+ return ml({
1832
+ override: e ? [a, ol, ...e] : [a]
1833
1833
  });
1834
- }, oo = lo, Z = (e) => {
1835
- const r = new cl();
1836
- return (a) => (r.get(e.state) ? e.dispatch({ effects: r.reconfigure(a) }) : e.dispatch({
1837
- effects: dl.appendConfig.of(r.of(a))
1834
+ }, ao = oo, Z = (e) => {
1835
+ const a = new dl();
1836
+ return (r) => (a.get(e.state) ? e.dispatch({ effects: a.reconfigure(r) }) : e.dispatch({
1837
+ effects: ul.appendConfig.of(a.of(r))
1838
1838
  }), !0);
1839
1839
  };
1840
- class ao {
1841
- constructor(r) {
1840
+ class ro {
1841
+ constructor(a) {
1842
1842
  K(this, "view");
1843
1843
  // 切换tabSize的执行方法。切换时,Compartment实例需要相同
1844
1844
  K(this, "toggleTabSize");
@@ -1850,7 +1850,7 @@ class ao {
1850
1850
  K(this, "toggleDisabled");
1851
1851
  K(this, "toggleReadOnly");
1852
1852
  K(this, "toggleMaxlength");
1853
- this.view = r, this.toggleTabSize = Z(this.view), this.togglePlaceholder = Z(this.view), this.setExtensions = Z(this.view), this.toggleDisabled = Z(this.view), this.toggleReadOnly = Z(this.view), this.toggleMaxlength = Z(this.view);
1853
+ this.view = a, this.toggleTabSize = Z(this.view), this.togglePlaceholder = Z(this.view), this.setExtensions = Z(this.view), this.toggleDisabled = Z(this.view), this.toggleReadOnly = Z(this.view), this.toggleMaxlength = Z(this.view);
1854
1854
  }
1855
1855
  getValue() {
1856
1856
  return this.view.state.doc.toString();
@@ -1862,12 +1862,12 @@ class ao {
1862
1862
  * @param from 插入开始位置
1863
1863
  * @param to 插入结束位置
1864
1864
  */
1865
- setValue(r, l = 0, a = this.view.state.doc.length) {
1865
+ setValue(a, l = 0, r = this.view.state.doc.length) {
1866
1866
  this.view.dispatch({
1867
1867
  changes: {
1868
1868
  from: l,
1869
- to: a,
1870
- insert: r
1869
+ to: r,
1870
+ insert: a
1871
1871
  }
1872
1872
  });
1873
1873
  }
@@ -1875,8 +1875,8 @@ class ao {
1875
1875
  * 获取选中的文本
1876
1876
  */
1877
1877
  getSelectedText() {
1878
- const { from: r, to: l } = this.view.state.selection.main;
1879
- return this.view.state.sliceDoc(r, l);
1878
+ const { from: a, to: l } = this.view.state.selection.main;
1879
+ return this.view.state.sliceDoc(a, l);
1880
1880
  }
1881
1881
  /**
1882
1882
  * 使用新的内容替换选中的内容
@@ -1884,7 +1884,7 @@ class ao {
1884
1884
  * @param text 待替换内容
1885
1885
  * @param options 替换后是否选中
1886
1886
  */
1887
- replaceSelectedText(r, l = {
1887
+ replaceSelectedText(a, l = {
1888
1888
  // 是否选中
1889
1889
  select: !0,
1890
1890
  // 选中时,开始位置的偏移量
@@ -1893,35 +1893,47 @@ class ao {
1893
1893
  deviationEnd: 0,
1894
1894
  // 直接替换所有文本
1895
1895
  replaceAll: !1
1896
- }) {
1897
- if (l.replaceAll) {
1898
- this.setValue(r);
1899
- return;
1900
- }
1901
- const { from: a } = this.view.state.selection.main;
1902
- if (this.view.dispatch(this.view.state.replaceSelection(r)), l.select) {
1903
- const n = a + r.length + l.deviationEnd;
1904
- this.view.dispatch({
1905
- selection: P.create(
1906
- [
1907
- P.range(a + l.deviationStart, n),
1908
- P.cursor(n)
1909
- ],
1910
- 1
1911
- )
1912
- });
1896
+ }, r) {
1897
+ var n;
1898
+ try {
1899
+ if (l.replaceAll) {
1900
+ this.setValue(a);
1901
+ return;
1902
+ }
1903
+ const { from: i } = this.view.state.selection.main;
1904
+ if (this.view.dispatch(this.view.state.replaceSelection(a)), l.select) {
1905
+ const u = i + a.length + l.deviationEnd;
1906
+ this.view.dispatch({
1907
+ selection: P.create(
1908
+ [
1909
+ P.range(i + l.deviationStart, u),
1910
+ P.cursor(u)
1911
+ ],
1912
+ 1
1913
+ )
1914
+ });
1915
+ }
1916
+ this.view.focus();
1917
+ } catch (i) {
1918
+ if ((n = i.message) != null && n.includes("Selection points outside of document"))
1919
+ h.emit(r, "errorCatcher", {
1920
+ name: "overlength",
1921
+ message: "The input text is too long",
1922
+ data: a
1923
+ });
1924
+ else
1925
+ throw i;
1913
1926
  }
1914
- this.view.focus();
1915
1927
  }
1916
1928
  /**
1917
1929
  * 设置tabSize
1918
1930
  *
1919
1931
  * @param tabSize 需要切换的大小
1920
1932
  */
1921
- setTabSize(r) {
1933
+ setTabSize(a) {
1922
1934
  this.toggleTabSize([
1923
- ue.tabSize.of(r),
1924
- sl.of(" ".repeat(r))
1935
+ ue.tabSize.of(a),
1936
+ cl.of(" ".repeat(a))
1925
1937
  ]);
1926
1938
  }
1927
1939
  /**
@@ -1929,76 +1941,84 @@ class ao {
1929
1941
  *
1930
1942
  * @param t 目标内容
1931
1943
  */
1932
- setPlaceholder(r) {
1933
- this.togglePlaceholder(Xt(r));
1944
+ setPlaceholder(a) {
1945
+ this.togglePlaceholder(Qt(a));
1934
1946
  }
1935
- focus(r) {
1936
- if (this.view.focus(), !r)
1947
+ focus(a) {
1948
+ if (this.view.focus(), !a)
1937
1949
  return;
1938
- let l = 0, a = 0, n = 0;
1939
- switch (r) {
1950
+ let l = 0, r = 0, n = 0;
1951
+ switch (a) {
1940
1952
  case "start":
1941
1953
  break;
1942
1954
  case "end": {
1943
- l = a = n = this.getValue().length;
1955
+ l = r = n = this.getValue().length;
1944
1956
  break;
1945
1957
  }
1946
1958
  default:
1947
- l = r.rangeAnchor || r.cursorPos, a = r.rangeHead || r.cursorPos, n = r.cursorPos;
1959
+ l = a.rangeAnchor || a.cursorPos, r = a.rangeHead || a.cursorPos, n = a.cursorPos;
1948
1960
  }
1949
1961
  this.view.dispatch({
1950
1962
  scrollIntoView: !0,
1951
1963
  selection: P.create(
1952
- [P.range(l, a), P.cursor(n)],
1964
+ [P.range(l, r), P.cursor(n)],
1953
1965
  1
1954
1966
  )
1955
1967
  });
1956
1968
  }
1957
- setDisabled(r) {
1958
- this.toggleDisabled([be.editable.of(!r)]);
1969
+ setDisabled(a) {
1970
+ this.toggleDisabled([be.editable.of(!a)]);
1959
1971
  }
1960
- setReadOnly(r) {
1961
- this.toggleReadOnly([ue.readOnly.of(r)]);
1972
+ setReadOnly(a) {
1973
+ this.toggleReadOnly([ue.readOnly.of(a)]);
1962
1974
  }
1963
- setMaxLength(r) {
1975
+ setMaxLength(a) {
1964
1976
  this.toggleMaxlength([
1965
- ue.changeFilter.of((l) => l.newDoc.length <= r)
1977
+ ue.changeFilter.of((l) => l.newDoc.length <= a)
1966
1978
  ]);
1967
1979
  }
1968
1980
  }
1969
- const ro = (e) => {
1970
- const r = A("editorId");
1971
- return (a) => {
1972
- if (a.clipboardData) {
1973
- if (a.clipboardData.files.length > 0) {
1974
- const { files: n } = a.clipboardData;
1975
- h.emit(
1976
- r,
1977
- "uploadImage",
1978
- Array.from(n).filter((i) => /image\/.*/.test(i.type))
1979
- ), a.preventDefault();
1980
- }
1981
- if (e.autoDetectCode && a.clipboardData.types.includes("vscode-editor-data")) {
1982
- const n = JSON.parse(a.clipboardData.getData("vscode-editor-data"));
1983
- h.emit(r, "replace", "code", {
1984
- mode: n.mode,
1985
- text: a.clipboardData.getData("text/plain")
1986
- }), a.preventDefault();
1987
- }
1981
+ const no = (e) => {
1982
+ const a = A("editorId");
1983
+ return (r) => {
1984
+ if (!r.clipboardData)
1985
+ return;
1986
+ if (r.clipboardData.files.length > 0) {
1987
+ const { files: i } = r.clipboardData;
1988
+ h.emit(
1989
+ a,
1990
+ "uploadImage",
1991
+ Array.from(i).filter((u) => /image\/.*/.test(u.type))
1992
+ ), r.preventDefault();
1993
+ return;
1994
+ }
1995
+ if (e.autoDetectCode && r.clipboardData.types.includes("vscode-editor-data")) {
1996
+ const i = JSON.parse(r.clipboardData.getData("vscode-editor-data"));
1997
+ h.emit(a, "replace", "code", {
1998
+ mode: i.mode,
1999
+ text: r.clipboardData.getData("text/plain")
2000
+ }), r.preventDefault();
2001
+ return;
1988
2002
  }
2003
+ const n = r.clipboardData.getData("text/plain");
2004
+ e.maxlength && n.length + e.value.length > e.maxlength && h.emit(a, "errorCatcher", {
2005
+ name: "overlength",
2006
+ message: "The input text is too long",
2007
+ data: n
2008
+ });
1989
2009
  };
1990
- }, no = ro, io = (e) => {
1991
- const r = A("editorId");
2010
+ }, io = no, so = (e) => {
2011
+ const a = A("editorId");
1992
2012
  Y(() => {
1993
- h.on(r, {
2013
+ h.on(a, {
1994
2014
  name: Rt,
1995
2015
  callback(l) {
1996
- var a;
1997
- (a = e.value) == null || a.focus(l);
2016
+ var r;
2017
+ (r = e.value) == null || r.focus(l);
1998
2018
  }
1999
2019
  });
2000
2020
  });
2001
- }, so = io, co = (e, r) => [
2021
+ }, co = so, uo = (e, a) => [
2002
2022
  {
2003
2023
  key: "Ctrl-b",
2004
2024
  mac: "Cmd-b",
@@ -2007,7 +2027,7 @@ const ro = (e) => {
2007
2027
  {
2008
2028
  key: "Ctrl-d",
2009
2029
  mac: "Cmd-d",
2010
- run: al,
2030
+ run: rl,
2011
2031
  preventDefault: !0
2012
2032
  },
2013
2033
  {
@@ -2089,106 +2109,115 @@ const ro = (e) => {
2089
2109
  {
2090
2110
  key: "Ctrl-f",
2091
2111
  mac: "Cmd-f",
2092
- shift: () => r.noPrettier ? !1 : (h.emit(e, "replace", "prettier"), !0)
2112
+ shift: () => a.noPrettier ? !1 : (h.emit(e, "replace", "prettier"), !0)
2093
2113
  },
2094
2114
  {
2095
2115
  any: (L, C) => (C.ctrlKey || C.metaKey) && C.altKey && C.shiftKey && C.code === "KeyT" ? (h.emit(e, "replace", "table"), !0) : !1
2096
2116
  }
2097
- ], uo = co, mo = (e) => {
2098
- const r = A("tabWidth"), l = A("editorId"), a = A("theme"), n = q(), i = St(), u = uo(l, e), d = no(e), c = [
2099
- Qt.of([...u, rl]),
2100
- Jt,
2101
- ol(),
2102
- tl({ codeLanguages: el }),
2117
+ ], mo = uo, fo = (e) => {
2118
+ const a = A("tabWidth"), l = A("editorId"), r = A("theme"), n = q(), i = St(), u = mo(l, e), d = io(e), c = [
2119
+ el.of([...u, nl]),
2120
+ Xt,
2121
+ al(),
2122
+ ll({ codeLanguages: tl }),
2103
2123
  // 横向换行
2104
2124
  ie.lineWrapping,
2105
- ie.updateListener.of((f) => {
2106
- f.docChanged && e.onChange(f.state.doc.toString());
2125
+ ie.updateListener.of((m) => {
2126
+ m.docChanged && e.onChange(m.state.doc.toString());
2107
2127
  }),
2108
2128
  ie.domEventHandlers({
2109
2129
  paste: d,
2110
2130
  blur: e.onBlur,
2111
- focus: e.onFocus
2131
+ focus: e.onFocus,
2132
+ input: (m) => {
2133
+ e.onInput && e.onInput(m);
2134
+ const { data: b } = m;
2135
+ e.value.length + b.length && h.emit(l, "errorCatcher", {
2136
+ name: "overlength",
2137
+ message: "The input text is too long",
2138
+ data: b
2139
+ });
2140
+ }
2112
2141
  })
2113
- ], m = () => {
2114
- const f = [
2142
+ ], f = () => {
2143
+ const m = [
2115
2144
  ...c,
2116
- a.value === "light" ? to : Gl,
2117
- oo(e.completions)
2145
+ r.value === "light" ? lo : Kl,
2146
+ ao(e.completions)
2118
2147
  ];
2119
- return z.codeMirrorExtensions(a.value, f, [
2148
+ return z.codeMirrorExtensions(r.value, m, [
2120
2149
  ...u
2121
2150
  ]);
2122
2151
  };
2123
2152
  return Y(() => {
2124
- const f = new ie({
2153
+ const m = new ie({
2125
2154
  doc: e.value,
2126
2155
  parent: n.value
2127
- }), b = new ao(f);
2156
+ }), b = new ro(m);
2128
2157
  i.value = b, setTimeout(() => {
2129
- b.setTabSize(r), b.setDisabled(e.disabled), b.setReadOnly(e.readonly), b.setExtensions(m()), e.placeholder && b.setPlaceholder(e.placeholder), typeof e.maxlength == "number" && b.setMaxLength(e.maxlength), e.autofocus && f.focus();
2158
+ b.setTabSize(a), b.setDisabled(e.disabled), b.setReadOnly(e.readonly), b.setExtensions(f()), e.placeholder && b.setPlaceholder(e.placeholder), typeof e.maxlength == "number" && b.setMaxLength(e.maxlength), e.autofocus && m.focus();
2130
2159
  }, 0), h.on(l, {
2131
2160
  name: "ctrlZ",
2132
2161
  callback() {
2133
- nl(f);
2162
+ il(m);
2134
2163
  }
2135
2164
  }), h.on(l, {
2136
2165
  name: "ctrlShiftZ",
2137
2166
  callback() {
2138
- il(f);
2167
+ sl(m);
2139
2168
  }
2140
2169
  }), h.on(l, {
2141
2170
  name: "replace",
2142
2171
  callback($, T = {}) {
2143
2172
  var k;
2144
2173
  const { text: v, options: g } = Nl($, i.value, T);
2145
- (k = i.value) == null || k.replaceSelectedText(v, g);
2174
+ (k = i.value) == null || k.replaceSelectedText(v, g, l);
2146
2175
  }
2147
2176
  });
2148
- }), I(
2149
- [a, le(e, "completions")],
2177
+ }), H(
2178
+ [r, le(e, "completions")],
2150
2179
  () => {
2151
- var f;
2152
- (f = i.value) == null || f.setExtensions(m());
2180
+ var m;
2181
+ (m = i.value) == null || m.setExtensions(f());
2153
2182
  },
2154
2183
  {
2155
2184
  deep: !0
2156
2185
  }
2157
- ), I(
2186
+ ), H(
2158
2187
  () => e.value,
2159
2188
  () => {
2160
- var f, b;
2161
- ((f = i.value) == null ? void 0 : f.getValue()) !== e.value && ((b = i.value) == null || b.setValue(e.value));
2189
+ var m, b;
2190
+ ((m = i.value) == null ? void 0 : m.getValue()) !== e.value && ((b = i.value) == null || b.setValue(e.value));
2162
2191
  }
2163
- ), I(
2192
+ ), H(
2164
2193
  () => e.placeholder,
2165
2194
  () => {
2166
- var f;
2167
- (f = i.value) == null || f.setPlaceholder(e.placeholder);
2195
+ var m;
2196
+ (m = i.value) == null || m.setPlaceholder(e.placeholder);
2168
2197
  }
2169
- ), I(
2198
+ ), H(
2170
2199
  () => e.disabled,
2171
2200
  () => {
2172
- var f;
2173
- (f = i.value) == null || f.setDisabled(e.disabled);
2201
+ var m;
2202
+ (m = i.value) == null || m.setDisabled(e.disabled);
2174
2203
  }
2175
- ), I(
2204
+ ), H(
2176
2205
  () => e.readonly,
2177
2206
  () => {
2178
- var f;
2179
- (f = i.value) == null || f.setDisabled(e.readonly);
2207
+ var m;
2208
+ (m = i.value) == null || m.setDisabled(e.readonly);
2180
2209
  }
2181
- ), I(
2210
+ ), H(
2182
2211
  () => e.maxlength,
2183
2212
  () => {
2184
- var f;
2185
- e.maxlength && ((f = i.value) == null || f.setMaxLength(e.maxlength));
2213
+ var m;
2214
+ e.maxlength && ((m = i.value) == null || m.setMaxLength(e.maxlength));
2186
2215
  }
2187
- ), so(i), {
2216
+ ), co(i), {
2188
2217
  inputWrapperRef: n,
2189
2218
  codeMirrorUt: i
2190
2219
  };
2191
- }, fo = mo, go = {
2220
+ }, go = fo, ho = {
2192
2221
  value: {
2193
2222
  type: String,
2194
2223
  default: ""
@@ -2287,20 +2316,23 @@ const ro = (e) => {
2287
2316
  theme: {
2288
2317
  type: String,
2289
2318
  default: "light"
2319
+ },
2320
+ onInput: {
2321
+ type: Function
2290
2322
  }
2291
- }, ho = /* @__PURE__ */ O({
2323
+ }, bo = /* @__PURE__ */ V({
2292
2324
  name: "MDEditorContent",
2293
- props: go,
2325
+ props: ho,
2294
2326
  setup(e) {
2295
- const r = A("editorId"), l = q(""), {
2296
- inputWrapperRef: a,
2327
+ const a = A("editorId"), l = q(""), {
2328
+ inputWrapperRef: r,
2297
2329
  codeMirrorUt: n
2298
- } = fo(e);
2299
- return Dl(e, l, n), () => t("div", {
2330
+ } = go(e);
2331
+ return Il(e, l, n), () => t("div", {
2300
2332
  class: `${o}-content`
2301
2333
  }, [t("div", {
2302
2334
  class: `${o}-input-wrapper`,
2303
- ref: a
2335
+ ref: r
2304
2336
  }, null), t(Pt, {
2305
2337
  modelValue: e.value,
2306
2338
  setting: e.setting,
@@ -2317,12 +2349,12 @@ const ro = (e) => {
2317
2349
  }, null), e.catalogVisible && t(Tt, {
2318
2350
  theme: e.theme,
2319
2351
  class: `${o}-catalog-editor`,
2320
- editorId: r,
2352
+ editorId: a,
2321
2353
  mdHeadingId: e.mdHeadingId,
2322
2354
  key: "internal-catalog"
2323
2355
  }, null)]);
2324
2356
  }
2325
- }), bo = /* @__PURE__ */ O({
2357
+ }), vo = /* @__PURE__ */ V({
2326
2358
  props: {
2327
2359
  modelValue: {
2328
2360
  type: String,
@@ -2330,17 +2362,17 @@ const ro = (e) => {
2330
2362
  }
2331
2363
  },
2332
2364
  setup(e) {
2333
- const r = A("usedLanguageText");
2365
+ const a = A("usedLanguageText");
2334
2366
  return () => {
2335
- var l, a;
2367
+ var l, r;
2336
2368
  return t("div", {
2337
2369
  class: `${o}-footer-item`
2338
2370
  }, [t("label", {
2339
2371
  class: `${o}-footer-label`
2340
- }, [`${(l = r.value.footer) == null ? void 0 : l.markdownTotal}:`]), t("span", null, [((a = e.modelValue) == null ? void 0 : a.length) || 0])]);
2372
+ }, [`${(l = a.value.footer) == null ? void 0 : l.markdownTotal}:`]), t("span", null, [((r = e.modelValue) == null ? void 0 : r.length) || 0])]);
2341
2373
  };
2342
2374
  }
2343
- }), vo = {
2375
+ }), ko = {
2344
2376
  checked: {
2345
2377
  type: Boolean,
2346
2378
  default: !1
@@ -2350,8 +2382,8 @@ const ro = (e) => {
2350
2382
  default: () => {
2351
2383
  }
2352
2384
  }
2353
- }, ko = /* @__PURE__ */ O({
2354
- props: vo,
2385
+ }, po = /* @__PURE__ */ V({
2386
+ props: ko,
2355
2387
  setup(e) {
2356
2388
  return () => t("div", {
2357
2389
  class: [`${o}-checkbox`, e.checked && `${o}-checkbox-checked`],
@@ -2360,7 +2392,7 @@ const ro = (e) => {
2360
2392
  }
2361
2393
  }, null);
2362
2394
  }
2363
- }), po = {
2395
+ }), Co = {
2364
2396
  scrollAuto: {
2365
2397
  type: Boolean
2366
2398
  },
@@ -2369,10 +2401,10 @@ const ro = (e) => {
2369
2401
  default: () => {
2370
2402
  }
2371
2403
  }
2372
- }, Co = /* @__PURE__ */ O({
2373
- props: po,
2404
+ }, $o = /* @__PURE__ */ V({
2405
+ props: Co,
2374
2406
  setup(e) {
2375
- const r = A("usedLanguageText");
2407
+ const a = A("usedLanguageText");
2376
2408
  return () => {
2377
2409
  var l;
2378
2410
  return t("div", {
@@ -2382,13 +2414,13 @@ const ro = (e) => {
2382
2414
  onClick: () => {
2383
2415
  e.onScrollAutoChange(!e.scrollAuto);
2384
2416
  }
2385
- }, [(l = r.value.footer) == null ? void 0 : l.scrollAuto]), t(ko, {
2417
+ }, [(l = a.value.footer) == null ? void 0 : l.scrollAuto]), t(po, {
2386
2418
  checked: e.scrollAuto,
2387
2419
  onChange: e.onScrollAutoChange
2388
2420
  }, null)]);
2389
2421
  };
2390
2422
  }
2391
- }), $o = {
2423
+ }), yo = {
2392
2424
  modelValue: {
2393
2425
  type: String,
2394
2426
  default: ""
@@ -2408,48 +2440,48 @@ const ro = (e) => {
2408
2440
  defFooters: {
2409
2441
  type: Object
2410
2442
  }
2411
- }, yo = /* @__PURE__ */ O({
2443
+ }, To = /* @__PURE__ */ V({
2412
2444
  name: "MDEditorFooter",
2413
- props: $o,
2445
+ props: yo,
2414
2446
  setup(e) {
2415
- const r = he(() => {
2416
- const a = e.footers.indexOf("="), n = a === -1 ? e.footers : e.footers.slice(0, a), i = a === -1 ? [] : e.footers.slice(a, Number.MAX_SAFE_INTEGER);
2447
+ const a = he(() => {
2448
+ const r = e.footers.indexOf("="), n = r === -1 ? e.footers : e.footers.slice(0, r), i = r === -1 ? [] : e.footers.slice(r, Number.MAX_SAFE_INTEGER);
2417
2449
  return [n, i];
2418
- }), l = (a) => {
2419
- if (Dt.includes(a))
2420
- switch (a) {
2450
+ }), l = (r) => {
2451
+ if (Dt.includes(r))
2452
+ switch (r) {
2421
2453
  case "markdownTotal":
2422
- return t(bo, {
2454
+ return t(vo, {
2423
2455
  modelValue: e.modelValue
2424
2456
  }, null);
2425
2457
  case "scrollSwitch":
2426
- return t(Co, {
2458
+ return t($o, {
2427
2459
  scrollAuto: e.scrollAuto,
2428
2460
  onScrollAutoChange: e.onScrollAutoChange
2429
2461
  }, null);
2430
2462
  }
2431
2463
  else
2432
- return e.defFooters instanceof Array ? e.defFooters[a] || "" : e.defFooters && e.defFooters.children instanceof Array && e.defFooters.children[a] || "";
2464
+ return e.defFooters instanceof Array ? e.defFooters[r] || "" : e.defFooters && e.defFooters.children instanceof Array && e.defFooters.children[r] || "";
2433
2465
  };
2434
2466
  return () => {
2435
- const a = r.value[0].map((i) => l(i)), n = r.value[1].map((i) => l(i));
2467
+ const r = a.value[0].map((i) => l(i)), n = a.value[1].map((i) => l(i));
2436
2468
  return t("div", {
2437
2469
  class: `${o}-footer`
2438
2470
  }, [t("div", {
2439
2471
  class: `${o}-footer-left`
2440
- }, [a]), t("div", {
2472
+ }, [r]), t("div", {
2441
2473
  class: `${o}-footer-right`
2442
2474
  }, [n])]);
2443
2475
  };
2444
2476
  }
2445
- }), To = /* @__PURE__ */ O({
2477
+ }), wo = /* @__PURE__ */ V({
2446
2478
  name: "MdEditorV3",
2447
2479
  props: qt,
2448
2480
  emits: Ut,
2449
- setup(e, r) {
2481
+ setup(e, a) {
2450
2482
  const {
2451
2483
  editorId: l,
2452
- noKatex: a,
2484
+ noKatex: r,
2453
2485
  noMermaid: n,
2454
2486
  noPrettier: i,
2455
2487
  noUploadImg: u,
@@ -2457,42 +2489,42 @@ const ro = (e) => {
2457
2489
  } = e, c = J({
2458
2490
  scrollAuto: e.scrollAuto
2459
2491
  });
2460
- Gt(e, r), Kt(e), jt(e);
2461
- const [m, f] = _t(e, r), b = Wt(e);
2492
+ Gt(e, a), Kt(e), jt(e), _t(e, a);
2493
+ const [f, m] = Wt(e, a), b = zt(e);
2462
2494
  return At(() => {
2463
2495
  h.clear(l);
2464
- }), zt(e, r, b, m, f), () => {
2496
+ }), Yt(e, a, b, f, m), () => {
2465
2497
  var v;
2466
2498
  const $ = nt({
2467
2499
  props: e,
2468
- ctx: r
2500
+ ctx: a
2469
2501
  }, "defToolbars"), T = nt({
2470
2502
  props: e,
2471
- ctx: r
2503
+ ctx: a
2472
2504
  }, "defFooters");
2473
2505
  return t("div", {
2474
2506
  id: l,
2475
- class: [o, e.class, e.theme === "dark" && `${o}-dark`, m.fullscreen || m.pageFullscreen ? `${o}-fullscreen` : ""],
2507
+ class: [o, e.class, e.theme === "dark" && `${o}-dark`, f.fullscreen || f.pageFullscreen ? `${o}-fullscreen` : ""],
2476
2508
  style: e.style
2477
- }, [t(Sl, {
2509
+ }, [t(Al, {
2478
2510
  noPrettier: i,
2479
2511
  toolbars: e.toolbars,
2480
2512
  toolbarsExclude: e.toolbarsExclude,
2481
- setting: m,
2482
- updateSetting: f,
2513
+ setting: f,
2514
+ updateSetting: m,
2483
2515
  tableShape: e.tableShape,
2484
2516
  defToolbars: $,
2485
2517
  noUploadImg: u,
2486
2518
  showToolbarName: e.showToolbarName
2487
- }, null), t(ho, {
2519
+ }, null), t(bo, {
2488
2520
  value: e.modelValue,
2489
- setting: m,
2521
+ setting: f,
2490
2522
  mdHeadingId: e.mdHeadingId,
2491
2523
  noMermaid: n,
2492
2524
  noPrettier: i,
2493
2525
  sanitize: e.sanitize,
2494
2526
  placeholder: e.placeholder,
2495
- noKatex: a,
2527
+ noKatex: r,
2496
2528
  scrollAuto: c.scrollAuto,
2497
2529
  formatCopiedText: e.formatCopiedText,
2498
2530
  autofocus: e.autoFocus,
@@ -2502,24 +2534,27 @@ const ro = (e) => {
2502
2534
  autoDetectCode: e.autoDetectCode,
2503
2535
  noHighlight: d,
2504
2536
  onChange: (g) => {
2505
- e.onChange ? e.onChange(g) : (r.emit("update:modelValue", g), r.emit("onChange", g));
2537
+ e.onChange ? e.onChange(g) : (a.emit("update:modelValue", g), a.emit("onChange", g));
2506
2538
  },
2507
2539
  onHtmlChanged: (g) => {
2508
- e.onHtmlChanged ? e.onHtmlChanged(g) : r.emit("onHtmlChanged", g);
2540
+ e.onHtmlChanged ? e.onHtmlChanged(g) : a.emit("onHtmlChanged", g);
2509
2541
  },
2510
2542
  onGetCatalog: (g) => {
2511
- e.onGetCatalog ? e.onGetCatalog(g) : r.emit("onGetCatalog", g);
2543
+ e.onGetCatalog ? e.onGetCatalog(g) : a.emit("onGetCatalog", g);
2512
2544
  },
2513
2545
  onBlur: (g) => {
2514
- e.onBlur ? e.onBlur(g) : r.emit("onBlur", g);
2546
+ e.onBlur ? e.onBlur(g) : a.emit("onBlur", g);
2515
2547
  },
2516
2548
  onFocus: (g) => {
2517
- e.onFocus ? e.onFocus(g) : r.emit("onFocus", g);
2549
+ e.onFocus ? e.onFocus(g) : a.emit("onFocus", g);
2550
+ },
2551
+ onInput: (g) => {
2552
+ e.onInput ? e.onInput(g) : a.emit("onInput", g);
2518
2553
  },
2519
2554
  completions: e.completions,
2520
2555
  catalogVisible: b.value,
2521
2556
  theme: e.theme
2522
- }, null), ((v = e.footers) == null ? void 0 : v.length) > 0 && t(yo, {
2557
+ }, null), ((v = e.footers) == null ? void 0 : v.length) > 0 && t(To, {
2523
2558
  modelValue: e.modelValue,
2524
2559
  footers: e.footers,
2525
2560
  defFooters: T,
@@ -2528,8 +2563,8 @@ const ro = (e) => {
2528
2563
  }, null)]);
2529
2564
  };
2530
2565
  }
2531
- }), ge = To;
2532
- ge.install = (e) => (e.component(ge.name, ge), e.use(ml).use(Bt).use(fl).use(Tt).use(Yt), e);
2566
+ }), ge = wo;
2567
+ ge.install = (e) => (e.component(ge.name, ge), e.use(fl).use(Bt).use(gl).use(Tt).use(Zt), e);
2533
2568
  export {
2534
2569
  ge as default
2535
2570
  };