@8wave/ai-elements 0.115.0-beta.34 → 0.115.0-beta.52

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.
Files changed (185) hide show
  1. package/README.md +1 -0
  2. package/dist/_chunks/{Agent-Cu04vBnd.js → Agent-CJbRpoZG.js} +133 -122
  3. package/dist/_chunks/Agent-CJbRpoZG.js.map +1 -0
  4. package/dist/_chunks/PkChatbotFilePreview-DcqwX9nI.js +256 -0
  5. package/dist/_chunks/PkChatbotFilePreview-DcqwX9nI.js.map +1 -0
  6. package/dist/_chunks/PkHeldImage-BtaPh0Jr.js +42 -0
  7. package/dist/_chunks/PkHeldImage-BtaPh0Jr.js.map +1 -0
  8. package/dist/_chunks/{PkStreamingMarkdown-Qk9Tk_N7.js → PkStreamingMarkdown-B_qmgO9_.js} +801 -745
  9. package/dist/_chunks/PkStreamingMarkdown-B_qmgO9_.js.map +1 -0
  10. package/dist/_chunks/PkToolEditSpreadsheet-BSxYLcys.js +41 -0
  11. package/dist/_chunks/PkToolEditSpreadsheet-BSxYLcys.js.map +1 -0
  12. package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js → PkToolRequestGeolocation-YW0ilIxN.js} +2 -2
  13. package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js.map → PkToolRequestGeolocation-YW0ilIxN.js.map} +1 -1
  14. package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js → PkToolRequestOAuthConnection-Cx4aFL5g.js} +2 -2
  15. package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js.map → PkToolRequestOAuthConnection-Cx4aFL5g.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js → PkToolShowArtifact-Bgj02cPe.js} +2 -2
  17. package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js.map → PkToolShowArtifact-Bgj02cPe.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js → PkToolShowContactForm-Die8UpNv.js} +2 -2
  19. package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js.map → PkToolShowContactForm-Die8UpNv.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js → PkToolShowForm-Dmq95u6b.js} +5 -5
  21. package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js.map → PkToolShowForm-Dmq95u6b.js.map} +1 -1
  22. package/dist/_chunks/PkToolShowImageGallery-CKuyTxih.js +88 -0
  23. package/dist/_chunks/PkToolShowImageGallery-CKuyTxih.js.map +1 -0
  24. package/dist/_chunks/PkToolShowProductList-DjS9nvXe.js +72 -0
  25. package/dist/_chunks/PkToolShowProductList-DjS9nvXe.js.map +1 -0
  26. package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js → PkToolShowSources-MJRFeqMA.js} +3 -3
  27. package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js.map → PkToolShowSources-MJRFeqMA.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js → PkToolShowSuggestedReply-DPVS3C74.js} +2 -2
  29. package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js.map → PkToolShowSuggestedReply-DPVS3C74.js.map} +1 -1
  30. package/dist/_chunks/PkToolShowVideo-DnvvRE7H.js +142 -0
  31. package/dist/_chunks/PkToolShowVideo-DnvvRE7H.js.map +1 -0
  32. package/dist/_chunks/{PkToolShowWebPages-BOxbTe2X.js → PkToolShowWebPages-CYbiGa7e.js} +31 -24
  33. package/dist/_chunks/PkToolShowWebPages-CYbiGa7e.js.map +1 -0
  34. package/dist/_chunks/chatImagePolicy-C5eH4Cpq.js +46 -0
  35. package/dist/_chunks/chatImagePolicy-C5eH4Cpq.js.map +1 -0
  36. package/dist/_chunks/{markdown-_p-gd9w8.js → markdown-qIVVfGoX.js} +146 -73
  37. package/dist/_chunks/markdown-qIVVfGoX.js.map +1 -0
  38. package/dist/ai-elements.es.js +2975 -3134
  39. package/dist/ai-elements.es.js.map +1 -1
  40. package/dist-vue/PkChatbot.js +1 -1
  41. package/dist-vue/PkChatbotEmptyState.js +1 -1
  42. package/dist-vue/PkChatbotFilePreview.js +1 -1
  43. package/dist-vue/PkChatbotInput.js +1 -1
  44. package/dist-vue/PkChatbotMessages.js +1 -1
  45. package/dist-vue/PkChatbotStepPayload.js +1 -1
  46. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  47. package/dist-vue/PkChatbotSteps.js +1 -1
  48. package/dist-vue/PkChatbotViewChat.js +1 -1
  49. package/dist-vue/PkChatbotViewConversations.js +1 -1
  50. package/dist-vue/PkChatbotViewFiles.js +1 -1
  51. package/dist-vue/PkChatbotViewProfile.js +1 -1
  52. package/dist-vue/_chunks/{Agent-KbZm8GvA.js → Agent---jwXeaB.js} +57 -46
  53. package/dist-vue/_chunks/Agent---jwXeaB.js.map +1 -0
  54. package/dist-vue/_chunks/{Document-DCSWwcRE.js → Document-DmBTgjd4.js} +150 -77
  55. package/dist-vue/_chunks/Document-DmBTgjd4.js.map +1 -0
  56. package/dist-vue/_chunks/PkChatbot-W9tO1H9i.js +275 -0
  57. package/dist-vue/_chunks/PkChatbot-W9tO1H9i.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js → PkChatbotEmptyState-BY3f3T0T.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js.map → PkChatbotEmptyState-BY3f3T0T.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotFilePreview-CwiVQDF2.js → PkChatbotFilePreview-Dq9JBX9U.js} +5 -3
  61. package/dist-vue/_chunks/PkChatbotFilePreview-Dq9JBX9U.js.map +1 -0
  62. package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js → PkChatbotInput-C5l6QDQY.js} +3 -3
  63. package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js.map → PkChatbotInput-C5l6QDQY.js.map} +1 -1
  64. package/dist-vue/_chunks/PkChatbotMessages-3RZER9PO.js +769 -0
  65. package/dist-vue/_chunks/PkChatbotMessages-3RZER9PO.js.map +1 -0
  66. package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js → PkChatbotStepPayload-C-xnhmzZ.js} +2 -2
  67. package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js.map → PkChatbotStepPayload-C-xnhmzZ.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js → PkChatbotStepToolDetail-Cko1vU0N.js} +3 -3
  69. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js.map → PkChatbotStepToolDetail-Cko1vU0N.js.map} +1 -1
  70. package/dist-vue/_chunks/PkChatbotSteps-BkZ3Kq2M.js +191 -0
  71. package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js.map → PkChatbotSteps-BkZ3Kq2M.js.map} +1 -1
  72. package/dist-vue/_chunks/PkChatbotViewChat-BFImSy1X.js +789 -0
  73. package/dist-vue/_chunks/PkChatbotViewChat-BFImSy1X.js.map +1 -0
  74. package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js → PkChatbotViewConversations-C6T4ZxxX.js} +2 -2
  75. package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js.map → PkChatbotViewConversations-C6T4ZxxX.js.map} +1 -1
  76. package/dist-vue/_chunks/PkChatbotViewFiles-CMQdbZN6.js +125 -0
  77. package/dist-vue/_chunks/PkChatbotViewFiles-CMQdbZN6.js.map +1 -0
  78. package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js → PkChatbotViewProfile-CDCy1LEX.js} +2 -2
  79. package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js.map → PkChatbotViewProfile-CDCy1LEX.js.map} +1 -1
  80. package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js +41 -0
  81. package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js.map +1 -0
  82. package/dist-vue/_chunks/{PkStreamingMarkdown-CJlfq7ub.js → PkStreamingMarkdown-DJG-aPx2.js} +792 -780
  83. package/dist-vue/_chunks/PkStreamingMarkdown-DJG-aPx2.js.map +1 -0
  84. package/dist-vue/_chunks/{PkSvgViewer-D-0M5bqg.js → PkSvgViewer-D1y8hZRW.js} +2 -2
  85. package/dist-vue/_chunks/{PkSvgViewer-D-0M5bqg.js.map → PkSvgViewer-D1y8hZRW.js.map} +1 -1
  86. package/dist-vue/_chunks/PkToolEditSpreadsheet-BHh7NUdR.js +40 -0
  87. package/dist-vue/_chunks/PkToolEditSpreadsheet-BHh7NUdR.js.map +1 -0
  88. package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js → PkToolRequestGeolocation-Ccbhljmn.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js.map → PkToolRequestGeolocation-Ccbhljmn.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js → PkToolRequestOAuthConnection-BXf5ZRzR.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js.map → PkToolRequestOAuthConnection-BXf5ZRzR.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js → PkToolShowArtifact-BsfbvfVC.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js.map → PkToolShowArtifact-BsfbvfVC.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js → PkToolShowContactForm-C-YbtBlG.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js.map → PkToolShowContactForm-C-YbtBlG.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js → PkToolShowDiagram-CIHVrQ3e.js} +3 -3
  97. package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js.map → PkToolShowDiagram-CIHVrQ3e.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js → PkToolShowEmail-C591LR5N.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js.map → PkToolShowEmail-C591LR5N.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js → PkToolShowForm-BwYJhEVO.js} +6 -6
  101. package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js.map → PkToolShowForm-BwYJhEVO.js.map} +1 -1
  102. package/dist-vue/_chunks/PkToolShowImageGallery-1A9zyOVn.js +88 -0
  103. package/dist-vue/_chunks/PkToolShowImageGallery-1A9zyOVn.js.map +1 -0
  104. package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js → PkToolShowMessage-CbXERPHI.js} +2 -2
  105. package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js.map → PkToolShowMessage-CbXERPHI.js.map} +1 -1
  106. package/dist-vue/_chunks/PkToolShowProductList-D61i6AMs.js +72 -0
  107. package/dist-vue/_chunks/PkToolShowProductList-D61i6AMs.js.map +1 -0
  108. package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js → PkToolShowSources-BQpdJE_m.js} +4 -4
  109. package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js.map → PkToolShowSources-BQpdJE_m.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js → PkToolShowSuggestedReply-D3jLsbKJ.js} +2 -2
  111. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js.map → PkToolShowSuggestedReply-D3jLsbKJ.js.map} +1 -1
  112. package/dist-vue/_chunks/PkToolShowVideo-DUdkb3qb.js +141 -0
  113. package/dist-vue/_chunks/PkToolShowVideo-DUdkb3qb.js.map +1 -0
  114. package/dist-vue/_chunks/PkToolShowWebPages-BeeBiv9R.js +86 -0
  115. package/dist-vue/_chunks/PkToolShowWebPages-BeeBiv9R.js.map +1 -0
  116. package/dist-vue/_chunks/{PkUrl-E12f7rn_.js → PkUrl-CN1kkZiH.js} +2 -2
  117. package/dist-vue/_chunks/{PkUrl-E12f7rn_.js.map → PkUrl-CN1kkZiH.js.map} +1 -1
  118. package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js → createChatbotApiClient-CDrs7NwO.js} +13 -9
  119. package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js.map → createChatbotApiClient-CDrs7NwO.js.map} +1 -1
  120. package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js → useChatbotStore-D6YNk8Rx.js} +6 -4
  121. package/dist-vue/_chunks/useChatbotStore-D6YNk8Rx.js.map +1 -0
  122. package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js +71 -0
  123. package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js.map +1 -0
  124. package/dist-vue/_chunks/utils-roi6YVNC.js +199 -0
  125. package/dist-vue/_chunks/utils-roi6YVNC.js.map +1 -0
  126. package/dist-vue/api.js +1 -1
  127. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
  128. package/dist-vue/composables.js +73 -13
  129. package/dist-vue/composables.js.map +1 -1
  130. package/dist-vue/index.js +3614 -3559
  131. package/dist-vue/index.js.map +1 -1
  132. package/dist-vue/locales.js +26 -14
  133. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
  134. package/dist-vue/packages/components/src/chat/PkChatbotFilePreview.d.ts +5 -0
  135. package/dist-vue/packages/components/src/chat/PkHeldImage.d.ts +21 -0
  136. package/dist-vue/packages/components/src/chat/PkToolEditSpreadsheet.d.ts +14 -0
  137. package/dist-vue/packages/components/src/chat/chatImagePolicy.d.ts +55 -0
  138. package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
  139. package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +17 -1
  140. package/dist-vue/packages/components/src/chat/utils.d.ts +8 -0
  141. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +7 -1
  142. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
  143. package/dist-vue/packages/composable/src/useFileRow.d.ts +21 -0
  144. package/dist-vue/packages/models/src/schema/Agent.d.ts +28 -0
  145. package/dist-vue/packages/models/src/schema/Document.d.ts +173 -0
  146. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
  147. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
  148. package/dist-vue/packages/models/src/schema/Tabular.d.ts +181 -0
  149. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  150. package/dist-vue/style.css +1 -1
  151. package/package.json +1 -1
  152. package/dist/_chunks/Agent-Cu04vBnd.js.map +0 -1
  153. package/dist/_chunks/PkStreamingMarkdown-Qk9Tk_N7.js.map +0 -1
  154. package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js +0 -75
  155. package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js.map +0 -1
  156. package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js +0 -65
  157. package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js.map +0 -1
  158. package/dist/_chunks/PkToolShowVideo-DClps9oP.js +0 -123
  159. package/dist/_chunks/PkToolShowVideo-DClps9oP.js.map +0 -1
  160. package/dist/_chunks/PkToolShowWebPages-BOxbTe2X.js.map +0 -1
  161. package/dist/_chunks/markdown-_p-gd9w8.js.map +0 -1
  162. package/dist-vue/_chunks/Agent-KbZm8GvA.js.map +0 -1
  163. package/dist-vue/_chunks/Document-DCSWwcRE.js.map +0 -1
  164. package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js +0 -272
  165. package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js.map +0 -1
  166. package/dist-vue/_chunks/PkChatbotFilePreview-CwiVQDF2.js.map +0 -1
  167. package/dist-vue/_chunks/PkChatbotMessages-UT72KC_z.js +0 -769
  168. package/dist-vue/_chunks/PkChatbotMessages-UT72KC_z.js.map +0 -1
  169. package/dist-vue/_chunks/PkChatbotSteps-Y6kQ00ui.js +0 -191
  170. package/dist-vue/_chunks/PkChatbotViewChat-D3PwREDw.js +0 -784
  171. package/dist-vue/_chunks/PkChatbotViewChat-D3PwREDw.js.map +0 -1
  172. package/dist-vue/_chunks/PkChatbotViewFiles-BStYLY2B.js +0 -111
  173. package/dist-vue/_chunks/PkChatbotViewFiles-BStYLY2B.js.map +0 -1
  174. package/dist-vue/_chunks/PkStreamingMarkdown-CJlfq7ub.js.map +0 -1
  175. package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js +0 -75
  176. package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js.map +0 -1
  177. package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js +0 -65
  178. package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js.map +0 -1
  179. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js +0 -122
  180. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +0 -1
  181. package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js +0 -79
  182. package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js.map +0 -1
  183. package/dist-vue/_chunks/useChatbotStore-DEELIJ89.js.map +0 -1
  184. package/dist-vue/_chunks/utils-CtD8DCrq.js +0 -184
  185. package/dist-vue/_chunks/utils-CtD8DCrq.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-Cu04vBnd.js";
4
+ import { l as te } from "./Agent-CJbRpoZG.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-C5eH4Cpq.js";
10
11
  //#region ../../packages/utils/src/citations.ts
