@8wave/ai-elements 0.115.0-beta.34 → 0.115.0-beta.47
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/dist/_chunks/{Agent-Cu04vBnd.js → Agent-D3cVY0pk.js} +121 -110
- package/dist/_chunks/Agent-D3cVY0pk.js.map +1 -0
- package/dist/_chunks/PkHeldImage-BtaPh0Jr.js +42 -0
- package/dist/_chunks/PkHeldImage-BtaPh0Jr.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-Qk9Tk_N7.js → PkStreamingMarkdown-DyvZ5xKK.js} +782 -741
- package/dist/_chunks/PkStreamingMarkdown-DyvZ5xKK.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js → PkToolRequestGeolocation-DjRmmYMk.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js.map → PkToolRequestGeolocation-DjRmmYMk.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js → PkToolRequestOAuthConnection-CJ8dg2RY.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js.map → PkToolRequestOAuthConnection-CJ8dg2RY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js → PkToolShowArtifact-Bk-xmGxl.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js.map → PkToolShowArtifact-Bk-xmGxl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js → PkToolShowContactForm-B0o6CY0Q.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js.map → PkToolShowContactForm-B0o6CY0Q.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js → PkToolShowForm-C4-KAKPL.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js.map → PkToolShowForm-C4-KAKPL.js.map} +1 -1
- package/dist/_chunks/PkToolShowImageGallery-Jdo7p2mZ.js +88 -0
- package/dist/_chunks/PkToolShowImageGallery-Jdo7p2mZ.js.map +1 -0
- package/dist/_chunks/PkToolShowProductList-Cfk865KB.js +72 -0
- package/dist/_chunks/PkToolShowProductList-Cfk865KB.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js → PkToolShowSources-qqUbdWzN.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js.map → PkToolShowSources-qqUbdWzN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js → PkToolShowSuggestedReply-Dk6Nu9cG.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js.map → PkToolShowSuggestedReply-Dk6Nu9cG.js.map} +1 -1
- package/dist/_chunks/PkToolShowVideo-D07i4hVd.js +142 -0
- package/dist/_chunks/PkToolShowVideo-D07i4hVd.js.map +1 -0
- package/dist/_chunks/{PkToolShowWebPages-BOxbTe2X.js → PkToolShowWebPages-ksXRNsDK.js} +31 -24
- package/dist/_chunks/PkToolShowWebPages-ksXRNsDK.js.map +1 -0
- package/dist/_chunks/chatImagePolicy-B1iRRLAB.js +46 -0
- package/dist/_chunks/chatImagePolicy-B1iRRLAB.js.map +1 -0
- package/dist/_chunks/{markdown-_p-gd9w8.js → markdown-DOitQ2jz.js} +13 -13
- package/dist/_chunks/{markdown-_p-gd9w8.js.map → markdown-DOitQ2jz.js.map} +1 -1
- package/dist/ai-elements.es.js +1720 -1713
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-KbZm8GvA.js → Agent-C4p46YGt.js} +67 -56
- package/dist-vue/_chunks/Agent-C4p46YGt.js.map +1 -0
- package/dist-vue/_chunks/{Document-DCSWwcRE.js → Document-B9QaYHKT.js} +10 -10
- package/dist-vue/_chunks/{Document-DCSWwcRE.js.map → Document-B9QaYHKT.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbot-BkMe7zxp.js +275 -0
- package/dist-vue/_chunks/PkChatbot-BkMe7zxp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js → PkChatbotEmptyState-HElKT2OO.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js.map → PkChatbotEmptyState-HElKT2OO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js → PkChatbotInput-BykvFqbm.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js.map → PkChatbotInput-BykvFqbm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-UT72KC_z.js → PkChatbotMessages-wH9wxc6Y.js} +19 -19
- package/dist-vue/_chunks/{PkChatbotMessages-UT72KC_z.js.map → PkChatbotMessages-wH9wxc6Y.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js → PkChatbotStepPayload-DY0AzM6s.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js.map → PkChatbotStepPayload-DY0AzM6s.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js → PkChatbotStepToolDetail-AXtXQVQY.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js.map → PkChatbotStepToolDetail-AXtXQVQY.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js → PkChatbotSteps-B-yrfTat.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js.map → PkChatbotSteps-B-yrfTat.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-D3PwREDw.js → PkChatbotViewChat-CCcMnVkM.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-D3PwREDw.js.map → PkChatbotViewChat-CCcMnVkM.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js → PkChatbotViewConversations-C9h_bBIc.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js.map → PkChatbotViewConversations-C9h_bBIc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-BStYLY2B.js → PkChatbotViewFiles-BkoXgGE6.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-BStYLY2B.js.map → PkChatbotViewFiles-BkoXgGE6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js → PkChatbotViewProfile-CFR0B99Z.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js.map → PkChatbotViewProfile-CFR0B99Z.js.map} +1 -1
- package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js +41 -0
- package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-CJlfq7ub.js → PkStreamingMarkdown-XJBXdSG2.js} +792 -780
- package/dist-vue/_chunks/PkStreamingMarkdown-XJBXdSG2.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js → PkToolRequestGeolocation-DpvsFEga.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js.map → PkToolRequestGeolocation-DpvsFEga.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js → PkToolRequestOAuthConnection-DRefs-S1.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js.map → PkToolRequestOAuthConnection-DRefs-S1.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js → PkToolShowArtifact-BopCMkyZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js.map → PkToolShowArtifact-BopCMkyZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js → PkToolShowContactForm-C6F_DdBu.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js.map → PkToolShowContactForm-C6F_DdBu.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js → PkToolShowDiagram-7-m7VrED.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js.map → PkToolShowDiagram-7-m7VrED.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js → PkToolShowEmail-C591LR5N.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js.map → PkToolShowEmail-C591LR5N.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js → PkToolShowForm-DEr8wDJi.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js.map → PkToolShowForm-DEr8wDJi.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-D44wf_u3.js +88 -0
- package/dist-vue/_chunks/PkToolShowImageGallery-D44wf_u3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js → PkToolShowMessage-CbXERPHI.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js.map → PkToolShowMessage-CbXERPHI.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowProductList-C6CVRUlD.js +72 -0
- package/dist-vue/_chunks/PkToolShowProductList-C6CVRUlD.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js → PkToolShowSources-DzUNanmK.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js.map → PkToolShowSources-DzUNanmK.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js → PkToolShowSuggestedReply-DhNtI5gJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js.map → PkToolShowSuggestedReply-DhNtI5gJ.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowVideo-HbQzTMh5.js +141 -0
- package/dist-vue/_chunks/PkToolShowVideo-HbQzTMh5.js.map +1 -0
- package/dist-vue/_chunks/PkToolShowWebPages-Ct1HaCSq.js +86 -0
- package/dist-vue/_chunks/PkToolShowWebPages-Ct1HaCSq.js.map +1 -0
- package/dist-vue/_chunks/{PkUrl-E12f7rn_.js → PkUrl-CN1kkZiH.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-E12f7rn_.js.map → PkUrl-CN1kkZiH.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js → createChatbotApiClient-B2PvUG07.js} +16 -16
- package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js.map → createChatbotApiClient-B2PvUG07.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js → useChatbotStore-Cj_UmNH3.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js.map → useChatbotStore-Cj_UmNH3.js.map} +1 -1
- package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js +71 -0
- package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js.map +1 -0
- package/dist-vue/_chunks/{utils-CtD8DCrq.js → utils-DXXzMVU3.js} +2 -2
- package/dist-vue/_chunks/{utils-CtD8DCrq.js.map → utils-DXXzMVU3.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
- package/dist-vue/composables.js +11 -7
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3444 -3400
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +12 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
- package/dist-vue/packages/components/src/chat/PkHeldImage.d.ts +21 -0
- package/dist-vue/packages/components/src/chat/chatImagePolicy.d.ts +55 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +17 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +14 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Cu04vBnd.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-Qk9Tk_N7.js.map +0 -1
- package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js +0 -75
- package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js.map +0 -1
- package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js +0 -65
- package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js.map +0 -1
- package/dist/_chunks/PkToolShowVideo-DClps9oP.js +0 -123
- package/dist/_chunks/PkToolShowVideo-DClps9oP.js.map +0 -1
- package/dist/_chunks/PkToolShowWebPages-BOxbTe2X.js.map +0 -1
- package/dist-vue/_chunks/Agent-KbZm8GvA.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js +0 -272
- package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-CJlfq7ub.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js +0 -75
- package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js +0 -65
- package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js +0 -122
- package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js +0 -79
- package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js.map +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { C as e, F as t, J as n, L as r, N as i, O as a, P as o, X as s, _t as c, it as l, m as u, v as d } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
2
|
import { r as f } from "./vue-i18n-BAndfHYX.js";
|
|
3
3
|
import { n as p, t as ee } from "./cdn-css-JUUNhyQ6.js";
|
|
4
|
-
import { c as te } from "./Agent-
|
|
4
|
+
import { c as te } from "./Agent-D3cVY0pk.js";
|
|
5
5
|
import "./src-CrSt0jv_.js";
|
|
6
6
|
import { n as ne } from "./url-validation-9DstIfq2.js";
|
|
7
7
|
import { v as re } from "./dist-Ce9Hi58x.js";
|
|
8
8
|
import { n as ie } from "./useShortUrlResolver-Ddb9IUei.js";
|
|
9
9
|
import { t as ae } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
10
|
+
import { n as oe } from "./chatImagePolicy-B1iRRLAB.js";
|
|
10
11
|
//#region ../../packages/utils/src/citations.ts
|
|
11
|
-
var m = /[ \t]*\uE200[^\uE201]*\uE201/g,
|
|
12
|
-
function
|
|
13
|
-
return e && e.replace(m, "").replace(
|
|
12
|
+
var m = /[ \t]*\uE200[^\uE201]*\uE201/g, se = /[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, ce = /[\uE200-\uE20F]/g;
|
|
13
|
+
function le(e) {
|
|
14
|
+
return e && e.replace(m, "").replace(se, "").replace(ce, "");
|
|
14
15
|
}
|
|
15
16
|
//#endregion
|
|
16
17
|
//#region ../../packages/utils/src/message.ts
|
|
@@ -20,28 +21,28 @@ function h(e) {
|
|
|
20
21
|
function g(e) {
|
|
21
22
|
return e ? e.type.startsWith("tool-") : !1;
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function ue(e) {
|
|
24
25
|
return g(e) ? e.type.slice(5) : "";
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function de(e) {
|
|
27
28
|
return e ? e.type === "file" : !1;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
if (!
|
|
30
|
+
function _(e) {
|
|
31
|
+
if (!de(e)) return;
|
|
31
32
|
let t = e.providerMetadata?.["8bot"]?.media;
|
|
32
33
|
return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function fe(e) {
|
|
35
36
|
return e ? e.type === "reasoning" : !1;
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function pe(e) {
|
|
38
39
|
if (!e) return;
|
|
39
40
|
let t = e.parts;
|
|
40
41
|
if (Array.isArray(t)) return t.find((e) => h(e))?.text;
|
|
41
42
|
}
|
|
42
43
|
//#endregion
|
|
43
44
|
//#region ../../packages/components/src/chat/utils.ts
|
|
44
|
-
function
|
|
45
|
+
function me(e) {
|
|
45
46
|
let t = [];
|
|
46
47
|
for (let n of e) {
|
|
47
48
|
if (!h(n)) {
|
|
@@ -56,20 +57,20 @@ function pe(e) {
|
|
|
56
57
|
}
|
|
57
58
|
return t;
|
|
58
59
|
}
|
|
59
|
-
var
|
|
60
|
-
function
|
|
60
|
+
var he = (e) => g(e) && te(ue(e));
|
|
61
|
+
function ge(e) {
|
|
61
62
|
let t = /* @__PURE__ */ new Map();
|
|
62
|
-
for (let [n, r] of e.entries())
|
|
63
|
-
return e.filter((e, n) => !(
|
|
63
|
+
for (let [n, r] of e.entries()) he(r) && r.state !== "output-error" && !v(r) && t.set(r.type, n);
|
|
64
|
+
return e.filter((e, n) => !(he(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
|
|
64
65
|
}
|
|
65
66
|
function v(e) {
|
|
66
67
|
return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
|
|
67
68
|
}
|
|
68
|
-
var
|
|
69
|
-
function
|
|
69
|
+
var _e = 4e3, ve = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
|
|
70
|
+
function ye(e, t) {
|
|
70
71
|
if (e.length <= t) return e;
|
|
71
72
|
let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
|
|
72
|
-
for (let t of e.matchAll(
|
|
73
|
+
for (let t of e.matchAll(ve)) {
|
|
73
74
|
if (t.index >= a) break;
|
|
74
75
|
let [, e, n] = t;
|
|
75
76
|
if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
|
|
@@ -80,40 +81,40 @@ function ve(e, t) {
|
|
|
80
81
|
}
|
|
81
82
|
return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
|
|
82
83
|
}
|
|
83
|
-
var
|
|
84
|
+
var be = /* @__PURE__ */ new Set([
|
|
84
85
|
"approval-requested",
|
|
85
86
|
"approval-responded",
|
|
86
87
|
"output-denied"
|
|
87
88
|
]);
|
|
88
|
-
function
|
|
89
|
-
return g(e) ?
|
|
90
|
-
}
|
|
91
|
-
var y = "requestConfirm";
|
|
92
|
-
function xe(e) {
|
|
93
|
-
return g(e) && e.type === "tool-requestConfirm";
|
|
89
|
+
function y(e) {
|
|
90
|
+
return g(e) ? be.has(e.state) ? !0 : e.approval != null : !1;
|
|
94
91
|
}
|
|
92
|
+
var xe = "requestConfirm";
|
|
95
93
|
function Se(e) {
|
|
96
|
-
return
|
|
94
|
+
return g(e) && e.type === "tool-requestConfirm";
|
|
97
95
|
}
|
|
98
96
|
function Ce(e) {
|
|
99
|
-
|
|
97
|
+
return y(e) || Se(e);
|
|
100
98
|
}
|
|
101
99
|
function we(e) {
|
|
100
|
+
if (g(e)) return e.approval?.id;
|
|
101
|
+
}
|
|
102
|
+
function Te(e) {
|
|
102
103
|
if (e && "state" in e) return e.state;
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
+
function Ee(e = "000000") {
|
|
105
106
|
let t = e.replace("#", "");
|
|
106
107
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
107
108
|
let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
108
109
|
return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
|
|
109
110
|
}
|
|
110
|
-
function Ee(e, t) {
|
|
111
|
-
return e === "white" || e === "black" ? e : Te(t);
|
|
112
|
-
}
|
|
113
111
|
function De(e, t) {
|
|
112
|
+
return e === "white" || e === "black" ? e : Ee(t);
|
|
113
|
+
}
|
|
114
|
+
function Oe(e, t) {
|
|
114
115
|
if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
+
function b(e) {
|
|
117
118
|
if (e !== void 0) {
|
|
118
119
|
if (typeof e == "string") return e.trim() || void 0;
|
|
119
120
|
try {
|
|
@@ -124,10 +125,10 @@ function Oe(e) {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
-
return
|
|
128
|
+
function x(e) {
|
|
129
|
+
return b(e) !== void 0;
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function ke(e, t) {
|
|
131
132
|
let n = e?.input;
|
|
132
133
|
if (typeof t == "string") {
|
|
133
134
|
let e = n?.question ?? n?.steps?.[0]?.question;
|
|
@@ -139,14 +140,14 @@ function b(e, t) {
|
|
|
139
140
|
return i ? `${i} ${n}` : n;
|
|
140
141
|
}).join(". ");
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function S(e) {
|
|
143
144
|
return e?.options ? e.options.map((e) => ({
|
|
144
145
|
label: e.label,
|
|
145
146
|
value: e.label,
|
|
146
147
|
description: e.description
|
|
147
148
|
})) : [];
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
+
function Ae(e, t) {
|
|
150
151
|
let n = {};
|
|
151
152
|
if (t == null) return n;
|
|
152
153
|
if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
|
|
@@ -162,12 +163,12 @@ function x(e, t) {
|
|
|
162
163
|
for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
|
|
163
164
|
return n;
|
|
164
165
|
}
|
|
165
|
-
var
|
|
166
|
+
var C = [
|
|
166
167
|
"tool-perplexity_search",
|
|
167
168
|
"tool-parallel_search",
|
|
168
169
|
"tool-web_search",
|
|
169
170
|
"tool-google_search"
|
|
170
|
-
],
|
|
171
|
+
], je = /* @__PURE__ */ new Set([
|
|
171
172
|
"tool-searchInKnowledgeBase",
|
|
172
173
|
"tool-retrieveRevisedAnswers",
|
|
173
174
|
"tool-expandChunkContext",
|
|
@@ -176,56 +177,56 @@ var je = [
|
|
|
176
177
|
"tool-geocode",
|
|
177
178
|
"tool-recallUserMemory",
|
|
178
179
|
"tool-saveUserMemory",
|
|
179
|
-
...
|
|
180
|
+
...C
|
|
180
181
|
]);
|
|
181
182
|
function Me(e) {
|
|
182
|
-
return g(e) &&
|
|
183
|
+
return g(e) && je.has(e.type);
|
|
183
184
|
}
|
|
184
|
-
var
|
|
185
|
+
var w = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, T = (e, ...t) => {
|
|
185
186
|
for (let n of t) {
|
|
186
187
|
let t = e?.[n];
|
|
187
188
|
if (typeof t == "string" && t.trim()) return t;
|
|
188
189
|
}
|
|
189
190
|
};
|
|
190
|
-
function
|
|
191
|
+
function Ne(e) {
|
|
191
192
|
if (!g(e)) return;
|
|
192
|
-
let t =
|
|
193
|
-
if (e.type === "tool-searchInKnowledgeBase" ||
|
|
193
|
+
let t = w("input" in e ? e.input : void 0), n = w("output" in e ? e.output : void 0);
|
|
194
|
+
if (e.type === "tool-searchInKnowledgeBase" || C.includes(e.type)) {
|
|
194
195
|
let e = t?.queries;
|
|
195
196
|
if (Array.isArray(e)) {
|
|
196
197
|
let t = e.filter((e) => typeof e == "string" && !!e.trim());
|
|
197
198
|
return t.length ? t.join(" · ") : void 0;
|
|
198
199
|
}
|
|
199
|
-
return
|
|
200
|
+
return T(t, "query", "objective");
|
|
200
201
|
}
|
|
201
|
-
if (e.type === "tool-retrieveRevisedAnswers") return
|
|
202
|
-
if (e.type === "tool-getWeather") return
|
|
203
|
-
if (e.type === "tool-geocode") return
|
|
204
|
-
if (e.type === "tool-expandChunkContext") return
|
|
205
|
-
if (e.type === "tool-readDocumentFile") return
|
|
206
|
-
if (e.type === "tool-recallUserMemory") return
|
|
207
|
-
if (e.type === "tool-saveUserMemory") return
|
|
202
|
+
if (e.type === "tool-retrieveRevisedAnswers") return T(t, "query");
|
|
203
|
+
if (e.type === "tool-getWeather") return T(n, "location") ?? T(t, "locationName");
|
|
204
|
+
if (e.type === "tool-geocode") return T(t, "locationName");
|
|
205
|
+
if (e.type === "tool-expandChunkContext") return T(n, "documentName");
|
|
206
|
+
if (e.type === "tool-readDocumentFile") return T(n, "name");
|
|
207
|
+
if (e.type === "tool-recallUserMemory") return T(t, "query");
|
|
208
|
+
if (e.type === "tool-saveUserMemory") return T(t, "content", "query");
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
+
function Pe(e) {
|
|
210
211
|
if (g(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
|
|
211
|
-
if (
|
|
212
|
+
if (fe(e)) return "ri:lightbulb-line";
|
|
212
213
|
if (h(e)) return "ri:double-quotes-r";
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
-
return g(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") :
|
|
215
|
+
function Fe(e, t) {
|
|
216
|
+
return g(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : C.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : fe(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
|
|
216
217
|
}
|
|
217
218
|
//#endregion
|
|
218
219
|
//#region ../../node_modules/.pnpm/remend@1.4.0/node_modules/remend/dist/index.js
|
|
219
|
-
var
|
|
220
|
+
var E = Object.defineProperty, Ie = Object.defineProperties, Le = Object.getOwnPropertyDescriptors, Re = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Ve = (e, t, n) => t in e ? E(e, t, {
|
|
220
221
|
enumerable: !0,
|
|
221
222
|
configurable: !0,
|
|
222
223
|
writable: !0,
|
|
223
224
|
value: n
|
|
224
225
|
}) : e[t] = n, He = (e, t) => {
|
|
225
226
|
for (var n in t ||= {}) ze.call(t, n) && Ve(e, n, t[n]);
|
|
226
|
-
if (
|
|
227
|
+
if (Re) for (var n of Re(t)) Be.call(t, n) && Ve(e, n, t[n]);
|
|
227
228
|
return e;
|
|
228
|
-
}, Ue = (e, t) =>
|
|
229
|
+
}, Ue = (e, t) => Ie(e, Le(t)), D = {
|
|
229
230
|
PROSE: 0,
|
|
230
231
|
FENCE_MARKER: 1,
|
|
231
232
|
FENCE_INFO: 2,
|
|
@@ -267,7 +268,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
267
268
|
return i;
|
|
268
269
|
}, Ye = (e, t, n, r, i) => {
|
|
269
270
|
let a = t + r;
|
|
270
|
-
e.fill(
|
|
271
|
+
e.fill(D.FENCE_MARKER, a, a + i), e.fill(D.FENCE_INFO, a + i, Math.min(n + 1, e.length));
|
|
271
272
|
}, Xe = (e, t, n, r) => {
|
|
272
273
|
let i = t;
|
|
273
274
|
for (; i < n && e[i] === " ";) i += 1;
|
|
@@ -301,7 +302,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
301
302
|
let a = e.indexOf("\n", i);
|
|
302
303
|
a === -1 && (a = n);
|
|
303
304
|
let o = r ? Qe(e, i, a, r) : -1;
|
|
304
|
-
r && o === -1 && (r = null), r ? Xe(e, o, a, r) ? (t.fill(
|
|
305
|
+
r && o === -1 && (r = null), r ? Xe(e, o, a, r) ? (t.fill(D.FENCE_MARKER, i, a), r = null) : t.fill(D.FENCE_BODY, i, Math.min(a + 1, n)) : r = Ze(e, t, i, a), i = a + 1;
|
|
305
306
|
}
|
|
306
307
|
return r;
|
|
307
308
|
}, et = (e, t) => {
|
|
@@ -317,8 +318,8 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
317
318
|
for (;;) {
|
|
318
319
|
let n = e.indexOf("`", r);
|
|
319
320
|
if (n === -1) return -1;
|
|
320
|
-
let i = n > r && e[n - 1] === "\\" && t[n - 1] ===
|
|
321
|
-
if (t[n] ===
|
|
321
|
+
let i = n > r && e[n - 1] === "\\" && t[n - 1] === D.PROSE;
|
|
322
|
+
if (t[n] === D.PROSE && !i) return n;
|
|
322
323
|
r = n + 1;
|
|
323
324
|
}
|
|
324
325
|
}, rt = (e, t) => {
|
|
@@ -330,8 +331,8 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
330
331
|
r = a, i = n - a, a = n;
|
|
331
332
|
continue;
|
|
332
333
|
}
|
|
333
|
-
if (t[a] !==
|
|
334
|
-
t.fill(
|
|
334
|
+
if (t[a] !== D.PROSE) {
|
|
335
|
+
t.fill(D.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
|
|
335
336
|
continue;
|
|
336
337
|
}
|
|
337
338
|
if (e[a] === "\n" && tt(e, a)) {
|
|
@@ -343,13 +344,13 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
343
344
|
continue;
|
|
344
345
|
}
|
|
345
346
|
let n = et(e, a);
|
|
346
|
-
n - a === i && (t.fill(
|
|
347
|
+
n - a === i && (t.fill(D.CODE_SPAN, r, n), r = -1), a = n;
|
|
347
348
|
}
|
|
348
|
-
return r >= 0 ? (t.fill(
|
|
349
|
+
return r >= 0 ? (t.fill(D.CODE_SPAN_OPEN, r, n), {
|
|
349
350
|
start: r,
|
|
350
351
|
runLength: i
|
|
351
352
|
}) : null;
|
|
352
|
-
},
|
|
353
|
+
}, O = (e) => {
|
|
353
354
|
let t = new Uint8Array(e.length);
|
|
354
355
|
return {
|
|
355
356
|
text: e,
|
|
@@ -360,17 +361,17 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
360
361
|
linkUrlMask: null,
|
|
361
362
|
htmlTagMask: null
|
|
362
363
|
};
|
|
363
|
-
},
|
|
364
|
-
if (
|
|
365
|
-
let t =
|
|
366
|
-
return
|
|
364
|
+
}, k = null, it = null, A = (e) => {
|
|
365
|
+
if (it !== null && e === k) return it;
|
|
366
|
+
let t = O(e);
|
|
367
|
+
return k = e, it = t, t;
|
|
367
368
|
}, at = () => {
|
|
368
|
-
|
|
369
|
-
}, ot = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !==
|
|
370
|
-
let n =
|
|
371
|
-
for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] ===
|
|
369
|
+
k = null, it = null;
|
|
370
|
+
}, ot = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== D.PROSE, st = (e, t) => e.regions[t] === D.CODE_SPAN, ct = (e, t) => {
|
|
371
|
+
let n = A(e), r = t + t, i = 0;
|
|
372
|
+
for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === D.PROSE ? (i += 1, t += 2) : t += 1;
|
|
372
373
|
return i;
|
|
373
|
-
}, lt = /* @__PURE__ */ new Uint8Array(), ut = (e) => e === "inlineLatex" || e === "blockLatex", dt = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, ft = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar",
|
|
374
|
+
}, lt = /* @__PURE__ */ new Uint8Array(), ut = (e) => e === "inlineLatex" || e === "blockLatex", dt = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, ft = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", j = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), pt = (e, t, n) => {
|
|
374
375
|
let r = e[t + 1];
|
|
375
376
|
if (e[t] === "\\") {
|
|
376
377
|
if (r === "$") return {
|
|
@@ -395,15 +396,15 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
395
396
|
let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = "none", o = 0;
|
|
396
397
|
for (; o < r;) {
|
|
397
398
|
i[o] = a === "none" ? 0 : 1;
|
|
398
|
-
let e = n[o] ===
|
|
399
|
+
let e = n[o] === D.PROSE ? pt(t, o, a) : null;
|
|
399
400
|
e === null ? o += 1 : (a = e.context, e.length === 2 && (i[o + 1] = a === "none" ? 0 : 1), o += e.length);
|
|
400
401
|
}
|
|
401
402
|
return i;
|
|
402
|
-
}, ht = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask =
|
|
403
|
+
}, ht = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = j(e.text) ? mt(e) : lt), e.mathMask[t] === 1), gt = (e, t, n, r) => {
|
|
403
404
|
let { text: i, regions: a } = e, o = new Uint8Array(n - t), s = 0;
|
|
404
|
-
for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] ===
|
|
405
|
+
for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === D.PROSE && (s = 1), o[e - t] = s;
|
|
405
406
|
let c = !1;
|
|
406
|
-
for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] ===
|
|
407
|
+
for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === D.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
|
|
407
408
|
}, _t = (e) => {
|
|
408
409
|
let { text: t } = e, n = t.length, r = new Uint8Array(n), i = 0;
|
|
409
410
|
for (; i < n;) {
|
|
@@ -414,7 +415,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
414
415
|
}, vt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? _t(e) : lt), e.linkUrlMask[t] === 1), yt = (e) => {
|
|
415
416
|
let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = !1;
|
|
416
417
|
for (let e = 0; e < r; e += 1) if (t[e] === "\n") a = !1;
|
|
417
|
-
else if (i[e] = +!!a, n[e] ===
|
|
418
|
+
else if (i[e] = +!!a, n[e] === D.PROSE) {
|
|
418
419
|
if (t[e] === ">") a = !1;
|
|
419
420
|
else if (t[e] === "<") {
|
|
420
421
|
let n = t[e + 1];
|
|
@@ -422,7 +423,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
422
423
|
}
|
|
423
424
|
}
|
|
424
425
|
return i;
|
|
425
|
-
}, bt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? yt(e) : lt), e.htmlTagMask[t] === 1),
|
|
426
|
+
}, bt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? yt(e) : lt), e.htmlTagMask[t] === 1), M = (e, t) => ot(A(e), t), N = (e, t) => st(A(e), t), xt = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, St = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(xt, (t, n, r, i) => M(e, i) ? t : `${n}\\>${r}`), P = (e, { delimiter: t, markerLength: n, regex: r }) => {
|
|
426
427
|
let i = e.lastIndexOf(t, e.length - 2), a = i === -1 ? e.length - 1 : i;
|
|
427
428
|
return e.slice(Math.max(0, a - n + 1)).match(r);
|
|
428
429
|
}, Ct = {
|
|
@@ -457,21 +458,21 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
457
458
|
delimiter: "~",
|
|
458
459
|
markerLength: 2,
|
|
459
460
|
regex: /(~~)([^~]+)~$/
|
|
460
|
-
},
|
|
461
|
+
}, F = /^[\s_~*`]*$/, jt = /^[\s]*[-*+][\s]+$/, Mt = /[\p{L}\p{N}_]/u, Nt = /^\*{4,}$/, I = (e) => {
|
|
461
462
|
if (!e) return !1;
|
|
462
463
|
let t = e.charCodeAt(0);
|
|
463
464
|
return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Mt.test(e);
|
|
464
|
-
},
|
|
465
|
+
}, Pt = (e, t) => {
|
|
465
466
|
let n = 1;
|
|
466
467
|
for (let r = t - 1; r >= 0; --r) if (e[r] === "]") n += 1;
|
|
467
468
|
else if (e[r] === "[" && (--n, n === 0)) return r;
|
|
468
469
|
return -1;
|
|
469
|
-
},
|
|
470
|
+
}, Ft = (e, t) => {
|
|
470
471
|
let n = 1;
|
|
471
472
|
for (let r = t + 1; r < e.length; r += 1) if (e[r] === "[") n += 1;
|
|
472
473
|
else if (e[r] === "]" && (--n, n === 0)) return r;
|
|
473
474
|
return -1;
|
|
474
|
-
},
|
|
475
|
+
}, It = (e, t) => ht(A(e), t), Lt = (e, t, n) => {
|
|
475
476
|
let r = 0;
|
|
476
477
|
for (let n = t - 1; n >= 0; --n) if (e[n] === "\n") {
|
|
477
478
|
r = n + 1;
|
|
@@ -489,184 +490,184 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
|
|
|
489
490
|
break;
|
|
490
491
|
}
|
|
491
492
|
return o >= 3 && !s;
|
|
492
|
-
},
|
|
493
|
-
let i =
|
|
493
|
+
}, Rt = (e, t, n, r) => n === "\\" || ht(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), zt = (e) => e === " " || e === " " || e === "\n", Bt = (e, t) => !!(e && t && I(e) && I(t)), Vt = (e, t, n, r) => {
|
|
494
|
+
let i = Bt(e, t), a = !!t && !zt(t), o = !!e && !zt(e);
|
|
494
495
|
return i && n % 2 == 0 && !r ? { count: !1 } : o && n % 2 == 1 || a ? {
|
|
495
496
|
count: !0,
|
|
496
497
|
inWordAsteriskChain: i
|
|
497
498
|
} : { count: !1 };
|
|
498
|
-
},
|
|
499
|
-
let t =
|
|
499
|
+
}, Ht = (e) => {
|
|
500
|
+
let t = A(e), n = 0, r = !1, i = e.length;
|
|
500
501
|
for (let a = 0; a < i; a += 1) {
|
|
501
|
-
if (e[a] !== "*" || t.regions[a] !==
|
|
502
|
-
|
|
502
|
+
if (e[a] !== "*" || t.regions[a] !== D.PROSE) {
|
|
503
|
+
I(e[a]) || (r = !1);
|
|
503
504
|
continue;
|
|
504
505
|
}
|
|
505
506
|
let o = a > 0 ? e[a - 1] : "", s = a < i - 1 ? e[a + 1] : "";
|
|
506
|
-
if (
|
|
507
|
-
let c =
|
|
507
|
+
if (Rt(t, a, o, s)) continue;
|
|
508
|
+
let c = Vt(o, s, n, r);
|
|
508
509
|
c.count && (n += 1, r = c.inWordAsteriskChain);
|
|
509
510
|
}
|
|
510
511
|
return n;
|
|
511
|
-
},
|
|
512
|
-
let t =
|
|
512
|
+
}, Ut = (e, t, n, r) => !!(n === "\\" || ht(e, t) || vt(e, t) || bt(e, t) || n === "_" || r === "_" || n && r && I(n) && I(r)), Wt = (e) => {
|
|
513
|
+
let t = A(e), n = 0, r = e.length;
|
|
513
514
|
for (let i = 0; i < r; i += 1) {
|
|
514
|
-
if (e[i] !== "_" || t.regions[i] !==
|
|
515
|
+
if (e[i] !== "_" || t.regions[i] !== D.PROSE) continue;
|
|
515
516
|
let a = i > 0 ? e[i - 1] : "", o = i < r - 1 ? e[i + 1] : "";
|
|
516
|
-
|
|
517
|
+
Ut(t, i, a, o) || (n += 1);
|
|
517
518
|
}
|
|
518
519
|
return n;
|
|
519
|
-
},
|
|
520
|
-
let t =
|
|
521
|
-
for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] ===
|
|
520
|
+
}, Gt = (e) => {
|
|
521
|
+
let t = A(e), n = 0, r = 0;
|
|
522
|
+
for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === D.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
|
|
522
523
|
return r >= 3 && (n += Math.floor(r / 3)), n;
|
|
523
|
-
},
|
|
524
|
-
if (!(
|
|
524
|
+
}, Kt = (e) => ct(e, "*"), qt = (e) => e === "" || e === " " || e === " " || e === "\n", Jt = (e, t, n, r, i) => {
|
|
525
|
+
if (!(qt(n) && qt(r))) return !1;
|
|
525
526
|
if (t > i.lineEnd) {
|
|
526
527
|
let n = e.indexOf("\n", t);
|
|
527
|
-
i.lineEnd = n === -1 ? e.length : n, i.result =
|
|
528
|
+
i.lineEnd = n === -1 ? e.length : n, i.result = Lt(e, t, "_");
|
|
528
529
|
}
|
|
529
530
|
return i.result;
|
|
530
|
-
},
|
|
531
|
+
}, Yt = (e, t, n, r) => {
|
|
531
532
|
let i = e.text, a = t, o = !1;
|
|
532
533
|
a > 0 && i[a - 1] === "\\" && (a += 1, o = !0);
|
|
533
534
|
let s = n - a;
|
|
534
535
|
if (s < 2) return !1;
|
|
535
536
|
let c = a > 0 ? i[a - 1] : "", l = o ? "\\" : c, u = n < i.length ? i[n] : "";
|
|
536
|
-
return
|
|
537
|
-
},
|
|
538
|
-
let t =
|
|
537
|
+
return I(l) && I(u) || Jt(i, a, l, u, r) || ht(e, a) || vt(e, a) || bt(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
|
|
538
|
+
}, Xt = (e) => {
|
|
539
|
+
let t = A(e), n = e.length, r = {
|
|
539
540
|
lineEnd: -1,
|
|
540
541
|
result: !1
|
|
541
542
|
}, i = !1, a = 0;
|
|
542
543
|
for (; a < n;) {
|
|
543
|
-
if (e[a] !== "_" || t.regions[a] !==
|
|
544
|
+
if (e[a] !== "_" || t.regions[a] !== D.PROSE) {
|
|
544
545
|
a += 1;
|
|
545
546
|
continue;
|
|
546
547
|
}
|
|
547
548
|
let o = a, s = a + 1;
|
|
548
|
-
for (; s < n && e[s] === "_" && t.regions[s] ===
|
|
549
|
-
a = s,
|
|
549
|
+
for (; s < n && e[s] === "_" && t.regions[s] === D.PROSE;) s += 1;
|
|
550
|
+
a = s, Yt(t, o, s, r) && (i = !i);
|
|
550
551
|
}
|
|
551
552
|
return i;
|
|
552
|
-
},
|
|
553
|
-
if (!t ||
|
|
553
|
+
}, Zt = (e, t, n) => {
|
|
554
|
+
if (!t || F.test(t)) return !0;
|
|
554
555
|
let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
|
|
555
|
-
return jt.test(a) && t.includes("\n") ? !0 :
|
|
556
|
-
},
|
|
557
|
-
let t =
|
|
556
|
+
return jt.test(a) && t.includes("\n") ? !0 : Lt(e, n, "*");
|
|
557
|
+
}, Qt = (e) => {
|
|
558
|
+
let t = P(e, Ct);
|
|
558
559
|
if (!t) return e;
|
|
559
560
|
let n = t[2], r = e.lastIndexOf(t[1]);
|
|
560
|
-
return
|
|
561
|
-
},
|
|
562
|
-
if (!t ||
|
|
561
|
+
return M(e, r) || N(e, r) || Zt(e, n, r) ? e : Kt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
|
|
562
|
+
}, $t = (e, t, n) => {
|
|
563
|
+
if (!t || F.test(t)) return !0;
|
|
563
564
|
let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
|
|
564
|
-
return jt.test(a) && t.includes("\n") ? !0 :
|
|
565
|
-
},
|
|
566
|
-
let t =
|
|
565
|
+
return jt.test(a) && t.includes("\n") ? !0 : Lt(e, n, "_");
|
|
566
|
+
}, en = (e) => {
|
|
567
|
+
let t = P(e, wt);
|
|
567
568
|
if (!t) {
|
|
568
|
-
let t =
|
|
569
|
+
let t = P(e, kt);
|
|
569
570
|
if (t) {
|
|
570
571
|
let n = e.lastIndexOf(t[1]);
|
|
571
|
-
if (!(
|
|
572
|
+
if (!(M(e, n) || N(e, n)) && Xt(e)) return `${e}_`;
|
|
572
573
|
}
|
|
573
574
|
return e;
|
|
574
575
|
}
|
|
575
576
|
let n = t[2], r = e.lastIndexOf(t[1]);
|
|
576
|
-
return
|
|
577
|
-
},
|
|
577
|
+
return M(e, r) || N(e, r) || $t(e, n, r) ? e : Xt(e) ? `${e}__` : e;
|
|
578
|
+
}, tn = (e, t) => {
|
|
578
579
|
let { text: n } = e;
|
|
579
|
-
return n[t] === "*" && e.regions[t] ===
|
|
580
|
-
},
|
|
581
|
-
let t =
|
|
580
|
+
return n[t] === "*" && e.regions[t] === D.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !ht(e, t);
|
|
581
|
+
}, nn = (e) => {
|
|
582
|
+
let t = A(e);
|
|
582
583
|
for (let n = e.indexOf("*"); n !== -1; n = e.indexOf("*", n + 1)) {
|
|
583
|
-
if (
|
|
584
|
-
let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r ||
|
|
585
|
-
if (!(a && o) && !(r && i &&
|
|
584
|
+
if (!tn(t, n)) continue;
|
|
585
|
+
let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || zt(r), o = !i || zt(i);
|
|
586
|
+
if (!(a && o) && !(r && i && I(r) && I(i)) && !o) return n;
|
|
586
587
|
}
|
|
587
588
|
return -1;
|
|
588
|
-
},
|
|
589
|
-
if (!
|
|
590
|
-
let t =
|
|
591
|
-
if (t === -1 ||
|
|
589
|
+
}, rn = (e) => {
|
|
590
|
+
if (!P(e, Et)) return e;
|
|
591
|
+
let t = nn(e);
|
|
592
|
+
if (t === -1 || M(e, t) || N(e, t)) return e;
|
|
592
593
|
let n = e.substring(t + 1);
|
|
593
|
-
return !n ||
|
|
594
|
-
},
|
|
595
|
-
let t =
|
|
596
|
-
for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] ===
|
|
594
|
+
return !n || F.test(n) ? e : Ht(e) % 2 == 1 ? `${e}*` : e;
|
|
595
|
+
}, an = (e) => {
|
|
596
|
+
let t = A(e);
|
|
597
|
+
for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === D.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !ht(t, n) && !vt(t, n)) {
|
|
597
598
|
let t = n > 0 ? e[n - 1] : "", r = n < e.length - 1 ? e[n + 1] : "";
|
|
598
|
-
if (t && r &&
|
|
599
|
+
if (t && r && I(t) && I(r)) continue;
|
|
599
600
|
return n;
|
|
600
601
|
}
|
|
601
602
|
return -1;
|
|
602
|
-
},
|
|
603
|
+
}, on = (e) => {
|
|
603
604
|
let t = e.length;
|
|
604
605
|
for (; t > 0 && e[t - 1] === "\n";) --t;
|
|
605
606
|
return t < e.length ? `${e.slice(0, t)}_${e.slice(t)}` : `${e}_`;
|
|
606
|
-
},
|
|
607
|
+
}, sn = (e) => {
|
|
607
608
|
if (!e.endsWith("**")) return null;
|
|
608
609
|
let t = e.slice(0, -2);
|
|
609
|
-
if (
|
|
610
|
-
let n = t.indexOf("**"), r =
|
|
610
|
+
if (Kt(t) % 2 != 1) return null;
|
|
611
|
+
let n = t.indexOf("**"), r = an(t);
|
|
611
612
|
return n !== -1 && r !== -1 && n < r ? `${t}_**` : null;
|
|
612
|
-
},
|
|
613
|
-
if (!
|
|
614
|
-
let t =
|
|
613
|
+
}, cn = (e) => {
|
|
614
|
+
if (!P(e, Dt)) return e;
|
|
615
|
+
let t = an(e);
|
|
615
616
|
if (t === -1) return e;
|
|
616
617
|
let n = e.substring(t + 1);
|
|
617
|
-
if (!n ||
|
|
618
|
-
if (
|
|
619
|
-
let t =
|
|
620
|
-
return t === null ?
|
|
618
|
+
if (!n || F.test(n) || M(e, t) || N(e, t)) return e;
|
|
619
|
+
if (Wt(e) % 2 == 1) {
|
|
620
|
+
let t = sn(e);
|
|
621
|
+
return t === null ? on(e) : t;
|
|
621
622
|
}
|
|
622
623
|
return e;
|
|
623
|
-
},
|
|
624
|
-
let t =
|
|
624
|
+
}, ln = (e) => {
|
|
625
|
+
let t = Kt(e), n = Ht(e);
|
|
625
626
|
return t % 2 == 0 && n % 2 == 0;
|
|
626
|
-
},
|
|
627
|
+
}, un = (e, t, n) => !t || F.test(t) || M(e, n) || N(e, n) ? !0 : Lt(e, n, "*"), dn = (e) => {
|
|
627
628
|
if (Nt.test(e)) return e;
|
|
628
|
-
let t =
|
|
629
|
+
let t = P(e, Tt);
|
|
629
630
|
if (!t) return e;
|
|
630
631
|
let n = t[2];
|
|
631
|
-
return
|
|
632
|
-
},
|
|
632
|
+
return un(e, n, e.lastIndexOf(t[1])) ? e : Gt(e) % 2 == 1 ? ln(e) ? e : `${e}***` : e;
|
|
633
|
+
}, fn = /<[a-zA-Z/][^>]*$/, pn = /[a-zA-Z/]/, mn = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), hn = (e, t) => {
|
|
633
634
|
let n = e[t + 1];
|
|
634
|
-
return n !== void 0 &&
|
|
635
|
-
},
|
|
636
|
-
let t = e.match(
|
|
635
|
+
return n !== void 0 && pn.test(n);
|
|
636
|
+
}, gn = (e) => {
|
|
637
|
+
let t = e.match(fn);
|
|
637
638
|
if (!t || t.index === void 0) return e;
|
|
638
|
-
let n =
|
|
639
|
-
for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" &&
|
|
639
|
+
let n = mn(e);
|
|
640
|
+
for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && hn(e, r) && !M(e, r) && !(n && It(e, r))) return e.substring(0, r).trimEnd();
|
|
640
641
|
return e;
|
|
641
|
-
},
|
|
642
|
-
let t =
|
|
642
|
+
}, _n = (e) => {
|
|
643
|
+
let t = A(e);
|
|
643
644
|
if (t.openFence) return e;
|
|
644
645
|
let n = t.openSpan;
|
|
645
646
|
if (!n) return e;
|
|
646
647
|
let r = e.slice(n.start + n.runLength);
|
|
647
|
-
if (!r ||
|
|
648
|
+
if (!r || F.test(r)) return e;
|
|
648
649
|
let i = 0, a = e.length - 1;
|
|
649
650
|
for (; a >= 0 && e[a] === "`";) i += 1, --a;
|
|
650
651
|
return i >= n.runLength ? e : e + "`".repeat(n.runLength - i);
|
|
651
|
-
},
|
|
652
|
-
let t =
|
|
653
|
-
for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] ===
|
|
652
|
+
}, vn = (e) => ct(e, "$"), yn = (e) => {
|
|
653
|
+
let t = A(e), n = 0;
|
|
654
|
+
for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === D.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
|
|
654
655
|
return n;
|
|
655
|
-
},
|
|
656
|
+
}, bn = (e) => {
|
|
656
657
|
if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
|
|
657
658
|
let t = e.indexOf("$$");
|
|
658
659
|
return t !== -1 && e.indexOf("\n", t) !== -1 && !e.endsWith("\n") ? `${e}
|
|
659
660
|
$$` : `${e}$$`;
|
|
660
|
-
},
|
|
661
|
+
}, xn = (e) => vn(e) % 2 == 0 ? e : bn(e), Sn = (e) => yn(e) % 2 == 1 ? `${e}$` : e, Cn = "streamdown:incomplete-image", wn = (e, t, n) => {
|
|
661
662
|
if (e.substring(t + 2).includes(")")) return null;
|
|
662
|
-
let r =
|
|
663
|
-
if (r === -1 ||
|
|
663
|
+
let r = Pt(e, t);
|
|
664
|
+
if (r === -1 || M(e, r)) return null;
|
|
664
665
|
let i = r > 0 && e[r - 1] === "!", a = i ? r - 1 : r, o = e.substring(0, a), s = e.substring(r + 1, t);
|
|
665
|
-
return i ? `${o} if (e[n] === "[" && !
|
|
666
|
+
return i ? `${o}` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
|
|
667
|
+
}, Tn = (e, t) => {
|
|
668
|
+
for (let n = 0; n < t; n++) if (e[n] === "[" && !M(e, n)) {
|
|
668
669
|
if (n > 0 && e[n - 1] === "!") continue;
|
|
669
|
-
let t =
|
|
670
|
+
let t = Ft(e, n);
|
|
670
671
|
if (t === -1) return n;
|
|
671
672
|
if (t + 1 < e.length && e[t + 1] === "(") {
|
|
672
673
|
let r = e.indexOf(")", t + 2);
|
|
@@ -674,69 +675,69 @@ $$` : `${e}$$`;
|
|
|
674
675
|
}
|
|
675
676
|
}
|
|
676
677
|
return t;
|
|
677
|
-
},
|
|
678
|
+
}, En = (e, t, n) => {
|
|
678
679
|
let r = t > 0 && e[t - 1] === "!", i = r ? t - 1 : t;
|
|
679
|
-
if (!e.substring(t + 1).includes("]") ||
|
|
680
|
+
if (!e.substring(t + 1).includes("]") || Ft(e, t) === -1) {
|
|
680
681
|
let a = e.substring(0, i);
|
|
681
|
-
if (r) return `${a} return `${a}`;
|
|
682
683
|
if (n === "text-only") {
|
|
683
|
-
let n =
|
|
684
|
+
let n = Tn(e, t);
|
|
684
685
|
return e.substring(0, n) + e.substring(n + 1);
|
|
685
686
|
}
|
|
686
687
|
return `${e}](streamdown:incomplete-link)`;
|
|
687
688
|
}
|
|
688
689
|
return null;
|
|
689
|
-
},
|
|
690
|
+
}, Dn = (e, t) => {
|
|
690
691
|
let n = e.lastIndexOf("](");
|
|
691
|
-
if (n !== -1 && !
|
|
692
|
-
let r =
|
|
692
|
+
if (n !== -1 && !M(e, n)) {
|
|
693
|
+
let r = wn(e, n, t);
|
|
693
694
|
if (r !== null) return r;
|
|
694
695
|
}
|
|
695
|
-
for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!
|
|
696
|
-
let r =
|
|
696
|
+
for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!M(e, n)) {
|
|
697
|
+
let r = En(e, n, t);
|
|
697
698
|
if (r !== null) return r;
|
|
698
699
|
}
|
|
699
700
|
return e;
|
|
700
|
-
},
|
|
701
|
+
}, On = 32, kn = (e, t = "protocol") => {
|
|
701
702
|
let n = e;
|
|
702
|
-
for (let e = 0; e <
|
|
703
|
-
let e =
|
|
703
|
+
for (let e = 0; e < On; e += 1) {
|
|
704
|
+
let e = Dn(n, t);
|
|
704
705
|
if (e.length >= n.length) return e;
|
|
705
706
|
n = e;
|
|
706
707
|
}
|
|
707
708
|
return n;
|
|
708
|
-
},
|
|
709
|
+
}, An = /^-{1,2}$/, jn = /^[\s]*-{1,2}[\s]+$/, Mn = /^={1,2}$/, Nn = /^[\s]*={1,2}[\s]+$/, Pn = (e) => {
|
|
709
710
|
if (!e || typeof e != "string") return e;
|
|
710
711
|
let t = e.lastIndexOf("\n");
|
|
711
712
|
if (t === -1) return e;
|
|
712
713
|
let n = e.substring(t + 1), r = e.substring(0, t), i = n.trim();
|
|
713
|
-
if (
|
|
714
|
+
if (An.test(i) && !n.match(jn)) {
|
|
714
715
|
let t = r.split("\n").at(-1);
|
|
715
716
|
if (t && t.trim().length > 0) return `${e}\u200B`;
|
|
716
717
|
}
|
|
717
|
-
if (
|
|
718
|
+
if (Mn.test(i) && !n.match(Nn)) {
|
|
718
719
|
let t = r.split("\n").at(-1);
|
|
719
720
|
if (t && t.trim().length > 0) return `${e}\u200B`;
|
|
720
721
|
}
|
|
721
722
|
return e;
|
|
722
|
-
},
|
|
723
|
-
let t =
|
|
723
|
+
}, Fn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, In = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Fn, (t, n, r) => M(e, r + n.length) ? t : `${n}\\~`), Ln = (e) => ct(e, "~"), Rn = (e) => {
|
|
724
|
+
let t = P(e, Ot);
|
|
724
725
|
if (t) {
|
|
725
726
|
let n = t[2];
|
|
726
|
-
if (!n ||
|
|
727
|
+
if (!n || F.test(n)) return e;
|
|
727
728
|
let r = e.lastIndexOf(t[1]);
|
|
728
|
-
if (
|
|
729
|
-
if (
|
|
729
|
+
if (M(e, r) || N(e, r)) return e;
|
|
730
|
+
if (Ln(e) % 2 == 1) return `${e}~~`;
|
|
730
731
|
} else {
|
|
731
|
-
let t =
|
|
732
|
+
let t = P(e, At);
|
|
732
733
|
if (t) {
|
|
733
734
|
let n = e.lastIndexOf(t[0].slice(0, 2));
|
|
734
|
-
if (
|
|
735
|
-
if (
|
|
735
|
+
if (M(e, n) || N(e, n)) return e;
|
|
736
|
+
if (Ln(e) % 2 == 1) return `${e}~`;
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
739
|
return e;
|
|
739
|
-
},
|
|
740
|
+
}, zn = (e) => e !== !1, Bn = (e) => e === !0, L = {
|
|
740
741
|
SINGLE_TILDE: 0,
|
|
741
742
|
COMPARISON_OPERATORS: 5,
|
|
742
743
|
HTML_TAGS: 10,
|
|
@@ -752,12 +753,12 @@ $$` : `${e}$$`;
|
|
|
752
753
|
KATEX: 70,
|
|
753
754
|
INLINE_KATEX: 75,
|
|
754
755
|
DEFAULT: 100
|
|
755
|
-
},
|
|
756
|
+
}, Vn = [
|
|
756
757
|
{
|
|
757
758
|
handler: {
|
|
758
759
|
name: "singleTilde",
|
|
759
|
-
handle:
|
|
760
|
-
priority:
|
|
760
|
+
handle: In,
|
|
761
|
+
priority: L.SINGLE_TILDE
|
|
761
762
|
},
|
|
762
763
|
optionKey: "singleTilde"
|
|
763
764
|
},
|
|
@@ -765,31 +766,31 @@ $$` : `${e}$$`;
|
|
|
765
766
|
handler: {
|
|
766
767
|
name: "comparisonOperators",
|
|
767
768
|
handle: St,
|
|
768
|
-
priority:
|
|
769
|
+
priority: L.COMPARISON_OPERATORS
|
|
769
770
|
},
|
|
770
771
|
optionKey: "comparisonOperators"
|
|
771
772
|
},
|
|
772
773
|
{
|
|
773
774
|
handler: {
|
|
774
775
|
name: "htmlTags",
|
|
775
|
-
handle:
|
|
776
|
-
priority:
|
|
776
|
+
handle: gn,
|
|
777
|
+
priority: L.HTML_TAGS
|
|
777
778
|
},
|
|
778
779
|
optionKey: "htmlTags"
|
|
779
780
|
},
|
|
780
781
|
{
|
|
781
782
|
handler: {
|
|
782
783
|
name: "setextHeadings",
|
|
783
|
-
handle:
|
|
784
|
-
priority:
|
|
784
|
+
handle: Pn,
|
|
785
|
+
priority: L.SETEXT_HEADINGS
|
|
785
786
|
},
|
|
786
787
|
optionKey: "setextHeadings"
|
|
787
788
|
},
|
|
788
789
|
{
|
|
789
790
|
handler: {
|
|
790
791
|
name: "links",
|
|
791
|
-
handle:
|
|
792
|
-
priority:
|
|
792
|
+
handle: kn,
|
|
793
|
+
priority: L.LINKS
|
|
793
794
|
},
|
|
794
795
|
optionKey: "links",
|
|
795
796
|
earlyReturn: (e) => e.endsWith("](streamdown:incomplete-link)") || e.endsWith("](streamdown:incomplete-image)")
|
|
@@ -797,88 +798,88 @@ $$` : `${e}$$`;
|
|
|
797
798
|
{
|
|
798
799
|
handler: {
|
|
799
800
|
name: "boldItalic",
|
|
800
|
-
handle:
|
|
801
|
-
priority:
|
|
801
|
+
handle: dn,
|
|
802
|
+
priority: L.BOLD_ITALIC
|
|
802
803
|
},
|
|
803
804
|
optionKey: "boldItalic"
|
|
804
805
|
},
|
|
805
806
|
{
|
|
806
807
|
handler: {
|
|
807
808
|
name: "bold",
|
|
808
|
-
handle:
|
|
809
|
-
priority:
|
|
809
|
+
handle: Qt,
|
|
810
|
+
priority: L.BOLD
|
|
810
811
|
},
|
|
811
812
|
optionKey: "bold"
|
|
812
813
|
},
|
|
813
814
|
{
|
|
814
815
|
handler: {
|
|
815
816
|
name: "italicDoubleUnderscore",
|
|
816
|
-
handle:
|
|
817
|
-
priority:
|
|
817
|
+
handle: en,
|
|
818
|
+
priority: L.ITALIC_DOUBLE_UNDERSCORE
|
|
818
819
|
},
|
|
819
820
|
optionKey: "italic"
|
|
820
821
|
},
|
|
821
822
|
{
|
|
822
823
|
handler: {
|
|
823
824
|
name: "italicSingleAsterisk",
|
|
824
|
-
handle:
|
|
825
|
-
priority:
|
|
825
|
+
handle: rn,
|
|
826
|
+
priority: L.ITALIC_SINGLE_ASTERISK
|
|
826
827
|
},
|
|
827
828
|
optionKey: "italic"
|
|
828
829
|
},
|
|
829
830
|
{
|
|
830
831
|
handler: {
|
|
831
832
|
name: "italicSingleUnderscore",
|
|
832
|
-
handle:
|
|
833
|
-
priority:
|
|
833
|
+
handle: cn,
|
|
834
|
+
priority: L.ITALIC_SINGLE_UNDERSCORE
|
|
834
835
|
},
|
|
835
836
|
optionKey: "italic"
|
|
836
837
|
},
|
|
837
838
|
{
|
|
838
839
|
handler: {
|
|
839
840
|
name: "inlineCode",
|
|
840
|
-
handle:
|
|
841
|
-
priority:
|
|
841
|
+
handle: _n,
|
|
842
|
+
priority: L.INLINE_CODE
|
|
842
843
|
},
|
|
843
844
|
optionKey: "inlineCode"
|
|
844
845
|
},
|
|
845
846
|
{
|
|
846
847
|
handler: {
|
|
847
848
|
name: "strikethrough",
|
|
848
|
-
handle:
|
|
849
|
-
priority:
|
|
849
|
+
handle: Rn,
|
|
850
|
+
priority: L.STRIKETHROUGH
|
|
850
851
|
},
|
|
851
852
|
optionKey: "strikethrough"
|
|
852
853
|
},
|
|
853
854
|
{
|
|
854
855
|
handler: {
|
|
855
856
|
name: "katex",
|
|
856
|
-
handle:
|
|
857
|
-
priority:
|
|
857
|
+
handle: xn,
|
|
858
|
+
priority: L.KATEX
|
|
858
859
|
},
|
|
859
860
|
optionKey: "katex"
|
|
860
861
|
},
|
|
861
862
|
{
|
|
862
863
|
handler: {
|
|
863
864
|
name: "inlineKatex",
|
|
864
|
-
handle:
|
|
865
|
-
priority:
|
|
865
|
+
handle: Sn,
|
|
866
|
+
priority: L.INLINE_KATEX
|
|
866
867
|
},
|
|
867
868
|
optionKey: "inlineKatex"
|
|
868
869
|
}
|
|
869
|
-
],
|
|
870
|
+
], Hn = (e) => {
|
|
870
871
|
let t = e?.linkMode ?? "protocol";
|
|
871
|
-
return
|
|
872
|
-
handler: Ue(He({}, e), { handle: (e) =>
|
|
872
|
+
return Vn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? zn(e?.links) || zn(e?.images) : t.name === "inlineKatex" ? Bn(e?.inlineKatex) : zn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
|
|
873
|
+
handler: Ue(He({}, e), { handle: (e) => kn(e, t) }),
|
|
873
874
|
earlyReturn: t === "protocol" ? n : void 0
|
|
874
875
|
} : {
|
|
875
876
|
handler: e,
|
|
876
877
|
earlyReturn: n
|
|
877
878
|
});
|
|
878
|
-
},
|
|
879
|
+
}, Un = (e, t) => {
|
|
879
880
|
if (!e || typeof e != "string") return e;
|
|
880
|
-
let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r =
|
|
881
|
-
handler: Ue(He({}, e), { priority: e.priority ??
|
|
881
|
+
let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = Hn(t), i = (t?.handlers ?? []).map((e) => ({
|
|
882
|
+
handler: Ue(He({}, e), { priority: e.priority ?? L.DEFAULT }),
|
|
882
883
|
earlyReturn: void 0
|
|
883
884
|
})), a = [...r, ...i].sort((e, t) => (e.handler.priority ?? 0) - (t.handler.priority ?? 0));
|
|
884
885
|
try {
|
|
@@ -890,7 +891,7 @@ $$` : `${e}$$`;
|
|
|
890
891
|
};
|
|
891
892
|
//#endregion
|
|
892
893
|
//#region ../../node_modules/.pnpm/marked@18.1.0/node_modules/marked/lib/marked.esm.js
|
|
893
|
-
function
|
|
894
|
+
function Wn() {
|
|
894
895
|
return {
|
|
895
896
|
async: !1,
|
|
896
897
|
breaks: !1,
|
|
@@ -904,35 +905,35 @@ function Hn() {
|
|
|
904
905
|
walkTokens: null
|
|
905
906
|
};
|
|
906
907
|
}
|
|
907
|
-
var
|
|
908
|
-
function Wn(e) {
|
|
909
|
-
Un = e;
|
|
910
|
-
}
|
|
911
|
-
var Gn = { exec: () => null };
|
|
908
|
+
var Gn = Wn();
|
|
912
909
|
function Kn(e) {
|
|
910
|
+
Gn = e;
|
|
911
|
+
}
|
|
912
|
+
var qn = { exec: () => null };
|
|
913
|
+
function Jn(e) {
|
|
913
914
|
let t = [];
|
|
914
915
|
return (n) => {
|
|
915
916
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
916
917
|
return i || (i = e(r), t[r] = i), i;
|
|
917
918
|
};
|
|
918
919
|
}
|
|
919
|
-
function
|
|
920
|
+
function R(e, t = "") {
|
|
920
921
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
921
922
|
replace: (e, t) => {
|
|
922
923
|
let i = typeof t == "string" ? t : t.source;
|
|
923
|
-
return i = i.replace(
|
|
924
|
+
return i = i.replace(z.caret, "$1"), n = n.replace(e, i), r;
|
|
924
925
|
},
|
|
925
926
|
getRegex: () => new RegExp(n, t)
|
|
926
927
|
};
|
|
927
928
|
return r;
|
|
928
929
|
}
|
|
929
|
-
var
|
|
930
|
+
var Yn = ((e = "") => {
|
|
930
931
|
try {
|
|
931
932
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
932
933
|
} catch {
|
|
933
934
|
return !1;
|
|
934
935
|
}
|
|
935
|
-
})(),
|
|
936
|
+
})(), z = {
|
|
936
937
|
codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm,
|
|
937
938
|
outputLinkReplace: /\\([\[\]])/g,
|
|
938
939
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -986,132 +987,132 @@ var qn = ((e = "") => {
|
|
|
986
987
|
notSpaceStart: /^\S*/,
|
|
987
988
|
endingNewline: /\n$/,
|
|
988
989
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
989
|
-
nextBulletRegex:
|
|
990
|
-
hrRegex:
|
|
991
|
-
fencesBeginRegex:
|
|
992
|
-
headingBeginRegex:
|
|
993
|
-
htmlBeginRegex:
|
|
994
|
-
blockquoteBeginRegex:
|
|
995
|
-
},
|
|
996
|
-
blockquote:
|
|
997
|
-
code:
|
|
998
|
-
def:
|
|
999
|
-
fences:
|
|
1000
|
-
heading:
|
|
1001
|
-
hr:
|
|
1002
|
-
html:
|
|
1003
|
-
lheading:
|
|
1004
|
-
list:
|
|
1005
|
-
newline:
|
|
1006
|
-
paragraph:
|
|
1007
|
-
table:
|
|
1008
|
-
text:
|
|
1009
|
-
},
|
|
1010
|
-
...
|
|
1011
|
-
lheading:
|
|
1012
|
-
table:
|
|
1013
|
-
paragraph:
|
|
1014
|
-
},
|
|
1015
|
-
...
|
|
1016
|
-
html:
|
|
990
|
+
nextBulletRegex: Jn((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
991
|
+
hrRegex: Jn((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
|
|
992
|
+
fencesBeginRegex: Jn((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
993
|
+
headingBeginRegex: Jn((e) => RegExp(`^ {0,${e}}#`)),
|
|
994
|
+
htmlBeginRegex: Jn((e) => RegExp(`^ {0,${e}}(?:</?(?:${ur})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")),
|
|
995
|
+
blockquoteBeginRegex: Jn((e) => RegExp(`^ {0,${e}}>`))
|
|
996
|
+
}, Xn = /^(?:[ \t]*(?:\n|$))+/, Zn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Qn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, $n = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, er = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tr = / {0,3}(?:[*+-]|\d{1,9}[.)])/, nr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, rr = R(nr).replace(/bull/g, tr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ir = R(nr).replace(/bull/g, tr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ar = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, or = /^[^\n]+/, sr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, cr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", sr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), lr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, tr).getRegex(), ur = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", dr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, fr = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", dr).replace("tag", ur).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), pr = (e) => R(ar).replace("hr", $n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ur).getRegex(), mr = pr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), hr = pr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), gr = {
|
|
997
|
+
blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", hr).getRegex(),
|
|
998
|
+
code: Zn,
|
|
999
|
+
def: cr,
|
|
1000
|
+
fences: Qn,
|
|
1001
|
+
heading: er,
|
|
1002
|
+
hr: $n,
|
|
1003
|
+
html: fr,
|
|
1004
|
+
lheading: rr,
|
|
1005
|
+
list: lr,
|
|
1006
|
+
newline: Xn,
|
|
1007
|
+
paragraph: mr,
|
|
1008
|
+
table: qn,
|
|
1009
|
+
text: or
|
|
1010
|
+
}, _r = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", $n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ur).getRegex(), vr = {
|
|
1011
|
+
...gr,
|
|
1012
|
+
lheading: ir,
|
|
1013
|
+
table: _r,
|
|
1014
|
+
paragraph: R(ar).replace("hr", $n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", _r).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ur).getRegex()
|
|
1015
|
+
}, yr = {
|
|
1016
|
+
...gr,
|
|
1017
|
+
html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", dr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
1017
1018
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1018
1019
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1019
|
-
fences:
|
|
1020
|
+
fences: qn,
|
|
1020
1021
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1021
|
-
paragraph:
|
|
1022
|
-
},
|
|
1023
|
-
_backpedal:
|
|
1024
|
-
anyPunctuation:
|
|
1025
|
-
autolink:
|
|
1026
|
-
blockSkip:
|
|
1027
|
-
br,
|
|
1028
|
-
code:
|
|
1029
|
-
del:
|
|
1030
|
-
delLDelim:
|
|
1031
|
-
delRDelim:
|
|
1032
|
-
emStrongLDelim:
|
|
1033
|
-
emStrongRDelimAst:
|
|
1034
|
-
emStrongRDelimUnd: zr,
|
|
1035
|
-
escape: vr,
|
|
1036
|
-
link: Yr,
|
|
1037
|
-
nolink: Zr,
|
|
1038
|
-
punctuation: Tr,
|
|
1039
|
-
reflink: Xr,
|
|
1040
|
-
reflinkSearch: ei,
|
|
1041
|
-
tag: Kr,
|
|
1042
|
-
text: xr,
|
|
1043
|
-
url: Gn
|
|
1044
|
-
}, ii = {
|
|
1045
|
-
...ri,
|
|
1046
|
-
emStrongLDelim: Pr,
|
|
1047
|
-
emStrongRDelimAst: Rr,
|
|
1022
|
+
paragraph: R(ar).replace("hr", $n).replace("heading", " *#{1,6} *[^\n]").replace("lheading", rr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
1023
|
+
}, br = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, xr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Sr = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, wr = /[\s\p{P}\p{S}]/u, Tr = /[^\s\p{P}\p{S}]/u, Er = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, wr).getRegex(), Dr = /[\p{Pi}\p{Ps}"']/u, Or = /(?!~)[\p{P}\p{S}]/u, kr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, jr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Yn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Mr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Nr = R(Mr, "u").replace(/punct/g, B).getRegex(), Pr = R(Mr, "u").replace(/punct/g, Or).getRegex(), Fr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Dr).replace(/punct/g, B).getRegex(), Ir = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Lr = R(Ir, "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, wr).replace(/punct/g, B).getRegex(), Rr = R(Ir, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, Or).getRegex(), zr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, wr).replace(/punct/g, B).getRegex(), Br = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, wr).replace(/punct/g, B).getRegex(), Vr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, wr).replace(/punct/g, B).getRegex(), Hr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), Ur = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, wr).replace(/punct/g, B).getRegex(), Wr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Gr = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Kr = R(dr).replace("(?:-->|$)", "-->").getRegex(), qr = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Kr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Jr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, Yr = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", Jr).getRegex(), Xr = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", Yr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zr = R(/^!?\[(label)\]\[(ref)\]/).replace("label", Yr).replace("ref", sr).getRegex(), Qr = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", sr).getRegex(), $r = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, ei = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", Jr).getRegex(), ti = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", ei).replace("ref", $r).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", $r).getRegex()).getRegex(), ni = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ri = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), ii = {
|
|
1024
|
+
_backpedal: qn,
|
|
1025
|
+
anyPunctuation: Wr,
|
|
1026
|
+
autolink: Gr,
|
|
1027
|
+
blockSkip: jr,
|
|
1028
|
+
br: Sr,
|
|
1029
|
+
code: xr,
|
|
1030
|
+
del: qn,
|
|
1031
|
+
delLDelim: qn,
|
|
1032
|
+
delRDelim: qn,
|
|
1033
|
+
emStrongLDelim: Nr,
|
|
1034
|
+
emStrongRDelimAst: Lr,
|
|
1048
1035
|
emStrongRDelimUnd: Br,
|
|
1049
|
-
|
|
1050
|
-
|
|
1036
|
+
escape: br,
|
|
1037
|
+
link: Xr,
|
|
1038
|
+
nolink: Qr,
|
|
1039
|
+
punctuation: Er,
|
|
1040
|
+
reflink: Zr,
|
|
1041
|
+
reflinkSearch: ti,
|
|
1042
|
+
tag: qr,
|
|
1043
|
+
text: Cr,
|
|
1044
|
+
url: qn
|
|
1051
1045
|
}, ai = {
|
|
1052
|
-
...
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1046
|
+
...ii,
|
|
1047
|
+
emStrongLDelim: Fr,
|
|
1048
|
+
emStrongRDelimAst: zr,
|
|
1049
|
+
emStrongRDelimUnd: Vr,
|
|
1050
|
+
link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", Yr).getRegex(),
|
|
1051
|
+
reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yr).getRegex()
|
|
1052
|
+
}, oi = {
|
|
1053
|
+
...ii,
|
|
1054
|
+
emStrongRDelimAst: Rr,
|
|
1055
|
+
emStrongLDelim: Pr,
|
|
1056
|
+
delLDelim: Hr,
|
|
1057
|
+
delRDelim: Ur,
|
|
1058
|
+
url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", ri).replace("protocol", ni).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
|
|
1058
1059
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1059
1060
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1060
|
-
text:
|
|
1061
|
-
}, oi = {
|
|
1062
|
-
...ai,
|
|
1063
|
-
br: z(br).replace("{2,}", "*").getRegex(),
|
|
1064
|
-
text: z(ai.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1061
|
+
text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", ni).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
|
|
1065
1062
|
}, si = {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1063
|
+
...oi,
|
|
1064
|
+
br: R(Sr).replace("{2,}", "*").getRegex(),
|
|
1065
|
+
text: R(oi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1069
1066
|
}, ci = {
|
|
1070
|
-
normal:
|
|
1071
|
-
gfm:
|
|
1072
|
-
|
|
1073
|
-
pedantic: ii
|
|
1067
|
+
normal: gr,
|
|
1068
|
+
gfm: vr,
|
|
1069
|
+
pedantic: yr
|
|
1074
1070
|
}, li = {
|
|
1071
|
+
normal: ii,
|
|
1072
|
+
gfm: oi,
|
|
1073
|
+
breaks: si,
|
|
1074
|
+
pedantic: ai
|
|
1075
|
+
}, ui = {
|
|
1075
1076
|
"&": "&",
|
|
1076
1077
|
"<": "<",
|
|
1077
1078
|
">": ">",
|
|
1078
1079
|
"\"": """,
|
|
1079
1080
|
"'": "'"
|
|
1080
|
-
},
|
|
1081
|
+
}, di = (e) => ui[e];
|
|
1081
1082
|
function V(e, t) {
|
|
1082
1083
|
if (t) {
|
|
1083
|
-
if (
|
|
1084
|
-
} else if (
|
|
1084
|
+
if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, di);
|
|
1085
|
+
} else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, di);
|
|
1085
1086
|
return e;
|
|
1086
1087
|
}
|
|
1087
|
-
function
|
|
1088
|
-
return e.replace(
|
|
1088
|
+
function fi(e) {
|
|
1089
|
+
return e.replace(z.numericCharacterReference, (e, t, n) => {
|
|
1089
1090
|
let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
|
|
1090
1091
|
return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : String.fromCodePoint(r);
|
|
1091
1092
|
});
|
|
1092
1093
|
}
|
|
1093
|
-
function
|
|
1094
|
+
function pi(e) {
|
|
1094
1095
|
try {
|
|
1095
|
-
e = encodeURI(e).replace(
|
|
1096
|
+
e = encodeURI(e).replace(z.percentDecode, "%");
|
|
1096
1097
|
} catch {
|
|
1097
1098
|
return null;
|
|
1098
1099
|
}
|
|
1099
1100
|
return e;
|
|
1100
1101
|
}
|
|
1101
|
-
function
|
|
1102
|
-
let n = e.replace(
|
|
1102
|
+
function mi(e, t) {
|
|
1103
|
+
let n = e.replace(z.findPipe, (e, t, n) => {
|
|
1103
1104
|
let r = !1, i = t;
|
|
1104
1105
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
1105
1106
|
return r ? "|" : " |";
|
|
1106
|
-
}).split(
|
|
1107
|
+
}).split(z.splitPipe), r = 0;
|
|
1107
1108
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
|
|
1108
1109
|
if (n.length > t) n.splice(t);
|
|
1109
1110
|
else for (; n.length < t;) n.push("");
|
|
1110
1111
|
}
|
|
1111
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
1112
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
|
|
1112
1113
|
return n;
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function hi(e, t, n) {
|
|
1115
1116
|
let r = e.length;
|
|
1116
1117
|
if (r === 0) return "";
|
|
1117
1118
|
let i = 0;
|
|
@@ -1123,15 +1124,15 @@ function mi(e, t, n) {
|
|
|
1123
1124
|
}
|
|
1124
1125
|
return e.slice(0, r - i);
|
|
1125
1126
|
}
|
|
1126
|
-
function
|
|
1127
|
+
function gi(e) {
|
|
1127
1128
|
let t = e.split("\n"), n = t.length - 1;
|
|
1128
|
-
for (; n >= 0 &&
|
|
1129
|
+
for (; n >= 0 && z.blankLine.test(t[n]);) n--;
|
|
1129
1130
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
1130
1131
|
}
|
|
1131
|
-
function
|
|
1132
|
+
function _i(e) {
|
|
1132
1133
|
return e.trim().toLowerCase().toUpperCase().toLowerCase();
|
|
1133
1134
|
}
|
|
1134
|
-
function
|
|
1135
|
+
function vi(e, t) {
|
|
1135
1136
|
if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
|
|
1136
1137
|
let n = 0;
|
|
1137
1138
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -1139,7 +1140,7 @@ function _i(e, t) {
|
|
|
1139
1140
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
1140
1141
|
return n > 0 ? -2 : -1;
|
|
1141
1142
|
}
|
|
1142
|
-
function
|
|
1143
|
+
function yi(e, t = 0) {
|
|
1143
1144
|
let n = t, r = "";
|
|
1144
1145
|
for (let t of e) if (t === " ") {
|
|
1145
1146
|
let e = 4 - n % 4;
|
|
@@ -1147,7 +1148,7 @@ function vi(e, t = 0) {
|
|
|
1147
1148
|
} else r += t, n++;
|
|
1148
1149
|
return r;
|
|
1149
1150
|
}
|
|
1150
|
-
function
|
|
1151
|
+
function bi(e, t, n, r, i) {
|
|
1151
1152
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!";
|
|
1152
1153
|
r.state.inLink = !0;
|
|
1153
1154
|
let l = r.state.linkEmitted, u = r.state.inRawBlock;
|
|
@@ -1169,7 +1170,7 @@ function yi(e, t, n, r, i) {
|
|
|
1169
1170
|
tokens: d
|
|
1170
1171
|
};
|
|
1171
1172
|
}
|
|
1172
|
-
function
|
|
1173
|
+
function xi(e, t, n) {
|
|
1173
1174
|
let r = e.match(n.other.indentCodeCompensation);
|
|
1174
1175
|
if (r === null) return t;
|
|
1175
1176
|
let i = r[1];
|
|
@@ -1180,7 +1181,7 @@ function bi(e, t, n) {
|
|
|
1180
1181
|
return e.slice(Math.min(r.length, i.length));
|
|
1181
1182
|
}).join("\n");
|
|
1182
1183
|
}
|
|
1183
|
-
function
|
|
1184
|
+
function Si(e, t, n, r) {
|
|
1184
1185
|
if (!t.includes("<")) return !1;
|
|
1185
1186
|
for (let i = 0; i < t.length; i++) {
|
|
1186
1187
|
if (t[i] === "\\") {
|
|
@@ -1203,12 +1204,12 @@ function xi(e, t, n, r) {
|
|
|
1203
1204
|
}
|
|
1204
1205
|
return !1;
|
|
1205
1206
|
}
|
|
1206
|
-
var
|
|
1207
|
+
var Ci = class {
|
|
1207
1208
|
options;
|
|
1208
1209
|
rules;
|
|
1209
1210
|
lexer;
|
|
1210
1211
|
constructor(e) {
|
|
1211
|
-
this.options = e ||
|
|
1212
|
+
this.options = e || Gn;
|
|
1212
1213
|
}
|
|
1213
1214
|
space(e) {
|
|
1214
1215
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1220,7 +1221,7 @@ var Si = class {
|
|
|
1220
1221
|
code(e) {
|
|
1221
1222
|
let t = this.rules.block.code.exec(e);
|
|
1222
1223
|
if (t) {
|
|
1223
|
-
let e = this.options.pedantic ? t[0] :
|
|
1224
|
+
let e = this.options.pedantic ? t[0] : gi(t[0]);
|
|
1224
1225
|
return {
|
|
1225
1226
|
type: "code",
|
|
1226
1227
|
raw: e,
|
|
@@ -1232,7 +1233,7 @@ var Si = class {
|
|
|
1232
1233
|
fences(e) {
|
|
1233
1234
|
let t = this.rules.block.fences.exec(e);
|
|
1234
1235
|
if (t) {
|
|
1235
|
-
let e = t[0], n =
|
|
1236
|
+
let e = t[0], n = xi(e, t[3] || "", this.rules);
|
|
1236
1237
|
return {
|
|
1237
1238
|
type: "code",
|
|
1238
1239
|
raw: e,
|
|
@@ -1246,12 +1247,12 @@ var Si = class {
|
|
|
1246
1247
|
if (t) {
|
|
1247
1248
|
let e = t[2].trim();
|
|
1248
1249
|
if (this.rules.other.endingHash.test(e)) {
|
|
1249
|
-
let t =
|
|
1250
|
+
let t = hi(e, "#");
|
|
1250
1251
|
(this.options.pedantic || !t || this.rules.other.endingSpaceTabChar.test(t)) && (e = t.trim());
|
|
1251
1252
|
}
|
|
1252
1253
|
return {
|
|
1253
1254
|
type: "heading",
|
|
1254
|
-
raw:
|
|
1255
|
+
raw: hi(t[0], "\n"),
|
|
1255
1256
|
depth: t[1].length,
|
|
1256
1257
|
text: e,
|
|
1257
1258
|
tokens: this.lexer.inline(e)
|
|
@@ -1262,13 +1263,13 @@ var Si = class {
|
|
|
1262
1263
|
let t = this.rules.block.hr.exec(e);
|
|
1263
1264
|
if (t) return {
|
|
1264
1265
|
type: "hr",
|
|
1265
|
-
raw:
|
|
1266
|
+
raw: hi(t[0], "\n")
|
|
1266
1267
|
};
|
|
1267
1268
|
}
|
|
1268
1269
|
blockquote(e) {
|
|
1269
1270
|
let t = this.rules.block.blockquote.exec(e);
|
|
1270
1271
|
if (t) {
|
|
1271
|
-
let e =
|
|
1272
|
+
let e = hi(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
1272
1273
|
for (; e.length > 0;) {
|
|
1273
1274
|
let t = !1, a = [], o = 0;
|
|
1274
1275
|
for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -1321,7 +1322,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1321
1322
|
let n = !1, r = "", s = "";
|
|
1322
1323
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1323
1324
|
r = t[0], e = e.substring(r.length);
|
|
1324
|
-
let c = t[2].split("\n", 1)[0], l = t[1].length, u = this.options.pedantic ?
|
|
1325
|
+
let c = t[2].split("\n", 1)[0], l = t[1].length, u = this.options.pedantic ? yi(c, l) : c.replace(this.rules.other.leadingSpaceTab, (e) => yi(e, l)), d = e.split("\n", 1)[0], f = !u.trim(), p = 0;
|
|
1325
1326
|
if (this.options.pedantic ? (p = 2, s = u.trimStart()) : f ? p = l + 1 : (p = u.search(this.rules.other.nonSpaceChar), p = p > 4 ? 1 : p, s = u.slice(p), p += l), f && this.rules.other.blankLine.test(d) && (r += d + "\n", e = e.substring(d.length + 1), n = !0), !n) {
|
|
1326
1327
|
let t = this.rules.other.nextBulletRegex(p), n = this.rules.other.hrRegex(p), i = this.rules.other.fencesBeginRegex(p), a = this.rules.other.headingBeginRegex(p), o = this.rules.other.htmlBeginRegex(p), c = this.rules.other.blockquoteBeginRegex(p);
|
|
1327
1328
|
for (; e;) {
|
|
@@ -1386,7 +1387,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1386
1387
|
html(e) {
|
|
1387
1388
|
let t = this.rules.block.html.exec(e);
|
|
1388
1389
|
if (t) {
|
|
1389
|
-
let e =
|
|
1390
|
+
let e = gi(t[0]);
|
|
1390
1391
|
return {
|
|
1391
1392
|
type: "html",
|
|
1392
1393
|
block: !0,
|
|
@@ -1399,12 +1400,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1399
1400
|
def(e) {
|
|
1400
1401
|
let t = this.rules.block.def.exec(e);
|
|
1401
1402
|
if (t) {
|
|
1402
|
-
if (!this.rules.other.startAngleBracket.test(t[2]) &&
|
|
1403
|
-
let e =
|
|
1403
|
+
if (!this.rules.other.startAngleBracket.test(t[2]) && vi(t[2], "()") !== -1) return;
|
|
1404
|
+
let e = _i(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
1404
1405
|
return {
|
|
1405
1406
|
type: "def",
|
|
1406
1407
|
tag: e,
|
|
1407
|
-
raw:
|
|
1408
|
+
raw: hi(t[0], "\n"),
|
|
1408
1409
|
href: n,
|
|
1409
1410
|
title: r
|
|
1410
1411
|
};
|
|
@@ -1413,9 +1414,9 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1413
1414
|
table(e) {
|
|
1414
1415
|
let t = this.rules.block.table.exec(e);
|
|
1415
1416
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1416
|
-
let n =
|
|
1417
|
+
let n = mi(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
1417
1418
|
type: "table",
|
|
1418
|
-
raw:
|
|
1419
|
+
raw: hi(t[0], "\n"),
|
|
1419
1420
|
header: [],
|
|
1420
1421
|
align: [],
|
|
1421
1422
|
rows: []
|
|
@@ -1428,7 +1429,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1428
1429
|
header: !0,
|
|
1429
1430
|
align: a.align[e]
|
|
1430
1431
|
});
|
|
1431
|
-
for (let e of i) a.rows.push(
|
|
1432
|
+
for (let e of i) a.rows.push(mi(e, a.header.length).map((e, t) => ({
|
|
1432
1433
|
text: e,
|
|
1433
1434
|
tokens: this.lexer.inline(e),
|
|
1434
1435
|
header: !1,
|
|
@@ -1443,7 +1444,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1443
1444
|
let e = t[1].trim();
|
|
1444
1445
|
return {
|
|
1445
1446
|
type: "heading",
|
|
1446
|
-
raw:
|
|
1447
|
+
raw: hi(t[0], "\n"),
|
|
1447
1448
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
1448
1449
|
text: e,
|
|
1449
1450
|
tokens: this.lexer.inline(e)
|
|
@@ -1495,14 +1496,14 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1495
1496
|
let t = this.rules.inline.link.exec(e);
|
|
1496
1497
|
if (t) {
|
|
1497
1498
|
let n = t[0].charAt(0) === "!" ? 2 : 1;
|
|
1498
|
-
if (!this.options.pedantic &&
|
|
1499
|
+
if (!this.options.pedantic && Si(e, t[1], n, this.rules)) return;
|
|
1499
1500
|
let r = t[2].trim();
|
|
1500
1501
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
|
|
1501
1502
|
if (!this.rules.other.endAngleBracket.test(r)) return;
|
|
1502
|
-
let e =
|
|
1503
|
+
let e = hi(r.slice(0, -1), "\\");
|
|
1503
1504
|
if ((r.length - e.length) % 2 == 0) return;
|
|
1504
1505
|
} else {
|
|
1505
|
-
let e =
|
|
1506
|
+
let e = vi(t[2], "()");
|
|
1506
1507
|
if (e === -2) return;
|
|
1507
1508
|
if (e > -1) {
|
|
1508
1509
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -1514,7 +1515,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1514
1515
|
let e = this.rules.other.pedanticHrefTitle.exec(i);
|
|
1515
1516
|
e && (i = e[1], a = e[3]);
|
|
1516
1517
|
} else a = t[3] ? t[3].slice(1, -1) : "";
|
|
1517
|
-
return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)),
|
|
1518
|
+
return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), bi(t, {
|
|
1518
1519
|
href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1519
1520
|
title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1520
1521
|
}, t[0], this.lexer, this.rules);
|
|
@@ -1524,8 +1525,8 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1524
1525
|
let n;
|
|
1525
1526
|
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
1526
1527
|
let r = n[0].charAt(0) === "!" ? 2 : 1;
|
|
1527
|
-
if (!this.options.pedantic &&
|
|
1528
|
-
let i = t[
|
|
1528
|
+
if (!this.options.pedantic && Si(e, n[1], r, this.rules)) return;
|
|
1529
|
+
let i = t[_i((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
|
|
1529
1530
|
if (!i) {
|
|
1530
1531
|
let e = n[0].charAt(0);
|
|
1531
1532
|
return {
|
|
@@ -1534,7 +1535,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1534
1535
|
text: e
|
|
1535
1536
|
};
|
|
1536
1537
|
}
|
|
1537
|
-
return
|
|
1538
|
+
return bi(n, i, n[0], this.lexer, this.rules);
|
|
1538
1539
|
}
|
|
1539
1540
|
}
|
|
1540
1541
|
emStrong(e, t, n = "") {
|
|
@@ -1667,7 +1668,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1667
1668
|
return {
|
|
1668
1669
|
type: "text",
|
|
1669
1670
|
raw: t[0],
|
|
1670
|
-
text: e ? t[0] :
|
|
1671
|
+
text: e ? t[0] : fi(t[0]),
|
|
1671
1672
|
escaped: e
|
|
1672
1673
|
};
|
|
1673
1674
|
}
|
|
@@ -1679,7 +1680,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1679
1680
|
inlineQueue;
|
|
1680
1681
|
tokenizer;
|
|
1681
1682
|
constructor(e) {
|
|
1682
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
1683
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Gn, this.options.tokenizer = this.options.tokenizer || new Ci(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1683
1684
|
inLink: !1,
|
|
1684
1685
|
inRawBlock: !1,
|
|
1685
1686
|
linkEmitted: !1,
|
|
@@ -1687,16 +1688,16 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1687
1688
|
top: !0
|
|
1688
1689
|
};
|
|
1689
1690
|
let t = {
|
|
1690
|
-
other:
|
|
1691
|
-
block:
|
|
1692
|
-
inline:
|
|
1691
|
+
other: z,
|
|
1692
|
+
block: ci.normal,
|
|
1693
|
+
inline: li.normal
|
|
1693
1694
|
};
|
|
1694
|
-
this.options.pedantic ? (t.block =
|
|
1695
|
+
this.options.pedantic ? (t.block = ci.pedantic, t.inline = li.pedantic) : this.options.gfm && (t.block = ci.gfm, t.inline = this.options.breaks ? li.breaks : li.gfm), this.tokenizer.rules = t;
|
|
1695
1696
|
}
|
|
1696
1697
|
static get rules() {
|
|
1697
1698
|
return {
|
|
1698
|
-
block:
|
|
1699
|
-
inline:
|
|
1699
|
+
block: ci,
|
|
1700
|
+
inline: li
|
|
1700
1701
|
};
|
|
1701
1702
|
}
|
|
1702
1703
|
static lex(t, n) {
|
|
@@ -1706,7 +1707,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1706
1707
|
return new e(n).inlineTokens(t);
|
|
1707
1708
|
}
|
|
1708
1709
|
lex(e) {
|
|
1709
|
-
e = e.replace(
|
|
1710
|
+
e = e.replace(z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
1710
1711
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
1711
1712
|
let t = this.inlineQueue[e];
|
|
1712
1713
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -1714,7 +1715,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1714
1715
|
return this.inlineQueue = [], this.tokens;
|
|
1715
1716
|
}
|
|
1716
1717
|
blockTokens(e, t = [], n = !1) {
|
|
1717
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
1718
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(z.tabCharGlobal, " ").replace(z.spaceLine, ""));
|
|
1718
1719
|
let r = 1 / 0;
|
|
1719
1720
|
for (; e;) {
|
|
1720
1721
|
if (e.length < r) r = e.length;
|
|
@@ -1786,7 +1787,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1786
1787
|
for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
|
|
1787
1788
|
for (let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
|
|
1788
1789
|
let e = t[0], n = e.lastIndexOf("[");
|
|
1789
|
-
if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links,
|
|
1790
|
+
if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, _i(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
|
|
1790
1791
|
}
|
|
1791
1792
|
return !1;
|
|
1792
1793
|
}
|
|
@@ -1805,7 +1806,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1805
1806
|
if (this.tokens.links && e.includes("[")) {
|
|
1806
1807
|
let e = this.tokenizer.rules.inline.reflinkSearch, t = (n) => {
|
|
1807
1808
|
let r = n.lastIndexOf("[");
|
|
1808
|
-
if (!Object.hasOwn(this.tokens.links,
|
|
1809
|
+
if (!Object.hasOwn(this.tokens.links, _i(n.slice(r + 1, -1)))) return n;
|
|
1809
1810
|
if (r > 1 && n.charAt(0) !== "!") {
|
|
1810
1811
|
let i = n.slice(1, r - 1);
|
|
1811
1812
|
if (this.linkInText(i)) return "[" + i.replace(e, t) + "][" + "a".repeat(n.length - r - 2) + "]";
|
|
@@ -1865,17 +1866,17 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1865
1866
|
if (this.options.silent) console.error(t);
|
|
1866
1867
|
else throw Error(t);
|
|
1867
1868
|
}
|
|
1868
|
-
},
|
|
1869
|
+
}, wi = class {
|
|
1869
1870
|
options;
|
|
1870
1871
|
parser;
|
|
1871
1872
|
constructor(e) {
|
|
1872
|
-
this.options = e ||
|
|
1873
|
+
this.options = e || Gn;
|
|
1873
1874
|
}
|
|
1874
1875
|
space(e) {
|
|
1875
1876
|
return "";
|
|
1876
1877
|
}
|
|
1877
1878
|
code({ text: e, lang: t, escaped: n }) {
|
|
1878
|
-
let r = (t || "").match(
|
|
1879
|
+
let r = (t || "").match(z.notSpaceStart)?.[0], i = e ? e.replace(z.endingNewline, "") + "\n" : "";
|
|
1879
1880
|
return r ? "<pre><code class=\"language-" + V(r) + "\">" + (n ? i : V(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : V(i, !0)) + "</code></pre>\n";
|
|
1880
1881
|
}
|
|
1881
1882
|
blockquote({ tokens: e }) {
|
|
@@ -1955,7 +1956,7 @@ ${e}</tr>
|
|
|
1955
1956
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1956
1957
|
}
|
|
1957
1958
|
link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
|
|
1958
|
-
let a = i ? V(n, !0) : this.parser.parseInline(r), o =
|
|
1959
|
+
let a = i ? V(n, !0) : this.parser.parseInline(r), o = pi(e);
|
|
1959
1960
|
if (o === null) return a;
|
|
1960
1961
|
e = V(o, i);
|
|
1961
1962
|
let s = "<a href=\"" + e + "\"";
|
|
@@ -1963,7 +1964,7 @@ ${e}</tr>
|
|
|
1963
1964
|
}
|
|
1964
1965
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1965
1966
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1966
|
-
let i =
|
|
1967
|
+
let i = pi(e);
|
|
1967
1968
|
if (i === null) return V(n);
|
|
1968
1969
|
e = i;
|
|
1969
1970
|
let a = `<img src="${V(e)}" alt="${V(n)}"`;
|
|
@@ -1972,7 +1973,7 @@ ${e}</tr>
|
|
|
1972
1973
|
text(e) {
|
|
1973
1974
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
|
|
1974
1975
|
}
|
|
1975
|
-
},
|
|
1976
|
+
}, Ti = class {
|
|
1976
1977
|
strong({ text: e }) {
|
|
1977
1978
|
return e;
|
|
1978
1979
|
}
|
|
@@ -2008,7 +2009,7 @@ ${e}</tr>
|
|
|
2008
2009
|
renderer;
|
|
2009
2010
|
textRenderer;
|
|
2010
2011
|
constructor(e) {
|
|
2011
|
-
this.options = e ||
|
|
2012
|
+
this.options = e || Gn, this.options.renderer = this.options.renderer || new wi(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Ti();
|
|
2012
2013
|
}
|
|
2013
2014
|
static parse(t, n) {
|
|
2014
2015
|
return new e(n).parse(t);
|
|
@@ -2156,11 +2157,11 @@ ${e}</tr>
|
|
|
2156
2157
|
}
|
|
2157
2158
|
return n;
|
|
2158
2159
|
}
|
|
2159
|
-
},
|
|
2160
|
+
}, Ei = class {
|
|
2160
2161
|
options;
|
|
2161
2162
|
block;
|
|
2162
2163
|
constructor(e) {
|
|
2163
|
-
this.options = e ||
|
|
2164
|
+
this.options = e || Gn;
|
|
2164
2165
|
}
|
|
2165
2166
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
2166
2167
|
"preprocess",
|
|
@@ -2191,17 +2192,17 @@ ${e}</tr>
|
|
|
2191
2192
|
provideParser(e = this.block) {
|
|
2192
2193
|
return e ? U.parse : U.parseInline;
|
|
2193
2194
|
}
|
|
2194
|
-
},
|
|
2195
|
-
defaults =
|
|
2195
|
+
}, Di = new class {
|
|
2196
|
+
defaults = Wn();
|
|
2196
2197
|
options = this.setOptions;
|
|
2197
2198
|
parse = this.parseMarkdown(!0);
|
|
2198
2199
|
parseInline = this.parseMarkdown(!1);
|
|
2199
2200
|
Parser = U;
|
|
2200
|
-
Renderer =
|
|
2201
|
-
TextRenderer =
|
|
2201
|
+
Renderer = wi;
|
|
2202
|
+
TextRenderer = Ti;
|
|
2202
2203
|
Lexer = H;
|
|
2203
|
-
Tokenizer =
|
|
2204
|
-
Hooks =
|
|
2204
|
+
Tokenizer = Ci;
|
|
2205
|
+
Hooks = Ei;
|
|
2205
2206
|
constructor(...e) {
|
|
2206
2207
|
this.use(...e);
|
|
2207
2208
|
}
|
|
@@ -2252,7 +2253,7 @@ ${e}</tr>
|
|
|
2252
2253
|
}
|
|
2253
2254
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
2254
2255
|
}), n.extensions = t), e.renderer) {
|
|
2255
|
-
let t = this.defaults.renderer || new
|
|
2256
|
+
let t = this.defaults.renderer || new wi(this.defaults);
|
|
2256
2257
|
for (let n in e.renderer) {
|
|
2257
2258
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
2258
2259
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -2265,7 +2266,7 @@ ${e}</tr>
|
|
|
2265
2266
|
n.renderer = t;
|
|
2266
2267
|
}
|
|
2267
2268
|
if (e.tokenizer) {
|
|
2268
|
-
let t = this.defaults.tokenizer || new
|
|
2269
|
+
let t = this.defaults.tokenizer || new Ci(this.defaults);
|
|
2269
2270
|
for (let n in e.tokenizer) {
|
|
2270
2271
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
2271
2272
|
if ([
|
|
@@ -2282,13 +2283,13 @@ ${e}</tr>
|
|
|
2282
2283
|
n.tokenizer = t;
|
|
2283
2284
|
}
|
|
2284
2285
|
if (e.hooks) {
|
|
2285
|
-
let t = this.defaults.hooks || new
|
|
2286
|
+
let t = this.defaults.hooks || new Ei();
|
|
2286
2287
|
for (let n in e.hooks) {
|
|
2287
2288
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
2288
2289
|
if (["options", "block"].includes(n)) continue;
|
|
2289
2290
|
let r = n, i = e.hooks[r], a = t[r];
|
|
2290
|
-
t[r] =
|
|
2291
|
-
if (this.defaults.async &&
|
|
2291
|
+
t[r] = Ei.passThroughHooks.has(n) ? (e) => {
|
|
2292
|
+
if (this.defaults.async && Ei.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
2292
2293
|
let n = await i.call(t, e);
|
|
2293
2294
|
return a.call(t, n);
|
|
2294
2295
|
})();
|
|
@@ -2368,31 +2369,31 @@ ${e}</tr>
|
|
|
2368
2369
|
}
|
|
2369
2370
|
}();
|
|
2370
2371
|
function W(e, t) {
|
|
2371
|
-
return
|
|
2372
|
+
return Di.parse(e, t);
|
|
2372
2373
|
}
|
|
2373
2374
|
W.options = W.setOptions = function(e) {
|
|
2374
|
-
return
|
|
2375
|
-
}, W.getDefaults =
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2378
|
-
}
|
|
2379
|
-
W.use =
|
|
2380
|
-
return
|
|
2381
|
-
}, W.parseInline =
|
|
2375
|
+
return Di.setOptions(e), W.defaults = Di.defaults, Kn(W.defaults), W;
|
|
2376
|
+
}, W.getDefaults = Wn, W.defaults = Gn;
|
|
2377
|
+
function Oi(...e) {
|
|
2378
|
+
return Di.use(...e), W.defaults = Di.defaults, Kn(W.defaults), W;
|
|
2379
|
+
}
|
|
2380
|
+
W.use = Oi, W.walkTokens = function(e, t) {
|
|
2381
|
+
return Di.walkTokens(e, t);
|
|
2382
|
+
}, W.parseInline = Di.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = wi, W.TextRenderer = Ti, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Ci, W.Hooks = Ei, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
|
|
2382
2383
|
//#endregion
|
|
2383
2384
|
//#region ../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs
|
|
2384
|
-
function
|
|
2385
|
+
function ki(e, t) {
|
|
2385
2386
|
this.v = e, this.k = t;
|
|
2386
2387
|
}
|
|
2387
|
-
function
|
|
2388
|
+
function Ai(e, t) {
|
|
2388
2389
|
(t == null || t > e.length) && (t = e.length);
|
|
2389
2390
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
2390
2391
|
return r;
|
|
2391
2392
|
}
|
|
2392
|
-
function
|
|
2393
|
+
function ji(e) {
|
|
2393
2394
|
if (Array.isArray(e)) return e;
|
|
2394
2395
|
}
|
|
2395
|
-
function
|
|
2396
|
+
function Mi(e, t) {
|
|
2396
2397
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2397
2398
|
if (n != null) {
|
|
2398
2399
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -2413,24 +2414,24 @@ function ji(e, t) {
|
|
|
2413
2414
|
return s;
|
|
2414
2415
|
}
|
|
2415
2416
|
}
|
|
2416
|
-
function
|
|
2417
|
+
function Ni() {
|
|
2417
2418
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2418
2419
|
}
|
|
2419
|
-
function Ni(e, t) {
|
|
2420
|
-
return Ai(e) || ji(e, t) || Pi(e, t) || Mi();
|
|
2421
|
-
}
|
|
2422
2420
|
function Pi(e, t) {
|
|
2421
|
+
return ji(e) || Mi(e, t) || Fi(e, t) || Ni();
|
|
2422
|
+
}
|
|
2423
|
+
function Fi(e, t) {
|
|
2423
2424
|
if (e) {
|
|
2424
|
-
if (typeof e == "string") return
|
|
2425
|
+
if (typeof e == "string") return Ai(e, t);
|
|
2425
2426
|
var n = {}.toString.call(e).slice(8, -1);
|
|
2426
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
2427
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ai(e, t) : void 0;
|
|
2427
2428
|
}
|
|
2428
2429
|
}
|
|
2429
|
-
function
|
|
2430
|
+
function Ii(e) {
|
|
2430
2431
|
var t, n;
|
|
2431
2432
|
function r(t, n) {
|
|
2432
2433
|
try {
|
|
2433
|
-
var a = e[t](n), o = a.value, s = o instanceof
|
|
2434
|
+
var a = e[t](n), o = a.value, s = o instanceof ki;
|
|
2434
2435
|
Promise.resolve(s ? o.v : o).then(function(n) {
|
|
2435
2436
|
if (s) {
|
|
2436
2437
|
var c = t === "return" && o.k ? t : "next";
|
|
@@ -2464,113 +2465,113 @@ function Fi(e) {
|
|
|
2464
2465
|
});
|
|
2465
2466
|
}, typeof e.return != "function" && (this.return = void 0);
|
|
2466
2467
|
}
|
|
2467
|
-
|
|
2468
|
+
Ii.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
2468
2469
|
return this;
|
|
2469
|
-
},
|
|
2470
|
+
}, Ii.prototype.next = function(e) {
|
|
2470
2471
|
return this._invoke("next", e);
|
|
2471
|
-
},
|
|
2472
|
+
}, Ii.prototype.throw = function(e) {
|
|
2472
2473
|
return this._invoke("throw", e);
|
|
2473
|
-
},
|
|
2474
|
+
}, Ii.prototype.return = function(e) {
|
|
2474
2475
|
return this._invoke("return", e);
|
|
2475
2476
|
};
|
|
2476
|
-
var
|
|
2477
|
+
var Li = Object.entries, Ri = Object.setPrototypeOf, zi = Object.isFrozen, Bi = Object.getPrototypeOf, Vi = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Hi = Object.create, Ui = typeof Reflect < "u" && Reflect, Wi = Ui.apply, Gi = Ui.construct;
|
|
2477
2478
|
G ||= function(e) {
|
|
2478
2479
|
return e;
|
|
2479
2480
|
}, K ||= function(e) {
|
|
2480
2481
|
return e;
|
|
2481
|
-
},
|
|
2482
|
+
}, Wi ||= function(e, t) {
|
|
2482
2483
|
var n = [...arguments].slice(2);
|
|
2483
2484
|
return e.apply(t, n);
|
|
2484
|
-
},
|
|
2485
|
+
}, Gi ||= function(e) {
|
|
2485
2486
|
return new e(...[...arguments].slice(1));
|
|
2486
2487
|
};
|
|
2487
|
-
var
|
|
2488
|
+
var Ki = Y(Array.prototype.forEach);
|
|
2488
2489
|
Array.prototype.indexOf;
|
|
2489
|
-
var
|
|
2490
|
+
var qi = Y(Array.prototype.lastIndexOf), Ji = Y(Array.prototype.pop), Yi = Y(Array.prototype.push);
|
|
2490
2491
|
Array.prototype.slice;
|
|
2491
|
-
var
|
|
2492
|
+
var Xi = Y(Array.prototype.splice), Zi = Array.isArray, Qi = Y(String.prototype.toLowerCase), $i = Y(String.prototype.toString), ea = Y(String.prototype.match), ta = Y(String.prototype.replace), na = Y(String.prototype.indexOf), ra = Y(String.prototype.trim), ia = Y(Number.prototype.toString), aa = Y(Boolean.prototype.toString), oa = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), sa = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), ca = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), la = ua(TypeError);
|
|
2492
2493
|
function Y(e) {
|
|
2493
2494
|
return function(t) {
|
|
2494
2495
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
2495
2496
|
var n = [...arguments].slice(1);
|
|
2496
|
-
return
|
|
2497
|
+
return Wi(e, t, n);
|
|
2497
2498
|
};
|
|
2498
2499
|
}
|
|
2499
|
-
function
|
|
2500
|
+
function ua(e) {
|
|
2500
2501
|
return function() {
|
|
2501
|
-
return
|
|
2502
|
+
return Gi(e, [...arguments]);
|
|
2502
2503
|
};
|
|
2503
2504
|
}
|
|
2504
2505
|
function X(e, t) {
|
|
2505
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
2506
|
-
if (
|
|
2506
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Qi;
|
|
2507
|
+
if (Ri && Ri(e, null), !Zi(t)) return e;
|
|
2507
2508
|
let r = t.length;
|
|
2508
2509
|
for (; r--;) {
|
|
2509
2510
|
let i = t[r];
|
|
2510
2511
|
if (typeof i == "string") {
|
|
2511
2512
|
let e = n(i);
|
|
2512
|
-
e !== i && (
|
|
2513
|
+
e !== i && (zi(t) || (t[r] = e), i = e);
|
|
2513
2514
|
}
|
|
2514
2515
|
e[i] = !0;
|
|
2515
2516
|
}
|
|
2516
2517
|
return e;
|
|
2517
2518
|
}
|
|
2518
|
-
function
|
|
2519
|
+
function da(e) {
|
|
2519
2520
|
for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
|
|
2520
2521
|
return e;
|
|
2521
2522
|
}
|
|
2522
2523
|
function Z(e) {
|
|
2523
|
-
let t =
|
|
2524
|
-
for (let r of
|
|
2525
|
-
var n =
|
|
2524
|
+
let t = Hi(null);
|
|
2525
|
+
for (let r of Li(e)) {
|
|
2526
|
+
var n = Pi(r, 2);
|
|
2526
2527
|
let i = n[0], a = n[1];
|
|
2527
|
-
q(e, i) && (t[i] =
|
|
2528
|
+
q(e, i) && (t[i] = Zi(a) ? da(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
|
|
2528
2529
|
}
|
|
2529
2530
|
return t;
|
|
2530
2531
|
}
|
|
2531
|
-
function
|
|
2532
|
+
function fa(e) {
|
|
2532
2533
|
switch (typeof e) {
|
|
2533
2534
|
case "string": return e;
|
|
2534
|
-
case "number": return
|
|
2535
|
-
case "boolean": return
|
|
2536
|
-
case "bigint": return
|
|
2537
|
-
case "symbol": return
|
|
2538
|
-
case "undefined": return
|
|
2535
|
+
case "number": return ia(e);
|
|
2536
|
+
case "boolean": return aa(e);
|
|
2537
|
+
case "bigint": return oa ? oa(e) : "0";
|
|
2538
|
+
case "symbol": return sa ? sa(e) : "Symbol()";
|
|
2539
|
+
case "undefined": return ca(e);
|
|
2539
2540
|
case "function":
|
|
2540
2541
|
case "object": {
|
|
2541
|
-
if (e === null) return
|
|
2542
|
+
if (e === null) return ca(e);
|
|
2542
2543
|
let t = e, n = Q(t, "toString");
|
|
2543
2544
|
if (typeof n == "function") {
|
|
2544
2545
|
let e = n(t);
|
|
2545
|
-
return typeof e == "string" ? e :
|
|
2546
|
+
return typeof e == "string" ? e : ca(e);
|
|
2546
2547
|
}
|
|
2547
|
-
return
|
|
2548
|
+
return ca(e);
|
|
2548
2549
|
}
|
|
2549
|
-
default: return
|
|
2550
|
+
default: return ca(e);
|
|
2550
2551
|
}
|
|
2551
2552
|
}
|
|
2552
2553
|
function Q(e, t) {
|
|
2553
2554
|
for (; e !== null;) {
|
|
2554
|
-
let n =
|
|
2555
|
+
let n = Vi(e, t);
|
|
2555
2556
|
if (n) {
|
|
2556
2557
|
if (n.get) return Y(n.get);
|
|
2557
2558
|
if (typeof n.value == "function") return Y(n.value);
|
|
2558
2559
|
}
|
|
2559
|
-
e =
|
|
2560
|
+
e = Bi(e);
|
|
2560
2561
|
}
|
|
2561
2562
|
function n() {
|
|
2562
2563
|
return null;
|
|
2563
2564
|
}
|
|
2564
2565
|
return n;
|
|
2565
2566
|
}
|
|
2566
|
-
function
|
|
2567
|
+
function pa(e) {
|
|
2567
2568
|
try {
|
|
2568
2569
|
return J(e, ""), !0;
|
|
2569
2570
|
} catch {
|
|
2570
2571
|
return !1;
|
|
2571
2572
|
}
|
|
2572
2573
|
}
|
|
2573
|
-
var
|
|
2574
|
+
var ma = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), ha = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ga = G([
|
|
2574
2575
|
"feBlend",
|
|
2575
2576
|
"feColorMatrix",
|
|
2576
2577
|
"feComponentTransfer",
|
|
@@ -2596,7 +2597,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2596
2597
|
"feSpotLight",
|
|
2597
2598
|
"feTile",
|
|
2598
2599
|
"feTurbulence"
|
|
2599
|
-
]),
|
|
2600
|
+
]), _a = G([
|
|
2600
2601
|
"animate",
|
|
2601
2602
|
"color-profile",
|
|
2602
2603
|
"cursor",
|
|
@@ -2619,7 +2620,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2619
2620
|
"solidcolor",
|
|
2620
2621
|
"unknown",
|
|
2621
2622
|
"use"
|
|
2622
|
-
]),
|
|
2623
|
+
]), va = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), ya = G([
|
|
2623
2624
|
"maction",
|
|
2624
2625
|
"maligngroup",
|
|
2625
2626
|
"malignmark",
|
|
@@ -2635,13 +2636,13 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2635
2636
|
"annotation-xml",
|
|
2636
2637
|
"mprescripts",
|
|
2637
2638
|
"none"
|
|
2638
|
-
]),
|
|
2639
|
+
]), ba = G(["#text"]), xa = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Sa = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ca = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), wa = G([
|
|
2639
2640
|
"xlink:href",
|
|
2640
2641
|
"xml:id",
|
|
2641
2642
|
"xlink:title",
|
|
2642
2643
|
"xml:space",
|
|
2643
2644
|
"xmlns:xlink"
|
|
2644
|
-
]),
|
|
2645
|
+
]), Ta = K(/{{[\w\W]*|^[\w\W]*}}/g), Ea = K(/<%[\w\W]*|^[\w\W]*%>/g), Da = K(/\${[\w\W]*/g), Oa = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), ka = K(/^aria-[\-\w]+$/), Aa = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ja = K(/^(?:\w+script|data):/i), Ma = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Na = K(/^html$/i), Pa = K(/^[a-z][.\w]*(-[.\w]+)+$/i), Fa = K(/<[/\w!]/g), Ia = K(/<[/\w]/g), La = K(/<\/no(script|embed|frames)/i), Ra = K(/\/>/i), $ = {
|
|
2645
2646
|
element: 1,
|
|
2646
2647
|
attribute: 2,
|
|
2647
2648
|
text: 3,
|
|
@@ -2654,7 +2655,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2654
2655
|
documentType: 10,
|
|
2655
2656
|
documentFragment: 11,
|
|
2656
2657
|
notation: 12
|
|
2657
|
-
},
|
|
2658
|
+
}, za = [
|
|
2658
2659
|
"style",
|
|
2659
2660
|
"script",
|
|
2660
2661
|
"xmp",
|
|
@@ -2663,14 +2664,14 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2663
2664
|
"noframes",
|
|
2664
2665
|
"plaintext",
|
|
2665
2666
|
"noscript"
|
|
2666
|
-
],
|
|
2667
|
+
], Ba = G(X({}, za)), Va = function() {
|
|
2667
2668
|
let e = {};
|
|
2668
|
-
return
|
|
2669
|
+
return Ki(za, (t) => {
|
|
2669
2670
|
e[t] = K(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2670
2671
|
}), G(e);
|
|
2671
|
-
}(),
|
|
2672
|
+
}(), Ha = function() {
|
|
2672
2673
|
return typeof window > "u" ? null : window;
|
|
2673
|
-
},
|
|
2674
|
+
}, Ua = function(e, t) {
|
|
2674
2675
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
2675
2676
|
let n = null, r = "data-tt-policy-suffix";
|
|
2676
2677
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -2687,7 +2688,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2687
2688
|
} catch {
|
|
2688
2689
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
2689
2690
|
}
|
|
2690
|
-
},
|
|
2691
|
+
}, Wa = function() {
|
|
2691
2692
|
return {
|
|
2692
2693
|
afterSanitizeAttributes: [],
|
|
2693
2694
|
afterSanitizeElements: [],
|
|
@@ -2699,60 +2700,60 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
2699
2700
|
uponSanitizeElement: [],
|
|
2700
2701
|
uponSanitizeShadowNode: []
|
|
2701
2702
|
};
|
|
2702
|
-
},
|
|
2703
|
-
return q(e, t) &&
|
|
2704
|
-
},
|
|
2703
|
+
}, Ga = function(e, t, n, r) {
|
|
2704
|
+
return q(e, t) && Zi(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
|
|
2705
|
+
}, Ka = function(e, t, n) {
|
|
2705
2706
|
let r = q(e, t) ? e[t] : void 0;
|
|
2706
2707
|
return r && typeof r == "object" ? Z(r) : n();
|
|
2707
2708
|
};
|
|
2708
|
-
function
|
|
2709
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
2709
|
+
function qa() {
|
|
2710
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ha(), t = (e) => qa(e);
|
|
2710
2711
|
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
|
|
2711
2712
|
let n = e.document, r = n, i = r.currentScript;
|
|
2712
2713
|
e.DocumentFragment;
|
|
2713
2714
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
2714
2715
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
2715
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), te = Q(d, "nextSibling"), ne = Q(d, "childNodes"), re = Q(d, "parentNode"), ie = Q(d, "shadowRoot"), ae = Q(d, "attributes"),
|
|
2716
|
-
return
|
|
2717
|
-
},
|
|
2718
|
-
return
|
|
2716
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), te = Q(d, "nextSibling"), ne = Q(d, "childNodes"), re = Q(d, "parentNode"), ie = Q(d, "shadowRoot"), ae = Q(d, "attributes"), oe = o && o.prototype ? Q(o.prototype, "nodeType") : null, m = o && o.prototype ? Q(o.prototype, "nodeName") : null, se = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, ce = function(e) {
|
|
2717
|
+
return oe ? oe(e) : e.nodeType;
|
|
2718
|
+
}, le = function(e) {
|
|
2719
|
+
return m ? m(e) : e.nodeName;
|
|
2719
2720
|
};
|
|
2720
2721
|
if (typeof a == "function") {
|
|
2721
2722
|
let e = n.createElement("template");
|
|
2722
2723
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
2723
2724
|
}
|
|
2724
|
-
let
|
|
2725
|
-
if (
|
|
2725
|
+
let h, g = "", ue, de = !1, _ = 0, fe = function() {
|
|
2726
|
+
if (_ > 0) throw la("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
2726
2727
|
}, pe = function(e) {
|
|
2727
|
-
fe(),
|
|
2728
|
+
fe(), _++;
|
|
2728
2729
|
try {
|
|
2729
|
-
return
|
|
2730
|
+
return h.createHTML(e);
|
|
2730
2731
|
} finally {
|
|
2731
|
-
|
|
2732
|
+
_--;
|
|
2732
2733
|
}
|
|
2733
2734
|
}, me = function(e) {
|
|
2734
|
-
fe(),
|
|
2735
|
+
fe(), _++;
|
|
2735
2736
|
try {
|
|
2736
|
-
return
|
|
2737
|
+
return h.createScriptURL(e);
|
|
2737
2738
|
} finally {
|
|
2738
|
-
|
|
2739
|
+
_--;
|
|
2739
2740
|
}
|
|
2740
2741
|
}, he = function() {
|
|
2741
|
-
return
|
|
2742
|
-
},
|
|
2743
|
-
t.isSupported = typeof
|
|
2744
|
-
let xe =
|
|
2745
|
-
...pa,
|
|
2742
|
+
return de ||= (ue = Ua(u, i), !0), ue;
|
|
2743
|
+
}, ge = n, v = ge.implementation, _e = ge.createNodeIterator, ve = ge.createDocumentFragment, ye = ge.getElementsByTagName, be = r.importNode, y = Wa();
|
|
2744
|
+
t.isSupported = typeof Li == "function" && typeof re == "function" && v && v.createHTMLDocument !== void 0;
|
|
2745
|
+
let xe = Ta, Se = Ea, Ce = Da, we = Oa, Te = ka, Ee = ja, De = Ma, Oe = Pa, b = Aa, x = null, ke = X({}, [
|
|
2746
2746
|
...ma,
|
|
2747
2747
|
...ha,
|
|
2748
|
-
...
|
|
2749
|
-
...
|
|
2750
|
-
|
|
2751
|
-
|
|
2748
|
+
...ga,
|
|
2749
|
+
...va,
|
|
2750
|
+
...ba
|
|
2751
|
+
]), S = null, Ae = X({}, [
|
|
2752
2752
|
...xa,
|
|
2753
2753
|
...Sa,
|
|
2754
|
-
...Ca
|
|
2755
|
-
|
|
2754
|
+
...Ca,
|
|
2755
|
+
...wa
|
|
2756
|
+
]), C = Object.seal(Hi(null, {
|
|
2756
2757
|
tagNameCheck: {
|
|
2757
2758
|
writable: !0,
|
|
2758
2759
|
configurable: !1,
|
|
@@ -2771,7 +2772,7 @@ function Ka() {
|
|
|
2771
2772
|
enumerable: !0,
|
|
2772
2773
|
value: !1
|
|
2773
2774
|
}
|
|
2774
|
-
})),
|
|
2775
|
+
})), je = null, Me = null, w = Object.seal(Hi(null, {
|
|
2775
2776
|
tagCheck: {
|
|
2776
2777
|
writable: !0,
|
|
2777
2778
|
configurable: !1,
|
|
@@ -2784,14 +2785,14 @@ function Ka() {
|
|
|
2784
2785
|
enumerable: !0,
|
|
2785
2786
|
value: null
|
|
2786
2787
|
}
|
|
2787
|
-
})),
|
|
2788
|
+
})), T = !0, Ne = !0, Pe = !1, Fe = !0, E = !1, Ie = !0, Le = !1, Re = !1, ze = null, Be = null, Ve = !1, He = !1, Ue = !1, D = !1, We = !0, Ge = !1, Ke = "user-content-", qe = !0, Je = !1, Ye = {}, Xe = null, Ze = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Qe = null, $e = X({}, [
|
|
2788
2789
|
"audio",
|
|
2789
2790
|
"video",
|
|
2790
2791
|
"img",
|
|
2791
2792
|
"source",
|
|
2792
2793
|
"image",
|
|
2793
2794
|
"track"
|
|
2794
|
-
]),
|
|
2795
|
+
]), et = null, tt = X({}, [
|
|
2795
2796
|
"alt",
|
|
2796
2797
|
"class",
|
|
2797
2798
|
"for",
|
|
@@ -2806,77 +2807,77 @@ function Ka() {
|
|
|
2806
2807
|
"value",
|
|
2807
2808
|
"style",
|
|
2808
2809
|
"xmlns"
|
|
2809
|
-
]),
|
|
2810
|
+
]), nt = "http://www.w3.org/1998/Math/MathML", rt = "http://www.w3.org/2000/svg", O = "http://www.w3.org/1999/xhtml", k = O, it = !1, A = null, at = X({}, [
|
|
2811
|
+
nt,
|
|
2810
2812
|
rt,
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
], Qi), st = G([
|
|
2813
|
+
O
|
|
2814
|
+
], $i), ot = G([
|
|
2814
2815
|
"mi",
|
|
2815
2816
|
"mo",
|
|
2816
2817
|
"mn",
|
|
2817
2818
|
"ms",
|
|
2818
2819
|
"mtext"
|
|
2819
|
-
]),
|
|
2820
|
+
]), st = X({}, ot), ct = G(["annotation-xml"]), lt = X({}, ct), ut = X({}, [
|
|
2820
2821
|
"title",
|
|
2821
2822
|
"style",
|
|
2822
2823
|
"font",
|
|
2823
2824
|
"a",
|
|
2824
2825
|
"script"
|
|
2825
|
-
]),
|
|
2826
|
+
]), dt = null, ft = ["application/xhtml+xml", "text/html"], j = null, pt = null, mt = n.createElement("form"), ht = function(e) {
|
|
2826
2827
|
return e instanceof RegExp || e instanceof Function;
|
|
2827
|
-
},
|
|
2828
|
+
}, gt = function() {
|
|
2828
2829
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2829
|
-
if (
|
|
2830
|
-
(!e || typeof e != "object") && (e = {}), e = Z(e),
|
|
2831
|
-
transform:
|
|
2832
|
-
base:
|
|
2833
|
-
}),
|
|
2834
|
-
transform:
|
|
2835
|
-
base:
|
|
2836
|
-
}),
|
|
2837
|
-
let t =
|
|
2838
|
-
if (
|
|
2830
|
+
if (pt && pt === e) return;
|
|
2831
|
+
(!e || typeof e != "object") && (e = {}), e = Z(e), dt = ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, j = dt === "application/xhtml+xml" ? $i : Qi, x = Ga(e, "ALLOWED_TAGS", ke, { transform: j }), S = Ga(e, "ALLOWED_ATTR", Ae, { transform: j }), A = Ga(e, "ALLOWED_NAMESPACES", at, { transform: $i }), et = Ga(e, "ADD_URI_SAFE_ATTR", tt, {
|
|
2832
|
+
transform: j,
|
|
2833
|
+
base: tt
|
|
2834
|
+
}), Qe = Ga(e, "ADD_DATA_URI_TAGS", $e, {
|
|
2835
|
+
transform: j,
|
|
2836
|
+
base: $e
|
|
2837
|
+
}), Xe = Ga(e, "FORBID_CONTENTS", Ze, { transform: j }), je = Ga(e, "FORBID_TAGS", Z({}), { transform: j }), Me = Ga(e, "FORBID_ATTR", Z({}), { transform: j }), Ye = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, T = e.ALLOW_ARIA_ATTR !== !1, Ne = e.ALLOW_DATA_ATTR !== !1, Pe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Fe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, E = e.SAFE_FOR_TEMPLATES || !1, Ie = e.SAFE_FOR_XML !== !1, Le = e.WHOLE_DOCUMENT || !1, He = e.RETURN_DOM || !1, Ue = e.RETURN_DOM_FRAGMENT || !1, D = e.RETURN_TRUSTED_TYPE || !1, Ve = e.FORCE_BODY || !1, We = e.SANITIZE_DOM !== !1, Ge = e.SANITIZE_NAMED_PROPS || !1, qe = e.KEEP_CONTENT !== !1, Je = e.IN_PLACE || !1, b = pa(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Aa, k = typeof e.NAMESPACE == "string" ? e.NAMESPACE : O, st = Ka(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, ot)), lt = Ka(e, "HTML_INTEGRATION_POINTS", () => X({}, ct));
|
|
2838
|
+
let t = Ka(e, "CUSTOM_ELEMENT_HANDLING", () => Hi(null));
|
|
2839
|
+
if (C = Hi(null), q(t, "tagNameCheck") && ht(t.tagNameCheck) && (C.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && ht(t.attributeNameCheck) && (C.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(C), E && (Ne = !1), Ue && (He = !0), Ye && (x = X({}, ba), S = Hi(null), Ye.html === !0 && (X(x, ma), X(S, xa)), Ye.svg === !0 && (X(x, ha), X(S, Sa), X(S, wa)), Ye.svgFilters === !0 && (X(x, ga), X(S, Sa), X(S, wa)), Ye.mathMl === !0 && (X(x, va), X(S, Ca), X(S, wa))), w.tagCheck = null, w.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? w.tagCheck = e.ADD_TAGS : Zi(e.ADD_TAGS) && (x === ke && (x = Z(x)), X(x, e.ADD_TAGS, j))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? w.attributeCheck = e.ADD_ATTR : Zi(e.ADD_ATTR) && (S === Ae && (S = Z(S)), X(S, e.ADD_ATTR, j))), q(e, "ADD_FORBID_CONTENTS") && Zi(e.ADD_FORBID_CONTENTS) && (Xe === Ze && (Xe = Z(Xe)), X(Xe, e.ADD_FORBID_CONTENTS, j)), qe && (x["#text"] = !0), Le && X(x, [
|
|
2839
2840
|
"html",
|
|
2840
2841
|
"head",
|
|
2841
2842
|
"body"
|
|
2842
|
-
]),
|
|
2843
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
2844
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
2845
|
-
let t =
|
|
2846
|
-
|
|
2843
|
+
]), x.table && (X(x, ["tbody"]), delete je.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
2844
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw la("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
2845
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw la("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
2846
|
+
let t = h;
|
|
2847
|
+
h = e.TRUSTED_TYPES_POLICY;
|
|
2847
2848
|
try {
|
|
2848
|
-
|
|
2849
|
+
g = pe("");
|
|
2849
2850
|
} catch (e) {
|
|
2850
|
-
throw
|
|
2851
|
+
throw h = t, e;
|
|
2851
2852
|
}
|
|
2852
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
2853
|
-
G && G(e),
|
|
2854
|
-
},
|
|
2855
|
-
...ma,
|
|
2853
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (h = void 0, g = "") : (h === void 0 && (h = he()), h && typeof g == "string" && (g = pe("")));
|
|
2854
|
+
G && G(e), pt = e;
|
|
2855
|
+
}, _t = X({}, [
|
|
2856
2856
|
...ha,
|
|
2857
|
-
...ga
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2857
|
+
...ga,
|
|
2858
|
+
..._a
|
|
2859
|
+
]), vt = X({}, [...va, ...ya]), yt = function(e, t, n) {
|
|
2860
|
+
return t.namespaceURI === O ? e === "svg" : t.namespaceURI === nt ? e === "svg" && (n === "annotation-xml" || st[n]) : !!_t[e];
|
|
2861
|
+
}, bt = function(e, t, n) {
|
|
2862
|
+
return t.namespaceURI === O ? e === "math" : t.namespaceURI === rt ? e === "math" && lt[n] : !!vt[e];
|
|
2862
2863
|
}, M = function(e, t, n) {
|
|
2863
|
-
return t.namespaceURI ===
|
|
2864
|
-
},
|
|
2864
|
+
return t.namespaceURI === rt && !lt[n] || t.namespaceURI === nt && !st[n] ? !1 : !vt[e] && (ut[e] || !_t[e]);
|
|
2865
|
+
}, N = function(e) {
|
|
2865
2866
|
let t = re(e);
|
|
2866
2867
|
(!t || !t.tagName) && (t = {
|
|
2867
|
-
namespaceURI:
|
|
2868
|
+
namespaceURI: k,
|
|
2868
2869
|
tagName: "template"
|
|
2869
2870
|
});
|
|
2870
|
-
let n =
|
|
2871
|
-
return
|
|
2872
|
-
},
|
|
2873
|
-
|
|
2871
|
+
let n = Qi(e.tagName), r = Qi(t.tagName);
|
|
2872
|
+
return A[e.namespaceURI] ? e.namespaceURI === rt ? yt(n, t, r) : e.namespaceURI === nt ? bt(n, t, r) : e.namespaceURI === O ? M(n, t, r) : !!(dt === "application/xhtml+xml" && A[e.namespaceURI]) : !1;
|
|
2873
|
+
}, xt = function(e) {
|
|
2874
|
+
Yi(t.removed, { element: e });
|
|
2874
2875
|
try {
|
|
2875
2876
|
re(e).removeChild(e);
|
|
2876
2877
|
} catch {
|
|
2877
|
-
if (p(e), !re(e)) throw
|
|
2878
|
+
if (p(e), !re(e)) throw la("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
2878
2879
|
}
|
|
2879
|
-
},
|
|
2880
|
+
}, St = function(e, t, n) {
|
|
2880
2881
|
try {
|
|
2881
2882
|
ee(e, t);
|
|
2882
2883
|
} catch {
|
|
@@ -2884,14 +2885,14 @@ function Ka() {
|
|
|
2884
2885
|
e.removeAttribute(n);
|
|
2885
2886
|
} catch {}
|
|
2886
2887
|
}
|
|
2887
|
-
},
|
|
2888
|
-
|
|
2888
|
+
}, P = function(e) {
|
|
2889
|
+
Tt(e);
|
|
2889
2890
|
let t = ne(e);
|
|
2890
2891
|
if (t) {
|
|
2891
2892
|
let e = [];
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
}),
|
|
2893
|
+
Ki(t, (t) => {
|
|
2894
|
+
Yi(e, t);
|
|
2895
|
+
}), Ki(e, (e) => {
|
|
2895
2896
|
try {
|
|
2896
2897
|
p(e);
|
|
2897
2898
|
} catch {}
|
|
@@ -2900,15 +2901,15 @@ function Ka() {
|
|
|
2900
2901
|
let n = ae(e);
|
|
2901
2902
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
2902
2903
|
let r = n[t], i = r && r.name;
|
|
2903
|
-
typeof i == "string" &&
|
|
2904
|
+
typeof i == "string" && St(e, r, i);
|
|
2904
2905
|
}
|
|
2905
|
-
},
|
|
2906
|
+
}, Ct = function(e, n, r) {
|
|
2906
2907
|
if (!r) try {
|
|
2907
2908
|
r = n.getAttributeNode(e);
|
|
2908
2909
|
} catch {
|
|
2909
2910
|
r = null;
|
|
2910
2911
|
}
|
|
2911
|
-
|
|
2912
|
+
Yi(t.removed, {
|
|
2912
2913
|
attribute: r || null,
|
|
2913
2914
|
from: n
|
|
2914
2915
|
});
|
|
@@ -2920,112 +2921,112 @@ function Ka() {
|
|
|
2920
2921
|
} catch {}
|
|
2921
2922
|
}
|
|
2922
2923
|
if (e === "is") {
|
|
2923
|
-
if (
|
|
2924
|
-
|
|
2924
|
+
if (He || Ue) try {
|
|
2925
|
+
xt(n);
|
|
2925
2926
|
} catch {}
|
|
2926
2927
|
else try {
|
|
2927
2928
|
n.setAttribute(e, "");
|
|
2928
2929
|
} catch {}
|
|
2929
2930
|
}
|
|
2930
|
-
},
|
|
2931
|
+
}, wt = function(e) {
|
|
2931
2932
|
let t = ae(e);
|
|
2932
2933
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
2933
2934
|
let r = t[n], i = r && r.name;
|
|
2934
|
-
typeof i != "string" ||
|
|
2935
|
+
typeof i != "string" || S[j(i)] || St(e, r, i);
|
|
2935
2936
|
}
|
|
2936
|
-
},
|
|
2937
|
+
}, Tt = function(e) {
|
|
2937
2938
|
let t = [e];
|
|
2938
2939
|
for (; t.length > 0;) {
|
|
2939
2940
|
let e = t.pop();
|
|
2940
|
-
ce(e) === $.element &&
|
|
2941
|
+
ce(e) === $.element && wt(e);
|
|
2941
2942
|
let n = ne(e);
|
|
2942
2943
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
2943
2944
|
}
|
|
2944
|
-
},
|
|
2945
|
-
return
|
|
2946
|
-
},
|
|
2947
|
-
if (!
|
|
2945
|
+
}, Et = function(e, t) {
|
|
2946
|
+
return Ie ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
|
|
2947
|
+
}, Dt = function(e) {
|
|
2948
|
+
if (!Ie) return;
|
|
2948
2949
|
let t = [e];
|
|
2949
2950
|
for (; t.length > 0;) {
|
|
2950
2951
|
let e = t.pop(), n = ce(e);
|
|
2951
|
-
if (n === $.processingInstruction || n === $.comment && J(
|
|
2952
|
+
if (n === $.processingInstruction || n === $.comment && J(Ia, e.data)) {
|
|
2952
2953
|
try {
|
|
2953
2954
|
p(e);
|
|
2954
2955
|
} catch {}
|
|
2955
2956
|
continue;
|
|
2956
2957
|
}
|
|
2957
2958
|
if (n === $.element) {
|
|
2958
|
-
let t = e, n =
|
|
2959
|
+
let t = e, n = j(le(e));
|
|
2959
2960
|
try {
|
|
2960
|
-
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") &&
|
|
2961
|
+
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Et("for", n) && t.removeAttribute("for");
|
|
2961
2962
|
} catch {}
|
|
2962
2963
|
}
|
|
2963
2964
|
let r = ne(e);
|
|
2964
2965
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
2965
2966
|
}
|
|
2966
|
-
},
|
|
2967
|
+
}, Ot = function(e) {
|
|
2967
2968
|
let t = null, r = null;
|
|
2968
|
-
if (
|
|
2969
|
+
if (Ve) e = "<remove></remove>" + e;
|
|
2969
2970
|
else {
|
|
2970
|
-
let t =
|
|
2971
|
+
let t = ea(e, /^[\r\n\t ]+/);
|
|
2971
2972
|
r = t && t[0];
|
|
2972
2973
|
}
|
|
2973
|
-
|
|
2974
|
-
let i =
|
|
2975
|
-
if (
|
|
2976
|
-
t = new l().parseFromString(i,
|
|
2974
|
+
dt === "application/xhtml+xml" && k === O && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
2975
|
+
let i = h ? pe(e) : e;
|
|
2976
|
+
if (k === O) try {
|
|
2977
|
+
t = new l().parseFromString(i, dt);
|
|
2977
2978
|
} catch {}
|
|
2978
2979
|
if (!t || !t.documentElement) {
|
|
2979
|
-
t =
|
|
2980
|
+
t = v.createDocument(k, "template", null);
|
|
2980
2981
|
try {
|
|
2981
|
-
t.documentElement.innerHTML =
|
|
2982
|
+
t.documentElement.innerHTML = it ? g : i;
|
|
2982
2983
|
} catch {}
|
|
2983
2984
|
}
|
|
2984
2985
|
let a = t.body || t.documentElement;
|
|
2985
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
2986
|
-
},
|
|
2986
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), k === O ? ye.call(t, Le ? "html" : "body")[0] : Le ? t.documentElement : a;
|
|
2987
|
+
}, kt = function(e) {
|
|
2987
2988
|
let t = se ? se(e) : e.ownerDocument;
|
|
2988
2989
|
return _e.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
2989
|
-
},
|
|
2990
|
-
return e =
|
|
2991
|
-
},
|
|
2990
|
+
}, At = function(e) {
|
|
2991
|
+
return e = ta(e, xe, " "), e = ta(e, Se, " "), e = ta(e, Ce, " "), e;
|
|
2992
|
+
}, F = function(e) {
|
|
2992
2993
|
e.normalize();
|
|
2993
2994
|
let t = se ? se(e) : e.ownerDocument, n = _e.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
2994
|
-
for (; r;) r.data =
|
|
2995
|
+
for (; r;) r.data = At(r.data), r = n.nextNode();
|
|
2995
2996
|
let i = e.querySelectorAll?.call(e, "template");
|
|
2996
|
-
i &&
|
|
2997
|
-
|
|
2997
|
+
i && Ki(i, (e) => {
|
|
2998
|
+
Mt(e.content) && F(e.content);
|
|
2998
2999
|
});
|
|
3000
|
+
}, jt = function(e) {
|
|
3001
|
+
let t = m ? m(e) : null;
|
|
3002
|
+
return typeof t != "string" || j(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ae(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== oe(e) || e.childNodes !== ne(e);
|
|
2999
3003
|
}, Mt = function(e) {
|
|
3000
|
-
|
|
3001
|
-
return typeof t != "string" || A(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ae(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== m(e) || e.childNodes !== ne(e);
|
|
3002
|
-
}, Nt = function(e) {
|
|
3003
|
-
if (!m || typeof e != "object" || !e) return !1;
|
|
3004
|
+
if (!oe || typeof e != "object" || !e) return !1;
|
|
3004
3005
|
try {
|
|
3005
|
-
return
|
|
3006
|
+
return oe(e) === $.documentFragment;
|
|
3006
3007
|
} catch {
|
|
3007
3008
|
return !1;
|
|
3008
3009
|
}
|
|
3009
|
-
},
|
|
3010
|
-
if (!
|
|
3010
|
+
}, Nt = function(e) {
|
|
3011
|
+
if (!oe || typeof e != "object" || !e) return !1;
|
|
3011
3012
|
try {
|
|
3012
|
-
return typeof
|
|
3013
|
+
return typeof oe(e) == "number";
|
|
3013
3014
|
} catch {
|
|
3014
3015
|
return !1;
|
|
3015
3016
|
}
|
|
3016
3017
|
};
|
|
3017
3018
|
function I(e, n, r) {
|
|
3018
|
-
e.length !== 0 &&
|
|
3019
|
-
e.call(t, n, r,
|
|
3019
|
+
e.length !== 0 && Ki(e, (e) => {
|
|
3020
|
+
e.call(t, n, r, pt);
|
|
3020
3021
|
});
|
|
3021
3022
|
}
|
|
3022
3023
|
let Pt = function(e, t) {
|
|
3023
|
-
return !!(
|
|
3024
|
+
return !!(Ie && e.hasChildNodes() && !Nt(e.firstElementChild) && J(Fa, e.textContent) && J(Fa, e.innerHTML) || Ie && e.namespaceURI === O && Ba[t] && (Nt(e.firstElementChild) || typeof e.textContent == "string" && J(Va[t], e.textContent)) || e.nodeType === $.processingInstruction || Ie && e.nodeType === $.comment && J(Ia, e.data));
|
|
3024
3025
|
}, Ft = function(e, t) {
|
|
3025
3026
|
return e instanceof RegExp ? J(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
3026
3027
|
}, It = function(e, t, n) {
|
|
3027
|
-
if (!
|
|
3028
|
-
if (
|
|
3028
|
+
if (!je[t] && Ht(t) && Ft(C.tagNameCheck, t)) return !1;
|
|
3029
|
+
if (qe && !Xe[t]) {
|
|
3029
3030
|
let t = re(e), r = ne(e);
|
|
3030
3031
|
if (r && t) {
|
|
3031
3032
|
let i = r.length;
|
|
@@ -3035,35 +3036,35 @@ function Ka() {
|
|
|
3035
3036
|
}
|
|
3036
3037
|
}
|
|
3037
3038
|
}
|
|
3038
|
-
return
|
|
3039
|
+
return xt(e), !0;
|
|
3039
3040
|
}, Lt = function(e, t, n, r) {
|
|
3040
3041
|
return e.length === 0 ? t : t === n || t === r ? Z(t) : t;
|
|
3041
|
-
},
|
|
3042
|
-
return e === t || re(e) !== null ? !1 : (
|
|
3043
|
-
},
|
|
3044
|
-
if (I(y.beforeSanitizeElements, e, null),
|
|
3045
|
-
if (
|
|
3046
|
-
let r =
|
|
3047
|
-
if (
|
|
3042
|
+
}, Rt = function(e, t) {
|
|
3043
|
+
return e === t || re(e) !== null ? !1 : (Je && Tt(e), !0);
|
|
3044
|
+
}, zt = function(e, n) {
|
|
3045
|
+
if (I(y.beforeSanitizeElements, e, null), Rt(e, n)) return !0;
|
|
3046
|
+
if (jt(e)) return xt(e), !0;
|
|
3047
|
+
let r = j(le(e));
|
|
3048
|
+
if (x = Lt(y.uponSanitizeElement, x, ke, ze), I(y.uponSanitizeElement, e, {
|
|
3048
3049
|
tagName: r,
|
|
3049
|
-
allowedTags:
|
|
3050
|
-
}),
|
|
3051
|
-
if (Pt(e, r)) return
|
|
3052
|
-
if (
|
|
3050
|
+
allowedTags: x
|
|
3051
|
+
}), Rt(e, n)) return !0;
|
|
3052
|
+
if (Pt(e, r)) return xt(e), !0;
|
|
3053
|
+
if (je[r] || !(w.tagCheck instanceof Function && w.tagCheck(r)) && !x[r]) {
|
|
3053
3054
|
let t = It(e, r, n);
|
|
3054
|
-
return t === !1 && (I(y.afterSanitizeElements, e, null),
|
|
3055
|
-
}
|
|
3056
|
-
if (ce(e) === $.element && !
|
|
3057
|
-
if (
|
|
3058
|
-
let n =
|
|
3059
|
-
e.textContent !== n && (
|
|
3060
|
-
}
|
|
3061
|
-
return I(y.afterSanitizeElements, e, null),
|
|
3062
|
-
},
|
|
3063
|
-
if (
|
|
3064
|
-
let i =
|
|
3065
|
-
return
|
|
3066
|
-
},
|
|
3055
|
+
return t === !1 && (I(y.afterSanitizeElements, e, null), Rt(e, n)) ? !0 : t;
|
|
3056
|
+
}
|
|
3057
|
+
if (ce(e) === $.element && !N(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(La, e.innerHTML)) return xt(e), !0;
|
|
3058
|
+
if (E && e.nodeType === $.text) {
|
|
3059
|
+
let n = At(e.textContent);
|
|
3060
|
+
e.textContent !== n && (Yi(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
3061
|
+
}
|
|
3062
|
+
return I(y.afterSanitizeElements, e, null), Rt(e, n);
|
|
3063
|
+
}, Bt = function(e, t, r) {
|
|
3064
|
+
if (Me[t] || Et(t, e) || We && (t === "id" || t === "name") && (r in n || r in mt)) return !1;
|
|
3065
|
+
let i = S[t] || w.attributeCheck instanceof Function && w.attributeCheck(t, e);
|
|
3066
|
+
return Ne && J(we, t) || T && J(Te, t) ? !0 : i ? et[t] || J(b, ta(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && na(r, "data:") === 0 && Qe[e] || Pe && !J(Ee, ta(r, De, "")) ? !0 : !r : Ht(e) && Ft(C.tagNameCheck, e) && Ft(C.attributeNameCheck, t, e) || t === "is" && C.allowCustomizedBuiltInElements && Ft(C.tagNameCheck, r);
|
|
3067
|
+
}, Vt = X({}, [
|
|
3067
3068
|
"annotation-xml",
|
|
3068
3069
|
"color-profile",
|
|
3069
3070
|
"font-face",
|
|
@@ -3072,45 +3073,45 @@ function Ka() {
|
|
|
3072
3073
|
"font-face-src",
|
|
3073
3074
|
"font-face-uri",
|
|
3074
3075
|
"missing-glyph"
|
|
3075
|
-
]),
|
|
3076
|
-
return !
|
|
3077
|
-
},
|
|
3078
|
-
if (
|
|
3076
|
+
]), Ht = function(e) {
|
|
3077
|
+
return !Vt[Qi(e)] && J(Oe, e);
|
|
3078
|
+
}, Ut = function(e, t, n, r) {
|
|
3079
|
+
if (h && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
3079
3080
|
case "TrustedHTML": return pe(r);
|
|
3080
3081
|
case "TrustedScriptURL": return me(r);
|
|
3081
3082
|
}
|
|
3082
3083
|
return r;
|
|
3083
|
-
},
|
|
3084
|
+
}, Wt = function(e, t, n, r) {
|
|
3084
3085
|
try {
|
|
3085
|
-
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !
|
|
3086
|
+
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !jt(e) || (xt(e), !1);
|
|
3086
3087
|
} catch {
|
|
3087
|
-
return
|
|
3088
|
+
return Ct(t, e), !1;
|
|
3088
3089
|
}
|
|
3089
|
-
},
|
|
3090
|
-
if (I(y.beforeSanitizeAttributes, e, null),
|
|
3090
|
+
}, Gt = function(e, n) {
|
|
3091
|
+
if (I(y.beforeSanitizeAttributes, e, null), Rt(e, n)) return;
|
|
3091
3092
|
let r = e.attributes;
|
|
3092
|
-
if (!r ||
|
|
3093
|
-
|
|
3093
|
+
if (!r || jt(e)) return;
|
|
3094
|
+
S = Lt(y.uponSanitizeAttribute, S, Ae, Be);
|
|
3094
3095
|
let i = {
|
|
3095
3096
|
attrName: "",
|
|
3096
3097
|
attrValue: "",
|
|
3097
3098
|
keepAttr: !0,
|
|
3098
|
-
allowedAttributes:
|
|
3099
|
+
allowedAttributes: S,
|
|
3099
3100
|
forceKeepAttr: void 0
|
|
3100
|
-
}, a = r.length, o =
|
|
3101
|
+
}, a = r.length, o = j(e.nodeName);
|
|
3101
3102
|
for (; a--;) {
|
|
3102
|
-
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u =
|
|
3103
|
-
i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(y.uponSanitizeAttribute, e, i), f = i.attrValue,
|
|
3103
|
+
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = j(s), d = l, f = s === "value" ? d : ra(d), p = !1;
|
|
3104
|
+
i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(y.uponSanitizeAttribute, e, i), f = i.attrValue, Ge && (u === "id" || u === "name") && na(f, Ke) !== 0 && (Ct(s, e, n), f = Ke + f, p = !0), Ie && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f) || u === "attributename" && ea(f, "href") ? Ct(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Fe && J(Ra, f) ? Ct(s, e, n) : (E && (f = At(f)), Bt(o, u, f) ? (f = Ut(o, u, c, f), f !== d && Wt(e, s, c, f) && p && Ji(t.removed)) : Ct(s, e, n)) : Ct(s, e, n));
|
|
3104
3105
|
}
|
|
3105
|
-
I(y.afterSanitizeAttributes, e, null),
|
|
3106
|
-
},
|
|
3107
|
-
let t = null, n =
|
|
3108
|
-
for (I(y.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(y.uponSanitizeShadowNode, t, null),
|
|
3106
|
+
I(y.afterSanitizeAttributes, e, null), Rt(e, n);
|
|
3107
|
+
}, Kt = function(e) {
|
|
3108
|
+
let t = null, n = kt(e);
|
|
3109
|
+
for (I(y.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(y.uponSanitizeShadowNode, t, null), zt(t, e), Gt(t, e), Mt(t.content) && Kt(t.content), ce(t) === $.element) {
|
|
3109
3110
|
let e = ie(t);
|
|
3110
|
-
|
|
3111
|
+
Mt(e) && (qt(e), Kt(e));
|
|
3111
3112
|
}
|
|
3112
3113
|
I(y.afterSanitizeShadowDOM, e, null);
|
|
3113
|
-
},
|
|
3114
|
+
}, qt = function(e) {
|
|
3114
3115
|
let t = [{
|
|
3115
3116
|
node: e,
|
|
3116
3117
|
shadow: null
|
|
@@ -3118,7 +3119,7 @@ function Ka() {
|
|
|
3118
3119
|
for (; t.length > 0;) {
|
|
3119
3120
|
let e = t.pop();
|
|
3120
3121
|
if (e.shadow) {
|
|
3121
|
-
|
|
3122
|
+
Kt(e.shadow);
|
|
3122
3123
|
continue;
|
|
3123
3124
|
}
|
|
3124
3125
|
let n = e.node, r = ce(n) === $.element, i = ne(n);
|
|
@@ -3127,10 +3128,10 @@ function Ka() {
|
|
|
3127
3128
|
shadow: null
|
|
3128
3129
|
});
|
|
3129
3130
|
if (r) {
|
|
3130
|
-
let e =
|
|
3131
|
-
if (typeof e == "string" &&
|
|
3131
|
+
let e = m ? m(n) : null;
|
|
3132
|
+
if (typeof e == "string" && j(e) === "template") {
|
|
3132
3133
|
let e = n.content;
|
|
3133
|
-
|
|
3134
|
+
Mt(e) && t.push({
|
|
3134
3135
|
node: e,
|
|
3135
3136
|
shadow: null
|
|
3136
3137
|
});
|
|
@@ -3138,7 +3139,7 @@ function Ka() {
|
|
|
3138
3139
|
}
|
|
3139
3140
|
if (r) {
|
|
3140
3141
|
let e = ie(n);
|
|
3141
|
-
|
|
3142
|
+
Mt(e) && t.push({
|
|
3142
3143
|
node: null,
|
|
3143
3144
|
shadow: e
|
|
3144
3145
|
}, {
|
|
@@ -3150,99 +3151,130 @@ function Ka() {
|
|
|
3150
3151
|
};
|
|
3151
3152
|
return t.sanitize = function(e) {
|
|
3152
3153
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
3153
|
-
if (
|
|
3154
|
+
if (it = !e, it && (e = "<!-->"), typeof e != "string" && !Nt(e) && (e = fa(e), typeof e != "string")) throw la("dirty is not a string, aborting");
|
|
3154
3155
|
if (!t.isSupported) return e;
|
|
3155
|
-
|
|
3156
|
-
let c =
|
|
3156
|
+
Re ? (x = ze, S = Be) : gt(n), (y.uponSanitizeElement.length > 0 || y.uponSanitizeAttribute.length > 0) && (x = Z(x)), y.uponSanitizeAttribute.length > 0 && (S = Z(S)), t.removed = [];
|
|
3157
|
+
let c = Je && typeof e != "string" && Nt(e);
|
|
3157
3158
|
if (c) {
|
|
3158
|
-
|
|
3159
|
-
let t =
|
|
3159
|
+
Dt(e);
|
|
3160
|
+
let t = le(e);
|
|
3160
3161
|
if (typeof t == "string") {
|
|
3161
|
-
let n =
|
|
3162
|
-
if (!
|
|
3162
|
+
let n = j(t);
|
|
3163
|
+
if (!x[n] || je[n]) throw P(e), la("root node is forbidden and cannot be sanitized in-place");
|
|
3163
3164
|
}
|
|
3164
|
-
if (
|
|
3165
|
+
if (jt(e)) throw P(e), la("root node is clobbered and cannot be sanitized in-place");
|
|
3165
3166
|
try {
|
|
3166
|
-
|
|
3167
|
+
qt(e);
|
|
3167
3168
|
} catch (t) {
|
|
3168
|
-
throw
|
|
3169
|
+
throw P(e), t;
|
|
3169
3170
|
}
|
|
3170
|
-
} else if (
|
|
3171
|
+
} else if (Nt(e)) i = Ot("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), qt(i);
|
|
3171
3172
|
else {
|
|
3172
|
-
if (!
|
|
3173
|
-
if (i =
|
|
3173
|
+
if (!He && !E && !Le && e.indexOf("<") === -1) return h && D ? pe(e) : e;
|
|
3174
|
+
if (i = Ot(e), !i) return He ? null : D ? g : "";
|
|
3174
3175
|
}
|
|
3175
|
-
i &&
|
|
3176
|
+
i && Ve && xt(i.firstChild);
|
|
3176
3177
|
let l = c ? e : i;
|
|
3177
3178
|
try {
|
|
3178
|
-
let e =
|
|
3179
|
-
for (; o = e.nextNode();)
|
|
3179
|
+
let e = kt(l);
|
|
3180
|
+
for (; o = e.nextNode();) zt(o, l), Gt(o, l), Mt(o.content) && Kt(o.content);
|
|
3180
3181
|
} catch (n) {
|
|
3181
|
-
throw c && (
|
|
3182
|
-
e.element &&
|
|
3182
|
+
throw c && (P(e), Ki(t.removed, (e) => {
|
|
3183
|
+
e.element && Tt(e.element);
|
|
3183
3184
|
})), n;
|
|
3184
3185
|
}
|
|
3185
3186
|
if (c) {
|
|
3186
3187
|
let n = !1;
|
|
3187
|
-
if (
|
|
3188
|
-
t.element && (t.element === e && (n = !0),
|
|
3189
|
-
}), n) throw
|
|
3190
|
-
return
|
|
3188
|
+
if (Ki(t.removed, (t) => {
|
|
3189
|
+
t.element && (t.element === e && (n = !0), Tt(t.element));
|
|
3190
|
+
}), n) throw la("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
3191
|
+
return E && F(e), e;
|
|
3191
3192
|
}
|
|
3192
|
-
if (
|
|
3193
|
-
if (
|
|
3193
|
+
if (He) {
|
|
3194
|
+
if (E && F(i), Ue) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
3194
3195
|
else s = i;
|
|
3195
|
-
return (
|
|
3196
|
+
return (S.shadowroot || S.shadowrootmode) && (s = be.call(r, s, !0)), s;
|
|
3196
3197
|
}
|
|
3197
|
-
let u =
|
|
3198
|
-
return
|
|
3198
|
+
let u = Le ? i.outerHTML : i.innerHTML;
|
|
3199
|
+
return Le && x["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Na, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), E && (u = At(u)), h && D ? pe(u) : u;
|
|
3199
3200
|
}, t.setConfig = function() {
|
|
3200
3201
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3201
|
-
|
|
3202
|
+
gt(e), Re = !0, ze = x, Be = S;
|
|
3202
3203
|
}, t.clearConfig = function() {
|
|
3203
|
-
|
|
3204
|
+
pt = null, Re = !1, ze = null, Be = null, h = ue, g = "";
|
|
3204
3205
|
}, t.isValidAttribute = function(e, t, n) {
|
|
3205
|
-
|
|
3206
|
-
let r =
|
|
3207
|
-
return
|
|
3206
|
+
pt || gt({});
|
|
3207
|
+
let r = j(e), i = j(t);
|
|
3208
|
+
return Bt(r, i, n);
|
|
3208
3209
|
}, t.addHook = function(e, t) {
|
|
3209
|
-
typeof t == "function" && q(y, e) &&
|
|
3210
|
+
typeof t == "function" && q(y, e) && Yi(y[e], t);
|
|
3210
3211
|
}, t.removeHook = function(e, t) {
|
|
3211
3212
|
if (q(y, e)) {
|
|
3212
3213
|
if (t !== void 0) {
|
|
3213
|
-
let n =
|
|
3214
|
-
return n === -1 ? void 0 :
|
|
3214
|
+
let n = qi(y[e], t);
|
|
3215
|
+
return n === -1 ? void 0 : Xi(y[e], n, 1)[0];
|
|
3215
3216
|
}
|
|
3216
|
-
return
|
|
3217
|
+
return Ji(y[e]);
|
|
3217
3218
|
}
|
|
3218
3219
|
}, t.removeHooks = function(e) {
|
|
3219
3220
|
q(y, e) && (y[e] = []);
|
|
3220
3221
|
}, t.removeAllHooks = function() {
|
|
3221
|
-
y =
|
|
3222
|
+
y = Wa();
|
|
3222
3223
|
}, t;
|
|
3223
3224
|
}
|
|
3224
|
-
var
|
|
3225
|
+
var Ja = qa();
|
|
3225
3226
|
//#endregion
|
|
3226
3227
|
//#region ../../packages/components/src/chat/markdownHtml.ts
|
|
3227
|
-
function
|
|
3228
|
+
function Ya(e) {
|
|
3228
3229
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
3229
3230
|
}
|
|
3230
|
-
function
|
|
3231
|
+
function Xa(e, t) {
|
|
3231
3232
|
return `<span class="katex-pending" data-katex="${encodeURIComponent(e)}" data-display="${t}"></span>`;
|
|
3232
3233
|
}
|
|
3233
|
-
var
|
|
3234
|
+
var Za = {
|
|
3234
3235
|
ADD_ATTR: ["target"],
|
|
3235
3236
|
ALLOW_UNKNOWN_PROTOCOLS: !0,
|
|
3236
|
-
FORBID_TAGS: [
|
|
3237
|
-
|
|
3237
|
+
FORBID_TAGS: [
|
|
3238
|
+
"style",
|
|
3239
|
+
"form",
|
|
3240
|
+
"audio",
|
|
3241
|
+
"video",
|
|
3242
|
+
"source",
|
|
3243
|
+
"picture",
|
|
3244
|
+
"track",
|
|
3245
|
+
"image",
|
|
3246
|
+
"feImage"
|
|
3247
|
+
],
|
|
3248
|
+
FORBID_ATTR: [
|
|
3249
|
+
"style",
|
|
3250
|
+
"srcset",
|
|
3251
|
+
"poster",
|
|
3252
|
+
"background"
|
|
3253
|
+
]
|
|
3238
3254
|
};
|
|
3239
|
-
|
|
3240
|
-
|
|
3255
|
+
Ja.addHook("uponSanitizeAttribute", (e, t) => {
|
|
3256
|
+
t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1);
|
|
3257
|
+
});
|
|
3258
|
+
var Qa = "data-held-src";
|
|
3259
|
+
function $a(e, t) {
|
|
3260
|
+
if (!t) return Ja.sanitize(e, Za);
|
|
3261
|
+
let n = Ja.sanitize(e, {
|
|
3262
|
+
...Za,
|
|
3263
|
+
RETURN_DOM_FRAGMENT: !0
|
|
3264
|
+
});
|
|
3265
|
+
for (let e of Array.from(n.querySelectorAll("img"))) {
|
|
3266
|
+
let n = e.getAttribute("src") ?? "";
|
|
3267
|
+
if (t.canLoad(n)) continue;
|
|
3268
|
+
let r = e.ownerDocument.createElement("button");
|
|
3269
|
+
r.type = "button", r.className = "markdown-held-image", r.setAttribute(Qa, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
|
|
3270
|
+
}
|
|
3271
|
+
let r = n.ownerDocument.createElement("div");
|
|
3272
|
+
return r.append(n), r.innerHTML;
|
|
3241
3273
|
}
|
|
3242
3274
|
//#endregion
|
|
3243
3275
|
//#region ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
|
|
3244
3276
|
a(), l();
|
|
3245
|
-
var
|
|
3277
|
+
var eo = ["innerHTML"], to = 100, no = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
3246
3278
|
__name: "PkStreamingMarkdown",
|
|
3247
3279
|
props: {
|
|
3248
3280
|
markdown: {
|
|
@@ -3276,10 +3308,10 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3276
3308
|
return te ||= import("./dist-BK6ru3gS.js"), te;
|
|
3277
3309
|
}
|
|
3278
3310
|
let m = null;
|
|
3279
|
-
function
|
|
3311
|
+
function se() {
|
|
3280
3312
|
return m ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), m;
|
|
3281
3313
|
}
|
|
3282
|
-
let
|
|
3314
|
+
let ce = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, h = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
|
|
3283
3315
|
W.use({ extensions: [{
|
|
3284
3316
|
name: "inlineKatex",
|
|
3285
3317
|
level: "inline",
|
|
@@ -3288,7 +3320,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3288
3320
|
if (t !== -1 && (t === 0 || e.charAt(t - 1) === " ")) return t;
|
|
3289
3321
|
},
|
|
3290
3322
|
tokenizer(e) {
|
|
3291
|
-
let t = e.match(
|
|
3323
|
+
let t = e.match(ce);
|
|
3292
3324
|
if (t) return {
|
|
3293
3325
|
type: "inlineKatex",
|
|
3294
3326
|
raw: t[0],
|
|
@@ -3297,7 +3329,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3297
3329
|
};
|
|
3298
3330
|
},
|
|
3299
3331
|
renderer(e) {
|
|
3300
|
-
return
|
|
3332
|
+
return Xa(e.text, e.displayMode);
|
|
3301
3333
|
}
|
|
3302
3334
|
}, {
|
|
3303
3335
|
name: "blockKatex",
|
|
@@ -3312,7 +3344,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3312
3344
|
};
|
|
3313
3345
|
},
|
|
3314
3346
|
renderer(e) {
|
|
3315
|
-
return
|
|
3347
|
+
return Xa(e.text, e.displayMode) + "\n";
|
|
3316
3348
|
}
|
|
3317
3349
|
}] }), W.use({ extensions: [{
|
|
3318
3350
|
name: "thinking",
|
|
@@ -3333,30 +3365,30 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3333
3365
|
return `<div class="thinking-block">${this.parser.parse(e.tokens ?? [])}</div>`;
|
|
3334
3366
|
}
|
|
3335
3367
|
}] });
|
|
3336
|
-
let g = new W.Renderer(),
|
|
3368
|
+
let g = new W.Renderer(), ue = (e) => e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">"), de = /^(?:javascript|data|vbscript|file):/i, _ = !1, fe = (e) => ue(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
|
|
3337
3369
|
g.link = function({ href: e, title: t, text: n, tokens: r }) {
|
|
3338
3370
|
let i = this.parser.parseInline(r), a = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
|
|
3339
|
-
if (!a ||
|
|
3340
|
-
let o =
|
|
3341
|
-
return `<a href="${
|
|
3371
|
+
if (!a || de.test(a)) return i;
|
|
3372
|
+
let o = _ && n === a, s = t || (o ? a : ""), c = s ? ` title="${ue(s)}"` : "", l = ne(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
|
|
3373
|
+
return `<a href="${ue(a)}"${c}${l}>${o ? fe(a) : i}</a>`;
|
|
3342
3374
|
}, g.table = function(e) {
|
|
3343
|
-
|
|
3375
|
+
_ = !0;
|
|
3344
3376
|
try {
|
|
3345
|
-
let t = e.header.map((e) =>
|
|
3377
|
+
let t = e.header.map((e) => ue(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
|
|
3346
3378
|
let r = this.parser.parseInline(e.tokens), i = e.align ? ` align="${e.align}"` : "";
|
|
3347
3379
|
return e.header ? `<th role="columnheader"${i}>${r}</th>` : `<td role="cell" data-label="${t[n] ?? ""}"${i}><span>${r}</span></td>`;
|
|
3348
3380
|
}).join("")}</tr>`, r = e.rows.length ? `<tbody role="rowgroup">${e.rows.map(n).join("")}</tbody>` : "";
|
|
3349
3381
|
return `<div class="table-wrapper u-table-scroll"><table class="${e.header.length >= 3 && e.rows.length ? "u-table u-table--stack" : "u-table"}" role="table"><thead role="rowgroup">${n(e.header)}</thead>${r}</table></div>\n`;
|
|
3350
3382
|
} finally {
|
|
3351
|
-
|
|
3383
|
+
_ = !1;
|
|
3352
3384
|
}
|
|
3353
3385
|
};
|
|
3354
|
-
let
|
|
3355
|
-
g.code = ({ text: e }) =>
|
|
3356
|
-
function
|
|
3386
|
+
let pe = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
|
|
3387
|
+
g.code = ({ text: e }) => pe.test(e) ? `<pre class="mermaid">${Ya(e)}</pre>` : `<pre><code>${Ya(e)}</code></pre>`;
|
|
3388
|
+
function me(e) {
|
|
3357
3389
|
return e.replace(/\\\[([\s\S]*?)\\\]/g, (e, t) => `$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g, (e, t) => `$${t}$`).replace(/^(\d+)\.(?!\s)/gm, "$1\\.");
|
|
3358
3390
|
}
|
|
3359
|
-
function
|
|
3391
|
+
function he(e) {
|
|
3360
3392
|
let t = /* @__PURE__ */ new Set(), n = /^(`{3,}|~{3,})[^\n]*\n([\s\S]*?)\n\1/gm, r;
|
|
3361
3393
|
for (; (r = n.exec(e)) !== null;) for (let e = r.index; e < r.index + r[0].length; e++) t.add(e);
|
|
3362
3394
|
return e.replace(/[{[]([\s\S]*?)[}\]]/g, (e, n, r) => {
|
|
@@ -3368,20 +3400,28 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3368
3400
|
}
|
|
3369
3401
|
}).replace(/\n{3,}/g, "\n\n");
|
|
3370
3402
|
}
|
|
3371
|
-
let
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
], v = n("container"),
|
|
3377
|
-
let e =
|
|
3378
|
-
return
|
|
3403
|
+
let ge = [
|
|
3404
|
+
le,
|
|
3405
|
+
he,
|
|
3406
|
+
Un,
|
|
3407
|
+
me
|
|
3408
|
+
], v = n("container"), _e = re(c(a, "markdown"), to), ve = u(() => a.tailLength ? ye(_e.value, a.tailLength) : _e.value), { resolveText: be } = ie(), y = be(ve), xe = oe(), Se = u(() => {
|
|
3409
|
+
let e = ge.reduce((e, t) => t(e), y.value);
|
|
3410
|
+
return $a(W.parse(e, {
|
|
3379
3411
|
async: !1,
|
|
3380
3412
|
breaks: !0,
|
|
3381
3413
|
renderer: g
|
|
3382
|
-
})
|
|
3414
|
+
}), xe.isGated.value ? {
|
|
3415
|
+
canLoad: xe.canLoad,
|
|
3416
|
+
hostOf: xe.hostOf,
|
|
3417
|
+
label: (e) => l("label.imageHeld", { host: e })
|
|
3418
|
+
} : void 0);
|
|
3383
3419
|
});
|
|
3384
|
-
|
|
3420
|
+
function Ce(e) {
|
|
3421
|
+
let t = (e.target?.closest?.(`[${Qa}]`))?.getAttribute(Qa);
|
|
3422
|
+
t && (e.preventDefault(), e.stopPropagation(), xe.release(t));
|
|
3423
|
+
}
|
|
3424
|
+
async function we() {
|
|
3385
3425
|
if (a.loading) return;
|
|
3386
3426
|
await i();
|
|
3387
3427
|
let e = v.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
|
|
@@ -3396,18 +3436,18 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3396
3436
|
} catch {}
|
|
3397
3437
|
}
|
|
3398
3438
|
}
|
|
3399
|
-
async function
|
|
3439
|
+
async function Te() {
|
|
3400
3440
|
await i();
|
|
3401
3441
|
let e = v.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
|
|
3402
3442
|
if (!e?.length) return;
|
|
3403
3443
|
let t = (await import("https://cdn.jsdelivr.net/npm/highlight.js@11/es/common.js")).default;
|
|
3404
3444
|
for (let n of e) t.highlightElement(n), n.setAttribute("data-highlighted", "true");
|
|
3405
3445
|
}
|
|
3406
|
-
async function
|
|
3446
|
+
async function Ee() {
|
|
3407
3447
|
await i();
|
|
3408
3448
|
let e = v.value?.querySelectorAll(".katex-pending");
|
|
3409
3449
|
if (!e?.length) return;
|
|
3410
|
-
let t = await
|
|
3450
|
+
let t = await se();
|
|
3411
3451
|
p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(v.value));
|
|
3412
3452
|
for (let n of Array.from(e)) {
|
|
3413
3453
|
if (!n.isConnected) continue;
|
|
@@ -3422,7 +3462,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3422
3462
|
} catch {}
|
|
3423
3463
|
}
|
|
3424
3464
|
}
|
|
3425
|
-
async function
|
|
3465
|
+
async function De() {
|
|
3426
3466
|
await i();
|
|
3427
3467
|
let e = v.value?.querySelectorAll("pre.mermaid[data-rendered]");
|
|
3428
3468
|
if (!e?.length) return;
|
|
@@ -3435,7 +3475,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3435
3475
|
} catch {}
|
|
3436
3476
|
}
|
|
3437
3477
|
}
|
|
3438
|
-
function
|
|
3478
|
+
function Oe(e) {
|
|
3439
3479
|
let t = e.target;
|
|
3440
3480
|
if (!(t instanceof HTMLImageElement) || t.dataset.broken) return;
|
|
3441
3481
|
t.dataset.broken = "true";
|
|
@@ -3443,59 +3483,60 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
|
|
|
3443
3483
|
n.className = "markdown-broken-image", n.textContent = t.alt || l("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
|
|
3444
3484
|
}
|
|
3445
3485
|
t(() => {
|
|
3446
|
-
v.value?.addEventListener("error",
|
|
3486
|
+
v.value?.addEventListener("error", Oe, !0);
|
|
3447
3487
|
}), o(() => {
|
|
3448
|
-
v.value?.removeEventListener("error",
|
|
3449
|
-
}), s([
|
|
3450
|
-
let
|
|
3451
|
-
function
|
|
3488
|
+
v.value?.removeEventListener("error", Oe, !0);
|
|
3489
|
+
}), s([Se, () => a.loading], we, { immediate: !0 }), s(() => a.isDark, De), s(Se, Te, { immediate: !0 }), s(Se, Ee, { immediate: !0 });
|
|
3490
|
+
let b = 0;
|
|
3491
|
+
function x(e, t) {
|
|
3452
3492
|
let n = document.createElement("span");
|
|
3453
3493
|
return n.style.cssText = `animation:ft-${a.animation} ${a.animationDuration} ease-out ${t}ms both;display:inline-block`, n.textContent = e, n.addEventListener("animationend", () => {
|
|
3454
3494
|
let t = n.parentNode;
|
|
3455
3495
|
t && (t.replaceChild(document.createTextNode(e), n), t.normalize());
|
|
3456
3496
|
}, { once: !0 }), n;
|
|
3457
3497
|
}
|
|
3458
|
-
function
|
|
3498
|
+
function ke(e, t, n, r) {
|
|
3459
3499
|
let i = r, a = e.split(/(\s+)/);
|
|
3460
|
-
for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(
|
|
3500
|
+
for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(x(e, i * 30), n), i++));
|
|
3461
3501
|
return i;
|
|
3462
3502
|
}
|
|
3463
|
-
function
|
|
3503
|
+
function S(e) {
|
|
3464
3504
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(e) {
|
|
3465
3505
|
return e.parentElement?.closest("pre, code, .katex-pending, .markdown-broken-image") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
3466
3506
|
} }), n = [];
|
|
3467
3507
|
for (; t.nextNode();) n.push(t.currentNode);
|
|
3468
3508
|
return n;
|
|
3469
3509
|
}
|
|
3470
|
-
function
|
|
3510
|
+
function Ae() {
|
|
3471
3511
|
if (!v.value || !a.loading || !a.animation) return;
|
|
3472
|
-
let e =
|
|
3512
|
+
let e = S(v.value), t = 0, n = 0;
|
|
3473
3513
|
for (let r of e) {
|
|
3474
3514
|
let e = r.textContent || "", i = t, a = t + e.length;
|
|
3475
|
-
if (t = a, a <=
|
|
3515
|
+
if (t = a, a <= b) continue;
|
|
3476
3516
|
let o = r.parentNode;
|
|
3477
3517
|
if (!o) continue;
|
|
3478
|
-
if (i >=
|
|
3518
|
+
if (i >= b) {
|
|
3479
3519
|
let t = r.nextSibling;
|
|
3480
|
-
o.removeChild(r), n =
|
|
3520
|
+
o.removeChild(r), n = ke(e, o, t, n);
|
|
3481
3521
|
continue;
|
|
3482
3522
|
}
|
|
3483
|
-
let s =
|
|
3484
|
-
o.removeChild(c), n =
|
|
3523
|
+
let s = b - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
|
|
3524
|
+
o.removeChild(c), n = ke(l, o, u, n);
|
|
3485
3525
|
}
|
|
3486
|
-
|
|
3526
|
+
b = t;
|
|
3487
3527
|
}
|
|
3488
|
-
return s(
|
|
3489
|
-
await i(),
|
|
3528
|
+
return s(Se, async () => {
|
|
3529
|
+
await i(), Ae();
|
|
3490
3530
|
}, { immediate: !0 }), s(() => a.markdown, (e, t) => {
|
|
3491
|
-
(!e || t && e.length < t.length) && (
|
|
3531
|
+
(!e || t && e.length < t.length) && (b = 0);
|
|
3492
3532
|
}), (e, t) => (r(), d("div", {
|
|
3493
3533
|
ref: "container",
|
|
3494
|
-
|
|
3495
|
-
|
|
3534
|
+
onClick: Ce,
|
|
3535
|
+
innerHTML: Se.value
|
|
3536
|
+
}, null, 8, eo));
|
|
3496
3537
|
}
|
|
3497
|
-
}), [["styles", [".markdown-broken-image{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-4);font-size:var(--text-12);vertical-align:middle;display:inline-flex}@keyframes ft-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes ft-blurIn{0%{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur()}}@keyframes ft-dropIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-fadeAndScale{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}"]]]);
|
|
3538
|
+
}), [["styles", [".markdown-held-image{max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-3);font:inherit;font-size:var(--text-12);vertical-align:middle;cursor:pointer;align-items:center;display:inline-flex}.markdown-held-image:hover,.markdown-held-image:focus-visible{background-color:var(--color-surface-2);color:var(--color-word-2)}.markdown-broken-image{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-4);font-size:var(--text-12);vertical-align:middle;display:inline-flex}@keyframes ft-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes ft-blurIn{0%{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur()}}@keyframes ft-dropIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-fadeAndScale{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}"]]]);
|
|
3498
3539
|
//#endregion
|
|
3499
|
-
export {
|
|
3540
|
+
export { _ as C, fe as D, de as E, h as O, b as S, ue as T, Ce as _, ge as a, me as b, S as c, Te as d, we as f, Me as g, x as h, C as i, g as k, Oe as l, Ne as m, xe as n, ke as o, Fe as p, _e as r, Ae as s, no as t, Pe as u, v, pe as w, De as x, Se as y };
|
|
3500
3541
|
|
|
3501
|
-
//# sourceMappingURL=PkStreamingMarkdown-
|
|
3542
|
+
//# sourceMappingURL=PkStreamingMarkdown-DyvZ5xKK.js.map
|