@8wave/ai-elements 0.111.0-beta.3 → 0.111.0-beta.7
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-Su_LDF9_.js → Agent-tE7ZJPxG.js} +80 -78
- package/dist/_chunks/Agent-tE7ZJPxG.js.map +1 -0
- package/dist/_chunks/{Document-DecVclEe.js → Document-Bmx6774B.js} +33 -21
- package/dist/_chunks/Document-Bmx6774B.js.map +1 -0
- package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
- package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-CwqsJnJJ.js → PkStreamingMarkdown-DgBS4Ebc.js} +69 -59
- package/dist/_chunks/PkStreamingMarkdown-DgBS4Ebc.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-OokLeTf1.js → PkToolRequestGeolocation-pVys3x9M.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-OokLeTf1.js.map → PkToolRequestGeolocation-pVys3x9M.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CtqKG6Yb.js → PkToolRequestOAuthConnection-BGChb_eC.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CtqKG6Yb.js.map → PkToolRequestOAuthConnection-BGChb_eC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js → PkToolShowArtifact-CkTBIdQd.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js.map → PkToolShowArtifact-CkTBIdQd.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-D_dW59Dl.js → PkToolShowContactForm-Du7jX7K5.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-D_dW59Dl.js.map → PkToolShowContactForm-Du7jX7K5.js.map} +1 -1
- package/dist/_chunks/PkToolShowDiagram-BdmG9gm8.js.map +1 -1
- package/dist/_chunks/{PkToolShowForm-DbJHMDbt.js → PkToolShowForm-Du2nk7pq.js} +3 -3
- package/dist/_chunks/PkToolShowForm-Du2nk7pq.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-Dot-W0Mj.js → PkToolShowSources-CsHLUF4L.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Dot-W0Mj.js.map → PkToolShowSources-CsHLUF4L.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js → PkToolShowSuggestedReply-D7g_qymH.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js.map → PkToolShowSuggestedReply-D7g_qymH.js.map} +1 -1
- package/dist/_chunks/PkToolShowWeather-LPd3tC77.js.map +1 -1
- package/dist/_chunks/PkUrl-BPbjZJ1A.js.map +1 -1
- package/dist/_chunks/{browser-NgY6LXg-.js → browser-B0Xnbqi7.js} +726 -751
- package/dist/_chunks/browser-B0Xnbqi7.js.map +1 -0
- package/dist/_chunks/text-DbSEK8si.js.map +1 -1
- package/dist/_chunks/utils-YJ0ZOLDG.js.map +1 -1
- package/dist/ai-elements.es.js +3010 -3052
- 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/PkChatbotError.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.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-C8BsTAxk.js → Agent-De2gFNjR.js} +165 -176
- package/dist-vue/_chunks/Agent-De2gFNjR.js.map +1 -0
- package/dist-vue/_chunks/{Document-CaUfI_SZ.js → Document-8umjeTVS.js} +84 -72
- package/dist-vue/_chunks/Document-8umjeTVS.js.map +1 -0
- package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbot-BPKSPIeC.js → PkChatbot-Di7R2CWN.js} +7 -7
- package/dist-vue/_chunks/PkChatbot-Di7R2CWN.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js → PkChatbotEmptyState-C_ITdvH7.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js.map → PkChatbotEmptyState-C_ITdvH7.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotError-CBP2mf-n.js → PkChatbotError-gvDpRcEz.js} +21 -19
- package/dist-vue/_chunks/PkChatbotError-gvDpRcEz.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-JnHaRlfk.js → PkChatbotInput-pEl3D2O-.js} +139 -124
- package/dist-vue/_chunks/PkChatbotInput-pEl3D2O-.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-DAlkoMkY.js → PkChatbotMessages-CGALOKwe.js} +17 -17
- package/dist-vue/_chunks/PkChatbotMessages-CGALOKwe.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotSteps-rommD48p.js → PkChatbotSteps-BhFupvbz.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotSteps-rommD48p.js.map → PkChatbotSteps-BhFupvbz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CEqzF1G9.js → PkChatbotViewChat-DT-rAU_r.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-CEqzF1G9.js.map → PkChatbotViewChat-DT-rAU_r.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-C787v5ll.js → PkChatbotViewConversations-3LaZPFyw.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-C787v5ll.js.map → PkChatbotViewConversations-3LaZPFyw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CNFLt8YO.js → PkChatbotViewFiles-CTqnbsCj.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-CNFLt8YO.js.map → PkChatbotViewFiles-CTqnbsCj.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-7p0ci3qm.js → PkChatbotViewProfile-B-Mp1jGQ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-7p0ci3qm.js.map → PkChatbotViewProfile-B-Mp1jGQ.js.map} +1 -1
- package/dist-vue/_chunks/PkRelativeTime--1cIphlA.js.map +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-D8_LwZMR.js → PkStreamingMarkdown-DIaZEedG.js} +406 -396
- package/dist-vue/_chunks/PkStreamingMarkdown-DIaZEedG.js.map +1 -0
- package/dist-vue/_chunks/PkSvgViewer-D-0M5bqg.js.map +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Bxqz9oSo.js → PkToolRequestGeolocation-Q3N3jlO8.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Bxqz9oSo.js.map → PkToolRequestGeolocation-Q3N3jlO8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C6rXgb0s.js → PkToolRequestOAuthConnection-C0LW5Evp.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C6rXgb0s.js.map → PkToolRequestOAuthConnection-C0LW5Evp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js → PkToolShowArtifact-BCCUucVQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js.map → PkToolShowArtifact-BCCUucVQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DHmzAIVF.js → PkToolShowContactForm-BXGxWSc2.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DHmzAIVF.js.map → PkToolShowContactForm-BXGxWSc2.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-dwCVZ1up.js → PkToolShowDiagram-CZgrWvBr.js} +2 -2
- package/dist-vue/_chunks/PkToolShowDiagram-CZgrWvBr.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js → PkToolShowEmail-DpC517Vn.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js.map → PkToolShowEmail-DpC517Vn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-CO5A_j9L.js → PkToolShowForm-CIZpfAGK.js} +3 -3
- package/dist-vue/_chunks/PkToolShowForm-CIZpfAGK.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js → PkToolShowMessage-B7flxVCU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js.map → PkToolShowMessage-B7flxVCU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js → PkToolShowProductList-B6fRtIpx.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js.map → PkToolShowProductList-B6fRtIpx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-7Q5Iogxi.js → PkToolShowSources-DDZokZow.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-7Q5Iogxi.js.map → PkToolShowSources-DDZokZow.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js → PkToolShowSuggestedReply-DWLkUh2L.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js.map → PkToolShowSuggestedReply-DWLkUh2L.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowWeather-Bzqalzh8.js.map +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js → PkToolShowWebPages-DY48ee6V.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js.map → PkToolShowWebPages-DY48ee6V.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-xUBKVJCv.js → PkUrl-DSGxrEM7.js} +2 -2
- package/dist-vue/_chunks/PkUrl-DSGxrEM7.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-D9f69brW.js → createChatbotApiClient-MkaPbGWB.js} +2 -2
- package/dist-vue/_chunks/createChatbotApiClient-MkaPbGWB.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-9Cw_oR6J.js → useChatbotStore-BzfqjiYz.js} +6 -3
- package/dist-vue/_chunks/useChatbotStore-BzfqjiYz.js.map +1 -0
- package/dist-vue/_chunks/useDialogConfirm-KWz0ohCQ.js.map +1 -1
- package/dist-vue/_chunks/utils-Coqik0XI.js.map +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +2 -2
- package/dist-vue/index.js +3858 -3490
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +36 -8
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +20 -3
- package/dist-vue/packages/components/src/chat/PkChatButton.d.ts +3 -2
- package/dist-vue/packages/components/src/chat/PkLanguageModel.d.ts +26 -2
- package/dist-vue/packages/components/src/chat/PkLanguageModelCombobox.d.ts +53 -1
- package/dist-vue/packages/components/src/chat/PkModelOption.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkReasoningSettings.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/constants.d.ts +5 -18
- package/dist-vue/packages/components/src/chat/index.d.ts +3 -1
- package/dist-vue/packages/components/src/chat/modelCatalog.d.ts +46 -0
- package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +5 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
- package/dist-vue/packages/composable/src/useChatbotError.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +70 -10
- package/dist-vue/packages/models/src/schema/Chat.d.ts +10 -0
- package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +316 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +142 -2
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +20 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +20 -0
- package/dist-vue/packages/models/src/schema/UserOverview.d.ts +41 -0
- package/dist-vue/packages/models/src/schema/constants.d.ts +56 -91
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Su_LDF9_.js.map +0 -1
- package/dist/_chunks/Document-DecVclEe.js.map +0 -1
- package/dist/_chunks/Media-C6SOQfJZ.js +0 -122
- package/dist/_chunks/Media-C6SOQfJZ.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-CwqsJnJJ.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-DbJHMDbt.js.map +0 -1
- package/dist/_chunks/browser-NgY6LXg-.js.map +0 -1
- package/dist-vue/_chunks/Agent-C8BsTAxk.js.map +0 -1
- package/dist-vue/_chunks/Document-CaUfI_SZ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BPKSPIeC.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotError-CBP2mf-n.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-JnHaRlfk.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-DAlkoMkY.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-D8_LwZMR.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowDiagram-dwCVZ1up.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CO5A_j9L.js.map +0 -1
- package/dist-vue/_chunks/PkUrl-xUBKVJCv.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-D9f69brW.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-9Cw_oR6J.js.map +0 -1
|
@@ -574,7 +574,7 @@ $$` : `${e}$$`;
|
|
|
574
574
|
return n;
|
|
575
575
|
};
|
|
576
576
|
//#endregion
|
|
577
|
-
//#region ../../node_modules/.pnpm/marked@18.0.
|
|
577
|
+
//#region ../../node_modules/.pnpm/marked@18.0.14/node_modules/marked/lib/marked.esm.js
|
|
578
578
|
function Mt() {
|
|
579
579
|
return {
|
|
580
580
|
async: !1,
|
|
@@ -629,6 +629,7 @@ var Pt = ((e = "") => {
|
|
|
629
629
|
nonSpaceChar: /[^ ]/,
|
|
630
630
|
newLineCharGlobal: /\n/g,
|
|
631
631
|
tabCharGlobal: /\t/g,
|
|
632
|
+
leadingSpaceTab: /^[ \t]+/,
|
|
632
633
|
multipleSpaceGlobal: /\s+/g,
|
|
633
634
|
blankLine: /^[ \t]*$/,
|
|
634
635
|
doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
|
|
@@ -655,6 +656,7 @@ var Pt = ((e = "") => {
|
|
|
655
656
|
endAngleBracket: />$/,
|
|
656
657
|
pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
|
|
657
658
|
unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
|
|
659
|
+
numericCharacterReference: /&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,
|
|
658
660
|
escapeTest: /[&<>"']/,
|
|
659
661
|
escapeReplace: /[&<>"']/g,
|
|
660
662
|
escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
|
|
@@ -675,7 +677,7 @@ var Pt = ((e = "") => {
|
|
|
675
677
|
headingBeginRegex: M((e) => RegExp(`^ {0,${e}}#`)),
|
|
676
678
|
htmlBeginRegex: M((e) => RegExp(`^ {0,${e}}(?:</?(?:${I})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")),
|
|
677
679
|
blockquoteBeginRegex: M((e) => RegExp(`^ {0,${e}}>`))
|
|
678
|
-
}, Ft = /^(?:[ \t]*(?:\n|$))+/, It = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Lt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, F = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Rt = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, zt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Bt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |
|
|
680
|
+
}, Ft = /^(?:[ \t]*(?:\n|$))+/, It = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Lt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, F = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Rt = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, zt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Bt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Vt = N(Bt).replace(/bull/g, zt).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(), Ht = N(Bt).replace(/bull/g, zt).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(), Ut = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Wt = /^[^\n]+/, Gt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Kt = N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Gt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), qt = N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, zt).getRegex(), I = "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", Jt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Yt = N("^ {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", Jt).replace("tag", I).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Xt = (e) => N(Ut).replace("hr", F).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", I).getRegex(), Zt = Xt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Qt = Xt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), $t = {
|
|
679
681
|
blockquote: N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qt).getRegex(),
|
|
680
682
|
code: It,
|
|
681
683
|
def: Kt,
|
|
@@ -702,7 +704,7 @@ var Pt = ((e = "") => {
|
|
|
702
704
|
fences: j,
|
|
703
705
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
704
706
|
paragraph: N(Ut).replace("hr", F).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Vt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
705
|
-
}, rn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, an = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, on = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, sn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = /[\p{P}\p{S}]/u, R = /[\s\p{P}\p{S}]/u, z = /[^\s\p{P}\p{S}]/u, cn = N(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, R).getRegex(), ln = /[\p{Pi}\p{Ps}"']/u, un = /(?!~)[\p{P}\p{S}]/u, dn = /(?!~)[\s\p{P}\p{S}]/u, fn = /(?:[^\s\p{P}\p{S}]|~)/u, pn = N(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pt ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), mn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, hn = N(mn, "u").replace(/punct/g, L).getRegex(), gn = N(mn, "u").replace(/punct/g, un).getRegex(), _n = N(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, ln).replace(/punct/g, L).getRegex(), vn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", yn = N(vn, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), bn = N(vn, "gu").replace(/notPunctSpace/g, fn).replace(/punctSpace/g, dn).replace(/punct/g, un).getRegex(), xn = N("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), Sn = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), Cn = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), wn = N(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, L).getRegex(), Tn = N("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), En = N(/\\(punct)/, "gu").replace(/punct/g, L).getRegex(), Dn = N(/^<(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(), On = N(Jt).replace("(?:-->|$)", "-->").getRegex(), kn = N("^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", On).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), An = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, B = N(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", An).getRegex(), jn = N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", B).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Mn = N(/^!?\[(label)\]\[(ref)\]/).replace("label", B).replace("ref", Gt).getRegex(), Nn = N(/^!?\[(ref)\](?:\[\])?/).replace("ref", Gt).getRegex(), Pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Fn = N(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", An).getRegex(), In = N("reflink|nolink(?!\\()", "g").replace("reflink", N(/^!?\[(label)\]\[(ref)\]/).replace("label", Fn).replace("ref", Pn).getRegex()).replace("nolink", N(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pn).getRegex()).getRegex(), Ln = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Rn = {
|
|
707
|
+
}, rn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, an = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, on = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, sn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = /[\p{P}\p{S}]/u, R = /[\s\p{P}\p{S}]/u, z = /[^\s\p{P}\p{S}]/u, cn = N(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, R).getRegex(), ln = /[\p{Pi}\p{Ps}"']/u, un = /(?!~)[\p{P}\p{S}]/u, dn = /(?!~)[\s\p{P}\p{S}]/u, fn = /(?:[^\s\p{P}\p{S}]|~)/u, pn = N(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pt ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), mn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, hn = N(mn, "u").replace(/punct/g, L).getRegex(), gn = N(mn, "u").replace(/punct/g, un).getRegex(), _n = N(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, ln).replace(/punct/g, L).getRegex(), vn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", yn = N(vn, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), bn = N(vn, "gu").replace(/notPunctSpace/g, fn).replace(/punctSpace/g, dn).replace(/punct/g, un).getRegex(), xn = N("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), Sn = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), Cn = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), wn = N(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, L).getRegex(), Tn = N("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, R).replace(/punct/g, L).getRegex(), En = N(/\\(punct)/, "gu").replace(/punct/g, L).getRegex(), Dn = N(/^<(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(), On = N(Jt).replace("(?:-->|$)", "-->").getRegex(), kn = N("^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", On).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), An = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, B = N(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", An).getRegex(), jn = N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", B).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Mn = N(/^!?\[(label)\]\[(ref)\]/).replace("label", B).replace("ref", Gt).getRegex(), Nn = N(/^!?\[(ref)\](?:\[\])?/).replace("ref", Gt).getRegex(), Pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Fn = N(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", An).getRegex(), In = N("reflink|nolink(?!\\()", "g").replace("reflink", N(/^!?\[(label)\]\[(ref)\]/).replace("label", Fn).replace("ref", Pn).getRegex()).replace("nolink", N(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pn).getRegex()).getRegex(), Ln = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Rn = N(/(?: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(), zn = {
|
|
706
708
|
_backpedal: j,
|
|
707
709
|
anyPunctuation: En,
|
|
708
710
|
autolink: Dn,
|
|
@@ -724,50 +726,56 @@ var Pt = ((e = "") => {
|
|
|
724
726
|
tag: kn,
|
|
725
727
|
text: sn,
|
|
726
728
|
url: j
|
|
727
|
-
},
|
|
728
|
-
...
|
|
729
|
+
}, Bn = {
|
|
730
|
+
...zn,
|
|
729
731
|
emStrongLDelim: _n,
|
|
730
732
|
emStrongRDelimAst: xn,
|
|
731
733
|
emStrongRDelimUnd: Cn,
|
|
732
734
|
link: N(/^!?\[(label)\]\((.*?)\)/).replace("label", B).getRegex(),
|
|
733
735
|
reflink: N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", B).getRegex()
|
|
734
|
-
},
|
|
735
|
-
...
|
|
736
|
+
}, Vn = {
|
|
737
|
+
...zn,
|
|
736
738
|
emStrongRDelimAst: bn,
|
|
737
739
|
emStrongLDelim: gn,
|
|
738
740
|
delLDelim: wn,
|
|
739
741
|
delRDelim: Tn,
|
|
740
|
-
url: N(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ln).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
|
|
742
|
+
url: N(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Rn).replace("protocol", Ln).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
|
|
741
743
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
742
744
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
743
|
-
text: N(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ln).getRegex()
|
|
744
|
-
},
|
|
745
|
-
...
|
|
745
|
+
text: N(/^(?:[^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", Ln).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
|
|
746
|
+
}, Hn = {
|
|
747
|
+
...Vn,
|
|
746
748
|
br: N(on).replace("{2,}", "*").getRegex(),
|
|
747
|
-
text: N(
|
|
749
|
+
text: N(Vn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
748
750
|
}, V = {
|
|
749
751
|
normal: $t,
|
|
750
752
|
gfm: tn,
|
|
751
753
|
pedantic: nn
|
|
752
754
|
}, H = {
|
|
753
|
-
normal:
|
|
754
|
-
gfm:
|
|
755
|
-
breaks:
|
|
756
|
-
pedantic:
|
|
757
|
-
},
|
|
755
|
+
normal: zn,
|
|
756
|
+
gfm: Vn,
|
|
757
|
+
breaks: Hn,
|
|
758
|
+
pedantic: Bn
|
|
759
|
+
}, Un = {
|
|
758
760
|
"&": "&",
|
|
759
761
|
"<": "<",
|
|
760
762
|
">": ">",
|
|
761
763
|
"\"": """,
|
|
762
764
|
"'": "'"
|
|
763
|
-
},
|
|
765
|
+
}, Wn = (e) => Un[e];
|
|
764
766
|
function U(e, t) {
|
|
765
767
|
if (t) {
|
|
766
|
-
if (P.escapeTest.test(e)) return e.replace(P.escapeReplace,
|
|
767
|
-
} else if (P.escapeTestNoEncode.test(e)) return e.replace(P.escapeReplaceNoEncode,
|
|
768
|
+
if (P.escapeTest.test(e)) return e.replace(P.escapeReplace, Wn);
|
|
769
|
+
} else if (P.escapeTestNoEncode.test(e)) return e.replace(P.escapeReplaceNoEncode, Wn);
|
|
768
770
|
return e;
|
|
769
771
|
}
|
|
770
|
-
function
|
|
772
|
+
function Gn(e) {
|
|
773
|
+
return e.replace(P.numericCharacterReference, (e, t, n) => {
|
|
774
|
+
let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
|
|
775
|
+
return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : String.fromCodePoint(r);
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
function Kn(e) {
|
|
771
779
|
try {
|
|
772
780
|
e = encodeURI(e).replace(P.percentDecode, "%");
|
|
773
781
|
} catch {
|
|
@@ -775,7 +783,7 @@ function Wn(e) {
|
|
|
775
783
|
}
|
|
776
784
|
return e;
|
|
777
785
|
}
|
|
778
|
-
function
|
|
786
|
+
function qn(e, t) {
|
|
779
787
|
let n = e.replace(P.findPipe, (e, t, n) => {
|
|
780
788
|
let r = !1, i = t;
|
|
781
789
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
@@ -800,15 +808,15 @@ function W(e, t, n) {
|
|
|
800
808
|
}
|
|
801
809
|
return e.slice(0, r - i);
|
|
802
810
|
}
|
|
803
|
-
function
|
|
811
|
+
function Jn(e) {
|
|
804
812
|
let t = e.split("\n"), n = t.length - 1;
|
|
805
813
|
for (; n >= 0 && P.blankLine.test(t[n]);) n--;
|
|
806
814
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
807
815
|
}
|
|
808
816
|
function G(e) {
|
|
809
|
-
return e.toLowerCase().toUpperCase().toLowerCase();
|
|
817
|
+
return e.trim().toLowerCase().toUpperCase().toLowerCase();
|
|
810
818
|
}
|
|
811
|
-
function
|
|
819
|
+
function Yn(e, t) {
|
|
812
820
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
813
821
|
let n = 0;
|
|
814
822
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -816,7 +824,7 @@ function qn(e, t) {
|
|
|
816
824
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
817
825
|
return n > 0 ? -2 : -1;
|
|
818
826
|
}
|
|
819
|
-
function
|
|
827
|
+
function Xn(e, t = 0) {
|
|
820
828
|
let n = t, r = "";
|
|
821
829
|
for (let t of e) if (t === " ") {
|
|
822
830
|
let e = 4 - n % 4;
|
|
@@ -824,7 +832,7 @@ function Jn(e, t = 0) {
|
|
|
824
832
|
} else r += t, n++;
|
|
825
833
|
return r;
|
|
826
834
|
}
|
|
827
|
-
function
|
|
835
|
+
function Zn(e, t, n, r, i) {
|
|
828
836
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!";
|
|
829
837
|
r.state.inLink = !0;
|
|
830
838
|
let l = r.state.linkEmitted, u = r.state.inRawBlock;
|
|
@@ -846,7 +854,7 @@ function Yn(e, t, n, r, i) {
|
|
|
846
854
|
tokens: d
|
|
847
855
|
};
|
|
848
856
|
}
|
|
849
|
-
function
|
|
857
|
+
function Qn(e, t, n) {
|
|
850
858
|
let r = e.match(n.other.indentCodeCompensation);
|
|
851
859
|
if (r === null) return t;
|
|
852
860
|
let i = r[1];
|
|
@@ -857,7 +865,7 @@ function Xn(e, t, n) {
|
|
|
857
865
|
return e.slice(Math.min(r.length, i.length));
|
|
858
866
|
}).join("\n");
|
|
859
867
|
}
|
|
860
|
-
function
|
|
868
|
+
function $n(e, t, n, r) {
|
|
861
869
|
if (!t.includes("<")) return !1;
|
|
862
870
|
for (let i = 0; i < t.length; i++) {
|
|
863
871
|
if (t[i] === "\\") {
|
|
@@ -897,7 +905,7 @@ var K = class {
|
|
|
897
905
|
code(e) {
|
|
898
906
|
let t = this.rules.block.code.exec(e);
|
|
899
907
|
if (t) {
|
|
900
|
-
let e = this.options.pedantic ? t[0] :
|
|
908
|
+
let e = this.options.pedantic ? t[0] : Jn(t[0]);
|
|
901
909
|
return {
|
|
902
910
|
type: "code",
|
|
903
911
|
raw: e,
|
|
@@ -909,7 +917,7 @@ var K = class {
|
|
|
909
917
|
fences(e) {
|
|
910
918
|
let t = this.rules.block.fences.exec(e);
|
|
911
919
|
if (t) {
|
|
912
|
-
let e = t[0], n =
|
|
920
|
+
let e = t[0], n = Qn(e, t[3] || "", this.rules);
|
|
913
921
|
return {
|
|
914
922
|
type: "code",
|
|
915
923
|
raw: e,
|
|
@@ -962,8 +970,10 @@ ${c}` : c;
|
|
|
962
970
|
if (u?.type === "code") break;
|
|
963
971
|
if (u?.type === "blockquote") {
|
|
964
972
|
let t = u, a = e.join("\n"), o = t.raw + "\n" + a.replace(this.rules.other.blockquoteSetextReplace2, ""), s = this.blockquote(o);
|
|
965
|
-
i[i.length - 1] = s
|
|
966
|
-
|
|
973
|
+
i[i.length - 1] = s;
|
|
974
|
+
let c = o.substring(s.raw.length).replace(/^\n/, ""), l = c ? c.split("\n").length : 0, d = l ? e.slice(0, -l) : e;
|
|
975
|
+
d.length > 0 && (n = `${n}
|
|
976
|
+
${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
|
|
967
977
|
break;
|
|
968
978
|
}
|
|
969
979
|
if (u?.type === "list") {
|
|
@@ -997,18 +1007,18 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
997
1007
|
let n = !1, r = "", s = "";
|
|
998
1008
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
999
1009
|
r = t[0], e = e.substring(r.length);
|
|
1000
|
-
let c =
|
|
1001
|
-
if (this.options.pedantic ? (
|
|
1002
|
-
let t = this.rules.other.nextBulletRegex(
|
|
1010
|
+
let c = t[2].split("\n", 1)[0], l = t[1].length, u = this.options.pedantic ? Xn(c, l) : c.replace(this.rules.other.leadingSpaceTab, (e) => Xn(e, l)), d = e.split("\n", 1)[0], f = !u.trim(), p = 0;
|
|
1011
|
+
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) {
|
|
1012
|
+
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);
|
|
1003
1013
|
for (; e;) {
|
|
1004
|
-
let
|
|
1005
|
-
if (
|
|
1006
|
-
if (m.search(this.rules.other.nonSpaceChar) >=
|
|
1014
|
+
let l = e.split("\n", 1)[0], m;
|
|
1015
|
+
if (d = l, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), m = d) : m = d.replace(this.rules.other.leadingSpaceTab, (e) => e.replace(this.rules.other.tabCharGlobal, " ")), i.test(d) || a.test(d) || o.test(d) || c.test(d) || t.test(d) || n.test(d)) break;
|
|
1016
|
+
if (m.search(this.rules.other.nonSpaceChar) >= p || !d.trim()) s += "\n" + m.slice(p);
|
|
1007
1017
|
else {
|
|
1008
|
-
if (
|
|
1009
|
-
s += "\n" +
|
|
1018
|
+
if (f || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(u) || a.test(u) || n.test(u)) break;
|
|
1019
|
+
s += "\n" + d;
|
|
1010
1020
|
}
|
|
1011
|
-
|
|
1021
|
+
f = !d.trim(), r += l + "\n", e = e.substring(l.length + 1), u = m.slice(p);
|
|
1012
1022
|
}
|
|
1013
1023
|
}
|
|
1014
1024
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -1062,7 +1072,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1062
1072
|
html(e) {
|
|
1063
1073
|
let t = this.rules.block.html.exec(e);
|
|
1064
1074
|
if (t) {
|
|
1065
|
-
let e =
|
|
1075
|
+
let e = Jn(t[0]);
|
|
1066
1076
|
return {
|
|
1067
1077
|
type: "html",
|
|
1068
1078
|
block: !0,
|
|
@@ -1088,7 +1098,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1088
1098
|
table(e) {
|
|
1089
1099
|
let t = this.rules.block.table.exec(e);
|
|
1090
1100
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1091
|
-
let n =
|
|
1101
|
+
let n = qn(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 = {
|
|
1092
1102
|
type: "table",
|
|
1093
1103
|
raw: W(t[0], "\n"),
|
|
1094
1104
|
header: [],
|
|
@@ -1103,7 +1113,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1103
1113
|
header: !0,
|
|
1104
1114
|
align: a.align[e]
|
|
1105
1115
|
});
|
|
1106
|
-
for (let e of i) a.rows.push(
|
|
1116
|
+
for (let e of i) a.rows.push(qn(e, a.header.length).map((e, t) => ({
|
|
1107
1117
|
text: e,
|
|
1108
1118
|
tokens: this.lexer.inline(e),
|
|
1109
1119
|
header: !1,
|
|
@@ -1169,14 +1179,14 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1169
1179
|
let t = this.rules.inline.link.exec(e);
|
|
1170
1180
|
if (t) {
|
|
1171
1181
|
let n = t[0].charAt(0) === "!" ? 2 : 1;
|
|
1172
|
-
if (!this.options.pedantic &&
|
|
1182
|
+
if (!this.options.pedantic && $n(e, t[1], n, this.rules)) return;
|
|
1173
1183
|
let r = t[2].trim();
|
|
1174
1184
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
|
|
1175
1185
|
if (!this.rules.other.endAngleBracket.test(r)) return;
|
|
1176
1186
|
let e = W(r.slice(0, -1), "\\");
|
|
1177
1187
|
if ((r.length - e.length) % 2 == 0) return;
|
|
1178
1188
|
} else {
|
|
1179
|
-
let e =
|
|
1189
|
+
let e = Yn(t[2], "()");
|
|
1180
1190
|
if (e === -2) return;
|
|
1181
1191
|
if (e > -1) {
|
|
1182
1192
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -1188,7 +1198,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1188
1198
|
let e = this.rules.other.pedanticHrefTitle.exec(i);
|
|
1189
1199
|
e && (i = e[1], a = e[3]);
|
|
1190
1200
|
} else a = t[3] ? t[3].slice(1, -1) : "";
|
|
1191
|
-
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)),
|
|
1201
|
+
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)), Zn(t, {
|
|
1192
1202
|
href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1193
1203
|
title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1194
1204
|
}, t[0], this.lexer, this.rules);
|
|
@@ -1198,7 +1208,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1198
1208
|
let n;
|
|
1199
1209
|
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
1200
1210
|
let r = n[0].charAt(0) === "!" ? 2 : 1;
|
|
1201
|
-
if (!this.options.pedantic &&
|
|
1211
|
+
if (!this.options.pedantic && $n(e, n[1], r, this.rules)) return;
|
|
1202
1212
|
let i = t[G((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
|
|
1203
1213
|
if (!i) {
|
|
1204
1214
|
let e = n[0].charAt(0);
|
|
@@ -1208,7 +1218,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1208
1218
|
text: e
|
|
1209
1219
|
};
|
|
1210
1220
|
}
|
|
1211
|
-
return
|
|
1221
|
+
return Zn(n, i, n[0], this.lexer, this.rules);
|
|
1212
1222
|
}
|
|
1213
1223
|
}
|
|
1214
1224
|
emStrong(e, t, n = "") {
|
|
@@ -1341,7 +1351,7 @@ ${a}`, r = r.substring(0, r.length - t.text.length) + s.text;
|
|
|
1341
1351
|
return {
|
|
1342
1352
|
type: "text",
|
|
1343
1353
|
raw: t[0],
|
|
1344
|
-
text: t[0],
|
|
1354
|
+
text: e ? t[0] : Gn(t[0]),
|
|
1345
1355
|
escaped: e
|
|
1346
1356
|
};
|
|
1347
1357
|
}
|
|
@@ -1677,7 +1687,7 @@ ${e}</tr>
|
|
|
1677
1687
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1678
1688
|
}
|
|
1679
1689
|
link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
|
|
1680
|
-
let a = i ? U(n, !0) : this.parser.parseInline(r), o =
|
|
1690
|
+
let a = i ? U(n, !0) : this.parser.parseInline(r), o = Kn(e);
|
|
1681
1691
|
if (o === null) return a;
|
|
1682
1692
|
e = U(o, i);
|
|
1683
1693
|
let s = "<a href=\"" + e + "\"";
|
|
@@ -1685,7 +1695,7 @@ ${e}</tr>
|
|
|
1685
1695
|
}
|
|
1686
1696
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1687
1697
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1688
|
-
let i =
|
|
1698
|
+
let i = Kn(e);
|
|
1689
1699
|
if (i === null) return U(n);
|
|
1690
1700
|
e = i;
|
|
1691
1701
|
let a = `<img src="${U(e)}" alt="${U(n)}"`;
|
|
@@ -2095,15 +2105,15 @@ function $(e, t) {
|
|
|
2095
2105
|
$.options = $.setOptions = function(e) {
|
|
2096
2106
|
return Q.setOptions(e), $.defaults = Q.defaults, Nt($.defaults), $;
|
|
2097
2107
|
}, $.getDefaults = Mt, $.defaults = A;
|
|
2098
|
-
function
|
|
2108
|
+
function er(...e) {
|
|
2099
2109
|
return Q.use(...e), $.defaults = Q.defaults, Nt($.defaults), $;
|
|
2100
2110
|
}
|
|
2101
2111
|
//#endregion
|
|
2102
2112
|
//#region ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
|
|
2103
|
-
$.use =
|
|
2113
|
+
$.use = er, $.walkTokens = function(e, t) {
|
|
2104
2114
|
return Q.walkTokens(e, t);
|
|
2105
2115
|
}, $.parseInline = Q.parseInline, $.Parser = X, $.parser = X.parse, $.Renderer = J, $.TextRenderer = Y, $.Lexer = q, $.lexer = q.lex, $.Tokenizer = K, $.Hooks = Z, $.parse = $, $.options, $.setOptions, $.walkTokens, $.parseInline, X.parse, q.lex, a();
|
|
2106
|
-
var
|
|
2116
|
+
var tr = ["innerHTML"], nr = /*#__PURE__*/ ee(/* @__PURE__ */ e({
|
|
2107
2117
|
__name: "PkStreamingMarkdown",
|
|
2108
2118
|
props: {
|
|
2109
2119
|
markdown: {
|
|
@@ -2352,10 +2362,10 @@ var $n = ["innerHTML"], er = /*#__PURE__*/ ee(/* @__PURE__ */ e({
|
|
|
2352
2362
|
}), (e, t) => (r(), l("div", {
|
|
2353
2363
|
ref: "container",
|
|
2354
2364
|
innerHTML: S.value
|
|
2355
|
-
}, null, 8,
|
|
2365
|
+
}, null, 8, tr));
|
|
2356
2366
|
}
|
|
2357
2367
|
}), [["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)}}"]]]);
|
|
2358
2368
|
//#endregion
|
|
2359
|
-
export {
|
|
2369
|
+
export { nr as t };
|
|
2360
2370
|
|
|
2361
|
-
//# sourceMappingURL=PkStreamingMarkdown-
|
|
2371
|
+
//# sourceMappingURL=PkStreamingMarkdown-DgBS4Ebc.js.map
|