aitu-app 0.6.78 → 0.6.80

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 (203) hide show
  1. package/README.md +3 -3
  2. package/assets/CanvasAudioPlayer-CSFENxi6.js +2 -0
  3. package/assets/ChatDrawer-CWZQP5R5.css +1 -0
  4. package/assets/ChatDrawer-sVEVW11M.js +11 -0
  5. package/assets/ChatMessagesArea-Cnb94V8-.js +7 -0
  6. package/assets/ChatMessagesArea-PlF5AwzD.css +1 -0
  7. package/assets/DeferredAIInputBar-D99l6sBS.js +8 -0
  8. package/assets/DrawnixDeferredFeatures-78cIu-ev.js +2 -0
  9. package/assets/{KnowledgeBaseContent-DcX5Jofx.js → KnowledgeBaseContent-DZ-1fPZa.js} +10 -10
  10. package/assets/{MVCreator-DllHozYg.js → MVCreator-BV8KDR6E.js} +8 -8
  11. package/assets/ModelBenchmarkWorkbench-DL6r0Z_5.js +2 -0
  12. package/assets/MusicAnalyzer-D9Bpmhym.css +1 -0
  13. package/assets/{MusicAnalyzer-DDeT6g3c.js → MusicAnalyzer-DQtjf36o.js} +2 -2
  14. package/assets/{MusicAnalyzer-CHcQ5t4P.js → MusicAnalyzer-u_5sy56T.js} +1 -1
  15. package/assets/PromptHistoryTool-B-ktaOpK.js +2 -0
  16. package/assets/PromptHistoryTool-BH7hq916.css +1 -0
  17. package/assets/ResizableDivider-BpUFdkte.js +1 -0
  18. package/assets/TaskQueuePanel-BLD1r7_I.js +1 -0
  19. package/assets/{VideoAnalyzer-BSLz1FaI.js → VideoAnalyzer-Bjv9pyDs.js} +2 -2
  20. package/assets/ai-generation-preferences-service-BSpgVCHz.js +1 -0
  21. package/assets/arc-CnA_FoJK.js +1 -0
  22. package/assets/{arc-BU2KKCa_.js → arc-DDvk_-VM.js} +1 -1
  23. package/assets/{batch-image-generation-Bg68r_Ql.js → batch-image-generation-N-lwbjRE.js} +3 -3
  24. package/assets/{blockDiagram-38ab4fdb-BCGEnMME.js → blockDiagram-38ab4fdb-B2G4wjZe.js} +6 -6
  25. package/assets/{blockDiagram-38ab4fdb-CsZR5uC5.js → blockDiagram-38ab4fdb-DBkZWrKk.js} +1 -1
  26. package/assets/{browser-DpICcNby.js → browser-ZXTF4AKv.js} +1 -1
  27. package/assets/{c4Diagram-3d4e48cf-9fuiuFdV.js → c4Diagram-3d4e48cf-BFg-wccg.js} +1 -1
  28. package/assets/{c4Diagram-3d4e48cf-WM4wd_GR.js → c4Diagram-3d4e48cf-CmyNnfip.js} +1 -1
  29. package/assets/{canvas-insertion-CdUQF7IV.js → canvas-insertion-CKIoVZ9a.js} +1 -1
  30. package/assets/channel-BQh3J7kz.js +1 -0
  31. package/assets/channel-CPsF_uSp.js +1 -0
  32. package/assets/{classDiagram-70f12bd4-DcYDedz1.js → classDiagram-70f12bd4-BoP-e23u.js} +2 -2
  33. package/assets/{classDiagram-70f12bd4-CBVHTwQu.js → classDiagram-70f12bd4-UTHJc2XA.js} +1 -1
  34. package/assets/classDiagram-v2-f2320105-BeBc2H-D.js +2 -0
  35. package/assets/{classDiagram-v2-f2320105-jpCwaHEd.js → classDiagram-v2-f2320105-Bjwz5ljW.js} +1 -1
  36. package/assets/{clipper-jvd5rF5a.js → clipper-NoHaeWV4.js} +1 -1
  37. package/assets/clone-CA2KqVCK.js +1 -0
  38. package/assets/createText-2e5e7dd3-Bsu7vT-L.js +8 -0
  39. package/assets/{createText-2e5e7dd3-x5lOIwut.js → createText-2e5e7dd3-DrWUfa-s.js} +1 -1
  40. package/assets/{edges-e0da2a9e-CbrF4nbD.js → edges-e0da2a9e-B9sYOHRt.js} +1 -1
  41. package/assets/{edges-e0da2a9e-Ch6PBwWs.js → edges-e0da2a9e-DX4IQMED.js} +1 -1
  42. package/assets/{erDiagram-9861fffd-DSlNVuAZ.js → erDiagram-9861fffd-B-LfsIMf.js} +1 -1
  43. package/assets/{erDiagram-9861fffd-Bq07elcI.js → erDiagram-9861fffd-DPdud_LA.js} +1 -1
  44. package/assets/{flowDb-956e92f1-Ti5YC4Vv.js → flowDb-956e92f1-C3xKlizM.js} +1 -1
  45. package/assets/{flowDb-956e92f1-BqPCJlZp.js → flowDb-956e92f1-Ck5oiEta.js} +1 -1
  46. package/assets/{flowDiagram-66a62f08-CPDuG3rY.js → flowDiagram-66a62f08-Bkt2NoHM.js} +4 -4
  47. package/assets/{flowDiagram-66a62f08-D3GSABFi.js → flowDiagram-66a62f08-CJnxo6dI.js} +1 -1
  48. package/assets/flowDiagram-v2-96b9c2cf-MnwxRDMO.js +1 -0
  49. package/assets/flowDiagram-v2-96b9c2cf-U7nNPvdl.js +1 -0
  50. package/assets/{flowchart-elk-definition-4a651766-BH09NeLA.js → flowchart-elk-definition-4a651766-2XkrsdKI.js} +2 -2
  51. package/assets/{flowchart-elk-definition-4a651766-BLaLPCDV.js → flowchart-elk-definition-4a651766-ec8y1a8S.js} +1 -1
  52. package/assets/{ganttDiagram-c361ad54-DL9ZeaEc.js → ganttDiagram-c361ad54-1TA0mZY_.js} +3 -3
  53. package/assets/{ganttDiagram-c361ad54-Sp9M1KHP.js → ganttDiagram-c361ad54-D-OrVtXV.js} +3 -3
  54. package/assets/{gitGraphDiagram-72cf32ee-BWwmRKo-.js → gitGraphDiagram-72cf32ee-Blt3RsBD.js} +1 -1
  55. package/assets/{gitGraphDiagram-72cf32ee-BSf1fsDV.js → gitGraphDiagram-72cf32ee-CKf6xgO1.js} +1 -1
  56. package/assets/{graph-g-2U7grQ.js → graph-CUYgHJmb.js} +1 -1
  57. package/assets/{graph--nPw8zXQ.js → graph-WeSRtsZO.js} +1 -1
  58. package/assets/{index-ZrVeQUWo.js → index--MqiaN5t.js} +1 -1
  59. package/assets/{index-C5eu4uSl.js → index-0b_TeH8L.js} +11 -11
  60. package/assets/{index-3862675e-BXwbZ2pz.js → index-3862675e-C2ipEQC8.js} +1 -1
  61. package/assets/{index-3862675e-D6Zy95zZ.js → index-3862675e-CeX6VlsU.js} +1 -1
  62. package/assets/{index-CLJUfzvO.js → index-B-J0JJak.js} +1 -1
  63. package/assets/{index-TkfyNewx.js → index-B7Hj7g41.js} +1 -1
  64. package/assets/{index-eZfwJ9bV.js → index-BS_v5cOh.js} +1 -1
  65. package/assets/index-Btk31p7r.js +1 -0
  66. package/assets/{index-DH12_HTj.js → index-C-Samsu3.js} +2 -2
  67. package/assets/index-C-llNX01.js +1 -0
  68. package/assets/index-C8c9icsH.js +2 -0
  69. package/assets/{index-D7b5fX1d.js → index-CAn2jfNg.js} +1 -1
  70. package/assets/{index-Dz8sghkK.js → index-CK2zt94U.js} +1 -1
  71. package/assets/{index-CfgvFFx3.js → index-CP51k4n6.js} +17 -17
  72. package/assets/{index-DI0OV6F8.js → index-CXBhIy30.js} +1 -1
  73. package/assets/index-C_Mj1wbj.js +2 -0
  74. package/assets/{index-BwSnJN93.js → index-CbfE0MBd.js} +1 -1
  75. package/assets/{index-C3qD42ws.js → index-CjeDxq0c.js} +1 -1
  76. package/assets/{index-DqMndQiP.js → index-Ct7OFnWK.js} +1 -1
  77. package/assets/{index-BaCHOxhI.js → index-CxxUIkx1.js} +1 -1
  78. package/assets/{index-B2dttXd7.js → index-D2Kc-3MO.js} +1 -1
  79. package/assets/{index-Bq8mPedC.js → index-DK0XEByD.js} +1 -1
  80. package/assets/{index-DllL1sx1.js → index-DQcV2DYj.js} +1 -1
  81. package/assets/{index-BP77pG9S.js → index-DSKRBuhn.js} +73 -73
  82. package/assets/{index-BXzGHPXz.js → index-DXqL8NRE.js} +2 -2
  83. package/assets/{index-B7V7-Vxz.js → index-DcLrRIlS.js} +1 -1
  84. package/assets/{index-D4pIkh3S.js → index-DdA-dF0D.js} +1 -1
  85. package/assets/{index-QkP3EC02.js → index-DdxTnVj5.js} +1 -1
  86. package/assets/{index-CmyOpFTN.js → index-DmrnShhc.js} +1 -1
  87. package/assets/{index-Bti3m-iW.js → index-QO0uGVDP.js} +1 -1
  88. package/assets/{index-BPR_DyGD.js → index-aIKXDB1M.js} +1 -1
  89. package/assets/{index-DIiIUyb-.js → index-n6JhNACm.js} +1 -1
  90. package/assets/{index-BWrcsh8u.js → index-qbS_W7PW.js} +1 -1
  91. package/assets/index-v7iKPBEu.css +1 -0
  92. package/assets/{infoDiagram-f8f76790-DpFqCCNv.js → infoDiagram-f8f76790-DEWQ3NXc.js} +1 -1
  93. package/assets/{infoDiagram-f8f76790-G2JpJJP7.js → infoDiagram-f8f76790-u_qjHFCm.js} +3 -3
  94. package/assets/{journeyDiagram-49397b02-DLLTobRM.js → journeyDiagram-49397b02-C8A30CBr.js} +1 -1
  95. package/assets/{journeyDiagram-49397b02-BdESGMrv.js → journeyDiagram-49397b02-hQJfqZih.js} +1 -1
  96. package/assets/{layout-WSR0vNPO.js → layout-CFKTKeqQ.js} +1 -1
  97. package/assets/{layout-CVkuImk4.js → layout-DvRyabpG.js} +1 -1
  98. package/assets/{line-D3bnG227.js → line-C72F34Po.js} +1 -1
  99. package/assets/{line-DQuMJveY.js → line-W5R41tQ1.js} +1 -1
  100. package/assets/{linear-CciP-97N.js → linear-7FXykgHM.js} +1 -1
  101. package/assets/{linear-Z6vFvuwc.js → linear-CVyOPUvz.js} +1 -1
  102. package/assets/main-BO0HWBB1.js +42 -0
  103. package/assets/{main-8DNjLY6L.css → main-DAuE07rf.css} +1 -1
  104. package/assets/{mermaid.core-CwZQb0ud.js → mermaid.core-2VcXhn43.js} +4 -4
  105. package/assets/{mindmap-definition-fc14e90a-BnJ8OOTI.js → mindmap-definition-fc14e90a-CcVXKGg4.js} +1 -1
  106. package/assets/{mindmap-definition-fc14e90a-CxQMydCW.js → mindmap-definition-fc14e90a-DRDYXe84.js} +2 -2
  107. package/assets/model-benchmark-launcher-C2qBiDlM.js +1 -0
  108. package/assets/{photo-wall-splitter-BZ88W5Zy.js → photo-wall-splitter-CFntSOdS.js} +1 -1
  109. package/assets/{pieDiagram-8a3498a8-BSDdkTeu.js → pieDiagram-8a3498a8-Be9dl9pU.js} +1 -1
  110. package/assets/{pieDiagram-8a3498a8-D6VtAoja.js → pieDiagram-8a3498a8-DXZOJYBv.js} +5 -5
  111. package/assets/ppt-generation-B5fKT_by.js +48 -0
  112. package/assets/{quadrantDiagram-120e2f19-C8k2xuBd.js → quadrantDiagram-120e2f19-DoU7aQSp.js} +3 -3
  113. package/assets/{quadrantDiagram-120e2f19-BbFV0VXY.js → quadrantDiagram-120e2f19-l5K9mx26.js} +1 -1
  114. package/assets/{requirementDiagram-deff3bca-C3xMdzJV.js → requirementDiagram-deff3bca-DN_87Wxe.js} +1 -1
  115. package/assets/{requirementDiagram-deff3bca-CpjqKjYZ.js → requirementDiagram-deff3bca-DOooq7kx.js} +1 -1
  116. package/assets/retry-image-BmIVuAVu.js +6 -0
  117. package/assets/{sankeyDiagram-04a897e0-Bjvig9bW.js → sankeyDiagram-04a897e0-BB33nO6_.js} +1 -1
  118. package/assets/{sankeyDiagram-04a897e0-BBJJgsFv.js → sankeyDiagram-04a897e0-CCa0hwml.js} +2 -2
  119. package/assets/{sequenceDiagram-704730f1-PFC_9IFI.js → sequenceDiagram-704730f1-CNhXZiix.js} +1 -1
  120. package/assets/{sequenceDiagram-704730f1-DX1MmBN_.js → sequenceDiagram-704730f1-ZqQ1QrY-.js} +1 -1
  121. package/assets/settings-dialog-BFuWTeQR.js +1 -0
  122. package/assets/{skill-dsl-parser-syNWYxFu.js → skill-dsl-parser-b-aB3P5u.js} +1 -1
  123. package/assets/{stateDiagram-587899a1-Dc3mI_B_.js → stateDiagram-587899a1-BBlOIJr7.js} +1 -1
  124. package/assets/{stateDiagram-587899a1-SFMUVAam.js → stateDiagram-587899a1-BhomZ0AN.js} +1 -1
  125. package/assets/{stateDiagram-v2-d93cdb3a-P4Yt2p_j.js → stateDiagram-v2-d93cdb3a-BpJsgMa0.js} +1 -1
  126. package/assets/stateDiagram-v2-d93cdb3a-CuOn9du2.js +1 -0
  127. package/assets/{styles-6aaf32cf-C3jnr3hV.js → styles-6aaf32cf-C2WEewoA.js} +1 -1
  128. package/assets/{styles-6aaf32cf-b6AdP7fu.js → styles-6aaf32cf-CTtf8moq.js} +1 -1
  129. package/assets/{styles-9a916d00-BUiD9iBe.js → styles-9a916d00-44Xi2-39.js} +1 -1
  130. package/assets/{styles-9a916d00-ii0XTdIm.js → styles-9a916d00-DUU3VgNe.js} +4 -4
  131. package/assets/{styles-c10674c1-DbTSpy3W.js → styles-c10674c1--AhWSGg7.js} +1 -1
  132. package/assets/styles-c10674c1-DS-wE3tK.js +116 -0
  133. package/assets/{svgDrawCommon-08f97a94-D4gIV05W.js → svgDrawCommon-08f97a94-CXcvtSSy.js} +1 -1
  134. package/assets/{svgDrawCommon-08f97a94-BK6lD4D6.js → svgDrawCommon-08f97a94-Dyqh4V2s.js} +1 -1
  135. package/assets/{timeline-definition-85554ec2-Bl2y548G.js → timeline-definition-85554ec2-k788753O.js} +1 -1
  136. package/assets/{timeline-definition-85554ec2-CWKg_JxG.js → timeline-definition-85554ec2-sw6-UuBe.js} +1 -1
  137. package/assets/tool-windows-BEnZdJqF.js +2948 -0
  138. package/assets/{tool-windows-CUNbW1Tz.css → tool-windows-D61Le6TE.css} +1 -1
  139. package/assets/ttd-dialog-BJzXAZ0l.js +99 -0
  140. package/assets/useCharacters-DRBoWvvj.css +1 -0
  141. package/assets/useCharacters-gsV4K8Hn.js +2 -0
  142. package/assets/{useWorkflowSubmission-BizuDmuw.js → useWorkflowSubmission-XRR21P6Y.js} +10 -10
  143. package/assets/{video-analyze-6v3Y-rUE.js → video-analyze-CpbnpSiI.js} +1 -1
  144. package/assets/{video-generation-DnmTlWnm.js → video-generation-BXhS7x-a.js} +2 -2
  145. package/assets/video-recovery-service-6G2lkWcu.js +1 -0
  146. package/assets/workflow-generation-utils-CYxtSHl0.js +3 -0
  147. package/assets/workflow-submission-service-DygSzydV.js +4 -0
  148. package/assets/{xychartDiagram-e933f94c-CJX9_9WF.js → xychartDiagram-e933f94c-CvTTDwPb.js} +3 -3
  149. package/assets/{xychartDiagram-e933f94c-Cep8CQEH.js → xychartDiagram-e933f94c-Ga9zi9ha.js} +1 -1
  150. package/changelog.json +45 -0
  151. package/idle-prefetch-manifest.json +310 -306
  152. package/manifest.json +3 -3
  153. package/package.json +1 -1
  154. package/precache-manifest.json +10 -10
  155. package/sitemap.xml +37 -0
  156. package/sw-debug/app.js +269 -156
  157. package/sw-debug/backup-restore.js +235 -103
  158. package/sw-debug/crypto-helper.js +116 -120
  159. package/sw-debug/duplex-client.js +33 -19
  160. package/sw-debug/gist-management.js +938 -655
  161. package/sw-debug/sw-communication.js +87 -50
  162. package/sw.js +5 -5
  163. package/version.json +7 -17
  164. package/assets/CanvasAudioPlayer-DutgwdiU.js +0 -2
  165. package/assets/ChatDrawer-0jNvKIoI.css +0 -1
  166. package/assets/ChatDrawer-E6Fog16I.js +0 -11
  167. package/assets/ChatMessagesArea-Bgwiz_XP.js +0 -250
  168. package/assets/ChatMessagesArea-DyR_wHFQ.css +0 -1
  169. package/assets/DeferredAIInputBar-CPkD8Cv9.js +0 -8
  170. package/assets/DrawnixDeferredFeatures-Cul76-88.js +0 -2
  171. package/assets/ModelBenchmarkWorkbench-Dv9SNYTi.js +0 -2
  172. package/assets/MusicAnalyzer-DhtRGpAp.css +0 -1
  173. package/assets/ResizableDivider-CaG9JQbJ.js +0 -1
  174. package/assets/TaskQueuePanel-BNhNzGp5.js +0 -1
  175. package/assets/ai-generation-preferences-service-BF7QkuJp.js +0 -1
  176. package/assets/arc-DmGoDCEL.js +0 -1
  177. package/assets/channel-CZjE-WNp.js +0 -1
  178. package/assets/channel-SXZD6bG3.js +0 -1
  179. package/assets/classDiagram-v2-f2320105-CsxWGkSy.js +0 -2
  180. package/assets/clone-C4mvvMDb.js +0 -1
  181. package/assets/createText-2e5e7dd3-CkXS3l7I.js +0 -5
  182. package/assets/flowDiagram-v2-96b9c2cf-BCcJ-cre.js +0 -1
  183. package/assets/flowDiagram-v2-96b9c2cf-DCVaFEgV.js +0 -1
  184. package/assets/index-3eqA7Bag.js +0 -1
  185. package/assets/index-7Q-aiwln.js +0 -4
  186. package/assets/index-B1XP5g7P.css +0 -1
  187. package/assets/index-BHPTfCZM.js +0 -1
  188. package/assets/index-BqHZCcen.js +0 -2
  189. package/assets/index-DcZrElEK.js +0 -2
  190. package/assets/index-gQ7LgvSv.js +0 -12
  191. package/assets/main-BFEkxCOK.js +0 -56
  192. package/assets/model-benchmark-launcher-Ct3lYXVq.js +0 -1
  193. package/assets/ppt-generation-FzjP_rp0.js +0 -48
  194. package/assets/settings-dialog-CQM4v791.js +0 -1
  195. package/assets/stateDiagram-v2-d93cdb3a-DmnBjHpC.js +0 -1
  196. package/assets/styles-c10674c1-Bt89Yy8Q.js +0 -116
  197. package/assets/tool-windows-DOIu9TAD.js +0 -2975
  198. package/assets/ttd-dialog-DI4kQSg8.js +0 -99
  199. package/assets/useCharacters-Chv4Ky7x.js +0 -7
  200. package/assets/useCharacters-OrDbG69o.css +0 -1
  201. package/assets/video-recovery-service-BeRoh0s2.js +0 -1
  202. package/assets/workflow-generation-utils-me381Cax.js +0 -3
  203. package/assets/workflow-submission-service-YOpo7g37.js +0 -4
