@airalogy/aimd-editor 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/README.zh-CN.md +14 -1
- package/dist/{AimdEditorTopBar.vue_vue_type_script_setup_true_lang-CODh6fyp.js → AimdEditorTopBar.vue_vue_type_script_setup_true_lang-BXsn4cFX.js} +3 -3
- package/dist/AimdSourceEditor.vue_vue_type_script_setup_true_lang-CJJTlVZ7.js +422 -0
- package/dist/{AimdWysiwygEditor.vue_vue_type_script_setup_true_lang-DPs--N5C.js → AimdWysiwygEditor.vue_vue_type_script_setup_true_lang-Dme3UQEf.js} +487 -475
- package/dist/aimd-editor.css +1 -1
- package/dist/authoring.js +10 -0
- package/dist/embedded.js +2 -2
- package/dist/{AimdSourceEditor.vue_vue_type_script_setup_true_lang-DCbNbka1.js → index-BqB8Xukp.js} +1505 -1542
- package/dist/index.js +44 -36
- package/dist/monaco.js +1 -1
- package/dist/{theme-Cu18_uZ_.js → theme-CB0dPzmd.js} +31 -16
- package/dist/vue.js +3 -3
- package/dist/wysiwyg.js +1 -1
- package/package.json +7 -3
- package/src/authoring/fig.ts +368 -0
- package/src/authoring/index.ts +15 -0
- package/src/index.ts +1 -0
- package/src/language-config.ts +16 -1
- package/src/vue/AimdEditor.vue +3 -1
- package/src/vue/AimdSourceEditor.vue +66 -1
- package/src/vue/aimdDiagnostics.ts +81 -1
- package/src/vue/locales.ts +18 -0
- package/src/vue/useEditorContent.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Jl, ref as yt, onMounted as gd, h as le, onUnmounted as Qg, shallowRef as Gl, createApp as Zg, computed as ey, watch as ni, toRef as ty, nextTick as lo, onBeforeUnmount as ny, openBlock as wn, createElementBlock as jn, Fragment as ao, createElementVNode as co, normalizeStyle as
|
|
1
|
+
import { defineComponent as Jl, ref as yt, onMounted as gd, h as le, onUnmounted as Qg, shallowRef as Gl, createApp as Zg, computed as ey, watch as ni, toRef as ty, nextTick as lo, onBeforeUnmount as ny, openBlock as wn, createElementBlock as jn, Fragment as ao, createElementVNode as co, normalizeStyle as Wc, createVNode as jc, unref as Uc, withCtx as ry, createBlock as iy, Teleport as oy, renderList as Kc, createCommentVNode as Jc, toDisplayString as Gc } from "vue";
|
|
2
2
|
import { useEditor as sy, useInstance as ly, Milkdown as ay, MilkdownProvider as cy } from "@milkdown/vue";
|
|
3
|
-
import { commandsCtx as Ht, Editor as uy, rootCtx as fy, defaultValueCtx as dy, editorViewOptionsCtx as hy, editorViewCtx as
|
|
3
|
+
import { commandsCtx as Ht, Editor as uy, rootCtx as fy, defaultValueCtx as dy, editorViewOptionsCtx as hy, editorViewCtx as qs } from "@milkdown/kit/core";
|
|
4
4
|
import { createTable as py, gfm as my } from "@milkdown/kit/preset/gfm";
|
|
5
|
-
import { hardbreakSchema as gy, hardbreakAttr as yy, clearTextInCurrentBlockCommand as $t, setBlockTypeCommand as ri, paragraphSchema as Yc, headingSchema as
|
|
5
|
+
import { hardbreakSchema as gy, hardbreakAttr as yy, clearTextInCurrentBlockCommand as $t, setBlockTypeCommand as ri, paragraphSchema as Yc, headingSchema as Ws, wrapInBlockTypeCommand as js, blockquoteSchema as ky, addBlockTypeCommand as Xc, hrSchema as by, bulletListSchema as wy, orderedListSchema as xy, codeBlockSchema as Cy, commonmark as Sy } from "@milkdown/kit/preset/commonmark";
|
|
6
6
|
import { history as Ty } from "@milkdown/kit/plugin/history";
|
|
7
7
|
import { listenerCtx as My, listener as Ay } from "@milkdown/kit/plugin/listener";
|
|
8
8
|
import { clipboard as Ny } from "@milkdown/kit/plugin/clipboard";
|
|
@@ -12,10 +12,154 @@ import { block as vy, BlockProvider as Oy } from "@milkdown/kit/plugin/block";
|
|
|
12
12
|
import { $remark as Ry, $node as Dy, $view as _y, $inputRule as Ly, $prose as Py, replaceAll as zy } from "@milkdown/kit/utils";
|
|
13
13
|
import { Plugin as By, PluginKey as Fy, TextSelection as Hy } from "@milkdown/kit/prose/state";
|
|
14
14
|
import { Decoration as $y, DecorationSet as Vy } from "@milkdown/kit/prose/view";
|
|
15
|
-
import { restoreAimdInlineTemplates as yd, protectAimdInlineTemplates as
|
|
15
|
+
import { restoreAimdInlineTemplates as yd, protectAimdInlineTemplates as qy } from "@airalogy/aimd-core";
|
|
16
16
|
import "@milkdown/theme-nord/style.css";
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const cs = (
|
|
18
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
19
|
+
/**
|
|
20
|
+
* @type {(
|
|
21
|
+
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
22
|
+
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
23
|
+
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
24
|
+
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
25
|
+
* ((test?: Test) => Check)
|
|
26
|
+
* )}
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @param {Test} [test]
|
|
30
|
+
* @returns {Check}
|
|
31
|
+
*/
|
|
32
|
+
(function(t) {
|
|
33
|
+
if (t == null)
|
|
34
|
+
return Ky;
|
|
35
|
+
if (typeof t == "function")
|
|
36
|
+
return us(t);
|
|
37
|
+
if (typeof t == "object")
|
|
38
|
+
return Array.isArray(t) ? Wy(t) : (
|
|
39
|
+
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
40
|
+
// narrows to `Array`.
|
|
41
|
+
jy(
|
|
42
|
+
/** @type {Props} */
|
|
43
|
+
t
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
if (typeof t == "string")
|
|
47
|
+
return Uy(t);
|
|
48
|
+
throw new Error("Expected function, string, or object as test");
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
function Wy(t) {
|
|
52
|
+
const e = [];
|
|
53
|
+
let n = -1;
|
|
54
|
+
for (; ++n < t.length; )
|
|
55
|
+
e[n] = cs(t[n]);
|
|
56
|
+
return us(r);
|
|
57
|
+
function r(...i) {
|
|
58
|
+
let o = -1;
|
|
59
|
+
for (; ++o < e.length; )
|
|
60
|
+
if (e[o].apply(this, i)) return !0;
|
|
61
|
+
return !1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function jy(t) {
|
|
65
|
+
const e = (
|
|
66
|
+
/** @type {Record<string, unknown>} */
|
|
67
|
+
t
|
|
68
|
+
);
|
|
69
|
+
return us(n);
|
|
70
|
+
function n(r) {
|
|
71
|
+
const i = (
|
|
72
|
+
/** @type {Record<string, unknown>} */
|
|
73
|
+
/** @type {unknown} */
|
|
74
|
+
r
|
|
75
|
+
);
|
|
76
|
+
let o;
|
|
77
|
+
for (o in t)
|
|
78
|
+
if (i[o] !== e[o]) return !1;
|
|
79
|
+
return !0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function Uy(t) {
|
|
83
|
+
return us(e);
|
|
84
|
+
function e(n) {
|
|
85
|
+
return n && n.type === t;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function us(t) {
|
|
89
|
+
return e;
|
|
90
|
+
function e(n, r, i) {
|
|
91
|
+
return !!(Jy(n) && t.call(
|
|
92
|
+
this,
|
|
93
|
+
n,
|
|
94
|
+
typeof r == "number" ? r : void 0,
|
|
95
|
+
i || void 0
|
|
96
|
+
));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function Ky() {
|
|
100
|
+
return !0;
|
|
101
|
+
}
|
|
102
|
+
function Jy(t) {
|
|
103
|
+
return t !== null && typeof t == "object" && "type" in t;
|
|
104
|
+
}
|
|
105
|
+
const kd = [], Gy = !0, Yl = !1, Xl = "skip";
|
|
106
|
+
function qa(t, e, n, r) {
|
|
107
|
+
let i;
|
|
108
|
+
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
|
|
109
|
+
const o = cs(i), s = r ? -1 : 1;
|
|
110
|
+
l(t, void 0, [])();
|
|
111
|
+
function l(a, c, u) {
|
|
112
|
+
const f = (
|
|
113
|
+
/** @type {Record<string, unknown>} */
|
|
114
|
+
a && typeof a == "object" ? a : {}
|
|
115
|
+
);
|
|
116
|
+
if (typeof f.type == "string") {
|
|
117
|
+
const h = (
|
|
118
|
+
// `hast`
|
|
119
|
+
typeof f.tagName == "string" ? f.tagName : (
|
|
120
|
+
// `xast`
|
|
121
|
+
typeof f.name == "string" ? f.name : void 0
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
Object.defineProperty(d, "name", {
|
|
125
|
+
value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return d;
|
|
129
|
+
function d() {
|
|
130
|
+
let h = kd, p, m, g;
|
|
131
|
+
if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = Yy(n(a, u)), h[0] === Yl))
|
|
132
|
+
return h;
|
|
133
|
+
if ("children" in a && a.children) {
|
|
134
|
+
const y = (
|
|
135
|
+
/** @type {UnistParent} */
|
|
136
|
+
a
|
|
137
|
+
);
|
|
138
|
+
if (y.children && h[0] !== Xl)
|
|
139
|
+
for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
140
|
+
const A = y.children[m];
|
|
141
|
+
if (p = l(A, m, g)(), p[0] === Yl)
|
|
142
|
+
return p;
|
|
143
|
+
m = typeof p[1] == "number" ? p[1] : m + s;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return h;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function Yy(t) {
|
|
151
|
+
return Array.isArray(t) ? t : typeof t == "number" ? [Gy, t] : t == null ? kd : [t];
|
|
152
|
+
}
|
|
153
|
+
function jr(t, e, n, r) {
|
|
154
|
+
let i, o, s;
|
|
155
|
+
typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), qa(t, o, l, i);
|
|
156
|
+
function l(a, c) {
|
|
157
|
+
const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
|
|
158
|
+
return s(a, f, u);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const bd = "en-US";
|
|
162
|
+
function Xy() {
|
|
19
163
|
if (typeof document < "u") {
|
|
20
164
|
const t = document.documentElement?.lang?.trim();
|
|
21
165
|
if (t) return t;
|
|
@@ -26,7 +170,7 @@ function qy() {
|
|
|
26
170
|
return navigator.languages[0];
|
|
27
171
|
}
|
|
28
172
|
}
|
|
29
|
-
const
|
|
173
|
+
const Qy = {
|
|
30
174
|
mode: {
|
|
31
175
|
source: "Source",
|
|
32
176
|
sourceTitle: "Source Mode",
|
|
@@ -220,8 +364,14 @@ const jy = {
|
|
|
220
364
|
insertAimdField: (t) => `Insert AIMD ${t} field`,
|
|
221
365
|
quizBlockLabel: "quiz block",
|
|
222
366
|
quizBlock: "Insert AIMD quiz code block"
|
|
367
|
+
},
|
|
368
|
+
diagnostics: {
|
|
369
|
+
figureMissingId: "This figure is missing the required ID. Generate or enter a unique ID.",
|
|
370
|
+
figureMissingSrc: "This figure is missing the required src field.",
|
|
371
|
+
figureDuplicateId: (t) => `Figure ID "${t}" is already used in this document.`,
|
|
372
|
+
generateFigureId: "Generate figure ID"
|
|
223
373
|
}
|
|
224
|
-
},
|
|
374
|
+
}, Zy = {
|
|
225
375
|
mode: {
|
|
226
376
|
source: "源码",
|
|
227
377
|
sourceTitle: "源码模式",
|
|
@@ -415,15 +565,21 @@ const jy = {
|
|
|
415
565
|
insertAimdField: (t) => `插入 AIMD ${t} 字段`,
|
|
416
566
|
quizBlockLabel: "题目代码块",
|
|
417
567
|
quizBlock: "插入 AIMD 题目代码块"
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
568
|
+
},
|
|
569
|
+
diagnostics: {
|
|
570
|
+
figureMissingId: "该图片缺少必填的 ID,请生成或填写一个唯一 ID。",
|
|
571
|
+
figureMissingSrc: "该图片缺少必填的 src 字段。",
|
|
572
|
+
figureDuplicateId: (t) => `图片 ID“${t}”在当前文档中已存在。`,
|
|
573
|
+
generateFigureId: "生成图片 ID"
|
|
574
|
+
}
|
|
575
|
+
}, e1 = {
|
|
576
|
+
"en-US": Qy,
|
|
577
|
+
"zh-CN": Zy
|
|
422
578
|
};
|
|
423
579
|
function Qc(t) {
|
|
424
580
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
425
581
|
}
|
|
426
|
-
function
|
|
582
|
+
function wd(t, e) {
|
|
427
583
|
if (!e) return t;
|
|
428
584
|
const n = { ...t };
|
|
429
585
|
for (const r of Object.keys(e)) {
|
|
@@ -431,21 +587,21 @@ function bd(t, e) {
|
|
|
431
587
|
if (i === void 0) continue;
|
|
432
588
|
const o = t[r];
|
|
433
589
|
if (Qc(o) && Qc(i)) {
|
|
434
|
-
n[r] =
|
|
590
|
+
n[r] = wd(o, i);
|
|
435
591
|
continue;
|
|
436
592
|
}
|
|
437
593
|
n[r] = i;
|
|
438
594
|
}
|
|
439
595
|
return n;
|
|
440
596
|
}
|
|
441
|
-
function
|
|
442
|
-
return (t ||
|
|
597
|
+
function t1(t) {
|
|
598
|
+
return (t || Xy())?.toLowerCase().startsWith("zh") ? "zh-CN" : bd;
|
|
443
599
|
}
|
|
444
|
-
function
|
|
445
|
-
const n =
|
|
446
|
-
return
|
|
600
|
+
function n1(t, e) {
|
|
601
|
+
const n = t1(t);
|
|
602
|
+
return wd(e1[n], e);
|
|
447
603
|
}
|
|
448
|
-
const me = (t, e = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"${e}>${t}</svg>`, hn =
|
|
604
|
+
const me = (t, e = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"${e}>${t}</svg>`, hn = n1(bd), r1 = [
|
|
449
605
|
{ type: "var", icon: "x", svgIcon: me('<path d="M7 4l10 16M17 4L7 20"/>'), color: "#2563eb" },
|
|
450
606
|
{ type: "var_table", icon: "⊞", svgIcon: me('<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/>'), color: "#059669" },
|
|
451
607
|
{ type: "quiz", icon: "?", svgIcon: me('<circle cx="12" cy="12" r="9"/><path d="M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2 2-2 3.5"/><circle cx="12" cy="17" r="1" fill="currentColor" stroke="none"/>'), color: "#7c3aed" },
|
|
@@ -455,7 +611,7 @@ const me = (t, e = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="16" he
|
|
|
455
611
|
{ type: "ref_var", icon: "↗", svgIcon: me('<circle cx="11" cy="11" r="7"/><path d="M21 21l-4.35-4.35"/>'), color: "#0891b2" },
|
|
456
612
|
{ type: "ref_fig", icon: "↗", svgIcon: me('<rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5" fill="currentColor" stroke="none"/><path d="M21 15l-5-5L5 21"/>'), color: "#0891b2" },
|
|
457
613
|
{ type: "cite", icon: "📖", svgIcon: me('<path d="M4 19.5A2.5 2.5 0 016.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/>'), color: "#6d28d9" }
|
|
458
|
-
],
|
|
614
|
+
], i1 = [
|
|
459
615
|
{ action: "h1", svgIcon: me('<path d="M4 12h8M4 4v16M12 4v16"/><text x="16.5" y="14" font-size="10" fill="currentColor" stroke="none" font-weight="600">1</text>') },
|
|
460
616
|
{ action: "h2", svgIcon: me('<path d="M4 12h8M4 4v16M12 4v16"/><path d="M16.5 8.5a2.5 2.5 0 015 0c0 2-5 4-5 6.5h5" stroke-width="1.8"/>') },
|
|
461
617
|
{ action: "h3", svgIcon: me('<path d="M4 12h8M4 4v16M12 4v16"/><path d="M16.5 8a2 2 0 014 0 2 2 0 01-2.5 2 2 2 0 012.5 2 2 2 0 01-4 0" stroke-width="1.8"/>') },
|
|
@@ -475,8 +631,8 @@ const me = (t, e = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="16" he
|
|
|
475
631
|
{ action: "hr", svgIcon: me('<line x1="2" y1="12" x2="22" y2="12" stroke-width="2.5"/>') },
|
|
476
632
|
{ action: "math", svgIcon: me('<path d="M18 4H6l6 8-6 8h12" stroke-width="2"/>') }
|
|
477
633
|
];
|
|
478
|
-
function
|
|
479
|
-
return
|
|
634
|
+
function o1(t = hn) {
|
|
635
|
+
return r1.map((e) => {
|
|
480
636
|
const n = t.fieldTypes[e.type];
|
|
481
637
|
return {
|
|
482
638
|
...e,
|
|
@@ -485,12 +641,12 @@ function Qy(t = hn) {
|
|
|
485
641
|
};
|
|
486
642
|
});
|
|
487
643
|
}
|
|
488
|
-
function
|
|
644
|
+
function s1(t) {
|
|
489
645
|
return t.action.startsWith("sep");
|
|
490
646
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
493
|
-
if (
|
|
647
|
+
function l1(t = hn) {
|
|
648
|
+
return i1.map((e) => {
|
|
649
|
+
if (s1(e)) return e;
|
|
494
650
|
const n = t.mdToolbar[e.action];
|
|
495
651
|
return {
|
|
496
652
|
...e,
|
|
@@ -532,12 +688,12 @@ function cI(t = hn, e = []) {
|
|
|
532
688
|
function Zc(t) {
|
|
533
689
|
return t.trim().toLowerCase().replace(/[\s_-]/g, "");
|
|
534
690
|
}
|
|
535
|
-
const uI =
|
|
691
|
+
const uI = o1(hn), fI = l1(hn);
|
|
536
692
|
function nn(t) {
|
|
537
693
|
const e = t.trim();
|
|
538
694
|
return e ? /[:#\[\]\{\},&*!?|><=@`]/.test(e) || /^\s|\s$/.test(t) || /["']/.test(e) ? JSON.stringify(e) : e : '""';
|
|
539
695
|
}
|
|
540
|
-
function
|
|
696
|
+
function a1(t, e) {
|
|
541
697
|
const r = (t || e).replace(/\r\n?/g, `
|
|
542
698
|
`).split(`
|
|
543
699
|
`);
|
|
@@ -546,7 +702,7 @@ function t1(t, e) {
|
|
|
546
702
|
function tr(t, e) {
|
|
547
703
|
return e?.defaults.optionText(t) || hn.defaults.optionText(t);
|
|
548
704
|
}
|
|
549
|
-
function
|
|
705
|
+
function c1(t, e) {
|
|
550
706
|
const n = t.split(",").map((r) => r.trim()).filter(Boolean);
|
|
551
707
|
return n.length === 0 ? [
|
|
552
708
|
{ key: "A", text: tr("A", e) },
|
|
@@ -560,7 +716,7 @@ function n1(t, e) {
|
|
|
560
716
|
return { key: String.fromCharCode(65 + i), text: r };
|
|
561
717
|
});
|
|
562
718
|
}
|
|
563
|
-
function
|
|
719
|
+
function u1(t) {
|
|
564
720
|
const e = t.split(",").map((n) => n.trim()).filter(Boolean);
|
|
565
721
|
return e.length === 0 ? [{ key: "b1", answer: "" }] : e.map((n, r) => {
|
|
566
722
|
const i = n.indexOf(":");
|
|
@@ -571,7 +727,7 @@ function r1(t) {
|
|
|
571
727
|
return { key: `b${r + 1}`, answer: n };
|
|
572
728
|
});
|
|
573
729
|
}
|
|
574
|
-
function
|
|
730
|
+
function f1(t) {
|
|
575
731
|
const e = t.trim();
|
|
576
732
|
if (!e)
|
|
577
733
|
return null;
|
|
@@ -633,16 +789,16 @@ function hI(t, e, n) {
|
|
|
633
789
|
return `{{step|${r}${i}}}`;
|
|
634
790
|
}
|
|
635
791
|
case "quiz": {
|
|
636
|
-
const r = (e.quizType || "choice").trim(), i = (e.id || `quiz_${r}_1`).trim(), o =
|
|
792
|
+
const r = (e.quizType || "choice").trim(), i = (e.id || `quiz_${r}_1`).trim(), o = f1(e.score || ""), s = [
|
|
637
793
|
"```quiz",
|
|
638
794
|
`id: ${nn(i)}`,
|
|
639
795
|
`type: ${nn(r)}`
|
|
640
796
|
];
|
|
641
797
|
o !== null && s.push(`score: ${o}`), s.push("stem: |");
|
|
642
|
-
for (const l of
|
|
798
|
+
for (const l of a1(e.stem, n?.defaults.fillQuestionStem || hn.defaults.fillQuestionStem))
|
|
643
799
|
s.push(` ${l}`);
|
|
644
800
|
if (r === "choice") {
|
|
645
|
-
const l = e.mode === "multiple" ? "multiple" : "single", a =
|
|
801
|
+
const l = e.mode === "multiple" ? "multiple" : "single", a = c1(e.options || "", n);
|
|
646
802
|
s.push(`mode: ${l}`), s.push("options:");
|
|
647
803
|
for (const u of a)
|
|
648
804
|
s.push(` - key: ${nn(u.key)}`), s.push(` text: ${nn(u.text)}`);
|
|
@@ -658,7 +814,7 @@ function hI(t, e, n) {
|
|
|
658
814
|
} else
|
|
659
815
|
s.push(`answer: ${nn(c)}`);
|
|
660
816
|
} else if (r === "blank") {
|
|
661
|
-
const l =
|
|
817
|
+
const l = u1(e.blanks || "");
|
|
662
818
|
s.push("blanks:");
|
|
663
819
|
for (const a of l)
|
|
664
820
|
s.push(` - key: ${nn(a.key)}`), s.push(` answer: ${nn(a.answer)}`);
|
|
@@ -711,150 +867,6 @@ function pI(t, e) {
|
|
|
711
867
|
cite: "{{cite|ref1}}"
|
|
712
868
|
}[t] || `{{${t}|id}}`;
|
|
713
869
|
}
|
|
714
|
-
const cs = (
|
|
715
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
716
|
-
/**
|
|
717
|
-
* @type {(
|
|
718
|
-
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
719
|
-
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
720
|
-
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
721
|
-
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
722
|
-
* ((test?: Test) => Check)
|
|
723
|
-
* )}
|
|
724
|
-
*/
|
|
725
|
-
/**
|
|
726
|
-
* @param {Test} [test]
|
|
727
|
-
* @returns {Check}
|
|
728
|
-
*/
|
|
729
|
-
(function(t) {
|
|
730
|
-
if (t == null)
|
|
731
|
-
return a1;
|
|
732
|
-
if (typeof t == "function")
|
|
733
|
-
return us(t);
|
|
734
|
-
if (typeof t == "object")
|
|
735
|
-
return Array.isArray(t) ? o1(t) : (
|
|
736
|
-
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
737
|
-
// narrows to `Array`.
|
|
738
|
-
s1(
|
|
739
|
-
/** @type {Props} */
|
|
740
|
-
t
|
|
741
|
-
)
|
|
742
|
-
);
|
|
743
|
-
if (typeof t == "string")
|
|
744
|
-
return l1(t);
|
|
745
|
-
throw new Error("Expected function, string, or object as test");
|
|
746
|
-
})
|
|
747
|
-
);
|
|
748
|
-
function o1(t) {
|
|
749
|
-
const e = [];
|
|
750
|
-
let n = -1;
|
|
751
|
-
for (; ++n < t.length; )
|
|
752
|
-
e[n] = cs(t[n]);
|
|
753
|
-
return us(r);
|
|
754
|
-
function r(...i) {
|
|
755
|
-
let o = -1;
|
|
756
|
-
for (; ++o < e.length; )
|
|
757
|
-
if (e[o].apply(this, i)) return !0;
|
|
758
|
-
return !1;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
function s1(t) {
|
|
762
|
-
const e = (
|
|
763
|
-
/** @type {Record<string, unknown>} */
|
|
764
|
-
t
|
|
765
|
-
);
|
|
766
|
-
return us(n);
|
|
767
|
-
function n(r) {
|
|
768
|
-
const i = (
|
|
769
|
-
/** @type {Record<string, unknown>} */
|
|
770
|
-
/** @type {unknown} */
|
|
771
|
-
r
|
|
772
|
-
);
|
|
773
|
-
let o;
|
|
774
|
-
for (o in t)
|
|
775
|
-
if (i[o] !== e[o]) return !1;
|
|
776
|
-
return !0;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
function l1(t) {
|
|
780
|
-
return us(e);
|
|
781
|
-
function e(n) {
|
|
782
|
-
return n && n.type === t;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
function us(t) {
|
|
786
|
-
return e;
|
|
787
|
-
function e(n, r, i) {
|
|
788
|
-
return !!(c1(n) && t.call(
|
|
789
|
-
this,
|
|
790
|
-
n,
|
|
791
|
-
typeof r == "number" ? r : void 0,
|
|
792
|
-
i || void 0
|
|
793
|
-
));
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
function a1() {
|
|
797
|
-
return !0;
|
|
798
|
-
}
|
|
799
|
-
function c1(t) {
|
|
800
|
-
return t !== null && typeof t == "object" && "type" in t;
|
|
801
|
-
}
|
|
802
|
-
const wd = [], u1 = !0, Yl = !1, Xl = "skip";
|
|
803
|
-
function Wa(t, e, n, r) {
|
|
804
|
-
let i;
|
|
805
|
-
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
|
|
806
|
-
const o = cs(i), s = r ? -1 : 1;
|
|
807
|
-
l(t, void 0, [])();
|
|
808
|
-
function l(a, c, u) {
|
|
809
|
-
const f = (
|
|
810
|
-
/** @type {Record<string, unknown>} */
|
|
811
|
-
a && typeof a == "object" ? a : {}
|
|
812
|
-
);
|
|
813
|
-
if (typeof f.type == "string") {
|
|
814
|
-
const h = (
|
|
815
|
-
// `hast`
|
|
816
|
-
typeof f.tagName == "string" ? f.tagName : (
|
|
817
|
-
// `xast`
|
|
818
|
-
typeof f.name == "string" ? f.name : void 0
|
|
819
|
-
)
|
|
820
|
-
);
|
|
821
|
-
Object.defineProperty(d, "name", {
|
|
822
|
-
value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
return d;
|
|
826
|
-
function d() {
|
|
827
|
-
let h = wd, p, m, g;
|
|
828
|
-
if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = f1(n(a, u)), h[0] === Yl))
|
|
829
|
-
return h;
|
|
830
|
-
if ("children" in a && a.children) {
|
|
831
|
-
const y = (
|
|
832
|
-
/** @type {UnistParent} */
|
|
833
|
-
a
|
|
834
|
-
);
|
|
835
|
-
if (y.children && h[0] !== Xl)
|
|
836
|
-
for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
837
|
-
const A = y.children[m];
|
|
838
|
-
if (p = l(A, m, g)(), p[0] === Yl)
|
|
839
|
-
return p;
|
|
840
|
-
m = typeof p[1] == "number" ? p[1] : m + s;
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
return h;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
function f1(t) {
|
|
848
|
-
return Array.isArray(t) ? t : typeof t == "number" ? [u1, t] : t == null ? wd : [t];
|
|
849
|
-
}
|
|
850
|
-
function jr(t, e, n, r) {
|
|
851
|
-
let i, o, s;
|
|
852
|
-
typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), Wa(t, o, l, i);
|
|
853
|
-
function l(a, c) {
|
|
854
|
-
const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
|
|
855
|
-
return s(a, f, u);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
870
|
var Mt = /* @__PURE__ */ ((t) => (t.docTypeError = "docTypeError", t.contextNotFound = "contextNotFound", t.timerNotFound = "timerNotFound", t.ctxCallOutOfScope = "ctxCallOutOfScope", t.createNodeInParserFail = "createNodeInParserFail", t.stackOverFlow = "stackOverFlow", t.parserMatchError = "parserMatchError", t.serializerMatchError = "serializerMatchError", t.getAtomFromSchemaFail = "getAtomFromSchemaFail", t.expectDomTypeError = "expectDomTypeError", t.callCommandBeforeEditorView = "callCommandBeforeEditorView", t.missingRootElement = "missingRootElement", t.missingNodeInSchema = "missingNodeInSchema", t.missingMarkInSchema = "missingMarkInSchema", t.ctxNotBind = "ctxNotBind", t.missingYjsDoc = "missingYjsDoc", t))(Mt || {});
|
|
859
871
|
class Lt extends Error {
|
|
860
872
|
constructor(e, n) {
|
|
@@ -1724,7 +1736,7 @@ function Ad(t, e, n, r) {
|
|
|
1724
1736
|
let { start: s, end: l } = A1(n, t);
|
|
1725
1737
|
return rr(o, Ed(t, s, l, e, r));
|
|
1726
1738
|
}
|
|
1727
|
-
else return rr(o,
|
|
1739
|
+
else return rr(o, qo(t, e, r));
|
|
1728
1740
|
}
|
|
1729
1741
|
function Nd(t, e) {
|
|
1730
1742
|
if (!e.type.compatibleContent(t.type))
|
|
@@ -1750,13 +1762,13 @@ function rr(t, e) {
|
|
|
1750
1762
|
}
|
|
1751
1763
|
function Ed(t, e, n, r, i) {
|
|
1752
1764
|
let o = t.depth > i && Ql(t, e, i + 1), s = r.depth > i && Ql(n, r, i + 1), l = [];
|
|
1753
|
-
return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (Nd(o, s), nr(rr(o, Ed(t, e, n, r, i + 1)), l)) : (o && nr(rr(o,
|
|
1765
|
+
return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (Nd(o, s), nr(rr(o, Ed(t, e, n, r, i + 1)), l)) : (o && nr(rr(o, qo(t, e, i + 1)), l), Si(e, n, i, l), s && nr(rr(s, qo(n, r, i + 1)), l)), Si(r, null, i, l), new O(l);
|
|
1754
1766
|
}
|
|
1755
|
-
function
|
|
1767
|
+
function qo(t, e, n) {
|
|
1756
1768
|
let r = [];
|
|
1757
1769
|
if (Si(null, t, n, r), t.depth > n) {
|
|
1758
1770
|
let i = Ql(t, e, n + 1);
|
|
1759
|
-
nr(rr(i,
|
|
1771
|
+
nr(rr(i, qo(t, e, n + 1)), r);
|
|
1760
1772
|
}
|
|
1761
1773
|
return Si(e, null, n, r), new O(r);
|
|
1762
1774
|
}
|
|
@@ -2433,7 +2445,7 @@ let En = class Zl {
|
|
|
2433
2445
|
}
|
|
2434
2446
|
};
|
|
2435
2447
|
En.prototype.text = void 0;
|
|
2436
|
-
class
|
|
2448
|
+
class Wo extends En {
|
|
2437
2449
|
/**
|
|
2438
2450
|
@internal
|
|
2439
2451
|
*/
|
|
@@ -2455,10 +2467,10 @@ class qo extends En {
|
|
|
2455
2467
|
return this.text.length;
|
|
2456
2468
|
}
|
|
2457
2469
|
mark(e) {
|
|
2458
|
-
return e == this.marks ? this : new
|
|
2470
|
+
return e == this.marks ? this : new Wo(this.type, this.attrs, this.text, e);
|
|
2459
2471
|
}
|
|
2460
2472
|
withText(e) {
|
|
2461
|
-
return e == this.text ? this : new
|
|
2473
|
+
return e == this.text ? this : new Wo(this.type, this.attrs, e, this.marks);
|
|
2462
2474
|
}
|
|
2463
2475
|
cut(e = 0, n = this.text.length) {
|
|
2464
2476
|
return e == 0 && n == this.text.length ? this : this.withText(this.text.slice(e, n));
|
|
@@ -3161,7 +3173,7 @@ class $1 {
|
|
|
3161
3173
|
*/
|
|
3162
3174
|
text(e, n) {
|
|
3163
3175
|
let r = this.nodes.text;
|
|
3164
|
-
return new
|
|
3176
|
+
return new Wo(r, r.defaultAttrs, e, ne.setFrom(n));
|
|
3165
3177
|
}
|
|
3166
3178
|
/**
|
|
3167
3179
|
Create a mark with the given type and attributes.
|
|
@@ -3198,7 +3210,7 @@ function ru(t, e) {
|
|
|
3198
3210
|
function V1(t) {
|
|
3199
3211
|
return t.tag != null;
|
|
3200
3212
|
}
|
|
3201
|
-
function
|
|
3213
|
+
function q1(t) {
|
|
3202
3214
|
return t.style != null;
|
|
3203
3215
|
}
|
|
3204
3216
|
class Pr {
|
|
@@ -3212,7 +3224,7 @@ class Pr {
|
|
|
3212
3224
|
n.forEach((i) => {
|
|
3213
3225
|
if (V1(i))
|
|
3214
3226
|
this.tags.push(i);
|
|
3215
|
-
else if (
|
|
3227
|
+
else if (q1(i)) {
|
|
3216
3228
|
let o = /[^=]*/.exec(i.style)[0];
|
|
3217
3229
|
r.indexOf(o) < 0 && r.push(o), this.styles.push(i);
|
|
3218
3230
|
}
|
|
@@ -3349,7 +3361,7 @@ const Bd = {
|
|
|
3349
3361
|
table: !0,
|
|
3350
3362
|
tfoot: !0,
|
|
3351
3363
|
ul: !0
|
|
3352
|
-
},
|
|
3364
|
+
}, W1 = {
|
|
3353
3365
|
head: !0,
|
|
3354
3366
|
noscript: !0,
|
|
3355
3367
|
object: !0,
|
|
@@ -3438,7 +3450,7 @@ class ou {
|
|
|
3438
3450
|
let s = e.nodeName.toLowerCase(), l;
|
|
3439
3451
|
Fd.hasOwnProperty(s) && this.parser.normalizeLists && j1(e);
|
|
3440
3452
|
let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
|
|
3441
|
-
e: if (a ? a.ignore :
|
|
3453
|
+
e: if (a ? a.ignore : W1.hasOwnProperty(s))
|
|
3442
3454
|
this.findInside(e), this.ignoreFallback(e, n);
|
|
3443
3455
|
else if (!a || a.skip || a.closeParent) {
|
|
3444
3456
|
a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
|
|
@@ -3885,7 +3897,7 @@ function xo(t, e, n, r) {
|
|
|
3885
3897
|
return { dom: a, contentDOM: l };
|
|
3886
3898
|
}
|
|
3887
3899
|
const G1 = {};
|
|
3888
|
-
function
|
|
3900
|
+
function Wa(t, e) {
|
|
3889
3901
|
const n = G1, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
|
|
3890
3902
|
return Hd(t, r, i);
|
|
3891
3903
|
}
|
|
@@ -3977,7 +3989,7 @@ function Vd(t, e) {
|
|
|
3977
3989
|
function Rt(t) {
|
|
3978
3990
|
return t.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
3979
3991
|
}
|
|
3980
|
-
const
|
|
3992
|
+
const qe = Bn(/[A-Za-z]/), Ze = Bn(/[\dA-Za-z]/), Z1 = Bn(/[#-'*+\--9=?A-Z^-~]/);
|
|
3981
3993
|
function Uo(t) {
|
|
3982
3994
|
return (
|
|
3983
3995
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -4268,7 +4280,7 @@ function uk(t, e, n) {
|
|
|
4268
4280
|
return t.enter("autolink"), t.enter("autolinkMarker"), t.consume(h), t.exit("autolinkMarker"), t.enter("autolinkProtocol"), o;
|
|
4269
4281
|
}
|
|
4270
4282
|
function o(h) {
|
|
4271
|
-
return
|
|
4283
|
+
return qe(h) ? (t.consume(h), s) : h === 64 ? n(h) : c(h);
|
|
4272
4284
|
}
|
|
4273
4285
|
function s(h) {
|
|
4274
4286
|
return h === 43 || h === 45 || h === 46 || Ze(h) ? (r = 1, l(h)) : c(h);
|
|
@@ -4309,7 +4321,7 @@ function fk(t, e, n) {
|
|
|
4309
4321
|
return o === null || $(o) ? e(o) : n(o);
|
|
4310
4322
|
}
|
|
4311
4323
|
}
|
|
4312
|
-
const
|
|
4324
|
+
const qd = {
|
|
4313
4325
|
continuation: {
|
|
4314
4326
|
tokenize: hk
|
|
4315
4327
|
},
|
|
@@ -4340,13 +4352,13 @@ function hk(t, e, n) {
|
|
|
4340
4352
|
return Z(s) ? re(t, o, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s) : o(s);
|
|
4341
4353
|
}
|
|
4342
4354
|
function o(s) {
|
|
4343
|
-
return t.attempt(
|
|
4355
|
+
return t.attempt(qd, e, n)(s);
|
|
4344
4356
|
}
|
|
4345
4357
|
}
|
|
4346
4358
|
function pk(t) {
|
|
4347
4359
|
t.exit("blockQuote");
|
|
4348
4360
|
}
|
|
4349
|
-
const
|
|
4361
|
+
const Wd = {
|
|
4350
4362
|
name: "characterEscape",
|
|
4351
4363
|
tokenize: mk
|
|
4352
4364
|
};
|
|
@@ -4446,20 +4458,20 @@ function yk(t, e, n) {
|
|
|
4446
4458
|
function v(x, R, P) {
|
|
4447
4459
|
let z = 0;
|
|
4448
4460
|
return T;
|
|
4449
|
-
function T(
|
|
4450
|
-
return x.enter("lineEnding"), x.consume(
|
|
4461
|
+
function T(q) {
|
|
4462
|
+
return x.enter("lineEnding"), x.consume(q), x.exit("lineEnding"), S;
|
|
4451
4463
|
}
|
|
4452
|
-
function S(
|
|
4453
|
-
return x.enter("codeFencedFence"), Z(
|
|
4464
|
+
function S(q) {
|
|
4465
|
+
return x.enter("codeFencedFence"), Z(q) ? re(x, M, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(q) : M(q);
|
|
4454
4466
|
}
|
|
4455
|
-
function M(
|
|
4456
|
-
return
|
|
4467
|
+
function M(q) {
|
|
4468
|
+
return q === l ? (x.enter("codeFencedFenceSequence"), H(q)) : P(q);
|
|
4457
4469
|
}
|
|
4458
|
-
function H(
|
|
4459
|
-
return
|
|
4470
|
+
function H(q) {
|
|
4471
|
+
return q === l ? (z++, x.consume(q), H) : z >= s ? (x.exit("codeFencedFenceSequence"), Z(q) ? re(x, K, "whitespace")(q) : K(q)) : P(q);
|
|
4460
4472
|
}
|
|
4461
|
-
function K(
|
|
4462
|
-
return
|
|
4473
|
+
function K(q) {
|
|
4474
|
+
return q === null || $(q) ? (x.exit("codeFencedFence"), R(q)) : P(q);
|
|
4463
4475
|
}
|
|
4464
4476
|
}
|
|
4465
4477
|
}
|
|
@@ -5082,12 +5094,12 @@ const Vk = [
|
|
|
5082
5094
|
"tr",
|
|
5083
5095
|
"track",
|
|
5084
5096
|
"ul"
|
|
5085
|
-
], yu = ["pre", "script", "style", "textarea"],
|
|
5097
|
+
], yu = ["pre", "script", "style", "textarea"], qk = {
|
|
5086
5098
|
concrete: !0,
|
|
5087
5099
|
name: "htmlFlow",
|
|
5088
5100
|
resolveTo: Uk,
|
|
5089
5101
|
tokenize: Kk
|
|
5090
|
-
},
|
|
5102
|
+
}, Wk = {
|
|
5091
5103
|
partial: !0,
|
|
5092
5104
|
tokenize: Gk
|
|
5093
5105
|
}, jk = {
|
|
@@ -5111,10 +5123,10 @@ function Kk(t, e, n) {
|
|
|
5111
5123
|
return t.enter("htmlFlow"), t.enter("htmlFlowData"), t.consume(k), f;
|
|
5112
5124
|
}
|
|
5113
5125
|
function f(k) {
|
|
5114
|
-
return k === 33 ? (t.consume(k), d) : k === 47 ? (t.consume(k), o = !0, m) : k === 63 ? (t.consume(k), i = 3, r.interrupt ? e : b) :
|
|
5126
|
+
return k === 33 ? (t.consume(k), d) : k === 47 ? (t.consume(k), o = !0, m) : k === 63 ? (t.consume(k), i = 3, r.interrupt ? e : b) : qe(k) ? (t.consume(k), s = String.fromCharCode(k), g) : n(k);
|
|
5115
5127
|
}
|
|
5116
5128
|
function d(k) {
|
|
5117
|
-
return k === 45 ? (t.consume(k), i = 2, h) : k === 91 ? (t.consume(k), i = 5, l = 0, p) :
|
|
5129
|
+
return k === 45 ? (t.consume(k), i = 2, h) : k === 91 ? (t.consume(k), i = 5, l = 0, p) : qe(k) ? (t.consume(k), i = 4, r.interrupt ? e : b) : n(k);
|
|
5118
5130
|
}
|
|
5119
5131
|
function h(k) {
|
|
5120
5132
|
return k === 45 ? (t.consume(k), r.interrupt ? e : b) : n(k);
|
|
@@ -5124,7 +5136,7 @@ function Kk(t, e, n) {
|
|
|
5124
5136
|
return k === Ce.charCodeAt(l++) ? (t.consume(k), l === Ce.length ? r.interrupt ? e : M : p) : n(k);
|
|
5125
5137
|
}
|
|
5126
5138
|
function m(k) {
|
|
5127
|
-
return
|
|
5139
|
+
return qe(k) ? (t.consume(k), s = String.fromCharCode(k), g) : n(k);
|
|
5128
5140
|
}
|
|
5129
5141
|
function g(k) {
|
|
5130
5142
|
if (k === null || k === 47 || k === 62 || de(k)) {
|
|
@@ -5140,7 +5152,7 @@ function Kk(t, e, n) {
|
|
|
5140
5152
|
return Z(k) ? (t.consume(k), A) : T(k);
|
|
5141
5153
|
}
|
|
5142
5154
|
function C(k) {
|
|
5143
|
-
return k === 47 ? (t.consume(k), T) : k === 58 || k === 95 ||
|
|
5155
|
+
return k === 47 ? (t.consume(k), T) : k === 58 || k === 95 || qe(k) ? (t.consume(k), I) : Z(k) ? (t.consume(k), C) : T(k);
|
|
5144
5156
|
}
|
|
5145
5157
|
function I(k) {
|
|
5146
5158
|
return k === 45 || k === 46 || k === 58 || k === 95 || Ze(k) ? (t.consume(k), I) : v(k);
|
|
@@ -5167,15 +5179,15 @@ function Kk(t, e, n) {
|
|
|
5167
5179
|
return k === null || $(k) ? M(k) : Z(k) ? (t.consume(k), S) : n(k);
|
|
5168
5180
|
}
|
|
5169
5181
|
function M(k) {
|
|
5170
|
-
return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(
|
|
5182
|
+
return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(Wk, De, H)(k)) : k === null || $(k) ? (t.exit("htmlFlowData"), H(k)) : (t.consume(k), M);
|
|
5171
5183
|
}
|
|
5172
5184
|
function H(k) {
|
|
5173
5185
|
return t.check(jk, K, De)(k);
|
|
5174
5186
|
}
|
|
5175
5187
|
function K(k) {
|
|
5176
|
-
return t.enter("lineEnding"), t.consume(k), t.exit("lineEnding"),
|
|
5188
|
+
return t.enter("lineEnding"), t.consume(k), t.exit("lineEnding"), q;
|
|
5177
5189
|
}
|
|
5178
|
-
function
|
|
5190
|
+
function q(k) {
|
|
5179
5191
|
return k === null || $(k) ? H(k) : (t.enter("htmlFlowData"), M(k));
|
|
5180
5192
|
}
|
|
5181
5193
|
function pe(k) {
|
|
@@ -5189,7 +5201,7 @@ function Kk(t, e, n) {
|
|
|
5189
5201
|
const Ce = s.toLowerCase();
|
|
5190
5202
|
return yu.includes(Ce) ? (t.consume(k), X) : M(k);
|
|
5191
5203
|
}
|
|
5192
|
-
return
|
|
5204
|
+
return qe(k) && s.length < 8 ? (t.consume(k), s += String.fromCharCode(k), ce) : M(k);
|
|
5193
5205
|
}
|
|
5194
5206
|
function be(k) {
|
|
5195
5207
|
return k === 93 ? (t.consume(k), b) : M(k);
|
|
@@ -5232,10 +5244,10 @@ function Xk(t, e, n) {
|
|
|
5232
5244
|
return t.enter("htmlText"), t.enter("htmlTextData"), t.consume(b), a;
|
|
5233
5245
|
}
|
|
5234
5246
|
function a(b) {
|
|
5235
|
-
return b === 33 ? (t.consume(b), c) : b === 47 ? (t.consume(b), v) : b === 63 ? (t.consume(b), C) :
|
|
5247
|
+
return b === 33 ? (t.consume(b), c) : b === 47 ? (t.consume(b), v) : b === 63 ? (t.consume(b), C) : qe(b) ? (t.consume(b), P) : n(b);
|
|
5236
5248
|
}
|
|
5237
5249
|
function c(b) {
|
|
5238
|
-
return b === 45 ? (t.consume(b), u) : b === 91 ? (t.consume(b), o = 0, p) :
|
|
5250
|
+
return b === 45 ? (t.consume(b), u) : b === 91 ? (t.consume(b), o = 0, p) : qe(b) ? (t.consume(b), A) : n(b);
|
|
5239
5251
|
}
|
|
5240
5252
|
function u(b) {
|
|
5241
5253
|
return b === 45 ? (t.consume(b), h) : n(b);
|
|
@@ -5272,7 +5284,7 @@ function Xk(t, e, n) {
|
|
|
5272
5284
|
return b === 62 ? pe(b) : C(b);
|
|
5273
5285
|
}
|
|
5274
5286
|
function v(b) {
|
|
5275
|
-
return
|
|
5287
|
+
return qe(b) ? (t.consume(b), x) : n(b);
|
|
5276
5288
|
}
|
|
5277
5289
|
function x(b) {
|
|
5278
5290
|
return b === 45 || Ze(b) ? (t.consume(b), x) : R(b);
|
|
@@ -5284,7 +5296,7 @@ function Xk(t, e, n) {
|
|
|
5284
5296
|
return b === 45 || Ze(b) ? (t.consume(b), P) : b === 47 || b === 62 || de(b) ? z(b) : n(b);
|
|
5285
5297
|
}
|
|
5286
5298
|
function z(b) {
|
|
5287
|
-
return b === 47 ? (t.consume(b), pe) : b === 58 || b === 95 ||
|
|
5299
|
+
return b === 47 ? (t.consume(b), pe) : b === 58 || b === 95 || qe(b) ? (t.consume(b), T) : $(b) ? (s = z, ue(b)) : Z(b) ? (t.consume(b), z) : pe(b);
|
|
5288
5300
|
}
|
|
5289
5301
|
function T(b) {
|
|
5290
5302
|
return b === 45 || b === 46 || b === 58 || b === 95 || Ze(b) ? (t.consume(b), T) : S(b);
|
|
@@ -5296,12 +5308,12 @@ function Xk(t, e, n) {
|
|
|
5296
5308
|
return b === null || b === 60 || b === 61 || b === 62 || b === 96 ? n(b) : b === 34 || b === 39 ? (t.consume(b), i = b, H) : $(b) ? (s = M, ue(b)) : Z(b) ? (t.consume(b), M) : (t.consume(b), K);
|
|
5297
5309
|
}
|
|
5298
5310
|
function H(b) {
|
|
5299
|
-
return b === i ? (t.consume(b), i = void 0,
|
|
5311
|
+
return b === i ? (t.consume(b), i = void 0, q) : b === null ? n(b) : $(b) ? (s = H, ue(b)) : (t.consume(b), H);
|
|
5300
5312
|
}
|
|
5301
5313
|
function K(b) {
|
|
5302
5314
|
return b === null || b === 34 || b === 39 || b === 60 || b === 61 || b === 96 ? n(b) : b === 47 || b === 62 || de(b) ? z(b) : (t.consume(b), K);
|
|
5303
5315
|
}
|
|
5304
|
-
function
|
|
5316
|
+
function q(b) {
|
|
5305
5317
|
return b === 47 || b === 62 || de(b) ? z(b) : n(b);
|
|
5306
5318
|
}
|
|
5307
5319
|
function pe(b) {
|
|
@@ -5787,7 +5799,7 @@ const Eb = {
|
|
|
5787
5799
|
55: Qe,
|
|
5788
5800
|
56: Qe,
|
|
5789
5801
|
57: Qe,
|
|
5790
|
-
62:
|
|
5802
|
+
62: qd
|
|
5791
5803
|
}, Ib = {
|
|
5792
5804
|
91: Dk
|
|
5793
5805
|
}, vb = {
|
|
@@ -5798,14 +5810,14 @@ const Eb = {
|
|
|
5798
5810
|
35: Fk,
|
|
5799
5811
|
42: Co,
|
|
5800
5812
|
45: [ku, Co],
|
|
5801
|
-
60:
|
|
5813
|
+
60: qk,
|
|
5802
5814
|
61: ku,
|
|
5803
5815
|
95: Co,
|
|
5804
5816
|
96: gu,
|
|
5805
5817
|
126: gu
|
|
5806
5818
|
}, Rb = {
|
|
5807
5819
|
38: jd,
|
|
5808
|
-
92:
|
|
5820
|
+
92: Wd
|
|
5809
5821
|
}, Db = {
|
|
5810
5822
|
[-5]: Ys,
|
|
5811
5823
|
[-4]: Ys,
|
|
@@ -5815,7 +5827,7 @@ const Eb = {
|
|
|
5815
5827
|
42: na,
|
|
5816
5828
|
60: [ck, Yk],
|
|
5817
5829
|
91: cb,
|
|
5818
|
-
92: [zk,
|
|
5830
|
+
92: [zk, Wd],
|
|
5819
5831
|
93: Ua,
|
|
5820
5832
|
95: na,
|
|
5821
5833
|
96: Ck
|
|
@@ -5885,14 +5897,14 @@ function Bb(t, e, n) {
|
|
|
5885
5897
|
_index: M,
|
|
5886
5898
|
line: H,
|
|
5887
5899
|
column: K,
|
|
5888
|
-
offset:
|
|
5900
|
+
offset: q
|
|
5889
5901
|
} = r;
|
|
5890
5902
|
return {
|
|
5891
5903
|
_bufferIndex: S,
|
|
5892
5904
|
_index: M,
|
|
5893
5905
|
line: H,
|
|
5894
5906
|
column: K,
|
|
5895
|
-
offset:
|
|
5907
|
+
offset: q
|
|
5896
5908
|
};
|
|
5897
5909
|
}
|
|
5898
5910
|
function m(S) {
|
|
@@ -5934,7 +5946,7 @@ function Bb(t, e, n) {
|
|
|
5934
5946
|
}
|
|
5935
5947
|
function R(S, M) {
|
|
5936
5948
|
return H;
|
|
5937
|
-
function H(K,
|
|
5949
|
+
function H(K, q, pe) {
|
|
5938
5950
|
let ue, ce, be, b;
|
|
5939
5951
|
return Array.isArray(K) ? (
|
|
5940
5952
|
/* c8 ignore next 1 */
|
|
@@ -5976,7 +5988,7 @@ function Bb(t, e, n) {
|
|
|
5976
5988
|
}
|
|
5977
5989
|
}
|
|
5978
5990
|
function Ce(fe) {
|
|
5979
|
-
return S(be, b),
|
|
5991
|
+
return S(be, b), q;
|
|
5980
5992
|
}
|
|
5981
5993
|
function ie(fe) {
|
|
5982
5994
|
return b.restore(), ++ce < ue.length ? k(ue[ce]) : pe;
|
|
@@ -5987,13 +5999,13 @@ function Bb(t, e, n) {
|
|
|
5987
5999
|
S.resolveAll && !o.includes(S) && o.push(S), S.resolve && at(c.events, M, c.events.length - M, S.resolve(c.events.slice(M), c)), S.resolveTo && (c.events = S.resolveTo(c.events, c));
|
|
5988
6000
|
}
|
|
5989
6001
|
function z() {
|
|
5990
|
-
const S = p(), M = c.previous, H = c.currentConstruct, K = c.events.length,
|
|
6002
|
+
const S = p(), M = c.previous, H = c.currentConstruct, K = c.events.length, q = Array.from(l);
|
|
5991
6003
|
return {
|
|
5992
6004
|
from: K,
|
|
5993
6005
|
restore: pe
|
|
5994
6006
|
};
|
|
5995
6007
|
function pe() {
|
|
5996
|
-
r = S, c.previous = M, c.currentConstruct = H, c.events.length = K, l =
|
|
6008
|
+
r = S, c.previous = M, c.currentConstruct = H, c.events.length = K, l = q, T();
|
|
5997
6009
|
}
|
|
5998
6010
|
}
|
|
5999
6011
|
function T() {
|
|
@@ -6082,7 +6094,7 @@ function Vb(t) {
|
|
|
6082
6094
|
return t;
|
|
6083
6095
|
}
|
|
6084
6096
|
const bu = /[\0\t\n\r]/g;
|
|
6085
|
-
function
|
|
6097
|
+
function qb() {
|
|
6086
6098
|
let t = 1, e = "", n = !0, r;
|
|
6087
6099
|
return i;
|
|
6088
6100
|
function i(o, s, l) {
|
|
@@ -6117,9 +6129,9 @@ function Wb() {
|
|
|
6117
6129
|
return l && (r && a.push(-5), e && a.push(e), a.push(null)), a;
|
|
6118
6130
|
}
|
|
6119
6131
|
}
|
|
6120
|
-
const
|
|
6132
|
+
const Wb = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
6121
6133
|
function Qd(t) {
|
|
6122
|
-
return t.replace(
|
|
6134
|
+
return t.replace(Wb, jb);
|
|
6123
6135
|
}
|
|
6124
6136
|
function jb(t, e, n) {
|
|
6125
6137
|
if (e)
|
|
@@ -6144,14 +6156,14 @@ function xu(t) {
|
|
|
6144
6156
|
}
|
|
6145
6157
|
const Zd = {}.hasOwnProperty;
|
|
6146
6158
|
function Ub(t, e, n) {
|
|
6147
|
-
return typeof e != "string" && (n = e, e = void 0), Kb(n)(Vb($b(n).document().write(
|
|
6159
|
+
return typeof e != "string" && (n = e, e = void 0), Kb(n)(Vb($b(n).document().write(qb()(t, e, !0))));
|
|
6148
6160
|
}
|
|
6149
6161
|
function Kb(t) {
|
|
6150
6162
|
const e = {
|
|
6151
6163
|
transforms: [],
|
|
6152
6164
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
6153
6165
|
enter: {
|
|
6154
|
-
autolink: o(
|
|
6166
|
+
autolink: o(qn),
|
|
6155
6167
|
autolinkProtocol: z,
|
|
6156
6168
|
autolinkEmail: z,
|
|
6157
6169
|
atxHeading: o(gr),
|
|
@@ -6179,7 +6191,7 @@ function Kb(t) {
|
|
|
6179
6191
|
htmlTextData: z,
|
|
6180
6192
|
image: o(kr),
|
|
6181
6193
|
label: s,
|
|
6182
|
-
link: o(
|
|
6194
|
+
link: o(qn),
|
|
6183
6195
|
listItem: o(io),
|
|
6184
6196
|
listItemValue: d,
|
|
6185
6197
|
listOrdered: o(Qr, f),
|
|
@@ -6211,7 +6223,7 @@ function Kb(t) {
|
|
|
6211
6223
|
codeFencedFenceMeta: p,
|
|
6212
6224
|
codeFlowValue: T,
|
|
6213
6225
|
codeIndented: a(y),
|
|
6214
|
-
codeText: a(
|
|
6226
|
+
codeText: a(q),
|
|
6215
6227
|
codeTextData: T,
|
|
6216
6228
|
data: T,
|
|
6217
6229
|
definition: a(),
|
|
@@ -6253,7 +6265,7 @@ function Kb(t) {
|
|
|
6253
6265
|
type: "root",
|
|
6254
6266
|
children: []
|
|
6255
6267
|
};
|
|
6256
|
-
const
|
|
6268
|
+
const W = {
|
|
6257
6269
|
stack: [_],
|
|
6258
6270
|
tokenStack: [],
|
|
6259
6271
|
config: e,
|
|
@@ -6276,11 +6288,11 @@ function Kb(t) {
|
|
|
6276
6288
|
const Ge = e[N[se][0]];
|
|
6277
6289
|
Zd.call(Ge, N[se][1].type) && Ge[N[se][1].type].call(Object.assign({
|
|
6278
6290
|
sliceSerialize: N[se][2].sliceSerialize
|
|
6279
|
-
},
|
|
6291
|
+
}, W), N[se][1]);
|
|
6280
6292
|
}
|
|
6281
|
-
if (
|
|
6282
|
-
const Ge =
|
|
6283
|
-
(Ge[1] || Cu).call(
|
|
6293
|
+
if (W.tokenStack.length > 0) {
|
|
6294
|
+
const Ge = W.tokenStack[W.tokenStack.length - 1];
|
|
6295
|
+
(Ge[1] || Cu).call(W, void 0, Ge[0]);
|
|
6284
6296
|
}
|
|
6285
6297
|
for (_.position = {
|
|
6286
6298
|
start: xn(N.length > 0 ? N[0][1].start : {
|
|
@@ -6297,9 +6309,9 @@ function Kb(t) {
|
|
|
6297
6309
|
_ = e.transforms[se](_) || _;
|
|
6298
6310
|
return _;
|
|
6299
6311
|
}
|
|
6300
|
-
function i(N, _,
|
|
6312
|
+
function i(N, _, W) {
|
|
6301
6313
|
let G = _ - 1, se = -1, Ge = !1, mt, Ye, $e, gt;
|
|
6302
|
-
for (; ++G <=
|
|
6314
|
+
for (; ++G <= W; ) {
|
|
6303
6315
|
const Ne = N[G];
|
|
6304
6316
|
switch (Ne[1].type) {
|
|
6305
6317
|
case "listUnordered":
|
|
@@ -6331,7 +6343,7 @@ function Kb(t) {
|
|
|
6331
6343
|
Ye && (N[Ye][1].type = "lineEndingBlank", Ge = !0), vt[1].type = "lineEnding", Ye = Bt;
|
|
6332
6344
|
} else if (!(vt[1].type === "linePrefix" || vt[1].type === "blockQuotePrefix" || vt[1].type === "blockQuotePrefixWhitespace" || vt[1].type === "blockQuoteMarker" || vt[1].type === "listItemIndent")) break;
|
|
6333
6345
|
}
|
|
6334
|
-
$e && (!Ye || $e < Ye) && (mt._spread = !0), mt.end = Object.assign({}, Ye ? N[Ye][1].start : Ne[1].end), N.splice(Ye || G, 0, ["exit", mt, Ne[2]]), G++,
|
|
6346
|
+
$e && (!Ye || $e < Ye) && (mt._spread = !0), mt.end = Object.assign({}, Ye ? N[Ye][1].start : Ne[1].end), N.splice(Ye || G, 0, ["exit", mt, Ne[2]]), G++, W++;
|
|
6335
6347
|
}
|
|
6336
6348
|
if (Ne[1].type === "listItemPrefix") {
|
|
6337
6349
|
const Bt = {
|
|
@@ -6341,15 +6353,15 @@ function Kb(t) {
|
|
|
6341
6353
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
6342
6354
|
end: void 0
|
|
6343
6355
|
};
|
|
6344
|
-
mt = Bt, N.splice(G, 0, ["enter", Bt, Ne[2]]), G++,
|
|
6356
|
+
mt = Bt, N.splice(G, 0, ["enter", Bt, Ne[2]]), G++, W++, $e = void 0, gt = !0;
|
|
6345
6357
|
}
|
|
6346
6358
|
}
|
|
6347
6359
|
}
|
|
6348
|
-
return N[_][1]._spread = Ge,
|
|
6360
|
+
return N[_][1]._spread = Ge, W;
|
|
6349
6361
|
}
|
|
6350
6362
|
function o(N, _) {
|
|
6351
|
-
return
|
|
6352
|
-
function
|
|
6363
|
+
return W;
|
|
6364
|
+
function W(G) {
|
|
6353
6365
|
l.call(this, N(G), G), _ && _.call(this, G);
|
|
6354
6366
|
}
|
|
6355
6367
|
}
|
|
@@ -6359,8 +6371,8 @@ function Kb(t) {
|
|
|
6359
6371
|
children: []
|
|
6360
6372
|
});
|
|
6361
6373
|
}
|
|
6362
|
-
function l(N, _,
|
|
6363
|
-
this.stack[this.stack.length - 1].children.push(N), this.stack.push(N), this.tokenStack.push([_,
|
|
6374
|
+
function l(N, _, W) {
|
|
6375
|
+
this.stack[this.stack.length - 1].children.push(N), this.stack.push(N), this.tokenStack.push([_, W || void 0]), N.position = {
|
|
6364
6376
|
start: xn(_.start),
|
|
6365
6377
|
// @ts-expect-error: `end` will be patched later.
|
|
6366
6378
|
end: void 0
|
|
@@ -6368,22 +6380,22 @@ function Kb(t) {
|
|
|
6368
6380
|
}
|
|
6369
6381
|
function a(N) {
|
|
6370
6382
|
return _;
|
|
6371
|
-
function _(
|
|
6372
|
-
N && N.call(this,
|
|
6383
|
+
function _(W) {
|
|
6384
|
+
N && N.call(this, W), c.call(this, W);
|
|
6373
6385
|
}
|
|
6374
6386
|
}
|
|
6375
6387
|
function c(N, _) {
|
|
6376
|
-
const
|
|
6388
|
+
const W = this.stack.pop(), G = this.tokenStack.pop();
|
|
6377
6389
|
if (G)
|
|
6378
6390
|
G[0].type !== N.type && (_ ? _.call(this, N, G[0]) : (G[1] || Cu).call(this, N, G[0]));
|
|
6379
6391
|
else throw new Error("Cannot close `" + N.type + "` (" + Ai({
|
|
6380
6392
|
start: N.start,
|
|
6381
6393
|
end: N.end
|
|
6382
6394
|
}) + "): it’s not open");
|
|
6383
|
-
|
|
6395
|
+
W.position.end = xn(N.end);
|
|
6384
6396
|
}
|
|
6385
6397
|
function u() {
|
|
6386
|
-
return
|
|
6398
|
+
return Wa(this.stack.pop());
|
|
6387
6399
|
}
|
|
6388
6400
|
function f() {
|
|
6389
6401
|
this.data.expectingFirstListItemValue = !0;
|
|
@@ -6414,8 +6426,8 @@ function Kb(t) {
|
|
|
6414
6426
|
_.value = N.replace(/(\r?\n|\r)$/g, "");
|
|
6415
6427
|
}
|
|
6416
6428
|
function A(N) {
|
|
6417
|
-
const _ = this.resume(),
|
|
6418
|
-
|
|
6429
|
+
const _ = this.resume(), W = this.stack[this.stack.length - 1];
|
|
6430
|
+
W.label = _, W.identifier = Rt(this.sliceSerialize(N)).toLowerCase();
|
|
6419
6431
|
}
|
|
6420
6432
|
function C() {
|
|
6421
6433
|
const N = this.resume(), _ = this.stack[this.stack.length - 1];
|
|
@@ -6428,8 +6440,8 @@ function Kb(t) {
|
|
|
6428
6440
|
function v(N) {
|
|
6429
6441
|
const _ = this.stack[this.stack.length - 1];
|
|
6430
6442
|
if (!_.depth) {
|
|
6431
|
-
const
|
|
6432
|
-
_.depth =
|
|
6443
|
+
const W = this.sliceSerialize(N).length;
|
|
6444
|
+
_.depth = W;
|
|
6433
6445
|
}
|
|
6434
6446
|
}
|
|
6435
6447
|
function x() {
|
|
@@ -6443,13 +6455,13 @@ function Kb(t) {
|
|
|
6443
6455
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
6444
6456
|
}
|
|
6445
6457
|
function z(N) {
|
|
6446
|
-
const
|
|
6447
|
-
let G =
|
|
6448
|
-
(!G || G.type !== "text") && (G =
|
|
6458
|
+
const W = this.stack[this.stack.length - 1].children;
|
|
6459
|
+
let G = W[W.length - 1];
|
|
6460
|
+
(!G || G.type !== "text") && (G = Wn(), G.position = {
|
|
6449
6461
|
start: xn(N.start),
|
|
6450
6462
|
// @ts-expect-error: we’ll add `end` later.
|
|
6451
6463
|
end: void 0
|
|
6452
|
-
},
|
|
6464
|
+
}, W.push(G)), this.stack.push(G);
|
|
6453
6465
|
}
|
|
6454
6466
|
function T(N) {
|
|
6455
6467
|
const _ = this.stack.pop();
|
|
@@ -6458,8 +6470,8 @@ function Kb(t) {
|
|
|
6458
6470
|
function S(N) {
|
|
6459
6471
|
const _ = this.stack[this.stack.length - 1];
|
|
6460
6472
|
if (this.data.atHardBreak) {
|
|
6461
|
-
const
|
|
6462
|
-
|
|
6473
|
+
const W = _.children[_.children.length - 1];
|
|
6474
|
+
W.position.end = xn(N.end), this.data.atHardBreak = void 0;
|
|
6463
6475
|
return;
|
|
6464
6476
|
}
|
|
6465
6477
|
!this.data.setextHeadingSlurpLineEnding && e.canContainEols.includes(_.type) && (z.call(this, N), T.call(this, N));
|
|
@@ -6475,7 +6487,7 @@ function Kb(t) {
|
|
|
6475
6487
|
const N = this.resume(), _ = this.stack[this.stack.length - 1];
|
|
6476
6488
|
_.value = N;
|
|
6477
6489
|
}
|
|
6478
|
-
function
|
|
6490
|
+
function q() {
|
|
6479
6491
|
const N = this.resume(), _ = this.stack[this.stack.length - 1];
|
|
6480
6492
|
_.value = N;
|
|
6481
6493
|
}
|
|
@@ -6498,16 +6510,16 @@ function Kb(t) {
|
|
|
6498
6510
|
this.data.referenceType = void 0;
|
|
6499
6511
|
}
|
|
6500
6512
|
function ce(N) {
|
|
6501
|
-
const _ = this.sliceSerialize(N),
|
|
6502
|
-
|
|
6513
|
+
const _ = this.sliceSerialize(N), W = this.stack[this.stack.length - 2];
|
|
6514
|
+
W.label = Qd(_), W.identifier = Rt(_).toLowerCase();
|
|
6503
6515
|
}
|
|
6504
6516
|
function be() {
|
|
6505
|
-
const N = this.stack[this.stack.length - 1], _ = this.resume(),
|
|
6506
|
-
if (this.data.inReference = !0,
|
|
6517
|
+
const N = this.stack[this.stack.length - 1], _ = this.resume(), W = this.stack[this.stack.length - 1];
|
|
6518
|
+
if (this.data.inReference = !0, W.type === "link") {
|
|
6507
6519
|
const G = N.children;
|
|
6508
|
-
|
|
6520
|
+
W.children = G;
|
|
6509
6521
|
} else
|
|
6510
|
-
|
|
6522
|
+
W.alt = _;
|
|
6511
6523
|
}
|
|
6512
6524
|
function b() {
|
|
6513
6525
|
const N = this.resume(), _ = this.stack[this.stack.length - 1];
|
|
@@ -6524,16 +6536,16 @@ function Kb(t) {
|
|
|
6524
6536
|
this.data.referenceType = "collapsed";
|
|
6525
6537
|
}
|
|
6526
6538
|
function Ce(N) {
|
|
6527
|
-
const _ = this.resume(),
|
|
6528
|
-
|
|
6539
|
+
const _ = this.resume(), W = this.stack[this.stack.length - 1];
|
|
6540
|
+
W.label = _, W.identifier = Rt(this.sliceSerialize(N)).toLowerCase(), this.data.referenceType = "full";
|
|
6529
6541
|
}
|
|
6530
6542
|
function ie(N) {
|
|
6531
6543
|
this.data.characterReferenceType = N.type;
|
|
6532
6544
|
}
|
|
6533
6545
|
function fe(N) {
|
|
6534
|
-
const _ = this.sliceSerialize(N),
|
|
6546
|
+
const _ = this.sliceSerialize(N), W = this.data.characterReferenceType;
|
|
6535
6547
|
let G;
|
|
6536
|
-
|
|
6548
|
+
W ? (G = Vd(_, W === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : G = ja(_);
|
|
6537
6549
|
const se = this.stack[this.stack.length - 1];
|
|
6538
6550
|
se.value += G;
|
|
6539
6551
|
}
|
|
@@ -6613,7 +6625,7 @@ function Kb(t) {
|
|
|
6613
6625
|
alt: null
|
|
6614
6626
|
};
|
|
6615
6627
|
}
|
|
6616
|
-
function
|
|
6628
|
+
function qn() {
|
|
6617
6629
|
return {
|
|
6618
6630
|
type: "link",
|
|
6619
6631
|
title: null,
|
|
@@ -6650,7 +6662,7 @@ function Kb(t) {
|
|
|
6650
6662
|
children: []
|
|
6651
6663
|
};
|
|
6652
6664
|
}
|
|
6653
|
-
function
|
|
6665
|
+
function Wn() {
|
|
6654
6666
|
return {
|
|
6655
6667
|
type: "text",
|
|
6656
6668
|
value: ""
|
|
@@ -6984,7 +6996,7 @@ function ih(t, e) {
|
|
|
6984
6996
|
return jr(t, function(r) {
|
|
6985
6997
|
if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
|
|
6986
6998
|
return n = !0, Yl;
|
|
6987
|
-
}), !!((!t.depth || t.depth < 3) &&
|
|
6999
|
+
}), !!((!t.depth || t.depth < 3) && Wa(t) && (e.options.setext || n));
|
|
6988
7000
|
}
|
|
6989
7001
|
function a0(t, e, n, r) {
|
|
6990
7002
|
const i = Math.max(Math.min(6, t.depth || 1), 1), o = n.createTracker(r);
|
|
@@ -7095,7 +7107,7 @@ function d0() {
|
|
|
7095
7107
|
return "`";
|
|
7096
7108
|
}
|
|
7097
7109
|
function ch(t, e) {
|
|
7098
|
-
const n =
|
|
7110
|
+
const n = Wa(t);
|
|
7099
7111
|
return !!(!e.options.resourceLink && // If there’s a url…
|
|
7100
7112
|
t.url && // And there’s a no title…
|
|
7101
7113
|
!t.title && // And the content of `node` is a single text node…
|
|
@@ -7686,9 +7698,9 @@ function $0(t, e) {
|
|
|
7686
7698
|
stack: [],
|
|
7687
7699
|
unsafe: [...v0]
|
|
7688
7700
|
};
|
|
7689
|
-
th(r, n), r.options.tightDefinitions && r.join.push(
|
|
7701
|
+
th(r, n), r.options.tightDefinitions && r.join.push(W0), r.handle = Yb("type", {
|
|
7690
7702
|
invalid: V0,
|
|
7691
|
-
unknown:
|
|
7703
|
+
unknown: q0,
|
|
7692
7704
|
handlers: r.handlers
|
|
7693
7705
|
});
|
|
7694
7706
|
let i = r.handle(t, void 0, r, {
|
|
@@ -7711,14 +7723,14 @@ function $0(t, e) {
|
|
|
7711
7723
|
function V0(t) {
|
|
7712
7724
|
throw new Error("Cannot handle value `" + t + "`, expected node");
|
|
7713
7725
|
}
|
|
7714
|
-
function
|
|
7726
|
+
function q0(t) {
|
|
7715
7727
|
const e = (
|
|
7716
7728
|
/** @type {Nodes} */
|
|
7717
7729
|
t
|
|
7718
7730
|
);
|
|
7719
7731
|
throw new Error("Cannot handle unknown node `" + e.type + "`");
|
|
7720
7732
|
}
|
|
7721
|
-
function
|
|
7733
|
+
function W0(t, e) {
|
|
7722
7734
|
if (t.type === "definition" && t.type === e.type)
|
|
7723
7735
|
return 0;
|
|
7724
7736
|
}
|
|
@@ -7943,7 +7955,7 @@ tt.prototype.fatal = void 0;
|
|
|
7943
7955
|
tt.prototype.place = void 0;
|
|
7944
7956
|
tt.prototype.ruleId = void 0;
|
|
7945
7957
|
tt.prototype.source = void 0;
|
|
7946
|
-
const
|
|
7958
|
+
const Wt = { basename: ew, dirname: tw, extname: nw, join: rw, sep: "/" };
|
|
7947
7959
|
function ew(t, e) {
|
|
7948
7960
|
if (e !== void 0 && typeof e != "string")
|
|
7949
7961
|
throw new TypeError('"ext" argument must be a string');
|
|
@@ -8149,7 +8161,7 @@ class uw {
|
|
|
8149
8161
|
* Basename.
|
|
8150
8162
|
*/
|
|
8151
8163
|
get basename() {
|
|
8152
|
-
return typeof this.path == "string" ?
|
|
8164
|
+
return typeof this.path == "string" ? Wt.basename(this.path) : void 0;
|
|
8153
8165
|
}
|
|
8154
8166
|
/**
|
|
8155
8167
|
* Set basename (including extname) (`'index.min.js'`).
|
|
@@ -8164,7 +8176,7 @@ class uw {
|
|
|
8164
8176
|
* Nothing.
|
|
8165
8177
|
*/
|
|
8166
8178
|
set basename(e) {
|
|
8167
|
-
tl(e, "basename"), el(e, "basename"), this.path =
|
|
8179
|
+
tl(e, "basename"), el(e, "basename"), this.path = Wt.join(this.dirname || "", e);
|
|
8168
8180
|
}
|
|
8169
8181
|
/**
|
|
8170
8182
|
* Get the parent path (example: `'~'`).
|
|
@@ -8173,7 +8185,7 @@ class uw {
|
|
|
8173
8185
|
* Dirname.
|
|
8174
8186
|
*/
|
|
8175
8187
|
get dirname() {
|
|
8176
|
-
return typeof this.path == "string" ?
|
|
8188
|
+
return typeof this.path == "string" ? Wt.dirname(this.path) : void 0;
|
|
8177
8189
|
}
|
|
8178
8190
|
/**
|
|
8179
8191
|
* Set the parent path (example: `'~'`).
|
|
@@ -8186,7 +8198,7 @@ class uw {
|
|
|
8186
8198
|
* Nothing.
|
|
8187
8199
|
*/
|
|
8188
8200
|
set dirname(e) {
|
|
8189
|
-
vu(this.basename, "dirname"), this.path =
|
|
8201
|
+
vu(this.basename, "dirname"), this.path = Wt.join(e || "", this.basename);
|
|
8190
8202
|
}
|
|
8191
8203
|
/**
|
|
8192
8204
|
* Get the extname (including dot) (example: `'.js'`).
|
|
@@ -8195,7 +8207,7 @@ class uw {
|
|
|
8195
8207
|
* Extname.
|
|
8196
8208
|
*/
|
|
8197
8209
|
get extname() {
|
|
8198
|
-
return typeof this.path == "string" ?
|
|
8210
|
+
return typeof this.path == "string" ? Wt.extname(this.path) : void 0;
|
|
8199
8211
|
}
|
|
8200
8212
|
/**
|
|
8201
8213
|
* Set the extname (including dot) (example: `'.js'`).
|
|
@@ -8216,7 +8228,7 @@ class uw {
|
|
|
8216
8228
|
if (e.includes(".", 1))
|
|
8217
8229
|
throw new Error("`extname` cannot contain multiple dots");
|
|
8218
8230
|
}
|
|
8219
|
-
this.path =
|
|
8231
|
+
this.path = Wt.join(this.dirname, this.stem + (e || ""));
|
|
8220
8232
|
}
|
|
8221
8233
|
/**
|
|
8222
8234
|
* Get the full path (example: `'~/index.min.js'`).
|
|
@@ -8249,7 +8261,7 @@ class uw {
|
|
|
8249
8261
|
* Stem.
|
|
8250
8262
|
*/
|
|
8251
8263
|
get stem() {
|
|
8252
|
-
return typeof this.path == "string" ?
|
|
8264
|
+
return typeof this.path == "string" ? Wt.basename(this.path, this.extname) : void 0;
|
|
8253
8265
|
}
|
|
8254
8266
|
/**
|
|
8255
8267
|
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -8264,7 +8276,7 @@ class uw {
|
|
|
8264
8276
|
* Nothing.
|
|
8265
8277
|
*/
|
|
8266
8278
|
set stem(e) {
|
|
8267
|
-
tl(e, "stem"), el(e, "stem"), this.path =
|
|
8279
|
+
tl(e, "stem"), el(e, "stem"), this.path = Wt.join(this.dirname || "", e + (this.extname || ""));
|
|
8268
8280
|
}
|
|
8269
8281
|
// Normal prototypal methods.
|
|
8270
8282
|
/**
|
|
@@ -8478,9 +8490,9 @@ class uw {
|
|
|
8478
8490
|
}
|
|
8479
8491
|
}
|
|
8480
8492
|
function el(t, e) {
|
|
8481
|
-
if (t && t.includes(
|
|
8493
|
+
if (t && t.includes(Wt.sep))
|
|
8482
8494
|
throw new Error(
|
|
8483
|
-
"`" + e + "` cannot be a path: did not expect `" +
|
|
8495
|
+
"`" + e + "` cannot be a path: did not expect `" + Wt.sep + "`"
|
|
8484
8496
|
);
|
|
8485
8497
|
}
|
|
8486
8498
|
function tl(t, e) {
|
|
@@ -10410,14 +10422,14 @@ function Eh(t, e, n, r, i) {
|
|
|
10410
10422
|
}
|
|
10411
10423
|
return t;
|
|
10412
10424
|
}
|
|
10413
|
-
function
|
|
10425
|
+
function qw(t, e, n, r) {
|
|
10414
10426
|
if (!r.isInline && e == n && t.doc.resolve(e).parent.content.size) {
|
|
10415
10427
|
let i = zw(t.doc, e, r.type);
|
|
10416
10428
|
i != null && (e = n = i);
|
|
10417
10429
|
}
|
|
10418
10430
|
t.replaceRange(e, n, new L(O.from(r), 0, 0));
|
|
10419
10431
|
}
|
|
10420
|
-
function
|
|
10432
|
+
function Ww(t, e, n) {
|
|
10421
10433
|
let r = t.doc.resolve(e), i = t.doc.resolve(n), o = Ih(r, i);
|
|
10422
10434
|
for (let s = 0; s < o.length; s++) {
|
|
10423
10435
|
let l = o[s], a = s == o.length - 1;
|
|
@@ -10641,14 +10653,14 @@ class vh {
|
|
|
10641
10653
|
that parent node.
|
|
10642
10654
|
*/
|
|
10643
10655
|
replaceRangeWith(e, n, r) {
|
|
10644
|
-
return
|
|
10656
|
+
return qw(this, e, n, r), this;
|
|
10645
10657
|
}
|
|
10646
10658
|
/**
|
|
10647
10659
|
Delete the given range, expanding it to cover fully covered
|
|
10648
10660
|
parent nodes until a valid replace is found.
|
|
10649
10661
|
*/
|
|
10650
10662
|
deleteRange(e, n) {
|
|
10651
|
-
return
|
|
10663
|
+
return Ww(this, e, n), this;
|
|
10652
10664
|
}
|
|
10653
10665
|
/**
|
|
10654
10666
|
Split the content in the given range off from its parent, if there
|
|
@@ -12031,15 +12043,15 @@ function $h(t, e, n = null) {
|
|
|
12031
12043
|
return l.node(-1).canReplaceWith(l.index(-1), l.indexAfter(-1), e) ? r.tr.delete(o, s).setBlockType(o, o, e, a) : null;
|
|
12032
12044
|
});
|
|
12033
12045
|
}
|
|
12034
|
-
const Ln = typeof navigator < "u" ? navigator : null,
|
|
12046
|
+
const Ln = typeof navigator < "u" ? navigator : null, qu = typeof document < "u" ? document : null, dr = Ln && Ln.userAgent || "", da = /Edge\/(\d+)/.exec(dr), Vh = /MSIE \d/.exec(dr), ha = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(dr), sc = !!(Vh || ha || da);
|
|
12035
12047
|
Vh ? document.documentMode : ha ? +ha[1] : da && +da[1];
|
|
12036
12048
|
const px = !sc && /gecko\/(\d+)/i.test(dr);
|
|
12037
12049
|
px && +(/Firefox\/(\d+)/.exec(dr) || [0, 0])[1];
|
|
12038
|
-
const
|
|
12039
|
-
|
|
12050
|
+
const Wu = !sc && /Chrome\/(\d+)/.exec(dr);
|
|
12051
|
+
Wu && +Wu[1];
|
|
12040
12052
|
const mx = !sc && !!Ln && /Apple Computer/.test(Ln.vendor), gx = mx && (/Mobile\/\w+/.test(dr) || !!Ln && Ln.maxTouchPoints > 2);
|
|
12041
12053
|
gx || Ln && /Mac/.test(Ln.platform);
|
|
12042
|
-
const yx = !!
|
|
12054
|
+
const yx = !!qu && "webkitFontSmoothing" in qu.documentElement.style;
|
|
12043
12055
|
yx && +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1];
|
|
12044
12056
|
function dl(t, e, n, r, i, o) {
|
|
12045
12057
|
if (t.composing) return !1;
|
|
@@ -12113,7 +12125,7 @@ function Ki(t, e, n = {}) {
|
|
|
12113
12125
|
return f;
|
|
12114
12126
|
});
|
|
12115
12127
|
}
|
|
12116
|
-
function
|
|
12128
|
+
function qh(t) {
|
|
12117
12129
|
return Object.assign(Object.create(t), t).setTime(Date.now());
|
|
12118
12130
|
}
|
|
12119
12131
|
function wx(t, e) {
|
|
@@ -12282,9 +12294,9 @@ function pl(t, e, n = !0) {
|
|
|
12282
12294
|
return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
|
|
12283
12295
|
}
|
|
12284
12296
|
function Ox(t) {
|
|
12285
|
-
return new dt({ props: { handleKeyDown:
|
|
12297
|
+
return new dt({ props: { handleKeyDown: Wh(t) } });
|
|
12286
12298
|
}
|
|
12287
|
-
function
|
|
12299
|
+
function Wh(t) {
|
|
12288
12300
|
let e = vx(t);
|
|
12289
12301
|
return function(n, r) {
|
|
12290
12302
|
let i = Ax(r), o, s = e[pl(i, r)];
|
|
@@ -12491,7 +12503,7 @@ function Jh(t) {
|
|
|
12491
12503
|
;
|
|
12492
12504
|
return e;
|
|
12493
12505
|
}
|
|
12494
|
-
function
|
|
12506
|
+
function qx({ refDOM: t, refTop: e, stack: n }) {
|
|
12495
12507
|
let r = t ? t.getBoundingClientRect().top : 0;
|
|
12496
12508
|
Gh(n, r == 0 ? 0 : r - e);
|
|
12497
12509
|
}
|
|
@@ -12502,7 +12514,7 @@ function Gh(t, e) {
|
|
|
12502
12514
|
}
|
|
12503
12515
|
}
|
|
12504
12516
|
let xr = null;
|
|
12505
|
-
function
|
|
12517
|
+
function Wx(t) {
|
|
12506
12518
|
if (t.setActive)
|
|
12507
12519
|
return t.setActive();
|
|
12508
12520
|
if (xr)
|
|
@@ -14345,15 +14357,15 @@ function MC(t, e) {
|
|
|
14345
14357
|
}
|
|
14346
14358
|
return new L(i, o, s);
|
|
14347
14359
|
}
|
|
14348
|
-
const
|
|
14360
|
+
const We = {}, je = {}, AC = { touchstart: !0, touchmove: !0 };
|
|
14349
14361
|
class NC {
|
|
14350
14362
|
constructor() {
|
|
14351
14363
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.badSafariComposition = !1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
14352
14364
|
}
|
|
14353
14365
|
}
|
|
14354
14366
|
function EC(t) {
|
|
14355
|
-
for (let e in
|
|
14356
|
-
let n =
|
|
14367
|
+
for (let e in We) {
|
|
14368
|
+
let n = We[e];
|
|
14357
14369
|
t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
|
|
14358
14370
|
vC(t, r) && !fc(t, r) && (t.editable || !(r.type in je)) && n(t, r);
|
|
14359
14371
|
}, AC[e] ? { passive: !0 } : void 0);
|
|
@@ -14392,7 +14404,7 @@ function vC(t, e) {
|
|
|
14392
14404
|
return !0;
|
|
14393
14405
|
}
|
|
14394
14406
|
function OC(t, e) {
|
|
14395
|
-
!fc(t, e) &&
|
|
14407
|
+
!fc(t, e) && We[e.type] && (t.editable || !(e.type in je)) && We[e.type](t, e);
|
|
14396
14408
|
}
|
|
14397
14409
|
je.keydown = (t, e) => {
|
|
14398
14410
|
let n = e;
|
|
@@ -14495,7 +14507,7 @@ function hc(t) {
|
|
|
14495
14507
|
return Qo(t);
|
|
14496
14508
|
}
|
|
14497
14509
|
const mp = kt ? "metaKey" : "ctrlKey";
|
|
14498
|
-
|
|
14510
|
+
We.mousedown = (t, e) => {
|
|
14499
14511
|
let n = e;
|
|
14500
14512
|
t.input.shiftKey = n.shiftKey;
|
|
14501
14513
|
let r = hc(t), i = Date.now(), o = "singleClick";
|
|
@@ -14549,13 +14561,13 @@ class FC {
|
|
|
14549
14561
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
14550
14562
|
}
|
|
14551
14563
|
}
|
|
14552
|
-
|
|
14564
|
+
We.touchstart = (t) => {
|
|
14553
14565
|
t.input.lastTouch = Date.now(), hc(t), Nn(t, "pointer");
|
|
14554
14566
|
};
|
|
14555
|
-
|
|
14567
|
+
We.touchmove = (t) => {
|
|
14556
14568
|
t.input.lastTouch = Date.now(), Nn(t, "pointer");
|
|
14557
14569
|
};
|
|
14558
|
-
|
|
14570
|
+
We.contextmenu = (t) => hc(t);
|
|
14559
14571
|
function gp(t, e) {
|
|
14560
14572
|
return t.composing ? !0 : Fe && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
14561
14573
|
}
|
|
@@ -14598,7 +14610,7 @@ function yp(t, e) {
|
|
|
14598
14610
|
clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Qo(t), e));
|
|
14599
14611
|
}
|
|
14600
14612
|
function kp(t) {
|
|
14601
|
-
for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt =
|
|
14613
|
+
for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = qC()); t.input.compositionNodes.length > 0; )
|
|
14602
14614
|
t.input.compositionNodes.pop().markParentsDirty();
|
|
14603
14615
|
}
|
|
14604
14616
|
function VC(t) {
|
|
@@ -14620,7 +14632,7 @@ function VC(t) {
|
|
|
14620
14632
|
}
|
|
14621
14633
|
return n || r;
|
|
14622
14634
|
}
|
|
14623
|
-
function
|
|
14635
|
+
function qC() {
|
|
14624
14636
|
let t = document.createEvent("Event");
|
|
14625
14637
|
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
14626
14638
|
}
|
|
@@ -14633,7 +14645,7 @@ function Qo(t, e = !1) {
|
|
|
14633
14645
|
return !1;
|
|
14634
14646
|
}
|
|
14635
14647
|
}
|
|
14636
|
-
function
|
|
14648
|
+
function WC(t, e) {
|
|
14637
14649
|
if (!t.dom.parentNode)
|
|
14638
14650
|
return;
|
|
14639
14651
|
let n = t.dom.parentNode.appendChild(document.createElement("div"));
|
|
@@ -14644,12 +14656,12 @@ function qC(t, e) {
|
|
|
14644
14656
|
}, 50);
|
|
14645
14657
|
}
|
|
14646
14658
|
const Fi = et && vn < 15 || $r && Fx < 604;
|
|
14647
|
-
|
|
14659
|
+
We.copy = je.cut = (t, e) => {
|
|
14648
14660
|
let n = e, r = t.state.selection, i = n.type == "cut";
|
|
14649
14661
|
if (r.empty)
|
|
14650
14662
|
return;
|
|
14651
14663
|
let o = Fi ? null : n.clipboardData, s = r.content(), { dom: l, text: a } = uc(t, s);
|
|
14652
|
-
o ? (n.preventDefault(), o.clearData(), o.setData("text/html", l.innerHTML), o.setData("text/plain", a)) :
|
|
14664
|
+
o ? (n.preventDefault(), o.clearData(), o.setData("text/html", l.innerHTML), o.setData("text/plain", a)) : WC(t, l), i && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
14653
14665
|
};
|
|
14654
14666
|
function jC(t) {
|
|
14655
14667
|
return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1 ? t.content.firstChild : null;
|
|
@@ -14697,7 +14709,7 @@ function xp(t, e) {
|
|
|
14697
14709
|
let n = t.someProp("dragCopies", (r) => !r(e));
|
|
14698
14710
|
return n ?? !e[KC];
|
|
14699
14711
|
}
|
|
14700
|
-
|
|
14712
|
+
We.dragstart = (t, e) => {
|
|
14701
14713
|
let n = e, r = t.input.mouseDown;
|
|
14702
14714
|
if (r && r.done(), !n.dataTransfer)
|
|
14703
14715
|
return;
|
|
@@ -14713,7 +14725,7 @@ qe.dragstart = (t, e) => {
|
|
|
14713
14725
|
let l = (s || t.state.selection).content(), { dom: a, text: c, slice: u } = uc(t, l);
|
|
14714
14726
|
(!n.dataTransfer.files.length || !Oe || Uh > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Fi ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Fi || n.dataTransfer.setData("text/plain", c), t.dragging = new wp(u, xp(t, n), s);
|
|
14715
14727
|
};
|
|
14716
|
-
|
|
14728
|
+
We.dragend = (t) => {
|
|
14717
14729
|
let e = t.dragging;
|
|
14718
14730
|
window.setTimeout(() => {
|
|
14719
14731
|
t.dragging == e && (t.dragging = null);
|
|
@@ -14764,16 +14776,16 @@ function JC(t, e, n) {
|
|
|
14764
14776
|
}
|
|
14765
14777
|
t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
|
|
14766
14778
|
}
|
|
14767
|
-
|
|
14779
|
+
We.focus = (t) => {
|
|
14768
14780
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
14769
14781
|
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && dn(t);
|
|
14770
14782
|
}, 20));
|
|
14771
14783
|
};
|
|
14772
|
-
|
|
14784
|
+
We.blur = (t, e) => {
|
|
14773
14785
|
let n = e;
|
|
14774
14786
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
14775
14787
|
};
|
|
14776
|
-
|
|
14788
|
+
We.beforeinput = (t, e) => {
|
|
14777
14789
|
if (Oe && fn && e.inputType == "deleteContentBackward") {
|
|
14778
14790
|
t.domObserver.flushSoon();
|
|
14779
14791
|
let { domChangeCount: r } = t.input;
|
|
@@ -14786,7 +14798,7 @@ qe.beforeinput = (t, e) => {
|
|
|
14786
14798
|
}
|
|
14787
14799
|
};
|
|
14788
14800
|
for (let t in je)
|
|
14789
|
-
|
|
14801
|
+
We[t] = je[t];
|
|
14790
14802
|
function $i(t, e) {
|
|
14791
14803
|
if (t == e)
|
|
14792
14804
|
return !0;
|
|
@@ -15795,7 +15807,7 @@ class Mp {
|
|
|
15795
15807
|
}
|
|
15796
15808
|
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && dC(this)) ? dn(this, h) : (sp(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
15797
15809
|
}
|
|
15798
|
-
this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), u == "reset" ? this.dom.scrollTop = 0 : u == "to selection" ? this.scrollToSelection() : d &&
|
|
15810
|
+
this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), u == "reset" ? this.dom.scrollTop = 0 : u == "to selection" ? this.scrollToSelection() : d && qx(d);
|
|
15799
15811
|
}
|
|
15800
15812
|
/**
|
|
15801
15813
|
@internal
|
|
@@ -15882,7 +15894,7 @@ class Mp {
|
|
|
15882
15894
|
Focus the editor.
|
|
15883
15895
|
*/
|
|
15884
15896
|
focus() {
|
|
15885
|
-
this.domObserver.stop(), this.editable &&
|
|
15897
|
+
this.domObserver.stop(), this.editable && Wx(this.dom), dn(this), this.domObserver.start();
|
|
15886
15898
|
}
|
|
15887
15899
|
/**
|
|
15888
15900
|
Get the document root in which the editor exists. This will
|
|
@@ -16368,8 +16380,8 @@ const SS = new ht("MILKDOWN_STATE_TRACKER"), TS = (t) => (t.inject(Ml, "").injec
|
|
|
16368
16380
|
hr(TS, {
|
|
16369
16381
|
displayName: "EditorState"
|
|
16370
16382
|
});
|
|
16371
|
-
const
|
|
16372
|
-
t.remove(
|
|
16383
|
+
const qi = oe([], "pasteRule"), El = oe([ut], "pasteRuleTimer"), zo = Xt("PasteRuleReady"), MS = (t) => (t.inject(qi, []).inject(El, [ut]).record(zo), async () => (await t.waitTimers(El), t.done(zo), () => {
|
|
16384
|
+
t.remove(qi).remove(El).clearTimer(zo);
|
|
16373
16385
|
}));
|
|
16374
16386
|
hr(MS, {
|
|
16375
16387
|
displayName: "PasteRule"
|
|
@@ -16421,7 +16433,7 @@ const ES = new ht("MILKDOWN_VIEW_CLEAR"), IS = (t) => (t.inject(Rl, document.bod
|
|
|
16421
16433
|
state: r,
|
|
16422
16434
|
nodeViews: o,
|
|
16423
16435
|
markViews: s,
|
|
16424
|
-
transformPasted: (a, c, u) => (t.get(
|
|
16436
|
+
transformPasted: (a, c, u) => (t.get(qi).sort((f, d) => (d.priority ?? 50) - (f.priority ?? 50)).map((f) => f.run).forEach((f) => {
|
|
16425
16437
|
a = f(a, c, u);
|
|
16426
16438
|
}), a),
|
|
16427
16439
|
...i
|
|
@@ -16457,8 +16469,8 @@ function vS(t) {
|
|
|
16457
16469
|
const e = (n) => async () => {
|
|
16458
16470
|
await n.wait(ut);
|
|
16459
16471
|
const r = t(n);
|
|
16460
|
-
return n.update(
|
|
16461
|
-
n.update(
|
|
16472
|
+
return n.update(qi, (i) => [...i, r]), e.pasteRule = r, () => {
|
|
16473
|
+
n.update(qi, (i) => i.filter((o) => o !== r));
|
|
16462
16474
|
};
|
|
16463
16475
|
};
|
|
16464
16476
|
return e;
|
|
@@ -16857,7 +16869,7 @@ E(zp, {
|
|
|
16857
16869
|
displayName: "Command<toggleStrongCommand>",
|
|
16858
16870
|
group: "Strong"
|
|
16859
16871
|
});
|
|
16860
|
-
const
|
|
16872
|
+
const qS = rt((t) => Ki(
|
|
16861
16873
|
new RegExp("(?<![\\w:/])(?:\\*\\*|__)([^*_]+?)(?:\\*\\*|__)(?![\\w/])$"),
|
|
16862
16874
|
Ts.type(t),
|
|
16863
16875
|
{
|
|
@@ -16866,7 +16878,7 @@ const WS = rt((t) => Ki(
|
|
|
16866
16878
|
})
|
|
16867
16879
|
}
|
|
16868
16880
|
));
|
|
16869
|
-
E(
|
|
16881
|
+
E(qS, {
|
|
16870
16882
|
displayName: "InputRule<strong>",
|
|
16871
16883
|
group: "Strong"
|
|
16872
16884
|
});
|
|
@@ -16935,8 +16947,8 @@ E(Hp, {
|
|
|
16935
16947
|
displayName: "Command<toggleInlineCodeCommand>",
|
|
16936
16948
|
group: "InlineCode"
|
|
16937
16949
|
});
|
|
16938
|
-
const
|
|
16939
|
-
E(
|
|
16950
|
+
const WS = rt((t) => Ki(/(?:`)([^`]+)(?:`)$/, er.type(t)));
|
|
16951
|
+
E(WS, {
|
|
16940
16952
|
displayName: "InputRule<inlineCodeInputRule>",
|
|
16941
16953
|
group: "InlineCode"
|
|
16942
16954
|
});
|
|
@@ -17051,7 +17063,7 @@ E(KS, {
|
|
|
17051
17063
|
group: "Doc"
|
|
17052
17064
|
});
|
|
17053
17065
|
function JS(t) {
|
|
17054
|
-
return
|
|
17066
|
+
return qa(
|
|
17055
17067
|
t,
|
|
17056
17068
|
(e) => e.type === "html" && ["<br />", "<br>", "<br >", "<br/>"].includes(
|
|
17057
17069
|
e.value?.trim()
|
|
@@ -17078,8 +17090,8 @@ E(kc.options, {
|
|
|
17078
17090
|
displayName: "RemarkConfig<remarkPreserveEmptyLine>",
|
|
17079
17091
|
group: "Remark"
|
|
17080
17092
|
});
|
|
17081
|
-
const
|
|
17082
|
-
E(
|
|
17093
|
+
const qp = Pt("paragraph");
|
|
17094
|
+
E(qp, {
|
|
17083
17095
|
displayName: "Attr<paragraph>",
|
|
17084
17096
|
group: "Paragraph"
|
|
17085
17097
|
});
|
|
@@ -17087,7 +17099,7 @@ const Hn = Te("paragraph", (t) => ({
|
|
|
17087
17099
|
content: "inline*",
|
|
17088
17100
|
group: "block",
|
|
17089
17101
|
parseDOM: [{ tag: "p" }],
|
|
17090
|
-
toDOM: (e) => ["p", t.get(
|
|
17102
|
+
toDOM: (e) => ["p", t.get(qp.key)(e), 0],
|
|
17091
17103
|
parseMarkdown: {
|
|
17092
17104
|
match: (e) => e.type === "paragraph",
|
|
17093
17105
|
runner: (e, n, r) => {
|
|
@@ -17119,11 +17131,11 @@ E(Hn.ctx, {
|
|
|
17119
17131
|
displayName: "NodeSchemaCtx<paragraph>",
|
|
17120
17132
|
group: "Paragraph"
|
|
17121
17133
|
});
|
|
17122
|
-
const
|
|
17134
|
+
const Wp = ee(
|
|
17123
17135
|
"TurnIntoText",
|
|
17124
17136
|
(t) => () => Bi(Hn.type(t))
|
|
17125
17137
|
);
|
|
17126
|
-
E(
|
|
17138
|
+
E(Wp, {
|
|
17127
17139
|
displayName: "Command<turnIntoTextCommand>",
|
|
17128
17140
|
group: "Paragraph"
|
|
17129
17141
|
});
|
|
@@ -17132,7 +17144,7 @@ const jp = pt("paragraphKeymap", {
|
|
|
17132
17144
|
shortcuts: "Mod-Alt-0",
|
|
17133
17145
|
command: (t) => {
|
|
17134
17146
|
const e = t.get(te);
|
|
17135
|
-
return () => e.call(
|
|
17147
|
+
return () => e.call(Wp.key);
|
|
17136
17148
|
}
|
|
17137
17149
|
}
|
|
17138
17150
|
});
|
|
@@ -19316,7 +19328,7 @@ function Om(t, { map: e, tableStart: n, table: r }, i) {
|
|
|
19316
19328
|
}
|
|
19317
19329
|
return t;
|
|
19318
19330
|
}
|
|
19319
|
-
function
|
|
19331
|
+
function qT(t, e) {
|
|
19320
19332
|
if (!At(t)) return !1;
|
|
19321
19333
|
if (e) {
|
|
19322
19334
|
const n = Vn(t);
|
|
@@ -19324,7 +19336,7 @@ function WT(t, e) {
|
|
|
19324
19336
|
}
|
|
19325
19337
|
return !0;
|
|
19326
19338
|
}
|
|
19327
|
-
function
|
|
19339
|
+
function WT(t, e) {
|
|
19328
19340
|
if (!At(t)) return !1;
|
|
19329
19341
|
if (e) {
|
|
19330
19342
|
const n = Vn(t);
|
|
@@ -19701,7 +19713,7 @@ function Lf(t, e, n, r, i) {
|
|
|
19701
19713
|
}
|
|
19702
19714
|
h(), f.setSelection(new he(f.doc.resolve(n + s.positionAt(l, a, o)), f.doc.resolve(n + s.positionAt(u - 1, c - 1, o)))), e(f);
|
|
19703
19715
|
}
|
|
19704
|
-
const o2 =
|
|
19716
|
+
const o2 = Wh({
|
|
19705
19717
|
ArrowLeft: go("horiz", -1),
|
|
19706
19718
|
ArrowRight: go("horiz", 1),
|
|
19707
19719
|
ArrowUp: go("vert", -1),
|
|
@@ -20115,7 +20127,7 @@ function O2(t, e, n) {
|
|
|
20115
20127
|
const i = cs((n || {}).ignore || []), o = R2(e);
|
|
20116
20128
|
let s = -1;
|
|
20117
20129
|
for (; ++s < o.length; )
|
|
20118
|
-
|
|
20130
|
+
qa(t, "text", l);
|
|
20119
20131
|
function l(c, u) {
|
|
20120
20132
|
let f = -1, d;
|
|
20121
20133
|
for (; ++f < u.length; ) {
|
|
@@ -20244,13 +20256,13 @@ function V2(t) {
|
|
|
20244
20256
|
O2(
|
|
20245
20257
|
t,
|
|
20246
20258
|
[
|
|
20247
|
-
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,
|
|
20248
|
-
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"),
|
|
20259
|
+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, q2],
|
|
20260
|
+
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), W2]
|
|
20249
20261
|
],
|
|
20250
20262
|
{ ignore: ["link", "linkReference"] }
|
|
20251
20263
|
);
|
|
20252
20264
|
}
|
|
20253
|
-
function
|
|
20265
|
+
function q2(t, e, n, r, i) {
|
|
20254
20266
|
let o = "";
|
|
20255
20267
|
if (!Pm(i) || (/^w/i.test(e) && (n = e + n, e = "", o = "http://"), !j2(n)))
|
|
20256
20268
|
return !1;
|
|
@@ -20264,7 +20276,7 @@ function W2(t, e, n, r, i) {
|
|
|
20264
20276
|
};
|
|
20265
20277
|
return s[1] ? [l, { type: "text", value: s[1] }] : l;
|
|
20266
20278
|
}
|
|
20267
|
-
function
|
|
20279
|
+
function W2(t, e, n, r) {
|
|
20268
20280
|
return (
|
|
20269
20281
|
// Not an expected previous character.
|
|
20270
20282
|
!Pm(r, !0) || // Label ends in not allowed character.
|
|
@@ -20635,8 +20647,8 @@ function wM(t) {
|
|
|
20635
20647
|
function xM() {
|
|
20636
20648
|
return {
|
|
20637
20649
|
exit: {
|
|
20638
|
-
taskListCheckValueChecked:
|
|
20639
|
-
taskListCheckValueUnchecked:
|
|
20650
|
+
taskListCheckValueChecked: qf,
|
|
20651
|
+
taskListCheckValueUnchecked: qf,
|
|
20640
20652
|
paragraph: SM
|
|
20641
20653
|
}
|
|
20642
20654
|
};
|
|
@@ -20647,7 +20659,7 @@ function CM() {
|
|
|
20647
20659
|
handlers: { listItem: TM }
|
|
20648
20660
|
};
|
|
20649
20661
|
}
|
|
20650
|
-
function
|
|
20662
|
+
function qf(t) {
|
|
20651
20663
|
const e = this.stack[this.stack.length - 2];
|
|
20652
20664
|
e.type, e.checked = t.type === "taskListCheckValueChecked";
|
|
20653
20665
|
}
|
|
@@ -20719,11 +20731,11 @@ const NM = {
|
|
|
20719
20731
|
}, EM = {
|
|
20720
20732
|
tokenize: zM,
|
|
20721
20733
|
partial: !0
|
|
20722
|
-
},
|
|
20734
|
+
}, qm = {
|
|
20723
20735
|
name: "wwwAutolink",
|
|
20724
20736
|
tokenize: OM,
|
|
20725
20737
|
previous: jm
|
|
20726
|
-
},
|
|
20738
|
+
}, Wm = {
|
|
20727
20739
|
name: "protocolAutolink",
|
|
20728
20740
|
tokenize: RM,
|
|
20729
20741
|
previous: Um
|
|
@@ -20744,10 +20756,10 @@ Qt[43] = gn;
|
|
|
20744
20756
|
Qt[45] = gn;
|
|
20745
20757
|
Qt[46] = gn;
|
|
20746
20758
|
Qt[95] = gn;
|
|
20747
|
-
Qt[72] = [gn,
|
|
20748
|
-
Qt[104] = [gn,
|
|
20749
|
-
Qt[87] = [gn,
|
|
20750
|
-
Qt[119] = [gn,
|
|
20759
|
+
Qt[72] = [gn, Wm];
|
|
20760
|
+
Qt[104] = [gn, Wm];
|
|
20761
|
+
Qt[87] = [gn, qm];
|
|
20762
|
+
Qt[119] = [gn, qm];
|
|
20751
20763
|
function vM(t, e, n) {
|
|
20752
20764
|
const r = this;
|
|
20753
20765
|
let i, o;
|
|
@@ -20765,7 +20777,7 @@ function vM(t, e, n) {
|
|
|
20765
20777
|
return t.consume(f), i = !0, a;
|
|
20766
20778
|
}
|
|
20767
20779
|
function u(f) {
|
|
20768
|
-
return o && i &&
|
|
20780
|
+
return o && i && qe(r.previous) ? (t.exit("literalAutolinkEmail"), t.exit("literalAutolink"), e(f)) : n(f);
|
|
20769
20781
|
}
|
|
20770
20782
|
}
|
|
20771
20783
|
function OM(t, e, n) {
|
|
@@ -20786,7 +20798,7 @@ function RM(t, e, n) {
|
|
|
20786
20798
|
return (f === 72 || f === 104) && Um.call(r, r.previous) && !Sc(r.events) ? (t.enter("literalAutolink"), t.enter("literalAutolinkHttp"), i += String.fromCodePoint(f), t.consume(f), l) : n(f);
|
|
20787
20799
|
}
|
|
20788
20800
|
function l(f) {
|
|
20789
|
-
if (
|
|
20801
|
+
if (qe(f) && i.length < 5)
|
|
20790
20802
|
return i += String.fromCodePoint(f), t.consume(f), l;
|
|
20791
20803
|
if (f === 58) {
|
|
20792
20804
|
const d = i.toLowerCase();
|
|
@@ -20851,10 +20863,10 @@ function PM(t, e, n) {
|
|
|
20851
20863
|
return l === null || l === 40 || l === 91 || de(l) || lr(l) ? e(l) : r(l);
|
|
20852
20864
|
}
|
|
20853
20865
|
function o(l) {
|
|
20854
|
-
return
|
|
20866
|
+
return qe(l) ? s(l) : n(l);
|
|
20855
20867
|
}
|
|
20856
20868
|
function s(l) {
|
|
20857
|
-
return l === 59 ? (t.consume(l), r) :
|
|
20869
|
+
return l === 59 ? (t.consume(l), r) : qe(l) ? (t.consume(l), s) : n(l);
|
|
20858
20870
|
}
|
|
20859
20871
|
}
|
|
20860
20872
|
function zM(t, e, n) {
|
|
@@ -20870,7 +20882,7 @@ function jm(t) {
|
|
|
20870
20882
|
return t === null || t === 40 || t === 42 || t === 95 || t === 91 || t === 93 || t === 126 || de(t);
|
|
20871
20883
|
}
|
|
20872
20884
|
function Um(t) {
|
|
20873
|
-
return !
|
|
20885
|
+
return !qe(t);
|
|
20874
20886
|
}
|
|
20875
20887
|
function Km(t) {
|
|
20876
20888
|
return !(t === 47 || za(t));
|
|
@@ -20902,9 +20914,9 @@ function FM() {
|
|
|
20902
20914
|
document: {
|
|
20903
20915
|
91: {
|
|
20904
20916
|
name: "gfmFootnoteDefinition",
|
|
20905
|
-
tokenize:
|
|
20917
|
+
tokenize: qM,
|
|
20906
20918
|
continuation: {
|
|
20907
|
-
tokenize:
|
|
20919
|
+
tokenize: WM
|
|
20908
20920
|
},
|
|
20909
20921
|
exit: jM
|
|
20910
20922
|
}
|
|
@@ -21028,7 +21040,7 @@ function VM(t, e, n) {
|
|
|
21028
21040
|
return f === 91 || f === 92 || f === 93 ? (t.consume(f), o++, c) : c(f);
|
|
21029
21041
|
}
|
|
21030
21042
|
}
|
|
21031
|
-
function
|
|
21043
|
+
function qM(t, e, n) {
|
|
21032
21044
|
const r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
|
|
21033
21045
|
let o, s = 0, l;
|
|
21034
21046
|
return a;
|
|
@@ -21064,7 +21076,7 @@ function WM(t, e, n) {
|
|
|
21064
21076
|
return e(p);
|
|
21065
21077
|
}
|
|
21066
21078
|
}
|
|
21067
|
-
function
|
|
21079
|
+
function WM(t, e, n) {
|
|
21068
21080
|
return t.check(ji, e, t.attempt(BM, e, n));
|
|
21069
21081
|
}
|
|
21070
21082
|
function jM(t) {
|
|
@@ -21313,7 +21325,7 @@ function ZM(t, e) {
|
|
|
21313
21325
|
const d = new JM();
|
|
21314
21326
|
for (; ++n < t.length; ) {
|
|
21315
21327
|
const h = t[n], p = h[1];
|
|
21316
|
-
h[0] === "enter" ? p.type === "tableHead" ? (l = !1, a !== 0 && (
|
|
21328
|
+
h[0] === "enter" ? p.type === "tableHead" ? (l = !1, a !== 0 && (Wf(d, e, a, c, u), u = void 0, a = 0), c = {
|
|
21317
21329
|
type: "table",
|
|
21318
21330
|
start: Object.assign({}, p.start),
|
|
21319
21331
|
// Note: correct end is set later.
|
|
@@ -21325,7 +21337,7 @@ function ZM(t, e) {
|
|
|
21325
21337
|
end: Object.assign({}, p.end)
|
|
21326
21338
|
}, d.add(n, 0, [["enter", u, e]])), i = p.type === "tableDelimiterRow" ? 2 : u ? 3 : 1) : i && (p.type === "data" || p.type === "tableDelimiterMarker" || p.type === "tableDelimiterFiller") ? (r = !1, s[2] === 0 && (o[1] !== 0 && (s[0] = s[1], f = ko(d, e, o, i, void 0, f), o = [0, 0, 0, 0]), s[2] = n)) : p.type === "tableCellDivider" && (r ? r = !1 : (o[1] !== 0 && (s[0] = s[1], f = ko(d, e, o, i, void 0, f)), o = s, s = [o[1], n, 0, 0])) : p.type === "tableHead" ? (l = !0, a = n) : p.type === "tableRow" || p.type === "tableDelimiterRow" ? (a = n, o[1] !== 0 ? (s[0] = s[1], f = ko(d, e, o, i, n, f)) : s[1] !== 0 && (f = ko(d, e, s, i, n, f)), i = 0) : i && (p.type === "data" || p.type === "tableDelimiterMarker" || p.type === "tableDelimiterFiller") && (s[3] = n);
|
|
21327
21339
|
}
|
|
21328
|
-
for (a !== 0 &&
|
|
21340
|
+
for (a !== 0 && Wf(d, e, a, c, u), d.consume(e.events), n = -1; ++n < e.events.length; ) {
|
|
21329
21341
|
const h = e.events[n];
|
|
21330
21342
|
h[0] === "enter" && h[1].type === "table" && (h[1]._align = YM(e.events, n));
|
|
21331
21343
|
}
|
|
@@ -21357,7 +21369,7 @@ function ko(t, e, n, r, i, o) {
|
|
|
21357
21369
|
}
|
|
21358
21370
|
return i !== void 0 && (o.end = Object.assign({}, Er(e.events, i)), t.add(i, 0, [["exit", o, e]]), o = void 0), o;
|
|
21359
21371
|
}
|
|
21360
|
-
function
|
|
21372
|
+
function Wf(t, e, n, r, i) {
|
|
21361
21373
|
const o = [], s = Er(e.events, n);
|
|
21362
21374
|
i && (i.end = Object.assign({}, s), o.push(["exit", i, e])), r.end = Object.assign({}, s), o.push(["exit", r, e]), t.add(n + 1, 0, o);
|
|
21363
21375
|
}
|
|
@@ -21691,7 +21703,7 @@ function Qm(t) {
|
|
|
21691
21703
|
l ? 0 : e,
|
|
21692
21704
|
s.node
|
|
21693
21705
|
), h = r.doc.resolve(s.from + d);
|
|
21694
|
-
return
|
|
21706
|
+
return qh(
|
|
21695
21707
|
r.setSelection(
|
|
21696
21708
|
f(u, h)
|
|
21697
21709
|
)
|
|
@@ -21729,7 +21741,7 @@ function fA(t) {
|
|
|
21729
21741
|
const n = t.doc.resolve(e[0].pos), r = e[e.length - 1];
|
|
21730
21742
|
if (r) {
|
|
21731
21743
|
const i = t.doc.resolve(r.pos);
|
|
21732
|
-
return
|
|
21744
|
+
return qh(t.setSelection(new he(i, n)));
|
|
21733
21745
|
}
|
|
21734
21746
|
}
|
|
21735
21747
|
return t;
|
|
@@ -21851,7 +21863,7 @@ V(og, {
|
|
|
21851
21863
|
});
|
|
21852
21864
|
const sg = ee(
|
|
21853
21865
|
"AddColBefore",
|
|
21854
|
-
() => () =>
|
|
21866
|
+
() => () => qT
|
|
21855
21867
|
);
|
|
21856
21868
|
V(sg, {
|
|
21857
21869
|
displayName: "Command<addColBeforeCommand>",
|
|
@@ -21859,7 +21871,7 @@ V(sg, {
|
|
|
21859
21871
|
});
|
|
21860
21872
|
const lg = ee(
|
|
21861
21873
|
"AddColAfter",
|
|
21862
|
-
() => () =>
|
|
21874
|
+
() => () => WT
|
|
21863
21875
|
);
|
|
21864
21876
|
V(lg, {
|
|
21865
21877
|
displayName: "Command<addColAfterCommand>",
|
|
@@ -22358,7 +22370,7 @@ function ci(t, e) {
|
|
|
22358
22370
|
}
|
|
22359
22371
|
return n;
|
|
22360
22372
|
}
|
|
22361
|
-
const Gf = Ue(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), $l = Ue(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vl = Ue(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), DA = Ue(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]),
|
|
22373
|
+
const Gf = Ue(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), $l = Ue(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vl = Ue(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), DA = Ue(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ql = Ue(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), _A = Ue(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Yf = Ue(["#text"]), Xf = Ue(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Wl = Ue(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Qf = Ue(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), wo = Ue(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), LA = Tt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), PA = Tt(/<%[\w\W]*|[\w\W]*%>/gm), zA = Tt(/\$\{[\w\W]*/gm), BA = Tt(/^data-[\-\w.\u00B7-\uFFFF]+$/), FA = Tt(/^aria-[\-\w]+$/), bg = Tt(
|
|
22362
22374
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
22363
22375
|
// eslint-disable-line no-useless-escape
|
|
22364
22376
|
), HA = Tt(/^(?:\w+script|data):/i), $A = Tt(
|
|
@@ -22385,9 +22397,9 @@ const ui = {
|
|
|
22385
22397
|
progressingInstruction: 7,
|
|
22386
22398
|
comment: 8,
|
|
22387
22399
|
document: 9
|
|
22388
|
-
},
|
|
22400
|
+
}, qA = function() {
|
|
22389
22401
|
return typeof window > "u" ? null : window;
|
|
22390
|
-
},
|
|
22402
|
+
}, WA = function(e, n) {
|
|
22391
22403
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
22392
22404
|
return null;
|
|
22393
22405
|
let r = null;
|
|
@@ -22420,7 +22432,7 @@ const ui = {
|
|
|
22420
22432
|
};
|
|
22421
22433
|
};
|
|
22422
22434
|
function xg() {
|
|
22423
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
22435
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qA();
|
|
22424
22436
|
const e = (F) => xg(F);
|
|
22425
22437
|
if (e.version = "3.2.6", e.removed = [], !t || !t.document || t.document.nodeType !== ui.document || !t.Element)
|
|
22426
22438
|
return e.isSupported = !1, e;
|
|
@@ -22457,7 +22469,7 @@ function xg() {
|
|
|
22457
22469
|
MUSTACHE_EXPR: M,
|
|
22458
22470
|
ERB_EXPR: H,
|
|
22459
22471
|
TMPLIT_EXPR: K,
|
|
22460
|
-
DATA_ATTR:
|
|
22472
|
+
DATA_ATTR: q,
|
|
22461
22473
|
ARIA_ATTR: pe,
|
|
22462
22474
|
IS_SCRIPT_OR_DATA: ue,
|
|
22463
22475
|
ATTR_WHITESPACE: ce,
|
|
@@ -22466,9 +22478,9 @@ function xg() {
|
|
|
22466
22478
|
let {
|
|
22467
22479
|
IS_ALLOWED_URI: b
|
|
22468
22480
|
} = Zf, X = null;
|
|
22469
|
-
const De = Q({}, [...Gf, ...$l, ...Vl, ...
|
|
22481
|
+
const De = Q({}, [...Gf, ...$l, ...Vl, ...ql, ...Yf]);
|
|
22470
22482
|
let k = null;
|
|
22471
|
-
const Ce = Q({}, [...Xf, ...
|
|
22483
|
+
const Ce = Q({}, [...Xf, ...Wl, ...Qf, ...wo]);
|
|
22472
22484
|
let ie = Object.seal(kg(null, {
|
|
22473
22485
|
tagNameCheck: {
|
|
22474
22486
|
writable: !0,
|
|
@@ -22488,11 +22500,11 @@ function xg() {
|
|
|
22488
22500
|
enumerable: !0,
|
|
22489
22501
|
value: !1
|
|
22490
22502
|
}
|
|
22491
|
-
})), fe = null, Nt = null, it = !0, ot = !0, Je = !1, zt = !0, Et = !1, kn = !0, It = !1, gr = !1, yr = !1, Zt = !1, kr = !1,
|
|
22503
|
+
})), fe = null, Nt = null, it = !0, ot = !0, Je = !1, zt = !0, Et = !1, kn = !0, It = !1, gr = !1, yr = !1, Zt = !1, kr = !1, qn = !1, Qr = !0, io = !1;
|
|
22492
22504
|
const Fs = "user-content-";
|
|
22493
|
-
let Zr = !0,
|
|
22505
|
+
let Zr = !0, Wn = !1, bn = {}, N = null;
|
|
22494
22506
|
const _ = Q({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
22495
|
-
let
|
|
22507
|
+
let W = null;
|
|
22496
22508
|
const G = Q({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
22497
22509
|
let se = null;
|
|
22498
22510
|
const Ge = Q({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), mt = "http://www.w3.org/1998/Math/MathML", Ye = "http://www.w3.org/2000/svg", $e = "http://www.w3.org/1999/xhtml";
|
|
@@ -22509,17 +22521,17 @@ function xg() {
|
|
|
22509
22521
|
let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22510
22522
|
if (!(br && br === w)) {
|
|
22511
22523
|
if ((!w || typeof w != "object") && (w = {}), w = ln(w), ei = // eslint-disable-next-line unicorn/prefer-includes
|
|
22512
|
-
Kg.indexOf(w.PARSER_MEDIA_TYPE) === -1 ? Jg : w.PARSER_MEDIA_TYPE, Me = ei === "application/xhtml+xml" ? Hl : Ho, X = Ot(w, "ALLOWED_TAGS") ? Q({}, w.ALLOWED_TAGS, Me) : De, k = Ot(w, "ALLOWED_ATTR") ? Q({}, w.ALLOWED_ATTR, Me) : Ce, Bt = Ot(w, "ALLOWED_NAMESPACES") ? Q({}, w.ALLOWED_NAMESPACES, Hl) : vt, se = Ot(w, "ADD_URI_SAFE_ATTR") ? Q(ln(Ge), w.ADD_URI_SAFE_ATTR, Me) : Ge,
|
|
22524
|
+
Kg.indexOf(w.PARSER_MEDIA_TYPE) === -1 ? Jg : w.PARSER_MEDIA_TYPE, Me = ei === "application/xhtml+xml" ? Hl : Ho, X = Ot(w, "ALLOWED_TAGS") ? Q({}, w.ALLOWED_TAGS, Me) : De, k = Ot(w, "ALLOWED_ATTR") ? Q({}, w.ALLOWED_ATTR, Me) : Ce, Bt = Ot(w, "ALLOWED_NAMESPACES") ? Q({}, w.ALLOWED_NAMESPACES, Hl) : vt, se = Ot(w, "ADD_URI_SAFE_ATTR") ? Q(ln(Ge), w.ADD_URI_SAFE_ATTR, Me) : Ge, W = Ot(w, "ADD_DATA_URI_TAGS") ? Q(ln(G), w.ADD_DATA_URI_TAGS, Me) : G, N = Ot(w, "FORBID_CONTENTS") ? Q({}, w.FORBID_CONTENTS, Me) : _, fe = Ot(w, "FORBID_TAGS") ? Q({}, w.FORBID_TAGS, Me) : ln({}), Nt = Ot(w, "FORBID_ATTR") ? Q({}, w.FORBID_ATTR, Me) : ln({}), bn = Ot(w, "USE_PROFILES") ? w.USE_PROFILES : !1, it = w.ALLOW_ARIA_ATTR !== !1, ot = w.ALLOW_DATA_ATTR !== !1, Je = w.ALLOW_UNKNOWN_PROTOCOLS || !1, zt = w.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Et = w.SAFE_FOR_TEMPLATES || !1, kn = w.SAFE_FOR_XML !== !1, It = w.WHOLE_DOCUMENT || !1, Zt = w.RETURN_DOM || !1, kr = w.RETURN_DOM_FRAGMENT || !1, qn = w.RETURN_TRUSTED_TYPE || !1, yr = w.FORCE_BODY || !1, Qr = w.SANITIZE_DOM !== !1, io = w.SANITIZE_NAMED_PROPS || !1, Zr = w.KEEP_CONTENT !== !1, Wn = w.IN_PLACE || !1, b = w.ALLOWED_URI_REGEXP || bg, gt = w.NAMESPACE || $e, oo = w.MATHML_TEXT_INTEGRATION_POINTS || oo, so = w.HTML_INTEGRATION_POINTS || so, ie = w.CUSTOM_ELEMENT_HANDLING || {}, w.CUSTOM_ELEMENT_HANDLING && Rc(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (ie.tagNameCheck = w.CUSTOM_ELEMENT_HANDLING.tagNameCheck), w.CUSTOM_ELEMENT_HANDLING && Rc(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (ie.attributeNameCheck = w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), w.CUSTOM_ELEMENT_HANDLING && typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (ie.allowCustomizedBuiltInElements = w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Et && (ot = !1), kr && (Zt = !0), bn && (X = Q({}, Yf), k = [], bn.html === !0 && (Q(X, Gf), Q(k, Xf)), bn.svg === !0 && (Q(X, $l), Q(k, Wl), Q(k, wo)), bn.svgFilters === !0 && (Q(X, Vl), Q(k, Wl), Q(k, wo)), bn.mathMl === !0 && (Q(X, ql), Q(k, Qf), Q(k, wo))), w.ADD_TAGS && (X === De && (X = ln(X)), Q(X, w.ADD_TAGS, Me)), w.ADD_ATTR && (k === Ce && (k = ln(k)), Q(k, w.ADD_ATTR, Me)), w.ADD_URI_SAFE_ATTR && Q(se, w.ADD_URI_SAFE_ATTR, Me), w.FORBID_CONTENTS && (N === _ && (N = ln(N)), Q(N, w.FORBID_CONTENTS, Me)), Zr && (X["#text"] = !0), It && Q(X, ["html", "head", "body"]), X.table && (Q(X, ["tbody"]), delete fe.tbody), w.TRUSTED_TYPES_POLICY) {
|
|
22513
22525
|
if (typeof w.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
22514
22526
|
throw ai('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
22515
22527
|
if (typeof w.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
22516
22528
|
throw ai('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
22517
22529
|
I = w.TRUSTED_TYPES_POLICY, v = I.createHTML("");
|
|
22518
22530
|
} else
|
|
22519
|
-
I === void 0 && (I =
|
|
22531
|
+
I === void 0 && (I = WA(h, i)), I !== null && typeof v == "string" && (v = I.createHTML(""));
|
|
22520
22532
|
Ue && Ue(w), br = w;
|
|
22521
22533
|
}
|
|
22522
|
-
}, Dc = Q({}, [...$l, ...Vl, ...DA]), _c = Q({}, [...
|
|
22534
|
+
}, Dc = Q({}, [...$l, ...Vl, ...DA]), _c = Q({}, [...ql, ..._A]), Yg = function(w) {
|
|
22523
22535
|
let D = C(w);
|
|
22524
22536
|
(!D || !D.tagName) && (D = {
|
|
22525
22537
|
namespaceURI: gt,
|
|
@@ -22634,7 +22646,7 @@ function xg() {
|
|
|
22634
22646
|
}, Fc = function(w, D, B) {
|
|
22635
22647
|
if (Qr && (D === "id" || D === "name") && (B in n || B in Gg))
|
|
22636
22648
|
return !1;
|
|
22637
|
-
if (!(ot && !Nt[D] && Ve(
|
|
22649
|
+
if (!(ot && !Nt[D] && Ve(q, D))) {
|
|
22638
22650
|
if (!(it && Ve(pe, D))) {
|
|
22639
22651
|
if (!k[D] || Nt[D]) {
|
|
22640
22652
|
if (
|
|
@@ -22647,7 +22659,7 @@ function xg() {
|
|
|
22647
22659
|
) return !1;
|
|
22648
22660
|
} else if (!se[D]) {
|
|
22649
22661
|
if (!Ve(b, li(B, ce, ""))) {
|
|
22650
|
-
if (!((D === "src" || D === "xlink:href" || D === "href") && w !== "script" && IA(B, "data:") === 0 &&
|
|
22662
|
+
if (!((D === "src" || D === "xlink:href" || D === "href") && w !== "script" && IA(B, "data:") === 0 && W[w])) {
|
|
22651
22663
|
if (!(Je && !Ve(ue, li(B, ce, "")))) {
|
|
22652
22664
|
if (B)
|
|
22653
22665
|
return !1;
|
|
@@ -22696,8 +22708,8 @@ function xg() {
|
|
|
22696
22708
|
wr(Se, w);
|
|
22697
22709
|
continue;
|
|
22698
22710
|
}
|
|
22699
|
-
Et && bo([M, H, K], (
|
|
22700
|
-
Le = li(Le,
|
|
22711
|
+
Et && bo([M, H, K], (qc) => {
|
|
22712
|
+
Le = li(Le, qc, " ");
|
|
22701
22713
|
});
|
|
22702
22714
|
const Vc = Me(w.nodeName);
|
|
22703
22715
|
if (!Fc(Vc, ti, Le)) {
|
|
@@ -22740,7 +22752,7 @@ function xg() {
|
|
|
22740
22752
|
throw ai("toString is not a function");
|
|
22741
22753
|
if (!e.isSupported)
|
|
22742
22754
|
return F;
|
|
22743
|
-
if (gr || Hs(w), e.removed = [], typeof F == "string" && (
|
|
22755
|
+
if (gr || Hs(w), e.removed = [], typeof F == "string" && (Wn = !1), Wn) {
|
|
22744
22756
|
if (F.nodeName) {
|
|
22745
22757
|
const tn = Me(F.nodeName);
|
|
22746
22758
|
if (!X[tn] || fe[tn])
|
|
@@ -22751,15 +22763,15 @@ function xg() {
|
|
|
22751
22763
|
else {
|
|
22752
22764
|
if (!Zt && !Et && !It && // eslint-disable-next-line unicorn/prefer-includes
|
|
22753
22765
|
F.indexOf("<") === -1)
|
|
22754
|
-
return I &&
|
|
22766
|
+
return I && qn ? I.createHTML(F) : F;
|
|
22755
22767
|
if (D = Lc(F), !D)
|
|
22756
|
-
return Zt ? null :
|
|
22768
|
+
return Zt ? null : qn ? v : "";
|
|
22757
22769
|
}
|
|
22758
22770
|
D && yr && Ft(D.firstChild);
|
|
22759
|
-
const Se = Pc(
|
|
22771
|
+
const Se = Pc(Wn ? F : D);
|
|
22760
22772
|
for (; ye = Se.nextNode(); )
|
|
22761
22773
|
Bc(ye), $c(ye), ye.content instanceof o && Xg(ye.content);
|
|
22762
|
-
if (
|
|
22774
|
+
if (Wn)
|
|
22763
22775
|
return F;
|
|
22764
22776
|
if (Zt) {
|
|
22765
22777
|
if (kr)
|
|
@@ -22773,7 +22785,7 @@ function xg() {
|
|
|
22773
22785
|
return It && X["!doctype"] && D.ownerDocument && D.ownerDocument.doctype && D.ownerDocument.doctype.name && Ve(wg, D.ownerDocument.doctype.name) && (Xe = "<!DOCTYPE " + D.ownerDocument.doctype.name + `>
|
|
22774
22786
|
` + Xe), Et && bo([M, H, K], (tn) => {
|
|
22775
22787
|
Xe = li(Xe, tn, " ");
|
|
22776
|
-
}), I &&
|
|
22788
|
+
}), I && qn ? I.createHTML(Xe) : Xe;
|
|
22777
22789
|
}, e.setConfig = function() {
|
|
22778
22790
|
let F = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22779
22791
|
Hs(F), gr = !0;
|
|
@@ -23124,7 +23136,7 @@ function Nc(t) {
|
|
|
23124
23136
|
}
|
|
23125
23137
|
function uN(t) {
|
|
23126
23138
|
let e = zn(t);
|
|
23127
|
-
for (; Gt(e) && !
|
|
23139
|
+
for (; Gt(e) && !qr(e); ) {
|
|
23128
23140
|
if (Nc(e))
|
|
23129
23141
|
return e;
|
|
23130
23142
|
if (_s(e))
|
|
@@ -23137,7 +23149,7 @@ function Ec() {
|
|
|
23137
23149
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
23138
23150
|
}
|
|
23139
23151
|
const fN = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
23140
|
-
function
|
|
23152
|
+
function qr(t) {
|
|
23141
23153
|
return fN.has(Xr(t));
|
|
23142
23154
|
}
|
|
23143
23155
|
function _t(t) {
|
|
@@ -23166,7 +23178,7 @@ function zn(t) {
|
|
|
23166
23178
|
}
|
|
23167
23179
|
function Mg(t) {
|
|
23168
23180
|
const e = zn(t);
|
|
23169
|
-
return
|
|
23181
|
+
return qr(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Gt(e) && ro(e) ? e : Mg(e);
|
|
23170
23182
|
}
|
|
23171
23183
|
function Ag(t, e, n) {
|
|
23172
23184
|
var r;
|
|
@@ -23216,7 +23228,7 @@ function Ig(t) {
|
|
|
23216
23228
|
function hN(t, e, n) {
|
|
23217
23229
|
return e === void 0 && (e = !1), !n || e && n !== ft(t) ? !1 : e;
|
|
23218
23230
|
}
|
|
23219
|
-
function
|
|
23231
|
+
function Wi(t, e, n, r) {
|
|
23220
23232
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
23221
23233
|
const i = t.getBoundingClientRect(), o = Eg(t);
|
|
23222
23234
|
let s = Ut(1);
|
|
@@ -23240,7 +23252,7 @@ function qi(t, e, n, r) {
|
|
|
23240
23252
|
}
|
|
23241
23253
|
function Ps(t, e) {
|
|
23242
23254
|
const n = Ls(t).scrollLeft;
|
|
23243
|
-
return e ? e.left + n :
|
|
23255
|
+
return e ? e.left + n : Wi(yn(t)).left + n;
|
|
23244
23256
|
}
|
|
23245
23257
|
function vg(t, e) {
|
|
23246
23258
|
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Ps(t, n), i = n.top + e.scrollTop;
|
|
@@ -23265,7 +23277,7 @@ function pN(t) {
|
|
|
23265
23277
|
}, c = Ut(1);
|
|
23266
23278
|
const u = Ut(0), f = Gt(r);
|
|
23267
23279
|
if ((f || !f && !o) && ((Xr(r) !== "body" || ro(s)) && (a = Ls(r)), Gt(r))) {
|
|
23268
|
-
const h =
|
|
23280
|
+
const h = Wi(r);
|
|
23269
23281
|
c = Lr(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
|
|
23270
23282
|
}
|
|
23271
23283
|
const d = s && !f && !o ? vg(s, a) : Ut(0);
|
|
@@ -23313,7 +23325,7 @@ function yN(t, e) {
|
|
|
23313
23325
|
}
|
|
23314
23326
|
const kN = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
23315
23327
|
function bN(t, e) {
|
|
23316
|
-
const n =
|
|
23328
|
+
const n = Wi(t, !0, e === "fixed"), r = n.top + t.clientTop, i = n.left + t.clientLeft, o = Gt(t) ? Lr(t) : Ut(1), s = t.clientWidth * o.x, l = t.clientHeight * o.y, a = i * o.x, c = r * o.y;
|
|
23317
23329
|
return {
|
|
23318
23330
|
width: s,
|
|
23319
23331
|
height: l,
|
|
@@ -23342,7 +23354,7 @@ function od(t, e, n) {
|
|
|
23342
23354
|
}
|
|
23343
23355
|
function Og(t, e) {
|
|
23344
23356
|
const n = zn(t);
|
|
23345
|
-
return n === e || !Dt(n) ||
|
|
23357
|
+
return n === e || !Dt(n) || qr(n) ? !1 : _t(n).position === "fixed" || Og(n, e);
|
|
23346
23358
|
}
|
|
23347
23359
|
function wN(t, e) {
|
|
23348
23360
|
const n = e.get(t);
|
|
@@ -23351,7 +23363,7 @@ function wN(t, e) {
|
|
|
23351
23363
|
let r = Ag(t, []).filter((l) => Dt(l) && Xr(l) !== "body"), i = null;
|
|
23352
23364
|
const o = _t(t).position === "fixed";
|
|
23353
23365
|
let s = o ? zn(t) : t;
|
|
23354
|
-
for (; Dt(s) && !
|
|
23366
|
+
for (; Dt(s) && !qr(s); ) {
|
|
23355
23367
|
const l = _t(s), a = Nc(s);
|
|
23356
23368
|
!a && l.position === "fixed" && (i = null), (o ? !a && !i : !a && l.position === "static" && !!i && kN.has(i.position) || ro(s) && !a && Og(t, s)) ? r = r.filter((u) => u !== s) : i = l, s = zn(s);
|
|
23357
23369
|
}
|
|
@@ -23386,7 +23398,7 @@ function CN(t) {
|
|
|
23386
23398
|
};
|
|
23387
23399
|
}
|
|
23388
23400
|
function SN(t, e, n) {
|
|
23389
|
-
const r = Gt(e), i = yn(e), o = n === "fixed", s =
|
|
23401
|
+
const r = Gt(e), i = yn(e), o = n === "fixed", s = Wi(t, !0, o, e);
|
|
23390
23402
|
let l = {
|
|
23391
23403
|
scrollLeft: 0,
|
|
23392
23404
|
scrollTop: 0
|
|
@@ -23397,7 +23409,7 @@ function SN(t, e, n) {
|
|
|
23397
23409
|
}
|
|
23398
23410
|
if (r || !r && !o)
|
|
23399
23411
|
if ((Xr(e) !== "body" || ro(i)) && (l = Ls(e)), r) {
|
|
23400
|
-
const h =
|
|
23412
|
+
const h = Wi(e, !0, o, e);
|
|
23401
23413
|
a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
|
|
23402
23414
|
} else i && c();
|
|
23403
23415
|
o && !r && i && c();
|
|
@@ -23426,7 +23438,7 @@ function Rg(t, e) {
|
|
|
23426
23438
|
return n;
|
|
23427
23439
|
if (!Gt(t)) {
|
|
23428
23440
|
let i = zn(t);
|
|
23429
|
-
for (; i && !
|
|
23441
|
+
for (; i && !qr(i); ) {
|
|
23430
23442
|
if (Dt(i) && !jl(i))
|
|
23431
23443
|
return i;
|
|
23432
23444
|
i = zn(i);
|
|
@@ -23436,7 +23448,7 @@ function Rg(t, e) {
|
|
|
23436
23448
|
let r = sd(t, e);
|
|
23437
23449
|
for (; r && oN(r) && jl(r); )
|
|
23438
23450
|
r = sd(r, e);
|
|
23439
|
-
return r &&
|
|
23451
|
+
return r && qr(r) && jl(r) && !Nc(r) ? n : r || uN(t) || n;
|
|
23440
23452
|
}
|
|
23441
23453
|
const TN = async function(t) {
|
|
23442
23454
|
const e = this.getOffsetParent || Rg, n = this.getDimensions, r = await n(t.floating);
|
|
@@ -23464,7 +23476,7 @@ const AN = {
|
|
|
23464
23476
|
getScale: Lr,
|
|
23465
23477
|
isElement: Dt,
|
|
23466
23478
|
isRTL: MN
|
|
23467
|
-
}, ss = nN,
|
|
23479
|
+
}, ss = nN, Wr = (t, e, n) => {
|
|
23468
23480
|
const r = /* @__PURE__ */ new Map(), i = {
|
|
23469
23481
|
platform: AN,
|
|
23470
23482
|
...n
|
|
@@ -23509,9 +23521,9 @@ function VN(t) {
|
|
|
23509
23521
|
;
|
|
23510
23522
|
return e;
|
|
23511
23523
|
}
|
|
23512
|
-
var
|
|
23513
|
-
function
|
|
23514
|
-
return t && t.slice(0, VN(t) + 1).replace(
|
|
23524
|
+
var qN = /^\s+/;
|
|
23525
|
+
function WN(t) {
|
|
23526
|
+
return t && t.slice(0, VN(t) + 1).replace(qN, "");
|
|
23515
23527
|
}
|
|
23516
23528
|
function as(t) {
|
|
23517
23529
|
var e = typeof t;
|
|
@@ -23529,7 +23541,7 @@ function cd(t) {
|
|
|
23529
23541
|
}
|
|
23530
23542
|
if (typeof t != "string")
|
|
23531
23543
|
return t === 0 ? t : +t;
|
|
23532
|
-
t =
|
|
23544
|
+
t = WN(t);
|
|
23533
23545
|
var n = UN.test(t);
|
|
23534
23546
|
return n || KN.test(t) ? JN(t.slice(2), n ? 2 : 8) : jN.test(t) ? ad : +t;
|
|
23535
23547
|
}
|
|
@@ -23648,7 +23660,7 @@ Pg(zs, {
|
|
|
23648
23660
|
displayName: "Config<table-block>",
|
|
23649
23661
|
group: "TableBlock"
|
|
23650
23662
|
});
|
|
23651
|
-
function
|
|
23663
|
+
function qt({ icon: t, class: e, onClick: n }) {
|
|
23652
23664
|
return /* @__PURE__ */ le(
|
|
23653
23665
|
"span",
|
|
23654
23666
|
{
|
|
@@ -23658,7 +23670,7 @@ function Wt({ icon: t, class: e, onClick: n }) {
|
|
|
23658
23670
|
}
|
|
23659
23671
|
);
|
|
23660
23672
|
}
|
|
23661
|
-
|
|
23673
|
+
qt.props = {
|
|
23662
23674
|
icon: {
|
|
23663
23675
|
type: String,
|
|
23664
23676
|
required: !1
|
|
@@ -23878,7 +23890,7 @@ function Ic({
|
|
|
23878
23890
|
const a = Bs(i, e);
|
|
23879
23891
|
if (!a) return;
|
|
23880
23892
|
const { headerCol: c } = a;
|
|
23881
|
-
l.dataset.show = "true", n && n(l),
|
|
23893
|
+
l.dataset.show = "true", n && n(l), Wr(c, l, { placement: "top" }).then(({ x: u, y: f }) => {
|
|
23882
23894
|
Object.assign(l.style, {
|
|
23883
23895
|
left: `${u}px`,
|
|
23884
23896
|
top: `${f}px`
|
|
@@ -23897,7 +23909,7 @@ function vc({
|
|
|
23897
23909
|
const a = Bs(i, e);
|
|
23898
23910
|
if (!a) return;
|
|
23899
23911
|
const { row: c } = a;
|
|
23900
|
-
l.dataset.show = "true", n && n(l),
|
|
23912
|
+
l.dataset.show = "true", n && n(l), Wr(c, l, { placement: "left" }).then(({ x: u, y: f }) => {
|
|
23901
23913
|
Object.assign(l.style, {
|
|
23902
23914
|
left: `${u}px`,
|
|
23903
23915
|
top: `${f}px`
|
|
@@ -23940,7 +23952,7 @@ function mE(t) {
|
|
|
23940
23952
|
const R = hE(o, e.clientX);
|
|
23941
23953
|
if (R) {
|
|
23942
23954
|
const [P, z] = R, T = l.getBoundingClientRect().width, S = i.getBoundingClientRect();
|
|
23943
|
-
d.endIndex = z,
|
|
23955
|
+
d.endIndex = z, Wr(P, l, {
|
|
23944
23956
|
placement: v === "left" ? "left" : "right",
|
|
23945
23957
|
middleware: [ss(v === "left" ? -1 * T : 0)]
|
|
23946
23958
|
}).then(({ x: M }) => {
|
|
@@ -23957,7 +23969,7 @@ function mE(t) {
|
|
|
23957
23969
|
const P = pE(o, e.clientY);
|
|
23958
23970
|
if (P) {
|
|
23959
23971
|
const [z, T] = P, S = s.getBoundingClientRect().height, M = i.getBoundingClientRect();
|
|
23960
|
-
d.endIndex = T,
|
|
23972
|
+
d.endIndex = T, Wr(z, s, {
|
|
23961
23973
|
placement: x === "up" ? "top" : "bottom",
|
|
23962
23974
|
middleware: [ss(x === "up" ? -1 * S : 0)]
|
|
23963
23975
|
}).then(({ y: H }) => {
|
|
@@ -24119,7 +24131,7 @@ function kE(t, e) {
|
|
|
24119
24131
|
const S = d.getBoundingClientRect();
|
|
24120
24132
|
h.dataset.show = "false", p.dataset.show = "false", f.dataset.displayType = "tool", u.dataset.displayType = "tool";
|
|
24121
24133
|
const M = u.getBoundingClientRect().width, H = f.getBoundingClientRect().height;
|
|
24122
|
-
I || v ? (c.value[1] = I ? A : A + 1,
|
|
24134
|
+
I || v ? (c.value[1] = I ? A : A + 1, Wr(g.col, u, {
|
|
24123
24135
|
placement: I ? "left" : "right",
|
|
24124
24136
|
middleware: [ss(I ? -1 * M : 0)]
|
|
24125
24137
|
}).then(({ x: K }) => {
|
|
@@ -24127,7 +24139,7 @@ function kE(t, e) {
|
|
|
24127
24139
|
height: `${S.height}px`,
|
|
24128
24140
|
left: `${K}px`
|
|
24129
24141
|
});
|
|
24130
|
-
}).catch(console.error)) : u.dataset.show = "false", m[0] !== 0 && (x || R) ? (c.value[0] = x ? y : y + 1,
|
|
24142
|
+
}).catch(console.error)) : u.dataset.show = "false", m[0] !== 0 && (x || R) ? (c.value[0] = x ? y : y + 1, Wr(g.row, f, {
|
|
24131
24143
|
placement: x ? "top" : "bottom",
|
|
24132
24144
|
middleware: [ss(x ? -1 * H : 0)]
|
|
24133
24145
|
}).then(({ y: K }) => {
|
|
@@ -24245,7 +24257,7 @@ const xE = Jl({
|
|
|
24245
24257
|
onPointermove: (M) => M.stopPropagation(),
|
|
24246
24258
|
ref: a
|
|
24247
24259
|
},
|
|
24248
|
-
/* @__PURE__ */ le(
|
|
24260
|
+
/* @__PURE__ */ le(qt, { icon: i.renderButton("col_drag_handle") }),
|
|
24249
24261
|
/* @__PURE__ */ le(
|
|
24250
24262
|
"div",
|
|
24251
24263
|
{
|
|
@@ -24253,10 +24265,10 @@ const xE = Jl({
|
|
|
24253
24265
|
class: "button-group",
|
|
24254
24266
|
onPointermove: (M) => M.stopPropagation()
|
|
24255
24267
|
},
|
|
24256
|
-
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("left") }, /* @__PURE__ */ le(
|
|
24257
|
-
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("center") }, /* @__PURE__ */ le(
|
|
24258
|
-
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("right") }, /* @__PURE__ */ le(
|
|
24259
|
-
/* @__PURE__ */ le("button", { type: "button", onPointerdown: T }, /* @__PURE__ */ le(
|
|
24268
|
+
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("left") }, /* @__PURE__ */ le(qt, { icon: i.renderButton("align_col_left") })),
|
|
24269
|
+
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("center") }, /* @__PURE__ */ le(qt, { icon: i.renderButton("align_col_center") })),
|
|
24270
|
+
/* @__PURE__ */ le("button", { type: "button", onPointerdown: S("right") }, /* @__PURE__ */ le(qt, { icon: i.renderButton("align_col_right") })),
|
|
24271
|
+
/* @__PURE__ */ le("button", { type: "button", onPointerdown: T }, /* @__PURE__ */ le(qt, { icon: i.renderButton("delete_col") }))
|
|
24260
24272
|
)
|
|
24261
24273
|
),
|
|
24262
24274
|
/* @__PURE__ */ le(
|
|
@@ -24273,7 +24285,7 @@ const xE = Jl({
|
|
|
24273
24285
|
onPointermove: (M) => M.stopPropagation(),
|
|
24274
24286
|
ref: c
|
|
24275
24287
|
},
|
|
24276
|
-
/* @__PURE__ */ le(
|
|
24288
|
+
/* @__PURE__ */ le(qt, { icon: i.renderButton("row_drag_handle") }),
|
|
24277
24289
|
/* @__PURE__ */ le(
|
|
24278
24290
|
"div",
|
|
24279
24291
|
{
|
|
@@ -24281,7 +24293,7 @@ const xE = Jl({
|
|
|
24281
24293
|
class: "button-group",
|
|
24282
24294
|
onPointermove: (M) => M.stopPropagation()
|
|
24283
24295
|
},
|
|
24284
|
-
/* @__PURE__ */ le("button", { type: "button", onPointerdown: T }, /* @__PURE__ */ le(
|
|
24296
|
+
/* @__PURE__ */ le("button", { type: "button", onPointerdown: T }, /* @__PURE__ */ le(qt, { icon: i.renderButton("delete_row") }))
|
|
24285
24297
|
)
|
|
24286
24298
|
),
|
|
24287
24299
|
/* @__PURE__ */ le("div", { class: "table-wrapper", ref: d }, /* @__PURE__ */ le(
|
|
@@ -24304,7 +24316,7 @@ const xE = Jl({
|
|
|
24304
24316
|
onPointermove: (M) => M.stopPropagation(),
|
|
24305
24317
|
ref: u
|
|
24306
24318
|
},
|
|
24307
|
-
/* @__PURE__ */ le("button", { type: "button", onClick: x, class: "add-button" }, /* @__PURE__ */ le(
|
|
24319
|
+
/* @__PURE__ */ le("button", { type: "button", onClick: x, class: "add-button" }, /* @__PURE__ */ le(qt, { icon: i.renderButton("add_row") }))
|
|
24308
24320
|
), /* @__PURE__ */ le(
|
|
24309
24321
|
"div",
|
|
24310
24322
|
{
|
|
@@ -24316,14 +24328,14 @@ const xE = Jl({
|
|
|
24316
24328
|
onPointermove: (M) => M.stopPropagation(),
|
|
24317
24329
|
ref: f
|
|
24318
24330
|
},
|
|
24319
|
-
/* @__PURE__ */ le("button", { type: "button", onClick: R, class: "add-button" }, /* @__PURE__ */ le(
|
|
24331
|
+
/* @__PURE__ */ le("button", { type: "button", onClick: R, class: "add-button" }, /* @__PURE__ */ le(qt, { icon: i.renderButton("add_col") }))
|
|
24320
24332
|
), /* @__PURE__ */ le("table", { ref: l, class: "children" }))
|
|
24321
24333
|
);
|
|
24322
24334
|
}
|
|
24323
24335
|
});
|
|
24324
|
-
var
|
|
24336
|
+
var qg = (t) => {
|
|
24325
24337
|
throw TypeError(t);
|
|
24326
|
-
}, CE = (t, e, n) => e.has(t) ||
|
|
24338
|
+
}, CE = (t, e, n) => e.has(t) || qg("Cannot " + n), SE = (t, e, n) => e.has(t) ? qg("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), TE = (t, e, n) => (CE(t, e, "access private method"), n), Va, Wg;
|
|
24327
24339
|
class ME {
|
|
24328
24340
|
constructor(e, n, r, i) {
|
|
24329
24341
|
this.ctx = e, this.node = n, this.view = r, this.getPos = i, SE(this, Va);
|
|
@@ -24353,7 +24365,7 @@ class ME {
|
|
|
24353
24365
|
const n = e.target;
|
|
24354
24366
|
if (n instanceof HTMLElement && (n.closest("th") || n.closest("td"))) {
|
|
24355
24367
|
const r = e;
|
|
24356
|
-
return TE(this, Va,
|
|
24368
|
+
return TE(this, Va, Wg).call(this, r);
|
|
24357
24369
|
}
|
|
24358
24370
|
}
|
|
24359
24371
|
return !1;
|
|
@@ -24366,7 +24378,7 @@ class ME {
|
|
|
24366
24378
|
}
|
|
24367
24379
|
}
|
|
24368
24380
|
Va = /* @__PURE__ */ new WeakSet();
|
|
24369
|
-
|
|
24381
|
+
Wg = function(t) {
|
|
24370
24382
|
const e = this.view;
|
|
24371
24383
|
if (!e.editable) return !1;
|
|
24372
24384
|
const { state: n, dispatch: r } = e, i = e.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
@@ -24622,7 +24634,7 @@ function Jn(t) {
|
|
|
24622
24634
|
const VE = {
|
|
24623
24635
|
key: 0,
|
|
24624
24636
|
class: "aimd-block-add-menu-divider"
|
|
24625
|
-
},
|
|
24637
|
+
}, qE = { class: "aimd-block-add-menu-group-label" }, WE = ["onClick"], jE = ["innerHTML"], UE = 420, bI = /* @__PURE__ */ Jl({
|
|
24626
24638
|
__name: "AimdWysiwygEditor",
|
|
24627
24639
|
props: {
|
|
24628
24640
|
content: {},
|
|
@@ -24638,7 +24650,7 @@ const VE = {
|
|
|
24638
24650
|
setup(t, { expose: e, emit: n }) {
|
|
24639
24651
|
const r = t, i = n;
|
|
24640
24652
|
function o(S) {
|
|
24641
|
-
return
|
|
24653
|
+
return qy(S).content;
|
|
24642
24654
|
}
|
|
24643
24655
|
function s(S) {
|
|
24644
24656
|
return {
|
|
@@ -24666,7 +24678,7 @@ const VE = {
|
|
|
24666
24678
|
icon: "H1",
|
|
24667
24679
|
onRun: (S) => {
|
|
24668
24680
|
const M = S.get(Ht);
|
|
24669
|
-
M.call($t.key), M.call(ri.key, { nodeType:
|
|
24681
|
+
M.call($t.key), M.call(ri.key, { nodeType: Ws.type(S), attrs: { level: 1 } });
|
|
24670
24682
|
}
|
|
24671
24683
|
},
|
|
24672
24684
|
{
|
|
@@ -24674,7 +24686,7 @@ const VE = {
|
|
|
24674
24686
|
icon: "H2",
|
|
24675
24687
|
onRun: (S) => {
|
|
24676
24688
|
const M = S.get(Ht);
|
|
24677
|
-
M.call($t.key), M.call(ri.key, { nodeType:
|
|
24689
|
+
M.call($t.key), M.call(ri.key, { nodeType: Ws.type(S), attrs: { level: 2 } });
|
|
24678
24690
|
}
|
|
24679
24691
|
},
|
|
24680
24692
|
{
|
|
@@ -24682,7 +24694,7 @@ const VE = {
|
|
|
24682
24694
|
icon: "H3",
|
|
24683
24695
|
onRun: (S) => {
|
|
24684
24696
|
const M = S.get(Ht);
|
|
24685
|
-
M.call($t.key), M.call(ri.key, { nodeType:
|
|
24697
|
+
M.call($t.key), M.call(ri.key, { nodeType: Ws.type(S), attrs: { level: 3 } });
|
|
24686
24698
|
}
|
|
24687
24699
|
},
|
|
24688
24700
|
{
|
|
@@ -24764,7 +24776,7 @@ const VE = {
|
|
|
24764
24776
|
M.action((H) => {
|
|
24765
24777
|
S.onRun(H), lo(() => {
|
|
24766
24778
|
try {
|
|
24767
|
-
H.get(
|
|
24779
|
+
H.get(qs).focus();
|
|
24768
24780
|
} catch {
|
|
24769
24781
|
}
|
|
24770
24782
|
});
|
|
@@ -24855,10 +24867,10 @@ const VE = {
|
|
|
24855
24867
|
});
|
|
24856
24868
|
return S.enableBlockHandle && ue.use(vy), ue;
|
|
24857
24869
|
});
|
|
24858
|
-
const [K,
|
|
24870
|
+
const [K, q] = ly();
|
|
24859
24871
|
return ni(K, (pe) => {
|
|
24860
24872
|
if (!pe) {
|
|
24861
|
-
const ue =
|
|
24873
|
+
const ue = q();
|
|
24862
24874
|
ue && (M("ready", ue), S.enableBlockHandle && lo(() => {
|
|
24863
24875
|
try {
|
|
24864
24876
|
ue.action((ce) => {
|
|
@@ -24871,7 +24883,7 @@ const VE = {
|
|
|
24871
24883
|
let X = null;
|
|
24872
24884
|
b.addEventListener("click", (k) => {
|
|
24873
24885
|
k.preventDefault(), k.stopPropagation();
|
|
24874
|
-
const Ce = b.getBoundingClientRect(), ie = ce.get(
|
|
24886
|
+
const Ce = b.getBoundingClientRect(), ie = ce.get(qs);
|
|
24875
24887
|
ie.hasFocus() || ie.focus();
|
|
24876
24888
|
const fe = X?.active;
|
|
24877
24889
|
if (!fe) return;
|
|
@@ -24908,12 +24920,12 @@ const VE = {
|
|
|
24908
24920
|
y.value = S, C = Jn(r.content), i("ready", S);
|
|
24909
24921
|
}
|
|
24910
24922
|
function P(S, M, H) {
|
|
24911
|
-
const K = Date.now() < v,
|
|
24912
|
-
if (A || K || I.consume(
|
|
24913
|
-
C = K ? Jn(r.content) :
|
|
24923
|
+
const K = Date.now() < v, q = Jn(M);
|
|
24924
|
+
if (A || K || I.consume(q)) {
|
|
24925
|
+
C = K ? Jn(r.content) : q;
|
|
24914
24926
|
return;
|
|
24915
24927
|
}
|
|
24916
|
-
C =
|
|
24928
|
+
C = q, i("markdown-updated", S, M, H);
|
|
24917
24929
|
}
|
|
24918
24930
|
function z(S) {
|
|
24919
24931
|
if (!y.value)
|
|
@@ -24934,7 +24946,7 @@ const VE = {
|
|
|
24934
24946
|
if (y.value)
|
|
24935
24947
|
try {
|
|
24936
24948
|
y.value.action((M) => {
|
|
24937
|
-
M.get(
|
|
24949
|
+
M.get(qs).setProps(s(!!S));
|
|
24938
24950
|
});
|
|
24939
24951
|
} catch {
|
|
24940
24952
|
}
|
|
@@ -24951,7 +24963,7 @@ const VE = {
|
|
|
24951
24963
|
}), (S, M) => (wn(), jn(ao, null, [
|
|
24952
24964
|
co("div", {
|
|
24953
24965
|
class: "aimd-editor-wysiwyg-mode",
|
|
24954
|
-
style:
|
|
24966
|
+
style: Wc({ minHeight: t.minHeight + "px", overflowY: "auto" })
|
|
24955
24967
|
}, [
|
|
24956
24968
|
jc(Uc(cy), null, {
|
|
24957
24969
|
default: ry(() => [
|
|
@@ -24971,24 +24983,24 @@ const VE = {
|
|
|
24971
24983
|
l.value ? (wn(), jn("div", {
|
|
24972
24984
|
key: 0,
|
|
24973
24985
|
class: "aimd-block-add-menu",
|
|
24974
|
-
style:
|
|
24986
|
+
style: Wc({ top: a.value.y + "px", left: a.value.x + "px" })
|
|
24975
24987
|
}, [
|
|
24976
24988
|
(wn(!0), jn(ao, null, Kc(f.value, (H, K) => (wn(), jn(ao, {
|
|
24977
24989
|
key: H.label
|
|
24978
24990
|
}, [
|
|
24979
24991
|
K > 0 ? (wn(), jn("div", VE)) : Jc("", !0),
|
|
24980
|
-
co("div",
|
|
24981
|
-
(wn(!0), jn(ao, null, Kc(H.items, (
|
|
24982
|
-
key:
|
|
24992
|
+
co("div", qE, Gc(H.label), 1),
|
|
24993
|
+
(wn(!0), jn(ao, null, Kc(H.items, (q) => (wn(), jn("button", {
|
|
24994
|
+
key: q.label,
|
|
24983
24995
|
class: "aimd-block-add-menu-item",
|
|
24984
|
-
onClick: (pe) => d(
|
|
24996
|
+
onClick: (pe) => d(q)
|
|
24985
24997
|
}, [
|
|
24986
24998
|
co("span", {
|
|
24987
24999
|
class: "aimd-block-add-menu-icon",
|
|
24988
|
-
innerHTML:
|
|
25000
|
+
innerHTML: q.icon
|
|
24989
25001
|
}, null, 8, jE),
|
|
24990
|
-
co("span", null, Gc(
|
|
24991
|
-
], 8,
|
|
25002
|
+
co("span", null, Gc(q.label), 1)
|
|
25003
|
+
], 8, WE))), 128))
|
|
24992
25004
|
], 64))), 128))
|
|
24993
25005
|
], 4)) : Jc("", !0)
|
|
24994
25006
|
]))
|
|
@@ -24997,23 +25009,23 @@ const VE = {
|
|
|
24997
25009
|
});
|
|
24998
25010
|
export {
|
|
24999
25011
|
uI as A,
|
|
25000
|
-
|
|
25012
|
+
bd as D,
|
|
25001
25013
|
fI as M,
|
|
25002
25014
|
bI as _,
|
|
25003
|
-
|
|
25004
|
-
|
|
25015
|
+
r1 as a,
|
|
25016
|
+
i1 as b,
|
|
25005
25017
|
DE as c,
|
|
25006
25018
|
Oc as d,
|
|
25007
25019
|
OE as e,
|
|
25008
25020
|
_E as f,
|
|
25009
25021
|
IE as g,
|
|
25010
25022
|
hI as h,
|
|
25011
|
-
|
|
25012
|
-
|
|
25023
|
+
n1 as i,
|
|
25024
|
+
o1 as j,
|
|
25013
25025
|
cI as k,
|
|
25014
|
-
|
|
25026
|
+
l1 as l,
|
|
25015
25027
|
dI as m,
|
|
25016
25028
|
pI as n,
|
|
25017
25029
|
$E as o,
|
|
25018
|
-
|
|
25030
|
+
t1 as r
|
|
25019
25031
|
};
|