11
- var m = /[ \t]*\uE200[^\uE201]*\uE201/g, oe = /[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, se = /[\uE200-\uE20F]/g;
12
- function ce(e) {
13
- return e && e.replace(m, "").replace(oe, "").replace(se, "");
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
@@ -23,25 +24,25 @@ function g(e) {
23
24
  function _(e) {
24
25
  return g(e) ? e.type.slice(5) : "";
25
26
  }
26
- function le(e) {
27
+ function ue(e) {
27
28
  return e ? e.type === "file" : !1;
28
29
  }
29
- function ue(e) {
30
- if (!le(e)) return;
30
+ function de(e) {
31
+ if (!ue(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 de(e) {
35
+ function fe(e) {
35
36
  return e ? e.type === "reasoning" : !1;
36
37
  }
37
- function fe(e) {
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 pe(e) {
45
+ function me(e) {
45
46
  let t = [];
46
47
  for (let n of e) {
47
48
  if (!h(n)) {
@@ -56,20 +57,29 @@ function pe(e) {
56
57
  }
57
58
  return t;
58
59
  }
59
- var me = (e) => g(e) && te(_(e));
60
- function he(e) {
60
+ var he = (e) => g(e) && te(_(e));
61
+ function ge(e) {
61
62
  let t = /* @__PURE__ */ new Map();
62
- for (let [n, r] of e.entries()) me(r) && r.state !== "output-error" && !v(r) && t.set(r.type, n);
63
- return e.filter((e, n) => !(me(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
63
+ for (let [n, r] of e.entries()) he(r) && r.state !== "output-error" && !ye(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
- function v(e) {
66
- return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
66
+ var v = /* @__PURE__ */ new Set(["tool-editSpreadsheet"]);
67
+ function _e(e) {
68
+ let t = e.filter((e) => v.has(e.type));
69
+ return t.length > 0 ? [...e.filter((e) => !v.has(e.type)), ...t] : e;
67
70
  }
68
- var ge = 4e3, _e = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
69
71
  function ve(e, t) {
72
+ let n = e.toolCallId;
73
+ return v.has(e.type) && n ? `file-${n}` : t;
74
+ }
75
+ function ye(e) {
76
+ return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
77
+ }
78
+ var be = 4e3, y = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
79
+ function xe(e, t) {
70
80
  if (e.length <= t) return e;
71
81
  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(_e)) {
82
+ for (let t of e.matchAll(y)) {
73
83
  if (t.index >= a) break;
74
84
  let [, e, n] = t;
75
85
  if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
@@ -80,40 +90,40 @@ function ve(e, t) {
80
90
  }
81
91
  return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
82
92
  }
83
- var ye = /* @__PURE__ */ new Set([
93
+ var Se = /* @__PURE__ */ new Set([
84
94
  "approval-requested",
85
95
  "approval-responded",
86
96
  "output-denied"
87
97
  ]);
88
- function be(e) {
89
- return g(e) ? ye.has(e.state) ? !0 : e.approval != null : !1;
98
+ function Ce(e) {
99
+ return g(e) ? Se.has(e.state) ? !0 : e.approval != null : !1;
90
100
  }
91
- var y = "requestConfirm";
92
- function xe(e) {
101
+ var we = "requestConfirm";
102
+ function Te(e) {
93
103
  return g(e) && e.type === "tool-requestConfirm";
94
104
  }
95
- function Se(e) {
96
- return be(e) || xe(e);
105
+ function Ee(e) {
106
+ return Ce(e) || Te(e);
97
107
  }
98
- function Ce(e) {
108
+ function De(e) {
99
109
  if (g(e)) return e.approval?.id;
100
110
  }
101
- function we(e) {
111
+ function Oe(e) {
102
112
  if (e && "state" in e) return e.state;
103
113
  }
104
- function Te(e = "000000") {
114
+ function ke(e = "000000") {
105
115
  let t = e.replace("#", "");
106
116
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
107
117
  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
118
  return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
109
119
  }
110
- function Ee(e, t) {
111
- return e === "white" || e === "black" ? e : Te(t);
120
+ function b(e, t) {
121
+ return e === "white" || e === "black" ? e : ke(t);
112
122
  }
113
- function De(e, t) {
123
+ function Ae(e, t) {
114
124
  if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
115
125
  }
116
- function Oe(e) {
126
+ function x(e) {
117
127
  if (e !== void 0) {
118
128
  if (typeof e == "string") return e.trim() || void 0;
119
129
  try {
@@ -124,10 +134,10 @@ function Oe(e) {
124
134
  }
125
135
  }
126
136
  }
127
- function ke(e) {
128
- return Oe(e) !== void 0;
137
+ function je(e) {
138
+ return x(e) !== void 0;
129
139
  }
130
- function b(e, t) {
140
+ function S(e, t) {
131
141
  let n = e?.input;
132
142
  if (typeof t == "string") {
133
143
  let e = n?.question ?? n?.steps?.[0]?.question;
@@ -139,14 +149,14 @@ function b(e, t) {
139
149
  return i ? `${i} ${n}` : n;
140
150
  }).join(". ");
141
151
  }
142
- function Ae(e) {
152
+ function Me(e) {
143
153
  return e?.options ? e.options.map((e) => ({
144
154
  label: e.label,
145
155
  value: e.label,
146
156
  description: e.description
147
157
  })) : [];
148
158
  }
149
- function x(e, t) {
159
+ function Ne(e, t) {
150
160
  let n = {};
151
161
  if (t == null) return n;
152
162
  if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
@@ -162,12 +172,12 @@ function x(e, t) {
162
172
  for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
163
173
  return n;
164
174
  }
165
- var je = [
175
+ var C = [
166
176
  "tool-perplexity_search",
167
177
  "tool-parallel_search",
168
178
  "tool-web_search",
169
179
  "tool-google_search"
170
- ], S = /* @__PURE__ */ new Set([
180
+ ], Pe = /* @__PURE__ */ new Set([
171
181
  "tool-searchInKnowledgeBase",
172
182
  "tool-retrieveRevisedAnswers",
173
183
  "tool-expandChunkContext",
@@ -176,72 +186,78 @@ var je = [
176
186
  "tool-geocode",
177
187
  "tool-recallUserMemory",
178
188
  "tool-saveUserMemory",
179
- ...je
189
+ ...C
180
190
  ]);
181
- function Me(e) {
182
- return g(e) && S.has(e.type);
191
+ function Fe(e) {
192
+ return g(e) && Pe.has(e.type);
183
193
  }
184
- var Ne = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, C = (e, ...t) => {
194
+ var Ie = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, w = (e, ...t) => {
185
195
  for (let n of t) {
186
196
  let t = e?.[n];
187
197
  if (typeof t == "string" && t.trim()) return t;
188
198
  }
189
199
  };
190
- function Pe(e) {
200
+ function T(e) {
191
201
  if (!g(e)) return;
192
- let t = Ne("input" in e ? e.input : void 0), n = Ne("output" in e ? e.output : void 0);
193
- if (e.type === "tool-searchInKnowledgeBase" || je.includes(e.type)) {
202
+ let t = Ie("input" in e ? e.input : void 0), n = Ie("output" in e ? e.output : void 0);
203
+ if (e.type === "tool-searchInKnowledgeBase" || C.includes(e.type)) {
194
204
  let e = t?.queries;
195
205
  if (Array.isArray(e)) {
196
206
  let t = e.filter((e) => typeof e == "string" && !!e.trim());
197
207
  return t.length ? t.join(" · ") : void 0;
198
208
  }
199
- return C(t, "query", "objective");
200
- }
201
- if (e.type === "tool-retrieveRevisedAnswers") return C(t, "query");
202
- if (e.type === "tool-getWeather") return C(n, "location") ?? C(t, "locationName");
203
- if (e.type === "tool-geocode") return C(t, "locationName");
204
- if (e.type === "tool-expandChunkContext") return C(n, "documentName");
205
- if (e.type === "tool-readDocumentFile") return C(n, "name");
206
- if (e.type === "tool-recallUserMemory") return C(t, "query");
207
- if (e.type === "tool-saveUserMemory") return C(t, "content", "query");
208
- }
209
- function Fe(e) {
210
- 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 (de(e)) return "ri:lightbulb-line";
209
+ return w(t, "query", "objective");
210
+ }
211
+ if (e.type === "tool-retrieveRevisedAnswers") return w(t, "query");
212
+ if (e.type === "tool-getWeather") return w(n, "location") ?? w(t, "locationName");
213
+ if (e.type === "tool-geocode") return w(t, "locationName");
214
+ if (e.type === "tool-expandChunkContext") return w(n, "documentName");
215
+ if (e.type === "tool-readDocumentFile") return w(n, "name");
216
+ if (e.type === "tool-readSpreadsheet") {
217
+ let e = w(t, "sheet"), n = w(t, "range");
218
+ return e && n ? `${e}!${n}` : e;
219
+ }
220
+ if (e.type === "tool-editSpreadsheet") return w(n, "filename");
221
+ if (e.type === "tool-querySpreadsheet") return w(n, "file");
222
+ if (e.type === "tool-recallUserMemory") return w(t, "query");
223
+ if (e.type === "tool-saveUserMemory") return w(t, "content", "query");
224
+ }
225
+ function Le(e) {
226
+ 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-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-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";
227
+ if (fe(e)) return "ri:lightbulb-line";
212
228
  if (h(e)) return "ri:double-quotes-r";
213
229
  }
214
- function Ie(e, t) {
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") : je.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : de(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
230
+ function Re(e, t) {
231
+ 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-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : 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
232
  }
217
233
  //#endregion
218
234
  //#region ../../node_modules/.pnpm/remend@1.4.0/node_modules/remend/dist/index.js
219
- var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnPropertyDescriptors, T = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Ve = (e, t, n) => t in e ? Le(e, t, {
235
+ var ze = Object.defineProperty, Be = Object.defineProperties, Ve = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, Ue = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, Ge = (e, t, n) => t in e ? ze(e, t, {
220
236
  enumerable: !0,
221
237
  configurable: !0,
222
238
  writable: !0,
223
239
  value: n
224
- }) : e[t] = n, He = (e, t) => {
225
- for (var n in t ||= {}) ze.call(t, n) && Ve(e, n, t[n]);
226
- if (T) for (var n of T(t)) Be.call(t, n) && Ve(e, n, t[n]);
240
+ }) : e[t] = n, Ke = (e, t) => {
241
+ for (var n in t ||= {}) Ue.call(t, n) && Ge(e, n, t[n]);
242
+ if (He) for (var n of He(t)) We.call(t, n) && Ge(e, n, t[n]);
227
243
  return e;
228
- }, Ue = (e, t) => w(e, Re(t)), E = {
244
+ }, qe = (e, t) => Be(e, Ve(t)), E = {
229
245
  PROSE: 0,
230
246
  FENCE_MARKER: 1,
231
247
  FENCE_INFO: 2,
232
248
  FENCE_BODY: 3,
233
249
  CODE_SPAN: 4,
234
250
  CODE_SPAN_OPEN: 5
235
- }, We = /^(`{3,}|~{3,})(.*)$/, Ge = (e) => e !== void 0 && e >= "0" && e <= "9", Ke = (e, t) => {
251
+ }, Je = /^(`{3,}|~{3,})(.*)$/, Ye = (e) => e !== void 0 && e >= "0" && e <= "9", Xe = (e, t) => {
236
252
  let n = t;
237
253
  if (e[n] === "-" || e[n] === "*" || e[n] === "+") n += 1;
238
254
  else {
239
- for (; Ge(e[n]) && n - t < 9;) n += 1;
255
+ for (; Ye(e[n]) && n - t < 9;) n += 1;
240
256
  if (n === t || e[n] !== "." && e[n] !== ")") return -1;
241
257
  n += 1;
242
258
  }
243
259
  return e[n] === " " ? n + 1 : -1;
244
- }, qe = (e, t, n) => {
260
+ }, Ze = (e, t, n) => {
245
261
  let r = 0, i = t, a = !1, o = t;
246
262
  for (;;) {
247
263
  for (; o < n && e[o] === " ";) o += 1;
@@ -249,7 +265,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
249
265
  r += 1, o += e[o + 1] === " " ? 2 : 1, i = o, a = !1;
250
266
  continue;
251
267
  }
252
- let t = o < n ? Ke(e, o) : -1;
268
+ let t = o < n ? Xe(e, o) : -1;
253
269
  if (t === -1) return {
254
270
  contentStart: o,
255
271
  listIndent: a ? o - i : 0,
@@ -257,7 +273,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
257
273
  };
258
274
  o = t, a = !0;
259
275
  }
260
- }, Je = (e, t, n, r) => {
276
+ }, Qe = (e, t, n, r) => {
261
277
  let i = t;
262
278
  for (let t = 0; t < r; t += 1) {
263
279
  for (; i < n && e[i] === " ";) i += 1;
@@ -265,10 +281,10 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
265
281
  i += 1, e[i] === " " && (i += 1);
266
282
  }
267
283
  return i;
268
- }, Ye = (e, t, n, r, i) => {
284
+ }, $e = (e, t, n, r, i) => {
269
285
  let a = t + r;
270
286
  e.fill(E.FENCE_MARKER, a, a + i), e.fill(E.FENCE_INFO, a + i, Math.min(n + 1, e.length));
271
- }, Xe = (e, t, n, r) => {
287
+ }, et = (e, t, n, r) => {
272
288
  let i = t;
273
289
  for (; i < n && e[i] === " ";) i += 1;
274
290
  let a = 0;
@@ -279,40 +295,40 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
279
295
  i += 1;
280
296
  }
281
297
  return !0;
282
- }, Ze = (e, t, n, r) => {
283
- let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = qe(e, n, i), o = e.slice(a.contentStart, i).match(We);
298
+ }, tt = (e, t, n, r) => {
299
+ let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = Ze(e, n, i), o = e.slice(a.contentStart, i).match(Je);
284
300
  if (!o) return null;
285
301
  let [, s, c] = o, l = s[0];
286
- return l === "`" && c.includes("`") ? null : (Ye(t, n, r, a.contentStart - n, s.length), {
302
+ return l === "`" && c.includes("`") ? null : ($e(t, n, r, a.contentStart - n, s.length), {
287
303
  char: l,
288
304
  length: s.length,
289
305
  listIndent: a.listIndent,
290
306
  quoteDepth: a.quoteDepth
291
307
  });
292
- }, Qe = (e, t, n, r) => {
293
- let i = Je(e, t, n, r.quoteDepth);
308
+ }, nt = (e, t, n, r) => {
309
+ let i = Qe(e, t, n, r.quoteDepth);
294
310
  if (i === -1 || r.listIndent === 0) return i;
295
311
  let a = i;
296
312
  for (; a < n && e[a] === " ";) a += 1;
297
313
  return a === n || e[a] === "\r" && a + 1 === n || a - i >= r.listIndent ? i : -1;
298
- }, $e = (e, t) => {
314
+ }, rt = (e, t) => {
299
315
  let n = e.length, r = null, i = 0;
300
316
  for (; i < n;) {
301
317
  let a = e.indexOf("\n", i);
302
318
  a === -1 && (a = n);
303
- let o = r ? Qe(e, i, a, r) : -1;
304
- r && o === -1 && (r = null), r ? Xe(e, o, a, r) ? (t.fill(E.FENCE_MARKER, i, a), r = null) : t.fill(E.FENCE_BODY, i, Math.min(a + 1, n)) : r = Ze(e, t, i, a), i = a + 1;
319
+ let o = r ? nt(e, i, a, r) : -1;
320
+ r && o === -1 && (r = null), r ? et(e, o, a, r) ? (t.fill(E.FENCE_MARKER, i, a), r = null) : t.fill(E.FENCE_BODY, i, Math.min(a + 1, n)) : r = tt(e, t, i, a), i = a + 1;
305
321
  }
306
322
  return r;
307
- }, et = (e, t) => {
323
+ }, it = (e, t) => {
308
324
  let n = t + 1;
309
325
  for (; n < e.length && e[n] === "`";) n += 1;
310
326
  return n;
311
- }, tt = (e, t) => {
327
+ }, D = (e, t) => {
312
328
  let n = t + 1;
313
329
  for (; n < e.length && (e[n] === " " || e[n] === " " || e[n] === "\r");) n += 1;
314
330
  return n < e.length && e[n] === "\n";
315
- }, nt = (e, t, n) => {
331
+ }, at = (e, t, n) => {
316
332
  let r = n;
317
333
  for (;;) {
318
334
  let n = e.indexOf("`", r);
@@ -321,12 +337,12 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
321
337
  if (t[n] === E.PROSE && !i) return n;
322
338
  r = n + 1;
323
339
  }
324
- }, rt = (e, t) => {
340
+ }, ot = (e, t) => {
325
341
  let n = e.length, r = -1, i = 0, a = 0;
326
342
  for (; a < n;) {
327
343
  if (r < 0) {
328
- if (a = nt(e, t, a), a === -1) break;
329
- let n = et(e, a);
344
+ if (a = at(e, t, a), a === -1) break;
345
+ let n = it(e, a);
330
346
  r = a, i = n - a, a = n;
331
347
  continue;
332
348
  }
@@ -334,7 +350,7 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
334
350
  t.fill(E.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
335
351
  continue;
336
352
  }
337
- if (e[a] === "\n" && tt(e, a)) {
353
+ if (e[a] === "\n" && D(e, a)) {
338
354
  r = -1, a += 1;
339
355
  continue;
340
356
  }
@@ -342,76 +358,76 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
342
358
  a += 1;
343
359
  continue;
344
360
  }
345
- let n = et(e, a);
361
+ let n = it(e, a);
346
362
  n - a === i && (t.fill(E.CODE_SPAN, r, n), r = -1), a = n;
347
363
  }
348
364
  return r >= 0 ? (t.fill(E.CODE_SPAN_OPEN, r, n), {
349
365
  start: r,
350
366
  runLength: i
351
367
  }) : null;
352
- }, it = (e) => {
368
+ }, st = (e) => {
353
369
  let t = new Uint8Array(e.length);
354
370
  return {
355
371
  text: e,
356
372
  regions: t,
357
- openFence: $e(e, t),
358
- openSpan: rt(e, t),
373
+ openFence: rt(e, t),
374
+ openSpan: ot(e, t),
359
375
  mathMask: null,
360
376
  linkUrlMask: null,
361
377
  htmlTagMask: null
362
378
  };
363
- }, D = null, O = null, k = (e) => {
364
- if (O !== null && e === D) return O;
365
- let t = it(e);
366
- return D = e, O = t, t;
367
- }, at = () => {
368
- D = null, O = null;
369
- }, ot = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== E.PROSE, st = (e, t) => e.regions[t] === E.CODE_SPAN, ct = (e, t) => {
370
- let n = k(e), r = t + t, i = 0;
379
+ }, ct = null, lt = null, O = (e) => {
380
+ if (lt !== null && e === ct) return lt;
381
+ let t = st(e);
382
+ return ct = e, lt = t, t;
383
+ }, ut = () => {
384
+ ct = null, lt = null;
385
+ }, dt = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== E.PROSE, ft = (e, t) => e.regions[t] === E.CODE_SPAN, pt = (e, t) => {
386
+ let n = O(e), r = t + t, i = 0;
371
387
  for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === E.PROSE ? (i += 1, t += 2) : t += 1;
372
388
  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", pt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), A = (e, t, n) => {
389
+ }, mt = /* @__PURE__ */ new Uint8Array(), k = (e) => e === "inlineLatex" || e === "blockLatex", ht = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, gt = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", _t = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), vt = (e, t, n) => {
374
390
  let r = e[t + 1];
375
391
  if (e[t] === "\\") {
376
392
  if (r === "$") return {
377
393
  context: n,
378
394
  length: 2
379
395
  };
380
- let e = dt(n, r);
396
+ let e = ht(n, r);
381
397
  return e === null ? null : {
382
398
  context: e,
383
399
  length: 2
384
400
  };
385
401
  }
386
- if (e[t] === "$" && !ut(n)) {
402
+ if (e[t] === "$" && !k(n)) {
387
403
  let e = r === "$";
388
404
  return {
389
- context: ft(n, e),
405
+ context: gt(n, e),
390
406
  length: e ? 2 : 1
391
407
  };
392
408
  }
393
409
  return null;
394
- }, mt = (e) => {
410
+ }, yt = (e) => {
395
411
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = "none", o = 0;
396
412
  for (; o < r;) {
397
413
  i[o] = a === "none" ? 0 : 1;
398
- let e = n[o] === E.PROSE ? A(t, o, a) : null;
414
+ let e = n[o] === E.PROSE ? vt(t, o, a) : null;
399
415
  e === null ? o += 1 : (a = e.context, e.length === 2 && (i[o + 1] = a === "none" ? 0 : 1), o += e.length);
400
416
  }
401
417
  return i;
402
- }, ht = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = pt(e.text) ? mt(e) : lt), e.mathMask[t] === 1), gt = (e, t, n, r) => {
418
+ }, bt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = _t(e.text) ? yt(e) : mt), e.mathMask[t] === 1), xt = (e, t, n, r) => {
403
419
  let { text: i, regions: a } = e, o = new Uint8Array(n - t), s = 0;
404
420
  for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === E.PROSE && (s = 1), o[e - t] = s;
405
421
  let c = !1;
406
422
  for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === E.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
407
- }, _t = (e) => {
423
+ }, St = (e) => {
408
424
  let { text: t } = e, n = t.length, r = new Uint8Array(n), i = 0;
409
425
  for (; i < n;) {
410
426
  let a = t.indexOf("\n", i);
411
- a === -1 && (a = n), gt(e, i, a, r), i = a + 1;
427
+ a === -1 && (a = n), xt(e, i, a, r), i = a + 1;
412
428
  }
413
429
  return r;
414
- }, 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) => {
430
+ }, Ct = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? St(e) : mt), e.linkUrlMask[t] === 1), wt = (e) => {
415
431
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = !1;
416
432
  for (let e = 0; e < r; e += 1) if (t[e] === "\n") a = !1;
417
433
  else if (i[e] = +!!a, n[e] === E.PROSE) {
@@ -422,56 +438,56 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
422
438
  }
423
439
  }
424
440
  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), j = (e, t) => ot(k(e), t), M = (e, t) => st(k(e), t), xt = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, St = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(xt, (t, n, r, i) => j(e, i) ? t : `${n}\\>${r}`), N = (e, { delimiter: t, markerLength: n, regex: r }) => {
441
+ }, A = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? wt(e) : mt), e.htmlTagMask[t] === 1), j = (e, t) => dt(O(e), t), M = (e, t) => ft(O(e), t), Tt = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, Et = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(Tt, (t, n, r, i) => j(e, i) ? t : `${n}\\>${r}`), N = (e, { delimiter: t, markerLength: n, regex: r }) => {
426
442
  let i = e.lastIndexOf(t, e.length - 2), a = i === -1 ? e.length - 1 : i;
427
443
  return e.slice(Math.max(0, a - n + 1)).match(r);
428
- }, Ct = {
444
+ }, Dt = {
429
445
  delimiter: "*",
430
446
  markerLength: 2,
431
447
  regex: /(\*\*)([^*]*\*?)$/
432
- }, wt = {
448
+ }, Ot = {
433
449
  delimiter: "_",
434
450
  markerLength: 2,
435
451
  regex: /(__)([^_]*?)$/
436
- }, Tt = {
452
+ }, kt = {
437
453
  delimiter: "*",
438
454
  markerLength: 3,
439
455
  regex: /(\*\*\*)([^*]*?)$/
440
- }, Et = {
456
+ }, At = {
441
457
  delimiter: "*",
442
458
  markerLength: 1,
443
459
  regex: /(\*)([^*]*?)$/
444
- }, Dt = {
460
+ }, jt = {
445
461
  delimiter: "_",
446
462
  markerLength: 1,
447
463
  regex: /(_)([^_]*?)$/
448
- }, Ot = {
464
+ }, Mt = {
449
465
  delimiter: "~",
450
466
  markerLength: 2,
451
467
  regex: /(~~)([^~]*?)$/
452
- }, kt = {
468
+ }, Nt = {
453
469
  delimiter: "_",
454
470
  markerLength: 2,
455
471
  regex: /(__)([^_]+)_$/
456
- }, At = {
472
+ }, Pt = {
457
473
  delimiter: "~",
458
474
  markerLength: 2,
459
475
  regex: /(~~)([^~]+)~$/
460
- }, P = /^[\s_~*`]*$/, jt = /^[\s]*[-*+][\s]+$/, Mt = /[\p{L}\p{N}_]/u, Nt = /^\*{4,}$/, F = (e) => {
476
+ }, P = /^[\s_~*`]*$/, F = /^[\s]*[-*+][\s]+$/, Ft = /[\p{L}\p{N}_]/u, It = /^\*{4,}$/, I = (e) => {
461
477
  if (!e) return !1;
462
478
  let t = e.charCodeAt(0);
463
- return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Mt.test(e);
464
- }, I = (e, t) => {
479
+ return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Ft.test(e);
480
+ }, Lt = (e, t) => {
465
481
  let n = 1;
466
482
  for (let r = t - 1; r >= 0; --r) if (e[r] === "]") n += 1;
467
483
  else if (e[r] === "[" && (--n, n === 0)) return r;
468
484
  return -1;
469
- }, Pt = (e, t) => {
485
+ }, Rt = (e, t) => {
470
486
  let n = 1;
471
487
  for (let r = t + 1; r < e.length; r += 1) if (e[r] === "[") n += 1;
472
488
  else if (e[r] === "]" && (--n, n === 0)) return r;
473
489
  return -1;
474
- }, Ft = (e, t) => ht(k(e), t), It = (e, t, n) => {
490
+ }, zt = (e, t) => bt(O(e), t), Bt = (e, t, n) => {
475
491
  let r = 0;
476
492
  for (let n = t - 1; n >= 0; --n) if (e[n] === "\n") {
477
493
  r = n + 1;
@@ -489,53 +505,53 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
489
505
  break;
490
506
  }
491
507
  return o >= 3 && !s;
492
- }, Lt = (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"), L = (e) => e === " " || e === " " || e === "\n", Rt = (e, t) => !!(e && t && F(e) && F(t)), zt = (e, t, n, r) => {
493
- let i = Rt(e, t), a = !!t && !L(t), o = !!e && !L(e);
508
+ }, Vt = (e, t, n, r) => n === "\\" || bt(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"), Ht = (e) => e === " " || e === " " || e === "\n", Ut = (e, t) => !!(e && t && I(e) && I(t)), Wt = (e, t, n, r) => {
509
+ let i = Ut(e, t), a = !!t && !Ht(t), o = !!e && !Ht(e);
494
510
  return i && n % 2 == 0 && !r ? { count: !1 } : o && n % 2 == 1 || a ? {
495
511
  count: !0,
496
512
  inWordAsteriskChain: i
497
513
  } : { count: !1 };
498
- }, Bt = (e) => {
499
- let t = k(e), n = 0, r = !1, i = e.length;
514
+ }, Gt = (e) => {
515
+ let t = O(e), n = 0, r = !1, i = e.length;
500
516
  for (let a = 0; a < i; a += 1) {
501
517
  if (e[a] !== "*" || t.regions[a] !== E.PROSE) {
502
- F(e[a]) || (r = !1);
518
+ I(e[a]) || (r = !1);
503
519
  continue;
504
520
  }
505
521
  let o = a > 0 ? e[a - 1] : "", s = a < i - 1 ? e[a + 1] : "";
506
- if (Lt(t, a, o, s)) continue;
507
- let c = zt(o, s, n, r);
522
+ if (Vt(t, a, o, s)) continue;
523
+ let c = Wt(o, s, n, r);
508
524
  c.count && (n += 1, r = c.inWordAsteriskChain);
509
525
  }
510
526
  return n;
511
- }, Vt = (e, t, n, r) => !!(n === "\\" || ht(e, t) || vt(e, t) || bt(e, t) || n === "_" || r === "_" || n && r && F(n) && F(r)), Ht = (e) => {
512
- let t = k(e), n = 0, r = e.length;
527
+ }, Kt = (e, t, n, r) => !!(n === "\\" || bt(e, t) || Ct(e, t) || A(e, t) || n === "_" || r === "_" || n && r && I(n) && I(r)), qt = (e) => {
528
+ let t = O(e), n = 0, r = e.length;
513
529
  for (let i = 0; i < r; i += 1) {
514
530
  if (e[i] !== "_" || t.regions[i] !== E.PROSE) continue;
515
531
  let a = i > 0 ? e[i - 1] : "", o = i < r - 1 ? e[i + 1] : "";
516
- Vt(t, i, a, o) || (n += 1);
532
+ Kt(t, i, a, o) || (n += 1);
517
533
  }
518
534
  return n;
519
- }, Ut = (e) => {
520
- let t = k(e), n = 0, r = 0;
535
+ }, Jt = (e) => {
536
+ let t = O(e), n = 0, r = 0;
521
537
  for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === E.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
522
538
  return r >= 3 && (n += Math.floor(r / 3)), n;
523
- }, Wt = (e) => ct(e, "*"), Gt = (e) => e === "" || e === " " || e === " " || e === "\n", Kt = (e, t, n, r, i) => {
524
- if (!(Gt(n) && Gt(r))) return !1;
539
+ }, Yt = (e) => pt(e, "*"), Xt = (e) => e === "" || e === " " || e === " " || e === "\n", Zt = (e, t, n, r, i) => {
540
+ if (!(Xt(n) && Xt(r))) return !1;
525
541
  if (t > i.lineEnd) {
526
542
  let n = e.indexOf("\n", t);
527
- i.lineEnd = n === -1 ? e.length : n, i.result = It(e, t, "_");
543
+ i.lineEnd = n === -1 ? e.length : n, i.result = Bt(e, t, "_");
528
544
  }
529
545
  return i.result;
530
- }, qt = (e, t, n, r) => {
546
+ }, Qt = (e, t, n, r) => {
531
547
  let i = e.text, a = t, o = !1;
532
548
  a > 0 && i[a - 1] === "\\" && (a += 1, o = !0);
533
549
  let s = n - a;
534
550
  if (s < 2) return !1;
535
551
  let c = a > 0 ? i[a - 1] : "", l = o ? "\\" : c, u = n < i.length ? i[n] : "";
536
- return F(l) && F(u) || Kt(i, a, l, u, r) || ht(e, a) || vt(e, a) || bt(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
537
- }, Jt = (e) => {
538
- let t = k(e), n = e.length, r = {
552
+ return I(l) && I(u) || Zt(i, a, l, u, r) || bt(e, a) || Ct(e, a) || A(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
553
+ }, $t = (e) => {
554
+ let t = O(e), n = e.length, r = {
539
555
  lineEnd: -1,
540
556
  result: !1
541
557
  }, i = !1, a = 0;
@@ -546,100 +562,100 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
546
562
  }
547
563
  let o = a, s = a + 1;
548
564
  for (; s < n && e[s] === "_" && t.regions[s] === E.PROSE;) s += 1;
549
- a = s, qt(t, o, s, r) && (i = !i);
565
+ a = s, Qt(t, o, s, r) && (i = !i);
550
566
  }
551
567
  return i;
552
- }, Yt = (e, t, n) => {
568
+ }, en = (e, t, n) => {
553
569
  if (!t || P.test(t)) return !0;
554
570
  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 : It(e, n, "*");
556
- }, Xt = (e) => {
557
- let t = N(e, Ct);
571
+ return F.test(a) && t.includes("\n") ? !0 : Bt(e, n, "*");
572
+ }, tn = (e) => {
573
+ let t = N(e, Dt);
558
574
  if (!t) return e;
559
575
  let n = t[2], r = e.lastIndexOf(t[1]);
560
- return j(e, r) || M(e, r) || Yt(e, n, r) ? e : Wt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
561
- }, Zt = (e, t, n) => {
576
+ return j(e, r) || M(e, r) || en(e, n, r) ? e : Yt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
577
+ }, nn = (e, t, n) => {
562
578
  if (!t || P.test(t)) return !0;
563
579
  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 : It(e, n, "_");
565
- }, Qt = (e) => {
566
- let t = N(e, wt);
580
+ return F.test(a) && t.includes("\n") ? !0 : Bt(e, n, "_");
581
+ }, rn = (e) => {
582
+ let t = N(e, Ot);
567
583
  if (!t) {
568
- let t = N(e, kt);
584
+ let t = N(e, Nt);
569
585
  if (t) {
570
586
  let n = e.lastIndexOf(t[1]);
571
- if (!(j(e, n) || M(e, n)) && Jt(e)) return `${e}_`;
587
+ if (!(j(e, n) || M(e, n)) && $t(e)) return `${e}_`;
572
588
  }
573
589
  return e;
574
590
  }
575
591
  let n = t[2], r = e.lastIndexOf(t[1]);
576
- return j(e, r) || M(e, r) || Zt(e, n, r) ? e : Jt(e) ? `${e}__` : e;
577
- }, $t = (e, t) => {
592
+ return j(e, r) || M(e, r) || nn(e, n, r) ? e : $t(e) ? `${e}__` : e;
593
+ }, an = (e, t) => {
578
594
  let { text: n } = e;
579
- return n[t] === "*" && e.regions[t] === E.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !ht(e, t);
580
- }, en = (e) => {
581
- let t = k(e);
595
+ return n[t] === "*" && e.regions[t] === E.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !bt(e, t);
596
+ }, on = (e) => {
597
+ let t = O(e);
582
598
  for (let n = e.indexOf("*"); n !== -1; n = e.indexOf("*", n + 1)) {
583
- if (!$t(t, n)) continue;
584
- let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || L(r), o = !i || L(i);
585
- if (!(a && o) && !(r && i && F(r) && F(i)) && !o) return n;
599
+ if (!an(t, n)) continue;
600
+ let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || Ht(r), o = !i || Ht(i);
601
+ if (!(a && o) && !(r && i && I(r) && I(i)) && !o) return n;
586
602
  }
587
603
  return -1;
588
- }, tn = (e) => {
589
- if (!N(e, Et)) return e;
590
- let t = en(e);
604
+ }, sn = (e) => {
605
+ if (!N(e, At)) return e;
606
+ let t = on(e);
591
607
  if (t === -1 || j(e, t) || M(e, t)) return e;
592
608
  let n = e.substring(t + 1);
593
- return !n || P.test(n) ? e : Bt(e) % 2 == 1 ? `${e}*` : e;
594
- }, nn = (e) => {
595
- let t = k(e);
596
- for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === E.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !ht(t, n) && !vt(t, n)) {
609
+ return !n || P.test(n) ? e : Gt(e) % 2 == 1 ? `${e}*` : e;
610
+ }, cn = (e) => {
611
+ let t = O(e);
612
+ for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === E.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !bt(t, n) && !Ct(t, n)) {
597
613
  let t = n > 0 ? e[n - 1] : "", r = n < e.length - 1 ? e[n + 1] : "";
598
- if (t && r && F(t) && F(r)) continue;
614
+ if (t && r && I(t) && I(r)) continue;
599
615
  return n;
600
616
  }
601
617
  return -1;
602
- }, rn = (e) => {
618
+ }, ln = (e) => {
603
619
  let t = e.length;
604
620
  for (; t > 0 && e[t - 1] === "\n";) --t;
605
621
  return t < e.length ? `${e.slice(0, t)}_${e.slice(t)}` : `${e}_`;
606
- }, an = (e) => {
622
+ }, un = (e) => {
607
623
  if (!e.endsWith("**")) return null;
608
624
  let t = e.slice(0, -2);
609
- if (Wt(t) % 2 != 1) return null;
610
- let n = t.indexOf("**"), r = nn(t);
625
+ if (Yt(t) % 2 != 1) return null;
626
+ let n = t.indexOf("**"), r = cn(t);
611
627
  return n !== -1 && r !== -1 && n < r ? `${t}_**` : null;
612
- }, on = (e) => {
613
- if (!N(e, Dt)) return e;
614
- let t = nn(e);
628
+ }, dn = (e) => {
629
+ if (!N(e, jt)) return e;
630
+ let t = cn(e);
615
631
  if (t === -1) return e;
616
632
  let n = e.substring(t + 1);
617
633
  if (!n || P.test(n) || j(e, t) || M(e, t)) return e;
618
- if (Ht(e) % 2 == 1) {
619
- let t = an(e);
620
- return t === null ? rn(e) : t;
634
+ if (qt(e) % 2 == 1) {
635
+ let t = un(e);
636
+ return t === null ? ln(e) : t;
621
637
  }
622
638
  return e;
623
- }, sn = (e) => {
624
- let t = Wt(e), n = Bt(e);
639
+ }, fn = (e) => {
640
+ let t = Yt(e), n = Gt(e);
625
641
  return t % 2 == 0 && n % 2 == 0;
626
- }, cn = (e, t, n) => !t || P.test(t) || j(e, n) || M(e, n) ? !0 : It(e, n, "*"), ln = (e) => {
627
- if (Nt.test(e)) return e;
628
- let t = N(e, Tt);
642
+ }, pn = (e, t, n) => !t || P.test(t) || j(e, n) || M(e, n) ? !0 : Bt(e, n, "*"), mn = (e) => {
643
+ if (It.test(e)) return e;
644
+ let t = N(e, kt);
629
645
  if (!t) return e;
630
646
  let n = t[2];
631
- return cn(e, n, e.lastIndexOf(t[1])) ? e : Ut(e) % 2 == 1 ? sn(e) ? e : `${e}***` : e;
632
- }, un = /<[a-zA-Z/][^>]*$/, dn = /[a-zA-Z/]/, fn = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), pn = (e, t) => {
647
+ return pn(e, n, e.lastIndexOf(t[1])) ? e : Jt(e) % 2 == 1 ? fn(e) ? e : `${e}***` : e;
648
+ }, hn = /<[a-zA-Z/][^>]*$/, gn = /[a-zA-Z/]/, _n = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), vn = (e, t) => {
633
649
  let n = e[t + 1];
634
- return n !== void 0 && dn.test(n);
635
- }, mn = (e) => {
636
- let t = e.match(un);
650
+ return n !== void 0 && gn.test(n);
651
+ }, yn = (e) => {
652
+ let t = e.match(hn);
637
653
  if (!t || t.index === void 0) return e;
638
- let n = fn(e);
639
- for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && pn(e, r) && !j(e, r) && !(n && Ft(e, r))) return e.substring(0, r).trimEnd();
654
+ let n = _n(e);
655
+ for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && vn(e, r) && !j(e, r) && !(n && zt(e, r))) return e.substring(0, r).trimEnd();
640
656
  return e;
641
- }, hn = (e) => {
642
- let t = k(e);
657
+ }, bn = (e) => {
658
+ let t = O(e);
643
659
  if (t.openFence) return e;
644
660
  let n = t.openSpan;
645
661
  if (!n) return e;
@@ -648,25 +664,25 @@ var Le = Object.defineProperty, w = Object.defineProperties, Re = Object.getOwnP
648
664
  let i = 0, a = e.length - 1;
649
665
  for (; a >= 0 && e[a] === "`";) i += 1, --a;
650
666
  return i >= n.runLength ? e : e + "`".repeat(n.runLength - i);
651
- }, gn = (e) => ct(e, "$"), _n = (e) => {
652
- let t = k(e), n = 0;
667
+ }, xn = (e) => pt(e, "$"), Sn = (e) => {
668
+ let t = O(e), n = 0;
653
669
  for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === E.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
654
670
  return n;
655
- }, vn = (e) => {
671
+ }, Cn = (e) => {
656
672
  if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
657
673
  let t = e.indexOf("$$");
658
674
  return t !== -1 && e.indexOf("\n", t) !== -1 && !e.endsWith("\n") ? `${e}
659
675
  $$` : `${e}$$`;
660
- }, yn = (e) => gn(e) % 2 == 0 ? e : vn(e), bn = (e) => _n(e) % 2 == 1 ? `${e}$` : e, xn = "streamdown:incomplete-image", Sn = (e, t, n) => {
676
+ }, wn = (e) => xn(e) % 2 == 0 ? e : Cn(e), Tn = (e) => Sn(e) % 2 == 1 ? `${e}$` : e, En = "streamdown:incomplete-image", Dn = (e, t, n) => {
661
677
  if (e.substring(t + 2).includes(")")) return null;
662
- let r = I(e, t);
678
+ let r = Lt(e, t);
663
679
  if (r === -1 || j(e, r)) return null;
664
680
  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}![${s}](${xn})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
666
- }, Cn = (e, t) => {
681
+ return i ? `${o}![${s}](${En})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
682
+ }, On = (e, t) => {
667
683
  for (let n = 0; n < t; n++) if (e[n] === "[" && !j(e, n)) {
668
684
  if (n > 0 && e[n - 1] === "!") continue;
669
- let t = Pt(e, n);
685
+ let t = Rt(e, n);
670
686
  if (t === -1) return n;
671
687
  if (t + 1 < e.length && e[t + 1] === "(") {
672
688
  let r = e.indexOf(")", t + 2);
@@ -674,69 +690,69 @@ $$` : `${e}$$`;
674
690
  }
675
691
  }
676
692
  return t;
677
- }, wn = (e, t, n) => {
693
+ }, kn = (e, t, n) => {
678
694
  let r = t > 0 && e[t - 1] === "!", i = r ? t - 1 : t;
679
- if (!e.substring(t + 1).includes("]") || Pt(e, t) === -1) {
695
+ if (!e.substring(t + 1).includes("]") || Rt(e, t) === -1) {
680
696
  let a = e.substring(0, i);
681
- if (r) return `${a}![${e.substring(t + 1)}](${xn})`;
697
+ if (r) return `${a}![${e.substring(t + 1)}](${En})`;
682
698
  if (n === "text-only") {
683
- let n = Cn(e, t);
699
+ let n = On(e, t);
684
700
  return e.substring(0, n) + e.substring(n + 1);
685
701
  }
686
702
  return `${e}](streamdown:incomplete-link)`;
687
703
  }
688
704
  return null;
689
- }, Tn = (e, t) => {
705
+ }, An = (e, t) => {
690
706
  let n = e.lastIndexOf("](");
691
707
  if (n !== -1 && !j(e, n)) {
692
- let r = Sn(e, n, t);
708
+ let r = Dn(e, n, t);
693
709
  if (r !== null) return r;
694
710
  }
695
711
  for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!j(e, n)) {
696
- let r = wn(e, n, t);
712
+ let r = kn(e, n, t);
697
713
  if (r !== null) return r;
698
714
  }
699
715
  return e;
700
- }, En = 32, Dn = (e, t = "protocol") => {
716
+ }, jn = 32, Mn = (e, t = "protocol") => {
701
717
  let n = e;
702
- for (let e = 0; e < En; e += 1) {
703
- let e = Tn(n, t);
718
+ for (let e = 0; e < jn; e += 1) {
719
+ let e = An(n, t);
704
720
  if (e.length >= n.length) return e;
705
721
  n = e;
706
722
  }
707
723
  return n;
708
- }, On = /^-{1,2}$/, kn = /^[\s]*-{1,2}[\s]+$/, An = /^={1,2}$/, jn = /^[\s]*={1,2}[\s]+$/, Mn = (e) => {
724
+ }, Nn = /^-{1,2}$/, Pn = /^[\s]*-{1,2}[\s]+$/, Fn = /^={1,2}$/, In = /^[\s]*={1,2}[\s]+$/, Ln = (e) => {
709
725
  if (!e || typeof e != "string") return e;
710
726
  let t = e.lastIndexOf("\n");
711
727
  if (t === -1) return e;
712
728
  let n = e.substring(t + 1), r = e.substring(0, t), i = n.trim();
713
- if (On.test(i) && !n.match(kn)) {
729
+ if (Nn.test(i) && !n.match(Pn)) {
714
730
  let t = r.split("\n").at(-1);
715
731
  if (t && t.trim().length > 0) return `${e}\u200B`;
716
732
  }
717
- if (An.test(i) && !n.match(jn)) {
733
+ if (Fn.test(i) && !n.match(In)) {
718
734
  let t = r.split("\n").at(-1);
719
735
  if (t && t.trim().length > 0) return `${e}\u200B`;
720
736
  }
721
737
  return e;
722
- }, Nn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, Pn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Nn, (t, n, r) => j(e, r + n.length) ? t : `${n}\\~`), Fn = (e) => ct(e, "~"), In = (e) => {
723
- let t = N(e, Ot);
738
+ }, Rn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, zn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Rn, (t, n, r) => j(e, r + n.length) ? t : `${n}\\~`), Bn = (e) => pt(e, "~"), Vn = (e) => {
739
+ let t = N(e, Mt);
724
740
  if (t) {
725
741
  let n = t[2];
726
742
  if (!n || P.test(n)) return e;
727
743
  let r = e.lastIndexOf(t[1]);
728
744
  if (j(e, r) || M(e, r)) return e;
729
- if (Fn(e) % 2 == 1) return `${e}~~`;
745
+ if (Bn(e) % 2 == 1) return `${e}~~`;
730
746
  } else {
731
- let t = N(e, At);
747
+ let t = N(e, Pt);
732
748
  if (t) {
733
749
  let n = e.lastIndexOf(t[0].slice(0, 2));
734
750
  if (j(e, n) || M(e, n)) return e;
735
- if (Fn(e) % 2 == 1) return `${e}~`;
751
+ if (Bn(e) % 2 == 1) return `${e}~`;
736
752
  }
737
753
  }
738
754
  return e;
739
- }, Ln = (e) => e !== !1, Rn = (e) => e === !0, R = {
755
+ }, Hn = (e) => e !== !1, Un = (e) => e === !0, L = {
740
756
  SINGLE_TILDE: 0,
741
757
  COMPARISON_OPERATORS: 5,
742
758
  HTML_TAGS: 10,
@@ -752,44 +768,44 @@ $$` : `${e}$$`;
752
768
  KATEX: 70,
753
769
  INLINE_KATEX: 75,
754
770
  DEFAULT: 100
755
- }, zn = [
771
+ }, Wn = [
756
772
  {
757
773
  handler: {
758
774
  name: "singleTilde",
759
- handle: Pn,
760
- priority: R.SINGLE_TILDE
775
+ handle: zn,
776
+ priority: L.SINGLE_TILDE
761
777
  },
762
778
  optionKey: "singleTilde"
763
779
  },
764
780
  {
765
781
  handler: {
766
782
  name: "comparisonOperators",
767
- handle: St,
768
- priority: R.COMPARISON_OPERATORS
783
+ handle: Et,
784
+ priority: L.COMPARISON_OPERATORS
769
785
  },
770
786
  optionKey: "comparisonOperators"
771
787
  },
772
788
  {
773
789
  handler: {
774
790
  name: "htmlTags",
775
- handle: mn,
776
- priority: R.HTML_TAGS
791
+ handle: yn,
792
+ priority: L.HTML_TAGS
777
793
  },
778
794
  optionKey: "htmlTags"
779
795
  },
780
796
  {
781
797
  handler: {
782
798
  name: "setextHeadings",
783
- handle: Mn,
784
- priority: R.SETEXT_HEADINGS
799
+ handle: Ln,
800
+ priority: L.SETEXT_HEADINGS
785
801
  },
786
802
  optionKey: "setextHeadings"
787
803
  },
788
804
  {
789
805
  handler: {
790
806
  name: "links",
791
- handle: Dn,
792
- priority: R.LINKS
807
+ handle: Mn,
808
+ priority: L.LINKS
793
809
  },
794
810
  optionKey: "links",
795
811
  earlyReturn: (e) => e.endsWith("](streamdown:incomplete-link)") || e.endsWith("](streamdown:incomplete-image)")
@@ -797,100 +813,100 @@ $$` : `${e}$$`;
797
813
  {
798
814
  handler: {
799
815
  name: "boldItalic",
800
- handle: ln,
801
- priority: R.BOLD_ITALIC
816
+ handle: mn,
817
+ priority: L.BOLD_ITALIC
802
818
  },
803
819
  optionKey: "boldItalic"
804
820
  },
805
821
  {
806
822
  handler: {
807
823
  name: "bold",
808
- handle: Xt,
809
- priority: R.BOLD
824
+ handle: tn,
825
+ priority: L.BOLD
810
826
  },
811
827
  optionKey: "bold"
812
828
  },
813
829
  {
814
830
  handler: {
815
831
  name: "italicDoubleUnderscore",
816
- handle: Qt,
817
- priority: R.ITALIC_DOUBLE_UNDERSCORE
832
+ handle: rn,
833
+ priority: L.ITALIC_DOUBLE_UNDERSCORE
818
834
  },
819
835
  optionKey: "italic"
820
836
  },
821
837
  {
822
838
  handler: {
823
839
  name: "italicSingleAsterisk",
824
- handle: tn,
825
- priority: R.ITALIC_SINGLE_ASTERISK
840
+ handle: sn,
841
+ priority: L.ITALIC_SINGLE_ASTERISK
826
842
  },
827
843
  optionKey: "italic"
828
844
  },
829
845
  {
830
846
  handler: {
831
847
  name: "italicSingleUnderscore",
832
- handle: on,
833
- priority: R.ITALIC_SINGLE_UNDERSCORE
848
+ handle: dn,
849
+ priority: L.ITALIC_SINGLE_UNDERSCORE
834
850
  },
835
851
  optionKey: "italic"
836
852
  },
837
853
  {
838
854
  handler: {
839
855
  name: "inlineCode",
840
- handle: hn,
841
- priority: R.INLINE_CODE
856
+ handle: bn,
857
+ priority: L.INLINE_CODE
842
858
  },
843
859
  optionKey: "inlineCode"
844
860
  },
845
861
  {
846
862
  handler: {
847
863
  name: "strikethrough",
848
- handle: In,
849
- priority: R.STRIKETHROUGH
864
+ handle: Vn,
865
+ priority: L.STRIKETHROUGH
850
866
  },
851
867
  optionKey: "strikethrough"
852
868
  },
853
869
  {
854
870
  handler: {
855
871
  name: "katex",
856
- handle: yn,
857
- priority: R.KATEX
872
+ handle: wn,
873
+ priority: L.KATEX
858
874
  },
859
875
  optionKey: "katex"
860
876
  },
861
877
  {
862
878
  handler: {
863
879
  name: "inlineKatex",
864
- handle: bn,
865
- priority: R.INLINE_KATEX
880
+ handle: Tn,
881
+ priority: L.INLINE_KATEX
866
882
  },
867
883
  optionKey: "inlineKatex"
868
884
  }
869
- ], Bn = (e) => {
885
+ ], Gn = (e) => {
870
886
  let t = e?.linkMode ?? "protocol";
871
- return zn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? Ln(e?.links) || Ln(e?.images) : t.name === "inlineKatex" ? Rn(e?.inlineKatex) : Ln(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
872
- handler: Ue(He({}, e), { handle: (e) => Dn(e, t) }),
887
+ return Wn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? Hn(e?.links) || Hn(e?.images) : t.name === "inlineKatex" ? Un(e?.inlineKatex) : Hn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
888
+ handler: qe(Ke({}, e), { handle: (e) => Mn(e, t) }),
873
889
  earlyReturn: t === "protocol" ? n : void 0
874
890
  } : {
875
891
  handler: e,
876
892
  earlyReturn: n
877
893
  });
878
- }, Vn = (e, t) => {
894
+ }, Kn = (e, t) => {
879
895
  if (!e || typeof e != "string") return e;
880
- let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = Bn(t), i = (t?.handlers ?? []).map((e) => ({
881
- handler: Ue(He({}, e), { priority: e.priority ?? R.DEFAULT }),
896
+ let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = Gn(t), i = (t?.handlers ?? []).map((e) => ({
897
+ handler: qe(Ke({}, e), { priority: e.priority ?? L.DEFAULT }),
882
898
  earlyReturn: void 0
883
899
  })), a = [...r, ...i].sort((e, t) => (e.handler.priority ?? 0) - (t.handler.priority ?? 0));
884
900
  try {
885
901
  for (let { handler: e, earlyReturn: t } of a) if (n = e.handle(n), t != null && t(n)) return n;
886
902
  return n.endsWith(" ") && !n.endsWith(" ") ? n.slice(0, -1) : n;
887
903
  } finally {
888
- at();
904
+ ut();
889
905
  }
890
906
  };
891
907
  //#endregion
892
908
  //#region ../../node_modules/.pnpm/marked@18.1.0/node_modules/marked/lib/marked.esm.js
893
- function Hn() {
909
+ function qn() {
894
910
  return {
895
911
  async: !1,
896
912
  breaks: !1,
@@ -904,35 +920,35 @@ function Hn() {
904
920
  walkTokens: null
905
921
  };
906
922
  }
907
- var Un = Hn();
908
- function Wn(e) {
909
- Un = e;
923
+ var Jn = qn();
924
+ function Yn(e) {
925
+ Jn = e;
910
926
  }
911
- var Gn = { exec: () => null };
912
- function Kn(e) {
927
+ var Xn = { exec: () => null };
928
+ function Zn(e) {
913
929
  let t = [];
914
930
  return (n) => {
915
931
  let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
916
932
  return i || (i = e(r), t[r] = i), i;
917
933
  };
918
934
  }
919
- function z(e, t = "") {
935
+ function R(e, t = "") {
920
936
  let n = typeof e == "string" ? e : e.source, r = {
921
937
  replace: (e, t) => {
922
938
  let i = typeof t == "string" ? t : t.source;
923
- return i = i.replace(B.caret, "$1"), n = n.replace(e, i), r;
939
+ return i = i.replace(z.caret, "$1"), n = n.replace(e, i), r;
924
940
  },
925
941
  getRegex: () => new RegExp(n, t)
926
942
  };
927
943
  return r;
928
944
  }
929
- var qn = ((e = "") => {
945
+ var Qn = ((e = "") => {
930
946
  try {
931
947
  return !!RegExp("(?<=1)(?<!1)" + e);
932
948
  } catch {
933
949
  return !1;
934
950
  }
935
- })(), B = {
951
+ })(), z = {
936
952
  codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm,
937
953
  outputLinkReplace: /\\([\[\]])/g,
938
954
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -986,132 +1002,132 @@ var qn = ((e = "") => {
986
1002
  notSpaceStart: /^\S*/,
987
1003
  endingNewline: /\n$/,
988
1004
  listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
989
- nextBulletRegex: Kn((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
990
- hrRegex: Kn((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
991
- fencesBeginRegex: Kn((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
992
- headingBeginRegex: Kn((e) => RegExp(`^ {0,${e}}#`)),
993
- htmlBeginRegex: Kn((e) => RegExp(`^ {0,${e}}(?:</?(?:${cr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")),
994
- blockquoteBeginRegex: Kn((e) => RegExp(`^ {0,${e}}>`))
995
- }, Jn = /^(?:[ \t]*(?:\n|$))+/, Yn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Xn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Zn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Qn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, $n = / {0,3}(?:[*+-]|\d{1,9}[.)])/, er = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, tr = z(er).replace(/bull/g, $n).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(), nr = z(er).replace(/bull/g, $n).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(), rr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, ir = /^[^\n]+/, ar = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, or = z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ar).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), sr = z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, $n).getRegex(), cr = "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", lr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ur = z("^ {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", lr).replace("tag", cr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), dr = (e) => z(rr).replace("hr", Zn).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", cr).getRegex(), fr = dr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), pr = dr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), mr = {
996
- blockquote: z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", pr).getRegex(),
997
- code: Yn,
998
- def: or,
999
- fences: Xn,
1000
- heading: Qn,
1001
- hr: Zn,
1002
- html: ur,
1003
- lheading: tr,
1004
- list: sr,
1005
- newline: Jn,
1006
- paragraph: fr,
1007
- table: Gn,
1008
- text: ir
1009
- }, hr = z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Zn).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", cr).getRegex(), gr = {
1010
- ...mr,
1011
- lheading: nr,
1012
- table: hr,
1013
- paragraph: z(rr).replace("hr", Zn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", hr).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", cr).getRegex()
1014
- }, _r = {
1015
- ...mr,
1016
- html: z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", lr).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(),
1005
+ nextBulletRegex: Zn((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
1006
+ hrRegex: Zn((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
1007
+ fencesBeginRegex: Zn((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
1008
+ headingBeginRegex: Zn((e) => RegExp(`^ {0,${e}}#`)),
1009
+ htmlBeginRegex: Zn((e) => RegExp(`^ {0,${e}}(?:</?(?:${pr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")),
1010
+ blockquoteBeginRegex: Zn((e) => RegExp(`^ {0,${e}}>`))
1011
+ }, $n = /^(?:[ \t]*(?:\n|$))+/, er = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, tr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, nr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, rr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ir = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ar = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, or = R(ar).replace(/bull/g, ir).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(), sr = R(ar).replace(/bull/g, ir).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(), cr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, lr = /^[^\n]+/, ur = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, dr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ur).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), fr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ir).getRegex(), pr = "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", mr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, hr = 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", mr).replace("tag", pr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), gr = (e) => R(cr).replace("hr", nr).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", pr).getRegex(), _r = gr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), vr = gr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), yr = {
1012
+ blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(),
1013
+ code: er,
1014
+ def: dr,
1015
+ fences: tr,
1016
+ heading: rr,
1017
+ hr: nr,
1018
+ html: hr,
1019
+ lheading: or,
1020
+ list: fr,
1021
+ newline: $n,
1022
+ paragraph: _r,
1023
+ table: Xn,
1024
+ text: lr
1025
+ }, br = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", nr).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", pr).getRegex(), xr = {
1026
+ ...yr,
1027
+ lheading: sr,
1028
+ table: br,
1029
+ paragraph: R(cr).replace("hr", nr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", br).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", pr).getRegex()
1030
+ }, Sr = {
1031
+ ...yr,
1032
+ html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", mr).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
1033
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1018
1034
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1019
- fences: Gn,
1035
+ fences: Xn,
1020
1036
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1021
- paragraph: z(rr).replace("hr", Zn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", tr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1022
- }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Sr = /[\p{P}\p{S}]/u, Cr = /[\s\p{P}\p{S}]/u, wr = /[^\s\p{P}\p{S}]/u, Tr = z(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Cr).getRegex(), Er = /[\p{Pi}\p{Ps}"']/u, Dr = /(?!~)[\p{P}\p{S}]/u, Or = /(?!~)[\s\p{P}\p{S}]/u, kr = /(?:[^\s\p{P}\p{S}]|~)/u, Ar = z(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", qn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), jr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Mr = z(jr, "u").replace(/punct/g, Sr).getRegex(), Nr = z(jr, "u").replace(/punct/g, Dr).getRegex(), Pr = z(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Er).replace(/punct/g, Sr).getRegex(), Fr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = z(Fr, "gu").replace(/notPunctSpace/g, wr).replace(/punctSpace/g, Cr).replace(/punct/g, Sr).getRegex(), Lr = z(Fr, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, Or).replace(/punct/g, Dr).getRegex(), Rr = z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, wr).replace(/punctSpace/g, Cr).replace(/punct/g, Sr).getRegex(), zr = z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, wr).replace(/punctSpace/g, Cr).replace(/punct/g, Sr).getRegex(), Br = z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, wr).replace(/punctSpace/g, Cr).replace(/punct/g, Sr).getRegex(), Vr = z(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Sr).getRegex(), Hr = z("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, wr).replace(/punctSpace/g, Cr).replace(/punct/g, Sr).getRegex(), Ur = z(/\\(punct)/, "gu").replace(/punct/g, Sr).getRegex(), Wr = z(/^<(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(), Gr = z(lr).replace("(?:-->|$)", "-->").getRegex(), Kr = z("^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", Gr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), qr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, Jr = z(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", qr).getRegex(), Yr = z(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", Jr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xr = z(/^!?\[(label)\]\[(ref)\]/).replace("label", Jr).replace("ref", ar).getRegex(), Zr = z(/^!?\[(ref)\](?:\[\])?/).replace("ref", ar).getRegex(), Qr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, $r = z(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", qr).getRegex(), ei = z("reflink|nolink(?!\\()", "g").replace("reflink", z(/^!?\[(label)\]\[(ref)\]/).replace("label", $r).replace("ref", Qr).getRegex()).replace("nolink", z(/^!?\[(ref)\](?:\[\])?/).replace("ref", Qr).getRegex()).getRegex(), ti = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ni = z(/(?: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(), ri = {
1023
- _backpedal: Gn,
1024
- anyPunctuation: Ur,
1025
- autolink: Wr,
1026
- blockSkip: Ar,
1027
- br,
1028
- code: yr,
1029
- del: Gn,
1030
- delLDelim: Gn,
1031
- delRDelim: Gn,
1032
- emStrongLDelim: Mr,
1033
- emStrongRDelimAst: Ir,
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,
1048
- emStrongRDelimUnd: Br,
1049
- link: z(/^!?\[(label)\]\((.*?)\)/).replace("label", Jr).getRegex(),
1050
- reflink: z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Jr).getRegex()
1051
- }, ai = {
1052
- ...ri,
1053
- emStrongRDelimAst: Lr,
1054
- emStrongLDelim: Nr,
1055
- delLDelim: Vr,
1056
- delRDelim: Hr,
1057
- url: z(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", ni).replace("protocol", ti).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1058
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1059
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
1060
- text: z(/^(?:[^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", ti).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
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()
1065
- }, si = {
1066
- normal: mr,
1067
- gfm: gr,
1068
- pedantic: _r
1037
+ paragraph: R(cr).replace("hr", nr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", or).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1038
+ }, Cr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, wr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Tr = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Er = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Dr = /[\s\p{P}\p{S}]/u, Or = /[^\s\p{P}\p{S}]/u, kr = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Dr).getRegex(), Ar = /[\p{Pi}\p{Ps}"']/u, jr = /(?!~)[\p{P}\p{S}]/u, Mr = /(?!~)[\s\p{P}\p{S}]/u, Nr = /(?:[^\s\p{P}\p{S}]|~)/u, Pr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Qn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Fr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ir = R(Fr, "u").replace(/punct/g, B).getRegex(), Lr = R(Fr, "u").replace(/punct/g, jr).getRegex(), Rr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Ar).replace(/punct/g, B).getRegex(), zr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Br = R(zr, "gu").replace(/notPunctSpace/g, Or).replace(/punctSpace/g, Dr).replace(/punct/g, B).getRegex(), Vr = R(zr, "gu").replace(/notPunctSpace/g, Nr).replace(/punctSpace/g, Mr).replace(/punct/g, jr).getRegex(), Hr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Or).replace(/punctSpace/g, Dr).replace(/punct/g, B).getRegex(), Ur = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Or).replace(/punctSpace/g, Dr).replace(/punct/g, B).getRegex(), Wr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Or).replace(/punctSpace/g, Dr).replace(/punct/g, B).getRegex(), Gr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), Kr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Or).replace(/punctSpace/g, Dr).replace(/punct/g, B).getRegex(), qr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Jr = 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(), Yr = R(mr).replace("(?:-->|$)", "-->").getRegex(), Xr = 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", Yr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Zr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, Qr = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", Zr).getRegex(), $r = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", Qr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ei = R(/^!?\[(label)\]\[(ref)\]/).replace("label", Qr).replace("ref", ur).getRegex(), ti = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", ur).getRegex(), ni = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, ri = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", Zr).getRegex(), ii = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", ri).replace("ref", ni).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", ni).getRegex()).getRegex(), ai = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, oi = 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(), si = {
1039
+ _backpedal: Xn,
1040
+ anyPunctuation: qr,
1041
+ autolink: Jr,
1042
+ blockSkip: Pr,
1043
+ br: Tr,
1044
+ code: wr,
1045
+ del: Xn,
1046
+ delLDelim: Xn,
1047
+ delRDelim: Xn,
1048
+ emStrongLDelim: Ir,
1049
+ emStrongRDelimAst: Br,
1050
+ emStrongRDelimUnd: Ur,
1051
+ escape: Cr,
1052
+ link: $r,
1053
+ nolink: ti,
1054
+ punctuation: kr,
1055
+ reflink: ei,
1056
+ reflinkSearch: ii,
1057
+ tag: Xr,
1058
+ text: Er,
1059
+ url: Xn
1069
1060
  }, ci = {
1070
- normal: ri,
1071
- gfm: ai,
1072
- breaks: oi,
1073
- pedantic: ii
1061
+ ...si,
1062
+ emStrongLDelim: Rr,
1063
+ emStrongRDelimAst: Hr,
1064
+ emStrongRDelimUnd: Wr,
1065
+ link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", Qr).getRegex(),
1066
+ reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qr).getRegex()
1074
1067
  }, li = {
1068
+ ...si,
1069
+ emStrongRDelimAst: Vr,
1070
+ emStrongLDelim: Lr,
1071
+ delLDelim: Gr,
1072
+ delRDelim: Kr,
1073
+ url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", oi).replace("protocol", ai).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1074
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1075
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
1076
+ 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", ai).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
1077
+ }, ui = {
1078
+ ...li,
1079
+ br: R(Tr).replace("{2,}", "*").getRegex(),
1080
+ text: R(li.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1081
+ }, di = {
1082
+ normal: yr,
1083
+ gfm: xr,
1084
+ pedantic: Sr
1085
+ }, fi = {
1086
+ normal: si,
1087
+ gfm: li,
1088
+ breaks: ui,
1089
+ pedantic: ci
1090
+ }, pi = {
1075
1091
  "&": "&amp;",
1076
1092
  "<": "&lt;",
1077
1093
  ">": "&gt;",
1078
1094
  "\"": "&quot;",
1079
1095
  "'": "&#39;"
1080
- }, ui = (e) => li[e];
1096
+ }, mi = (e) => pi[e];
1081
1097
  function V(e, t) {
1082
1098
  if (t) {
1083
- if (B.escapeTest.test(e)) return e.replace(B.escapeReplace, ui);
1084
- } else if (B.escapeTestNoEncode.test(e)) return e.replace(B.escapeReplaceNoEncode, ui);
1099
+ if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, mi);
1100
+ } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, mi);
1085
1101
  return e;
1086
1102
  }
1087
- function di(e) {
1088
- return e.replace(B.numericCharacterReference, (e, t, n) => {
1103
+ function hi(e) {
1104
+ return e.replace(z.numericCharacterReference, (e, t, n) => {
1089
1105
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
1090
1106
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : String.fromCodePoint(r);
1091
1107
  });
1092
1108
  }
1093
- function fi(e) {
1109
+ function gi(e) {
1094
1110
  try {
1095
- e = encodeURI(e).replace(B.percentDecode, "%");
1111
+ e = encodeURI(e).replace(z.percentDecode, "%");
1096
1112
  } catch {
1097
1113
  return null;
1098
1114
  }
1099
1115
  return e;
1100
1116
  }
1101
- function pi(e, t) {
1102
- let n = e.replace(B.findPipe, (e, t, n) => {
1117
+ function _i(e, t) {
1118
+ let n = e.replace(z.findPipe, (e, t, n) => {
1103
1119
  let r = !1, i = t;
1104
1120
  for (; --i >= 0 && n[i] === "\\";) r = !r;
1105
1121
  return r ? "|" : " |";
1106
- }).split(B.splitPipe), r = 0;
1122
+ }).split(z.splitPipe), r = 0;
1107
1123
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
1108
1124
  if (n.length > t) n.splice(t);
1109
1125
  else for (; n.length < t;) n.push("");
1110
1126
  }
1111
- for (; r < n.length; r++) n[r] = n[r].trim().replace(B.slashPipe, "|");
1127
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
1112
1128
  return n;
1113
1129
  }
1114
- function mi(e, t, n) {
1130
+ function vi(e, t, n) {
1115
1131
  let r = e.length;
1116
1132
  if (r === 0) return "";
1117
1133
  let i = 0;
@@ -1123,15 +1139,15 @@ function mi(e, t, n) {
1123
1139
  }
1124
1140
  return e.slice(0, r - i);
1125
1141
  }
1126
- function hi(e) {
1142
+ function yi(e) {
1127
1143
  let t = e.split("\n"), n = t.length - 1;
1128
- for (; n >= 0 && B.blankLine.test(t[n]);) n--;
1144
+ for (; n >= 0 && z.blankLine.test(t[n]);) n--;
1129
1145
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
1130
1146
  }
1131
- function gi(e) {
1147
+ function bi(e) {
1132
1148
  return e.trim().toLowerCase().toUpperCase().toLowerCase();
1133
1149
  }
1134
- function _i(e, t) {
1150
+ function xi(e, t) {
1135
1151
  if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
1136
1152
  let n = 0;
1137
1153
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -1139,7 +1155,7 @@ function _i(e, t) {
1139
1155
  else if (e[r] === t[1] && (n--, n < 0)) return r;
1140
1156
  return n > 0 ? -2 : -1;
1141
1157
  }
1142
- function vi(e, t = 0) {
1158
+ function Si(e, t = 0) {
1143
1159
  let n = t, r = "";
1144
1160
  for (let t of e) if (t === " ") {
1145
1161
  let e = 4 - n % 4;
@@ -1147,7 +1163,7 @@ function vi(e, t = 0) {
1147
1163
  } else r += t, n++;
1148
1164
  return r;
1149
1165
  }
1150
- function yi(e, t, n, r, i) {
1166
+ function Ci(e, t, n, r, i) {
1151
1167
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!";
1152
1168
  r.state.inLink = !0;
1153
1169
  let l = r.state.linkEmitted, u = r.state.inRawBlock;
@@ -1169,7 +1185,7 @@ function yi(e, t, n, r, i) {
1169
1185
  tokens: d
1170
1186
  };
1171
1187
  }
1172
- function bi(e, t, n) {
1188
+ function wi(e, t, n) {
1173
1189
  let r = e.match(n.other.indentCodeCompensation);
1174
1190
  if (r === null) return t;
1175
1191
  let i = r[1];
@@ -1180,7 +1196,7 @@ function bi(e, t, n) {
1180
1196
  return e.slice(Math.min(r.length, i.length));
1181
1197
  }).join("\n");
1182
1198
  }
1183
- function xi(e, t, n, r) {
1199
+ function Ti(e, t, n, r) {
1184
1200
  if (!t.includes("<")) return !1;
1185
1201
  for (let i = 0; i < t.length; i++) {
1186
1202
  if (t[i] === "\\") {
@@ -1203,12 +1219,12 @@ function xi(e, t, n, r) {
1203
1219
  }
1204
1220
  return !1;
1205
1221
  }
1206
- var Si = class {
1222
+ var Ei = class {
1207
1223
  options;
1208
1224
  rules;
1209
1225
  lexer;
1210
1226
  constructor(e) {
1211
- this.options = e || Un;
1227
+ this.options = e || Jn;
1212
1228
  }
1213
1229
  space(e) {
1214
1230
  let t = this.rules.block.newline.exec(e);
@@ -1220,7 +1236,7 @@ var Si = class {
1220
1236
  code(e) {
1221
1237
  let t = this.rules.block.code.exec(e);
1222
1238
  if (t) {
1223
- let e = this.options.pedantic ? t[0] : hi(t[0]);
1239
+ let e = this.options.pedantic ? t[0] : yi(t[0]);
1224
1240
  return {
1225
1241
  type: "code",
1226
1242
  raw: e,
@@ -1232,7 +1248,7 @@ var Si = class {
1232
1248
  fences(e) {
1233
1249
  let t = this.rules.block.fences.exec(e);
1234
1250
  if (t) {
1235
- let e = t[0], n = bi(e, t[3] || "", this.rules);
1251
+ let e = t[0], n = wi(e, t[3] || "", this.rules);
1236
1252
  return {
1237
1253
  type: "code",
1238
1254
  raw: e,
@@ -1246,12 +1262,12 @@ var Si = class {
1246
1262
  if (t) {
1247
1263
  let e = t[2].trim();
1248
1264
  if (this.rules.other.endingHash.test(e)) {
1249
- let t = mi(e, "#");
1265
+ let t = vi(e, "#");
1250
1266
  (this.options.pedantic || !t || this.rules.other.endingSpaceTabChar.test(t)) && (e = t.trim());
1251
1267
  }
1252
1268
  return {
1253
1269
  type: "heading",
1254
- raw: mi(t[0], "\n"),
1270
+ raw: vi(t[0], "\n"),
1255
1271
  depth: t[1].length,
1256
1272
  text: e,
1257
1273
  tokens: this.lexer.inline(e)
@@ -1262,13 +1278,13 @@ var Si = class {
1262
1278
  let t = this.rules.block.hr.exec(e);
1263
1279
  if (t) return {
1264
1280
  type: "hr",
1265
- raw: mi(t[0], "\n")
1281
+ raw: vi(t[0], "\n")
1266
1282
  };
1267
1283
  }
1268
1284
  blockquote(e) {
1269
1285
  let t = this.rules.block.blockquote.exec(e);
1270
1286
  if (t) {
1271
- let e = mi(t[0], "\n").split("\n"), n = "", r = "", i = [];
1287
+ let e = vi(t[0], "\n").split("\n"), n = "", r = "", i = [];
1272
1288
  for (; e.length > 0;) {
1273
1289
  let t = !1, a = [], o = 0;
1274
1290
  for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -1321,7 +1337,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1321
1337
  let n = !1, r = "", s = "";
1322
1338
  if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1323
1339
  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 ? vi(c, l) : c.replace(this.rules.other.leadingSpaceTab, (e) => vi(e, l)), d = e.split("\n", 1)[0], f = !u.trim(), p = 0;
1340
+ let c = t[2].split("\n", 1)[0], l = t[1].length, u = this.options.pedantic ? Si(c, l) : c.replace(this.rules.other.leadingSpaceTab, (e) => Si(e, l)), d = e.split("\n", 1)[0], f = !u.trim(), p = 0;
1325
1341
  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
1342
  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
1343
  for (; e;) {
@@ -1386,7 +1402,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1386
1402
  html(e) {
1387
1403
  let t = this.rules.block.html.exec(e);
1388
1404
  if (t) {
1389
- let e = hi(t[0]);
1405
+ let e = yi(t[0]);
1390
1406
  return {
1391
1407
  type: "html",
1392
1408
  block: !0,
@@ -1399,12 +1415,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1399
1415
  def(e) {
1400
1416
  let t = this.rules.block.def.exec(e);
1401
1417
  if (t) {
1402
- if (!this.rules.other.startAngleBracket.test(t[2]) && _i(t[2], "()") !== -1) return;
1403
- let e = gi(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];
1418
+ if (!this.rules.other.startAngleBracket.test(t[2]) && xi(t[2], "()") !== -1) return;
1419
+ let e = bi(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
1420
  return {
1405
1421
  type: "def",
1406
1422
  tag: e,
1407
- raw: mi(t[0], "\n"),
1423
+ raw: vi(t[0], "\n"),
1408
1424
  href: n,
1409
1425
  title: r
1410
1426
  };
@@ -1413,9 +1429,9 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1413
1429
  table(e) {
1414
1430
  let t = this.rules.block.table.exec(e);
1415
1431
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1416
- let n = pi(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 = {
1432
+ let n = _i(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
1433
  type: "table",
1418
- raw: mi(t[0], "\n"),
1434
+ raw: vi(t[0], "\n"),
1419
1435
  header: [],
1420
1436
  align: [],
1421
1437
  rows: []
@@ -1428,7 +1444,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1428
1444
  header: !0,
1429
1445
  align: a.align[e]
1430
1446
  });
1431
- for (let e of i) a.rows.push(pi(e, a.header.length).map((e, t) => ({
1447
+ for (let e of i) a.rows.push(_i(e, a.header.length).map((e, t) => ({
1432
1448
  text: e,
1433
1449
  tokens: this.lexer.inline(e),
1434
1450
  header: !1,
@@ -1443,7 +1459,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1443
1459
  let e = t[1].trim();
1444
1460
  return {
1445
1461
  type: "heading",
1446
- raw: mi(t[0], "\n"),
1462
+ raw: vi(t[0], "\n"),
1447
1463
  depth: t[2].charAt(0) === "=" ? 1 : 2,
1448
1464
  text: e,
1449
1465
  tokens: this.lexer.inline(e)
@@ -1495,14 +1511,14 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1495
1511
  let t = this.rules.inline.link.exec(e);
1496
1512
  if (t) {
1497
1513
  let n = t[0].charAt(0) === "!" ? 2 : 1;
1498
- if (!this.options.pedantic && xi(e, t[1], n, this.rules)) return;
1514
+ if (!this.options.pedantic && Ti(e, t[1], n, this.rules)) return;
1499
1515
  let r = t[2].trim();
1500
1516
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
1501
1517
  if (!this.rules.other.endAngleBracket.test(r)) return;
1502
- let e = mi(r.slice(0, -1), "\\");
1518
+ let e = vi(r.slice(0, -1), "\\");
1503
1519
  if ((r.length - e.length) % 2 == 0) return;
1504
1520
  } else {
1505
- let e = _i(t[2], "()");
1521
+ let e = xi(t[2], "()");
1506
1522
  if (e === -2) return;
1507
1523
  if (e > -1) {
1508
1524
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -1514,7 +1530,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1514
1530
  let e = this.rules.other.pedanticHrefTitle.exec(i);
1515
1531
  e && (i = e[1], a = e[3]);
1516
1532
  } 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)), yi(t, {
1533
+ 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)), Ci(t, {
1518
1534
  href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
1519
1535
  title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
1520
1536
  }, t[0], this.lexer, this.rules);
@@ -1524,8 +1540,8 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1524
1540
  let n;
1525
1541
  if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1526
1542
  let r = n[0].charAt(0) === "!" ? 2 : 1;
1527
- if (!this.options.pedantic && xi(e, n[1], r, this.rules)) return;
1528
- let i = t[gi((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1543
+ if (!this.options.pedantic && Ti(e, n[1], r, this.rules)) return;
1544
+ let i = t[bi((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1529
1545
  if (!i) {
1530
1546
  let e = n[0].charAt(0);
1531
1547
  return {
@@ -1534,7 +1550,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1534
1550
  text: e
1535
1551
  };
1536
1552
  }
1537
- return yi(n, i, n[0], this.lexer, this.rules);
1553
+ return Ci(n, i, n[0], this.lexer, this.rules);
1538
1554
  }
1539
1555
  }
1540
1556
  emStrong(e, t, n = "") {
@@ -1667,7 +1683,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1667
1683
  return {
1668
1684
  type: "text",
1669
1685
  raw: t[0],
1670
- text: e ? t[0] : di(t[0]),
1686
+ text: e ? t[0] : hi(t[0]),
1671
1687
  escaped: e
1672
1688
  };
1673
1689
  }
@@ -1679,7 +1695,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1679
1695
  inlineQueue;
1680
1696
  tokenizer;
1681
1697
  constructor(e) {
1682
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Un, this.options.tokenizer = this.options.tokenizer || new Si(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1698
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Jn, this.options.tokenizer = this.options.tokenizer || new Ei(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1683
1699
  inLink: !1,
1684
1700
  inRawBlock: !1,
1685
1701
  linkEmitted: !1,
@@ -1687,16 +1703,16 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1687
1703
  top: !0
1688
1704
  };
1689
1705
  let t = {
1690
- other: B,
1691
- block: si.normal,
1692
- inline: ci.normal
1706
+ other: z,
1707
+ block: di.normal,
1708
+ inline: fi.normal
1693
1709
  };
1694
- this.options.pedantic ? (t.block = si.pedantic, t.inline = ci.pedantic) : this.options.gfm && (t.block = si.gfm, t.inline = this.options.breaks ? ci.breaks : ci.gfm), this.tokenizer.rules = t;
1710
+ this.options.pedantic ? (t.block = di.pedantic, t.inline = fi.pedantic) : this.options.gfm && (t.block = di.gfm, t.inline = this.options.breaks ? fi.breaks : fi.gfm), this.tokenizer.rules = t;
1695
1711
  }
1696
1712
  static get rules() {
1697
1713
  return {
1698
- block: si,
1699
- inline: ci
1714
+ block: di,
1715
+ inline: fi
1700
1716
  };
1701
1717
  }
1702
1718
  static lex(t, n) {
@@ -1706,7 +1722,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1706
1722
  return new e(n).inlineTokens(t);
1707
1723
  }
1708
1724
  lex(e) {
1709
- e = e.replace(B.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1725
+ e = e.replace(z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1710
1726
  for (let e = 0; e < this.inlineQueue.length; e++) {
1711
1727
  let t = this.inlineQueue[e];
1712
1728
  this.inlineTokens(t.src, t.tokens);
@@ -1714,7 +1730,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1714
1730
  return this.inlineQueue = [], this.tokens;
1715
1731
  }
1716
1732
  blockTokens(e, t = [], n = !1) {
1717
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(B.tabCharGlobal, " ").replace(B.spaceLine, ""));
1733
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(z.tabCharGlobal, " ").replace(z.spaceLine, ""));
1718
1734
  let r = 1 / 0;
1719
1735
  for (; e;) {
1720
1736
  if (e.length < r) r = e.length;
@@ -1786,7 +1802,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1786
1802
  for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
1787
1803
  for (let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
1788
1804
  let e = t[0], n = e.lastIndexOf("[");
1789
- if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, gi(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1805
+ if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, bi(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1790
1806
  }
1791
1807
  return !1;
1792
1808
  }
@@ -1805,7 +1821,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1805
1821
  if (this.tokens.links && e.includes("[")) {
1806
1822
  let e = this.tokenizer.rules.inline.reflinkSearch, t = (n) => {
1807
1823
  let r = n.lastIndexOf("[");
1808
- if (!Object.hasOwn(this.tokens.links, gi(n.slice(r + 1, -1)))) return n;
1824
+ if (!Object.hasOwn(this.tokens.links, bi(n.slice(r + 1, -1)))) return n;
1809
1825
  if (r > 1 && n.charAt(0) !== "!") {
1810
1826
  let i = n.slice(1, r - 1);
1811
1827
  if (this.linkInText(i)) return "[" + i.replace(e, t) + "][" + "a".repeat(n.length - r - 2) + "]";
@@ -1865,17 +1881,17 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1865
1881
  if (this.options.silent) console.error(t);
1866
1882
  else throw Error(t);
1867
1883
  }
1868
- }, Ci = class {
1884
+ }, Di = class {
1869
1885
  options;
1870
1886
  parser;
1871
1887
  constructor(e) {
1872
- this.options = e || Un;
1888
+ this.options = e || Jn;
1873
1889
  }
1874
1890
  space(e) {
1875
1891
  return "";
1876
1892
  }
1877
1893
  code({ text: e, lang: t, escaped: n }) {
1878
- let r = (t || "").match(B.notSpaceStart)?.[0], i = e ? e.replace(B.endingNewline, "") + "\n" : "";
1894
+ let r = (t || "").match(z.notSpaceStart)?.[0], i = e ? e.replace(z.endingNewline, "") + "\n" : "";
1879
1895
  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
1896
  }
1881
1897
  blockquote({ tokens: e }) {
@@ -1955,7 +1971,7 @@ ${e}</tr>
1955
1971
  return `<del>${this.parser.parseInline(e)}</del>`;
1956
1972
  }
1957
1973
  link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
1958
- let a = i ? V(n, !0) : this.parser.parseInline(r), o = fi(e);
1974
+ let a = i ? V(n, !0) : this.parser.parseInline(r), o = gi(e);
1959
1975
  if (o === null) return a;
1960
1976
  e = V(o, i);
1961
1977
  let s = "<a href=\"" + e + "\"";
@@ -1963,7 +1979,7 @@ ${e}</tr>
1963
1979
  }
1964
1980
  image({ href: e, title: t, text: n, tokens: r }) {
1965
1981
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1966
- let i = fi(e);
1982
+ let i = gi(e);
1967
1983
  if (i === null) return V(n);
1968
1984
  e = i;
1969
1985
  let a = `<img src="${V(e)}" alt="${V(n)}"`;
@@ -1972,7 +1988,7 @@ ${e}</tr>
1972
1988
  text(e) {
1973
1989
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
1974
1990
  }
1975
- }, wi = class {
1991
+ }, Oi = class {
1976
1992
  strong({ text: e }) {
1977
1993
  return e;
1978
1994
  }
@@ -2008,7 +2024,7 @@ ${e}</tr>
2008
2024
  renderer;
2009
2025
  textRenderer;
2010
2026
  constructor(e) {
2011
- this.options = e || Un, this.options.renderer = this.options.renderer || new Ci(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new wi();
2027
+ this.options = e || Jn, this.options.renderer = this.options.renderer || new Di(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Oi();
2012
2028
  }
2013
2029
  static parse(t, n) {
2014
2030
  return new e(n).parse(t);
@@ -2156,11 +2172,11 @@ ${e}</tr>
2156
2172
  }
2157
2173
  return n;
2158
2174
  }
2159
- }, Ti = class {
2175
+ }, ki = class {
2160
2176
  options;
2161
2177
  block;
2162
2178
  constructor(e) {
2163
- this.options = e || Un;
2179
+ this.options = e || Jn;
2164
2180
  }
2165
2181
  static passThroughHooks = /* @__PURE__ */ new Set([
2166
2182
  "preprocess",
@@ -2191,17 +2207,17 @@ ${e}</tr>
2191
2207
  provideParser(e = this.block) {
2192
2208
  return e ? U.parse : U.parseInline;
2193
2209
  }
2194
- }, Ei = new class {
2195
- defaults = Hn();
2210
+ }, Ai = new class {
2211
+ defaults = qn();
2196
2212
  options = this.setOptions;
2197
2213
  parse = this.parseMarkdown(!0);
2198
2214
  parseInline = this.parseMarkdown(!1);
2199
2215
  Parser = U;
2200
- Renderer = Ci;
2201
- TextRenderer = wi;
2216
+ Renderer = Di;
2217
+ TextRenderer = Oi;
2202
2218
  Lexer = H;
2203
- Tokenizer = Si;
2204
- Hooks = Ti;
2219
+ Tokenizer = Ei;
2220
+ Hooks = ki;
2205
2221
  constructor(...e) {
2206
2222
  this.use(...e);
2207
2223
  }
@@ -2252,7 +2268,7 @@ ${e}</tr>
2252
2268
  }
2253
2269
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2254
2270
  }), n.extensions = t), e.renderer) {
2255
- let t = this.defaults.renderer || new Ci(this.defaults);
2271
+ let t = this.defaults.renderer || new Di(this.defaults);
2256
2272
  for (let n in e.renderer) {
2257
2273
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2258
2274
  if (["options", "parser"].includes(n)) continue;
@@ -2265,7 +2281,7 @@ ${e}</tr>
2265
2281
  n.renderer = t;
2266
2282
  }
2267
2283
  if (e.tokenizer) {
2268
- let t = this.defaults.tokenizer || new Si(this.defaults);
2284
+ let t = this.defaults.tokenizer || new Ei(this.defaults);
2269
2285
  for (let n in e.tokenizer) {
2270
2286
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2271
2287
  if ([
@@ -2282,13 +2298,13 @@ ${e}</tr>
2282
2298
  n.tokenizer = t;
2283
2299
  }
2284
2300
  if (e.hooks) {
2285
- let t = this.defaults.hooks || new Ti();
2301
+ let t = this.defaults.hooks || new ki();
2286
2302
  for (let n in e.hooks) {
2287
2303
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2288
2304
  if (["options", "block"].includes(n)) continue;
2289
2305
  let r = n, i = e.hooks[r], a = t[r];
2290
- t[r] = Ti.passThroughHooks.has(n) ? (e) => {
2291
- if (this.defaults.async && Ti.passThroughHooksRespectAsync.has(n)) return (async () => {
2306
+ t[r] = ki.passThroughHooks.has(n) ? (e) => {
2307
+ if (this.defaults.async && ki.passThroughHooksRespectAsync.has(n)) return (async () => {
2292
2308
  let n = await i.call(t, e);
2293
2309
  return a.call(t, n);
2294
2310
  })();
@@ -2368,31 +2384,31 @@ ${e}</tr>
2368
2384
  }
2369
2385
  }();
2370
2386
  function W(e, t) {
2371
- return Ei.parse(e, t);
2387
+ return Ai.parse(e, t);
2372
2388
  }
2373
2389
  W.options = W.setOptions = function(e) {
2374
- return Ei.setOptions(e), W.defaults = Ei.defaults, Wn(W.defaults), W;
2375
- }, W.getDefaults = Hn, W.defaults = Un;
2376
- function Di(...e) {
2377
- return Ei.use(...e), W.defaults = Ei.defaults, Wn(W.defaults), W;
2378
- }
2379
- W.use = Di, W.walkTokens = function(e, t) {
2380
- return Ei.walkTokens(e, t);
2381
- }, W.parseInline = Ei.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Ci, W.TextRenderer = wi, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Si, W.Hooks = Ti, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2390
+ return Ai.setOptions(e), W.defaults = Ai.defaults, Yn(W.defaults), W;
2391
+ }, W.getDefaults = qn, W.defaults = Jn;
2392
+ function ji(...e) {
2393
+ return Ai.use(...e), W.defaults = Ai.defaults, Yn(W.defaults), W;
2394
+ }
2395
+ W.use = ji, W.walkTokens = function(e, t) {
2396
+ return Ai.walkTokens(e, t);
2397
+ }, W.parseInline = Ai.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Di, W.TextRenderer = Oi, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Ei, W.Hooks = ki, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2382
2398
  //#endregion
2383
2399
  //#region ../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs
2384
- function Oi(e, t) {
2400
+ function Mi(e, t) {
2385
2401
  this.v = e, this.k = t;
2386
2402
  }
2387
- function ki(e, t) {
2403
+ function Ni(e, t) {
2388
2404
  (t == null || t > e.length) && (t = e.length);
2389
2405
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2390
2406
  return r;
2391
2407
  }
2392
- function Ai(e) {
2408
+ function Pi(e) {
2393
2409
  if (Array.isArray(e)) return e;
2394
2410
  }
2395
- function ji(e, t) {
2411
+ function Fi(e, t) {
2396
2412
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2397
2413
  if (n != null) {
2398
2414
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -2413,24 +2429,24 @@ function ji(e, t) {
2413
2429
  return s;
2414
2430
  }
2415
2431
  }
2416
- function Mi() {
2432
+ function Ii() {
2417
2433
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2418
2434
  }
2419
- function Ni(e, t) {
2420
- return Ai(e) || ji(e, t) || Pi(e, t) || Mi();
2435
+ function Li(e, t) {
2436
+ return Pi(e) || Fi(e, t) || Ri(e, t) || Ii();
2421
2437
  }
2422
- function Pi(e, t) {
2438
+ function Ri(e, t) {
2423
2439
  if (e) {
2424
- if (typeof e == "string") return ki(e, t);
2440
+ if (typeof e == "string") return Ni(e, t);
2425
2441
  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) ? ki(e, t) : void 0;
2442
+ 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) ? Ni(e, t) : void 0;
2427
2443
  }
2428
2444
  }
2429
- function Fi(e) {
2445
+ function zi(e) {
2430
2446
  var t, n;
2431
2447
  function r(t, n) {
2432
2448
  try {
2433
- var a = e[t](n), o = a.value, s = o instanceof Oi;
2449
+ var a = e[t](n), o = a.value, s = o instanceof Mi;
2434
2450
  Promise.resolve(s ? o.v : o).then(function(n) {
2435
2451
  if (s) {
2436
2452
  var c = t === "return" && o.k ? t : "next";
@@ -2464,113 +2480,113 @@ function Fi(e) {
2464
2480
  });
2465
2481
  }, typeof e.return != "function" && (this.return = void 0);
2466
2482
  }
2467
- Fi.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2483
+ zi.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2468
2484
  return this;
2469
- }, Fi.prototype.next = function(e) {
2485
+ }, zi.prototype.next = function(e) {
2470
2486
  return this._invoke("next", e);
2471
- }, Fi.prototype.throw = function(e) {
2487
+ }, zi.prototype.throw = function(e) {
2472
2488
  return this._invoke("throw", e);
2473
- }, Fi.prototype.return = function(e) {
2489
+ }, zi.prototype.return = function(e) {
2474
2490
  return this._invoke("return", e);
2475
2491
  };
2476
- var Ii = Object.entries, Li = Object.setPrototypeOf, Ri = Object.isFrozen, zi = Object.getPrototypeOf, Bi = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Vi = Object.create, Hi = typeof Reflect < "u" && Reflect, Ui = Hi.apply, Wi = Hi.construct;
2492
+ var Bi = Object.entries, Vi = Object.setPrototypeOf, Hi = Object.isFrozen, Ui = Object.getPrototypeOf, Wi = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Gi = Object.create, Ki = typeof Reflect < "u" && Reflect, qi = Ki.apply, Ji = Ki.construct;
2477
2493
  G ||= function(e) {
2478
2494
  return e;
2479
2495
  }, K ||= function(e) {
2480
2496
  return e;
2481
- }, Ui ||= function(e, t) {
2497
+ }, qi ||= function(e, t) {
2482
2498
  var n = [...arguments].slice(2);
2483
2499
  return e.apply(t, n);
2484
- }, Wi ||= function(e) {
2500
+ }, Ji ||= function(e) {
2485
2501
  return new e(...[...arguments].slice(1));
2486
2502
  };
2487
- var Gi = Y(Array.prototype.forEach);
2503
+ var Yi = Y(Array.prototype.forEach);
2488
2504
  Array.prototype.indexOf;
2489
- var Ki = Y(Array.prototype.lastIndexOf), qi = Y(Array.prototype.pop), Ji = Y(Array.prototype.push);
2505
+ var Xi = Y(Array.prototype.lastIndexOf), Zi = Y(Array.prototype.pop), Qi = Y(Array.prototype.push);
2490
2506
  Array.prototype.slice;
2491
- var Yi = Y(Array.prototype.splice), Xi = Array.isArray, Zi = Y(String.prototype.toLowerCase), Qi = Y(String.prototype.toString), $i = Y(String.prototype.match), ea = Y(String.prototype.replace), ta = Y(String.prototype.indexOf), na = Y(String.prototype.trim), ra = Y(Number.prototype.toString), ia = Y(Boolean.prototype.toString), aa = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), oa = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), sa = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), ca = la(TypeError);
2507
+ var $i = Y(Array.prototype.splice), ea = Array.isArray, ta = Y(String.prototype.toLowerCase), na = Y(String.prototype.toString), ra = Y(String.prototype.match), ia = Y(String.prototype.replace), aa = Y(String.prototype.indexOf), oa = Y(String.prototype.trim), sa = Y(Number.prototype.toString), ca = Y(Boolean.prototype.toString), la = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ua = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), da = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), fa = pa(TypeError);
2492
2508
  function Y(e) {
2493
2509
  return function(t) {
2494
2510
  t instanceof RegExp && (t.lastIndex = 0);
2495
2511
  var n = [...arguments].slice(1);
2496
- return Ui(e, t, n);
2512
+ return qi(e, t, n);
2497
2513
  };
2498
2514
  }
2499
- function la(e) {
2515
+ function pa(e) {
2500
2516
  return function() {
2501
- return Wi(e, [...arguments]);
2517
+ return Ji(e, [...arguments]);
2502
2518
  };
2503
2519
  }
2504
2520
  function X(e, t) {
2505
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Zi;
2506
- if (Li && Li(e, null), !Xi(t)) return e;
2521
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ta;
2522
+ if (Vi && Vi(e, null), !ea(t)) return e;
2507
2523
  let r = t.length;
2508
2524
  for (; r--;) {
2509
2525
  let i = t[r];
2510
2526
  if (typeof i == "string") {
2511
2527
  let e = n(i);
2512
- e !== i && (Ri(t) || (t[r] = e), i = e);
2528
+ e !== i && (Hi(t) || (t[r] = e), i = e);
2513
2529
  }
2514
2530
  e[i] = !0;
2515
2531
  }
2516
2532
  return e;
2517
2533
  }
2518
- function ua(e) {
2534
+ function ma(e) {
2519
2535
  for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
2520
2536
  return e;
2521
2537
  }
2522
2538
  function Z(e) {
2523
- let t = Vi(null);
2524
- for (let r of Ii(e)) {
2525
- var n = Ni(r, 2);
2539
+ let t = Gi(null);
2540
+ for (let r of Bi(e)) {
2541
+ var n = Li(r, 2);
2526
2542
  let i = n[0], a = n[1];
2527
- q(e, i) && (t[i] = Xi(a) ? ua(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2543
+ q(e, i) && (t[i] = ea(a) ? ma(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2528
2544
  }
2529
2545
  return t;
2530
2546
  }
2531
- function da(e) {
2547
+ function ha(e) {
2532
2548
  switch (typeof e) {
2533
2549
  case "string": return e;
2534
- case "number": return ra(e);
2535
- case "boolean": return ia(e);
2536
- case "bigint": return aa ? aa(e) : "0";
2537
- case "symbol": return oa ? oa(e) : "Symbol()";
2538
- case "undefined": return sa(e);
2550
+ case "number": return sa(e);
2551
+ case "boolean": return ca(e);
2552
+ case "bigint": return la ? la(e) : "0";
2553
+ case "symbol": return ua ? ua(e) : "Symbol()";
2554
+ case "undefined": return da(e);
2539
2555
  case "function":
2540
2556
  case "object": {
2541
- if (e === null) return sa(e);
2557
+ if (e === null) return da(e);
2542
2558
  let t = e, n = Q(t, "toString");
2543
2559
  if (typeof n == "function") {
2544
2560
  let e = n(t);
2545
- return typeof e == "string" ? e : sa(e);
2561
+ return typeof e == "string" ? e : da(e);
2546
2562
  }
2547
- return sa(e);
2563
+ return da(e);
2548
2564
  }
2549
- default: return sa(e);
2565
+ default: return da(e);
2550
2566
  }
2551
2567
  }
2552
2568
  function Q(e, t) {
2553
2569
  for (; e !== null;) {
2554
- let n = Bi(e, t);
2570
+ let n = Wi(e, t);
2555
2571
  if (n) {
2556
2572
  if (n.get) return Y(n.get);
2557
2573
  if (typeof n.value == "function") return Y(n.value);
2558
2574
  }
2559
- e = zi(e);
2575
+ e = Ui(e);
2560
2576
  }
2561
2577
  function n() {
2562
2578
  return null;
2563
2579
  }
2564
2580
  return n;
2565
2581
  }
2566
- function fa(e) {
2582
+ function ga(e) {
2567
2583
  try {
2568
2584
  return J(e, ""), !0;
2569
2585
  } catch {
2570
2586
  return !1;
2571
2587
  }
2572
2588
  }
2573
- var pa = 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(".")), ma = 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(".")), ha = G([
2589
+ var _a = 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(".")), va = 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(".")), ya = G([
2574
2590
  "feBlend",
2575
2591
  "feColorMatrix",
2576
2592
  "feComponentTransfer",
@@ -2596,7 +2612,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2596
2612
  "feSpotLight",
2597
2613
  "feTile",
2598
2614
  "feTurbulence"
2599
- ]), ga = G([
2615
+ ]), ba = G([
2600
2616
  "animate",
2601
2617
  "color-profile",
2602
2618
  "cursor",
@@ -2619,7 +2635,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2619
2635
  "solidcolor",
2620
2636
  "unknown",
2621
2637
  "use"
2622
- ]), _a = 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(".")), va = G([
2638
+ ]), xa = 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(".")), Sa = G([
2623
2639
  "maction",
2624
2640
  "maligngroup",
2625
2641
  "malignmark",
@@ -2635,13 +2651,13 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2635
2651
  "annotation-xml",
2636
2652
  "mprescripts",
2637
2653
  "none"
2638
- ]), ya = G(["#text"]), ba = 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(".")), xa = 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(".")), Sa = 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(".")), Ca = G([
2654
+ ]), Ca = G(["#text"]), wa = 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(".")), Ta = 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(".")), Ea = 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(".")), Da = G([
2639
2655
  "xlink:href",
2640
2656
  "xml:id",
2641
2657
  "xlink:title",
2642
2658
  "xml:space",
2643
2659
  "xmlns:xlink"
2644
- ]), wa = K(/{{[\w\W]*|^[\w\W]*}}/g), Ta = K(/<%[\w\W]*|^[\w\W]*%>/g), Ea = K(/\${[\w\W]*/g), Da = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Oa = K(/^aria-[\-\w]+$/), ka = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Aa = K(/^(?:\w+script|data):/i), ja = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ma = K(/^html$/i), Na = K(/^[a-z][.\w]*(-[.\w]+)+$/i), Pa = K(/<[/\w!]/g), Fa = K(/<[/\w]/g), Ia = K(/<\/no(script|embed|frames)/i), La = K(/\/>/i), $ = {
2660
+ ]), Oa = K(/{{[\w\W]*|^[\w\W]*}}/g), ka = K(/<%[\w\W]*|^[\w\W]*%>/g), Aa = K(/\${[\w\W]*/g), ja = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ma = K(/^aria-[\-\w]+$/), Na = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Pa = K(/^(?:\w+script|data):/i), Fa = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ia = K(/^html$/i), La = K(/^[a-z][.\w]*(-[.\w]+)+$/i), Ra = K(/<[/\w!]/g), za = K(/<[/\w]/g), Ba = K(/<\/no(script|embed|frames)/i), Va = K(/\/>/i), $ = {
2645
2661
  element: 1,
2646
2662
  attribute: 2,
2647
2663
  text: 3,
@@ -2654,7 +2670,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2654
2670
  documentType: 10,
2655
2671
  documentFragment: 11,
2656
2672
  notation: 12
2657
- }, Ra = [
2673
+ }, Ha = [
2658
2674
  "style",
2659
2675
  "script",
2660
2676
  "xmp",
@@ -2663,14 +2679,14 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2663
2679
  "noframes",
2664
2680
  "plaintext",
2665
2681
  "noscript"
2666
- ], za = G(X({}, Ra)), Ba = function() {
2682
+ ], Ua = G(X({}, Ha)), Wa = function() {
2667
2683
  let e = {};
2668
- return Gi(Ra, (t) => {
2684
+ return Yi(Ha, (t) => {
2669
2685
  e[t] = K(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
2670
2686
  }), G(e);
2671
- }(), Va = function() {
2687
+ }(), Ga = function() {
2672
2688
  return typeof window > "u" ? null : window;
2673
- }, Ha = function(e, t) {
2689
+ }, Ka = function(e, t) {
2674
2690
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
2675
2691
  let n = null, r = "data-tt-policy-suffix";
2676
2692
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -2687,7 +2703,7 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2687
2703
  } catch {
2688
2704
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2689
2705
  }
2690
- }, Ua = function() {
2706
+ }, qa = function() {
2691
2707
  return {
2692
2708
  afterSanitizeAttributes: [],
2693
2709
  afterSanitizeElements: [],
@@ -2699,60 +2715,60 @@ var pa = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2699
2715
  uponSanitizeElement: [],
2700
2716
  uponSanitizeShadowNode: []
2701
2717
  };
2702
- }, Wa = function(e, t, n, r) {
2703
- return q(e, t) && Xi(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2704
- }, Ga = function(e, t, n) {
2718
+ }, Ja = function(e, t, n, r) {
2719
+ return q(e, t) && ea(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2720
+ }, Ya = function(e, t, n) {
2705
2721
  let r = q(e, t) ? e[t] : void 0;
2706
2722
  return r && typeof r == "object" ? Z(r) : n();
2707
2723
  };
2708
- function Ka() {
2709
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Va(), t = (e) => Ka(e);
2724
+ function Xa() {
2725
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ga(), t = (e) => Xa(e);
2710
2726
  if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
2711
2727
  let n = e.document, r = n, i = r.currentScript;
2712
2728
  e.DocumentFragment;
2713
2729
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
2714
2730
  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"), m = o && o.prototype ? Q(o.prototype, "nodeType") : null, oe = o && o.prototype ? Q(o.prototype, "nodeName") : null, se = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, ce = function(e) {
2716
- return m ? m(e) : e.nodeType;
2717
- }, h = function(e) {
2718
- return oe ? oe(e) : e.nodeName;
2731
+ 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) {
2732
+ return oe ? oe(e) : e.nodeType;
2733
+ }, le = function(e) {
2734
+ return m ? m(e) : e.nodeName;
2719
2735
  };
2720
2736
  if (typeof a == "function") {
2721
2737
  let e = n.createElement("template");
2722
2738
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
2723
2739
  }
2724
- let g, _ = "", le, ue = !1, de = 0, fe = function() {
2725
- if (de > 0) throw ca("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.");
2740
+ let h, g = "", _, ue = !1, de = 0, fe = function() {
2741
+ if (de > 0) throw fa("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
2742
  }, pe = function(e) {
2727
2743
  fe(), de++;
2728
2744
  try {
2729
- return g.createHTML(e);
2745
+ return h.createHTML(e);
2730
2746
  } finally {
2731
2747
  de--;
2732
2748
  }
2733
2749
  }, me = function(e) {
2734
2750
  fe(), de++;
2735
2751
  try {
2736
- return g.createScriptURL(e);
2752
+ return h.createScriptURL(e);
2737
2753
  } finally {
2738
2754
  de--;
2739
2755
  }
2740
2756
  }, he = function() {
2741
- return ue ||= (le = Ha(u, i), !0), le;
2742
- }, v = n, ge = v.implementation, _e = v.createNodeIterator, ve = v.createDocumentFragment, ye = v.getElementsByTagName, be = r.importNode, y = Ua();
2743
- t.isSupported = typeof Ii == "function" && typeof re == "function" && ge && ge.createHTMLDocument !== void 0;
2744
- let xe = wa, Se = Ta, Ce = Ea, we = Da, Te = Oa, Ee = Aa, De = ja, Oe = Na, ke = ka, b = null, Ae = X({}, [
2745
- ...pa,
2746
- ...ma,
2747
- ...ha,
2757
+ return ue ||= (_ = Ka(u, i), !0), _;
2758
+ }, ge = n, v = ge.implementation, _e = ge.createNodeIterator, ve = ge.createDocumentFragment, ye = ge.getElementsByTagName, be = r.importNode, y = qa();
2759
+ t.isSupported = typeof Bi == "function" && typeof re == "function" && v && v.createHTMLDocument !== void 0;
2760
+ let xe = Oa, Se = ka, Ce = Aa, we = ja, Te = Ma, Ee = Pa, De = Fa, Oe = La, ke = Na, b = null, Ae = X({}, [
2748
2761
  ..._a,
2749
- ...ya
2750
- ]), x = null, je = X({}, [
2751
- ...ba,
2762
+ ...va,
2763
+ ...ya,
2752
2764
  ...xa,
2753
- ...Sa,
2754
2765
  ...Ca
2755
- ]), S = Object.seal(Vi(null, {
2766
+ ]), x = null, je = X({}, [
2767
+ ...wa,
2768
+ ...Ta,
2769
+ ...Ea,
2770
+ ...Da
2771
+ ]), S = Object.seal(Gi(null, {
2756
2772
  tagNameCheck: {
2757
2773
  writable: !0,
2758
2774
  configurable: !1,
@@ -2771,7 +2787,7 @@ function Ka() {
2771
2787
  enumerable: !0,
2772
2788
  value: !1
2773
2789
  }
2774
- })), Me = null, Ne = null, C = Object.seal(Vi(null, {
2790
+ })), Me = null, Ne = null, C = Object.seal(Gi(null, {
2775
2791
  tagCheck: {
2776
2792
  writable: !0,
2777
2793
  configurable: !1,
@@ -2784,7 +2800,7 @@ function Ka() {
2784
2800
  enumerable: !0,
2785
2801
  value: null
2786
2802
  }
2787
- })), Pe = !0, Fe = !0, Ie = !1, Le = !0, w = !1, Re = !0, T = !1, ze = !1, Be = null, Ve = null, He = !1, Ue = !1, E = !1, We = !1, Ge = !0, Ke = !1, qe = "user-content-", Je = !0, Ye = !1, Xe = {}, Ze = null, Qe = 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(".")), $e = null, et = X({}, [
2803
+ })), Pe = !0, Fe = !0, Ie = !1, w = !0, T = !1, Le = !0, Re = !1, ze = !1, Be = null, Ve = null, He = !1, Ue = !1, We = !1, Ge = !1, Ke = !0, qe = !1, E = "user-content-", Je = !0, Ye = !1, Xe = {}, Ze = null, Qe = 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(".")), $e = null, et = X({}, [
2788
2804
  "audio",
2789
2805
  "video",
2790
2806
  "img",
@@ -2806,77 +2822,77 @@ function Ka() {
2806
2822
  "value",
2807
2823
  "style",
2808
2824
  "xmlns"
2809
- ]), rt = "http://www.w3.org/1998/Math/MathML", it = "http://www.w3.org/2000/svg", D = "http://www.w3.org/1999/xhtml", O = D, k = !1, at = null, ot = X({}, [
2825
+ ]), rt = "http://www.w3.org/1998/Math/MathML", it = "http://www.w3.org/2000/svg", D = "http://www.w3.org/1999/xhtml", at = D, ot = !1, st = null, ct = X({}, [
2810
2826
  rt,
2811
2827
  it,
2812
2828
  D
2813
- ], Qi), st = G([
2829
+ ], na), lt = G([
2814
2830
  "mi",
2815
2831
  "mo",
2816
2832
  "mn",
2817
2833
  "ms",
2818
2834
  "mtext"
2819
- ]), ct = X({}, st), lt = G(["annotation-xml"]), ut = X({}, lt), dt = X({}, [
2835
+ ]), O = X({}, lt), ut = G(["annotation-xml"]), dt = X({}, ut), ft = X({}, [
2820
2836
  "title",
2821
2837
  "style",
2822
2838
  "font",
2823
2839
  "a",
2824
2840
  "script"
2825
- ]), ft = null, pt = ["application/xhtml+xml", "text/html"], A = null, mt = null, ht = n.createElement("form"), gt = function(e) {
2841
+ ]), pt = null, mt = ["application/xhtml+xml", "text/html"], k = null, ht = null, gt = n.createElement("form"), _t = function(e) {
2826
2842
  return e instanceof RegExp || e instanceof Function;
2827
- }, _t = function() {
2843
+ }, vt = function() {
2828
2844
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2829
- if (mt && mt === e) return;
2830
- (!e || typeof e != "object") && (e = {}), e = Z(e), ft = pt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, A = ft === "application/xhtml+xml" ? Qi : Zi, b = Wa(e, "ALLOWED_TAGS", Ae, { transform: A }), x = Wa(e, "ALLOWED_ATTR", je, { transform: A }), at = Wa(e, "ALLOWED_NAMESPACES", ot, { transform: Qi }), tt = Wa(e, "ADD_URI_SAFE_ATTR", nt, {
2831
- transform: A,
2845
+ if (ht && ht === e) return;
2846
+ (!e || typeof e != "object") && (e = {}), e = Z(e), pt = mt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, k = pt === "application/xhtml+xml" ? na : ta, b = Ja(e, "ALLOWED_TAGS", Ae, { transform: k }), x = Ja(e, "ALLOWED_ATTR", je, { transform: k }), st = Ja(e, "ALLOWED_NAMESPACES", ct, { transform: na }), tt = Ja(e, "ADD_URI_SAFE_ATTR", nt, {
2847
+ transform: k,
2832
2848
  base: nt
2833
- }), $e = Wa(e, "ADD_DATA_URI_TAGS", et, {
2834
- transform: A,
2849
+ }), $e = Ja(e, "ADD_DATA_URI_TAGS", et, {
2850
+ transform: k,
2835
2851
  base: et
2836
- }), Ze = Wa(e, "FORBID_CONTENTS", Qe, { transform: A }), Me = Wa(e, "FORBID_TAGS", Z({}), { transform: A }), Ne = Wa(e, "FORBID_ATTR", Z({}), { transform: A }), Xe = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Pe = e.ALLOW_ARIA_ATTR !== !1, Fe = e.ALLOW_DATA_ATTR !== !1, Ie = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Le = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, w = e.SAFE_FOR_TEMPLATES || !1, Re = e.SAFE_FOR_XML !== !1, T = e.WHOLE_DOCUMENT || !1, Ue = e.RETURN_DOM || !1, E = e.RETURN_DOM_FRAGMENT || !1, We = e.RETURN_TRUSTED_TYPE || !1, He = e.FORCE_BODY || !1, Ge = e.SANITIZE_DOM !== !1, Ke = e.SANITIZE_NAMED_PROPS || !1, Je = e.KEEP_CONTENT !== !1, Ye = e.IN_PLACE || !1, ke = fa(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ka, O = typeof e.NAMESPACE == "string" ? e.NAMESPACE : D, ct = Ga(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, st)), ut = Ga(e, "HTML_INTEGRATION_POINTS", () => X({}, lt));
2837
- let t = Ga(e, "CUSTOM_ELEMENT_HANDLING", () => Vi(null));
2838
- if (S = Vi(null), q(t, "tagNameCheck") && gt(t.tagNameCheck) && (S.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && gt(t.attributeNameCheck) && (S.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (S.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(S), w && (Fe = !1), E && (Ue = !0), Xe && (b = X({}, ya), x = Vi(null), Xe.html === !0 && (X(b, pa), X(x, ba)), Xe.svg === !0 && (X(b, ma), X(x, xa), X(x, Ca)), Xe.svgFilters === !0 && (X(b, ha), X(x, xa), X(x, Ca)), Xe.mathMl === !0 && (X(b, _a), X(x, Sa), X(x, Ca))), C.tagCheck = null, C.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? C.tagCheck = e.ADD_TAGS : Xi(e.ADD_TAGS) && (b === Ae && (b = Z(b)), X(b, e.ADD_TAGS, A))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? C.attributeCheck = e.ADD_ATTR : Xi(e.ADD_ATTR) && (x === je && (x = Z(x)), X(x, e.ADD_ATTR, A))), q(e, "ADD_FORBID_CONTENTS") && Xi(e.ADD_FORBID_CONTENTS) && (Ze === Qe && (Ze = Z(Ze)), X(Ze, e.ADD_FORBID_CONTENTS, A)), Je && (b["#text"] = !0), T && X(b, [
2852
+ }), Ze = Ja(e, "FORBID_CONTENTS", Qe, { transform: k }), Me = Ja(e, "FORBID_TAGS", Z({}), { transform: k }), Ne = Ja(e, "FORBID_ATTR", Z({}), { transform: k }), Xe = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Pe = e.ALLOW_ARIA_ATTR !== !1, Fe = e.ALLOW_DATA_ATTR !== !1, Ie = e.ALLOW_UNKNOWN_PROTOCOLS || !1, w = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, T = e.SAFE_FOR_TEMPLATES || !1, Le = e.SAFE_FOR_XML !== !1, Re = e.WHOLE_DOCUMENT || !1, Ue = e.RETURN_DOM || !1, We = e.RETURN_DOM_FRAGMENT || !1, Ge = e.RETURN_TRUSTED_TYPE || !1, He = e.FORCE_BODY || !1, Ke = e.SANITIZE_DOM !== !1, qe = e.SANITIZE_NAMED_PROPS || !1, Je = e.KEEP_CONTENT !== !1, Ye = e.IN_PLACE || !1, ke = ga(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Na, at = typeof e.NAMESPACE == "string" ? e.NAMESPACE : D, O = Ya(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, lt)), dt = Ya(e, "HTML_INTEGRATION_POINTS", () => X({}, ut));
2853
+ let t = Ya(e, "CUSTOM_ELEMENT_HANDLING", () => Gi(null));
2854
+ if (S = Gi(null), q(t, "tagNameCheck") && _t(t.tagNameCheck) && (S.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && _t(t.attributeNameCheck) && (S.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (S.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(S), T && (Fe = !1), We && (Ue = !0), Xe && (b = X({}, Ca), x = Gi(null), Xe.html === !0 && (X(b, _a), X(x, wa)), Xe.svg === !0 && (X(b, va), X(x, Ta), X(x, Da)), Xe.svgFilters === !0 && (X(b, ya), X(x, Ta), X(x, Da)), Xe.mathMl === !0 && (X(b, xa), X(x, Ea), X(x, Da))), C.tagCheck = null, C.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? C.tagCheck = e.ADD_TAGS : ea(e.ADD_TAGS) && (b === Ae && (b = Z(b)), X(b, e.ADD_TAGS, k))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? C.attributeCheck = e.ADD_ATTR : ea(e.ADD_ATTR) && (x === je && (x = Z(x)), X(x, e.ADD_ATTR, k))), q(e, "ADD_FORBID_CONTENTS") && ea(e.ADD_FORBID_CONTENTS) && (Ze === Qe && (Ze = Z(Ze)), X(Ze, e.ADD_FORBID_CONTENTS, k)), Je && (b["#text"] = !0), Re && X(b, [
2839
2855
  "html",
2840
2856
  "head",
2841
2857
  "body"
2842
2858
  ]), b.table && (X(b, ["tbody"]), delete Me.tbody), e.TRUSTED_TYPES_POLICY) {
2843
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ca("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2844
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ca("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2845
- let t = g;
2846
- g = e.TRUSTED_TYPES_POLICY;
2859
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw fa("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2860
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw fa("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2861
+ let t = h;
2862
+ h = e.TRUSTED_TYPES_POLICY;
2847
2863
  try {
2848
- _ = pe("");
2864
+ g = pe("");
2849
2865
  } catch (e) {
2850
- throw g = t, e;
2866
+ throw h = t, e;
2851
2867
  }
2852
- } else e.TRUSTED_TYPES_POLICY === null ? (g = void 0, _ = "") : (g === void 0 && (g = he()), g && typeof _ == "string" && (_ = pe("")));
2853
- G && G(e), mt = e;
2854
- }, vt = X({}, [
2855
- ...ma,
2856
- ...ha,
2857
- ...ga
2858
- ]), yt = X({}, [..._a, ...va]), bt = function(e, t, n) {
2859
- return t.namespaceURI === D ? e === "svg" : t.namespaceURI === rt ? e === "svg" && (n === "annotation-xml" || ct[n]) : !!vt[e];
2860
- }, j = function(e, t, n) {
2861
- return t.namespaceURI === D ? e === "math" : t.namespaceURI === it ? e === "math" && ut[n] : !!yt[e];
2862
- }, M = function(e, t, n) {
2863
- return t.namespaceURI === it && !ut[n] || t.namespaceURI === rt && !ct[n] ? !1 : !yt[e] && (dt[e] || !vt[e]);
2864
- }, xt = function(e) {
2868
+ } else e.TRUSTED_TYPES_POLICY === null ? (h = void 0, g = "") : (h === void 0 && (h = he()), h && typeof g == "string" && (g = pe("")));
2869
+ G && G(e), ht = e;
2870
+ }, yt = X({}, [
2871
+ ...va,
2872
+ ...ya,
2873
+ ...ba
2874
+ ]), bt = X({}, [...xa, ...Sa]), xt = function(e, t, n) {
2875
+ return t.namespaceURI === D ? e === "svg" : t.namespaceURI === rt ? e === "svg" && (n === "annotation-xml" || O[n]) : !!yt[e];
2876
+ }, St = function(e, t, n) {
2877
+ return t.namespaceURI === D ? e === "math" : t.namespaceURI === it ? e === "math" && dt[n] : !!bt[e];
2878
+ }, Ct = function(e, t, n) {
2879
+ return t.namespaceURI === it && !dt[n] || t.namespaceURI === rt && !O[n] ? !1 : !bt[e] && (ft[e] || !yt[e]);
2880
+ }, wt = function(e) {
2865
2881
  let t = re(e);
2866
2882
  (!t || !t.tagName) && (t = {
2867
- namespaceURI: O,
2883
+ namespaceURI: at,
2868
2884
  tagName: "template"
2869
2885
  });
2870
- let n = Zi(e.tagName), r = Zi(t.tagName);
2871
- return at[e.namespaceURI] ? e.namespaceURI === it ? bt(n, t, r) : e.namespaceURI === rt ? j(n, t, r) : e.namespaceURI === D ? M(n, t, r) : !!(ft === "application/xhtml+xml" && at[e.namespaceURI]) : !1;
2872
- }, St = function(e) {
2873
- Ji(t.removed, { element: e });
2886
+ let n = ta(e.tagName), r = ta(t.tagName);
2887
+ return st[e.namespaceURI] ? e.namespaceURI === it ? xt(n, t, r) : e.namespaceURI === rt ? St(n, t, r) : e.namespaceURI === D ? Ct(n, t, r) : !!(pt === "application/xhtml+xml" && st[e.namespaceURI]) : !1;
2888
+ }, A = function(e) {
2889
+ Qi(t.removed, { element: e });
2874
2890
  try {
2875
2891
  re(e).removeChild(e);
2876
2892
  } catch {
2877
- if (p(e), !re(e)) throw ca("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2893
+ if (p(e), !re(e)) throw fa("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2878
2894
  }
2879
- }, N = function(e, t, n) {
2895
+ }, j = function(e, t, n) {
2880
2896
  try {
2881
2897
  ee(e, t);
2882
2898
  } catch {
@@ -2884,14 +2900,14 @@ function Ka() {
2884
2900
  e.removeAttribute(n);
2885
2901
  } catch {}
2886
2902
  }
2887
- }, Ct = function(e) {
2888
- Et(e);
2903
+ }, M = function(e) {
2904
+ N(e);
2889
2905
  let t = ne(e);
2890
2906
  if (t) {
2891
2907
  let e = [];
2892
- Gi(t, (t) => {
2893
- Ji(e, t);
2894
- }), Gi(e, (e) => {
2908
+ Yi(t, (t) => {
2909
+ Qi(e, t);
2910
+ }), Yi(e, (e) => {
2895
2911
  try {
2896
2912
  p(e);
2897
2913
  } catch {}
@@ -2900,15 +2916,15 @@ function Ka() {
2900
2916
  let n = ae(e);
2901
2917
  if (n) for (let t = n.length - 1; t >= 0; --t) {
2902
2918
  let r = n[t], i = r && r.name;
2903
- typeof i == "string" && N(e, r, i);
2919
+ typeof i == "string" && j(e, r, i);
2904
2920
  }
2905
- }, wt = function(e, n, r) {
2921
+ }, Tt = function(e, n, r) {
2906
2922
  if (!r) try {
2907
2923
  r = n.getAttributeNode(e);
2908
2924
  } catch {
2909
2925
  r = null;
2910
2926
  }
2911
- Ji(t.removed, {
2927
+ Qi(t.removed, {
2912
2928
  attribute: r || null,
2913
2929
  from: n
2914
2930
  });
@@ -2920,42 +2936,42 @@ function Ka() {
2920
2936
  } catch {}
2921
2937
  }
2922
2938
  if (e === "is") {
2923
- if (Ue || E) try {
2924
- St(n);
2939
+ if (Ue || We) try {
2940
+ A(n);
2925
2941
  } catch {}
2926
2942
  else try {
2927
2943
  n.setAttribute(e, "");
2928
2944
  } catch {}
2929
2945
  }
2930
- }, Tt = function(e) {
2946
+ }, Et = function(e) {
2931
2947
  let t = ae(e);
2932
2948
  if (t) for (let n = t.length - 1; n >= 0; --n) {
2933
2949
  let r = t[n], i = r && r.name;
2934
- typeof i != "string" || x[A(i)] || N(e, r, i);
2950
+ typeof i != "string" || x[k(i)] || j(e, r, i);
2935
2951
  }
2936
- }, Et = function(e) {
2952
+ }, N = function(e) {
2937
2953
  let t = [e];
2938
2954
  for (; t.length > 0;) {
2939
2955
  let e = t.pop();
2940
- ce(e) === $.element && Tt(e);
2956
+ ce(e) === $.element && Et(e);
2941
2957
  let n = ne(e);
2942
2958
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
2943
2959
  }
2944
2960
  }, Dt = function(e, t) {
2945
- return Re ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
2961
+ return Le ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
2946
2962
  }, Ot = function(e) {
2947
- if (!Re) return;
2963
+ if (!Le) return;
2948
2964
  let t = [e];
2949
2965
  for (; t.length > 0;) {
2950
2966
  let e = t.pop(), n = ce(e);
2951
- if (n === $.processingInstruction || n === $.comment && J(Fa, e.data)) {
2967
+ if (n === $.processingInstruction || n === $.comment && J(za, e.data)) {
2952
2968
  try {
2953
2969
  p(e);
2954
2970
  } catch {}
2955
2971
  continue;
2956
2972
  }
2957
2973
  if (n === $.element) {
2958
- let t = e, n = A(h(e));
2974
+ let t = e, n = k(le(e));
2959
2975
  try {
2960
2976
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Dt("for", n) && t.removeAttribute("for");
2961
2977
  } catch {}
@@ -2967,64 +2983,64 @@ function Ka() {
2967
2983
  let t = null, r = null;
2968
2984
  if (He) e = "<remove></remove>" + e;
2969
2985
  else {
2970
- let t = $i(e, /^[\r\n\t ]+/);
2986
+ let t = ra(e, /^[\r\n\t ]+/);
2971
2987
  r = t && t[0];
2972
2988
  }
2973
- ft === "application/xhtml+xml" && O === D && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
2974
- let i = g ? pe(e) : e;
2975
- if (O === D) try {
2976
- t = new l().parseFromString(i, ft);
2989
+ pt === "application/xhtml+xml" && at === D && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
2990
+ let i = h ? pe(e) : e;
2991
+ if (at === D) try {
2992
+ t = new l().parseFromString(i, pt);
2977
2993
  } catch {}
2978
2994
  if (!t || !t.documentElement) {
2979
- t = ge.createDocument(O, "template", null);
2995
+ t = v.createDocument(at, "template", null);
2980
2996
  try {
2981
- t.documentElement.innerHTML = k ? _ : i;
2997
+ t.documentElement.innerHTML = ot ? g : i;
2982
2998
  } catch {}
2983
2999
  }
2984
3000
  let a = t.body || t.documentElement;
2985
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), O === D ? ye.call(t, T ? "html" : "body")[0] : T ? t.documentElement : a;
3001
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), at === D ? ye.call(t, Re ? "html" : "body")[0] : Re ? t.documentElement : a;
2986
3002
  }, At = function(e) {
2987
3003
  let t = se ? se(e) : e.ownerDocument;
2988
3004
  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
- }, P = function(e) {
2990
- return e = ea(e, xe, " "), e = ea(e, Se, " "), e = ea(e, Ce, " "), e;
2991
3005
  }, jt = function(e) {
3006
+ return e = ia(e, xe, " "), e = ia(e, Se, " "), e = ia(e, Ce, " "), e;
3007
+ }, Mt = function(e) {
2992
3008
  e.normalize();
2993
3009
  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 = P(r.data), r = n.nextNode();
3010
+ for (; r;) r.data = jt(r.data), r = n.nextNode();
2995
3011
  let i = e.querySelectorAll?.call(e, "template");
2996
- i && Gi(i, (e) => {
2997
- Nt(e.content) && jt(e.content);
3012
+ i && Yi(i, (e) => {
3013
+ Pt(e.content) && Mt(e.content);
2998
3014
  });
2999
- }, Mt = function(e) {
3000
- let t = oe ? oe(e) : null;
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
3015
  }, Nt = function(e) {
3003
- if (!m || typeof e != "object" || !e) return !1;
3016
+ let t = m ? m(e) : null;
3017
+ return typeof t != "string" || k(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);
3018
+ }, Pt = function(e) {
3019
+ if (!oe || typeof e != "object" || !e) return !1;
3004
3020
  try {
3005
- return m(e) === $.documentFragment;
3021
+ return oe(e) === $.documentFragment;
3006
3022
  } catch {
3007
3023
  return !1;
3008
3024
  }
3009
- }, F = function(e) {
3010
- if (!m || typeof e != "object" || !e) return !1;
3025
+ }, P = function(e) {
3026
+ if (!oe || typeof e != "object" || !e) return !1;
3011
3027
  try {
3012
- return typeof m(e) == "number";
3028
+ return typeof oe(e) == "number";
3013
3029
  } catch {
3014
3030
  return !1;
3015
3031
  }
3016
3032
  };
3017
- function I(e, n, r) {
3018
- e.length !== 0 && Gi(e, (e) => {
3019
- e.call(t, n, r, mt);
3033
+ function F(e, n, r) {
3034
+ e.length !== 0 && Yi(e, (e) => {
3035
+ e.call(t, n, r, ht);
3020
3036
  });
3021
3037
  }
3022
- let Pt = function(e, t) {
3023
- return !!(Re && e.hasChildNodes() && !F(e.firstElementChild) && J(Pa, e.textContent) && J(Pa, e.innerHTML) || Re && e.namespaceURI === D && za[t] && (F(e.firstElementChild) || typeof e.textContent == "string" && J(Ba[t], e.textContent)) || e.nodeType === $.processingInstruction || Re && e.nodeType === $.comment && J(Fa, e.data));
3024
- }, Ft = function(e, t) {
3038
+ let Ft = function(e, t) {
3039
+ return !!(Le && e.hasChildNodes() && !P(e.firstElementChild) && J(Ra, e.textContent) && J(Ra, e.innerHTML) || Le && e.namespaceURI === D && Ua[t] && (P(e.firstElementChild) || typeof e.textContent == "string" && J(Wa[t], e.textContent)) || e.nodeType === $.processingInstruction || Le && e.nodeType === $.comment && J(za, e.data));
3040
+ }, It = function(e, t) {
3025
3041
  return e instanceof RegExp ? J(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
3026
- }, It = function(e, t, n) {
3027
- if (!Me[t] && Vt(t) && Ft(S.tagNameCheck, t)) return !1;
3042
+ }, I = function(e, t, n) {
3043
+ if (!Me[t] && Ht(t) && It(S.tagNameCheck, t)) return !1;
3028
3044
  if (Je && !Ze[t]) {
3029
3045
  let t = re(e), r = ne(e);
3030
3046
  if (r && t) {
@@ -3035,35 +3051,35 @@ function Ka() {
3035
3051
  }
3036
3052
  }
3037
3053
  }
3038
- return St(e), !0;
3054
+ return A(e), !0;
3039
3055
  }, Lt = function(e, t, n, r) {
3040
3056
  return e.length === 0 ? t : t === n || t === r ? Z(t) : t;
3041
- }, L = function(e, t) {
3042
- return e === t || re(e) !== null ? !1 : (Ye && Et(e), !0);
3043
- }, Rt = function(e, n) {
3044
- if (I(y.beforeSanitizeElements, e, null), L(e, n)) return !0;
3045
- if (Mt(e)) return St(e), !0;
3046
- let r = A(h(e));
3047
- if (b = Lt(y.uponSanitizeElement, b, Ae, Be), I(y.uponSanitizeElement, e, {
3057
+ }, Rt = function(e, t) {
3058
+ return e === t || re(e) !== null ? !1 : (Ye && N(e), !0);
3059
+ }, zt = function(e, n) {
3060
+ if (F(y.beforeSanitizeElements, e, null), Rt(e, n)) return !0;
3061
+ if (Nt(e)) return A(e), !0;
3062
+ let r = k(le(e));
3063
+ if (b = Lt(y.uponSanitizeElement, b, Ae, Be), F(y.uponSanitizeElement, e, {
3048
3064
  tagName: r,
3049
3065
  allowedTags: b
3050
- }), L(e, n)) return !0;
3051
- if (Pt(e, r)) return St(e), !0;
3066
+ }), Rt(e, n)) return !0;
3067
+ if (Ft(e, r)) return A(e), !0;
3052
3068
  if (Me[r] || !(C.tagCheck instanceof Function && C.tagCheck(r)) && !b[r]) {
3053
- let t = It(e, r, n);
3054
- return t === !1 && (I(y.afterSanitizeElements, e, null), L(e, n)) ? !0 : t;
3069
+ let t = I(e, r, n);
3070
+ return t === !1 && (F(y.afterSanitizeElements, e, null), Rt(e, n)) ? !0 : t;
3055
3071
  }
3056
- if (ce(e) === $.element && !xt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(Ia, e.innerHTML)) return St(e), !0;
3057
- if (w && e.nodeType === $.text) {
3058
- let n = P(e.textContent);
3059
- e.textContent !== n && (Ji(t.removed, { element: e.cloneNode() }), e.textContent = n);
3072
+ if (ce(e) === $.element && !wt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(Ba, e.innerHTML)) return A(e), !0;
3073
+ if (T && e.nodeType === $.text) {
3074
+ let n = jt(e.textContent);
3075
+ e.textContent !== n && (Qi(t.removed, { element: e.cloneNode() }), e.textContent = n);
3060
3076
  }
3061
- return I(y.afterSanitizeElements, e, null), L(e, n);
3062
- }, zt = function(e, t, r) {
3063
- if (Ne[t] || Dt(t, e) || Ge && (t === "id" || t === "name") && (r in n || r in ht)) return !1;
3077
+ return F(y.afterSanitizeElements, e, null), Rt(e, n);
3078
+ }, Bt = function(e, t, r) {
3079
+ if (Ne[t] || Dt(t, e) || Ke && (t === "id" || t === "name") && (r in n || r in gt)) return !1;
3064
3080
  let i = x[t] || C.attributeCheck instanceof Function && C.attributeCheck(t, e);
3065
- return Fe && J(we, t) || Pe && J(Te, t) ? !0 : i ? tt[t] || J(ke, ea(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ta(r, "data:") === 0 && $e[e] || Ie && !J(Ee, ea(r, De, "")) ? !0 : !r : Vt(e) && Ft(S.tagNameCheck, e) && Ft(S.attributeNameCheck, t, e) || t === "is" && S.allowCustomizedBuiltInElements && Ft(S.tagNameCheck, r);
3066
- }, Bt = X({}, [
3081
+ return Fe && J(we, t) || Pe && J(Te, t) ? !0 : i ? tt[t] || J(ke, ia(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && aa(r, "data:") === 0 && $e[e] || Ie && !J(Ee, ia(r, De, "")) ? !0 : !r : Ht(e) && It(S.tagNameCheck, e) && It(S.attributeNameCheck, t, e) || t === "is" && S.allowCustomizedBuiltInElements && It(S.tagNameCheck, r);
3082
+ }, Vt = X({}, [
3067
3083
  "annotation-xml",
3068
3084
  "color-profile",
3069
3085
  "font-face",
@@ -3072,24 +3088,24 @@ function Ka() {
3072
3088
  "font-face-src",
3073
3089
  "font-face-uri",
3074
3090
  "missing-glyph"
3075
- ]), Vt = function(e) {
3076
- return !Bt[Zi(e)] && J(Oe, e);
3077
- }, Ht = function(e, t, n, r) {
3078
- if (g && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3091
+ ]), Ht = function(e) {
3092
+ return !Vt[ta(e)] && J(Oe, e);
3093
+ }, Ut = function(e, t, n, r) {
3094
+ if (h && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3079
3095
  case "TrustedHTML": return pe(r);
3080
3096
  case "TrustedScriptURL": return me(r);
3081
3097
  }
3082
3098
  return r;
3083
- }, Ut = function(e, t, n, r) {
3099
+ }, Wt = function(e, t, n, r) {
3084
3100
  try {
3085
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Mt(e) || (St(e), !1);
3101
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Nt(e) || (A(e), !1);
3086
3102
  } catch {
3087
- return wt(t, e), !1;
3103
+ return Tt(t, e), !1;
3088
3104
  }
3089
- }, Wt = function(e, n) {
3090
- if (I(y.beforeSanitizeAttributes, e, null), L(e, n)) return;
3105
+ }, Gt = function(e, n) {
3106
+ if (F(y.beforeSanitizeAttributes, e, null), Rt(e, n)) return;
3091
3107
  let r = e.attributes;
3092
- if (!r || Mt(e)) return;
3108
+ if (!r || Nt(e)) return;
3093
3109
  x = Lt(y.uponSanitizeAttribute, x, je, Ve);
3094
3110
  let i = {
3095
3111
  attrName: "",
@@ -3097,20 +3113,20 @@ function Ka() {
3097
3113
  keepAttr: !0,
3098
3114
  allowedAttributes: x,
3099
3115
  forceKeepAttr: void 0
3100
- }, a = r.length, o = A(e.nodeName);
3116
+ }, a = r.length, o = k(e.nodeName);
3101
3117
  for (; a--;) {
3102
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = A(s), d = l, f = s === "value" ? d : na(d), p = !1;
3103
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(y.uponSanitizeAttribute, e, i), f = i.attrValue, Ke && (u === "id" || u === "name") && ta(f, qe) !== 0 && (wt(s, e, n), f = qe + f, p = !0), Re && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f) || u === "attributename" && $i(f, "href") ? wt(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Le && J(La, f) ? wt(s, e, n) : (w && (f = P(f)), zt(o, u, f) ? (f = Ht(o, u, c, f), f !== d && Ut(e, s, c, f) && p && qi(t.removed)) : wt(s, e, n)) : wt(s, e, n));
3118
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = k(s), d = l, f = s === "value" ? d : oa(d), p = !1;
3119
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, F(y.uponSanitizeAttribute, e, i), f = i.attrValue, qe && (u === "id" || u === "name") && aa(f, E) !== 0 && (Tt(s, e, n), f = E + f, p = !0), Le && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f) || u === "attributename" && ra(f, "href") ? Tt(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !w && J(Va, f) ? Tt(s, e, n) : (T && (f = jt(f)), Bt(o, u, f) ? (f = Ut(o, u, c, f), f !== d && Wt(e, s, c, f) && p && Zi(t.removed)) : Tt(s, e, n)) : Tt(s, e, n));
3104
3120
  }
3105
- I(y.afterSanitizeAttributes, e, null), L(e, n);
3106
- }, Gt = function(e) {
3121
+ F(y.afterSanitizeAttributes, e, null), Rt(e, n);
3122
+ }, Kt = function(e) {
3107
3123
  let t = null, n = At(e);
3108
- for (I(y.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(y.uponSanitizeShadowNode, t, null), Rt(t, e), Wt(t, e), Nt(t.content) && Gt(t.content), ce(t) === $.element) {
3124
+ for (F(y.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (F(y.uponSanitizeShadowNode, t, null), zt(t, e), Gt(t, e), Pt(t.content) && Kt(t.content), ce(t) === $.element) {
3109
3125
  let e = ie(t);
3110
- Nt(e) && (Kt(e), Gt(e));
3126
+ Pt(e) && (qt(e), Kt(e));
3111
3127
  }
3112
- I(y.afterSanitizeShadowDOM, e, null);
3113
- }, Kt = function(e) {
3128
+ F(y.afterSanitizeShadowDOM, e, null);
3129
+ }, qt = function(e) {
3114
3130
  let t = [{
3115
3131
  node: e,
3116
3132
  shadow: null
@@ -3118,7 +3134,7 @@ function Ka() {
3118
3134
  for (; t.length > 0;) {
3119
3135
  let e = t.pop();
3120
3136
  if (e.shadow) {
3121
- Gt(e.shadow);
3137
+ Kt(e.shadow);
3122
3138
  continue;
3123
3139
  }
3124
3140
  let n = e.node, r = ce(n) === $.element, i = ne(n);
@@ -3127,10 +3143,10 @@ function Ka() {
3127
3143
  shadow: null
3128
3144
  });
3129
3145
  if (r) {
3130
- let e = oe ? oe(n) : null;
3131
- if (typeof e == "string" && A(e) === "template") {
3146
+ let e = m ? m(n) : null;
3147
+ if (typeof e == "string" && k(e) === "template") {
3132
3148
  let e = n.content;
3133
- Nt(e) && t.push({
3149
+ Pt(e) && t.push({
3134
3150
  node: e,
3135
3151
  shadow: null
3136
3152
  });
@@ -3138,7 +3154,7 @@ function Ka() {
3138
3154
  }
3139
3155
  if (r) {
3140
3156
  let e = ie(n);
3141
- Nt(e) && t.push({
3157
+ Pt(e) && t.push({
3142
3158
  node: null,
3143
3159
  shadow: e
3144
3160
  }, {
@@ -3150,99 +3166,130 @@ function Ka() {
3150
3166
  };
3151
3167
  return t.sanitize = function(e) {
3152
3168
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
3153
- if (k = !e, k && (e = "<!-->"), typeof e != "string" && !F(e) && (e = da(e), typeof e != "string")) throw ca("dirty is not a string, aborting");
3169
+ if (ot = !e, ot && (e = "<!-->"), typeof e != "string" && !P(e) && (e = ha(e), typeof e != "string")) throw fa("dirty is not a string, aborting");
3154
3170
  if (!t.isSupported) return e;
3155
- ze ? (b = Be, x = Ve) : _t(n), (y.uponSanitizeElement.length > 0 || y.uponSanitizeAttribute.length > 0) && (b = Z(b)), y.uponSanitizeAttribute.length > 0 && (x = Z(x)), t.removed = [];
3156
- let c = Ye && typeof e != "string" && F(e);
3171
+ ze ? (b = Be, x = Ve) : vt(n), (y.uponSanitizeElement.length > 0 || y.uponSanitizeAttribute.length > 0) && (b = Z(b)), y.uponSanitizeAttribute.length > 0 && (x = Z(x)), t.removed = [];
3172
+ let c = Ye && typeof e != "string" && P(e);
3157
3173
  if (c) {
3158
3174
  Ot(e);
3159
- let t = h(e);
3175
+ let t = le(e);
3160
3176
  if (typeof t == "string") {
3161
- let n = A(t);
3162
- if (!b[n] || Me[n]) throw Ct(e), ca("root node is forbidden and cannot be sanitized in-place");
3177
+ let n = k(t);
3178
+ if (!b[n] || Me[n]) throw M(e), fa("root node is forbidden and cannot be sanitized in-place");
3163
3179
  }
3164
- if (Mt(e)) throw Ct(e), ca("root node is clobbered and cannot be sanitized in-place");
3180
+ if (Nt(e)) throw M(e), fa("root node is clobbered and cannot be sanitized in-place");
3165
3181
  try {
3166
- Kt(e);
3182
+ qt(e);
3167
3183
  } catch (t) {
3168
- throw Ct(e), t;
3184
+ throw M(e), t;
3169
3185
  }
3170
- } else if (F(e)) i = kt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Kt(i);
3186
+ } else if (P(e)) i = kt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), qt(i);
3171
3187
  else {
3172
- if (!Ue && !w && !T && e.indexOf("<") === -1) return g && We ? pe(e) : e;
3173
- if (i = kt(e), !i) return Ue ? null : We ? _ : "";
3188
+ if (!Ue && !T && !Re && e.indexOf("<") === -1) return h && Ge ? pe(e) : e;
3189
+ if (i = kt(e), !i) return Ue ? null : Ge ? g : "";
3174
3190
  }
3175
- i && He && St(i.firstChild);
3191
+ i && He && A(i.firstChild);
3176
3192
  let l = c ? e : i;
3177
3193
  try {
3178
3194
  let e = At(l);
3179
- for (; o = e.nextNode();) Rt(o, l), Wt(o, l), Nt(o.content) && Gt(o.content);
3195
+ for (; o = e.nextNode();) zt(o, l), Gt(o, l), Pt(o.content) && Kt(o.content);
3180
3196
  } catch (n) {
3181
- throw c && (Ct(e), Gi(t.removed, (e) => {
3182
- e.element && Et(e.element);
3197
+ throw c && (M(e), Yi(t.removed, (e) => {
3198
+ e.element && N(e.element);
3183
3199
  })), n;
3184
3200
  }
3185
3201
  if (c) {
3186
3202
  let n = !1;
3187
- if (Gi(t.removed, (t) => {
3188
- t.element && (t.element === e && (n = !0), Et(t.element));
3189
- }), n) throw ca("a node selected for removal could not be safely returned; refusing to sanitize in place");
3190
- return w && jt(e), e;
3203
+ if (Yi(t.removed, (t) => {
3204
+ t.element && (t.element === e && (n = !0), N(t.element));
3205
+ }), n) throw fa("a node selected for removal could not be safely returned; refusing to sanitize in place");
3206
+ return T && Mt(e), e;
3191
3207
  }
3192
3208
  if (Ue) {
3193
- if (w && jt(i), E) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3209
+ if (T && Mt(i), We) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3194
3210
  else s = i;
3195
3211
  return (x.shadowroot || x.shadowrootmode) && (s = be.call(r, s, !0)), s;
3196
3212
  }
3197
- let u = T ? i.outerHTML : i.innerHTML;
3198
- return T && b["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Ma, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), w && (u = P(u)), g && We ? pe(u) : u;
3213
+ let u = Re ? i.outerHTML : i.innerHTML;
3214
+ return Re && b["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Ia, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), T && (u = jt(u)), h && Ge ? pe(u) : u;
3199
3215
  }, t.setConfig = function() {
3200
3216
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3201
- _t(e), ze = !0, Be = b, Ve = x;
3217
+ vt(e), ze = !0, Be = b, Ve = x;
3202
3218
  }, t.clearConfig = function() {
3203
- mt = null, ze = !1, Be = null, Ve = null, g = le, _ = "";
3219
+ ht = null, ze = !1, Be = null, Ve = null, h = _, g = "";
3204
3220
  }, t.isValidAttribute = function(e, t, n) {
3205
- mt || _t({});
3206
- let r = A(e), i = A(t);
3207
- return zt(r, i, n);
3221
+ ht || vt({});
3222
+ let r = k(e), i = k(t);
3223
+ return Bt(r, i, n);
3208
3224
  }, t.addHook = function(e, t) {
3209
- typeof t == "function" && q(y, e) && Ji(y[e], t);
3225
+ typeof t == "function" && q(y, e) && Qi(y[e], t);
3210
3226
  }, t.removeHook = function(e, t) {
3211
3227
  if (q(y, e)) {
3212
3228
  if (t !== void 0) {
3213
- let n = Ki(y[e], t);
3214
- return n === -1 ? void 0 : Yi(y[e], n, 1)[0];
3229
+ let n = Xi(y[e], t);
3230
+ return n === -1 ? void 0 : $i(y[e], n, 1)[0];
3215
3231
  }
3216
- return qi(y[e]);
3232
+ return Zi(y[e]);
3217
3233
  }
3218
3234
  }, t.removeHooks = function(e) {
3219
3235
  q(y, e) && (y[e] = []);
3220
3236
  }, t.removeAllHooks = function() {
3221
- y = Ua();
3237
+ y = qa();
3222
3238
  }, t;
3223
3239
  }
3224
- var qa = Ka();
3240
+ var Za = Xa();
3225
3241
  //#endregion
3226
3242
  //#region ../../packages/components/src/chat/markdownHtml.ts
3227
- function Ja(e) {
3243
+ function Qa(e) {
3228
3244
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3229
3245
  }
3230
- function Ya(e, t) {
3246
+ function $a(e, t) {
3231
3247
  return `<span class="katex-pending" data-katex="${encodeURIComponent(e)}" data-display="${t}"></span>`;
3232
3248
  }
3233
- var Xa = {
3249
+ var eo = {
3234
3250
  ADD_ATTR: ["target"],
3235
3251
  ALLOW_UNKNOWN_PROTOCOLS: !0,
3236
- FORBID_TAGS: ["style", "form"],
3237
- FORBID_ATTR: ["style"]
3252
+ FORBID_TAGS: [
3253
+ "style",
3254
+ "form",
3255
+ "audio",
3256
+ "video",
3257
+ "source",
3258
+ "picture",
3259
+ "track",
3260
+ "image",
3261
+ "feImage"
3262
+ ],
3263
+ FORBID_ATTR: [
3264
+ "style",
3265
+ "srcset",
3266
+ "poster",
3267
+ "background"
3268
+ ]
3238
3269
  };
3239
- function Za(e) {
3240
- return qa.sanitize(e, Xa);
3270
+ Za.addHook("uponSanitizeAttribute", (e, t) => {
3271
+ t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1);
3272
+ });
3273
+ var to = "data-held-src";
3274
+ function no(e, t) {
3275
+ if (!t) return Za.sanitize(e, eo);
3276
+ let n = Za.sanitize(e, {
3277
+ ...eo,
3278
+ RETURN_DOM_FRAGMENT: !0
3279
+ });
3280
+ for (let e of Array.from(n.querySelectorAll("img"))) {
3281
+ let n = e.getAttribute("src") ?? "";
3282
+ if (t.canLoad(n)) continue;
3283
+ let r = e.ownerDocument.createElement("button");
3284
+ r.type = "button", r.className = "markdown-held-image", r.setAttribute(to, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3285
+ }
3286
+ let r = n.ownerDocument.createElement("div");
3287
+ return r.append(n), r.innerHTML;
3241
3288
  }
3242
3289
  //#endregion
3243
3290
  //#region ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
3244
3291
  a(), l();
3245
- var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3292
+ var ro = ["innerHTML"], io = 100, ao = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3246
3293
  __name: "PkStreamingMarkdown",
3247
3294
  props: {
3248
3295
  markdown: {
@@ -3276,10 +3323,10 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3276
3323
  return te ||= import("./dist-BK6ru3gS.js"), te;
3277
3324
  }
3278
3325
  let m = null;
3279
- function oe() {
3326
+ function se() {
3280
3327
  return m ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), m;
3281
3328
  }
3282
- let se = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, h = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3329
+ let ce = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, h = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3283
3330
  W.use({ extensions: [{
3284
3331
  name: "inlineKatex",
3285
3332
  level: "inline",
@@ -3288,7 +3335,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3288
3335
  if (t !== -1 && (t === 0 || e.charAt(t - 1) === " ")) return t;
3289
3336
  },
3290
3337
  tokenizer(e) {
3291
- let t = e.match(se);
3338
+ let t = e.match(ce);
3292
3339
  if (t) return {
3293
3340
  type: "inlineKatex",
3294
3341
  raw: t[0],
@@ -3297,7 +3344,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3297
3344
  };
3298
3345
  },
3299
3346
  renderer(e) {
3300
- return Ya(e.text, e.displayMode);
3347
+ return $a(e.text, e.displayMode);
3301
3348
  }
3302
3349
  }, {
3303
3350
  name: "blockKatex",
@@ -3312,7 +3359,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3312
3359
  };
3313
3360
  },
3314
3361
  renderer(e) {
3315
- return Ya(e.text, e.displayMode) + "\n";
3362
+ return $a(e.text, e.displayMode) + "\n";
3316
3363
  }
3317
3364
  }] }), W.use({ extensions: [{
3318
3365
  name: "thinking",
@@ -3333,14 +3380,14 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3333
3380
  return `<div class="thinking-block">${this.parser.parse(e.tokens ?? [])}</div>`;
3334
3381
  }
3335
3382
  }] });
3336
- let g = new W.Renderer(), _ = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), le = /^(?:javascript|data|vbscript|file):/i, ue = !1, de = (e) => _(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3383
+ let g = new W.Renderer(), _ = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ue = /^(?:javascript|data|vbscript|file):/i, de = !1, fe = (e) => _(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3337
3384
  g.link = function({ href: e, title: t, text: n, tokens: r }) {
3338
3385
  let i = this.parser.parseInline(r), a = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
3339
- if (!a || le.test(a)) return i;
3340
- let o = ue && n === a, s = t || (o ? a : ""), c = s ? ` title="${_(s)}"` : "", l = ne(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3341
- return `<a href="${_(a)}"${c}${l}>${o ? de(a) : i}</a>`;
3386
+ if (!a || ue.test(a)) return i;
3387
+ let o = de && n === a, s = t || (o ? a : ""), c = s ? ` title="${_(s)}"` : "", l = ne(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3388
+ return `<a href="${_(a)}"${c}${l}>${o ? fe(a) : i}</a>`;
3342
3389
  }, g.table = function(e) {
3343
- ue = !0;
3390
+ de = !0;
3344
3391
  try {
3345
3392
  let t = e.header.map((e) => _(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3346
3393
  let r = this.parser.parseInline(e.tokens), i = e.align ? ` align="${e.align}"` : "";
@@ -3348,15 +3395,15 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3348
3395
  }).join("")}</tr>`, r = e.rows.length ? `<tbody role="rowgroup">${e.rows.map(n).join("")}</tbody>` : "";
3349
3396
  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
3397
  } finally {
3351
- ue = !1;
3398
+ de = !1;
3352
3399
  }
3353
3400
  };
3354
- let fe = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3355
- g.code = ({ text: e }) => fe.test(e) ? `<pre class="mermaid">${Ja(e)}</pre>` : `<pre><code>${Ja(e)}</code></pre>`;
3356
- function pe(e) {
3401
+ let pe = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3402
+ g.code = ({ text: e }) => pe.test(e) ? `<pre class="mermaid">${Qa(e)}</pre>` : `<pre><code>${Qa(e)}</code></pre>`;
3403
+ function me(e) {
3357
3404
  return e.replace(/\\\[([\s\S]*?)\\\]/g, (e, t) => `$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g, (e, t) => `$${t}$`).replace(/^(\d+)\.(?!\s)/gm, "$1\\.");
3358
3405
  }
3359
- function me(e) {
3406
+ function he(e) {
3360
3407
  let t = /* @__PURE__ */ new Set(), n = /^(`{3,}|~{3,})[^\n]*\n([\s\S]*?)\n\1/gm, r;
3361
3408
  for (; (r = n.exec(e)) !== null;) for (let e = r.index; e < r.index + r[0].length; e++) t.add(e);
3362
3409
  return e.replace(/[{[]([\s\S]*?)[}\]]/g, (e, n, r) => {
@@ -3368,20 +3415,28 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3368
3415
  }
3369
3416
  }).replace(/\n{3,}/g, "\n\n");
3370
3417
  }
3371
- let he = [
3372
- ce,
3373
- me,
3374
- Vn,
3375
- pe
3376
- ], v = n("container"), ge = re(c(a, "markdown"), $a), _e = u(() => a.tailLength ? ve(ge.value, a.tailLength) : ge.value), { resolveText: ye } = ie(), be = ye(_e), y = u(() => {
3377
- let e = he.reduce((e, t) => t(e), be.value);
3378
- return Za(W.parse(e, {
3418
+ let ge = [
3419
+ le,
3420
+ he,
3421
+ Kn,
3422
+ me
3423
+ ], v = n("container"), _e = re(c(a, "markdown"), io), ve = u(() => a.tailLength ? xe(_e.value, a.tailLength) : _e.value), { resolveText: ye } = ie(), be = ye(ve), y = oe(), Se = u(() => {
3424
+ let e = ge.reduce((e, t) => t(e), be.value);
3425
+ return no(W.parse(e, {
3379
3426
  async: !1,
3380
3427
  breaks: !0,
3381
3428
  renderer: g
3382
- }));
3429
+ }), y.isGated.value ? {
3430
+ canLoad: y.canLoad,
3431
+ hostOf: y.hostOf,
3432
+ label: (e) => l("label.imageHeld", { host: e })
3433
+ } : void 0);
3383
3434
  });
3384
- async function xe() {
3435
+ function Ce(e) {
3436
+ let t = (e.target?.closest?.(`[${to}]`))?.getAttribute(to);
3437
+ t && (e.preventDefault(), e.stopPropagation(), y.release(t));
3438
+ }
3439
+ async function we() {
3385
3440
  if (a.loading) return;
3386
3441
  await i();
3387
3442
  let e = v.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
@@ -3396,18 +3451,18 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3396
3451
  } catch {}
3397
3452
  }
3398
3453
  }
3399
- async function Se() {
3454
+ async function Te() {
3400
3455
  await i();
3401
3456
  let e = v.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3402
3457
  if (!e?.length) return;
3403
3458
  let t = (await import("https://cdn.jsdelivr.net/npm/highlight.js@11/es/common.js")).default;
3404
3459
  for (let n of e) t.highlightElement(n), n.setAttribute("data-highlighted", "true");
3405
3460
  }
3406
- async function Ce() {
3461
+ async function Ee() {
3407
3462
  await i();
3408
3463
  let e = v.value?.querySelectorAll(".katex-pending");
3409
3464
  if (!e?.length) return;
3410
- let t = await oe();
3465
+ let t = await se();
3411
3466
  p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(v.value));
3412
3467
  for (let n of Array.from(e)) {
3413
3468
  if (!n.isConnected) continue;
@@ -3422,7 +3477,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3422
3477
  } catch {}
3423
3478
  }
3424
3479
  }
3425
- async function we() {
3480
+ async function De() {
3426
3481
  await i();
3427
3482
  let e = v.value?.querySelectorAll("pre.mermaid[data-rendered]");
3428
3483
  if (!e?.length) return;
@@ -3435,7 +3490,7 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3435
3490
  } catch {}
3436
3491
  }
3437
3492
  }
3438
- function Te(e) {
3493
+ function Oe(e) {
3439
3494
  let t = e.target;
3440
3495
  if (!(t instanceof HTMLImageElement) || t.dataset.broken) return;
3441
3496
  t.dataset.broken = "true";
@@ -3443,59 +3498,60 @@ var Qa = ["innerHTML"], $a = 100, eo = /*#__PURE__*/ ae(/* @__PURE__ */ e({
3443
3498
  n.className = "markdown-broken-image", n.textContent = t.alt || l("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
3444
3499
  }
3445
3500
  t(() => {
3446
- v.value?.addEventListener("error", Te, !0);
3501
+ v.value?.addEventListener("error", Oe, !0);
3447
3502
  }), o(() => {
3448
- v.value?.removeEventListener("error", Te, !0);
3449
- }), s([y, () => a.loading], xe, { immediate: !0 }), s(() => a.isDark, we), s(y, Se, { immediate: !0 }), s(y, Ce, { immediate: !0 });
3450
- let Ee = 0;
3451
- function De(e, t) {
3503
+ v.value?.removeEventListener("error", Oe, !0);
3504
+ }), s([Se, () => a.loading], we, { immediate: !0 }), s(() => a.isDark, De), s(Se, Te, { immediate: !0 }), s(Se, Ee, { immediate: !0 });
3505
+ let ke = 0;
3506
+ function b(e, t) {
3452
3507
  let n = document.createElement("span");
3453
3508
  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
3509
  let t = n.parentNode;
3455
3510
  t && (t.replaceChild(document.createTextNode(e), n), t.normalize());
3456
3511
  }, { once: !0 }), n;
3457
3512
  }
3458
- function Oe(e, t, n, r) {
3513
+ function Ae(e, t, n, r) {
3459
3514
  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(De(e, i * 30), n), i++));
3515
+ for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(b(e, i * 30), n), i++));
3461
3516
  return i;
3462
3517
  }
3463
- function ke(e) {
3518
+ function x(e) {
3464
3519
  let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(e) {
3465
3520
  return e.parentElement?.closest("pre, code, .katex-pending, .markdown-broken-image") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3466
3521
  } }), n = [];
3467
3522
  for (; t.nextNode();) n.push(t.currentNode);
3468
3523
  return n;
3469
3524
  }
3470
- function b() {
3525
+ function je() {
3471
3526
  if (!v.value || !a.loading || !a.animation) return;
3472
- let e = ke(v.value), t = 0, n = 0;
3527
+ let e = x(v.value), t = 0, n = 0;
3473
3528
  for (let r of e) {
3474
3529
  let e = r.textContent || "", i = t, a = t + e.length;
3475
- if (t = a, a <= Ee) continue;
3530
+ if (t = a, a <= ke) continue;
3476
3531
  let o = r.parentNode;
3477
3532
  if (!o) continue;
3478
- if (i >= Ee) {
3533
+ if (i >= ke) {
3479
3534
  let t = r.nextSibling;
3480
- o.removeChild(r), n = Oe(e, o, t, n);
3535
+ o.removeChild(r), n = Ae(e, o, t, n);
3481
3536
  continue;
3482
3537
  }
3483
- let s = Ee - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3484
- o.removeChild(c), n = Oe(l, o, u, n);
3538
+ let s = ke - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3539
+ o.removeChild(c), n = Ae(l, o, u, n);
3485
3540
  }
3486
- Ee = t;
3541
+ ke = t;
3487
3542
  }
3488
- return s(y, async () => {
3489
- await i(), b();
3543
+ return s(Se, async () => {
3544
+ await i(), je();
3490
3545
  }, { immediate: !0 }), s(() => a.markdown, (e, t) => {
3491
- (!e || t && e.length < t.length) && (Ee = 0);
3546
+ (!e || t && e.length < t.length) && (ke = 0);
3492
3547
  }), (e, t) => (r(), d("div", {
3493
3548
  ref: "container",
3494
- innerHTML: y.value
3495
- }, null, 8, Qa));
3549
+ onClick: Ce,
3550
+ innerHTML: Se.value
3551
+ }, null, 8, ro));
3496
3552
  }
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)}}"]]]);
3553
+ }), [["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
3554
  //#endregion
3499
- export { ue as C, de as D, le as E, h as O, Oe as S, _ as T, Se as _, he as a, pe as b, Ae as c, we as d, Ce as f, Me as g, ke as h, je as i, g as k, De as l, Pe as m, y as n, b as o, Ie as p, ge as r, x as s, eo as t, Fe as u, v, fe as w, Ee as x, xe as y };
3555
+ export { h as A, b as C, _ as D, pe as E, ue as O, _e as S, de as T, Fe as _, ge as a, Te as b, Ne as c, Le as d, Oe as f, je as g, T as h, C as i, g as j, fe as k, Me as l, Re as m, we as n, ve as o, De as p, be as r, S as s, ao as t, Ae as u, Ee as v, x as w, me as x, ye as y };
3500
3556
 
3501
- //# sourceMappingURL=PkStreamingMarkdown-Qk9Tk_N7.js.map
3557
+ //# sourceMappingURL=PkStreamingMarkdown-B_qmgO9_.js.map