@@ -1,2 +1,2 @@
1
- var Yt=Object.defineProperty;var Gt=(e,n,t)=>n in e?Yt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Re=(e,n,t)=>Gt(e,typeof n!="symbol"?n+"":n,t);import{d as $e,c as Xt}from"./browser-DpICcNby.js";import{bj as Zt}from"./tool-windows-DOIu9TAD.js";class Jt extends Error{constructor(t,r,a,i,s){super(t);Re(this,"name","Assertion");Re(this,"code","ERR_ASSERTION");Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=r,this.expected=a,this.generated=s,this.operator=i}}function m(e,n){Kt(!!e,!1,!0,"ok","Expected value to be truthy",n)}function Kt(e,n,t,r,a,i){if(!e)throw i instanceof Error?i:new Jt(i||a,n,t,r,!i)}const $t={};function en(e,n){const t=$t,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,a=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Et(e,r,a)}function Et(e,n,t){if(tn(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return st(e.children,n,t)}return Array.isArray(e)?st(e,n,t):""}function st(e,n,t){const r=[];let a=-1;for(;++a<e.length;)r[a]=Et(e[a],n,t);return r.join("")}function tn(e){return!!(e&&typeof e=="object")}const o={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseH:72,uppercaseW:87,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseH:104,lowercaseW:119,lowercaseX:120,leftCurlyBrace:123,verticalBar:124,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},T={attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},u={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},fe={ht:" ",lf:`
2
- `,cr:"\r",space:" ",replacementCharacter:"�"};function se(e,n,t,r){const a=e.length;let i=0,s;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,t=t>0?t:0,r.length<T.v8MaxSafeChunkSize)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);i<r.length;)s=r.slice(i,i+T.v8MaxSafeChunkSize),s.unshift(n,0),e.splice(...s),i+=T.v8MaxSafeChunkSize,n+=T.v8MaxSafeChunkSize}function re(e,n){return e.length>0?(se(e,e.length,0,n),e):n}const lt={}.hasOwnProperty;function nn(e){const n={};let t=-1;for(;++t<e.length;)rn(n,e[t]);return n}function rn(e,n){let t;for(t in n){const a=(lt.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let s;if(i)for(s in i){lt.call(a,s)||(a[s]=[]);const l=i[s];an(a[s],Array.isArray(l)?l:l?[l]:[])}}}function an(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);se(e,0,0,r)}function Ct(e,n){const t=Number.parseInt(e,n);return t<o.ht||t===o.vt||t>o.cr&&t<o.space||t>o.tilde&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?fe.replacementCharacter:String.fromCodePoint(t)}function we(e){return e.replace(/[\t\n\r ]+/g,fe.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const oe=me(/[A-Za-z]/),ie=me(/[\dA-Za-z]/),un=me(/[#-'*+\--9=?A-Z^-~]/);function Ye(e){return e!==null&&(e<o.space||e===o.del)}const Ge=me(/\d/),on=me(/[\dA-Fa-f]/),sn=me(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<o.horizontalTab}function Z(e){return e!==null&&(e<o.nul||e===o.space)}function _(e){return e===o.horizontalTab||e===o.virtualSpace||e===o.space}const ln=me(new RegExp("\\p{P}|\\p{S}","u")),cn=me(/\s/);function me(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function H(e,n,t,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(g){return _(g)?(e.enter(t),l(g)):n(g)}function l(g){return _(g)&&i++<a?(e.consume(g),l):(e.exit(t),n(g))}}const hn={tokenize:pn};function pn(e){const n=e.attempt(this.parser.constructs.contentInitial,r,a);let t;return n;function r(l){if(m(l===o.eof||E(l),"expected eol or eof"),l===o.eof){e.consume(l);return}return e.enter(u.lineEnding),e.consume(l),e.exit(u.lineEnding),H(e,n,u.linePrefix)}function a(l){return m(l!==o.eof&&!E(l),"expected anything other than a line ending or EOF"),e.enter(u.paragraph),i(l)}function i(l){const g=e.enter(u.chunkText,{contentType:T.contentTypeText,previous:t});return t&&(t.next=g),t=g,s(l)}function s(l){if(l===o.eof){e.exit(u.chunkText),e.exit(u.paragraph),e.consume(l);return}return E(l)?(e.consume(l),e.exit(u.chunkText),i):(e.consume(l),s)}}const fn={tokenize:dn},ct={tokenize:mn};function dn(e){const n=this,t=[];let r=0,a,i,s;return l;function l(C){if(r<t.length){const V=t[r];return n.containerState=V[1],m(V[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(V[0].continuation,g,h)(C)}return h(C)}function g(C){if(m(n.containerState,"expected `containerState` to be defined after continuation"),r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&D();const V=n.events.length;let Q=V,S;for(;Q--;)if(n.events[Q][0]==="exit"&&n.events[Q][1].type===u.chunkFlow){S=n.events[Q][1].end;break}m(S,"could not find previous flow chunk"),w(r);let N=V;for(;N<n.events.length;)n.events[N][1].end={...S},N++;return se(n.events,Q+1,0,n.events.slice(V)),n.events.length=N,h(C)}return l(C)}function h(C){if(r===t.length){if(!a)return x(C);if(a.currentConstruct&&a.currentConstruct.concrete)return B(C);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ct,c,k)(C)}function c(C){return a&&D(),w(r),x(C)}function k(C){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,B(C)}function x(C){return n.containerState={},e.attempt(ct,p,B)(C)}function p(C){return m(n.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),m(n.containerState,"expected `containerState` to be defined on tokenizer"),r++,t.push([n.currentConstruct,n.containerState]),x(C)}function B(C){if(C===o.eof){a&&D(),w(0),e.consume(C);return}return a=a||n.parser.flow(n.now()),e.enter(u.chunkFlow,{_tokenizer:a,contentType:T.contentTypeFlow,previous:i}),F(C)}function F(C){if(C===o.eof){L(e.exit(u.chunkFlow),!0),w(0),e.consume(C);return}return E(C)?(e.consume(C),L(e.exit(u.chunkFlow)),r=0,n.interrupt=void 0,l):(e.consume(C),F)}function L(C,V){m(a,"expected `childFlow` to be defined when continuing");const Q=n.sliceStream(C);if(V&&Q.push(null),C.previous=i,i&&(i.next=C),i=C,a.defineSkip(C.start),a.write(Q),n.parser.lazy[C.start.line]){let S=a.events.length;for(;S--;)if(a.events[S][1].start.offset<s&&(!a.events[S][1].end||a.events[S][1].end.offset>s))return;const N=n.events.length;let v=N,q,j;for(;v--;)if(n.events[v][0]==="exit"&&n.events[v][1].type===u.chunkFlow){if(q){j=n.events[v][1].end;break}q=!0}for(m(j,"could not find previous flow chunk"),w(r),S=N;S<n.events.length;)n.events[S][1].end={...j},S++;se(n.events,v+1,0,n.events.slice(N)),n.events.length=S}}function w(C){let V=t.length;for(;V-- >C;){const Q=t[V];n.containerState=Q[1],m(Q[0].exit,"expected `exit` to be defined on container construct"),Q[0].exit.call(n,e)}t.length=C}function D(){m(n.containerState,"expected `containerState` to be defined when closing flow"),m(a,"expected `childFlow` to be defined when closing it"),a.write([o.eof]),i=void 0,a=void 0,n.containerState._closeFlow=void 0}}function mn(e,n,t){return m(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,e.attempt(this.parser.constructs.document,n,t),u.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)}function ht(e){if(e===o.eof||Z(e)||cn(e))return T.characterGroupWhitespace;if(ln(e))return T.characterGroupPunctuation}function et(e,n,t){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(n=i(n,t),r.push(i))}return n}const Xe={name:"attention",resolveAll:gn,tokenize:xn};function gn(e,n){let t=-1,r,a,i,s,l,g,h,c;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;g=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const k={...e[r][1].end},x={...e[t][1].start};pt(k,-g),pt(x,g),s={type:g>1?u.strongSequence:u.emphasisSequence,start:k,end:{...e[r][1].end}},l={type:g>1?u.strongSequence:u.emphasisSequence,start:{...e[t][1].start},end:x},i={type:g>1?u.strongText:u.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:g>1?u.strong:u.emphasis,start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[t][1].start={...l.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=re(h,[["enter",e[r][1],n],["exit",e[r][1],n]])),h=re(h,[["enter",a,n],["enter",s,n],["exit",s,n],["enter",i,n]]),m(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),h=re(h,et(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),h=re(h,[["exit",i,n],["enter",l,n],["exit",l,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,h=re(h,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,se(e,r-1,t-r+3,h),t=r+h.length-c-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function xn(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,a=ht(r);let i;return s;function s(g){return m(g===o.asterisk||g===o.underscore,"expected asterisk or underscore"),i=g,e.enter("attentionSequence"),l(g)}function l(g){if(g===i)return e.consume(g),l;const h=e.exit("attentionSequence"),c=ht(g);m(t,"expected `attentionMarkers` to be populated");const k=!c||c===T.characterGroupPunctuation&&a||t.includes(g),x=!a||a===T.characterGroupPunctuation&&c||t.includes(r);return h._open=!!(i===o.asterisk?k:k&&(a||!x)),h._close=!!(i===o.asterisk?x:x&&(c||!k)),n(g)}}function pt(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const kn={name:"autolink",tokenize:bn};function bn(e,n,t){let r=0;return a;function a(p){return m(p===o.lessThan,"expected `<`"),e.enter(u.autolink),e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.enter(u.autolinkProtocol),i}function i(p){return oe(p)?(e.consume(p),s):p===o.atSign?t(p):h(p)}function s(p){return p===o.plusSign||p===o.dash||p===o.dot||ie(p)?(r=1,l(p)):h(p)}function l(p){return p===o.colon?(e.consume(p),r=0,g):(p===o.plusSign||p===o.dash||p===o.dot||ie(p))&&r++<T.autolinkSchemeSizeMax?(e.consume(p),l):(r=0,h(p))}function g(p){return p===o.greaterThan?(e.exit(u.autolinkProtocol),e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.exit(u.autolink),n):p===o.eof||p===o.space||p===o.lessThan||Ye(p)?t(p):(e.consume(p),g)}function h(p){return p===o.atSign?(e.consume(p),c):un(p)?(e.consume(p),h):t(p)}function c(p){return ie(p)?k(p):t(p)}function k(p){return p===o.dot?(e.consume(p),r=0,c):p===o.greaterThan?(e.exit(u.autolinkProtocol).type=u.autolinkEmail,e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.exit(u.autolink),n):x(p)}function x(p){if((p===o.dash||ie(p))&&r++<T.autolinkDomainSizeMax){const B=p===o.dash?x:k;return e.consume(p),B}return t(p)}}const _e={partial:!0,tokenize:yn};function yn(e,n,t){return r;function r(i){return _(i)?H(e,a,u.linePrefix)(i):a(i)}function a(i){return i===o.eof||E(i)?n(i):t(i)}}const Ft={continuation:{tokenize:wn},exit:Tn,name:"blockQuote",tokenize:Sn};function Sn(e,n,t){const r=this;return a;function a(s){if(s===o.greaterThan){const l=r.containerState;return m(l,"expected `containerState` to be defined in container"),l.open||(e.enter(u.blockQuote,{_container:!0}),l.open=!0),e.enter(u.blockQuotePrefix),e.enter(u.blockQuoteMarker),e.consume(s),e.exit(u.blockQuoteMarker),i}return t(s)}function i(s){return _(s)?(e.enter(u.blockQuotePrefixWhitespace),e.consume(s),e.exit(u.blockQuotePrefixWhitespace),e.exit(u.blockQuotePrefix),n):(e.exit(u.blockQuotePrefix),n(s))}}function wn(e,n,t){const r=this;return a;function a(s){return _(s)?(m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,i,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(s)):i(s)}function i(s){return e.attempt(Ft,n,t)(s)}}function Tn(e){e.exit(u.blockQuote)}const At={name:"characterEscape",tokenize:In};function In(e,n,t){return r;function r(i){return m(i===o.backslash,"expected `\\`"),e.enter(u.characterEscape),e.enter(u.escapeMarker),e.consume(i),e.exit(u.escapeMarker),a}function a(i){return sn(i)?(e.enter(u.characterEscapeValue),e.consume(i),e.exit(u.characterEscapeValue),e.exit(u.characterEscape),n):t(i)}}const Mt={name:"characterReference",tokenize:zn};function zn(e,n,t){const r=this;let a=0,i,s;return l;function l(k){return m(k===o.ampersand,"expected `&`"),e.enter(u.characterReference),e.enter(u.characterReferenceMarker),e.consume(k),e.exit(u.characterReferenceMarker),g}function g(k){return k===o.numberSign?(e.enter(u.characterReferenceMarkerNumeric),e.consume(k),e.exit(u.characterReferenceMarkerNumeric),h):(e.enter(u.characterReferenceValue),i=T.characterReferenceNamedSizeMax,s=ie,c(k))}function h(k){return k===o.uppercaseX||k===o.lowercaseX?(e.enter(u.characterReferenceMarkerHexadecimal),e.consume(k),e.exit(u.characterReferenceMarkerHexadecimal),e.enter(u.characterReferenceValue),i=T.characterReferenceHexadecimalSizeMax,s=on,c):(e.enter(u.characterReferenceValue),i=T.characterReferenceDecimalSizeMax,s=Ge,c(k))}function c(k){if(k===o.semicolon&&a){const x=e.exit(u.characterReferenceValue);return s===ie&&!$e(r.sliceSerialize(x))?t(k):(e.enter(u.characterReferenceMarker),e.consume(k),e.exit(u.characterReferenceMarker),e.exit(u.characterReference),n)}return s(k)&&a++<i?(e.consume(k),c):t(k)}}const ft={partial:!0,tokenize:Cn},dt={concrete:!0,name:"codeFenced",tokenize:En};function En(e,n,t){const r=this,a={partial:!0,tokenize:Q};let i=0,s=0,l;return g;function g(S){return h(S)}function h(S){m(S===o.graveAccent||S===o.tilde,"expected `` ` `` or `~`");const N=r.events[r.events.length-1];return i=N&&N[1].type===u.linePrefix?N[2].sliceSerialize(N[1],!0).length:0,l=S,e.enter(u.codeFenced),e.enter(u.codeFencedFence),e.enter(u.codeFencedFenceSequence),c(S)}function c(S){return S===l?(s++,e.consume(S),c):s<T.codeFencedSequenceSizeMin?t(S):(e.exit(u.codeFencedFenceSequence),_(S)?H(e,k,u.whitespace)(S):k(S))}function k(S){return S===o.eof||E(S)?(e.exit(u.codeFencedFence),r.interrupt?n(S):e.check(ft,F,V)(S)):(e.enter(u.codeFencedFenceInfo),e.enter(u.chunkString,{contentType:T.contentTypeString}),x(S))}function x(S){return S===o.eof||E(S)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceInfo),k(S)):_(S)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceInfo),H(e,p,u.whitespace)(S)):S===o.graveAccent&&S===l?t(S):(e.consume(S),x)}function p(S){return S===o.eof||E(S)?k(S):(e.enter(u.codeFencedFenceMeta),e.enter(u.chunkString,{contentType:T.contentTypeString}),B(S))}function B(S){return S===o.eof||E(S)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceMeta),k(S)):S===o.graveAccent&&S===l?t(S):(e.consume(S),B)}function F(S){return m(E(S),"expected eol"),e.attempt(a,V,L)(S)}function L(S){return m(E(S),"expected eol"),e.enter(u.lineEnding),e.consume(S),e.exit(u.lineEnding),w}function w(S){return i>0&&_(S)?H(e,D,u.linePrefix,i+1)(S):D(S)}function D(S){return S===o.eof||E(S)?e.check(ft,F,V)(S):(e.enter(u.codeFlowValue),C(S))}function C(S){return S===o.eof||E(S)?(e.exit(u.codeFlowValue),D(S)):(e.consume(S),C)}function V(S){return e.exit(u.codeFenced),n(S)}function Q(S,N,v){let q=0;return j;function j(M){return m(E(M),"expected eol"),S.enter(u.lineEnding),S.consume(M),S.exit(u.lineEnding),ee}function ee(M){return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),S.enter(u.codeFencedFence),_(M)?H(S,O,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(M):O(M)}function O(M){return M===l?(S.enter(u.codeFencedFenceSequence),I(M)):v(M)}function I(M){return M===l?(q++,S.consume(M),I):q>=s?(S.exit(u.codeFencedFenceSequence),_(M)?H(S,A,u.whitespace)(M):A(M)):v(M)}function A(M){return M===o.eof||E(M)?(S.exit(u.codeFencedFence),N(M)):v(M)}}}function Cn(e,n,t){const r=this;return a;function a(s){return s===o.eof?t(s):(m(E(s),"expected eol"),e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),i)}function i(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}const De={name:"codeIndented",tokenize:An},Fn={partial:!0,tokenize:Mn};function An(e,n,t){const r=this;return a;function a(h){return m(_(h)),e.enter(u.codeIndented),H(e,i,u.linePrefix,T.tabSize+1)(h)}function i(h){const c=r.events[r.events.length-1];return c&&c[1].type===u.linePrefix&&c[2].sliceSerialize(c[1],!0).length>=T.tabSize?s(h):t(h)}function s(h){return h===o.eof?g(h):E(h)?e.attempt(Fn,s,g)(h):(e.enter(u.codeFlowValue),l(h))}function l(h){return h===o.eof||E(h)?(e.exit(u.codeFlowValue),s(h)):(e.consume(h),l)}function g(h){return e.exit(u.codeIndented),n(h)}}function Mn(e,n,t){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?t(s):E(s)?(e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),a):H(e,i,u.linePrefix,T.tabSize+1)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type===u.linePrefix&&l[2].sliceSerialize(l[1],!0).length>=T.tabSize?n(s):E(s)?a(s):t(s)}}const Bn={name:"codeText",previous:Bt,resolve:Pn,tokenize:_n};function Pn(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===u.lineEnding||e[t][1].type==="space")&&(e[n][1].type===u.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type===u.codeTextData){e[t][1].type=u.codeTextPadding,e[n][1].type=u.codeTextPadding,t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==u.lineEnding&&(a=r):(r===n||e[r][1].type===u.lineEnding)&&(e[a][1].type=u.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function Bt(e){return e!==o.graveAccent||this.events[this.events.length-1][1].type===u.characterEscape}function _n(e,n,t){const r=this;let a=0,i,s;return l;function l(x){return m(x===o.graveAccent,"expected `` ` ``"),m(Bt.call(r,r.previous),"expected correct previous"),e.enter(u.codeText),e.enter(u.codeTextSequence),g(x)}function g(x){return x===o.graveAccent?(e.consume(x),a++,g):(e.exit(u.codeTextSequence),h(x))}function h(x){return x===o.eof?t(x):x===o.space?(e.enter("space"),e.consume(x),e.exit("space"),h):x===o.graveAccent?(s=e.enter(u.codeTextSequence),i=0,k(x)):E(x)?(e.enter(u.lineEnding),e.consume(x),e.exit(u.lineEnding),h):(e.enter(u.codeTextData),c(x))}function c(x){return x===o.eof||x===o.space||x===o.graveAccent||E(x)?(e.exit(u.codeTextData),h(x)):(e.consume(x),c)}function k(x){return x===o.graveAccent?(e.consume(x),i++,k):i===a?(e.exit(u.codeTextSequence),e.exit(u.codeText),n(x)):(s.type=u.codeTextData,c(x))}}class Ln{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const a=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Ee(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ee(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ee(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Ee(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ee(this.left,t.reverse())}}}function Ee(e,n){let t=0;if(n.length<T.v8MaxSafeChunkSize)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+T.v8MaxSafeChunkSize)),t+=T.v8MaxSafeChunkSize}function Pt(e){const n={};let t=-1,r,a,i,s,l,g,h;const c=new Ln(e);for(;++t<c.length;){for(;t in n;)t=n[t];if(r=c.get(t),t&&r[1].type===u.chunkFlow&&c.get(t-1)[1].type===u.listItemPrefix&&(m(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),g=r[1]._tokenizer.events,i=0,i<g.length&&g[i][1].type===u.lineEndingBlank&&(i+=2),i<g.length&&g[i][1].type===u.content))for(;++i<g.length&&g[i][1].type!==u.content;)g[i][1].type===u.chunkText&&(g[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,qn(c,t)),t=n[t],h=!0);else if(r[1]._container){for(i=t,a=void 0;i--;)if(s=c.get(i),s[1].type===u.lineEnding||s[1].type===u.lineEndingBlank)s[0]==="enter"&&(a&&(c.get(a)[1].type=u.lineEndingBlank),s[1].type=u.lineEnding,a=i);else if(!(s[1].type===u.linePrefix||s[1].type===u.listItemIndent))break;a&&(r[1].end={...c.get(a)[1].start},l=c.slice(a,t),l.unshift(r),c.splice(a,t-a+1,l))}}return se(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!h}function qn(e,n){const t=e.get(n)[1],r=e.get(n)[2];let a=n-1;const i=[];m(t.contentType,"expected `contentType` on subtokens");let s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,g=[],h={};let c,k,x=-1,p=t,B=0,F=0;const L=[F];for(;p;){for(;e.get(++a)[1]!==p;);m(!k||p.previous===k,"expected previous to match"),m(!k||k.next===p,"expected next to match"),i.push(a),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(o.eof),k&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),k=p,p=p.next}for(p=t;++x<l.length;)l[x][0]==="exit"&&l[x-1][0]==="enter"&&l[x][1].type===l[x-1][1].type&&l[x][1].start.line!==l[x][1].end.line&&(m(p,"expected a current token"),F=x+1,L.push(F),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0,m(!p.next,"expected no next token")):L.pop(),x=L.length;x--;){const w=l.slice(L[x],L[x+1]),D=i.pop();m(D!==void 0,"expected a start position when splicing"),g.push([D,D+w.length-1]),e.splice(D,2,w)}for(g.reverse(),x=-1;++x<g.length;)h[B+g[x][0]]=B+g[x][1],B+=g[x][1]-g[x][0]-1;return h}const Rn={resolve:On,tokenize:Nn},Dn={partial:!0,tokenize:Hn};function On(e){return Pt(e),e}function Nn(e,n){let t;return r;function r(l){return m(l!==o.eof&&!E(l),"expected no eof or eol"),e.enter(u.content),t=e.enter(u.chunkContent,{contentType:T.contentTypeContent}),a(l)}function a(l){return l===o.eof?i(l):E(l)?e.check(Dn,s,i)(l):(e.consume(l),a)}function i(l){return e.exit(u.chunkContent),e.exit(u.content),n(l)}function s(l){return m(E(l),"expected eol"),e.consume(l),e.exit(u.chunkContent),m(t,"expected previous token"),t.next=e.enter(u.chunkContent,{contentType:T.contentTypeContent,previous:t}),t=t.next,a}}function Hn(e,n,t){const r=this;return a;function a(s){return m(E(s),"expected a line ending"),e.exit(u.chunkContent),e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),H(e,i,u.linePrefix)}function i(s){if(s===o.eof||E(s))return t(s);m(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type===u.linePrefix&&l[2].sliceSerialize(l[1],!0).length>=T.tabSize?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function _t(e,n,t,r,a,i,s,l,g){const h=g||Number.POSITIVE_INFINITY;let c=0;return k;function k(w){return w===o.lessThan?(e.enter(r),e.enter(a),e.enter(i),e.consume(w),e.exit(i),x):w===o.eof||w===o.space||w===o.rightParenthesis||Ye(w)?t(w):(e.enter(r),e.enter(s),e.enter(l),e.enter(u.chunkString,{contentType:T.contentTypeString}),F(w))}function x(w){return w===o.greaterThan?(e.enter(i),e.consume(w),e.exit(i),e.exit(a),e.exit(r),n):(e.enter(l),e.enter(u.chunkString,{contentType:T.contentTypeString}),p(w))}function p(w){return w===o.greaterThan?(e.exit(u.chunkString),e.exit(l),x(w)):w===o.eof||w===o.lessThan||E(w)?t(w):(e.consume(w),w===o.backslash?B:p)}function B(w){return w===o.lessThan||w===o.greaterThan||w===o.backslash?(e.consume(w),p):p(w)}function F(w){return!c&&(w===o.eof||w===o.rightParenthesis||Z(w))?(e.exit(u.chunkString),e.exit(l),e.exit(s),e.exit(r),n(w)):c<h&&w===o.leftParenthesis?(e.consume(w),c++,F):w===o.rightParenthesis?(e.consume(w),c--,F):w===o.eof||w===o.space||w===o.leftParenthesis||Ye(w)?t(w):(e.consume(w),w===o.backslash?L:F)}function L(w){return w===o.leftParenthesis||w===o.rightParenthesis||w===o.backslash?(e.consume(w),F):F(w)}}function Lt(e,n,t,r,a,i){const s=this;let l=0,g;return h;function h(p){return m(p===o.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(p),e.exit(a),e.enter(i),c}function c(p){return l>T.linkReferenceSizeMax||p===o.eof||p===o.leftSquareBracket||p===o.rightSquareBracket&&!g||p===o.caret&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?t(p):p===o.rightSquareBracket?(e.exit(i),e.enter(a),e.consume(p),e.exit(a),e.exit(r),n):E(p)?(e.enter(u.lineEnding),e.consume(p),e.exit(u.lineEnding),c):(e.enter(u.chunkString,{contentType:T.contentTypeString}),k(p))}function k(p){return p===o.eof||p===o.leftSquareBracket||p===o.rightSquareBracket||E(p)||l++>T.linkReferenceSizeMax?(e.exit(u.chunkString),c(p)):(e.consume(p),g||(g=!_(p)),p===o.backslash?x:k)}function x(p){return p===o.leftSquareBracket||p===o.backslash||p===o.rightSquareBracket?(e.consume(p),l++,k):k(p)}}function qt(e,n,t,r,a,i){let s;return l;function l(x){return x===o.quotationMark||x===o.apostrophe||x===o.leftParenthesis?(e.enter(r),e.enter(a),e.consume(x),e.exit(a),s=x===o.leftParenthesis?o.rightParenthesis:x,g):t(x)}function g(x){return x===s?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),n):(e.enter(i),h(x))}function h(x){return x===s?(e.exit(i),g(s)):x===o.eof?t(x):E(x)?(e.enter(u.lineEnding),e.consume(x),e.exit(u.lineEnding),H(e,h,u.linePrefix)):(e.enter(u.chunkString,{contentType:T.contentTypeString}),c(x))}function c(x){return x===s||x===o.eof||E(x)?(e.exit(u.chunkString),h(x)):(e.consume(x),x===o.backslash?k:c)}function k(x){return x===s||x===o.backslash?(e.consume(x),c):c(x)}}function Ce(e,n){let t;return r;function r(a){return E(a)?(e.enter(u.lineEnding),e.consume(a),e.exit(u.lineEnding),t=!0,r):_(a)?H(e,r,t?u.linePrefix:u.lineSuffix)(a):n(a)}}const Vn={name:"definition",tokenize:Qn},jn={partial:!0,tokenize:Un};function Qn(e,n,t){const r=this;let a;return i;function i(p){return e.enter(u.definition),s(p)}function s(p){return m(p===o.leftSquareBracket,"expected `[`"),Lt.call(r,e,l,t,u.definitionLabel,u.definitionLabelMarker,u.definitionLabelString)(p)}function l(p){return a=we(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===o.colon?(e.enter(u.definitionMarker),e.consume(p),e.exit(u.definitionMarker),g):t(p)}function g(p){return Z(p)?Ce(e,h)(p):h(p)}function h(p){return _t(e,c,t,u.definitionDestination,u.definitionDestinationLiteral,u.definitionDestinationLiteralMarker,u.definitionDestinationRaw,u.definitionDestinationString)(p)}function c(p){return e.attempt(jn,k,k)(p)}function k(p){return _(p)?H(e,x,u.whitespace)(p):x(p)}function x(p){return p===o.eof||E(p)?(e.exit(u.definition),r.parser.defined.push(a),n(p)):t(p)}}function Un(e,n,t){return r;function r(l){return Z(l)?Ce(e,a)(l):t(l)}function a(l){return qt(e,i,t,u.definitionTitle,u.definitionTitleMarker,u.definitionTitleString)(l)}function i(l){return _(l)?H(e,s,u.whitespace)(l):s(l)}function s(l){return l===o.eof||E(l)?n(l):t(l)}}const vn={name:"hardBreakEscape",tokenize:Wn};function Wn(e,n,t){return r;function r(i){return m(i===o.backslash,"expected `\\`"),e.enter(u.hardBreakEscape),e.consume(i),a}function a(i){return E(i)?(e.exit(u.hardBreakEscape),n(i)):t(i)}}const Yn={name:"headingAtx",resolve:Gn,tokenize:Xn};function Gn(e,n){let t=e.length-2,r=3,a,i;return e[r][1].type===u.whitespace&&(r+=2),t-2>r&&e[t][1].type===u.whitespace&&(t-=2),e[t][1].type===u.atxHeadingSequence&&(r===t-1||t-4>r&&e[t-2][1].type===u.whitespace)&&(t-=r+1===t?2:4),t>r&&(a={type:u.atxHeadingText,start:e[r][1].start,end:e[t][1].end},i={type:u.chunkText,start:e[r][1].start,end:e[t][1].end,contentType:T.contentTypeText},se(e,r,t-r+1,[["enter",a,n],["enter",i,n],["exit",i,n],["exit",a,n]])),e}function Xn(e,n,t){let r=0;return a;function a(c){return e.enter(u.atxHeading),i(c)}function i(c){return m(c===o.numberSign,"expected `#`"),e.enter(u.atxHeadingSequence),s(c)}function s(c){return c===o.numberSign&&r++<T.atxHeadingOpeningFenceSizeMax?(e.consume(c),s):c===o.eof||Z(c)?(e.exit(u.atxHeadingSequence),l(c)):t(c)}function l(c){return c===o.numberSign?(e.enter(u.atxHeadingSequence),g(c)):c===o.eof||E(c)?(e.exit(u.atxHeading),n(c)):_(c)?H(e,l,u.whitespace)(c):(e.enter(u.atxHeadingText),h(c))}function g(c){return c===o.numberSign?(e.consume(c),g):(e.exit(u.atxHeadingSequence),l(c))}function h(c){return c===o.eof||c===o.numberSign||Z(c)?(e.exit(u.atxHeadingText),l(c)):(e.consume(c),h)}}const Zn=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],mt=["pre","script","style","textarea"],Jn={concrete:!0,name:"htmlFlow",resolveTo:er,tokenize:tr},Kn={partial:!0,tokenize:rr},$n={partial:!0,tokenize:nr};function er(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type===u.htmlFlow););return n>1&&e[n-2][1].type===u.linePrefix&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function tr(e,n,t){const r=this;let a,i,s,l,g;return h;function h(d){return c(d)}function c(d){return m(d===o.lessThan,"expected `<`"),e.enter(u.htmlFlow),e.enter(u.htmlFlowData),e.consume(d),k}function k(d){return d===o.exclamationMark?(e.consume(d),x):d===o.slash?(e.consume(d),i=!0,F):d===o.questionMark?(e.consume(d),a=T.htmlInstruction,r.interrupt?n:f):oe(d)?(m(d!==null),e.consume(d),s=String.fromCharCode(d),L):t(d)}function x(d){return d===o.dash?(e.consume(d),a=T.htmlComment,p):d===o.leftSquareBracket?(e.consume(d),a=T.htmlCdata,l=0,B):oe(d)?(e.consume(d),a=T.htmlDeclaration,r.interrupt?n:f):t(d)}function p(d){return d===o.dash?(e.consume(d),r.interrupt?n:f):t(d)}function B(d){const K=T.cdataOpeningString;return d===K.charCodeAt(l++)?(e.consume(d),l===K.length?r.interrupt?n:O:B):t(d)}function F(d){return oe(d)?(m(d!==null),e.consume(d),s=String.fromCharCode(d),L):t(d)}function L(d){if(d===o.eof||d===o.slash||d===o.greaterThan||Z(d)){const K=d===o.slash,ge=s.toLowerCase();return!K&&!i&&mt.includes(ge)?(a=T.htmlRaw,r.interrupt?n(d):O(d)):Zn.includes(s.toLowerCase())?(a=T.htmlBasic,K?(e.consume(d),w):r.interrupt?n(d):O(d)):(a=T.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):i?D(d):C(d))}return d===o.dash||ie(d)?(e.consume(d),s+=String.fromCharCode(d),L):t(d)}function w(d){return d===o.greaterThan?(e.consume(d),r.interrupt?n:O):t(d)}function D(d){return _(d)?(e.consume(d),D):j(d)}function C(d){return d===o.slash?(e.consume(d),j):d===o.colon||d===o.underscore||oe(d)?(e.consume(d),V):_(d)?(e.consume(d),C):j(d)}function V(d){return d===o.dash||d===o.dot||d===o.colon||d===o.underscore||ie(d)?(e.consume(d),V):Q(d)}function Q(d){return d===o.equalsTo?(e.consume(d),S):_(d)?(e.consume(d),Q):C(d)}function S(d){return d===o.eof||d===o.lessThan||d===o.equalsTo||d===o.greaterThan||d===o.graveAccent?t(d):d===o.quotationMark||d===o.apostrophe?(e.consume(d),g=d,N):_(d)?(e.consume(d),S):v(d)}function N(d){return d===g?(e.consume(d),g=null,q):d===o.eof||E(d)?t(d):(e.consume(d),N)}function v(d){return d===o.eof||d===o.quotationMark||d===o.apostrophe||d===o.slash||d===o.lessThan||d===o.equalsTo||d===o.greaterThan||d===o.graveAccent||Z(d)?Q(d):(e.consume(d),v)}function q(d){return d===o.slash||d===o.greaterThan||_(d)?C(d):t(d)}function j(d){return d===o.greaterThan?(e.consume(d),ee):t(d)}function ee(d){return d===o.eof||E(d)?O(d):_(d)?(e.consume(d),ee):t(d)}function O(d){return d===o.dash&&a===T.htmlComment?(e.consume(d),U):d===o.lessThan&&a===T.htmlRaw?(e.consume(d),W):d===o.greaterThan&&a===T.htmlDeclaration?(e.consume(d),ne):d===o.questionMark&&a===T.htmlInstruction?(e.consume(d),f):d===o.rightSquareBracket&&a===T.htmlCdata?(e.consume(d),ae):E(d)&&(a===T.htmlBasic||a===T.htmlComplete)?(e.exit(u.htmlFlowData),e.check(Kn,le,I)(d)):d===o.eof||E(d)?(e.exit(u.htmlFlowData),I(d)):(e.consume(d),O)}function I(d){return e.check($n,A,le)(d)}function A(d){return m(E(d)),e.enter(u.lineEnding),e.consume(d),e.exit(u.lineEnding),M}function M(d){return d===o.eof||E(d)?I(d):(e.enter(u.htmlFlowData),O(d))}function U(d){return d===o.dash?(e.consume(d),f):O(d)}function W(d){return d===o.slash?(e.consume(d),s="",te):O(d)}function te(d){if(d===o.greaterThan){const K=s.toLowerCase();return mt.includes(K)?(e.consume(d),ne):O(d)}return oe(d)&&s.length<T.htmlRawSizeMax?(m(d!==null),e.consume(d),s+=String.fromCharCode(d),te):O(d)}function ae(d){return d===o.rightSquareBracket?(e.consume(d),f):O(d)}function f(d){return d===o.greaterThan?(e.consume(d),ne):d===o.dash&&a===T.htmlComment?(e.consume(d),f):O(d)}function ne(d){return d===o.eof||E(d)?(e.exit(u.htmlFlowData),le(d)):(e.consume(d),ne)}function le(d){return e.exit(u.htmlFlow),n(d)}}function nr(e,n,t){const r=this;return a;function a(s){return E(s)?(e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),i):t(s)}function i(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}function rr(e,n,t){return r;function r(a){return m(E(a),"expected a line ending"),e.enter(u.lineEnding),e.consume(a),e.exit(u.lineEnding),e.attempt(_e,n,t)}}const ir={name:"htmlText",tokenize:ar};function ar(e,n,t){const r=this;let a,i,s;return l;function l(f){return m(f===o.lessThan,"expected `<`"),e.enter(u.htmlText),e.enter(u.htmlTextData),e.consume(f),g}function g(f){return f===o.exclamationMark?(e.consume(f),h):f===o.slash?(e.consume(f),Q):f===o.questionMark?(e.consume(f),C):oe(f)?(e.consume(f),v):t(f)}function h(f){return f===o.dash?(e.consume(f),c):f===o.leftSquareBracket?(e.consume(f),i=0,B):oe(f)?(e.consume(f),D):t(f)}function c(f){return f===o.dash?(e.consume(f),p):t(f)}function k(f){return f===o.eof?t(f):f===o.dash?(e.consume(f),x):E(f)?(s=k,W(f)):(e.consume(f),k)}function x(f){return f===o.dash?(e.consume(f),p):k(f)}function p(f){return f===o.greaterThan?U(f):f===o.dash?x(f):k(f)}function B(f){const ne=T.cdataOpeningString;return f===ne.charCodeAt(i++)?(e.consume(f),i===ne.length?F:B):t(f)}function F(f){return f===o.eof?t(f):f===o.rightSquareBracket?(e.consume(f),L):E(f)?(s=F,W(f)):(e.consume(f),F)}function L(f){return f===o.rightSquareBracket?(e.consume(f),w):F(f)}function w(f){return f===o.greaterThan?U(f):f===o.rightSquareBracket?(e.consume(f),w):F(f)}function D(f){return f===o.eof||f===o.greaterThan?U(f):E(f)?(s=D,W(f)):(e.consume(f),D)}function C(f){return f===o.eof?t(f):f===o.questionMark?(e.consume(f),V):E(f)?(s=C,W(f)):(e.consume(f),C)}function V(f){return f===o.greaterThan?U(f):C(f)}function Q(f){return oe(f)?(e.consume(f),S):t(f)}function S(f){return f===o.dash||ie(f)?(e.consume(f),S):N(f)}function N(f){return E(f)?(s=N,W(f)):_(f)?(e.consume(f),N):U(f)}function v(f){return f===o.dash||ie(f)?(e.consume(f),v):f===o.slash||f===o.greaterThan||Z(f)?q(f):t(f)}function q(f){return f===o.slash?(e.consume(f),U):f===o.colon||f===o.underscore||oe(f)?(e.consume(f),j):E(f)?(s=q,W(f)):_(f)?(e.consume(f),q):U(f)}function j(f){return f===o.dash||f===o.dot||f===o.colon||f===o.underscore||ie(f)?(e.consume(f),j):ee(f)}function ee(f){return f===o.equalsTo?(e.consume(f),O):E(f)?(s=ee,W(f)):_(f)?(e.consume(f),ee):q(f)}function O(f){return f===o.eof||f===o.lessThan||f===o.equalsTo||f===o.greaterThan||f===o.graveAccent?t(f):f===o.quotationMark||f===o.apostrophe?(e.consume(f),a=f,I):E(f)?(s=O,W(f)):_(f)?(e.consume(f),O):(e.consume(f),A)}function I(f){return f===a?(e.consume(f),a=void 0,M):f===o.eof?t(f):E(f)?(s=I,W(f)):(e.consume(f),I)}function A(f){return f===o.eof||f===o.quotationMark||f===o.apostrophe||f===o.lessThan||f===o.equalsTo||f===o.graveAccent?t(f):f===o.slash||f===o.greaterThan||Z(f)?q(f):(e.consume(f),A)}function M(f){return f===o.slash||f===o.greaterThan||Z(f)?q(f):t(f)}function U(f){return f===o.greaterThan?(e.consume(f),e.exit(u.htmlTextData),e.exit(u.htmlText),n):t(f)}function W(f){return m(s,"expected return state"),m(E(f),"expected eol"),e.exit(u.htmlTextData),e.enter(u.lineEnding),e.consume(f),e.exit(u.lineEnding),te}function te(f){return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),_(f)?H(e,ae,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(f):ae(f)}function ae(f){return e.enter(u.htmlTextData),s(f)}}const tt={name:"labelEnd",resolveAll:lr,resolveTo:cr,tokenize:hr},ur={tokenize:pr},or={tokenize:fr},sr={tokenize:dr};function lr(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type===u.labelImage||r.type===u.labelLink||r.type===u.labelEnd){const a=r.type===u.labelImage?4:2;r.type=u.data,n+=a}}return e.length!==t.length&&se(e,0,e.length,t),e}function cr(e,n){let t=e.length,r=0,a,i,s,l;for(;t--;)if(a=e[t][1],i){if(a.type===u.link||a.type===u.labelLink&&a._inactive)break;e[t][0]==="enter"&&a.type===u.labelLink&&(a._inactive=!0)}else if(s){if(e[t][0]==="enter"&&(a.type===u.labelImage||a.type===u.labelLink)&&!a._balanced&&(i=t,a.type!==u.labelLink)){r=2;break}}else a.type===u.labelEnd&&(s=t);m(i!==void 0,"`open` is supposed to be found"),m(s!==void 0,"`close` is supposed to be found");const g={type:e[i][1].type===u.labelLink?u.link:u.image,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},h={type:u.label,start:{...e[i][1].start},end:{...e[s][1].end}},c={type:u.labelText,start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",g,n],["enter",h,n]],l=re(l,e.slice(i+1,i+r+3)),l=re(l,[["enter",c,n]]),m(n.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),l=re(l,et(n.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),n)),l=re(l,[["exit",c,n],e[s-2],e[s-1],["exit",h,n]]),l=re(l,e.slice(s+1)),l=re(l,[["exit",g,n]]),se(e,i,e.length,l),e}function hr(e,n,t){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type===u.labelImage||r.events[a][1].type===u.labelLink)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(x){return m(x===o.rightSquareBracket,"expected `]`"),i?i._inactive?k(x):(s=r.parser.defined.includes(we(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter(u.labelEnd),e.enter(u.labelMarker),e.consume(x),e.exit(u.labelMarker),e.exit(u.labelEnd),g):t(x)}function g(x){return x===o.leftParenthesis?e.attempt(ur,c,s?c:k)(x):x===o.leftSquareBracket?e.attempt(or,c,s?h:k)(x):s?c(x):k(x)}function h(x){return e.attempt(sr,c,k)(x)}function c(x){return n(x)}function k(x){return i._balanced=!0,t(x)}}function pr(e,n,t){return r;function r(k){return m(k===o.leftParenthesis,"expected left paren"),e.enter(u.resource),e.enter(u.resourceMarker),e.consume(k),e.exit(u.resourceMarker),a}function a(k){return Z(k)?Ce(e,i)(k):i(k)}function i(k){return k===o.rightParenthesis?c(k):_t(e,s,l,u.resourceDestination,u.resourceDestinationLiteral,u.resourceDestinationLiteralMarker,u.resourceDestinationRaw,u.resourceDestinationString,T.linkResourceDestinationBalanceMax)(k)}function s(k){return Z(k)?Ce(e,g)(k):c(k)}function l(k){return t(k)}function g(k){return k===o.quotationMark||k===o.apostrophe||k===o.leftParenthesis?qt(e,h,t,u.resourceTitle,u.resourceTitleMarker,u.resourceTitleString)(k):c(k)}function h(k){return Z(k)?Ce(e,c)(k):c(k)}function c(k){return k===o.rightParenthesis?(e.enter(u.resourceMarker),e.consume(k),e.exit(u.resourceMarker),e.exit(u.resource),n):t(k)}}function fr(e,n,t){const r=this;return a;function a(l){return m(l===o.leftSquareBracket,"expected left bracket"),Lt.call(r,e,i,s,u.reference,u.referenceMarker,u.referenceString)(l)}function i(l){return r.parser.defined.includes(we(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(l):t(l)}function s(l){return t(l)}}function dr(e,n,t){return r;function r(i){return m(i===o.leftSquareBracket,"expected left bracket"),e.enter(u.reference),e.enter(u.referenceMarker),e.consume(i),e.exit(u.referenceMarker),a}function a(i){return i===o.rightSquareBracket?(e.enter(u.referenceMarker),e.consume(i),e.exit(u.referenceMarker),e.exit(u.reference),n):t(i)}}const mr={name:"labelStartImage",resolveAll:tt.resolveAll,tokenize:gr};function gr(e,n,t){const r=this;return a;function a(l){return m(l===o.exclamationMark,"expected `!`"),e.enter(u.labelImage),e.enter(u.labelImageMarker),e.consume(l),e.exit(u.labelImageMarker),i}function i(l){return l===o.leftSquareBracket?(e.enter(u.labelMarker),e.consume(l),e.exit(u.labelMarker),e.exit(u.labelImage),s):t(l)}function s(l){return l===o.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const xr={name:"labelStartLink",resolveAll:tt.resolveAll,tokenize:kr};function kr(e,n,t){const r=this;return a;function a(s){return m(s===o.leftSquareBracket,"expected `[`"),e.enter(u.labelLink),e.enter(u.labelMarker),e.consume(s),e.exit(u.labelMarker),e.exit(u.labelLink),i}function i(s){return s===o.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const Oe={name:"lineEnding",tokenize:br};function br(e,n){return t;function t(r){return m(E(r),"expected eol"),e.enter(u.lineEnding),e.consume(r),e.exit(u.lineEnding),H(e,n,u.linePrefix)}}const Pe={name:"thematicBreak",tokenize:yr};function yr(e,n,t){let r=0,a;return i;function i(h){return e.enter(u.thematicBreak),s(h)}function s(h){return m(h===o.asterisk||h===o.dash||h===o.underscore,"expected `*`, `-`, or `_`"),a=h,l(h)}function l(h){return h===a?(e.enter(u.thematicBreakSequence),g(h)):r>=T.thematicBreakMarkerCountMin&&(h===o.eof||E(h))?(e.exit(u.thematicBreak),n(h)):t(h)}function g(h){return h===a?(e.consume(h),r++,g):(e.exit(u.thematicBreakSequence),_(h)?H(e,l,u.whitespace)(h):l(h))}}const X={continuation:{tokenize:Ir},exit:Er,name:"list",tokenize:Tr},Sr={partial:!0,tokenize:Cr},wr={partial:!0,tokenize:zr};function Tr(e,n,t){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type===u.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(p){m(r.containerState,"expected state");const B=r.containerState.type||(p===o.asterisk||p===o.plusSign||p===o.dash?u.listUnordered:u.listOrdered);if(B===u.listUnordered?!r.containerState.marker||p===r.containerState.marker:Ge(p)){if(r.containerState.type||(r.containerState.type=B,e.enter(B,{_container:!0})),B===u.listUnordered)return e.enter(u.listItemPrefix),p===o.asterisk||p===o.dash?e.check(Pe,t,h)(p):h(p);if(!r.interrupt||p===o.digit1)return e.enter(u.listItemPrefix),e.enter(u.listItemValue),g(p)}return t(p)}function g(p){return m(r.containerState,"expected state"),Ge(p)&&++s<T.listItemValueSizeMax?(e.consume(p),g):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===o.rightParenthesis||p===o.dot)?(e.exit(u.listItemValue),h(p)):t(p)}function h(p){return m(r.containerState,"expected state"),m(p!==o.eof,"eof (`null`) is not a marker"),e.enter(u.listItemMarker),e.consume(p),e.exit(u.listItemMarker),r.containerState.marker=r.containerState.marker||p,e.check(_e,r.interrupt?t:c,e.attempt(Sr,x,k))}function c(p){return m(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,i++,x(p)}function k(p){return _(p)?(e.enter(u.listItemPrefixWhitespace),e.consume(p),e.exit(u.listItemPrefixWhitespace),x):t(p)}function x(p){return m(r.containerState,"expected state"),r.containerState.size=i+r.sliceSerialize(e.exit(u.listItemPrefix),!0).length,n(p)}}function Ir(e,n,t){const r=this;return m(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(_e,a,i);function a(l){return m(r.containerState,"expected state"),m(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,H(e,n,u.listItemIndent,r.containerState.size+1)(l)}function i(l){return m(r.containerState,"expected state"),r.containerState.furtherBlankLines||!_(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wr,n,s)(l))}function s(l){return m(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,e.attempt(X,n,t),u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(l)}}function zr(e,n,t){const r=this;return m(r.containerState,"expected state"),m(typeof r.containerState.size=="number","expected size"),H(e,a,u.listItemIndent,r.containerState.size+1);function a(i){m(r.containerState,"expected state");const s=r.events[r.events.length-1];return s&&s[1].type===u.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(i):t(i)}}function Er(e){m(this.containerState,"expected state"),m(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function Cr(e,n,t){const r=this;return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,a,u.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize+1);function a(i){const s=r.events[r.events.length-1];return!_(i)&&s&&s[1].type===u.listItemPrefixWhitespace?n(i):t(i)}}const gt={name:"setextUnderline",resolveTo:Fr,tokenize:Ar};function Fr(e,n){let t=e.length,r,a,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type===u.content){r=t;break}e[t][1].type===u.paragraph&&(a=t)}else e[t][1].type===u.content&&e.splice(t,1),!i&&e[t][1].type===u.definition&&(i=t);m(a!==void 0,"expected a `text` index to be found"),m(r!==void 0,"expected a `text` index to be found"),m(e[r][2]===n,"enter context should be same"),m(e[e.length-1][2]===n,"enter context should be same");const s={type:u.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=u.setextHeadingText,i?(e.splice(a,0,["enter",s,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,n]),e}function Ar(e,n,t){const r=this;let a;return i;function i(h){let c=r.events.length,k;for(m(h===o.dash||h===o.equalsTo,"expected `=` or `-`");c--;)if(r.events[c][1].type!==u.lineEnding&&r.events[c][1].type!==u.linePrefix&&r.events[c][1].type!==u.content){k=r.events[c][1].type===u.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||k)?(e.enter(u.setextHeadingLine),a=h,s(h)):t(h)}function s(h){return e.enter(u.setextHeadingLineSequence),l(h)}function l(h){return h===a?(e.consume(h),l):(e.exit(u.setextHeadingLineSequence),_(h)?H(e,g,u.lineSuffix)(h):g(h))}function g(h){return h===o.eof||E(h)?(e.exit(u.setextHeadingLine),n(h)):t(h)}}const Mr={tokenize:Br};function Br(e){const n=this,t=e.attempt(_e,r,e.attempt(this.parser.constructs.flowInitial,a,H(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Rn,a)),u.linePrefix)));return t;function r(i){if(m(i===o.eof||E(i),"expected eol or eof"),i===o.eof){e.consume(i);return}return e.enter(u.lineEndingBlank),e.consume(i),e.exit(u.lineEndingBlank),n.currentConstruct=void 0,t}function a(i){if(m(i===o.eof||E(i),"expected eol or eof"),i===o.eof){e.consume(i);return}return e.enter(u.lineEnding),e.consume(i),e.exit(u.lineEnding),n.currentConstruct=void 0,t}}const Pr={resolveAll:Dt()},_r=Rt("string"),Lr=Rt("text");function Rt(e){return{resolveAll:Dt(e==="text"?qr:void 0),tokenize:n};function n(t){const r=this,a=this.parser.constructs[e],i=t.attempt(a,s,l);return s;function s(c){return h(c)?i(c):l(c)}function l(c){if(c===o.eof){t.consume(c);return}return t.enter(u.data),t.consume(c),g}function g(c){return h(c)?(t.exit(u.data),i(c)):(t.consume(c),g)}function h(c){if(c===o.eof)return!0;const k=a[c];let x=-1;if(k)for(m(Array.isArray(k),"expected `disable.null` to be populated");++x<k.length;){const p=k[x];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Dt(e){return n;function n(t,r){let a=-1,i;for(;++a<=t.length;)i===void 0?t[a]&&t[a][1].type===u.data&&(i=a,a++):(!t[a]||t[a][1].type!==u.data)&&(a!==i+2&&(t[i][1].end=t[a-1][1].end,t.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(t,r):t}}function qr(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type===u.lineEnding)&&e[t-1][1].type===u.data){const r=e[t-1][1],a=n.sliceStream(r);let i=a.length,s=-1,l=0,g;for(;i--;){const h=a[i];if(typeof h=="string"){for(s=h.length;h.charCodeAt(s-1)===o.space;)l++,s--;if(s)break;s=-1}else if(h===o.horizontalTab)g=!0,l++;else if(h!==o.virtualSpace){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(l=0),l){const h={type:t===e.length||g||l<T.hardBreakPrefixSizeMin?u.lineSuffix:u.hardBreakTrailing,start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(t,0,["enter",h,n],["exit",h,n]),t+=2)}t++}return e}const Rr={[o.asterisk]:X,[o.plusSign]:X,[o.dash]:X,[o.digit0]:X,[o.digit1]:X,[o.digit2]:X,[o.digit3]:X,[o.digit4]:X,[o.digit5]:X,[o.digit6]:X,[o.digit7]:X,[o.digit8]:X,[o.digit9]:X,[o.greaterThan]:Ft},Dr={[o.leftSquareBracket]:Vn},Or={[o.horizontalTab]:De,[o.virtualSpace]:De,[o.space]:De},Nr={[o.numberSign]:Yn,[o.asterisk]:Pe,[o.dash]:[gt,Pe],[o.lessThan]:Jn,[o.equalsTo]:gt,[o.underscore]:Pe,[o.graveAccent]:dt,[o.tilde]:dt},Hr={[o.ampersand]:Mt,[o.backslash]:At},Vr={[o.carriageReturn]:Oe,[o.lineFeed]:Oe,[o.carriageReturnLineFeed]:Oe,[o.exclamationMark]:mr,[o.ampersand]:Mt,[o.asterisk]:Xe,[o.lessThan]:[kn,ir],[o.leftSquareBracket]:xr,[o.backslash]:[vn,At],[o.rightSquareBracket]:tt,[o.underscore]:Xe,[o.graveAccent]:Bn},jr={null:[Xe,Pr]},Qr={null:[o.asterisk,o.underscore]},Ur={null:[]},vr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Qr,contentInitial:Dr,disable:Ur,document:Rr,flow:Nr,flowInitial:Or,insideSpan:jr,string:Hr,text:Vr},Symbol.toStringTag,{value:"Module"})),be=Xt("micromark");function Wr(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const a={},i=[];let s=[],l=[],g=!0;const h={attempt:q(N),check:q(v),consume:V,enter:Q,exit:S,interrupt:q(v,{interrupt:!0})},c={code:o.eof,containerState:{},defineSkip:w,events:[],now:L,parser:e,previous:o.eof,sliceSerialize:B,sliceStream:F,write:p};let k=n.tokenize.call(c,h),x;return n.resolveAll&&i.push(n),c;function p(I){return s=re(s,I),D(),s[s.length-1]!==o.eof?[]:(j(n,0),c.events=et(i,c.events,c),c.events)}function B(I,A){return Gr(F(I),A)}function F(I){return Yr(s,I)}function L(){const{_bufferIndex:I,_index:A,line:M,column:U,offset:W}=r;return{_bufferIndex:I,_index:A,line:M,column:U,offset:W}}function w(I){a[I.line]=I.column,O(),be("position: define skip: `%j`",r)}function D(){let I;for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<A.length;)C(A.charCodeAt(r._bufferIndex));else C(A)}}function C(I){m(g===!0,"expected character to be consumed"),g=void 0,be("main: passing `%s` to %s",I,k&&k.name),x=I,m(typeof k=="function","expected state"),k=k(I)}function V(I){m(I===x,"expected given code to equal expected code"),be("consume: `%s`",I),m(g===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),m(I===null?c.events.length===0||c.events[c.events.length-1][0]==="exit":c.events[c.events.length-1][0]==="enter","expected last token to be open"),E(I)?(r.line++,r.column=1,r.offset+=I===o.carriageReturnLineFeed?2:1,O(),be("position: after eol: `%j`",r)):I!==o.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=I,g=!0}function Q(I,A){const M=A||{};return M.type=I,M.start=L(),m(typeof I=="string","expected string type"),m(I.length>0,"expected non-empty string"),be("enter: `%s`",I),c.events.push(["enter",M,c]),l.push(M),M}function S(I){m(typeof I=="string","expected string type"),m(I.length>0,"expected non-empty string");const A=l.pop();return m(A,"cannot close w/o open tokens"),A.end=L(),m(I===A.type,"expected exit token to match current token"),m(!(A.start._index===A.end._index&&A.start._bufferIndex===A.end._bufferIndex),"expected non-empty token (`"+I+"`)"),be("exit: `%s`",A.type),c.events.push(["exit",A,c]),A}function N(I,A){j(I,A.from)}function v(I,A){A.restore()}function q(I,A){return M;function M(U,W,te){let ae,f,ne,le;return Array.isArray(U)?K(U):"tokenize"in U?K([U]):d(U);function d(Y){return Te;function Te(ce){const xe=ce!==null&&Y[ce],ye=ce!==null&&Y.null,qe=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return K(qe)(ce)}}function K(Y){return ae=Y,f=0,Y.length===0?(m(te,"expected `bogusState` to be given"),te):ge(Y[f])}function ge(Y){return Te;function Te(ce){return le=ee(),ne=Y,Y.partial||(c.currentConstruct=Y),m(c.parser.constructs.disable.null,"expected `disable.null` to be populated"),Y.name&&c.parser.constructs.disable.null.includes(Y.name)?Me(ce):Y.tokenize.call(A?Object.assign(Object.create(c),A):c,h,Le,Me)(ce)}}function Le(Y){return m(Y===x,"expected code"),g=!0,I(ne,le),W}function Me(Y){return m(Y===x,"expected code"),g=!0,le.restore(),++f<ae.length?ge(ae[f]):te}}}function j(I,A){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&se(c.events,A,c.events.length-A,I.resolve(c.events.slice(A),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c)),m(I.partial||c.events.length===0||c.events[c.events.length-1][0]==="exit","expected last token to end")}function ee(){const I=L(),A=c.previous,M=c.currentConstruct,U=c.events.length,W=Array.from(l);return{from:U,restore:te};function te(){r=I,c.previous=A,c.currentConstruct=M,c.events.length=U,l=W,O(),be("position: restore: `%j`",r)}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Yr(e,n){const t=n.start._index,r=n.start._bufferIndex,a=n.end._index,i=n.end._bufferIndex;let s;if(t===a)m(i>-1,"expected non-negative end buffer index"),m(r>-1,"expected non-negative start buffer index"),s=[e[t].slice(r,i)];else{if(s=e.slice(t,a),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):(m(r===0,"expected `startBufferIndex` to be `0`"),s.shift())}i>0&&s.push(e[a].slice(0,i))}return s}function Gr(e,n){let t=-1;const r=[];let a;for(;++t<e.length;){const i=e[t];let s;if(typeof i=="string")s=i;else switch(i){case o.carriageReturn:{s=fe.cr;break}case o.lineFeed:{s=fe.lf;break}case o.carriageReturnLineFeed:{s=fe.cr+fe.lf;break}case o.horizontalTab:{s=n?fe.space:fe.ht;break}case o.virtualSpace:{if(!n&&a)continue;s=fe.space;break}default:m(typeof i=="number","expected number"),s=String.fromCharCode(i)}a=i===o.horizontalTab,r.push(s)}return r.join("")}function Xr(e){const r={constructs:nn([vr,...(e||{}).extensions||[]]),content:a(hn),defined:[],document:a(fn),flow:a(Mr),lazy:{},string:a(_r),text:a(Lr)};return r;function a(i){return s;function s(l){return Wr(r,i,l)}}}function Zr(e){for(;!Pt(e););return e}const xt=/[\0\t\n\r]/g;function Jr(){let e=1,n="",t=!0,r;return a;function a(i,s,l){const g=[];let h,c,k,x,p;for(i=n+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),k=0,n="",t&&(i.charCodeAt(0)===o.byteOrderMarker&&k++,t=void 0);k<i.length;){if(xt.lastIndex=k,h=xt.exec(i),x=h&&h.index!==void 0?h.index:i.length,p=i.charCodeAt(x),!h){n=i.slice(k);break}if(p===o.lf&&k===x&&r)g.push(o.carriageReturnLineFeed),r=void 0;else switch(r&&(g.push(o.carriageReturn),r=void 0),k<x&&(g.push(i.slice(k,x)),e+=x-k),p){case o.nul:{g.push(o.replacementCharacter),e++;break}case o.ht:{for(c=Math.ceil(e/T.tabSize)*T.tabSize,g.push(o.horizontalTab);e++<c;)g.push(o.virtualSpace);break}case o.lf:{g.push(o.lineFeed),e=1;break}default:r=!0,e=1}k=x+1}return l&&(r&&g.push(o.carriageReturn),n&&g.push(n),g.push(o.eof)),g}}const Kr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $r(e){return e.replace(Kr,ei)}function ei(e,n,t){if(n)return n;if(t.charCodeAt(0)===o.numberSign){const a=t.charCodeAt(1),i=a===o.lowercaseX||a===o.uppercaseX;return Ct(t.slice(i?2:1),i?T.numericBaseHexadecimal:T.numericBaseDecimal)}return $e(t)||e}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kt(e.position):"start"in e||"end"in e?kt(e):"line"in e||"column"in e?Ze(e):""}function Ze(e){return bt(e&&e.line)+":"+bt(e&&e.column)}function kt(e){return Ze(e&&e.start)+"-"+Ze(e&&e.end)}function bt(e){return e&&typeof e=="number"?e:1}const Ot={}.hasOwnProperty;function ti(e,n,t){return typeof n!="string"&&(t=n,n=void 0),ni(t)(Zr(Xr(t).document().write(Jr()(e,n,!0))))}function ni(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ut),autolinkProtocol:q,autolinkEmail:q,atxHeading:i(rt),blockQuote:i(ce),characterEscape:q,characterReference:q,codeFenced:i(xe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(xe,s),codeText:i(ye,s),codeTextData:q,data:q,codeFlowValue:q,definition:i(qe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Ht),hardBreakEscape:i(it),hardBreakTrailing:i(it),htmlFlow:i(at,s),htmlFlowData:q,htmlText:i(at,s),htmlTextData:q,image:i(Vt),label:s,link:i(ut),listItem:i(jt),listItemValue:x,listOrdered:i(ot,k),listUnordered:i(ot),paragraph:i(Qt),reference:d,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(rt),strong:i(Ut),thematicBreak:i(Wt)},exit:{atxHeading:g(),atxHeadingSequence:Q,autolink:g(),autolinkEmail:Te,autolinkProtocol:Y,blockQuote:g(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Le,characterReference:Me,codeFenced:g(L),codeFencedFence:F,codeFencedFenceInfo:p,codeFencedFenceMeta:B,codeFlowValue:j,codeIndented:g(w),codeText:g(M),codeTextData:j,data:j,definition:g(),definitionDestinationString:V,definitionLabelString:D,definitionTitleString:C,emphasis:g(),hardBreakEscape:g(O),hardBreakTrailing:g(O),htmlFlow:g(I),htmlFlowData:j,htmlText:g(A),htmlTextData:j,image:g(W),label:ae,labelText:te,lineEnding:ee,link:g(U),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:K,resourceDestinationString:f,resourceTitleString:ne,resource:le,setextHeading:g(v),setextHeadingLineSequence:N,setextHeadingText:S,strong:g(),thematicBreak:g()}};Nt(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let y={type:"root",children:[]};const z={stack:[y],tokenStack:[],config:n,enter:l,exit:h,buffer:s,resume:c,data:t},P=[];let R=-1;for(;++R<b.length;)if(b[R][1].type===u.listOrdered||b[R][1].type===u.listUnordered)if(b[R][0]==="enter")P.push(R);else{const G=P.pop();m(typeof G=="number","expected list ot be open"),R=a(b,G,R)}for(R=-1;++R<b.length;){const G=n[b[R][0]];Ot.call(G,b[R][1].type)&&G[b[R][1].type].call(Object.assign({sliceSerialize:b[R][2].sliceSerialize},z),b[R][1])}if(z.tokenStack.length>0){const G=z.tokenStack[z.tokenStack.length-1];(G[1]||yt).call(z,void 0,G[0])}for(y.position={start:de(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:de(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},R=-1;++R<n.transforms.length;)y=n.transforms[R](y)||y;return y}function a(b,y,z){let P=y-1,R=-1,G=!1,ke,he,Ie,ze;for(;++P<=z;){const $=b[P];switch($[1].type){case u.listUnordered:case u.listOrdered:case u.blockQuote:{$[0]==="enter"?R++:R--,ze=void 0;break}case u.lineEndingBlank:{$[0]==="enter"&&(ke&&!ze&&!R&&!Ie&&(Ie=P),ze=void 0);break}case u.linePrefix:case u.listItemValue:case u.listItemMarker:case u.listItemPrefix:case u.listItemPrefixWhitespace:break;default:ze=void 0}if(!R&&$[0]==="enter"&&$[1].type===u.listItemPrefix||R===-1&&$[0]==="exit"&&($[1].type===u.listUnordered||$[1].type===u.listOrdered)){if(ke){let Se=P;for(he=void 0;Se--;){const pe=b[Se];if(pe[1].type===u.lineEnding||pe[1].type===u.lineEndingBlank){if(pe[0]==="exit")continue;he&&(b[he][1].type=u.lineEndingBlank,G=!0),pe[1].type=u.lineEnding,he=Se}else if(!(pe[1].type===u.linePrefix||pe[1].type===u.blockQuotePrefix||pe[1].type===u.blockQuotePrefixWhitespace||pe[1].type===u.blockQuoteMarker||pe[1].type===u.listItemIndent))break}Ie&&(!he||Ie<he)&&(ke._spread=!0),ke.end=Object.assign({},he?b[he][1].start:$[1].end),b.splice(he||P,0,["exit",ke,$[2]]),P++,z++}if($[1].type===u.listItemPrefix){const Se={type:"listItem",_spread:!1,start:Object.assign({},$[1].start),end:void 0};ke=Se,b.splice(P,0,["enter",Se,$[2]]),P++,z++,Ie=void 0,ze=!0}}}return b[y][1]._spread=G,z}function i(b,y){return z;function z(P){l.call(this,b(P),P),y&&y.call(this,P)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(b,y,z){const P=this.stack[this.stack.length-1];m(P,"expected `parent`"),m("children"in P,"expected `parent`"),P.children.push(b),this.stack.push(b),this.tokenStack.push([y,z||void 0]),b.position={start:de(y.start),end:void 0}}function g(b){return y;function y(z){b&&b.call(this,z),h.call(this,z)}}function h(b,y){const z=this.stack.pop();m(z,"expected `node`");const P=this.tokenStack.pop();if(P)P[0].type!==b.type&&(y?y.call(this,b,P[0]):(P[1]||yt).call(this,b,P[0]));else throw new Error("Cannot close `"+b.type+"` ("+Fe({start:b.start,end:b.end})+"): it’s not open");m(z.type!=="fragment","unexpected fragment `exit`ed"),m(z.position,"expected `position` to be defined"),z.position.end=de(b.end)}function c(){return en(this.stack.pop())}function k(){this.data.expectingFirstListItemValue=!0}function x(b){if(this.data.expectingFirstListItemValue){const y=this.stack[this.stack.length-2];m(y,"expected nodes on stack"),m(y.type==="list","expected list on stack"),y.start=Number.parseInt(this.sliceSerialize(b),T.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="code","expected code on stack"),y.lang=b}function B(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="code","expected code on stack"),y.meta=b}function F(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="code","expected code on stack"),y.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="code","expected code on stack"),y.value=b.replace(/(\r?\n|\r)$/g,"")}function D(b){const y=this.resume(),z=this.stack[this.stack.length-1];m(z,"expected node on stack"),m(z.type==="definition","expected definition on stack"),z.label=y,z.identifier=we(this.sliceSerialize(b)).toLowerCase()}function C(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="definition","expected definition on stack"),y.title=b}function V(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="definition","expected definition on stack"),y.url=b}function Q(b){const y=this.stack[this.stack.length-1];if(m(y,"expected node on stack"),m(y.type==="heading","expected heading on stack"),!y.depth){const z=this.sliceSerialize(b).length;m(z===1||z===2||z===3||z===4||z===5||z===6,"expected `depth` between `1` and `6`"),y.depth=z}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function N(b){const y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="heading","expected heading on stack"),y.depth=this.sliceSerialize(b).codePointAt(0)===o.equalsTo?1:2}function v(){this.data.setextHeadingSlurpLineEnding=void 0}function q(b){const y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m("children"in y,"expected parent on stack");const z=y.children;let P=z[z.length-1];(!P||P.type!=="text")&&(P=vt(),P.position={start:de(b.start),end:void 0},z.push(P)),this.stack.push(P)}function j(b){const y=this.stack.pop();m(y,"expected a `node` to be on the stack"),m("value"in y,"expected a `literal` to be on the stack"),m(y.position,"expected `node` to have an open position"),y.value+=this.sliceSerialize(b),y.position.end=de(b.end)}function ee(b){const y=this.stack[this.stack.length-1];if(m(y,"expected `node`"),this.data.atHardBreak){m("children"in y,"expected `parent`");const z=y.children[y.children.length-1];m(z.position,"expected tail to have a starting position"),z.position.end=de(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(y.type)&&(q.call(this,b),j.call(this,b))}function O(){this.data.atHardBreak=!0}function I(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="html","expected html on stack"),y.value=b}function A(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="html","expected html on stack"),y.value=b}function M(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="inlineCode","expected inline code on stack"),y.value=b}function U(){const b=this.stack[this.stack.length-1];if(m(b,"expected node on stack"),m(b.type==="link","expected link on stack"),this.data.inReference){const y=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=y,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function W(){const b=this.stack[this.stack.length-1];if(m(b,"expected node on stack"),m(b.type==="image","expected image on stack"),this.data.inReference){const y=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=y,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(b){const y=this.sliceSerialize(b),z=this.stack[this.stack.length-2];m(z,"expected ancestor on stack"),m(z.type==="image"||z.type==="link","expected image or link on stack"),z.label=$r(y),z.identifier=we(y).toLowerCase()}function ae(){const b=this.stack[this.stack.length-1];m(b,"expected node on stack"),m(b.type==="fragment","expected fragment on stack");const y=this.resume(),z=this.stack[this.stack.length-1];if(m(z,"expected node on stack"),m(z.type==="image"||z.type==="link","expected image or link on stack"),this.data.inReference=!0,z.type==="link"){const P=b.children;z.children=P}else z.alt=y}function f(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="image"||y.type==="link","expected image or link on stack"),y.url=b}function ne(){const b=this.resume(),y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="image"||y.type==="link","expected image or link on stack"),y.title=b}function le(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function K(b){const y=this.resume(),z=this.stack[this.stack.length-1];m(z,"expected node on stack"),m(z.type==="image"||z.type==="link","expected image reference or link reference on stack"),z.label=y,z.identifier=we(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function ge(b){m(b.type==="characterReferenceMarkerNumeric"||b.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=b.type}function Le(b){const y=this.sliceSerialize(b),z=this.data.characterReferenceType;let P;if(z)P=Ct(y,z===u.characterReferenceMarkerNumeric?T.numericBaseDecimal:T.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const G=$e(y);m(G!==!1,"expected reference to decode"),P=G}const R=this.stack[this.stack.length-1];m(R,"expected `node`"),m("value"in R,"expected `node.value`"),R.value+=P}function Me(b){const y=this.stack.pop();m(y,"expected `node`"),m(y.position,"expected `node.position`"),y.position.end=de(b.end)}function Y(b){j.call(this,b);const y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="link","expected link on stack"),y.url=this.sliceSerialize(b)}function Te(b){j.call(this,b);const y=this.stack[this.stack.length-1];m(y,"expected node on stack"),m(y.type==="link","expected link on stack"),y.url="mailto:"+this.sliceSerialize(b)}function ce(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ht(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function it(){return{type:"break"}}function at(){return{type:"html",value:""}}function Vt(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function ot(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function jt(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function Qt(){return{type:"paragraph",children:[]}}function Ut(){return{type:"strong",children:[]}}function vt(){return{type:"text",value:""}}function Wt(){return{type:"thematicBreak"}}}function de(e){return{line:e.line,column:e.column,offset:e.offset}}function Nt(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Nt(e,r):ri(e,r)}}function ri(e,n){let t;for(t in n)if(Ot.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function yt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is still open")}function Fi(e){const n=this;n.parser=t;function t(r){return ti(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function St(e){if(e)throw e}var Ne,wt;function ii(){if(wt)return Ne;wt=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},i=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var c=e.call(h,"constructor"),k=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!c&&!k)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},s=function(h,c){t&&c.name==="__proto__"?t(h,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):h[c.name]=c.newValue},l=function(h,c){if(c==="__proto__")if(e.call(h,c)){if(r)return r(h,c).value}else return;return h[c]};return Ne=function g(){var h,c,k,x,p,B,F=arguments[0],L=1,w=arguments.length,D=!1;for(typeof F=="boolean"&&(D=F,F=arguments[1]||{},L=2),(F==null||typeof F!="object"&&typeof F!="function")&&(F={});L<w;++L)if(h=arguments[L],h!=null)for(c in h)k=l(F,c),x=l(h,c),F!==x&&(D&&x&&(i(x)||(p=a(x)))?(p?(p=!1,B=k&&a(k)?k:[]):B=k&&i(k)?k:{},s(F,{name:c,newValue:g(D,B,x)})):typeof x<"u"&&s(F,{name:c,newValue:x}));return F},Ne}var ai=ii();const He=Zt(ai);function Je(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ui(){const e=[],n={run:t,use:r};return n;function t(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(g,...h){const c=e[++i];let k=-1;if(g){s(g);return}for(;++k<a.length;)(h[k]===null||h[k]===void 0)&&(h[k]=a[k]);a=h,c?oi(c,l)(...h):s(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),n}}function oi(e,n){let t;return r;function r(...s){const l=e.length>s.length;let g;l&&s.push(a);try{g=e.apply(this,s)}catch(h){const c=h;if(l&&t)throw c;return a(c)}l||(g&&g.then&&typeof g.then=="function"?g.then(i,a):g instanceof Error?a(g):i(g))}function a(s,...l){t||(t=!0,n(s,...l))}function i(s){a(null,s)}}class J extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let a="",i={},s=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?a=n:!i.cause&&n&&(s=!0,a=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const g=r.indexOf(":");g===-1?i.ruleId=r:(i.source=r.slice(0,g),i.ruleId=r.slice(g+1))}if(!i.place&&i.ancestors&&i.ancestors){const g=i.ancestors[i.ancestors.length-1];g&&(i.place=g.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=Fe(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const ue={basename:si,dirname:li,extname:ci,join:hi,sep:"/"};function si(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ae(e);let t=0,r=-1,a=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){t=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,l=n.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){t=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===n.codePointAt(l--)?l<0&&(r=a):(l=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function li(e){if(Ae(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function ci(e){Ae(e);let n=e.length,t=-1,r=0,a=-1,i=0,s;for(;n--;){const l=e.codePointAt(n);if(l===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),l===46?a<0?a=n:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||t<0||i===0||i===1&&a===t-1&&a===r+1?"":e.slice(a,t)}function hi(...e){let n=-1,t;for(;++n<e.length;)Ae(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":pi(t)}function pi(e){Ae(e);const n=e.codePointAt(0)===47;let t=fi(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function fi(e,n){let t="",r=0,a=-1,i=0,s=-1,l,g;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(g=t.lastIndexOf("/"),g!==t.length-1){g<0?(t="",r=0):(t=t.slice(0,g),r=t.length-1-t.lastIndexOf("/")),a=s,i=0;continue}}else if(t.length>0){t="",r=0,a=s,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(a+1,s):t=e.slice(a+1,s),r=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return t}function Ae(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const di={cwd:mi};function mi(){return"/"}function Ke(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gi(e){if(typeof e=="string")e=new URL(e);else if(!Ke(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return xi(e)}function xi(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(n)}const Ve=["history","path","basename","stem","extname","dirname"];class ki{constructor(n){let t;n?Ke(n)?t={path:n}:typeof n=="string"||bi(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":di.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ve.length;){const i=Ve[r];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let a;for(a in t)Ve.includes(a)||(this[a]=t[a])}get basename(){return typeof this.path=="string"?ue.basename(this.path):void 0}set basename(n){Qe(n,"basename"),je(n,"basename"),this.path=ue.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ue.dirname(this.path):void 0}set dirname(n){Tt(this.basename,"dirname"),this.path=ue.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ue.extname(this.path):void 0}set extname(n){if(je(n,"extname"),Tt(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Ke(n)&&(n=gi(n)),Qe(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}set stem(n){Qe(n,"stem"),je(n,"stem"),this.path=ue.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const a=this.message(n,t,r);throw a.fatal=!0,a}info(n,t,r){const a=this.message(n,t,r);return a.fatal=void 0,a}message(n,t,r){const a=new J(n,t,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function je(e,n){if(e&&e.includes(ue.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ue.sep+"`")}function Qe(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Tt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function bi(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yi=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),Si={}.hasOwnProperty;class nt extends yi{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ui()}copy(){const n=new nt;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(He(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(We("data",this.frozen),this.namespace[n]=t,this):Si.call(this.namespace,n)&&this.namespace[n]||void 0:n?(We("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=t.call(n,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Be(n),r=this.parser||this.Parser;return Ue("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Ue("process",this.parser||this.Parser),ve("process",this.compiler||this.Compiler),t?a(void 0,t):new Promise(a);function a(i,s){const l=Be(n),g=r.parse(l);r.run(g,l,function(c,k,x){if(c||!k||!x)return h(c);const p=k,B=r.stringify(p,x);Ti(B)?x.value=B:x.result=B,h(c,x)});function h(c,k){c||!k?s(c):i?i(k):(m(t,"`done` is defined if `resolve` is not"),t(void 0,k))}}}processSync(n){let t=!1,r;return this.freeze(),Ue("processSync",this.parser||this.Parser),ve("processSync",this.compiler||this.Compiler),this.process(n,a),zt("processSync","process",t),m(r,"we either bailed on an error or have a tree"),r;function a(i,s){t=!0,St(i),r=s}}run(n,t,r){It(n),this.freeze();const a=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(s,l){m(typeof t!="function","`file` can’t be a `done` anymore, we checked");const g=Be(t);a.run(n,g,h);function h(c,k,x){const p=k||n;c?l(c):s?s(p):(m(r,"`done` is defined if `resolve` is not"),r(void 0,p,x))}}}runSync(n,t){let r=!1,a;return this.run(n,t,i),zt("runSync","run",r),m(a,"we either bailed on an error or have a tree"),a;function i(s,l){St(s),a=l,r=!0}}stringify(n,t){this.freeze();const r=Be(t),a=this.compiler||this.Compiler;return ve("stringify",a),It(n),a(n,r)}use(n,...t){const r=this.attachers,a=this.namespace;if(We("use",this.frozen),n!=null)if(typeof n=="function")g(n,t);else if(typeof n=="object")Array.isArray(n)?l(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function i(h){if(typeof h=="function")g(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[c,...k]=h;g(c,k)}else s(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function s(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(h.plugins),h.settings&&(a.settings=He(!0,a.settings,h.settings))}function l(h){let c=-1;if(h!=null)if(Array.isArray(h))for(;++c<h.length;){const k=h[c];i(k)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function g(h,c){let k=-1,x=-1;for(;++k<r.length;)if(r[k][0]===h){x=k;break}if(x===-1)r.push([h,...c]);else if(c.length>0){let[p,...B]=c;const F=r[x][1];Je(F)&&Je(p)&&(p=He(!0,F,p)),r[x]=[h,p,...B]}}}}const Ai=new nt().freeze();function Ue(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ve(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function We(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function It(e){if(!Je(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Be(e){return wi(e)?e:new ki(e)}function wi(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ti(e){return typeof e=="string"||Ii(e)}function Ii(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}export{St as A,cn as a,ln as b,ht as c,$r as d,o as e,ie as f,oe as g,Ye as h,u as i,_e as j,H as k,T as l,Z as m,we as n,m as o,et as p,E as q,Fi as r,se as s,en as t,Ai as u,_ as v,nn as w,He as x,ui as y,Je as z};
1
+ var Yt=Object.defineProperty;var Gt=(e,n,t)=>n in e?Yt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Re=(e,n,t)=>Gt(e,typeof n!="symbol"?n+"":n,t);import{d as $e,c as Xt}from"./browser-ZXTF4AKv.js";import{bl as Zt}from"./tool-windows-BEnZdJqF.js";class Jt extends Error{constructor(t,r,a,i,s){super(t);Re(this,"name","Assertion");Re(this,"code","ERR_ASSERTION");Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=r,this.expected=a,this.generated=s,this.operator=i}}function m(e,n){Kt(!!e,!1,!0,"ok","Expected value to be truthy",n)}function Kt(e,n,t,r,a,i){if(!e)throw i instanceof Error?i:new Jt(i||a,n,t,r,!i)}const $t={};function en(e,n){const t=$t,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,a=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Et(e,r,a)}function Et(e,n,t){if(tn(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return st(e.children,n,t)}return Array.isArray(e)?st(e,n,t):""}function st(e,n,t){const r=[];let a=-1;for(;++a<e.length;)r[a]=Et(e[a],n,t);return r.join("")}function tn(e){return!!(e&&typeof e=="object")}const o={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseH:72,uppercaseW:87,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseH:104,lowercaseW:119,lowercaseX:120,leftCurlyBrace:123,verticalBar:124,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},T={attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},u={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},fe={ht:" ",lf:`
2
+ `,cr:"\r",space:" ",replacementCharacter:"�"};function se(e,n,t,r){const a=e.length;let i=0,s;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,t=t>0?t:0,r.length<T.v8MaxSafeChunkSize)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);i<r.length;)s=r.slice(i,i+T.v8MaxSafeChunkSize),s.unshift(n,0),e.splice(...s),i+=T.v8MaxSafeChunkSize,n+=T.v8MaxSafeChunkSize}function re(e,n){return e.length>0?(se(e,e.length,0,n),e):n}const lt={}.hasOwnProperty;function nn(e){const n={};let t=-1;for(;++t<e.length;)rn(n,e[t]);return n}function rn(e,n){let t;for(t in n){const a=(lt.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let s;if(i)for(s in i){lt.call(a,s)||(a[s]=[]);const l=i[s];an(a[s],Array.isArray(l)?l:l?[l]:[])}}}function an(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);se(e,0,0,r)}function Ct(e,n){const t=Number.parseInt(e,n);return t<o.ht||t===o.vt||t>o.cr&&t<o.space||t>o.tilde&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?fe.replacementCharacter:String.fromCodePoint(t)}function we(e){return e.replace(/[\t\n\r ]+/g,fe.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const oe=me(/[A-Za-z]/),ie=me(/[\dA-Za-z]/),un=me(/[#-'*+\--9=?A-Z^-~]/);function Ye(e){return e!==null&&(e<o.space||e===o.del)}const Ge=me(/\d/),on=me(/[\dA-Fa-f]/),sn=me(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<o.horizontalTab}function Z(e){return e!==null&&(e<o.nul||e===o.space)}function _(e){return e===o.horizontalTab||e===o.virtualSpace||e===o.space}const ln=me(new RegExp("\\p{P}|\\p{S}","u")),cn=me(/\s/);function me(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function H(e,n,t,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(g){return _(g)?(e.enter(t),l(g)):n(g)}function l(g){return _(g)&&i++<a?(e.consume(g),l):(e.exit(t),n(g))}}const hn={tokenize:pn};function pn(e){const n=e.attempt(this.parser.constructs.contentInitial,r,a);let t;return n;function r(l){if(m(l===o.eof||E(l),"expected eol or eof"),l===o.eof){e.consume(l);return}return e.enter(u.lineEnding),e.consume(l),e.exit(u.lineEnding),H(e,n,u.linePrefix)}function a(l){return m(l!==o.eof&&!E(l),"expected anything other than a line ending or EOF"),e.enter(u.paragraph),i(l)}function i(l){const g=e.enter(u.chunkText,{contentType:T.contentTypeText,previous:t});return t&&(t.next=g),t=g,s(l)}function s(l){if(l===o.eof){e.exit(u.chunkText),e.exit(u.paragraph),e.consume(l);return}return E(l)?(e.consume(l),e.exit(u.chunkText),i):(e.consume(l),s)}}const fn={tokenize:dn},ct={tokenize:mn};function dn(e){const n=this,t=[];let r=0,a,i,s;return l;function l(C){if(r<t.length){const V=t[r];return n.containerState=V[1],m(V[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(V[0].continuation,g,h)(C)}return h(C)}function g(C){if(m(n.containerState,"expected `containerState` to be defined after continuation"),r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&D();const V=n.events.length;let Q=V,y;for(;Q--;)if(n.events[Q][0]==="exit"&&n.events[Q][1].type===u.chunkFlow){y=n.events[Q][1].end;break}m(y,"could not find previous flow chunk"),w(r);let N=V;for(;N<n.events.length;)n.events[N][1].end={...y},N++;return se(n.events,Q+1,0,n.events.slice(V)),n.events.length=N,h(C)}return l(C)}function h(C){if(r===t.length){if(!a)return x(C);if(a.currentConstruct&&a.currentConstruct.concrete)return B(C);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ct,c,k)(C)}function c(C){return a&&D(),w(r),x(C)}function k(C){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,B(C)}function x(C){return n.containerState={},e.attempt(ct,p,B)(C)}function p(C){return m(n.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),m(n.containerState,"expected `containerState` to be defined on tokenizer"),r++,t.push([n.currentConstruct,n.containerState]),x(C)}function B(C){if(C===o.eof){a&&D(),w(0),e.consume(C);return}return a=a||n.parser.flow(n.now()),e.enter(u.chunkFlow,{_tokenizer:a,contentType:T.contentTypeFlow,previous:i}),F(C)}function F(C){if(C===o.eof){L(e.exit(u.chunkFlow),!0),w(0),e.consume(C);return}return E(C)?(e.consume(C),L(e.exit(u.chunkFlow)),r=0,n.interrupt=void 0,l):(e.consume(C),F)}function L(C,V){m(a,"expected `childFlow` to be defined when continuing");const Q=n.sliceStream(C);if(V&&Q.push(null),C.previous=i,i&&(i.next=C),i=C,a.defineSkip(C.start),a.write(Q),n.parser.lazy[C.start.line]){let y=a.events.length;for(;y--;)if(a.events[y][1].start.offset<s&&(!a.events[y][1].end||a.events[y][1].end.offset>s))return;const N=n.events.length;let v=N,q,j;for(;v--;)if(n.events[v][0]==="exit"&&n.events[v][1].type===u.chunkFlow){if(q){j=n.events[v][1].end;break}q=!0}for(m(j,"could not find previous flow chunk"),w(r),y=N;y<n.events.length;)n.events[y][1].end={...j},y++;se(n.events,v+1,0,n.events.slice(N)),n.events.length=y}}function w(C){let V=t.length;for(;V-- >C;){const Q=t[V];n.containerState=Q[1],m(Q[0].exit,"expected `exit` to be defined on container construct"),Q[0].exit.call(n,e)}t.length=C}function D(){m(n.containerState,"expected `containerState` to be defined when closing flow"),m(a,"expected `childFlow` to be defined when closing it"),a.write([o.eof]),i=void 0,a=void 0,n.containerState._closeFlow=void 0}}function mn(e,n,t){return m(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,e.attempt(this.parser.constructs.document,n,t),u.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)}function ht(e){if(e===o.eof||Z(e)||cn(e))return T.characterGroupWhitespace;if(ln(e))return T.characterGroupPunctuation}function et(e,n,t){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(n=i(n,t),r.push(i))}return n}const Xe={name:"attention",resolveAll:gn,tokenize:xn};function gn(e,n){let t=-1,r,a,i,s,l,g,h,c;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;g=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const k={...e[r][1].end},x={...e[t][1].start};pt(k,-g),pt(x,g),s={type:g>1?u.strongSequence:u.emphasisSequence,start:k,end:{...e[r][1].end}},l={type:g>1?u.strongSequence:u.emphasisSequence,start:{...e[t][1].start},end:x},i={type:g>1?u.strongText:u.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:g>1?u.strong:u.emphasis,start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[t][1].start={...l.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=re(h,[["enter",e[r][1],n],["exit",e[r][1],n]])),h=re(h,[["enter",a,n],["enter",s,n],["exit",s,n],["enter",i,n]]),m(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),h=re(h,et(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),h=re(h,[["exit",i,n],["enter",l,n],["exit",l,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,h=re(h,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,se(e,r-1,t-r+3,h),t=r+h.length-c-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function xn(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,a=ht(r);let i;return s;function s(g){return m(g===o.asterisk||g===o.underscore,"expected asterisk or underscore"),i=g,e.enter("attentionSequence"),l(g)}function l(g){if(g===i)return e.consume(g),l;const h=e.exit("attentionSequence"),c=ht(g);m(t,"expected `attentionMarkers` to be populated");const k=!c||c===T.characterGroupPunctuation&&a||t.includes(g),x=!a||a===T.characterGroupPunctuation&&c||t.includes(r);return h._open=!!(i===o.asterisk?k:k&&(a||!x)),h._close=!!(i===o.asterisk?x:x&&(c||!k)),n(g)}}function pt(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const kn={name:"autolink",tokenize:bn};function bn(e,n,t){let r=0;return a;function a(p){return m(p===o.lessThan,"expected `<`"),e.enter(u.autolink),e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.enter(u.autolinkProtocol),i}function i(p){return oe(p)?(e.consume(p),s):p===o.atSign?t(p):h(p)}function s(p){return p===o.plusSign||p===o.dash||p===o.dot||ie(p)?(r=1,l(p)):h(p)}function l(p){return p===o.colon?(e.consume(p),r=0,g):(p===o.plusSign||p===o.dash||p===o.dot||ie(p))&&r++<T.autolinkSchemeSizeMax?(e.consume(p),l):(r=0,h(p))}function g(p){return p===o.greaterThan?(e.exit(u.autolinkProtocol),e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.exit(u.autolink),n):p===o.eof||p===o.space||p===o.lessThan||Ye(p)?t(p):(e.consume(p),g)}function h(p){return p===o.atSign?(e.consume(p),c):un(p)?(e.consume(p),h):t(p)}function c(p){return ie(p)?k(p):t(p)}function k(p){return p===o.dot?(e.consume(p),r=0,c):p===o.greaterThan?(e.exit(u.autolinkProtocol).type=u.autolinkEmail,e.enter(u.autolinkMarker),e.consume(p),e.exit(u.autolinkMarker),e.exit(u.autolink),n):x(p)}function x(p){if((p===o.dash||ie(p))&&r++<T.autolinkDomainSizeMax){const B=p===o.dash?x:k;return e.consume(p),B}return t(p)}}const _e={partial:!0,tokenize:Sn};function Sn(e,n,t){return r;function r(i){return _(i)?H(e,a,u.linePrefix)(i):a(i)}function a(i){return i===o.eof||E(i)?n(i):t(i)}}const Ft={continuation:{tokenize:wn},exit:Tn,name:"blockQuote",tokenize:yn};function yn(e,n,t){const r=this;return a;function a(s){if(s===o.greaterThan){const l=r.containerState;return m(l,"expected `containerState` to be defined in container"),l.open||(e.enter(u.blockQuote,{_container:!0}),l.open=!0),e.enter(u.blockQuotePrefix),e.enter(u.blockQuoteMarker),e.consume(s),e.exit(u.blockQuoteMarker),i}return t(s)}function i(s){return _(s)?(e.enter(u.blockQuotePrefixWhitespace),e.consume(s),e.exit(u.blockQuotePrefixWhitespace),e.exit(u.blockQuotePrefix),n):(e.exit(u.blockQuotePrefix),n(s))}}function wn(e,n,t){const r=this;return a;function a(s){return _(s)?(m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,i,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(s)):i(s)}function i(s){return e.attempt(Ft,n,t)(s)}}function Tn(e){e.exit(u.blockQuote)}const Mt={name:"characterEscape",tokenize:In};function In(e,n,t){return r;function r(i){return m(i===o.backslash,"expected `\\`"),e.enter(u.characterEscape),e.enter(u.escapeMarker),e.consume(i),e.exit(u.escapeMarker),a}function a(i){return sn(i)?(e.enter(u.characterEscapeValue),e.consume(i),e.exit(u.characterEscapeValue),e.exit(u.characterEscape),n):t(i)}}const At={name:"characterReference",tokenize:zn};function zn(e,n,t){const r=this;let a=0,i,s;return l;function l(k){return m(k===o.ampersand,"expected `&`"),e.enter(u.characterReference),e.enter(u.characterReferenceMarker),e.consume(k),e.exit(u.characterReferenceMarker),g}function g(k){return k===o.numberSign?(e.enter(u.characterReferenceMarkerNumeric),e.consume(k),e.exit(u.characterReferenceMarkerNumeric),h):(e.enter(u.characterReferenceValue),i=T.characterReferenceNamedSizeMax,s=ie,c(k))}function h(k){return k===o.uppercaseX||k===o.lowercaseX?(e.enter(u.characterReferenceMarkerHexadecimal),e.consume(k),e.exit(u.characterReferenceMarkerHexadecimal),e.enter(u.characterReferenceValue),i=T.characterReferenceHexadecimalSizeMax,s=on,c):(e.enter(u.characterReferenceValue),i=T.characterReferenceDecimalSizeMax,s=Ge,c(k))}function c(k){if(k===o.semicolon&&a){const x=e.exit(u.characterReferenceValue);return s===ie&&!$e(r.sliceSerialize(x))?t(k):(e.enter(u.characterReferenceMarker),e.consume(k),e.exit(u.characterReferenceMarker),e.exit(u.characterReference),n)}return s(k)&&a++<i?(e.consume(k),c):t(k)}}const ft={partial:!0,tokenize:Cn},dt={concrete:!0,name:"codeFenced",tokenize:En};function En(e,n,t){const r=this,a={partial:!0,tokenize:Q};let i=0,s=0,l;return g;function g(y){return h(y)}function h(y){m(y===o.graveAccent||y===o.tilde,"expected `` ` `` or `~`");const N=r.events[r.events.length-1];return i=N&&N[1].type===u.linePrefix?N[2].sliceSerialize(N[1],!0).length:0,l=y,e.enter(u.codeFenced),e.enter(u.codeFencedFence),e.enter(u.codeFencedFenceSequence),c(y)}function c(y){return y===l?(s++,e.consume(y),c):s<T.codeFencedSequenceSizeMin?t(y):(e.exit(u.codeFencedFenceSequence),_(y)?H(e,k,u.whitespace)(y):k(y))}function k(y){return y===o.eof||E(y)?(e.exit(u.codeFencedFence),r.interrupt?n(y):e.check(ft,F,V)(y)):(e.enter(u.codeFencedFenceInfo),e.enter(u.chunkString,{contentType:T.contentTypeString}),x(y))}function x(y){return y===o.eof||E(y)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceInfo),k(y)):_(y)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceInfo),H(e,p,u.whitespace)(y)):y===o.graveAccent&&y===l?t(y):(e.consume(y),x)}function p(y){return y===o.eof||E(y)?k(y):(e.enter(u.codeFencedFenceMeta),e.enter(u.chunkString,{contentType:T.contentTypeString}),B(y))}function B(y){return y===o.eof||E(y)?(e.exit(u.chunkString),e.exit(u.codeFencedFenceMeta),k(y)):y===o.graveAccent&&y===l?t(y):(e.consume(y),B)}function F(y){return m(E(y),"expected eol"),e.attempt(a,V,L)(y)}function L(y){return m(E(y),"expected eol"),e.enter(u.lineEnding),e.consume(y),e.exit(u.lineEnding),w}function w(y){return i>0&&_(y)?H(e,D,u.linePrefix,i+1)(y):D(y)}function D(y){return y===o.eof||E(y)?e.check(ft,F,V)(y):(e.enter(u.codeFlowValue),C(y))}function C(y){return y===o.eof||E(y)?(e.exit(u.codeFlowValue),D(y)):(e.consume(y),C)}function V(y){return e.exit(u.codeFenced),n(y)}function Q(y,N,v){let q=0;return j;function j(A){return m(E(A),"expected eol"),y.enter(u.lineEnding),y.consume(A),y.exit(u.lineEnding),ee}function ee(A){return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),y.enter(u.codeFencedFence),_(A)?H(y,O,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(A):O(A)}function O(A){return A===l?(y.enter(u.codeFencedFenceSequence),I(A)):v(A)}function I(A){return A===l?(q++,y.consume(A),I):q>=s?(y.exit(u.codeFencedFenceSequence),_(A)?H(y,M,u.whitespace)(A):M(A)):v(A)}function M(A){return A===o.eof||E(A)?(y.exit(u.codeFencedFence),N(A)):v(A)}}}function Cn(e,n,t){const r=this;return a;function a(s){return s===o.eof?t(s):(m(E(s),"expected eol"),e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),i)}function i(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}const De={name:"codeIndented",tokenize:Mn},Fn={partial:!0,tokenize:An};function Mn(e,n,t){const r=this;return a;function a(h){return m(_(h)),e.enter(u.codeIndented),H(e,i,u.linePrefix,T.tabSize+1)(h)}function i(h){const c=r.events[r.events.length-1];return c&&c[1].type===u.linePrefix&&c[2].sliceSerialize(c[1],!0).length>=T.tabSize?s(h):t(h)}function s(h){return h===o.eof?g(h):E(h)?e.attempt(Fn,s,g)(h):(e.enter(u.codeFlowValue),l(h))}function l(h){return h===o.eof||E(h)?(e.exit(u.codeFlowValue),s(h)):(e.consume(h),l)}function g(h){return e.exit(u.codeIndented),n(h)}}function An(e,n,t){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?t(s):E(s)?(e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),a):H(e,i,u.linePrefix,T.tabSize+1)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type===u.linePrefix&&l[2].sliceSerialize(l[1],!0).length>=T.tabSize?n(s):E(s)?a(s):t(s)}}const Bn={name:"codeText",previous:Bt,resolve:Pn,tokenize:_n};function Pn(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===u.lineEnding||e[t][1].type==="space")&&(e[n][1].type===u.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type===u.codeTextData){e[t][1].type=u.codeTextPadding,e[n][1].type=u.codeTextPadding,t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==u.lineEnding&&(a=r):(r===n||e[r][1].type===u.lineEnding)&&(e[a][1].type=u.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function Bt(e){return e!==o.graveAccent||this.events[this.events.length-1][1].type===u.characterEscape}function _n(e,n,t){const r=this;let a=0,i,s;return l;function l(x){return m(x===o.graveAccent,"expected `` ` ``"),m(Bt.call(r,r.previous),"expected correct previous"),e.enter(u.codeText),e.enter(u.codeTextSequence),g(x)}function g(x){return x===o.graveAccent?(e.consume(x),a++,g):(e.exit(u.codeTextSequence),h(x))}function h(x){return x===o.eof?t(x):x===o.space?(e.enter("space"),e.consume(x),e.exit("space"),h):x===o.graveAccent?(s=e.enter(u.codeTextSequence),i=0,k(x)):E(x)?(e.enter(u.lineEnding),e.consume(x),e.exit(u.lineEnding),h):(e.enter(u.codeTextData),c(x))}function c(x){return x===o.eof||x===o.space||x===o.graveAccent||E(x)?(e.exit(u.codeTextData),h(x)):(e.consume(x),c)}function k(x){return x===o.graveAccent?(e.consume(x),i++,k):i===a?(e.exit(u.codeTextSequence),e.exit(u.codeText),n(x)):(s.type=u.codeTextData,c(x))}}class Ln{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const a=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Ee(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ee(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ee(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Ee(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ee(this.left,t.reverse())}}}function Ee(e,n){let t=0;if(n.length<T.v8MaxSafeChunkSize)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+T.v8MaxSafeChunkSize)),t+=T.v8MaxSafeChunkSize}function Pt(e){const n={};let t=-1,r,a,i,s,l,g,h;const c=new Ln(e);for(;++t<c.length;){for(;t in n;)t=n[t];if(r=c.get(t),t&&r[1].type===u.chunkFlow&&c.get(t-1)[1].type===u.listItemPrefix&&(m(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),g=r[1]._tokenizer.events,i=0,i<g.length&&g[i][1].type===u.lineEndingBlank&&(i+=2),i<g.length&&g[i][1].type===u.content))for(;++i<g.length&&g[i][1].type!==u.content;)g[i][1].type===u.chunkText&&(g[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,qn(c,t)),t=n[t],h=!0);else if(r[1]._container){for(i=t,a=void 0;i--;)if(s=c.get(i),s[1].type===u.lineEnding||s[1].type===u.lineEndingBlank)s[0]==="enter"&&(a&&(c.get(a)[1].type=u.lineEndingBlank),s[1].type=u.lineEnding,a=i);else if(!(s[1].type===u.linePrefix||s[1].type===u.listItemIndent))break;a&&(r[1].end={...c.get(a)[1].start},l=c.slice(a,t),l.unshift(r),c.splice(a,t-a+1,l))}}return se(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!h}function qn(e,n){const t=e.get(n)[1],r=e.get(n)[2];let a=n-1;const i=[];m(t.contentType,"expected `contentType` on subtokens");let s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,g=[],h={};let c,k,x=-1,p=t,B=0,F=0;const L=[F];for(;p;){for(;e.get(++a)[1]!==p;);m(!k||p.previous===k,"expected previous to match"),m(!k||k.next===p,"expected next to match"),i.push(a),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(o.eof),k&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),k=p,p=p.next}for(p=t;++x<l.length;)l[x][0]==="exit"&&l[x-1][0]==="enter"&&l[x][1].type===l[x-1][1].type&&l[x][1].start.line!==l[x][1].end.line&&(m(p,"expected a current token"),F=x+1,L.push(F),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0,m(!p.next,"expected no next token")):L.pop(),x=L.length;x--;){const w=l.slice(L[x],L[x+1]),D=i.pop();m(D!==void 0,"expected a start position when splicing"),g.push([D,D+w.length-1]),e.splice(D,2,w)}for(g.reverse(),x=-1;++x<g.length;)h[B+g[x][0]]=B+g[x][1],B+=g[x][1]-g[x][0]-1;return h}const Rn={resolve:On,tokenize:Nn},Dn={partial:!0,tokenize:Hn};function On(e){return Pt(e),e}function Nn(e,n){let t;return r;function r(l){return m(l!==o.eof&&!E(l),"expected no eof or eol"),e.enter(u.content),t=e.enter(u.chunkContent,{contentType:T.contentTypeContent}),a(l)}function a(l){return l===o.eof?i(l):E(l)?e.check(Dn,s,i)(l):(e.consume(l),a)}function i(l){return e.exit(u.chunkContent),e.exit(u.content),n(l)}function s(l){return m(E(l),"expected eol"),e.consume(l),e.exit(u.chunkContent),m(t,"expected previous token"),t.next=e.enter(u.chunkContent,{contentType:T.contentTypeContent,previous:t}),t=t.next,a}}function Hn(e,n,t){const r=this;return a;function a(s){return m(E(s),"expected a line ending"),e.exit(u.chunkContent),e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),H(e,i,u.linePrefix)}function i(s){if(s===o.eof||E(s))return t(s);m(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type===u.linePrefix&&l[2].sliceSerialize(l[1],!0).length>=T.tabSize?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function _t(e,n,t,r,a,i,s,l,g){const h=g||Number.POSITIVE_INFINITY;let c=0;return k;function k(w){return w===o.lessThan?(e.enter(r),e.enter(a),e.enter(i),e.consume(w),e.exit(i),x):w===o.eof||w===o.space||w===o.rightParenthesis||Ye(w)?t(w):(e.enter(r),e.enter(s),e.enter(l),e.enter(u.chunkString,{contentType:T.contentTypeString}),F(w))}function x(w){return w===o.greaterThan?(e.enter(i),e.consume(w),e.exit(i),e.exit(a),e.exit(r),n):(e.enter(l),e.enter(u.chunkString,{contentType:T.contentTypeString}),p(w))}function p(w){return w===o.greaterThan?(e.exit(u.chunkString),e.exit(l),x(w)):w===o.eof||w===o.lessThan||E(w)?t(w):(e.consume(w),w===o.backslash?B:p)}function B(w){return w===o.lessThan||w===o.greaterThan||w===o.backslash?(e.consume(w),p):p(w)}function F(w){return!c&&(w===o.eof||w===o.rightParenthesis||Z(w))?(e.exit(u.chunkString),e.exit(l),e.exit(s),e.exit(r),n(w)):c<h&&w===o.leftParenthesis?(e.consume(w),c++,F):w===o.rightParenthesis?(e.consume(w),c--,F):w===o.eof||w===o.space||w===o.leftParenthesis||Ye(w)?t(w):(e.consume(w),w===o.backslash?L:F)}function L(w){return w===o.leftParenthesis||w===o.rightParenthesis||w===o.backslash?(e.consume(w),F):F(w)}}function Lt(e,n,t,r,a,i){const s=this;let l=0,g;return h;function h(p){return m(p===o.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(p),e.exit(a),e.enter(i),c}function c(p){return l>T.linkReferenceSizeMax||p===o.eof||p===o.leftSquareBracket||p===o.rightSquareBracket&&!g||p===o.caret&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?t(p):p===o.rightSquareBracket?(e.exit(i),e.enter(a),e.consume(p),e.exit(a),e.exit(r),n):E(p)?(e.enter(u.lineEnding),e.consume(p),e.exit(u.lineEnding),c):(e.enter(u.chunkString,{contentType:T.contentTypeString}),k(p))}function k(p){return p===o.eof||p===o.leftSquareBracket||p===o.rightSquareBracket||E(p)||l++>T.linkReferenceSizeMax?(e.exit(u.chunkString),c(p)):(e.consume(p),g||(g=!_(p)),p===o.backslash?x:k)}function x(p){return p===o.leftSquareBracket||p===o.backslash||p===o.rightSquareBracket?(e.consume(p),l++,k):k(p)}}function qt(e,n,t,r,a,i){let s;return l;function l(x){return x===o.quotationMark||x===o.apostrophe||x===o.leftParenthesis?(e.enter(r),e.enter(a),e.consume(x),e.exit(a),s=x===o.leftParenthesis?o.rightParenthesis:x,g):t(x)}function g(x){return x===s?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),n):(e.enter(i),h(x))}function h(x){return x===s?(e.exit(i),g(s)):x===o.eof?t(x):E(x)?(e.enter(u.lineEnding),e.consume(x),e.exit(u.lineEnding),H(e,h,u.linePrefix)):(e.enter(u.chunkString,{contentType:T.contentTypeString}),c(x))}function c(x){return x===s||x===o.eof||E(x)?(e.exit(u.chunkString),h(x)):(e.consume(x),x===o.backslash?k:c)}function k(x){return x===s||x===o.backslash?(e.consume(x),c):c(x)}}function Ce(e,n){let t;return r;function r(a){return E(a)?(e.enter(u.lineEnding),e.consume(a),e.exit(u.lineEnding),t=!0,r):_(a)?H(e,r,t?u.linePrefix:u.lineSuffix)(a):n(a)}}const Vn={name:"definition",tokenize:Qn},jn={partial:!0,tokenize:Un};function Qn(e,n,t){const r=this;let a;return i;function i(p){return e.enter(u.definition),s(p)}function s(p){return m(p===o.leftSquareBracket,"expected `[`"),Lt.call(r,e,l,t,u.definitionLabel,u.definitionLabelMarker,u.definitionLabelString)(p)}function l(p){return a=we(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===o.colon?(e.enter(u.definitionMarker),e.consume(p),e.exit(u.definitionMarker),g):t(p)}function g(p){return Z(p)?Ce(e,h)(p):h(p)}function h(p){return _t(e,c,t,u.definitionDestination,u.definitionDestinationLiteral,u.definitionDestinationLiteralMarker,u.definitionDestinationRaw,u.definitionDestinationString)(p)}function c(p){return e.attempt(jn,k,k)(p)}function k(p){return _(p)?H(e,x,u.whitespace)(p):x(p)}function x(p){return p===o.eof||E(p)?(e.exit(u.definition),r.parser.defined.push(a),n(p)):t(p)}}function Un(e,n,t){return r;function r(l){return Z(l)?Ce(e,a)(l):t(l)}function a(l){return qt(e,i,t,u.definitionTitle,u.definitionTitleMarker,u.definitionTitleString)(l)}function i(l){return _(l)?H(e,s,u.whitespace)(l):s(l)}function s(l){return l===o.eof||E(l)?n(l):t(l)}}const vn={name:"hardBreakEscape",tokenize:Wn};function Wn(e,n,t){return r;function r(i){return m(i===o.backslash,"expected `\\`"),e.enter(u.hardBreakEscape),e.consume(i),a}function a(i){return E(i)?(e.exit(u.hardBreakEscape),n(i)):t(i)}}const Yn={name:"headingAtx",resolve:Gn,tokenize:Xn};function Gn(e,n){let t=e.length-2,r=3,a,i;return e[r][1].type===u.whitespace&&(r+=2),t-2>r&&e[t][1].type===u.whitespace&&(t-=2),e[t][1].type===u.atxHeadingSequence&&(r===t-1||t-4>r&&e[t-2][1].type===u.whitespace)&&(t-=r+1===t?2:4),t>r&&(a={type:u.atxHeadingText,start:e[r][1].start,end:e[t][1].end},i={type:u.chunkText,start:e[r][1].start,end:e[t][1].end,contentType:T.contentTypeText},se(e,r,t-r+1,[["enter",a,n],["enter",i,n],["exit",i,n],["exit",a,n]])),e}function Xn(e,n,t){let r=0;return a;function a(c){return e.enter(u.atxHeading),i(c)}function i(c){return m(c===o.numberSign,"expected `#`"),e.enter(u.atxHeadingSequence),s(c)}function s(c){return c===o.numberSign&&r++<T.atxHeadingOpeningFenceSizeMax?(e.consume(c),s):c===o.eof||Z(c)?(e.exit(u.atxHeadingSequence),l(c)):t(c)}function l(c){return c===o.numberSign?(e.enter(u.atxHeadingSequence),g(c)):c===o.eof||E(c)?(e.exit(u.atxHeading),n(c)):_(c)?H(e,l,u.whitespace)(c):(e.enter(u.atxHeadingText),h(c))}function g(c){return c===o.numberSign?(e.consume(c),g):(e.exit(u.atxHeadingSequence),l(c))}function h(c){return c===o.eof||c===o.numberSign||Z(c)?(e.exit(u.atxHeadingText),l(c)):(e.consume(c),h)}}const Zn=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],mt=["pre","script","style","textarea"],Jn={concrete:!0,name:"htmlFlow",resolveTo:er,tokenize:tr},Kn={partial:!0,tokenize:rr},$n={partial:!0,tokenize:nr};function er(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type===u.htmlFlow););return n>1&&e[n-2][1].type===u.linePrefix&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function tr(e,n,t){const r=this;let a,i,s,l,g;return h;function h(d){return c(d)}function c(d){return m(d===o.lessThan,"expected `<`"),e.enter(u.htmlFlow),e.enter(u.htmlFlowData),e.consume(d),k}function k(d){return d===o.exclamationMark?(e.consume(d),x):d===o.slash?(e.consume(d),i=!0,F):d===o.questionMark?(e.consume(d),a=T.htmlInstruction,r.interrupt?n:f):oe(d)?(m(d!==null),e.consume(d),s=String.fromCharCode(d),L):t(d)}function x(d){return d===o.dash?(e.consume(d),a=T.htmlComment,p):d===o.leftSquareBracket?(e.consume(d),a=T.htmlCdata,l=0,B):oe(d)?(e.consume(d),a=T.htmlDeclaration,r.interrupt?n:f):t(d)}function p(d){return d===o.dash?(e.consume(d),r.interrupt?n:f):t(d)}function B(d){const K=T.cdataOpeningString;return d===K.charCodeAt(l++)?(e.consume(d),l===K.length?r.interrupt?n:O:B):t(d)}function F(d){return oe(d)?(m(d!==null),e.consume(d),s=String.fromCharCode(d),L):t(d)}function L(d){if(d===o.eof||d===o.slash||d===o.greaterThan||Z(d)){const K=d===o.slash,ge=s.toLowerCase();return!K&&!i&&mt.includes(ge)?(a=T.htmlRaw,r.interrupt?n(d):O(d)):Zn.includes(s.toLowerCase())?(a=T.htmlBasic,K?(e.consume(d),w):r.interrupt?n(d):O(d)):(a=T.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):i?D(d):C(d))}return d===o.dash||ie(d)?(e.consume(d),s+=String.fromCharCode(d),L):t(d)}function w(d){return d===o.greaterThan?(e.consume(d),r.interrupt?n:O):t(d)}function D(d){return _(d)?(e.consume(d),D):j(d)}function C(d){return d===o.slash?(e.consume(d),j):d===o.colon||d===o.underscore||oe(d)?(e.consume(d),V):_(d)?(e.consume(d),C):j(d)}function V(d){return d===o.dash||d===o.dot||d===o.colon||d===o.underscore||ie(d)?(e.consume(d),V):Q(d)}function Q(d){return d===o.equalsTo?(e.consume(d),y):_(d)?(e.consume(d),Q):C(d)}function y(d){return d===o.eof||d===o.lessThan||d===o.equalsTo||d===o.greaterThan||d===o.graveAccent?t(d):d===o.quotationMark||d===o.apostrophe?(e.consume(d),g=d,N):_(d)?(e.consume(d),y):v(d)}function N(d){return d===g?(e.consume(d),g=null,q):d===o.eof||E(d)?t(d):(e.consume(d),N)}function v(d){return d===o.eof||d===o.quotationMark||d===o.apostrophe||d===o.slash||d===o.lessThan||d===o.equalsTo||d===o.greaterThan||d===o.graveAccent||Z(d)?Q(d):(e.consume(d),v)}function q(d){return d===o.slash||d===o.greaterThan||_(d)?C(d):t(d)}function j(d){return d===o.greaterThan?(e.consume(d),ee):t(d)}function ee(d){return d===o.eof||E(d)?O(d):_(d)?(e.consume(d),ee):t(d)}function O(d){return d===o.dash&&a===T.htmlComment?(e.consume(d),U):d===o.lessThan&&a===T.htmlRaw?(e.consume(d),W):d===o.greaterThan&&a===T.htmlDeclaration?(e.consume(d),ne):d===o.questionMark&&a===T.htmlInstruction?(e.consume(d),f):d===o.rightSquareBracket&&a===T.htmlCdata?(e.consume(d),ae):E(d)&&(a===T.htmlBasic||a===T.htmlComplete)?(e.exit(u.htmlFlowData),e.check(Kn,le,I)(d)):d===o.eof||E(d)?(e.exit(u.htmlFlowData),I(d)):(e.consume(d),O)}function I(d){return e.check($n,M,le)(d)}function M(d){return m(E(d)),e.enter(u.lineEnding),e.consume(d),e.exit(u.lineEnding),A}function A(d){return d===o.eof||E(d)?I(d):(e.enter(u.htmlFlowData),O(d))}function U(d){return d===o.dash?(e.consume(d),f):O(d)}function W(d){return d===o.slash?(e.consume(d),s="",te):O(d)}function te(d){if(d===o.greaterThan){const K=s.toLowerCase();return mt.includes(K)?(e.consume(d),ne):O(d)}return oe(d)&&s.length<T.htmlRawSizeMax?(m(d!==null),e.consume(d),s+=String.fromCharCode(d),te):O(d)}function ae(d){return d===o.rightSquareBracket?(e.consume(d),f):O(d)}function f(d){return d===o.greaterThan?(e.consume(d),ne):d===o.dash&&a===T.htmlComment?(e.consume(d),f):O(d)}function ne(d){return d===o.eof||E(d)?(e.exit(u.htmlFlowData),le(d)):(e.consume(d),ne)}function le(d){return e.exit(u.htmlFlow),n(d)}}function nr(e,n,t){const r=this;return a;function a(s){return E(s)?(e.enter(u.lineEnding),e.consume(s),e.exit(u.lineEnding),i):t(s)}function i(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}function rr(e,n,t){return r;function r(a){return m(E(a),"expected a line ending"),e.enter(u.lineEnding),e.consume(a),e.exit(u.lineEnding),e.attempt(_e,n,t)}}const ir={name:"htmlText",tokenize:ar};function ar(e,n,t){const r=this;let a,i,s;return l;function l(f){return m(f===o.lessThan,"expected `<`"),e.enter(u.htmlText),e.enter(u.htmlTextData),e.consume(f),g}function g(f){return f===o.exclamationMark?(e.consume(f),h):f===o.slash?(e.consume(f),Q):f===o.questionMark?(e.consume(f),C):oe(f)?(e.consume(f),v):t(f)}function h(f){return f===o.dash?(e.consume(f),c):f===o.leftSquareBracket?(e.consume(f),i=0,B):oe(f)?(e.consume(f),D):t(f)}function c(f){return f===o.dash?(e.consume(f),p):t(f)}function k(f){return f===o.eof?t(f):f===o.dash?(e.consume(f),x):E(f)?(s=k,W(f)):(e.consume(f),k)}function x(f){return f===o.dash?(e.consume(f),p):k(f)}function p(f){return f===o.greaterThan?U(f):f===o.dash?x(f):k(f)}function B(f){const ne=T.cdataOpeningString;return f===ne.charCodeAt(i++)?(e.consume(f),i===ne.length?F:B):t(f)}function F(f){return f===o.eof?t(f):f===o.rightSquareBracket?(e.consume(f),L):E(f)?(s=F,W(f)):(e.consume(f),F)}function L(f){return f===o.rightSquareBracket?(e.consume(f),w):F(f)}function w(f){return f===o.greaterThan?U(f):f===o.rightSquareBracket?(e.consume(f),w):F(f)}function D(f){return f===o.eof||f===o.greaterThan?U(f):E(f)?(s=D,W(f)):(e.consume(f),D)}function C(f){return f===o.eof?t(f):f===o.questionMark?(e.consume(f),V):E(f)?(s=C,W(f)):(e.consume(f),C)}function V(f){return f===o.greaterThan?U(f):C(f)}function Q(f){return oe(f)?(e.consume(f),y):t(f)}function y(f){return f===o.dash||ie(f)?(e.consume(f),y):N(f)}function N(f){return E(f)?(s=N,W(f)):_(f)?(e.consume(f),N):U(f)}function v(f){return f===o.dash||ie(f)?(e.consume(f),v):f===o.slash||f===o.greaterThan||Z(f)?q(f):t(f)}function q(f){return f===o.slash?(e.consume(f),U):f===o.colon||f===o.underscore||oe(f)?(e.consume(f),j):E(f)?(s=q,W(f)):_(f)?(e.consume(f),q):U(f)}function j(f){return f===o.dash||f===o.dot||f===o.colon||f===o.underscore||ie(f)?(e.consume(f),j):ee(f)}function ee(f){return f===o.equalsTo?(e.consume(f),O):E(f)?(s=ee,W(f)):_(f)?(e.consume(f),ee):q(f)}function O(f){return f===o.eof||f===o.lessThan||f===o.equalsTo||f===o.greaterThan||f===o.graveAccent?t(f):f===o.quotationMark||f===o.apostrophe?(e.consume(f),a=f,I):E(f)?(s=O,W(f)):_(f)?(e.consume(f),O):(e.consume(f),M)}function I(f){return f===a?(e.consume(f),a=void 0,A):f===o.eof?t(f):E(f)?(s=I,W(f)):(e.consume(f),I)}function M(f){return f===o.eof||f===o.quotationMark||f===o.apostrophe||f===o.lessThan||f===o.equalsTo||f===o.graveAccent?t(f):f===o.slash||f===o.greaterThan||Z(f)?q(f):(e.consume(f),M)}function A(f){return f===o.slash||f===o.greaterThan||Z(f)?q(f):t(f)}function U(f){return f===o.greaterThan?(e.consume(f),e.exit(u.htmlTextData),e.exit(u.htmlText),n):t(f)}function W(f){return m(s,"expected return state"),m(E(f),"expected eol"),e.exit(u.htmlTextData),e.enter(u.lineEnding),e.consume(f),e.exit(u.lineEnding),te}function te(f){return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),_(f)?H(e,ae,u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(f):ae(f)}function ae(f){return e.enter(u.htmlTextData),s(f)}}const tt={name:"labelEnd",resolveAll:lr,resolveTo:cr,tokenize:hr},ur={tokenize:pr},or={tokenize:fr},sr={tokenize:dr};function lr(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type===u.labelImage||r.type===u.labelLink||r.type===u.labelEnd){const a=r.type===u.labelImage?4:2;r.type=u.data,n+=a}}return e.length!==t.length&&se(e,0,e.length,t),e}function cr(e,n){let t=e.length,r=0,a,i,s,l;for(;t--;)if(a=e[t][1],i){if(a.type===u.link||a.type===u.labelLink&&a._inactive)break;e[t][0]==="enter"&&a.type===u.labelLink&&(a._inactive=!0)}else if(s){if(e[t][0]==="enter"&&(a.type===u.labelImage||a.type===u.labelLink)&&!a._balanced&&(i=t,a.type!==u.labelLink)){r=2;break}}else a.type===u.labelEnd&&(s=t);m(i!==void 0,"`open` is supposed to be found"),m(s!==void 0,"`close` is supposed to be found");const g={type:e[i][1].type===u.labelLink?u.link:u.image,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},h={type:u.label,start:{...e[i][1].start},end:{...e[s][1].end}},c={type:u.labelText,start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",g,n],["enter",h,n]],l=re(l,e.slice(i+1,i+r+3)),l=re(l,[["enter",c,n]]),m(n.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),l=re(l,et(n.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),n)),l=re(l,[["exit",c,n],e[s-2],e[s-1],["exit",h,n]]),l=re(l,e.slice(s+1)),l=re(l,[["exit",g,n]]),se(e,i,e.length,l),e}function hr(e,n,t){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type===u.labelImage||r.events[a][1].type===u.labelLink)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(x){return m(x===o.rightSquareBracket,"expected `]`"),i?i._inactive?k(x):(s=r.parser.defined.includes(we(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter(u.labelEnd),e.enter(u.labelMarker),e.consume(x),e.exit(u.labelMarker),e.exit(u.labelEnd),g):t(x)}function g(x){return x===o.leftParenthesis?e.attempt(ur,c,s?c:k)(x):x===o.leftSquareBracket?e.attempt(or,c,s?h:k)(x):s?c(x):k(x)}function h(x){return e.attempt(sr,c,k)(x)}function c(x){return n(x)}function k(x){return i._balanced=!0,t(x)}}function pr(e,n,t){return r;function r(k){return m(k===o.leftParenthesis,"expected left paren"),e.enter(u.resource),e.enter(u.resourceMarker),e.consume(k),e.exit(u.resourceMarker),a}function a(k){return Z(k)?Ce(e,i)(k):i(k)}function i(k){return k===o.rightParenthesis?c(k):_t(e,s,l,u.resourceDestination,u.resourceDestinationLiteral,u.resourceDestinationLiteralMarker,u.resourceDestinationRaw,u.resourceDestinationString,T.linkResourceDestinationBalanceMax)(k)}function s(k){return Z(k)?Ce(e,g)(k):c(k)}function l(k){return t(k)}function g(k){return k===o.quotationMark||k===o.apostrophe||k===o.leftParenthesis?qt(e,h,t,u.resourceTitle,u.resourceTitleMarker,u.resourceTitleString)(k):c(k)}function h(k){return Z(k)?Ce(e,c)(k):c(k)}function c(k){return k===o.rightParenthesis?(e.enter(u.resourceMarker),e.consume(k),e.exit(u.resourceMarker),e.exit(u.resource),n):t(k)}}function fr(e,n,t){const r=this;return a;function a(l){return m(l===o.leftSquareBracket,"expected left bracket"),Lt.call(r,e,i,s,u.reference,u.referenceMarker,u.referenceString)(l)}function i(l){return r.parser.defined.includes(we(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(l):t(l)}function s(l){return t(l)}}function dr(e,n,t){return r;function r(i){return m(i===o.leftSquareBracket,"expected left bracket"),e.enter(u.reference),e.enter(u.referenceMarker),e.consume(i),e.exit(u.referenceMarker),a}function a(i){return i===o.rightSquareBracket?(e.enter(u.referenceMarker),e.consume(i),e.exit(u.referenceMarker),e.exit(u.reference),n):t(i)}}const mr={name:"labelStartImage",resolveAll:tt.resolveAll,tokenize:gr};function gr(e,n,t){const r=this;return a;function a(l){return m(l===o.exclamationMark,"expected `!`"),e.enter(u.labelImage),e.enter(u.labelImageMarker),e.consume(l),e.exit(u.labelImageMarker),i}function i(l){return l===o.leftSquareBracket?(e.enter(u.labelMarker),e.consume(l),e.exit(u.labelMarker),e.exit(u.labelImage),s):t(l)}function s(l){return l===o.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const xr={name:"labelStartLink",resolveAll:tt.resolveAll,tokenize:kr};function kr(e,n,t){const r=this;return a;function a(s){return m(s===o.leftSquareBracket,"expected `[`"),e.enter(u.labelLink),e.enter(u.labelMarker),e.consume(s),e.exit(u.labelMarker),e.exit(u.labelLink),i}function i(s){return s===o.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const Oe={name:"lineEnding",tokenize:br};function br(e,n){return t;function t(r){return m(E(r),"expected eol"),e.enter(u.lineEnding),e.consume(r),e.exit(u.lineEnding),H(e,n,u.linePrefix)}}const Pe={name:"thematicBreak",tokenize:Sr};function Sr(e,n,t){let r=0,a;return i;function i(h){return e.enter(u.thematicBreak),s(h)}function s(h){return m(h===o.asterisk||h===o.dash||h===o.underscore,"expected `*`, `-`, or `_`"),a=h,l(h)}function l(h){return h===a?(e.enter(u.thematicBreakSequence),g(h)):r>=T.thematicBreakMarkerCountMin&&(h===o.eof||E(h))?(e.exit(u.thematicBreak),n(h)):t(h)}function g(h){return h===a?(e.consume(h),r++,g):(e.exit(u.thematicBreakSequence),_(h)?H(e,l,u.whitespace)(h):l(h))}}const X={continuation:{tokenize:Ir},exit:Er,name:"list",tokenize:Tr},yr={partial:!0,tokenize:Cr},wr={partial:!0,tokenize:zr};function Tr(e,n,t){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type===u.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(p){m(r.containerState,"expected state");const B=r.containerState.type||(p===o.asterisk||p===o.plusSign||p===o.dash?u.listUnordered:u.listOrdered);if(B===u.listUnordered?!r.containerState.marker||p===r.containerState.marker:Ge(p)){if(r.containerState.type||(r.containerState.type=B,e.enter(B,{_container:!0})),B===u.listUnordered)return e.enter(u.listItemPrefix),p===o.asterisk||p===o.dash?e.check(Pe,t,h)(p):h(p);if(!r.interrupt||p===o.digit1)return e.enter(u.listItemPrefix),e.enter(u.listItemValue),g(p)}return t(p)}function g(p){return m(r.containerState,"expected state"),Ge(p)&&++s<T.listItemValueSizeMax?(e.consume(p),g):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===o.rightParenthesis||p===o.dot)?(e.exit(u.listItemValue),h(p)):t(p)}function h(p){return m(r.containerState,"expected state"),m(p!==o.eof,"eof (`null`) is not a marker"),e.enter(u.listItemMarker),e.consume(p),e.exit(u.listItemMarker),r.containerState.marker=r.containerState.marker||p,e.check(_e,r.interrupt?t:c,e.attempt(yr,x,k))}function c(p){return m(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,i++,x(p)}function k(p){return _(p)?(e.enter(u.listItemPrefixWhitespace),e.consume(p),e.exit(u.listItemPrefixWhitespace),x):t(p)}function x(p){return m(r.containerState,"expected state"),r.containerState.size=i+r.sliceSerialize(e.exit(u.listItemPrefix),!0).length,n(p)}}function Ir(e,n,t){const r=this;return m(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(_e,a,i);function a(l){return m(r.containerState,"expected state"),m(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,H(e,n,u.listItemIndent,r.containerState.size+1)(l)}function i(l){return m(r.containerState,"expected state"),r.containerState.furtherBlankLines||!_(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wr,n,s)(l))}function s(l){return m(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,e.attempt(X,n,t),u.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize)(l)}}function zr(e,n,t){const r=this;return m(r.containerState,"expected state"),m(typeof r.containerState.size=="number","expected size"),H(e,a,u.listItemIndent,r.containerState.size+1);function a(i){m(r.containerState,"expected state");const s=r.events[r.events.length-1];return s&&s[1].type===u.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(i):t(i)}}function Er(e){m(this.containerState,"expected state"),m(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function Cr(e,n,t){const r=this;return m(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),H(e,a,u.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:T.tabSize+1);function a(i){const s=r.events[r.events.length-1];return!_(i)&&s&&s[1].type===u.listItemPrefixWhitespace?n(i):t(i)}}const gt={name:"setextUnderline",resolveTo:Fr,tokenize:Mr};function Fr(e,n){let t=e.length,r,a,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type===u.content){r=t;break}e[t][1].type===u.paragraph&&(a=t)}else e[t][1].type===u.content&&e.splice(t,1),!i&&e[t][1].type===u.definition&&(i=t);m(a!==void 0,"expected a `text` index to be found"),m(r!==void 0,"expected a `text` index to be found"),m(e[r][2]===n,"enter context should be same"),m(e[e.length-1][2]===n,"enter context should be same");const s={type:u.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=u.setextHeadingText,i?(e.splice(a,0,["enter",s,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,n]),e}function Mr(e,n,t){const r=this;let a;return i;function i(h){let c=r.events.length,k;for(m(h===o.dash||h===o.equalsTo,"expected `=` or `-`");c--;)if(r.events[c][1].type!==u.lineEnding&&r.events[c][1].type!==u.linePrefix&&r.events[c][1].type!==u.content){k=r.events[c][1].type===u.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||k)?(e.enter(u.setextHeadingLine),a=h,s(h)):t(h)}function s(h){return e.enter(u.setextHeadingLineSequence),l(h)}function l(h){return h===a?(e.consume(h),l):(e.exit(u.setextHeadingLineSequence),_(h)?H(e,g,u.lineSuffix)(h):g(h))}function g(h){return h===o.eof||E(h)?(e.exit(u.setextHeadingLine),n(h)):t(h)}}const Ar={tokenize:Br};function Br(e){const n=this,t=e.attempt(_e,r,e.attempt(this.parser.constructs.flowInitial,a,H(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Rn,a)),u.linePrefix)));return t;function r(i){if(m(i===o.eof||E(i),"expected eol or eof"),i===o.eof){e.consume(i);return}return e.enter(u.lineEndingBlank),e.consume(i),e.exit(u.lineEndingBlank),n.currentConstruct=void 0,t}function a(i){if(m(i===o.eof||E(i),"expected eol or eof"),i===o.eof){e.consume(i);return}return e.enter(u.lineEnding),e.consume(i),e.exit(u.lineEnding),n.currentConstruct=void 0,t}}const Pr={resolveAll:Dt()},_r=Rt("string"),Lr=Rt("text");function Rt(e){return{resolveAll:Dt(e==="text"?qr:void 0),tokenize:n};function n(t){const r=this,a=this.parser.constructs[e],i=t.attempt(a,s,l);return s;function s(c){return h(c)?i(c):l(c)}function l(c){if(c===o.eof){t.consume(c);return}return t.enter(u.data),t.consume(c),g}function g(c){return h(c)?(t.exit(u.data),i(c)):(t.consume(c),g)}function h(c){if(c===o.eof)return!0;const k=a[c];let x=-1;if(k)for(m(Array.isArray(k),"expected `disable.null` to be populated");++x<k.length;){const p=k[x];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Dt(e){return n;function n(t,r){let a=-1,i;for(;++a<=t.length;)i===void 0?t[a]&&t[a][1].type===u.data&&(i=a,a++):(!t[a]||t[a][1].type!==u.data)&&(a!==i+2&&(t[i][1].end=t[a-1][1].end,t.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(t,r):t}}function qr(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type===u.lineEnding)&&e[t-1][1].type===u.data){const r=e[t-1][1],a=n.sliceStream(r);let i=a.length,s=-1,l=0,g;for(;i--;){const h=a[i];if(typeof h=="string"){for(s=h.length;h.charCodeAt(s-1)===o.space;)l++,s--;if(s)break;s=-1}else if(h===o.horizontalTab)g=!0,l++;else if(h!==o.virtualSpace){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(l=0),l){const h={type:t===e.length||g||l<T.hardBreakPrefixSizeMin?u.lineSuffix:u.hardBreakTrailing,start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(t,0,["enter",h,n],["exit",h,n]),t+=2)}t++}return e}const Rr={[o.asterisk]:X,[o.plusSign]:X,[o.dash]:X,[o.digit0]:X,[o.digit1]:X,[o.digit2]:X,[o.digit3]:X,[o.digit4]:X,[o.digit5]:X,[o.digit6]:X,[o.digit7]:X,[o.digit8]:X,[o.digit9]:X,[o.greaterThan]:Ft},Dr={[o.leftSquareBracket]:Vn},Or={[o.horizontalTab]:De,[o.virtualSpace]:De,[o.space]:De},Nr={[o.numberSign]:Yn,[o.asterisk]:Pe,[o.dash]:[gt,Pe],[o.lessThan]:Jn,[o.equalsTo]:gt,[o.underscore]:Pe,[o.graveAccent]:dt,[o.tilde]:dt},Hr={[o.ampersand]:At,[o.backslash]:Mt},Vr={[o.carriageReturn]:Oe,[o.lineFeed]:Oe,[o.carriageReturnLineFeed]:Oe,[o.exclamationMark]:mr,[o.ampersand]:At,[o.asterisk]:Xe,[o.lessThan]:[kn,ir],[o.leftSquareBracket]:xr,[o.backslash]:[vn,Mt],[o.rightSquareBracket]:tt,[o.underscore]:Xe,[o.graveAccent]:Bn},jr={null:[Xe,Pr]},Qr={null:[o.asterisk,o.underscore]},Ur={null:[]},vr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Qr,contentInitial:Dr,disable:Ur,document:Rr,flow:Nr,flowInitial:Or,insideSpan:jr,string:Hr,text:Vr},Symbol.toStringTag,{value:"Module"})),be=Xt("micromark");function Wr(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const a={},i=[];let s=[],l=[],g=!0;const h={attempt:q(N),check:q(v),consume:V,enter:Q,exit:y,interrupt:q(v,{interrupt:!0})},c={code:o.eof,containerState:{},defineSkip:w,events:[],now:L,parser:e,previous:o.eof,sliceSerialize:B,sliceStream:F,write:p};let k=n.tokenize.call(c,h),x;return n.resolveAll&&i.push(n),c;function p(I){return s=re(s,I),D(),s[s.length-1]!==o.eof?[]:(j(n,0),c.events=et(i,c.events,c),c.events)}function B(I,M){return Gr(F(I),M)}function F(I){return Yr(s,I)}function L(){const{_bufferIndex:I,_index:M,line:A,column:U,offset:W}=r;return{_bufferIndex:I,_index:M,line:A,column:U,offset:W}}function w(I){a[I.line]=I.column,O(),be("position: define skip: `%j`",r)}function D(){let I;for(;r._index<s.length;){const M=s[r._index];if(typeof M=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<M.length;)C(M.charCodeAt(r._bufferIndex));else C(M)}}function C(I){m(g===!0,"expected character to be consumed"),g=void 0,be("main: passing `%s` to %s",I,k&&k.name),x=I,m(typeof k=="function","expected state"),k=k(I)}function V(I){m(I===x,"expected given code to equal expected code"),be("consume: `%s`",I),m(g===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),m(I===null?c.events.length===0||c.events[c.events.length-1][0]==="exit":c.events[c.events.length-1][0]==="enter","expected last token to be open"),E(I)?(r.line++,r.column=1,r.offset+=I===o.carriageReturnLineFeed?2:1,O(),be("position: after eol: `%j`",r)):I!==o.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=I,g=!0}function Q(I,M){const A=M||{};return A.type=I,A.start=L(),m(typeof I=="string","expected string type"),m(I.length>0,"expected non-empty string"),be("enter: `%s`",I),c.events.push(["enter",A,c]),l.push(A),A}function y(I){m(typeof I=="string","expected string type"),m(I.length>0,"expected non-empty string");const M=l.pop();return m(M,"cannot close w/o open tokens"),M.end=L(),m(I===M.type,"expected exit token to match current token"),m(!(M.start._index===M.end._index&&M.start._bufferIndex===M.end._bufferIndex),"expected non-empty token (`"+I+"`)"),be("exit: `%s`",M.type),c.events.push(["exit",M,c]),M}function N(I,M){j(I,M.from)}function v(I,M){M.restore()}function q(I,M){return A;function A(U,W,te){let ae,f,ne,le;return Array.isArray(U)?K(U):"tokenize"in U?K([U]):d(U);function d(Y){return Te;function Te(ce){const xe=ce!==null&&Y[ce],Se=ce!==null&&Y.null,qe=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return K(qe)(ce)}}function K(Y){return ae=Y,f=0,Y.length===0?(m(te,"expected `bogusState` to be given"),te):ge(Y[f])}function ge(Y){return Te;function Te(ce){return le=ee(),ne=Y,Y.partial||(c.currentConstruct=Y),m(c.parser.constructs.disable.null,"expected `disable.null` to be populated"),Y.name&&c.parser.constructs.disable.null.includes(Y.name)?Ae(ce):Y.tokenize.call(M?Object.assign(Object.create(c),M):c,h,Le,Ae)(ce)}}function Le(Y){return m(Y===x,"expected code"),g=!0,I(ne,le),W}function Ae(Y){return m(Y===x,"expected code"),g=!0,le.restore(),++f<ae.length?ge(ae[f]):te}}}function j(I,M){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&se(c.events,M,c.events.length-M,I.resolve(c.events.slice(M),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c)),m(I.partial||c.events.length===0||c.events[c.events.length-1][0]==="exit","expected last token to end")}function ee(){const I=L(),M=c.previous,A=c.currentConstruct,U=c.events.length,W=Array.from(l);return{from:U,restore:te};function te(){r=I,c.previous=M,c.currentConstruct=A,c.events.length=U,l=W,O(),be("position: restore: `%j`",r)}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Yr(e,n){const t=n.start._index,r=n.start._bufferIndex,a=n.end._index,i=n.end._bufferIndex;let s;if(t===a)m(i>-1,"expected non-negative end buffer index"),m(r>-1,"expected non-negative start buffer index"),s=[e[t].slice(r,i)];else{if(s=e.slice(t,a),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):(m(r===0,"expected `startBufferIndex` to be `0`"),s.shift())}i>0&&s.push(e[a].slice(0,i))}return s}function Gr(e,n){let t=-1;const r=[];let a;for(;++t<e.length;){const i=e[t];let s;if(typeof i=="string")s=i;else switch(i){case o.carriageReturn:{s=fe.cr;break}case o.lineFeed:{s=fe.lf;break}case o.carriageReturnLineFeed:{s=fe.cr+fe.lf;break}case o.horizontalTab:{s=n?fe.space:fe.ht;break}case o.virtualSpace:{if(!n&&a)continue;s=fe.space;break}default:m(typeof i=="number","expected number"),s=String.fromCharCode(i)}a=i===o.horizontalTab,r.push(s)}return r.join("")}function Xr(e){const r={constructs:nn([vr,...(e||{}).extensions||[]]),content:a(hn),defined:[],document:a(fn),flow:a(Ar),lazy:{},string:a(_r),text:a(Lr)};return r;function a(i){return s;function s(l){return Wr(r,i,l)}}}function Zr(e){for(;!Pt(e););return e}const xt=/[\0\t\n\r]/g;function Jr(){let e=1,n="",t=!0,r;return a;function a(i,s,l){const g=[];let h,c,k,x,p;for(i=n+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),k=0,n="",t&&(i.charCodeAt(0)===o.byteOrderMarker&&k++,t=void 0);k<i.length;){if(xt.lastIndex=k,h=xt.exec(i),x=h&&h.index!==void 0?h.index:i.length,p=i.charCodeAt(x),!h){n=i.slice(k);break}if(p===o.lf&&k===x&&r)g.push(o.carriageReturnLineFeed),r=void 0;else switch(r&&(g.push(o.carriageReturn),r=void 0),k<x&&(g.push(i.slice(k,x)),e+=x-k),p){case o.nul:{g.push(o.replacementCharacter),e++;break}case o.ht:{for(c=Math.ceil(e/T.tabSize)*T.tabSize,g.push(o.horizontalTab);e++<c;)g.push(o.virtualSpace);break}case o.lf:{g.push(o.lineFeed),e=1;break}default:r=!0,e=1}k=x+1}return l&&(r&&g.push(o.carriageReturn),n&&g.push(n),g.push(o.eof)),g}}const Kr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $r(e){return e.replace(Kr,ei)}function ei(e,n,t){if(n)return n;if(t.charCodeAt(0)===o.numberSign){const a=t.charCodeAt(1),i=a===o.lowercaseX||a===o.uppercaseX;return Ct(t.slice(i?2:1),i?T.numericBaseHexadecimal:T.numericBaseDecimal)}return $e(t)||e}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kt(e.position):"start"in e||"end"in e?kt(e):"line"in e||"column"in e?Ze(e):""}function Ze(e){return bt(e&&e.line)+":"+bt(e&&e.column)}function kt(e){return Ze(e&&e.start)+"-"+Ze(e&&e.end)}function bt(e){return e&&typeof e=="number"?e:1}const Ot={}.hasOwnProperty;function ti(e,n,t){return typeof n!="string"&&(t=n,n=void 0),ni(t)(Zr(Xr(t).document().write(Jr()(e,n,!0))))}function ni(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ut),autolinkProtocol:q,autolinkEmail:q,atxHeading:i(rt),blockQuote:i(ce),characterEscape:q,characterReference:q,codeFenced:i(xe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(xe,s),codeText:i(Se,s),codeTextData:q,data:q,codeFlowValue:q,definition:i(qe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Ht),hardBreakEscape:i(it),hardBreakTrailing:i(it),htmlFlow:i(at,s),htmlFlowData:q,htmlText:i(at,s),htmlTextData:q,image:i(Vt),label:s,link:i(ut),listItem:i(jt),listItemValue:x,listOrdered:i(ot,k),listUnordered:i(ot),paragraph:i(Qt),reference:d,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(rt),strong:i(Ut),thematicBreak:i(Wt)},exit:{atxHeading:g(),atxHeadingSequence:Q,autolink:g(),autolinkEmail:Te,autolinkProtocol:Y,blockQuote:g(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Le,characterReference:Ae,codeFenced:g(L),codeFencedFence:F,codeFencedFenceInfo:p,codeFencedFenceMeta:B,codeFlowValue:j,codeIndented:g(w),codeText:g(A),codeTextData:j,data:j,definition:g(),definitionDestinationString:V,definitionLabelString:D,definitionTitleString:C,emphasis:g(),hardBreakEscape:g(O),hardBreakTrailing:g(O),htmlFlow:g(I),htmlFlowData:j,htmlText:g(M),htmlTextData:j,image:g(W),label:ae,labelText:te,lineEnding:ee,link:g(U),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:K,resourceDestinationString:f,resourceTitleString:ne,resource:le,setextHeading:g(v),setextHeadingLineSequence:N,setextHeadingText:y,strong:g(),thematicBreak:g()}};Nt(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let S={type:"root",children:[]};const z={stack:[S],tokenStack:[],config:n,enter:l,exit:h,buffer:s,resume:c,data:t},P=[];let R=-1;for(;++R<b.length;)if(b[R][1].type===u.listOrdered||b[R][1].type===u.listUnordered)if(b[R][0]==="enter")P.push(R);else{const G=P.pop();m(typeof G=="number","expected list ot be open"),R=a(b,G,R)}for(R=-1;++R<b.length;){const G=n[b[R][0]];Ot.call(G,b[R][1].type)&&G[b[R][1].type].call(Object.assign({sliceSerialize:b[R][2].sliceSerialize},z),b[R][1])}if(z.tokenStack.length>0){const G=z.tokenStack[z.tokenStack.length-1];(G[1]||St).call(z,void 0,G[0])}for(S.position={start:de(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:de(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},R=-1;++R<n.transforms.length;)S=n.transforms[R](S)||S;return S}function a(b,S,z){let P=S-1,R=-1,G=!1,ke,he,Ie,ze;for(;++P<=z;){const $=b[P];switch($[1].type){case u.listUnordered:case u.listOrdered:case u.blockQuote:{$[0]==="enter"?R++:R--,ze=void 0;break}case u.lineEndingBlank:{$[0]==="enter"&&(ke&&!ze&&!R&&!Ie&&(Ie=P),ze=void 0);break}case u.linePrefix:case u.listItemValue:case u.listItemMarker:case u.listItemPrefix:case u.listItemPrefixWhitespace:break;default:ze=void 0}if(!R&&$[0]==="enter"&&$[1].type===u.listItemPrefix||R===-1&&$[0]==="exit"&&($[1].type===u.listUnordered||$[1].type===u.listOrdered)){if(ke){let ye=P;for(he=void 0;ye--;){const pe=b[ye];if(pe[1].type===u.lineEnding||pe[1].type===u.lineEndingBlank){if(pe[0]==="exit")continue;he&&(b[he][1].type=u.lineEndingBlank,G=!0),pe[1].type=u.lineEnding,he=ye}else if(!(pe[1].type===u.linePrefix||pe[1].type===u.blockQuotePrefix||pe[1].type===u.blockQuotePrefixWhitespace||pe[1].type===u.blockQuoteMarker||pe[1].type===u.listItemIndent))break}Ie&&(!he||Ie<he)&&(ke._spread=!0),ke.end=Object.assign({},he?b[he][1].start:$[1].end),b.splice(he||P,0,["exit",ke,$[2]]),P++,z++}if($[1].type===u.listItemPrefix){const ye={type:"listItem",_spread:!1,start:Object.assign({},$[1].start),end:void 0};ke=ye,b.splice(P,0,["enter",ye,$[2]]),P++,z++,Ie=void 0,ze=!0}}}return b[S][1]._spread=G,z}function i(b,S){return z;function z(P){l.call(this,b(P),P),S&&S.call(this,P)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(b,S,z){const P=this.stack[this.stack.length-1];m(P,"expected `parent`"),m("children"in P,"expected `parent`"),P.children.push(b),this.stack.push(b),this.tokenStack.push([S,z||void 0]),b.position={start:de(S.start),end:void 0}}function g(b){return S;function S(z){b&&b.call(this,z),h.call(this,z)}}function h(b,S){const z=this.stack.pop();m(z,"expected `node`");const P=this.tokenStack.pop();if(P)P[0].type!==b.type&&(S?S.call(this,b,P[0]):(P[1]||St).call(this,b,P[0]));else throw new Error("Cannot close `"+b.type+"` ("+Fe({start:b.start,end:b.end})+"): it’s not open");m(z.type!=="fragment","unexpected fragment `exit`ed"),m(z.position,"expected `position` to be defined"),z.position.end=de(b.end)}function c(){return en(this.stack.pop())}function k(){this.data.expectingFirstListItemValue=!0}function x(b){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];m(S,"expected nodes on stack"),m(S.type==="list","expected list on stack"),S.start=Number.parseInt(this.sliceSerialize(b),T.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="code","expected code on stack"),S.lang=b}function B(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="code","expected code on stack"),S.meta=b}function F(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="code","expected code on stack"),S.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="code","expected code on stack"),S.value=b.replace(/(\r?\n|\r)$/g,"")}function D(b){const S=this.resume(),z=this.stack[this.stack.length-1];m(z,"expected node on stack"),m(z.type==="definition","expected definition on stack"),z.label=S,z.identifier=we(this.sliceSerialize(b)).toLowerCase()}function C(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="definition","expected definition on stack"),S.title=b}function V(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="definition","expected definition on stack"),S.url=b}function Q(b){const S=this.stack[this.stack.length-1];if(m(S,"expected node on stack"),m(S.type==="heading","expected heading on stack"),!S.depth){const z=this.sliceSerialize(b).length;m(z===1||z===2||z===3||z===4||z===5||z===6,"expected `depth` between `1` and `6`"),S.depth=z}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function N(b){const S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="heading","expected heading on stack"),S.depth=this.sliceSerialize(b).codePointAt(0)===o.equalsTo?1:2}function v(){this.data.setextHeadingSlurpLineEnding=void 0}function q(b){const S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m("children"in S,"expected parent on stack");const z=S.children;let P=z[z.length-1];(!P||P.type!=="text")&&(P=vt(),P.position={start:de(b.start),end:void 0},z.push(P)),this.stack.push(P)}function j(b){const S=this.stack.pop();m(S,"expected a `node` to be on the stack"),m("value"in S,"expected a `literal` to be on the stack"),m(S.position,"expected `node` to have an open position"),S.value+=this.sliceSerialize(b),S.position.end=de(b.end)}function ee(b){const S=this.stack[this.stack.length-1];if(m(S,"expected `node`"),this.data.atHardBreak){m("children"in S,"expected `parent`");const z=S.children[S.children.length-1];m(z.position,"expected tail to have a starting position"),z.position.end=de(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(S.type)&&(q.call(this,b),j.call(this,b))}function O(){this.data.atHardBreak=!0}function I(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="html","expected html on stack"),S.value=b}function M(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="html","expected html on stack"),S.value=b}function A(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="inlineCode","expected inline code on stack"),S.value=b}function U(){const b=this.stack[this.stack.length-1];if(m(b,"expected node on stack"),m(b.type==="link","expected link on stack"),this.data.inReference){const S=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=S,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function W(){const b=this.stack[this.stack.length-1];if(m(b,"expected node on stack"),m(b.type==="image","expected image on stack"),this.data.inReference){const S=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=S,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(b){const S=this.sliceSerialize(b),z=this.stack[this.stack.length-2];m(z,"expected ancestor on stack"),m(z.type==="image"||z.type==="link","expected image or link on stack"),z.label=$r(S),z.identifier=we(S).toLowerCase()}function ae(){const b=this.stack[this.stack.length-1];m(b,"expected node on stack"),m(b.type==="fragment","expected fragment on stack");const S=this.resume(),z=this.stack[this.stack.length-1];if(m(z,"expected node on stack"),m(z.type==="image"||z.type==="link","expected image or link on stack"),this.data.inReference=!0,z.type==="link"){const P=b.children;z.children=P}else z.alt=S}function f(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="image"||S.type==="link","expected image or link on stack"),S.url=b}function ne(){const b=this.resume(),S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="image"||S.type==="link","expected image or link on stack"),S.title=b}function le(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function K(b){const S=this.resume(),z=this.stack[this.stack.length-1];m(z,"expected node on stack"),m(z.type==="image"||z.type==="link","expected image reference or link reference on stack"),z.label=S,z.identifier=we(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function ge(b){m(b.type==="characterReferenceMarkerNumeric"||b.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=b.type}function Le(b){const S=this.sliceSerialize(b),z=this.data.characterReferenceType;let P;if(z)P=Ct(S,z===u.characterReferenceMarkerNumeric?T.numericBaseDecimal:T.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const G=$e(S);m(G!==!1,"expected reference to decode"),P=G}const R=this.stack[this.stack.length-1];m(R,"expected `node`"),m("value"in R,"expected `node.value`"),R.value+=P}function Ae(b){const S=this.stack.pop();m(S,"expected `node`"),m(S.position,"expected `node.position`"),S.position.end=de(b.end)}function Y(b){j.call(this,b);const S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="link","expected link on stack"),S.url=this.sliceSerialize(b)}function Te(b){j.call(this,b);const S=this.stack[this.stack.length-1];m(S,"expected node on stack"),m(S.type==="link","expected link on stack"),S.url="mailto:"+this.sliceSerialize(b)}function ce(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ht(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function it(){return{type:"break"}}function at(){return{type:"html",value:""}}function Vt(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function ot(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function jt(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function Qt(){return{type:"paragraph",children:[]}}function Ut(){return{type:"strong",children:[]}}function vt(){return{type:"text",value:""}}function Wt(){return{type:"thematicBreak"}}}function de(e){return{line:e.line,column:e.column,offset:e.offset}}function Nt(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Nt(e,r):ri(e,r)}}function ri(e,n){let t;for(t in n)if(Ot.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function St(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is still open")}function Fi(e){const n=this;n.parser=t;function t(r){return ti(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function yt(e){if(e)throw e}var Ne,wt;function ii(){if(wt)return Ne;wt=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},i=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var c=e.call(h,"constructor"),k=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!c&&!k)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},s=function(h,c){t&&c.name==="__proto__"?t(h,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):h[c.name]=c.newValue},l=function(h,c){if(c==="__proto__")if(e.call(h,c)){if(r)return r(h,c).value}else return;return h[c]};return Ne=function g(){var h,c,k,x,p,B,F=arguments[0],L=1,w=arguments.length,D=!1;for(typeof F=="boolean"&&(D=F,F=arguments[1]||{},L=2),(F==null||typeof F!="object"&&typeof F!="function")&&(F={});L<w;++L)if(h=arguments[L],h!=null)for(c in h)k=l(F,c),x=l(h,c),F!==x&&(D&&x&&(i(x)||(p=a(x)))?(p?(p=!1,B=k&&a(k)?k:[]):B=k&&i(k)?k:{},s(F,{name:c,newValue:g(D,B,x)})):typeof x<"u"&&s(F,{name:c,newValue:x}));return F},Ne}var ai=ii();const He=Zt(ai);function Je(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ui(){const e=[],n={run:t,use:r};return n;function t(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(g,...h){const c=e[++i];let k=-1;if(g){s(g);return}for(;++k<a.length;)(h[k]===null||h[k]===void 0)&&(h[k]=a[k]);a=h,c?oi(c,l)(...h):s(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),n}}function oi(e,n){let t;return r;function r(...s){const l=e.length>s.length;let g;l&&s.push(a);try{g=e.apply(this,s)}catch(h){const c=h;if(l&&t)throw c;return a(c)}l||(g&&g.then&&typeof g.then=="function"?g.then(i,a):g instanceof Error?a(g):i(g))}function a(s,...l){t||(t=!0,n(s,...l))}function i(s){a(null,s)}}class J extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let a="",i={},s=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?a=n:!i.cause&&n&&(s=!0,a=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const g=r.indexOf(":");g===-1?i.ruleId=r:(i.source=r.slice(0,g),i.ruleId=r.slice(g+1))}if(!i.place&&i.ancestors&&i.ancestors){const g=i.ancestors[i.ancestors.length-1];g&&(i.place=g.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=Fe(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const ue={basename:si,dirname:li,extname:ci,join:hi,sep:"/"};function si(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Me(e);let t=0,r=-1,a=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){t=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,l=n.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){t=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===n.codePointAt(l--)?l<0&&(r=a):(l=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function li(e){if(Me(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function ci(e){Me(e);let n=e.length,t=-1,r=0,a=-1,i=0,s;for(;n--;){const l=e.codePointAt(n);if(l===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),l===46?a<0?a=n:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||t<0||i===0||i===1&&a===t-1&&a===r+1?"":e.slice(a,t)}function hi(...e){let n=-1,t;for(;++n<e.length;)Me(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":pi(t)}function pi(e){Me(e);const n=e.codePointAt(0)===47;let t=fi(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function fi(e,n){let t="",r=0,a=-1,i=0,s=-1,l,g;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(g=t.lastIndexOf("/"),g!==t.length-1){g<0?(t="",r=0):(t=t.slice(0,g),r=t.length-1-t.lastIndexOf("/")),a=s,i=0;continue}}else if(t.length>0){t="",r=0,a=s,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(a+1,s):t=e.slice(a+1,s),r=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return t}function Me(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const di={cwd:mi};function mi(){return"/"}function Ke(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gi(e){if(typeof e=="string")e=new URL(e);else if(!Ke(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return xi(e)}function xi(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(n)}const Ve=["history","path","basename","stem","extname","dirname"];class ki{constructor(n){let t;n?Ke(n)?t={path:n}:typeof n=="string"||bi(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":di.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ve.length;){const i=Ve[r];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let a;for(a in t)Ve.includes(a)||(this[a]=t[a])}get basename(){return typeof this.path=="string"?ue.basename(this.path):void 0}set basename(n){Qe(n,"basename"),je(n,"basename"),this.path=ue.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ue.dirname(this.path):void 0}set dirname(n){Tt(this.basename,"dirname"),this.path=ue.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ue.extname(this.path):void 0}set extname(n){if(je(n,"extname"),Tt(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Ke(n)&&(n=gi(n)),Qe(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}set stem(n){Qe(n,"stem"),je(n,"stem"),this.path=ue.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const a=this.message(n,t,r);throw a.fatal=!0,a}info(n,t,r){const a=this.message(n,t,r);return a.fatal=void 0,a}message(n,t,r){const a=new J(n,t,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function je(e,n){if(e&&e.includes(ue.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ue.sep+"`")}function Qe(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Tt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function bi(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Si=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),yi={}.hasOwnProperty;class nt extends Si{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ui()}copy(){const n=new nt;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(He(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(We("data",this.frozen),this.namespace[n]=t,this):yi.call(this.namespace,n)&&this.namespace[n]||void 0:n?(We("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=t.call(n,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Be(n),r=this.parser||this.Parser;return Ue("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Ue("process",this.parser||this.Parser),ve("process",this.compiler||this.Compiler),t?a(void 0,t):new Promise(a);function a(i,s){const l=Be(n),g=r.parse(l);r.run(g,l,function(c,k,x){if(c||!k||!x)return h(c);const p=k,B=r.stringify(p,x);Ti(B)?x.value=B:x.result=B,h(c,x)});function h(c,k){c||!k?s(c):i?i(k):(m(t,"`done` is defined if `resolve` is not"),t(void 0,k))}}}processSync(n){let t=!1,r;return this.freeze(),Ue("processSync",this.parser||this.Parser),ve("processSync",this.compiler||this.Compiler),this.process(n,a),zt("processSync","process",t),m(r,"we either bailed on an error or have a tree"),r;function a(i,s){t=!0,yt(i),r=s}}run(n,t,r){It(n),this.freeze();const a=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(s,l){m(typeof t!="function","`file` can’t be a `done` anymore, we checked");const g=Be(t);a.run(n,g,h);function h(c,k,x){const p=k||n;c?l(c):s?s(p):(m(r,"`done` is defined if `resolve` is not"),r(void 0,p,x))}}}runSync(n,t){let r=!1,a;return this.run(n,t,i),zt("runSync","run",r),m(a,"we either bailed on an error or have a tree"),a;function i(s,l){yt(s),a=l,r=!0}}stringify(n,t){this.freeze();const r=Be(t),a=this.compiler||this.Compiler;return ve("stringify",a),It(n),a(n,r)}use(n,...t){const r=this.attachers,a=this.namespace;if(We("use",this.frozen),n!=null)if(typeof n=="function")g(n,t);else if(typeof n=="object")Array.isArray(n)?l(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function i(h){if(typeof h=="function")g(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[c,...k]=h;g(c,k)}else s(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function s(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(h.plugins),h.settings&&(a.settings=He(!0,a.settings,h.settings))}function l(h){let c=-1;if(h!=null)if(Array.isArray(h))for(;++c<h.length;){const k=h[c];i(k)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function g(h,c){let k=-1,x=-1;for(;++k<r.length;)if(r[k][0]===h){x=k;break}if(x===-1)r.push([h,...c]);else if(c.length>0){let[p,...B]=c;const F=r[x][1];Je(F)&&Je(p)&&(p=He(!0,F,p)),r[x]=[h,p,...B]}}}}const Mi=new nt().freeze();function Ue(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ve(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function We(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function It(e){if(!Je(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Be(e){return wi(e)?e:new ki(e)}function wi(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ti(e){return typeof e=="string"||Ii(e)}function Ii(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}export{cn as a,ln as b,ht as c,$r as d,o as e,ie as f,oe as g,Ye as h,u as i,_e as j,H as k,T as l,Z as m,we as n,m as o,et as p,E as q,Fi as r,se as s,en as t,Mi as u,_ as v,nn as w};
@@ -1 +1 @@
1
- import{L as G,E as A,C as N}from"./index-BWrcsh8u.js";import{s as I,t as p,E as Y,L as j,h as k,j as U,c as Z,i as B,f as D,u as M}from"./index-BP77pG9S.js";import"./tool-windows-DOIu9TAD.js";import"./katex-Cu_Erd72.js";import"./index-BXzGHPXz.js";import"./browser-DpICcNby.js";/* empty css */const h=1,F=2,L=3,K=4,H=5,J=36,ee=37,te=38,Oe=11,oe=13;function re(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ne(e){return e==9||e==10||e==13||e==32}let Q=null,V=null,X=0;function W(e,t){let o=e.pos+t;if(V==e&&X==o)return Q;for(;ne(e.peek(t));)t++;let O="";for(;;){let r=e.peek(t);if(!re(r))break;O+=String.fromCharCode(r),t++}return V=e,X=o,Q=O||null}function _(e,t){this.name=e,this.parent=t}const ae=new N({start:null,shift(e,t,o,O){return t==h?new _(W(O,1)||"",e):e},reduce(e,t){return t==Oe&&e?e.parent:e},reuse(e,t,o,O){let r=t.type.id;return r==h||r==oe?new _(W(O,1)||"",e):e},strict:!1}),le=new A((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let o=W(e,0);if(!o)return e.acceptToken(H);if(t.context&&o==t.context.name)return e.acceptToken(F);for(let O=t.context;O;O=O.parent)if(O.name==o)return e.acceptToken(L,-2);e.acceptToken(K)}else if(e.next!=33&&e.next!=63)return e.acceptToken(h)}},{contextual:!0});function y(e,t){return new A(o=>{let O=0,r=t.charCodeAt(0);e:for(;!(o.next<0);o.advance(),O++)if(o.next==r){for(let a=1;a<t.length;a++)if(o.peek(a)!=t.charCodeAt(a))continue e;break}O&&o.acceptToken(e)})}const se=y(J,"-->"),ie=y(ee,"?>"),ce=y(te,"]]>"),me=I({Text:p.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":p.angleBracket,TagName:p.tagName,"MismatchedCloseTag/TagName":[p.tagName,p.invalid],AttributeName:p.attributeName,AttributeValue:p.attributeValue,Is:p.definitionOperator,"EntityReference CharacterReference":p.character,Comment:p.blockComment,ProcessingInst:p.processingInstruction,DoctypeDecl:p.documentMeta,Cdata:p.special(p.string)}),$e=G.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:50,context:ae,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"],["isolate",-6,13,18,19,21,22,24,""]],propSources:[me],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[le,se,ie,ce,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function T(e,t){let o=t&&t.getChild("TagName");return o?e.sliceString(o.from,o.to):""}function P(e,t){let o=t&&t.firstChild;return!o||o.name!="OpenTag"?"":T(e,o)}function Se(e,t,o){let O=t&&t.getChildren("Attribute").find(a=>a.from<=o&&a.to>=o),r=O&&O.getChild("AttributeName");return r?e.sliceString(r.from,r.to):""}function C(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function ge(e,t){var o;let O=k(e).resolveInner(t,-1),r=null;for(let a=O;!r&&a.parent;a=a.parent)(a.name=="OpenTag"||a.name=="CloseTag"||a.name=="SelfClosingTag"||a.name=="MismatchedCloseTag")&&(r=a);if(r&&(r.to>t||r.lastChild.type.isError)){let a=r.parent;if(O.name=="TagName")return r.name=="CloseTag"||r.name=="MismatchedCloseTag"?{type:"closeTag",from:O.from,context:a}:{type:"openTag",from:O.from,context:C(a)};if(O.name=="AttributeName")return{type:"attrName",from:O.from,context:r};if(O.name=="AttributeValue")return{type:"attrValue",from:O.from,context:r};let s=O==r||O.name=="Attribute"?O.childBefore(t):O;return(s==null?void 0:s.name)=="StartTag"?{type:"openTag",from:t,context:C(a)}:(s==null?void 0:s.name)=="StartCloseTag"&&s.to<=t?{type:"closeTag",from:t,context:a}:(s==null?void 0:s.name)=="Is"?{type:"attrValue",from:t,context:r}:s?{type:"attrName",from:t,context:r}:null}else if(O.name=="StartCloseTag")return{type:"closeTag",from:t,context:O.parent};for(;O.parent&&O.to==t&&!(!((o=O.lastChild)===null||o===void 0)&&o.type.isError);)O=O.parent;return O.name=="Element"||O.name=="Text"||O.name=="Document"?{type:"tag",from:t,context:O.name=="Element"?O:C(O)}:null}class ue{constructor(t,o,O){this.attrs=o,this.attrValues=O,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(r=>({label:r,type:"text"})):[]}}const b=/^[:\-\.\w\u00b7-\uffff]*$/;function E(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function R(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function pe(e,t){let o=[],O=[],r=Object.create(null);for(let n of t){let $=E(n);o.push($),n.global&&O.push($),n.values&&(r[n.name]=n.values.map(R))}let a=[],s=[],f=Object.create(null);for(let n of e){let $=O,c=r;n.attributes&&($=$.concat(n.attributes.map(l=>typeof l=="string"?o.find(d=>d.label==l)||{label:l,type:"property"}:(l.values&&(c==r&&(c=Object.create(c)),c[l.name]=l.values.map(R)),E(l)))));let u=new ue(n,$,c);f[u.name]=u,a.push(u),n.top&&s.push(u)}s.length||(s=a);for(let n=0;n<a.length;n++){let $=e[n],c=a[n];if($.children)for(let u of $.children)f[u]&&c.children.push(f[u]);else c.children=a}return n=>{var $;let{doc:c}=n.state,u=ge(n.state,n.pos);if(!u||u.type=="tag"&&!n.explicit)return null;let{type:l,from:d,context:S}=u;if(l=="openTag"){let i=s,m=P(c,S);if(m){let g=f[m];i=(g==null?void 0:g.children)||a}return{from:d,options:i.map(g=>g.completion),validFor:b}}else if(l=="closeTag"){let i=P(c,S);return i?{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)==">"?1:0),options:[(($=f[i])===null||$===void 0?void 0:$.closeNameCompletion)||{label:i+">",type:"type"}],validFor:b}:null}else if(l=="attrName"){let i=f[T(c,S)];return{from:d,options:(i==null?void 0:i.attrs)||O,validFor:b}}else if(l=="attrValue"){let i=Se(c,S,d);if(!i)return null;let m=f[T(c,S)],g=((m==null?void 0:m.attrValues)||r)[i];return!g||!g.length?null:{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(l=="tag"){let i=P(c,S),m=f[i],g=[],q=S&&S.lastChild;i&&(!q||q.name!="CloseTag"||T(c,q)!=i)&&g.push(m?m.closeCompletion:{label:"</"+i+">",type:"type",boost:2});let v=g.concat(((m==null?void 0:m.children)||(S?a:s)).map(x=>x.openCompletion));if(S&&(m!=null&&m.text.length)){let x=S.firstChild;x.to>n.pos-20&&!/\S/.test(n.state.sliceDoc(x.to,n.pos))&&(v=v.concat(m.text))}return{from:d,options:v,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const w=j.define({name:"xml",parser:$e.configure({props:[B.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),D.add({Element(e){let t=e.firstChild,o=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:o.name=="CloseTag"?o.from:e.to}}}),M.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function be(e={}){let t=[w.data.of({autocomplete:pe(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(fe),new Z(w,t)}function z(e,t,o=e.length){if(!t)return"";let O=t.firstChild,r=O&&O.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,o)):""}const fe=Y.inputHandler.of((e,t,o,O,r)=>{if(e.composing||e.state.readOnly||t!=o||O!=">"&&O!="/"||!w.isActiveAt(e.state,t,-1))return!1;let a=r(),{state:s}=a,f=s.changeByRange(n=>{var $,c,u;let{head:l}=n,d=s.doc.sliceString(l-1,l)==O,S=k(s).resolveInner(l,-1),i;if(d&&O==">"&&S.name=="EndTag"){let m=S.parent;if(((c=($=m.parent)===null||$===void 0?void 0:$.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(i=z(s.doc,m.parent,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=`</${i}>`;return{range:n,changes:{from:l,to:g,insert:q}}}}else if(d&&O=="/"&&S.name=="StartCloseTag"){let m=S.parent;if(S.from==l-2&&((u=m.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(i=z(s.doc,m,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=`${i}>`;return{range:U.cursor(l+q.length,-1),changes:{from:l,to:g,insert:q}}}}return{range:n}});return f.changes.empty?!1:(e.dispatch([a,s.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{fe as autoCloseTags,pe as completeFromSchema,be as xml,w as xmlLanguage};
1
+ import{L as G,E as A,C as N}from"./index-qbS_W7PW.js";import{s as I,t as u,E as Y,L as j,e as k,j as U,a as Z,i as B,f as D,q as M}from"./index-DSKRBuhn.js";import"./tool-windows-BEnZdJqF.js";import"./katex-Cu_Erd72.js";import"./index-DXqL8NRE.js";import"./browser-ZXTF4AKv.js";/* empty css */const h=1,F=2,L=3,K=4,H=5,J=36,ee=37,te=38,Oe=11,oe=13;function re(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ne(e){return e==9||e==10||e==13||e==32}let Q=null,V=null,X=0;function W(e,t){let o=e.pos+t;if(V==e&&X==o)return Q;for(;ne(e.peek(t));)t++;let O="";for(;;){let r=e.peek(t);if(!re(r))break;O+=String.fromCharCode(r),t++}return V=e,X=o,Q=O||null}function _(e,t){this.name=e,this.parent=t}const ae=new N({start:null,shift(e,t,o,O){return t==h?new _(W(O,1)||"",e):e},reduce(e,t){return t==Oe&&e?e.parent:e},reuse(e,t,o,O){let r=t.type.id;return r==h||r==oe?new _(W(O,1)||"",e):e},strict:!1}),le=new A((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let o=W(e,0);if(!o)return e.acceptToken(H);if(t.context&&o==t.context.name)return e.acceptToken(F);for(let O=t.context;O;O=O.parent)if(O.name==o)return e.acceptToken(L,-2);e.acceptToken(K)}else if(e.next!=33&&e.next!=63)return e.acceptToken(h)}},{contextual:!0});function y(e,t){return new A(o=>{let O=0,r=t.charCodeAt(0);e:for(;!(o.next<0);o.advance(),O++)if(o.next==r){for(let a=1;a<t.length;a++)if(o.peek(a)!=t.charCodeAt(a))continue e;break}O&&o.acceptToken(e)})}const se=y(J,"-->"),ie=y(ee,"?>"),ce=y(te,"]]>"),me=I({Text:u.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":u.angleBracket,TagName:u.tagName,"MismatchedCloseTag/TagName":[u.tagName,u.invalid],AttributeName:u.attributeName,AttributeValue:u.attributeValue,Is:u.definitionOperator,"EntityReference CharacterReference":u.character,Comment:u.blockComment,ProcessingInst:u.processingInstruction,DoctypeDecl:u.documentMeta,Cdata:u.special(u.string)}),$e=G.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:50,context:ae,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"],["isolate",-6,13,18,19,21,22,24,""]],propSources:[me],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[le,se,ie,ce,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function T(e,t){let o=t&&t.getChild("TagName");return o?e.sliceString(o.from,o.to):""}function P(e,t){let o=t&&t.firstChild;return!o||o.name!="OpenTag"?"":T(e,o)}function Se(e,t,o){let O=t&&t.getChildren("Attribute").find(a=>a.from<=o&&a.to>=o),r=O&&O.getChild("AttributeName");return r?e.sliceString(r.from,r.to):""}function C(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function ge(e,t){var o;let O=k(e).resolveInner(t,-1),r=null;for(let a=O;!r&&a.parent;a=a.parent)(a.name=="OpenTag"||a.name=="CloseTag"||a.name=="SelfClosingTag"||a.name=="MismatchedCloseTag")&&(r=a);if(r&&(r.to>t||r.lastChild.type.isError)){let a=r.parent;if(O.name=="TagName")return r.name=="CloseTag"||r.name=="MismatchedCloseTag"?{type:"closeTag",from:O.from,context:a}:{type:"openTag",from:O.from,context:C(a)};if(O.name=="AttributeName")return{type:"attrName",from:O.from,context:r};if(O.name=="AttributeValue")return{type:"attrValue",from:O.from,context:r};let s=O==r||O.name=="Attribute"?O.childBefore(t):O;return(s==null?void 0:s.name)=="StartTag"?{type:"openTag",from:t,context:C(a)}:(s==null?void 0:s.name)=="StartCloseTag"&&s.to<=t?{type:"closeTag",from:t,context:a}:(s==null?void 0:s.name)=="Is"?{type:"attrValue",from:t,context:r}:s?{type:"attrName",from:t,context:r}:null}else if(O.name=="StartCloseTag")return{type:"closeTag",from:t,context:O.parent};for(;O.parent&&O.to==t&&!(!((o=O.lastChild)===null||o===void 0)&&o.type.isError);)O=O.parent;return O.name=="Element"||O.name=="Text"||O.name=="Document"?{type:"tag",from:t,context:O.name=="Element"?O:C(O)}:null}class pe{constructor(t,o,O){this.attrs=o,this.attrValues=O,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(r=>({label:r,type:"text"})):[]}}const b=/^[:\-\.\w\u00b7-\uffff]*$/;function E(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function R(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function ue(e,t){let o=[],O=[],r=Object.create(null);for(let n of t){let $=E(n);o.push($),n.global&&O.push($),n.values&&(r[n.name]=n.values.map(R))}let a=[],s=[],f=Object.create(null);for(let n of e){let $=O,c=r;n.attributes&&($=$.concat(n.attributes.map(l=>typeof l=="string"?o.find(d=>d.label==l)||{label:l,type:"property"}:(l.values&&(c==r&&(c=Object.create(c)),c[l.name]=l.values.map(R)),E(l)))));let p=new pe(n,$,c);f[p.name]=p,a.push(p),n.top&&s.push(p)}s.length||(s=a);for(let n=0;n<a.length;n++){let $=e[n],c=a[n];if($.children)for(let p of $.children)f[p]&&c.children.push(f[p]);else c.children=a}return n=>{var $;let{doc:c}=n.state,p=ge(n.state,n.pos);if(!p||p.type=="tag"&&!n.explicit)return null;let{type:l,from:d,context:S}=p;if(l=="openTag"){let i=s,m=P(c,S);if(m){let g=f[m];i=(g==null?void 0:g.children)||a}return{from:d,options:i.map(g=>g.completion),validFor:b}}else if(l=="closeTag"){let i=P(c,S);return i?{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)==">"?1:0),options:[(($=f[i])===null||$===void 0?void 0:$.closeNameCompletion)||{label:i+">",type:"type"}],validFor:b}:null}else if(l=="attrName"){let i=f[T(c,S)];return{from:d,options:(i==null?void 0:i.attrs)||O,validFor:b}}else if(l=="attrValue"){let i=Se(c,S,d);if(!i)return null;let m=f[T(c,S)],g=((m==null?void 0:m.attrValues)||r)[i];return!g||!g.length?null:{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(l=="tag"){let i=P(c,S),m=f[i],g=[],q=S&&S.lastChild;i&&(!q||q.name!="CloseTag"||T(c,q)!=i)&&g.push(m?m.closeCompletion:{label:"</"+i+">",type:"type",boost:2});let v=g.concat(((m==null?void 0:m.children)||(S?a:s)).map(x=>x.openCompletion));if(S&&(m!=null&&m.text.length)){let x=S.firstChild;x.to>n.pos-20&&!/\S/.test(n.state.sliceDoc(x.to,n.pos))&&(v=v.concat(m.text))}return{from:d,options:v,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const w=j.define({name:"xml",parser:$e.configure({props:[B.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),D.add({Element(e){let t=e.firstChild,o=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:o.name=="CloseTag"?o.from:e.to}}}),M.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function be(e={}){let t=[w.data.of({autocomplete:ue(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(fe),new Z(w,t)}function z(e,t,o=e.length){if(!t)return"";let O=t.firstChild,r=O&&O.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,o)):""}const fe=Y.inputHandler.of((e,t,o,O,r)=>{if(e.composing||e.state.readOnly||t!=o||O!=">"&&O!="/"||!w.isActiveAt(e.state,t,-1))return!1;let a=r(),{state:s}=a,f=s.changeByRange(n=>{var $,c,p;let{head:l}=n,d=s.doc.sliceString(l-1,l)==O,S=k(s).resolveInner(l,-1),i;if(d&&O==">"&&S.name=="EndTag"){let m=S.parent;if(((c=($=m.parent)===null||$===void 0?void 0:$.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(i=z(s.doc,m.parent,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=`</${i}>`;return{range:n,changes:{from:l,to:g,insert:q}}}}else if(d&&O=="/"&&S.name=="StartCloseTag"){let m=S.parent;if(S.from==l-2&&((p=m.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(i=z(s.doc,m,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=`${i}>`;return{range:U.cursor(l+q.length,-1),changes:{from:l,to:g,insert:q}}}}return{range:n}});return f.changes.empty?!1:(e.dispatch([a,s.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{fe as autoCloseTags,ue as completeFromSchema,be as xml,w as xmlLanguage};