markstream-vue 0.0.3-beta.4 → 0.0.3-beta.6
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 +5 -1
- package/README.zh-CN.md +5 -1
- package/dist/{exports-DhNgUzYL.js → exports-CVYl7bes.js} +847 -839
- package/dist/{exports-1obt4rfJ.cjs → exports-ISf5W5H7.cjs} +7 -7
- package/dist/exports.js +1 -1
- package/dist/{index-Cy9ounEH.js → index-B90_xyRN.js} +1 -1
- package/dist/{index-BS4IAchB.cjs → index-BOwgCLNK.cjs} +1 -1
- package/dist/{index-BDPiDbZr.js → index-Bg9riGZT.js} +1 -1
- package/dist/{index-KPngPBen.cjs → index-Bjfg9_i9.cjs} +1 -1
- package/dist/{index-DD2YWdWI.cjs → index-BqQOMeNc.cjs} +1 -1
- package/dist/{index-gpZy9BH3.js → index-CpUcwcBM.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +4 -4
|
@@ -9,7 +9,7 @@ var ko = (e, n, t) => n in e ? Jo(e, n, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var t of yo(n))
|
|
10
10
|
nr.call(n, t) && ko(e, t, n[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, Mt = (e, n) => Qo(e, er(n));
|
|
13
13
|
var z = (e, n, t) => new Promise((s, a) => {
|
|
14
14
|
var d = (w) => {
|
|
15
15
|
try {
|
|
@@ -27,7 +27,7 @@ var z = (e, n, t) => new Promise((s, a) => {
|
|
|
27
27
|
f((t = t.apply(e, n)).next());
|
|
28
28
|
});
|
|
29
29
|
import { getMarkdown as xo, parseMarkdownToStructure as or, setDefaultMathOptions as rr } from "stream-markdown-parser";
|
|
30
|
-
import { defineComponent as F, createElementBlock as y, openBlock as m, withMemo as fn, createVNode as
|
|
30
|
+
import { defineComponent as F, createElementBlock as y, openBlock as m, withMemo as fn, createVNode as ct, unref as $, createElementVNode as h, Fragment as ue, renderList as Be, toDisplayString as se, ref as M, onMounted as io, watch as U, onBeforeUnmount as hn, normalizeClass as O, computed as N, nextTick as he, createBlock as ye, Teleport as Ho, Transition as zn, withCtx as en, withDirectives as Rn, normalizeStyle as ut, vShow as Nn, createApp as ar, h as Gn, inject as ir, provide as sr, createCommentVNode as fe, renderSlot as Tt, shallowRef as lr, readonly as cr, defineAsyncComponent as vn, resolveDynamicComponent as Fe, useAttrs as ur, mergeProps as Kt, isMemoSame as jo, onUnmounted as dr, toHandlers as bo, withModifiers as mr, markRaw as Mo, reactive as Xn } from "vue";
|
|
31
31
|
import { autoUpdate as Co, offset as fr, flip as hr, shift as vr, computePosition as pr } from "@floating-ui/dom";
|
|
32
32
|
const gr = ["cite"], wr = /* @__PURE__ */ F({
|
|
33
33
|
__name: "BlockquoteNode",
|
|
@@ -45,7 +45,7 @@ const gr = ["cite"], wr = /* @__PURE__ */ F({
|
|
|
45
45
|
dir: "auto",
|
|
46
46
|
cite: e.node.cite
|
|
47
47
|
}, [
|
|
48
|
-
fn([n.node.children], () =>
|
|
48
|
+
fn([n.node.children], () => ct($(lt), {
|
|
49
49
|
"index-key": `blockquote-${n.indexKey}`,
|
|
50
50
|
nodes: n.node.children || [],
|
|
51
51
|
"custom-id": n.customId,
|
|
@@ -78,9 +78,9 @@ const yr = { class: "checkbox-node" }, kr = ["checked"], xr = /* @__PURE__ */ F(
|
|
|
78
78
|
}, null, 8, kr)
|
|
79
79
|
]));
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
e.component(
|
|
81
|
+
}), _t = /* @__PURE__ */ Z(xr, [["__scopeId", "data-v-8dc6c46f"]]);
|
|
82
|
+
_t.install = (e) => {
|
|
83
|
+
e.component(_t.__name, _t);
|
|
84
84
|
};
|
|
85
85
|
const br = { class: "definition-list" }, Mr = { class: "definition-term" }, Cr = { class: "definition-desc" }, Tr = /* @__PURE__ */ F({
|
|
86
86
|
__name: "DefinitionListNode",
|
|
@@ -96,7 +96,7 @@ const br = { class: "definition-list" }, Mr = { class: "definition-term" }, Cr =
|
|
|
96
96
|
return (t, s) => (m(), y("dl", br, [
|
|
97
97
|
(m(!0), y(ue, null, Be(n.node.items, (a, d) => (m(), y(ue, { key: d }, [
|
|
98
98
|
h("dt", Mr, [
|
|
99
|
-
|
|
99
|
+
ct($(lt), {
|
|
100
100
|
"index-key": `definition-term-${n.indexKey}-${d}`,
|
|
101
101
|
nodes: a.term,
|
|
102
102
|
"custom-id": n.customId,
|
|
@@ -105,7 +105,7 @@ const br = { class: "definition-list" }, Mr = { class: "definition-term" }, Cr =
|
|
|
105
105
|
}, null, 8, ["index-key", "nodes", "custom-id", "typewriter"])
|
|
106
106
|
]),
|
|
107
107
|
h("dd", Cr, [
|
|
108
|
-
|
|
108
|
+
ct($(lt), {
|
|
109
109
|
"index-key": `definition-desc-${n.indexKey}-${d}`,
|
|
110
110
|
nodes: a.definition,
|
|
111
111
|
"custom-id": n.customId,
|
|
@@ -132,20 +132,20 @@ const _r = { class: "emoji-node" }, Br = /* @__PURE__ */ F({
|
|
|
132
132
|
je.install = (e) => {
|
|
133
133
|
e.component(je.__name, je);
|
|
134
134
|
};
|
|
135
|
-
const Hn = "__global__",
|
|
135
|
+
const Hn = "__global__", Gt = {};
|
|
136
136
|
function _l(e, n) {
|
|
137
|
-
typeof e == "string" ?
|
|
137
|
+
typeof e == "string" ? Gt[e] = n || {} : Gt[Hn] = e || {};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return e ?
|
|
139
|
+
function Bt(e) {
|
|
140
|
+
return e ? Gt[e] || Gt[Hn] || {} : Gt[Hn] || {};
|
|
141
141
|
}
|
|
142
142
|
function Bl(e) {
|
|
143
143
|
if (e === Hn)
|
|
144
144
|
throw new Error("removeCustomComponents: use clearGlobalCustomComponents() to clear the global mapping");
|
|
145
|
-
delete
|
|
145
|
+
delete Gt[e];
|
|
146
146
|
}
|
|
147
147
|
function Il() {
|
|
148
|
-
delete
|
|
148
|
+
delete Gt[Hn];
|
|
149
149
|
}
|
|
150
150
|
const Ir = ["id"], $r = ["title"], Sr = /* @__PURE__ */ F({
|
|
151
151
|
__name: "FootnoteReferenceNode",
|
|
@@ -176,19 +176,59 @@ const Ir = ["id"], $r = ["title"], Sr = /* @__PURE__ */ F({
|
|
|
176
176
|
De.install = (e) => {
|
|
177
177
|
e.component(De.__name, De);
|
|
178
178
|
};
|
|
179
|
-
const Er =
|
|
180
|
-
__name: "
|
|
179
|
+
const Er = /* @__PURE__ */ F({
|
|
180
|
+
__name: "HtmlInlineNode",
|
|
181
181
|
props: {
|
|
182
182
|
node: {}
|
|
183
183
|
},
|
|
184
184
|
setup(e) {
|
|
185
|
-
|
|
185
|
+
const n = e, t = M(null), s = typeof window != "undefined";
|
|
186
|
+
function a() {
|
|
187
|
+
if (!s || !t.value)
|
|
188
|
+
return;
|
|
189
|
+
const c = t.value;
|
|
190
|
+
c.innerHTML = "";
|
|
191
|
+
const f = document.createElement("template");
|
|
192
|
+
f.innerHTML = n.node.content, c.appendChild(f.content.cloneNode(!0));
|
|
193
|
+
}
|
|
194
|
+
function d() {
|
|
195
|
+
if (!t.value)
|
|
196
|
+
return;
|
|
197
|
+
const c = t.value;
|
|
198
|
+
c.innerHTML = "", c.textContent = n.node.content;
|
|
199
|
+
}
|
|
200
|
+
return io(() => {
|
|
201
|
+
n.node.loading && !n.node.autoClosed ? d() : a();
|
|
202
|
+
}), U(
|
|
203
|
+
() => [n.node.content, n.node.loading, n.node.autoClosed],
|
|
204
|
+
() => {
|
|
205
|
+
n.node.loading && !n.node.autoClosed ? d() : a();
|
|
206
|
+
}
|
|
207
|
+
), hn(() => {
|
|
208
|
+
t.value && (t.value.innerHTML = "");
|
|
209
|
+
}), (c, f) => (m(), y("span", {
|
|
210
|
+
ref_key: "containerRef",
|
|
211
|
+
ref: t,
|
|
212
|
+
class: O(["html-inline-node", { "html-inline-node--loading": n.node.loading }])
|
|
213
|
+
}, null, 2));
|
|
186
214
|
}
|
|
187
|
-
});
|
|
215
|
+
}), Ae = /* @__PURE__ */ Z(Er, [["__scopeId", "data-v-e632756e"]]);
|
|
188
216
|
Ae.install = (e) => {
|
|
189
217
|
e.component(Ae.__name, Ae);
|
|
190
218
|
};
|
|
191
|
-
const Lr = ["
|
|
219
|
+
const Lr = { class: "inline text-[85%] px-1 py-0.5 rounded font-mono bg-secondary whitespace-normal break-words max-w-full before:content-[''] after:content-['']" }, ze = /* @__PURE__ */ F({
|
|
220
|
+
__name: "InlineCodeNode",
|
|
221
|
+
props: {
|
|
222
|
+
node: {}
|
|
223
|
+
},
|
|
224
|
+
setup(e) {
|
|
225
|
+
return (n, t) => (m(), y("code", Lr, se(e.node.code), 1));
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
ze.install = (e) => {
|
|
229
|
+
e.component(ze.__name, ze);
|
|
230
|
+
};
|
|
231
|
+
const Rr = ["id"], Nr = /* @__PURE__ */ F({
|
|
192
232
|
__name: "Tooltip",
|
|
193
233
|
props: {
|
|
194
234
|
visible: { type: Boolean },
|
|
@@ -259,19 +299,19 @@ const Lr = ["id"], Rr = /* @__PURE__ */ F({
|
|
|
259
299
|
})), hn(() => {
|
|
260
300
|
c && c();
|
|
261
301
|
}), (w, v) => (m(), ye(Ho, { to: "body" }, [
|
|
262
|
-
|
|
302
|
+
ct(zn, {
|
|
263
303
|
name: "tooltip",
|
|
264
304
|
appear: ""
|
|
265
305
|
}, {
|
|
266
|
-
default:
|
|
306
|
+
default: en(() => [
|
|
267
307
|
Rn(h("div", {
|
|
268
308
|
id: n.id,
|
|
269
309
|
ref_key: "tooltip",
|
|
270
310
|
ref: s,
|
|
271
|
-
style:
|
|
272
|
-
class:
|
|
311
|
+
style: ut({ position: "fixed", left: a.value.left, top: a.value.top, transform: a.value.transform }),
|
|
312
|
+
class: O(["z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border", [t.value ? "bg-gray-900 text-white border-gray-700 border is-dark" : "bg-white text-gray-900 border-gray-200 border"]]),
|
|
273
313
|
role: "tooltip"
|
|
274
|
-
}, se(e.content), 15,
|
|
314
|
+
}, se(e.content), 15, Rr), [
|
|
275
315
|
[Nn, e.visible && d.value]
|
|
276
316
|
])
|
|
277
317
|
]),
|
|
@@ -279,13 +319,13 @@ const Lr = ["id"], Rr = /* @__PURE__ */ F({
|
|
|
279
319
|
})
|
|
280
320
|
]));
|
|
281
321
|
}
|
|
282
|
-
}),
|
|
322
|
+
}), Hr = /* @__PURE__ */ Z(Nr, [["__scopeId", "data-v-993f63aa"]]), so = M(!1), Do = M(""), Ao = M("top"), Tn = M(null), jn = M(null), lo = M(null), co = M(null), zo = M(null);
|
|
283
323
|
let Yn = null, Un = null;
|
|
284
324
|
function Po() {
|
|
285
325
|
Yn && (clearTimeout(Yn), Yn = null), Un && (clearTimeout(Un), Un = null);
|
|
286
326
|
}
|
|
287
327
|
let To = !1;
|
|
288
|
-
function
|
|
328
|
+
function jr() {
|
|
289
329
|
if (To || typeof document == "undefined")
|
|
290
330
|
return;
|
|
291
331
|
To = !0;
|
|
@@ -294,7 +334,7 @@ function Hr() {
|
|
|
294
334
|
setup() {
|
|
295
335
|
return () => {
|
|
296
336
|
var t;
|
|
297
|
-
return Gn(
|
|
337
|
+
return Gn(Hr, {
|
|
298
338
|
visible: so.value,
|
|
299
339
|
"anchor-el": Tn.value,
|
|
300
340
|
content: Do.value,
|
|
@@ -311,7 +351,7 @@ function Hr() {
|
|
|
311
351
|
function Dn(e, n, t = "top", s = !1, a, d) {
|
|
312
352
|
if (!e)
|
|
313
353
|
return;
|
|
314
|
-
|
|
354
|
+
jr(), Po();
|
|
315
355
|
const c = () => {
|
|
316
356
|
var f, w;
|
|
317
357
|
jn.value = `tooltip-${Date.now()}-${Math.floor(Math.random() * 1e3)}`, Tn.value = e, Do.value = n, Ao.value = t, lo.value = (f = a == null ? void 0 : a.x) != null ? f : null, co.value = (w = a == null ? void 0 : a.y) != null ? w : null, zo.value = typeof d == "boolean" ? d : null, so.value = !0;
|
|
@@ -334,7 +374,7 @@ function uo(e = !1) {
|
|
|
334
374
|
};
|
|
335
375
|
e ? n() : Un = setTimeout(n, 120);
|
|
336
376
|
}
|
|
337
|
-
function
|
|
377
|
+
function Dr(e) {
|
|
338
378
|
return (e.split(".").pop() || e).replace(/[_-]/g, " ").replace(/([A-Z])/g, " $1").replace(/\s+/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()).trim();
|
|
339
379
|
}
|
|
340
380
|
const Vo = {
|
|
@@ -372,7 +412,7 @@ function mo() {
|
|
|
372
412
|
}
|
|
373
413
|
const e = (n) => {
|
|
374
414
|
var t;
|
|
375
|
-
return (t = Vo[n]) != null ? t :
|
|
415
|
+
return (t = Vo[n]) != null ? t : Dr(n);
|
|
376
416
|
};
|
|
377
417
|
return z(null, null, function* () {
|
|
378
418
|
try {
|
|
@@ -392,7 +432,7 @@ function mo() {
|
|
|
392
432
|
}), { t: e };
|
|
393
433
|
}
|
|
394
434
|
const Oo = Symbol("ViewportPriority");
|
|
395
|
-
function
|
|
435
|
+
function Ar(e, n) {
|
|
396
436
|
const t = typeof window != "undefined" && typeof document != "undefined", s = typeof n == "boolean" ? M(n) : n;
|
|
397
437
|
let a = null, d = null;
|
|
398
438
|
const c = /* @__PURE__ */ new WeakMap();
|
|
@@ -488,16 +528,16 @@ function fo() {
|
|
|
488
528
|
return C ? (n.set(d, { resolve: w, visible: c }), C.observe(d), { isVisible: c, whenVisible: v, destroy: b }) : (c.value = !0, w(), { isVisible: c, whenVisible: v, destroy: b });
|
|
489
529
|
};
|
|
490
530
|
}
|
|
491
|
-
const
|
|
531
|
+
const zr = { class: "relative inline-block" }, Pr = ["src", "alt", "title", "loading", "tabindex", "aria-label"], Vr = { class: "text-sm whitespace-nowrap" }, Or = {
|
|
492
532
|
key: 1,
|
|
493
533
|
class: "text-sm text-gray-500"
|
|
494
|
-
},
|
|
534
|
+
}, Kr = {
|
|
495
535
|
key: "error",
|
|
496
536
|
class: "px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500"
|
|
497
|
-
},
|
|
537
|
+
}, Fr = { class: "text-sm whitespace-nowrap" }, Wr = {
|
|
498
538
|
key: 0,
|
|
499
539
|
class: "mt-2 text-sm text-gray-500 italic"
|
|
500
|
-
},
|
|
540
|
+
}, Xr = /* @__PURE__ */ F({
|
|
501
541
|
__name: "ImageNode",
|
|
502
542
|
props: {
|
|
503
543
|
node: {},
|
|
@@ -546,21 +586,21 @@ const Ar = { class: "relative inline-block" }, zr = ["src", "alt", "title", "loa
|
|
|
546
586
|
ref: f,
|
|
547
587
|
class: "text-center my-8"
|
|
548
588
|
}, [
|
|
549
|
-
h("div",
|
|
550
|
-
|
|
589
|
+
h("div", zr, [
|
|
590
|
+
ct(zn, {
|
|
551
591
|
name: "img-switch",
|
|
552
592
|
mode: "out-in"
|
|
553
593
|
}, {
|
|
554
|
-
default:
|
|
555
|
-
var ne, de, D,
|
|
594
|
+
default: en(() => {
|
|
595
|
+
var ne, de, D, We, ce;
|
|
556
596
|
return [
|
|
557
597
|
!e.node.loading && !d.value && H.value ? (m(), y("img", {
|
|
558
598
|
key: "image",
|
|
559
599
|
src: C.value,
|
|
560
600
|
alt: String((de = (ne = t.node.alt) != null ? ne : t.node.title) != null ? de : ""),
|
|
561
|
-
title: String((
|
|
562
|
-
class:
|
|
563
|
-
style:
|
|
601
|
+
title: String((We = (D = t.node.title) != null ? D : t.node.alt) != null ? We : ""),
|
|
602
|
+
class: O(["max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out", { "opacity-0": !a.value, "opacity-100": a.value, "cursor-pointer": a.value }]),
|
|
603
|
+
style: ut(A.value ? { minHeight: t.svgMinHeight, width: "100%", height: "auto", objectFit: "contain" } : void 0),
|
|
564
604
|
loading: t.lazy ? "lazy" : "eager",
|
|
565
605
|
decoding: "async",
|
|
566
606
|
tabindex: a.value ? 0 : -1,
|
|
@@ -568,8 +608,8 @@ const Ar = { class: "relative inline-block" }, zr = ["src", "alt", "title", "loa
|
|
|
568
608
|
onError: S,
|
|
569
609
|
onLoad: ee,
|
|
570
610
|
onClick: j
|
|
571
|
-
}, null, 46,
|
|
572
|
-
|
|
611
|
+
}, null, 46, Pr)) : d.value ? !e.node.loading && !t.fallbackSrc ? (m(), y("div", Kr, [
|
|
612
|
+
Tt(re.$slots, "error", {
|
|
573
613
|
node: t.node,
|
|
574
614
|
displaySrc: C.value,
|
|
575
615
|
imageLoaded: a.value,
|
|
@@ -589,14 +629,14 @@ const Ar = { class: "relative inline-block" }, zr = ["src", "alt", "title", "loa
|
|
|
589
629
|
d: "M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"
|
|
590
630
|
})
|
|
591
631
|
], -1)),
|
|
592
|
-
h("span",
|
|
632
|
+
h("span", Fr, se($(T)("image.loadError")), 1)
|
|
593
633
|
], !0)
|
|
594
634
|
])) : fe("", !0) : (m(), y("div", {
|
|
595
635
|
key: "placeholder",
|
|
596
636
|
class: "placeholder-layer max-w-96 inline-flex items-center justify-center gap-2",
|
|
597
|
-
style:
|
|
637
|
+
style: ut(A.value ? { minHeight: t.svgMinHeight, width: "100%" } : { minHeight: "6rem" })
|
|
598
638
|
}, [
|
|
599
|
-
t.usePlaceholder ?
|
|
639
|
+
t.usePlaceholder ? Tt(re.$slots, "placeholder", {
|
|
600
640
|
key: 0,
|
|
601
641
|
node: t.node,
|
|
602
642
|
displaySrc: C.value,
|
|
@@ -610,20 +650,20 @@ const Ar = { class: "relative inline-block" }, zr = ["src", "alt", "title", "loa
|
|
|
610
650
|
class: "w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin",
|
|
611
651
|
"aria-hidden": "true"
|
|
612
652
|
}, null, -1)),
|
|
613
|
-
h("span",
|
|
614
|
-
], !0) : (m(), y("span",
|
|
653
|
+
h("span", Vr, se($(T)("image.loading")), 1)
|
|
654
|
+
], !0) : (m(), y("span", Or, se(e.node.raw), 1))
|
|
615
655
|
], 4))
|
|
616
656
|
];
|
|
617
657
|
}),
|
|
618
658
|
_: 3
|
|
619
659
|
})
|
|
620
660
|
]),
|
|
621
|
-
t.showCaption && t.node.alt ? (m(), y("figcaption",
|
|
661
|
+
t.showCaption && t.node.alt ? (m(), y("figcaption", Wr, se(t.node.alt), 1)) : fe("", !0)
|
|
622
662
|
], 512));
|
|
623
663
|
}
|
|
624
|
-
}),
|
|
625
|
-
|
|
626
|
-
e.component(
|
|
664
|
+
}), Pt = /* @__PURE__ */ Z(Xr, [["__scopeId", "data-v-7ca79b66"]]);
|
|
665
|
+
Pt.install = (e) => {
|
|
666
|
+
e.component(Pt.__name, Pt);
|
|
627
667
|
};
|
|
628
668
|
let bn = null, qn = !1, ho = Ko;
|
|
629
669
|
function Ko() {
|
|
@@ -632,11 +672,11 @@ function Ko() {
|
|
|
632
672
|
return yield import("katex/contrib/mhchem"), e;
|
|
633
673
|
});
|
|
634
674
|
}
|
|
635
|
-
function
|
|
675
|
+
function Yr() {
|
|
636
676
|
bn = null, qn = !1;
|
|
637
677
|
}
|
|
638
678
|
function Fo(e) {
|
|
639
|
-
ho = e,
|
|
679
|
+
ho = e, Yr();
|
|
640
680
|
}
|
|
641
681
|
function Sl(e) {
|
|
642
682
|
Fo(e != null ? e : Ko);
|
|
@@ -674,7 +714,7 @@ function Xo() {
|
|
|
674
714
|
no.value = !1;
|
|
675
715
|
})), cr(no);
|
|
676
716
|
}
|
|
677
|
-
const
|
|
717
|
+
const Ur = /* @__PURE__ */ F({
|
|
678
718
|
__name: "TextNode",
|
|
679
719
|
props: {
|
|
680
720
|
node: {}
|
|
@@ -683,27 +723,27 @@ const Yr = /* @__PURE__ */ F({
|
|
|
683
723
|
setup(e) {
|
|
684
724
|
const n = Xo();
|
|
685
725
|
return (t, s) => (m(), y("span", {
|
|
686
|
-
class:
|
|
726
|
+
class: O([[$(n) && e.node.center ? "text-node-center" : ""], "whitespace-pre-wrap break-words text-node"])
|
|
687
727
|
}, se(e.node.content), 3));
|
|
688
728
|
}
|
|
689
|
-
}), Ie = /* @__PURE__ */ Z(
|
|
729
|
+
}), Ie = /* @__PURE__ */ Z(Ur, [["__scopeId", "data-v-56f30838"]]);
|
|
690
730
|
Ie.install = (e) => {
|
|
691
731
|
e.component(Ie.__name, Ie);
|
|
692
732
|
};
|
|
693
|
-
const
|
|
733
|
+
const It = vn(() => z(null, null, function* () {
|
|
694
734
|
var n, t;
|
|
695
735
|
if (typeof globalThis != "undefined" && typeof globalThis.process != "undefined" && ((t = (n = globalThis.process) == null ? void 0 : n.env) == null ? void 0 : t.NODE_ENV) === "test")
|
|
696
736
|
return (s) => {
|
|
697
737
|
var a, d;
|
|
698
|
-
return Gn(Ie,
|
|
699
|
-
node:
|
|
738
|
+
return Gn(Ie, Mt(oe({}, s), {
|
|
739
|
+
node: Mt(oe({}, s.node), {
|
|
700
740
|
content: (d = s.node.raw) != null ? d : `$${(a = s.node.content) != null ? a : ""}$`
|
|
701
741
|
})
|
|
702
742
|
}));
|
|
703
743
|
};
|
|
704
744
|
try {
|
|
705
745
|
if (yield vo())
|
|
706
|
-
return (yield import("./index-
|
|
746
|
+
return (yield import("./index-B90_xyRN.js")).default;
|
|
707
747
|
} catch (s) {
|
|
708
748
|
console.warn(
|
|
709
749
|
'[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',
|
|
@@ -712,16 +752,16 @@ const Bt = vn(() => z(null, null, function* () {
|
|
|
712
752
|
}
|
|
713
753
|
return (s) => {
|
|
714
754
|
var a, d;
|
|
715
|
-
return Gn(Ie,
|
|
716
|
-
node:
|
|
755
|
+
return Gn(Ie, Mt(oe({}, s), {
|
|
756
|
+
node: Mt(oe({}, s.node), {
|
|
717
757
|
content: (d = s.node.raw) != null ? d : `$${(a = s.node.content) != null ? a : ""}$`
|
|
718
758
|
})
|
|
719
759
|
}));
|
|
720
760
|
};
|
|
721
|
-
})),
|
|
761
|
+
})), qr = vn(() => z(null, null, function* () {
|
|
722
762
|
try {
|
|
723
763
|
if (yield vo())
|
|
724
|
-
return (yield import("./index-
|
|
764
|
+
return (yield import("./index-Bg9riGZT.js")).default;
|
|
725
765
|
} catch (e) {
|
|
726
766
|
console.warn(
|
|
727
767
|
'[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',
|
|
@@ -730,13 +770,13 @@ const Bt = vn(() => z(null, null, function* () {
|
|
|
730
770
|
}
|
|
731
771
|
return (e) => {
|
|
732
772
|
var n, t;
|
|
733
|
-
return Gn(Ie,
|
|
734
|
-
node:
|
|
773
|
+
return Gn(Ie, Mt(oe({}, e), {
|
|
774
|
+
node: Mt(oe({}, e.node), {
|
|
735
775
|
content: (t = e.node.raw) != null ? t : `$$${(n = e.node.content) != null ? n : ""}$$`
|
|
736
776
|
})
|
|
737
777
|
}));
|
|
738
778
|
};
|
|
739
|
-
})),
|
|
779
|
+
})), Pe = /* @__PURE__ */ F({
|
|
740
780
|
__name: "ReferenceNode",
|
|
741
781
|
props: {
|
|
742
782
|
node: {},
|
|
@@ -755,10 +795,10 @@ const Bt = vn(() => z(null, null, function* () {
|
|
|
755
795
|
}, se(e.node.id), 33));
|
|
756
796
|
}
|
|
757
797
|
});
|
|
758
|
-
|
|
759
|
-
e.component(
|
|
798
|
+
Pe.install = (e) => {
|
|
799
|
+
e.component(Pe.__name, Pe);
|
|
760
800
|
};
|
|
761
|
-
const
|
|
801
|
+
const Zr = { class: "superscript-node" }, Gr = { key: 1 }, Jr = /* @__PURE__ */ F({
|
|
762
802
|
__name: "SuperscriptNode",
|
|
763
803
|
props: {
|
|
764
804
|
node: {},
|
|
@@ -766,39 +806,40 @@ const qr = { class: "superscript-node" }, Zr = { key: 1 }, Gr = /* @__PURE__ */
|
|
|
766
806
|
indexKey: {}
|
|
767
807
|
},
|
|
768
808
|
setup(e) {
|
|
769
|
-
const n = e, t =
|
|
809
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
770
810
|
text: Ie,
|
|
771
|
-
inline_code:
|
|
772
|
-
link:
|
|
773
|
-
|
|
774
|
-
|
|
811
|
+
inline_code: ze,
|
|
812
|
+
link: Ke,
|
|
813
|
+
html_inline: Ae,
|
|
814
|
+
strong: Ve,
|
|
815
|
+
emphasis: tt,
|
|
775
816
|
footnote_reference: De,
|
|
776
|
-
strikethrough:
|
|
777
|
-
highlight:
|
|
778
|
-
insert:
|
|
779
|
-
subscript:
|
|
817
|
+
strikethrough: Oe,
|
|
818
|
+
highlight: et,
|
|
819
|
+
insert: Qe,
|
|
820
|
+
subscript: Je,
|
|
780
821
|
emoji: je,
|
|
781
|
-
math_inline:
|
|
782
|
-
reference:
|
|
822
|
+
math_inline: It,
|
|
823
|
+
reference: Pe
|
|
783
824
|
}, t);
|
|
784
|
-
return (a, d) => (m(), y("sup",
|
|
825
|
+
return (a, d) => (m(), y("sup", Zr, [
|
|
785
826
|
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), y(ue, {
|
|
786
827
|
key: `${e.indexKey || "superscript"}-${f}`
|
|
787
828
|
}, [
|
|
788
|
-
s[c.type] ? (m(), ye(
|
|
829
|
+
s[c.type] ? (m(), ye(Fe(s[c.type]), {
|
|
789
830
|
key: 0,
|
|
790
831
|
node: c,
|
|
791
832
|
"custom-id": n.customId,
|
|
792
833
|
"index-key": `${e.indexKey || "superscript"}-${f}`
|
|
793
|
-
}, null, 8, ["node", "custom-id", "index-key"])) : (m(), y("span",
|
|
834
|
+
}, null, 8, ["node", "custom-id", "index-key"])) : (m(), y("span", Gr, se(c.content || c.raw), 1))
|
|
794
835
|
], 64))), 128))
|
|
795
836
|
]));
|
|
796
837
|
}
|
|
797
|
-
}),
|
|
798
|
-
|
|
799
|
-
e.component(
|
|
838
|
+
}), Ge = /* @__PURE__ */ Z(Jr, [["__scopeId", "data-v-6dc1e3ba"]]);
|
|
839
|
+
Ge.install = (e) => {
|
|
840
|
+
e.component(Ge.__name, Ge);
|
|
800
841
|
};
|
|
801
|
-
const
|
|
842
|
+
const Qr = { class: "subscript-node" }, ea = { key: 1 }, ta = /* @__PURE__ */ F({
|
|
802
843
|
__name: "SubscriptNode",
|
|
803
844
|
props: {
|
|
804
845
|
node: {},
|
|
@@ -806,39 +847,40 @@ const Jr = { class: "subscript-node" }, Qr = { key: 1 }, ea = /* @__PURE__ */ F(
|
|
|
806
847
|
indexKey: {}
|
|
807
848
|
},
|
|
808
849
|
setup(e) {
|
|
809
|
-
const n = e, t =
|
|
850
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
810
851
|
text: Ie,
|
|
811
|
-
inline_code:
|
|
812
|
-
link:
|
|
813
|
-
|
|
814
|
-
|
|
852
|
+
inline_code: ze,
|
|
853
|
+
link: Ke,
|
|
854
|
+
html_inline: Ae,
|
|
855
|
+
strong: Ve,
|
|
856
|
+
emphasis: tt,
|
|
815
857
|
footnote_reference: De,
|
|
816
|
-
strikethrough:
|
|
817
|
-
highlight:
|
|
818
|
-
insert:
|
|
819
|
-
superscript:
|
|
858
|
+
strikethrough: Oe,
|
|
859
|
+
highlight: et,
|
|
860
|
+
insert: Qe,
|
|
861
|
+
superscript: Ge,
|
|
820
862
|
emoji: je,
|
|
821
|
-
math_inline:
|
|
822
|
-
reference:
|
|
863
|
+
math_inline: It,
|
|
864
|
+
reference: Pe
|
|
823
865
|
}, t);
|
|
824
|
-
return (a, d) => (m(), y("sub",
|
|
866
|
+
return (a, d) => (m(), y("sub", Qr, [
|
|
825
867
|
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), y(ue, {
|
|
826
868
|
key: `${e.indexKey || "subscript"}-${f}`
|
|
827
869
|
}, [
|
|
828
|
-
s[c.type] ? (m(), ye(
|
|
870
|
+
s[c.type] ? (m(), ye(Fe(s[c.type]), {
|
|
829
871
|
key: 0,
|
|
830
872
|
node: c,
|
|
831
873
|
"custom-id": n.customId,
|
|
832
874
|
"index-key": `${e.indexKey || "subscript"}-${f}`
|
|
833
|
-
}, null, 8, ["node", "custom-id", "index-key"])) : (m(), y("span",
|
|
875
|
+
}, null, 8, ["node", "custom-id", "index-key"])) : (m(), y("span", ea, se(c.content || c.raw), 1))
|
|
834
876
|
], 64))), 128))
|
|
835
877
|
]));
|
|
836
878
|
}
|
|
837
|
-
}),
|
|
838
|
-
|
|
839
|
-
e.component(
|
|
879
|
+
}), Je = /* @__PURE__ */ Z(ta, [["__scopeId", "data-v-69de9b81"]]);
|
|
880
|
+
Je.install = (e) => {
|
|
881
|
+
e.component(Je.__name, Je);
|
|
840
882
|
};
|
|
841
|
-
const
|
|
883
|
+
const na = { class: "strong-node" }, oa = /* @__PURE__ */ F({
|
|
842
884
|
__name: "StrongNode",
|
|
843
885
|
props: {
|
|
844
886
|
node: {},
|
|
@@ -846,23 +888,24 @@ const ta = { class: "strong-node" }, na = /* @__PURE__ */ F({
|
|
|
846
888
|
indexKey: {}
|
|
847
889
|
},
|
|
848
890
|
setup(e) {
|
|
849
|
-
const n = e, t =
|
|
891
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
850
892
|
text: Ie,
|
|
851
|
-
inline_code:
|
|
852
|
-
link:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
893
|
+
inline_code: ze,
|
|
894
|
+
link: Ke,
|
|
895
|
+
html_inline: Ae,
|
|
896
|
+
emphasis: tt,
|
|
897
|
+
strikethrough: Oe,
|
|
898
|
+
highlight: et,
|
|
899
|
+
insert: Qe,
|
|
900
|
+
subscript: Je,
|
|
901
|
+
superscript: Ge,
|
|
859
902
|
emoji: je,
|
|
860
903
|
footnote_reference: De,
|
|
861
|
-
math_inline:
|
|
862
|
-
reference:
|
|
904
|
+
math_inline: It,
|
|
905
|
+
reference: Pe
|
|
863
906
|
}, t);
|
|
864
|
-
return (a, d) => (m(), y("strong",
|
|
865
|
-
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(
|
|
907
|
+
return (a, d) => (m(), y("strong", na, [
|
|
908
|
+
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(Fe(s[c.type]), {
|
|
866
909
|
key: `${e.indexKey || "strong"}-${f}`,
|
|
867
910
|
"index-key": `${e.indexKey || "strong"}-${f}`,
|
|
868
911
|
node: c,
|
|
@@ -870,11 +913,11 @@ const ta = { class: "strong-node" }, na = /* @__PURE__ */ F({
|
|
|
870
913
|
}, null, 8, ["index-key", "node", "custom-id"]))), 128))
|
|
871
914
|
]));
|
|
872
915
|
}
|
|
873
|
-
}),
|
|
874
|
-
|
|
875
|
-
e.component(
|
|
916
|
+
}), Ve = /* @__PURE__ */ Z(oa, [["__scopeId", "data-v-af3ce037"]]);
|
|
917
|
+
Ve.install = (e) => {
|
|
918
|
+
e.component(Ve.__name, Ve);
|
|
876
919
|
};
|
|
877
|
-
const
|
|
920
|
+
const ra = { class: "strikethrough-node" }, aa = /* @__PURE__ */ F({
|
|
878
921
|
__name: "StrikethroughNode",
|
|
879
922
|
props: {
|
|
880
923
|
node: {},
|
|
@@ -882,23 +925,24 @@ const oa = { class: "strikethrough-node" }, ra = /* @__PURE__ */ F({
|
|
|
882
925
|
indexKey: {}
|
|
883
926
|
},
|
|
884
927
|
setup(e) {
|
|
885
|
-
const n = e, t =
|
|
928
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
886
929
|
text: Ie,
|
|
887
|
-
inline_code:
|
|
888
|
-
link:
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
930
|
+
inline_code: ze,
|
|
931
|
+
link: Ke,
|
|
932
|
+
html_inline: Ae,
|
|
933
|
+
strong: Ve,
|
|
934
|
+
emphasis: tt,
|
|
935
|
+
highlight: et,
|
|
936
|
+
insert: Qe,
|
|
937
|
+
subscript: Je,
|
|
938
|
+
superscript: Ge,
|
|
895
939
|
emoji: je,
|
|
896
940
|
footnote_reference: De,
|
|
897
|
-
math_inline:
|
|
898
|
-
reference:
|
|
941
|
+
math_inline: It,
|
|
942
|
+
reference: Pe
|
|
899
943
|
}, t);
|
|
900
|
-
return (a, d) => (m(), y("del",
|
|
901
|
-
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(
|
|
944
|
+
return (a, d) => (m(), y("del", ra, [
|
|
945
|
+
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(Fe(s[c.type]), {
|
|
902
946
|
key: `${e.indexKey || "strikethrough"}-${f}`,
|
|
903
947
|
node: c,
|
|
904
948
|
"custom-id": n.customId,
|
|
@@ -906,11 +950,11 @@ const oa = { class: "strikethrough-node" }, ra = /* @__PURE__ */ F({
|
|
|
906
950
|
}, null, 8, ["node", "custom-id", "index-key"]))), 128))
|
|
907
951
|
]));
|
|
908
952
|
}
|
|
909
|
-
}),
|
|
910
|
-
|
|
911
|
-
e.component(
|
|
953
|
+
}), Oe = /* @__PURE__ */ Z(aa, [["__scopeId", "data-v-904d5bd1"]]);
|
|
954
|
+
Oe.install = (e) => {
|
|
955
|
+
e.component(Oe.__name, Oe);
|
|
912
956
|
};
|
|
913
|
-
const
|
|
957
|
+
const ia = ["href", "title", "aria-label", "aria-hidden"], sa = ["aria-hidden"], la = { class: "link-text-wrapper relative inline-flex" }, ca = { class: "leading-[normal] link-text" }, ua = { class: "leading-[normal] link-text" }, da = /* @__PURE__ */ F({
|
|
914
958
|
__name: "LinkNode",
|
|
915
959
|
props: {
|
|
916
960
|
node: {},
|
|
@@ -940,10 +984,11 @@ const aa = ["href", "title", "aria-label", "aria-hidden"], ia = ["aria-hidden"],
|
|
|
940
984
|
};
|
|
941
985
|
}), s = {
|
|
942
986
|
text: Ie,
|
|
943
|
-
strong:
|
|
944
|
-
strikethrough:
|
|
945
|
-
emphasis:
|
|
946
|
-
image:
|
|
987
|
+
strong: Ve,
|
|
988
|
+
strikethrough: Oe,
|
|
989
|
+
emphasis: tt,
|
|
990
|
+
image: Pt,
|
|
991
|
+
html_inline: Ae
|
|
947
992
|
}, a = ur();
|
|
948
993
|
function d(w) {
|
|
949
994
|
var H, A, S;
|
|
@@ -959,21 +1004,21 @@ const aa = ["href", "title", "aria-label", "aria-hidden"], ia = ["aria-hidden"],
|
|
|
959
1004
|
var w, v;
|
|
960
1005
|
return String((v = (w = n.node.title) != null ? w : n.node.href) != null ? v : "");
|
|
961
1006
|
});
|
|
962
|
-
return (w, v) => e.node.loading ? (m(), y("span",
|
|
1007
|
+
return (w, v) => e.node.loading ? (m(), y("span", Kt({
|
|
963
1008
|
key: 1,
|
|
964
1009
|
class: "link-loading inline-flex items-baseline gap-1.5",
|
|
965
1010
|
"aria-hidden": e.node.loading ? "false" : "true"
|
|
966
1011
|
}, $(a), { style: t.value }), [
|
|
967
|
-
h("span",
|
|
968
|
-
h("span",
|
|
969
|
-
h("span",
|
|
1012
|
+
h("span", la, [
|
|
1013
|
+
h("span", ca, [
|
|
1014
|
+
h("span", ua, se(e.node.text), 1)
|
|
970
1015
|
]),
|
|
971
1016
|
v[1] || (v[1] = h("span", {
|
|
972
1017
|
class: "underline-anim",
|
|
973
1018
|
"aria-hidden": "true"
|
|
974
1019
|
}, null, -1))
|
|
975
1020
|
])
|
|
976
|
-
], 16,
|
|
1021
|
+
], 16, sa)) : (m(), y("a", Kt({
|
|
977
1022
|
key: 0,
|
|
978
1023
|
class: "link-node",
|
|
979
1024
|
href: e.node.href,
|
|
@@ -987,19 +1032,19 @@ const aa = ["href", "title", "aria-label", "aria-hidden"], ia = ["aria-hidden"],
|
|
|
987
1032
|
onMouseenter: v[0] || (v[0] = (b) => d(b)),
|
|
988
1033
|
onMouseleave: c
|
|
989
1034
|
}), [
|
|
990
|
-
(m(!0), y(ue, null, Be(e.node.children, (b, C) => (m(), ye(
|
|
1035
|
+
(m(!0), y(ue, null, Be(e.node.children, (b, C) => (m(), ye(Fe(s[b.type]), {
|
|
991
1036
|
key: `${e.indexKey || "emphasis"}-${C}`,
|
|
992
1037
|
node: b,
|
|
993
1038
|
"custom-id": n.customId,
|
|
994
1039
|
"index-key": `${e.indexKey || "link-text"}-${C}`
|
|
995
1040
|
}, null, 8, ["node", "custom-id", "index-key"]))), 128))
|
|
996
|
-
], 16,
|
|
1041
|
+
], 16, ia));
|
|
997
1042
|
}
|
|
998
|
-
}),
|
|
999
|
-
|
|
1000
|
-
e.component(
|
|
1043
|
+
}), Ke = /* @__PURE__ */ Z(da, [["__scopeId", "data-v-0753b32c"]]);
|
|
1044
|
+
Ke.install = (e) => {
|
|
1045
|
+
e.component(Ke.__name, Ke);
|
|
1001
1046
|
};
|
|
1002
|
-
const
|
|
1047
|
+
const ma = { class: "insert-node" }, fa = /* @__PURE__ */ F({
|
|
1003
1048
|
__name: "InsertNode",
|
|
1004
1049
|
props: {
|
|
1005
1050
|
node: {},
|
|
@@ -1007,23 +1052,24 @@ const da = { class: "insert-node" }, ma = /* @__PURE__ */ F({
|
|
|
1007
1052
|
indexKey: {}
|
|
1008
1053
|
},
|
|
1009
1054
|
setup(e) {
|
|
1010
|
-
const n = e, t =
|
|
1055
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
1011
1056
|
text: Ie,
|
|
1012
|
-
inline_code:
|
|
1013
|
-
link:
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1057
|
+
inline_code: ze,
|
|
1058
|
+
link: Ke,
|
|
1059
|
+
html_inline: Ae,
|
|
1060
|
+
strong: Ve,
|
|
1061
|
+
emphasis: tt,
|
|
1062
|
+
strikethrough: Oe,
|
|
1063
|
+
highlight: et,
|
|
1064
|
+
subscript: Je,
|
|
1065
|
+
superscript: Ge,
|
|
1020
1066
|
emoji: je,
|
|
1021
1067
|
footnote_reference: De,
|
|
1022
|
-
math_inline:
|
|
1023
|
-
reference:
|
|
1068
|
+
math_inline: It,
|
|
1069
|
+
reference: Pe
|
|
1024
1070
|
}, t);
|
|
1025
|
-
return (a, d) => (m(), y("ins",
|
|
1026
|
-
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(
|
|
1071
|
+
return (a, d) => (m(), y("ins", ma, [
|
|
1072
|
+
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(Fe(s[c.type]), {
|
|
1027
1073
|
key: `${e.indexKey || "insert"}-${f}`,
|
|
1028
1074
|
node: c,
|
|
1029
1075
|
"custom-id": n.customId,
|
|
@@ -1031,11 +1077,11 @@ const da = { class: "insert-node" }, ma = /* @__PURE__ */ F({
|
|
|
1031
1077
|
}, null, 8, ["node", "custom-id", "index-key"]))), 128))
|
|
1032
1078
|
]));
|
|
1033
1079
|
}
|
|
1034
|
-
}),
|
|
1035
|
-
|
|
1036
|
-
e.component(
|
|
1080
|
+
}), Qe = /* @__PURE__ */ Z(fa, [["__scopeId", "data-v-ab1ec9bc"]]);
|
|
1081
|
+
Qe.install = (e) => {
|
|
1082
|
+
e.component(Qe.__name, Qe);
|
|
1037
1083
|
};
|
|
1038
|
-
const
|
|
1084
|
+
const ha = { class: "highlight-node" }, va = /* @__PURE__ */ F({
|
|
1039
1085
|
__name: "HighlightNode",
|
|
1040
1086
|
props: {
|
|
1041
1087
|
node: {},
|
|
@@ -1043,23 +1089,24 @@ const fa = { class: "highlight-node" }, ha = /* @__PURE__ */ F({
|
|
|
1043
1089
|
indexKey: {}
|
|
1044
1090
|
},
|
|
1045
1091
|
setup(e) {
|
|
1046
|
-
const n = e, t =
|
|
1092
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
1047
1093
|
text: Ie,
|
|
1048
|
-
inline_code:
|
|
1049
|
-
link:
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1094
|
+
inline_code: ze,
|
|
1095
|
+
link: Ke,
|
|
1096
|
+
html_inline: Ae,
|
|
1097
|
+
strong: Ve,
|
|
1098
|
+
emphasis: tt,
|
|
1099
|
+
strikethrough: Oe,
|
|
1100
|
+
insert: Qe,
|
|
1101
|
+
subscript: Je,
|
|
1102
|
+
superscript: Ge,
|
|
1056
1103
|
emoji: je,
|
|
1057
1104
|
footnote_reference: De,
|
|
1058
|
-
math_inline:
|
|
1059
|
-
reference:
|
|
1105
|
+
math_inline: It,
|
|
1106
|
+
reference: Pe
|
|
1060
1107
|
}, t);
|
|
1061
|
-
return (a, d) => (m(), y("mark",
|
|
1062
|
-
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(
|
|
1108
|
+
return (a, d) => (m(), y("mark", ha, [
|
|
1109
|
+
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(Fe(s[c.type]), {
|
|
1063
1110
|
key: `${e.indexKey || "highlight"}-${f}`,
|
|
1064
1111
|
node: c,
|
|
1065
1112
|
"custom-id": n.customId,
|
|
@@ -1067,11 +1114,11 @@ const fa = { class: "highlight-node" }, ha = /* @__PURE__ */ F({
|
|
|
1067
1114
|
}, null, 8, ["node", "custom-id", "index-key"]))), 128))
|
|
1068
1115
|
]));
|
|
1069
1116
|
}
|
|
1070
|
-
}),
|
|
1071
|
-
|
|
1072
|
-
e.component(
|
|
1117
|
+
}), et = /* @__PURE__ */ Z(va, [["__scopeId", "data-v-38e31bf6"]]);
|
|
1118
|
+
et.install = (e) => {
|
|
1119
|
+
e.component(et.__name, et);
|
|
1073
1120
|
};
|
|
1074
|
-
const
|
|
1121
|
+
const pa = { class: "emphasis-node" }, ga = /* @__PURE__ */ F({
|
|
1075
1122
|
__name: "EmphasisNode",
|
|
1076
1123
|
props: {
|
|
1077
1124
|
node: {},
|
|
@@ -1079,23 +1126,24 @@ const va = { class: "emphasis-node" }, pa = /* @__PURE__ */ F({
|
|
|
1079
1126
|
indexKey: {}
|
|
1080
1127
|
},
|
|
1081
1128
|
setup(e) {
|
|
1082
|
-
const n = e, t =
|
|
1129
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
1083
1130
|
text: Ie,
|
|
1084
|
-
inline_code:
|
|
1085
|
-
link:
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1131
|
+
inline_code: ze,
|
|
1132
|
+
link: Ke,
|
|
1133
|
+
html_inline: Ae,
|
|
1134
|
+
strong: Ve,
|
|
1135
|
+
strikethrough: Oe,
|
|
1136
|
+
highlight: et,
|
|
1137
|
+
insert: Qe,
|
|
1138
|
+
subscript: Je,
|
|
1139
|
+
superscript: Ge,
|
|
1092
1140
|
emoji: je,
|
|
1093
1141
|
footnote_reference: De,
|
|
1094
|
-
math_inline:
|
|
1095
|
-
reference:
|
|
1142
|
+
math_inline: It,
|
|
1143
|
+
reference: Pe
|
|
1096
1144
|
}, t);
|
|
1097
|
-
return (a, d) => (m(), y("em",
|
|
1098
|
-
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(
|
|
1145
|
+
return (a, d) => (m(), y("em", pa, [
|
|
1146
|
+
(m(!0), y(ue, null, Be(e.node.children, (c, f) => (m(), ye(Fe(s[c.type]), {
|
|
1099
1147
|
key: `${e.indexKey || "emphasis"}-${f}`,
|
|
1100
1148
|
node: c,
|
|
1101
1149
|
"custom-id": n.customId,
|
|
@@ -1103,11 +1151,11 @@ const va = { class: "emphasis-node" }, pa = /* @__PURE__ */ F({
|
|
|
1103
1151
|
}, null, 8, ["node", "custom-id", "index-key"]))), 128))
|
|
1104
1152
|
]));
|
|
1105
1153
|
}
|
|
1106
|
-
}),
|
|
1107
|
-
|
|
1108
|
-
e.component(
|
|
1154
|
+
}), tt = /* @__PURE__ */ Z(ga, [["__scopeId", "data-v-8264674d"]]);
|
|
1155
|
+
tt.install = (e) => {
|
|
1156
|
+
e.component(tt.__name, tt);
|
|
1109
1157
|
};
|
|
1110
|
-
const
|
|
1158
|
+
const wa = ["href", "title"], ya = /* @__PURE__ */ F({
|
|
1111
1159
|
__name: "FootnoteAnchorNode",
|
|
1112
1160
|
props: {
|
|
1113
1161
|
node: {}
|
|
@@ -1126,13 +1174,13 @@ const ga = ["href", "title"], wa = /* @__PURE__ */ F({
|
|
|
1126
1174
|
href: `#fnref-${e.node.id}`,
|
|
1127
1175
|
title: `返回引用 ${e.node.id}`,
|
|
1128
1176
|
onClick: t
|
|
1129
|
-
}, " ↩︎ ", 8,
|
|
1177
|
+
}, " ↩︎ ", 8, wa));
|
|
1130
1178
|
}
|
|
1131
|
-
}),
|
|
1132
|
-
|
|
1133
|
-
e.component(
|
|
1179
|
+
}), un = /* @__PURE__ */ Z(ya, [["__scopeId", "data-v-4756ce0d"]]);
|
|
1180
|
+
un.install = (e) => {
|
|
1181
|
+
e.component(un.__name, un);
|
|
1134
1182
|
};
|
|
1135
|
-
const
|
|
1183
|
+
const ka = ["id"], xa = { class: "flex-1" }, _n = /* @__PURE__ */ F({
|
|
1136
1184
|
__name: "FootnoteNode",
|
|
1137
1185
|
props: {
|
|
1138
1186
|
node: {},
|
|
@@ -1147,8 +1195,8 @@ const ya = ["id"], ka = { class: "flex-1" }, _n = /* @__PURE__ */ F({
|
|
|
1147
1195
|
id: `fnref--${e.node.id}`,
|
|
1148
1196
|
class: "flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2"
|
|
1149
1197
|
}, [
|
|
1150
|
-
h("div",
|
|
1151
|
-
fn([n.node.children], () =>
|
|
1198
|
+
h("div", xa, [
|
|
1199
|
+
fn([n.node.children], () => ct($(lt), {
|
|
1152
1200
|
"index-key": `footnote-${n.indexKey}`,
|
|
1153
1201
|
nodes: n.node.children,
|
|
1154
1202
|
"custom-id": n.customId,
|
|
@@ -1156,25 +1204,25 @@ const ya = ["id"], ka = { class: "flex-1" }, _n = /* @__PURE__ */ F({
|
|
|
1156
1204
|
onCopy: s[0] || (s[0] = (a) => t.$emit("copy", a))
|
|
1157
1205
|
}, null, 8, ["index-key", "nodes", "custom-id", "typewriter"]), s, 1)
|
|
1158
1206
|
])
|
|
1159
|
-
], 8,
|
|
1207
|
+
], 8, ka));
|
|
1160
1208
|
}
|
|
1161
1209
|
});
|
|
1162
1210
|
_n.install = (e) => {
|
|
1163
1211
|
e.component(_n.__name, _n);
|
|
1164
1212
|
};
|
|
1165
|
-
const
|
|
1213
|
+
const ba = { class: "hard-break" }, Ma = /* @__PURE__ */ F({
|
|
1166
1214
|
__name: "HardBreakNode",
|
|
1167
1215
|
props: {
|
|
1168
1216
|
node: {}
|
|
1169
1217
|
},
|
|
1170
1218
|
setup(e) {
|
|
1171
|
-
return (n, t) => (m(), y("br",
|
|
1219
|
+
return (n, t) => (m(), y("br", ba));
|
|
1172
1220
|
}
|
|
1173
|
-
}),
|
|
1174
|
-
|
|
1175
|
-
e.component(
|
|
1221
|
+
}), Jt = /* @__PURE__ */ Z(Ma, [["__scopeId", "data-v-50c58f70"]]);
|
|
1222
|
+
Jt.install = (e) => {
|
|
1223
|
+
e.component(Jt.__name, Jt);
|
|
1176
1224
|
};
|
|
1177
|
-
const
|
|
1225
|
+
const Ca = /* @__PURE__ */ F({
|
|
1178
1226
|
__name: "HeadingNode",
|
|
1179
1227
|
props: {
|
|
1180
1228
|
node: {},
|
|
@@ -1182,35 +1230,35 @@ const Ma = /* @__PURE__ */ F({
|
|
|
1182
1230
|
indexKey: {}
|
|
1183
1231
|
},
|
|
1184
1232
|
setup(e) {
|
|
1185
|
-
const n = e, t =
|
|
1233
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
1186
1234
|
text: Ie,
|
|
1187
|
-
inline_code:
|
|
1188
|
-
link:
|
|
1189
|
-
image:
|
|
1190
|
-
strong:
|
|
1191
|
-
emphasis:
|
|
1192
|
-
strikethrough:
|
|
1193
|
-
highlight:
|
|
1194
|
-
insert:
|
|
1195
|
-
subscript:
|
|
1196
|
-
superscript:
|
|
1235
|
+
inline_code: ze,
|
|
1236
|
+
link: Ke,
|
|
1237
|
+
image: Pt,
|
|
1238
|
+
strong: Ve,
|
|
1239
|
+
emphasis: tt,
|
|
1240
|
+
strikethrough: Oe,
|
|
1241
|
+
highlight: et,
|
|
1242
|
+
insert: Qe,
|
|
1243
|
+
subscript: Je,
|
|
1244
|
+
superscript: Ge,
|
|
1197
1245
|
emoji: je,
|
|
1198
|
-
checkbox:
|
|
1199
|
-
checkbox_input:
|
|
1246
|
+
checkbox: _t,
|
|
1247
|
+
checkbox_input: _t,
|
|
1200
1248
|
footnote_reference: De,
|
|
1201
|
-
hardbreak:
|
|
1202
|
-
math_inline:
|
|
1203
|
-
reference:
|
|
1249
|
+
hardbreak: Jt,
|
|
1250
|
+
math_inline: It,
|
|
1251
|
+
reference: Pe
|
|
1204
1252
|
}, t);
|
|
1205
|
-
return (a, d) => fn([e.node.children], () => (m(), ye(
|
|
1206
|
-
class:
|
|
1253
|
+
return (a, d) => fn([e.node.children], () => (m(), ye(Fe(`h${e.node.level}`), {
|
|
1254
|
+
class: O(["heading-node", [`heading-${e.node.level}`]]),
|
|
1207
1255
|
dir: "auto"
|
|
1208
1256
|
}, {
|
|
1209
|
-
default:
|
|
1257
|
+
default: en(() => [
|
|
1210
1258
|
(m(!0), y(ue, null, Be(e.node.children, (c, f, w, v) => {
|
|
1211
1259
|
const b = [c];
|
|
1212
1260
|
if (v && v.key === `${e.indexKey || "heading"}-${f}` && jo(v, b)) return v;
|
|
1213
|
-
const C = (m(), ye(
|
|
1261
|
+
const C = (m(), ye(Fe(s[c.type]), {
|
|
1214
1262
|
key: `${e.indexKey || "heading"}-${f}`,
|
|
1215
1263
|
"custom-id": n.customId,
|
|
1216
1264
|
node: c,
|
|
@@ -1222,11 +1270,11 @@ const Ma = /* @__PURE__ */ F({
|
|
|
1222
1270
|
_: 1
|
|
1223
1271
|
}, 8, ["class"])), d, 2);
|
|
1224
1272
|
}
|
|
1225
|
-
}), oo = /* @__PURE__ */ Z(
|
|
1273
|
+
}), oo = /* @__PURE__ */ Z(Ca, [["__scopeId", "data-v-e3e7e2ce"]]), po = oo;
|
|
1226
1274
|
po.install = (e) => {
|
|
1227
1275
|
e.component(oo.__name, oo);
|
|
1228
1276
|
};
|
|
1229
|
-
const
|
|
1277
|
+
const Ta = /* @__PURE__ */ F({
|
|
1230
1278
|
__name: "ListItemNode",
|
|
1231
1279
|
props: {
|
|
1232
1280
|
item: {},
|
|
@@ -1240,11 +1288,11 @@ const Ca = /* @__PURE__ */ F({
|
|
|
1240
1288
|
const n = e, t = N(
|
|
1241
1289
|
() => n.value == null ? {} : { value: n.value }
|
|
1242
1290
|
);
|
|
1243
|
-
return (s, a) => (m(), y("li",
|
|
1291
|
+
return (s, a) => (m(), y("li", Kt({
|
|
1244
1292
|
class: "list-item pl-1.5 my-2",
|
|
1245
1293
|
dir: "auto"
|
|
1246
1294
|
}, t.value), [
|
|
1247
|
-
fn([n.item.children], () =>
|
|
1295
|
+
fn([n.item.children], () => ct($(lt), {
|
|
1248
1296
|
"index-key": `list-item-${n.indexKey}`,
|
|
1249
1297
|
nodes: n.item.children,
|
|
1250
1298
|
"custom-id": n.customId,
|
|
@@ -1254,11 +1302,11 @@ const Ca = /* @__PURE__ */ F({
|
|
|
1254
1302
|
}, null, 8, ["index-key", "nodes", "custom-id", "typewriter"]), a, 1)
|
|
1255
1303
|
], 16));
|
|
1256
1304
|
}
|
|
1257
|
-
}), Bn = /* @__PURE__ */ Z(
|
|
1305
|
+
}), Bn = /* @__PURE__ */ Z(Ta, [["__scopeId", "data-v-7a618746"]]);
|
|
1258
1306
|
Bn.install = (e) => {
|
|
1259
1307
|
e.component(Bn.__name, Bn);
|
|
1260
1308
|
};
|
|
1261
|
-
const
|
|
1309
|
+
const _a = /* @__PURE__ */ F({
|
|
1262
1310
|
__name: "ListNode",
|
|
1263
1311
|
props: {
|
|
1264
1312
|
node: {},
|
|
@@ -1268,10 +1316,10 @@ const Ta = /* @__PURE__ */ F({
|
|
|
1268
1316
|
},
|
|
1269
1317
|
emits: ["copy"],
|
|
1270
1318
|
setup(e) {
|
|
1271
|
-
return (n, t) => (m(), ye(
|
|
1272
|
-
class:
|
|
1319
|
+
return (n, t) => (m(), ye(Fe(e.node.ordered ? "ol" : "ul"), {
|
|
1320
|
+
class: O(["list-node", { "list-decimal": e.node.ordered, "list-disc": !e.node.ordered }])
|
|
1273
1321
|
}, {
|
|
1274
|
-
default:
|
|
1322
|
+
default: en(() => [
|
|
1275
1323
|
(m(!0), y(ue, null, Be(e.node.items, (s, a, d, c) => {
|
|
1276
1324
|
var v;
|
|
1277
1325
|
const f = [s];
|
|
@@ -1291,12 +1339,12 @@ const Ta = /* @__PURE__ */ F({
|
|
|
1291
1339
|
_: 1
|
|
1292
1340
|
}, 8, ["class"]));
|
|
1293
1341
|
}
|
|
1294
|
-
}), In = /* @__PURE__ */ Z(
|
|
1342
|
+
}), In = /* @__PURE__ */ Z(_a, [["__scopeId", "data-v-79057d57"]]);
|
|
1295
1343
|
In.install = (e) => {
|
|
1296
1344
|
e.component(In.__name, In);
|
|
1297
1345
|
};
|
|
1298
|
-
const
|
|
1299
|
-
function
|
|
1346
|
+
const Ba = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cpath%20fill='none'%20stroke='%23ca9ee6'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M1.5%202.5c0%206%202.25%205.75%204%207%20.83.67%201.17%202%201%204h3c-.17-2%20.17-3.33%201-4%201.75-1.25%204-1%204-7C12%202.5%2010%203%208%207%206%203%204%202.5%201.5%202.5'%20/%3e%3c/svg%3e";
|
|
1347
|
+
function Ia(e) {
|
|
1300
1348
|
try {
|
|
1301
1349
|
if (typeof globalThis != "undefined" && typeof globalThis.requestAnimationFrame == "function")
|
|
1302
1350
|
return globalThis.requestAnimationFrame(e);
|
|
@@ -1305,12 +1353,12 @@ function Ba(e) {
|
|
|
1305
1353
|
return globalThis.setTimeout(e, 0);
|
|
1306
1354
|
}
|
|
1307
1355
|
const go = () => import("mermaid");
|
|
1308
|
-
let
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1356
|
+
let cn = null, wo = go;
|
|
1357
|
+
function $a() {
|
|
1358
|
+
cn = null;
|
|
1311
1359
|
}
|
|
1312
1360
|
function Yo(e) {
|
|
1313
|
-
wo = e,
|
|
1361
|
+
wo = e, $a();
|
|
1314
1362
|
}
|
|
1315
1363
|
function Ll(e) {
|
|
1316
1364
|
Yo(e != null ? e : go);
|
|
@@ -1318,10 +1366,10 @@ function Ll(e) {
|
|
|
1318
1366
|
function Rl() {
|
|
1319
1367
|
Yo(null);
|
|
1320
1368
|
}
|
|
1321
|
-
function
|
|
1369
|
+
function Sa() {
|
|
1322
1370
|
return typeof wo == "function";
|
|
1323
1371
|
}
|
|
1324
|
-
function
|
|
1372
|
+
function Ea(e) {
|
|
1325
1373
|
if (!e)
|
|
1326
1374
|
return e;
|
|
1327
1375
|
const n = e && e.default ? e.default : e;
|
|
@@ -1329,7 +1377,7 @@ function Sa(e) {
|
|
|
1329
1377
|
return n;
|
|
1330
1378
|
if (n && n.mermaidAPI && (typeof n.mermaidAPI.render == "function" || typeof n.mermaidAPI.parse == "function")) {
|
|
1331
1379
|
const t = n.mermaidAPI;
|
|
1332
|
-
return
|
|
1380
|
+
return Mt(oe({}, n), {
|
|
1333
1381
|
render: t.render.bind(t),
|
|
1334
1382
|
parse: t.parse ? t.parse.bind(t) : void 0,
|
|
1335
1383
|
initialize: (s) => typeof n.initialize == "function" ? n.initialize(s) : t.initialize ? t.initialize(s) : void 0
|
|
@@ -1337,7 +1385,7 @@ function Sa(e) {
|
|
|
1337
1385
|
}
|
|
1338
1386
|
return e.mermaid && typeof e.mermaid.render == "function" ? e.mermaid : n;
|
|
1339
1387
|
}
|
|
1340
|
-
function
|
|
1388
|
+
function La(e) {
|
|
1341
1389
|
if (e)
|
|
1342
1390
|
try {
|
|
1343
1391
|
const n = e == null ? void 0 : e.initialize;
|
|
@@ -1351,10 +1399,10 @@ function Ea(e) {
|
|
|
1351
1399
|
} catch (n) {
|
|
1352
1400
|
}
|
|
1353
1401
|
}
|
|
1354
|
-
function
|
|
1402
|
+
function Ra() {
|
|
1355
1403
|
return z(this, null, function* () {
|
|
1356
|
-
if (
|
|
1357
|
-
return
|
|
1404
|
+
if (cn)
|
|
1405
|
+
return cn;
|
|
1358
1406
|
const e = wo;
|
|
1359
1407
|
if (!e)
|
|
1360
1408
|
return null;
|
|
@@ -1364,12 +1412,12 @@ function La() {
|
|
|
1364
1412
|
} catch (t) {
|
|
1365
1413
|
throw e === go ? new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.') : t;
|
|
1366
1414
|
}
|
|
1367
|
-
return n ? (
|
|
1415
|
+
return n ? (cn = Ea(n), La(cn), cn) : null;
|
|
1368
1416
|
});
|
|
1369
1417
|
}
|
|
1370
|
-
let _e = null,
|
|
1371
|
-
const Me = /* @__PURE__ */ new Map(),
|
|
1372
|
-
let Jn =
|
|
1418
|
+
let _e = null, Vt = null;
|
|
1419
|
+
const Me = /* @__PURE__ */ new Map(), Na = 5;
|
|
1420
|
+
let Jn = Na, ro = !1;
|
|
1373
1421
|
function Nl(e) {
|
|
1374
1422
|
ro = !!e;
|
|
1375
1423
|
}
|
|
@@ -1379,9 +1427,9 @@ function Hl(e) {
|
|
|
1379
1427
|
function jl() {
|
|
1380
1428
|
return { inFlight: Me.size, max: Jn };
|
|
1381
1429
|
}
|
|
1382
|
-
const
|
|
1430
|
+
const Ha = "WORKER_BUSY", ja = "MERMAID_DISABLED";
|
|
1383
1431
|
function Dl(e) {
|
|
1384
|
-
_e = e,
|
|
1432
|
+
_e = e, Vt = null;
|
|
1385
1433
|
const n = e;
|
|
1386
1434
|
_e.onmessage = (t) => {
|
|
1387
1435
|
if (_e !== n)
|
|
@@ -1429,24 +1477,24 @@ function Al() {
|
|
|
1429
1477
|
Me.clear(), (e = _e.terminate) == null || e.call(_e);
|
|
1430
1478
|
} catch (n) {
|
|
1431
1479
|
}
|
|
1432
|
-
_e = null,
|
|
1480
|
+
_e = null, Vt = null;
|
|
1433
1481
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return _e || (
|
|
1482
|
+
function Da() {
|
|
1483
|
+
return _e || (Vt = new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."), Vt.name = "WorkerInitError", Vt.code = "WORKER_INIT_ERROR", null);
|
|
1436
1484
|
}
|
|
1437
1485
|
function Uo(e, n, t = 1400) {
|
|
1438
|
-
if (
|
|
1486
|
+
if (!Sa()) {
|
|
1439
1487
|
const a = new Error("Mermaid rendering disabled");
|
|
1440
|
-
return a.name = "MermaidDisabled", a.code =
|
|
1488
|
+
return a.name = "MermaidDisabled", a.code = ja, Promise.reject(a);
|
|
1441
1489
|
}
|
|
1442
|
-
if (
|
|
1443
|
-
return Promise.reject(
|
|
1444
|
-
const s =
|
|
1490
|
+
if (Vt)
|
|
1491
|
+
return Promise.reject(Vt);
|
|
1492
|
+
const s = Da();
|
|
1445
1493
|
if (!s)
|
|
1446
|
-
return Promise.reject(
|
|
1494
|
+
return Promise.reject(Vt);
|
|
1447
1495
|
if (Me.size >= Jn) {
|
|
1448
1496
|
const a = new Error("Worker busy");
|
|
1449
|
-
return a.name = "WorkerBusy", a.code =
|
|
1497
|
+
return a.name = "WorkerBusy", a.code = Ha, a.inFlight = Me.size, a.max = Jn, Promise.reject(a);
|
|
1450
1498
|
}
|
|
1451
1499
|
return new Promise((a, d) => {
|
|
1452
1500
|
const c = Math.random().toString(36).slice(2);
|
|
@@ -1476,7 +1524,7 @@ function Uo(e, n, t = 1400) {
|
|
|
1476
1524
|
}, t);
|
|
1477
1525
|
});
|
|
1478
1526
|
}
|
|
1479
|
-
function
|
|
1527
|
+
function Aa(e, n, t = 1400) {
|
|
1480
1528
|
return z(this, null, function* () {
|
|
1481
1529
|
try {
|
|
1482
1530
|
return yield Uo("canParse", { code: e, theme: n }, t);
|
|
@@ -1485,7 +1533,7 @@ function Da(e, n, t = 1400) {
|
|
|
1485
1533
|
}
|
|
1486
1534
|
});
|
|
1487
1535
|
}
|
|
1488
|
-
function
|
|
1536
|
+
function za(e, n, t = 1400) {
|
|
1489
1537
|
return z(this, null, function* () {
|
|
1490
1538
|
try {
|
|
1491
1539
|
return yield Uo("findPrefix", { code: e, theme: n }, t);
|
|
@@ -1504,13 +1552,13 @@ function Bo() {
|
|
|
1504
1552
|
_e = null;
|
|
1505
1553
|
}
|
|
1506
1554
|
}
|
|
1507
|
-
const
|
|
1555
|
+
const Pa = { key: 0 }, Va = {
|
|
1508
1556
|
key: 1,
|
|
1509
1557
|
class: "flex items-center space-x-2 overflow-hidden"
|
|
1510
|
-
},
|
|
1558
|
+
}, Oa = ["src"], Ka = { key: 2 }, Fa = { class: "flex items-center space-x-1" }, Wa = { class: "flex items-center space-x-1" }, Xa = { key: 4 }, Ya = {
|
|
1511
1559
|
key: 5,
|
|
1512
1560
|
class: "flex items-center space-x-1"
|
|
1513
|
-
},
|
|
1561
|
+
}, Ua = ["aria-pressed"], qa = {
|
|
1514
1562
|
key: 0,
|
|
1515
1563
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1516
1564
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -1520,7 +1568,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1520
1568
|
height: "1em",
|
|
1521
1569
|
viewBox: "0 0 24 24",
|
|
1522
1570
|
class: "w-3 h-3"
|
|
1523
|
-
},
|
|
1571
|
+
}, Za = {
|
|
1524
1572
|
key: 1,
|
|
1525
1573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1526
1574
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -1530,7 +1578,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1530
1578
|
height: "1em",
|
|
1531
1579
|
viewBox: "0 0 24 24",
|
|
1532
1580
|
class: "w-3 h-3"
|
|
1533
|
-
},
|
|
1581
|
+
}, Ga = ["disabled"], Ja = ["disabled"], Qa = {
|
|
1534
1582
|
key: 0,
|
|
1535
1583
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1536
1584
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -1539,7 +1587,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1539
1587
|
width: "0.75rem",
|
|
1540
1588
|
height: "0.75rem",
|
|
1541
1589
|
viewBox: "0 0 24 24"
|
|
1542
|
-
},
|
|
1590
|
+
}, ei = {
|
|
1543
1591
|
key: 1,
|
|
1544
1592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1545
1593
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -1548,13 +1596,13 @@ const za = { key: 0 }, Pa = {
|
|
|
1548
1596
|
width: "0.75rem",
|
|
1549
1597
|
height: "0.75rem",
|
|
1550
1598
|
viewBox: "0 0 24 24"
|
|
1551
|
-
},
|
|
1599
|
+
}, ti = {
|
|
1552
1600
|
key: 1,
|
|
1553
1601
|
class: "relative"
|
|
1554
|
-
},
|
|
1602
|
+
}, ni = {
|
|
1555
1603
|
key: 0,
|
|
1556
1604
|
class: "absolute top-2 right-2 z-10 rounded-lg"
|
|
1557
|
-
},
|
|
1605
|
+
}, oi = { class: "flex items-center gap-2 backdrop-blur rounded-lg" }, ri = { class: "absolute top-6 right-6 z-50 flex items-center gap-2" }, ai = 300, ii = 500, si = 3, li = /* @__PURE__ */ F({
|
|
1558
1606
|
__name: "MermaidBlockNode",
|
|
1559
1607
|
props: {
|
|
1560
1608
|
node: {},
|
|
@@ -1683,7 +1731,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1683
1731
|
function re() {
|
|
1684
1732
|
return z(this, null, function* () {
|
|
1685
1733
|
try {
|
|
1686
|
-
const r = yield
|
|
1734
|
+
const r = yield Ra();
|
|
1687
1735
|
return d.value = !!r, r;
|
|
1688
1736
|
} catch (r) {
|
|
1689
1737
|
throw d.value = !1, r;
|
|
@@ -1701,47 +1749,47 @@ const za = { key: 0 }, Pa = {
|
|
|
1701
1749
|
d.value = !1, console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.", o);
|
|
1702
1750
|
}
|
|
1703
1751
|
});
|
|
1704
|
-
const G = M(!1), ne = M(!1), de = M(), D = M(),
|
|
1752
|
+
const G = M(!1), ne = M(!1), de = M(), D = M(), We = M(), ce = M(null), Ee = fo(), gt = M(null), W = M(typeof window == "undefined"), Ht = M(), ae = N(() => t.node.code.replace(/\]::([^:])/g, "]:::$1").replace(/:::subgraphNode$/gm, "::subgraphNode"));
|
|
1705
1753
|
function Se(r, o = ae.value) {
|
|
1706
1754
|
const l = o, R = `%%{init: {"theme": "${r === "dark" ? "dark" : "default"}"}}%%
|
|
1707
1755
|
`;
|
|
1708
1756
|
return l.trim().startsWith("%%{") ? l : R + l;
|
|
1709
1757
|
}
|
|
1710
|
-
const I = M(1), J = M(0), Y = M(0), Le = M(!1),
|
|
1711
|
-
let ke = null, Ce = null,
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1714
|
-
|
|
1758
|
+
const I = M(1), J = M(0), Y = M(0), Le = M(!1), Xe = M({ x: 0, y: 0 }), q = M(!1), ve = M(!1), ie = M(!1), $t = M(null), wt = M(0), St = M(!1);
|
|
1759
|
+
let ke = null, Ce = null, yt = 0;
|
|
1760
|
+
const jt = (yn = globalThis.requestIdleCallback) != null ? yn : ((r, o) => setTimeout(() => r({ didTimeout: !0 }), 16)), dt = Kn(() => {
|
|
1761
|
+
jt(() => {
|
|
1762
|
+
Ut();
|
|
1715
1763
|
}, { timeout: 500 });
|
|
1716
|
-
},
|
|
1717
|
-
function
|
|
1764
|
+
}, ai);
|
|
1765
|
+
function nt() {
|
|
1718
1766
|
Ce != null && (globalThis.clearTimeout(Ce), Ce = null);
|
|
1719
1767
|
}
|
|
1720
1768
|
function xe(r = 600) {
|
|
1721
1769
|
if (typeof globalThis == "undefined")
|
|
1722
1770
|
return;
|
|
1723
1771
|
const o = Math.max(0, r);
|
|
1724
|
-
|
|
1772
|
+
nt();
|
|
1725
1773
|
const l = () => {
|
|
1726
1774
|
if (Ce = null, t.loading || ie.value || !W.value) {
|
|
1727
1775
|
const k = Math.min(1200, Math.max(300, o * 1.2));
|
|
1728
1776
|
xe(k);
|
|
1729
1777
|
return;
|
|
1730
1778
|
}
|
|
1731
|
-
|
|
1779
|
+
dt();
|
|
1732
1780
|
};
|
|
1733
1781
|
Ce = globalThis.setTimeout(l, o);
|
|
1734
1782
|
}
|
|
1735
1783
|
const Q = M("360px");
|
|
1736
1784
|
let be = null;
|
|
1737
|
-
const le = M(!1), $e = M(!1),
|
|
1785
|
+
const le = M(!1), $e = M(!1), ot = M({}), kt = M(null), Re = M(""), Ft = M(0);
|
|
1738
1786
|
let pe = null;
|
|
1739
1787
|
const g = M(!1), x = M({
|
|
1740
1788
|
zoom: 1,
|
|
1741
1789
|
translateX: 0,
|
|
1742
1790
|
translateY: 0,
|
|
1743
1791
|
containerHeight: "360px"
|
|
1744
|
-
}), B = N(() => t.enableWheelZoom ? { wheel: Te } : {}),
|
|
1792
|
+
}), B = N(() => t.enableWheelZoom ? { wheel: Te } : {}), K = N(() => {
|
|
1745
1793
|
var r, o, l, k;
|
|
1746
1794
|
return {
|
|
1747
1795
|
worker: (r = t.workerTimeoutMs) != null ? r : 1400,
|
|
@@ -1749,27 +1797,27 @@ const za = { key: 0 }, Pa = {
|
|
|
1749
1797
|
render: (l = t.renderTimeoutMs) != null ? l : 2500,
|
|
1750
1798
|
fullRender: (k = t.fullRenderTimeoutMs) != null ? k : 4e3
|
|
1751
1799
|
};
|
|
1752
|
-
}),
|
|
1753
|
-
let
|
|
1800
|
+
}), Ye = (kn = globalThis.cancelIdleCallback) != null ? kn : ((r) => clearTimeout(r));
|
|
1801
|
+
let mt = null, rt = null, Dt = !1, ft = 800, Ue = null, tn = 0, Et = !0;
|
|
1754
1802
|
typeof window != "undefined" && U(
|
|
1755
1803
|
() => de.value,
|
|
1756
1804
|
(r) => {
|
|
1757
1805
|
var l;
|
|
1758
|
-
if ((l =
|
|
1806
|
+
if ((l = gt.value) == null || l.destroy(), gt.value = null, !r) {
|
|
1759
1807
|
W.value = !1;
|
|
1760
1808
|
return;
|
|
1761
1809
|
}
|
|
1762
1810
|
const o = Ee(r, { rootMargin: "400px" });
|
|
1763
|
-
|
|
1811
|
+
gt.value = o, W.value = o.isVisible.value, o.whenVisible.then(() => {
|
|
1764
1812
|
W.value = !0;
|
|
1765
1813
|
});
|
|
1766
1814
|
},
|
|
1767
1815
|
{ immediate: !0 }
|
|
1768
1816
|
), hn(() => {
|
|
1769
1817
|
var r;
|
|
1770
|
-
(r =
|
|
1818
|
+
(r = gt.value) == null || r.destroy(), gt.value = null;
|
|
1771
1819
|
});
|
|
1772
|
-
function
|
|
1820
|
+
function ht(r, o) {
|
|
1773
1821
|
const l = o == null ? void 0 : o.timeoutMs, k = o == null ? void 0 : o.signal;
|
|
1774
1822
|
if (k != null && k.aborted)
|
|
1775
1823
|
return Promise.reject(new DOMException("Aborted", "AbortError"));
|
|
@@ -1782,31 +1830,31 @@ const za = { key: 0 }, Pa = {
|
|
|
1782
1830
|
E || (E = !0, we(), me(new Error("Operation timed out")));
|
|
1783
1831
|
}, l)), k && (V = () => {
|
|
1784
1832
|
E || (E = !0, we(), me(new DOMException("Aborted", "AbortError")));
|
|
1785
|
-
}, k.addEventListener("abort", V)), r().then((
|
|
1786
|
-
E || (E = !0, we(), P(
|
|
1787
|
-
}).catch((
|
|
1788
|
-
E || (E = !0, we(), me(
|
|
1833
|
+
}, k.addEventListener("abort", V)), r().then((ln) => {
|
|
1834
|
+
E || (E = !0, we(), P(ln));
|
|
1835
|
+
}).catch((ln) => {
|
|
1836
|
+
E || (E = !0, we(), me(ln));
|
|
1789
1837
|
});
|
|
1790
1838
|
});
|
|
1791
1839
|
}
|
|
1792
|
-
function
|
|
1840
|
+
function Wt(r) {
|
|
1793
1841
|
if (typeof document == "undefined" || !D.value)
|
|
1794
1842
|
return;
|
|
1795
1843
|
const o = document.createElement("div");
|
|
1796
1844
|
o.className = "text-red-500 p-4", o.textContent = "Failed to render diagram: ";
|
|
1797
1845
|
const l = document.createElement("span");
|
|
1798
|
-
l.textContent = r instanceof Error ? r.message : "Unknown error", o.appendChild(l), ee(D.value), D.value.appendChild(o), Q.value = "360px", g.value = !0,
|
|
1846
|
+
l.textContent = r instanceof Error ? r.message : "Unknown error", o.appendChild(l), ee(D.value), D.value.appendChild(o), Q.value = "360px", g.value = !0, pt();
|
|
1799
1847
|
}
|
|
1800
|
-
function
|
|
1848
|
+
function Lt(r) {
|
|
1801
1849
|
const o = typeof r == "string" ? r : typeof (r == null ? void 0 : r.message) == "string" ? r.message : "";
|
|
1802
1850
|
return typeof o == "string" && /timed out/i.test(o);
|
|
1803
1851
|
}
|
|
1804
|
-
function
|
|
1852
|
+
function At(r) {
|
|
1805
1853
|
const o = r;
|
|
1806
1854
|
return !o || o.disabled;
|
|
1807
1855
|
}
|
|
1808
1856
|
function ge(r, o, l = "top") {
|
|
1809
|
-
if (
|
|
1857
|
+
if (At(r.currentTarget))
|
|
1810
1858
|
return;
|
|
1811
1859
|
const k = r, R = (k == null ? void 0 : k.clientX) != null && (k == null ? void 0 : k.clientY) != null ? { x: k.clientX, y: k.clientY } : void 0;
|
|
1812
1860
|
Dn(r.currentTarget, o, l, !1, R, t.isDark);
|
|
@@ -1815,7 +1863,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1815
1863
|
uo();
|
|
1816
1864
|
}
|
|
1817
1865
|
function Pn(r) {
|
|
1818
|
-
if (
|
|
1866
|
+
if (At(r.currentTarget))
|
|
1819
1867
|
return;
|
|
1820
1868
|
const o = G.value ? T("common.copied") || "Copied" : T("common.copy") || "Copy", l = r, k = (l == null ? void 0 : l.clientX) != null && (l == null ? void 0 : l.clientY) != null ? { x: l.clientX, y: l.clientY } : void 0;
|
|
1821
1869
|
Dn(r.currentTarget, o, "top", !1, k, t.isDark);
|
|
@@ -1826,7 +1874,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1826
1874
|
return r.trimStart().startsWith("%%{") ? r : k + r;
|
|
1827
1875
|
}
|
|
1828
1876
|
function pn() {
|
|
1829
|
-
return
|
|
1877
|
+
return Et && !q.value && !le.value && !g.value;
|
|
1830
1878
|
}
|
|
1831
1879
|
function gn(r) {
|
|
1832
1880
|
const o = r.split(/\r?\n/);
|
|
@@ -1853,22 +1901,22 @@ const za = { key: 0 }, Pa = {
|
|
|
1853
1901
|
return;
|
|
1854
1902
|
const R = k, E = Vn(r, o);
|
|
1855
1903
|
if (typeof R.parse == "function")
|
|
1856
|
-
return yield
|
|
1857
|
-
timeoutMs: (P = l == null ? void 0 : l.timeoutMs) != null ? P :
|
|
1904
|
+
return yield ht(() => R.parse(E), {
|
|
1905
|
+
timeoutMs: (P = l == null ? void 0 : l.timeoutMs) != null ? P : K.value.parse,
|
|
1858
1906
|
signal: l == null ? void 0 : l.signal
|
|
1859
1907
|
}), !0;
|
|
1860
1908
|
const V = `mermaid-parse-${Math.random().toString(36).slice(2, 9)}`;
|
|
1861
|
-
return yield
|
|
1862
|
-
timeoutMs: (me = l == null ? void 0 : l.timeoutMs) != null ? me :
|
|
1909
|
+
return yield ht(() => k.render(V, E), {
|
|
1910
|
+
timeoutMs: (me = l == null ? void 0 : l.timeoutMs) != null ? me : K.value.render,
|
|
1863
1911
|
signal: l == null ? void 0 : l.signal
|
|
1864
1912
|
}), !0;
|
|
1865
1913
|
});
|
|
1866
1914
|
}
|
|
1867
|
-
function
|
|
1915
|
+
function Xt(r, o, l) {
|
|
1868
1916
|
return z(this, null, function* () {
|
|
1869
1917
|
var k;
|
|
1870
1918
|
try {
|
|
1871
|
-
return yield
|
|
1919
|
+
return yield Aa(r, o, (k = l == null ? void 0 : l.timeoutMs) != null ? k : K.value.worker);
|
|
1872
1920
|
} catch (R) {
|
|
1873
1921
|
return yield Qn(r, o, l);
|
|
1874
1922
|
}
|
|
@@ -1878,7 +1926,7 @@ const za = { key: 0 }, Pa = {
|
|
|
1878
1926
|
return z(this, null, function* () {
|
|
1879
1927
|
var R;
|
|
1880
1928
|
try {
|
|
1881
|
-
if (yield
|
|
1929
|
+
if (yield Xt(r, o, l))
|
|
1882
1930
|
return { fullOk: !0, prefixOk: !1 };
|
|
1883
1931
|
} catch (E) {
|
|
1884
1932
|
if ((E == null ? void 0 : E.name) === "AbortError")
|
|
@@ -1888,11 +1936,11 @@ const za = { key: 0 }, Pa = {
|
|
|
1888
1936
|
if (k && k.trim() && k !== r)
|
|
1889
1937
|
try {
|
|
1890
1938
|
try {
|
|
1891
|
-
const V = yield
|
|
1939
|
+
const V = yield za(r, o, (R = l == null ? void 0 : l.timeoutMs) != null ? R : K.value.worker);
|
|
1892
1940
|
V && V.trim() && (k = V);
|
|
1893
1941
|
} catch (V) {
|
|
1894
1942
|
}
|
|
1895
|
-
if (yield
|
|
1943
|
+
if (yield Xt(k, o, l))
|
|
1896
1944
|
return { fullOk: !1, prefixOk: !0, prefix: k };
|
|
1897
1945
|
} catch (E) {
|
|
1898
1946
|
if ((E == null ? void 0 : E.name) === "AbortError")
|
|
@@ -1901,8 +1949,8 @@ const za = { key: 0 }, Pa = {
|
|
|
1901
1949
|
return { fullOk: !1, prefixOk: !1 };
|
|
1902
1950
|
});
|
|
1903
1951
|
}
|
|
1904
|
-
const
|
|
1905
|
-
function
|
|
1952
|
+
const nn = N(() => q.value || ie.value || ne.value);
|
|
1953
|
+
function on(r) {
|
|
1906
1954
|
if (!de.value || !D.value)
|
|
1907
1955
|
return;
|
|
1908
1956
|
const o = D.value.querySelector("svg");
|
|
@@ -1928,14 +1976,14 @@ const za = { key: 0 }, Pa = {
|
|
|
1928
1976
|
we > k && (we = k), Q.value = `${we}px`;
|
|
1929
1977
|
}
|
|
1930
1978
|
}
|
|
1931
|
-
const
|
|
1979
|
+
const vt = M(!1), wn = N(() => ({
|
|
1932
1980
|
transform: `translate(${J.value}px, ${Y.value}px) scale(${I.value})`
|
|
1933
1981
|
}));
|
|
1934
1982
|
function On(r) {
|
|
1935
|
-
r.key === "Escape" &&
|
|
1983
|
+
r.key === "Escape" && vt.value && rn();
|
|
1936
1984
|
}
|
|
1937
1985
|
function to() {
|
|
1938
|
-
if (
|
|
1986
|
+
if (vt.value = !0, typeof document != "undefined")
|
|
1939
1987
|
try {
|
|
1940
1988
|
document.body.style.overflow = "hidden";
|
|
1941
1989
|
} catch (r) {
|
|
@@ -1946,18 +1994,18 @@ const za = { key: 0 }, Pa = {
|
|
|
1946
1994
|
} catch (r) {
|
|
1947
1995
|
}
|
|
1948
1996
|
he(() => {
|
|
1949
|
-
if (de.value &&
|
|
1997
|
+
if (de.value && We.value) {
|
|
1950
1998
|
const r = de.value.cloneNode(!0);
|
|
1951
1999
|
r.classList.add("fullscreen");
|
|
1952
2000
|
const o = r.querySelector(
|
|
1953
2001
|
"[data-mermaid-wrapper]"
|
|
1954
2002
|
);
|
|
1955
|
-
o && (ce.value = o, o.style.transform = wn.value.transform), ee(
|
|
2003
|
+
o && (ce.value = o, o.style.transform = wn.value.transform), ee(We.value), We.value.appendChild(r);
|
|
1956
2004
|
}
|
|
1957
2005
|
});
|
|
1958
2006
|
}
|
|
1959
|
-
function
|
|
1960
|
-
if (
|
|
2007
|
+
function rn() {
|
|
2008
|
+
if (vt.value = !1, We.value && ee(We.value), ce.value = null, typeof document != "undefined")
|
|
1961
2009
|
try {
|
|
1962
2010
|
document.body.style.overflow = "";
|
|
1963
2011
|
} catch (r) {
|
|
@@ -1978,14 +2026,14 @@ const za = { key: 0 }, Pa = {
|
|
|
1978
2026
|
if (!q.value || !d.value)
|
|
1979
2027
|
return;
|
|
1980
2028
|
const r = ae.value.length;
|
|
1981
|
-
r !==
|
|
1982
|
-
|
|
1983
|
-
},
|
|
2029
|
+
r !== wt.value && (St.value = !0, wt.value = r, ke && clearTimeout(ke), ke = setTimeout(() => {
|
|
2030
|
+
St.value && q.value && ae.value.trim() && (St.value = !1, xt("preview"));
|
|
2031
|
+
}, ii));
|
|
1984
2032
|
}
|
|
1985
2033
|
U(
|
|
1986
2034
|
wn,
|
|
1987
2035
|
(r) => {
|
|
1988
|
-
|
|
2036
|
+
vt.value && ce.value && (ce.value.style.transform = r.transform);
|
|
1989
2037
|
},
|
|
1990
2038
|
{ immediate: !0 }
|
|
1991
2039
|
);
|
|
@@ -1999,10 +2047,10 @@ const za = { key: 0 }, Pa = {
|
|
|
1999
2047
|
I.value = 1, J.value = 0, Y.value = 0;
|
|
2000
2048
|
}
|
|
2001
2049
|
function L(r) {
|
|
2002
|
-
Le.value = !0, r instanceof MouseEvent ?
|
|
2050
|
+
Le.value = !0, r instanceof MouseEvent ? Xe.value = {
|
|
2003
2051
|
x: r.clientX - J.value,
|
|
2004
2052
|
y: r.clientY - Y.value
|
|
2005
|
-
} :
|
|
2053
|
+
} : Xe.value = {
|
|
2006
2054
|
x: r.touches[0].clientX - J.value,
|
|
2007
2055
|
y: r.touches[0].clientY - Y.value
|
|
2008
2056
|
};
|
|
@@ -2011,7 +2059,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2011
2059
|
if (!Le.value)
|
|
2012
2060
|
return;
|
|
2013
2061
|
let o, l;
|
|
2014
|
-
r instanceof MouseEvent ? (o = r.clientX, l = r.clientY) : (o = r.touches[0].clientX, l = r.touches[0].clientY), J.value = o -
|
|
2062
|
+
r instanceof MouseEvent ? (o = r.clientX, l = r.clientY) : (o = r.touches[0].clientX, l = r.touches[0].clientY), J.value = o - Xe.value.x, Y.value = l - Xe.value.y;
|
|
2015
2063
|
}
|
|
2016
2064
|
function X() {
|
|
2017
2065
|
Le.value = !1;
|
|
@@ -2024,7 +2072,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2024
2072
|
Wn !== I.value && (J.value = V - me * Wn, Y.value = P - we * Wn, I.value = Wn);
|
|
2025
2073
|
}
|
|
2026
2074
|
}
|
|
2027
|
-
function
|
|
2075
|
+
function qe() {
|
|
2028
2076
|
return z(this, null, function* () {
|
|
2029
2077
|
try {
|
|
2030
2078
|
typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(ae.value)), G.value = !0, s("copy", ae.value), setTimeout(() => {
|
|
@@ -2035,7 +2083,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2035
2083
|
}
|
|
2036
2084
|
});
|
|
2037
2085
|
}
|
|
2038
|
-
function
|
|
2086
|
+
function at(r, o = null) {
|
|
2039
2087
|
return z(this, null, function* () {
|
|
2040
2088
|
try {
|
|
2041
2089
|
const l = o != null ? o : new XMLSerializer().serializeToString(r), k = new Blob([l], { type: "image/svg+xml;charset=utf-8" }), R = URL.createObjectURL(k);
|
|
@@ -2069,9 +2117,9 @@ const za = { key: 0 }, Pa = {
|
|
|
2069
2117
|
svgElement: r,
|
|
2070
2118
|
svgString: o
|
|
2071
2119
|
};
|
|
2072
|
-
s("export", l), l.defaultPrevented ||
|
|
2120
|
+
s("export", l), l.defaultPrevented || at(r, o);
|
|
2073
2121
|
}
|
|
2074
|
-
function
|
|
2122
|
+
function it() {
|
|
2075
2123
|
var k, R;
|
|
2076
2124
|
const r = (R = (k = D.value) == null ? void 0 : k.querySelector("svg")) != null ? R : null, o = r ? new XMLSerializer().serializeToString(r) : null, l = {
|
|
2077
2125
|
payload: { type: "open-modal" },
|
|
@@ -2084,7 +2132,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2084
2132
|
};
|
|
2085
2133
|
s("openModal", l), l.defaultPrevented || to();
|
|
2086
2134
|
}
|
|
2087
|
-
function
|
|
2135
|
+
function zt(r) {
|
|
2088
2136
|
const o = {
|
|
2089
2137
|
payload: { type: "toggle-mode", target: r },
|
|
2090
2138
|
defaultPrevented: !1,
|
|
@@ -2092,11 +2140,11 @@ const za = { key: 0 }, Pa = {
|
|
|
2092
2140
|
this.defaultPrevented = !0;
|
|
2093
2141
|
}
|
|
2094
2142
|
};
|
|
2095
|
-
s("toggleMode", r, o), o.defaultPrevented ||
|
|
2143
|
+
s("toggleMode", r, o), o.defaultPrevented || xt(r);
|
|
2096
2144
|
}
|
|
2097
|
-
function
|
|
2145
|
+
function xt(r) {
|
|
2098
2146
|
return z(this, null, function* () {
|
|
2099
|
-
const o =
|
|
2147
|
+
const o = Ht.value;
|
|
2100
2148
|
if (!o) {
|
|
2101
2149
|
ve.value = !0, q.value = r === "source";
|
|
2102
2150
|
return;
|
|
@@ -2114,15 +2162,15 @@ const za = { key: 0 }, Pa = {
|
|
|
2114
2162
|
o.addEventListener("transitionend", E), setTimeout(() => R(), 220);
|
|
2115
2163
|
});
|
|
2116
2164
|
}
|
|
2117
|
-
function
|
|
2165
|
+
function Ze() {
|
|
2118
2166
|
return z(this, null, function* () {
|
|
2119
2167
|
if (ie.value)
|
|
2120
|
-
return
|
|
2168
|
+
return $t.value;
|
|
2121
2169
|
if (!D.value && (yield he(), !D.value)) {
|
|
2122
2170
|
console.warn("Mermaid container not ready");
|
|
2123
2171
|
return;
|
|
2124
2172
|
}
|
|
2125
|
-
return ie.value = !0,
|
|
2173
|
+
return ie.value = !0, $t.value = z(null, null, function* () {
|
|
2126
2174
|
var r;
|
|
2127
2175
|
D.value && (D.value.style.opacity = "0");
|
|
2128
2176
|
try {
|
|
@@ -2130,42 +2178,42 @@ const za = { key: 0 }, Pa = {
|
|
|
2130
2178
|
if (!o)
|
|
2131
2179
|
return;
|
|
2132
2180
|
const l = `mermaid-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
2133
|
-
!le.value && !$e.value && ((r = o.initialize) == null || r.call(o,
|
|
2181
|
+
!le.value && !$e.value && ((r = o.initialize) == null || r.call(o, Mt(oe({}, f.value), {
|
|
2134
2182
|
dompurifyConfig: oe({}, a)
|
|
2135
2183
|
})));
|
|
2136
|
-
const k = t.isDark ? "dark" : "light", R = Se(k), E = yield
|
|
2184
|
+
const k = t.isDark ? "dark" : "light", R = Se(k), E = yield ht(
|
|
2137
2185
|
() => o.render(
|
|
2138
2186
|
l,
|
|
2139
2187
|
R
|
|
2140
2188
|
),
|
|
2141
|
-
{ timeoutMs:
|
|
2189
|
+
{ timeoutMs: K.value.fullRender }
|
|
2142
2190
|
), V = E == null ? void 0 : E.svg;
|
|
2143
2191
|
if (D.value) {
|
|
2144
2192
|
const P = j(D.value, V);
|
|
2145
|
-
!le.value && !$e.value && (
|
|
2193
|
+
!le.value && !$e.value && (on(), le.value = !0, x.value = {
|
|
2146
2194
|
zoom: I.value,
|
|
2147
2195
|
translateX: J.value,
|
|
2148
2196
|
translateY: Y.value,
|
|
2149
2197
|
containerHeight: Q.value
|
|
2150
2198
|
});
|
|
2151
2199
|
const me = t.isDark ? "dark" : "light";
|
|
2152
|
-
P && (
|
|
2200
|
+
P && (ot.value[me] = P), $e.value && ($e.value = !1), g.value = !1, yt = 0, nt();
|
|
2153
2201
|
}
|
|
2154
2202
|
} catch (o) {
|
|
2155
|
-
const l =
|
|
2156
|
-
if (l && k <=
|
|
2157
|
-
|
|
2203
|
+
const l = Lt(o), k = yt + 1;
|
|
2204
|
+
if (l && k <= si) {
|
|
2205
|
+
yt = k;
|
|
2158
2206
|
const R = Math.min(1200, 600 * k);
|
|
2159
2207
|
xe(R);
|
|
2160
2208
|
} else
|
|
2161
|
-
|
|
2209
|
+
yt = 0, nt(), console.error("Failed to render mermaid diagram:", o), t.loading === !1 && Wt(o);
|
|
2162
2210
|
} finally {
|
|
2163
|
-
yield he(), D.value && (D.value.style.opacity = "1"), ie.value = !1,
|
|
2211
|
+
yield he(), D.value && (D.value.style.opacity = "1"), ie.value = !1, $t.value = null;
|
|
2164
2212
|
}
|
|
2165
|
-
}),
|
|
2213
|
+
}), $t.value;
|
|
2166
2214
|
});
|
|
2167
2215
|
}
|
|
2168
|
-
function
|
|
2216
|
+
function Yt(r) {
|
|
2169
2217
|
return z(this, null, function* () {
|
|
2170
2218
|
if (pn() && !(!D.value && (yield he(), !D.value)) && !ie.value) {
|
|
2171
2219
|
ie.value = !0;
|
|
@@ -2175,11 +2223,11 @@ const za = { key: 0 }, Pa = {
|
|
|
2175
2223
|
return;
|
|
2176
2224
|
const l = `mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, k = t.isDark ? "dark" : "light", R = gn(r), E = R && R.trim() ? R : r, V = Vn(E, k);
|
|
2177
2225
|
D.value && (D.value.style.opacity = "0");
|
|
2178
|
-
const P = yield
|
|
2226
|
+
const P = yield ht(
|
|
2179
2227
|
() => o.render(l, V),
|
|
2180
|
-
{ timeoutMs:
|
|
2228
|
+
{ timeoutMs: K.value.render }
|
|
2181
2229
|
), me = P == null ? void 0 : P.svg;
|
|
2182
|
-
D.value && me && (j(D.value, me),
|
|
2230
|
+
D.value && me && (j(D.value, me), on());
|
|
2183
2231
|
} catch (o) {
|
|
2184
2232
|
} finally {
|
|
2185
2233
|
yield he(), D.value && (D.value.style.opacity = "1"), ie.value = !1;
|
|
@@ -2187,97 +2235,97 @@ const za = { key: 0 }, Pa = {
|
|
|
2187
2235
|
}
|
|
2188
2236
|
});
|
|
2189
2237
|
}
|
|
2190
|
-
function
|
|
2238
|
+
function Ut() {
|
|
2191
2239
|
return z(this, null, function* () {
|
|
2192
2240
|
var P, me;
|
|
2193
|
-
const r = Date.now(), o = ++
|
|
2241
|
+
const r = Date.now(), o = ++Ft.value;
|
|
2194
2242
|
pe && pe.abort(), pe = new AbortController();
|
|
2195
2243
|
const l = pe.signal, k = t.isDark ? "dark" : "light", R = ae.value, E = R.replace(/\s+/g, "");
|
|
2196
2244
|
if (!R.trim()) {
|
|
2197
|
-
D.value && ee(D.value),
|
|
2245
|
+
D.value && ee(D.value), kt.value = null, Re.value = "", g.value = !1;
|
|
2198
2246
|
return;
|
|
2199
2247
|
}
|
|
2200
2248
|
if (E === Re.value)
|
|
2201
2249
|
return;
|
|
2202
2250
|
try {
|
|
2203
|
-
const we = yield eo(R, k, { signal: l, timeoutMs:
|
|
2251
|
+
const we = yield eo(R, k, { signal: l, timeoutMs: K.value.worker });
|
|
2204
2252
|
if (we.fullOk) {
|
|
2205
|
-
yield
|
|
2253
|
+
yield Ze(), Ft.value === o && (kt.value = (me = (P = D.value) == null ? void 0 : P.innerHTML) != null ? me : null, Re.value = E, g.value = !1);
|
|
2206
2254
|
return;
|
|
2207
2255
|
}
|
|
2208
|
-
const
|
|
2209
|
-
if (we.prefixOk && we.prefix && pn() && !
|
|
2210
|
-
yield
|
|
2256
|
+
const ln = tn && r <= tn;
|
|
2257
|
+
if (we.prefixOk && we.prefix && pn() && !ln) {
|
|
2258
|
+
yield Yt(we.prefix);
|
|
2211
2259
|
return;
|
|
2212
2260
|
}
|
|
2213
2261
|
} catch (we) {
|
|
2214
2262
|
if ((we == null ? void 0 : we.name) === "AbortError")
|
|
2215
2263
|
return;
|
|
2216
2264
|
}
|
|
2217
|
-
if (
|
|
2265
|
+
if (Ft.value !== o || g.value)
|
|
2218
2266
|
return;
|
|
2219
|
-
const V =
|
|
2267
|
+
const V = ot.value[k];
|
|
2220
2268
|
V && D.value && j(D.value, V);
|
|
2221
2269
|
});
|
|
2222
2270
|
}
|
|
2223
|
-
function
|
|
2224
|
-
|
|
2271
|
+
function pt() {
|
|
2272
|
+
Dt && (Dt = !1, ft = 800, Et = !1, Ue && (Ue.abort(), Ue = null), mt && (globalThis.clearTimeout(mt), mt = null), rt && (Ye(rt), rt = null), tn = Date.now());
|
|
2225
2273
|
}
|
|
2226
|
-
function
|
|
2227
|
-
if (
|
|
2274
|
+
function bt() {
|
|
2275
|
+
if (pt(), pe) {
|
|
2228
2276
|
try {
|
|
2229
2277
|
pe.abort();
|
|
2230
2278
|
} catch (r) {
|
|
2231
2279
|
}
|
|
2232
2280
|
pe = null;
|
|
2233
2281
|
}
|
|
2234
|
-
if (
|
|
2282
|
+
if (Ue) {
|
|
2235
2283
|
try {
|
|
2236
|
-
|
|
2284
|
+
Ue.abort();
|
|
2237
2285
|
} catch (r) {
|
|
2238
2286
|
}
|
|
2239
|
-
|
|
2287
|
+
Ue = null;
|
|
2240
2288
|
}
|
|
2241
|
-
Bo(),
|
|
2289
|
+
Bo(), nt(), yt = 0;
|
|
2242
2290
|
}
|
|
2243
|
-
function
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
if (!
|
|
2291
|
+
function an(r = 800) {
|
|
2292
|
+
Dt && (mt && globalThis.clearTimeout(mt), mt = globalThis.setTimeout(() => {
|
|
2293
|
+
rt = jt(() => z(null, null, function* () {
|
|
2294
|
+
if (!Dt)
|
|
2247
2295
|
return;
|
|
2248
2296
|
if (q.value || le.value) {
|
|
2249
|
-
|
|
2297
|
+
pt();
|
|
2250
2298
|
return;
|
|
2251
2299
|
}
|
|
2252
2300
|
const o = t.isDark ? "dark" : "light", l = ae.value;
|
|
2253
2301
|
if (!l.trim()) {
|
|
2254
|
-
|
|
2302
|
+
an(ft);
|
|
2255
2303
|
return;
|
|
2256
2304
|
}
|
|
2257
|
-
|
|
2305
|
+
Ue && Ue.abort(), Ue = new AbortController();
|
|
2258
2306
|
try {
|
|
2259
|
-
if ((yield
|
|
2260
|
-
|
|
2307
|
+
if ((yield Xt(l, o, { signal: Ue.signal, timeoutMs: K.value.worker })) && (yield Ze(), le.value)) {
|
|
2308
|
+
pt();
|
|
2261
2309
|
return;
|
|
2262
2310
|
}
|
|
2263
2311
|
} catch (k) {
|
|
2264
2312
|
}
|
|
2265
|
-
|
|
2313
|
+
ft = Math.min(Math.floor(ft * 1.5), 4e3), an(ft);
|
|
2266
2314
|
}), { timeout: 500 });
|
|
2267
2315
|
}, r));
|
|
2268
2316
|
}
|
|
2269
|
-
function
|
|
2270
|
-
|
|
2317
|
+
function sn() {
|
|
2318
|
+
Dt || q.value || le.value || (Dt = !0, tn = 0, Et = !0, an(500));
|
|
2271
2319
|
}
|
|
2272
2320
|
U(
|
|
2273
2321
|
() => ae.value,
|
|
2274
2322
|
() => {
|
|
2275
|
-
le.value = !1,
|
|
2323
|
+
le.value = !1, ot.value = {}, dt(), !q.value && d.value && sn(), Fn();
|
|
2276
2324
|
}
|
|
2277
2325
|
), U(() => t.isDark, () => z(null, null, function* () {
|
|
2278
2326
|
if (!le.value || g.value)
|
|
2279
2327
|
return;
|
|
2280
|
-
const r = t.isDark ? "dark" : "light", o =
|
|
2328
|
+
const r = t.isDark ? "dark" : "light", o = ot.value[r];
|
|
2281
2329
|
if (o) {
|
|
2282
2330
|
D.value && j(D.value, o);
|
|
2283
2331
|
return;
|
|
@@ -2288,12 +2336,12 @@ const za = { key: 0 }, Pa = {
|
|
|
2288
2336
|
translateY: Y.value,
|
|
2289
2337
|
containerHeight: Q.value
|
|
2290
2338
|
}, k = I.value !== 1 || J.value !== 0 || Y.value !== 0;
|
|
2291
|
-
$e.value = !0, k && (I.value = 1, J.value = 0, Y.value = 0, yield he()), yield
|
|
2339
|
+
$e.value = !0, k && (I.value = 1, J.value = 0, Y.value = 0, yield he()), yield Ze(), k && (yield he(), I.value = l.zoom, J.value = l.translateX, Y.value = l.translateY, Q.value = l.containerHeight, x.value = l);
|
|
2292
2340
|
})), U(
|
|
2293
2341
|
() => q.value,
|
|
2294
2342
|
(r) => z(null, null, function* () {
|
|
2295
2343
|
if (r)
|
|
2296
|
-
|
|
2344
|
+
pt(), le.value && (x.value = {
|
|
2297
2345
|
zoom: I.value,
|
|
2298
2346
|
translateX: J.value,
|
|
2299
2347
|
translateY: Y.value,
|
|
@@ -2303,13 +2351,13 @@ const za = { key: 0 }, Pa = {
|
|
|
2303
2351
|
if (g.value)
|
|
2304
2352
|
return;
|
|
2305
2353
|
const o = t.isDark ? "dark" : "light";
|
|
2306
|
-
if (le.value &&
|
|
2307
|
-
yield he(), D.value && j(D.value,
|
|
2354
|
+
if (le.value && ot.value[o]) {
|
|
2355
|
+
yield he(), D.value && j(D.value, ot.value[o]), I.value = x.value.zoom, J.value = x.value.translateX, Y.value = x.value.translateY, Q.value = x.value.containerHeight;
|
|
2308
2356
|
return;
|
|
2309
2357
|
}
|
|
2310
2358
|
if (yield he(), !d.value)
|
|
2311
2359
|
return;
|
|
2312
|
-
yield
|
|
2360
|
+
yield Ut(), sn();
|
|
2313
2361
|
}
|
|
2314
2362
|
})
|
|
2315
2363
|
), U(
|
|
@@ -2318,16 +2366,16 @@ const za = { key: 0 }, Pa = {
|
|
|
2318
2366
|
if (o === !0 && r === !1) {
|
|
2319
2367
|
const l = ae.value.trim();
|
|
2320
2368
|
if (!l)
|
|
2321
|
-
return
|
|
2369
|
+
return bt();
|
|
2322
2370
|
const k = t.isDark ? "dark" : "light", R = l.replace(/\s+/g, "");
|
|
2323
2371
|
if (le.value && R === Re.value) {
|
|
2324
|
-
yield he(), D.value && !D.value.querySelector("svg") &&
|
|
2372
|
+
yield he(), D.value && !D.value.querySelector("svg") && ot.value[k] && j(D.value, ot.value[k]), bt();
|
|
2325
2373
|
return;
|
|
2326
2374
|
}
|
|
2327
2375
|
try {
|
|
2328
|
-
yield
|
|
2376
|
+
yield Xt(l, k, { timeoutMs: K.value.worker }), yield Ze(), Re.value = R, g.value = !1, bt();
|
|
2329
2377
|
} catch (E) {
|
|
2330
|
-
|
|
2378
|
+
bt(), Wt(E);
|
|
2331
2379
|
}
|
|
2332
2380
|
}
|
|
2333
2381
|
})
|
|
@@ -2335,15 +2383,15 @@ const za = { key: 0 }, Pa = {
|
|
|
2335
2383
|
de,
|
|
2336
2384
|
(r) => {
|
|
2337
2385
|
be && be.disconnect(), r && !le.value && !$e.value && (be = new ResizeObserver((o) => {
|
|
2338
|
-
o && o.length > 0 && !le.value && !$e.value &&
|
|
2386
|
+
o && o.length > 0 && !le.value && !$e.value && Ia(() => {
|
|
2339
2387
|
const l = o[0].contentRect.width;
|
|
2340
|
-
|
|
2388
|
+
on(l);
|
|
2341
2389
|
});
|
|
2342
2390
|
}), be.observe(r));
|
|
2343
2391
|
},
|
|
2344
2392
|
{ immediate: !0 }
|
|
2345
2393
|
), io(() => z(null, null, function* () {
|
|
2346
|
-
yield he(), ve.value || (q.value = !d.value), W.value && (
|
|
2394
|
+
yield he(), ve.value || (q.value = !d.value), W.value && (dt(), wt.value = ae.value.length);
|
|
2347
2395
|
})), U(
|
|
2348
2396
|
() => d.value,
|
|
2349
2397
|
(r) => {
|
|
@@ -2352,58 +2400,58 @@ const za = { key: 0 }, Pa = {
|
|
|
2352
2400
|
), U(
|
|
2353
2401
|
() => W.value,
|
|
2354
2402
|
(r) => {
|
|
2355
|
-
r && (le.value || (
|
|
2403
|
+
r && (le.value || (dt(), wt.value = ae.value.length), !t.loading && !le.value && dt());
|
|
2356
2404
|
},
|
|
2357
2405
|
{ immediate: !1 }
|
|
2358
2406
|
), dr(() => {
|
|
2359
|
-
ke && clearTimeout(ke), be && be.disconnect(), pe && (pe.abort(), pe = null), Bo(),
|
|
2407
|
+
ke && clearTimeout(ke), be && be.disconnect(), pe && (pe.abort(), pe = null), Bo(), pt(), nt();
|
|
2360
2408
|
}), U(
|
|
2361
2409
|
() => ne.value,
|
|
2362
2410
|
(r) => z(null, null, function* () {
|
|
2363
|
-
r ? (
|
|
2411
|
+
r ? (pt(), pe && pe.abort()) : le.value || (yield he(), dt(), q.value || sn());
|
|
2364
2412
|
}),
|
|
2365
2413
|
{ immediate: !1 }
|
|
2366
2414
|
);
|
|
2367
|
-
const
|
|
2415
|
+
const qt = N(() => t.isDark ? "mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200" : "mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");
|
|
2368
2416
|
return (r, o) => (m(), y("div", {
|
|
2369
|
-
class:
|
|
2417
|
+
class: O(["my-4 rounded-lg border overflow-hidden shadow-sm", [
|
|
2370
2418
|
t.isDark ? "border-gray-700/30" : "border-gray-200",
|
|
2371
2419
|
{ "is-rendering": t.loading }
|
|
2372
2420
|
]])
|
|
2373
2421
|
}, [
|
|
2374
2422
|
t.showHeader ? (m(), y("div", {
|
|
2375
2423
|
key: 0,
|
|
2376
|
-
class:
|
|
2424
|
+
class: O(["mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b", t.isDark ? "bg-gray-800 border-gray-700/30" : "bg-gray-50 border-gray-200"])
|
|
2377
2425
|
}, [
|
|
2378
|
-
r.$slots["header-left"] ? (m(), y("div",
|
|
2379
|
-
|
|
2380
|
-
])) : (m(), y("div",
|
|
2426
|
+
r.$slots["header-left"] ? (m(), y("div", Pa, [
|
|
2427
|
+
Tt(r.$slots, "header-left", {}, void 0, !0)
|
|
2428
|
+
])) : (m(), y("div", Va, [
|
|
2381
2429
|
h("img", {
|
|
2382
|
-
src: $(
|
|
2430
|
+
src: $(Ba),
|
|
2383
2431
|
class: "w-4 h-4 my-0",
|
|
2384
2432
|
alt: "Mermaid"
|
|
2385
|
-
}, null, 8,
|
|
2433
|
+
}, null, 8, Oa),
|
|
2386
2434
|
h("span", {
|
|
2387
|
-
class:
|
|
2435
|
+
class: O(["text-sm font-medium font-mono truncate", t.isDark ? "text-gray-400" : "text-gray-600"])
|
|
2388
2436
|
}, "Mermaid", 2)
|
|
2389
2437
|
])),
|
|
2390
|
-
r.$slots["header-center"] ? (m(), y("div",
|
|
2391
|
-
|
|
2438
|
+
r.$slots["header-center"] ? (m(), y("div", Ka, [
|
|
2439
|
+
Tt(r.$slots, "header-center", {}, void 0, !0)
|
|
2392
2440
|
])) : t.showModeToggle && d.value ? (m(), y("div", {
|
|
2393
2441
|
key: 3,
|
|
2394
|
-
class:
|
|
2442
|
+
class: O(["flex items-center space-x-1 rounded-md p-0.5", t.isDark ? "bg-gray-700" : "bg-gray-100"])
|
|
2395
2443
|
}, [
|
|
2396
2444
|
h("button", {
|
|
2397
|
-
class:
|
|
2445
|
+
class: O(["px-2.5 py-1 text-xs rounded transition-colors", [
|
|
2398
2446
|
q.value ? t.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700" : t.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm"
|
|
2399
2447
|
]]),
|
|
2400
|
-
onClick: o[0] || (o[0] = () =>
|
|
2448
|
+
onClick: o[0] || (o[0] = () => zt("preview")),
|
|
2401
2449
|
onMouseenter: o[1] || (o[1] = (l) => ge(l, $(T)("common.preview") || "Preview")),
|
|
2402
2450
|
onFocus: o[2] || (o[2] = (l) => ge(l, $(T)("common.preview") || "Preview")),
|
|
2403
2451
|
onMouseleave: te,
|
|
2404
2452
|
onBlur: te
|
|
2405
2453
|
}, [
|
|
2406
|
-
h("div",
|
|
2454
|
+
h("div", Fa, [
|
|
2407
2455
|
o[21] || (o[21] = h("svg", {
|
|
2408
2456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2409
2457
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -2433,16 +2481,16 @@ const za = { key: 0 }, Pa = {
|
|
|
2433
2481
|
])
|
|
2434
2482
|
], 34),
|
|
2435
2483
|
h("button", {
|
|
2436
|
-
class:
|
|
2484
|
+
class: O(["px-2.5 py-1 text-xs rounded transition-colors", [
|
|
2437
2485
|
q.value ? t.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm" : t.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700"
|
|
2438
2486
|
]]),
|
|
2439
|
-
onClick: o[3] || (o[3] = () =>
|
|
2487
|
+
onClick: o[3] || (o[3] = () => zt("source")),
|
|
2440
2488
|
onMouseenter: o[4] || (o[4] = (l) => ge(l, $(T)("common.source") || "Source")),
|
|
2441
2489
|
onFocus: o[5] || (o[5] = (l) => ge(l, $(T)("common.source") || "Source")),
|
|
2442
2490
|
onMouseleave: te,
|
|
2443
2491
|
onBlur: te
|
|
2444
2492
|
}, [
|
|
2445
|
-
h("div",
|
|
2493
|
+
h("div", Wa, [
|
|
2446
2494
|
o[22] || (o[22] = h("svg", {
|
|
2447
2495
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2448
2496
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -2466,12 +2514,12 @@ const za = { key: 0 }, Pa = {
|
|
|
2466
2514
|
])
|
|
2467
2515
|
], 34)
|
|
2468
2516
|
], 2)) : fe("", !0),
|
|
2469
|
-
r.$slots["header-right"] ? (m(), y("div",
|
|
2470
|
-
|
|
2471
|
-
])) : (m(), y("div",
|
|
2517
|
+
r.$slots["header-right"] ? (m(), y("div", Xa, [
|
|
2518
|
+
Tt(r.$slots, "header-right", {}, void 0, !0)
|
|
2519
|
+
])) : (m(), y("div", Ya, [
|
|
2472
2520
|
t.showCollapseButton ? (m(), y("button", {
|
|
2473
2521
|
key: 0,
|
|
2474
|
-
class:
|
|
2522
|
+
class: O(qt.value),
|
|
2475
2523
|
"aria-pressed": ne.value,
|
|
2476
2524
|
onClick: o[6] || (o[6] = (l) => ne.value = !ne.value),
|
|
2477
2525
|
onMouseenter: o[7] || (o[7] = (l) => ge(l, ne.value ? $(T)("common.expand") || "Expand" : $(T)("common.collapse") || "Collapse")),
|
|
@@ -2480,7 +2528,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2480
2528
|
onBlur: te
|
|
2481
2529
|
}, [
|
|
2482
2530
|
(m(), y("svg", {
|
|
2483
|
-
style:
|
|
2531
|
+
style: ut({ rotate: ne.value ? "0deg" : "90deg" }),
|
|
2484
2532
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2485
2533
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
2486
2534
|
"aria-hidden": "true",
|
|
@@ -2499,17 +2547,17 @@ const za = { key: 0 }, Pa = {
|
|
|
2499
2547
|
d: "m9 18l6-6l-6-6"
|
|
2500
2548
|
}, null, -1)
|
|
2501
2549
|
])], 4))
|
|
2502
|
-
], 42,
|
|
2550
|
+
], 42, Ua)) : fe("", !0),
|
|
2503
2551
|
t.showCopyButton ? (m(), y("button", {
|
|
2504
2552
|
key: 1,
|
|
2505
|
-
class:
|
|
2506
|
-
onClick:
|
|
2553
|
+
class: O(qt.value),
|
|
2554
|
+
onClick: qe,
|
|
2507
2555
|
onMouseenter: o[9] || (o[9] = (l) => Pn(l)),
|
|
2508
2556
|
onFocus: o[10] || (o[10] = (l) => Pn(l)),
|
|
2509
2557
|
onMouseleave: te,
|
|
2510
2558
|
onBlur: te
|
|
2511
2559
|
}, [
|
|
2512
|
-
G.value ? (m(), y("svg",
|
|
2560
|
+
G.value ? (m(), y("svg", Za, [...o[25] || (o[25] = [
|
|
2513
2561
|
h("path", {
|
|
2514
2562
|
fill: "none",
|
|
2515
2563
|
stroke: "currentColor",
|
|
@@ -2518,7 +2566,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2518
2566
|
"stroke-width": "2",
|
|
2519
2567
|
d: "M20 6L9 17l-5-5"
|
|
2520
2568
|
}, null, -1)
|
|
2521
|
-
])])) : (m(), y("svg",
|
|
2569
|
+
])])) : (m(), y("svg", qa, [...o[24] || (o[24] = [
|
|
2522
2570
|
h("g", {
|
|
2523
2571
|
fill: "none",
|
|
2524
2572
|
stroke: "currentColor",
|
|
@@ -2540,8 +2588,8 @@ const za = { key: 0 }, Pa = {
|
|
|
2540
2588
|
], 34)) : fe("", !0),
|
|
2541
2589
|
t.showExportButton && d.value ? (m(), y("button", {
|
|
2542
2590
|
key: 2,
|
|
2543
|
-
class:
|
|
2544
|
-
disabled:
|
|
2591
|
+
class: O(`${qt.value} ${nn.value ? "opacity-50 cursor-not-allowed" : ""}`),
|
|
2592
|
+
disabled: nn.value,
|
|
2545
2593
|
onClick: Ne,
|
|
2546
2594
|
onMouseenter: o[11] || (o[11] = (l) => ge(l, $(T)("common.export") || "Export")),
|
|
2547
2595
|
onFocus: o[12] || (o[12] = (l) => ge(l, $(T)("common.export") || "Export")),
|
|
@@ -2569,18 +2617,18 @@ const za = { key: 0 }, Pa = {
|
|
|
2569
2617
|
h("path", { d: "m7 10l5 5l5-5" })
|
|
2570
2618
|
])
|
|
2571
2619
|
], -1)
|
|
2572
|
-
])], 42,
|
|
2620
|
+
])], 42, Ga)) : fe("", !0),
|
|
2573
2621
|
t.showFullscreenButton && d.value ? (m(), y("button", {
|
|
2574
2622
|
key: 3,
|
|
2575
|
-
class:
|
|
2576
|
-
disabled:
|
|
2577
|
-
onClick:
|
|
2578
|
-
onMouseenter: o[13] || (o[13] = (l) => ge(l,
|
|
2579
|
-
onFocus: o[14] || (o[14] = (l) => ge(l,
|
|
2623
|
+
class: O(`${qt.value} ${nn.value ? "opacity-50 cursor-not-allowed" : ""}`),
|
|
2624
|
+
disabled: nn.value,
|
|
2625
|
+
onClick: it,
|
|
2626
|
+
onMouseenter: o[13] || (o[13] = (l) => ge(l, vt.value ? $(T)("common.minimize") || "Minimize" : $(T)("common.open") || "Open")),
|
|
2627
|
+
onFocus: o[14] || (o[14] = (l) => ge(l, vt.value ? $(T)("common.minimize") || "Minimize" : $(T)("common.open") || "Open")),
|
|
2580
2628
|
onMouseleave: te,
|
|
2581
2629
|
onBlur: te
|
|
2582
2630
|
}, [
|
|
2583
|
-
|
|
2631
|
+
vt.value ? (m(), y("svg", ei, [...o[28] || (o[28] = [
|
|
2584
2632
|
h("path", {
|
|
2585
2633
|
fill: "none",
|
|
2586
2634
|
stroke: "currentColor",
|
|
@@ -2589,7 +2637,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2589
2637
|
"stroke-width": "2",
|
|
2590
2638
|
d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"
|
|
2591
2639
|
}, null, -1)
|
|
2592
|
-
])])) : (m(), y("svg",
|
|
2640
|
+
])])) : (m(), y("svg", Qa, [...o[27] || (o[27] = [
|
|
2593
2641
|
h("path", {
|
|
2594
2642
|
fill: "none",
|
|
2595
2643
|
stroke: "currentColor",
|
|
@@ -2599,25 +2647,25 @@ const za = { key: 0 }, Pa = {
|
|
|
2599
2647
|
d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"
|
|
2600
2648
|
}, null, -1)
|
|
2601
2649
|
])]))
|
|
2602
|
-
], 42,
|
|
2650
|
+
], 42, Ja)) : fe("", !0)
|
|
2603
2651
|
]))
|
|
2604
2652
|
], 2)) : fe("", !0),
|
|
2605
2653
|
Rn(h("div", {
|
|
2606
2654
|
ref_key: "modeContainerRef",
|
|
2607
|
-
ref:
|
|
2655
|
+
ref: Ht
|
|
2608
2656
|
}, [
|
|
2609
2657
|
q.value ? (m(), y("div", {
|
|
2610
2658
|
key: 0,
|
|
2611
|
-
class:
|
|
2659
|
+
class: O(["p-4", t.isDark ? "bg-gray-900" : "bg-gray-50"])
|
|
2612
2660
|
}, [
|
|
2613
2661
|
h("pre", {
|
|
2614
|
-
class:
|
|
2662
|
+
class: O(["text-sm font-mono whitespace-pre-wrap", t.isDark ? "text-gray-300" : "text-gray-700"])
|
|
2615
2663
|
}, se(ae.value), 3)
|
|
2616
|
-
], 2)) : (m(), y("div",
|
|
2617
|
-
t.showZoomControls ? (m(), y("div",
|
|
2618
|
-
h("div",
|
|
2664
|
+
], 2)) : (m(), y("div", ti, [
|
|
2665
|
+
t.showZoomControls ? (m(), y("div", ni, [
|
|
2666
|
+
h("div", oi, [
|
|
2619
2667
|
h("button", {
|
|
2620
|
-
class:
|
|
2668
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2621
2669
|
onClick: i,
|
|
2622
2670
|
onMouseenter: o[15] || (o[15] = (l) => ge(l, $(T)("common.zoomIn") || "Zoom in")),
|
|
2623
2671
|
onFocus: o[16] || (o[16] = (l) => ge(l, $(T)("common.zoomIn") || "Zoom in")),
|
|
@@ -2651,7 +2699,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2651
2699
|
], -1)
|
|
2652
2700
|
])], 34),
|
|
2653
2701
|
h("button", {
|
|
2654
|
-
class:
|
|
2702
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2655
2703
|
onClick: u,
|
|
2656
2704
|
onMouseenter: o[17] || (o[17] = (l) => ge(l, $(T)("common.zoomOut") || "Zoom out")),
|
|
2657
2705
|
onFocus: o[18] || (o[18] = (l) => ge(l, $(T)("common.zoomOut") || "Zoom out")),
|
|
@@ -2685,7 +2733,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2685
2733
|
], -1)
|
|
2686
2734
|
])], 34),
|
|
2687
2735
|
h("button", {
|
|
2688
|
-
class:
|
|
2736
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2689
2737
|
onClick: p,
|
|
2690
2738
|
onMouseenter: o[19] || (o[19] = (l) => ge(l, $(T)("common.resetZoom") || "Reset zoom")),
|
|
2691
2739
|
onFocus: o[20] || (o[20] = (l) => ge(l, $(T)("common.resetZoom") || "Reset zoom")),
|
|
@@ -2694,7 +2742,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2694
2742
|
}, se(Math.round(I.value * 100)) + "% ", 35)
|
|
2695
2743
|
])
|
|
2696
2744
|
])) : fe("", !0),
|
|
2697
|
-
h("div",
|
|
2745
|
+
h("div", Kt({
|
|
2698
2746
|
ref_key: "mermaidContainer",
|
|
2699
2747
|
ref: de,
|
|
2700
2748
|
class: ["min-h-[360px] relative transition-all duration-100 overflow-hidden block", t.isDark ? "bg-gray-900" : "bg-gray-50"],
|
|
@@ -2710,8 +2758,8 @@ const za = { key: 0 }, Pa = {
|
|
|
2710
2758
|
}), [
|
|
2711
2759
|
h("div", {
|
|
2712
2760
|
"data-mermaid-wrapper": "",
|
|
2713
|
-
class:
|
|
2714
|
-
style:
|
|
2761
|
+
class: O(["absolute inset-0 cursor-grab", { "cursor-grabbing": Le.value }]),
|
|
2762
|
+
style: ut(wn.value)
|
|
2715
2763
|
}, [
|
|
2716
2764
|
h("div", {
|
|
2717
2765
|
ref_key: "mermaidContent",
|
|
@@ -2721,22 +2769,22 @@ const za = { key: 0 }, Pa = {
|
|
|
2721
2769
|
], 6)
|
|
2722
2770
|
], 16),
|
|
2723
2771
|
(m(), ye(Ho, { to: "body" }, [
|
|
2724
|
-
|
|
2772
|
+
ct(zn, {
|
|
2725
2773
|
name: "mermaid-dialog",
|
|
2726
2774
|
appear: ""
|
|
2727
2775
|
}, {
|
|
2728
|
-
default:
|
|
2729
|
-
|
|
2776
|
+
default: en(() => [
|
|
2777
|
+
vt.value ? (m(), y("div", {
|
|
2730
2778
|
key: 0,
|
|
2731
2779
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",
|
|
2732
|
-
onClick: mr(
|
|
2780
|
+
onClick: mr(rn, ["self"])
|
|
2733
2781
|
}, [
|
|
2734
2782
|
h("div", {
|
|
2735
|
-
class:
|
|
2783
|
+
class: O(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden", t.isDark ? "bg-gray-900" : "bg-white"])
|
|
2736
2784
|
}, [
|
|
2737
|
-
h("div",
|
|
2785
|
+
h("div", ri, [
|
|
2738
2786
|
h("button", {
|
|
2739
|
-
class:
|
|
2787
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2740
2788
|
onClick: i
|
|
2741
2789
|
}, [...o[31] || (o[31] = [
|
|
2742
2790
|
h("svg", {
|
|
@@ -2766,7 +2814,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2766
2814
|
], -1)
|
|
2767
2815
|
])], 2),
|
|
2768
2816
|
h("button", {
|
|
2769
|
-
class:
|
|
2817
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2770
2818
|
onClick: u
|
|
2771
2819
|
}, [...o[32] || (o[32] = [
|
|
2772
2820
|
h("svg", {
|
|
@@ -2796,12 +2844,12 @@ const za = { key: 0 }, Pa = {
|
|
|
2796
2844
|
], -1)
|
|
2797
2845
|
])], 2),
|
|
2798
2846
|
h("button", {
|
|
2799
|
-
class:
|
|
2847
|
+
class: O(["p-2 text-xs rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2800
2848
|
onClick: p
|
|
2801
2849
|
}, se(Math.round(I.value * 100)) + "% ", 3),
|
|
2802
2850
|
h("button", {
|
|
2803
|
-
class:
|
|
2804
|
-
onClick:
|
|
2851
|
+
class: O(["inline-flex items-center justify-center p-2 rounded transition-colors", [t.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]),
|
|
2852
|
+
onClick: rn
|
|
2805
2853
|
}, [...o[33] || (o[33] = [
|
|
2806
2854
|
h("svg", {
|
|
2807
2855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2824,9 +2872,9 @@ const za = { key: 0 }, Pa = {
|
|
|
2824
2872
|
], -1)
|
|
2825
2873
|
])], 2)
|
|
2826
2874
|
]),
|
|
2827
|
-
h("div",
|
|
2875
|
+
h("div", Kt({
|
|
2828
2876
|
ref_key: "modalContent",
|
|
2829
|
-
ref:
|
|
2877
|
+
ref: We,
|
|
2830
2878
|
class: "w-full h-full flex items-center justify-center p-4 overflow-hidden"
|
|
2831
2879
|
}, bo(B.value, !0), {
|
|
2832
2880
|
onMousedown: L,
|
|
@@ -2849,47 +2897,7 @@ const za = { key: 0 }, Pa = {
|
|
|
2849
2897
|
])
|
|
2850
2898
|
], 2));
|
|
2851
2899
|
}
|
|
2852
|
-
}),
|
|
2853
|
-
un.install = (e) => {
|
|
2854
|
-
e.component(un.__name, un);
|
|
2855
|
-
};
|
|
2856
|
-
const li = /* @__PURE__ */ F({
|
|
2857
|
-
__name: "HtmlInlineNode",
|
|
2858
|
-
props: {
|
|
2859
|
-
node: {}
|
|
2860
|
-
},
|
|
2861
|
-
setup(e) {
|
|
2862
|
-
const n = e, t = M(null), s = typeof window != "undefined";
|
|
2863
|
-
function a() {
|
|
2864
|
-
if (!s || !t.value)
|
|
2865
|
-
return;
|
|
2866
|
-
const c = t.value;
|
|
2867
|
-
c.innerHTML = "";
|
|
2868
|
-
const f = document.createElement("template");
|
|
2869
|
-
f.innerHTML = n.node.content, c.appendChild(f.content.cloneNode(!0));
|
|
2870
|
-
}
|
|
2871
|
-
function d() {
|
|
2872
|
-
if (!t.value)
|
|
2873
|
-
return;
|
|
2874
|
-
const c = t.value;
|
|
2875
|
-
c.innerHTML = "", c.textContent = n.node.content;
|
|
2876
|
-
}
|
|
2877
|
-
return io(() => {
|
|
2878
|
-
n.node.loading && !n.node.autoClosed ? d() : a();
|
|
2879
|
-
}), U(
|
|
2880
|
-
() => [n.node.content, n.node.loading, n.node.autoClosed],
|
|
2881
|
-
() => {
|
|
2882
|
-
n.node.loading && !n.node.autoClosed ? d() : a();
|
|
2883
|
-
}
|
|
2884
|
-
), hn(() => {
|
|
2885
|
-
t.value && (t.value.innerHTML = "");
|
|
2886
|
-
}), (c, f) => (m(), y("span", {
|
|
2887
|
-
ref_key: "containerRef",
|
|
2888
|
-
ref: t,
|
|
2889
|
-
class: K(["html-inline-node", { "html-inline-node--loading": n.node.loading }])
|
|
2890
|
-
}, null, 2));
|
|
2891
|
-
}
|
|
2892
|
-
}), dn = /* @__PURE__ */ Z(li, [["__scopeId", "data-v-e632756e"]]);
|
|
2900
|
+
}), dn = /* @__PURE__ */ Z(li, [["__scopeId", "data-v-3636e700"]]);
|
|
2893
2901
|
dn.install = (e) => {
|
|
2894
2902
|
e.component(dn.__name, dn);
|
|
2895
2903
|
};
|
|
@@ -2904,39 +2912,39 @@ const ci = {
|
|
|
2904
2912
|
indexKey: {}
|
|
2905
2913
|
},
|
|
2906
2914
|
setup(e) {
|
|
2907
|
-
const n = e, t =
|
|
2908
|
-
inline_code:
|
|
2909
|
-
image:
|
|
2910
|
-
link:
|
|
2911
|
-
hardbreak:
|
|
2912
|
-
emphasis:
|
|
2913
|
-
strong:
|
|
2914
|
-
strikethrough:
|
|
2915
|
-
highlight:
|
|
2916
|
-
insert:
|
|
2917
|
-
subscript:
|
|
2918
|
-
superscript:
|
|
2919
|
-
html_inline:
|
|
2915
|
+
const n = e, t = Bt(n.customId), s = oe({
|
|
2916
|
+
inline_code: ze,
|
|
2917
|
+
image: Pt,
|
|
2918
|
+
link: Ke,
|
|
2919
|
+
hardbreak: Jt,
|
|
2920
|
+
emphasis: tt,
|
|
2921
|
+
strong: Ve,
|
|
2922
|
+
strikethrough: Oe,
|
|
2923
|
+
highlight: et,
|
|
2924
|
+
insert: Qe,
|
|
2925
|
+
subscript: Je,
|
|
2926
|
+
superscript: Ge,
|
|
2927
|
+
html_inline: Ae,
|
|
2920
2928
|
emoji: je,
|
|
2921
|
-
checkbox:
|
|
2922
|
-
math_inline:
|
|
2923
|
-
checkbox_input:
|
|
2924
|
-
reference:
|
|
2925
|
-
footnote_anchor:
|
|
2929
|
+
checkbox: _t,
|
|
2930
|
+
math_inline: It,
|
|
2931
|
+
checkbox_input: _t,
|
|
2932
|
+
reference: Pe,
|
|
2933
|
+
footnote_anchor: un,
|
|
2926
2934
|
footnote_reference: De
|
|
2927
2935
|
}, t), a = Xo();
|
|
2928
2936
|
return (d, c) => (m(), y("p", ci, [
|
|
2929
2937
|
(m(!0), y(ue, null, Be(e.node.children, (f, w) => (m(), y(ue, {
|
|
2930
2938
|
key: `${e.indexKey || "paragraph"}-${w}`
|
|
2931
2939
|
}, [
|
|
2932
|
-
f.type !== "text" ? (m(), ye(
|
|
2940
|
+
f.type !== "text" ? (m(), ye(Fe(s[f.type]), {
|
|
2933
2941
|
key: 0,
|
|
2934
2942
|
node: f,
|
|
2935
2943
|
"index-key": `${e.indexKey}-${w}`,
|
|
2936
2944
|
"custom-id": n.customId
|
|
2937
2945
|
}, null, 8, ["node", "index-key", "custom-id"])) : (m(), y("span", {
|
|
2938
2946
|
key: 1,
|
|
2939
|
-
class:
|
|
2947
|
+
class: O([[$(a) && f.center ? "text-node-center" : ""], "whitespace-pre-wrap break-words text-node"])
|
|
2940
2948
|
}, se(f.content), 3))
|
|
2941
2949
|
], 64))), 128))
|
|
2942
2950
|
]));
|
|
@@ -2960,7 +2968,7 @@ const di = ["aria-busy", "aria-label", "data-language"], mi = ["textContent"], m
|
|
|
2960
2968
|
return d ? `Code block: ${d}` : "Code block";
|
|
2961
2969
|
});
|
|
2962
2970
|
return (d, c) => (m(), y("pre", {
|
|
2963
|
-
class:
|
|
2971
|
+
class: O([s.value]),
|
|
2964
2972
|
"aria-busy": e.node.loading === !0,
|
|
2965
2973
|
"aria-label": a.value,
|
|
2966
2974
|
"data-language": t.value,
|
|
@@ -3009,13 +3017,13 @@ const fi = { class: "table-node-wrapper" }, hi = ["aria-busy"], vi = { class: "b
|
|
|
3009
3017
|
});
|
|
3010
3018
|
return (c, f) => (m(), y("div", fi, [
|
|
3011
3019
|
h("table", {
|
|
3012
|
-
class:
|
|
3020
|
+
class: O(["w-full my-8 text-sm table-fixed table-node", { "table-node--loading": a.value }]),
|
|
3013
3021
|
"aria-busy": a.value
|
|
3014
3022
|
}, [
|
|
3015
3023
|
h("colgroup", null, [
|
|
3016
3024
|
(m(!0), y(ue, null, Be(s.value, (w, v) => (m(), y("col", {
|
|
3017
3025
|
key: `col-${v}`,
|
|
3018
|
-
style:
|
|
3026
|
+
style: ut({ width: w })
|
|
3019
3027
|
}, null, 4))), 128))
|
|
3020
3028
|
]),
|
|
3021
3029
|
h("thead", vi, [
|
|
@@ -3023,11 +3031,11 @@ const fi = { class: "table-node-wrapper" }, hi = ["aria-busy"], vi = { class: "b
|
|
|
3023
3031
|
(m(!0), y(ue, null, Be(e.node.header.cells, (w, v) => (m(), y("th", {
|
|
3024
3032
|
key: `header-${v}`,
|
|
3025
3033
|
dir: "auto",
|
|
3026
|
-
class:
|
|
3034
|
+
class: O(["font-semibold p-[calc(4/7*1em)] overflow-x-auto", [
|
|
3027
3035
|
w.align === "right" ? "text-right" : w.align === "center" ? "text-center" : "text-left"
|
|
3028
3036
|
]])
|
|
3029
3037
|
}, [
|
|
3030
|
-
|
|
3038
|
+
ct($(lt), {
|
|
3031
3039
|
nodes: w.children,
|
|
3032
3040
|
"index-key": `table-th-${n.indexKey}`,
|
|
3033
3041
|
"custom-id": n.customId,
|
|
@@ -3040,16 +3048,16 @@ const fi = { class: "table-node-wrapper" }, hi = ["aria-busy"], vi = { class: "b
|
|
|
3040
3048
|
h("tbody", null, [
|
|
3041
3049
|
(m(!0), y(ue, null, Be(d.value, (w, v) => (m(), y("tr", {
|
|
3042
3050
|
key: `row-${v}`,
|
|
3043
|
-
class:
|
|
3051
|
+
class: O(["border-[var(--table-border,#cbd5e1)]", [v < d.value.length - 1 ? "border-b" : ""]])
|
|
3044
3052
|
}, [
|
|
3045
3053
|
(m(!0), y(ue, null, Be(w.cells, (b, C) => (m(), y("td", {
|
|
3046
3054
|
key: `cell-${v}-${C}`,
|
|
3047
|
-
class:
|
|
3055
|
+
class: O(["p-[calc(4/7*1em)] overflow-x-auto", [
|
|
3048
3056
|
b.align === "right" ? "text-right" : b.align === "center" ? "text-center" : "text-left"
|
|
3049
3057
|
]]),
|
|
3050
3058
|
dir: "auto"
|
|
3051
3059
|
}, [
|
|
3052
|
-
|
|
3060
|
+
ct($(lt), {
|
|
3053
3061
|
nodes: b.children,
|
|
3054
3062
|
"index-key": `table-td-${n.indexKey}`,
|
|
3055
3063
|
"custom-id": n.customId,
|
|
@@ -3060,10 +3068,10 @@ const fi = { class: "table-node-wrapper" }, hi = ["aria-busy"], vi = { class: "b
|
|
|
3060
3068
|
], 2))), 128))
|
|
3061
3069
|
])
|
|
3062
3070
|
], 10, hi),
|
|
3063
|
-
|
|
3064
|
-
default:
|
|
3071
|
+
ct(zn, { name: "table-node-fade" }, {
|
|
3072
|
+
default: en(() => [
|
|
3065
3073
|
a.value ? (m(), y("div", gi, [
|
|
3066
|
-
|
|
3074
|
+
Tt(c.$slots, "loading", { isLoading: a.value }, () => [
|
|
3067
3075
|
f[2] || (f[2] = h("span", {
|
|
3068
3076
|
class: "table-node__spinner animate-spin",
|
|
3069
3077
|
"aria-hidden": "true"
|
|
@@ -3139,7 +3147,7 @@ const bi = {
|
|
|
3139
3147
|
)) : a.value = !0, hn(() => {
|
|
3140
3148
|
var v, b;
|
|
3141
3149
|
(b = (v = f.value) == null ? void 0 : v.destroy) == null || b.call(v), f.value = null;
|
|
3142
|
-
}), (v, b) => (m(), y("div",
|
|
3150
|
+
}), (v, b) => (m(), y("div", Kt({
|
|
3143
3151
|
ref_key: "htmlRef",
|
|
3144
3152
|
ref: s,
|
|
3145
3153
|
class: "html-block-node"
|
|
@@ -3148,7 +3156,7 @@ const bi = {
|
|
|
3148
3156
|
key: 0,
|
|
3149
3157
|
innerHTML: d.value
|
|
3150
3158
|
}, null, 8, ["innerHTML"])), b, 0) : (m(), y("div", bi, [
|
|
3151
|
-
|
|
3159
|
+
Tt(v.$slots, "placeholder", { node: e.node }, () => [
|
|
3152
3160
|
b[1] || (b[1] = h("span", { class: "html-block-node__placeholder-bar" }, null, -1)),
|
|
3153
3161
|
b[2] || (b[2] = h("span", { class: "html-block-node__placeholder-bar w-4/5" }, null, -1)),
|
|
3154
3162
|
b[3] || (b[3] = h("span", { class: "html-block-node__placeholder-bar w-2/3" }, null, -1))
|
|
@@ -3198,7 +3206,7 @@ const bi = {
|
|
|
3198
3206
|
},
|
|
3199
3207
|
emits: ["copy", "handleArtifactClick", "click", "mouseover", "mouseout"],
|
|
3200
3208
|
setup(e, { emit: n }) {
|
|
3201
|
-
var
|
|
3209
|
+
var rn, Kn, Fn;
|
|
3202
3210
|
const t = e, s = n, a = M(), d = M(!1), c = /auto|scroll|overlay/i;
|
|
3203
3211
|
function f(i) {
|
|
3204
3212
|
if (typeof window == "undefined")
|
|
@@ -3209,8 +3217,8 @@ const bi = {
|
|
|
3209
3217
|
const p = u.ownerDocument || document, L = p.scrollingElement || p.documentElement;
|
|
3210
3218
|
let _ = u;
|
|
3211
3219
|
for (; _ && !(_ === p.body || _ === L); ) {
|
|
3212
|
-
const X = window.getComputedStyle(_), Te = (X.overflowY || "").toLowerCase(),
|
|
3213
|
-
if (c.test(Te) || c.test(
|
|
3220
|
+
const X = window.getComputedStyle(_), Te = (X.overflowY || "").toLowerCase(), qe = (X.overflow || "").toLowerCase();
|
|
3221
|
+
if (c.test(Te) || c.test(qe))
|
|
3214
3222
|
return _;
|
|
3215
3223
|
_ = _.parentElement;
|
|
3216
3224
|
}
|
|
@@ -3233,7 +3241,7 @@ const bi = {
|
|
|
3233
3241
|
const A = N(() => {
|
|
3234
3242
|
var _, X, Te;
|
|
3235
3243
|
const i = (_ = t.parseOptions) != null ? _ : {}, u = (X = t.customHtmlTags) != null ? X : [], p = (Te = i.customHtmlTags) != null ? Te : [], L = [...u, ...p].map(H).filter(Boolean);
|
|
3236
|
-
return L.length ?
|
|
3244
|
+
return L.length ? Mt(oe({}, i), {
|
|
3237
3245
|
customHtmlTags: Array.from(new Set(L))
|
|
3238
3246
|
}) : i;
|
|
3239
3247
|
}), S = N(() => {
|
|
@@ -3251,13 +3259,13 @@ const bi = {
|
|
|
3251
3259
|
}), j = N(() => {
|
|
3252
3260
|
var i;
|
|
3253
3261
|
return ((i = t.maxLiveNodes) != null ? i : 0) <= 0 ? !1 : S.value.length > ee.value;
|
|
3254
|
-
}), T = N(() => !(t.viewportPriority === !1 || d.value || t.deferNodesUntilVisible === !1 || j.value || S.value.length > Bi)), re =
|
|
3262
|
+
}), T = N(() => !(t.viewportPriority === !1 || d.value || t.deferNodesUntilVisible === !1 || j.value || S.value.length > Bi)), re = Ar(
|
|
3255
3263
|
(i) => {
|
|
3256
3264
|
var u;
|
|
3257
3265
|
return f((u = i != null ? i : a.value) != null ? u : null);
|
|
3258
3266
|
},
|
|
3259
3267
|
T
|
|
3260
|
-
), G = typeof window != "undefined", ne = G && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame.bind(window) : null, de = G && typeof window.cancelAnimationFrame == "function" ? window.cancelAnimationFrame.bind(window) : null, D = typeof globalThis != "undefined" && typeof globalThis.process != "undefined" && ((Kn = (
|
|
3268
|
+
), G = typeof window != "undefined", ne = G && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame.bind(window) : null, de = G && typeof window.cancelAnimationFrame == "function" ? window.cancelAnimationFrame.bind(window) : null, D = typeof globalThis != "undefined" && typeof globalThis.process != "undefined" && ((Kn = (rn = globalThis.process) == null ? void 0 : rn.env) == null ? void 0 : Kn.NODE_ENV) === "test", We = G && typeof window.requestIdleCallback == "function", ce = N(() => {
|
|
3261
3269
|
var u;
|
|
3262
3270
|
const i = Math.trunc((u = t.renderBatchSize) != null ? u : 80);
|
|
3263
3271
|
return Number.isFinite(i) ? Math.max(0, i) : 0;
|
|
@@ -3265,29 +3273,29 @@ const bi = {
|
|
|
3265
3273
|
var u;
|
|
3266
3274
|
const i = Math.trunc((u = t.initialRenderBatchSize) != null ? u : ce.value);
|
|
3267
3275
|
return Number.isFinite(i) ? Math.max(0, i) : ce.value;
|
|
3268
|
-
}),
|
|
3276
|
+
}), gt = N(() => t.batchRendering !== !1 && ce.value > 0 && G && !D), W = M(0), Ht = M({
|
|
3269
3277
|
key: t.indexKey,
|
|
3270
3278
|
total: 0
|
|
3271
3279
|
}), ae = M(Math.max(1, ce.value || 1)), Se = Xn({}), I = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map(), Le = M(null);
|
|
3272
|
-
let
|
|
3280
|
+
let Xe = null, q = null;
|
|
3273
3281
|
const ve = N(() => !1), ie = N(() => {
|
|
3274
3282
|
var i;
|
|
3275
|
-
return
|
|
3276
|
-
}),
|
|
3283
|
+
return gt.value && ((i = t.maxLiveNodes) != null ? i : 0) <= 0;
|
|
3284
|
+
}), $t = M({
|
|
3277
3285
|
batchSize: ce.value,
|
|
3278
3286
|
initial: Ee.value,
|
|
3279
3287
|
delay: (Fn = t.renderBatchDelay) != null ? Fn : 16,
|
|
3280
3288
|
enabled: ie.value
|
|
3281
|
-
}),
|
|
3289
|
+
}), wt = N(() => !!re && (ve.value || j.value)), St = N(() => {
|
|
3282
3290
|
var i;
|
|
3283
3291
|
return Math.max(0, (i = t.liveNodeBuffer) != null ? i : 60);
|
|
3284
|
-
}), ke = M(0), Ce = Xn({ start: 0, end: 0 }),
|
|
3292
|
+
}), ke = M(0), Ce = Xn({ start: 0, end: 0 }), yt = /* @__PURE__ */ new Map(), jt = N(() => {
|
|
3285
3293
|
if (!j.value)
|
|
3286
3294
|
return S.value.length;
|
|
3287
|
-
const i =
|
|
3295
|
+
const i = St.value, u = Math.max(Ce.end + i, Ee.value), p = Math.min(S.value.length, u);
|
|
3288
3296
|
return Math.max(W.value, p);
|
|
3289
3297
|
});
|
|
3290
|
-
function
|
|
3298
|
+
function dt(i) {
|
|
3291
3299
|
var L, _, X;
|
|
3292
3300
|
const u = f((L = a.value) != null ? L : null);
|
|
3293
3301
|
if (u)
|
|
@@ -3295,18 +3303,18 @@ const bi = {
|
|
|
3295
3303
|
const p = (X = (_ = a.value) == null ? void 0 : _.ownerDocument) != null ? X : typeof document != "undefined" ? document : null;
|
|
3296
3304
|
return (p == null ? void 0 : p.scrollingElement) || (p == null ? void 0 : p.documentElement) || null;
|
|
3297
3305
|
}
|
|
3298
|
-
function
|
|
3299
|
-
|
|
3306
|
+
function nt() {
|
|
3307
|
+
Xe && (Xe(), Xe = null), Le.value = null;
|
|
3300
3308
|
}
|
|
3301
3309
|
function xe() {
|
|
3302
3310
|
if (!G || !j.value)
|
|
3303
3311
|
return;
|
|
3304
|
-
const i =
|
|
3312
|
+
const i = dt();
|
|
3305
3313
|
if (!i || Le.value === i)
|
|
3306
3314
|
return;
|
|
3307
|
-
|
|
3315
|
+
nt();
|
|
3308
3316
|
const u = () => be();
|
|
3309
|
-
i.addEventListener("scroll", u, { passive: !0 }), Le.value = i,
|
|
3317
|
+
i.addEventListener("scroll", u, { passive: !0 }), Le.value = i, Xe = () => {
|
|
3310
3318
|
i.removeEventListener("scroll", u);
|
|
3311
3319
|
};
|
|
3312
3320
|
}
|
|
@@ -3342,49 +3350,49 @@ const bi = {
|
|
|
3342
3350
|
}
|
|
3343
3351
|
}
|
|
3344
3352
|
function le(i = !1) {
|
|
3345
|
-
var
|
|
3353
|
+
var xt, Ze, Yt, Ut, pt, bt, an, sn, qt, yn, kn;
|
|
3346
3354
|
if (!j.value)
|
|
3347
3355
|
return;
|
|
3348
|
-
const u = Le.value ||
|
|
3356
|
+
const u = Le.value || dt();
|
|
3349
3357
|
if (!u)
|
|
3350
3358
|
return;
|
|
3351
|
-
const p = u.ownerDocument || ((
|
|
3352
|
-
let Ne = null,
|
|
3353
|
-
for (const [r, o] of
|
|
3359
|
+
const p = u.ownerDocument || ((xt = a.value) == null ? void 0 : xt.ownerDocument) || document, L = (p == null ? void 0 : p.defaultView) || (typeof window != "undefined" ? window : null), _ = u === (p == null ? void 0 : p.documentElement) || u === (p == null ? void 0 : p.body), X = _ ? null : u.getBoundingClientRect(), Te = _ ? 0 : X.top, qe = _ ? (Yt = (Ze = L == null ? void 0 : L.innerHeight) != null ? Ze : u.clientHeight) != null ? Yt : 0 : X.bottom, at = Array.from(Y.entries()).sort((r, o) => r[0] - o[0]);
|
|
3360
|
+
let Ne = null, it = null;
|
|
3361
|
+
for (const [r, o] of at) {
|
|
3354
3362
|
if (!o)
|
|
3355
3363
|
continue;
|
|
3356
3364
|
const l = o.getBoundingClientRect();
|
|
3357
|
-
l.bottom <= Te || l.top >=
|
|
3365
|
+
l.bottom <= Te || l.top >= qe || (Ne == null && (Ne = r), it = r);
|
|
3358
3366
|
}
|
|
3359
|
-
if (Ne == null ||
|
|
3367
|
+
if (Ne == null || it == null) {
|
|
3360
3368
|
const r = a.value;
|
|
3361
3369
|
if (!r)
|
|
3362
3370
|
return;
|
|
3363
|
-
const o = _ ? { top: 0 } : u.getBoundingClientRect(), l = r.getBoundingClientRect(), k = _ ? (
|
|
3371
|
+
const o = _ ? { top: 0 } : u.getBoundingClientRect(), l = r.getBoundingClientRect(), k = _ ? (an = (bt = (Ut = p == null ? void 0 : p.documentElement) == null ? void 0 : Ut.scrollTop) != null ? bt : (pt = p == null ? void 0 : p.body) == null ? void 0 : pt.scrollTop) != null ? an : 0 : u.scrollTop, R = l.top - (_ ? 0 : o.top) + k, E = Math.max(0, k - R), V = _ ? (kn = (yn = (qt = L == null ? void 0 : L.innerHeight) != null ? qt : (sn = p == null ? void 0 : p.documentElement) == null ? void 0 : sn.clientHeight) != null ? yn : u.clientHeight) != null ? kn : 0 : u.clientHeight, P = E + Math.max(0, V) * 0.5, me = Ye(P);
|
|
3364
3372
|
ke.value = $e(me, 0, Math.max(0, S.value.length - 1));
|
|
3365
3373
|
return;
|
|
3366
3374
|
}
|
|
3367
|
-
const
|
|
3368
|
-
!i && Math.abs(
|
|
3375
|
+
const zt = Math.round((Ne + it) / 2);
|
|
3376
|
+
!i && Math.abs(zt - ke.value) <= 1 || (ke.value = $e(zt, 0, Math.max(0, S.value.length - 1)));
|
|
3369
3377
|
}
|
|
3370
3378
|
function $e(i, u, p) {
|
|
3371
3379
|
return Math.min(Math.max(i, u), p);
|
|
3372
3380
|
}
|
|
3373
|
-
function
|
|
3381
|
+
function ot() {
|
|
3374
3382
|
const i = S.value.length;
|
|
3375
3383
|
if (!j.value || i === 0) {
|
|
3376
3384
|
Ce.start = 0, Ce.end = i;
|
|
3377
3385
|
return;
|
|
3378
3386
|
}
|
|
3379
|
-
const u = Math.min(ee.value, i), p =
|
|
3387
|
+
const u = Math.min(ee.value, i), p = St.value, L = $e(ke.value - p, 0, Math.max(0, i - u));
|
|
3380
3388
|
Ce.start = L, Ce.end = Math.min(i, L + u);
|
|
3381
3389
|
}
|
|
3382
|
-
const
|
|
3383
|
-
function
|
|
3390
|
+
const kt = Xn({}), Re = Xn({ total: 0, count: 0 });
|
|
3391
|
+
function Ft(i, u) {
|
|
3384
3392
|
if (!Number.isFinite(u) || u <= 0)
|
|
3385
3393
|
return;
|
|
3386
|
-
const p =
|
|
3387
|
-
|
|
3394
|
+
const p = kt[i];
|
|
3395
|
+
kt[i] = u, p ? Re.total += u - p : (Re.total += u, Re.count++);
|
|
3388
3396
|
}
|
|
3389
3397
|
const pe = N(() => Re.count > 0 ? Math.max(12, Re.total / Re.count) : 32);
|
|
3390
3398
|
function g(i, u) {
|
|
@@ -3393,7 +3401,7 @@ const bi = {
|
|
|
3393
3401
|
return 0;
|
|
3394
3402
|
let p = 0;
|
|
3395
3403
|
for (let _ = i; _ < u; _++)
|
|
3396
|
-
p += (L =
|
|
3404
|
+
p += (L = kt[_]) != null ? L : pe.value;
|
|
3397
3405
|
return p;
|
|
3398
3406
|
}
|
|
3399
3407
|
const x = N(() => {
|
|
@@ -3404,62 +3412,62 @@ const bi = {
|
|
|
3404
3412
|
node: L,
|
|
3405
3413
|
index: u + _
|
|
3406
3414
|
}));
|
|
3407
|
-
}), B = N(() => j.value ? g(0, Math.min(Ce.start, S.value.length)) : 0),
|
|
3415
|
+
}), B = N(() => j.value ? g(0, Math.min(Ce.start, S.value.length)) : 0), K = N(() => {
|
|
3408
3416
|
if (!j.value)
|
|
3409
3417
|
return 0;
|
|
3410
3418
|
const i = S.value.length, u = Math.min(Ce.end, i);
|
|
3411
3419
|
return g(u, i);
|
|
3412
3420
|
});
|
|
3413
|
-
function
|
|
3421
|
+
function Ye(i) {
|
|
3414
3422
|
var L;
|
|
3415
3423
|
if (i <= 0)
|
|
3416
3424
|
return 0;
|
|
3417
3425
|
let u = i;
|
|
3418
3426
|
const p = S.value;
|
|
3419
3427
|
for (let _ = 0; _ < p.length; _++) {
|
|
3420
|
-
const X = (L =
|
|
3428
|
+
const X = (L = kt[_]) != null ? L : pe.value;
|
|
3421
3429
|
if (u <= X)
|
|
3422
3430
|
return _;
|
|
3423
3431
|
u -= X;
|
|
3424
3432
|
}
|
|
3425
3433
|
return Math.max(0, p.length - 1);
|
|
3426
3434
|
}
|
|
3427
|
-
function
|
|
3435
|
+
function mt(i) {
|
|
3428
3436
|
if (I.size && j.value)
|
|
3429
3437
|
for (const [u, p] of I)
|
|
3430
3438
|
u >= i && (p.destroy(), I.delete(u), ve.value && delete Se[u], te(u), Y.delete(u));
|
|
3431
3439
|
}
|
|
3432
|
-
function
|
|
3440
|
+
function rt(i, u) {
|
|
3433
3441
|
ve.value && (Se[i] = u), u && (j.value ? be() : ke.value = $e(i, 0, Math.max(0, S.value.length - 1)));
|
|
3434
3442
|
}
|
|
3435
|
-
function
|
|
3443
|
+
function Dt(i) {
|
|
3436
3444
|
return ie.value && i >= W.value ? !1 : !ve.value || i < Ee.value ? !0 : Se[i] === !0;
|
|
3437
3445
|
}
|
|
3438
|
-
function
|
|
3446
|
+
function ft(i) {
|
|
3439
3447
|
const u = I.get(i);
|
|
3440
3448
|
u && (u.destroy(), I.delete(i)), te(i);
|
|
3441
3449
|
}
|
|
3442
|
-
function
|
|
3443
|
-
if (u ? Y.set(i, u) : Y.delete(i), u || te(i), !
|
|
3444
|
-
|
|
3450
|
+
function Ue(i, u) {
|
|
3451
|
+
if (u ? Y.set(i, u) : Y.delete(i), u || te(i), !wt.value || !re) {
|
|
3452
|
+
ft(i), u ? rt(i, !0) : ve.value && delete Se[i];
|
|
3445
3453
|
return;
|
|
3446
3454
|
}
|
|
3447
|
-
if (!j.value && ve.value && !d.value && I.size >= Ii && (Vn(), !
|
|
3448
|
-
|
|
3455
|
+
if (!j.value && ve.value && !d.value && I.size >= Ii && (Vn(), !wt.value || !re)) {
|
|
3456
|
+
ft(i), u ? rt(i, !0) : ve.value && delete Se[i];
|
|
3449
3457
|
return;
|
|
3450
3458
|
}
|
|
3451
3459
|
if (i < Ee.value && !j.value) {
|
|
3452
|
-
|
|
3460
|
+
ft(i), rt(i, !0);
|
|
3453
3461
|
return;
|
|
3454
3462
|
}
|
|
3455
3463
|
if (!u) {
|
|
3456
|
-
|
|
3464
|
+
ft(i), ve.value && delete Se[i];
|
|
3457
3465
|
return;
|
|
3458
3466
|
}
|
|
3459
|
-
|
|
3467
|
+
ft(i);
|
|
3460
3468
|
const p = re(u, { rootMargin: "400px" });
|
|
3461
|
-
p && (I.set(i, p),
|
|
3462
|
-
te(i),
|
|
3469
|
+
p && (I.set(i, p), rt(i, p.isVisible.value), ve.value && Pn(i), p.whenVisible.then(() => {
|
|
3470
|
+
te(i), rt(i, !0);
|
|
3463
3471
|
}).catch(() => {
|
|
3464
3472
|
}).finally(() => {
|
|
3465
3473
|
I.get(i) === p && I.delete(i);
|
|
@@ -3469,18 +3477,18 @@ const bi = {
|
|
|
3469
3477
|
}
|
|
3470
3478
|
}), j.value && be());
|
|
3471
3479
|
}
|
|
3472
|
-
function
|
|
3480
|
+
function tn(i, u) {
|
|
3473
3481
|
if (!u) {
|
|
3474
|
-
|
|
3482
|
+
yt.delete(i);
|
|
3475
3483
|
return;
|
|
3476
3484
|
}
|
|
3477
|
-
|
|
3478
|
-
|
|
3485
|
+
yt.set(i, u), queueMicrotask(() => {
|
|
3486
|
+
Ft(i, u.offsetHeight);
|
|
3479
3487
|
});
|
|
3480
3488
|
}
|
|
3481
|
-
let
|
|
3489
|
+
let Et = null, ht = null, Wt = !1, Lt = null, At = null;
|
|
3482
3490
|
function ge() {
|
|
3483
|
-
G && (
|
|
3491
|
+
G && (Et != null && (de == null || de(Et), Et = null), ht != null && (window.clearTimeout(ht), ht = null), At != null && typeof window.cancelIdleCallback == "function" && (window.cancelIdleCallback(At), At = null), Wt = !1, Lt = null);
|
|
3484
3492
|
}
|
|
3485
3493
|
function te(i) {
|
|
3486
3494
|
if (!G)
|
|
@@ -3493,7 +3501,7 @@ const bi = {
|
|
|
3493
3501
|
return;
|
|
3494
3502
|
te(i);
|
|
3495
3503
|
const u = window.setTimeout(() => {
|
|
3496
|
-
J.delete(i),
|
|
3504
|
+
J.delete(i), rt(i, !0);
|
|
3497
3505
|
}, Si);
|
|
3498
3506
|
J.set(i, u);
|
|
3499
3507
|
}
|
|
@@ -3511,26 +3519,26 @@ const bi = {
|
|
|
3511
3519
|
}
|
|
3512
3520
|
}
|
|
3513
3521
|
function pn(i, u = {}) {
|
|
3514
|
-
var Te,
|
|
3522
|
+
var Te, qe;
|
|
3515
3523
|
if (!ie.value)
|
|
3516
3524
|
return;
|
|
3517
|
-
const p =
|
|
3525
|
+
const p = jt.value;
|
|
3518
3526
|
if (W.value >= p)
|
|
3519
3527
|
return;
|
|
3520
|
-
const L = Math.max(1, i), _ = (
|
|
3521
|
-
var
|
|
3522
|
-
|
|
3523
|
-
const Ne =
|
|
3524
|
-
|
|
3525
|
-
const
|
|
3526
|
-
const
|
|
3527
|
-
W.value = Math.min(p, W.value + Math.max(1,
|
|
3528
|
-
const
|
|
3529
|
-
return Qn(
|
|
3528
|
+
const L = Math.max(1, i), _ = (at) => {
|
|
3529
|
+
var Ze;
|
|
3530
|
+
Et = null, ht = null, At = null, Wt = !1;
|
|
3531
|
+
const Ne = Lt != null ? Lt : L;
|
|
3532
|
+
Lt = null;
|
|
3533
|
+
const it = Math.max(2, (Ze = t.renderBatchBudgetMs) != null ? Ze : 6), zt = (Yt) => {
|
|
3534
|
+
const Ut = typeof performance != "undefined" ? performance.now() : Date.now();
|
|
3535
|
+
W.value = Math.min(p, W.value + Math.max(1, Yt)), mt(W.value);
|
|
3536
|
+
const bt = (typeof performance != "undefined" ? performance.now() : Date.now()) - Ut;
|
|
3537
|
+
return Qn(bt), bt;
|
|
3530
3538
|
};
|
|
3531
|
-
let
|
|
3532
|
-
for (;
|
|
3533
|
-
|
|
3539
|
+
let xt = Ne;
|
|
3540
|
+
for (; zt(xt), !(W.value >= p || !at || (typeof at.timeRemaining == "function" ? at.timeRemaining() : 0) <= it * 0.5); )
|
|
3541
|
+
xt = Math.max(1, Math.round(ae.value));
|
|
3534
3542
|
W.value < p && gn();
|
|
3535
3543
|
};
|
|
3536
3544
|
if (!G || u.immediate) {
|
|
@@ -3538,31 +3546,31 @@ const bi = {
|
|
|
3538
3546
|
return;
|
|
3539
3547
|
}
|
|
3540
3548
|
const X = Math.max(0, (Te = t.renderBatchDelay) != null ? Te : 16);
|
|
3541
|
-
if (
|
|
3542
|
-
if (
|
|
3543
|
-
const
|
|
3544
|
-
|
|
3549
|
+
if (Lt = Lt != null ? Math.max(Lt, L) : L, !Wt) {
|
|
3550
|
+
if (Wt = !0, !D && We && window.requestIdleCallback) {
|
|
3551
|
+
const at = Math.max(0, (qe = t.renderBatchIdleTimeoutMs) != null ? qe : 120);
|
|
3552
|
+
At = window.requestIdleCallback((Ne) => {
|
|
3545
3553
|
_(Ne);
|
|
3546
|
-
}, { timeout:
|
|
3554
|
+
}, { timeout: at });
|
|
3547
3555
|
return;
|
|
3548
3556
|
}
|
|
3549
3557
|
if (!ne || D) {
|
|
3550
|
-
|
|
3558
|
+
ht = window.setTimeout(() => _(), X);
|
|
3551
3559
|
return;
|
|
3552
3560
|
}
|
|
3553
|
-
|
|
3561
|
+
Et = ne(() => {
|
|
3554
3562
|
if (X === 0) {
|
|
3555
3563
|
_();
|
|
3556
3564
|
return;
|
|
3557
3565
|
}
|
|
3558
|
-
|
|
3566
|
+
ht = window.setTimeout(() => _(), X);
|
|
3559
3567
|
});
|
|
3560
3568
|
}
|
|
3561
3569
|
}
|
|
3562
3570
|
function gn() {
|
|
3563
3571
|
if (!ie.value)
|
|
3564
3572
|
return;
|
|
3565
|
-
const i =
|
|
3573
|
+
const i = gt.value ? Math.max(1, Math.round(ae.value)) : Math.max(1, ce.value);
|
|
3566
3574
|
pn(i);
|
|
3567
3575
|
}
|
|
3568
3576
|
function Qn(i) {
|
|
@@ -3583,35 +3591,35 @@ const bi = {
|
|
|
3583
3591
|
() => t.indexKey
|
|
3584
3592
|
],
|
|
3585
3593
|
() => {
|
|
3586
|
-
var
|
|
3587
|
-
const u = S.value.length, p =
|
|
3588
|
-
|
|
3589
|
-
const
|
|
3590
|
-
|
|
3594
|
+
var Ze;
|
|
3595
|
+
const u = S.value.length, p = Ht.value, L = t.indexKey, _ = L !== void 0 && L !== p.key, X = u !== p.total, Te = _ || X;
|
|
3596
|
+
Ht.value = { key: L, total: u };
|
|
3597
|
+
const qe = $t.value, at = (Ze = t.renderBatchDelay) != null ? Ze : 16, Ne = qe.batchSize !== ce.value || qe.initial !== Ee.value || qe.delay !== at || qe.enabled !== ie.value;
|
|
3598
|
+
$t.value = {
|
|
3591
3599
|
batchSize: ce.value,
|
|
3592
3600
|
initial: Ee.value,
|
|
3593
|
-
delay:
|
|
3601
|
+
delay: at,
|
|
3594
3602
|
enabled: ie.value
|
|
3595
3603
|
}, (Te || Ne || !ie.value) && ge(), (Te || Ne) && (ae.value = Math.max(1, ce.value || 1)), Te && j.value && be({ immediate: !0 });
|
|
3596
|
-
const
|
|
3604
|
+
const it = jt.value;
|
|
3597
3605
|
if (!u) {
|
|
3598
|
-
W.value = 0,
|
|
3606
|
+
W.value = 0, mt(0);
|
|
3599
3607
|
return;
|
|
3600
3608
|
}
|
|
3601
3609
|
if (!ie.value) {
|
|
3602
|
-
W.value =
|
|
3610
|
+
W.value = it, mt(W.value);
|
|
3603
3611
|
return;
|
|
3604
3612
|
}
|
|
3605
|
-
_ || p.total === 0 || Ne ? W.value = Math.min(
|
|
3606
|
-
const
|
|
3607
|
-
W.value <
|
|
3613
|
+
_ || p.total === 0 || Ne ? W.value = Math.min(it, Ee.value) : W.value = Math.min(W.value, it);
|
|
3614
|
+
const xt = Math.max(1, Ee.value || ce.value || u);
|
|
3615
|
+
W.value < it ? pn(xt, { immediate: !G }) : mt(W.value);
|
|
3608
3616
|
},
|
|
3609
3617
|
{ immediate: !0 }
|
|
3610
3618
|
), U(
|
|
3611
3619
|
() => j.value,
|
|
3612
3620
|
(i) => {
|
|
3613
3621
|
if (!i) {
|
|
3614
|
-
|
|
3622
|
+
nt(), Q();
|
|
3615
3623
|
return;
|
|
3616
3624
|
}
|
|
3617
3625
|
xe(), be({ immediate: !0 });
|
|
@@ -3639,11 +3647,11 @@ const bi = {
|
|
|
3639
3647
|
for (const u of Object.keys(Se))
|
|
3640
3648
|
delete Se[u];
|
|
3641
3649
|
for (const [u, p] of Y)
|
|
3642
|
-
p &&
|
|
3650
|
+
p && rt(u, !0);
|
|
3643
3651
|
return;
|
|
3644
3652
|
}
|
|
3645
3653
|
for (const [u, p] of Y)
|
|
3646
|
-
|
|
3654
|
+
Ue(u, p);
|
|
3647
3655
|
},
|
|
3648
3656
|
{ immediate: !1 }
|
|
3649
3657
|
), U(
|
|
@@ -3661,13 +3669,13 @@ const bi = {
|
|
|
3661
3669
|
j.value && be({ immediate: !0 });
|
|
3662
3670
|
}
|
|
3663
3671
|
), U(
|
|
3664
|
-
[ke, ee,
|
|
3672
|
+
[ke, ee, St, () => S.value.length, j],
|
|
3665
3673
|
() => {
|
|
3666
|
-
|
|
3674
|
+
ot();
|
|
3667
3675
|
},
|
|
3668
3676
|
{ immediate: !0 }
|
|
3669
3677
|
), U(
|
|
3670
|
-
() =>
|
|
3678
|
+
() => jt.value,
|
|
3671
3679
|
(i, u) => {
|
|
3672
3680
|
ie.value && (typeof u == "number" && i <= u || i > W.value && gn());
|
|
3673
3681
|
}
|
|
@@ -3678,69 +3686,69 @@ const bi = {
|
|
|
3678
3686
|
I.clear();
|
|
3679
3687
|
for (const i of Array.from(J.keys()))
|
|
3680
3688
|
te(i);
|
|
3681
|
-
|
|
3689
|
+
nt(), Q();
|
|
3682
3690
|
});
|
|
3683
|
-
const
|
|
3691
|
+
const Xt = vn(() => z(null, null, function* () {
|
|
3684
3692
|
try {
|
|
3685
|
-
return (yield import("./index-
|
|
3693
|
+
return (yield import("./index-CpUcwcBM.js")).default;
|
|
3686
3694
|
} catch (i) {
|
|
3687
3695
|
return console.warn(
|
|
3688
3696
|
'[markstream-vue] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install "stream-monaco".',
|
|
3689
3697
|
i
|
|
3690
3698
|
), mn;
|
|
3691
3699
|
}
|
|
3692
|
-
})), eo = N(() => t.renderCodeBlocksAsPre ? mn :
|
|
3700
|
+
})), eo = N(() => t.renderCodeBlocksAsPre ? mn : Xt), nn = {
|
|
3693
3701
|
text: Ie,
|
|
3694
3702
|
paragraph: $n,
|
|
3695
3703
|
heading: po,
|
|
3696
|
-
code_block:
|
|
3704
|
+
code_block: Xt,
|
|
3697
3705
|
list: In,
|
|
3698
3706
|
blockquote: Mn,
|
|
3699
3707
|
table: Sn,
|
|
3700
3708
|
definition_list: Cn,
|
|
3701
3709
|
footnote: _n,
|
|
3702
3710
|
footnote_reference: De,
|
|
3703
|
-
footnote_anchor:
|
|
3711
|
+
footnote_anchor: un,
|
|
3704
3712
|
admonition: Ln,
|
|
3705
|
-
hardbreak:
|
|
3706
|
-
link:
|
|
3707
|
-
image:
|
|
3713
|
+
hardbreak: Jt,
|
|
3714
|
+
link: Ke,
|
|
3715
|
+
image: Pt,
|
|
3708
3716
|
thematic_break: En,
|
|
3709
|
-
math_inline:
|
|
3710
|
-
math_block:
|
|
3711
|
-
strong:
|
|
3712
|
-
emphasis:
|
|
3713
|
-
strikethrough:
|
|
3714
|
-
highlight:
|
|
3715
|
-
insert:
|
|
3716
|
-
subscript:
|
|
3717
|
-
superscript:
|
|
3717
|
+
math_inline: It,
|
|
3718
|
+
math_block: qr,
|
|
3719
|
+
strong: Ve,
|
|
3720
|
+
emphasis: tt,
|
|
3721
|
+
strikethrough: Oe,
|
|
3722
|
+
highlight: et,
|
|
3723
|
+
insert: Qe,
|
|
3724
|
+
subscript: Je,
|
|
3725
|
+
superscript: Ge,
|
|
3718
3726
|
emoji: je,
|
|
3719
|
-
checkbox:
|
|
3720
|
-
checkbox_input:
|
|
3721
|
-
inline_code:
|
|
3722
|
-
html_inline:
|
|
3723
|
-
reference:
|
|
3727
|
+
checkbox: _t,
|
|
3728
|
+
checkbox_input: _t,
|
|
3729
|
+
inline_code: ze,
|
|
3730
|
+
html_inline: Ae,
|
|
3731
|
+
reference: Pe,
|
|
3724
3732
|
html_block: Ci
|
|
3725
3733
|
// 可以添加更多节点类型
|
|
3726
3734
|
// 例如:custom_node: CustomNode,
|
|
3727
3735
|
};
|
|
3728
|
-
function
|
|
3736
|
+
function on(i) {
|
|
3729
3737
|
var L;
|
|
3730
3738
|
if (!i)
|
|
3731
3739
|
return Io;
|
|
3732
|
-
const u =
|
|
3740
|
+
const u = Bt(t.customId), p = u[String(i.type)];
|
|
3733
3741
|
if (i.type === "code_block") {
|
|
3734
3742
|
if (String((L = i.language) != null ? L : "").trim().toLowerCase() === "mermaid")
|
|
3735
|
-
return u.mermaid ||
|
|
3743
|
+
return u.mermaid || dn;
|
|
3736
3744
|
if (p)
|
|
3737
3745
|
return p;
|
|
3738
3746
|
const X = u.code_block;
|
|
3739
3747
|
return X || eo.value;
|
|
3740
3748
|
}
|
|
3741
|
-
return p ||
|
|
3749
|
+
return p || nn[String(i.type)] || Io;
|
|
3742
3750
|
}
|
|
3743
|
-
function
|
|
3751
|
+
function vt(i) {
|
|
3744
3752
|
var u;
|
|
3745
3753
|
return (i == null ? void 0 : i.type) === "code_block" && String((u = i.language) != null ? u : "").trim().toLowerCase() === "mermaid" ? {} : i.type === "code_block" ? oe({
|
|
3746
3754
|
// streaming behavior control for CodeBlockNode
|
|
@@ -3771,7 +3779,7 @@ const bi = {
|
|
|
3771
3779
|
return (i, u) => (m(), y("div", {
|
|
3772
3780
|
ref_key: "containerRef",
|
|
3773
3781
|
ref: a,
|
|
3774
|
-
class: "markdown-renderer",
|
|
3782
|
+
class: O(["markstream-vue markdown-renderer", [{ dark: t.isDark }]]),
|
|
3775
3783
|
onClick: wn,
|
|
3776
3784
|
onMouseover: On,
|
|
3777
3785
|
onMouseout: to
|
|
@@ -3779,7 +3787,7 @@ const bi = {
|
|
|
3779
3787
|
j.value ? (m(), y("div", {
|
|
3780
3788
|
key: 0,
|
|
3781
3789
|
class: "node-spacer",
|
|
3782
|
-
style:
|
|
3790
|
+
style: ut({ height: `${B.value}px` }),
|
|
3783
3791
|
"aria-hidden": "true"
|
|
3784
3792
|
}, null, 4)) : fe("", !0),
|
|
3785
3793
|
(m(!0), y(ue, null, Be(x.value, (p) => {
|
|
@@ -3787,15 +3795,15 @@ const bi = {
|
|
|
3787
3795
|
return m(), y("div", {
|
|
3788
3796
|
key: p.index,
|
|
3789
3797
|
ref_for: !0,
|
|
3790
|
-
ref: (_) =>
|
|
3798
|
+
ref: (_) => Ue(p.index, _),
|
|
3791
3799
|
class: "node-slot",
|
|
3792
3800
|
"data-node-index": p.index,
|
|
3793
3801
|
"data-node-type": p.node.type
|
|
3794
3802
|
}, [
|
|
3795
|
-
|
|
3803
|
+
Dt(p.index) ? (m(), y("div", {
|
|
3796
3804
|
key: 0,
|
|
3797
3805
|
ref_for: !0,
|
|
3798
|
-
ref: (_) =>
|
|
3806
|
+
ref: (_) => tn(p.index, _),
|
|
3799
3807
|
class: "node-content"
|
|
3800
3808
|
}, [
|
|
3801
3809
|
p.node.type !== "code_block" && t.typewriter !== !1 ? (m(), ye(zn, {
|
|
@@ -3803,12 +3811,12 @@ const bi = {
|
|
|
3803
3811
|
name: "typewriter",
|
|
3804
3812
|
appear: ""
|
|
3805
3813
|
}, {
|
|
3806
|
-
default:
|
|
3807
|
-
(m(), ye(
|
|
3814
|
+
default: en(() => [
|
|
3815
|
+
(m(), ye(Fe(on(p.node)), Kt({
|
|
3808
3816
|
node: p.node,
|
|
3809
3817
|
loading: p.node.loading,
|
|
3810
3818
|
"index-key": `${e.indexKey || "markdown-renderer"}-${p.index}`
|
|
3811
|
-
}, { ref_for: !0 },
|
|
3819
|
+
}, { ref_for: !0 }, vt(p.node), {
|
|
3812
3820
|
"custom-id": t.customId,
|
|
3813
3821
|
"is-dark": t.isDark,
|
|
3814
3822
|
onCopy: u[0] || (u[0] = (_) => s("copy", _)),
|
|
@@ -3816,12 +3824,12 @@ const bi = {
|
|
|
3816
3824
|
}), null, 16, ["node", "loading", "index-key", "custom-id", "is-dark"]))
|
|
3817
3825
|
]),
|
|
3818
3826
|
_: 2
|
|
3819
|
-
}, 1024)) : (m(), ye(
|
|
3827
|
+
}, 1024)) : (m(), ye(Fe(on(p.node)), Kt({
|
|
3820
3828
|
key: 1,
|
|
3821
3829
|
node: p.node,
|
|
3822
3830
|
loading: p.node.loading,
|
|
3823
3831
|
"index-key": `${e.indexKey || "markdown-renderer"}-${p.index}`
|
|
3824
|
-
}, { ref_for: !0 },
|
|
3832
|
+
}, { ref_for: !0 }, vt(p.node), {
|
|
3825
3833
|
"custom-id": t.customId,
|
|
3826
3834
|
"is-dark": t.isDark,
|
|
3827
3835
|
onCopy: u[2] || (u[2] = (_) => s("copy", _)),
|
|
@@ -3830,23 +3838,23 @@ const bi = {
|
|
|
3830
3838
|
], 512)) : (m(), y("div", {
|
|
3831
3839
|
key: 1,
|
|
3832
3840
|
class: "node-placeholder",
|
|
3833
|
-
style:
|
|
3841
|
+
style: ut({ height: `${(L = kt[p.index]) != null ? L : pe.value}px` })
|
|
3834
3842
|
}, null, 4))
|
|
3835
3843
|
], 8, _i);
|
|
3836
3844
|
}), 128)),
|
|
3837
3845
|
j.value ? (m(), y("div", {
|
|
3838
3846
|
key: 1,
|
|
3839
3847
|
class: "node-spacer",
|
|
3840
|
-
style:
|
|
3848
|
+
style: ut({ height: `${K.value}px` }),
|
|
3841
3849
|
"aria-hidden": "true"
|
|
3842
3850
|
}, null, 4)) : fe("", !0)
|
|
3843
|
-
],
|
|
3851
|
+
], 34));
|
|
3844
3852
|
}
|
|
3845
|
-
}),
|
|
3846
|
-
|
|
3853
|
+
}), lt = /* @__PURE__ */ Z(Ei, [["__scopeId", "data-v-ec150609"]]);
|
|
3854
|
+
lt.install = (e) => {
|
|
3847
3855
|
var t, s;
|
|
3848
|
-
const n = (s = (t =
|
|
3849
|
-
e.component(n,
|
|
3856
|
+
const n = (s = (t = lt.__name) != null ? t : lt.name) != null ? s : "NodeRenderer";
|
|
3857
|
+
e.component(n, lt);
|
|
3850
3858
|
};
|
|
3851
3859
|
const Li = {
|
|
3852
3860
|
key: 0,
|
|
@@ -3883,7 +3891,7 @@ const Li = {
|
|
|
3883
3891
|
}
|
|
3884
3892
|
const w = `admonition-${Math.random().toString(36).slice(2, 9)}`;
|
|
3885
3893
|
return (b, C) => (m(), y("div", {
|
|
3886
|
-
class:
|
|
3894
|
+
class: O(["admonition", [`admonition-${t.node.kind}`, t.isDark ? "is-dark" : ""]])
|
|
3887
3895
|
}, [
|
|
3888
3896
|
h("div", {
|
|
3889
3897
|
id: w,
|
|
@@ -3907,7 +3915,7 @@ const Li = {
|
|
|
3907
3915
|
class: "admonition-content",
|
|
3908
3916
|
"aria-labelledby": w
|
|
3909
3917
|
}, [
|
|
3910
|
-
fn([t.node.children], () =>
|
|
3918
|
+
fn([t.node.children], () => ct($(lt), {
|
|
3911
3919
|
"index-key": `admonition-${e.indexKey}`,
|
|
3912
3920
|
nodes: t.node.children,
|
|
3913
3921
|
"custom-id": t.customId,
|
|
@@ -4504,19 +4512,19 @@ const Us = {
|
|
|
4504
4512
|
}), D = N(() => {
|
|
4505
4513
|
const g = d.value.trim().toLowerCase();
|
|
4506
4514
|
return t.isShowPreview && (g === "html" || g === "svg");
|
|
4507
|
-
}),
|
|
4508
|
-
const g = {}, x = (
|
|
4509
|
-
if (
|
|
4510
|
-
return typeof
|
|
4511
|
-
}, B = x(t.minWidth),
|
|
4512
|
-
return B && (g.minWidth = B),
|
|
4515
|
+
}), We = N(() => {
|
|
4516
|
+
const g = {}, x = (Ye) => {
|
|
4517
|
+
if (Ye != null)
|
|
4518
|
+
return typeof Ye == "number" ? `${Ye}px` : String(Ye);
|
|
4519
|
+
}, B = x(t.minWidth), K = x(t.maxWidth);
|
|
4520
|
+
return B && (g.minWidth = B), K && (g.maxWidth = K), g;
|
|
4513
4521
|
}), ce = N(() => ({
|
|
4514
4522
|
fontSize: `${T.value}px`
|
|
4515
4523
|
}));
|
|
4516
4524
|
function Ee() {
|
|
4517
4525
|
return t.isDark ? t.darkTheme : t.lightTheme;
|
|
4518
4526
|
}
|
|
4519
|
-
function
|
|
4527
|
+
function gt(g) {
|
|
4520
4528
|
return g.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4521
4529
|
}
|
|
4522
4530
|
function W(g) {
|
|
@@ -4524,9 +4532,9 @@ const Us = {
|
|
|
4524
4532
|
C.value = "", H.value = !1;
|
|
4525
4533
|
return;
|
|
4526
4534
|
}
|
|
4527
|
-
C.value = `<pre class="shiki shiki-fallback"><code>${
|
|
4535
|
+
C.value = `<pre class="shiki shiki-fallback"><code>${gt(g)}</code></pre>`, H.value = !1;
|
|
4528
4536
|
}
|
|
4529
|
-
function
|
|
4537
|
+
function Ht() {
|
|
4530
4538
|
C.value = "", H.value = !0;
|
|
4531
4539
|
}
|
|
4532
4540
|
function ae() {
|
|
@@ -4537,43 +4545,43 @@ const Us = {
|
|
|
4537
4545
|
function Se() {
|
|
4538
4546
|
return z(this, null, function* () {
|
|
4539
4547
|
if (yield he(), ae()) {
|
|
4540
|
-
|
|
4548
|
+
Ht();
|
|
4541
4549
|
return;
|
|
4542
4550
|
}
|
|
4543
4551
|
const g = b.value;
|
|
4544
4552
|
g && (A == null || A.disconnect(), A = new MutationObserver(() => {
|
|
4545
|
-
ae() && (
|
|
4553
|
+
ae() && (Ht(), A == null || A.disconnect(), A = void 0);
|
|
4546
4554
|
}), A.observe(g, { childList: !0, subtree: !0 }));
|
|
4547
4555
|
});
|
|
4548
4556
|
}
|
|
4549
4557
|
let I, J, Y, Le = () => {
|
|
4550
|
-
},
|
|
4558
|
+
}, Xe;
|
|
4551
4559
|
const q = /* @__PURE__ */ new Set(), ve = /* @__PURE__ */ new Set(), ie = typeof import.meta != "undefined" && !1;
|
|
4552
|
-
function
|
|
4553
|
-
var
|
|
4554
|
-
const [B] = String(g != null ? g : "").split(":"),
|
|
4555
|
-
return
|
|
4560
|
+
function $t(g, x = !1) {
|
|
4561
|
+
var Ye;
|
|
4562
|
+
const [B] = String(g != null ? g : "").split(":"), K = (Ye = B == null ? void 0 : B.trim().toLowerCase()) != null ? Ye : "";
|
|
4563
|
+
return K ? !Xe || Xe.has(K) ? K : (x && ie && !q.has(K) && (q.add(K), console.warn(`[MarkdownCodeBlockNode] Language "${K}" not preloaded in stream-markdown; falling back to plaintext.`)), "plaintext") : "plaintext";
|
|
4556
4564
|
}
|
|
4557
|
-
function
|
|
4565
|
+
function wt(g, x) {
|
|
4558
4566
|
return z(this, null, function* () {
|
|
4559
4567
|
if (!I)
|
|
4560
4568
|
return;
|
|
4561
|
-
const B =
|
|
4569
|
+
const B = $t(x, !!(g && g.length));
|
|
4562
4570
|
try {
|
|
4563
4571
|
yield I.updateCode(g, B);
|
|
4564
|
-
} catch (
|
|
4565
|
-
B !== "plaintext" ? (ie && !ve.has(B) && (ve.add(B), console.warn(`[MarkdownCodeBlockNode] Failed to render language "${B}", retrying as plaintext.`,
|
|
4572
|
+
} catch (K) {
|
|
4573
|
+
B !== "plaintext" ? (ie && !ve.has(B) && (ve.add(B), console.warn(`[MarkdownCodeBlockNode] Failed to render language "${B}", retrying as plaintext.`, K)), yield I.updateCode(g, "plaintext")) : ie && console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.", K);
|
|
4566
4574
|
}
|
|
4567
4575
|
});
|
|
4568
4576
|
}
|
|
4569
|
-
function
|
|
4577
|
+
function St() {
|
|
4570
4578
|
return z(this, null, function* () {
|
|
4571
4579
|
if (!J)
|
|
4572
4580
|
try {
|
|
4573
4581
|
const g = yield import("stream-markdown");
|
|
4574
4582
|
J = g.createShikiStreamRenderer, Y = g.registerHighlight, Le = g.disposeHighlighter;
|
|
4575
4583
|
const x = Array.isArray(g.defaultLanguages) ? g.defaultLanguages : void 0;
|
|
4576
|
-
|
|
4584
|
+
Xe = x ? new Set(x.map((B) => B.toLowerCase())) : void 0, Y == null || Y({ themes: t.themes });
|
|
4577
4585
|
} catch (g) {
|
|
4578
4586
|
console.warn("[MarkdownCodeBlockNode] stream-markdown not available:", g);
|
|
4579
4587
|
}
|
|
@@ -4585,7 +4593,7 @@ const Us = {
|
|
|
4585
4593
|
Le(), I == null || I.dispose(), I = void 0, H.value = !1;
|
|
4586
4594
|
return;
|
|
4587
4595
|
}
|
|
4588
|
-
if (yield
|
|
4596
|
+
if (yield St(), !v.value || !b.value) {
|
|
4589
4597
|
W(t.node.code);
|
|
4590
4598
|
return;
|
|
4591
4599
|
}
|
|
@@ -4599,7 +4607,7 @@ const Us = {
|
|
|
4599
4607
|
W(t.node.code);
|
|
4600
4608
|
return;
|
|
4601
4609
|
}
|
|
4602
|
-
W(t.node.code), yield
|
|
4610
|
+
W(t.node.code), yield wt(t.node.code, d.value), yield Se();
|
|
4603
4611
|
});
|
|
4604
4612
|
}
|
|
4605
4613
|
ke(), io(() => {
|
|
@@ -4617,7 +4625,7 @@ const Us = {
|
|
|
4617
4625
|
Le(), I == null || I.dispose();
|
|
4618
4626
|
return;
|
|
4619
4627
|
}
|
|
4620
|
-
I || (W(g), yield ke()), !(!I || !g) && (t.stream === !1 && t.loading || (W(g), yield
|
|
4628
|
+
I || (W(g), yield ke()), !(!I || !g) && (t.stream === !1 && t.loading || (W(g), yield wt(g, x), yield Se()));
|
|
4621
4629
|
}));
|
|
4622
4630
|
const Ce = U(
|
|
4623
4631
|
() => [t.darkTheme, t.lightTheme],
|
|
@@ -4636,17 +4644,17 @@ const Us = {
|
|
|
4636
4644
|
const g = v.value;
|
|
4637
4645
|
g && g.scrollHeight > g.clientHeight && (g.scrollTop = g.scrollHeight);
|
|
4638
4646
|
}));
|
|
4639
|
-
function
|
|
4647
|
+
function yt(g, x = 50) {
|
|
4640
4648
|
return g.scrollHeight - g.scrollTop - g.clientHeight <= x;
|
|
4641
4649
|
}
|
|
4642
|
-
function
|
|
4650
|
+
function jt() {
|
|
4643
4651
|
const g = v.value;
|
|
4644
4652
|
if (!g || f.value)
|
|
4645
4653
|
return;
|
|
4646
4654
|
const x = g.scrollTop;
|
|
4647
|
-
x < ee.value ? S.value = !1 :
|
|
4655
|
+
x < ee.value ? S.value = !1 : yt(g) && (S.value = !0), ee.value = x;
|
|
4648
4656
|
}
|
|
4649
|
-
function
|
|
4657
|
+
function dt() {
|
|
4650
4658
|
return z(this, null, function* () {
|
|
4651
4659
|
try {
|
|
4652
4660
|
typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(t.node.code)), c.value = !0, s("copy", t.node.code), setTimeout(() => {
|
|
@@ -4657,24 +4665,24 @@ const Us = {
|
|
|
4657
4665
|
}
|
|
4658
4666
|
});
|
|
4659
4667
|
}
|
|
4660
|
-
function
|
|
4668
|
+
function nt(g) {
|
|
4661
4669
|
const x = g;
|
|
4662
4670
|
return !x || x.disabled;
|
|
4663
4671
|
}
|
|
4664
4672
|
function xe(g, x, B = "top") {
|
|
4665
|
-
if (
|
|
4673
|
+
if (nt(g.currentTarget))
|
|
4666
4674
|
return;
|
|
4667
|
-
const
|
|
4668
|
-
Dn(g.currentTarget, x, B, !1,
|
|
4675
|
+
const K = g, Ye = (K == null ? void 0 : K.clientX) != null && (K == null ? void 0 : K.clientY) != null ? { x: K.clientX, y: K.clientY } : void 0;
|
|
4676
|
+
Dn(g.currentTarget, x, B, !1, Ye, t.isDark);
|
|
4669
4677
|
}
|
|
4670
4678
|
function Q() {
|
|
4671
4679
|
uo();
|
|
4672
4680
|
}
|
|
4673
4681
|
function be(g) {
|
|
4674
|
-
if (
|
|
4682
|
+
if (nt(g.currentTarget))
|
|
4675
4683
|
return;
|
|
4676
|
-
const x = c.value ? a("common.copied") || "Copied" : a("common.copy") || "Copy", B = g,
|
|
4677
|
-
Dn(g.currentTarget, x, "top", !1,
|
|
4684
|
+
const x = c.value ? a("common.copied") || "Copied" : a("common.copy") || "Copy", B = g, K = (B == null ? void 0 : B.clientX) != null && (B == null ? void 0 : B.clientY) != null ? { x: B.clientX, y: B.clientY } : void 0;
|
|
4685
|
+
Dn(g.currentTarget, x, "top", !1, K, t.isDark);
|
|
4678
4686
|
}
|
|
4679
4687
|
function le() {
|
|
4680
4688
|
f.value = !f.value;
|
|
@@ -4686,18 +4694,18 @@ const Us = {
|
|
|
4686
4694
|
function $e() {
|
|
4687
4695
|
w.value = !w.value;
|
|
4688
4696
|
}
|
|
4689
|
-
function
|
|
4697
|
+
function ot() {
|
|
4690
4698
|
const g = Math.min(Lo, T.value + Ro);
|
|
4691
4699
|
T.value = g;
|
|
4692
4700
|
}
|
|
4693
|
-
function
|
|
4701
|
+
function kt() {
|
|
4694
4702
|
const g = Math.max(Eo, T.value - Ro);
|
|
4695
4703
|
T.value = g;
|
|
4696
4704
|
}
|
|
4697
4705
|
function Re() {
|
|
4698
4706
|
T.value = j.value;
|
|
4699
4707
|
}
|
|
4700
|
-
function
|
|
4708
|
+
function Ft() {
|
|
4701
4709
|
if (!D.value)
|
|
4702
4710
|
return;
|
|
4703
4711
|
const g = (d.value || t.node.language).toLowerCase(), x = g === "html" ? "text/html" : "image/svg+xml", B = g === "html" ? "HTML Preview" : "SVG Preview";
|
|
@@ -4707,18 +4715,18 @@ const Us = {
|
|
|
4707
4715
|
title: B
|
|
4708
4716
|
});
|
|
4709
4717
|
}
|
|
4710
|
-
return (g, x) => ne.value ? (m(), ye($(
|
|
4718
|
+
return (g, x) => ne.value ? (m(), ye($(dn), {
|
|
4711
4719
|
key: 0,
|
|
4712
4720
|
node: e.node,
|
|
4713
4721
|
"is-dark": t.isDark,
|
|
4714
4722
|
loading: t.loading
|
|
4715
4723
|
}, null, 8, ["node", "is-dark", "loading"])) : (m(), y("div", {
|
|
4716
4724
|
key: 1,
|
|
4717
|
-
style:
|
|
4718
|
-
class:
|
|
4725
|
+
style: ut(We.value),
|
|
4726
|
+
class: O(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", [t.isDark ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white", t.isDark ? "is-dark" : ""]])
|
|
4719
4727
|
}, [
|
|
4720
4728
|
t.showHeader ? (m(), y("div", qs, [
|
|
4721
|
-
|
|
4729
|
+
Tt(g.$slots, "header-left", {}, () => [
|
|
4722
4730
|
h("div", Zs, [
|
|
4723
4731
|
h("span", {
|
|
4724
4732
|
class: "icon-slot h-4 w-4 flex-shrink-0",
|
|
@@ -4727,7 +4735,7 @@ const Us = {
|
|
|
4727
4735
|
h("span", Js, se(G.value), 1)
|
|
4728
4736
|
])
|
|
4729
4737
|
], !0),
|
|
4730
|
-
|
|
4738
|
+
Tt(g.$slots, "header-right", {}, () => [
|
|
4731
4739
|
h("div", Qs, [
|
|
4732
4740
|
h("button", {
|
|
4733
4741
|
type: "button",
|
|
@@ -4740,7 +4748,7 @@ const Us = {
|
|
|
4740
4748
|
onBlur: Q
|
|
4741
4749
|
}, [
|
|
4742
4750
|
(m(), y("svg", {
|
|
4743
|
-
style:
|
|
4751
|
+
style: ut({ rotate: w.value ? "0deg" : "90deg" }),
|
|
4744
4752
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4745
4753
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
4746
4754
|
"aria-hidden": "true",
|
|
@@ -4765,7 +4773,7 @@ const Us = {
|
|
|
4765
4773
|
type: "button",
|
|
4766
4774
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
4767
4775
|
disabled: Number.isFinite(T.value) ? T.value <= Eo : !1,
|
|
4768
|
-
onClick: x[2] || (x[2] = (B) =>
|
|
4776
|
+
onClick: x[2] || (x[2] = (B) => kt()),
|
|
4769
4777
|
onMouseenter: x[3] || (x[3] = (B) => xe(B, $(a)("common.decrease") || "Decrease")),
|
|
4770
4778
|
onFocus: x[4] || (x[4] = (B) => xe(B, $(a)("common.decrease") || "Decrease")),
|
|
4771
4779
|
onMouseleave: Q,
|
|
@@ -4827,7 +4835,7 @@ const Us = {
|
|
|
4827
4835
|
type: "button",
|
|
4828
4836
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
4829
4837
|
disabled: Number.isFinite(T.value) ? T.value >= Lo : !1,
|
|
4830
|
-
onClick: x[8] || (x[8] = (B) =>
|
|
4838
|
+
onClick: x[8] || (x[8] = (B) => ot()),
|
|
4831
4839
|
onMouseenter: x[9] || (x[9] = (B) => xe(B, $(a)("common.increase") || "Increase")),
|
|
4832
4840
|
onFocus: x[10] || (x[10] = (B) => xe(B, $(a)("common.increase") || "Increase")),
|
|
4833
4841
|
onMouseleave: Q,
|
|
@@ -4859,7 +4867,7 @@ const Us = {
|
|
|
4859
4867
|
type: "button",
|
|
4860
4868
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
4861
4869
|
"aria-label": c.value ? $(a)("common.copied") || "Copied" : $(a)("common.copy") || "Copy",
|
|
4862
|
-
onClick:
|
|
4870
|
+
onClick: dt,
|
|
4863
4871
|
onMouseenter: x[11] || (x[11] = (B) => be(B)),
|
|
4864
4872
|
onFocus: x[12] || (x[12] = (B) => be(B)),
|
|
4865
4873
|
onMouseleave: Q,
|
|
@@ -4930,7 +4938,7 @@ const Us = {
|
|
|
4930
4938
|
type: "button",
|
|
4931
4939
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
4932
4940
|
"aria-label": $(a)("common.preview") || "Preview",
|
|
4933
|
-
onClick:
|
|
4941
|
+
onClick: Ft,
|
|
4934
4942
|
onMouseenter: x[15] || (x[15] = (B) => xe(B, $(a)("common.preview") || "Preview")),
|
|
4935
4943
|
onFocus: x[16] || (x[16] = (B) => xe(B, $(a)("common.preview") || "Preview")),
|
|
4936
4944
|
onMouseleave: Q,
|
|
@@ -4970,8 +4978,8 @@ const Us = {
|
|
|
4970
4978
|
ref_key: "codeBlockContent",
|
|
4971
4979
|
ref: v,
|
|
4972
4980
|
class: "code-block-content",
|
|
4973
|
-
style:
|
|
4974
|
-
onScroll:
|
|
4981
|
+
style: ut(ce.value),
|
|
4982
|
+
onScroll: jt
|
|
4975
4983
|
}, [
|
|
4976
4984
|
h("div", {
|
|
4977
4985
|
ref_key: "rendererTarget",
|
|
@@ -4987,7 +4995,7 @@ const Us = {
|
|
|
4987
4995
|
[Nn, !w.value && (e.stream ? !0 : !e.loading)]
|
|
4988
4996
|
]),
|
|
4989
4997
|
Rn(h("div", ml, [
|
|
4990
|
-
|
|
4998
|
+
Tt(g.$slots, "loading", {
|
|
4991
4999
|
loading: e.loading,
|
|
4992
5000
|
stream: e.stream
|
|
4993
5001
|
}, () => [
|
|
@@ -5006,14 +5014,14 @@ const Us = {
|
|
|
5006
5014
|
Zn.install = (e) => {
|
|
5007
5015
|
e.component(Zn.__name, Zn);
|
|
5008
5016
|
};
|
|
5009
|
-
let
|
|
5010
|
-
const He = /* @__PURE__ */ new Map(),
|
|
5011
|
-
let
|
|
5012
|
-
const
|
|
5017
|
+
let st = null, Ot = null, No = !1;
|
|
5018
|
+
const He = /* @__PURE__ */ new Map(), Rt = /* @__PURE__ */ new Map(), Zo = 200;
|
|
5019
|
+
let Qt = 5;
|
|
5020
|
+
const Zt = /* @__PURE__ */ new Set();
|
|
5013
5021
|
function An() {
|
|
5014
|
-
if (He.size <
|
|
5015
|
-
const e = Array.from(
|
|
5016
|
-
|
|
5022
|
+
if (He.size < Qt && Zt.size) {
|
|
5023
|
+
const e = Array.from(Zt);
|
|
5024
|
+
Zt.clear();
|
|
5017
5025
|
for (const n of e)
|
|
5018
5026
|
try {
|
|
5019
5027
|
n();
|
|
@@ -5021,9 +5029,9 @@ function An() {
|
|
|
5021
5029
|
}
|
|
5022
5030
|
}
|
|
5023
5031
|
}
|
|
5024
|
-
let
|
|
5032
|
+
let Ct = null;
|
|
5025
5033
|
function Vl(e) {
|
|
5026
|
-
|
|
5034
|
+
st = e, Ot = null, st.onmessage = (n) => {
|
|
5027
5035
|
const { id: t, html: s, error: a } = n.data, d = He.get(t);
|
|
5028
5036
|
if (d)
|
|
5029
5037
|
if (He.delete(t), clearTimeout(d.timeoutId), An(), a)
|
|
@@ -5032,14 +5040,14 @@ function Vl(e) {
|
|
|
5032
5040
|
const { content: c, displayMode: f } = n.data;
|
|
5033
5041
|
if (c) {
|
|
5034
5042
|
const w = `${f ? "d" : "i"}:${c}`;
|
|
5035
|
-
if (
|
|
5036
|
-
const v =
|
|
5037
|
-
|
|
5043
|
+
if (Rt.set(w, s), Rt.size > Zo) {
|
|
5044
|
+
const v = Rt.keys().next().value;
|
|
5045
|
+
Rt.delete(v);
|
|
5038
5046
|
}
|
|
5039
5047
|
}
|
|
5040
5048
|
d.resolve(s);
|
|
5041
5049
|
}
|
|
5042
|
-
},
|
|
5050
|
+
}, st.onerror = (n) => {
|
|
5043
5051
|
console.error("[katexWorkerClient] Worker error:", n);
|
|
5044
5052
|
for (const [t, s] of He.entries())
|
|
5045
5053
|
clearTimeout(s.timeoutId), s.reject(new Error(`Worker error: ${n.message}`));
|
|
@@ -5048,13 +5056,13 @@ function Vl(e) {
|
|
|
5048
5056
|
}
|
|
5049
5057
|
function Ol() {
|
|
5050
5058
|
var e;
|
|
5051
|
-
|
|
5059
|
+
st && ((e = st.terminate) == null || e.call(st)), st = null, Ot = null;
|
|
5052
5060
|
}
|
|
5053
5061
|
function hl() {
|
|
5054
|
-
return
|
|
5062
|
+
return st || (Ot = new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."), Ot.name = "WorkerInitError", Ot.code = "WORKER_INIT_ERROR", null);
|
|
5055
5063
|
}
|
|
5056
5064
|
function Kl(e) {
|
|
5057
|
-
No = !!e,
|
|
5065
|
+
No = !!e, st && st.postMessage({ type: "init", debug: No });
|
|
5058
5066
|
}
|
|
5059
5067
|
function vl(e, n = !0, t = 2e3, s) {
|
|
5060
5068
|
return z(this, null, function* () {
|
|
@@ -5063,11 +5071,11 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5063
5071
|
const w = new Error("KaTeX rendering disabled");
|
|
5064
5072
|
return w.name = "KaTeXDisabled", w.code = "KATEX_DISABLED", Promise.reject(w);
|
|
5065
5073
|
}
|
|
5066
|
-
if (
|
|
5067
|
-
return Promise.reject(
|
|
5068
|
-
const d = `${n ? "d" : "i"}:${e}`, c =
|
|
5074
|
+
if (Ot)
|
|
5075
|
+
return Promise.reject(Ot);
|
|
5076
|
+
const d = `${n ? "d" : "i"}:${e}`, c = Rt.get(d);
|
|
5069
5077
|
if (c)
|
|
5070
|
-
return
|
|
5078
|
+
return Ct && Ct.recordRender({
|
|
5071
5079
|
type: "cache-hit",
|
|
5072
5080
|
duration: performance.now() - a,
|
|
5073
5081
|
formulaLength: e.length,
|
|
@@ -5076,10 +5084,10 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5076
5084
|
}), Promise.resolve(c);
|
|
5077
5085
|
const f = hl();
|
|
5078
5086
|
if (!f)
|
|
5079
|
-
return Promise.reject(
|
|
5080
|
-
if (He.size >=
|
|
5087
|
+
return Promise.reject(Ot);
|
|
5088
|
+
if (He.size >= Qt) {
|
|
5081
5089
|
const w = new Error("Worker busy");
|
|
5082
|
-
return w.name = "WorkerBusy", w.code = "WORKER_BUSY", w.busy = !0, w.inFlight = He.size, w.max =
|
|
5090
|
+
return w.name = "WorkerBusy", w.code = "WORKER_BUSY", w.busy = !0, w.inFlight = He.size, w.max = Qt, Ct && Ct.recordRender({
|
|
5083
5091
|
type: "worker",
|
|
5084
5092
|
duration: performance.now() - a,
|
|
5085
5093
|
formulaLength: e.length,
|
|
@@ -5097,7 +5105,7 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5097
5105
|
const b = Math.random().toString(36).slice(2), C = globalThis.setTimeout(() => {
|
|
5098
5106
|
He.delete(b);
|
|
5099
5107
|
const T = new Error("Worker render timed out");
|
|
5100
|
-
T.name = "WorkerTimeout", T.code = "WORKER_TIMEOUT",
|
|
5108
|
+
T.name = "WorkerTimeout", T.code = "WORKER_TIMEOUT", Ct && Ct.recordRender({
|
|
5101
5109
|
type: "worker",
|
|
5102
5110
|
duration: performance.now() - a,
|
|
5103
5111
|
formulaLength: e.length,
|
|
@@ -5112,7 +5120,7 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5112
5120
|
};
|
|
5113
5121
|
s && s.addEventListener("abort", H, { once: !0 });
|
|
5114
5122
|
const A = w, S = v, ee = (T) => {
|
|
5115
|
-
|
|
5123
|
+
Ct && Ct.recordRender({
|
|
5116
5124
|
type: "worker",
|
|
5117
5125
|
duration: performance.now() - a,
|
|
5118
5126
|
formulaLength: e.length,
|
|
@@ -5120,7 +5128,7 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5120
5128
|
success: !0
|
|
5121
5129
|
}), A(T);
|
|
5122
5130
|
}, j = (T) => {
|
|
5123
|
-
|
|
5131
|
+
Ct && Ct.recordRender({
|
|
5124
5132
|
type: "worker",
|
|
5125
5133
|
duration: performance.now() - a,
|
|
5126
5134
|
formulaLength: e.length,
|
|
@@ -5135,38 +5143,38 @@ function vl(e, n = !0, t = 2e3, s) {
|
|
|
5135
5143
|
}
|
|
5136
5144
|
function Fl(e, n = !0, t) {
|
|
5137
5145
|
const s = `${n ? "d" : "i"}:${e}`;
|
|
5138
|
-
if (
|
|
5139
|
-
const a =
|
|
5140
|
-
|
|
5146
|
+
if (Rt.set(s, t), Rt.size > Zo) {
|
|
5147
|
+
const a = Rt.keys().next().value;
|
|
5148
|
+
Rt.delete(a);
|
|
5141
5149
|
}
|
|
5142
5150
|
}
|
|
5143
5151
|
function Wl() {
|
|
5144
|
-
return { inFlight: He.size, max:
|
|
5152
|
+
return { inFlight: He.size, max: Qt };
|
|
5145
5153
|
}
|
|
5146
5154
|
function Xl(e) {
|
|
5147
|
-
Number.isFinite(e) && e > 0 && (
|
|
5155
|
+
Number.isFinite(e) && e > 0 && (Qt = Math.floor(e));
|
|
5148
5156
|
}
|
|
5149
5157
|
const pl = "WORKER_BUSY";
|
|
5150
5158
|
function Yl() {
|
|
5151
|
-
return He.size >=
|
|
5159
|
+
return He.size >= Qt;
|
|
5152
5160
|
}
|
|
5153
5161
|
function gl(e = 2e3, n) {
|
|
5154
|
-
return He.size <
|
|
5162
|
+
return He.size < Qt ? Promise.resolve() : new Promise((t, s) => {
|
|
5155
5163
|
let a = !1, d;
|
|
5156
5164
|
const c = () => {
|
|
5157
|
-
a || (a = !0, d && globalThis.clearTimeout(d),
|
|
5165
|
+
a || (a = !0, d && globalThis.clearTimeout(d), Zt.delete(c), t());
|
|
5158
5166
|
};
|
|
5159
|
-
if (
|
|
5167
|
+
if (Zt.add(c), d = globalThis.setTimeout(() => {
|
|
5160
5168
|
if (a)
|
|
5161
5169
|
return;
|
|
5162
|
-
a = !0,
|
|
5170
|
+
a = !0, Zt.delete(c);
|
|
5163
5171
|
const f = new Error("Wait for worker slot timed out");
|
|
5164
5172
|
f.name = "WorkerBusyTimeout", f.code = "WORKER_BUSY_TIMEOUT", s(f);
|
|
5165
5173
|
}, e), queueMicrotask(() => An()), n) {
|
|
5166
5174
|
const f = () => {
|
|
5167
5175
|
if (a)
|
|
5168
5176
|
return;
|
|
5169
|
-
a = !0, d && globalThis.clearTimeout(d),
|
|
5177
|
+
a = !0, d && globalThis.clearTimeout(d), Zt.delete(c);
|
|
5170
5178
|
const w = new Error("Aborted");
|
|
5171
5179
|
w.name = "AbortError", s(w);
|
|
5172
5180
|
};
|
|
@@ -5174,17 +5182,17 @@ function gl(e = 2e3, n) {
|
|
|
5174
5182
|
}
|
|
5175
5183
|
});
|
|
5176
5184
|
}
|
|
5177
|
-
const
|
|
5185
|
+
const Nt = {
|
|
5178
5186
|
timeout: 2e3,
|
|
5179
5187
|
waitTimeout: 1500,
|
|
5180
5188
|
backoffMs: 30,
|
|
5181
5189
|
maxRetries: 1
|
|
5182
5190
|
};
|
|
5183
5191
|
function Ul(e) {
|
|
5184
|
-
e.timeout != null && (
|
|
5192
|
+
e.timeout != null && (Nt.timeout = Math.max(0, Math.floor(e.timeout))), e.waitTimeout != null && (Nt.waitTimeout = Math.max(0, Math.floor(e.waitTimeout))), e.backoffMs != null && (Nt.backoffMs = Math.max(0, Math.floor(e.backoffMs))), e.maxRetries != null && (Nt.maxRetries = Math.max(0, Math.floor(e.maxRetries)));
|
|
5185
5193
|
}
|
|
5186
5194
|
function ql() {
|
|
5187
|
-
return oe({},
|
|
5195
|
+
return oe({}, Nt);
|
|
5188
5196
|
}
|
|
5189
5197
|
function Zl(s) {
|
|
5190
5198
|
return z(this, arguments, function* (e, n = !0, t = {}) {
|
|
@@ -5193,7 +5201,7 @@ function Zl(s) {
|
|
|
5193
5201
|
const S = new Error("KaTeX rendering disabled");
|
|
5194
5202
|
throw S.name = "KaTeXDisabled", S.code = "KATEX_DISABLED", S;
|
|
5195
5203
|
}
|
|
5196
|
-
const a = (b = t.timeout) != null ? b :
|
|
5204
|
+
const a = (b = t.timeout) != null ? b : Nt.timeout, d = (C = t.waitTimeout) != null ? C : Nt.waitTimeout, c = (H = t.backoffMs) != null ? H : Nt.backoffMs, f = (A = t.maxRetries) != null ? A : Nt.maxRetries, w = t.signal;
|
|
5197
5205
|
let v = 0;
|
|
5198
5206
|
for (; ; ) {
|
|
5199
5207
|
if (w != null && w.aborted) {
|
|
@@ -5215,39 +5223,39 @@ function Zl(s) {
|
|
|
5215
5223
|
}
|
|
5216
5224
|
});
|
|
5217
5225
|
}
|
|
5218
|
-
const wl = vn(() => import("./index-
|
|
5226
|
+
const wl = vn(() => import("./index-CpUcwcBM.js")), yl = vn(() => import("./index-Bg9riGZT.js")), kl = vn(() => import("./index-B90_xyRN.js")), xl = {
|
|
5219
5227
|
AdmonitionNode: Ln,
|
|
5220
5228
|
BlockquoteNode: Mn,
|
|
5221
|
-
CheckboxNode:
|
|
5229
|
+
CheckboxNode: _t,
|
|
5222
5230
|
CodeBlockNode: wl,
|
|
5223
5231
|
DefinitionListNode: Cn,
|
|
5224
5232
|
EmojiNode: je,
|
|
5225
5233
|
FootnoteNode: _n,
|
|
5226
5234
|
FootnoteReferenceNode: De,
|
|
5227
|
-
FootnoteAnchorNode:
|
|
5228
|
-
HardBreakNode:
|
|
5235
|
+
FootnoteAnchorNode: un,
|
|
5236
|
+
HardBreakNode: Jt,
|
|
5229
5237
|
HeadingNode: po,
|
|
5230
|
-
HtmlInlineNode:
|
|
5231
|
-
HighlightNode:
|
|
5232
|
-
ImageNode:
|
|
5233
|
-
InlineCodeNode:
|
|
5238
|
+
HtmlInlineNode: Ae,
|
|
5239
|
+
HighlightNode: et,
|
|
5240
|
+
ImageNode: Pt,
|
|
5241
|
+
InlineCodeNode: ze,
|
|
5234
5242
|
PreCodeNode: mn,
|
|
5235
|
-
InsertNode:
|
|
5236
|
-
LinkNode:
|
|
5243
|
+
InsertNode: Qe,
|
|
5244
|
+
LinkNode: Ke,
|
|
5237
5245
|
ListItemNode: Bn,
|
|
5238
5246
|
ListNode: In,
|
|
5239
5247
|
MathBlockNode: yl,
|
|
5240
5248
|
MathInlineNode: kl,
|
|
5241
|
-
MermaidBlockNode:
|
|
5249
|
+
MermaidBlockNode: dn,
|
|
5242
5250
|
ParagraphNode: $n,
|
|
5243
|
-
StrikethroughNode:
|
|
5244
|
-
StrongNode:
|
|
5245
|
-
SubscriptNode:
|
|
5246
|
-
SuperscriptNode:
|
|
5251
|
+
StrikethroughNode: Oe,
|
|
5252
|
+
StrongNode: Ve,
|
|
5253
|
+
SubscriptNode: Je,
|
|
5254
|
+
SuperscriptNode: Ge,
|
|
5247
5255
|
TableNode: Sn,
|
|
5248
5256
|
TextNode: Ie,
|
|
5249
5257
|
ThematicBreakNode: En,
|
|
5250
|
-
ReferenceNode:
|
|
5258
|
+
ReferenceNode: Pe,
|
|
5251
5259
|
MarkdownCodeBlockNode: Zn
|
|
5252
5260
|
}, Gl = {
|
|
5253
5261
|
install(e, n) {
|
|
@@ -5260,26 +5268,26 @@ export {
|
|
|
5260
5268
|
Fo as $,
|
|
5261
5269
|
Ln as A,
|
|
5262
5270
|
Mn as B,
|
|
5263
|
-
|
|
5271
|
+
_t as C,
|
|
5264
5272
|
Cn as D,
|
|
5265
5273
|
je as E,
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5274
|
+
un as F,
|
|
5275
|
+
ze as G,
|
|
5276
|
+
Jt as H,
|
|
5277
|
+
Pt as I,
|
|
5278
|
+
Qe as J,
|
|
5271
5279
|
Wo as K,
|
|
5272
|
-
|
|
5273
|
-
|
|
5280
|
+
Sa as L,
|
|
5281
|
+
Ke as M,
|
|
5274
5282
|
Bn as N,
|
|
5275
5283
|
In as O,
|
|
5276
5284
|
Zn as P,
|
|
5277
|
-
|
|
5285
|
+
lt as Q,
|
|
5278
5286
|
yl as R,
|
|
5279
5287
|
kl as S,
|
|
5280
|
-
|
|
5288
|
+
dn as T,
|
|
5281
5289
|
$n as U,
|
|
5282
|
-
|
|
5290
|
+
Pe as V,
|
|
5283
5291
|
pl as W,
|
|
5284
5292
|
Bl as X,
|
|
5285
5293
|
_l as Y,
|
|
@@ -5287,10 +5295,10 @@ export {
|
|
|
5287
5295
|
Z as _,
|
|
5288
5296
|
fo as a,
|
|
5289
5297
|
Yo as a0,
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5298
|
+
Oe as a1,
|
|
5299
|
+
Ve as a2,
|
|
5300
|
+
Je as a3,
|
|
5301
|
+
Ge as a4,
|
|
5294
5302
|
Sn as a5,
|
|
5295
5303
|
Ie as a6,
|
|
5296
5304
|
En as a7,
|
|
@@ -5309,12 +5317,12 @@ export {
|
|
|
5309
5317
|
Nl as ak,
|
|
5310
5318
|
Hl as al,
|
|
5311
5319
|
jl as am,
|
|
5312
|
-
|
|
5313
|
-
|
|
5320
|
+
Ha as an,
|
|
5321
|
+
ja as ao,
|
|
5314
5322
|
Dl as ap,
|
|
5315
5323
|
Al as aq,
|
|
5316
|
-
|
|
5317
|
-
|
|
5324
|
+
Aa as ar,
|
|
5325
|
+
za as as,
|
|
5318
5326
|
Bo as at,
|
|
5319
5327
|
Ys as b,
|
|
5320
5328
|
mn as c,
|
|
@@ -5333,12 +5341,12 @@ export {
|
|
|
5333
5341
|
Sl as p,
|
|
5334
5342
|
Ll as q,
|
|
5335
5343
|
Pl as r,
|
|
5336
|
-
|
|
5344
|
+
Ia as s,
|
|
5337
5345
|
_n as t,
|
|
5338
5346
|
mo as u,
|
|
5339
5347
|
De as v,
|
|
5340
|
-
|
|
5348
|
+
Bt as w,
|
|
5341
5349
|
po as x,
|
|
5342
|
-
|
|
5343
|
-
|
|
5350
|
+
et as y,
|
|
5351
|
+
Ae as z
|
|
5344
5352
|
};
|