agent-tower 0.6.0-beta.0 → 0.6.0-beta.1

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 (192) hide show
  1. package/README.md +2 -0
  2. package/dist/executors/__tests__/providers-availability.test.js +18 -1
  3. package/dist/executors/__tests__/providers-availability.test.js.map +1 -1
  4. package/dist/executors/index.js +2 -2
  5. package/dist/executors/index.js.map +1 -1
  6. package/dist/routes/__tests__/providers.test.js +16 -0
  7. package/dist/routes/__tests__/providers.test.js.map +1 -1
  8. package/dist/routes/providers.d.ts.map +1 -1
  9. package/dist/routes/providers.js +12 -5
  10. package/dist/routes/providers.js.map +1 -1
  11. package/dist/routes/system.d.ts.map +1 -1
  12. package/dist/routes/system.js +1 -7
  13. package/dist/routes/system.js.map +1 -1
  14. package/dist/runtime/__tests__/acp-agent-definitions.test.js +7 -0
  15. package/dist/runtime/__tests__/acp-agent-definitions.test.js.map +1 -1
  16. package/dist/runtime/__tests__/acp-driver-cleanup.test.js +3 -1
  17. package/dist/runtime/__tests__/acp-driver-cleanup.test.js.map +1 -1
  18. package/dist/runtime/__tests__/acp-driver-lifecycle.test.d.ts +2 -0
  19. package/dist/runtime/__tests__/acp-driver-lifecycle.test.d.ts.map +1 -0
  20. package/dist/runtime/__tests__/acp-driver-lifecycle.test.js +241 -0
  21. package/dist/runtime/__tests__/acp-driver-lifecycle.test.js.map +1 -0
  22. package/dist/runtime/__tests__/acp-history-reconciler.test.d.ts +2 -0
  23. package/dist/runtime/__tests__/acp-history-reconciler.test.d.ts.map +1 -0
  24. package/dist/runtime/__tests__/acp-history-reconciler.test.js +69 -0
  25. package/dist/runtime/__tests__/acp-history-reconciler.test.js.map +1 -0
  26. package/dist/runtime/__tests__/runtime-coordinator.test.js +41 -0
  27. package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
  28. package/dist/runtime/acp/acp-driver.d.ts.map +1 -1
  29. package/dist/runtime/acp/acp-driver.js +61 -26
  30. package/dist/runtime/acp/acp-driver.js.map +1 -1
  31. package/dist/runtime/acp/agents/codex.d.ts.map +1 -1
  32. package/dist/runtime/acp/agents/codex.js +2 -0
  33. package/dist/runtime/acp/agents/codex.js.map +1 -1
  34. package/dist/runtime/acp/agents/pi-coding-agent.d.ts.map +1 -1
  35. package/dist/runtime/acp/agents/pi-coding-agent.js +6 -4
  36. package/dist/runtime/acp/agents/pi-coding-agent.js.map +1 -1
  37. package/dist/runtime/acp/history-reconciler.d.ts +8 -0
  38. package/dist/runtime/acp/history-reconciler.d.ts.map +1 -0
  39. package/dist/runtime/acp/history-reconciler.js +82 -0
  40. package/dist/runtime/acp/history-reconciler.js.map +1 -0
  41. package/dist/runtime/contracts.d.ts +4 -0
  42. package/dist/runtime/contracts.d.ts.map +1 -1
  43. package/dist/runtime/runtime-coordinator.d.ts +2 -1
  44. package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
  45. package/dist/runtime/runtime-coordinator.js +27 -7
  46. package/dist/runtime/runtime-coordinator.js.map +1 -1
  47. package/dist/services/__tests__/session-manager.lifecycle.test.js +4 -2
  48. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  49. package/dist/services/__tests__/session-manager.team-run.test.js +6 -0
  50. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  51. package/dist/services/mcp-config.integration.test.d.ts +2 -0
  52. package/dist/services/mcp-config.integration.test.d.ts.map +1 -0
  53. package/dist/services/mcp-config.integration.test.js +75 -0
  54. package/dist/services/mcp-config.integration.test.js.map +1 -0
  55. package/dist/services/mcp-config.service.d.ts +10 -3
  56. package/dist/services/mcp-config.service.d.ts.map +1 -1
  57. package/dist/services/mcp-config.service.js +70 -18
  58. package/dist/services/mcp-config.service.js.map +1 -1
  59. package/dist/services/mcp-config.service.test.js +44 -13
  60. package/dist/services/mcp-config.service.test.js.map +1 -1
  61. package/dist/services/session-manager.d.ts.map +1 -1
  62. package/dist/services/session-manager.js +27 -9
  63. package/dist/services/session-manager.js.map +1 -1
  64. package/dist/utils/process-launch.d.ts.map +1 -1
  65. package/dist/utils/process-launch.js +1 -3
  66. package/dist/utils/process-launch.js.map +1 -1
  67. package/dist/utils/process-launch.test.js +2 -17
  68. package/dist/utils/process-launch.test.js.map +1 -1
  69. package/dist/web/agent-icons/codex.svg +4 -1
  70. package/dist/web/agent-icons/grok-build.svg +5 -0
  71. package/dist/web/agent-icons/kiro-cli.svg +6 -0
  72. package/dist/web/agent-icons/opencode.svg +5 -0
  73. package/dist/web/agent-icons/pi-coding-agent.svg +5 -0
  74. package/dist/web/agent-icons/qwen-code.svg +13 -0
  75. package/dist/web/assets/{AgentDemoPage-BpUO2gR6.js → AgentDemoPage-XrttOpQW.js} +1 -1
  76. package/dist/web/assets/{AgentEnvironmentSettingsPage-CSBMaAvL.js → AgentEnvironmentSettingsPage-CAo0bCpZ.js} +1 -1
  77. package/dist/web/assets/{AgentLogo-C190Z6bw.js → AgentLogo-BCwbooTN.js} +1 -1
  78. package/dist/web/assets/{ConversationPage-Cer_WtdC.js → ConversationPage-kyHuICil.js} +1 -1
  79. package/dist/web/assets/{CreateTaskInput-ByeWDjc8.js → CreateTaskInput-B67vzMJD.js} +1 -1
  80. package/dist/web/assets/{DemoPage-Dpb9aAKX.js → DemoPage-DHMh9-zU.js} +1 -1
  81. package/dist/web/assets/{GeneralSettingsPage-TqbAsCZM.js → GeneralSettingsPage-DvWaqR9O.js} +1 -1
  82. package/dist/web/assets/{Icons-CyNNz4Z5.js → Icons-DADUmnB1.js} +1 -1
  83. package/dist/web/assets/{LoadingPreviewPage-DmH1TGln.js → LoadingPreviewPage-Dk91Ua1W.js} +1 -1
  84. package/dist/web/assets/{McpSettingsPage-z1_NcsMR.js → McpSettingsPage-CH8jFyxp.js} +1 -1
  85. package/dist/web/assets/{MemberAvatar-BPoYS6Il.js → MemberAvatar-l-WCdlLA.js} +1 -1
  86. package/dist/web/assets/{NotificationSettingsPage-CNsRJ6nN.js → NotificationSettingsPage-Byu8b9X3.js} +1 -1
  87. package/dist/web/assets/{ProfileSettingsPage-g1RKcEbo.js → ProfileSettingsPage-BdylqWUj.js} +1 -1
  88. package/dist/web/assets/{ProjectKanbanPage-j2v5fLfg.js → ProjectKanbanPage--cx6wNDR.js} +3 -3
  89. package/dist/web/assets/{ProjectSettingsPage-Cp89NvwE.js → ProjectSettingsPage-6psG0Vfc.js} +1 -1
  90. package/dist/web/assets/ProviderSettingsPage-BPEEkhtA.js +93 -0
  91. package/dist/web/assets/{SettingsMasterDetail-BYB-1oyf.js → SettingsMasterDetail-DTGIIGdI.js} +1 -1
  92. package/dist/web/assets/{TeamSettingsPage-Y2zCVbVD.js → TeamSettingsPage-BXuG4Bou.js} +1 -1
  93. package/dist/web/assets/{arc-BmDnqN7Q.js → arc-DrcjdWTE.js} +1 -1
  94. package/dist/web/assets/{architectureDiagram-3BPJPVTR-BIG4K9gT.js → architectureDiagram-3BPJPVTR-CAoBhXSL.js} +1 -1
  95. package/dist/web/assets/{arrow-left-CB4qTjQs.js → arrow-left-CCWDjOmp.js} +1 -1
  96. package/dist/web/assets/{blockDiagram-GPEHLZMM-CowveYw0.js → blockDiagram-GPEHLZMM-CcTSBbUq.js} +1 -1
  97. package/dist/web/assets/{c4Diagram-AAUBKEIU-CLjbYgNG.js → c4Diagram-AAUBKEIU-BuUKdgUg.js} +1 -1
  98. package/dist/web/assets/channel-Bh_PCZNP.js +1 -0
  99. package/dist/web/assets/check-BN_PVKzE.js +1 -0
  100. package/dist/web/assets/{chevron-down-BXYCSpWd.js → chevron-down-BQcW9sFf.js} +1 -1
  101. package/dist/web/assets/{chevron-right-CkcSaX8x.js → chevron-right-pH923eYp.js} +1 -1
  102. package/dist/web/assets/{chevron-up-Y8L6pbzc.js → chevron-up-DyQW115F.js} +1 -1
  103. package/dist/web/assets/{chunk-2J33WTMH-DRf_miP4.js → chunk-2J33WTMH-BWNSmQa8.js} +1 -1
  104. package/dist/web/assets/{chunk-4BX2VUAB-C6Ne_vwR.js → chunk-4BX2VUAB-Blldhw0k.js} +1 -1
  105. package/dist/web/assets/{chunk-55IACEB6-DejCglMr.js → chunk-55IACEB6-hTffyPXL.js} +1 -1
  106. package/dist/web/assets/{chunk-727SXJPM-B0MC9Ojc.js → chunk-727SXJPM-Cd48r7c-.js} +1 -1
  107. package/dist/web/assets/{chunk-AQP2D5EJ-D9f4hbMX.js → chunk-AQP2D5EJ-BdDrOIL7.js} +1 -1
  108. package/dist/web/assets/{chunk-FMBD7UC4-k90hkOQq.js → chunk-FMBD7UC4-6XIvQYVJ.js} +1 -1
  109. package/dist/web/assets/{chunk-ND2GUHAM-CX2-qxPx.js → chunk-ND2GUHAM-BJlcb_pB.js} +1 -1
  110. package/dist/web/assets/{chunk-QZHKN3VN-CpFs7UD0.js → chunk-QZHKN3VN-3TZzFkxK.js} +1 -1
  111. package/dist/web/assets/{circle-alert-ClX4sQ2K.js → circle-alert-oa-BQ5e7.js} +1 -1
  112. package/dist/web/assets/classDiagram-4FO5ZUOK-B0lQFDoP.js +1 -0
  113. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-B0lQFDoP.js +1 -0
  114. package/dist/web/assets/{code-block-OCS4YCEC-_lkU1VUC.js → code-block-OCS4YCEC-xJQWFyR7.js} +1 -1
  115. package/dist/web/assets/{confirm-dialog-BJwzwwOk.js → confirm-dialog-CRiC3xBd.js} +1 -1
  116. package/dist/web/assets/{copy-jQAntc98.js → copy-DaoAUKTO.js} +1 -1
  117. package/dist/web/assets/{cose-bilkent-S5V4N54A-CLWAfEVg.js → cose-bilkent-S5V4N54A-Cjcm-rW_.js} +1 -1
  118. package/dist/web/assets/{cssMode-q0rL0Hjc.js → cssMode-_D6u4YDd.js} +1 -1
  119. package/dist/web/assets/{dagre-BM42HDAG-DKviWU-X.js → dagre-BM42HDAG-YqubcAJi.js} +1 -1
  120. package/dist/web/assets/{diagram-2AECGRRQ-L6emXRJ1.js → diagram-2AECGRRQ-Dk4ayFqg.js} +1 -1
  121. package/dist/web/assets/{diagram-5GNKFQAL-CXGUerks.js → diagram-5GNKFQAL-CQ0joYfB.js} +1 -1
  122. package/dist/web/assets/{diagram-KO2AKTUF-C8FHXqeH.js → diagram-KO2AKTUF-DmuZzIdW.js} +1 -1
  123. package/dist/web/assets/{diagram-LMA3HP47-Cng_aa5j.js → diagram-LMA3HP47-YTPEfEZy.js} +1 -1
  124. package/dist/web/assets/{diagram-OG6HWLK6-BEC6IDf4.js → diagram-OG6HWLK6-DmwRuz8-.js} +1 -1
  125. package/dist/web/assets/{erDiagram-TEJ5UH35-BWMCTdYK.js → erDiagram-TEJ5UH35-LRL_DMXa.js} +1 -1
  126. package/dist/web/assets/{flowDiagram-I6XJVG4X-aAEYIyx2.js → flowDiagram-I6XJVG4X-ELBDyOvk.js} +1 -1
  127. package/dist/web/assets/{folder-picker-CioQjSzV.js → folder-picker-WUhXxIM5.js} +1 -1
  128. package/dist/web/assets/{freemarker2-DZgAIr6s.js → freemarker2-DxJFkRz5.js} +1 -1
  129. package/dist/web/assets/{ganttDiagram-6RSMTGT7-DVqWnwcH.js → ganttDiagram-6RSMTGT7-D0e9ILuF.js} +1 -1
  130. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-BVWrTXBv.js → gitGraphDiagram-PVQCEYII-Ck6OXXw0.js} +1 -1
  131. package/dist/web/assets/{handlebars-9RRQrLUb.js → handlebars-djdO6ZKR.js} +1 -1
  132. package/dist/web/assets/{html-BVI4F9TT.js → html-CHeBxmFi.js} +1 -1
  133. package/dist/web/assets/{htmlMode-t0djrjSv.js → htmlMode-SZh8FaPi.js} +1 -1
  134. package/dist/web/assets/{index-Da9mzleR.js → index-CjdqAcbu.js} +4 -4
  135. package/dist/web/assets/{index-RYlllU6n.js → index-D9kBRMR0.js} +3 -3
  136. package/dist/web/assets/{infoDiagram-5YYISTIA-DYG1ew4x.js → infoDiagram-5YYISTIA-Cx8be-MV.js} +1 -1
  137. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-COBW1j3-.js → ishikawaDiagram-YF4QCWOH-Dlc7akl7.js} +1 -1
  138. package/dist/web/assets/javascript-l6fV6hf7.js +1 -0
  139. package/dist/web/assets/{journeyDiagram-JHISSGLW-BI_FlncW.js → journeyDiagram-JHISSGLW-BVDSbS9-.js} +1 -1
  140. package/dist/web/assets/{jsonMode-A5wuW-PC.js → jsonMode-B5CJhoWd.js} +1 -1
  141. package/dist/web/assets/{kanban-definition-UN3LZRKU-BKrHEd7r.js → kanban-definition-UN3LZRKU-nFR0zB7B.js} +1 -1
  142. package/dist/web/assets/{layers-BZMh9pqm.js → layers-Bo4aml98.js} +1 -1
  143. package/dist/web/assets/{linear-DyoMQJGq.js → linear-BCWZjcpP.js} +1 -1
  144. package/dist/web/assets/{liquid-HXqG_RIQ.js → liquid-DkFOeJ6J.js} +1 -1
  145. package/dist/web/assets/{lspLanguageFeatures-s3xWnrXc.js → lspLanguageFeatures-Cbk7wEkj.js} +1 -1
  146. package/dist/web/assets/{mdx-k_7JTYp2.js → mdx-BOPNdexu.js} +1 -1
  147. package/dist/web/assets/{mermaid-NOHMQCX5-orMHhlAj.js → mermaid-NOHMQCX5-DWQaYVL0.js} +45 -45
  148. package/dist/web/assets/{message-square-CStQg7sr.js → message-square-DxbkpGqF.js} +1 -1
  149. package/dist/web/assets/{mindmap-definition-RKZ34NQL-CKOIIjUJ.js → mindmap-definition-RKZ34NQL-LI7W1FIX.js} +1 -1
  150. package/dist/web/assets/{modal-ZYdX5Krr.js → modal-Cymk-6Df.js} +1 -1
  151. package/dist/web/assets/{monaco-DX9iObLO.js → monaco-Bc-Z2u8N.js} +3 -3
  152. package/dist/web/assets/{pencil-DoB4p30x.js → pencil-DOL2nlgg.js} +1 -1
  153. package/dist/web/assets/{pieDiagram-4H26LBE5-BW18kL8l.js → pieDiagram-4H26LBE5-mgUzAFkk.js} +1 -1
  154. package/dist/web/assets/{python-abx8p9WS.js → python-D_wlYLCL.js} +1 -1
  155. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Df_F1INR.js → quadrantDiagram-W4KKPZXB-CaDF2kqA.js} +1 -1
  156. package/dist/web/assets/{razor-DGdDlX86.js → razor-DBFVg4JU.js} +1 -1
  157. package/dist/web/assets/{requirementDiagram-4Y6WPE33-De6R8t8O.js → requirementDiagram-4Y6WPE33-DhmHdr_0.js} +1 -1
  158. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-ChlLeN5m.js → sankeyDiagram-5OEKKPKP-B7qnGfue.js} +1 -1
  159. package/dist/web/assets/{select-B9kjO67b.js → select-BpKQyMvD.js} +1 -1
  160. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-CPVnbcvz.js → sequenceDiagram-3UESZ5HK-D2LhPgpM.js} +1 -1
  161. package/dist/web/assets/{stateDiagram-AJRCARHV-BFS1G-aJ.js → stateDiagram-AJRCARHV-ClkO4Gu5.js} +1 -1
  162. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-YnSeSD_N.js +1 -0
  163. package/dist/web/assets/{switch-C2r5pofB.js → switch-BJ4Ar_OA.js} +1 -1
  164. package/dist/web/assets/{textarea-BB3UoYxg.js → textarea-DjwjAAG8.js} +1 -1
  165. package/dist/web/assets/{timeline-definition-PNZ67QCA-C1Rgs32y.js → timeline-definition-PNZ67QCA-DhGIG-GC.js} +1 -1
  166. package/dist/web/assets/{trash-2-BNiAEW-6.js → trash-2-R46i6Uus.js} +1 -1
  167. package/dist/web/assets/{tsMode-DHruHjGh.js → tsMode-CKaqpIrz.js} +1 -1
  168. package/dist/web/assets/{typescript-SLYiKRhJ.js → typescript-DsixnGVt.js} +1 -1
  169. package/dist/web/assets/{upload-BLLmywZY.js → upload-CgWqsmdI.js} +1 -1
  170. package/dist/web/assets/{use-profiles-OJaV4lOv.js → use-profiles-BlGgvdYm.js} +1 -1
  171. package/dist/web/assets/{use-projects-D_Sq7ahS.js → use-projects-Cuv0A0RC.js} +1 -1
  172. package/dist/web/assets/{use-providers-SSHcslI-.js → use-providers-DLcAY6E1.js} +1 -1
  173. package/dist/web/assets/{useNormalizedLogs-DeA-fso_.js → useNormalizedLogs-tfxFAJOF.js} +1 -1
  174. package/dist/web/assets/{vennDiagram-CIIHVFJN-DLGPZTKg.js → vennDiagram-CIIHVFJN-BngQhsYJ.js} +1 -1
  175. package/dist/web/assets/{wardley-L42UT6IY-BVMPWfq9.js → wardley-L42UT6IY-BEY6sftT.js} +1 -1
  176. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-_KXuEg6G.js → wardleyDiagram-YWT4CUSO-IH_Yh-cw.js} +1 -1
  177. package/dist/web/assets/{xml-BmreQojr.js → xml-dEcQ1gzo.js} +1 -1
  178. package/dist/web/assets/{xychartDiagram-2RQKCTM6-a-Do3v5G.js → xychartDiagram-2RQKCTM6-BdrGFDsr.js} +1 -1
  179. package/dist/web/assets/{yaml-CJoLHuqv.js → yaml-BfGVqGj4.js} +1 -1
  180. package/dist/web/index.html +1 -1
  181. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.d.ts +2 -0
  182. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.d.ts.map +1 -1
  183. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.js +5 -0
  184. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.js.map +1 -1
  185. package/package.json +1 -1
  186. package/dist/web/assets/ProviderSettingsPage-B-bBs2qN.js +0 -93
  187. package/dist/web/assets/channel-BsOpjSZw.js +0 -1
  188. package/dist/web/assets/check-BVOtZt28.js +0 -1
  189. package/dist/web/assets/classDiagram-4FO5ZUOK-KkLqUSdB.js +0 -1
  190. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-KkLqUSdB.js +0 -1
  191. package/dist/web/assets/javascript-DaUCpDvL.js +0 -1
  192. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DSxC8AfE.js +0 -1
@@ -1,59 +1,59 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-_lkU1VUC.js","assets/index-RYlllU6n.js","assets/index-CjAJoGg5.css","assets/chevron-right-CkcSaX8x.js","assets/chevron-down-BXYCSpWd.js","assets/index-Da9mzleR.js"])))=>i.map(i=>d[i]);
2
- import{k as gu,ab as Eu,r as A,j as m,aK as Mc,aL as vc,ay as Ci,O as An,l as ar,u as yi,a3 as Bc,X as Fc,m as Hc,p as Uc,aM as jc}from"./index-RYlllU6n.js";import{C as Cn}from"./chevron-right-CkcSaX8x.js";import{C as bu}from"./chevron-down-BXYCSpWd.js";const zc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$c=gu("file-text",zc);const Yc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],qc=gu("image",Yc);var Ta;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(Ta||(Ta={}));var xa;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(xa||(xa={}));var _a;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(_a||(_a={}));var $;(function(e){e.CLAUDE_CODE="CLAUDE_CODE",e.GEMINI_CLI="GEMINI_CLI",e.CURSOR_AGENT="CURSOR_AGENT",e.CODEX="CODEX",e.QWEN_CODE="QWEN_CODE",e.KIRO_CLI="KIRO_CLI",e.OPENCODE="OPENCODE",e.PI_CODING_AGENT="PI_CODING_AGENT",e.GROK_BUILD="GROK_BUILD",e.MINION_CODE="MINION_CODE"})($||($={}));var Te;(function(e){e.CLI="CLI",e.ACP="ACP"})(Te||(Te={}));var ka;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(ka||(ka={}));var Aa;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(Aa||(Aa={}));var Ca;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(Ca||(Ca={}));var ya;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(ya||(ya={}));var Z;(function(e){e.Action="Action",e.Assistant="Assistant",e.Info="Info",e.Tool="Tool",e.User="User",e.Cursor="Cursor",e.Error="Error",e.Warning="Warning"})(Z||(Z={}));function Vc(e){const t=e.metadata?.toolName||"Tool",n=e.metadata?.action,r=e.metadata?.status,i={file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"},a=e.metadata?.toolKind?t:n?i[n]:t;return r==="success"?`${a} ✓`:r==="failed"?`${a} ✗`:r==="pending_approval"?`${a} (待审批)`:a}function Wc(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,timestamp:e.timestamp,type:Z.User,content:e.content};case"assistant_message":return{id:e.id,timestamp:e.timestamp,type:Z.Assistant,content:e.content};case"next_action":return{id:e.id,timestamp:e.timestamp,type:Z.Action,content:e.content};case"thinking":return{id:e.id,timestamp:e.timestamp,type:Z.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,timestamp:e.timestamp,type:Z.Tool,title:Vc(e),content:e.content,isCollapsed:e.metadata?.status==="success",tool:{action:e.metadata?.action,name:e.metadata?.toolName,id:e.metadata?.toolId,kind:e.metadata?.toolKind,status:e.metadata?.status,content:e.metadata?.toolContent,locations:e.metadata?.toolLocations,inputSummary:e.metadata?.toolInputSummary,outputSummary:e.metadata?.toolOutputSummary}};case"error_message":return{id:e.id,timestamp:e.timestamp,type:Z.Error,content:e.content};case"warning_message":return{id:e.id,timestamp:e.timestamp,type:Z.Warning,content:e.content};case"system_message":return{id:e.id,timestamp:e.timestamp,type:Z.Info,content:e.content};case"loading":return{id:e.id,timestamp:e.timestamp,type:Z.Cursor,content:"",cursorActivity:{processingStartedAt:e.timestamp}};case"token_usage_info":if(e.metadata?.tokenUsage){const{totalTokens:t=0,modelContextWindow:n}=e.metadata.tokenUsage;return{id:e.id,timestamp:e.timestamp,type:Z.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function U_(e){return e.map(Wc).filter(t=>t!==null)}function j_(e){return{id:`cursor-${Date.now()}`,timestamp:e?.processingStartedAt??Date.now(),type:Z.Cursor,content:"",cursorActivity:e}}const Gc=["oss","ollama","lmstudio","amazon-bedrock"];function z_(e){return Gc.includes(e)}const $_={[$.CLAUDE_CODE]:{agentType:$.CLAUDE_CODE,apiBaseUrl:{kind:"env",path:"ANTHROPIC_BASE_URL",placeholder:"https://api.anthropic.com"},apiKey:{kind:"env",path:"ANTHROPIC_API_KEY"},model:{kind:"config",path:"model",placeholder:"claude-sonnet-4-20250514"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"},settingsFormat:"json"},[$.CODEX]:{agentType:$.CODEX,apiBaseUrl:{kind:"settings",path:"openai_base_url",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gpt-5.3-codex"},reasoningEffort:{kind:"settings",path:"model_reasoning_effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"dangerouslyBypassApprovalsAndSandbox",riskKind:"bypass-approvals-and-sandbox"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[$.GEMINI_CLI]:{agentType:$.GEMINI_CLI,apiKey:{kind:"env",path:"GEMINI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gemini-2.5-pro"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[$.CURSOR_AGENT]:{agentType:$.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[$.QWEN_CODE]:{agentType:$.QWEN_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://dashscope.aliyuncs.com/compatible-mode/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"qwen3-coder-plus"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[$.KIRO_CLI]:{agentType:$.KIRO_CLI,model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"trustAllTools",riskKind:"auto-approve"}},[$.OPENCODE]:{agentType:$.OPENCODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[$.PI_CODING_AGENT]:{agentType:$.PI_CODING_AGENT,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[$.GROK_BUILD]:{agentType:$.GROK_BUILD,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.x.ai/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"alwaysApprove",riskKind:"auto-approve"}},[$.MINION_CODE]:{agentType:$.MINION_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"}}},Y_={[$.CLAUDE_CODE]:[Te.CLI,Te.ACP],[$.GEMINI_CLI]:[Te.CLI,Te.ACP],[$.CURSOR_AGENT]:[Te.CLI,Te.ACP],[$.CODEX]:[Te.CLI,Te.ACP],[$.QWEN_CODE]:[Te.ACP],[$.KIRO_CLI]:[Te.ACP],[$.OPENCODE]:[Te.ACP],[$.PI_CODING_AGENT]:[Te.ACP],[$.GROK_BUILD]:[Te.ACP],[$.MINION_CODE]:[Te.ACP]},sr=(function(e){if(e==null)return Zc;if(typeof e=="function")return ur(e);if(typeof e=="object")return Array.isArray(e)?Kc(e):Qc(e);if(typeof e=="string")return Xc(e);throw new Error("Expected function, string, or object as test")});function Kc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sr(e[n]);return ur(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Qc(e){const t=e;return ur(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Xc(e){return ur(t);function t(n){return n&&n.type===e}}function ur(e){return t;function t(n,r,i){return!!(Jc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Zc(){return!0}function Jc(e){return e!==null&&typeof e=="object"&&"type"in e}const Tu=[],en=!0,qr=!1,Wn="skip";function Ni(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=sr(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Tu,E,k,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(f=eh(n(o,h)),f[0]===qr))return f;if("children"in o&&o.children){const y=o;if(y.children&&f[0]!==Wn)for(k=(r?y.children.length:-1)+s,N=h.concat(y);k>-1&&k<y.children.length;){const R=y.children[k];if(E=u(R,k,N)(),E[0]===qr)return E;k=typeof E[1]=="number"?E[1]:k+s}}return f}}}function eh(e){return Array.isArray(e)?e:typeof e=="number"?[en,e]:e==null?Tu:[e]}function st(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Ni(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function th({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=ah(e,t,n,r,i,a,s);st(c,h)}}function Na(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function nh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const rh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),ih=new Set(["javascript:","data:","file:","vbscript:"]);function Ia(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=Na(e,n);if(!s||ih.has(s.protocol)||!(rh.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=nh(e);return s&&t.some(c=>{const h=Na(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const Ar=Symbol("node-seen"),ah=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Ar])return en;if(o.tagName==="a"){const d=Ia(o.properties.href,t,e,!1,!1,i);return d===null?(o[Ar]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Wn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",en)}if(o.tagName==="img"){const d=Ia(o.properties.src,n,e,r,!0,i);return d===null?(o[Ar]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Wn):(o.properties.src=d,en)}return en};return u},xu=-1,or=0,rn=1,Gn=2,Ii=3,Si=4,wi=5,Li=6,_u=7,ku=8,Sa=typeof self=="object"?self:globalThis,sh=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case or:case xu:return n(s,i);case rn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Gn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case Ii:return n(new Date(s),i);case Si:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case wi:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case Li:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case _u:{const{name:u,message:o}=s;return n(new Sa[u](o),i)}case ku:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new Sa[a](s),i)};return r},wa=e=>sh(new Map,e)(0),wt="",{toString:uh}={},{keys:oh}=Object,Vt=e=>{const t=typeof e;if(t!=="object"||!e)return[or,t];const n=uh.call(e).slice(8,-1);switch(n){case"Array":return[rn,wt];case"Object":return[Gn,wt];case"Date":return[Ii,wt];case"RegExp":return[Si,wt];case"Map":return[wi,wt];case"Set":return[Li,wt];case"DataView":return[rn,n]}return n.includes("Array")?[rn,n]:n.includes("Error")?[_u,n]:[Gn,n]},Pn=([e,t])=>e===or&&(t==="function"||t==="symbol"),lh=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Vt(s);switch(u){case or:{let h=s;switch(o){case"bigint":u=ku,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([xu],s)}return i([u,h],s)}case rn:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const h=[],d=i([u,h],s);for(const p of s)h.push(a(p));return d}case Gn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const p of oh(s))(e||!Pn(Vt(s[p])))&&h.push([a(p),a(s[p])]);return d}case Ii:return i([u,s.toISOString()],s);case Si:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case wi:{const h=[],d=i([u,h],s);for(const[p,f]of s)(e||!(Pn(Vt(p))||Pn(Vt(f))))&&h.push([a(p),a(f)]);return d}case Li:{const h=[],d=i([u,h],s);for(const p of s)(e||!Pn(Vt(p)))&&h.push(a(p));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},La=(e,{json:t,lossy:n}={})=>{const r=[];return lh(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wa(La(e,t)):structuredClone(e):(e,t)=>wa(La(e,t));class yn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yn.prototype.normal={};yn.prototype.property={};yn.prototype.space=void 0;function Au(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yn(n,r,t)}function En(e){return e.toLowerCase()}class Se{constructor(t,n){this.attribute=n,this.property=t}}Se.prototype.attribute="";Se.prototype.booleanish=!1;Se.prototype.boolean=!1;Se.prototype.commaOrSpaceSeparated=!1;Se.prototype.commaSeparated=!1;Se.prototype.defined=!1;Se.prototype.mustUseProperty=!1;Se.prototype.number=!1;Se.prototype.overloadedBoolean=!1;Se.prototype.property="";Se.prototype.spaceSeparated=!1;Se.prototype.space=void 0;let ch=0;const Q=kt(),me=kt(),Vr=kt(),M=kt(),le=kt(),Pt=kt(),Re=kt();function kt(){return 2**++ch}const Wr=Object.freeze(Object.defineProperty({__proto__:null,boolean:Q,booleanish:me,commaOrSpaceSeparated:Re,commaSeparated:Pt,number:M,overloadedBoolean:Vr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Cr=Object.keys(Wr);class Oi extends Se{constructor(t,n,r,i){let a=-1;if(super(t,n),Oa(this,"space",i),typeof r=="number")for(;++a<Cr.length;){const s=Cr[a];Oa(this,Cr[a],(r&Wr[s])===Wr[s])}}}Oi.prototype.defined=!0;function Oa(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Oi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[En(r)]=r,n[En(a.attribute)]=r}return new yn(t,n,e.space)}const Cu=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:me,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:le,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:M,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:le,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:me,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yu(e,t){return t in e?e[t]:t}function Nu(e,t){return yu(e,t.toLowerCase())}const hh=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:Q,allowPaymentRequest:Q,allowUserMedia:Q,alt:null,as:null,async:Q,autoCapitalize:null,autoComplete:le,autoFocus:Q,autoPlay:Q,blocking:le,capture:null,charSet:null,checked:Q,cite:null,className:le,cols:M,colSpan:null,content:null,contentEditable:me,controls:Q,controlsList:le,coords:M|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Q,defer:Q,dir:null,dirName:null,disabled:Q,download:Vr,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Q,formTarget:null,headers:le,height:M,hidden:Vr,high:M,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:Q,inputMode:null,integrity:null,is:null,isMap:Q,itemId:null,itemProp:le,itemRef:le,itemScope:Q,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Q,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:Q,muted:Q,name:null,nonce:null,noModule:Q,noValidate:Q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Q,optimum:M,pattern:null,ping:le,placeholder:null,playsInline:Q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Q,referrerPolicy:null,rel:le,required:Q,reversed:Q,rows:M,rowSpan:M,sandbox:le,scope:null,scoped:Q,seamless:Q,selected:Q,shadowRootClonable:Q,shadowRootDelegatesFocus:Q,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:Q,useMap:null,value:me,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Q,declare:Q,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:Q,noHref:Q,noShade:Q,noWrap:Q,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Q,disableRemotePlayback:Q,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:Nu}),dh=Ft({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Re,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:Q,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pt,g2:Pt,glyphName:Pt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Re,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yu}),Iu=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Su=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nu}),wu=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fh={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ph=/[A-Z]/g,Ra=/-[a-z]/g,mh=/^data[-\w.:]+$/i;function lr(e,t){const n=En(t);let r=t,i=Se;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ra,Eh);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ra.test(a)){let s=a.replace(ph,gh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Oi}return new i(r,t)}function gh(e){return"-"+e.toLowerCase()}function Eh(e){return e.charAt(1).toUpperCase()}const Nn=Au([Cu,hh,Iu,Su,wu],"html"),ot=Au([Cu,dh,Iu,Su,wu],"svg");function Da(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Lu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Pa=/[#.]/g;function bh(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Pa.lastIndex=i;const u=Pa.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Ma(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ou(e){return e.join(" ").trim()}function Ru(e,t,n){const r=n?kh(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=bh(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Th(s))u.unshift(s);else for(const[d,p]of Object.entries(s))xh(e,o.properties,d,p)}for(const c of u)Gr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Th(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function xh(e,t,n,r){const i=lr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Ma(r):i.commaSeparated?a=Da(r):i.commaOrSpaceSeparated?a=Ma(Da(r).join(" ")):a=va(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?_h(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(va(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gr(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Gr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function va(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||En(n)===En(t)))return!0}return n}function _h(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function kh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Ah=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Ch=Ru(Nn,"div"),yh=Ru(ot,"g",Ah);function Nh(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Ba(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=Ba(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ba(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const mt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Du={}.hasOwnProperty,Ih=Object.prototype;function Sh(e,t){const n=t||{};return Ri({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:Nn,verbose:n.verbose||!1},e)}function Ri(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$n(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Pu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Nh(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},$n(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$n(e,r,n),n}default:return n=wh(e,t),n}}function Pu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ri(e,t[n]);r.push(i)}return r}function wh(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?ot:Nn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Du.call(Ih,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?yh:Ch)(t.tagName,i,Pu(e,t.childNodes));if($n(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Rt(o.startTag),h=o&&o.endTag&&Rt(o.endTag),d=Ri(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function $n(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Lh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Lh(e,t,n){const r=Rt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Du.call(n.attrs,s)&&(a[lr(e.schema,s).property]=Rt(n.attrs[s]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Rt(e){const t=Fa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fa(e){return e.line&&e.column?e:void 0}const Ha={}.hasOwnProperty;function Mu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Ha.call(i,e)){const o=String(i[e]);s=Ha.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Oh={},Rh={}.hasOwnProperty,vu=Mu("type",{handlers:{root:Ph,element:Hh,text:Bh,comment:Fh,doctype:vh}});function Dh(e,t){const r=(t||Oh).space;return vu(e,r==="svg"?ot:Nn)}function Ph(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Di(e.children,n,t),Ht(e,n),n}function Mh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Di(e.children,n,t),Ht(e,n),n}function vh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function Bh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function Fh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function Hh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Rh.call(e.properties,a)){const o=Uh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[s],childNodes:[],parentNode:null};return u.childNodes=Di(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=Mh(e.content,r)),u}function Uh(e,t,n){const r=lr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Lu(n):Ou(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=mt[r.space]}return i}function Di(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=vu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ht(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const jh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],zh=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ce="�";var g;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(g||(g={}));const Ne={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Bu(e){return e>=55296&&e<=57343}function $h(e){return e>=56320&&e<=57343}function Yh(e,t){return(e-55296)*1024+9216+t}function Fu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Hu(e){return e>=64976&&e<=65007||zh.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const qh=65536;class Vh{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=qh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if($h(n))return this.pos++,this._addGap(),Yh(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(S.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Bu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Fu(t)?this._err(S.controlCharacterInInputStream):Hu(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var J;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(J||(J={}));function Uu(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Wh=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Gh=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Kh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Gh.get(e))!==null&&t!==void 0?t:e}var Ee;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ee||(Ee={}));const Qh=32;var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(at||(at={}));function Kr(e){return e>=Ee.ZERO&&e<=Ee.NINE}function Xh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function Zh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Kr(e)}function Jh(e){return e===Ee.EQUALS||Zh(e)}var ge;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ge||(ge={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class ed{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ge.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=ge.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ge.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=ge.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ge.NamedEntity,this.stateNamedEntity(t,n));case ge.NumericStart:return this.stateNumericStart(t,n);case ge.NumericDecimal:return this.stateNumericDecimal(t,n);case ge.NumericHex:return this.stateNumericHex(t,n);case ge.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Qh)===Ee.LOWER_X?(this.state=ge.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ge.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Kr(i)||Xh(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Kr(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(Kh(this.result),this.consumed),this.errors&&(t!==Ee.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=td(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(a===0||Jh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ze.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&at.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~at.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ge.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ge.NumericDecimal:return this.emitNumericEntity(0,2);case ge.NumericHex:return this.emitNumericEntity(0,3);case ge.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ge.EntityStart:return 0}}}function td(e,t,n,r){const i=(t&at.BRANCH_LENGTH)>>7,a=t&at.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var gt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(gt||(gt={}));var Me;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Me||(Me={}));var C;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(C||(C={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const nd=new Map([[C.A,l.A],[C.ADDRESS,l.ADDRESS],[C.ANNOTATION_XML,l.ANNOTATION_XML],[C.APPLET,l.APPLET],[C.AREA,l.AREA],[C.ARTICLE,l.ARTICLE],[C.ASIDE,l.ASIDE],[C.B,l.B],[C.BASE,l.BASE],[C.BASEFONT,l.BASEFONT],[C.BGSOUND,l.BGSOUND],[C.BIG,l.BIG],[C.BLOCKQUOTE,l.BLOCKQUOTE],[C.BODY,l.BODY],[C.BR,l.BR],[C.BUTTON,l.BUTTON],[C.CAPTION,l.CAPTION],[C.CENTER,l.CENTER],[C.CODE,l.CODE],[C.COL,l.COL],[C.COLGROUP,l.COLGROUP],[C.DD,l.DD],[C.DESC,l.DESC],[C.DETAILS,l.DETAILS],[C.DIALOG,l.DIALOG],[C.DIR,l.DIR],[C.DIV,l.DIV],[C.DL,l.DL],[C.DT,l.DT],[C.EM,l.EM],[C.EMBED,l.EMBED],[C.FIELDSET,l.FIELDSET],[C.FIGCAPTION,l.FIGCAPTION],[C.FIGURE,l.FIGURE],[C.FONT,l.FONT],[C.FOOTER,l.FOOTER],[C.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[C.FORM,l.FORM],[C.FRAME,l.FRAME],[C.FRAMESET,l.FRAMESET],[C.H1,l.H1],[C.H2,l.H2],[C.H3,l.H3],[C.H4,l.H4],[C.H5,l.H5],[C.H6,l.H6],[C.HEAD,l.HEAD],[C.HEADER,l.HEADER],[C.HGROUP,l.HGROUP],[C.HR,l.HR],[C.HTML,l.HTML],[C.I,l.I],[C.IMG,l.IMG],[C.IMAGE,l.IMAGE],[C.INPUT,l.INPUT],[C.IFRAME,l.IFRAME],[C.KEYGEN,l.KEYGEN],[C.LABEL,l.LABEL],[C.LI,l.LI],[C.LINK,l.LINK],[C.LISTING,l.LISTING],[C.MAIN,l.MAIN],[C.MALIGNMARK,l.MALIGNMARK],[C.MARQUEE,l.MARQUEE],[C.MATH,l.MATH],[C.MENU,l.MENU],[C.META,l.META],[C.MGLYPH,l.MGLYPH],[C.MI,l.MI],[C.MO,l.MO],[C.MN,l.MN],[C.MS,l.MS],[C.MTEXT,l.MTEXT],[C.NAV,l.NAV],[C.NOBR,l.NOBR],[C.NOFRAMES,l.NOFRAMES],[C.NOEMBED,l.NOEMBED],[C.NOSCRIPT,l.NOSCRIPT],[C.OBJECT,l.OBJECT],[C.OL,l.OL],[C.OPTGROUP,l.OPTGROUP],[C.OPTION,l.OPTION],[C.P,l.P],[C.PARAM,l.PARAM],[C.PLAINTEXT,l.PLAINTEXT],[C.PRE,l.PRE],[C.RB,l.RB],[C.RP,l.RP],[C.RT,l.RT],[C.RTC,l.RTC],[C.RUBY,l.RUBY],[C.S,l.S],[C.SCRIPT,l.SCRIPT],[C.SEARCH,l.SEARCH],[C.SECTION,l.SECTION],[C.SELECT,l.SELECT],[C.SOURCE,l.SOURCE],[C.SMALL,l.SMALL],[C.SPAN,l.SPAN],[C.STRIKE,l.STRIKE],[C.STRONG,l.STRONG],[C.STYLE,l.STYLE],[C.SUB,l.SUB],[C.SUMMARY,l.SUMMARY],[C.SUP,l.SUP],[C.TABLE,l.TABLE],[C.TBODY,l.TBODY],[C.TEMPLATE,l.TEMPLATE],[C.TEXTAREA,l.TEXTAREA],[C.TFOOT,l.TFOOT],[C.TD,l.TD],[C.TH,l.TH],[C.THEAD,l.THEAD],[C.TITLE,l.TITLE],[C.TR,l.TR],[C.TRACK,l.TRACK],[C.TT,l.TT],[C.U,l.U],[C.UL,l.UL],[C.SVG,l.SVG],[C.VAR,l.VAR],[C.WBR,l.WBR],[C.XMP,l.XMP]]);function Ut(e){var t;return(t=nd.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,rd={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Qr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);C.STYLE,C.SCRIPT,C.XMP,C.IFRAME,C.NOEMBED,C.NOFRAMES,C.PLAINTEXT;var b;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));const pe={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function id(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function tn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function ad(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function nt(e){return ad(e)||tn(e)}function Ua(e){return nt(e)||id(e)}function Mn(e){return e+32}function ju(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function ja(e){return ju(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function sd(e){return e===g.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:Bu(e)?S.surrogateCharacterReference:Hu(e)?S.noncharacterCharacterReference:Fu(e)||e===g.CARRIAGE_RETURN?S.controlCharacterReference:null}class ud{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Vh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ed(Wh,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=sd(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:J.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:J.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:J.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:J.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Uu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ut(t.tagName),t.type===J.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case J.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case J.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case J.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:J.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ju(t)?J.WHITESPACE_CHARACTER:t===g.NULL?J.NULL_CHARACTER:J.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(J.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ze.Attribute:Ze.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case b.DATA:{this._stateData(t);break}case b.RCDATA:{this._stateRcdata(t);break}case b.RAWTEXT:{this._stateRawtext(t);break}case b.SCRIPT_DATA:{this._stateScriptData(t);break}case b.PLAINTEXT:{this._statePlaintext(t);break}case b.TAG_OPEN:{this._stateTagOpen(t);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case b.TAG_NAME:{this._stateTagName(t);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case b.BOGUS_COMMENT:{this._stateBogusComment(t);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case b.COMMENT_START:{this._stateCommentStart(t);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case b.COMMENT:{this._stateComment(t);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case b.COMMENT_END:{this._stateCommentEnd(t);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case b.DOCTYPE:{this._stateDoctype(t);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case b.CDATA_SECTION:{this._stateCdataSection(t);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=b.DATA;break}case g.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&ja(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&ja(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=ce;break}default:this.currentAttr.name+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ne.DASH_DASH,!0)?(this._createCommentToken(Ne.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Ne.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ne.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Ne.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(Ne.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(S.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(tn(t))this._createDoctypeToken(String.fromCharCode(Mn(t))),this.state=b.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(ce),this.state=b.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.name+=ce;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ne.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ne.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.NULL:{this._err(S.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ua(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ua(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),za=new Set([...zu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Kn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),od=new Set([...Kn,l.OL,l.UL]),ld=new Set([...Kn,l.BUTTON]),$a=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ya=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),cd=new Set([l.TR,l.TEMPLATE,l.HTML]),hd=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),dd=new Set([l.TABLE,l.TEMPLATE,l.HTML]),fd=new Set([l.TD,l.TH]);class pd{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Qr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(fd,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(dd,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(hd,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(cd,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(Ya.has(i))return!1;break}case D.MATHML:{if($a.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Kn)}hasInListItemScope(t){return this.hasInDynamicScope(t,od)}hasInButtonScope(t){return this.hasInDynamicScope(t,ld)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Qr.has(n))return!0;if(Kn.has(n))return!1;break}case D.SVG:{if(Ya.has(n))return!1;break}case D.MATHML:{if($a.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&za.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&za.has(this.currentTagId);)this.pop()}}const yr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const qa={type:qe.Marker};class md{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===qe.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=yr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(qa)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qe.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(qa);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qe.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:Me.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},$u="html",gd="about:legacy-compat",Ed="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Yu=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],bd=[...Yu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Td=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),qu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xd=[...qu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Va(e,t){return t.some(n=>e.startsWith(n))}function _d(e){return e.name===$u&&e.publicId===null&&(e.systemId===null||e.systemId===gd)}function kd(e){if(e.name!==$u)return Me.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ed)return Me.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Td.has(n))return Me.QUIRKS;let r=t===null?bd:Yu;if(Va(n,r))return Me.QUIRKS;if(r=t===null?qu:xd,Va(n,r))return Me.LIMITED_QUIRKS}return Me.NO_QUIRKS}const Wa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Ad="definitionurl",Cd="definitionURL",yd=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Nd=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),Id=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Sd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function wd(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===gt.COLOR||r===gt.SIZE||r===gt.FACE)||Sd.has(t)}function Vu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Ad){e.attrs[t].name=Cd;break}}function Wu(e){for(let t=0;t<e.attrs.length;t++){const n=yd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Pi(e){for(let t=0;t<e.attrs.length;t++){const n=Nd.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Ld(e){const t=Id.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ut(e.tagName))}function Od(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Rd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===gt.ENCODING){const i=n[r].value.toLowerCase();return i===Wa.TEXT_HTML||i===Wa.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function Dd(e,t,n,r){return(!r||r===D.HTML)&&Rd(e,t,n)||(!r||r===D.MATHML)&&Od(e,t)}const Pd="hidden",Md=8,vd=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const Bd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Gu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Ga={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Ka{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Ga,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new ud(this.options,this),this.activeFormattingElements=new md(this.treeAdapter),this.fragmentContextID=r?Ut(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new pd(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Ga,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:Bd,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=pe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===C.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=pe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=pe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=pe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=pe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(C.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===J.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===C.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case J.CHARACTER:{this.onCharacter(t);break}case J.NULL_CHARACTER:{this.onNullCharacter(t);break}case J.COMMENT:{this.onComment(t);break}case J.DOCTYPE:{this.onDoctype(t);break}case J.START_TAG:{this._processStartTag(t);break}case J.END_TAG:{this.onEndTag(t);break}case J.EOF:{this.onEof(t);break}case J.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Dd(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===qe.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Gu.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return rd[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){p0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Qu(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{no(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Xn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Xn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Xr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Xr(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.AFTER_BODY:{Yd(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{qd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{Vd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?m0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{Wd(this,t);break}case T.BEFORE_HEAD:{Kd(this,t);break}case T.IN_HEAD:{$e(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Zd(this,t);break}case T.AFTER_HEAD:{ef(this,t);break}case T.IN_BODY:{_e(this,t);break}case T.IN_TABLE:{vt(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{Xf(this,t);break}case T.IN_COLUMN_GROUP:{Bi(this,t);break}case T.IN_TABLE_BODY:{dr(this,t);break}case T.IN_ROW:{fr(this,t);break}case T.IN_CELL:{e0(this,t);break}case T.IN_SELECT:{ao(this,t);break}case T.IN_SELECT_IN_TABLE:{n0(this,t);break}case T.IN_TEMPLATE:{i0(this,t);break}case T.AFTER_BODY:{s0(this,t);break}case T.IN_FRAMESET:{u0(this,t);break}case T.AFTER_FRAMESET:{l0(this,t);break}case T.AFTER_AFTER_BODY:{h0(this,t);break}case T.AFTER_AFTER_FRAMESET:{d0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?g0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{Gd(this,t);break}case T.BEFORE_HEAD:{Qd(this,t);break}case T.IN_HEAD:{Xd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Jd(this,t);break}case T.AFTER_HEAD:{tf(this,t);break}case T.IN_BODY:{hr(this,t);break}case T.TEXT:{jf(this,t);break}case T.IN_TABLE:{bn(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{Zf(this,t);break}case T.IN_COLUMN_GROUP:{Jf(this,t);break}case T.IN_TABLE_BODY:{Zr(this,t);break}case T.IN_ROW:{io(this,t);break}case T.IN_CELL:{t0(this,t);break}case T.IN_SELECT:{so(this,t);break}case T.IN_SELECT_IN_TABLE:{r0(this,t);break}case T.IN_TEMPLATE:{a0(this,t);break}case T.AFTER_BODY:{oo(this,t);break}case T.IN_FRAMESET:{o0(this,t);break}case T.AFTER_FRAMESET:{c0(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{eo(this,t);break}case T.TEXT:{zf(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_TEMPLATE:{uo(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{vi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ku(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{to(this,t);break}}}}function Fd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ju(e,t),n}function Hd(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Ud(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=vd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=jd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function jd(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function zd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ut(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $d(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Mi(e,t){for(let n=0;n<Md;n++){const r=Fd(e,t);if(!r)break;const i=Hd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Ud(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&zd(e,s,a),$d(e,i,r)}}function Xr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Yd(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qd(e,t){e._appendCommentNode(t,e.document)}function vi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function Vd(e,t){e._setDocumentType(t);const n=t.forceQuirks?Me.QUIRKS:kd(t);_d(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Wt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Me.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Wd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):an(e,t)}function Gd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&an(e,t)}function an(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Kd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:sn(e,t)}}function Qd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?sn(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function sn(e,t){e._insertFakeElement(C.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function $e(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,pe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,pe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,pe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,pe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:un(e,t)}}function Xd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{un(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function At(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function un(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Zd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{$e(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:on(e,t)}}function Jd(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{on(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function on(e,t){const n=t.type===J.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function ef(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),$e(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:ln(e,t)}}function tf(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{ln(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function ln(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,cr(e,t)}function cr(e,t){switch(t.type){case J.CHARACTER:{Qu(e,t);break}case J.WHITESPACE_CHARACTER:{Ku(e,t);break}case J.COMMENT:{Xr(e,t);break}case J.START_TAG:{_e(e,t);break}case J.END_TAG:{hr(e,t);break}case J.EOF:{eo(e,t);break}}}function Ku(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Qu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function af(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function sf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function uf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Qr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function of(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lf(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function cf(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function hf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=pe.PLAINTEXT}function df(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function ff(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(Mi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Mi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ef(e,t){e.treeAdapter.getDocumentMode(e.document)!==Me.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Xu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Zu(e){const t=Uu(e,gt.TYPE);return t!=null&&t.toLowerCase()===Pd}function bf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Zu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Tf(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function xf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _f(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Xu(e,t)}function kf(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Af(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Cf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Qa(e,t){e._switchToTextParsing(t,pe.RAWTEXT)}function yf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function Nf(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function If(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Sf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function wf(e,t){e._reconstructActiveFormattingElements(),Vu(t),Pi(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Lf(e,t){e._reconstructActiveFormattingElements(),Wu(t),Pi(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function _e(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{pf(e,t);break}case l.A:{ff(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{uf(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{sf(e,t);break}case l.LI:case l.DD:case l.DT:{cf(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Xu(e,t);break}case l.HR:{xf(e,t);break}case l.RB:case l.RTC:{If(e,t);break}case l.RT:case l.RP:{Sf(e,t);break}case l.PRE:case l.LISTING:{of(e,t);break}case l.XMP:{Af(e,t);break}case l.SVG:{Lf(e,t);break}case l.HTML:{nf(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{$e(e,t);break}case l.BODY:{rf(e,t);break}case l.FORM:{lf(e,t);break}case l.NOBR:{mf(e,t);break}case l.MATH:{wf(e,t);break}case l.TABLE:{Ef(e,t);break}case l.INPUT:{bf(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Tf(e,t);break}case l.IMAGE:{_f(e,t);break}case l.BUTTON:{df(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{gf(e,t);break}case l.IFRAME:{Cf(e,t);break}case l.SELECT:{yf(e,t);break}case l.OPTION:case l.OPTGROUP:{Nf(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Qa(e,t);break}case l.FRAMESET:{af(e,t);break}case l.TEXTAREA:{kf(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Qa(e,t):Xa(e,t);break}case l.PLAINTEXT:{hf(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Xa(e,t)}}function Of(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Rf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,oo(e,t))}function Df(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Pf(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function Mf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function vf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function Bf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ff(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Hf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Uf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Ju(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function hr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Mi(e,t);break}case l.P:{Mf(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Df(e,t);break}case l.LI:{vf(e);break}case l.DD:case l.DT:{Bf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Ff(e);break}case l.BR:{Uf(e);break}case l.BODY:{Of(e,t);break}case l.HTML:{Rf(e,t);break}case l.FORM:{Pf(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Hf(e,t);break}case l.TEMPLATE:{At(e,t);break}default:Ju(e,t)}}function eo(e,t){e.tmplInsertionModeStack.length>0?uo(e,t):vi(e,t)}function jf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zf(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nr(e,t){if(e.openElements.currentTagId!==void 0&&Gu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case J.CHARACTER:{no(e,t);break}case J.WHITESPACE_CHARACTER:{to(e,t);break}}else In(e,t)}function $f(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function Yf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function qf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Bi(e,t)}function Vf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function Wf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,dr(e,t)}function Gf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Kf(e,t){Zu(t)?e._appendElement(t,D.HTML):In(e,t),t.ackSelfClosing=!0}function Qf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{Wf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}case l.COL:{qf(e,t);break}case l.FORM:{Qf(e,t);break}case l.TABLE:{Gf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{Vf(e,t);break}case l.INPUT:{Kf(e,t);break}case l.CAPTION:{$f(e,t);break}case l.COLGROUP:{Yf(e,t);break}default:In(e,t)}}function bn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cr(e,t),e.fosterParentingEnabled=n}function to(e,t){e.pendingCharacterTokens.push(t)}function no(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Gt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ro=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Xf(e,t){const n=t.tagID;ro.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,vt(e,t)):_e(e,t)}function Zf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&bn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:hr(e,t)}}function Bi(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{$e(e,t);break}default:Qn(e,t)}}function Jf(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{At(e,t);break}case l.COL:break;default:Qn(e,t)}}function Qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function dr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(C.TR,l.TR),e.insertionMode=T.IN_ROW,fr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,vt(e,t));break}default:vt(e,t)}}function Zr(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,bn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:bn(e,t)}}function fr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,dr(e,t));break}default:vt(e,t)}}function io(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Zr(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Zr(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:bn(e,t)}}function e0(e,t){const n=t.tagID;ro.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),fr(e,t)):_e(e,t)}function t0(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),io(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:hr(e,t)}}function ao(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}}}function so(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}}}function n0(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ao(e,t)}function r0(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):so(e,t)}function i0(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{$e(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,vt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Bi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,dr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,fr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,_e(e,t)}}function a0(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function uo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vi(e,t)}function s0(e,t){t.tagID===l.HTML?_e(e,t):Xn(e,t)}function oo(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Xn(e,t)}function Xn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function u0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{$e(e,t);break}}}function o0(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function l0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function c0(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function h0(e,t){t.tagID===l.HTML?_e(e,t):Yn(e,t)}function Yn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function d0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function f0(e,t){t.chars=ce,e._insertCharacters(t)}function p0(e,t){e._insertCharacters(t),e.framesetOk=!1}function lo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function m0(e,t){if(wd(t))lo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Vu(t):r===D.SVG&&(Ld(t),Wu(t)),Pi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function g0(e,t){if(t.tagID===l.P||t.tagID===l.BR){lo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}C.AREA,C.BASE,C.BASEFONT,C.BGSOUND,C.BR,C.COL,C.EMBED,C.FRAME,C.HR,C.IMG,C.INPUT,C.KEYGEN,C.LINK,C.META,C.PARAM,C.SOURCE,C.TRACK,C.WBR;const pr=co("end"),Ve=co("start");function co(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ho(e){const t=Ve(e),n=pr(e);if(t&&n)return{start:t,end:n}}const E0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,b0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Za={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fo(e,t){const n=S0(e),r=Mu("type",{handlers:{root:T0,element:x0,text:_0,comment:mo,doctype:k0,raw:C0},unknown:y0}),i={parser:n?new Ka(Za):Ka.getFragmentParser(void 0,Za),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),jt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=Sh(a,{file:i.options.file});return i.stitches&&st(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function po(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function T0(e,t){po(e.children,t)}function x0(e,t){N0(e,t),po(e.children,t),I0(e,t)}function _0(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:J.CHARACTER,chars:e.value,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function k0(e,t){const n={type:J.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function A0(e,t){t.stitches=!0;const n=w0(e);if("children"in e&&"children"in n){const r=fo({type:"root",children:e.children},t.options);n.children=r.children}mo({type:"comment",value:{stitch:n}},t)}function mo(e,t){const n=e.value,r={type:J.COMMENT,data:n,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function C0(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,go(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(E0,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function y0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))A0(n,t);else{let r="";throw b0.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function jt(e,t){go(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=pe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function go(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function N0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:mt.html;i===mt.html&&n==="svg"&&(i=mt.svg);const a=Dh({...e,children:[]},{space:i===mt.svg?"svg":"html"}),s={type:J.START_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Sn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function I0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&jh.includes(n)||t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,pr(e));const r={type:J.END_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Sn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pe.RCDATA||t.parser.tokenizer.state===pe.RAWTEXT||t.parser.tokenizer.state===pe.SCRIPT_DATA)&&(t.parser.tokenizer.state=pe.DATA)}function S0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Sn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=pr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function w0(e){return"children"in e?bt({...e,children:[]}):bt(e)}function Jr(e){return function(t,n){return fo(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],cn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},it={}.hasOwnProperty;function L0(e,t){let n={type:"root",children:[]};const r={schema:t?{...cn,...t}:cn,stack:[]},i=Eo(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Eo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return O0(e,n);case"doctype":return R0(e,n);case"element":return D0(e,n);case"root":return P0(e,n);case"text":return M0(e,n)}}}function O0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return wn(a,t),a}}function R0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function D0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=bo(e,t.children),i=v0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return wn(s,t),s}function P0(e,t){const r={type:"root",children:bo(e,t.children)};return wn(r,t),r}function M0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function bo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Eo(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function v0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&it.call(r,n)?r[n]:void 0,s=r&&it.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(it.call(u,c)){const h=u[c];let d=Ja(e,es(a,c),c,h);d==null&&(d=Ja(e,es(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&it.call(i,n)){const h=i[n];for(c in h)it.call(h,c)&&!it.call(o,c)&&(o[c]=h[c])}return o}function Ja(e,t,n,r){return t?Array.isArray(r)?B0(e,t,n,r):To(e,t,n,r):void 0}function B0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=To(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function To(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&F0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function F0(e,t,n){const r=e.schema.protocols&&it.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=ho(t);t.data&&(e.data=bt(t.data)),n&&(e.position=n)}function es(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function xo(e){return function(t){return L0(t,e)}}function ts(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ce=lt(/[A-Za-z]/),xe=lt(/[\dA-Za-z]/),H0=lt(/[#-'*+\--9=?A-Z^-~]/);function Zn(e){return e!==null&&(e<32||e===127)}const ei=lt(/\d/),U0=lt(/[\dA-Fa-f]/),j0=lt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function ee(e){return e===-2||e===-1||e===32}const mr=lt(new RegExp("\\p{P}|\\p{S}","u")),Tt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function z0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $0(e,t,n){const i=sr((n||{}).ignore||[]),a=Y0(t);let s=-1;for(;++s<a.length;)Ni(e,"text",u);function u(c,h){let d=-1,p;for(;++d<h.length;){const f=h[d],E=p?p.children:void 0;if(i(f,E?E.indexOf(f):void 0,p))return;p=f}if(p)return o(c,h)}function o(c,h){const d=h[h.length-1],p=a[s][0],f=a[s][1];let E=0;const N=d.children.indexOf(c);let y=!1,R=[];p.lastIndex=0;let L=p.exec(c.value);for(;L;){const H=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=f(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?p.lastIndex=H+1:(E!==H&&R.push({type:"text",value:c.value.slice(E,H)}),Array.isArray(w)?R.push(...w):w&&R.push(w),E=H+L[0].length,y=!0),!p.global)break;L=p.exec(c.value)}return y?(E<c.value.length&&R.push({type:"text",value:c.value.slice(E)}),d.children.splice(N,1,...R)):R=[c],N+R.length}}function Y0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([q0(i[0]),V0(i[1])])}return t}function q0(e){return typeof e=="string"?new RegExp(z0(e),"g"):e}function V0(e){return typeof e=="function"?e:function(){return e}}const Ir="phrasing",Sr=["autolink","link","image","label"];function W0(){return{transforms:[ep],enter:{literalAutolink:K0,literalAutolinkEmail:wr,literalAutolinkHttp:wr,literalAutolinkWww:wr},exit:{literalAutolink:J0,literalAutolinkEmail:Z0,literalAutolinkHttp:Q0,literalAutolinkWww:X0}}}function G0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Sr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Sr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ir,notInConstruct:Sr}]}}function K0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wr(e){this.config.enter.autolinkProtocol.call(this,e)}function Q0(e){this.config.exit.autolinkProtocol.call(this,e)}function X0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Z0(e){this.config.exit.autolinkEmail.call(this,e)}function J0(e){this.exit(e)}function ep(e){$0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tp],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),np]],{ignore:["link","linkReference"]})}function tp(e,t,n,r,i){let a="";if(!_o(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!rp(n)))return!1;const s=ip(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function np(e,t,n,r){return!_o(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rp(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ip(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ts(e,"(");let a=ts(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function _o(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tt(n)||mr(n))&&(!t||n!==47)}function ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ko.peek=fp;function ap(){this.buffer()}function sp(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function up(){this.buffer()}function op(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cp(e){this.exit(e)}function hp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dp(e){this.exit(e)}function fp(){return"["}function ko(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function pp(){return{enter:{gfmFootnoteCallString:ap,gfmFootnoteCall:sp,gfmFootnoteDefinitionLabelString:up,gfmFootnoteDefinition:op},exit:{gfmFootnoteCallString:lp,gfmFootnoteCall:cp,gfmFootnoteDefinitionLabelString:hp,gfmFootnoteDefinition:dp}}}function mp(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ko},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
4
- `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Ao:gp))),c(),o}}function gp(e,t,n){return t===0?e:Ao(e,t,n)}function Ao(e,t,n){return(n?"":" ")+e}const Ep=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Co.peek=kp;function bp(){return{canContainEols:["delete"],enter:{strikethrough:xp},exit:{strikethrough:_p}}}function Tp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ep}],handlers:{delete:Co}}}function xp(e){this.enter({type:"delete",children:[]},e)}function _p(e){this.exit(e)}function Co(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function kp(){return"~"}function Ap(e){return e.length}function Cp(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ap,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const k=[],N=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const R=yp(e[h][y]);if(n.alignDelimiters!==!1){const L=i(R);N[y]=L,(o[y]===void 0||L>o[y])&&(o[y]=L)}k.push(R)}s[h]=k,u[h]=N}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=ns(r[d]);else{const k=ns(r);for(;++d<c;)a[d]=k}d=-1;const p=[],f=[];for(;++d<c;){const k=a[d];let N="",y="";k===99?(N=":",y=":"):k===108?N=":":k===114&&(y=":");let R=n.alignDelimiters===!1?1:Math.max(1,o[d]-N.length-y.length);const L=N+"-".repeat(R)+y;n.alignDelimiters!==!1&&(R=N.length+R+y.length,R>o[d]&&(o[d]=R),f[d]=R),p[d]=L}s.splice(1,0,p),u.splice(1,0,f),h=-1;const E=[];for(;++h<s.length;){const k=s[h],N=u[h];d=-1;const y=[];for(;++d<c;){const R=k[d]||"";let L="",H="";if(n.alignDelimiters!==!1){const j=o[d]-(N[d]||0),w=a[d];w===114?L=" ".repeat(j):w===99?j%2?(L=" ".repeat(j/2+.5),H=" ".repeat(j/2-.5)):(L=" ".repeat(j/2),H=L):H=" ".repeat(j)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(L),y.push(R),n.alignDelimiters!==!1&&y.push(H),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}E.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return E.join(`
5
- `)}function yp(e){return e==null?"":String(e)}function ns(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Np(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Ip);return i(),s}function Ip(e,t,n){return">"+(n?"":" ")+e}function Sp(e,t){return rs(e,t.inConstruct,!0)&&!rs(e,t.notInConstruct,!1)}function rs(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function is(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
6
- `&&Sp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
7
- `}function wp(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Lp(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Op(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rp(e,t,n,r){const i=Op(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Lp(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,Dp);return d(),p}const u=n.createTracker(r),o=i.repeat(Math.max(wp(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-xJQWFyR7.js","assets/index-D9kBRMR0.js","assets/index-CjAJoGg5.css","assets/chevron-right-pH923eYp.js","assets/chevron-down-BQcW9sFf.js","assets/index-CjdqAcbu.js"])))=>i.map(i=>d[i]);
2
+ import{k as gu,ab as Eu,r as A,j as m,aK as Mc,aL as vc,ay as Ci,O as An,l as ar,u as yi,a3 as Bc,X as Fc,m as Hc,p as Uc,aM as jc}from"./index-D9kBRMR0.js";import{C as Cn}from"./chevron-right-pH923eYp.js";import{C as bu}from"./chevron-down-BQcW9sFf.js";const zc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$c=gu("file-text",zc);const Yc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],qc=gu("image",Yc);var Ta;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(Ta||(Ta={}));var xa;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(xa||(xa={}));var _a;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(_a||(_a={}));var $;(function(e){e.CLAUDE_CODE="CLAUDE_CODE",e.GEMINI_CLI="GEMINI_CLI",e.CURSOR_AGENT="CURSOR_AGENT",e.CODEX="CODEX",e.QWEN_CODE="QWEN_CODE",e.KIRO_CLI="KIRO_CLI",e.OPENCODE="OPENCODE",e.PI_CODING_AGENT="PI_CODING_AGENT",e.GROK_BUILD="GROK_BUILD",e.MINION_CODE="MINION_CODE"})($||($={}));var Te;(function(e){e.CLI="CLI",e.ACP="ACP"})(Te||(Te={}));var ka;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(ka||(ka={}));var Aa;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(Aa||(Aa={}));var Ca;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(Ca||(Ca={}));var ya;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(ya||(ya={}));var Z;(function(e){e.Action="Action",e.Assistant="Assistant",e.Info="Info",e.Tool="Tool",e.User="User",e.Cursor="Cursor",e.Error="Error",e.Warning="Warning"})(Z||(Z={}));function Vc(e){const t=e.metadata?.toolName||"Tool",n=e.metadata?.action,r=e.metadata?.status,i={file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"},a=e.metadata?.toolKind?t:n?i[n]:t;return r==="success"?`${a} ✓`:r==="failed"?`${a} ✗`:r==="pending_approval"?`${a} (待审批)`:a}function Wc(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,timestamp:e.timestamp,type:Z.User,content:e.content};case"assistant_message":return{id:e.id,timestamp:e.timestamp,type:Z.Assistant,content:e.content};case"next_action":return{id:e.id,timestamp:e.timestamp,type:Z.Action,content:e.content};case"thinking":return{id:e.id,timestamp:e.timestamp,type:Z.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,timestamp:e.timestamp,type:Z.Tool,title:Vc(e),content:e.content,isCollapsed:e.metadata?.status==="success",tool:{action:e.metadata?.action,name:e.metadata?.toolName,id:e.metadata?.toolId,kind:e.metadata?.toolKind,status:e.metadata?.status,content:e.metadata?.toolContent,locations:e.metadata?.toolLocations,inputSummary:e.metadata?.toolInputSummary,outputSummary:e.metadata?.toolOutputSummary}};case"error_message":return{id:e.id,timestamp:e.timestamp,type:Z.Error,content:e.content};case"warning_message":return{id:e.id,timestamp:e.timestamp,type:Z.Warning,content:e.content};case"system_message":return{id:e.id,timestamp:e.timestamp,type:Z.Info,content:e.content};case"loading":return{id:e.id,timestamp:e.timestamp,type:Z.Cursor,content:"",cursorActivity:{processingStartedAt:e.timestamp}};case"token_usage_info":if(e.metadata?.tokenUsage){const{totalTokens:t=0,modelContextWindow:n}=e.metadata.tokenUsage;return{id:e.id,timestamp:e.timestamp,type:Z.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function j_(e){return e.map(Wc).filter(t=>t!==null)}function z_(e){return{id:`cursor-${Date.now()}`,timestamp:e?.processingStartedAt??Date.now(),type:Z.Cursor,content:"",cursorActivity:e}}const Gc=["oss","ollama","lmstudio","amazon-bedrock"];function $_(e){return Gc.includes(e)}const Y_={[$.CLAUDE_CODE]:{agentType:$.CLAUDE_CODE,apiBaseUrl:{kind:"env",path:"ANTHROPIC_BASE_URL",placeholder:"https://api.anthropic.com"},apiKey:{kind:"env",path:"ANTHROPIC_API_KEY"},model:{kind:"config",path:"model",placeholder:"claude-sonnet-4-20250514"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"},settingsFormat:"json"},[$.CODEX]:{agentType:$.CODEX,apiBaseUrl:{kind:"settings",path:"openai_base_url",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gpt-5.3-codex"},reasoningEffort:{kind:"settings",path:"model_reasoning_effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"dangerouslyBypassApprovalsAndSandbox",riskKind:"bypass-approvals-and-sandbox"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[$.GEMINI_CLI]:{agentType:$.GEMINI_CLI,apiKey:{kind:"env",path:"GEMINI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gemini-2.5-pro"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[$.CURSOR_AGENT]:{agentType:$.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[$.QWEN_CODE]:{agentType:$.QWEN_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://dashscope.aliyuncs.com/compatible-mode/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"qwen3-coder-plus"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[$.KIRO_CLI]:{agentType:$.KIRO_CLI,model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"trustAllTools",riskKind:"auto-approve"}},[$.OPENCODE]:{agentType:$.OPENCODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[$.PI_CODING_AGENT]:{agentType:$.PI_CODING_AGENT,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[$.GROK_BUILD]:{agentType:$.GROK_BUILD,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.x.ai/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"alwaysApprove",riskKind:"auto-approve"}},[$.MINION_CODE]:{agentType:$.MINION_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"}}},q_={[$.CLAUDE_CODE]:[Te.CLI,Te.ACP],[$.GEMINI_CLI]:[Te.CLI,Te.ACP],[$.CURSOR_AGENT]:[Te.CLI,Te.ACP],[$.CODEX]:[Te.CLI,Te.ACP],[$.QWEN_CODE]:[Te.ACP],[$.KIRO_CLI]:[Te.ACP],[$.OPENCODE]:[Te.ACP],[$.PI_CODING_AGENT]:[Te.ACP],[$.GROK_BUILD]:[Te.ACP],[$.MINION_CODE]:[Te.ACP]},Kc=Object.freeze(Object.values($).filter(e=>e!==$.MINION_CODE));new Set(Kc);const sr=(function(e){if(e==null)return Jc;if(typeof e=="function")return ur(e);if(typeof e=="object")return Array.isArray(e)?Qc(e):Xc(e);if(typeof e=="string")return Zc(e);throw new Error("Expected function, string, or object as test")});function Qc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sr(e[n]);return ur(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Xc(e){const t=e;return ur(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Zc(e){return ur(t);function t(n){return n&&n.type===e}}function ur(e){return t;function t(n,r,i){return!!(eh(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Jc(){return!0}function eh(e){return e!==null&&typeof e=="object"&&"type"in e}const Tu=[],en=!0,qr=!1,Wn="skip";function Ni(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=sr(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Tu,E,k,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(f=th(n(o,h)),f[0]===qr))return f;if("children"in o&&o.children){const y=o;if(y.children&&f[0]!==Wn)for(k=(r?y.children.length:-1)+s,N=h.concat(y);k>-1&&k<y.children.length;){const R=y.children[k];if(E=u(R,k,N)(),E[0]===qr)return E;k=typeof E[1]=="number"?E[1]:k+s}}return f}}}function th(e){return Array.isArray(e)?e:typeof e=="number"?[en,e]:e==null?Tu:[e]}function st(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Ni(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function nh({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=sh(e,t,n,r,i,a,s);st(c,h)}}function Na(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function rh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const ih=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),ah=new Set(["javascript:","data:","file:","vbscript:"]);function Ia(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=Na(e,n);if(!s||ah.has(s.protocol)||!(ih.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=rh(e);return s&&t.some(c=>{const h=Na(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const Ar=Symbol("node-seen"),sh=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Ar])return en;if(o.tagName==="a"){const d=Ia(o.properties.href,t,e,!1,!1,i);return d===null?(o[Ar]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Wn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",en)}if(o.tagName==="img"){const d=Ia(o.properties.src,n,e,r,!0,i);return d===null?(o[Ar]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Wn):(o.properties.src=d,en)}return en};return u},xu=-1,or=0,rn=1,Gn=2,Ii=3,Si=4,wi=5,Li=6,_u=7,ku=8,Sa=typeof self=="object"?self:globalThis,uh=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case or:case xu:return n(s,i);case rn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Gn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case Ii:return n(new Date(s),i);case Si:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case wi:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case Li:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case _u:{const{name:u,message:o}=s;return n(new Sa[u](o),i)}case ku:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new Sa[a](s),i)};return r},wa=e=>uh(new Map,e)(0),wt="",{toString:oh}={},{keys:lh}=Object,Vt=e=>{const t=typeof e;if(t!=="object"||!e)return[or,t];const n=oh.call(e).slice(8,-1);switch(n){case"Array":return[rn,wt];case"Object":return[Gn,wt];case"Date":return[Ii,wt];case"RegExp":return[Si,wt];case"Map":return[wi,wt];case"Set":return[Li,wt];case"DataView":return[rn,n]}return n.includes("Array")?[rn,n]:n.includes("Error")?[_u,n]:[Gn,n]},Pn=([e,t])=>e===or&&(t==="function"||t==="symbol"),ch=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Vt(s);switch(u){case or:{let h=s;switch(o){case"bigint":u=ku,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([xu],s)}return i([u,h],s)}case rn:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const h=[],d=i([u,h],s);for(const p of s)h.push(a(p));return d}case Gn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const p of lh(s))(e||!Pn(Vt(s[p])))&&h.push([a(p),a(s[p])]);return d}case Ii:return i([u,s.toISOString()],s);case Si:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case wi:{const h=[],d=i([u,h],s);for(const[p,f]of s)(e||!(Pn(Vt(p))||Pn(Vt(f))))&&h.push([a(p),a(f)]);return d}case Li:{const h=[],d=i([u,h],s);for(const p of s)(e||!Pn(Vt(p)))&&h.push(a(p));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},La=(e,{json:t,lossy:n}={})=>{const r=[];return ch(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wa(La(e,t)):structuredClone(e):(e,t)=>wa(La(e,t));class yn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yn.prototype.normal={};yn.prototype.property={};yn.prototype.space=void 0;function Au(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yn(n,r,t)}function En(e){return e.toLowerCase()}class Se{constructor(t,n){this.attribute=n,this.property=t}}Se.prototype.attribute="";Se.prototype.booleanish=!1;Se.prototype.boolean=!1;Se.prototype.commaOrSpaceSeparated=!1;Se.prototype.commaSeparated=!1;Se.prototype.defined=!1;Se.prototype.mustUseProperty=!1;Se.prototype.number=!1;Se.prototype.overloadedBoolean=!1;Se.prototype.property="";Se.prototype.spaceSeparated=!1;Se.prototype.space=void 0;let hh=0;const Q=kt(),me=kt(),Vr=kt(),M=kt(),le=kt(),Pt=kt(),Re=kt();function kt(){return 2**++hh}const Wr=Object.freeze(Object.defineProperty({__proto__:null,boolean:Q,booleanish:me,commaOrSpaceSeparated:Re,commaSeparated:Pt,number:M,overloadedBoolean:Vr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Cr=Object.keys(Wr);class Oi extends Se{constructor(t,n,r,i){let a=-1;if(super(t,n),Oa(this,"space",i),typeof r=="number")for(;++a<Cr.length;){const s=Cr[a];Oa(this,Cr[a],(r&Wr[s])===Wr[s])}}}Oi.prototype.defined=!0;function Oa(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Oi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[En(r)]=r,n[En(a.attribute)]=r}return new yn(t,n,e.space)}const Cu=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:me,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:le,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:M,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:le,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:me,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yu(e,t){return t in e?e[t]:t}function Nu(e,t){return yu(e,t.toLowerCase())}const dh=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:Q,allowPaymentRequest:Q,allowUserMedia:Q,alt:null,as:null,async:Q,autoCapitalize:null,autoComplete:le,autoFocus:Q,autoPlay:Q,blocking:le,capture:null,charSet:null,checked:Q,cite:null,className:le,cols:M,colSpan:null,content:null,contentEditable:me,controls:Q,controlsList:le,coords:M|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Q,defer:Q,dir:null,dirName:null,disabled:Q,download:Vr,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Q,formTarget:null,headers:le,height:M,hidden:Vr,high:M,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:Q,inputMode:null,integrity:null,is:null,isMap:Q,itemId:null,itemProp:le,itemRef:le,itemScope:Q,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Q,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:Q,muted:Q,name:null,nonce:null,noModule:Q,noValidate:Q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Q,optimum:M,pattern:null,ping:le,placeholder:null,playsInline:Q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Q,referrerPolicy:null,rel:le,required:Q,reversed:Q,rows:M,rowSpan:M,sandbox:le,scope:null,scoped:Q,seamless:Q,selected:Q,shadowRootClonable:Q,shadowRootDelegatesFocus:Q,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:Q,useMap:null,value:me,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Q,declare:Q,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:Q,noHref:Q,noShade:Q,noWrap:Q,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Q,disableRemotePlayback:Q,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:Nu}),fh=Ft({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Re,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:Q,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pt,g2:Pt,glyphName:Pt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Re,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yu}),Iu=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Su=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nu}),wu=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ph={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},mh=/[A-Z]/g,Ra=/-[a-z]/g,gh=/^data[-\w.:]+$/i;function lr(e,t){const n=En(t);let r=t,i=Se;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&gh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ra,bh);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ra.test(a)){let s=a.replace(mh,Eh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Oi}return new i(r,t)}function Eh(e){return"-"+e.toLowerCase()}function bh(e){return e.charAt(1).toUpperCase()}const Nn=Au([Cu,dh,Iu,Su,wu],"html"),ot=Au([Cu,fh,Iu,Su,wu],"svg");function Da(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Lu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Pa=/[#.]/g;function Th(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Pa.lastIndex=i;const u=Pa.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Ma(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ou(e){return e.join(" ").trim()}function Ru(e,t,n){const r=n?Ah(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Th(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,xh(s))u.unshift(s);else for(const[d,p]of Object.entries(s))_h(e,o.properties,d,p)}for(const c of u)Gr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function xh(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function _h(e,t,n,r){const i=lr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Ma(r):i.commaSeparated?a=Da(r):i.commaOrSpaceSeparated?a=Ma(Da(r).join(" ")):a=va(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?kh(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(va(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gr(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Gr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function va(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||En(n)===En(t)))return!0}return n}function kh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Ah(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Ch=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],yh=Ru(Nn,"div"),Nh=Ru(ot,"g",Ch);function Ih(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Ba(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=Ba(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ba(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const mt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Du={}.hasOwnProperty,Sh=Object.prototype;function wh(e,t){const n=t||{};return Ri({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:Nn,verbose:n.verbose||!1},e)}function Ri(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$n(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Pu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Ih(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},$n(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$n(e,r,n),n}default:return n=Lh(e,t),n}}function Pu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ri(e,t[n]);r.push(i)}return r}function Lh(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?ot:Nn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Du.call(Sh,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?Nh:yh)(t.tagName,i,Pu(e,t.childNodes));if($n(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Rt(o.startTag),h=o&&o.endTag&&Rt(o.endTag),d=Ri(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function $n(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Oh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Oh(e,t,n){const r=Rt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Du.call(n.attrs,s)&&(a[lr(e.schema,s).property]=Rt(n.attrs[s]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Rt(e){const t=Fa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fa(e){return e.line&&e.column?e:void 0}const Ha={}.hasOwnProperty;function Mu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Ha.call(i,e)){const o=String(i[e]);s=Ha.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Rh={},Dh={}.hasOwnProperty,vu=Mu("type",{handlers:{root:Mh,element:Uh,text:Fh,comment:Hh,doctype:Bh}});function Ph(e,t){const r=(t||Rh).space;return vu(e,r==="svg"?ot:Nn)}function Mh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Di(e.children,n,t),Ht(e,n),n}function vh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Di(e.children,n,t),Ht(e,n),n}function Bh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function Fh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function Hh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function Uh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Dh.call(e.properties,a)){const o=jh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[s],childNodes:[],parentNode:null};return u.childNodes=Di(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=vh(e.content,r)),u}function jh(e,t,n){const r=lr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Lu(n):Ou(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=mt[r.space]}return i}function Di(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=vu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ht(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const zh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$h=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ce="�";var g;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(g||(g={}));const Ne={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Bu(e){return e>=55296&&e<=57343}function Yh(e){return e>=56320&&e<=57343}function qh(e,t){return(e-55296)*1024+9216+t}function Fu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Hu(e){return e>=64976&&e<=65007||$h.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const Vh=65536;class Wh{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Vh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Yh(n))return this.pos++,this._addGap(),qh(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(S.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Bu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Fu(t)?this._err(S.controlCharacterInInputStream):Hu(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var J;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(J||(J={}));function Uu(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Gh=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Kh=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Qh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Kh.get(e))!==null&&t!==void 0?t:e}var Ee;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ee||(Ee={}));const Xh=32;var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(at||(at={}));function Kr(e){return e>=Ee.ZERO&&e<=Ee.NINE}function Zh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function Jh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Kr(e)}function ed(e){return e===Ee.EQUALS||Jh(e)}var ge;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ge||(ge={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class td{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ge.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=ge.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ge.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=ge.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ge.NamedEntity,this.stateNamedEntity(t,n));case ge.NumericStart:return this.stateNumericStart(t,n);case ge.NumericDecimal:return this.stateNumericDecimal(t,n);case ge.NumericHex:return this.stateNumericHex(t,n);case ge.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Xh)===Ee.LOWER_X?(this.state=ge.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ge.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Kr(i)||Zh(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Kr(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(Qh(this.result),this.consumed),this.errors&&(t!==Ee.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=nd(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(a===0||ed(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ze.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&at.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~at.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ge.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ge.NumericDecimal:return this.emitNumericEntity(0,2);case ge.NumericHex:return this.emitNumericEntity(0,3);case ge.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ge.EntityStart:return 0}}}function nd(e,t,n,r){const i=(t&at.BRANCH_LENGTH)>>7,a=t&at.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var gt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(gt||(gt={}));var Me;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Me||(Me={}));var C;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(C||(C={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const rd=new Map([[C.A,l.A],[C.ADDRESS,l.ADDRESS],[C.ANNOTATION_XML,l.ANNOTATION_XML],[C.APPLET,l.APPLET],[C.AREA,l.AREA],[C.ARTICLE,l.ARTICLE],[C.ASIDE,l.ASIDE],[C.B,l.B],[C.BASE,l.BASE],[C.BASEFONT,l.BASEFONT],[C.BGSOUND,l.BGSOUND],[C.BIG,l.BIG],[C.BLOCKQUOTE,l.BLOCKQUOTE],[C.BODY,l.BODY],[C.BR,l.BR],[C.BUTTON,l.BUTTON],[C.CAPTION,l.CAPTION],[C.CENTER,l.CENTER],[C.CODE,l.CODE],[C.COL,l.COL],[C.COLGROUP,l.COLGROUP],[C.DD,l.DD],[C.DESC,l.DESC],[C.DETAILS,l.DETAILS],[C.DIALOG,l.DIALOG],[C.DIR,l.DIR],[C.DIV,l.DIV],[C.DL,l.DL],[C.DT,l.DT],[C.EM,l.EM],[C.EMBED,l.EMBED],[C.FIELDSET,l.FIELDSET],[C.FIGCAPTION,l.FIGCAPTION],[C.FIGURE,l.FIGURE],[C.FONT,l.FONT],[C.FOOTER,l.FOOTER],[C.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[C.FORM,l.FORM],[C.FRAME,l.FRAME],[C.FRAMESET,l.FRAMESET],[C.H1,l.H1],[C.H2,l.H2],[C.H3,l.H3],[C.H4,l.H4],[C.H5,l.H5],[C.H6,l.H6],[C.HEAD,l.HEAD],[C.HEADER,l.HEADER],[C.HGROUP,l.HGROUP],[C.HR,l.HR],[C.HTML,l.HTML],[C.I,l.I],[C.IMG,l.IMG],[C.IMAGE,l.IMAGE],[C.INPUT,l.INPUT],[C.IFRAME,l.IFRAME],[C.KEYGEN,l.KEYGEN],[C.LABEL,l.LABEL],[C.LI,l.LI],[C.LINK,l.LINK],[C.LISTING,l.LISTING],[C.MAIN,l.MAIN],[C.MALIGNMARK,l.MALIGNMARK],[C.MARQUEE,l.MARQUEE],[C.MATH,l.MATH],[C.MENU,l.MENU],[C.META,l.META],[C.MGLYPH,l.MGLYPH],[C.MI,l.MI],[C.MO,l.MO],[C.MN,l.MN],[C.MS,l.MS],[C.MTEXT,l.MTEXT],[C.NAV,l.NAV],[C.NOBR,l.NOBR],[C.NOFRAMES,l.NOFRAMES],[C.NOEMBED,l.NOEMBED],[C.NOSCRIPT,l.NOSCRIPT],[C.OBJECT,l.OBJECT],[C.OL,l.OL],[C.OPTGROUP,l.OPTGROUP],[C.OPTION,l.OPTION],[C.P,l.P],[C.PARAM,l.PARAM],[C.PLAINTEXT,l.PLAINTEXT],[C.PRE,l.PRE],[C.RB,l.RB],[C.RP,l.RP],[C.RT,l.RT],[C.RTC,l.RTC],[C.RUBY,l.RUBY],[C.S,l.S],[C.SCRIPT,l.SCRIPT],[C.SEARCH,l.SEARCH],[C.SECTION,l.SECTION],[C.SELECT,l.SELECT],[C.SOURCE,l.SOURCE],[C.SMALL,l.SMALL],[C.SPAN,l.SPAN],[C.STRIKE,l.STRIKE],[C.STRONG,l.STRONG],[C.STYLE,l.STYLE],[C.SUB,l.SUB],[C.SUMMARY,l.SUMMARY],[C.SUP,l.SUP],[C.TABLE,l.TABLE],[C.TBODY,l.TBODY],[C.TEMPLATE,l.TEMPLATE],[C.TEXTAREA,l.TEXTAREA],[C.TFOOT,l.TFOOT],[C.TD,l.TD],[C.TH,l.TH],[C.THEAD,l.THEAD],[C.TITLE,l.TITLE],[C.TR,l.TR],[C.TRACK,l.TRACK],[C.TT,l.TT],[C.U,l.U],[C.UL,l.UL],[C.SVG,l.SVG],[C.VAR,l.VAR],[C.WBR,l.WBR],[C.XMP,l.XMP]]);function Ut(e){var t;return(t=rd.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,id={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Qr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);C.STYLE,C.SCRIPT,C.XMP,C.IFRAME,C.NOEMBED,C.NOFRAMES,C.PLAINTEXT;var b;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));const pe={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function ad(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function tn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function sd(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function nt(e){return sd(e)||tn(e)}function Ua(e){return nt(e)||ad(e)}function Mn(e){return e+32}function ju(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function ja(e){return ju(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function ud(e){return e===g.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:Bu(e)?S.surrogateCharacterReference:Hu(e)?S.noncharacterCharacterReference:Fu(e)||e===g.CARRIAGE_RETURN?S.controlCharacterReference:null}class od{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Wh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new td(Gh,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=ud(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:J.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:J.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:J.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:J.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Uu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ut(t.tagName),t.type===J.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case J.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case J.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case J.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:J.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ju(t)?J.WHITESPACE_CHARACTER:t===g.NULL?J.NULL_CHARACTER:J.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(J.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ze.Attribute:Ze.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case b.DATA:{this._stateData(t);break}case b.RCDATA:{this._stateRcdata(t);break}case b.RAWTEXT:{this._stateRawtext(t);break}case b.SCRIPT_DATA:{this._stateScriptData(t);break}case b.PLAINTEXT:{this._statePlaintext(t);break}case b.TAG_OPEN:{this._stateTagOpen(t);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case b.TAG_NAME:{this._stateTagName(t);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case b.BOGUS_COMMENT:{this._stateBogusComment(t);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case b.COMMENT_START:{this._stateCommentStart(t);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case b.COMMENT:{this._stateComment(t);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case b.COMMENT_END:{this._stateCommentEnd(t);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case b.DOCTYPE:{this._stateDoctype(t);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case b.CDATA_SECTION:{this._stateCdataSection(t);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=b.DATA;break}case g.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&ja(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case g.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&ja(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=ce;break}default:this.currentAttr.name+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ne.DASH_DASH,!0)?(this._createCommentToken(Ne.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Ne.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ne.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Ne.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(Ne.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(S.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(tn(t))this._createDoctypeToken(String.fromCharCode(Mn(t))),this.state=b.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(ce),this.state=b.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.name+=ce;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(tn(t)?Mn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ne.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ne.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case g.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case g.NULL:{this._err(S.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=b.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ua(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ua(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),za=new Set([...zu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Kn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),ld=new Set([...Kn,l.OL,l.UL]),cd=new Set([...Kn,l.BUTTON]),$a=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ya=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),hd=new Set([l.TR,l.TEMPLATE,l.HTML]),dd=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),fd=new Set([l.TABLE,l.TEMPLATE,l.HTML]),pd=new Set([l.TD,l.TH]);class md{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Qr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pd,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(fd,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dd,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(hd,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(Ya.has(i))return!1;break}case D.MATHML:{if($a.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Kn)}hasInListItemScope(t){return this.hasInDynamicScope(t,ld)}hasInButtonScope(t){return this.hasInDynamicScope(t,cd)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Qr.has(n))return!0;if(Kn.has(n))return!1;break}case D.SVG:{if(Ya.has(n))return!1;break}case D.MATHML:{if($a.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&za.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&za.has(this.currentTagId);)this.pop()}}const yr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const qa={type:qe.Marker};class gd{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===qe.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=yr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(qa)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qe.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(qa);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qe.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:Me.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},$u="html",Ed="about:legacy-compat",bd="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Yu=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Td=[...Yu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],xd=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),qu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_d=[...qu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Va(e,t){return t.some(n=>e.startsWith(n))}function kd(e){return e.name===$u&&e.publicId===null&&(e.systemId===null||e.systemId===Ed)}function Ad(e){if(e.name!==$u)return Me.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===bd)return Me.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xd.has(n))return Me.QUIRKS;let r=t===null?Td:Yu;if(Va(n,r))return Me.QUIRKS;if(r=t===null?qu:_d,Va(n,r))return Me.LIMITED_QUIRKS}return Me.NO_QUIRKS}const Wa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cd="definitionurl",yd="definitionURL",Nd=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Id=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),Sd=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),wd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function Ld(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===gt.COLOR||r===gt.SIZE||r===gt.FACE)||wd.has(t)}function Vu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Cd){e.attrs[t].name=yd;break}}function Wu(e){for(let t=0;t<e.attrs.length;t++){const n=Nd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Pi(e){for(let t=0;t<e.attrs.length;t++){const n=Id.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Od(e){const t=Sd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ut(e.tagName))}function Rd(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Dd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===gt.ENCODING){const i=n[r].value.toLowerCase();return i===Wa.TEXT_HTML||i===Wa.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function Pd(e,t,n,r){return(!r||r===D.HTML)&&Dd(e,t,n)||(!r||r===D.MATHML)&&Rd(e,t)}const Md="hidden",vd=8,Bd=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const Fd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Gu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Ga={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Ka{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Ga,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new od(this.options,this),this.activeFormattingElements=new gd(this.treeAdapter),this.fragmentContextID=r?Ut(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new md(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Ga,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:Fd,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=pe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===C.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=pe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=pe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=pe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=pe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(C.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===J.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===C.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case J.CHARACTER:{this.onCharacter(t);break}case J.NULL_CHARACTER:{this.onNullCharacter(t);break}case J.COMMENT:{this.onComment(t);break}case J.DOCTYPE:{this.onDoctype(t);break}case J.START_TAG:{this._processStartTag(t);break}case J.END_TAG:{this.onEndTag(t);break}case J.EOF:{this.onEof(t);break}case J.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Pd(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===qe.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Gu.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return id[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){m0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Qu(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{no(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Xn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){p0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Xn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Xr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Xr(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.AFTER_BODY:{qd(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Vd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{Wd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?g0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{Gd(this,t);break}case T.BEFORE_HEAD:{Qd(this,t);break}case T.IN_HEAD:{$e(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Jd(this,t);break}case T.AFTER_HEAD:{tf(this,t);break}case T.IN_BODY:{_e(this,t);break}case T.IN_TABLE:{vt(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{Zf(this,t);break}case T.IN_COLUMN_GROUP:{Bi(this,t);break}case T.IN_TABLE_BODY:{dr(this,t);break}case T.IN_ROW:{fr(this,t);break}case T.IN_CELL:{t0(this,t);break}case T.IN_SELECT:{ao(this,t);break}case T.IN_SELECT_IN_TABLE:{r0(this,t);break}case T.IN_TEMPLATE:{a0(this,t);break}case T.AFTER_BODY:{u0(this,t);break}case T.IN_FRAMESET:{o0(this,t);break}case T.AFTER_FRAMESET:{c0(this,t);break}case T.AFTER_AFTER_BODY:{d0(this,t);break}case T.AFTER_AFTER_FRAMESET:{f0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?E0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{Kd(this,t);break}case T.BEFORE_HEAD:{Xd(this,t);break}case T.IN_HEAD:{Zd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ef(this,t);break}case T.AFTER_HEAD:{nf(this,t);break}case T.IN_BODY:{hr(this,t);break}case T.TEXT:{zf(this,t);break}case T.IN_TABLE:{bn(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{Jf(this,t);break}case T.IN_COLUMN_GROUP:{e0(this,t);break}case T.IN_TABLE_BODY:{Zr(this,t);break}case T.IN_ROW:{io(this,t);break}case T.IN_CELL:{n0(this,t);break}case T.IN_SELECT:{so(this,t);break}case T.IN_SELECT_IN_TABLE:{i0(this,t);break}case T.IN_TEMPLATE:{s0(this,t);break}case T.AFTER_BODY:{oo(this,t);break}case T.IN_FRAMESET:{l0(this,t);break}case T.AFTER_FRAMESET:{h0(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{an(this,t);break}case T.BEFORE_HEAD:{sn(this,t);break}case T.IN_HEAD:{un(this,t);break}case T.IN_HEAD_NO_SCRIPT:{on(this,t);break}case T.AFTER_HEAD:{ln(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{eo(this,t);break}case T.TEXT:{$f(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_TEMPLATE:{uo(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{vi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ku(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{to(this,t);break}}}}function Hd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ju(e,t),n}function Ud(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function jd(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=Bd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=zd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function zd(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $d(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ut(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Yd(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Mi(e,t){for(let n=0;n<vd;n++){const r=Hd(e,t);if(!r)break;const i=Ud(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=jd(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&$d(e,s,a),Yd(e,i,r)}}function Xr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qd(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Vd(e,t){e._appendCommentNode(t,e.document)}function vi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function Wd(e,t){e._setDocumentType(t);const n=t.forceQuirks?Me.QUIRKS:Ad(t);kd(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Wt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Me.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Gd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):an(e,t)}function Kd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&an(e,t)}function an(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Qd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:sn(e,t)}}function Xd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?sn(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function sn(e,t){e._insertFakeElement(C.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function $e(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,pe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,pe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,pe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,pe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:un(e,t)}}function Zd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{un(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function At(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function un(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Jd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{$e(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:on(e,t)}}function ef(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{on(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function on(e,t){const n=t.type===J.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function tf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),$e(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:ln(e,t)}}function nf(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{ln(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function ln(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,cr(e,t)}function cr(e,t){switch(t.type){case J.CHARACTER:{Qu(e,t);break}case J.WHITESPACE_CHARACTER:{Ku(e,t);break}case J.COMMENT:{Xr(e,t);break}case J.START_TAG:{_e(e,t);break}case J.END_TAG:{hr(e,t);break}case J.EOF:{eo(e,t);break}}}function Ku(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Qu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function af(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function uf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function of(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Qr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function lf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function cf(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function hf(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function df(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=pe.PLAINTEXT}function ff(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function pf(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(Mi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Mi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ef(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bf(e,t){e.treeAdapter.getDocumentMode(e.document)!==Me.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Xu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Zu(e){const t=Uu(e,gt.TYPE);return t!=null&&t.toLowerCase()===Md}function Tf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Zu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function xf(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function _f(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function kf(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Xu(e,t)}function Af(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Cf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function yf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Qa(e,t){e._switchToTextParsing(t,pe.RAWTEXT)}function Nf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function If(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Sf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function wf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function Lf(e,t){e._reconstructActiveFormattingElements(),Vu(t),Pi(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Of(e,t){e._reconstructActiveFormattingElements(),Wu(t),Pi(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function _e(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{mf(e,t);break}case l.A:{pf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{of(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{uf(e,t);break}case l.LI:case l.DD:case l.DT:{hf(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Xu(e,t);break}case l.HR:{_f(e,t);break}case l.RB:case l.RTC:{Sf(e,t);break}case l.RT:case l.RP:{wf(e,t);break}case l.PRE:case l.LISTING:{lf(e,t);break}case l.XMP:{Cf(e,t);break}case l.SVG:{Of(e,t);break}case l.HTML:{rf(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{$e(e,t);break}case l.BODY:{af(e,t);break}case l.FORM:{cf(e,t);break}case l.NOBR:{gf(e,t);break}case l.MATH:{Lf(e,t);break}case l.TABLE:{bf(e,t);break}case l.INPUT:{Tf(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{xf(e,t);break}case l.IMAGE:{kf(e,t);break}case l.BUTTON:{ff(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Ef(e,t);break}case l.IFRAME:{yf(e,t);break}case l.SELECT:{Nf(e,t);break}case l.OPTION:case l.OPTGROUP:{If(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Qa(e,t);break}case l.FRAMESET:{sf(e,t);break}case l.TEXTAREA:{Af(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Qa(e,t):Xa(e,t);break}case l.PLAINTEXT:{df(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Xa(e,t)}}function Rf(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Df(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,oo(e,t))}function Pf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Mf(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function vf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function Bf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function Ff(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Hf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Uf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Ju(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function hr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Mi(e,t);break}case l.P:{vf(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Pf(e,t);break}case l.LI:{Bf(e);break}case l.DD:case l.DT:{Ff(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Hf(e);break}case l.BR:{jf(e);break}case l.BODY:{Rf(e,t);break}case l.HTML:{Df(e,t);break}case l.FORM:{Mf(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Uf(e,t);break}case l.TEMPLATE:{At(e,t);break}default:Ju(e,t)}}function eo(e,t){e.tmplInsertionModeStack.length>0?uo(e,t):vi(e,t)}function zf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $f(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nr(e,t){if(e.openElements.currentTagId!==void 0&&Gu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case J.CHARACTER:{no(e,t);break}case J.WHITESPACE_CHARACTER:{to(e,t);break}}else In(e,t)}function Yf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function qf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function Vf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Bi(e,t)}function Wf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function Gf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,dr(e,t)}function Kf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Qf(e,t){Zu(t)?e._appendElement(t,D.HTML):In(e,t),t.ackSelfClosing=!0}function Xf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{Gf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}case l.COL:{Vf(e,t);break}case l.FORM:{Xf(e,t);break}case l.TABLE:{Kf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{Wf(e,t);break}case l.INPUT:{Qf(e,t);break}case l.CAPTION:{Yf(e,t);break}case l.COLGROUP:{qf(e,t);break}default:In(e,t)}}function bn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cr(e,t),e.fosterParentingEnabled=n}function to(e,t){e.pendingCharacterTokens.push(t)}function no(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Gt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ro=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Zf(e,t){const n=t.tagID;ro.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,vt(e,t)):_e(e,t)}function Jf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&bn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:hr(e,t)}}function Bi(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{$e(e,t);break}default:Qn(e,t)}}function e0(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{At(e,t);break}case l.COL:break;default:Qn(e,t)}}function Qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function dr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(C.TR,l.TR),e.insertionMode=T.IN_ROW,fr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,vt(e,t));break}default:vt(e,t)}}function Zr(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,bn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:bn(e,t)}}function fr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,dr(e,t));break}default:vt(e,t)}}function io(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Zr(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Zr(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:bn(e,t)}}function t0(e,t){const n=t.tagID;ro.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),fr(e,t)):_e(e,t)}function n0(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),io(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:hr(e,t)}}function ao(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}}}function so(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}}}function r0(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ao(e,t)}function i0(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):so(e,t)}function a0(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{$e(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,vt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Bi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,dr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,fr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,_e(e,t)}}function s0(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function uo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vi(e,t)}function u0(e,t){t.tagID===l.HTML?_e(e,t):Xn(e,t)}function oo(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Xn(e,t)}function Xn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function o0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{$e(e,t);break}}}function l0(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function c0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function h0(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function d0(e,t){t.tagID===l.HTML?_e(e,t):Yn(e,t)}function Yn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function f0(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function p0(e,t){t.chars=ce,e._insertCharacters(t)}function m0(e,t){e._insertCharacters(t),e.framesetOk=!1}function lo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function g0(e,t){if(Ld(t))lo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Vu(t):r===D.SVG&&(Od(t),Wu(t)),Pi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function E0(e,t){if(t.tagID===l.P||t.tagID===l.BR){lo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}C.AREA,C.BASE,C.BASEFONT,C.BGSOUND,C.BR,C.COL,C.EMBED,C.FRAME,C.HR,C.IMG,C.INPUT,C.KEYGEN,C.LINK,C.META,C.PARAM,C.SOURCE,C.TRACK,C.WBR;const pr=co("end"),Ve=co("start");function co(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ho(e){const t=Ve(e),n=pr(e);if(t&&n)return{start:t,end:n}}const b0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,T0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Za={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fo(e,t){const n=w0(e),r=Mu("type",{handlers:{root:x0,element:_0,text:k0,comment:mo,doctype:A0,raw:y0},unknown:N0}),i={parser:n?new Ka(Za):Ka.getFragmentParser(void 0,Za),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),jt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=wh(a,{file:i.options.file});return i.stitches&&st(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function po(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function x0(e,t){po(e.children,t)}function _0(e,t){I0(e,t),po(e.children,t),S0(e,t)}function k0(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:J.CHARACTER,chars:e.value,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function A0(e,t){const n={type:J.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function C0(e,t){t.stitches=!0;const n=L0(e);if("children"in e&&"children"in n){const r=fo({type:"root",children:e.children},t.options);n.children=r.children}mo({type:"comment",value:{stitch:n}},t)}function mo(e,t){const n=e.value,r={type:J.COMMENT,data:n,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function y0(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,go(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(b0,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function N0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))C0(n,t);else{let r="";throw T0.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function jt(e,t){go(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=pe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function go(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function I0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:mt.html;i===mt.html&&n==="svg"&&(i=mt.svg);const a=Ph({...e,children:[]},{space:i===mt.svg?"svg":"html"}),s={type:J.START_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Sn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function S0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zh.includes(n)||t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,pr(e));const r={type:J.END_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Sn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pe.RCDATA||t.parser.tokenizer.state===pe.RAWTEXT||t.parser.tokenizer.state===pe.SCRIPT_DATA)&&(t.parser.tokenizer.state=pe.DATA)}function w0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Sn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=pr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function L0(e){return"children"in e?bt({...e,children:[]}):bt(e)}function Jr(e){return function(t,n){return fo(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],cn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},it={}.hasOwnProperty;function O0(e,t){let n={type:"root",children:[]};const r={schema:t?{...cn,...t}:cn,stack:[]},i=Eo(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Eo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return R0(e,n);case"doctype":return D0(e,n);case"element":return P0(e,n);case"root":return M0(e,n);case"text":return v0(e,n)}}}function R0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return wn(a,t),a}}function D0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function P0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=bo(e,t.children),i=B0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return wn(s,t),s}function M0(e,t){const r={type:"root",children:bo(e,t.children)};return wn(r,t),r}function v0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function bo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Eo(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function B0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&it.call(r,n)?r[n]:void 0,s=r&&it.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(it.call(u,c)){const h=u[c];let d=Ja(e,es(a,c),c,h);d==null&&(d=Ja(e,es(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&it.call(i,n)){const h=i[n];for(c in h)it.call(h,c)&&!it.call(o,c)&&(o[c]=h[c])}return o}function Ja(e,t,n,r){return t?Array.isArray(r)?F0(e,t,n,r):To(e,t,n,r):void 0}function F0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=To(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function To(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&H0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function H0(e,t,n){const r=e.schema.protocols&&it.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=ho(t);t.data&&(e.data=bt(t.data)),n&&(e.position=n)}function es(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function xo(e){return function(t){return O0(t,e)}}function ts(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ce=lt(/[A-Za-z]/),xe=lt(/[\dA-Za-z]/),U0=lt(/[#-'*+\--9=?A-Z^-~]/);function Zn(e){return e!==null&&(e<32||e===127)}const ei=lt(/\d/),j0=lt(/[\dA-Fa-f]/),z0=lt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function ee(e){return e===-2||e===-1||e===32}const mr=lt(new RegExp("\\p{P}|\\p{S}","u")),Tt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Y0(e,t,n){const i=sr((n||{}).ignore||[]),a=q0(t);let s=-1;for(;++s<a.length;)Ni(e,"text",u);function u(c,h){let d=-1,p;for(;++d<h.length;){const f=h[d],E=p?p.children:void 0;if(i(f,E?E.indexOf(f):void 0,p))return;p=f}if(p)return o(c,h)}function o(c,h){const d=h[h.length-1],p=a[s][0],f=a[s][1];let E=0;const N=d.children.indexOf(c);let y=!1,R=[];p.lastIndex=0;let L=p.exec(c.value);for(;L;){const H=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=f(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?p.lastIndex=H+1:(E!==H&&R.push({type:"text",value:c.value.slice(E,H)}),Array.isArray(w)?R.push(...w):w&&R.push(w),E=H+L[0].length,y=!0),!p.global)break;L=p.exec(c.value)}return y?(E<c.value.length&&R.push({type:"text",value:c.value.slice(E)}),d.children.splice(N,1,...R)):R=[c],N+R.length}}function q0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([V0(i[0]),W0(i[1])])}return t}function V0(e){return typeof e=="string"?new RegExp($0(e),"g"):e}function W0(e){return typeof e=="function"?e:function(){return e}}const Ir="phrasing",Sr=["autolink","link","image","label"];function G0(){return{transforms:[tp],enter:{literalAutolink:Q0,literalAutolinkEmail:wr,literalAutolinkHttp:wr,literalAutolinkWww:wr},exit:{literalAutolink:ep,literalAutolinkEmail:J0,literalAutolinkHttp:X0,literalAutolinkWww:Z0}}}function K0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Sr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Sr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ir,notInConstruct:Sr}]}}function Q0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wr(e){this.config.enter.autolinkProtocol.call(this,e)}function X0(e){this.config.exit.autolinkProtocol.call(this,e)}function Z0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function J0(e){this.config.exit.autolinkEmail.call(this,e)}function ep(e){this.exit(e)}function tp(e){Y0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,np],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),rp]],{ignore:["link","linkReference"]})}function np(e,t,n,r,i){let a="";if(!_o(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!ip(n)))return!1;const s=ap(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function rp(e,t,n,r){return!_o(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ip(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ap(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ts(e,"(");let a=ts(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function _o(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tt(n)||mr(n))&&(!t||n!==47)}function ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ko.peek=pp;function sp(){this.buffer()}function up(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function op(){this.buffer()}function lp(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hp(e){this.exit(e)}function dp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fp(e){this.exit(e)}function pp(){return"["}function ko(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function mp(){return{enter:{gfmFootnoteCallString:sp,gfmFootnoteCall:up,gfmFootnoteDefinitionLabelString:op,gfmFootnoteDefinition:lp},exit:{gfmFootnoteCallString:cp,gfmFootnoteCall:hp,gfmFootnoteDefinitionLabelString:dp,gfmFootnoteDefinition:fp}}}function gp(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ko},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
4
+ `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Ao:Ep))),c(),o}}function Ep(e,t,n){return t===0?e:Ao(e,t,n)}function Ao(e,t,n){return(n?"":" ")+e}const bp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Co.peek=Ap;function Tp(){return{canContainEols:["delete"],enter:{strikethrough:_p},exit:{strikethrough:kp}}}function xp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bp}],handlers:{delete:Co}}}function _p(e){this.enter({type:"delete",children:[]},e)}function kp(e){this.exit(e)}function Co(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Ap(){return"~"}function Cp(e){return e.length}function yp(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Cp,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const k=[],N=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const R=Np(e[h][y]);if(n.alignDelimiters!==!1){const L=i(R);N[y]=L,(o[y]===void 0||L>o[y])&&(o[y]=L)}k.push(R)}s[h]=k,u[h]=N}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=ns(r[d]);else{const k=ns(r);for(;++d<c;)a[d]=k}d=-1;const p=[],f=[];for(;++d<c;){const k=a[d];let N="",y="";k===99?(N=":",y=":"):k===108?N=":":k===114&&(y=":");let R=n.alignDelimiters===!1?1:Math.max(1,o[d]-N.length-y.length);const L=N+"-".repeat(R)+y;n.alignDelimiters!==!1&&(R=N.length+R+y.length,R>o[d]&&(o[d]=R),f[d]=R),p[d]=L}s.splice(1,0,p),u.splice(1,0,f),h=-1;const E=[];for(;++h<s.length;){const k=s[h],N=u[h];d=-1;const y=[];for(;++d<c;){const R=k[d]||"";let L="",H="";if(n.alignDelimiters!==!1){const j=o[d]-(N[d]||0),w=a[d];w===114?L=" ".repeat(j):w===99?j%2?(L=" ".repeat(j/2+.5),H=" ".repeat(j/2-.5)):(L=" ".repeat(j/2),H=L):H=" ".repeat(j)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(L),y.push(R),n.alignDelimiters!==!1&&y.push(H),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}E.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return E.join(`
5
+ `)}function Np(e){return e==null?"":String(e)}function ns(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ip(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Sp);return i(),s}function Sp(e,t,n){return">"+(n?"":" ")+e}function wp(e,t){return rs(e,t.inConstruct,!0)&&!rs(e,t.notInConstruct,!1)}function rs(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function is(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
6
+ `&&wp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
7
+ `}function Lp(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Op(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Rp(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Dp(e,t,n,r){const i=Rp(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Op(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,Pp);return d(),p}const u=n.createTracker(r),o=i.repeat(Math.max(Lp(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
8
8
  `,encode:["`"],...u.current()})),d()}return h+=u.move(`
9
9
  `),a&&(h+=u.move(a+`
10
- `)),h+=u.move(o),c(),h}function Dp(e,t,n){return(n?"":" ")+e}function Fi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Pp(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
11
- `,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function Mp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Tn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bt(e){if(e===null||oe(e)||Tt(e))return 1;if(mr(e))return 2}function Jn(e,t,n){const r=Bt(e),i=Bt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yo.peek=vp;function yo(e,t,n,r){const i=Mp(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Jn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=Tn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=Jn(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+Tn(d));const f=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+o+f}function vp(e,t,n){return n.options.emphasis||"*"}const Bp={};function Hi(e,t){const n=Bp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return No(e,r,i)}function No(e,t,n){if(Fp(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return as(e.children,t,n)}return Array.isArray(e)?as(e,t,n):""}function as(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=No(e[i],t,n);return r.join("")}function Fp(e){return!!(e&&typeof e=="object")}function Hp(e,t){let n=!1;return st(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qr}),!!((!e.depth||e.depth<3)&&Hi(e)&&(t.options.setext||n))}function Up(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Hp(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
10
+ `)),h+=u.move(o),c(),h}function Pp(e,t,n){return(n?"":" ")+e}function Fi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Mp(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
11
+ `,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function vp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Tn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bt(e){if(e===null||oe(e)||Tt(e))return 1;if(mr(e))return 2}function Jn(e,t,n){const r=Bt(e),i=Bt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yo.peek=Bp;function yo(e,t,n,r){const i=vp(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Jn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=Tn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=Jn(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+Tn(d));const f=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+o+f}function Bp(e,t,n){return n.options.emphasis||"*"}const Fp={};function Hi(e,t){const n=Fp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return No(e,r,i)}function No(e,t,n){if(Hp(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return as(e.children,t,n)}return Array.isArray(e)?as(e,t,n):""}function as(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=No(e[i],t,n);return r.join("")}function Hp(e){return!!(e&&typeof e=="object")}function Up(e,t){let n=!1;return st(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qr}),!!((!e.depth||e.depth<3)&&Hi(e)&&(t.options.setext||n))}function jp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Up(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
12
12
  `,after:`
13
13
  `});return d(),h(),p+`
14
14
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
15
15
  `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
16
- `,...a.current()});return/^[\t ]/.test(c)&&(c=Tn(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}Io.peek=jp;function Io(e){return e.value||""}function jp(){return"<"}So.peek=zp;function So(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function zp(){return"!"}wo.peek=$p;function wo(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function $p(){return"!"}Lo.peek=Yp;function Lo(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function Yp(){return"`"}function Oo(e,t){const n=Hi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ro.peek=qp;function Ro(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(Oo(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),o()),c+=s.move(")"),u(),c}function qp(e,t,n){return Oo(e,n)?"<":"["}Do.peek=Vp;function Do(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Vp(){return"["}function Ui(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wp(e){const t=Ui(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Gp(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Po(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Kp(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Gp(n):Ui(n);const u=e.ordered?s==="."?")":".":Wp(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Po(n)===s&&h){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function Qp(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Xp(e,t,n,r){const i=Qp(n);let a=n.bulletCurrent||Ui(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,p,f){return p?(f?"":" ".repeat(s))+d:(f?a:a+" ".repeat(s-a.length))+d}}function Zp(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Jp=sr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function em(e,t,n,r){return(e.children.some(function(s){return Jp(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function tm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mo.peek=nm;function Mo(e,t,n,r){const i=tm(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Jn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=Tn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=Jn(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+Tn(d));const f=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+o+f}function nm(e,t,n){return n.options.strong||"*"}function rm(e,t,n,r){return n.safe(e.value,r)}function im(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function am(e,t,n){const r=(Po(n)+(n.options.ruleSpaces?" ":"")).repeat(im(n));return n.options.ruleSpaces?r.slice(0,-1):r}const vo={blockquote:Np,break:is,code:Rp,definition:Pp,emphasis:yo,hardBreak:is,heading:Up,html:Io,image:So,imageReference:wo,inlineCode:Lo,link:Ro,linkReference:Do,list:Kp,listItem:Xp,paragraph:Zp,root:em,strong:Mo,text:rm,thematicBreak:am},ss=document.createElement("i");function ji(e){const t="&"+e+";";ss.innerHTML=t;const n=ss.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Bo(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const sm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function um(e){return e.replace(sm,om)}function om(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Bo(n.slice(a?2:1),a?16:10)}return ji(n)||e}function lm(){return{enter:{table:cm,tableData:us,tableHeader:us,tableRow:dm},exit:{codeText:fm,table:hm,tableData:Lr,tableHeader:Lr,tableRow:Lr}}}function cm(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function hm(e){this.exit(e),this.data.inTable=void 0}function dm(e){this.enter({type:"tableRow",children:[]},e)}function Lr(e){this.exit(e)}function us(e){this.enter({type:"tableCell",children:[]},e)}function fm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pm));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pm(e,t){return t==="|"?t:e}function mm(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
16
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=Tn(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}Io.peek=zp;function Io(e){return e.value||""}function zp(){return"<"}So.peek=$p;function So(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function $p(){return"!"}wo.peek=Yp;function wo(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Yp(){return"!"}Lo.peek=qp;function Lo(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function qp(){return"`"}function Oo(e,t){const n=Hi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ro.peek=Vp;function Ro(e,t,n,r){const i=Fi(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(Oo(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),o()),c+=s.move(")"),u(),c}function Vp(e,t,n){return Oo(e,n)?"<":"["}Do.peek=Wp;function Do(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Wp(){return"["}function Ui(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Gp(e){const t=Ui(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Kp(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Po(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qp(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Kp(n):Ui(n);const u=e.ordered?s==="."?")":".":Gp(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Po(n)===s&&h){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function Xp(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Zp(e,t,n,r){const i=Xp(n);let a=n.bulletCurrent||Ui(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,p,f){return p?(f?"":" ".repeat(s))+d:(f?a:a+" ".repeat(s-a.length))+d}}function Jp(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const em=sr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tm(e,t,n,r){return(e.children.some(function(s){return em(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function nm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mo.peek=rm;function Mo(e,t,n,r){const i=nm(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Jn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=Tn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=Jn(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+Tn(d));const f=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+o+f}function rm(e,t,n){return n.options.strong||"*"}function im(e,t,n,r){return n.safe(e.value,r)}function am(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function sm(e,t,n){const r=(Po(n)+(n.options.ruleSpaces?" ":"")).repeat(am(n));return n.options.ruleSpaces?r.slice(0,-1):r}const vo={blockquote:Ip,break:is,code:Dp,definition:Mp,emphasis:yo,hardBreak:is,heading:jp,html:Io,image:So,imageReference:wo,inlineCode:Lo,link:Ro,linkReference:Do,list:Qp,listItem:Zp,paragraph:Jp,root:tm,strong:Mo,text:im,thematicBreak:sm},ss=document.createElement("i");function ji(e){const t="&"+e+";";ss.innerHTML=t;const n=ss.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Bo(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const um=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function om(e){return e.replace(um,lm)}function lm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Bo(n.slice(a?2:1),a?16:10)}return ji(n)||e}function cm(){return{enter:{table:hm,tableData:us,tableHeader:us,tableRow:fm},exit:{codeText:pm,table:dm,tableData:Lr,tableHeader:Lr,tableRow:Lr}}}function hm(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dm(e){this.exit(e),this.data.inTable=void 0}function fm(e){this.enter({type:"tableRow",children:[]},e)}function Lr(e){this.exit(e)}function us(e){this.enter({type:"tableCell",children:[]},e)}function pm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mm));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mm(e,t){return t==="|"?t:e}function gm(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
17
17
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:o,tableRow:u}};function s(f,E,k,N){return c(h(f,k,N),f.align)}function u(f,E,k,N){const y=d(f,k,N),R=c([y]);return R.slice(0,R.indexOf(`
18
- `))}function o(f,E,k,N){const y=k.enter("tableCell"),R=k.enter("phrasing"),L=k.containerPhrasing(f,{...N,before:a,after:a});return R(),y(),L}function c(f,E){return Cp(f,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function h(f,E,k){const N=f.children;let y=-1;const R=[],L=E.enter("table");for(;++y<N.length;)R[y]=d(N[y],E,k);return L(),R}function d(f,E,k){const N=f.children;let y=-1;const R=[],L=E.enter("tableRow");for(;++y<N.length;)R[y]=o(N[y],f,E,k);return L(),R}function p(f,E,k){let N=vo.inlineCode(f,E,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function gm(){return{exit:{taskListCheckValueChecked:os,taskListCheckValueUnchecked:os,paragraph:bm}}}function Em(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Tm}}}function os(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bm(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Tm(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=vo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function xm(){return[W0(),pp(),bp(),lm(),gm()]}function _m(e){return{extensions:[G0(),mp(e),Tp(),mm(e),Em()]}}function Pe(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ve(e,t){return e.length>0?(Pe(e,e.length,0,t),e):t}const ls={}.hasOwnProperty;function Fo(e){const t={};let n=-1;for(;++n<e.length;)km(t,e[n]);return t}function km(e,t){let n;for(n in t){const i=(ls.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){ls.call(i,s)||(i[s]=[]);const u=a[s];Am(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Am(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pe(e,0,0,r)}const Cm={tokenize:Lm,partial:!0},Ho={tokenize:Om,partial:!0},Uo={tokenize:Rm,partial:!0},jo={tokenize:Dm,partial:!0},ym={tokenize:Pm,partial:!0},zo={name:"wwwAutolink",tokenize:Sm,previous:Yo},$o={name:"protocolAutolink",tokenize:wm,previous:qo},Je={name:"emailAutolink",tokenize:Im,previous:Vo},We={};function Nm(){return{text:We}}let ft=48;for(;ft<123;)We[ft]=Je,ft++,ft===58?ft=65:ft===91&&(ft=97);We[43]=Je;We[45]=Je;We[46]=Je;We[95]=Je;We[72]=[Je,$o];We[104]=[Je,$o];We[87]=[Je,zo];We[119]=[Je,zo];function Im(e,t,n){const r=this;let i,a;return s;function s(d){return!ti(d)||!Vo.call(r,r.previous)||zi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ti(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(ym,h,c)(d):d===45||d===95||xe(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Sm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Yo.call(r,r.previous)||zi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Cm,e.attempt(Ho,e.attempt(Uo,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function wm(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&qo.call(r,r.previous)&&!zi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Zn(d)||oe(d)||Tt(d)||mr(d)?n(d):e.attempt(Ho,e.attempt(Uo,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Lm(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Om(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(jo,o,u)(c):c===null||oe(c)||Tt(c)||c!==45&&mr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function Rm(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(jo,t,a)(s):s===null||oe(s)||Tt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Dm(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||oe(u)||Tt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||Tt(u)?t(u):r(u)}function a(u){return Ce(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),s):n(u)}}function Pm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return xe(a)?n(a):t(a)}}function Yo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function qo(e){return!Ce(e)}function Vo(e){return!(e===47||ti(e))}function ti(e){return e===43||e===45||e===46||e===95||xe(e)}function zi(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function zt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&xe(e.charCodeAt(n+1))&&xe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ni={name:"attention",resolveAll:Mm,tokenize:vm};function Mm(e,t){let n=-1,r,i,a,s,u,o,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};cs(d,-o),cs(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ve(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ve(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=ve(c,gr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ve(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=ve(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Pe(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Bt(o),d=!h||h===2&&i||n.includes(o),p=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!p)),c._close=!!(a===42?p:p&&(h||!d)),t(o)}}function cs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Bm={name:"autolink",tokenize:Fm};function Fm(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Ce(f)?(e.consume(f),s):f===64?n(f):c(f)}function s(f){return f===43||f===45||f===46||xe(f)?(r=1,u(f)):c(f)}function u(f){return f===58?(e.consume(f),r=0,o):(f===43||f===45||f===46||xe(f))&&r++<32?(e.consume(f),u):(r=0,c(f))}function o(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Zn(f)?n(f):(e.consume(f),o)}function c(f){return f===64?(e.consume(f),h):H0(f)?(e.consume(f),c):n(f)}function h(f){return xe(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,h):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||xe(f))&&r++<63){const E=f===45?p:d;return e.consume(f),E}return n(f)}}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return ee(o)?(e.enter(n),u(o)):t(o)}function u(o){return ee(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Ln={partial:!0,tokenize:Hm};function Hm(e,t,n){return r;function r(a){return ee(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const Wo={continuation:{tokenize:jm},exit:zm,name:"blockQuote",tokenize:Um};function Um(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function jm(e,t,n){const r=this;return i;function i(s){return ee(s)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Wo,t,n)(s)}}function zm(e){e.exit("blockQuote")}const Go={name:"characterEscape",tokenize:$m};function $m(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return j0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ko={name:"characterReference",tokenize:Ym};function Ym(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=xe,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=U0,h):(e.enter("characterReferenceValue"),a=7,s=ei,h(d))}function h(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===xe&&!ji(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const hs={partial:!0,tokenize:Vm},ds={concrete:!0,name:"codeFenced",tokenize:qm};function qm(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const G=r.events[r.events.length-1];return a=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),ee(w)?ne(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(hs,k,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):ee(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,f,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),p)}function f(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(w))}function E(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),E)}function k(w){return e.attempt(i,H,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return a>0&&ee(w)?ne(e,R,"linePrefix",a+1)(w):R(w)}function R(w){return w===null||Y(w)?e.check(hs,k,H)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||Y(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),L)}function H(w){return e.exit("codeFenced"),t(w)}function j(w,G,W){let X=0;return I;function I(F){return w.enter("lineEnding"),w.consume(F),w.exit("lineEnding"),U}function U(F){return w.enter("codeFencedFence"),ee(F)?ne(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):v(F)}function v(F){return F===u?(w.enter("codeFencedFenceSequence"),q(F)):W(F)}function q(F){return F===u?(X++,w.consume(F),q):X>=s?(w.exit("codeFencedFenceSequence"),ee(F)?ne(w,z,"whitespace")(F):z(F)):W(F)}function z(F){return F===null||Y(F)?(w.exit("codeFencedFence"),G(F)):W(F)}}}function Vm(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Or={name:"codeIndented",tokenize:Gm},Wm={partial:!0,tokenize:Km};function Gm(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):Y(c)?e.attempt(Wm,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function Km(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const Qm={name:"codeText",previous:Zm,resolve:Xm,tokenize:Jm};function Xm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Zm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jm(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class e1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Kt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Kt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Kt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Kt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Kt(this.left,n.reverse())}}}function Kt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qo(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new e1(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,t1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Pe(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function t1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],c={};let h,d,p=-1,f=n,E=0,k=0;const N=[k];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(k=p+1,N.push(k),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):N.pop(),p=N.length;p--;){const y=u.slice(N[p],N[p+1]),R=a.pop();o.push([R,R+y.length-1]),e.splice(R,2,y)}for(o.reverse(),p=-1;++p<o.length;)c[E+o[p][0]]=E+o[p][1],E+=o[p][1]-o[p][0]-1;return c}const n1={resolve:i1,tokenize:a1},r1={partial:!0,tokenize:s1};function i1(e){return Qo(e),e}function a1(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Y(u)?e.check(r1,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function s1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Xo(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),p):y===null||y===32||y===41||Zn(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(u),p(y)):y===null||y===60||Y(y)?n(y):(e.consume(y),y===92?E:f)}function E(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function k(y){return!h&&(y===null||y===41||oe(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,k):y===41?(e.consume(y),h--,k):y===null||y===32||y===40||Zn(y)?n(y):(e.consume(y),y===92?N:k)}function N(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Zo(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),h}function h(f){return u>999||f===null||f===91||f===93&&!o||f===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Y(f)||u++>999?(e.exit("chunkString"),h(f)):(e.consume(f),o||(o=!ee(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),u++,d):d(f)}}function Jo(e,t,n,r,i,a){let s;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):n(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),o(s)):p===null?n(p):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||Y(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===s||p===92?(e.consume(p),h):h(p)}}function hn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ee(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const u1={name:"definition",tokenize:l1},o1={partial:!0,tokenize:c1};function l1(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return Zo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function u(f){return i=ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o):n(f)}function o(f){return oe(f)?hn(e,c)(f):c(f)}function c(f){return Xo(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return e.attempt(o1,d,d)(f)}function d(f){return ee(f)?ne(e,p,"whitespace")(f):p(f)}function p(f){return f===null||Y(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function c1(e,t,n){return r;function r(u){return oe(u)?hn(e,i)(u):n(u)}function i(u){return Jo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return ee(u)?ne(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Y(u)?t(u):n(u)}}const h1={name:"hardBreakEscape",tokenize:d1};function d1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const f1={name:"headingAtx",resolve:p1,tokenize:m1};function p1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function m1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||oe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||Y(h)?(e.exit("atxHeading"),t(h)):ee(h)?ne(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const g1=["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"],fs=["pre","script","style","textarea"],E1={concrete:!0,name:"htmlFlow",resolveTo:x1,tokenize:_1},b1={partial:!0,tokenize:A1},T1={partial:!0,tokenize:k1};function x1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _1(e,t,n){const r=this;let i,a,s,u,o;return c;function c(_){return h(_)}function h(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),a=!0,k):_===63?(e.consume(_),i=3,r.interrupt?t:x):Ce(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function p(_){return _===45?(e.consume(_),i=2,f):_===91?(e.consume(_),i=5,u=0,E):Ce(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function f(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function E(_){const He="CDATA[";return _===He.charCodeAt(u++)?(e.consume(_),u===He.length?r.interrupt?t:v:E):n(_)}function k(_){return Ce(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function N(_){if(_===null||_===47||_===62||oe(_)){const He=_===47,ct=s.toLowerCase();return!He&&!a&&fs.includes(ct)?(i=1,r.interrupt?t(_):v(_)):g1.includes(s.toLowerCase())?(i=6,He?(e.consume(_),y):r.interrupt?t(_):v(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?R(_):L(_))}return _===45||xe(_)?(e.consume(_),s+=String.fromCharCode(_),N):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function R(_){return ee(_)?(e.consume(_),R):I(_)}function L(_){return _===47?(e.consume(_),I):_===58||_===95||Ce(_)?(e.consume(_),H):ee(_)?(e.consume(_),L):I(_)}function H(_){return _===45||_===46||_===58||_===95||xe(_)?(e.consume(_),H):j(_)}function j(_){return _===61?(e.consume(_),w):ee(_)?(e.consume(_),j):L(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,G):ee(_)?(e.consume(_),w):W(_)}function G(_){return _===o?(e.consume(_),o=null,X):_===null||Y(_)?n(_):(e.consume(_),G)}function W(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||oe(_)?j(_):(e.consume(_),W)}function X(_){return _===47||_===62||ee(_)?L(_):n(_)}function I(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||Y(_)?v(_):ee(_)?(e.consume(_),U):n(_)}function v(_){return _===45&&i===2?(e.consume(_),ie):_===60&&i===1?(e.consume(_),he):_===62&&i===4?(e.consume(_),Le):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),ae):Y(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(b1,Ge,q)(_)):_===null||Y(_)?(e.exit("htmlFlowData"),q(_)):(e.consume(_),v)}function q(_){return e.check(T1,z,Ge)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),F}function F(_){return _===null||Y(_)?q(_):(e.enter("htmlFlowData"),v(_))}function ie(_){return _===45?(e.consume(_),x):v(_)}function he(_){return _===47?(e.consume(_),s="",we):v(_)}function we(_){if(_===62){const He=s.toLowerCase();return fs.includes(He)?(e.consume(_),Le):v(_)}return Ce(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),we):v(_)}function ae(_){return _===93?(e.consume(_),x):v(_)}function x(_){return _===62?(e.consume(_),Le):_===45&&i===2?(e.consume(_),x):v(_)}function Le(_){return _===null||Y(_)?(e.exit("htmlFlowData"),Ge(_)):(e.consume(_),Le)}function Ge(_){return e.exit("htmlFlow"),t(_)}}function k1(e,t,n){const r=this;return i;function i(s){return Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function A1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ln,t,n)}}const C1={name:"htmlText",tokenize:y1};function y1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):Ce(x)?(e.consume(x),W):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,E):Ce(x)?(e.consume(x),R):n(x)}function h(x){return x===45?(e.consume(x),f):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),p):Y(x)?(s=d,he(x)):(e.consume(x),d)}function p(x){return x===45?(e.consume(x),f):d(x)}function f(x){return x===62?ie(x):x===45?p(x):d(x)}function E(x){const Le="CDATA[";return x===Le.charCodeAt(a++)?(e.consume(x),a===Le.length?k:E):n(x)}function k(x){return x===null?n(x):x===93?(e.consume(x),N):Y(x)?(s=k,he(x)):(e.consume(x),k)}function N(x){return x===93?(e.consume(x),y):k(x)}function y(x){return x===62?ie(x):x===93?(e.consume(x),y):k(x)}function R(x){return x===null||x===62?ie(x):Y(x)?(s=R,he(x)):(e.consume(x),R)}function L(x){return x===null?n(x):x===63?(e.consume(x),H):Y(x)?(s=L,he(x)):(e.consume(x),L)}function H(x){return x===62?ie(x):L(x)}function j(x){return Ce(x)?(e.consume(x),w):n(x)}function w(x){return x===45||xe(x)?(e.consume(x),w):G(x)}function G(x){return Y(x)?(s=G,he(x)):ee(x)?(e.consume(x),G):ie(x)}function W(x){return x===45||xe(x)?(e.consume(x),W):x===47||x===62||oe(x)?X(x):n(x)}function X(x){return x===47?(e.consume(x),ie):x===58||x===95||Ce(x)?(e.consume(x),I):Y(x)?(s=X,he(x)):ee(x)?(e.consume(x),X):ie(x)}function I(x){return x===45||x===46||x===58||x===95||xe(x)?(e.consume(x),I):U(x)}function U(x){return x===61?(e.consume(x),v):Y(x)?(s=U,he(x)):ee(x)?(e.consume(x),U):X(x)}function v(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,q):Y(x)?(s=v,he(x)):ee(x)?(e.consume(x),v):(e.consume(x),z)}function q(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):Y(x)?(s=q,he(x)):(e.consume(x),q)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?X(x):(e.consume(x),z)}function F(x){return x===47||x===62||oe(x)?X(x):n(x)}function ie(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function he(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),we}function we(x){return ee(x)?ne(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ae(x)}function ae(x){return e.enter("htmlTextData"),s(x)}}const $i={name:"labelEnd",resolveAll:w1,resolveTo:L1,tokenize:O1},N1={tokenize:R1},I1={tokenize:D1},S1={tokenize:P1};function w1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Pe(e,0,e.length,n),e}function L1(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=ve(u,e.slice(a+1,a+r+3)),u=ve(u,[["enter",h,t]]),u=ve(u,gr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=ve(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=ve(u,e.slice(s+1)),u=ve(u,[["exit",o,t]]),Pe(e,a,e.length,u),e}function O1(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(p){return a?a._inactive?d(p):(s=r.parser.defined.includes(ze(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(N1,h,s?h:d)(p):p===91?e.attempt(I1,h,s?c:d)(p):s?h(p):d(p)}function c(p){return e.attempt(S1,h,d)(p)}function h(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function R1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return oe(d)?hn(e,a)(d):a(d)}function a(d){return d===41?h(d):Xo(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return oe(d)?hn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Jo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return oe(d)?hn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function D1(e,t,n){const r=this;return i;function i(u){return Zo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function P1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const M1={name:"labelStartImage",resolveAll:$i.resolveAll,tokenize:v1};function v1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const B1={name:"labelStartLink",resolveAll:$i.resolveAll,tokenize:F1};function F1(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Rr={name:"lineEnding",tokenize:H1};function H1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const qn={name:"thematicBreak",tokenize:U1};function U1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),ee(c)?ne(e,u,"whitespace")(c):u(c))}}const Ie={continuation:{tokenize:Y1},exit:V1,name:"list",tokenize:$1},j1={partial:!0,tokenize:W1},z1={partial:!0,tokenize:q1};function $1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(f){const E=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ei(f)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(qn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(f)}return n(f)}function o(f){return ei(f)&&++s<10?(e.consume(f),o):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ln,r.interrupt?n:h,e.attempt(j1,p,d))}function h(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function d(f){return ee(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Y1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ln,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!ee(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(z1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Ie,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function q1(e,t,n){const r=this;return ne(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function V1(e){e.exit(this.containerState.type)}function W1(e,t,n){const r=this;return ne(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!ee(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ps={name:"setextUnderline",resolveTo:G1,tokenize:K1};function G1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function K1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),ee(c)?ne(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Q1={tokenize:ig,partial:!0};function X1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tg,continuation:{tokenize:ng},exit:rg}},text:{91:{name:"gfmFootnoteCall",tokenize:eg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Z1,resolveTo:J1}}}}function Z1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=ze(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function J1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function eg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||oe(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ze(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return oe(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function tg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(E)}function h(E){if(s>999||E===93&&!u||E===null||E===91||oe(E))return n(E);if(E===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=ze(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(E)||(u=!0),s++,e.consume(E),E===92?d:h}function d(E){return E===91||E===92||E===93?(e.consume(E),s++,h):h(E)}function p(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,f,"gfmFootnoteDefinitionWhitespace")):n(E)}function f(E){return t(E)}}function ng(e,t,n){return e.check(Ln,t,e.attempt(Q1,t,n))}function rg(e){e.exit("gfmFootnoteDefinition")}function ig(e,t,n){const r=this;return ne(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function ag(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},p=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],f=u.parser.constructs.insideSpan.null;f&&Pe(p,p.length,0,gr(f,s.slice(c+1,o),u)),Pe(p,p.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Pe(s,c-1,o-c+3,p),o=c+p.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return p;function p(E){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(E):(s.enter("strikethroughSequenceTemporary"),f(E))}function f(E){const k=Bt(c);if(E===126)return d>1?o(E):(s.consume(E),d++,f);if(d<2&&!n)return o(E);const N=s.exit("strikethroughSequenceTemporary"),y=Bt(E);return N._open=!y||y===2&&!!k,N._close=!k||k===2&&!!y,u(E)}}}class sg{constructor(){this.map=[]}add(t,n,r){ug(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function ug(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function og(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function lg(){return{flow:{null:{name:"table",tokenize:cg,resolveAll:hg}}}}function cg(e,t,n){const r=this;let i=0,a=0,s;return u;function u(I){let U=r.events.length-1;for(;U>-1;){const z=r.events[U][1].type;if(z==="lineEnding"||z==="linePrefix")U--;else break}const v=U>-1?r.events[U][1].type:null,q=v==="tableHead"||v==="tableRow"?w:o;return q===w&&r.parser.lazy[r.now().line]?n(I):q(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),h(I)}function h(I){return I===null?n(I):Y(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):ee(I)?ne(e,h,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||oe(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,ee(I)?ne(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):E(I))}function E(I){return I===45||I===58?N(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):j(I)}function k(I){return ee(I)?ne(e,N,"whitespace")(I):N(I)}function N(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(a+=1,y(I)):I===null||Y(I)?H(I):j(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),R(I)):j(I)}function R(I){return I===45?(e.consume(I),R):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(I))}function L(I){return ee(I)?ne(e,H,"whitespace")(I):H(I)}function H(I){return I===124?E(I):I===null||Y(I)?!s||i!==a?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function w(I){return e.enter("tableRow"),G(I)}function G(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),G):I===null||Y(I)?(e.exit("tableRow"),t(I)):ee(I)?ne(e,G,"whitespace")(I):(e.enter("data"),W(I))}function W(I){return I===null||I===124||oe(I)?(e.exit("data"),G(I)):(e.consume(I),I===92?X:W)}function X(I){return I===92||I===124?(e.consume(I),W):W(I)}}function hg(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const p=new sg;for(;++n<e.length;){const f=e[n],E=f[1];f[0]==="enter"?E.type==="tableHead"?(u=!1,o!==0&&(ms(p,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",c,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",h,t]])),i=E.type==="tableDelimiterRow"?2:h?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=vn(p,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=vn(p,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):E.type==="tableHead"?(u=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=vn(p,t,a,i,n,d)):s[1]!==0&&(d=vn(p,t,s,i,n,d)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&ms(p,t,o,c,h),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=og(t.events,n))}return e}function vn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Ot(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Ot(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ot(t.events,n[2]),h=Ot(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,k=n[3]-n[2]-1;e.add(E,k,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Ot(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ms(e,t,n,r,i){const a=[],s=Ot(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ot(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dg={name:"tasklistCheck",tokenize:pg};function fg(){return{text:{91:dg}}}function pg(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return oe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Y(o)?t(o):ee(o)?e.check({tokenize:mg},t,n)(o):n(o)}}function mg(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function gg(e){return Fo([Nm(),X1(),ag(e),lg(),fg()])}const Eg={};function bg(e){const t=this,n=e||Eg,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(gg(n)),a.push(xm()),s.push(_m(n))}var Tg=Object.defineProperty,xg=Object.defineProperties,_g=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,kg=Object.prototype.hasOwnProperty,Ag=Object.prototype.propertyIsEnumerable,Es=(e,t,n)=>t in e?Tg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,el=(e,t)=>{for(var n in t||(t={}))kg.call(t,n)&&Es(e,n,t[n]);if(gs)for(var n of gs(t))Ag.call(t,n)&&Es(e,n,t[n]);return e},tl=(e,t)=>xg(e,_g(t)),Cg=/(\*\*)([^*]*\*?)$/,yg=/(__)([^_]*?)$/,Ng=/(\*\*\*)([^*]*?)$/,Ig=/(\*)([^*]*?)$/,Sg=/(_)([^_]*?)$/,wg=/(`)([^`]*?)$/,Lg=/(~~)([^~]*?)$/,Ct=/^[\s_~*`]*$/,nl=/^[\s]*[-*+][\s]+$/,Og=/[\p{L}\p{N}_]/u,Rg=/^```[^`\n]*```?$/,Dg=/^\*{4,}$/,Pg=/(__)([^_]+)_$/,Mg=/(~~)([^~]+)~$/,vg=/__/g,bs=/~~/g,ut=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Og.test(e)},xt=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Bg=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},rl=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Er=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Fg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
19
- `)return!1}return!1},il=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Fg(e,t):!1;if(e[n]===`
18
+ `))}function o(f,E,k,N){const y=k.enter("tableCell"),R=k.enter("phrasing"),L=k.containerPhrasing(f,{...N,before:a,after:a});return R(),y(),L}function c(f,E){return yp(f,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function h(f,E,k){const N=f.children;let y=-1;const R=[],L=E.enter("table");for(;++y<N.length;)R[y]=d(N[y],E,k);return L(),R}function d(f,E,k){const N=f.children;let y=-1;const R=[],L=E.enter("tableRow");for(;++y<N.length;)R[y]=o(N[y],f,E,k);return L(),R}function p(f,E,k){let N=vo.inlineCode(f,E,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Em(){return{exit:{taskListCheckValueChecked:os,taskListCheckValueUnchecked:os,paragraph:Tm}}}function bm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xm}}}function os(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Tm(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xm(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=vo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function _m(){return[G0(),mp(),Tp(),cm(),Em()]}function km(e){return{extensions:[K0(),gp(e),xp(),gm(e),bm()]}}function Pe(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ve(e,t){return e.length>0?(Pe(e,e.length,0,t),e):t}const ls={}.hasOwnProperty;function Fo(e){const t={};let n=-1;for(;++n<e.length;)Am(t,e[n]);return t}function Am(e,t){let n;for(n in t){const i=(ls.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){ls.call(i,s)||(i[s]=[]);const u=a[s];Cm(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Cm(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pe(e,0,0,r)}const ym={tokenize:Om,partial:!0},Ho={tokenize:Rm,partial:!0},Uo={tokenize:Dm,partial:!0},jo={tokenize:Pm,partial:!0},Nm={tokenize:Mm,partial:!0},zo={name:"wwwAutolink",tokenize:wm,previous:Yo},$o={name:"protocolAutolink",tokenize:Lm,previous:qo},Je={name:"emailAutolink",tokenize:Sm,previous:Vo},We={};function Im(){return{text:We}}let ft=48;for(;ft<123;)We[ft]=Je,ft++,ft===58?ft=65:ft===91&&(ft=97);We[43]=Je;We[45]=Je;We[46]=Je;We[95]=Je;We[72]=[Je,$o];We[104]=[Je,$o];We[87]=[Je,zo];We[119]=[Je,zo];function Sm(e,t,n){const r=this;let i,a;return s;function s(d){return!ti(d)||!Vo.call(r,r.previous)||zi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ti(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(Nm,h,c)(d):d===45||d===95||xe(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function wm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Yo.call(r,r.previous)||zi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ym,e.attempt(Ho,e.attempt(Uo,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Lm(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&qo.call(r,r.previous)&&!zi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Zn(d)||oe(d)||Tt(d)||mr(d)?n(d):e.attempt(Ho,e.attempt(Uo,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Om(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Rm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(jo,o,u)(c):c===null||oe(c)||Tt(c)||c!==45&&mr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function Dm(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(jo,t,a)(s):s===null||oe(s)||Tt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Pm(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||oe(u)||Tt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||Tt(u)?t(u):r(u)}function a(u){return Ce(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),s):n(u)}}function Mm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return xe(a)?n(a):t(a)}}function Yo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function qo(e){return!Ce(e)}function Vo(e){return!(e===47||ti(e))}function ti(e){return e===43||e===45||e===46||e===95||xe(e)}function zi(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function zt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&xe(e.charCodeAt(n+1))&&xe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ni={name:"attention",resolveAll:vm,tokenize:Bm};function vm(e,t){let n=-1,r,i,a,s,u,o,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};cs(d,-o),cs(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ve(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ve(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=ve(c,gr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ve(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=ve(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Pe(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Bm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Bt(o),d=!h||h===2&&i||n.includes(o),p=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!p)),c._close=!!(a===42?p:p&&(h||!d)),t(o)}}function cs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fm={name:"autolink",tokenize:Hm};function Hm(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Ce(f)?(e.consume(f),s):f===64?n(f):c(f)}function s(f){return f===43||f===45||f===46||xe(f)?(r=1,u(f)):c(f)}function u(f){return f===58?(e.consume(f),r=0,o):(f===43||f===45||f===46||xe(f))&&r++<32?(e.consume(f),u):(r=0,c(f))}function o(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Zn(f)?n(f):(e.consume(f),o)}function c(f){return f===64?(e.consume(f),h):U0(f)?(e.consume(f),c):n(f)}function h(f){return xe(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,h):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||xe(f))&&r++<63){const E=f===45?p:d;return e.consume(f),E}return n(f)}}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return ee(o)?(e.enter(n),u(o)):t(o)}function u(o){return ee(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Ln={partial:!0,tokenize:Um};function Um(e,t,n){return r;function r(a){return ee(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const Wo={continuation:{tokenize:zm},exit:$m,name:"blockQuote",tokenize:jm};function jm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function zm(e,t,n){const r=this;return i;function i(s){return ee(s)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Wo,t,n)(s)}}function $m(e){e.exit("blockQuote")}const Go={name:"characterEscape",tokenize:Ym};function Ym(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return z0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ko={name:"characterReference",tokenize:qm};function qm(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=xe,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=j0,h):(e.enter("characterReferenceValue"),a=7,s=ei,h(d))}function h(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===xe&&!ji(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const hs={partial:!0,tokenize:Wm},ds={concrete:!0,name:"codeFenced",tokenize:Vm};function Vm(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const G=r.events[r.events.length-1];return a=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),ee(w)?ne(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(hs,k,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):ee(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,f,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),p)}function f(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(w))}function E(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),E)}function k(w){return e.attempt(i,H,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return a>0&&ee(w)?ne(e,R,"linePrefix",a+1)(w):R(w)}function R(w){return w===null||Y(w)?e.check(hs,k,H)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||Y(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),L)}function H(w){return e.exit("codeFenced"),t(w)}function j(w,G,W){let X=0;return I;function I(F){return w.enter("lineEnding"),w.consume(F),w.exit("lineEnding"),U}function U(F){return w.enter("codeFencedFence"),ee(F)?ne(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):v(F)}function v(F){return F===u?(w.enter("codeFencedFenceSequence"),q(F)):W(F)}function q(F){return F===u?(X++,w.consume(F),q):X>=s?(w.exit("codeFencedFenceSequence"),ee(F)?ne(w,z,"whitespace")(F):z(F)):W(F)}function z(F){return F===null||Y(F)?(w.exit("codeFencedFence"),G(F)):W(F)}}}function Wm(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Or={name:"codeIndented",tokenize:Km},Gm={partial:!0,tokenize:Qm};function Km(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):Y(c)?e.attempt(Gm,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function Qm(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const Xm={name:"codeText",previous:Jm,resolve:Zm,tokenize:e1};function Zm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Jm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function e1(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class t1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Kt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Kt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Kt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Kt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Kt(this.left,n.reverse())}}}function Kt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qo(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new t1(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,n1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Pe(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function n1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],c={};let h,d,p=-1,f=n,E=0,k=0;const N=[k];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(k=p+1,N.push(k),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):N.pop(),p=N.length;p--;){const y=u.slice(N[p],N[p+1]),R=a.pop();o.push([R,R+y.length-1]),e.splice(R,2,y)}for(o.reverse(),p=-1;++p<o.length;)c[E+o[p][0]]=E+o[p][1],E+=o[p][1]-o[p][0]-1;return c}const r1={resolve:a1,tokenize:s1},i1={partial:!0,tokenize:u1};function a1(e){return Qo(e),e}function s1(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Y(u)?e.check(i1,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function u1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Xo(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),p):y===null||y===32||y===41||Zn(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(u),p(y)):y===null||y===60||Y(y)?n(y):(e.consume(y),y===92?E:f)}function E(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function k(y){return!h&&(y===null||y===41||oe(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,k):y===41?(e.consume(y),h--,k):y===null||y===32||y===40||Zn(y)?n(y):(e.consume(y),y===92?N:k)}function N(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Zo(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),h}function h(f){return u>999||f===null||f===91||f===93&&!o||f===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Y(f)||u++>999?(e.exit("chunkString"),h(f)):(e.consume(f),o||(o=!ee(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),u++,d):d(f)}}function Jo(e,t,n,r,i,a){let s;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):n(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),o(s)):p===null?n(p):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||Y(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===s||p===92?(e.consume(p),h):h(p)}}function hn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ee(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const o1={name:"definition",tokenize:c1},l1={partial:!0,tokenize:h1};function c1(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return Zo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function u(f){return i=ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o):n(f)}function o(f){return oe(f)?hn(e,c)(f):c(f)}function c(f){return Xo(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return e.attempt(l1,d,d)(f)}function d(f){return ee(f)?ne(e,p,"whitespace")(f):p(f)}function p(f){return f===null||Y(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function h1(e,t,n){return r;function r(u){return oe(u)?hn(e,i)(u):n(u)}function i(u){return Jo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return ee(u)?ne(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Y(u)?t(u):n(u)}}const d1={name:"hardBreakEscape",tokenize:f1};function f1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const p1={name:"headingAtx",resolve:m1,tokenize:g1};function m1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function g1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||oe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||Y(h)?(e.exit("atxHeading"),t(h)):ee(h)?ne(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const E1=["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"],fs=["pre","script","style","textarea"],b1={concrete:!0,name:"htmlFlow",resolveTo:_1,tokenize:k1},T1={partial:!0,tokenize:C1},x1={partial:!0,tokenize:A1};function _1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function k1(e,t,n){const r=this;let i,a,s,u,o;return c;function c(_){return h(_)}function h(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),a=!0,k):_===63?(e.consume(_),i=3,r.interrupt?t:x):Ce(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function p(_){return _===45?(e.consume(_),i=2,f):_===91?(e.consume(_),i=5,u=0,E):Ce(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function f(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function E(_){const He="CDATA[";return _===He.charCodeAt(u++)?(e.consume(_),u===He.length?r.interrupt?t:v:E):n(_)}function k(_){return Ce(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function N(_){if(_===null||_===47||_===62||oe(_)){const He=_===47,ct=s.toLowerCase();return!He&&!a&&fs.includes(ct)?(i=1,r.interrupt?t(_):v(_)):E1.includes(s.toLowerCase())?(i=6,He?(e.consume(_),y):r.interrupt?t(_):v(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?R(_):L(_))}return _===45||xe(_)?(e.consume(_),s+=String.fromCharCode(_),N):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function R(_){return ee(_)?(e.consume(_),R):I(_)}function L(_){return _===47?(e.consume(_),I):_===58||_===95||Ce(_)?(e.consume(_),H):ee(_)?(e.consume(_),L):I(_)}function H(_){return _===45||_===46||_===58||_===95||xe(_)?(e.consume(_),H):j(_)}function j(_){return _===61?(e.consume(_),w):ee(_)?(e.consume(_),j):L(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,G):ee(_)?(e.consume(_),w):W(_)}function G(_){return _===o?(e.consume(_),o=null,X):_===null||Y(_)?n(_):(e.consume(_),G)}function W(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||oe(_)?j(_):(e.consume(_),W)}function X(_){return _===47||_===62||ee(_)?L(_):n(_)}function I(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||Y(_)?v(_):ee(_)?(e.consume(_),U):n(_)}function v(_){return _===45&&i===2?(e.consume(_),ie):_===60&&i===1?(e.consume(_),he):_===62&&i===4?(e.consume(_),Le):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),ae):Y(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(T1,Ge,q)(_)):_===null||Y(_)?(e.exit("htmlFlowData"),q(_)):(e.consume(_),v)}function q(_){return e.check(x1,z,Ge)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),F}function F(_){return _===null||Y(_)?q(_):(e.enter("htmlFlowData"),v(_))}function ie(_){return _===45?(e.consume(_),x):v(_)}function he(_){return _===47?(e.consume(_),s="",we):v(_)}function we(_){if(_===62){const He=s.toLowerCase();return fs.includes(He)?(e.consume(_),Le):v(_)}return Ce(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),we):v(_)}function ae(_){return _===93?(e.consume(_),x):v(_)}function x(_){return _===62?(e.consume(_),Le):_===45&&i===2?(e.consume(_),x):v(_)}function Le(_){return _===null||Y(_)?(e.exit("htmlFlowData"),Ge(_)):(e.consume(_),Le)}function Ge(_){return e.exit("htmlFlow"),t(_)}}function A1(e,t,n){const r=this;return i;function i(s){return Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function C1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ln,t,n)}}const y1={name:"htmlText",tokenize:N1};function N1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):Ce(x)?(e.consume(x),W):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,E):Ce(x)?(e.consume(x),R):n(x)}function h(x){return x===45?(e.consume(x),f):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),p):Y(x)?(s=d,he(x)):(e.consume(x),d)}function p(x){return x===45?(e.consume(x),f):d(x)}function f(x){return x===62?ie(x):x===45?p(x):d(x)}function E(x){const Le="CDATA[";return x===Le.charCodeAt(a++)?(e.consume(x),a===Le.length?k:E):n(x)}function k(x){return x===null?n(x):x===93?(e.consume(x),N):Y(x)?(s=k,he(x)):(e.consume(x),k)}function N(x){return x===93?(e.consume(x),y):k(x)}function y(x){return x===62?ie(x):x===93?(e.consume(x),y):k(x)}function R(x){return x===null||x===62?ie(x):Y(x)?(s=R,he(x)):(e.consume(x),R)}function L(x){return x===null?n(x):x===63?(e.consume(x),H):Y(x)?(s=L,he(x)):(e.consume(x),L)}function H(x){return x===62?ie(x):L(x)}function j(x){return Ce(x)?(e.consume(x),w):n(x)}function w(x){return x===45||xe(x)?(e.consume(x),w):G(x)}function G(x){return Y(x)?(s=G,he(x)):ee(x)?(e.consume(x),G):ie(x)}function W(x){return x===45||xe(x)?(e.consume(x),W):x===47||x===62||oe(x)?X(x):n(x)}function X(x){return x===47?(e.consume(x),ie):x===58||x===95||Ce(x)?(e.consume(x),I):Y(x)?(s=X,he(x)):ee(x)?(e.consume(x),X):ie(x)}function I(x){return x===45||x===46||x===58||x===95||xe(x)?(e.consume(x),I):U(x)}function U(x){return x===61?(e.consume(x),v):Y(x)?(s=U,he(x)):ee(x)?(e.consume(x),U):X(x)}function v(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,q):Y(x)?(s=v,he(x)):ee(x)?(e.consume(x),v):(e.consume(x),z)}function q(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):Y(x)?(s=q,he(x)):(e.consume(x),q)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?X(x):(e.consume(x),z)}function F(x){return x===47||x===62||oe(x)?X(x):n(x)}function ie(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function he(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),we}function we(x){return ee(x)?ne(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ae(x)}function ae(x){return e.enter("htmlTextData"),s(x)}}const $i={name:"labelEnd",resolveAll:L1,resolveTo:O1,tokenize:R1},I1={tokenize:D1},S1={tokenize:P1},w1={tokenize:M1};function L1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Pe(e,0,e.length,n),e}function O1(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=ve(u,e.slice(a+1,a+r+3)),u=ve(u,[["enter",h,t]]),u=ve(u,gr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=ve(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=ve(u,e.slice(s+1)),u=ve(u,[["exit",o,t]]),Pe(e,a,e.length,u),e}function R1(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(p){return a?a._inactive?d(p):(s=r.parser.defined.includes(ze(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(I1,h,s?h:d)(p):p===91?e.attempt(S1,h,s?c:d)(p):s?h(p):d(p)}function c(p){return e.attempt(w1,h,d)(p)}function h(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function D1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return oe(d)?hn(e,a)(d):a(d)}function a(d){return d===41?h(d):Xo(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return oe(d)?hn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Jo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return oe(d)?hn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function P1(e,t,n){const r=this;return i;function i(u){return Zo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function M1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const v1={name:"labelStartImage",resolveAll:$i.resolveAll,tokenize:B1};function B1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const F1={name:"labelStartLink",resolveAll:$i.resolveAll,tokenize:H1};function H1(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Rr={name:"lineEnding",tokenize:U1};function U1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const qn={name:"thematicBreak",tokenize:j1};function j1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),ee(c)?ne(e,u,"whitespace")(c):u(c))}}const Ie={continuation:{tokenize:q1},exit:W1,name:"list",tokenize:Y1},z1={partial:!0,tokenize:G1},$1={partial:!0,tokenize:V1};function Y1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(f){const E=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ei(f)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(qn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(f)}return n(f)}function o(f){return ei(f)&&++s<10?(e.consume(f),o):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ln,r.interrupt?n:h,e.attempt(z1,p,d))}function h(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function d(f){return ee(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function q1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ln,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!ee(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Ie,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function V1(e,t,n){const r=this;return ne(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function W1(e){e.exit(this.containerState.type)}function G1(e,t,n){const r=this;return ne(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!ee(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ps={name:"setextUnderline",resolveTo:K1,tokenize:Q1};function K1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Q1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),ee(c)?ne(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const X1={tokenize:ag,partial:!0};function Z1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ng,continuation:{tokenize:rg},exit:ig}},text:{91:{name:"gfmFootnoteCall",tokenize:tg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:J1,resolveTo:eg}}}}function J1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=ze(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function eg(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function tg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||oe(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ze(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return oe(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function ng(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(E)}function h(E){if(s>999||E===93&&!u||E===null||E===91||oe(E))return n(E);if(E===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=ze(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(E)||(u=!0),s++,e.consume(E),E===92?d:h}function d(E){return E===91||E===92||E===93?(e.consume(E),s++,h):h(E)}function p(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,f,"gfmFootnoteDefinitionWhitespace")):n(E)}function f(E){return t(E)}}function rg(e,t,n){return e.check(Ln,t,e.attempt(X1,t,n))}function ig(e){e.exit("gfmFootnoteDefinition")}function ag(e,t,n){const r=this;return ne(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function sg(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},p=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],f=u.parser.constructs.insideSpan.null;f&&Pe(p,p.length,0,gr(f,s.slice(c+1,o),u)),Pe(p,p.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Pe(s,c-1,o-c+3,p),o=c+p.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return p;function p(E){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(E):(s.enter("strikethroughSequenceTemporary"),f(E))}function f(E){const k=Bt(c);if(E===126)return d>1?o(E):(s.consume(E),d++,f);if(d<2&&!n)return o(E);const N=s.exit("strikethroughSequenceTemporary"),y=Bt(E);return N._open=!y||y===2&&!!k,N._close=!k||k===2&&!!y,u(E)}}}class ug{constructor(){this.map=[]}add(t,n,r){og(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function og(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function lg(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function cg(){return{flow:{null:{name:"table",tokenize:hg,resolveAll:dg}}}}function hg(e,t,n){const r=this;let i=0,a=0,s;return u;function u(I){let U=r.events.length-1;for(;U>-1;){const z=r.events[U][1].type;if(z==="lineEnding"||z==="linePrefix")U--;else break}const v=U>-1?r.events[U][1].type:null,q=v==="tableHead"||v==="tableRow"?w:o;return q===w&&r.parser.lazy[r.now().line]?n(I):q(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),h(I)}function h(I){return I===null?n(I):Y(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):ee(I)?ne(e,h,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||oe(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,ee(I)?ne(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):E(I))}function E(I){return I===45||I===58?N(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):j(I)}function k(I){return ee(I)?ne(e,N,"whitespace")(I):N(I)}function N(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(a+=1,y(I)):I===null||Y(I)?H(I):j(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),R(I)):j(I)}function R(I){return I===45?(e.consume(I),R):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(I))}function L(I){return ee(I)?ne(e,H,"whitespace")(I):H(I)}function H(I){return I===124?E(I):I===null||Y(I)?!s||i!==a?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function w(I){return e.enter("tableRow"),G(I)}function G(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),G):I===null||Y(I)?(e.exit("tableRow"),t(I)):ee(I)?ne(e,G,"whitespace")(I):(e.enter("data"),W(I))}function W(I){return I===null||I===124||oe(I)?(e.exit("data"),G(I)):(e.consume(I),I===92?X:W)}function X(I){return I===92||I===124?(e.consume(I),W):W(I)}}function dg(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const p=new ug;for(;++n<e.length;){const f=e[n],E=f[1];f[0]==="enter"?E.type==="tableHead"?(u=!1,o!==0&&(ms(p,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",c,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",h,t]])),i=E.type==="tableDelimiterRow"?2:h?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=vn(p,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=vn(p,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):E.type==="tableHead"?(u=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=vn(p,t,a,i,n,d)):s[1]!==0&&(d=vn(p,t,s,i,n,d)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&ms(p,t,o,c,h),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=lg(t.events,n))}return e}function vn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Ot(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Ot(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ot(t.events,n[2]),h=Ot(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,k=n[3]-n[2]-1;e.add(E,k,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Ot(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ms(e,t,n,r,i){const a=[],s=Ot(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ot(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const fg={name:"tasklistCheck",tokenize:mg};function pg(){return{text:{91:fg}}}function mg(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return oe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Y(o)?t(o):ee(o)?e.check({tokenize:gg},t,n)(o):n(o)}}function gg(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Eg(e){return Fo([Im(),Z1(),sg(e),cg(),pg()])}const bg={};function Tg(e){const t=this,n=e||bg,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Eg(n)),a.push(_m()),s.push(km(n))}var xg=Object.defineProperty,_g=Object.defineProperties,kg=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,Ag=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,Es=(e,t,n)=>t in e?xg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,el=(e,t)=>{for(var n in t||(t={}))Ag.call(t,n)&&Es(e,n,t[n]);if(gs)for(var n of gs(t))Cg.call(t,n)&&Es(e,n,t[n]);return e},tl=(e,t)=>_g(e,kg(t)),yg=/(\*\*)([^*]*\*?)$/,Ng=/(__)([^_]*?)$/,Ig=/(\*\*\*)([^*]*?)$/,Sg=/(\*)([^*]*?)$/,wg=/(_)([^_]*?)$/,Lg=/(`)([^`]*?)$/,Og=/(~~)([^~]*?)$/,Ct=/^[\s_~*`]*$/,nl=/^[\s]*[-*+][\s]+$/,Rg=/[\p{L}\p{N}_]/u,Dg=/^```[^`\n]*```?$/,Pg=/^\*{4,}$/,Mg=/(__)([^_]+)_$/,vg=/(~~)([^~]+)~$/,Bg=/__/g,bs=/~~/g,ut=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Rg.test(e)},xt=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Fg=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},rl=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Er=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Hg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
19
+ `)return!1}return!1},il=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Hg(e,t):!1;if(e[n]===`
20
20
  `)return!1}return!1},Yi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
21
21
  `){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
22
- `){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},Hg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Ug=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Hg,(t,n,r,i)=>xt(e,i)?t:`${n}\\>${r}`),jg=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
23
- `){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},zg=(e,t,n,r)=>n==="\\"||e.includes("$")&&Er(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ut(n)&&ut(r)||(!n||n===" "||n===" "||n===`
22
+ `){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},Ug=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,jg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Ug,(t,n,r,i)=>xt(e,i)?t:`${n}\\>${r}`),zg=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
23
+ `){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},$g=(e,t,n,r)=>n==="\\"||e.includes("$")&&Er(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ut(n)&&ut(r)||(!n||n===" "||n===" "||n===`
24
24
  `)&&(!r||r===" "||r===" "||r===`
25
- `)||jg(e,t,r)),al=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";zg(e,r,i,a)||(t+=1)}return t},$g=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Er(e,t)||il(e,t)||n==="_"||r==="_"||n&&r&&ut(n)&&ut(r)),Yg=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";$g(e,r,i,a)||(t+=1)}return t},qg=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},Vg=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
25
+ `)||zg(e,t,r)),al=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";$g(e,r,i,a)||(t+=1)}return t},Yg=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Er(e,t)||il(e,t)||n==="_"||r==="_"||n&&r&&ut(n)&&ut(r)),qg=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";Yg(e,r,i,a)||(t+=1)}return t},Vg=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},Wg=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
26
26
  `),i=r===-1?0:r+1,a=e.substring(i,n);return nl.test(a)&&t.includes(`
27
- `)?!0:Yi(e,n,"*")},Wg=e=>{let t=e.match(Cg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Vg(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Gg=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
27
+ `)?!0:Yi(e,n,"*")},Gg=e=>{let t=e.match(yg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Wg(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Kg=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
28
28
  `),i=r===-1?0:r+1,a=e.substring(i,n);return nl.test(a)&&t.includes(`
29
- `)?!0:Yi(e,n,"_")},Kg=e=>{let t=e.match(yg);if(!t){let i=e.match(Pg);if(i){let a=e.lastIndexOf(i[1]);if(!xt(e,a)&&(e.match(vg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Gg(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Qg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Er(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
29
+ `)?!0:Yi(e,n,"_")},Qg=e=>{let t=e.match(Ng);if(!t){let i=e.match(Mg);if(i){let a=e.lastIndexOf(i[1]);if(!xt(e,a)&&(e.match(Bg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Kg(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Xg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Er(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
30
30
  `)&&(!r||r===" "||r===" "||r===`
31
- `)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},Xg=e=>{if(!e.match(Ig))return e;let t=Qg(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);return!n||Ct.test(n)?e:al(e)%2===1?`${e}*`:e},sl=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Er(e,t)&&!il(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ut(n)&&ut(r))continue;return t}return-1},Zg=e=>{let t=e.length;for(;t>0&&e[t-1]===`
32
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Jg=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=sl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},eE=e=>{if(!e.match(Sg))return e;let t=sl(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);if(!n||Ct.test(n))return e;if(Yg(e)%2===1){let r=Jg(e);return r!==null?r:Zg(e)}return e},tE=e=>{let t=(e.match(/\*\*/g)||[]).length,n=al(e);return t%2===0&&n%2===0},nE=(e,t,n)=>!t||Ct.test(t)||xt(e,n)?!0:Yi(e,n,"*"),rE=e=>{if(Dg.test(e))return e;let t=e.match(Ng);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return nE(e,n,r)?e:qg(e)%2===1?tE(e)?e:`${e}***`:e},xn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},iE=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},aE=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!iE(e,n)&&(t+=1);return t},sE=/<[a-zA-Z/][^>]*$/,uE=e=>{let t=e.match(sE);return!t||t.index===void 0||xn(e,t.index)?e:e.substring(0,t.index).trimEnd()},oE=e=>!e.match(Rg)||e.includes(`
33
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,lE=e=>(e.match(/```/g)||[]).length%2===1,cE=e=>{let t=oE(e);if(t!==null)return t;let n=e.match(wg);if(n&&!lE(e)){let r=n[2];if(!r||Ct.test(r))return e;if(aE(e)%2===1)return`${e}\``}return e},hE=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",dE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!hE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},fE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
31
+ `)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},Zg=e=>{if(!e.match(Sg))return e;let t=Xg(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);return!n||Ct.test(n)?e:al(e)%2===1?`${e}*`:e},sl=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Er(e,t)&&!il(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ut(n)&&ut(r))continue;return t}return-1},Jg=e=>{let t=e.length;for(;t>0&&e[t-1]===`
32
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},eE=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=sl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},tE=e=>{if(!e.match(wg))return e;let t=sl(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);if(!n||Ct.test(n))return e;if(qg(e)%2===1){let r=eE(e);return r!==null?r:Jg(e)}return e},nE=e=>{let t=(e.match(/\*\*/g)||[]).length,n=al(e);return t%2===0&&n%2===0},rE=(e,t,n)=>!t||Ct.test(t)||xt(e,n)?!0:Yi(e,n,"*"),iE=e=>{if(Pg.test(e))return e;let t=e.match(Ig);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return rE(e,n,r)?e:Vg(e)%2===1?nE(e)?e:`${e}***`:e},xn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},aE=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},sE=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!aE(e,n)&&(t+=1);return t},uE=/<[a-zA-Z/][^>]*$/,oE=e=>{let t=e.match(uE);return!t||t.index===void 0||xn(e,t.index)?e:e.substring(0,t.index).trimEnd()},lE=e=>!e.match(Dg)||e.includes(`
33
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,cE=e=>(e.match(/```/g)||[]).length%2===1,hE=e=>{let t=lE(e);if(t!==null)return t;let n=e.match(Lg);if(n&&!cE(e)){let r=n[2];if(!r||Ct.test(r))return e;if(sE(e)%2===1)return`${e}\``}return e},dE=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",fE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!dE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},pE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
34
34
  `,t)!==-1&&!e.endsWith(`
35
35
  `)?`${e}
36
- $$`:`${e}$$`},pE=e=>dE(e)%2===0?e:fE(e),mE=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Bg(e,t);if(r===-1||xn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},Ts=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!xn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=rl(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return-1},gE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=Ts(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(rl(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=Ts(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${s}${o}`}return`${e}](streamdown:incomplete-link)`}return null},ul=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!xn(e,n)){let r=mE(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!xn(e,r)){let i=gE(e,r,t);if(i!==null)return i}return e},EE=/^-{1,2}$/,bE=/^[\s]*-{1,2}[\s]+$/,TE=/^={1,2}$/,xE=/^[\s]*={1,2}[\s]+$/,_E=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
37
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(EE.test(i)&&!n.match(bE)){let a=r.split(`
38
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(TE.test(i)&&!n.match(xE)){let a=r.split(`
39
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},kE=e=>{let t=e.match(Lg);if(t){let n=t[2];if(!n||Ct.test(n))return e;if((e.match(bs)||[]).length%2===1)return`${e}~~`}else if(e.match(Mg)&&(e.match(bs)||[]).length%2===1)return`${e}~`;return e},Dr=e=>e!==!1,Ae={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},AE=[{handler:{name:"comparisonOperators",handle:Ug,priority:Ae.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:uE,priority:Ae.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:_E,priority:Ae.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:ul,priority:Ae.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:rE,priority:Ae.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Wg,priority:Ae.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Kg,priority:Ae.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Xg,priority:Ae.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:eE,priority:Ae.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:cE,priority:Ae.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:kE,priority:Ae.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:pE,priority:Ae.KATEX},optionKey:"katex"}],CE=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return AE.filter(({handler:r,optionKey:i})=>r.name==="links"?Dr(e?.links)||Dr(e?.images):Dr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:tl(el({},r),{handle:a=>ul(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},yE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=CE(t),a=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:tl(el({},u),{priority:(o=u.priority)!=null?o:Ae.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:Ae.DEFAULT)-((h=o.handler.priority)!=null?h:Ae.DEFAULT)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},NE=yE;const IE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wE={};function xs(e,t){return(wE.jsx?SE:IE).test(e)}const LE=/[ \t\n\f\r]/g;function OE(e){return typeof e=="object"?e.type==="text"?_s(e.value):!1:_s(e)}function _s(e){return e.replace(LE,"")===""}var Lt={},Pr,ks;function RE(){if(ks)return Pr;ks=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
40
- `,c="/",h="*",d="",p="comment",f="declaration";function E(N,y){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];y=y||{};var R=1,L=1;function H(z){var F=z.match(t);F&&(R+=F.length);var ie=z.lastIndexOf(o);L=~ie?z.length-ie:L+z.length}function j(){var z={line:R,column:L};return function(F){return F.position=new w(z),X(),F}}function w(z){this.start=z,this.end={line:R,column:L},this.source=y.source}w.prototype.content=N;function G(z){var F=new Error(y.source+":"+R+":"+L+": "+z);if(F.reason=z,F.filename=y.source,F.line=R,F.column=L,F.source=N,!y.silent)throw F}function W(z){var F=z.exec(N);if(F){var ie=F[0];return H(ie),N=N.slice(ie.length),F}}function X(){W(n)}function I(z){var F;for(z=z||[];F=U();)F!==!1&&z.push(F);return z}function U(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var F=2;d!=N.charAt(F)&&(h!=N.charAt(F)||c!=N.charAt(F+1));)++F;if(F+=2,d===N.charAt(F-1))return G("End of comment missing");var ie=N.slice(2,F-2);return L+=2,H(ie),N=N.slice(F),L+=2,z({type:p,comment:ie})}}function v(){var z=j(),F=W(r);if(F){if(U(),!W(i))return G("property missing ':'");var ie=W(a),he=z({type:f,property:k(F[0].replace(e,d)),value:ie?k(ie[0].replace(e,d)):d});return W(s),he}}function q(){var z=[];I(z);for(var F;F=v();)F!==!1&&(z.push(F),I(z));return z}return X(),q()}function k(N){return N?N.replace(u,d):d}return Pr=E,Pr}var As;function DE(){if(As)return Lt;As=1;var e=Lt&&Lt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=n;const t=e(RE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return Lt}var Qt={},Cs;function PE(){if(Cs)return Qt;Cs=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Qt.camelCase=o,Qt}var Xt,ys;function ME(){if(ys)return Xt;ys=1;var e=Xt&&Xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(DE()),n=PE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Xt=r,Xt}var vE=ME();const BE=Eu(vE);function dn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ns(e.position):"start"in e||"end"in e?Ns(e):"line"in e||"column"in e?ri(e):""}function ri(e){return Is(e&&e.line)+":"+Is(e&&e.column)}function Ns(e){return ri(e&&e.start)+"-"+ri(e&&e.end)}function Is(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=dn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const qi={}.hasOwnProperty,FE=new Map,HE=/[A-Z]/g,UE=new Set(["table","tbody","thead","tfoot","tr"]),jE=new Set(["td","th"]),ol="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=QE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=KE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ot:Nn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ll(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ll(e,t,n){if(t.type==="element")return $E(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return YE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return VE(e,t,n);if(t.type==="mdxjsEsm")return qE(e,t);if(t.type==="root")return WE(e,t,n);if(t.type==="text")return GE(e,t)}function $E(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=hl(e,t.tagName,!1),s=XE(e,t);let u=Wi(e,t);return UE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!OE(o):!0})),cl(e,s,a,t),Vi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function YE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}_n(e,t.position)}function qE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_n(e,t.position)}function VE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:hl(e,t.name,!0),s=ZE(e,t),u=Wi(e,t);return cl(e,s,a,t),Vi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function WE(e,t,n){const r={};return Vi(r,Wi(e,t)),e.create(t,e.Fragment,r,n)}function GE(e,t){return t.value}function cl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function KE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function QE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=Ve(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function XE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qi.call(t.properties,i)){const a=JE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&jE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ZE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else _n(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else _n(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Wi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:FE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=ll(e,a,s);u!==void 0&&n.push(u)}return n}function JE(e,t,n){const r=lr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Lu(n):Ou(n)),r.property==="style"){let i=typeof n=="object"?n:eb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=tb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fh[r.property]||r.property:r.attribute,n]}}function eb(e,t){try{return BE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ol+"#cannot-parse-style-attribute",i}}function hl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=xs(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=xs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);_n(e)}function _n(e,t){const n=new ke("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ol+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tb(e){const t={};let n;for(n in e)qi.call(e,n)&&(t[nb(n)]=e[n]);return t}function nb(e){let t=e.replace(HE,rb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rb(e){return"-"+e.toLowerCase()}const Mr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ib={tokenize:ab};function ab(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Y(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const sb={tokenize:ub},Ss={tokenize:ob};function ub(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let j=H,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}y(r);let G=H;for(;G<t.events.length;)t.events[G][1].end={...w},G++;return Pe(t.events,j+1,0,t.events.slice(H)),t.events.length=G,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return p(L);if(i.currentConstruct&&i.currentConstruct.concrete)return E(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ss,h,d)(L)}function h(L){return i&&R(),y(r),p(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,E(L)}function p(L){return t.containerState={},e.attempt(Ss,f,E)(L)}function f(L){return r++,n.push([t.currentConstruct,t.containerState]),p(L)}function E(L){if(L===null){i&&R(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(L)}function k(L){if(L===null){N(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return Y(L)?(e.consume(L),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),k)}function N(L,H){const j=t.sliceStream(L);if(H&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const G=t.events.length;let W=G,X,I;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(X){I=t.events[W][1].end;break}X=!0}for(y(r),w=G;w<t.events.length;)t.events[w][1].end={...I},w++;Pe(t.events,W+1,0,t.events.slice(G)),t.events.length=w}}function y(L){let H=n.length;for(;H-- >L;){const j=n[H];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ob(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const lb={tokenize:cb};function cb(e){const t=this,n=e.attempt(Ln,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(n1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hb={resolveAll:fl()},db=dl("string"),fb=dl("text");function dl(e){return{resolveAll:fl(e==="text"?pb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function fl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function pb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const mb={42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Wo},gb={91:u1},Eb={[-2]:Or,[-1]:Or,32:Or},bb={35:f1,42:qn,45:[ps,qn],60:E1,61:ps,95:qn,96:ds,126:ds},Tb={38:Ko,92:Go},xb={[-5]:Rr,[-4]:Rr,[-3]:Rr,33:M1,38:Ko,42:ni,60:[Bm,C1],91:B1,92:[h1,Go],93:$i,95:ni,96:Qm},_b={null:[ni,hb]},kb={null:[42,95]},Ab={null:[]},Cb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kb,contentInitial:gb,disable:Ab,document:mb,flow:bb,flowInitial:Eb,insideSpan:_b,string:Tb,text:xb},Symbol.toStringTag,{value:"Module"}));function yb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:G(j),check:G(w),consume:R,enter:L,exit:H,interrupt:G(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(U){return s=ve(s,U),N(),s[s.length-1]!==null?[]:(W(t,0),c.events=gr(a,c.events,c),c.events)}function p(U,v){return Ib(f(U),v)}function f(U){return Nb(s,U)}function E(){const{_bufferIndex:U,_index:v,line:q,column:z,offset:F}=r;return{_bufferIndex:U,_index:v,line:q,column:z,offset:F}}function k(U){i[U.line]=U.column,I()}function N(){let U;for(;r._index<s.length;){const v=s[r._index];if(typeof v=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<v.length;)y(v.charCodeAt(r._bufferIndex));else y(v)}}function y(U){h=h(U)}function R(U){Y(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,v){const q=v||{};return q.type=U,q.start=E(),c.events.push(["enter",q,c]),u.push(q),q}function H(U){const v=u.pop();return v.end=E(),c.events.push(["exit",v,c]),v}function j(U,v){W(U,v.from)}function w(U,v){v.restore()}function G(U,v){return q;function q(z,F,ie){let he,we,ae,x;return Array.isArray(z)?Ge(z):"tokenize"in z?Ge([z]):Le(z);function Le(be){return $t;function $t(et){const Nt=et!==null&&be[et],It=et!==null&&be.null,Dn=[...Array.isArray(Nt)?Nt:Nt?[Nt]:[],...Array.isArray(It)?It:It?[It]:[]];return Ge(Dn)(et)}}function Ge(be){return he=be,we=0,be.length===0?ie:_(be[we])}function _(be){return $t;function $t(et){return x=X(),ae=be,be.partial||(c.currentConstruct=be),be.name&&c.parser.constructs.disable.null.includes(be.name)?ct():be.tokenize.call(v?Object.assign(Object.create(c),v):c,o,He,ct)(et)}}function He(be){return U(ae,x),F}function ct(be){return x.restore(),++we<he.length?_(he[we]):ie}}}function W(U,v){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Pe(c.events,v,c.events.length-v,U.resolve(c.events.slice(v),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function X(){const U=E(),v=c.previous,q=c.currentConstruct,z=c.events.length,F=Array.from(u);return{from:z,restore:ie};function ie(){r=U,c.previous=v,c.currentConstruct=q,c.events.length=z,u=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Nb(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function Ib(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
36
+ $$`:`${e}$$`},mE=e=>fE(e)%2===0?e:pE(e),gE=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Fg(e,t);if(r===-1||xn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},Ts=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!xn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=rl(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return-1},EE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=Ts(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(rl(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=Ts(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${s}${o}`}return`${e}](streamdown:incomplete-link)`}return null},ul=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!xn(e,n)){let r=gE(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!xn(e,r)){let i=EE(e,r,t);if(i!==null)return i}return e},bE=/^-{1,2}$/,TE=/^[\s]*-{1,2}[\s]+$/,xE=/^={1,2}$/,_E=/^[\s]*={1,2}[\s]+$/,kE=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
37
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(bE.test(i)&&!n.match(TE)){let a=r.split(`
38
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(xE.test(i)&&!n.match(_E)){let a=r.split(`
39
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},AE=e=>{let t=e.match(Og);if(t){let n=t[2];if(!n||Ct.test(n))return e;if((e.match(bs)||[]).length%2===1)return`${e}~~`}else if(e.match(vg)&&(e.match(bs)||[]).length%2===1)return`${e}~`;return e},Dr=e=>e!==!1,Ae={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},CE=[{handler:{name:"comparisonOperators",handle:jg,priority:Ae.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:oE,priority:Ae.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:kE,priority:Ae.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:ul,priority:Ae.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:iE,priority:Ae.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Gg,priority:Ae.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Qg,priority:Ae.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Zg,priority:Ae.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:tE,priority:Ae.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:hE,priority:Ae.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:AE,priority:Ae.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:mE,priority:Ae.KATEX},optionKey:"katex"}],yE=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return CE.filter(({handler:r,optionKey:i})=>r.name==="links"?Dr(e?.links)||Dr(e?.images):Dr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:tl(el({},r),{handle:a=>ul(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},NE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=yE(t),a=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:tl(el({},u),{priority:(o=u.priority)!=null?o:Ae.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:Ae.DEFAULT)-((h=o.handler.priority)!=null?h:Ae.DEFAULT)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},IE=NE;const SE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LE={};function xs(e,t){return(LE.jsx?wE:SE).test(e)}const OE=/[ \t\n\f\r]/g;function RE(e){return typeof e=="object"?e.type==="text"?_s(e.value):!1:_s(e)}function _s(e){return e.replace(OE,"")===""}var Lt={},Pr,ks;function DE(){if(ks)return Pr;ks=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
40
+ `,c="/",h="*",d="",p="comment",f="declaration";function E(N,y){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];y=y||{};var R=1,L=1;function H(z){var F=z.match(t);F&&(R+=F.length);var ie=z.lastIndexOf(o);L=~ie?z.length-ie:L+z.length}function j(){var z={line:R,column:L};return function(F){return F.position=new w(z),X(),F}}function w(z){this.start=z,this.end={line:R,column:L},this.source=y.source}w.prototype.content=N;function G(z){var F=new Error(y.source+":"+R+":"+L+": "+z);if(F.reason=z,F.filename=y.source,F.line=R,F.column=L,F.source=N,!y.silent)throw F}function W(z){var F=z.exec(N);if(F){var ie=F[0];return H(ie),N=N.slice(ie.length),F}}function X(){W(n)}function I(z){var F;for(z=z||[];F=U();)F!==!1&&z.push(F);return z}function U(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var F=2;d!=N.charAt(F)&&(h!=N.charAt(F)||c!=N.charAt(F+1));)++F;if(F+=2,d===N.charAt(F-1))return G("End of comment missing");var ie=N.slice(2,F-2);return L+=2,H(ie),N=N.slice(F),L+=2,z({type:p,comment:ie})}}function v(){var z=j(),F=W(r);if(F){if(U(),!W(i))return G("property missing ':'");var ie=W(a),he=z({type:f,property:k(F[0].replace(e,d)),value:ie?k(ie[0].replace(e,d)):d});return W(s),he}}function q(){var z=[];I(z);for(var F;F=v();)F!==!1&&(z.push(F),I(z));return z}return X(),q()}function k(N){return N?N.replace(u,d):d}return Pr=E,Pr}var As;function PE(){if(As)return Lt;As=1;var e=Lt&&Lt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=n;const t=e(DE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return Lt}var Qt={},Cs;function ME(){if(Cs)return Qt;Cs=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Qt.camelCase=o,Qt}var Xt,ys;function vE(){if(ys)return Xt;ys=1;var e=Xt&&Xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(PE()),n=ME();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Xt=r,Xt}var BE=vE();const FE=Eu(BE);function dn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ns(e.position):"start"in e||"end"in e?Ns(e):"line"in e||"column"in e?ri(e):""}function ri(e){return Is(e&&e.line)+":"+Is(e&&e.column)}function Ns(e){return ri(e&&e.start)+"-"+ri(e&&e.end)}function Is(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=dn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const qi={}.hasOwnProperty,HE=new Map,UE=/[A-Z]/g,jE=new Set(["table","tbody","thead","tfoot","tr"]),zE=new Set(["td","th"]),ol="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $E(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=XE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=QE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ot:Nn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ll(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ll(e,t,n){if(t.type==="element")return YE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WE(e,t,n);if(t.type==="mdxjsEsm")return VE(e,t);if(t.type==="root")return GE(e,t,n);if(t.type==="text")return KE(e,t)}function YE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=hl(e,t.tagName,!1),s=ZE(e,t);let u=Wi(e,t);return jE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!RE(o):!0})),cl(e,s,a,t),Vi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function qE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}_n(e,t.position)}function VE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_n(e,t.position)}function WE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:hl(e,t.name,!0),s=JE(e,t),u=Wi(e,t);return cl(e,s,a,t),Vi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function GE(e,t,n){const r={};return Vi(r,Wi(e,t)),e.create(t,e.Fragment,r,n)}function KE(e,t){return t.value}function cl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function QE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function XE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=Ve(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ZE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qi.call(t.properties,i)){const a=eb(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&zE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function JE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else _n(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else _n(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Wi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:HE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=ll(e,a,s);u!==void 0&&n.push(u)}return n}function eb(e,t,n){const r=lr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Lu(n):Ou(n)),r.property==="style"){let i=typeof n=="object"?n:tb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=nb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ph[r.property]||r.property:r.attribute,n]}}function tb(e,t){try{return FE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ol+"#cannot-parse-style-attribute",i}}function hl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=xs(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=xs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);_n(e)}function _n(e,t){const n=new ke("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ol+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nb(e){const t={};let n;for(n in e)qi.call(e,n)&&(t[rb(n)]=e[n]);return t}function rb(e){let t=e.replace(UE,ib);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ib(e){return"-"+e.toLowerCase()}const Mr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ab={tokenize:sb};function sb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Y(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const ub={tokenize:ob},Ss={tokenize:lb};function ob(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let j=H,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}y(r);let G=H;for(;G<t.events.length;)t.events[G][1].end={...w},G++;return Pe(t.events,j+1,0,t.events.slice(H)),t.events.length=G,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return p(L);if(i.currentConstruct&&i.currentConstruct.concrete)return E(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ss,h,d)(L)}function h(L){return i&&R(),y(r),p(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,E(L)}function p(L){return t.containerState={},e.attempt(Ss,f,E)(L)}function f(L){return r++,n.push([t.currentConstruct,t.containerState]),p(L)}function E(L){if(L===null){i&&R(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(L)}function k(L){if(L===null){N(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return Y(L)?(e.consume(L),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),k)}function N(L,H){const j=t.sliceStream(L);if(H&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const G=t.events.length;let W=G,X,I;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(X){I=t.events[W][1].end;break}X=!0}for(y(r),w=G;w<t.events.length;)t.events[w][1].end={...I},w++;Pe(t.events,W+1,0,t.events.slice(G)),t.events.length=w}}function y(L){let H=n.length;for(;H-- >L;){const j=n[H];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function lb(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const cb={tokenize:hb};function hb(e){const t=this,n=e.attempt(Ln,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(r1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const db={resolveAll:fl()},fb=dl("string"),pb=dl("text");function dl(e){return{resolveAll:fl(e==="text"?mb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function fl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function mb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const gb={42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Wo},Eb={91:o1},bb={[-2]:Or,[-1]:Or,32:Or},Tb={35:p1,42:qn,45:[ps,qn],60:b1,61:ps,95:qn,96:ds,126:ds},xb={38:Ko,92:Go},_b={[-5]:Rr,[-4]:Rr,[-3]:Rr,33:v1,38:Ko,42:ni,60:[Fm,y1],91:F1,92:[d1,Go],93:$i,95:ni,96:Xm},kb={null:[ni,db]},Ab={null:[42,95]},Cb={null:[]},yb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ab,contentInitial:Eb,disable:Cb,document:gb,flow:Tb,flowInitial:bb,insideSpan:kb,string:xb,text:_b},Symbol.toStringTag,{value:"Module"}));function Nb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:G(j),check:G(w),consume:R,enter:L,exit:H,interrupt:G(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(U){return s=ve(s,U),N(),s[s.length-1]!==null?[]:(W(t,0),c.events=gr(a,c.events,c),c.events)}function p(U,v){return Sb(f(U),v)}function f(U){return Ib(s,U)}function E(){const{_bufferIndex:U,_index:v,line:q,column:z,offset:F}=r;return{_bufferIndex:U,_index:v,line:q,column:z,offset:F}}function k(U){i[U.line]=U.column,I()}function N(){let U;for(;r._index<s.length;){const v=s[r._index];if(typeof v=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<v.length;)y(v.charCodeAt(r._bufferIndex));else y(v)}}function y(U){h=h(U)}function R(U){Y(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,v){const q=v||{};return q.type=U,q.start=E(),c.events.push(["enter",q,c]),u.push(q),q}function H(U){const v=u.pop();return v.end=E(),c.events.push(["exit",v,c]),v}function j(U,v){W(U,v.from)}function w(U,v){v.restore()}function G(U,v){return q;function q(z,F,ie){let he,we,ae,x;return Array.isArray(z)?Ge(z):"tokenize"in z?Ge([z]):Le(z);function Le(be){return $t;function $t(et){const Nt=et!==null&&be[et],It=et!==null&&be.null,Dn=[...Array.isArray(Nt)?Nt:Nt?[Nt]:[],...Array.isArray(It)?It:It?[It]:[]];return Ge(Dn)(et)}}function Ge(be){return he=be,we=0,be.length===0?ie:_(be[we])}function _(be){return $t;function $t(et){return x=X(),ae=be,be.partial||(c.currentConstruct=be),be.name&&c.parser.constructs.disable.null.includes(be.name)?ct():be.tokenize.call(v?Object.assign(Object.create(c),v):c,o,He,ct)(et)}}function He(be){return U(ae,x),F}function ct(be){return x.restore(),++we<he.length?_(he[we]):ie}}}function W(U,v){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Pe(c.events,v,c.events.length-v,U.resolve(c.events.slice(v),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function X(){const U=E(),v=c.previous,q=c.currentConstruct,z=c.events.length,F=Array.from(u);return{from:z,restore:ie};function ie(){r=U,c.previous=v,c.currentConstruct=q,c.events.length=z,u=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ib(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function Sb(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
41
41
  `;break}case-3:{s=`\r
42
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function Sb(e){const r={constructs:Fo([Cb,...(e||{}).extensions||[]]),content:i(ib),defined:[],document:i(sb),flow:i(lb),lazy:{},string:i(db),text:i(fb)};return r;function i(a){return s;function s(u){return yb(r,a,u)}}}function wb(e){for(;!Qo(e););return e}const ws=/[\0\t\n\r]/g;function Lb(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,p,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(ws.lastIndex=d,c=ws.exec(a),p=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(p),!c){t=a.slice(d);break}if(f===10&&d===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<p&&(o.push(a.slice(d,p)),e+=p-d),f){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const pl={}.hasOwnProperty;function Ob(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Rb(n)(wb(Sb(n).document().write(Lb()(e,t,!0))))}function Rb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ea),autolinkProtocol:X,autolinkEmail:X,atxHeading:a(pa),blockQuote:a(It),characterEscape:X,characterReference:X,codeFenced:a(Dn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Dn,s),codeText:a(Nc,s),codeTextData:X,data:X,codeFlowValue:X,definition:a(Ic),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Sc),hardBreakEscape:a(ma),hardBreakTrailing:a(ma),htmlFlow:a(ga,s),htmlFlowData:X,htmlText:a(ga,s),htmlTextData:X,image:a(wc),label:s,link:a(Ea),listItem:a(Lc),listItemValue:p,listOrdered:a(ba,d),listUnordered:a(ba),paragraph:a(Oc),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(pa),strong:a(Rc),thematicBreak:a(Pc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Nt,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:be,characterReference:$t,codeFenced:o(N),codeFencedFence:k,codeFencedFenceInfo:f,codeFencedFenceMeta:E,codeFlowValue:I,codeIndented:o(y),codeText:o(F),codeTextData:I,data:I,definition:o(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(q),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(he),label:ae,labelText:we,lineEnding:U,link:o(ie),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:He,resourceDestinationString:x,resourceTitleString:Le,resource:Ge,setextHeading:o(W),setextHeadingLineSequence:G,setextHeadingText:w,strong:o(),thematicBreak:o()}};ml(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const K={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},te=[];let ue=-1;for(;++ue<O.length;)if(O[ue][1].type==="listOrdered"||O[ue][1].type==="listUnordered")if(O[ue][0]==="enter")te.push(ue);else{const Ue=te.pop();ue=i(O,Ue,ue)}for(ue=-1;++ue<O.length;){const Ue=t[O[ue][0]];pl.call(Ue,O[ue][1].type)&&Ue[O[ue][1].type].call(Object.assign({sliceSerialize:O[ue][2].sliceSerialize},K),O[ue][1])}if(K.tokenStack.length>0){const Ue=K.tokenStack[K.tokenStack.length-1];(Ue[1]||Ls).call(K,void 0,Ue[0])}for(B.position={start:tt(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:tt(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)B=t.transforms[ue](B)||B;return B}function i(O,B,K){let te=B-1,ue=-1,Ue=!1,ht,Ke,Yt,qt;for(;++te<=K;){const Oe=O[te];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?ue++:ue--,qt=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ht&&!qt&&!ue&&!Yt&&(Yt=te),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!ue&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||ue===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ht){let St=te;for(Ke=void 0;St--;){const Qe=O[St];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ke&&(O[Ke][1].type="lineEndingBlank",Ue=!0),Qe[1].type="lineEnding",Ke=St}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Yt&&(!Ke||Yt<Ke)&&(ht._spread=!0),ht.end=Object.assign({},Ke?O[Ke][1].start:Oe[1].end),O.splice(Ke||te,0,["exit",ht,Oe[2]]),te++,K++}if(Oe[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ht=St,O.splice(te,0,["enter",St,Oe[2]]),te++,K++,Yt=void 0,qt=!0}}}return O[B][1]._spread=Ue,K}function a(O,B){return K;function K(te){u.call(this,O(te),te),B&&B.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(O,B,K){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,K||void 0]),O.position={start:tt(B.start),end:void 0}}function o(O){return B;function B(K){O&&O.call(this,K),c.call(this,K)}}function c(O,B){const K=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==O.type&&(B?B.call(this,O,te[0]):(te[1]||Ls).call(this,O,te[0]));else throw new Error("Cannot close `"+O.type+"` ("+dn({start:O.start,end:O.end})+"): it’s not open");K.position.end=tt(O.end)}function h(){return Hi(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function f(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function E(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function R(O){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ze(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function H(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function j(O){const B=this.stack[this.stack.length-1];if(!B.depth){const K=this.sliceSerialize(O).length;B.depth=K}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function G(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function X(O){const K=this.stack[this.stack.length-1].children;let te=K[K.length-1];(!te||te.type!=="text")&&(te=Dc(),te.position={start:tt(O.start),end:void 0},K.push(te)),this.stack.push(te)}function I(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=tt(O.end)}function U(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=B.children[B.children.length-1];K.position.end=tt(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(X.call(this,O),I.call(this,O))}function v(){this.data.atHardBreak=!0}function q(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function z(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function F(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ie(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function he(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function we(O){const B=this.sliceSerialize(O),K=this.stack[this.stack.length-2];K.label=um(B),K.identifier=ze(B).toLowerCase()}function ae(){const O=this.stack[this.stack.length-1],B=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const te=O.children;K.children=te}else K.alt=B}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function Le(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function Ge(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function He(O){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ze(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ct(O){this.data.characterReferenceType=O.type}function be(O){const B=this.sliceSerialize(O),K=this.data.characterReferenceType;let te;K?(te=Bo(B,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=ji(B);const ue=this.stack[this.stack.length-1];ue.value+=te}function $t(O){const B=this.stack.pop();B.position.end=tt(O.end)}function et(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Nt(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function It(){return{type:"blockquote",children:[]}}function Dn(){return{type:"code",lang:null,meta:null,value:""}}function Nc(){return{type:"inlineCode",value:""}}function Ic(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Sc(){return{type:"emphasis",children:[]}}function pa(){return{type:"heading",depth:0,children:[]}}function ma(){return{type:"break"}}function ga(){return{type:"html",value:""}}function wc(){return{type:"image",title:null,url:"",alt:null}}function Ea(){return{type:"link",title:null,url:"",children:[]}}function ba(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Lc(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Oc(){return{type:"paragraph",children:[]}}function Rc(){return{type:"strong",children:[]}}function Dc(){return{type:"text",value:""}}function Pc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function ml(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ml(e,r):Db(e,r)}}function Db(e,t){let n;for(n in t)if(pl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ls(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dn({start:t.start,end:t.end})+") is still open")}function Pb(e){const t=this;t.parser=n;function n(r){return Ob(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Mb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function vb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
- `}]}function Bb(e,t){const n=t.value?t.value+`
44
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Fb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ub(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function jb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function $b(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gl(e,t);const i={src:zt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Yb(e,t){const n={src:zt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function qb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gl(e,t);const i={href:zt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Wb(e,t){const n={href:zt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gb(e,t,n){const r=e.all(t),i=n?Kb(n):El(t),a={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
42
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function wb(e){const r={constructs:Fo([yb,...(e||{}).extensions||[]]),content:i(ab),defined:[],document:i(ub),flow:i(cb),lazy:{},string:i(fb),text:i(pb)};return r;function i(a){return s;function s(u){return Nb(r,a,u)}}}function Lb(e){for(;!Qo(e););return e}const ws=/[\0\t\n\r]/g;function Ob(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,p,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(ws.lastIndex=d,c=ws.exec(a),p=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(p),!c){t=a.slice(d);break}if(f===10&&d===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<p&&(o.push(a.slice(d,p)),e+=p-d),f){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const pl={}.hasOwnProperty;function Rb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Db(n)(Lb(wb(n).document().write(Ob()(e,t,!0))))}function Db(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ea),autolinkProtocol:X,autolinkEmail:X,atxHeading:a(pa),blockQuote:a(It),characterEscape:X,characterReference:X,codeFenced:a(Dn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Dn,s),codeText:a(Nc,s),codeTextData:X,data:X,codeFlowValue:X,definition:a(Ic),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Sc),hardBreakEscape:a(ma),hardBreakTrailing:a(ma),htmlFlow:a(ga,s),htmlFlowData:X,htmlText:a(ga,s),htmlTextData:X,image:a(wc),label:s,link:a(Ea),listItem:a(Lc),listItemValue:p,listOrdered:a(ba,d),listUnordered:a(ba),paragraph:a(Oc),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(pa),strong:a(Rc),thematicBreak:a(Pc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Nt,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:be,characterReference:$t,codeFenced:o(N),codeFencedFence:k,codeFencedFenceInfo:f,codeFencedFenceMeta:E,codeFlowValue:I,codeIndented:o(y),codeText:o(F),codeTextData:I,data:I,definition:o(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(q),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(he),label:ae,labelText:we,lineEnding:U,link:o(ie),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:He,resourceDestinationString:x,resourceTitleString:Le,resource:Ge,setextHeading:o(W),setextHeadingLineSequence:G,setextHeadingText:w,strong:o(),thematicBreak:o()}};ml(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const K={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},te=[];let ue=-1;for(;++ue<O.length;)if(O[ue][1].type==="listOrdered"||O[ue][1].type==="listUnordered")if(O[ue][0]==="enter")te.push(ue);else{const Ue=te.pop();ue=i(O,Ue,ue)}for(ue=-1;++ue<O.length;){const Ue=t[O[ue][0]];pl.call(Ue,O[ue][1].type)&&Ue[O[ue][1].type].call(Object.assign({sliceSerialize:O[ue][2].sliceSerialize},K),O[ue][1])}if(K.tokenStack.length>0){const Ue=K.tokenStack[K.tokenStack.length-1];(Ue[1]||Ls).call(K,void 0,Ue[0])}for(B.position={start:tt(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:tt(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)B=t.transforms[ue](B)||B;return B}function i(O,B,K){let te=B-1,ue=-1,Ue=!1,ht,Ke,Yt,qt;for(;++te<=K;){const Oe=O[te];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?ue++:ue--,qt=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ht&&!qt&&!ue&&!Yt&&(Yt=te),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!ue&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||ue===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ht){let St=te;for(Ke=void 0;St--;){const Qe=O[St];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ke&&(O[Ke][1].type="lineEndingBlank",Ue=!0),Qe[1].type="lineEnding",Ke=St}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Yt&&(!Ke||Yt<Ke)&&(ht._spread=!0),ht.end=Object.assign({},Ke?O[Ke][1].start:Oe[1].end),O.splice(Ke||te,0,["exit",ht,Oe[2]]),te++,K++}if(Oe[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ht=St,O.splice(te,0,["enter",St,Oe[2]]),te++,K++,Yt=void 0,qt=!0}}}return O[B][1]._spread=Ue,K}function a(O,B){return K;function K(te){u.call(this,O(te),te),B&&B.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(O,B,K){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,K||void 0]),O.position={start:tt(B.start),end:void 0}}function o(O){return B;function B(K){O&&O.call(this,K),c.call(this,K)}}function c(O,B){const K=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==O.type&&(B?B.call(this,O,te[0]):(te[1]||Ls).call(this,O,te[0]));else throw new Error("Cannot close `"+O.type+"` ("+dn({start:O.start,end:O.end})+"): it’s not open");K.position.end=tt(O.end)}function h(){return Hi(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function f(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function E(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function R(O){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ze(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function H(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function j(O){const B=this.stack[this.stack.length-1];if(!B.depth){const K=this.sliceSerialize(O).length;B.depth=K}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function G(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function X(O){const K=this.stack[this.stack.length-1].children;let te=K[K.length-1];(!te||te.type!=="text")&&(te=Dc(),te.position={start:tt(O.start),end:void 0},K.push(te)),this.stack.push(te)}function I(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=tt(O.end)}function U(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=B.children[B.children.length-1];K.position.end=tt(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(X.call(this,O),I.call(this,O))}function v(){this.data.atHardBreak=!0}function q(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function z(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function F(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ie(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function he(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function we(O){const B=this.sliceSerialize(O),K=this.stack[this.stack.length-2];K.label=om(B),K.identifier=ze(B).toLowerCase()}function ae(){const O=this.stack[this.stack.length-1],B=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const te=O.children;K.children=te}else K.alt=B}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function Le(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function Ge(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function He(O){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ze(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ct(O){this.data.characterReferenceType=O.type}function be(O){const B=this.sliceSerialize(O),K=this.data.characterReferenceType;let te;K?(te=Bo(B,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=ji(B);const ue=this.stack[this.stack.length-1];ue.value+=te}function $t(O){const B=this.stack.pop();B.position.end=tt(O.end)}function et(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Nt(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function It(){return{type:"blockquote",children:[]}}function Dn(){return{type:"code",lang:null,meta:null,value:""}}function Nc(){return{type:"inlineCode",value:""}}function Ic(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Sc(){return{type:"emphasis",children:[]}}function pa(){return{type:"heading",depth:0,children:[]}}function ma(){return{type:"break"}}function ga(){return{type:"html",value:""}}function wc(){return{type:"image",title:null,url:"",alt:null}}function Ea(){return{type:"link",title:null,url:"",children:[]}}function ba(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Lc(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Oc(){return{type:"paragraph",children:[]}}function Rc(){return{type:"strong",children:[]}}function Dc(){return{type:"text",value:""}}function Pc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function ml(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ml(e,r):Pb(e,r)}}function Pb(e,t){let n;for(n in t)if(pl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ls(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dn({start:t.start,end:t.end})+") is still open")}function Mb(e){const t=this;t.parser=n;function n(r){return Rb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
+ `}]}function Fb(e,t){const n=t.value?t.value+`
44
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Hb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ub(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function zb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $b(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Yb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gl(e,t);const i={src:zt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function qb(e,t){const n={src:zt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Wb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gl(e,t);const i={href:zt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Gb(e,t){const n={href:zt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Kb(e,t,n){const r=e.all(t),i=n?Qb(n):El(t),a={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
45
45
  `}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
46
- `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Kb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=El(n[r])}return t}function El(e){const t=e.spread;return t??e.children.length>1}function Qb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Xb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Jb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Ve(t.children[1]),o=pr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function tT(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],p={},f=s?s[o]:void 0;f&&(p.align=f);let E={type:"element",tagName:a,properties:p,children:[]};d&&(E.children=e.all(d),e.patch(d,E),E=e.applyData(d,E)),c.push(E)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function nT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Os=9,Rs=32;function rT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Ds(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ds(t.slice(i),i>0,!1)),a.join("")}function Ds(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Os||a===Rs;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Os||a===Rs;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function iT(e,t){const n={type:"text",value:rT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function aT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sT={blockquote:Mb,break:vb,code:Bb,delete:Fb,emphasis:Hb,footnoteReference:Ub,heading:jb,html:zb,imageReference:$b,image:Yb,inlineCode:qb,linkReference:Vb,link:Wb,listItem:Gb,list:Qb,paragraph:Xb,root:Zb,strong:Jb,table:eT,tableCell:nT,tableRow:tT,text:iT,thematicBreak:aT,toml:Bn,yaml:Bn,definition:Bn,footnoteDefinition:Bn};function Bn(){}function uT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function oT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function lT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uT,r=e.options.footnoteBackLabel||oT,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),p=zt(d.toLowerCase());let f=0;const E=[],k=e.footnoteCounts.get(d);for(;k!==void 0&&++f<=k;){E.length>0&&E.push({type:"text",value:" "});let R=typeof n=="string"?n:n(o,f);typeof R=="string"&&(R={type:"text",value:R}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,f),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=h[h.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...E)}else h.push(...E);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,y),u.push(y)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...bt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
46
+ `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Qb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=El(n[r])}return t}function El(e){const t=e.spread;return t??e.children.length>1}function Xb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Zb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Ve(t.children[1]),o=pr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function nT(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],p={},f=s?s[o]:void 0;f&&(p.align=f);let E={type:"element",tagName:a,properties:p,children:[]};d&&(E.children=e.all(d),e.patch(d,E),E=e.applyData(d,E)),c.push(E)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function rT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Os=9,Rs=32;function iT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Ds(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ds(t.slice(i),i>0,!1)),a.join("")}function Ds(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Os||a===Rs;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Os||a===Rs;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function aT(e,t){const n={type:"text",value:iT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const uT={blockquote:vb,break:Bb,code:Fb,delete:Hb,emphasis:Ub,footnoteReference:jb,heading:zb,html:$b,imageReference:Yb,image:qb,inlineCode:Vb,linkReference:Wb,link:Gb,listItem:Kb,list:Xb,paragraph:Zb,root:Jb,strong:eT,table:tT,tableCell:rT,tableRow:nT,text:aT,thematicBreak:sT,toml:Bn,yaml:Bn,definition:Bn,footnoteDefinition:Bn};function Bn(){}function oT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function lT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function cT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||oT,r=e.options.footnoteBackLabel||lT,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),p=zt(d.toLowerCase());let f=0;const E=[],k=e.footnoteCounts.get(d);for(;k!==void 0&&++f<=k;){E.length>0&&E.push({type:"text",value:" "});let R=typeof n=="string"?n:n(o,f);typeof R=="string"&&(R={type:"text",value:R}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,f),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=h[h.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...E)}else h.push(...E);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,y),u.push(y)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...bt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
47
47
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
48
- `}]}}const ii={}.hasOwnProperty,cT={};function hT(e,t){const n=t||cT,r=new Map,i=new Map,a=new Map,s={...sT,...n.handlers},u={all:c,applyData:fT,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:dT,wrap:mT};return st(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),u;function o(h,d){const p=h.type,f=u.handlers[p];if(ii.call(u.handlers,p)&&f)return f(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in h){const{children:k,...N}=h,y=bt(N);return y.children=u.all(h),y}return bt(h)}return(u.options.unknownHandler||pT)(u,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let f=-1;for(;++f<p.length;){const E=u.one(p[f],h);if(E){if(f&&p[f-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Ps(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=Ps(k.value))}Array.isArray(E)?d.push(...E):d.push(E)}}}return d}}function dT(e,t){e.position&&(t.position=ho(e))}function fT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,bt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function pT(e,t){const n=t.data||{},r="value"in t&&!(ii.call(n,"hProperties")||ii.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
48
+ `}]}}const ii={}.hasOwnProperty,hT={};function dT(e,t){const n=t||hT,r=new Map,i=new Map,a=new Map,s={...uT,...n.handlers},u={all:c,applyData:pT,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:fT,wrap:gT};return st(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),u;function o(h,d){const p=h.type,f=u.handlers[p];if(ii.call(u.handlers,p)&&f)return f(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in h){const{children:k,...N}=h,y=bt(N);return y.children=u.all(h),y}return bt(h)}return(u.options.unknownHandler||mT)(u,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let f=-1;for(;++f<p.length;){const E=u.one(p[f],h);if(E){if(f&&p[f-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Ps(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=Ps(k.value))}Array.isArray(E)?d.push(...E):d.push(E)}}}return d}}function fT(e,t){e.position&&(t.position=ho(e))}function pT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,bt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function mT(e,t){const n=t.data||{},r="value"in t&&!(ii.call(n,"hProperties")||ii.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
49
49
  `});++r<e.length;)r&&n.push({type:"text",value:`
50
50
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
51
- `}),n}function Ps(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ms(e,t){const n=hT(e,t),r=n.one(e,void 0),i=lT(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
52
- `},i),a}function gT(e,t){return e&&"run"in e?async function(n,r){const i=Ms(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ms(n,{file:r,...e||t})}}function vs(e){if(e)throw e}var vr,Bs;function ET(){if(Bs)return vr;Bs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return vr=function o(){var c,h,d,p,f,E,k=arguments[0],N=1,y=arguments.length,R=!1;for(typeof k=="boolean"&&(R=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<y;++N)if(c=arguments[N],c!=null)for(h in c)d=u(k,h),p=u(c,h),k!==p&&(R&&p&&(a(p)||(f=i(p)))?(f?(f=!1,E=d&&i(d)?d:[]):E=d&&a(d)?d:{},s(k,{name:h,newValue:o(R,E,p)})):typeof p<"u"&&s(k,{name:h,newValue:p}));return k},vr}var bT=ET();const Br=Eu(bT);function ai(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TT(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?xT(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function xT(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Ye={basename:_T,dirname:kT,extname:AT,join:CT,sep:"/"};function _T(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');On(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function kT(e){if(On(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function AT(e){On(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function CT(...e){let t=-1,n;for(;++t<e.length;)On(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yT(n)}function yT(e){On(e);const t=e.codePointAt(0)===47;let n=NT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function NT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function On(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IT={cwd:ST};function ST(){return"/"}function si(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wT(e){if(typeof e=="string")e=new URL(e);else if(!si(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return LT(e)}function LT(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Fr=["history","path","basename","stem","extname","dirname"];class OT{constructor(t){let n;t?si(t)?n={path:t}:typeof t=="string"||RT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fr.length;){const a=Fr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Fr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){Ur(t,"basename"),Hr(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){Fs(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(Hr(t,"extname"),Fs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){si(t)&&(t=wT(t)),Ur(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){Ur(t,"stem"),Hr(t,"stem"),this.path=Ye.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hr(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function Ur(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function RT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),PT={}.hasOwnProperty;class Gi extends DT{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=TT()}copy(){const t=new Gi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Br(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($r("data",this.frozen),this.namespace[t]=n,this):PT.call(this.namespace,t)&&this.namespace[t]||void 0:t?($r("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fn(t),r=this.parser||this.Parser;return jr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jr("process",this.parser||this.Parser),zr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Fn(t),o=r.parse(u);r.run(o,u,function(h,d,p){if(h||!d||!p)return c(h);const f=d,E=r.stringify(f,p);BT(E)?p.value=E:p.result=E,c(h,p)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),jr("processSync",this.parser||this.Parser),zr("processSync",this.compiler||this.Compiler),this.process(t,i),Us("processSync","process",n),r;function i(a,s){n=!0,vs(a),r=s}}run(t,n,r){Hs(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Fn(n);i.run(t,o,c);function c(h,d,p){const f=d||t;h?u(h):s?s(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Us("runSync","run",r),i;function a(s,u){vs(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Fn(n),i=this.compiler||this.Compiler;return zr("stringify",i),Hs(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($r("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");u(c.plugins),c.settings&&(i.settings=Br(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...h]);else if(h.length>0){let[f,...E]=h;const k=r[p][1];ai(k)&&ai(f)&&(f=Br(!0,k,f)),r[p]=[c,f,...E]}}}}const MT=new Gi().freeze();function jr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $r(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hs(e){if(!ai(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Us(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fn(e){return vT(e)?e:new OT(e)}function vT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function BT(e){return typeof e=="string"||FT(e)}function FT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ki(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=Ki();function bl(e){yt=e}var fn={exec:()=>null};function re(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ye.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var HT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},UT=/^(?:[ \t]*(?:\n|$))+/,jT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$T=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qi=/(?:[*+-]|\d{1,9}[.)])/,Tl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xl=re(Tl).replace(/bull/g,Qi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),YT=re(Tl).replace(/bull/g,Qi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qT=/^[^\n]+/,Zi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,VT=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),WT=re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qi).getRegex(),br="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ji=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,GT=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ji).replace("tag",br).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_l=re(Xi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),KT=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_l).getRegex(),ea={blockquote:KT,code:jT,def:VT,fences:zT,heading:$T,hr:Rn,html:GT,lheading:xl,list:WT,newline:UT,paragraph:_l,table:fn,text:qT},js=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),QT={...ea,lheading:YT,table:js,paragraph:re(Xi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",js).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex()},XT={...ea,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ji).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Xi).replace("hr",Rn).replace("heading",` *#{1,6} *[^
53
- ]`).replace("lheading",xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ZT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,JT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kl=/^( {2,}|\\)\n(?!\s*$)/,e2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Tr=/[\p{P}\p{S}]/u,ta=/[\s\p{P}\p{S}]/u,Al=/[^\s\p{P}\p{S}]/u,t2=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ta).getRegex(),Cl=/(?!~)[\p{P}\p{S}]/u,n2=/(?!~)[\s\p{P}\p{S}]/u,r2=/(?:[^\s\p{P}\p{S}]|~)/u,i2=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",HT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,a2=re(yl,"u").replace(/punct/g,Tr).getRegex(),s2=re(yl,"u").replace(/punct/g,Cl).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",u2=re(Nl,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,ta).replace(/punct/g,Tr).getRegex(),o2=re(Nl,"gu").replace(/notPunctSpace/g,r2).replace(/punctSpace/g,n2).replace(/punct/g,Cl).getRegex(),l2=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,ta).replace(/punct/g,Tr).getRegex(),c2=re(/\\(punct)/,"gu").replace(/punct/g,Tr).getRegex(),h2=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),d2=re(Ji).replace("(?:-->|$)","-->").getRegex(),f2=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",d2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),er=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,p2=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",er).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Il=re(/^!?\[(label)\]\[(ref)\]/).replace("label",er).replace("ref",Zi).getRegex(),Sl=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zi).getRegex(),m2=re("reflink|nolink(?!\\()","g").replace("reflink",Il).replace("nolink",Sl).getRegex(),zs=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,na={_backpedal:fn,anyPunctuation:c2,autolink:h2,blockSkip:i2,br:kl,code:JT,del:fn,emStrongLDelim:a2,emStrongRDelimAst:u2,emStrongRDelimUnd:l2,escape:ZT,link:p2,nolink:Sl,punctuation:t2,reflink:Il,reflinkSearch:m2,tag:f2,text:e2,url:fn},g2={...na,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",er).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",er).getRegex()},ui={...na,emStrongRDelimAst:o2,emStrongLDelim:s2,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",zs).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",zs).getRegex()},E2={...ui,br:re(kl).replace("{2,}","*").getRegex(),text:re(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hn={normal:ea,gfm:QT,pedantic:XT},Zt={normal:na,gfm:ui,breaks:E2,pedantic:g2},b2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$s=e=>b2[e];function Xe(e,t){if(t){if(ye.escapeTest.test(e))return e.replace(ye.escapeReplace,$s)}else if(ye.escapeTestNoEncode.test(e))return e.replace(ye.escapeReplaceNoEncode,$s);return e}function Ys(e){try{e=encodeURI(e).replace(ye.percentDecode,"%")}catch{return null}return e}function qs(e,t){let n=e.replace(ye.findPipe,(a,s,u)=>{let o=!1,c=s;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(ye.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(ye.slashPipe,"|");return r}function Jt(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function T2(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Vs(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function x2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
51
+ `}),n}function Ps(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ms(e,t){const n=dT(e,t),r=n.one(e,void 0),i=cT(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
52
+ `},i),a}function ET(e,t){return e&&"run"in e?async function(n,r){const i=Ms(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ms(n,{file:r,...e||t})}}function vs(e){if(e)throw e}var vr,Bs;function bT(){if(Bs)return vr;Bs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return vr=function o(){var c,h,d,p,f,E,k=arguments[0],N=1,y=arguments.length,R=!1;for(typeof k=="boolean"&&(R=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<y;++N)if(c=arguments[N],c!=null)for(h in c)d=u(k,h),p=u(c,h),k!==p&&(R&&p&&(a(p)||(f=i(p)))?(f?(f=!1,E=d&&i(d)?d:[]):E=d&&a(d)?d:{},s(k,{name:h,newValue:o(R,E,p)})):typeof p<"u"&&s(k,{name:h,newValue:p}));return k},vr}var TT=bT();const Br=Eu(TT);function ai(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xT(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?_T(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function _T(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Ye={basename:kT,dirname:AT,extname:CT,join:yT,sep:"/"};function kT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');On(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function AT(e){if(On(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function CT(e){On(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yT(...e){let t=-1,n;for(;++t<e.length;)On(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":NT(n)}function NT(e){On(e);const t=e.codePointAt(0)===47;let n=IT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function IT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function On(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ST={cwd:wT};function wT(){return"/"}function si(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function LT(e){if(typeof e=="string")e=new URL(e);else if(!si(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return OT(e)}function OT(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Fr=["history","path","basename","stem","extname","dirname"];class RT{constructor(t){let n;t?si(t)?n={path:t}:typeof t=="string"||DT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ST.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fr.length;){const a=Fr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Fr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){Ur(t,"basename"),Hr(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){Fs(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(Hr(t,"extname"),Fs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){si(t)&&(t=LT(t)),Ur(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){Ur(t,"stem"),Hr(t,"stem"),this.path=Ye.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hr(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function Ur(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),MT={}.hasOwnProperty;class Gi extends PT{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=xT()}copy(){const t=new Gi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Br(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($r("data",this.frozen),this.namespace[t]=n,this):MT.call(this.namespace,t)&&this.namespace[t]||void 0:t?($r("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fn(t),r=this.parser||this.Parser;return jr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jr("process",this.parser||this.Parser),zr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Fn(t),o=r.parse(u);r.run(o,u,function(h,d,p){if(h||!d||!p)return c(h);const f=d,E=r.stringify(f,p);FT(E)?p.value=E:p.result=E,c(h,p)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),jr("processSync",this.parser||this.Parser),zr("processSync",this.compiler||this.Compiler),this.process(t,i),Us("processSync","process",n),r;function i(a,s){n=!0,vs(a),r=s}}run(t,n,r){Hs(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Fn(n);i.run(t,o,c);function c(h,d,p){const f=d||t;h?u(h):s?s(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Us("runSync","run",r),i;function a(s,u){vs(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Fn(n),i=this.compiler||this.Compiler;return zr("stringify",i),Hs(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($r("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");u(c.plugins),c.settings&&(i.settings=Br(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...h]);else if(h.length>0){let[f,...E]=h;const k=r[p][1];ai(k)&&ai(f)&&(f=Br(!0,k,f)),r[p]=[c,f,...E]}}}}const vT=new Gi().freeze();function jr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $r(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hs(e){if(!ai(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Us(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fn(e){return BT(e)?e:new RT(e)}function BT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FT(e){return typeof e=="string"||HT(e)}function HT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ki(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=Ki();function bl(e){yt=e}var fn={exec:()=>null};function re(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ye.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var UT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},jT=/^(?:[ \t]*(?:\n|$))+/,zT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$T=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qi=/(?:[*+-]|\d{1,9}[.)])/,Tl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xl=re(Tl).replace(/bull/g,Qi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qT=re(Tl).replace(/bull/g,Qi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,VT=/^[^\n]+/,Zi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,WT=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),GT=re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qi).getRegex(),br="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ji=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,KT=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ji).replace("tag",br).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_l=re(Xi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),QT=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_l).getRegex(),ea={blockquote:QT,code:zT,def:WT,fences:$T,heading:YT,hr:Rn,html:KT,lheading:xl,list:GT,newline:jT,paragraph:_l,table:fn,text:VT},js=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),XT={...ea,lheading:qT,table:js,paragraph:re(Xi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",js).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex()},ZT={...ea,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ji).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Xi).replace("hr",Rn).replace("heading",` *#{1,6} *[^
53
+ ]`).replace("lheading",xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},JT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,e2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kl=/^( {2,}|\\)\n(?!\s*$)/,t2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Tr=/[\p{P}\p{S}]/u,ta=/[\s\p{P}\p{S}]/u,Al=/[^\s\p{P}\p{S}]/u,n2=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ta).getRegex(),Cl=/(?!~)[\p{P}\p{S}]/u,r2=/(?!~)[\s\p{P}\p{S}]/u,i2=/(?:[^\s\p{P}\p{S}]|~)/u,a2=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",UT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,s2=re(yl,"u").replace(/punct/g,Tr).getRegex(),u2=re(yl,"u").replace(/punct/g,Cl).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",o2=re(Nl,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,ta).replace(/punct/g,Tr).getRegex(),l2=re(Nl,"gu").replace(/notPunctSpace/g,i2).replace(/punctSpace/g,r2).replace(/punct/g,Cl).getRegex(),c2=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,ta).replace(/punct/g,Tr).getRegex(),h2=re(/\\(punct)/,"gu").replace(/punct/g,Tr).getRegex(),d2=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),f2=re(Ji).replace("(?:-->|$)","-->").getRegex(),p2=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",f2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),er=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,m2=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",er).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Il=re(/^!?\[(label)\]\[(ref)\]/).replace("label",er).replace("ref",Zi).getRegex(),Sl=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zi).getRegex(),g2=re("reflink|nolink(?!\\()","g").replace("reflink",Il).replace("nolink",Sl).getRegex(),zs=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,na={_backpedal:fn,anyPunctuation:h2,autolink:d2,blockSkip:a2,br:kl,code:e2,del:fn,emStrongLDelim:s2,emStrongRDelimAst:o2,emStrongRDelimUnd:c2,escape:JT,link:m2,nolink:Sl,punctuation:n2,reflink:Il,reflinkSearch:g2,tag:p2,text:t2,url:fn},E2={...na,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",er).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",er).getRegex()},ui={...na,emStrongRDelimAst:l2,emStrongLDelim:u2,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",zs).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",zs).getRegex()},b2={...ui,br:re(kl).replace("{2,}","*").getRegex(),text:re(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hn={normal:ea,gfm:XT,pedantic:ZT},Zt={normal:na,gfm:ui,breaks:b2,pedantic:E2},T2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$s=e=>T2[e];function Xe(e,t){if(t){if(ye.escapeTest.test(e))return e.replace(ye.escapeReplace,$s)}else if(ye.escapeTestNoEncode.test(e))return e.replace(ye.escapeReplaceNoEncode,$s);return e}function Ys(e){try{e=encodeURI(e).replace(ye.percentDecode,"%")}catch{return null}return e}function qs(e,t){let n=e.replace(ye.findPipe,(a,s,u)=>{let o=!1,c=s;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(ye.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(ye.slashPipe,"|");return r}function Jt(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function x2(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Vs(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function _2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
54
54
  `).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
55
55
  `)}var tr=class{options;rules;lexer;constructor(e){this.options=e||yt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Jt(n,`
56
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=x2(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Jt(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Jt(t[0],`
56
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=_2(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Jt(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Jt(t[0],`
57
57
  `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Jt(t[0],`
58
58
  `).split(`
59
59
  `),r="",i="",a=[];for(;n.length>0;){let s=!1,u=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),s=!0;else if(!s)u.push(n[o]);else break;n=n.slice(o);let c=u.join(`
@@ -74,7 +74,7 @@ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
74
74
  `+p}!f&&!p.trim()&&(f=!0),c+=H+`
75
75
  `,e=e.substring(H.length+1),d=j.slice(E)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=c}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(o.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};o.checked=h.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!i.loose){let c=o.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}}if(i.loose)for(let o of i.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=qs(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
76
76
  `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(qs(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
77
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Jt(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=T2(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Vs(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Vs(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Be=class oi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yt,this.options.tokenizer=this.options.tokenizer||new tr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ye,block:Hn.normal,inline:Zt.normal};this.options.pedantic?(n.block=Hn.pedantic,n.inline=Zt.pedantic):this.options.gfm&&(n.block=Hn.gfm,this.options.breaks?n.inline=Zt.breaks:n.inline=Zt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hn,inline:Zt}}static lex(t,n){return new oi(n).lex(t)}static lexInline(t,n){return new oi(n).inlineTokens(t)}lex(t){t=t.replace(ye.carriageReturn,`
77
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Jt(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=x2(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Vs(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Vs(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Be=class oi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yt,this.options.tokenizer=this.options.tokenizer||new tr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ye,block:Hn.normal,inline:Zt.normal};this.options.pedantic?(n.block=Hn.pedantic,n.inline=Zt.pedantic):this.options.gfm&&(n.block=Hn.gfm,this.options.breaks?n.inline=Zt.breaks:n.inline=Zt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hn,inline:Zt}}static lex(t,n){return new oi(n).lex(t)}static lexInline(t,n){return new oi(n).inlineTokens(t)}lex(t){t=t.replace(ye.carriageReturn,`
78
78
  `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(ye.tabCharGlobal," ").replace(ye.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
79
79
  `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
80
80
  `)?"":`
@@ -106,16 +106,16 @@ ${this.parser.parse(e)}</blockquote>
106
106
  `}tablerow({text:e}){return`<tr>
107
107
  ${e}</tr>
108
108
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
109
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ys(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Xe(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ys(e);if(i===null)return Xe(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Xe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},ra=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},je=class li{options;renderer;textRenderer;constructor(t){this.options=t||yt,this.options.renderer=this.options.renderer||new nr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ra}static parse(t,n){return new li(n).parse(t)}static parseInline(t,n){return new li(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=u||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},nn=class{options;block;constructor(e){this.options=e||yt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Be.lex:Be.lexInline}provideParser(){return this.block?je.parse:je.parseInline}},_2=class{defaults=Ki();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=je;Renderer=nr;TextRenderer=ra;Lexer=Be;Tokenizer=tr;Hooks=nn;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)r=r.concat(this.walkTokens(s.tokens,n));for(let s of a.rows)for(let u of s)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let u=a[s].flat(1/0);r=r.concat(this.walkTokens(u,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new nr(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let u=s,o=r.renderer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new tr(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,o=r.tokenizer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new nn;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let u=s,o=r.hooks[u],c=a[u];nn.passThroughHooks.has(s)?a[u]=h=>{if(this.defaults.async&&nn.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await o.call(a,h);return c.call(a,p)})();let d=o.call(a,h);return c.call(a,d)}:a[u]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(a,h);return p===!1&&(p=await c.apply(a,h)),p})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Be.lex(t,n??this.defaults)}parser(t,n){return je.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?Be.lex:Be.lexInline)(u,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?je.parse:je.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?Be.lex:Be.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?je.parse:je.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
110
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Xe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},_t=new _2;function se(e,t){return _t.parse(e,t)}se.options=se.setOptions=function(e){return _t.setOptions(e),se.defaults=_t.defaults,bl(se.defaults),se};se.getDefaults=Ki;se.defaults=yt;se.use=function(...e){return _t.use(...e),se.defaults=_t.defaults,bl(se.defaults),se};se.walkTokens=function(e,t){return _t.walkTokens(e,t)};se.parseInline=_t.parseInline;se.Parser=je;se.parser=je.parse;se.Renderer=nr;se.TextRenderer=ra;se.Lexer=Be;se.lexer=Be.lex;se.Tokenizer=tr;se.Hooks=nn;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;je.parse;Be.lex;var k2=300,A2="300px",C2=500;function y2(e={}){let{immediate:t=!1,debounceDelay:n=k2,rootMargin:r=A2,idleTimeout:i=C2}=e,[a,s]=A.useState(!1),u=A.useRef(null),o=A.useRef(null),c=A.useRef(null),h=A.useMemo(()=>f=>{let E=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),d=A.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,E)=>window.requestIdleCallback(f,E):h,[h]),p=A.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return A.useEffect(()=>{if(t){s(!0);return}let f=u.current;if(!f)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(p(c.current),c.current=null);let E=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(p(c.current),c.current=null)},k=L=>{c.current=d(H=>{H.timeRemaining()>0||H.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},N=L=>{E(),o.current=window.setTimeout(()=>{var H,j;let w=L.takeRecords();(w.length===0||(j=(H=w.at(-1))==null?void 0:H.isIntersecting)!=null&&j)&&k(L)},n)},y=(L,H)=>{L.isIntersecting?N(H):E()},R=new IntersectionObserver(L=>{for(let H of L)y(H,R)},{rootMargin:r,threshold:0});return R.observe(f),()=>{o.current&&clearTimeout(o.current),c.current&&p(c.current),R.disconnect()}},[t,n,r,i,p,d]),{shouldRender:a,containerRef:u}}var wl=/\s/,N2=/^\s+$/,I2=new Set(["code","pre","svg","math","annotation"]),S2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",w2=e=>e.some(t=>S2(t)&&I2.has(t.tagName)),L2=e=>{let t=[],n="",r=!1;for(let i of e){let a=wl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},O2=e=>{let t=[],n="";for(let r of e)wl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},R2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),D2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(w2(t))return Wn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?O2(s):L2(s)).map(o=>N2.test(o)?{type:"text",value:o}:R2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function ci(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ni(s,"text",(u,o)=>D2(u,o,a))}}}ci();var ia=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),aa=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),xr=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),P2=e=>m.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),M2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),v2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Ll=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Ws=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),B2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),F2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),V=(...e)=>Mc(vc(e)),Mt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},H2=A.createContext({code:""}),Ol=()=>A.useContext(H2),Gs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=A.useState(!1),c=A.useRef(0),{code:h}=Ol(),{isAnimating:d}=A.useContext(Fe),p=a??h,f=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(p),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};A.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let E=u?ia:aa;return m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:f,title:"Copy Code",type:"button",...s,children:r??m.jsx(E,{size:14})})},Ks={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},U2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=Ol(),{isAnimating:o}=A.useContext(Fe),c=a??u,h=`file.${n&&n in Ks?Ks[n]:"txt"}`,d="text/plain",p=()=>{try{Mt(h,c,d),e?.()}catch(f){t?.(f)}};return m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:o,onClick:p,title:"Download file",type:"button",...s,children:r??m.jsx(xr,{size:14})})},Qs=()=>m.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[m.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),m.jsx("div",{className:"flex w-full items-center justify-center p-4",children:m.jsx(P2,{className:"size-4 animate-spin"})})]}),j2=/\.[^/.]+$/,z2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,p="png";d.includes("jpeg")||d.includes("jpg")?p="jpg":d.includes("png")?p="png":d.includes("svg")?p="svg":d.includes("gif")?p="gif":d.includes("webp")&&(p="webp"),h=`${(r||u||"image").replace(j2,"")}.${p}`}Mt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?m.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[m.jsx("img",{alt:r,className:V("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),m.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),m.jsx("button",{className:V("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:m.jsx(xr,{size:14})})]}):null},pn=0,$2=()=>{pn+=1,pn===1&&(document.body.style.overflow="hidden")},Y2=()=>{pn=Math.max(0,pn-1),pn===0&&(document.body.style.overflow="")},q2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=A.useState(!1),s=A.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=A.useCallback(()=>{r(),n()},[r,n]);return A.useEffect(()=>{if(t){$2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),Y2()}}},[t,n]),t?m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:m.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[m.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:m.jsx(Ll,{size:16})}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[m.jsx(Ws,{size:20}),m.jsx("span",{children:"Open external link?"})]}),m.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),m.jsx("div",{className:V("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?m.jsxs(m.Fragment,{children:[m.jsx(ia,{size:14}),m.jsx("span",{children:"Copied"})]}):m.jsxs(m.Fragment,{children:[m.jsx(aa,{size:14}),m.jsx("span",{children:"Copy link"})]})}),m.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:u,type:"button",children:[m.jsx(Ws,{size:14}),m.jsx("span",{children:"Open link"})]})]})]})}):null},hi=A.createContext(null),Rl=()=>A.useContext(hi),V_=()=>{var e;let t=Rl();return(e=t?.code)!=null?e:null},sa=()=>{var e;let t=Rl();return(e=t?.mermaid)!=null?e:null},V2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},W2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=A.useState(!1),o=A.useRef(null),{isAnimating:c}=A.useContext(Fe),h=sa(),d=async p=>{try{if(p==="mmd"){Mt("diagram.mmd",e,"text/plain"),u(!1),r?.(p);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let f=h.getMermaid(i),E=e.split("").reduce((y,R)=>(y<<5)-y+R.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(E)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await f.render(k,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){Mt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(p);return}if(p==="png"){let y=await V2(N);Mt("diagram.png",y,"image/png"),r?.(p),u(!1);return}}catch(f){a?.(f)}};return A.useEffect(()=>{let p=f=>{let E=f.composedPath();o.current&&!E.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),m.jsxs("div",{className:"relative",ref:o,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??m.jsx(xr,{size:14})}),s?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},mn=0,G2=()=>{mn+=1,mn===1&&(document.body.style.overflow="hidden")},K2=()=>{mn=Math.max(0,mn-1),mn===0&&(document.body.style.overflow="")},Q2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=A.useState(!1),{isAnimating:o,controls:c}=A.useContext(Fe),h=(()=>{if(typeof c=="boolean")return c;let p=c.mermaid;return p===!1?!1:p===!0||p===void 0?!0:p.panZoom!==!1})(),d=()=>{u(!s)};return A.useEffect(()=>{if(s){G2();let p=f=>{f.key==="Escape"&&u(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),K2()}}},[s]),A.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),m.jsxs(m.Fragment,{children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:m.jsx(M2,{size:14})}),s?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"button",tabIndex:0,children:[m.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:m.jsx(Ll,{size:20})}),m.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:m.jsx(oc,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},Dl=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},Pl=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
109
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ys(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Xe(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ys(e);if(i===null)return Xe(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Xe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},ra=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},je=class li{options;renderer;textRenderer;constructor(t){this.options=t||yt,this.options.renderer=this.options.renderer||new nr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ra}static parse(t,n){return new li(n).parse(t)}static parseInline(t,n){return new li(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=u||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},nn=class{options;block;constructor(e){this.options=e||yt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Be.lex:Be.lexInline}provideParser(){return this.block?je.parse:je.parseInline}},k2=class{defaults=Ki();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=je;Renderer=nr;TextRenderer=ra;Lexer=Be;Tokenizer=tr;Hooks=nn;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)r=r.concat(this.walkTokens(s.tokens,n));for(let s of a.rows)for(let u of s)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let u=a[s].flat(1/0);r=r.concat(this.walkTokens(u,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new nr(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let u=s,o=r.renderer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new tr(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,o=r.tokenizer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new nn;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let u=s,o=r.hooks[u],c=a[u];nn.passThroughHooks.has(s)?a[u]=h=>{if(this.defaults.async&&nn.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await o.call(a,h);return c.call(a,p)})();let d=o.call(a,h);return c.call(a,d)}:a[u]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(a,h);return p===!1&&(p=await c.apply(a,h)),p})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Be.lex(t,n??this.defaults)}parser(t,n){return je.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?Be.lex:Be.lexInline)(u,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?je.parse:je.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?Be.lex:Be.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?je.parse:je.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
110
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Xe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},_t=new k2;function se(e,t){return _t.parse(e,t)}se.options=se.setOptions=function(e){return _t.setOptions(e),se.defaults=_t.defaults,bl(se.defaults),se};se.getDefaults=Ki;se.defaults=yt;se.use=function(...e){return _t.use(...e),se.defaults=_t.defaults,bl(se.defaults),se};se.walkTokens=function(e,t){return _t.walkTokens(e,t)};se.parseInline=_t.parseInline;se.Parser=je;se.parser=je.parse;se.Renderer=nr;se.TextRenderer=ra;se.Lexer=Be;se.lexer=Be.lex;se.Tokenizer=tr;se.Hooks=nn;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;je.parse;Be.lex;var A2=300,C2="300px",y2=500;function N2(e={}){let{immediate:t=!1,debounceDelay:n=A2,rootMargin:r=C2,idleTimeout:i=y2}=e,[a,s]=A.useState(!1),u=A.useRef(null),o=A.useRef(null),c=A.useRef(null),h=A.useMemo(()=>f=>{let E=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),d=A.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,E)=>window.requestIdleCallback(f,E):h,[h]),p=A.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return A.useEffect(()=>{if(t){s(!0);return}let f=u.current;if(!f)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(p(c.current),c.current=null);let E=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(p(c.current),c.current=null)},k=L=>{c.current=d(H=>{H.timeRemaining()>0||H.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},N=L=>{E(),o.current=window.setTimeout(()=>{var H,j;let w=L.takeRecords();(w.length===0||(j=(H=w.at(-1))==null?void 0:H.isIntersecting)!=null&&j)&&k(L)},n)},y=(L,H)=>{L.isIntersecting?N(H):E()},R=new IntersectionObserver(L=>{for(let H of L)y(H,R)},{rootMargin:r,threshold:0});return R.observe(f),()=>{o.current&&clearTimeout(o.current),c.current&&p(c.current),R.disconnect()}},[t,n,r,i,p,d]),{shouldRender:a,containerRef:u}}var wl=/\s/,I2=/^\s+$/,S2=new Set(["code","pre","svg","math","annotation"]),w2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",L2=e=>e.some(t=>w2(t)&&S2.has(t.tagName)),O2=e=>{let t=[],n="",r=!1;for(let i of e){let a=wl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},R2=e=>{let t=[],n="";for(let r of e)wl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},D2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),P2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(L2(t))return Wn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?R2(s):O2(s)).map(o=>I2.test(o)?{type:"text",value:o}:D2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function ci(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ni(s,"text",(u,o)=>P2(u,o,a))}}}ci();var ia=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),aa=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),xr=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),M2=e=>m.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),v2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),B2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Ll=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Ws=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),F2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),H2=e=>m.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),V=(...e)=>Mc(vc(e)),Mt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},U2=A.createContext({code:""}),Ol=()=>A.useContext(U2),Gs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=A.useState(!1),c=A.useRef(0),{code:h}=Ol(),{isAnimating:d}=A.useContext(Fe),p=a??h,f=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(p),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};A.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let E=u?ia:aa;return m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:f,title:"Copy Code",type:"button",...s,children:r??m.jsx(E,{size:14})})},Ks={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},j2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=Ol(),{isAnimating:o}=A.useContext(Fe),c=a??u,h=`file.${n&&n in Ks?Ks[n]:"txt"}`,d="text/plain",p=()=>{try{Mt(h,c,d),e?.()}catch(f){t?.(f)}};return m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:o,onClick:p,title:"Download file",type:"button",...s,children:r??m.jsx(xr,{size:14})})},Qs=()=>m.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[m.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),m.jsx("div",{className:"flex w-full items-center justify-center p-4",children:m.jsx(M2,{className:"size-4 animate-spin"})})]}),z2=/\.[^/.]+$/,$2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,p="png";d.includes("jpeg")||d.includes("jpg")?p="jpg":d.includes("png")?p="png":d.includes("svg")?p="svg":d.includes("gif")?p="gif":d.includes("webp")&&(p="webp"),h=`${(r||u||"image").replace(z2,"")}.${p}`}Mt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?m.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[m.jsx("img",{alt:r,className:V("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),m.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),m.jsx("button",{className:V("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:m.jsx(xr,{size:14})})]}):null},pn=0,Y2=()=>{pn+=1,pn===1&&(document.body.style.overflow="hidden")},q2=()=>{pn=Math.max(0,pn-1),pn===0&&(document.body.style.overflow="")},V2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=A.useState(!1),s=A.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=A.useCallback(()=>{r(),n()},[r,n]);return A.useEffect(()=>{if(t){Y2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),q2()}}},[t,n]),t?m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:m.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[m.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:m.jsx(Ll,{size:16})}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[m.jsx(Ws,{size:20}),m.jsx("span",{children:"Open external link?"})]}),m.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),m.jsx("div",{className:V("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?m.jsxs(m.Fragment,{children:[m.jsx(ia,{size:14}),m.jsx("span",{children:"Copied"})]}):m.jsxs(m.Fragment,{children:[m.jsx(aa,{size:14}),m.jsx("span",{children:"Copy link"})]})}),m.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:u,type:"button",children:[m.jsx(Ws,{size:14}),m.jsx("span",{children:"Open link"})]})]})]})}):null},hi=A.createContext(null),Rl=()=>A.useContext(hi),W_=()=>{var e;let t=Rl();return(e=t?.code)!=null?e:null},sa=()=>{var e;let t=Rl();return(e=t?.mermaid)!=null?e:null},W2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},G2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=A.useState(!1),o=A.useRef(null),{isAnimating:c}=A.useContext(Fe),h=sa(),d=async p=>{try{if(p==="mmd"){Mt("diagram.mmd",e,"text/plain"),u(!1),r?.(p);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let f=h.getMermaid(i),E=e.split("").reduce((y,R)=>(y<<5)-y+R.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(E)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await f.render(k,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){Mt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(p);return}if(p==="png"){let y=await W2(N);Mt("diagram.png",y,"image/png"),r?.(p),u(!1);return}}catch(f){a?.(f)}};return A.useEffect(()=>{let p=f=>{let E=f.composedPath();o.current&&!E.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),m.jsxs("div",{className:"relative",ref:o,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??m.jsx(xr,{size:14})}),s?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},mn=0,K2=()=>{mn+=1,mn===1&&(document.body.style.overflow="hidden")},Q2=()=>{mn=Math.max(0,mn-1),mn===0&&(document.body.style.overflow="")},X2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=A.useState(!1),{isAnimating:o,controls:c}=A.useContext(Fe),h=(()=>{if(typeof c=="boolean")return c;let p=c.mermaid;return p===!1?!1:p===!0||p===void 0?!0:p.panZoom!==!1})(),d=()=>{u(!s)};return A.useEffect(()=>{if(s){K2();let p=f=>{f.key==="Escape"&&u(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Q2()}}},[s]),A.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),m.jsxs(m.Fragment,{children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:m.jsx(v2,{size:14})}),s?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"button",tabIndex:0,children:[m.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:m.jsx(Ll,{size:20})}),m.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:m.jsx(oc,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},Dl=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},Pl=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
111
111
  `)&&(o=!0)}return o?c?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let u of n)a[s]=u.map(r).join(","),s+=1;return a.join(`
112
- `)},X2=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
112
+ `)},Z2=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
113
113
  `||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
114
114
  `?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
115
- `)},Yr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Z2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>Yr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?Yr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Yr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
116
- `)},J2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=A.useState(!1),[u,o]=A.useState(!1),c=A.useRef(null),h=A.useRef(0),{isAnimating:d}=A.useContext(Fe),p=async E=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let y=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),R=y?.querySelector("table");if(!R){r?.(new Error("Table not found"));return}let L=Dl(R),H=E==="csv"?Pl(L):X2(L),j=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([R.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(E),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};A.useEffect(()=>{let E=k=>{let N=k.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E),window.clearTimeout(h.current)}},[]);let f=u?ia:aa;return m.jsxs("div",{className:"relative",ref:c,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m.jsx(f,{size:14})}),a?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},ex=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=A.useState(!1),s=A.useRef(null),{isAnimating:u}=A.useContext(Fe),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),p=d?.querySelector("table");if(!p){r?.(new Error("Table not found"));return}let f=Dl(p),E=c==="csv"?Pl(f):Z2(f);Mt(`table.${c==="csv"?"csv":"md"}`,E,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return A.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m.jsx(xr,{size:14})}),i?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},tx=({children:e,className:t,showControls:n,...r})=>m.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?m.jsxs("div",{className:"flex items-center justify-end gap-1",children:[m.jsx(J2,{}),m.jsx(ex,{})]}):null,m.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:m.jsx("table",{className:V("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),nx=A.lazy(()=>Ci(()=>import("./code-block-OCS4YCEC-_lkU1VUC.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),rx=A.lazy(()=>Ci(()=>Promise.resolve().then(()=>v_),void 0).then(e=>({default:e.Mermaid}))),ix=/language-([^\s]+)/;function _r(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function fe(e,t){return e.className===t.className&&_r(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ua=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ol",{className:V("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>fe(e,t));ua.displayName="MarkdownOl";var Ml=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("li",{className:V("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&_r(e.node,t.node));Ml.displayName="MarkdownLi";var vl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ul",{className:V("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>fe(e,t));vl.displayName="MarkdownUl";var Bl=A.memo(({className:e,node:t,...n})=>m.jsx("hr",{className:V("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>fe(e,t));Bl.displayName="MarkdownHr";var Fl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("span",{className:V("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>fe(e,t));Fl.displayName="MarkdownStrong";var ax=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=A.useContext(Fe),[s,u]=A.useState(!1),o=n==="streamdown:incomplete-link",c=A.useCallback(async f=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(f.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=A.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=A.useCallback(()=>{u(!1)},[]),p={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:V("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(p):m.jsx(q2,{...p})]}):m.jsx("a",{className:V("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Hl=A.memo(ax,(e,t)=>fe(e,t)&&e.href===t.href);Hl.displayName="MarkdownA";var Ul=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h1",{className:V("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>fe(e,t));Ul.displayName="MarkdownH1";var jl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h2",{className:V("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>fe(e,t));jl.displayName="MarkdownH2";var zl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h3",{className:V("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>fe(e,t));zl.displayName="MarkdownH3";var $l=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h4",{className:V("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>fe(e,t));$l.displayName="MarkdownH4";var Yl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h5",{className:V("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>fe(e,t));Yl.displayName="MarkdownH5";var ql=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h6",{className:V("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>fe(e,t));ql.displayName="MarkdownH6";var Vl=A.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=A.useContext(Fe),a=di(i,"table");return m.jsx(tx,{className:t,showControls:a,...r,children:e})},(e,t)=>fe(e,t));Vl.displayName="MarkdownTable";var Wl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("thead",{className:V("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>fe(e,t));Wl.displayName="MarkdownThead";var Gl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tbody",{className:V("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>fe(e,t));Gl.displayName="MarkdownTbody";var Kl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tr",{className:V("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>fe(e,t));Kl.displayName="MarkdownTr";var Ql=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("th",{className:V("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>fe(e,t));Ql.displayName="MarkdownTh";var Xl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("td",{className:V("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>fe(e,t));Xl.displayName="MarkdownTd";var Zl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("blockquote",{className:V("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>fe(e,t));Zl.displayName="MarkdownBlockquote";var Jl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sup",{className:V("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>fe(e,t));Jl.displayName="MarkdownSup";var ec=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sub",{className:V("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>fe(e,t));ec.displayName="MarkdownSub";var tc=A.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!A.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let p of c)if(p){if(typeof p=="string")p.trim()!==""&&(h=!0);else if(A.isValidElement(p))if(((u=p.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let E of f){if(typeof E=="string"&&E.trim()!==""){h=!0;break}if(A.isValidElement(E)&&((o=E.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!A.isValidElement(s))return s;if(s.type===ua){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m.jsx("section",{className:t,...r,children:a}):null}return m.jsx("section",{className:t,...r,children:e})},(e,t)=>fe(e,t));tc.displayName="MarkdownSection";var sx=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=A.useContext(Fe),o=sa();if(a)return m.jsx("code",{className:V("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(ix),h=(i=c?.at(1))!=null?i:"",d="";if(A.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let f=di(u,"mermaid"),E=Un(u,"download"),k=Un(u,"copy"),N=Un(u,"fullscreen"),y=Un(u,"panZoom"),R=f&&(E||k||N);return m.jsx(A.Suspense,{fallback:m.jsx(Qs,{}),children:m.jsxs("div",{className:V("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[E?m.jsx(W2,{chart:d,config:s?.config}):null,k?m.jsx(Gs,{code:d}):null,N?m.jsx(Q2,{chart:d,config:s?.config}):null]}):null,m.jsx(rx,{chart:d,config:s?.config,showControls:y})]})})}let p=di(u,"code");return m.jsx(A.Suspense,{fallback:m.jsx(Qs,{}),children:m.jsx(nx,{className:V("overflow-x-auto border-border border-t",t),code:d,language:h,children:p?m.jsxs(m.Fragment,{children:[m.jsx(U2,{code:d,language:h}),m.jsx(Gs,{})]}):null})})},nc=A.memo(sx,(e,t)=>e.className===t.className&&_r(e.node,t.node));nc.displayName="MarkdownCode";var rc=A.memo(z2,(e,t)=>e.className===t.className&&_r(e.node,t.node));rc.displayName="MarkdownImg";var ic=A.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&A.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return m.jsx(m.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return m.jsx(m.Fragment,{children:e})}return m.jsx("p",{className:t,...r,children:e})},(e,t)=>fe(e,t));ic.displayName="MarkdownParagraph";var ux={ol:ua,li:Ml,ul:vl,hr:Bl,strong:Fl,a:Hl,h1:Ul,h2:jl,h3:zl,h4:$l,h5:Yl,h6:ql,table:Vl,thead:Wl,tbody:Gl,tr:Kl,th:Ql,td:Xl,blockquote:Zl,code:nc,img:rc,pre:({children:e})=>A.isValidElement(e)?A.cloneElement(e,{"data-block":"true"}):e,sup:Jl,sub:ec,p:ic,section:tc},ox=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Xs=[],Zs={allowDangerousHtml:!0},jn=new WeakMap,lx=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let p=0;p<h.length;p+=1){let f=h[p];if(p>0&&(d+=","),Array.isArray(f)){let[E,k]=f;if(typeof E=="function"){let N=jn.get(E);N||(N=E.name,jn.set(E,N)),d+=N}else d+=String(E);d+=":",d+=JSON.stringify(k)}else if(typeof f=="function"){let E=jn.get(f);E||(E=f.name,jn.set(f,E)),d+=E}else d+=String(f)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Js=new lx,ac=e=>{let t=cx(e),n=e.children||"";return Ex(t.runSync(t.parse(n),n),e)},cx=e=>{let t=Js.get(e);if(t)return t;let n=dx(e);return Js.set(e,n),n},hx=e=>e.some(t=>Array.isArray(t)?t[0]===Jr:t===Jr),dx=e=>{let t=e.rehypePlugins||Xs,n=e.remarkPlugins||Xs,r=hx(t)?n:[...n,ox],i=e.remarkRehypeOptions?{...Zs,...e.remarkRehypeOptions}:Zs;return MT().use(Pb).use(r).use(gT,i).use(t)},fx=e=>e,px=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},mx=(e,t)=>{var n;for(let r in Mr)if(Object.hasOwn(Mr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Mr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},gx=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},Ex=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||fx;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return px(d,h,a,c.value),h;if(c.type==="element"&&(mx(c,o),gx(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return zE(e,{Fragment:m.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0})},bx=/\[\^[\w-]{1,200}\](?!:)/,Tx=/\[\^[\w-]{1,200}\]:/,xx=/<\/(\w+)>/,_x=/<(\w+)[\s>]/,kx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ax=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Cx=e=>{let t=bx.test(e),n=Tx.test(e);if(t||n)return[e];let r=Be.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(xx);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(_x);if(h){let d=h[1];o.includes(`</${d}>`)||kx.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(Ax(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},eu,tu,Vn={...cn,protocols:{...cn.protocols,href:[...(tu=(eu=cn.protocols)==null?void 0:eu.href)!=null?tu:[],"tel"]}},fi={raw:Jr,sanitize:[xo,Vn],harden:[th,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},yx={gfm:[bg,{}]},nu=Object.values(fi),Nx=Object.values(yx),Ix={block:" ▋",circle:" ●"},Sx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=A.createContext(Sx),sc=A.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>m.jsx(ac,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});sc.displayName="Block";var wx=["github-light","github-dark"],uc=A.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=nu,remarkPlugins:a=Nx,className:s,shikiTheme:u=wx,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:p=sc,parseMarkdownIntoBlocksFn:f=Cx,caret:E,plugins:k,remend:N,linkSafety:y={enabled:!0},allowedTags:R,...L})=>{let H=A.useId(),[j,w]=A.useTransition(),G=A.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?NE(e,N):e,[e,t,n,N]),W=A.useMemo(()=>f(G),[G,f]),[X,I]=A.useState(W);A.useEffect(()=>{t==="streaming"?w(()=>{I(W)}):I(W)},[W,t]);let U=t==="streaming"?X:W,v=A.useMemo(()=>U.map((ae,x)=>`${H}-${x}`),[U.length,H]),q=A.useMemo(()=>d?d===!0?ci():ci(d):null,[d]),z=A.useMemo(()=>{var ae,x;return{shikiTheme:(x=(ae=k?.code)==null?void 0:ae.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,k?.code]),F=A.useMemo(()=>({...ux,...r}),[r]),ie=A.useMemo(()=>{let ae=[];return k!=null&&k.cjk&&(ae=[...ae,...k.cjk.remarkPluginsBefore]),ae=[...ae,...a],k!=null&&k.cjk&&(ae=[...ae,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(ae=[...ae,k.math.remarkPlugin]),ae},[a,k?.math,k?.cjk]),he=A.useMemo(()=>{var ae;let x=i;if(R&&Object.keys(R).length>0&&i===nu){let Le={...Vn,tagNames:[...(ae=Vn.tagNames)!=null?ae:[],...Object.keys(R)],attributes:{...Vn.attributes,...R}};x=[fi.raw,[xo,Le],fi.harden]}return k!=null&&k.math&&(x=[...x,k.math.rehypePlugin]),q&&h&&(x=[...x,q.rehypePlugin]),x},[i,k?.math,q,h,R]),we=A.useMemo(()=>E&&h?{"--streamdown-caret":`"${Ix[E]}"`}:void 0,[E,h]);return t==="static"?m.jsx(hi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:z,children:m.jsx("div",{className:V("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:m.jsx(ac,{components:F,rehypePlugins:he,remarkPlugins:ie,...L,children:e})})})}):m.jsx(hi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:z,children:m.jsxs("div",{className:V("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:we,children:[U.length===0&&E&&h&&m.jsx("span",{}),U.map((ae,x)=>m.jsx(p,{components:F,content:ae,index:x,rehypePlugins:he,remarkPlugins:ie,shouldParseIncompleteMarkdown:n,...L},v[x]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);uc.displayName="Streamdown";var Lx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=A.useRef(null),c=A.useRef(null),[h,d]=A.useState(s),[p,f]=A.useState({x:0,y:0}),[E,k]=A.useState(!1),[N,y]=A.useState({x:0,y:0}),[R,L]=A.useState({x:0,y:0}),H=A.useCallback(v=>{d(q=>Math.max(n,Math.min(r,q+v)))},[n,r]),j=A.useCallback(()=>{H(i)},[H,i]),w=A.useCallback(()=>{H(-i)},[H,i]),G=A.useCallback(()=>{d(s),f({x:0,y:0})},[s]),W=A.useCallback(v=>{v.preventDefault();let q=v.deltaY>0?-i:i;H(q)},[H,i]),X=A.useCallback(v=>{if(v.button!==0||v.isPrimary===!1)return;k(!0),y({x:v.clientX,y:v.clientY}),L(p);let q=v.currentTarget;q instanceof HTMLElement&&q.setPointerCapture(v.pointerId)},[p]),I=A.useCallback(v=>{if(!E)return;v.preventDefault();let q=v.clientX-N.x,z=v.clientY-N.y;f({x:R.x+q,y:R.y+z})},[E,N,R]),U=A.useCallback(v=>{k(!1);let q=v.currentTarget;q instanceof HTMLElement&&q.releasePointerCapture(v.pointerId)},[]);return A.useEffect(()=>{let v=o.current;if(v)return v.addEventListener("wheel",W,{passive:!1}),()=>{v.removeEventListener("wheel",W)}},[W]),A.useEffect(()=>{let v=c.current;if(v&&E)return document.body.style.userSelect="none",v.addEventListener("pointermove",I,{passive:!1}),v.addEventListener("pointerup",U),v.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",v.removeEventListener("pointermove",I),v.removeEventListener("pointerup",U),v.removeEventListener("pointercancel",U)}},[E,I,U]),m.jsxs("div",{className:V("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:E?"grabbing":"grab"},children:[a?m.jsxs("div",{className:V("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:m.jsx(B2,{size:16})}),m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:m.jsx(F2,{size:16})}),m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:G,title:"Reset zoom and pan",type:"button",children:m.jsx(v2,{size:16})})]}):null,m.jsx("div",{className:V("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:X,ref:c,role:"application",style:{transform:`translate(${p.x}px, ${p.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},oc=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=A.useState(null),[u,o]=A.useState(!1),[c,h]=A.useState(""),[d,p]=A.useState(""),[f,E]=A.useState(0),{mermaid:k}=A.useContext(Fe),N=sa(),y=k?.errorComponent,{shouldRender:R,containerRef:L}=y2({immediate:r});if(A.useEffect(()=>{if(R){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((X,I)=>(X<<5)-X+I.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await j.render(G,e);h(W),p(W)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,f,R,N]),!(R||c||d))return m.jsx("div",{className:V("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return m.jsx("div",{className:V("my-4 flex justify-center p-4",t),ref:L,children:m.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>E(w=>w+1);return y?m.jsx("div",{ref:L,children:m.jsx(y,{chart:e,error:a,retry:j})}):m.jsxs("div",{className:V("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[m.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m.jsxs("details",{className:"mt-2",children:[m.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let H=c||d;return m.jsx("div",{className:V("size-full",t),"data-streamdown":"mermaid",ref:L,children:m.jsx(Lx,{className:V(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m.jsx("div",{"aria-label":"Mermaid chart",className:V("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:H},role:"img"})})})};function Ox({content:e,children:t,className:n="",side:r="top",align:i="center"}){const a=r==="bottom"?"top-full mt-2":"bottom-full mb-2",s=r==="bottom"?"bottom-full border-b-neutral-900":"top-full border-t-neutral-900",u=i==="start"?"left-0":i==="end"?"right-0":"left-1/2 -translate-x-1/2",o=i==="start"?"left-4":i==="end"?"right-4":"left-1/2 -translate-x-1/2";return m.jsxs("div",{className:`group/tooltip relative inline-block ${n}`,children:[t,m.jsxs("div",{className:`invisible absolute ${a} ${u} max-w-[260px] px-3 py-2 bg-neutral-900 text-white text-xs leading-relaxed rounded-lg opacity-0 group-hover/tooltip:visible group-hover/tooltip:opacity-100 group-focus-within/tooltip:visible group-focus-within/tooltip:opacity-100 transition-opacity pointer-events-none whitespace-normal z-[100] shadow-lg`,children:[e,m.jsx("div",{className:`absolute ${s} ${o} border-4 border-transparent`})]})]})}const lc=/^[a-zA-Z]:[\\/]/,Rx=/[/\\](attachments|conversations)[/\\]/,Dx=/^\/(Users|home|tmp|private|var|opt|mnt|Volumes)(\/|$)/;function ru(e){return e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")}function Px(e){const t=e.match(/^(.*)#L([1-9]\d*)(?:C([1-9]\d*))?$/i);if(t)return{path:t[1],line:Number(t[2]),column:t[3]?Number(t[3]):void 0};const n=e.match(/^(.*?):(\d+)(?::(\d+))?$/);if(n&&n[1]){const r=Number(n[2]),i=n[3]?Number(n[3]):void 0;if(r>0&&(!n[3]||i&&i>0))return{path:n[1],line:r,column:i}}return{path:e}}function Mx(e,t){if(!t)return null;const n=ru(e),r=ru(t).replace(/\/$/,"");return n===r?null:n.startsWith(`${r}/`)?n.slice(r.length+1):n.startsWith("./")?n.slice(2):!n.startsWith("/")&&!lc.test(e)&&!n.startsWith("../")?n:null}function vx(e){return`${An()}/attachments/by-path?path=${encodeURIComponent(e)}`}function cc(e,t){if(/^https?:\/\//i.test(e))return{type:"external",url:e};if(/^(mailto|tel):/i.test(e))return{type:"external",url:e};if(e.startsWith("/api/")||e.startsWith("#"))return{type:"internal",url:e};const n=Px(e),r=Mx(n.path,t);return r?{type:"workspace-file",path:r,line:n.line,column:n.column}:Rx.test(e)?{type:"attachment",path:e,url:vx(e)}:Dx.test(e)||lc.test(e)?{type:"unknown-local",path:e}:{type:"internal",url:e}}function Bx(e,t){const n=new URLSearchParams({workingDir:e,path:t});return`${An()}/files/image?${n.toString()}`}function Fx(e){const t=new URLSearchParams({path:e});return`${An()}/files/image?${t.toString()}`}const hc=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]);function Hx(e){return/^\d+$/.test(e)?`http://127.0.0.1:${e}`:/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(e)?e:`http://${e}`}function pi(e){try{return new URL(Hx(e.trim()))}catch{return null}}function iu(e){return hc.has(e.hostname.toLowerCase())?"loopback":e.hostname.toLowerCase()}function au(e){return e.port?e.port:e.protocol==="https:"?"443":"80"}function Ux(e,t){return e.protocol===t.protocol&&iu(e)===iu(t)&&au(e)===au(t)}function dc(e){return!e||e==="/"?"":e.endsWith("/")?e.slice(0,-1):e}function jx(e,t){return t?e===t||e.startsWith(`${t}/`):!0}function zn(e,t){return t?{kind:"target",target:t.origin,path:`${t.pathname}${t.search}${t.hash}`}:{kind:"target",target:e,path:null}}function su(e,t){try{const i=new URL(e),a=i.searchParams.get("__agent_tower_preview_token"),s=new URL(t.startsWith("/")?t:`/${t}`,"http://preview.local");return i.pathname=s.pathname,i.search=s.search,i.hash=s.hash,a&&i.searchParams.set("__agent_tower_preview_token",a),i.toString()}catch{}const n=e.endsWith("/")?e:`${e}/`,r=t.startsWith("/")?t.slice(1):t;return`${n}${r}`}function W_(e,t,n){const r=e.trim();if(!r)return null;if(r.startsWith("/"))return n?{kind:"proxy",url:su(n,r)}:null;const i=pi(r);if(!i)return zn(r,null);if(!t||!n)return zn(r,i);const a=pi(t);if(!a||!Ux(i,a))return zn(r,i);const s=dc(a.pathname);if(!jx(i.pathname,s))return zn(r,i);const u=i.pathname.slice(s.length)||"/";return{kind:"proxy",url:su(n,`${u}${i.search}${i.hash}`)}}function G_(e,t,n,r){if(!e||!t)return null;try{const i=new URL(e),a=new URL(t,r),s=new URL(n,r),u=a.pathname==="/"?"":a.pathname.endsWith("/")?a.pathname.slice(0,-1):a.pathname;if(s.origin!==a.origin||u&&s.pathname!==u&&!s.pathname.startsWith(`${u}/`))return s.toString();const o=s.pathname.slice(u.length)||"/",c=dc(i.pathname);return i.pathname=`${c}${o}`.replace(/\/{2,}/g,"/")||"/",i.search=s.search,i.hash=s.hash,i.toString()}catch{return null}}function zx(e){const t=pi(e);return!!(t&&hc.has(t.hostname.toLowerCase()))}const fc=({src:e,alt:t,className:n,node:r,...i})=>m.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:m.jsx("img",{src:e,alt:t,...i,className:ar("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),$x=({href:e="",children:t,node:n,onClick:r,className:i,...a})=>{const{workingDir:s,onOpenWorkspaceFile:u,onOpenPreviewUrl:o}=a,c=cc(e,s),h={...a};delete h.workingDir,delete h.onOpenWorkspaceFile,delete h.onOpenPreviewUrl;const d=ar("text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",i);if(o&&zx(e)){const f=E=>{r?.(E),!E.defaultPrevented&&(E.preventDefault(),o(e))};return m.jsx("a",{href:e,onClick:f,className:d,...h,children:t})}if(c.type==="workspace-file"&&u){const f=E=>{r?.(E),!E.defaultPrevented&&(E.preventDefault(),u(c.path,c.line,c.column))};return m.jsx("a",{href:e,onClick:f,className:d,...h,children:t})}if(c.type==="unknown-local"||c.type==="workspace-file"){const f=c.path;return m.jsx("code",{title:f,children:t})}const p=c.url;return m.jsx("a",{href:p,onClick:r,className:d,...h,children:t})},Yx=({children:e,className:t,node:n,...r})=>m.jsx("li",{className:ar("py-0 pl-0 [&>p]:inline",t),...r,children:e}),qx={img:fc,li:Yx};function Vx({workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n}){return{...qx,a:r=>m.jsx($x,{...r,workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n}),img:r=>{const i=cc(r.src??"",e),a=i.type==="workspace-file"&&e?Bx(e,i.path):i.type==="attachment"?i.url:i.type==="unknown-local"?Fx(i.path):r.src;return m.jsx(fc,{...r,src:a})}}}const Wx={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},Gx=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let mi=null;function Kx(e){return Gx.test(e)}function Qx(){return mi??=Ci(async()=>{const{mermaid:e}=await import("./index-Da9mzleR.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),mi}function Xx(e){const t=Kx(e),[n,r]=A.useState();return A.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return Qx().then(a=>{i&&r(a)}).catch(()=>{mi=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function pc(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function Zx(e){return pc(e)==="success"}function Jx(e){const t=pc(e);return t==="failed"||t==="timed_out"}function oa(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function e_(e){return e.type===Z.Tool&&!!e.children?.length}function t_(e){return e.type!==Z.Cursor&&!e.children?.length&&e.content.trim()===""}function la(e){return!!e.tokenUsage||t_(e)}function n_(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function r_(e){return e.type===Z.Cursor||e.type===Z.User||e.type===Z.Assistant||e.type===Z.Error||e.type===Z.Warning?!0:e.type===Z.Info&&e.tokenUsage?!1:n_(e)}function uu(e){return oa(e)?!0:e_(e)||e.type!==Z.Tool&&e.type!==Z.Action?!1:!r_(e)}function mc(e){return!oa(e)&&(e.type===Z.Tool||e.type===Z.Action)}function i_(e){const t=e.filter(i=>!la(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(uu(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(uu(u))a.push(u),s++;else break}a.some(mc)?n.push({kind:"execution-group",logs:a,key:a[0].id}):a.forEach(u=>n.push({kind:"single",log:u,key:u.id})),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}function a_(e){const t=[];let n,r=[];const i=()=>{!n&&r.length===0||t.push({key:n?`turn-${n.id}`:`turn-${r[0]?.id??t.length}`,user:n,agentLogs:r})};for(const a of e)a.type===Z.User?(i(),n=a,r=[]):r.push(a);return i(),t}function s_(e){let t=-1;for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(r.content.trim()){if(r.type===Z.Assistant)return n;t===-1&&r.type===Z.Error&&(t=n)}}return t}function u_(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return null;const n=Math.max(0,t-e),r=n===0?0:Math.max(1,Math.round(n/1e3)),i=Math.floor(r/3600),a=Math.floor(r%3600/60),s=r%60;return i>0?`${i}h${a>0?` ${a}m`:""}`:a>0?`${a}m${s>0?` ${s}s`:""}`:`${s}s`}function ou(e,t){const n=e.agentLogs.reduce((a,s)=>Number.isFinite(s.cursorActivity?.processingStartedAt)?s.cursorActivity?.processingStartedAt:a,void 0),r=e.user?.timestamp??n??e.agentLogs.find(a=>Number.isFinite(a.timestamp))?.timestamp,i=e.agentLogs.reduce((a,s)=>Number.isFinite(s.timestamp)?a===void 0?s.timestamp:Math.max(a,s.timestamp):a,void 0);return u_(r,t??i)}const ca=A.memo(({content:e,className:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>{const a=Xx(e),s=A.useMemo(()=>Vx({workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i}),[i,r,n]);return m.jsx(uc,{className:ar("session-log-message-markdown",t),components:s,plugins:a,controls:a?Wx:void 0,children:e})});ca.displayName="MarkdownMessage";const gc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>m.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:m.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:m.jsx(ca,{content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})})}));gc.displayName="UserMessage";const ha=A.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=A.useState(t),i=A.useRef(null),[a,s]=A.useState(0);A.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=A.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
117
- `)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return m.jsxs("div",{className:"my-1.5",children:[m.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:11,strokeWidth:2})}),m.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&m.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),m.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:m.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:m.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});ha.displayName="ThinkingBlock";function o_(e,t=140){return(e.split(`
118
- `)[0]||"").slice(0,t)}function lu(e){const t=e.title?.replace(/\s*[✓✗]$/,"").replace(/\s*\(待审批\)$/,"");return e.tool?.kind?e.tool.name||t||"Tool":o_(e.content,140)||e.tool?.name||t||"Tool"}const gi=A.memo(({title:e,content:t,type:n})=>{const[r,i]=A.useState(!1);if(n===Z.Action)return m.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[m.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),m.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
119
- `)[0]||"",h=c!==e?c:"";return m.jsxs("div",{className:"my-2",children:[m.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[m.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):m.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),m.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&m.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&m.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?m.jsx(bu,{size:10}):m.jsx(Cn,{size:10})})]}),r&&t&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:m.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});gi.displayName="ToolBlock";const Ei=A.memo(({logs:e})=>{const{t}=yi(),[n,r]=A.useState(!1),i=e.filter(mc),a=i.map(u=>lu(u)),s=i.length;return m.jsxs("div",{className:"my-2",children:[m.jsxs("button",{type:"button",onClick:()=>r(!n),"aria-expanded":n,className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:11,strokeWidth:2,className:"text-neutral-400"})}),m.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:t("工具调用")}),m.jsx("span",{className:"shrink-0 inline-flex items-center gap-1",children:m.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:s})}),!n&&m.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[a.slice(0,3).join(", "),i.length>3?" …":""]})]}),n&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(u=>oa(u)?m.jsx(ha,{content:u.content,isOpenDefault:!1},u.id):m.jsx(Ec,{log:u,title:lu(u)},u.id))})]})});Ei.displayName="ExecutionDetailsGroup";const Ec=A.memo(({log:e,title:t})=>{const[n,r]=A.useState(!1),i=!!e.content.trim()&&e.content.trim()!==t.trim(),a=Zx(e),s=Jx(e)||e.type===Z.Error;return m.jsxs("div",{children:[m.jsxs("button",{type:"button",onClick:()=>i&&r(!n),"aria-expanded":i?n:void 0,className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):m.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),m.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&m.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?m.jsx(bu,{size:10}):m.jsx(Cn,{size:10})})]}),n&&i&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:m.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Ec.displayName="ToolGroupItem";const bc=A.memo(({content:e,compact:t})=>m.jsx("div",{className:`text-neutral-900 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:e}));bc.displayName="AgentText";const Tc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>m.jsx("div",{className:`text-neutral-900 min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:m.jsx(ca,{className:"space-y-2",content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})}));Tc.displayName="AssistantMessage";const xc=A.memo(({content:e})=>m.jsx("div",{className:"my-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-red-500",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 5a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0V5zm.75 6.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),m.jsx("pre",{className:"text-xs text-red-700 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));xc.displayName="ErrorMessage";const _c=A.memo(({content:e})=>m.jsx("div",{className:"my-2 rounded-lg border border-amber-200 bg-amber-50/70 px-4 py-3",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-amber-500",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{fillRule:"evenodd",d:"M7.13 2.05a1 1 0 011.74 0l5.55 9.87A1 1 0 0113.55 13H2.45a1 1 0 01-.87-1.08l5.55-9.87zM7.25 6a.75.75 0 011.5 0v2.5a.75.75 0 01-1.5 0V6zM8 11.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),m.jsx("pre",{className:"text-xs text-amber-800 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));_c.displayName="WarningMessage";const bi=A.memo(({logs:e,duration:t,collapsible:n,onBeforeToggle:r,workingDir:i,onOpenWorkspaceFile:a,onOpenPreviewUrl:s})=>{const{t:u}=yi(),[o,c]=A.useState(!1),h=t?u("已处理 {duration}",{duration:t}):u("已处理"),d=m.jsxs(m.Fragment,{children:[m.jsx("span",{children:h}),n&&m.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center transition-transform duration-200 motion-reduce:transition-none",style:{transform:o?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:14,strokeWidth:2})})]});return m.jsxs("div",{className:"mb-3 mt-1",children:[n?m.jsx("button",{type:"button","aria-expanded":o,onClick:()=>{r?.(),c(p=>!p)},className:"group flex w-full items-center gap-1.5 border-b border-neutral-100 py-2 text-left text-sm leading-6 text-neutral-500 transition-colors hover:text-neutral-700",children:d}):m.jsx("div",{role:"status",className:"flex w-full items-center gap-1.5 border-b border-neutral-100 py-2 text-sm leading-6 text-neutral-500",children:d}),n&&m.jsx("div",{"data-processed-content":!0,"aria-hidden":!o,inert:!o,className:`grid overflow-hidden transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none ${o?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:m.jsx("div",{className:"min-h-0 overflow-hidden",children:m.jsx("div",{className:"pb-1 pt-2",children:gn(e,i,a,s)})})})]})});bi.displayName="ProcessedGroup";function cu(e,t){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return t("{count} 秒",{count:n});const r=Math.floor(n/60),i=n%60;if(r<60)return t("{minutes} 分 {seconds} 秒",{minutes:r,seconds:i});const a=Math.floor(r/60),s=r%60;return t("{hours} 小时 {minutes} 分",{hours:a,minutes:s})}const kc=A.memo(({activity:e})=>{const{t}=yi(),n=A.useRef(Date.now()),[r,i]=A.useState(()=>Date.now()),a=e?.processingStartedAt??n.current;A.useEffect(()=>{const c=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(c)},[]);const s=cu(r-a,t),u=e?.lastOutputAt==null?null:cu(r-e.lastOutputAt,t),o=t("正在思考");return m.jsx(Ox,{align:"start",content:m.jsxs("div",{className:"flex min-w-max flex-col gap-0.5",children:[m.jsx("span",{children:t("已处理 {duration}",{duration:s})}),m.jsx("span",{className:"text-neutral-300",children:u?t("最后一次输出于 {duration}前",{duration:u}):t("等待首次输出")})]}),children:m.jsx("span",{tabIndex:0,"aria-label":o,className:"inline-flex cursor-help select-none py-1 text-sm font-normal outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(o).map((c,h)=>m.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${h*45}ms`},children:c},`${c}-${h}`))})})})});kc.displayName="ThinkingIndicator";function l_(e,t,n,r,i){if(e.kind==="execution-group")return m.jsx(Ei,{logs:e.logs});const a=e.log;if(a.type===Z.Tool&&a.children?.length)return m.jsx(Ei,{logs:a.children});if(la(a))return null;if(a.title==="Thinking"||a.content.startsWith("Thinking:"))return m.jsx(ha,{content:a.content,isOpenDefault:!0});switch(a.type){case Z.User:return m.jsx(gc,{content:a.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case Z.Tool:return m.jsx(gi,{type:a.type,title:a.title||"Tool",content:a.content});case Z.Action:return m.jsx(gi,{type:a.type,title:"Action",content:a.content});case Z.Assistant:return m.jsx(Tc,{content:a.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case Z.Info:return a.tokenUsage?null:m.jsx(bc,{content:a.content,compact:t});case Z.Error:return m.jsx(xc,{content:a.content});case Z.Warning:return m.jsx(_c,{content:a.content});case Z.Cursor:return m.jsx(kc,{activity:a.cursorActivity});default:return null}}function gn(e,t,n,r){return i_(e).map(i=>{const a=l_(i,!1,t,n,r);return a?m.jsx("div",{children:a},i.key):null})}function c_(e,t,n,r,i,a,s){const u=e.user?gn([e.user],i,a,s):null;if(!t)return m.jsxs(m.Fragment,{children:[u,m.jsx(bi,{logs:[],duration:ou(e,n),collapsible:!1}),gn(e.agentLogs,i,a,s)]});if(e.agentLogs.length===0)return u;const o=s_(e.agentLogs),c=o>=0?e.agentLogs.slice(0,o):e.agentLogs,h=o>=0?e.agentLogs.slice(o):[],d=c.some(p=>!la(p));return m.jsxs(m.Fragment,{children:[u,m.jsx(bi,{logs:c,duration:ou(e,n),collapsible:d,onBeforeToggle:r,workingDir:i,onOpenWorkspaceFile:a,onOpenPreviewUrl:s}),gn(h,i,a,s)]})}const K_=A.forwardRef(function({logs:t,isOutputActive:n,lastExitAt:r,onUserToggleDetails:i,scrollElementRef:a,workingDir:s,onOpenWorkspaceFile:u,onOpenPreviewUrl:o},c){const h=A.useMemo(()=>n===void 0?null:a_(t),[n,t]),[d,p]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!n)return;const f=()=>p(Date.now()),E=window.setTimeout(f,0),k=window.setInterval(f,1e3);return()=>{window.clearTimeout(E),window.clearInterval(k)}},[n]),A.useImperativeHandle(c,()=>({scrollToBottom:(f="instant")=>{a?.current&&a.current.scrollTo({top:a.current.scrollHeight,behavior:f})}}),[a]),m.jsx("div",{className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:h?h.map((f,E)=>m.jsx("div",{children:c_(f,E<h.length-1||!n,E===h.length-1?n?d:r:void 0,i,s,u,o)},f.key)):gn(t,s,u,o)})}),h_=An();function d_(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Q_({files:e,onRemove:t}){return e.length===0?null:m.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:e.map(n=>m.jsx(f_,{item:n,onRemove:t},n.tempId))})}function f_({item:e,onRemove:t}){const n=e.file.type.startsWith("image/"),r=e.status==="error",i=e.status==="uploading";return m.jsxs("div",{className:`relative group flex items-center gap-2 px-3 py-2 rounded-lg border text-xs max-w-[200px] ${r?"border-red-200 bg-red-50 text-red-600":"border-neutral-200 bg-neutral-50 text-neutral-700"}`,children:[n&&e.status==="done"&&e.attachment?m.jsx("img",{src:`${h_}${e.attachment.url}`,alt:e.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):m.jsx("span",{className:"flex-shrink-0",children:i?m.jsx(Bc,{size:16,className:"animate-spin text-neutral-400"}):n?m.jsx(qc,{size:16,className:"text-neutral-400"}):m.jsx($c,{size:16,className:"text-neutral-400"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate font-medium",children:e.file.name}),r?m.jsx("div",{className:"truncate text-red-500",children:e.error}):m.jsx("div",{className:"text-neutral-400",children:d_(e.file.size)})]}),m.jsx("button",{onClick:()=>t(e.tempId),className:"absolute -top-1.5 -right-1.5 hidden group-hover:flex items-center justify-center w-5 h-5 rounded-full bg-neutral-700 text-white hover:bg-neutral-900 transition-colors",children:m.jsx(Fc,{size:10})})]})}const p_=An();async function m_(e){const t=new FormData;t.append("file",e);const n=await fetch(`${p_}/attachments/upload`,{method:"POST",body:t});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||`Upload failed (${n.status})`)}return n.json()}let g_=0;function X_(){const[e,t]=A.useState([]),n=A.useRef(e);n.current=e;const r=A.useCallback(async d=>{const p=d.map(f=>({tempId:`tmp-${++g_}`,file:f,progress:0,status:"uploading"}));t(f=>[...f,...p]),await Promise.allSettled(p.map(async f=>{try{const E=await m_(f.file);t(k=>k.map(N=>N.tempId===f.tempId?{...N,status:"done",progress:100,attachment:E}:N))}catch(E){t(k=>k.map(N=>N.tempId===f.tempId?{...N,status:"error",error:E instanceof Error?E.message:"Upload failed"}:N))}}))},[]),i=A.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),a=A.useCallback(d=>{t(p=>p.filter(f=>f.tempId!==d))},[]),s=A.useCallback(()=>{t([])},[]),u=A.useCallback(d=>{d.length!==0&&t(p=>{const f=new Set(p.map(k=>k.attachment?.id??k.tempId)),E=d.filter(k=>{const N=k.attachment?.id??k.tempId;return f.has(N)?!1:(f.add(N),!0)});return E.length>0?[...p,...E]:p})},[]),o=A.useCallback(()=>{const d=i();return d.length===0?"":d.map(p=>`${p.mimeType.startsWith("image/")?"!":""}[${p.originalName}](${p.storagePath})`).join(`
120
- `)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:a,clear:s,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function Z_(e){const t=A.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return Hc({queryKey:["attachments","metadata",t],queryFn:()=>Uc.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}var E_=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),b_=Object.prototype.hasOwnProperty;function Ti(e,t){return b_.call(e,t)}function xi(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)Ti(e,i)&&r.push(i);return r}function De(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function _i(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function pt(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ac(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ki(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(ki(e[t]))return!0}else if(typeof e=="object"){for(var r=xi(e),i=r.length,a=0;a<i;a++)if(ki(e[r[a]]))return!0}}return!1}function hu(e,t){var n=[e];for(var r in t){var i=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof i<"u"&&n.push(r+": "+i)}return n.join(`
121
- `)}var Cc=(function(e){E_(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,hu(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=hu(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),de=Cc,T_=De,Dt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=rr(n,this.path);r&&(r=De(r));var i=Et(n,{op:"remove",path:this.from}).removed;return Et(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=rr(n,this.from);return Et(n,{op:"add",path:this.path,value:De(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:kn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},x_={add:function(e,t,n){return _i(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Dt.move,copy:Dt.copy,test:Dt.test,_get:Dt._get};function rr(e,t){if(t=="")return e;var n={op:"_get",path:t};return Et(e,n),n.value}function Et(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):ir(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=rr(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=kn(e,t.value),s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=De(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,p=void 0,f=void 0,E=void 0;for(typeof n=="function"?E=n:E=ir;;){if(f=o[h],f&&f.indexOf("~")!=-1&&(f=Ac(f)),i&&(f=="__proto__"||f=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&p===void 0&&(c[f]===void 0?p=o.slice(0,h).join("/"):h==d-1&&(p=t.path),p!==void 0&&E(t,0,e,p)),h++,Array.isArray(c)){if(f==="-")f=c.length;else{if(n&&!_i(f))throw new de("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);_i(f)&&(f=~~f)}if(h>=d){if(n&&t.op==="add"&&f>c.length)throw new de("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=x_[t.op].call(t,c,f,e);if(s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Dt[t.op].call(t,c,f,e);if(s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[f],n&&h<d&&(!c||typeof c!="object"))throw new de("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function kr(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=De(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=Et(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function __(e,t,n){var r=Et(e,t);if(r.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function ir(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new de("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Dt[e.op]){if(typeof e.path!="string")throw new de("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new de('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new de("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&ki(e.value))throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new de("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new de("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=yc([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new de("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function yc(e,t,n){try{if(!Array.isArray(e))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)kr(De(t),De(e),n||!0);else{n=n||ir;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof de)return i;throw i}}function kn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!kn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!kn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const k_=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:de,_areEquals:kn,applyOperation:Et,applyPatch:kr,applyReducer:__,deepClone:T_,getValueByPointer:rr,validate:yc,validator:ir},Symbol.toStringTag,{value:"Module"}));var da=new WeakMap,A_=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),C_=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function y_(e){return da.get(e)}function N_(e,t){return e.observers.get(t)}function I_(e,t){e.observers.delete(t.callback)}function S_(e,t){t.unobserve()}function w_(e,t){var n=[],r,i=y_(e);if(!i)i=new A_(e),da.set(e,i);else{var a=N_(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=De(e),t){r.callback=t,r.next=null;var s=function(){Ai(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){Ai(r),clearTimeout(r.next),I_(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new C_(t,r)),r}function Ai(e,t){t===void 0&&(t=!1);var n=da.get(e.object);fa(n.value,e.object,e.patches,"",t),e.patches.length&&kr(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function fa(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=xi(t),s=xi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(Ti(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?fa(h,d,n,r+"/"+pt(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"replace",path:r+"/"+pt(c),value:De(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"remove",path:r+"/"+pt(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!Ti(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:De(t[c])})}}}function L_(e,t,n){n===void 0&&(n=!1);var r=[];return fa(e,t,r,"",n),r}const O_=Object.freeze(Object.defineProperty({__proto__:null,compare:L_,generate:Ai,observe:w_,unobserve:S_},Symbol.toStringTag,{value:"Module"}));Object.assign({},k_,O_,{JsonPatchError:Cc,deepClone:De,escapePathComponent:pt,unescapePathComponent:Ac});const J_={entries:[],isTruncated:!1},R_=50,du=500;function fu(e){return typeof e?.seq=="number"?e.seq:0}function pu(e){return e?.entries.at(-1)?.id}function mu(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function e3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function t3(e,t){if(!e||e.isTruncated)return!0;const n=fu(e),r=fu(t);if(r>n)return!0;if(r<n)return!1;if(t.entries.length>e.entries.length)return!0;if(t.entries.length<e.entries.length)return!1;const i=pu(e),a=pu(t);if(a&&i&&a!==i)return!0;const s=mu(e),u=mu(t);return!!(u&&s&&u!==s)}function D_(e,t){for(;t.length>R_;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const n3=jc((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return D_(s,a)})},applyPatch:(n,r,i)=>{const a=t().conversations[n];if(!a)return!1;if(typeof i=="number"&&typeof a.seq=="number"&&i<=a.seq)return!0;try{const u={...kr(a,r,!0,!1).newDocument,seq:typeof i=="number"?i:a.seq,isTruncated:a.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(s){return console.error("[sessionLogStore] applyPatch failed:",s),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=du?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-du),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),P_={[$.CLAUDE_CODE]:{agentType:$.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[$.GEMINI_CLI]:{agentType:$.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[$.CURSOR_AGENT]:{agentType:$.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[$.CODEX]:{agentType:$.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[$.QWEN_CODE]:{agentType:$.QWEN_CODE,label:"Qwen Code"},[$.KIRO_CLI]:{agentType:$.KIRO_CLI,label:"Kiro CLI"},[$.OPENCODE]:{agentType:$.OPENCODE,label:"OpenCode"},[$.PI_CODING_AGENT]:{agentType:$.PI_CODING_AGENT,label:"Pi Coding Agent"},[$.GROK_BUILD]:{agentType:$.GROK_BUILD,label:"Grok Build"},[$.MINION_CODE]:{agentType:$.MINION_CODE,label:"Minion Code"}};function M_(e){return e?P_[e]??null:null}function r3(e,t){return M_(e)?.label??t??(e?String(e):"")}const v_=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:oc},Symbol.toStringTag,{value:"Module"}));export{Q_ as A,ya as C,J_ as E,$c as F,H2 as I,Fe as L,$_ as P,uc as Q,Te as R,ka as S,Ox as T,_a as W,V_ as Z,V as a,K_ as b,n3 as c,j_ as d,e3 as e,kr as f,M_ as g,$ as h,z_ as i,Y_ as j,r3 as k,Z_ as l,Xx as m,U_ as n,Vx as o,Wx as p,xa as q,qc as r,t3 as s,W_ as t,X_ as u,su as v,G_ as w,qx as x,Ta as y};
115
+ `)},Yr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},J2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>Yr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?Yr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Yr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
116
+ `)},ex=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=A.useState(!1),[u,o]=A.useState(!1),c=A.useRef(null),h=A.useRef(0),{isAnimating:d}=A.useContext(Fe),p=async E=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let y=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),R=y?.querySelector("table");if(!R){r?.(new Error("Table not found"));return}let L=Dl(R),H=E==="csv"?Pl(L):Z2(L),j=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([R.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(E),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};A.useEffect(()=>{let E=k=>{let N=k.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E),window.clearTimeout(h.current)}},[]);let f=u?ia:aa;return m.jsxs("div",{className:"relative",ref:c,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m.jsx(f,{size:14})}),a?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},tx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=A.useState(!1),s=A.useRef(null),{isAnimating:u}=A.useContext(Fe),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),p=d?.querySelector("table");if(!p){r?.(new Error("Table not found"));return}let f=Dl(p),E=c==="csv"?Pl(f):J2(f);Mt(`table.${c==="csv"?"csv":"md"}`,E,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return A.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsx("button",{className:V("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m.jsx(xr,{size:14})}),i?m.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},nx=({children:e,className:t,showControls:n,...r})=>m.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?m.jsxs("div",{className:"flex items-center justify-end gap-1",children:[m.jsx(ex,{}),m.jsx(tx,{})]}):null,m.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:m.jsx("table",{className:V("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),rx=A.lazy(()=>Ci(()=>import("./code-block-OCS4YCEC-xJQWFyR7.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),ix=A.lazy(()=>Ci(()=>Promise.resolve().then(()=>B_),void 0).then(e=>({default:e.Mermaid}))),ax=/language-([^\s]+)/;function _r(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function fe(e,t){return e.className===t.className&&_r(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ua=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ol",{className:V("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>fe(e,t));ua.displayName="MarkdownOl";var Ml=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("li",{className:V("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&_r(e.node,t.node));Ml.displayName="MarkdownLi";var vl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ul",{className:V("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>fe(e,t));vl.displayName="MarkdownUl";var Bl=A.memo(({className:e,node:t,...n})=>m.jsx("hr",{className:V("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>fe(e,t));Bl.displayName="MarkdownHr";var Fl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("span",{className:V("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>fe(e,t));Fl.displayName="MarkdownStrong";var sx=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=A.useContext(Fe),[s,u]=A.useState(!1),o=n==="streamdown:incomplete-link",c=A.useCallback(async f=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(f.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=A.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=A.useCallback(()=>{u(!1)},[]),p={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:V("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(p):m.jsx(V2,{...p})]}):m.jsx("a",{className:V("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Hl=A.memo(sx,(e,t)=>fe(e,t)&&e.href===t.href);Hl.displayName="MarkdownA";var Ul=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h1",{className:V("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>fe(e,t));Ul.displayName="MarkdownH1";var jl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h2",{className:V("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>fe(e,t));jl.displayName="MarkdownH2";var zl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h3",{className:V("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>fe(e,t));zl.displayName="MarkdownH3";var $l=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h4",{className:V("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>fe(e,t));$l.displayName="MarkdownH4";var Yl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h5",{className:V("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>fe(e,t));Yl.displayName="MarkdownH5";var ql=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h6",{className:V("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>fe(e,t));ql.displayName="MarkdownH6";var Vl=A.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=A.useContext(Fe),a=di(i,"table");return m.jsx(nx,{className:t,showControls:a,...r,children:e})},(e,t)=>fe(e,t));Vl.displayName="MarkdownTable";var Wl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("thead",{className:V("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>fe(e,t));Wl.displayName="MarkdownThead";var Gl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tbody",{className:V("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>fe(e,t));Gl.displayName="MarkdownTbody";var Kl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tr",{className:V("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>fe(e,t));Kl.displayName="MarkdownTr";var Ql=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("th",{className:V("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>fe(e,t));Ql.displayName="MarkdownTh";var Xl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("td",{className:V("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>fe(e,t));Xl.displayName="MarkdownTd";var Zl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("blockquote",{className:V("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>fe(e,t));Zl.displayName="MarkdownBlockquote";var Jl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sup",{className:V("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>fe(e,t));Jl.displayName="MarkdownSup";var ec=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sub",{className:V("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>fe(e,t));ec.displayName="MarkdownSub";var tc=A.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!A.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let p of c)if(p){if(typeof p=="string")p.trim()!==""&&(h=!0);else if(A.isValidElement(p))if(((u=p.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let E of f){if(typeof E=="string"&&E.trim()!==""){h=!0;break}if(A.isValidElement(E)&&((o=E.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!A.isValidElement(s))return s;if(s.type===ua){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m.jsx("section",{className:t,...r,children:a}):null}return m.jsx("section",{className:t,...r,children:e})},(e,t)=>fe(e,t));tc.displayName="MarkdownSection";var ux=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=A.useContext(Fe),o=sa();if(a)return m.jsx("code",{className:V("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(ax),h=(i=c?.at(1))!=null?i:"",d="";if(A.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let f=di(u,"mermaid"),E=Un(u,"download"),k=Un(u,"copy"),N=Un(u,"fullscreen"),y=Un(u,"panZoom"),R=f&&(E||k||N);return m.jsx(A.Suspense,{fallback:m.jsx(Qs,{}),children:m.jsxs("div",{className:V("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[E?m.jsx(G2,{chart:d,config:s?.config}):null,k?m.jsx(Gs,{code:d}):null,N?m.jsx(X2,{chart:d,config:s?.config}):null]}):null,m.jsx(ix,{chart:d,config:s?.config,showControls:y})]})})}let p=di(u,"code");return m.jsx(A.Suspense,{fallback:m.jsx(Qs,{}),children:m.jsx(rx,{className:V("overflow-x-auto border-border border-t",t),code:d,language:h,children:p?m.jsxs(m.Fragment,{children:[m.jsx(j2,{code:d,language:h}),m.jsx(Gs,{})]}):null})})},nc=A.memo(ux,(e,t)=>e.className===t.className&&_r(e.node,t.node));nc.displayName="MarkdownCode";var rc=A.memo($2,(e,t)=>e.className===t.className&&_r(e.node,t.node));rc.displayName="MarkdownImg";var ic=A.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&A.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return m.jsx(m.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return m.jsx(m.Fragment,{children:e})}return m.jsx("p",{className:t,...r,children:e})},(e,t)=>fe(e,t));ic.displayName="MarkdownParagraph";var ox={ol:ua,li:Ml,ul:vl,hr:Bl,strong:Fl,a:Hl,h1:Ul,h2:jl,h3:zl,h4:$l,h5:Yl,h6:ql,table:Vl,thead:Wl,tbody:Gl,tr:Kl,th:Ql,td:Xl,blockquote:Zl,code:nc,img:rc,pre:({children:e})=>A.isValidElement(e)?A.cloneElement(e,{"data-block":"true"}):e,sup:Jl,sub:ec,p:ic,section:tc},lx=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Xs=[],Zs={allowDangerousHtml:!0},jn=new WeakMap,cx=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let p=0;p<h.length;p+=1){let f=h[p];if(p>0&&(d+=","),Array.isArray(f)){let[E,k]=f;if(typeof E=="function"){let N=jn.get(E);N||(N=E.name,jn.set(E,N)),d+=N}else d+=String(E);d+=":",d+=JSON.stringify(k)}else if(typeof f=="function"){let E=jn.get(f);E||(E=f.name,jn.set(f,E)),d+=E}else d+=String(f)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Js=new cx,ac=e=>{let t=hx(e),n=e.children||"";return bx(t.runSync(t.parse(n),n),e)},hx=e=>{let t=Js.get(e);if(t)return t;let n=fx(e);return Js.set(e,n),n},dx=e=>e.some(t=>Array.isArray(t)?t[0]===Jr:t===Jr),fx=e=>{let t=e.rehypePlugins||Xs,n=e.remarkPlugins||Xs,r=dx(t)?n:[...n,lx],i=e.remarkRehypeOptions?{...Zs,...e.remarkRehypeOptions}:Zs;return vT().use(Mb).use(r).use(ET,i).use(t)},px=e=>e,mx=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},gx=(e,t)=>{var n;for(let r in Mr)if(Object.hasOwn(Mr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Mr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},Ex=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},bx=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||px;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return mx(d,h,a,c.value),h;if(c.type==="element"&&(gx(c,o),Ex(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return $E(e,{Fragment:m.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0})},Tx=/\[\^[\w-]{1,200}\](?!:)/,xx=/\[\^[\w-]{1,200}\]:/,_x=/<\/(\w+)>/,kx=/<(\w+)[\s>]/,Ax=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Cx=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},yx=e=>{let t=Tx.test(e),n=xx.test(e);if(t||n)return[e];let r=Be.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(_x);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(kx);if(h){let d=h[1];o.includes(`</${d}>`)||Ax.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(Cx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},eu,tu,Vn={...cn,protocols:{...cn.protocols,href:[...(tu=(eu=cn.protocols)==null?void 0:eu.href)!=null?tu:[],"tel"]}},fi={raw:Jr,sanitize:[xo,Vn],harden:[nh,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Nx={gfm:[Tg,{}]},nu=Object.values(fi),Ix=Object.values(Nx),Sx={block:" ▋",circle:" ●"},wx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=A.createContext(wx),sc=A.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>m.jsx(ac,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});sc.displayName="Block";var Lx=["github-light","github-dark"],uc=A.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=nu,remarkPlugins:a=Ix,className:s,shikiTheme:u=Lx,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:p=sc,parseMarkdownIntoBlocksFn:f=yx,caret:E,plugins:k,remend:N,linkSafety:y={enabled:!0},allowedTags:R,...L})=>{let H=A.useId(),[j,w]=A.useTransition(),G=A.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?IE(e,N):e,[e,t,n,N]),W=A.useMemo(()=>f(G),[G,f]),[X,I]=A.useState(W);A.useEffect(()=>{t==="streaming"?w(()=>{I(W)}):I(W)},[W,t]);let U=t==="streaming"?X:W,v=A.useMemo(()=>U.map((ae,x)=>`${H}-${x}`),[U.length,H]),q=A.useMemo(()=>d?d===!0?ci():ci(d):null,[d]),z=A.useMemo(()=>{var ae,x;return{shikiTheme:(x=(ae=k?.code)==null?void 0:ae.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,k?.code]),F=A.useMemo(()=>({...ox,...r}),[r]),ie=A.useMemo(()=>{let ae=[];return k!=null&&k.cjk&&(ae=[...ae,...k.cjk.remarkPluginsBefore]),ae=[...ae,...a],k!=null&&k.cjk&&(ae=[...ae,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(ae=[...ae,k.math.remarkPlugin]),ae},[a,k?.math,k?.cjk]),he=A.useMemo(()=>{var ae;let x=i;if(R&&Object.keys(R).length>0&&i===nu){let Le={...Vn,tagNames:[...(ae=Vn.tagNames)!=null?ae:[],...Object.keys(R)],attributes:{...Vn.attributes,...R}};x=[fi.raw,[xo,Le],fi.harden]}return k!=null&&k.math&&(x=[...x,k.math.rehypePlugin]),q&&h&&(x=[...x,q.rehypePlugin]),x},[i,k?.math,q,h,R]),we=A.useMemo(()=>E&&h?{"--streamdown-caret":`"${Sx[E]}"`}:void 0,[E,h]);return t==="static"?m.jsx(hi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:z,children:m.jsx("div",{className:V("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:m.jsx(ac,{components:F,rehypePlugins:he,remarkPlugins:ie,...L,children:e})})})}):m.jsx(hi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:z,children:m.jsxs("div",{className:V("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:we,children:[U.length===0&&E&&h&&m.jsx("span",{}),U.map((ae,x)=>m.jsx(p,{components:F,content:ae,index:x,rehypePlugins:he,remarkPlugins:ie,shouldParseIncompleteMarkdown:n,...L},v[x]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);uc.displayName="Streamdown";var Ox=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=A.useRef(null),c=A.useRef(null),[h,d]=A.useState(s),[p,f]=A.useState({x:0,y:0}),[E,k]=A.useState(!1),[N,y]=A.useState({x:0,y:0}),[R,L]=A.useState({x:0,y:0}),H=A.useCallback(v=>{d(q=>Math.max(n,Math.min(r,q+v)))},[n,r]),j=A.useCallback(()=>{H(i)},[H,i]),w=A.useCallback(()=>{H(-i)},[H,i]),G=A.useCallback(()=>{d(s),f({x:0,y:0})},[s]),W=A.useCallback(v=>{v.preventDefault();let q=v.deltaY>0?-i:i;H(q)},[H,i]),X=A.useCallback(v=>{if(v.button!==0||v.isPrimary===!1)return;k(!0),y({x:v.clientX,y:v.clientY}),L(p);let q=v.currentTarget;q instanceof HTMLElement&&q.setPointerCapture(v.pointerId)},[p]),I=A.useCallback(v=>{if(!E)return;v.preventDefault();let q=v.clientX-N.x,z=v.clientY-N.y;f({x:R.x+q,y:R.y+z})},[E,N,R]),U=A.useCallback(v=>{k(!1);let q=v.currentTarget;q instanceof HTMLElement&&q.releasePointerCapture(v.pointerId)},[]);return A.useEffect(()=>{let v=o.current;if(v)return v.addEventListener("wheel",W,{passive:!1}),()=>{v.removeEventListener("wheel",W)}},[W]),A.useEffect(()=>{let v=c.current;if(v&&E)return document.body.style.userSelect="none",v.addEventListener("pointermove",I,{passive:!1}),v.addEventListener("pointerup",U),v.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",v.removeEventListener("pointermove",I),v.removeEventListener("pointerup",U),v.removeEventListener("pointercancel",U)}},[E,I,U]),m.jsxs("div",{className:V("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:E?"grabbing":"grab"},children:[a?m.jsxs("div",{className:V("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:m.jsx(F2,{size:16})}),m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:m.jsx(H2,{size:16})}),m.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:G,title:"Reset zoom and pan",type:"button",children:m.jsx(B2,{size:16})})]}):null,m.jsx("div",{className:V("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:X,ref:c,role:"application",style:{transform:`translate(${p.x}px, ${p.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},oc=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=A.useState(null),[u,o]=A.useState(!1),[c,h]=A.useState(""),[d,p]=A.useState(""),[f,E]=A.useState(0),{mermaid:k}=A.useContext(Fe),N=sa(),y=k?.errorComponent,{shouldRender:R,containerRef:L}=N2({immediate:r});if(A.useEffect(()=>{if(R){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((X,I)=>(X<<5)-X+I.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await j.render(G,e);h(W),p(W)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,f,R,N]),!(R||c||d))return m.jsx("div",{className:V("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return m.jsx("div",{className:V("my-4 flex justify-center p-4",t),ref:L,children:m.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>E(w=>w+1);return y?m.jsx("div",{ref:L,children:m.jsx(y,{chart:e,error:a,retry:j})}):m.jsxs("div",{className:V("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[m.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m.jsxs("details",{className:"mt-2",children:[m.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let H=c||d;return m.jsx("div",{className:V("size-full",t),"data-streamdown":"mermaid",ref:L,children:m.jsx(Ox,{className:V(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m.jsx("div",{"aria-label":"Mermaid chart",className:V("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:H},role:"img"})})})};function Rx({content:e,children:t,className:n="",side:r="top",align:i="center"}){const a=r==="bottom"?"top-full mt-2":"bottom-full mb-2",s=r==="bottom"?"bottom-full border-b-neutral-900":"top-full border-t-neutral-900",u=i==="start"?"left-0":i==="end"?"right-0":"left-1/2 -translate-x-1/2",o=i==="start"?"left-4":i==="end"?"right-4":"left-1/2 -translate-x-1/2";return m.jsxs("div",{className:`group/tooltip relative inline-block ${n}`,children:[t,m.jsxs("div",{className:`invisible absolute ${a} ${u} max-w-[260px] px-3 py-2 bg-neutral-900 text-white text-xs leading-relaxed rounded-lg opacity-0 group-hover/tooltip:visible group-hover/tooltip:opacity-100 group-focus-within/tooltip:visible group-focus-within/tooltip:opacity-100 transition-opacity pointer-events-none whitespace-normal z-[100] shadow-lg`,children:[e,m.jsx("div",{className:`absolute ${s} ${o} border-4 border-transparent`})]})]})}const lc=/^[a-zA-Z]:[\\/]/,Dx=/[/\\](attachments|conversations)[/\\]/,Px=/^\/(Users|home|tmp|private|var|opt|mnt|Volumes)(\/|$)/;function ru(e){return e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")}function Mx(e){const t=e.match(/^(.*)#L([1-9]\d*)(?:C([1-9]\d*))?$/i);if(t)return{path:t[1],line:Number(t[2]),column:t[3]?Number(t[3]):void 0};const n=e.match(/^(.*?):(\d+)(?::(\d+))?$/);if(n&&n[1]){const r=Number(n[2]),i=n[3]?Number(n[3]):void 0;if(r>0&&(!n[3]||i&&i>0))return{path:n[1],line:r,column:i}}return{path:e}}function vx(e,t){if(!t)return null;const n=ru(e),r=ru(t).replace(/\/$/,"");return n===r?null:n.startsWith(`${r}/`)?n.slice(r.length+1):n.startsWith("./")?n.slice(2):!n.startsWith("/")&&!lc.test(e)&&!n.startsWith("../")?n:null}function Bx(e){return`${An()}/attachments/by-path?path=${encodeURIComponent(e)}`}function cc(e,t){if(/^https?:\/\//i.test(e))return{type:"external",url:e};if(/^(mailto|tel):/i.test(e))return{type:"external",url:e};if(e.startsWith("/api/")||e.startsWith("#"))return{type:"internal",url:e};const n=Mx(e),r=vx(n.path,t);return r?{type:"workspace-file",path:r,line:n.line,column:n.column}:Dx.test(e)?{type:"attachment",path:e,url:Bx(e)}:Px.test(e)||lc.test(e)?{type:"unknown-local",path:e}:{type:"internal",url:e}}function Fx(e,t){const n=new URLSearchParams({workingDir:e,path:t});return`${An()}/files/image?${n.toString()}`}function Hx(e){const t=new URLSearchParams({path:e});return`${An()}/files/image?${t.toString()}`}const hc=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]);function Ux(e){return/^\d+$/.test(e)?`http://127.0.0.1:${e}`:/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(e)?e:`http://${e}`}function pi(e){try{return new URL(Ux(e.trim()))}catch{return null}}function iu(e){return hc.has(e.hostname.toLowerCase())?"loopback":e.hostname.toLowerCase()}function au(e){return e.port?e.port:e.protocol==="https:"?"443":"80"}function jx(e,t){return e.protocol===t.protocol&&iu(e)===iu(t)&&au(e)===au(t)}function dc(e){return!e||e==="/"?"":e.endsWith("/")?e.slice(0,-1):e}function zx(e,t){return t?e===t||e.startsWith(`${t}/`):!0}function zn(e,t){return t?{kind:"target",target:t.origin,path:`${t.pathname}${t.search}${t.hash}`}:{kind:"target",target:e,path:null}}function su(e,t){try{const i=new URL(e),a=i.searchParams.get("__agent_tower_preview_token"),s=new URL(t.startsWith("/")?t:`/${t}`,"http://preview.local");return i.pathname=s.pathname,i.search=s.search,i.hash=s.hash,a&&i.searchParams.set("__agent_tower_preview_token",a),i.toString()}catch{}const n=e.endsWith("/")?e:`${e}/`,r=t.startsWith("/")?t.slice(1):t;return`${n}${r}`}function G_(e,t,n){const r=e.trim();if(!r)return null;if(r.startsWith("/"))return n?{kind:"proxy",url:su(n,r)}:null;const i=pi(r);if(!i)return zn(r,null);if(!t||!n)return zn(r,i);const a=pi(t);if(!a||!jx(i,a))return zn(r,i);const s=dc(a.pathname);if(!zx(i.pathname,s))return zn(r,i);const u=i.pathname.slice(s.length)||"/";return{kind:"proxy",url:su(n,`${u}${i.search}${i.hash}`)}}function K_(e,t,n,r){if(!e||!t)return null;try{const i=new URL(e),a=new URL(t,r),s=new URL(n,r),u=a.pathname==="/"?"":a.pathname.endsWith("/")?a.pathname.slice(0,-1):a.pathname;if(s.origin!==a.origin||u&&s.pathname!==u&&!s.pathname.startsWith(`${u}/`))return s.toString();const o=s.pathname.slice(u.length)||"/",c=dc(i.pathname);return i.pathname=`${c}${o}`.replace(/\/{2,}/g,"/")||"/",i.search=s.search,i.hash=s.hash,i.toString()}catch{return null}}function $x(e){const t=pi(e);return!!(t&&hc.has(t.hostname.toLowerCase()))}const fc=({src:e,alt:t,className:n,node:r,...i})=>m.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:m.jsx("img",{src:e,alt:t,...i,className:ar("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),Yx=({href:e="",children:t,node:n,onClick:r,className:i,...a})=>{const{workingDir:s,onOpenWorkspaceFile:u,onOpenPreviewUrl:o}=a,c=cc(e,s),h={...a};delete h.workingDir,delete h.onOpenWorkspaceFile,delete h.onOpenPreviewUrl;const d=ar("text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",i);if(o&&$x(e)){const f=E=>{r?.(E),!E.defaultPrevented&&(E.preventDefault(),o(e))};return m.jsx("a",{href:e,onClick:f,className:d,...h,children:t})}if(c.type==="workspace-file"&&u){const f=E=>{r?.(E),!E.defaultPrevented&&(E.preventDefault(),u(c.path,c.line,c.column))};return m.jsx("a",{href:e,onClick:f,className:d,...h,children:t})}if(c.type==="unknown-local"||c.type==="workspace-file"){const f=c.path;return m.jsx("code",{title:f,children:t})}const p=c.url;return m.jsx("a",{href:p,onClick:r,className:d,...h,children:t})},qx=({children:e,className:t,node:n,...r})=>m.jsx("li",{className:ar("py-0 pl-0 [&>p]:inline",t),...r,children:e}),Vx={img:fc,li:qx};function Wx({workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n}){return{...Vx,a:r=>m.jsx(Yx,{...r,workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n}),img:r=>{const i=cc(r.src??"",e),a=i.type==="workspace-file"&&e?Fx(e,i.path):i.type==="attachment"?i.url:i.type==="unknown-local"?Hx(i.path):r.src;return m.jsx(fc,{...r,src:a})}}}const Gx={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},Kx=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let mi=null;function Qx(e){return Kx.test(e)}function Xx(){return mi??=Ci(async()=>{const{mermaid:e}=await import("./index-CjdqAcbu.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),mi}function Zx(e){const t=Qx(e),[n,r]=A.useState();return A.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return Xx().then(a=>{i&&r(a)}).catch(()=>{mi=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function pc(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function Jx(e){return pc(e)==="success"}function e_(e){const t=pc(e);return t==="failed"||t==="timed_out"}function oa(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function t_(e){return e.type===Z.Tool&&!!e.children?.length}function n_(e){return e.type!==Z.Cursor&&!e.children?.length&&e.content.trim()===""}function la(e){return!!e.tokenUsage||n_(e)}function r_(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function i_(e){return e.type===Z.Cursor||e.type===Z.User||e.type===Z.Assistant||e.type===Z.Error||e.type===Z.Warning?!0:e.type===Z.Info&&e.tokenUsage?!1:r_(e)}function uu(e){return oa(e)?!0:t_(e)||e.type!==Z.Tool&&e.type!==Z.Action?!1:!i_(e)}function mc(e){return!oa(e)&&(e.type===Z.Tool||e.type===Z.Action)}function a_(e){const t=e.filter(i=>!la(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(uu(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(uu(u))a.push(u),s++;else break}a.some(mc)?n.push({kind:"execution-group",logs:a,key:a[0].id}):a.forEach(u=>n.push({kind:"single",log:u,key:u.id})),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}function s_(e){const t=[];let n,r=[];const i=()=>{!n&&r.length===0||t.push({key:n?`turn-${n.id}`:`turn-${r[0]?.id??t.length}`,user:n,agentLogs:r})};for(const a of e)a.type===Z.User?(i(),n=a,r=[]):r.push(a);return i(),t}function u_(e){let t=-1;for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(r.content.trim()){if(r.type===Z.Assistant)return n;t===-1&&r.type===Z.Error&&(t=n)}}return t}function o_(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return null;const n=Math.max(0,t-e),r=n===0?0:Math.max(1,Math.round(n/1e3)),i=Math.floor(r/3600),a=Math.floor(r%3600/60),s=r%60;return i>0?`${i}h${a>0?` ${a}m`:""}`:a>0?`${a}m${s>0?` ${s}s`:""}`:`${s}s`}function ou(e,t){const n=e.agentLogs.reduce((a,s)=>Number.isFinite(s.cursorActivity?.processingStartedAt)?s.cursorActivity?.processingStartedAt:a,void 0),r=e.user?.timestamp??n??e.agentLogs.find(a=>Number.isFinite(a.timestamp))?.timestamp,i=e.agentLogs.reduce((a,s)=>Number.isFinite(s.timestamp)?a===void 0?s.timestamp:Math.max(a,s.timestamp):a,void 0);return o_(r,t??i)}const ca=A.memo(({content:e,className:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>{const a=Zx(e),s=A.useMemo(()=>Wx({workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i}),[i,r,n]);return m.jsx(uc,{className:ar("session-log-message-markdown",t),components:s,plugins:a,controls:a?Gx:void 0,children:e})});ca.displayName="MarkdownMessage";const gc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>m.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:m.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:m.jsx(ca,{content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})})}));gc.displayName="UserMessage";const ha=A.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=A.useState(t),i=A.useRef(null),[a,s]=A.useState(0);A.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=A.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
117
+ `)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return m.jsxs("div",{className:"my-1.5",children:[m.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:11,strokeWidth:2})}),m.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&m.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),m.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:m.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:m.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});ha.displayName="ThinkingBlock";function l_(e,t=140){return(e.split(`
118
+ `)[0]||"").slice(0,t)}function lu(e){const t=e.title?.replace(/\s*[✓✗]$/,"").replace(/\s*\(待审批\)$/,"");return e.tool?.kind?e.tool.name||t||"Tool":l_(e.content,140)||e.tool?.name||t||"Tool"}const gi=A.memo(({title:e,content:t,type:n})=>{const[r,i]=A.useState(!1);if(n===Z.Action)return m.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[m.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),m.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
119
+ `)[0]||"",h=c!==e?c:"";return m.jsxs("div",{className:"my-2",children:[m.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[m.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):m.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),m.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&m.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&m.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?m.jsx(bu,{size:10}):m.jsx(Cn,{size:10})})]}),r&&t&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:m.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});gi.displayName="ToolBlock";const Ei=A.memo(({logs:e})=>{const{t}=yi(),[n,r]=A.useState(!1),i=e.filter(mc),a=i.map(u=>lu(u)),s=i.length;return m.jsxs("div",{className:"my-2",children:[m.jsxs("button",{type:"button",onClick:()=>r(!n),"aria-expanded":n,className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:11,strokeWidth:2,className:"text-neutral-400"})}),m.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:t("工具调用")}),m.jsx("span",{className:"shrink-0 inline-flex items-center gap-1",children:m.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:s})}),!n&&m.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[a.slice(0,3).join(", "),i.length>3?" …":""]})]}),n&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(u=>oa(u)?m.jsx(ha,{content:u.content,isOpenDefault:!1},u.id):m.jsx(Ec,{log:u,title:lu(u)},u.id))})]})});Ei.displayName="ExecutionDetailsGroup";const Ec=A.memo(({log:e,title:t})=>{const[n,r]=A.useState(!1),i=!!e.content.trim()&&e.content.trim()!==t.trim(),a=Jx(e),s=e_(e)||e.type===Z.Error;return m.jsxs("div",{children:[m.jsxs("button",{type:"button",onClick:()=>i&&r(!n),"aria-expanded":i?n:void 0,className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[m.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):m.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),m.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&m.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?m.jsx(bu,{size:10}):m.jsx(Cn,{size:10})})]}),n&&i&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:m.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Ec.displayName="ToolGroupItem";const bc=A.memo(({content:e,compact:t})=>m.jsx("div",{className:`text-neutral-900 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:e}));bc.displayName="AgentText";const Tc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>m.jsx("div",{className:`text-neutral-900 min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:m.jsx(ca,{className:"space-y-2",content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})}));Tc.displayName="AssistantMessage";const xc=A.memo(({content:e})=>m.jsx("div",{className:"my-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-red-500",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 5a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0V5zm.75 6.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),m.jsx("pre",{className:"text-xs text-red-700 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));xc.displayName="ErrorMessage";const _c=A.memo(({content:e})=>m.jsx("div",{className:"my-2 rounded-lg border border-amber-200 bg-amber-50/70 px-4 py-3",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-amber-500",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{fillRule:"evenodd",d:"M7.13 2.05a1 1 0 011.74 0l5.55 9.87A1 1 0 0113.55 13H2.45a1 1 0 01-.87-1.08l5.55-9.87zM7.25 6a.75.75 0 011.5 0v2.5a.75.75 0 01-1.5 0V6zM8 11.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),m.jsx("pre",{className:"text-xs text-amber-800 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));_c.displayName="WarningMessage";const bi=A.memo(({logs:e,duration:t,collapsible:n,onBeforeToggle:r,workingDir:i,onOpenWorkspaceFile:a,onOpenPreviewUrl:s})=>{const{t:u}=yi(),[o,c]=A.useState(!1),h=t?u("已处理 {duration}",{duration:t}):u("已处理"),d=m.jsxs(m.Fragment,{children:[m.jsx("span",{children:h}),n&&m.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center transition-transform duration-200 motion-reduce:transition-none",style:{transform:o?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(Cn,{size:14,strokeWidth:2})})]});return m.jsxs("div",{className:"mb-3 mt-1",children:[n?m.jsx("button",{type:"button","aria-expanded":o,onClick:()=>{r?.(),c(p=>!p)},className:"group flex w-full items-center gap-1.5 border-b border-neutral-100 py-2 text-left text-sm leading-6 text-neutral-500 transition-colors hover:text-neutral-700",children:d}):m.jsx("div",{role:"status",className:"flex w-full items-center gap-1.5 border-b border-neutral-100 py-2 text-sm leading-6 text-neutral-500",children:d}),n&&m.jsx("div",{"data-processed-content":!0,"aria-hidden":!o,inert:!o,className:`grid overflow-hidden transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none ${o?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:m.jsx("div",{className:"min-h-0 overflow-hidden",children:m.jsx("div",{className:"pb-1 pt-2",children:gn(e,i,a,s)})})})]})});bi.displayName="ProcessedGroup";function cu(e,t){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return t("{count} 秒",{count:n});const r=Math.floor(n/60),i=n%60;if(r<60)return t("{minutes} 分 {seconds} 秒",{minutes:r,seconds:i});const a=Math.floor(r/60),s=r%60;return t("{hours} 小时 {minutes} 分",{hours:a,minutes:s})}const kc=A.memo(({activity:e})=>{const{t}=yi(),n=A.useRef(Date.now()),[r,i]=A.useState(()=>Date.now()),a=e?.processingStartedAt??n.current;A.useEffect(()=>{const c=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(c)},[]);const s=cu(r-a,t),u=e?.lastOutputAt==null?null:cu(r-e.lastOutputAt,t),o=t("正在思考");return m.jsx(Rx,{align:"start",content:m.jsxs("div",{className:"flex min-w-max flex-col gap-0.5",children:[m.jsx("span",{children:t("已处理 {duration}",{duration:s})}),m.jsx("span",{className:"text-neutral-300",children:u?t("最后一次输出于 {duration}前",{duration:u}):t("等待首次输出")})]}),children:m.jsx("span",{tabIndex:0,"aria-label":o,className:"inline-flex cursor-help select-none py-1 text-sm font-normal outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(o).map((c,h)=>m.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${h*45}ms`},children:c},`${c}-${h}`))})})})});kc.displayName="ThinkingIndicator";function c_(e,t,n,r,i){if(e.kind==="execution-group")return m.jsx(Ei,{logs:e.logs});const a=e.log;if(a.type===Z.Tool&&a.children?.length)return m.jsx(Ei,{logs:a.children});if(la(a))return null;if(a.title==="Thinking"||a.content.startsWith("Thinking:"))return m.jsx(ha,{content:a.content,isOpenDefault:!0});switch(a.type){case Z.User:return m.jsx(gc,{content:a.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case Z.Tool:return m.jsx(gi,{type:a.type,title:a.title||"Tool",content:a.content});case Z.Action:return m.jsx(gi,{type:a.type,title:"Action",content:a.content});case Z.Assistant:return m.jsx(Tc,{content:a.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case Z.Info:return a.tokenUsage?null:m.jsx(bc,{content:a.content,compact:t});case Z.Error:return m.jsx(xc,{content:a.content});case Z.Warning:return m.jsx(_c,{content:a.content});case Z.Cursor:return m.jsx(kc,{activity:a.cursorActivity});default:return null}}function gn(e,t,n,r){return a_(e).map(i=>{const a=c_(i,!1,t,n,r);return a?m.jsx("div",{children:a},i.key):null})}function h_(e,t,n,r,i,a,s){const u=e.user?gn([e.user],i,a,s):null;if(!t)return m.jsxs(m.Fragment,{children:[u,m.jsx(bi,{logs:[],duration:ou(e,n),collapsible:!1}),gn(e.agentLogs,i,a,s)]});if(e.agentLogs.length===0)return u;const o=u_(e.agentLogs),c=o>=0?e.agentLogs.slice(0,o):e.agentLogs,h=o>=0?e.agentLogs.slice(o):[],d=c.some(p=>!la(p));return m.jsxs(m.Fragment,{children:[u,m.jsx(bi,{logs:c,duration:ou(e,n),collapsible:d,onBeforeToggle:r,workingDir:i,onOpenWorkspaceFile:a,onOpenPreviewUrl:s}),gn(h,i,a,s)]})}const Q_=A.forwardRef(function({logs:t,isOutputActive:n,lastExitAt:r,onUserToggleDetails:i,scrollElementRef:a,workingDir:s,onOpenWorkspaceFile:u,onOpenPreviewUrl:o},c){const h=A.useMemo(()=>n===void 0?null:s_(t),[n,t]),[d,p]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!n)return;const f=()=>p(Date.now()),E=window.setTimeout(f,0),k=window.setInterval(f,1e3);return()=>{window.clearTimeout(E),window.clearInterval(k)}},[n]),A.useImperativeHandle(c,()=>({scrollToBottom:(f="instant")=>{a?.current&&a.current.scrollTo({top:a.current.scrollHeight,behavior:f})}}),[a]),m.jsx("div",{className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:h?h.map((f,E)=>m.jsx("div",{children:h_(f,E<h.length-1||!n,E===h.length-1?n?d:r:void 0,i,s,u,o)},f.key)):gn(t,s,u,o)})}),d_=An();function f_(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function X_({files:e,onRemove:t}){return e.length===0?null:m.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:e.map(n=>m.jsx(p_,{item:n,onRemove:t},n.tempId))})}function p_({item:e,onRemove:t}){const n=e.file.type.startsWith("image/"),r=e.status==="error",i=e.status==="uploading";return m.jsxs("div",{className:`relative group flex items-center gap-2 px-3 py-2 rounded-lg border text-xs max-w-[200px] ${r?"border-red-200 bg-red-50 text-red-600":"border-neutral-200 bg-neutral-50 text-neutral-700"}`,children:[n&&e.status==="done"&&e.attachment?m.jsx("img",{src:`${d_}${e.attachment.url}`,alt:e.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):m.jsx("span",{className:"flex-shrink-0",children:i?m.jsx(Bc,{size:16,className:"animate-spin text-neutral-400"}):n?m.jsx(qc,{size:16,className:"text-neutral-400"}):m.jsx($c,{size:16,className:"text-neutral-400"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate font-medium",children:e.file.name}),r?m.jsx("div",{className:"truncate text-red-500",children:e.error}):m.jsx("div",{className:"text-neutral-400",children:f_(e.file.size)})]}),m.jsx("button",{onClick:()=>t(e.tempId),className:"absolute -top-1.5 -right-1.5 hidden group-hover:flex items-center justify-center w-5 h-5 rounded-full bg-neutral-700 text-white hover:bg-neutral-900 transition-colors",children:m.jsx(Fc,{size:10})})]})}const m_=An();async function g_(e){const t=new FormData;t.append("file",e);const n=await fetch(`${m_}/attachments/upload`,{method:"POST",body:t});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||`Upload failed (${n.status})`)}return n.json()}let E_=0;function Z_(){const[e,t]=A.useState([]),n=A.useRef(e);n.current=e;const r=A.useCallback(async d=>{const p=d.map(f=>({tempId:`tmp-${++E_}`,file:f,progress:0,status:"uploading"}));t(f=>[...f,...p]),await Promise.allSettled(p.map(async f=>{try{const E=await g_(f.file);t(k=>k.map(N=>N.tempId===f.tempId?{...N,status:"done",progress:100,attachment:E}:N))}catch(E){t(k=>k.map(N=>N.tempId===f.tempId?{...N,status:"error",error:E instanceof Error?E.message:"Upload failed"}:N))}}))},[]),i=A.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),a=A.useCallback(d=>{t(p=>p.filter(f=>f.tempId!==d))},[]),s=A.useCallback(()=>{t([])},[]),u=A.useCallback(d=>{d.length!==0&&t(p=>{const f=new Set(p.map(k=>k.attachment?.id??k.tempId)),E=d.filter(k=>{const N=k.attachment?.id??k.tempId;return f.has(N)?!1:(f.add(N),!0)});return E.length>0?[...p,...E]:p})},[]),o=A.useCallback(()=>{const d=i();return d.length===0?"":d.map(p=>`${p.mimeType.startsWith("image/")?"!":""}[${p.originalName}](${p.storagePath})`).join(`
120
+ `)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:a,clear:s,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function J_(e){const t=A.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return Hc({queryKey:["attachments","metadata",t],queryFn:()=>Uc.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}var b_=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),T_=Object.prototype.hasOwnProperty;function Ti(e,t){return T_.call(e,t)}function xi(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)Ti(e,i)&&r.push(i);return r}function De(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function _i(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function pt(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ac(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ki(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(ki(e[t]))return!0}else if(typeof e=="object"){for(var r=xi(e),i=r.length,a=0;a<i;a++)if(ki(e[r[a]]))return!0}}return!1}function hu(e,t){var n=[e];for(var r in t){var i=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof i<"u"&&n.push(r+": "+i)}return n.join(`
121
+ `)}var Cc=(function(e){b_(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,hu(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=hu(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),de=Cc,x_=De,Dt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=rr(n,this.path);r&&(r=De(r));var i=Et(n,{op:"remove",path:this.from}).removed;return Et(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=rr(n,this.from);return Et(n,{op:"add",path:this.path,value:De(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:kn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},__={add:function(e,t,n){return _i(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Dt.move,copy:Dt.copy,test:Dt.test,_get:Dt._get};function rr(e,t){if(t=="")return e;var n={op:"_get",path:t};return Et(e,n),n.value}function Et(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):ir(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=rr(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=kn(e,t.value),s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=De(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,p=void 0,f=void 0,E=void 0;for(typeof n=="function"?E=n:E=ir;;){if(f=o[h],f&&f.indexOf("~")!=-1&&(f=Ac(f)),i&&(f=="__proto__"||f=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&p===void 0&&(c[f]===void 0?p=o.slice(0,h).join("/"):h==d-1&&(p=t.path),p!==void 0&&E(t,0,e,p)),h++,Array.isArray(c)){if(f==="-")f=c.length;else{if(n&&!_i(f))throw new de("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);_i(f)&&(f=~~f)}if(h>=d){if(n&&t.op==="add"&&f>c.length)throw new de("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=__[t.op].call(t,c,f,e);if(s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Dt[t.op].call(t,c,f,e);if(s.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[f],n&&h<d&&(!c||typeof c!="object"))throw new de("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function kr(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=De(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=Et(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function k_(e,t,n){var r=Et(e,t);if(r.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function ir(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new de("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Dt[e.op]){if(typeof e.path!="string")throw new de("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new de('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new de("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&ki(e.value))throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new de("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new de("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=yc([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new de("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function yc(e,t,n){try{if(!Array.isArray(e))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)kr(De(t),De(e),n||!0);else{n=n||ir;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof de)return i;throw i}}function kn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!kn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!kn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const A_=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:de,_areEquals:kn,applyOperation:Et,applyPatch:kr,applyReducer:k_,deepClone:x_,getValueByPointer:rr,validate:yc,validator:ir},Symbol.toStringTag,{value:"Module"}));var da=new WeakMap,C_=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),y_=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function N_(e){return da.get(e)}function I_(e,t){return e.observers.get(t)}function S_(e,t){e.observers.delete(t.callback)}function w_(e,t){t.unobserve()}function L_(e,t){var n=[],r,i=N_(e);if(!i)i=new C_(e),da.set(e,i);else{var a=I_(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=De(e),t){r.callback=t,r.next=null;var s=function(){Ai(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){Ai(r),clearTimeout(r.next),S_(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new y_(t,r)),r}function Ai(e,t){t===void 0&&(t=!1);var n=da.get(e.object);fa(n.value,e.object,e.patches,"",t),e.patches.length&&kr(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function fa(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=xi(t),s=xi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(Ti(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?fa(h,d,n,r+"/"+pt(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"replace",path:r+"/"+pt(c),value:De(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"remove",path:r+"/"+pt(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!Ti(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:De(t[c])})}}}function O_(e,t,n){n===void 0&&(n=!1);var r=[];return fa(e,t,r,"",n),r}const R_=Object.freeze(Object.defineProperty({__proto__:null,compare:O_,generate:Ai,observe:L_,unobserve:w_},Symbol.toStringTag,{value:"Module"}));Object.assign({},A_,R_,{JsonPatchError:Cc,deepClone:De,escapePathComponent:pt,unescapePathComponent:Ac});const e3={entries:[],isTruncated:!1},D_=50,du=500;function fu(e){return typeof e?.seq=="number"?e.seq:0}function pu(e){return e?.entries.at(-1)?.id}function mu(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function t3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function n3(e,t){if(!e||e.isTruncated)return!0;const n=fu(e),r=fu(t);if(r>n)return!0;if(r<n)return!1;if(t.entries.length>e.entries.length)return!0;if(t.entries.length<e.entries.length)return!1;const i=pu(e),a=pu(t);if(a&&i&&a!==i)return!0;const s=mu(e),u=mu(t);return!!(u&&s&&u!==s)}function P_(e,t){for(;t.length>D_;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const r3=jc((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return P_(s,a)})},applyPatch:(n,r,i)=>{const a=t().conversations[n];if(!a)return!1;if(typeof i=="number"&&typeof a.seq=="number"&&i<=a.seq)return!0;try{const u={...kr(a,r,!0,!1).newDocument,seq:typeof i=="number"?i:a.seq,isTruncated:a.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(s){return console.error("[sessionLogStore] applyPatch failed:",s),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=du?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-du),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),M_={[$.CLAUDE_CODE]:{agentType:$.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[$.GEMINI_CLI]:{agentType:$.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[$.CURSOR_AGENT]:{agentType:$.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[$.CODEX]:{agentType:$.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[$.QWEN_CODE]:{agentType:$.QWEN_CODE,label:"Qwen Code",logoSrc:"/agent-icons/qwen-code.svg"},[$.KIRO_CLI]:{agentType:$.KIRO_CLI,label:"Kiro CLI",logoSrc:"/agent-icons/kiro-cli.svg"},[$.OPENCODE]:{agentType:$.OPENCODE,label:"OpenCode",logoSrc:"/agent-icons/opencode.svg"},[$.PI_CODING_AGENT]:{agentType:$.PI_CODING_AGENT,label:"Pi Coding Agent",logoSrc:"/agent-icons/pi-coding-agent.svg"},[$.GROK_BUILD]:{agentType:$.GROK_BUILD,label:"Grok Build",logoSrc:"/agent-icons/grok-build.svg"},[$.MINION_CODE]:{agentType:$.MINION_CODE,label:"Minion Code"}};function v_(e){return e?M_[e]??null:null}function i3(e,t){return v_(e)?.label??t??(e?String(e):"")}const B_=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:oc},Symbol.toStringTag,{value:"Module"}));export{X_ as A,ya as C,e3 as E,$c as F,U2 as I,Fe as L,Y_ as P,uc as Q,Te as R,ka as S,Rx as T,Kc as U,_a as W,W_ as Z,V as a,Q_ as b,r3 as c,z_ as d,t3 as e,kr as f,v_ as g,$ as h,$_ as i,q_ as j,i3 as k,J_ as l,Zx as m,j_ as n,Wx as o,Gx as p,xa as q,qc as r,n3 as s,G_ as t,Z_ as u,su as v,K_ as w,Vx as x,Ta as y};