agent-tower 0.7.0-beta.2 → 0.7.0-beta.3

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 (148) hide show
  1. package/dist/runtime/__tests__/acp-driver-lifecycle.test.js +295 -1
  2. package/dist/runtime/__tests__/acp-driver-lifecycle.test.js.map +1 -1
  3. package/dist/runtime/acp/acp-driver.d.ts.map +1 -1
  4. package/dist/runtime/acp/acp-driver.js +152 -3
  5. package/dist/runtime/acp/acp-driver.js.map +1 -1
  6. package/dist/services/__tests__/conversation.service.test.js +126 -0
  7. package/dist/services/__tests__/conversation.service.test.js.map +1 -1
  8. package/dist/services/session-manager.d.ts.map +1 -1
  9. package/dist/services/session-manager.js +48 -1
  10. package/dist/services/session-manager.js.map +1 -1
  11. package/dist/web/assets/AgentDemoPage-Bz3RnDCN.js +1 -0
  12. package/dist/web/assets/{AgentEnvironmentSettingsPage-B571SLF5.js → AgentEnvironmentSettingsPage-CDWsry49.js} +1 -1
  13. package/dist/web/assets/{AgentLogo-VGcaaJum.js → AgentLogo-CRz3CfP5.js} +1 -1
  14. package/dist/web/assets/ConversationPage-U5VIw8hs.js +3 -0
  15. package/dist/web/assets/{CreateTaskInput-kkWy5nmc.js → CreateTaskInput-CX7_o02E.js} +1 -1
  16. package/dist/web/assets/{DemoPage-CpMV8Rv7.js → DemoPage-DwoVTSFm.js} +3 -3
  17. package/dist/web/assets/{GeneralSettingsPage-BvME4SJc.js → GeneralSettingsPage-CH7NW0Q1.js} +1 -1
  18. package/dist/web/assets/{Icons-DXzgw2xT.js → Icons-BsJUZk4z.js} +1 -1
  19. package/dist/web/assets/{LoadingPreviewPage-D6OzaV9-.js → LoadingPreviewPage-sN12whUD.js} +1 -1
  20. package/dist/web/assets/{McpSettingsPage-CCWuZ-IU.js → McpSettingsPage-D6dQVSij.js} +1 -1
  21. package/dist/web/assets/{MemberAvatar-DeKYSBH9.js → MemberAvatar-0z2Vg7fM.js} +1 -1
  22. package/dist/web/assets/{NotificationSettingsPage-BOhJqIXv.js → NotificationSettingsPage-Zzsus8n0.js} +1 -1
  23. package/dist/web/assets/ProfileSettingsPage-Ck5bJV8U.js +3 -0
  24. package/dist/web/assets/{ProjectKanbanPage-Ka243_RU.js → ProjectKanbanPage-Dy1q4F4o.js} +31 -31
  25. package/dist/web/assets/ProjectSettingsPage-CG599xXR.js +2 -0
  26. package/dist/web/assets/{ProviderSettingsPage-BCXTXcbc.js → ProviderSettingsPage-DI8pXhJO.js} +2 -2
  27. package/dist/web/assets/SettingsMasterDetail-BgUcVoVU.js +1 -0
  28. package/dist/web/assets/TeamSettingsPage-CQYgBktd.js +1 -0
  29. package/dist/web/assets/{arc-Bl7tPfS7.js → arc-C0TZ2Mr-.js} +1 -1
  30. package/dist/web/assets/{architectureDiagram-3BPJPVTR-CoP7qomY.js → architectureDiagram-3BPJPVTR-BfAyZiaB.js} +1 -1
  31. package/dist/web/assets/{blockDiagram-GPEHLZMM-Dyj3wCtX.js → blockDiagram-GPEHLZMM-Bw4bLBtW.js} +1 -1
  32. package/dist/web/assets/{c4Diagram-AAUBKEIU-BHpYwHH5.js → c4Diagram-AAUBKEIU-DJxag49S.js} +1 -1
  33. package/dist/web/assets/channel-Rd2UMQwz.js +1 -0
  34. package/dist/web/assets/check-BVfJOKK5.js +1 -0
  35. package/dist/web/assets/{chevron-down-B8PIP1yU.js → chevron-down-gt857XmZ.js} +1 -1
  36. package/dist/web/assets/{chevron-right-h-JkCAHM.js → chevron-right-Dn5EL2Lm.js} +1 -1
  37. package/dist/web/assets/{chevron-up-C5SQd6qy.js → chevron-up-Dv5ThQH5.js} +1 -1
  38. package/dist/web/assets/{chunk-2J33WTMH--mm3IA_q.js → chunk-2J33WTMH-71tuZDDX.js} +1 -1
  39. package/dist/web/assets/{chunk-4BX2VUAB-DSTjg6vT.js → chunk-4BX2VUAB-CJ5SCvua.js} +1 -1
  40. package/dist/web/assets/{chunk-55IACEB6-BMI8DRl6.js → chunk-55IACEB6-D3qUQw2o.js} +1 -1
  41. package/dist/web/assets/{chunk-727SXJPM-DB6yt8nI.js → chunk-727SXJPM-e-4CtmqG.js} +1 -1
  42. package/dist/web/assets/{chunk-AQP2D5EJ-BMFO2BIQ.js → chunk-AQP2D5EJ-bktXIBYA.js} +1 -1
  43. package/dist/web/assets/{chunk-FMBD7UC4-BWW53Tgv.js → chunk-FMBD7UC4--QBxBR_l.js} +1 -1
  44. package/dist/web/assets/{chunk-ND2GUHAM-3Q1rz4Rn.js → chunk-ND2GUHAM-D6p_CtQB.js} +1 -1
  45. package/dist/web/assets/{chunk-QZHKN3VN-DHZfBhTv.js → chunk-QZHKN3VN-DxmZnnse.js} +1 -1
  46. package/dist/web/assets/{circle-alert-B2WJJFVc.js → circle-alert-BeGGmA-3.js} +1 -1
  47. package/dist/web/assets/classDiagram-4FO5ZUOK-Dv78yDSv.js +1 -0
  48. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Dv78yDSv.js +1 -0
  49. package/dist/web/assets/{code-block-OCS4YCEC-DAvNvPo_.js → code-block-OCS4YCEC-1KMwkqn9.js} +1 -1
  50. package/dist/web/assets/{confirm-dialog-59aNupkb.js → confirm-dialog-CMtca90c.js} +1 -1
  51. package/dist/web/assets/{cose-bilkent-S5V4N54A-BkBXPAOW.js → cose-bilkent-S5V4N54A-CKIKijp7.js} +1 -1
  52. package/dist/web/assets/cssMode-D8Dg9C1q.js +1 -0
  53. package/dist/web/assets/{dagre-BM42HDAG-0o3tAN58.js → dagre-BM42HDAG-jag-rU-a.js} +1 -1
  54. package/dist/web/assets/{diagram-2AECGRRQ-BaozWVAC.js → diagram-2AECGRRQ-DlSUMPBb.js} +1 -1
  55. package/dist/web/assets/{diagram-5GNKFQAL-BQGxsEX-.js → diagram-5GNKFQAL-gJzBEa1h.js} +1 -1
  56. package/dist/web/assets/{diagram-KO2AKTUF-BhOfCrvE.js → diagram-KO2AKTUF-CK-dl0Mm.js} +1 -1
  57. package/dist/web/assets/{diagram-LMA3HP47-1C0Ajian.js → diagram-LMA3HP47-nd0QxqLP.js} +1 -1
  58. package/dist/web/assets/{diagram-OG6HWLK6-BZsvylQi.js → diagram-OG6HWLK6-0UCe4OEH.js} +1 -1
  59. package/dist/web/assets/{erDiagram-TEJ5UH35-BODPoCQX.js → erDiagram-TEJ5UH35-DwJFF8MD.js} +1 -1
  60. package/dist/web/assets/{flowDiagram-I6XJVG4X-B0BsMsro.js → flowDiagram-I6XJVG4X-DJGfuTg-.js} +1 -1
  61. package/dist/web/assets/{folder-picker-B5RdK3CX.js → folder-picker-AfAde06M.js} +1 -1
  62. package/dist/web/assets/{freemarker2-B62GnwxO.js → freemarker2-ByNQbhxB.js} +2 -2
  63. package/dist/web/assets/{ganttDiagram-6RSMTGT7-BsXOoMru.js → ganttDiagram-6RSMTGT7-C6zNqsn4.js} +1 -1
  64. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DVuq4oVA.js → gitGraphDiagram-PVQCEYII-CAkDPCOB.js} +1 -1
  65. package/dist/web/assets/handlebars-9LtiNcLO.js +1 -0
  66. package/dist/web/assets/html-BwSL2qe7.js +1 -0
  67. package/dist/web/assets/htmlMode-0mfuF13e.js +1 -0
  68. package/dist/web/assets/{index-DfRNL5pP.js → index-B5PmQdbq.js} +4 -4
  69. package/dist/web/assets/index-CBhC80Wq.js +122 -0
  70. package/dist/web/assets/index-CxCjROy9.css +1 -0
  71. package/dist/web/assets/{infoDiagram-5YYISTIA-CkI-s2fN.js → infoDiagram-5YYISTIA-DJylJYHq.js} +1 -1
  72. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DExbu0jt.js → ishikawaDiagram-YF4QCWOH-Da6zdjFO.js} +1 -1
  73. package/dist/web/assets/javascript-CJNcoLqd.js +1 -0
  74. package/dist/web/assets/{journeyDiagram-JHISSGLW-C03_8hib.js → journeyDiagram-JHISSGLW-DrjNy1ij.js} +1 -1
  75. package/dist/web/assets/{jsonMode-SxmrKu-q.js → jsonMode-BEBKjViV.js} +4 -4
  76. package/dist/web/assets/{kanban-definition-UN3LZRKU-CkQ5JqTm.js → kanban-definition-UN3LZRKU-DNc4IquB.js} +1 -1
  77. package/dist/web/assets/{layers-DVjF8vaY.js → layers-CPYZanud.js} +1 -1
  78. package/dist/web/assets/{linear-VXyesiU2.js → linear-BsMeiiUP.js} +1 -1
  79. package/dist/web/assets/liquid-BZSJkIo-.js +1 -0
  80. package/dist/web/assets/{lspLanguageFeatures-D46XQnYj.js → lspLanguageFeatures-u5EzjXi-.js} +1 -1
  81. package/dist/web/assets/mdx-Bjp1I9VZ.js +1 -0
  82. package/dist/web/assets/{mermaid-NOHMQCX5-Cxj8y3xL.js → mermaid-NOHMQCX5-juygW0p8.js} +65 -66
  83. package/dist/web/assets/{message-square-BleDaJqD.js → message-square-DMhmeoQR.js} +1 -1
  84. package/dist/web/assets/{mindmap-definition-RKZ34NQL-OB13sryT.js → mindmap-definition-RKZ34NQL-BZTf4eUu.js} +1 -1
  85. package/dist/web/assets/{modal-DCycqy3L.js → modal-DdlXdmPL.js} +1 -1
  86. package/dist/web/assets/{monaco-C5uCiSc1.js → monaco-B4gWh5LA.js} +3 -3
  87. package/dist/web/assets/{pencil-7Lu7CiFO.js → pencil-BQnPUnRD.js} +1 -1
  88. package/dist/web/assets/{pieDiagram-4H26LBE5-CU-pnTSj.js → pieDiagram-4H26LBE5-DmYvE5xK.js} +1 -1
  89. package/dist/web/assets/python-B32s9JOZ.js +1 -0
  90. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-yZ7s-n8V.js → quadrantDiagram-W4KKPZXB-Clc4Is7S.js} +1 -1
  91. package/dist/web/assets/razor-81IfaByI.js +1 -0
  92. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B0anLb96.js → requirementDiagram-4Y6WPE33-DYAvCl67.js} +1 -1
  93. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-DHcV9eve.js → sankeyDiagram-5OEKKPKP-BE8zoPb1.js} +1 -1
  94. package/dist/web/assets/{select-EnAkHFwg.js → select-CifNrwRy.js} +1 -1
  95. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DqgRRD9W.js → sequenceDiagram-3UESZ5HK-CZ-1XEig.js} +1 -1
  96. package/dist/web/assets/{server-a_4ZRCwE.js → server-DIU8iWhx.js} +1 -1
  97. package/dist/web/assets/{stateDiagram-AJRCARHV-BM_vAe4X.js → stateDiagram-AJRCARHV-BwL5WvW1.js} +1 -1
  98. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-By_Z6bpf.js +1 -0
  99. package/dist/web/assets/{switch-D_UoJD1K.js → switch-C2P_p2lg.js} +1 -1
  100. package/dist/web/assets/{textarea-Cmy7-X_E.js → textarea-7PW0aHOr.js} +1 -1
  101. package/dist/web/assets/{timeline-definition-PNZ67QCA-BRstBzgi.js → timeline-definition-PNZ67QCA-CJFGlrxn.js} +1 -1
  102. package/dist/web/assets/{trash-2-0UA8zJ8I.js → trash-2-BoBBdVYu.js} +1 -1
  103. package/dist/web/assets/{tsMode-BASXySxT.js → tsMode-5BiN2VdS.js} +2 -2
  104. package/dist/web/assets/typescript-B3ZemQIx.js +1 -0
  105. package/dist/web/assets/{upload-CfzBeWxL.js → upload-BGixJJOY.js} +1 -1
  106. package/dist/web/assets/{use-profiles-MVQfFrhT.js → use-profiles-DcSLdHYE.js} +1 -1
  107. package/dist/web/assets/{use-projects-CJ8Wn6Xl.js → use-projects-CnaCjQj2.js} +1 -1
  108. package/dist/web/assets/{use-providers-DvV0mdqo.js → use-providers-BOBu75PJ.js} +1 -1
  109. package/dist/web/assets/useNormalizedLogs-DU1I1PCJ.js +1 -0
  110. package/dist/web/assets/{vennDiagram-CIIHVFJN-DzhupKpF.js → vennDiagram-CIIHVFJN-BC6dMCwh.js} +1 -1
  111. package/dist/web/assets/{wardley-L42UT6IY-BwWhS3dk.js → wardley-L42UT6IY--kwEwWxY.js} +1 -1
  112. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-iG6xXnIJ.js → wardleyDiagram-YWT4CUSO-B75j5BO3.js} +1 -1
  113. package/dist/web/assets/xml-CyF6O2wF.js +1 -0
  114. package/dist/web/assets/{xychartDiagram-2RQKCTM6-hgKK9aU8.js → xychartDiagram-2RQKCTM6-DumRqRWt.js} +1 -1
  115. package/dist/web/assets/yaml-i8UwSbhD.js +1 -0
  116. package/dist/web/index.html +2 -2
  117. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts +4 -1
  118. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts.map +1 -1
  119. package/node_modules/@agent-tower/shared/dist/log-adapter.js +38 -5
  120. package/node_modules/@agent-tower/shared/dist/log-adapter.js.map +1 -1
  121. package/package.json +1 -1
  122. package/dist/web/assets/AgentDemoPage-DP9u0ylA.js +0 -1
  123. package/dist/web/assets/ConversationPage-CbMlQ5UC.js +0 -3
  124. package/dist/web/assets/ProfileSettingsPage-BEMuDjhF.js +0 -3
  125. package/dist/web/assets/ProjectSettingsPage-sE0Thu7d.js +0 -2
  126. package/dist/web/assets/SettingsMasterDetail-DmqYixrL.js +0 -1
  127. package/dist/web/assets/TeamSettingsPage-Dxk7-1fD.js +0 -1
  128. package/dist/web/assets/arrow-left-4_9exfZH.js +0 -1
  129. package/dist/web/assets/channel-D6ei4By-.js +0 -1
  130. package/dist/web/assets/check-CIGH6GLr.js +0 -1
  131. package/dist/web/assets/classDiagram-4FO5ZUOK-Dy0gEbpJ.js +0 -1
  132. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Dy0gEbpJ.js +0 -1
  133. package/dist/web/assets/cssMode-r4PsUEeI.js +0 -1
  134. package/dist/web/assets/handlebars-BBm4KBDp.js +0 -1
  135. package/dist/web/assets/html-BlMJourI.js +0 -1
  136. package/dist/web/assets/htmlMode-vGjPTlal.js +0 -1
  137. package/dist/web/assets/index-BziFEuBL.js +0 -122
  138. package/dist/web/assets/index-KjsBZlkg.css +0 -1
  139. package/dist/web/assets/javascript-CnnNs3bZ.js +0 -1
  140. package/dist/web/assets/liquid-B_CJMcDS.js +0 -1
  141. package/dist/web/assets/mdx-B2i6poYS.js +0 -1
  142. package/dist/web/assets/python-CdqaVxbU.js +0 -1
  143. package/dist/web/assets/razor-BZtfxDHk.js +0 -1
  144. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DXSW0BBn.js +0 -1
  145. package/dist/web/assets/typescript-DbOfWuuq.js +0 -1
  146. package/dist/web/assets/useNormalizedLogs-D8-yjxOI.js +0 -1
  147. package/dist/web/assets/xml-Dn2Ep0JI.js +0 -1
  148. package/dist/web/assets/yaml-CA2Cgl3R.js +0 -1
@@ -1,84 +1,84 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-DAvNvPo_.js","assets/index-BziFEuBL.js","assets/index-KjsBZlkg.css","assets/chevron-right-h-JkCAHM.js","assets/chevron-down-B8PIP1yU.js","assets/index-DfRNL5pP.js"])))=>i.map(i=>d[i]);
2
- import{k as Ii,r as A,z as Wc,ab as Au,j as m,aL as Vc,aM as Gc,ay as Ni,O as kt,l as ar,u as ur,ac as Kc,P as Qc,X as Xc,m as Zc,p as Jc,aN as eh}from"./index-BziFEuBL.js";import{C as yn}from"./chevron-right-h-JkCAHM.js";import{C as yu}from"./chevron-down-B8PIP1yU.js";const th=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]],nh=Ii("chart-no-axes-combined",th);const rh=[["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"}]],ih=Ii("file-text",rh);const sh=[["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"}]],ah=Ii("image",sh);var ks;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(ks||(ks={}));var As;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(As||(As={}));var ys;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(ys||(ys={}));var Y;(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",e.DEEPSEEK_HERMES="DEEPSEEK_HERMES"})(Y||(Y={}));var xe;(function(e){e.CLI="CLI",e.ACP="ACP"})(xe||(xe={}));var Cs;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(Cs||(Cs={}));var Is;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(Is||(Is={}));var Ns;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(Ns||(Ns={}));var Ss;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(Ss||(Ss={}));var ee;(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"})(ee||(ee={}));function uh(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"},s=e.metadata?.toolKind?t:n?i[n]:t;return r==="success"?`${s} ✓`:r==="failed"?`${s} ✗`:r==="pending_approval"?`${s} (待审批)`:s}function oh(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,timestamp:e.timestamp,type:ee.User,content:e.content};case"assistant_message":return{id:e.id,timestamp:e.timestamp,type:ee.Assistant,content:e.content};case"next_action":return{id:e.id,timestamp:e.timestamp,type:ee.Action,content:e.content};case"thinking":return{id:e.id,timestamp:e.timestamp,type:ee.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,timestamp:e.timestamp,type:ee.Tool,title:uh(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:ee.Error,content:e.content};case"warning_message":return{id:e.id,timestamp:e.timestamp,type:ee.Warning,content:e.content};case"system_message":return{id:e.id,timestamp:e.timestamp,type:ee.Info,content:e.content};case"loading":return{id:e.id,timestamp:e.timestamp,type:ee.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:ee.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function wk(e){return e.map(oh).filter(t=>t!==null)}function Ok(e){return{id:`cursor-${Date.now()}`,timestamp:e?.processingStartedAt??Date.now(),type:ee.Cursor,content:"",cursorActivity:e}}const lh=["oss","ollama","lmstudio","amazon-bedrock"];function Lk(e){return lh.includes(e)}const Rk={[Y.CLAUDE_CODE]:{agentType:Y.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"},[Y.CODEX]:{agentType:Y.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"},fastMode:{kind:"config",path:"fastMode"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[Y.GEMINI_CLI]:{agentType:Y.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"}},[Y.CURSOR_AGENT]:{agentType:Y.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[Y.QWEN_CODE]:{agentType:Y.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"}},[Y.KIRO_CLI]:{agentType:Y.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"}},[Y.OPENCODE]:{agentType:Y.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"}},[Y.PI_CODING_AGENT]:{agentType:Y.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"}},[Y.GROK_BUILD]:{agentType:Y.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"}},[Y.MINION_CODE]:{agentType:Y.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.DEEPSEEK_HERMES]:{agentType:Y.DEEPSEEK_HERMES,apiBaseUrl:{kind:"env",path:"DEEPSEEK_BASE_URL",placeholder:"https://api.deepseek.com"},apiKey:{kind:"env",path:"DEEPSEEK_API_KEY"},model:{kind:"config",path:"model",placeholder:"deepseek-v4-pro"},reasoningEffort:{kind:"config",path:"effort",options:["off","low","high","max"]},executionPermission:{kind:"config",riskKind:"auto-approve"}}},Dk={[Y.CLAUDE_CODE]:[xe.CLI,xe.ACP],[Y.GEMINI_CLI]:[xe.CLI,xe.ACP],[Y.CURSOR_AGENT]:[xe.CLI,xe.ACP],[Y.CODEX]:[xe.CLI,xe.ACP],[Y.QWEN_CODE]:[xe.ACP],[Y.KIRO_CLI]:[xe.ACP],[Y.OPENCODE]:[xe.ACP],[Y.PI_CODING_AGENT]:[xe.ACP],[Y.GROK_BUILD]:[xe.ACP],[Y.MINION_CODE]:[xe.ACP],[Y.DEEPSEEK_HERMES]:[xe.ACP]},ch=Object.freeze(Object.values(Y).filter(e=>e!==Y.MINION_CODE));new Set(ch);const hh=/^[ \t]{0,3}::agent-download\{file="([^"\r\n]+)"\}[ \t]*$/,dh=/^[a-zA-Z]:[\\/]/,fh=1024;function Cu(e){if(!e||e.length>fh||e!==e.trim()||e.includes("\\")||/[\0-\x1f\x7f]/.test(e)||e.startsWith("/")||dh.test(e))return null;const t=e.split("/");return t.some(n=>!n||n==="."||n==="..")?null:t.join("/")}function ph(e){const t=e.match(hh);return t?Cu(t[1]):null}function Ot(e,t,n){let r=n.initialDeps??[],i,s=!0;function a(){var u,o,c;let h;n.key&&((u=n.debug)!=null&&u.call(n))&&(h=Date.now());const d=e();if(!(d.length!==r.length||d.some((E,k)=>r[k]!==E)))return i;r=d;let p;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(p=Date.now()),i=t(...d),n.key&&((c=n.debug)!=null&&c.call(n))){const E=Math.round((Date.now()-h)*100)/100,k=Math.round((Date.now()-p)*100)/100,I=k/16,y=(w,L)=>{for(w=String(w);w.length<L;)w=" "+w;return w};console.info(`%c⏱ ${y(k,5)} /${y(E,5)} ms`,`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-1KMwkqn9.js","assets/index-CBhC80Wq.js","assets/index-CxCjROy9.css","assets/chevron-right-Dn5EL2Lm.js","assets/chevron-down-gt857XmZ.js","assets/index-B5PmQdbq.js"])))=>i.map(i=>d[i]);
2
+ import{k as bi,r as A,D as vc,ad as pu,j as p,aN as Bc,aO as Fc,aA as Ti,P as xt,l as ir,u as sr,ae as Hc,Q as Uc,X as jc,m as zc,p as $c,aP as Yc}from"./index-CBhC80Wq.js";import{C as kn}from"./chevron-right-Dn5EL2Lm.js";import{C as gu}from"./chevron-down-gt857XmZ.js";const qc=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]],Vc=bi("chart-no-axes-combined",qc);const Wc=[["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"}]],Gc=bi("file-text",Wc);const Kc=[["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=bi("image",Kc);var ds;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(ds||(ds={}));var fs;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(fs||(fs={}));var ms;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(ms||(ms={}));var Y;(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",e.DEEPSEEK_HERMES="DEEPSEEK_HERMES"})(Y||(Y={}));var Te;(function(e){e.CLI="CLI",e.ACP="ACP"})(Te||(Te={}));var ps;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(ps||(ps={}));var gs;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(gs||(gs={}));var Es;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(Es||(Es={}));var bs;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(bs||(bs={}));var ee;(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"})(ee||(ee={}));function Xc(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"},s=e.metadata?.toolKind?t:n?i[n]:t;return r==="success"?`${s} ✓`:r==="failed"?`${s} ✗`:r==="pending_approval"?`${s} (待审批)`:s}function Ts(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,timestamp:e.timestamp,type:ee.User,content:e.content};case"assistant_message":return{id:e.id,timestamp:e.timestamp,type:ee.Assistant,content:e.content};case"next_action":return{id:e.id,timestamp:e.timestamp,type:ee.Action,content:e.content};case"thinking":return{id:e.id,timestamp:e.timestamp,type:ee.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,timestamp:e.timestamp,type:ee.Tool,title:Xc(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:ee.Error,content:e.content};case"warning_message":return{id:e.id,timestamp:e.timestamp,type:ee.Warning,content:e.content};case"system_message":return{id:e.id,timestamp:e.timestamp,type:ee.Info,content:e.content};case"loading":return{id:e.id,timestamp:e.timestamp,type:ee.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:ee.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}const xs=new WeakMap;function Zc(e){if(typeof e!="object"||e===null)return Ts(e);const t=xs.get(e);if(t!==void 0)return t;const n=Ts(e);return xs.set(e,n),n}function h3(e){const t=[];for(const n of e){const r=Zc(n);r!==null&&t.push(r)}return t}function d3(e){return{id:`cursor-${Date.now()}`,timestamp:e?.processingStartedAt??Date.now(),type:ee.Cursor,content:"",cursorActivity:e}}const Jc=["oss","ollama","lmstudio","amazon-bedrock"];function f3(e){return Jc.includes(e)}const m3={[Y.CLAUDE_CODE]:{agentType:Y.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"},[Y.CODEX]:{agentType:Y.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"},fastMode:{kind:"config",path:"fastMode"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[Y.GEMINI_CLI]:{agentType:Y.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"}},[Y.CURSOR_AGENT]:{agentType:Y.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[Y.QWEN_CODE]:{agentType:Y.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"}},[Y.KIRO_CLI]:{agentType:Y.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"}},[Y.OPENCODE]:{agentType:Y.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"}},[Y.PI_CODING_AGENT]:{agentType:Y.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"}},[Y.GROK_BUILD]:{agentType:Y.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"}},[Y.MINION_CODE]:{agentType:Y.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.DEEPSEEK_HERMES]:{agentType:Y.DEEPSEEK_HERMES,apiBaseUrl:{kind:"env",path:"DEEPSEEK_BASE_URL",placeholder:"https://api.deepseek.com"},apiKey:{kind:"env",path:"DEEPSEEK_API_KEY"},model:{kind:"config",path:"model",placeholder:"deepseek-v4-pro"},reasoningEffort:{kind:"config",path:"effort",options:["off","low","high","max"]},executionPermission:{kind:"config",riskKind:"auto-approve"}}},p3={[Y.CLAUDE_CODE]:[Te.CLI,Te.ACP],[Y.GEMINI_CLI]:[Te.CLI,Te.ACP],[Y.CURSOR_AGENT]:[Te.CLI,Te.ACP],[Y.CODEX]:[Te.CLI,Te.ACP],[Y.QWEN_CODE]:[Te.ACP],[Y.KIRO_CLI]:[Te.ACP],[Y.OPENCODE]:[Te.ACP],[Y.PI_CODING_AGENT]:[Te.ACP],[Y.GROK_BUILD]:[Te.ACP],[Y.MINION_CODE]:[Te.ACP],[Y.DEEPSEEK_HERMES]:[Te.ACP]},eh=Object.freeze(Object.values(Y).filter(e=>e!==Y.MINION_CODE));new Set(eh);const th=/^[ \t]{0,3}::agent-download\{file="([^"\r\n]+)"\}[ \t]*$/,nh=/^[a-zA-Z]:[\\/]/,rh=1024;function Eu(e){if(!e||e.length>rh||e!==e.trim()||e.includes("\\")||/[\0-\x1f\x7f]/.test(e)||e.startsWith("/")||nh.test(e))return null;const t=e.split("/");return t.some(n=>!n||n==="."||n==="..")?null:t.join("/")}function ih(e){const t=e.match(th);return t?Eu(t[1]):null}function St(e,t,n){let r=n.initialDeps??[],i,s=!0;function a(){var u,o,c;let h;n.key&&((u=n.debug)!=null&&u.call(n))&&(h=Date.now());const d=e();if(!(d.length!==r.length||d.some((E,_)=>r[_]!==E)))return i;r=d;let m;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(m=Date.now()),i=t(...d),n.key&&((c=n.debug)!=null&&c.call(n))){const E=Math.round((Date.now()-h)*100)/100,_=Math.round((Date.now()-m)*100)/100,I=_/16,C=(w,O)=>{for(w=String(w);w.length<O;)w=" "+w;return w};console.info(`%c⏱ ${C(_,5)} /${C(E,5)} ms`,`
3
3
  font-size: .6rem;
4
4
  font-weight: bold;
5
- color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1,i}return a.updateDeps=u=>{r=u},a}function ws(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const mh=(e,t)=>Math.abs(e-t)<1.01,gh=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Os=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Eh=e=>e,bh=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},Th=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=a=>{const{width:u,height:o}=a;t({width:Math.round(u),height:Math.round(o)})};if(i(Os(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const u=()=>{const o=a[0];if(o?.borderBoxSize){const c=o.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(Os(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Ls={passive:!0},Rs=typeof window>"u"?!0:"onscrollend"in window,xh=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=e.options.useScrollendEvent&&Rs?()=>{}:gh(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=h=>()=>{const{horizontal:d,isRtl:f}=e.options;i=d?n.scrollLeft*(f&&-1||1):n.scrollTop,s(),t(i,h)},u=a(!0),o=a(!1);n.addEventListener("scroll",u,Ls);const c=e.options.useScrollendEvent&&Rs;return c&&n.addEventListener("scrollend",o,Ls),()=>{n.removeEventListener("scroll",u),c&&n.removeEventListener("scrollend",o)}},_h=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},kh=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;const a=e+t;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class Ah{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Eh,rangeExtractor:bh,onChange:()=>{},measureElement:_h,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=Ot(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,s=new Map;for(let a=r-1;a>=0;a--){const u=n[a];if(i.has(u.lane))continue;const o=s.get(u.lane);if(o==null||u.end>o.end?s.set(u.lane,u):u.end<o.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=Ot(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,i,s,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:u}),{key:!1}),this.getMeasurements=Ot(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:u},o)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,c),d=new Array(u).fill(void 0);for(let f=0;f<c;f++){const p=h[f];p&&(d[p.lane]=f)}for(let f=c;f<n;f++){const p=s(f),E=this.laneAssignments.get(f);let k,I;if(E!==void 0&&this.options.lanes>1){k=E;const F=d[k],z=F!==void 0?h[F]:void 0;I=z?z.end+this.options.gap:r+i}else{const F=this.options.lanes===1?h[f-1]:this.getFurthestMeasurement(h,f);I=F?F.end+this.options.gap:r+i,k=F?F.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,k)}const y=o.get(p),w=typeof y=="number"?y:this.options.estimateSize(f),L=I+w;h[f]={index:f,start:I,size:w,end:L,key:p,lane:k},d[k]=f}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ot(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>this.range=n.length>0&&r>0?yh({measurements:n,outerSize:r,scrollOffset:i,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ot(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const a=s.key,u=this.elementsCache.get(a);u!==n&&(u&&this.observer.unobserve(u),this.observer.observe(n),this.elementsCache.set(a,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,a=r-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,a,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ot(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const u=n[s],o=r[u];i.push(o)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return ws(r[Iu(0,r.length-1,i=>ws(r[i]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),a=this.getScrollOffset();if(r==="auto")if(i.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const u=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,r,i.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let s=0;const a=10,u=c=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(n,c);if(!h){console.warn("Failed to get offset for index:",n);return}const[d,f]=h;this._scrollToOffset(d,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==n)return;const E=this.getScrollOffset(),k=this.getOffsetForIndex(n,f);if(!k){console.warn("Failed to get offset for index:",n);return}mh(k[0],E)||o(f)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},o=c=>{this.targetWindow&&this.currentScrollToIndex===n&&(s++,s<a?this.targetWindow.requestAnimationFrame(()=>u(c)):console.warn(`Failed to scroll to index ${n} after ${a} attempts.`))};u(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=r[r.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(u=>u===null);){const u=r[a];s[u.lane]===null&&(s[u.lane]=u.end),a--}i=Math.max(...s.filter(u=>u!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Iu=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else if(s>r)t=i-1;else return i}return e>0?e-1:0};function yh({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,s=o=>e[o].start;if(e.length<=r)return{startIndex:0,endIndex:i};let a=Iu(0,i,s,n),u=a;if(r===1)for(;u<i&&e[u].end<n+t;)u++;else if(r>1){const o=Array(r).fill(0);for(;u<i&&o.some(h=>h<n+t);){const h=e[u];o[h.lane]=h.end,u++}const c=Array(r).fill(n+t);for(;a>=0&&c.some(h=>h>=n);){const h=e[a];c[h.lane]=h.start,a--}a=Math.max(0,a-a%r),u=Math.min(i,u+(r-1-u%r))}return{startIndex:a,endIndex:u}}const Ds=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Ch({useFlushSync:e=!0,...t}){const n=A.useReducer(()=>({}),{})[1],r={...t,onChange:(s,a)=>{var u;e&&a?Wc.flushSync(n):n(),(u=t.onChange)==null||u.call(t,s,a)}},[i]=A.useState(()=>new Ah(r));return i.setOptions(r),Ds(()=>i._didMount(),[]),Ds(()=>i._willUpdate()),i}function Ih(e){return Ch({observeElementRect:Th,observeElementOffset:xh,scrollToFn:kh,...e})}function Nh(e,t,n){const r=n,i=r.getScrollOffset()+r.scrollAdjustments;return e.end+t<=i}const or=(function(e){if(e==null)return Lh;if(typeof e=="function")return lr(e);if(typeof e=="object")return Array.isArray(e)?Sh(e):wh(e);if(typeof e=="string")return Oh(e);throw new Error("Expected function, string, or object as test")});function Sh(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=or(e[n]);return lr(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function wh(e){const t=e;return lr(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Oh(e){return lr(t);function t(n){return n&&n.type===e}}function lr(e){return t;function t(n,r,i){return!!(Rh(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Lh(){return!0}function Rh(e){return e!==null&&typeof e=="object"&&"type"in e}const Nu=[],nn=!0,Gr=!1,Gn="skip";function Si(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=or(i),a=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 p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Nu,E,k,I;if((!t||s(o,c,h[h.length-1]||void 0))&&(p=Dh(n(o,h)),p[0]===Gr))return p;if("children"in o&&o.children){const y=o;if(y.children&&p[0]!==Gn)for(k=(r?y.children.length:-1)+a,I=h.concat(y);k>-1&&k<y.children.length;){const w=y.children[k];if(E=u(w,k,I)(),E[0]===Gr)return E;k=typeof E[1]=="number"?E[1]:k+a}}return p}}}function Dh(e){return Array.isArray(e)?e:typeof e=="number"?[nn,e]:e==null?Nu:[e]}function at(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Si(e,s,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return a(o,d,h)}}function Ph({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="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=Fh(e,t,n,r,i,s,a);at(c,h)}}function Ps(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 vh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Mh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Bh=new Set(["javascript:","data:","file:","vbscript:"]);function vs(e,t,n,r=!1,i=!1,s=[]){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 a=Ps(e,n);if(!a||Bh.has(a.protocol)||!(Mh.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const o=vh(e);return a&&t.some(c=>{const h=Ps(c,n);return!h||h.origin!==a.origin?!1:a.href.startsWith(h.href)})?o?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:o?a.pathname+a.search+a.hash:a.href:null}const Cr=Symbol("node-seen"),Fh=(e,t,n,r,i,s,a)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Cr])return nn;if(o.tagName==="a"){const d=vs(o.properties.href,t,e,!1,!1,i);return d===null?(o[Cr]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:a},children:[...o.children,{type:"text",value:" [blocked]"}]}),Gn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",nn)}if(o.tagName==="img"){const d=vs(o.properties.src,n,e,r,!0,i);return d===null?(o[Cr]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:s},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Gn):(o.properties.src=d,nn)}return nn};return u},Su=-1,cr=0,an=1,Kn=2,wi=3,Oi=4,Li=5,Ri=6,wu=7,Ou=8,Ms=typeof self=="object"?self:globalThis,Hh=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case cr:case Su:return n(a,i);case an:{const u=n([],i);for(const o of a)u.push(r(o));return u}case Kn:{const u=n({},i);for(const[o,c]of a)u[r(o)]=r(c);return u}case wi:return n(new Date(a),i);case Oi:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case Li:{const u=n(new Map,i);for(const[o,c]of a)u.set(r(o),r(c));return u}case Ri:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case wu:{const{name:u,message:o}=a;return n(new Ms[u](o),i)}case Ou:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Ms[s](a),i)};return r},Bs=e=>Hh(new Map,e)(0),Lt="",{toString:Uh}={},{keys:jh}=Object,Gt=e=>{const t=typeof e;if(t!=="object"||!e)return[cr,t];const n=Uh.call(e).slice(8,-1);switch(n){case"Array":return[an,Lt];case"Object":return[Kn,Lt];case"Date":return[wi,Lt];case"RegExp":return[Oi,Lt];case"Map":return[Li,Lt];case"Set":return[Ri,Lt];case"DataView":return[an,n]}return n.includes("Array")?[an,n]:n.includes("Error")?[wu,n]:[Kn,n]},Pn=([e,t])=>e===cr&&(t==="function"||t==="symbol"),zh=(e,t,n,r)=>{const i=(a,u)=>{const o=r.push(a)-1;return n.set(u,o),o},s=a=>{if(n.has(a))return n.get(a);let[u,o]=Gt(a);switch(u){case cr:{let h=a;switch(o){case"bigint":u=Ou,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([Su],a)}return i([u,h],a)}case an:{if(o){let f=a;return o==="DataView"?f=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(a)),i([o,[...f]],a)}const h=[],d=i([u,h],a);for(const f of a)h.push(s(f));return d}case Kn:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],d=i([u,h],a);for(const f of jh(a))(e||!Pn(Gt(a[f])))&&h.push([s(f),s(a[f])]);return d}case wi:return i([u,a.toISOString()],a);case Oi:{const{source:h,flags:d}=a;return i([u,{source:h,flags:d}],a)}case Li:{const h=[],d=i([u,h],a);for(const[f,p]of a)(e||!(Pn(Gt(f))||Pn(Gt(p))))&&h.push([s(f),s(p)]);return d}case Ri:{const h=[],d=i([u,h],a);for(const f of a)(e||!Pn(Gt(f)))&&h.push(s(f));return d}}const{message:c}=a;return i([u,{name:o,message:c}],a)};return s},Fs=(e,{json:t,lossy:n}={})=>{const r=[];return zh(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bs(Fs(e,t)):structuredClone(e):(e,t)=>Bs(Fs(e,t));class Cn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cn.prototype.normal={};Cn.prototype.property={};Cn.prototype.space=void 0;function Lu(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Cn(n,r,t)}function bn(e){return e.toLowerCase()}class we{constructor(t,n){this.attribute=n,this.property=t}}we.prototype.attribute="";we.prototype.booleanish=!1;we.prototype.boolean=!1;we.prototype.commaOrSpaceSeparated=!1;we.prototype.commaSeparated=!1;we.prototype.defined=!1;we.prototype.mustUseProperty=!1;we.prototype.number=!1;we.prototype.overloadedBoolean=!1;we.prototype.property="";we.prototype.spaceSeparated=!1;we.prototype.space=void 0;let $h=0;const J=At(),ge=At(),Kr=At(),M=At(),he=At(),Mt=At(),Re=At();function At(){return 2**++$h}const Qr=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:ge,commaOrSpaceSeparated:Re,commaSeparated:Mt,number:M,overloadedBoolean:Kr,spaceSeparated:he},Symbol.toStringTag,{value:"Module"})),Ir=Object.keys(Qr);class Di extends we{constructor(t,n,r,i){let s=-1;if(super(t,n),Hs(this,"space",i),typeof r=="number")for(;++s<Ir.length;){const a=Ir[s];Hs(this,Ir[s],(r&Qr[a])===Qr[a])}}}Di.prototype.defined=!0;function Hs(e,t,n){n&&(e[t]=n)}function Ut(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Di(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[bn(r)]=r,n[bn(s.attribute)]=r}return new Cn(t,n,e.space)}const Ru=Ut({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:he,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:M,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:he,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:ge,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 Du(e,t){return t in e?e[t]:t}function Pu(e,t){return Du(e,t.toLowerCase())}const Yh=Ut({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mt,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:he,autoFocus:J,autoPlay:J,blocking:he,capture:null,charSet:null,checked:J,cite:null,className:he,cols:M,colSpan:null,content:null,contentEditable:ge,controls:J,controlsList:he,coords:M|Mt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:Kr,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:he,height:M,hidden:Kr,high:M,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:he,itemRef:he,itemScope:J,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:M,pattern:null,ping:he,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:he,required:J,reversed:J,rows:M,rowSpan:M,sandbox:he,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:ge,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:J,useMap:null,value:ge,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:he,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:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:ge,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:J,disableRemotePlayback:J,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:Pu}),qh=Ut({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:he,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:J,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:Mt,g2:Mt,glyphName:Mt,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:he,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:Du}),vu=Ut({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()}}),Mu=Ut({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Pu}),Bu=Ut({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Wh={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"},Vh=/[A-Z]/g,Us=/-[a-z]/g,Gh=/^data[-\w.:]+$/i;function hr(e,t){const n=bn(t);let r=t,i=we;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 s=t.slice(5).replace(Us,Qh);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Us.test(s)){let a=s.replace(Vh,Kh);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Di}return new i(r,t)}function Kh(e){return"-"+e.toLowerCase()}function Qh(e){return e.charAt(1).toUpperCase()}const In=Lu([Ru,Yh,vu,Mu,Bu],"html"),ot=Lu([Ru,qh,vu,Mu,Bu],"svg");function js(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Fu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zs=/[#.]/g;function Xh(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){zs.lastIndex=i;const u=zs.exec(n),o=n.slice(i,u?u.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function $s(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hu(e){return e.join(" ").trim()}function Uu(e,t,n){const r=n?td(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const c=a;u.unshift(c)}else{o=Xh(s,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Zh(a))u.unshift(a);else for(const[d,f]of Object.entries(a))Jh(e,o.properties,d,f)}for(const c of u)Xr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Zh(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Jh(e,t,n,r){const i=hr(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=$s(r):i.commaSeparated?s=js(r):i.commaOrSpaceSeparated?s=$s(js(r).join(" ")):s=Ys(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?ed(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(Ys(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Xr(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)Xr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ys(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bn(n)===bn(t)))return!0}return n}function ed(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function td(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const nd=["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"],rd=Uu(In,"div"),id=Uu(ot,"g",nd);function sd(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let u=n[a];if(u===void 0){const o=qs(t,n[a-1]);u=o===-1?t.length+1:o+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],o=qs(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function qs(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
6
- `,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/"},ju={}.hasOwnProperty,ad=Object.prototype;function ud(e,t){const n=t||{};return Pi({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:In,verbose:n.verbose||!1},e)}function Pi(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:zu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=sd(s),u=a.toPoint(0),o=a.toPoint(s.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=od(e,t),n}}function zu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Pi(e,t[n]);r.push(i)}return r}function od(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?ot:In;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;ju.call(ad,o)||(i[o]=u.value)}const a=(e.schema.space==="svg"?id:rd)(t.tagName,i,zu(e,t.childNodes));if($n(e,t,a),a.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Pt(o.startTag),h=o&&o.endTag&&Pt(o.endTag),d=Pi(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),a.content=d}return e.schema=n,a}function $n(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ld(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ld(e,t,n){const r=Pt(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 s={};let a;if(n.attrs)for(a in n.attrs)ju.call(n.attrs,a)&&(s[hr(e.schema,a).property]=Pt(n.attrs[a]));n.startTag;const u=Pt(n.startTag),o=n.endTag?Pt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=s,t.data={position:c}}}return r}function Pt(e){const t=Ws({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ws({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ws(e){return e.line&&e.column?e:void 0}const Vs={}.hasOwnProperty;function $u(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&Vs.call(i,e)){const o=String(i[e]);a=Vs.call(u,o)?u[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const cd={},hd={}.hasOwnProperty,Yu=$u("type",{handlers:{root:fd,element:bd,text:gd,comment:Ed,doctype:md}});function dd(e,t){const r=(t||cd).space;return Yu(e,r==="svg"?ot:In)}function fd(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=vi(e.children,n,t),jt(e,n),n}function pd(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=vi(e.children,n,t),jt(e,n),n}function md(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return jt(e,t),t}function gd(e){const t={nodeName:"#text",value:e.value,parentNode:null};return jt(e,t),t}function Ed(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return jt(e,t),t}function bd(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&hd.call(e.properties,s)){const o=Td(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[a],childNodes:[],parentNode:null};return u.childNodes=vi(e.children,u,r),jt(e,u),e.tagName==="template"&&e.content&&(u.content=pd(e.content,r)),u}function Td(e,t,n){const r=hr(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?Fu(n):Hu(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=mt[r.space]}return i}function vi(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=Yu(e[r],n);s.parentNode=t,i.push(s)}return i}function jt(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 xd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_d=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]),de="�";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 qu(e){return e>=55296&&e<=57343}function kd(e){return e>=56320&&e<=57343}function Ad(e,t){return(e-55296)*1024+9216+t}function Wu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Vu(e){return e>=64976&&e<=65007||_d.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 yd=65536;class Cd{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=yd,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:s}=this,a=i+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(kd(n))return this.pos++,this._addGap(),Ad(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,qu(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){Wu(t)?this._err(S.controlCharacterInInputStream):Vu(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 te;(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"})(te||(te={}));function Gu(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 Id=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))),Nd=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 Sd(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Nd.get(e))!==null&&t!==void 0?t:e}var be;(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"})(be||(be={}));const wd=32;var st;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(st||(st={}));function Zr(e){return e>=be.ZERO&&e<=be.NINE}function Od(e){return e>=be.UPPER_A&&e<=be.UPPER_F||e>=be.LOWER_A&&e<=be.LOWER_F}function Ld(e){return e>=be.UPPER_A&&e<=be.UPPER_Z||e>=be.LOWER_A&&e<=be.LOWER_Z||Zr(e)}function Rd(e){return e===be.EQUALS||Ld(e)}var Ee;(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"})(Ee||(Ee={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class Dd{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===be.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|wd)===be.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Zr(i)||Od(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(Zr(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===be.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(Sd(this.result),this.consumed),this.errors&&(t!==be.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&st.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Pd(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(s===0||Rd(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&st.VALUE_LENGTH)>>14,s!==0){if(a===be.SEMI)return this.emitNamedEntityData(this.treeIndex,s,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]&st.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]&~st.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Pd(e,t,n,r){const i=(t&st.BRANCH_LENGTH)>>7,s=t&st.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:e[n+o]-1}let a=n,u=a+i-1;for(;a<=u;){const o=a+u>>>1,c=e[o];if(c<r)a=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 ve;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ve||(ve={}));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 vd=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 zt(e){var t;return(t=vd.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,Md={[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},Jr=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 me={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function Bd(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function rn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Fd(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function nt(e){return Fd(e)||rn(e)}function Gs(e){return nt(e)||Bd(e)}function vn(e){return e+32}function Ku(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Ks(e){return Ku(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function Hd(e){return e===g.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:qu(e)?S.surrogateCharacterReference:Vu(e)?S.noncharacterCharacterReference:Wu(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 Cd(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Dd(Id,(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=Hd(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:te.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:te.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:te.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:te.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(Gu(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=zt(t.tagName),t.type===te.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 te.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case te.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case te.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:te.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=Ku(t)?te.WHITESPACE_CHARACTER:t===g.NULL?te.NULL_CHARACTER:te.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(te.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(de);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(de);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(de);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(de);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+=de;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(rn(t)?vn(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(de);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(de);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(de);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)&&Ks(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(de);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(de);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(de);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)&&Ks(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+=de;break}default:this.currentAttr.name+=String.fromCodePoint(rn(t)?vn(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+=de;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+=de;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+=de;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+=de;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+=de;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(rn(t))this._createDoctypeToken(String.fromCharCode(vn(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(de),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+=de;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(rn(t)?vn(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+=de;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+=de;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+=de;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+=de;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()&&Gs(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Gs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Qu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Qs=new Set([...Qu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Qn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),jd=new Set([...Qn,l.OL,l.UL]),zd=new Set([...Qn,l.BUTTON]),Xs=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Zs=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),$d=new Set([l.TR,l.TEMPLATE,l.HTML]),Yd=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),qd=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Wd=new Set([l.TD,l.TH]);class Vd{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(Jr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Wd,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(qd,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Yd,D.HTML)}clearBackToTableRowContext(){this.clearBackTo($d,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(Zs.has(i))return!1;break}case D.MATHML:{if(Xs.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qn)}hasInListItemScope(t){return this.hasInDynamicScope(t,jd)}hasInButtonScope(t){return this.hasInDynamicScope(t,zd)}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(Jr.has(n))return!0;if(Qn.has(n))return!1;break}case D.SVG:{if(Zs.has(n))return!1;break}case D.MATHML:{if(Xs.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&&Qu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Qs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Qs.has(this.currentTagId);)this.pop()}}const Nr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const Js={type:qe.Marker};class Gd{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=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)===s&&this.treeAdapter.getNamespaceURI(c)===a){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Nr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Nr)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(o=>i.get(o.name)===o.value)&&(s+=1,s>=Nr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Js)}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(Js);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:ve.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(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rt.appendChild(e,s)}},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}}},Xu="html",Kd="about:legacy-compat",Qd="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zu=["+//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//"],Xd=[...Zu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Zd=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ju=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jd=[...Ju,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ea(e,t){return t.some(n=>e.startsWith(n))}function ef(e){return e.name===Xu&&e.publicId===null&&(e.systemId===null||e.systemId===Kd)}function tf(e){if(e.name!==Xu)return ve.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Qd)return ve.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Zd.has(n))return ve.QUIRKS;let r=t===null?Xd:Zu;if(ea(n,r))return ve.QUIRKS;if(r=t===null?Ju:Jd,ea(n,r))return ve.LIMITED_QUIRKS}return ve.NO_QUIRKS}const ta={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},nf="definitionurl",rf="definitionURL",sf=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])),af=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}]]),uf=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])),of=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 lf(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===gt.COLOR||r===gt.SIZE||r===gt.FACE)||of.has(t)}function eo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===nf){e.attrs[t].name=rf;break}}function to(e){for(let t=0;t<e.attrs.length;t++){const n=sf.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Mi(e){for(let t=0;t<e.attrs.length;t++){const n=af.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 cf(e){const t=uf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zt(e.tagName))}function hf(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function df(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===ta.TEXT_HTML||i===ta.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function ff(e,t,n,r){return(!r||r===D.HTML)&&df(e,t,n)||(!r||r===D.MATHML)&&hf(e,t)}const pf="hidden",mf=8,gf=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 Ef={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},no=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),na={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class ra{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={...na,...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 Gd(this.treeAdapter),this.fragmentContextID=r?zt(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Vd(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={...na,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===l.TEMPLATE&&s.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}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 s=(i=t.location)!==null&&i!==void 0?i:Ef,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.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 s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_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=me.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=me.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=me.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=me.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=me.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 a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,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),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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),s=n.type===te.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,s)}}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 te.CHARACTER:{this.onCharacter(t);break}case te.NULL_CHARACTER:{this.onNullCharacter(t);break}case te.COMMENT:{this.onComment(t);break}case te.DOCTYPE:{this.onDoctype(t);break}case te.START_TAG:{this._processStartTag(t);break}case te.END_TAG:{this.onEndTag(t);break}case te.EOF:{this.onEof(t);break}case te.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return ff(t,i,s,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 s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.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 no.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 Md[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){V0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Kt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{io(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:{Sr(this,t);break}case T.IN_TABLE_TEXT:{co(this,t);break}case T.IN_COLUMN_GROUP:{Xn(this,t);break}case T.AFTER_BODY:{Zn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){W0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Kt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Sr(this,t);break}case T.IN_COLUMN_GROUP:{Xn(this,t);break}case T.AFTER_BODY:{Zn(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ei(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:{ei(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.AFTER_BODY:{yf(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Cf(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{If(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:{Qt(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:{Kt(this,t);break}case T.BEFORE_HTML:{Nf(this,t);break}case T.BEFORE_HEAD:{wf(this,t);break}case T.IN_HEAD:{$e(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Rf(this,t);break}case T.AFTER_HEAD:{Pf(this,t);break}case T.IN_BODY:{ke(this,t);break}case T.IN_TABLE:{Ft(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_CAPTION:{O0(this,t);break}case T.IN_COLUMN_GROUP:{Hi(this,t);break}case T.IN_TABLE_BODY:{pr(this,t);break}case T.IN_ROW:{mr(this,t);break}case T.IN_CELL:{D0(this,t);break}case T.IN_SELECT:{po(this,t);break}case T.IN_SELECT_IN_TABLE:{v0(this,t);break}case T.IN_TEMPLATE:{B0(this,t);break}case T.AFTER_BODY:{H0(this,t);break}case T.IN_FRAMESET:{U0(this,t);break}case T.AFTER_FRAMESET:{z0(this,t);break}case T.AFTER_AFTER_BODY:{Y0(this,t);break}case T.AFTER_AFTER_FRAMESET:{q0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?K0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Kt(this,t);break}case T.BEFORE_HTML:{Sf(this,t);break}case T.BEFORE_HEAD:{Of(this,t);break}case T.IN_HEAD:{Lf(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Df(this,t);break}case T.AFTER_HEAD:{vf(this,t);break}case T.IN_BODY:{fr(this,t);break}case T.TEXT:{x0(this,t);break}case T.IN_TABLE:{Tn(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_CAPTION:{L0(this,t);break}case T.IN_COLUMN_GROUP:{R0(this,t);break}case T.IN_TABLE_BODY:{ti(this,t);break}case T.IN_ROW:{fo(this,t);break}case T.IN_CELL:{P0(this,t);break}case T.IN_SELECT:{mo(this,t);break}case T.IN_SELECT_IN_TABLE:{M0(this,t);break}case T.IN_TEMPLATE:{F0(this,t);break}case T.AFTER_BODY:{Eo(this,t);break}case T.IN_FRAMESET:{j0(this,t);break}case T.AFTER_FRAMESET:{$0(this,t);break}case T.AFTER_AFTER_BODY:{Yn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Kt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(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:{oo(this,t);break}case T.TEXT:{_0(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_TEMPLATE:{go(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:{Fi(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:{ro(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Sr(this,t);break}case T.IN_TABLE_TEXT:{lo(this,t);break}}}}function bf(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):uo(e,t),n}function Tf(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 xf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const u=e.activeFormattingElements.getElementEntry(a),o=u&&s>=gf;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=_f(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function _f(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 kf(e,t,n){const r=e.treeAdapter.getTagName(t),i=zt(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&s===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Af(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Bi(e,t){for(let n=0;n<mf;n++){const r=bf(e,t);if(!r)break;const i=Tf(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=xf(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&kf(e,a,s),Af(e,i,r)}}function ei(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function yf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Cf(e,t){e._appendCommentNode(t,e.document)}function Fi(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 s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function If(e,t){e._setDocumentType(t);const n=t.forceQuirks?ve.QUIRKS:tf(t);ef(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Kt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ve.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Nf(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):un(e,t)}function Sf(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&un(e,t)}function un(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function wf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:on(e,t)}}function Of(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?on(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function on(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:{ke(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,me.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,me.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,me.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,me.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:ln(e,t)}}function Lf(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:{ln(e,t);break}case l.TEMPLATE:{yt(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function yt(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 ln(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Rf(e,t){switch(t.tagID){case l.HTML:{ke(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:cn(e,t)}}function Df(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{cn(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function cn(e,t){const n=t.type===te.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Pf(e,t){switch(t.tagID){case l.HTML:{ke(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:hn(e,t)}}function vf(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{hn(e,t);break}case l.TEMPLATE:{yt(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function hn(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,dr(e,t)}function dr(e,t){switch(t.type){case te.CHARACTER:{io(e,t);break}case te.WHITESPACE_CHARACTER:{ro(e,t);break}case te.COMMENT:{ei(e,t);break}case te.START_TAG:{ke(e,t);break}case te.END_TAG:{fr(e,t);break}case te.EOF:{oo(e,t);break}}}function ro(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function io(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Mf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Bf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Ff(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 Hf(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&&Jr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function jf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zf(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 $f(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 Yf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=me.PLAINTEXT}function qf(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 Wf(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(Bi(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 Vf(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)&&(Bi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Kf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qf(e,t){e.treeAdapter.getDocumentMode(e.document)!==ve.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function so(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ao(e){const t=Gu(e,gt.TYPE);return t!=null&&t.toLowerCase()===pf}function Xf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),ao(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Zf(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Jf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function e0(e,t){t.tagName=C.IMG,t.tagID=l.IMG,so(e,t)}function t0(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=me.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function n0(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function r0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function ia(e,t){e._switchToTextParsing(t,me.RAWTEXT)}function i0(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 s0(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function a0(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function u0(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function o0(e,t){e._reconstructActiveFormattingElements(),eo(t),Mi(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function l0(e,t){e._reconstructActiveFormattingElements(),to(t),Mi(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function sa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function ke(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:{Vf(e,t);break}case l.A:{Wf(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:{Hf(e,t);break}case l.LI:case l.DD:case l.DT:{$f(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{so(e,t);break}case l.HR:{Jf(e,t);break}case l.RB:case l.RTC:{a0(e,t);break}case l.RT:case l.RP:{u0(e,t);break}case l.PRE:case l.LISTING:{jf(e,t);break}case l.XMP:{n0(e,t);break}case l.SVG:{l0(e,t);break}case l.HTML:{Mf(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:{Bf(e,t);break}case l.FORM:{zf(e,t);break}case l.NOBR:{Gf(e,t);break}case l.MATH:{o0(e,t);break}case l.TABLE:{Qf(e,t);break}case l.INPUT:{Xf(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Zf(e,t);break}case l.IMAGE:{e0(e,t);break}case l.BUTTON:{qf(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Kf(e,t);break}case l.IFRAME:{r0(e,t);break}case l.SELECT:{i0(e,t);break}case l.OPTION:case l.OPTGROUP:{s0(e,t);break}case l.NOEMBED:case l.NOFRAMES:{ia(e,t);break}case l.FRAMESET:{Ff(e,t);break}case l.TEXTAREA:{t0(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?ia(e,t):sa(e,t);break}case l.PLAINTEXT:{Yf(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:sa(e,t)}}function c0(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 h0(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,Eo(e,t))}function d0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function f0(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 p0(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function m0(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function g0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function E0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function b0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function T0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function uo(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function fr(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:{Bi(e,t);break}case l.P:{p0(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:{d0(e,t);break}case l.LI:{m0(e);break}case l.DD:case l.DT:{g0(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{E0(e);break}case l.BR:{T0(e);break}case l.BODY:{c0(e,t);break}case l.HTML:{h0(e,t);break}case l.FORM:{f0(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{b0(e,t);break}case l.TEMPLATE:{yt(e,t);break}default:uo(e,t)}}function oo(e,t){e.tmplInsertionModeStack.length>0?go(e,t):Fi(e,t)}function x0(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 _0(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Sr(e,t){if(e.openElements.currentTagId!==void 0&&no.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 te.CHARACTER:{co(e,t);break}case te.WHITESPACE_CHARACTER:{lo(e,t);break}}else Nn(e,t)}function k0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function A0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function y0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Hi(e,t)}function C0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function I0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,pr(e,t)}function N0(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function S0(e,t){ao(t)?e._appendElement(t,D.HTML):Nn(e,t),t.ackSelfClosing=!0}function w0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ft(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{I0(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}case l.COL:{y0(e,t);break}case l.FORM:{w0(e,t);break}case l.TABLE:{N0(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{C0(e,t);break}case l.INPUT:{S0(e,t);break}case l.CAPTION:{k0(e,t);break}case l.COLGROUP:{A0(e,t);break}default:Nn(e,t)}}function Tn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{yt(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:Nn(e,t)}}function Nn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dr(e,t),e.fosterParentingEnabled=n}function lo(e,t){e.pendingCharacterTokens.push(t)}function co(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Qt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Nn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ho=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function O0(e,t){const n=t.tagID;ho.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Ft(e,t)):ke(e,t)}function L0(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&&Tn(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:fr(e,t)}}function Hi(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{$e(e,t);break}default:Xn(e,t)}}function R0(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:{yt(e,t);break}case l.COL:break;default:Xn(e,t)}}function Xn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function pr(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,mr(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,Ft(e,t));break}default:Ft(e,t)}}function ti(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,Tn(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:Tn(e,t)}}function mr(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,pr(e,t));break}default:Ft(e,t)}}function fo(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,ti(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,ti(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:Tn(e,t)}}function D0(e,t){const n=t.tagID;ho.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),mr(e,t)):ke(e,t)}function P0(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(),fo(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:fr(e,t)}}function po(e,t){switch(t.tagID){case l.HTML:{ke(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 mo(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:{yt(e,t);break}}}function v0(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)):po(e,t)}function M0(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)):mo(e,t)}function B0(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,Ft(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Hi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,pr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,mr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,ke(e,t)}}function F0(e,t){t.tagID===l.TEMPLATE&&yt(e,t)}function go(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Fi(e,t)}function H0(e,t){t.tagID===l.HTML?ke(e,t):Zn(e,t)}function Eo(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 Zn(e,t)}function Zn(e,t){e.insertionMode=T.IN_BODY,dr(e,t)}function U0(e,t){switch(t.tagID){case l.HTML:{ke(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 j0(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 z0(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function $0(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function Y0(e,t){t.tagID===l.HTML?ke(e,t):Yn(e,t)}function Yn(e,t){e.insertionMode=T.IN_BODY,dr(e,t)}function q0(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function W0(e,t){t.chars=de,e._insertCharacters(t)}function V0(e,t){e._insertCharacters(t),e.framesetOk=!1}function bo(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(lf(t))bo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?eo(t):r===D.SVG&&(cf(t),to(t)),Mi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function K0(e,t){if(t.tagID===l.P||t.tagID===l.BR){bo(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 gr=To("end"),We=To("start");function To(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 xo(e){const t=We(e),n=gr(e);if(t&&n)return{start:t,end:n}}const Q0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,X0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),aa={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _o(e,t){const n=up(e),r=$u("type",{handlers:{root:Z0,element:J0,text:ep,comment:Ao,doctype:tp,raw:rp},unknown:ip}),i={parser:n?new ra(aa):ra.getFragmentParser(void 0,aa),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),$t(i,We());const s=n?i.parser.document:i.parser.getFragment(),a=ud(s,{file:i.options.file});return i.stitches&&at(a,"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}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function ko(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Z0(e,t){ko(e.children,t)}function J0(e,t){sp(e,t),ko(e.children,t),ap(e,t)}function ep(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:te.CHARACTER,chars:e.value,location:Sn(e)};$t(t,We(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tp(e,t){const n={type:te.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Sn(e)};$t(t,We(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function np(e,t){t.stitches=!0;const n=op(e);if("children"in e&&"children"in n){const r=_o({type:"root",children:e.children},t.options);n.children=r.children}Ao({type:"comment",value:{stitch:n}},t)}function Ao(e,t){const n=e.value,r={type:te.COMMENT,data:n,location:Sn(e)};$t(t,We(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rp(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,yo(t,We(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Q0,"&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 ip(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))np(n,t);else{let r="";throw X0.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 $t(e,t){yo(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=me.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 yo(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 sp(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===me.PLAINTEXT)return;$t(t,We(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 s=dd({...e,children:[]},{space:i===mt.svg?"svg":"html"}),a={type:te.START_TAG,tagName:n,tagID:zt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Sn(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function ap(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&xd.includes(n)||t.parser.tokenizer.state===me.PLAINTEXT)return;$t(t,gr(e));const r={type:te.END_TAG,tagName:n,tagID:zt(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===me.RCDATA||t.parser.tokenizer.state===me.RAWTEXT||t.parser.tokenizer.state===me.SCRIPT_DATA)&&(t.parser.tokenizer.state=me.DATA)}function up(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=We(e)||{line:void 0,column:void 0,offset:void 0},n=gr(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 op(e){return"children"in e?bt({...e,children:[]}):bt(e)}function ni(e){return function(t,n){return _o(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],dn={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 lp(e,t){let n={type:"root",children:[]};const r={schema:t?{...dn,...t}:dn,stack:[]},i=Co(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Co(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return cp(e,n);case"doctype":return hp(e,n);case"element":return dp(e,n);case"root":return fp(e,n);case"text":return pp(e,n)}}}function cp(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return wn(s,t),s}}function hp(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function dp(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Io(e,t.children),i=mp(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(s=!1;++o<u.length;)e.stack.includes(u[o])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return wn(a,t),a}function fp(e,t){const r={type:"root",children:Io(e,t.children)};return wn(r,t),r}function pp(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function Io(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Co(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function mp(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&it.call(r,n)?r[n]:void 0,a=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=ua(e,oa(s,c),c,h);d==null&&(d=ua(e,oa(a,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 ua(e,t,n,r){return t?Array.isArray(r)?gp(e,t,n,r):No(e,t,n,r):void 0}function gp(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=No(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function No(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Ep(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===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 Ep(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),s=i.indexOf(":"),a=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(s<0||o>-1&&s>o||a>-1&&s>a||u>-1&&s>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(s===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=xo(t);t.data&&(e.data=bt(t.data)),n&&(e.position=n)}function oa(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function So(e){return function(t){return lp(t,e)}}function la(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]/),_e=lt(/[\dA-Za-z]/),bp=lt(/[#-'*+\--9=?A-Z^-~]/);function Jn(e){return e!==null&&(e<32||e===127)}const ri=lt(/\d/),Tp=lt(/[\dA-Fa-f]/),xp=lt(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function ce(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}const Er=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 _p(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function kp(e,t,n){const i=or((n||{}).ignore||[]),s=Ap(t);let a=-1;for(;++a<s.length;)Si(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],E=f?f.children:void 0;if(i(p,E?E.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=s[a][0],p=s[a][1];let E=0;const I=d.children.indexOf(c);let y=!1,w=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const F=L.index,z={index:L.index,input:L.input,stack:[...h,c]};let O=p(...L,z);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?f.lastIndex=F+1:(E!==F&&w.push({type:"text",value:c.value.slice(E,F)}),Array.isArray(O)?w.push(...O):O&&w.push(O),E=F+L[0].length,y=!0),!f.global)break;L=f.exec(c.value)}return y?(E<c.value.length&&w.push({type:"text",value:c.value.slice(E)}),d.children.splice(I,1,...w)):w=[c],I+w.length}}function Ap(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([yp(i[0]),Cp(i[1])])}return t}function yp(e){return typeof e=="string"?new RegExp(_p(e),"g"):e}function Cp(e){return typeof e=="function"?e:function(){return e}}const wr="phrasing",Or=["autolink","link","image","label"];function Ip(){return{transforms:[Dp],enter:{literalAutolink:Sp,literalAutolinkEmail:Lr,literalAutolinkHttp:Lr,literalAutolinkWww:Lr},exit:{literalAutolink:Rp,literalAutolinkEmail:Lp,literalAutolinkHttp:wp,literalAutolinkWww:Op}}}function Np(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wr,notInConstruct:Or},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wr,notInConstruct:Or},{character:":",before:"[ps]",after:"\\/",inConstruct:wr,notInConstruct:Or}]}}function Sp(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lr(e){this.config.enter.autolinkProtocol.call(this,e)}function wp(e){this.config.exit.autolinkProtocol.call(this,e)}function Op(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 Lp(e){this.config.exit.autolinkEmail.call(this,e)}function Rp(e){this.exit(e)}function Dp(e){kp(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Pp],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vp]],{ignore:["link","linkReference"]})}function Pp(e,t,n,r,i){let s="";if(!wo(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Mp(n)))return!1;const a=Bp(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function vp(e,t,n,r){return!wo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Mp(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 Bp(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=la(e,"(");let s=la(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function wo(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tt(n)||Er(n))&&(!t||n!==47)}function ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Oo.peek=Wp;function Fp(){this.buffer()}function Hp(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Up(){this.buffer()}function jp(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zp(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 $p(e){this.exit(e)}function Yp(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 qp(e){this.exit(e)}function Wp(){return"["}function Oo(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function Vp(){return{enter:{gfmFootnoteCallString:Fp,gfmFootnoteCall:Hp,gfmFootnoteDefinitionLabelString:Up,gfmFootnoteDefinition:jp},exit:{gfmFootnoteCallString:zp,gfmFootnoteCall:$p,gfmFootnoteDefinitionLabelString:Yp,gfmFootnoteDefinition:qp}}}function Gp(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Oo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const c=s.enter("footnoteDefinition"),h=s.enter("label");return o+=u.move(s.safe(s.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
7
- `:" ")+s.indentLines(s.containerFlow(r,u.current()),t?Lo:Kp))),c(),o}}function Kp(e,t,n){return t===0?e:Lo(e,t,n)}function Lo(e,t,n){return(n?"":" ")+e}const Qp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ro.peek=tm;function Xp(){return{canContainEols:["delete"],enter:{strikethrough:Jp},exit:{strikethrough:em}}}function Zp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Qp}],handlers:{delete:Ro}}}function Jp(e){this.enter({type:"delete",children:[]},e)}function em(e){this.exit(e)}function Ro(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function tm(){return"~"}function nm(e){return e.length}function rm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nm,s=[],a=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const k=[],I=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const w=im(e[h][y]);if(n.alignDelimiters!==!1){const L=i(w);I[y]=L,(o[y]===void 0||L>o[y])&&(o[y]=L)}k.push(w)}a[h]=k,u[h]=I}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=ca(r[d]);else{const k=ca(r);for(;++d<c;)s[d]=k}d=-1;const f=[],p=[];for(;++d<c;){const k=s[d];let I="",y="";k===99?(I=":",y=":"):k===108?I=":":k===114&&(y=":");let w=n.alignDelimiters===!1?1:Math.max(1,o[d]-I.length-y.length);const L=I+"-".repeat(w)+y;n.alignDelimiters!==!1&&(w=I.length+w+y.length,w>o[d]&&(o[d]=w),p[d]=w),f[d]=L}a.splice(1,0,f),u.splice(1,0,p),h=-1;const E=[];for(;++h<a.length;){const k=a[h],I=u[h];d=-1;const y=[];for(;++d<c;){const w=k[d]||"";let L="",F="";if(n.alignDelimiters!==!1){const z=o[d]-(I[d]||0),O=s[d];O===114?L=" ".repeat(z):O===99?z%2?(L=" ".repeat(z/2+.5),F=" ".repeat(z/2-.5)):(L=" ".repeat(z/2),F=L):F=" ".repeat(z)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&w==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(L),y.push(w),n.alignDelimiters!==!1&&y.push(F),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(`
8
- `)}function im(e){return e==null?"":String(e)}function ca(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 sm(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),am);return i(),a}function am(e,t,n){return">"+(n?"":" ")+e}function um(e,t){return ha(e,t.inConstruct,!0)&&!ha(e,t.notInConstruct,!1)}function ha(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 da(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
9
- `&&um(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
10
- `}function om(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function lm(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 cm(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 hm(e,t,n,r){const i=cm(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(lm(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,dm);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(om(s,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
5
+ color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1,i}return a.updateDeps=u=>{r=u},a}function ks(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const sh=(e,t)=>Math.abs(e-t)<1.01,ah=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},_s=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},uh=e=>e,oh=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},lh=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=a=>{const{width:u,height:o}=a;t({width:Math.round(u),height:Math.round(o)})};if(i(_s(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const u=()=>{const o=a[0];if(o?.borderBoxSize){const c=o.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(_s(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},As={passive:!0},Cs=typeof window>"u"?!0:"onscrollend"in window,ch=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=e.options.useScrollendEvent&&Cs?()=>{}:ah(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=h=>()=>{const{horizontal:d,isRtl:f}=e.options;i=d?n.scrollLeft*(f&&-1||1):n.scrollTop,s(),t(i,h)},u=a(!0),o=a(!1);n.addEventListener("scroll",u,As);const c=e.options.useScrollendEvent&&Cs;return c&&n.addEventListener("scrollend",o,As),()=>{n.removeEventListener("scroll",u),c&&n.removeEventListener("scrollend",o)}},hh=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},dh=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;const a=e+t;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class fh{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:uh,rangeExtractor:oh,onChange:()=>{},measureElement:hh,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=St(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,s=new Map;for(let a=r-1;a>=0;a--){const u=n[a];if(i.has(u.lane))continue;const o=s.get(u.lane);if(o==null||u.end>o.end?s.set(u.lane,u):u.end<o.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=St(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,i,s,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:u}),{key:!1}),this.getMeasurements=St(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:u},o)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,c),d=new Array(u).fill(void 0);for(let f=0;f<c;f++){const m=h[f];m&&(d[m.lane]=f)}for(let f=c;f<n;f++){const m=s(f),E=this.laneAssignments.get(f);let _,I;if(E!==void 0&&this.options.lanes>1){_=E;const F=d[_],z=F!==void 0?h[F]:void 0;I=z?z.end+this.options.gap:r+i}else{const F=this.options.lanes===1?h[f-1]:this.getFurthestMeasurement(h,f);I=F?F.end+this.options.gap:r+i,_=F?F.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,_)}const C=o.get(m),w=typeof C=="number"?C:this.options.estimateSize(f),O=I+w;h[f]={index:f,start:I,size:w,end:O,key:m,lane:_},d[_]=f}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=St(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>this.range=n.length>0&&r>0?mh({measurements:n,outerSize:r,scrollOffset:i,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=St(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const a=s.key,u=this.elementsCache.get(a);u!==n&&(u&&this.observer.unobserve(u),this.observer.observe(n),this.elementsCache.set(a,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,a=r-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,a,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=St(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const u=n[s],o=r[u];i.push(o)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return ks(r[bu(0,r.length-1,i=>ks(r[i]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),a=this.getScrollOffset();if(r==="auto")if(i.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const u=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,r,i.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let s=0;const a=10,u=c=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(n,c);if(!h){console.warn("Failed to get offset for index:",n);return}const[d,f]=h;this._scrollToOffset(d,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const m=()=>{if(this.currentScrollToIndex!==n)return;const E=this.getScrollOffset(),_=this.getOffsetForIndex(n,f);if(!_){console.warn("Failed to get offset for index:",n);return}sh(_[0],E)||o(f)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(m):m()})},o=c=>{this.targetWindow&&this.currentScrollToIndex===n&&(s++,s<a?this.targetWindow.requestAnimationFrame(()=>u(c)):console.warn(`Failed to scroll to index ${n} after ${a} attempts.`))};u(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=r[r.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(u=>u===null);){const u=r[a];s[u.lane]===null&&(s[u.lane]=u.end),a--}i=Math.max(...s.filter(u=>u!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const bu=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else if(s>r)t=i-1;else return i}return e>0?e-1:0};function mh({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,s=o=>e[o].start;if(e.length<=r)return{startIndex:0,endIndex:i};let a=bu(0,i,s,n),u=a;if(r===1)for(;u<i&&e[u].end<n+t;)u++;else if(r>1){const o=Array(r).fill(0);for(;u<i&&o.some(h=>h<n+t);){const h=e[u];o[h.lane]=h.end,u++}const c=Array(r).fill(n+t);for(;a>=0&&c.some(h=>h>=n);){const h=e[a];c[h.lane]=h.start,a--}a=Math.max(0,a-a%r),u=Math.min(i,u+(r-1-u%r))}return{startIndex:a,endIndex:u}}const ys=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ph({useFlushSync:e=!0,...t}){const n=A.useReducer(()=>({}),{})[1],r={...t,onChange:(s,a)=>{var u;e&&a?vc.flushSync(n):n(),(u=t.onChange)==null||u.call(t,s,a)}},[i]=A.useState(()=>new fh(r));return i.setOptions(r),ys(()=>i._didMount(),[]),ys(()=>i._willUpdate()),i}function gh(e){return ph({observeElementRect:lh,observeElementOffset:ch,scrollToFn:dh,...e})}function Eh(e,t,n){const r=n,i=r.getScrollOffset()+r.scrollAdjustments;return e.end+t<=i}const ar=(function(e){if(e==null)return kh;if(typeof e=="function")return ur(e);if(typeof e=="object")return Array.isArray(e)?bh(e):Th(e);if(typeof e=="string")return xh(e);throw new Error("Expected function, string, or object as test")});function bh(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ar(e[n]);return ur(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Th(e){const t=e;return ur(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function xh(e){return ur(t);function t(n){return n&&n.type===e}}function ur(e){return t;function t(n,r,i){return!!(_h(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function kh(){return!0}function _h(e){return e!==null&&typeof e=="object"&&"type"in e}const Tu=[],en=!0,qr=!1,qn="skip";function xi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ar(i),a=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 m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=Tu,E,_,I;if((!t||s(o,c,h[h.length-1]||void 0))&&(m=Ah(n(o,h)),m[0]===qr))return m;if("children"in o&&o.children){const C=o;if(C.children&&m[0]!==qn)for(_=(r?C.children.length:-1)+a,I=h.concat(C);_>-1&&_<C.children.length;){const w=C.children[_];if(E=u(w,_,I)(),E[0]===qr)return E;_=typeof E[1]=="number"?E[1]:_+a}}return m}}}function Ah(e){return Array.isArray(e)?e:typeof e=="number"?[en,e]:e==null?Tu:[e]}function at(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),xi(e,s,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return a(o,d,h)}}function Ch({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="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,s,a);at(c,h)}}function Is(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 yh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Ih=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Nh=new Set(["javascript:","data:","file:","vbscript:"]);function Ns(e,t,n,r=!1,i=!1,s=[]){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 a=Is(e,n);if(!a||Nh.has(a.protocol)||!(Ih.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const o=yh(e);return a&&t.some(c=>{const h=Is(c,n);return!h||h.origin!==a.origin?!1:a.href.startsWith(h.href)})?o?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:o?a.pathname+a.search+a.hash:a.href:null}const _r=Symbol("node-seen"),Sh=(e,t,n,r,i,s,a)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[_r])return en;if(o.tagName==="a"){const d=Ns(o.properties.href,t,e,!1,!1,i);return d===null?(o[_r]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:a},children:[...o.children,{type:"text",value:" [blocked]"}]}),qn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",en)}if(o.tagName==="img"){const d=Ns(o.properties.src,n,e,r,!0,i);return d===null?(o[_r]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:s},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),qn):(o.properties.src=d,en)}return en};return u},xu=-1,or=0,rn=1,Vn=2,ki=3,_i=4,Ai=5,Ci=6,ku=7,_u=8,Ss=typeof self=="object"?self:globalThis,wh=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case or:case xu:return n(a,i);case rn:{const u=n([],i);for(const o of a)u.push(r(o));return u}case Vn:{const u=n({},i);for(const[o,c]of a)u[r(o)]=r(c);return u}case ki:return n(new Date(a),i);case _i:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case Ai:{const u=n(new Map,i);for(const[o,c]of a)u.set(r(o),r(c));return u}case Ci:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case ku:{const{name:u,message:o}=a;return n(new Ss[u](o),i)}case _u:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Ss[s](a),i)};return r},ws=e=>wh(new Map,e)(0),wt="",{toString:Lh}={},{keys:Oh}=Object,Vt=e=>{const t=typeof e;if(t!=="object"||!e)return[or,t];const n=Lh.call(e).slice(8,-1);switch(n){case"Array":return[rn,wt];case"Object":return[Vn,wt];case"Date":return[ki,wt];case"RegExp":return[_i,wt];case"Map":return[Ai,wt];case"Set":return[Ci,wt];case"DataView":return[rn,n]}return n.includes("Array")?[rn,n]:n.includes("Error")?[ku,n]:[Vn,n]},On=([e,t])=>e===or&&(t==="function"||t==="symbol"),Rh=(e,t,n,r)=>{const i=(a,u)=>{const o=r.push(a)-1;return n.set(u,o),o},s=a=>{if(n.has(a))return n.get(a);let[u,o]=Vt(a);switch(u){case or:{let h=a;switch(o){case"bigint":u=_u,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([xu],a)}return i([u,h],a)}case rn:{if(o){let f=a;return o==="DataView"?f=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(a)),i([o,[...f]],a)}const h=[],d=i([u,h],a);for(const f of a)h.push(s(f));return d}case Vn:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],d=i([u,h],a);for(const f of Oh(a))(e||!On(Vt(a[f])))&&h.push([s(f),s(a[f])]);return d}case ki:return i([u,a.toISOString()],a);case _i:{const{source:h,flags:d}=a;return i([u,{source:h,flags:d}],a)}case Ai:{const h=[],d=i([u,h],a);for(const[f,m]of a)(e||!(On(Vt(f))||On(Vt(m))))&&h.push([s(f),s(m)]);return d}case Ci:{const h=[],d=i([u,h],a);for(const f of a)(e||!On(Vt(f)))&&h.push(s(f));return d}}const{message:c}=a;return i([u,{name:o,message:c}],a)};return s},Ls=(e,{json:t,lossy:n}={})=>{const r=[];return Rh(!(t||n),!!t,new Map,r)(e),r},gt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ws(Ls(e,t)):structuredClone(e):(e,t)=>ws(Ls(e,t));class _n{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_n.prototype.normal={};_n.prototype.property={};_n.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 _n(n,r,t)}function gn(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 Dh=0;const J=kt(),pe=kt(),Vr=kt(),v=kt(),he=kt(),Pt=kt(),Oe=kt();function kt(){return 2**++Dh}const Wr=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:pe,commaOrSpaceSeparated:Oe,commaSeparated:Pt,number:v,overloadedBoolean:Vr,spaceSeparated:he},Symbol.toStringTag,{value:"Module"})),Ar=Object.keys(Wr);class yi extends Se{constructor(t,n,r,i){let s=-1;if(super(t,n),Os(this,"space",i),typeof r=="number")for(;++s<Ar.length;){const a=Ar[s];Os(this,Ar[s],(r&Wr[a])===Wr[a])}}}yi.prototype.defined=!0;function Os(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new yi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[gn(r)]=r,n[gn(s.attribute)]=r}return new _n(t,n,e.space)}const Cu=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:he,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:v,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:he,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:pe,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,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 Iu(e,t){return yu(e,t.toLowerCase())}const Ph=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:he,autoFocus:J,autoPlay:J,blocking:he,capture:null,charSet:null,checked:J,cite:null,className:he,cols:v,colSpan:null,content:null,contentEditable:pe,controls:J,controlsList:he,coords:v|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:Vr,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:he,height:v,hidden:Vr,high:v,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:he,itemRef:he,itemScope:J,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:v,pattern:null,ping:he,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:he,required:J,reversed:J,rows:v,rowSpan:v,sandbox:he,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:pe,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:Iu}),Mh=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:Oe,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:he,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oe,rev:Oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oe,requiredFeatures:Oe,requiredFonts:Oe,requiredFormats:Oe,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:Oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oe,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yu}),Nu=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:Iu}),wu=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),vh={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"},Bh=/[A-Z]/g,Rs=/-[a-z]/g,Fh=/^data[-\w.:]+$/i;function lr(e,t){const n=gn(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"&&Fh.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Rs,Uh);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Rs.test(s)){let a=s.replace(Bh,Hh);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=yi}return new i(r,t)}function Hh(e){return"-"+e.toLowerCase()}function Uh(e){return e.charAt(1).toUpperCase()}const An=Au([Cu,Ph,Nu,Su,wu],"html"),ot=Au([Cu,Mh,Nu,Su,wu],"svg");function Ds(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),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 Ps=/[#.]/g;function jh(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Ps.lastIndex=i;const u=Ps.exec(n),o=n.slice(i,u?u.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Ms(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?qh(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const c=a;u.unshift(c)}else{o=jh(s,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,zh(a))u.unshift(a);else for(const[d,f]of Object.entries(a))$h(e,o.properties,d,f)}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 zh(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function $h(e,t,n,r){const i=lr(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ms(r):i.commaSeparated?s=Ds(r):i.commaOrSpaceSeparated?s=Ms(Ds(r).join(" ")):s=vs(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Yh(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(vs(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}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 vs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||gn(n)===gn(t)))return!0}return n}function Yh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function qh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Vh=["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"],Wh=Ru(An,"div"),Gh=Ru(ot,"g",Vh);function Kh(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let u=n[a];if(u===void 0){const o=Bs(t,n[a-1]);u=o===-1?t.length+1:o+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],o=Bs(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Bs(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
6
+ `,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,Qh=Object.prototype;function Xh(e,t){const n=t||{};return Ii({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:An,verbose:n.verbose||!1},e)}function Ii(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Un(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 s=String(e.file),a=Kh(s),u=a.toPoint(0),o=a.toPoint(s.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Un(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Un(e,r,n),n}default:return n=Zh(e,t),n}}function Pu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ii(e,t[n]);r.push(i)}return r}function Zh(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?ot:An;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Du.call(Qh,o)||(i[o]=u.value)}const a=(e.schema.space==="svg"?Gh:Wh)(t.tagName,i,Pu(e,t.childNodes));if(Un(e,t,a),a.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Rt(o.startTag),h=o&&o.endTag&&Rt(o.endTag),d=Ii(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),a.content=d}return e.schema=n,a}function Un(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Jh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Jh(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 s={};let a;if(n.attrs)for(a in n.attrs)Du.call(n.attrs,a)&&(s[lr(e.schema,a).property]=Rt(n.attrs[a]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=s,t.data={position:c}}}return r}function Rt(e){const t=Fs({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fs({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fs(e){return e.line&&e.column?e:void 0}const Hs={}.hasOwnProperty;function Mu(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&Hs.call(i,e)){const o=String(i[e]);a=Hs.call(u,o)?u[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ed={},td={}.hasOwnProperty,vu=Mu("type",{handlers:{root:rd,element:od,text:ad,comment:ud,doctype:sd}});function nd(e,t){const r=(t||ed).space;return vu(e,r==="svg"?ot:An)}function rd(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ni(e.children,n,t),Ht(e,n),n}function id(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ni(e.children,n,t),Ht(e,n),n}function sd(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function ad(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function ud(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function od(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&td.call(e.properties,s)){const o=ld(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[a],childNodes:[],parentNode:null};return u.childNodes=Ni(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=id(e.content,r)),u}function ld(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 s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=mt[r.space]}return i}function Ni(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=vu(e[r],n);s.parentNode=t,i.push(s)}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 cd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],hd=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]),de="�";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 Ie={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Bu(e){return e>=55296&&e<=57343}function dd(e){return e>=56320&&e<=57343}function fd(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||hd.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 md=65536;class pd{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=md,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:s}=this,a=i+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(dd(n))return this.pos++,this._addGap(),fd(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 te;(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"})(te||(te={}));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 gd=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))),Ed=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 bd(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ed.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 Td=32;var st;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(st||(st={}));function Kr(e){return e>=Ee.ZERO&&e<=Ee.NINE}function xd(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function kd(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Kr(e)}function _d(e){return e===Ee.EQUALS||kd(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 Ad{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)|Td)===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 s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Kr(i)||xd(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(bd(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],s=(i&st.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Cd(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(s===0||_d(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&st.VALUE_LENGTH)>>14,s!==0){if(a===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,s,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]&st.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]&~st.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 Cd(e,t,n,r){const i=(t&st.BRANCH_LENGTH)>>7,s=t&st.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:e[n+o]-1}let a=n,u=a+i-1;for(;a<=u;){const o=a+u>>>1,c=e[o];if(c<r)a=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 pt;(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"})(pt||(pt={}));var De;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(De||(De={}));var y;(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"})(y||(y={}));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 yd=new Map([[y.A,l.A],[y.ADDRESS,l.ADDRESS],[y.ANNOTATION_XML,l.ANNOTATION_XML],[y.APPLET,l.APPLET],[y.AREA,l.AREA],[y.ARTICLE,l.ARTICLE],[y.ASIDE,l.ASIDE],[y.B,l.B],[y.BASE,l.BASE],[y.BASEFONT,l.BASEFONT],[y.BGSOUND,l.BGSOUND],[y.BIG,l.BIG],[y.BLOCKQUOTE,l.BLOCKQUOTE],[y.BODY,l.BODY],[y.BR,l.BR],[y.BUTTON,l.BUTTON],[y.CAPTION,l.CAPTION],[y.CENTER,l.CENTER],[y.CODE,l.CODE],[y.COL,l.COL],[y.COLGROUP,l.COLGROUP],[y.DD,l.DD],[y.DESC,l.DESC],[y.DETAILS,l.DETAILS],[y.DIALOG,l.DIALOG],[y.DIR,l.DIR],[y.DIV,l.DIV],[y.DL,l.DL],[y.DT,l.DT],[y.EM,l.EM],[y.EMBED,l.EMBED],[y.FIELDSET,l.FIELDSET],[y.FIGCAPTION,l.FIGCAPTION],[y.FIGURE,l.FIGURE],[y.FONT,l.FONT],[y.FOOTER,l.FOOTER],[y.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[y.FORM,l.FORM],[y.FRAME,l.FRAME],[y.FRAMESET,l.FRAMESET],[y.H1,l.H1],[y.H2,l.H2],[y.H3,l.H3],[y.H4,l.H4],[y.H5,l.H5],[y.H6,l.H6],[y.HEAD,l.HEAD],[y.HEADER,l.HEADER],[y.HGROUP,l.HGROUP],[y.HR,l.HR],[y.HTML,l.HTML],[y.I,l.I],[y.IMG,l.IMG],[y.IMAGE,l.IMAGE],[y.INPUT,l.INPUT],[y.IFRAME,l.IFRAME],[y.KEYGEN,l.KEYGEN],[y.LABEL,l.LABEL],[y.LI,l.LI],[y.LINK,l.LINK],[y.LISTING,l.LISTING],[y.MAIN,l.MAIN],[y.MALIGNMARK,l.MALIGNMARK],[y.MARQUEE,l.MARQUEE],[y.MATH,l.MATH],[y.MENU,l.MENU],[y.META,l.META],[y.MGLYPH,l.MGLYPH],[y.MI,l.MI],[y.MO,l.MO],[y.MN,l.MN],[y.MS,l.MS],[y.MTEXT,l.MTEXT],[y.NAV,l.NAV],[y.NOBR,l.NOBR],[y.NOFRAMES,l.NOFRAMES],[y.NOEMBED,l.NOEMBED],[y.NOSCRIPT,l.NOSCRIPT],[y.OBJECT,l.OBJECT],[y.OL,l.OL],[y.OPTGROUP,l.OPTGROUP],[y.OPTION,l.OPTION],[y.P,l.P],[y.PARAM,l.PARAM],[y.PLAINTEXT,l.PLAINTEXT],[y.PRE,l.PRE],[y.RB,l.RB],[y.RP,l.RP],[y.RT,l.RT],[y.RTC,l.RTC],[y.RUBY,l.RUBY],[y.S,l.S],[y.SCRIPT,l.SCRIPT],[y.SEARCH,l.SEARCH],[y.SECTION,l.SECTION],[y.SELECT,l.SELECT],[y.SOURCE,l.SOURCE],[y.SMALL,l.SMALL],[y.SPAN,l.SPAN],[y.STRIKE,l.STRIKE],[y.STRONG,l.STRONG],[y.STYLE,l.STYLE],[y.SUB,l.SUB],[y.SUMMARY,l.SUMMARY],[y.SUP,l.SUP],[y.TABLE,l.TABLE],[y.TBODY,l.TBODY],[y.TEMPLATE,l.TEMPLATE],[y.TEXTAREA,l.TEXTAREA],[y.TFOOT,l.TFOOT],[y.TD,l.TD],[y.TH,l.TH],[y.THEAD,l.THEAD],[y.TITLE,l.TITLE],[y.TR,l.TR],[y.TRACK,l.TRACK],[y.TT,l.TT],[y.U,l.U],[y.UL,l.UL],[y.SVG,l.SVG],[y.VAR,l.VAR],[y.WBR,l.WBR],[y.XMP,l.XMP]]);function Ut(e){var t;return(t=yd.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]);y.STYLE,y.SCRIPT,y.XMP,y.IFRAME,y.NOEMBED,y.NOFRAMES,y.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 me={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function Nd(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 Us(e){return nt(e)||Nd(e)}function Rn(e){return e+32}function ju(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function js(e){return ju(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function wd(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 Ld{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 pd(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ad(gd,(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=wd(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:te.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:te.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:te.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:te.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===te.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 te.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case te.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case te.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:te.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)?te.WHITESPACE_CHARACTER:t===g.NULL?te.NULL_CHARACTER:te.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(te.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(de);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(de);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(de);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(de);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+=de;break}case g.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(tn(t)?Rn(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(de);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(de);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(de);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(Ie.SCRIPT,!1)&&js(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.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(de);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(de);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(de);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(Ie.SCRIPT,!1)&&js(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.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+=de;break}default:this.currentAttr.name+=String.fromCodePoint(tn(t)?Rn(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+=de;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+=de;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+=de;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+=de;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ie.DASH_DASH,!0)?(this._createCommentToken(Ie.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Ie.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ie.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Ie.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(Ie.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+=de;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(Rn(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(de),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+=de;break}case g.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(tn(t)?Rn(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(Ie.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ie.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+=de;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+=de;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+=de;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+=de;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()&&Us(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Us(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]),zs=new Set([...zu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Wn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Od=new Set([...Wn,l.OL,l.UL]),Rd=new Set([...Wn,l.BUTTON]),$s=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ys=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Dd=new Set([l.TR,l.TEMPLATE,l.HTML]),Pd=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Md=new Set([l.TABLE,l.TEMPLATE,l.HTML]),vd=new Set([l.TD,l.TH]);class Bd{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(vd,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(Md,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Pd,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(Dd,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(Ys.has(i))return!1;break}case D.MATHML:{if($s.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Wn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Od)}hasInButtonScope(t){return this.hasInDynamicScope(t,Rd)}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(Wn.has(n))return!1;break}case D.SVG:{if(Ys.has(n))return!1;break}case D.MATHML:{if($s.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&&zs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&zs.has(this.currentTagId);)this.pop()}}const Cr=3;var Ye;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ye||(Ye={}));const qs={type:Ye.Marker};class Fd{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Ye.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===a){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Cr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Cr)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(o=>i.get(o.name)===o.value)&&(s+=1,s>=Cr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(qs)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ye.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ye.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(qs);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ye.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ye.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ye.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:De.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(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rt.appendChild(e,s)}},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",Hd="about:legacy-compat",Ud="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//"],jd=[...Yu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],zd=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 Vs(e,t){return t.some(n=>e.startsWith(n))}function Yd(e){return e.name===$u&&e.publicId===null&&(e.systemId===null||e.systemId===Hd)}function qd(e){if(e.name!==$u)return De.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ud)return De.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),zd.has(n))return De.QUIRKS;let r=t===null?jd:Yu;if(Vs(n,r))return De.QUIRKS;if(r=t===null?qu:$d,Vs(n,r))return De.LIMITED_QUIRKS}return De.NO_QUIRKS}const Ws={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Vd="definitionurl",Wd="definitionURL",Gd=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])),Kd=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}]]),Qd=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])),Xd=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 Zd(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===pt.COLOR||r===pt.SIZE||r===pt.FACE)||Xd.has(t)}function Vu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Vd){e.attrs[t].name=Wd;break}}function Wu(e){for(let t=0;t<e.attrs.length;t++){const n=Gd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Si(e){for(let t=0;t<e.attrs.length;t++){const n=Kd.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 Jd(e){const t=Qd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ut(e.tagName))}function ef(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function tf(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===pt.ENCODING){const i=n[r].value.toLowerCase();return i===Ws.TEXT_HTML||i===Ws.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function nf(e,t,n,r){return(!r||r===D.HTML)&&tf(e,t,n)||(!r||r===D.MATHML)&&ef(e,t)}const rf="hidden",sf=8,af=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 uf={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]),Gs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Ks{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={...Gs,...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 Ld(this.options,this),this.activeFormattingElements=new Fd(this.treeAdapter),this.fragmentContextID=r?Ut(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Bd(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={...Gs,...n};t??(t=r.treeAdapter.createElement(y.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===l.TEMPLATE&&s.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}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 s=(i=t.location)!==null&&i!==void 0?i:uf,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.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 s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_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=me.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)===y.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=me.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=me.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=me.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=me.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 a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,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(y.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),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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),s=n.type===te.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,s)}}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)===y.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 te.CHARACTER:{this.onCharacter(t);break}case te.NULL_CHARACTER:{this.onNullCharacter(t);break}case te.COMMENT:{this.onComment(t);break}case te.DOCTYPE:{this.onDoctype(t);break}case te.START_TAG:{this._processStartTag(t);break}case te.END_TAG:{this.onEndTag(t);break}case te.EOF:{this.onEof(t);break}case te.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return nf(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ye.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.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){B0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{an(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:{yr(this,t);break}case T.IN_TABLE_TEXT:{no(this,t);break}case T.IN_COLUMN_GROUP:{Gn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{jn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v0(this,t);return}switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{an(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:{yr(this,t);break}case T.IN_COLUMN_GROUP:{Gn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{jn(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:{mf(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{pf(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{gf(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)?F0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{Ef(this,t);break}case T.BEFORE_HEAD:{Tf(this,t);break}case T.IN_HEAD:{ze(this,t);break}case T.IN_HEAD_NO_SCRIPT:{_f(this,t);break}case T.AFTER_HEAD:{Cf(this,t);break}case T.IN_BODY:{ke(this,t);break}case T.IN_TABLE:{vt(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{x0(this,t);break}case T.IN_COLUMN_GROUP:{Oi(this,t);break}case T.IN_TABLE_BODY:{dr(this,t);break}case T.IN_ROW:{fr(this,t);break}case T.IN_CELL:{A0(this,t);break}case T.IN_SELECT:{so(this,t);break}case T.IN_SELECT_IN_TABLE:{y0(this,t);break}case T.IN_TEMPLATE:{N0(this,t);break}case T.AFTER_BODY:{w0(this,t);break}case T.IN_FRAMESET:{L0(this,t);break}case T.AFTER_FRAMESET:{R0(this,t);break}case T.AFTER_AFTER_BODY:{P0(this,t);break}case T.AFTER_AFTER_FRAMESET:{M0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?H0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{bf(this,t);break}case T.BEFORE_HEAD:{xf(this,t);break}case T.IN_HEAD:{kf(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Af(this,t);break}case T.AFTER_HEAD:{yf(this,t);break}case T.IN_BODY:{hr(this,t);break}case T.TEXT:{c0(this,t);break}case T.IN_TABLE:{En(this,t);break}case T.IN_TABLE_TEXT:{Gt(this,t);break}case T.IN_CAPTION:{k0(this,t);break}case T.IN_COLUMN_GROUP:{_0(this,t);break}case T.IN_TABLE_BODY:{Zr(this,t);break}case T.IN_ROW:{io(this,t);break}case T.IN_CELL:{C0(this,t);break}case T.IN_SELECT:{ao(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:{O0(this,t);break}case T.AFTER_FRAMESET:{D0(this,t);break}case T.AFTER_AFTER_BODY:{jn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Wt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{an(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:{h0(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:{Li(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:{yr(this,t);break}case T.IN_TABLE_TEXT:{to(this,t);break}}}}function of(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 lf(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 cf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const u=e.activeFormattingElements.getElementEntry(a),o=u&&s>=af;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=hf(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function hf(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 df(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ut(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&s===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ff(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function wi(e,t){for(let n=0;n<sf;n++){const r=of(e,t);if(!r)break;const i=lf(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=cf(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&df(e,a,s),ff(e,i,r)}}function Xr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function pf(e,t){e._appendCommentNode(t,e.document)}function Li(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 s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function gf(e,t){e._setDocumentType(t);const n=t.forceQuirks?De.QUIRKS:qd(t);Yd(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,De.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Ef(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):sn(e,t)}function bf(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&sn(e,t)}function sn(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Tf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:an(e,t)}}function xf(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?an(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function an(e,t){e._insertFakeElement(y.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function ze(e,t){switch(t.tagID){case l.HTML:{ke(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,me.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,me.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,me.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,me.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 kf(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:{_t(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function _t(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 _f(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{ze(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:on(e,t)}}function Af(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===te.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Cf(e,t){switch(t.tagID){case l.HTML:{ke(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),ze(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:ln(e,t)}}function yf(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{ln(e,t);break}case l.TEMPLATE:{_t(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function ln(e,t){e._insertFakeElement(y.BODY,l.BODY),e.insertionMode=T.IN_BODY,cr(e,t)}function cr(e,t){switch(t.type){case te.CHARACTER:{Qu(e,t);break}case te.WHITESPACE_CHARACTER:{Ku(e,t);break}case te.COMMENT:{Xr(e,t);break}case te.START_TAG:{ke(e,t);break}case te.END_TAG:{hr(e,t);break}case te.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 If(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nf(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 wf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Lf(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 Rf(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 Df(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 Pf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=me.PLAINTEXT}function Mf(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 vf(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(y.A);n&&(wi(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 Bf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ff(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(wi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Uf(e,t){e.treeAdapter.getDocumentMode(e.document)!==De.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,pt.TYPE);return t!=null&&t.toLowerCase()===rf}function jf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Zu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function zf(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 Yf(e,t){t.tagName=y.IMG,t.tagID=l.IMG,Xu(e,t)}function qf(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=me.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Vf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function Wf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function Qs(e,t){e._switchToTextParsing(t,me.RAWTEXT)}function Gf(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 Kf(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Qf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Xf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function Zf(e,t){e._reconstructActiveFormattingElements(),Vu(t),Si(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Jf(e,t){e._reconstructActiveFormattingElements(),Wu(t),Si(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Xs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function ke(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:{Bf(e,t);break}case l.A:{vf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Lf(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:{wf(e,t);break}case l.LI:case l.DD:case l.DT:{Df(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:{Qf(e,t);break}case l.RT:case l.RP:{Xf(e,t);break}case l.PRE:case l.LISTING:{Of(e,t);break}case l.XMP:{Vf(e,t);break}case l.SVG:{Jf(e,t);break}case l.HTML:{If(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:{ze(e,t);break}case l.BODY:{Nf(e,t);break}case l.FORM:{Rf(e,t);break}case l.NOBR:{Ff(e,t);break}case l.MATH:{Zf(e,t);break}case l.TABLE:{Uf(e,t);break}case l.INPUT:{jf(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{zf(e,t);break}case l.IMAGE:{Yf(e,t);break}case l.BUTTON:{Mf(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Hf(e,t);break}case l.IFRAME:{Wf(e,t);break}case l.SELECT:{Gf(e,t);break}case l.OPTION:case l.OPTGROUP:{Kf(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Qs(e,t);break}case l.FRAMESET:{Sf(e,t);break}case l.TEXTAREA:{qf(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Qs(e,t):Xs(e,t);break}case l.PLAINTEXT:{Pf(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:Xs(e,t)}}function e0(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 t0(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,oo(e,t))}function n0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function r0(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 i0(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(y.P,l.P),e._closePElement()}function s0(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function a0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function u0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function o0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function l0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(y.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 s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))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:{wi(e,t);break}case l.P:{i0(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:{n0(e,t);break}case l.LI:{s0(e);break}case l.DD:case l.DT:{a0(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{u0(e);break}case l.BR:{l0(e);break}case l.BODY:{e0(e,t);break}case l.HTML:{t0(e,t);break}case l.FORM:{r0(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{o0(e,t);break}case l.TEMPLATE:{_t(e,t);break}default:Ju(e,t)}}function eo(e,t){e.tmplInsertionModeStack.length>0?uo(e,t):Li(e,t)}function c0(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 h0(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yr(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 te.CHARACTER:{no(e,t);break}case te.WHITESPACE_CHARACTER:{to(e,t);break}}else Cn(e,t)}function d0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function f0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function m0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Oi(e,t)}function p0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function g0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,dr(e,t)}function E0(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function b0(e,t){Zu(t)?e._appendElement(t,D.HTML):Cn(e,t),t.ackSelfClosing=!0}function T0(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:{g0(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}case l.COL:{m0(e,t);break}case l.FORM:{T0(e,t);break}case l.TABLE:{E0(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{p0(e,t);break}case l.INPUT:{b0(e,t);break}case l.CAPTION:{d0(e,t);break}case l.COLGROUP:{f0(e,t);break}default:Cn(e,t)}}function En(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{_t(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:Cn(e,t)}}function Cn(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++)Cn(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 x0(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)):ke(e,t)}function k0(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&&En(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 Oi(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{ze(e,t);break}default:Gn(e,t)}}function _0(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:{_t(e,t);break}case l.COL:break;default:Gn(e,t)}}function Gn(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(y.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,En(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:En(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:En(e,t)}}function A0(e,t){const n=t.tagID;ro.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),fr(e,t)):ke(e,t)}function C0(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 so(e,t){switch(t.tagID){case l.HTML:{ke(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:{ze(e,t);break}}}function ao(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:{_t(e,t);break}}}function y0(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)):so(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)):ao(e,t)}function N0(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:{ze(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,Oi(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,ke(e,t)}}function S0(e,t){t.tagID===l.TEMPLATE&&_t(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)):Li(e,t)}function w0(e,t){t.tagID===l.HTML?ke(e,t):Kn(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 Kn(e,t)}function Kn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function L0(e,t){switch(t.tagID){case l.HTML:{ke(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:{ze(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 R0(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function D0(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function P0(e,t){t.tagID===l.HTML?ke(e,t):jn(e,t)}function jn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function M0(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function v0(e,t){t.chars=de,e._insertCharacters(t)}function B0(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 F0(e,t){if(Zd(t))lo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Vu(t):r===D.SVG&&(Jd(t),Wu(t)),Si(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function H0(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}}}y.AREA,y.BASE,y.BASEFONT,y.BGSOUND,y.BR,y.COL,y.EMBED,y.FRAME,y.HR,y.IMG,y.INPUT,y.KEYGEN,y.LINK,y.META,y.PARAM,y.SOURCE,y.TRACK,y.WBR;const mr=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=mr(e);if(t&&n)return{start:t,end:n}}const U0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,j0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zs={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fo(e,t){const n=X0(e),r=Mu("type",{handlers:{root:z0,element:$0,text:Y0,comment:po,doctype:q0,raw:W0},unknown:G0}),i={parser:n?new Ks(Zs):Ks.getFragmentParser(void 0,Zs),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),jt(i,Ve());const s=n?i.parser.document:i.parser.getFragment(),a=Xh(s,{file:i.options.file});return i.stitches&&at(a,"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}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function mo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function z0(e,t){mo(e.children,t)}function $0(e,t){K0(e,t),mo(e.children,t),Q0(e,t)}function Y0(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:te.CHARACTER,chars:e.value,location:yn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function q0(e,t){const n={type:te.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function V0(e,t){t.stitches=!0;const n=Z0(e);if("children"in e&&"children"in n){const r=fo({type:"root",children:e.children},t.options);n.children=r.children}po({type:"comment",value:{stitch:n}},t)}function po(e,t){const n=e.value,r={type:te.COMMENT,data:n,location:yn(e)};jt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function W0(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(U0,"&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 G0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))V0(n,t);else{let r="";throw j0.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=me.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 K0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===me.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 s=nd({...e,children:[]},{space:i===mt.svg?"svg":"html"}),a={type:te.START_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:yn(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Q0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&cd.includes(n)||t.parser.tokenizer.state===me.PLAINTEXT)return;jt(t,mr(e));const r={type:te.END_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===me.RCDATA||t.parser.tokenizer.state===me.RAWTEXT||t.parser.tokenizer.state===me.SCRIPT_DATA)&&(t.parser.tokenizer.state=me.DATA)}function X0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function yn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=mr(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 Z0(e){return"children"in e?gt({...e,children:[]}):gt(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 J0(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 em(e,n);case"doctype":return tm(e,n);case"element":return nm(e,n);case"root":return rm(e,n);case"text":return im(e,n)}}}function em(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return In(s,t),s}}function tm(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return In(n,t),n}}function nm(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=bo(e,t.children),i=sm(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(s=!1;++o<u.length;)e.stack.includes(u[o])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return In(a,t),a}function rm(e,t){const r={type:"root",children:bo(e,t.children)};return In(r,t),r}function im(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return In(r,t),r}function bo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Eo(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function sm(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&it.call(r,n)?r[n]:void 0,a=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=Js(e,ea(s,c),c,h);d==null&&(d=Js(e,ea(a,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 Js(e,t,n,r){return t?Array.isArray(r)?am(e,t,n,r):To(e,t,n,r):void 0}function am(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=To(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function To(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&um(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===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 um(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),s=i.indexOf(":"),a=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(s<0||o>-1&&s>o||a>-1&&s>a||u>-1&&s>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(s===h.length&&i.slice(0,h.length)===h)return!0}return!1}function In(e,t){const n=ho(t);t.data&&(e.data=gt(t.data)),n&&(e.position=n)}function ea(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function xo(e){return function(t){return J0(t,e)}}function ta(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]/),om=lt(/[#-'*+\--9=?A-Z^-~]/);function Qn(e){return e!==null&&(e<32||e===127)}const ei=lt(/\d/),lm=lt(/[\dA-Fa-f]/),cm=lt(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function ce(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}const pr=lt(new RegExp("\\p{P}|\\p{S}","u")),Et=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hm(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dm(e,t,n){const i=ar((n||{}).ignore||[]),s=fm(t);let a=-1;for(;++a<s.length;)xi(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const m=h[d],E=f?f.children:void 0;if(i(m,E?E.indexOf(m):void 0,f))return;f=m}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=s[a][0],m=s[a][1];let E=0;const I=d.children.indexOf(c);let C=!1,w=[];f.lastIndex=0;let O=f.exec(c.value);for(;O;){const F=O.index,z={index:O.index,input:O.input,stack:[...h,c]};let L=m(...O,z);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?f.lastIndex=F+1:(E!==F&&w.push({type:"text",value:c.value.slice(E,F)}),Array.isArray(L)?w.push(...L):L&&w.push(L),E=F+O[0].length,C=!0),!f.global)break;O=f.exec(c.value)}return C?(E<c.value.length&&w.push({type:"text",value:c.value.slice(E)}),d.children.splice(I,1,...w)):w=[c],I+w.length}}function fm(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([mm(i[0]),pm(i[1])])}return t}function mm(e){return typeof e=="string"?new RegExp(hm(e),"g"):e}function pm(e){return typeof e=="function"?e:function(){return e}}const Ir="phrasing",Nr=["autolink","link","image","label"];function gm(){return{transforms:[Am],enter:{literalAutolink:bm,literalAutolinkEmail:Sr,literalAutolinkHttp:Sr,literalAutolinkWww:Sr},exit:{literalAutolink:_m,literalAutolinkEmail:km,literalAutolinkHttp:Tm,literalAutolinkWww:xm}}}function Em(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Nr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:Nr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ir,notInConstruct:Nr}]}}function bm(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sr(e){this.config.enter.autolinkProtocol.call(this,e)}function Tm(e){this.config.exit.autolinkProtocol.call(this,e)}function xm(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 km(e){this.config.exit.autolinkEmail.call(this,e)}function _m(e){this.exit(e)}function Am(e){dm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cm],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ym]],{ignore:["link","linkReference"]})}function Cm(e,t,n,r,i){let s="";if(!ko(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Im(n)))return!1;const a=Nm(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function ym(e,t,n,r){return!ko(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Im(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 Nm(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=ta(e,"(");let s=ta(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function ko(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Et(n)||pr(n))&&(!t||n!==47)}function je(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}_o.peek=vm;function Sm(){this.buffer()}function wm(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lm(){this.buffer()}function Om(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Rm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Dm(e){this.exit(e)}function Pm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Mm(e){this.exit(e)}function vm(){return"["}function _o(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function Bm(){return{enter:{gfmFootnoteCallString:Sm,gfmFootnoteCall:wm,gfmFootnoteDefinitionLabelString:Lm,gfmFootnoteDefinition:Om},exit:{gfmFootnoteCallString:Rm,gfmFootnoteCall:Dm,gfmFootnoteDefinitionLabelString:Pm,gfmFootnoteDefinition:Mm}}}function Fm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_o},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const c=s.enter("footnoteDefinition"),h=s.enter("label");return o+=u.move(s.safe(s.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
7
+ `:" ")+s.indentLines(s.containerFlow(r,u.current()),t?Ao:Hm))),c(),o}}function Hm(e,t,n){return t===0?e:Ao(e,t,n)}function Ao(e,t,n){return(n?"":" ")+e}const Um=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Co.peek=qm;function jm(){return{canContainEols:["delete"],enter:{strikethrough:$m},exit:{strikethrough:Ym}}}function zm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Um}],handlers:{delete:Co}}}function $m(e){this.enter({type:"delete",children:[]},e)}function Ym(e){this.exit(e)}function Co(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function qm(){return"~"}function Vm(e){return e.length}function Wm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Vm,s=[],a=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const _=[],I=[];let C=-1;for(e[h].length>c&&(c=e[h].length);++C<e[h].length;){const w=Gm(e[h][C]);if(n.alignDelimiters!==!1){const O=i(w);I[C]=O,(o[C]===void 0||O>o[C])&&(o[C]=O)}_.push(w)}a[h]=_,u[h]=I}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=na(r[d]);else{const _=na(r);for(;++d<c;)s[d]=_}d=-1;const f=[],m=[];for(;++d<c;){const _=s[d];let I="",C="";_===99?(I=":",C=":"):_===108?I=":":_===114&&(C=":");let w=n.alignDelimiters===!1?1:Math.max(1,o[d]-I.length-C.length);const O=I+"-".repeat(w)+C;n.alignDelimiters!==!1&&(w=I.length+w+C.length,w>o[d]&&(o[d]=w),m[d]=w),f[d]=O}a.splice(1,0,f),u.splice(1,0,m),h=-1;const E=[];for(;++h<a.length;){const _=a[h],I=u[h];d=-1;const C=[];for(;++d<c;){const w=_[d]||"";let O="",F="";if(n.alignDelimiters!==!1){const z=o[d]-(I[d]||0),L=s[d];L===114?O=" ".repeat(z):L===99?z%2?(O=" ".repeat(z/2+.5),F=" ".repeat(z/2-.5)):(O=" ".repeat(z/2),F=O):F=" ".repeat(z)}n.delimiterStart!==!1&&!d&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&w==="")&&(n.delimiterStart!==!1||d)&&C.push(" "),n.alignDelimiters!==!1&&C.push(O),C.push(w),n.alignDelimiters!==!1&&C.push(F),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&C.push("|")}E.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
8
+ `)}function Gm(e){return e==null?"":String(e)}function na(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 Km(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),Qm);return i(),a}function Qm(e,t,n){return">"+(n?"":" ")+e}function Xm(e,t){return ra(e,t.inConstruct,!0)&&!ra(e,t.notInConstruct,!1)}function ra(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 ia(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
9
+ `&&Xm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
10
+ `}function Zm(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function Jm(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 ep(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 tp(e,t,n,r){const i=ep(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Jm(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,np);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(Zm(s,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
11
11
  `,encode:["`"],...u.current()})),d()}return h+=u.move(`
12
12
  `),s&&(h+=u.move(s+`
13
- `)),h+=u.move(o),c(),h}function dm(e,t,n){return(n?"":" ")+e}function Ui(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 fm(e,t,n,r){const i=Ui(n),s=i==='"'?"Quote":"Apostrophe",a=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?" ":`
14
- `,...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),a(),c}function pm(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 xn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ht(e){if(e===null||ce(e)||Tt(e))return 1;if(Er(e))return 2}function er(e,t,n){const r=Ht(e),i=Ht(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}}Do.peek=mm;function Do(e,t,n,r){const i=pm(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),h=er(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=xn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=er(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+xn(d));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function mm(e,t,n){return n.options.emphasis||"*"}const gm={};function ji(e,t){const n=gm,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Po(e,r,i)}function Po(e,t,n){if(Em(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 fa(e.children,t,n)}return Array.isArray(e)?fa(e,t,n):""}function fa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Po(e[i],t,n);return r.join("")}function Em(e){return!!(e&&typeof e=="object")}function bm(e,t){let n=!1;return at(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Gr}),!!((!e.depth||e.depth<3)&&ji(e)&&(t.options.setext||n))}function Tm(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(bm(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
13
+ `)),h+=u.move(o),c(),h}function np(e,t,n){return(n?"":" ")+e}function Ri(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 rp(e,t,n,r){const i=Ri(n),s=i==='"'?"Quote":"Apostrophe",a=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?" ":`
14
+ `,...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),a(),c}function ip(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 bn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bt(e){if(e===null||ce(e)||Et(e))return 1;if(pr(e))return 2}function Xn(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=sp;function yo(e,t,n,r){const i=ip(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),h=Xn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=bn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Xn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+bn(d));const m=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+m}function sp(e,t,n){return n.options.emphasis||"*"}const ap={};function Di(e,t){const n=ap,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Io(e,r,i)}function Io(e,t,n){if(up(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 sa(e.children,t,n)}return Array.isArray(e)?sa(e,t,n):""}function sa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Io(e[i],t,n);return r.join("")}function up(e){return!!(e&&typeof e=="object")}function op(e,t){let n=!1;return at(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)&&Di(e)&&(t.options.setext||n))}function lp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(op(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
15
15
  `,after:`
16
16
  `});return d(),h(),f+`
17
17
  `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
18
18
  `))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
19
- `,...s.current()});return/^[\t ]/.test(c)&&(c=xn(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),o(),u(),c}vo.peek=xm;function vo(e){return e.value||""}function xm(){return"<"}Mo.peek=_m;function Mo(e,t,n,r){const i=Ui(n),s=i==='"'?"Quote":"Apostrophe",a=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${s}`),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(")"),a(),c}function _m(){return"!"}Bo.peek=km;function Bo(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=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+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function km(){return"!"}Fo.peek=Am;function Fo(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let o;if(a.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 Am(){return"`"}function Ho(e,t){const n=ji(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))}Uo.peek=ym;function Uo(e,t,n,r){const i=Ui(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(Ho(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(o=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),o()),c+=a.move(")"),u(),c}function ym(e,t,n){return Ho(e,n)?"<":"["}jo.peek=Cm;function jo(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=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+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Cm(){return"["}function zi(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 Im(e){const t=zi(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 Nm(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 zo(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 Sm(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Nm(n):zi(n);const u=e.ordered?a==="."?")":".":Im(n);let o=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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),zo(n)===a&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=u),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function wm(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 Om(e,t,n,r){const i=wm(n);let s=n.bulletCurrent||zi(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?s:s+" ".repeat(a-s.length))+d}}function Lm(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Rm=or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dm(e,t,n,r){return(e.children.some(function(a){return Rm(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$o.peek=vm;function $o(e,t,n,r){const i=Pm(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),h=er(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=xn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=er(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+xn(d));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function vm(e,t,n){return n.options.strong||"*"}function Mm(e,t,n,r){return n.safe(e.value,r)}function Bm(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 Fm(e,t,n){const r=(zo(n)+(n.options.ruleSpaces?" ":"")).repeat(Bm(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yo={blockquote:sm,break:da,code:hm,definition:fm,emphasis:Do,hardBreak:da,heading:Tm,html:vo,image:Mo,imageReference:Bo,inlineCode:Fo,link:Uo,linkReference:jo,list:Sm,listItem:Om,paragraph:Lm,root:Dm,strong:$o,text:Mm,thematicBreak:Fm},pa=document.createElement("i");function $i(e){const t="&"+e+";";pa.innerHTML=t;const n=pa.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qo(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 Hm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Um(e){return e.replace(Hm,jm)}function jm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return qo(n.slice(s?2:1),s?16:10)}return $i(n)||e}function zm(){return{enter:{table:$m,tableData:ma,tableHeader:ma,tableRow:qm},exit:{codeText:Wm,table:Ym,tableData:Rr,tableHeader:Rr,tableRow:Rr}}}function $m(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 Ym(e){this.exit(e),this.data.inTable=void 0}function qm(e){this.enter({type:"tableRow",children:[]},e)}function Rr(e){this.exit(e)}function ma(e){this.enter({type:"tableCell",children:[]},e)}function Wm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Vm));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Vm(e,t){return t==="|"?t:e}function Gm(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
20
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:o,tableRow:u}};function a(p,E,k,I){return c(h(p,k,I),p.align)}function u(p,E,k,I){const y=d(p,k,I),w=c([y]);return w.slice(0,w.indexOf(`
21
- `))}function o(p,E,k,I){const y=k.enter("tableCell"),w=k.enter("phrasing"),L=k.containerPhrasing(p,{...I,before:s,after:s});return w(),y(),L}function c(p,E){return rm(p,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function h(p,E,k){const I=p.children;let y=-1;const w=[],L=E.enter("table");for(;++y<I.length;)w[y]=d(I[y],E,k);return L(),w}function d(p,E,k){const I=p.children;let y=-1;const w=[],L=E.enter("tableRow");for(;++y<I.length;)w[y]=o(I[y],p,E,k);return L(),w}function f(p,E,k){let I=Yo.inlineCode(p,E,k);return k.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function Km(){return{exit:{taskListCheckValueChecked:ga,taskListCheckValueUnchecked:ga,paragraph:Xm}}}function Qm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Zm}}}function ga(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Xm(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 s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===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 Zm(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let o=Yo.listItem(e,t,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+a}}function Jm(){return[Ip(),Vp(),Xp(),zm(),Km()]}function e1(e){return{extensions:[Np(),Gp(e),Zp(),Gm(e),Qm()]}}function Pe(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Me(e,t){return e.length>0?(Pe(e,e.length,0,t),e):t}const Ea={}.hasOwnProperty;function Wo(e){const t={};let n=-1;for(;++n<e.length;)t1(t,e[n]);return t}function t1(e,t){let n;for(n in t){const i=(Ea.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Ea.call(i,a)||(i[a]=[]);const u=s[a];n1(i[a],Array.isArray(u)?u:u?[u]:[])}}}function n1(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 r1={tokenize:l1,partial:!0},Vo={tokenize:c1,partial:!0},Go={tokenize:h1,partial:!0},Ko={tokenize:d1,partial:!0},i1={tokenize:f1,partial:!0},Qo={name:"wwwAutolink",tokenize:u1,previous:Zo},Xo={name:"protocolAutolink",tokenize:o1,previous:Jo},Je={name:"emailAutolink",tokenize:a1,previous:el},Ve={};function s1(){return{text:Ve}}let ft=48;for(;ft<123;)Ve[ft]=Je,ft++,ft===58?ft=65:ft===91&&(ft=97);Ve[43]=Je;Ve[45]=Je;Ve[46]=Je;Ve[95]=Je;Ve[72]=[Je,Xo];Ve[104]=[Je,Xo];Ve[87]=[Je,Qo];Ve[119]=[Je,Qo];function a1(e,t,n){const r=this;let i,s;return a;function a(d){return!ii(d)||!el.call(r,r.previous)||Yi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ii(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(i1,h,c)(d):d===45||d===95||_e(d)?(s=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return s&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function u1(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Zo.call(r,r.previous)||Yi(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(r1,e.attempt(Vo,e.attempt(Go,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function o1(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&Jo.call(r,r.previous)&&!Yi(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 f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),s?c:(s=!0,o)):n(d)}function c(d){return d===null||Jn(d)||ce(d)||Tt(d)||Er(d)?n(d):e.attempt(Vo,e.attempt(Go,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function l1(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function c1(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(Ko,o,u)(c):c===null||ce(c)||Tt(c)||c!==45&&Er(c)?o(c):(s=!0,e.consume(c),a)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function o(c){return i||r||!s?n(c):t(c)}}function h1(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Ko,t,s)(a):a===null||ce(a)||Tt(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function d1(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),s):u===93?(e.consume(u),i):u===60||u===null||ce(u)||Tt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ce(u)||Tt(u)?t(u):r(u)}function s(u){return Ce(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),a):n(u)}}function f1(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return _e(s)?n(s):t(s)}}function Zo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ce(e)}function Jo(e){return!Ce(e)}function el(e){return!(e===47||ii(e))}function ii(e){return e===43||e===45||e===46||e===95||_e(e)}function Yi(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 Yt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&_e(e.charCodeAt(n+1))&&_e(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function br(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const si={name:"attention",resolveAll:p1,tokenize:m1};function p1(e,t){let n=-1,r,i,s,a,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},f={...e[n][1].start};ba(d,-o),ba(f,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Me(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Me(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Me(c,br(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Me(c,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Me(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 m1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ht(r);let s;return a;function a(o){return s=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===s)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Ht(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(s===42?d:d&&(i||!f)),c._close=!!(s===42?f:f&&(h||!d)),t(o)}}function ba(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const g1={name:"autolink",tokenize:E1};function E1(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Ce(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||_e(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||_e(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Jn(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):bp(p)?(e.consume(p),c):n(p)}function h(p){return _e(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||_e(p))&&r++<63){const E=p===45?f:d;return e.consume(p),E}return n(p)}}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return ne(o)?(e.enter(n),u(o)):t(o)}function u(o){return ne(o)&&s++<i?(e.consume(o),u):(e.exit(n),t(o))}}const On={partial:!0,tokenize:b1};function b1(e,t,n){return r;function r(s){return ne(s)?ie(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||q(s)?t(s):n(s)}}const tl={continuation:{tokenize:x1},exit:_1,name:"blockQuote",tokenize:T1};function T1(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ne(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function x1(e,t,n){const r=this;return i;function i(a){return ne(a)?ie(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(tl,t,n)(a)}}function _1(e){e.exit("blockQuote")}const nl={name:"characterEscape",tokenize:k1};function k1(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return xp(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const rl={name:"characterReference",tokenize:A1};function A1(e,t,n){const r=this;let i=0,s,a;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"),s=31,a=_e,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Tp,h):(e.enter("characterReferenceValue"),s=7,a=ri,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===_e&&!$i(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),h):n(d)}}const Ta={partial:!0,tokenize:C1},xa={concrete:!0,name:"codeFenced",tokenize:y1};function y1(e,t,n){const r=this,i={partial:!0,tokenize:z};let s=0,a=0,u;return o;function o(O){return c(O)}function c(O){const K=r.events[r.events.length-1];return s=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(O)}function h(O){return O===u?(a++,e.consume(O),h):a<3?n(O):(e.exit("codeFencedFenceSequence"),ne(O)?ie(e,d,"whitespace")(O):d(O))}function d(O){return O===null||q(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(Ta,k,F)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(O))}function f(O){return O===null||q(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(O)):ne(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),f)}function p(O){return O===null||q(O)?d(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(O))}function E(O){return O===null||q(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(O)):O===96&&O===u?n(O):(e.consume(O),E)}function k(O){return e.attempt(i,F,I)(O)}function I(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),y}function y(O){return s>0&&ne(O)?ie(e,w,"linePrefix",s+1)(O):w(O)}function w(O){return O===null||q(O)?e.check(Ta,k,F)(O):(e.enter("codeFlowValue"),L(O))}function L(O){return O===null||q(O)?(e.exit("codeFlowValue"),w(O)):(e.consume(O),L)}function F(O){return e.exit("codeFenced"),t(O)}function z(O,K,G){let X=0;return N;function N(j){return O.enter("lineEnding"),O.consume(j),O.exit("lineEnding"),U}function U(j){return O.enter("codeFencedFence"),ne(j)?ie(O,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):v(j)}function v(j){return j===u?(O.enter("codeFencedFenceSequence"),W(j)):G(j)}function W(j){return j===u?(X++,O.consume(j),W):X>=a?(O.exit("codeFencedFenceSequence"),ne(j)?ie(O,$,"whitespace")(j):$(j)):G(j)}function $(j){return j===null||q(j)?(O.exit("codeFencedFence"),K(j)):G(j)}}}function C1(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Dr={name:"codeIndented",tokenize:N1},I1={partial:!0,tokenize:S1};function N1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,s,"linePrefix",5)(c)}function s(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?o(c):q(c)?e.attempt(I1,a,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||q(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function S1(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ie(e,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):q(a)?i(a):n(a)}}const w1={name:"codeText",previous:L1,resolve:O1,tokenize:R1};function O1(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 L1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function R1(e,t,n){let r=0,i,s;return a;function a(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?(s=e.enter("codeTextSequence"),i=0,h(d)):q(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||q(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)):(s.type="codeTextData",c(d))}}class D1{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xt(this.left,r),s.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),Xt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xt(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);Xt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xt(this.left,n.reverse())}}}function Xt(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 il(e){const t={};let n=-1,r,i,s,a,u,o,c;const h=new D1(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,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,P1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[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 P1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,o=[],c={};let h,d,f=-1,p=n,E=0,k=0;const I=[k];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(k=f+1,I.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):I.pop(),f=I.length;f--;){const y=u.slice(I[f],I[f+1]),w=s.pop();o.push([w,w+y.length-1]),e.splice(w,2,y)}for(o.reverse(),f=-1;++f<o.length;)c[E+o[f][0]]=E+o[f][1],E+=o[f][1]-o[f][0]-1;return c}const v1={resolve:B1,tokenize:F1},M1={partial:!0,tokenize:H1};function B1(e){return il(e),e}function F1(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?s(u):q(u)?e.check(M1,a,s)(u):(e.consume(u),i)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function H1(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ie(e,s,"linePrefix")}function s(a){if(a===null||q(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function sl(e,t,n,r,i,s,a,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(s),e.consume(y),e.exit(s),f):y===null||y===32||y===41||Jn(y)?n(y):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(y))}function f(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(u),f(y)):y===null||y===60||q(y)?n(y):(e.consume(y),y===92?E:p)}function E(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function k(y){return!h&&(y===null||y===41||ce(y))?(e.exit("chunkString"),e.exit(u),e.exit(a),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||Jn(y)?n(y):(e.consume(y),y===92?I:k)}function I(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function al(e,t,n,r,i,s){const a=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||q(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!ne(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function ul(e,t,n,r,i,s){let a;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,o):n(f)}function o(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),c(f))}function c(f){return f===a?(e.exit(s),o(a)):f===null?n(f):q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===a||f===null||q(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===a||f===92?(e.consume(f),h):h(f)}}function fn(e,t){let n;return r;function r(i){return q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ne(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const U1={name:"definition",tokenize:z1},j1={partial:!0,tokenize:$1};function z1(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return al.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return ce(p)?fn(e,c)(p):c(p)}function c(p){return sl(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(j1,d,d)(p)}function d(p){return ne(p)?ie(e,f,"whitespace")(p):f(p)}function f(p){return p===null||q(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function $1(e,t,n){return r;function r(u){return ce(u)?fn(e,i)(u):n(u)}function i(u){return ul(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return ne(u)?ie(e,a,"whitespace")(u):a(u)}function a(u){return u===null||q(u)?t(u):n(u)}}const Y1={name:"hardBreakEscape",tokenize:q1};function q1(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return q(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const W1={name:"headingAtx",resolve:V1,tokenize:G1};function V1(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pe(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function G1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||ce(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||q(h)?(e.exit("atxHeading"),t(h)):ne(h)?ie(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||ce(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const K1=["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"],_a=["pre","script","style","textarea"],Q1={concrete:!0,name:"htmlFlow",resolveTo:J1,tokenize:eg},X1={partial:!0,tokenize:ng},Z1={partial:!0,tokenize:tg};function J1(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 eg(e,t,n){const r=this;let i,s,a,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(_),f):_===47?(e.consume(_),s=!0,k):_===63?(e.consume(_),i=3,r.interrupt?t:x):Ce(_)?(e.consume(_),a=String.fromCharCode(_),I):n(_)}function f(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,u=0,E):Ce(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function p(_){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(_),a=String.fromCharCode(_),I):n(_)}function I(_){if(_===null||_===47||_===62||ce(_)){const He=_===47,ct=a.toLowerCase();return!He&&!s&&_a.includes(ct)?(i=1,r.interrupt?t(_):v(_)):K1.includes(a.toLowerCase())?(i=6,He?(e.consume(_),y):r.interrupt?t(_):v(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):s?w(_):L(_))}return _===45||_e(_)?(e.consume(_),a+=String.fromCharCode(_),I):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function w(_){return ne(_)?(e.consume(_),w):N(_)}function L(_){return _===47?(e.consume(_),N):_===58||_===95||Ce(_)?(e.consume(_),F):ne(_)?(e.consume(_),L):N(_)}function F(_){return _===45||_===46||_===58||_===95||_e(_)?(e.consume(_),F):z(_)}function z(_){return _===61?(e.consume(_),O):ne(_)?(e.consume(_),z):L(_)}function O(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,K):ne(_)?(e.consume(_),O):G(_)}function K(_){return _===o?(e.consume(_),o=null,X):_===null||q(_)?n(_):(e.consume(_),K)}function G(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||ce(_)?z(_):(e.consume(_),G)}function X(_){return _===47||_===62||ne(_)?L(_):n(_)}function N(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||q(_)?v(_):ne(_)?(e.consume(_),U):n(_)}function v(_){return _===45&&i===2?(e.consume(_),B):_===60&&i===1?(e.consume(_),V):_===62&&i===4?(e.consume(_),Oe):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),se):q(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(X1,Ge,W)(_)):_===null||q(_)?(e.exit("htmlFlowData"),W(_)):(e.consume(_),v)}function W(_){return e.check(Z1,$,Ge)(_)}function $(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),j}function j(_){return _===null||q(_)?W(_):(e.enter("htmlFlowData"),v(_))}function B(_){return _===45?(e.consume(_),x):v(_)}function V(_){return _===47?(e.consume(_),a="",oe):v(_)}function oe(_){if(_===62){const He=a.toLowerCase();return _a.includes(He)?(e.consume(_),Oe):v(_)}return Ce(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),oe):v(_)}function se(_){return _===93?(e.consume(_),x):v(_)}function x(_){return _===62?(e.consume(_),Oe):_===45&&i===2?(e.consume(_),x):v(_)}function Oe(_){return _===null||q(_)?(e.exit("htmlFlowData"),Ge(_)):(e.consume(_),Oe)}function Ge(_){return e.exit("htmlFlow"),t(_)}}function tg(e,t,n){const r=this;return i;function i(a){return q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function ng(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(On,t,n)}}const rg={name:"htmlText",tokenize:ig};function ig(e,t,n){const r=this;let i,s,a;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),z):x===63?(e.consume(x),L):Ce(x)?(e.consume(x),G):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),s=0,E):Ce(x)?(e.consume(x),w):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):q(x)?(a=d,V(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?B(x):x===45?f(x):d(x)}function E(x){const Oe="CDATA[";return x===Oe.charCodeAt(s++)?(e.consume(x),s===Oe.length?k:E):n(x)}function k(x){return x===null?n(x):x===93?(e.consume(x),I):q(x)?(a=k,V(x)):(e.consume(x),k)}function I(x){return x===93?(e.consume(x),y):k(x)}function y(x){return x===62?B(x):x===93?(e.consume(x),y):k(x)}function w(x){return x===null||x===62?B(x):q(x)?(a=w,V(x)):(e.consume(x),w)}function L(x){return x===null?n(x):x===63?(e.consume(x),F):q(x)?(a=L,V(x)):(e.consume(x),L)}function F(x){return x===62?B(x):L(x)}function z(x){return Ce(x)?(e.consume(x),O):n(x)}function O(x){return x===45||_e(x)?(e.consume(x),O):K(x)}function K(x){return q(x)?(a=K,V(x)):ne(x)?(e.consume(x),K):B(x)}function G(x){return x===45||_e(x)?(e.consume(x),G):x===47||x===62||ce(x)?X(x):n(x)}function X(x){return x===47?(e.consume(x),B):x===58||x===95||Ce(x)?(e.consume(x),N):q(x)?(a=X,V(x)):ne(x)?(e.consume(x),X):B(x)}function N(x){return x===45||x===46||x===58||x===95||_e(x)?(e.consume(x),N):U(x)}function U(x){return x===61?(e.consume(x),v):q(x)?(a=U,V(x)):ne(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,W):q(x)?(a=v,V(x)):ne(x)?(e.consume(x),v):(e.consume(x),$)}function W(x){return x===i?(e.consume(x),i=void 0,j):x===null?n(x):q(x)?(a=W,V(x)):(e.consume(x),W)}function $(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ce(x)?X(x):(e.consume(x),$)}function j(x){return x===47||x===62||ce(x)?X(x):n(x)}function B(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function V(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),oe}function oe(x){return ne(x)?ie(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):se(x)}function se(x){return e.enter("htmlTextData"),a(x)}}const qi={name:"labelEnd",resolveAll:og,resolveTo:lg,tokenize:cg},sg={tokenize:hg},ag={tokenize:dg},ug={tokenize:fg};function og(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 lg(e,t){let n=e.length,r=0,i,s,a,u;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Me(u,e.slice(s+1,s+r+3)),u=Me(u,[["enter",h,t]]),u=Me(u,br(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=Me(u,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),u=Me(u,e.slice(a+1)),u=Me(u,[["exit",o,t]]),Pe(e,s,e.length,u),e}function cg(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(f){return s?s._inactive?d(f):(a=r.parser.defined.includes(ze(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(sg,h,a?h:d)(f):f===91?e.attempt(ag,h,a?c:d)(f):a?h(f):d(f)}function c(f){return e.attempt(ug,h,d)(f)}function h(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function hg(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 ce(d)?fn(e,s)(d):s(d)}function s(d){return d===41?h(d):sl(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ce(d)?fn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?ul(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return ce(d)?fn(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 dg(e,t,n){const r=this;return i;function i(u){return al.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function fg(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const pg={name:"labelStartImage",resolveAll:qi.resolveAll,tokenize:mg};function mg(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const gg={name:"labelStartLink",resolveAll:qi.resolveAll,tokenize:Eg};function Eg(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Pr={name:"lineEnding",tokenize:bg};function bg(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const qn={name:"thematicBreak",tokenize:Tg};function Tg(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),ne(c)?ie(e,u,"whitespace")(c):u(c))}}const Se={continuation:{tokenize:Ag},exit:Cg,name:"list",tokenize:kg},xg={partial:!0,tokenize:Ig},_g={partial:!0,tokenize:yg};function kg(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(p){const E=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ri(p)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(qn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return ri(p)&&++a<10?(e.consume(p),o):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(On,r.interrupt?n:h,e.attempt(xg,f,d))}function h(p){return r.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return ne(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ag(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(On,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!ne(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_g,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Se,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function yg(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Cg(e){e.exit(this.containerState.type)}function Ig(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ne(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ka={name:"setextUnderline",resolveTo:Ng,tokenize:Sg};function Ng(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Sg(e,t,n){const r=this;let i;return s;function s(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,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),ne(c)?ie(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const wg={tokenize:Bg,partial:!0};function Og(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pg,continuation:{tokenize:vg},exit:Mg}},text:{91:{name:"gfmFootnoteCall",tokenize:Dg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Lg,resolveTo:Rg}}}}function Lg(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=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(!a||!a._balanced)return n(o);const c=ze(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Rg(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Dg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;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(s>999||d===93&&!a||d===null||d===91||ce(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(ze(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ce(d)||(a=!0),s++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function Pg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=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(a>999||E===93&&!u||E===null||E===91||ce(E))return n(E);if(E===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return s=ze(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ce(E)||(u=!0),a++,e.consume(E),E===92?d:h}function d(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}function f(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(s)||i.push(s),ie(e,p,"gfmFootnoteDefinitionWhitespace")):n(E)}function p(E){return t(E)}}function vg(e,t,n){return e.check(On,t,e.attempt(wg,t,n))}function Mg(e){e.exit("gfmFootnoteDefinition")}function Bg(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Fg(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let c=o;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[o][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[o][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[o][1].start)},f=[["enter",h,u],["enter",a[c][1],u],["exit",a[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&Pe(f,f.length,0,br(p,a.slice(c+1,o),u)),Pe(f,f.length,0,[["exit",d,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",h,u]]),Pe(a,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function s(a,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(E){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(E):(a.enter("strikethroughSequenceTemporary"),p(E))}function p(E){const k=Ht(c);if(E===126)return d>1?o(E):(a.consume(E),d++,p);if(d<2&&!n)return o(E);const I=a.exit("strikethroughSequenceTemporary"),y=Ht(E);return I._open=!y||y===2&&!!k,I._close=!k||k===2&&!!y,u(E)}}}class Hg{constructor(){this.map=[]}add(t,n,r){Ug(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[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 s of i)t.push(s);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 jg(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 s=r.length-1;r[s]=r[s]==="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 zg(){return{flow:{null:{name:"table",tokenize:$g,resolveAll:Yg}}}}function $g(e,t,n){const r=this;let i=0,s=0,a;return u;function u(N){let U=r.events.length-1;for(;U>-1;){const $=r.events[U][1].type;if($==="lineEnding"||$==="linePrefix")U--;else break}const v=U>-1?r.events[U][1].type:null,W=v==="tableHead"||v==="tableRow"?O:o;return W===O&&r.parser.lazy[r.now().line]?n(N):W(N)}function o(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(a=!0,s+=1),h(N)}function h(N){return N===null?n(N):q(N)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),p):n(N):ne(N)?ie(e,h,"whitespace")(N):(s+=1,a&&(a=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||ce(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?f:d)}function f(N){return N===92||N===124?(e.consume(N),d):d(N)}function p(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),a=!1,ne(N)?ie(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?I(N):N===124?(a=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),k):z(N)}function k(N){return ne(N)?ie(e,I,"whitespace")(N):I(N)}function I(N){return N===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),y):N===45?(s+=1,y(N)):N===null||q(N)?F(N):z(N)}function y(N){return N===45?(e.enter("tableDelimiterFiller"),w(N)):z(N)}function w(N){return N===45?(e.consume(N),w):N===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(N))}function L(N){return ne(N)?ie(e,F,"whitespace")(N):F(N)}function F(N){return N===124?E(N):N===null||q(N)?!a||i!==s?z(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):z(N)}function z(N){return n(N)}function O(N){return e.enter("tableRow"),K(N)}function K(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),K):N===null||q(N)?(e.exit("tableRow"),t(N)):ne(N)?ie(e,K,"whitespace")(N):(e.enter("data"),G(N))}function G(N){return N===null||N===124||ce(N)?(e.exit("data"),K(N)):(e.consume(N),N===92?X:G)}function X(N){return N===92||N===124?(e.consume(N),G):G(N)}}function Yg(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,c,h,d;const f=new Hg;for(;++n<e.length;){const p=e[n],E=p[1];p[0]==="enter"?E.type==="tableHead"?(u=!1,o!==0&&(Aa(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.add(n,0,[["enter",c,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.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,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=Mn(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=Mn(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):E.type==="tableHead"?(u=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=Mn(f,t,s,i,n,d)):a[1]!==0&&(d=Mn(f,t,a,i,n,d)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&Aa(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=jg(t.events,n))}return e}function Mn(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Dt(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=Dt(t.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=Dt(t.events,n[2]),h=Dt(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 f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[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&&(s.end=Object.assign({},Dt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Aa(e,t,n,r,i){const s=[],a=Dt(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Dt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const qg={name:"tasklistCheck",tokenize:Vg};function Wg(){return{text:{91:qg}}}function Vg(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"),s)}function s(o){return ce(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return q(o)?t(o):ne(o)?e.check({tokenize:Gg},t,n)(o):n(o)}}function Gg(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Kg(e){return Wo([s1(),Og(),Fg(e),zg(),Wg()])}const Qg={};function Xg(e){const t=this,n=e||Qg,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Kg(n)),s.push(Jm()),a.push(e1(n))}var Zg=Object.defineProperty,Jg=Object.defineProperties,eE=Object.getOwnPropertyDescriptors,ya=Object.getOwnPropertySymbols,tE=Object.prototype.hasOwnProperty,nE=Object.prototype.propertyIsEnumerable,Ca=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ol=(e,t)=>{for(var n in t||(t={}))tE.call(t,n)&&Ca(e,n,t[n]);if(ya)for(var n of ya(t))nE.call(t,n)&&Ca(e,n,t[n]);return e},ll=(e,t)=>Jg(e,eE(t)),rE=/(\*\*)([^*]*\*?)$/,iE=/(__)([^_]*?)$/,sE=/(\*\*\*)([^*]*?)$/,aE=/(\*)([^*]*?)$/,uE=/(_)([^_]*?)$/,oE=/(`)([^`]*?)$/,lE=/(~~)([^~]*?)$/,Ct=/^[\s_~*`]*$/,cl=/^[\s]*[-*+][\s]+$/,cE=/[\p{L}\p{N}_]/u,hE=/^```[^`\n]*```?$/,dE=/^\*{4,}$/,fE=/(__)([^_]+)_$/,pE=/(~~)([^~]+)~$/,mE=/__/g,Ia=/~~/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:cE.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},gE=(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},hl=(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},Tr=(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},EE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
22
- `)return!1}return!1},dl=(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]==="]"?EE(e,t):!1;if(e[n]===`
23
- `)return!1}return!1},Wi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
19
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=bn(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),o(),u(),c}No.peek=cp;function No(e){return e.value||""}function cp(){return"<"}So.peek=hp;function So(e,t,n,r){const i=Ri(n),s=i==='"'?"Quote":"Apostrophe",a=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${s}`),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(")"),a(),c}function hp(){return"!"}wo.peek=dp;function wo(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=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+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function dp(){return"!"}Lo.peek=fp;function Lo(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let o;if(a.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 fp(){return"`"}function Oo(e,t){const n=Di(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=mp;function Ro(e,t,n,r){const i=Ri(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(Oo(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(o=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),o()),c+=a.move(")"),u(),c}function mp(e,t,n){return Oo(e,n)?"<":"["}Do.peek=pp;function Do(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=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+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function pp(){return"["}function Pi(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=Pi(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 Ep(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 bp(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Ep(n):Pi(n);const u=e.ordered?a==="."?")":".":gp(n);let o=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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)===a&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=u),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function Tp(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=Tp(n);let s=n.bulletCurrent||Pi(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,f,m){return f?(m?"":" ".repeat(a))+d:(m?s:s+" ".repeat(a-s.length))+d}}function kp(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const _p=ar(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ap(e,t,n,r){return(e.children.some(function(a){return _p(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Cp(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=yp;function Mo(e,t,n,r){const i=Cp(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),h=Xn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=bn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Xn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+bn(d));const m=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+m}function yp(e,t,n){return n.options.strong||"*"}function Ip(e,t,n,r){return n.safe(e.value,r)}function Np(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 Sp(e,t,n){const r=(Po(n)+(n.options.ruleSpaces?" ":"")).repeat(Np(n));return n.options.ruleSpaces?r.slice(0,-1):r}const vo={blockquote:Km,break:ia,code:tp,definition:rp,emphasis:yo,hardBreak:ia,heading:lp,html:No,image:So,imageReference:wo,inlineCode:Lo,link:Ro,linkReference:Do,list:bp,listItem:xp,paragraph:kp,root:Ap,strong:Mo,text:Ip,thematicBreak:Sp},aa=document.createElement("i");function Mi(e){const t="&"+e+";";aa.innerHTML=t;const n=aa.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 wp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lp(e){return e.replace(wp,Op)}function Op(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Bo(n.slice(s?2:1),s?16:10)}return Mi(n)||e}function Rp(){return{enter:{table:Dp,tableData:ua,tableHeader:ua,tableRow:Mp},exit:{codeText:vp,table:Pp,tableData:wr,tableHeader:wr,tableRow:wr}}}function Dp(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 Pp(e){this.exit(e),this.data.inTable=void 0}function Mp(e){this.enter({type:"tableRow",children:[]},e)}function wr(e){this.exit(e)}function ua(e){this.enter({type:"tableCell",children:[]},e)}function vp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bp(e,t){return t==="|"?t:e}function Fp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
20
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:o,tableRow:u}};function a(m,E,_,I){return c(h(m,_,I),m.align)}function u(m,E,_,I){const C=d(m,_,I),w=c([C]);return w.slice(0,w.indexOf(`
21
+ `))}function o(m,E,_,I){const C=_.enter("tableCell"),w=_.enter("phrasing"),O=_.containerPhrasing(m,{...I,before:s,after:s});return w(),C(),O}function c(m,E){return Wm(m,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function h(m,E,_){const I=m.children;let C=-1;const w=[],O=E.enter("table");for(;++C<I.length;)w[C]=d(I[C],E,_);return O(),w}function d(m,E,_){const I=m.children;let C=-1;const w=[],O=E.enter("tableRow");for(;++C<I.length;)w[C]=o(I[C],m,E,_);return O(),w}function f(m,E,_){let I=vo.inlineCode(m,E,_);return _.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function Hp(){return{exit:{taskListCheckValueChecked:oa,taskListCheckValueUnchecked:oa,paragraph:jp}}}function Up(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zp}}}function oa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jp(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 s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===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 zp(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let o=vo.listItem(e,t,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+a}}function $p(){return[gm(),Bm(),jm(),Rp(),Hp()]}function Yp(e){return{extensions:[Em(),Fm(e),zm(),Fp(e),Up()]}}function Re(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Pe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const la={}.hasOwnProperty;function Fo(e){const t={};let n=-1;for(;++n<e.length;)qp(t,e[n]);return t}function qp(e,t){let n;for(n in t){const i=(la.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){la.call(i,a)||(i[a]=[]);const u=s[a];Vp(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Vp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Re(e,0,0,r)}const Wp={tokenize:Jp,partial:!0},Ho={tokenize:e1,partial:!0},Uo={tokenize:t1,partial:!0},jo={tokenize:n1,partial:!0},Gp={tokenize:r1,partial:!0},zo={name:"wwwAutolink",tokenize:Xp,previous:Yo},$o={name:"protocolAutolink",tokenize:Zp,previous:qo},Je={name:"emailAutolink",tokenize:Qp,previous:Vo},We={};function Kp(){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 Qp(e,t,n){const r=this;let i,s;return a;function a(d){return!ti(d)||!Vo.call(r,r.previous)||vi(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(Gp,h,c)(d):d===45||d===95||xe(d)?(s=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return s&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Xp(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Yo.call(r,r.previous)||vi(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Wp,e.attempt(Ho,e.attempt(Uo,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Zp(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&qo.call(r,r.previous)&&!vi(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 f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),s?c:(s=!0,o)):n(d)}function c(d){return d===null||Qn(d)||ce(d)||Et(d)||pr(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 Jp(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function e1(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(jo,o,u)(c):c===null||ce(c)||Et(c)||c!==45&&pr(c)?o(c):(s=!0,e.consume(c),a)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function o(c){return i||r||!s?n(c):t(c)}}function t1(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(jo,t,s)(a):a===null||ce(a)||Et(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function n1(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),s):u===93?(e.consume(u),i):u===60||u===null||ce(u)||Et(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ce(u)||Et(u)?t(u):r(u)}function s(u){return Ce(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),a):n(u)}}function r1(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return xe(s)?n(s):t(s)}}function Yo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ce(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 vi(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 s=e.charCodeAt(n);let a="";if(s===37&&xe(e.charCodeAt(n+1))&&xe(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),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 s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const ni={name:"attention",resolveAll:i1,tokenize:s1};function i1(e,t){let n=-1,r,i,s,a,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},f={...e[n][1].start};ca(d,-o),ca(f,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Pe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Pe(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Pe(c,gr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Pe(c,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Pe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Re(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 s1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bt(r);let s;return a;function a(o){return s=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===s)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Bt(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(s===42?d:d&&(i||!f)),c._close=!!(s===42?f:f&&(h||!d)),t(o)}}function ca(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const a1={name:"autolink",tokenize:u1};function u1(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return Ce(m)?(e.consume(m),a):m===64?n(m):c(m)}function a(m){return m===43||m===45||m===46||xe(m)?(r=1,u(m)):c(m)}function u(m){return m===58?(e.consume(m),r=0,o):(m===43||m===45||m===46||xe(m))&&r++<32?(e.consume(m),u):(r=0,c(m))}function o(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Qn(m)?n(m):(e.consume(m),o)}function c(m){return m===64?(e.consume(m),h):om(m)?(e.consume(m),c):n(m)}function h(m){return xe(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):f(m)}function f(m){if((m===45||xe(m))&&r++<63){const E=m===45?f:d;return e.consume(m),E}return n(m)}}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return ne(o)?(e.enter(n),u(o)):t(o)}function u(o){return ne(o)&&s++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Nn={partial:!0,tokenize:o1};function o1(e,t,n){return r;function r(s){return ne(s)?ie(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||q(s)?t(s):n(s)}}const Wo={continuation:{tokenize:c1},exit:h1,name:"blockQuote",tokenize:l1};function l1(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ne(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function c1(e,t,n){const r=this;return i;function i(a){return ne(a)?ie(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Wo,t,n)(a)}}function h1(e){e.exit("blockQuote")}const Go={name:"characterEscape",tokenize:d1};function d1(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return cm(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Ko={name:"characterReference",tokenize:f1};function f1(e,t,n){const r=this;let i=0,s,a;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"),s=31,a=xe,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=lm,h):(e.enter("characterReferenceValue"),s=7,a=ei,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===xe&&!Mi(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),h):n(d)}}const ha={partial:!0,tokenize:p1},da={concrete:!0,name:"codeFenced",tokenize:m1};function m1(e,t,n){const r=this,i={partial:!0,tokenize:z};let s=0,a=0,u;return o;function o(L){return c(L)}function c(L){const K=r.events[r.events.length-1];return s=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,u=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(L)}function h(L){return L===u?(a++,e.consume(L),h):a<3?n(L):(e.exit("codeFencedFenceSequence"),ne(L)?ie(e,d,"whitespace")(L):d(L))}function d(L){return L===null||q(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(ha,_,F)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(L))}function f(L){return L===null||q(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(L)):ne(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,m,"whitespace")(L)):L===96&&L===u?n(L):(e.consume(L),f)}function m(L){return L===null||q(L)?d(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(L))}function E(L){return L===null||q(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(L)):L===96&&L===u?n(L):(e.consume(L),E)}function _(L){return e.attempt(i,F,I)(L)}function I(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),C}function C(L){return s>0&&ne(L)?ie(e,w,"linePrefix",s+1)(L):w(L)}function w(L){return L===null||q(L)?e.check(ha,_,F)(L):(e.enter("codeFlowValue"),O(L))}function O(L){return L===null||q(L)?(e.exit("codeFlowValue"),w(L)):(e.consume(L),O)}function F(L){return e.exit("codeFenced"),t(L)}function z(L,K,G){let X=0;return N;function N(j){return L.enter("lineEnding"),L.consume(j),L.exit("lineEnding"),U}function U(j){return L.enter("codeFencedFence"),ne(j)?ie(L,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):M(j)}function M(j){return j===u?(L.enter("codeFencedFenceSequence"),V(j)):G(j)}function V(j){return j===u?(X++,L.consume(j),V):X>=a?(L.exit("codeFencedFenceSequence"),ne(j)?ie(L,$,"whitespace")(j):$(j)):G(j)}function $(j){return j===null||q(j)?(L.exit("codeFencedFence"),K(j)):G(j)}}}function p1(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Lr={name:"codeIndented",tokenize:E1},g1={partial:!0,tokenize:b1};function E1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,s,"linePrefix",5)(c)}function s(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?o(c):q(c)?e.attempt(g1,a,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||q(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function b1(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ie(e,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):q(a)?i(a):n(a)}}const T1={name:"codeText",previous:k1,resolve:x1,tokenize:_1};function x1(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 k1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _1(e,t,n){let r=0,i,s;return a;function a(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?(s=e.enter("codeTextSequence"),i=0,h(d)):q(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||q(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)):(s.type="codeTextData",c(d))}}class A1{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Kt(this.left,r),s.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,s,a,u,o,c;const h=new A1(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,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,C1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[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 Re(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function C1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,o=[],c={};let h,d,f=-1,m=n,E=0,_=0;const I=[_];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(h=r.sliceStream(m),m.next||h.push(null),d&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(_=f+1,I.push(_),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):I.pop(),f=I.length;f--;){const C=u.slice(I[f],I[f+1]),w=s.pop();o.push([w,w+C.length-1]),e.splice(w,2,C)}for(o.reverse(),f=-1;++f<o.length;)c[E+o[f][0]]=E+o[f][1],E+=o[f][1]-o[f][0]-1;return c}const y1={resolve:N1,tokenize:S1},I1={partial:!0,tokenize:w1};function N1(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?s(u):q(u)?e.check(I1,a,s)(u):(e.consume(u),i)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function w1(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ie(e,s,"linePrefix")}function s(a){if(a===null||q(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Xo(e,t,n,r,i,s,a,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(C){return C===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(C),e.exit(s),f):C===null||C===32||C===41||Qn(C)?n(C):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(C))}function f(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===62?(e.exit("chunkString"),e.exit(u),f(C)):C===null||C===60||q(C)?n(C):(e.consume(C),C===92?E:m)}function E(C){return C===60||C===62||C===92?(e.consume(C),m):m(C)}function _(C){return!h&&(C===null||C===41||ce(C))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(C)):h<c&&C===40?(e.consume(C),h++,_):C===41?(e.consume(C),h--,_):C===null||C===32||C===40||Qn(C)?n(C):(e.consume(C),C===92?I:_)}function I(C){return C===40||C===41||C===92?(e.consume(C),_):_(C)}}function Zo(e,t,n,r,i,s){const a=this;let u=0,o;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),h}function h(m){return u>999||m===null||m===91||m===93&&!o||m===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):q(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||q(m)||u++>999?(e.exit("chunkString"),h(m)):(e.consume(m),o||(o=!ne(m)),m===92?f:d)}function f(m){return m===91||m===92||m===93?(e.consume(m),u++,d):d(m)}}function Jo(e,t,n,r,i,s){let a;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,o):n(f)}function o(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),c(f))}function c(f){return f===a?(e.exit(s),o(a)):f===null?n(f):q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===a||f===null||q(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===a||f===92?(e.consume(f),h):h(f)}}function hn(e,t){let n;return r;function r(i){return q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ne(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const L1={name:"definition",tokenize:R1},O1={partial:!0,tokenize:D1};function R1(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return Zo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o):n(m)}function o(m){return ce(m)?hn(e,c)(m):c(m)}function c(m){return Xo(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(O1,d,d)(m)}function d(m){return ne(m)?ie(e,f,"whitespace")(m):f(m)}function f(m){return m===null||q(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function D1(e,t,n){return r;function r(u){return ce(u)?hn(e,i)(u):n(u)}function i(u){return Jo(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return ne(u)?ie(e,a,"whitespace")(u):a(u)}function a(u){return u===null||q(u)?t(u):n(u)}}const P1={name:"hardBreakEscape",tokenize:M1};function M1(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return q(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const v1={name:"headingAtx",resolve:B1,tokenize:F1};function B1(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Re(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function F1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||ce(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||q(h)?(e.exit("atxHeading"),t(h)):ne(h)?ie(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||ce(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const H1=["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"],fa=["pre","script","style","textarea"],U1={concrete:!0,name:"htmlFlow",resolveTo:$1,tokenize:Y1},j1={partial:!0,tokenize:V1},z1={partial:!0,tokenize:q1};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 Y1(e,t,n){const r=this;let i,s,a,u,o;return c;function c(k){return h(k)}function h(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),s=!0,_):k===63?(e.consume(k),i=3,r.interrupt?t:x):Ce(k)?(e.consume(k),a=String.fromCharCode(k),I):n(k)}function f(k){return k===45?(e.consume(k),i=2,m):k===91?(e.consume(k),i=5,u=0,E):Ce(k)?(e.consume(k),i=4,r.interrupt?t:x):n(k)}function m(k){return k===45?(e.consume(k),r.interrupt?t:x):n(k)}function E(k){const Be="CDATA[";return k===Be.charCodeAt(u++)?(e.consume(k),u===Be.length?r.interrupt?t:M:E):n(k)}function _(k){return Ce(k)?(e.consume(k),a=String.fromCharCode(k),I):n(k)}function I(k){if(k===null||k===47||k===62||ce(k)){const Be=k===47,ct=a.toLowerCase();return!Be&&!s&&fa.includes(ct)?(i=1,r.interrupt?t(k):M(k)):H1.includes(a.toLowerCase())?(i=6,Be?(e.consume(k),C):r.interrupt?t(k):M(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?w(k):O(k))}return k===45||xe(k)?(e.consume(k),a+=String.fromCharCode(k),I):n(k)}function C(k){return k===62?(e.consume(k),r.interrupt?t:M):n(k)}function w(k){return ne(k)?(e.consume(k),w):N(k)}function O(k){return k===47?(e.consume(k),N):k===58||k===95||Ce(k)?(e.consume(k),F):ne(k)?(e.consume(k),O):N(k)}function F(k){return k===45||k===46||k===58||k===95||xe(k)?(e.consume(k),F):z(k)}function z(k){return k===61?(e.consume(k),L):ne(k)?(e.consume(k),z):O(k)}function L(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,K):ne(k)?(e.consume(k),L):G(k)}function K(k){return k===o?(e.consume(k),o=null,X):k===null||q(k)?n(k):(e.consume(k),K)}function G(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ce(k)?z(k):(e.consume(k),G)}function X(k){return k===47||k===62||ne(k)?O(k):n(k)}function N(k){return k===62?(e.consume(k),U):n(k)}function U(k){return k===null||q(k)?M(k):ne(k)?(e.consume(k),U):n(k)}function M(k){return k===45&&i===2?(e.consume(k),B):k===60&&i===1?(e.consume(k),W):k===62&&i===4?(e.consume(k),we):k===63&&i===3?(e.consume(k),x):k===93&&i===5?(e.consume(k),se):q(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(j1,Ge,V)(k)):k===null||q(k)?(e.exit("htmlFlowData"),V(k)):(e.consume(k),M)}function V(k){return e.check(z1,$,Ge)(k)}function $(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),j}function j(k){return k===null||q(k)?V(k):(e.enter("htmlFlowData"),M(k))}function B(k){return k===45?(e.consume(k),x):M(k)}function W(k){return k===47?(e.consume(k),a="",oe):M(k)}function oe(k){if(k===62){const Be=a.toLowerCase();return fa.includes(Be)?(e.consume(k),we):M(k)}return Ce(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),oe):M(k)}function se(k){return k===93?(e.consume(k),x):M(k)}function x(k){return k===62?(e.consume(k),we):k===45&&i===2?(e.consume(k),x):M(k)}function we(k){return k===null||q(k)?(e.exit("htmlFlowData"),Ge(k)):(e.consume(k),we)}function Ge(k){return e.exit("htmlFlow"),t(k)}}function q1(e,t,n){const r=this;return i;function i(a){return q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function V1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nn,t,n)}}const W1={name:"htmlText",tokenize:G1};function G1(e,t,n){const r=this;let i,s,a;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),z):x===63?(e.consume(x),O):Ce(x)?(e.consume(x),G):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),s=0,E):Ce(x)?(e.consume(x),w):n(x)}function h(x){return x===45?(e.consume(x),m):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):q(x)?(a=d,W(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),m):d(x)}function m(x){return x===62?B(x):x===45?f(x):d(x)}function E(x){const we="CDATA[";return x===we.charCodeAt(s++)?(e.consume(x),s===we.length?_:E):n(x)}function _(x){return x===null?n(x):x===93?(e.consume(x),I):q(x)?(a=_,W(x)):(e.consume(x),_)}function I(x){return x===93?(e.consume(x),C):_(x)}function C(x){return x===62?B(x):x===93?(e.consume(x),C):_(x)}function w(x){return x===null||x===62?B(x):q(x)?(a=w,W(x)):(e.consume(x),w)}function O(x){return x===null?n(x):x===63?(e.consume(x),F):q(x)?(a=O,W(x)):(e.consume(x),O)}function F(x){return x===62?B(x):O(x)}function z(x){return Ce(x)?(e.consume(x),L):n(x)}function L(x){return x===45||xe(x)?(e.consume(x),L):K(x)}function K(x){return q(x)?(a=K,W(x)):ne(x)?(e.consume(x),K):B(x)}function G(x){return x===45||xe(x)?(e.consume(x),G):x===47||x===62||ce(x)?X(x):n(x)}function X(x){return x===47?(e.consume(x),B):x===58||x===95||Ce(x)?(e.consume(x),N):q(x)?(a=X,W(x)):ne(x)?(e.consume(x),X):B(x)}function N(x){return x===45||x===46||x===58||x===95||xe(x)?(e.consume(x),N):U(x)}function U(x){return x===61?(e.consume(x),M):q(x)?(a=U,W(x)):ne(x)?(e.consume(x),U):X(x)}function M(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,V):q(x)?(a=M,W(x)):ne(x)?(e.consume(x),M):(e.consume(x),$)}function V(x){return x===i?(e.consume(x),i=void 0,j):x===null?n(x):q(x)?(a=V,W(x)):(e.consume(x),V)}function $(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ce(x)?X(x):(e.consume(x),$)}function j(x){return x===47||x===62||ce(x)?X(x):n(x)}function B(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function W(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),oe}function oe(x){return ne(x)?ie(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):se(x)}function se(x){return e.enter("htmlTextData"),a(x)}}const Bi={name:"labelEnd",resolveAll:Z1,resolveTo:J1,tokenize:eg},K1={tokenize:tg},Q1={tokenize:ng},X1={tokenize:rg};function Z1(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&&Re(e,0,e.length,n),e}function J1(e,t){let n=e.length,r=0,i,s,a,u;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Pe(u,e.slice(s+1,s+r+3)),u=Pe(u,[["enter",h,t]]),u=Pe(u,gr(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=Pe(u,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),u=Pe(u,e.slice(a+1)),u=Pe(u,[["exit",o,t]]),Re(e,s,e.length,u),e}function eg(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(f){return s?s._inactive?d(f):(a=r.parser.defined.includes(je(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(K1,h,a?h:d)(f):f===91?e.attempt(Q1,h,a?c:d)(f):a?h(f):d(f)}function c(f){return e.attempt(X1,h,d)(f)}function h(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function tg(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 ce(d)?hn(e,s)(d):s(d)}function s(d){return d===41?h(d):Xo(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ce(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 ce(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 ng(e,t,n){const r=this;return i;function i(u){return Zo.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function rg(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const ig={name:"labelStartImage",resolveAll:Bi.resolveAll,tokenize:sg};function sg(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ag={name:"labelStartLink",resolveAll:Bi.resolveAll,tokenize:ug};function ug(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Or={name:"lineEnding",tokenize:og};function og(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const zn={name:"thematicBreak",tokenize:lg};function lg(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),ne(c)?ie(e,u,"whitespace")(c):u(c))}}const Ne={continuation:{tokenize:fg},exit:pg,name:"list",tokenize:dg},cg={partial:!0,tokenize:gg},hg={partial:!0,tokenize:mg};function dg(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(m){const E=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:ei(m)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(zn,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(m)}return n(m)}function o(m){return ei(m)&&++a<10?(e.consume(m),o):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Nn,r.interrupt?n:h,e.attempt(cg,f,d))}function h(m){return r.containerState.initialBlankLine=!0,s++,f(m)}function d(m){return ne(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),f):n(m)}function f(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function fg(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nn,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!ne(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hg,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function mg(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function pg(e){e.exit(this.containerState.type)}function gg(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ne(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ma={name:"setextUnderline",resolveTo:Eg,tokenize:bg};function Eg(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function bg(e,t,n){const r=this;let i;return s;function s(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,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),ne(c)?ie(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Tg={tokenize:Ng,partial:!0};function xg(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Cg,continuation:{tokenize:yg},exit:Ig}},text:{91:{name:"gfmFootnoteCall",tokenize:Ag},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kg,resolveTo:_g}}}}function kg(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=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(!a||!a._balanced)return n(o);const c=je(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function _g(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Ag(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;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(s>999||d===93&&!a||d===null||d===91||ce(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(je(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ce(d)||(a=!0),s++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function Cg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=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(a>999||E===93&&!u||E===null||E===91||ce(E))return n(E);if(E===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=je(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ce(E)||(u=!0),a++,e.consume(E),E===92?d:h}function d(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}function f(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(s)||i.push(s),ie(e,m,"gfmFootnoteDefinitionWhitespace")):n(E)}function m(E){return t(E)}}function yg(e,t,n){return e.check(Nn,t,e.attempt(Tg,t,n))}function Ig(e){e.exit("gfmFootnoteDefinition")}function Ng(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Sg(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let c=o;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[o][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[o][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[o][1].start)},f=[["enter",h,u],["enter",a[c][1],u],["exit",a[c][1],u],["enter",d,u]],m=u.parser.constructs.insideSpan.null;m&&Re(f,f.length,0,gr(m,a.slice(c+1,o),u)),Re(f,f.length,0,[["exit",d,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",h,u]]),Re(a,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function s(a,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(E){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(E):(a.enter("strikethroughSequenceTemporary"),m(E))}function m(E){const _=Bt(c);if(E===126)return d>1?o(E):(a.consume(E),d++,m);if(d<2&&!n)return o(E);const I=a.exit("strikethroughSequenceTemporary"),C=Bt(E);return I._open=!C||C===2&&!!_,I._close=!_||_===2&&!!C,u(E)}}}class wg{constructor(){this.map=[]}add(t,n,r){Lg(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function Lg(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 s=r.length-1;r[s]=r[s]==="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 Rg(){return{flow:{null:{name:"table",tokenize:Dg,resolveAll:Pg}}}}function Dg(e,t,n){const r=this;let i=0,s=0,a;return u;function u(N){let U=r.events.length-1;for(;U>-1;){const $=r.events[U][1].type;if($==="lineEnding"||$==="linePrefix")U--;else break}const M=U>-1?r.events[U][1].type:null,V=M==="tableHead"||M==="tableRow"?L:o;return V===L&&r.parser.lazy[r.now().line]?n(N):V(N)}function o(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(a=!0,s+=1),h(N)}function h(N){return N===null?n(N):q(N)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),m):n(N):ne(N)?ie(e,h,"whitespace")(N):(s+=1,a&&(a=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||ce(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?f:d)}function f(N){return N===92||N===124?(e.consume(N),d):d(N)}function m(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),a=!1,ne(N)?ie(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?I(N):N===124?(a=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),_):z(N)}function _(N){return ne(N)?ie(e,I,"whitespace")(N):I(N)}function I(N){return N===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),C):N===45?(s+=1,C(N)):N===null||q(N)?F(N):z(N)}function C(N){return N===45?(e.enter("tableDelimiterFiller"),w(N)):z(N)}function w(N){return N===45?(e.consume(N),w):N===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(N))}function O(N){return ne(N)?ie(e,F,"whitespace")(N):F(N)}function F(N){return N===124?E(N):N===null||q(N)?!a||i!==s?z(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):z(N)}function z(N){return n(N)}function L(N){return e.enter("tableRow"),K(N)}function K(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),K):N===null||q(N)?(e.exit("tableRow"),t(N)):ne(N)?ie(e,K,"whitespace")(N):(e.enter("data"),G(N))}function G(N){return N===null||N===124||ce(N)?(e.exit("data"),K(N)):(e.consume(N),N===92?X:G)}function X(N){return N===92||N===124?(e.consume(N),G):G(N)}}function Pg(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,c,h,d;const f=new wg;for(;++n<e.length;){const m=e[n],E=m[1];m[0]==="enter"?E.type==="tableHead"?(u=!1,o!==0&&(pa(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.add(n,0,[["enter",c,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.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,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=Dn(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=Dn(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):E.type==="tableHead"?(u=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=Dn(f,t,s,i,n,d)):a[1]!==0&&(d=Dn(f,t,a,i,n,d)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&pa(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Og(t.events,n))}return e}function Dn(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Ot(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=Ot(t.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,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 f=t.events[n[2]],m=t.events[n[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,_=n[3]-n[2]-1;e.add(E,_,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Ot(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function pa(e,t,n,r,i){const s=[],a=Ot(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Ot(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Mg={name:"tasklistCheck",tokenize:Bg};function vg(){return{text:{91:Mg}}}function Bg(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"),s)}function s(o){return ce(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return q(o)?t(o):ne(o)?e.check({tokenize:Fg},t,n)(o):n(o)}}function Fg(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Hg(e){return Fo([Kp(),xg(),Sg(e),Rg(),vg()])}const Ug={};function jg(e){const t=this,n=e||Ug,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Hg(n)),s.push($p()),a.push(Yp(n))}var zg=Object.defineProperty,$g=Object.defineProperties,Yg=Object.getOwnPropertyDescriptors,ga=Object.getOwnPropertySymbols,qg=Object.prototype.hasOwnProperty,Vg=Object.prototype.propertyIsEnumerable,Ea=(e,t,n)=>t in e?zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,el=(e,t)=>{for(var n in t||(t={}))qg.call(t,n)&&Ea(e,n,t[n]);if(ga)for(var n of ga(t))Vg.call(t,n)&&Ea(e,n,t[n]);return e},tl=(e,t)=>$g(e,Yg(t)),Wg=/(\*\*)([^*]*\*?)$/,Gg=/(__)([^_]*?)$/,Kg=/(\*\*\*)([^*]*?)$/,Qg=/(\*)([^*]*?)$/,Xg=/(_)([^_]*?)$/,Zg=/(`)([^`]*?)$/,Jg=/(~~)([^~]*?)$/,At=/^[\s_~*`]*$/,nl=/^[\s]*[-*+][\s]+$/,eE=/[\p{L}\p{N}_]/u,tE=/^```[^`\n]*```?$/,nE=/^\*{4,}$/,rE=/(__)([^_]+)_$/,iE=/(~~)([^~]+)~$/,sE=/__/g,ba=/~~/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:eE.test(e)},bt=(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},aE=(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},uE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
22
+ `)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]==="]"?uE(e,t):!1;if(e[n]===`
23
+ `)return!1}return!1},Fi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
24
24
  `){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
25
- `){i=o;break}let s=e.substring(r,i),a=0,u=!1;for(let o of s)if(o===n)a+=1;else if(o!==" "&&o!==" "){u=!0;break}return a>=3&&!u},bE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,TE=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(bE,(t,n,r,i)=>xt(e,i)?t:`${n}\\>${r}`),xE=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
26
- `){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},_E=(e,t,n,r)=>n==="\\"||e.includes("$")&&Tr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ut(n)&&ut(r)||(!n||n===" "||n===" "||n===`
25
+ `){i=o;break}let s=e.substring(r,i),a=0,u=!1;for(let o of s)if(o===n)a+=1;else if(o!==" "&&o!==" "){u=!0;break}return a>=3&&!u},oE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,lE=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(oE,(t,n,r,i)=>bt(e,i)?t:`${n}\\>${r}`),cE=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
26
+ `){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},hE=(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===`
27
27
  `)&&(!r||r===" "||r===" "||r===`
28
- `)||xE(e,t,r)),fl=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]:"",s=r<n-1?e[r+1]:"";_E(e,r,i,s)||(t+=1)}return t},kE=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Tr(e,t)||dl(e,t)||n==="_"||r==="_"||n&&r&&ut(n)&&ut(r)),AE=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]:"",s=r<n-1?e[r+1]:"";kE(e,r,i,s)||(t+=1)}return t},yE=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},CE=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
29
- `),i=r===-1?0:r+1,s=e.substring(i,n);return cl.test(s)&&t.includes(`
30
- `)?!0:Wi(e,n,"*")},IE=e=>{let t=e.match(rE);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||CE(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},NE=(e,t,n)=>{if(!t||Ct.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
31
- `),i=r===-1?0:r+1,s=e.substring(i,n);return cl.test(s)&&t.includes(`
32
- `)?!0:Wi(e,n,"_")},SE=e=>{let t=e.match(iE);if(!t){let i=e.match(fE);if(i){let s=e.lastIndexOf(i[1]);if(!xt(e,s)&&(e.match(mE)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||NE(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},wE=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Tr(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
28
+ `)||cE(e,t,r)),sl=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]:"",s=r<n-1?e[r+1]:"";hE(e,r,i,s)||(t+=1)}return t},dE=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Er(e,t)||il(e,t)||n==="_"||r==="_"||n&&r&&ut(n)&&ut(r)),fE=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]:"",s=r<n-1?e[r+1]:"";dE(e,r,i,s)||(t+=1)}return t},mE=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},pE=(e,t,n)=>{if(!t||At.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
29
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return nl.test(s)&&t.includes(`
30
+ `)?!0:Fi(e,n,"*")},gE=e=>{let t=e.match(Wg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bt(e,r)||pE(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},EE=(e,t,n)=>{if(!t||At.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
31
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return nl.test(s)&&t.includes(`
32
+ `)?!0:Fi(e,n,"_")},bE=e=>{let t=e.match(Gg);if(!t){let i=e.match(rE);if(i){let s=e.lastIndexOf(i[1]);if(!bt(e,s)&&(e.match(sE)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return bt(e,r)||EE(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},TE=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===`
33
33
  `)&&(!r||r===" "||r===" "||r===`
34
- `)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},OE=e=>{if(!e.match(aE))return e;let t=wE(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);return!n||Ct.test(n)?e:fl(e)%2===1?`${e}*`:e},pl=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Tr(e,t)&&!dl(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},LE=e=>{let t=e.length;for(;t>0&&e[t-1]===`
35
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},RE=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=pl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},DE=e=>{if(!e.match(uE))return e;let t=pl(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);if(!n||Ct.test(n))return e;if(AE(e)%2===1){let r=RE(e);return r!==null?r:LE(e)}return e},PE=e=>{let t=(e.match(/\*\*/g)||[]).length,n=fl(e);return t%2===0&&n%2===0},vE=(e,t,n)=>!t||Ct.test(t)||xt(e,n)?!0:Wi(e,n,"*"),ME=e=>{if(dE.test(e))return e;let t=e.match(sE);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return vE(e,n,r)?e:yE(e)%2===1?PE(e)?e:`${e}***`:e},_n=(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},BE=(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},FE=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!BE(e,n)&&(t+=1);return t},HE=/<[a-zA-Z/][^>]*$/,UE=e=>{let t=e.match(HE);return!t||t.index===void 0||_n(e,t.index)?e:e.substring(0,t.index).trimEnd()},jE=e=>!e.match(hE)||e.includes(`
36
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,zE=e=>(e.match(/```/g)||[]).length%2===1,$E=e=>{let t=jE(e);if(t!==null)return t;let n=e.match(oE);if(n&&!zE(e)){let r=n[2];if(!r||Ct.test(r))return e;if(FE(e)%2===1)return`${e}\``}return e},YE=(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)==="```",qE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!YE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},WE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
34
+ `)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},xE=e=>{if(!e.match(Qg))return e;let t=TE(e);if(t===-1||bt(e,t))return e;let n=e.substring(t+1);return!n||At.test(n)?e:sl(e)%2===1?`${e}*`:e},al=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},kE=e=>{let t=e.length;for(;t>0&&e[t-1]===`
35
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},_E=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=al(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},AE=e=>{if(!e.match(Xg))return e;let t=al(e);if(t===-1||bt(e,t))return e;let n=e.substring(t+1);if(!n||At.test(n))return e;if(fE(e)%2===1){let r=_E(e);return r!==null?r:kE(e)}return e},CE=e=>{let t=(e.match(/\*\*/g)||[]).length,n=sl(e);return t%2===0&&n%2===0},yE=(e,t,n)=>!t||At.test(t)||bt(e,n)?!0:Fi(e,n,"*"),IE=e=>{if(nE.test(e))return e;let t=e.match(Kg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return yE(e,n,r)?e:mE(e)%2===1?CE(e)?e:`${e}***`:e},Tn=(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},NE=(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]==="`"&&!NE(e,n)&&(t+=1);return t},wE=/<[a-zA-Z/][^>]*$/,LE=e=>{let t=e.match(wE);return!t||t.index===void 0||Tn(e,t.index)?e:e.substring(0,t.index).trimEnd()},OE=e=>!e.match(tE)||e.includes(`
36
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,RE=e=>(e.match(/```/g)||[]).length%2===1,DE=e=>{let t=OE(e);if(t!==null)return t;let n=e.match(Zg);if(n&&!RE(e)){let r=n[2];if(!r||At.test(r))return e;if(SE(e)%2===1)return`${e}\``}return e},PE=(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)==="```",ME=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!PE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},vE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
37
37
  `,t)!==-1&&!e.endsWith(`
38
38
  `)?`${e}
39
- $$`:`${e}$$`},VE=e=>qE(e)%2===0?e:WE(e),GE=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=gE(e,t);if(r===-1||_n(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let u=e.substring(r+1,t);return n==="text-only"?`${a}${u}`:`${a}[${u}](streamdown:incomplete-link)`},Na=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!_n(e,n)){if(n>0&&e[n-1]==="!")continue;let r=hl(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},KE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,s=e.substring(t+1);if(!s.includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=Na(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${a}${s}`}return`${e}](streamdown:incomplete-link)`}if(hl(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=Na(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${a}${o}`}return`${e}](streamdown:incomplete-link)`}return null},ml=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!_n(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]==="["&&!_n(e,r)){let i=KE(e,r,t);if(i!==null)return i}return e},QE=/^-{1,2}$/,XE=/^[\s]*-{1,2}[\s]+$/,ZE=/^={1,2}$/,JE=/^[\s]*={1,2}[\s]+$/,eb=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
40
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(QE.test(i)&&!n.match(XE)){let s=r.split(`
41
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(ZE.test(i)&&!n.match(JE)){let s=r.split(`
42
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},tb=e=>{let t=e.match(lE);if(t){let n=t[2];if(!n||Ct.test(n))return e;if((e.match(Ia)||[]).length%2===1)return`${e}~~`}else if(e.match(pE)&&(e.match(Ia)||[]).length%2===1)return`${e}~`;return e},vr=e=>e!==!1,ye={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},nb=[{handler:{name:"comparisonOperators",handle:TE,priority:ye.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:UE,priority:ye.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:eb,priority:ye.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:ml,priority:ye.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:ME,priority:ye.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:IE,priority:ye.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:SE,priority:ye.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:OE,priority:ye.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:DE,priority:ye.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:$E,priority:ye.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:tb,priority:ye.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:VE,priority:ye.KATEX},optionKey:"katex"}],rb=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return nb.filter(({handler:r,optionKey:i})=>r.name==="links"?vr(e?.links)||vr(e?.images):vr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:ll(ol({},r),{handle:s=>ml(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},ib=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=rb(t),s=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:ll(ol({},u),{priority:(o=u.priority)!=null?o:ye.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:ye.DEFAULT)-((h=o.handler.priority)!=null?h:ye.DEFAULT)});for(let{handler:u,earlyReturn:o}of a)if(r=u.handle(r),o!=null&&o(r))return r;return r},sb=ib;const ab=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ub=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ob={};function Sa(e,t){return(ob.jsx?ub:ab).test(e)}const lb=/[ \t\n\f\r]/g;function cb(e){return typeof e=="object"?e.type==="text"?wa(e.value):!1:wa(e)}function wa(e){return e.replace(lb,"")===""}var Rt={},Mr,Oa;function hb(){if(Oa)return Mr;Oa=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
43
- `,c="/",h="*",d="",f="comment",p="declaration";function E(I,y){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];y=y||{};var w=1,L=1;function F($){var j=$.match(t);j&&(w+=j.length);var B=$.lastIndexOf(o);L=~B?$.length-B:L+$.length}function z(){var $={line:w,column:L};return function(j){return j.position=new O($),X(),j}}function O($){this.start=$,this.end={line:w,column:L},this.source=y.source}O.prototype.content=I;function K($){var j=new Error(y.source+":"+w+":"+L+": "+$);if(j.reason=$,j.filename=y.source,j.line=w,j.column=L,j.source=I,!y.silent)throw j}function G($){var j=$.exec(I);if(j){var B=j[0];return F(B),I=I.slice(B.length),j}}function X(){G(n)}function N($){var j;for($=$||[];j=U();)j!==!1&&$.push(j);return $}function U(){var $=z();if(!(c!=I.charAt(0)||h!=I.charAt(1))){for(var j=2;d!=I.charAt(j)&&(h!=I.charAt(j)||c!=I.charAt(j+1));)++j;if(j+=2,d===I.charAt(j-1))return K("End of comment missing");var B=I.slice(2,j-2);return L+=2,F(B),I=I.slice(j),L+=2,$({type:f,comment:B})}}function v(){var $=z(),j=G(r);if(j){if(U(),!G(i))return K("property missing ':'");var B=G(s),V=$({type:p,property:k(j[0].replace(e,d)),value:B?k(B[0].replace(e,d)):d});return G(a),V}}function W(){var $=[];N($);for(var j;j=v();)j!==!1&&($.push(j),N($));return $}return X(),W()}function k(I){return I?I.replace(u,d):d}return Mr=E,Mr}var La;function db(){if(La)return Rt;La=1;var e=Rt&&Rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.default=n;const t=e(hb());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(s=s||{},s[c]=h)}),s}return Rt}var Zt={},Ra;function fb(){if(Ra)return Zt;Ra=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},a=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),s(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,a))};return Zt.camelCase=o,Zt}var Jt,Da;function pb(){if(Da)return Jt;Da=1;var e=Jt&&Jt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(db()),n=fb();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(a[(0,n.camelCase)(u,s)]=o)}),a}return r.default=r,Jt=r,Jt}var mb=pb();const gb=Au(mb);function pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pa(e.position):"start"in e||"end"in e?Pa(e):"line"in e||"column"in e?ai(e):""}function ai(e){return va(e&&e.line)+":"+va(e&&e.column)}function Pa(e){return ai(e&&e.start)+"-"+ai(e&&e.end)}function va(e){return e&&typeof e=="number"?e:1}class Ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=pn(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const Vi={}.hasOwnProperty,Eb=new Map,bb=/[A-Z]/g,Tb=new Set(["table","tbody","thead","tfoot","tr"]),xb=new Set(["td","th"]),gl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _b(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=wb(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=Sb(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:In,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=El(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function El(e,t,n){if(t.type==="element")return kb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ab(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Cb(e,t,n);if(t.type==="mdxjsEsm")return yb(e,t);if(t.type==="root")return Ib(e,t,n);if(t.type==="text")return Nb(e,t)}function kb(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 s=Tl(e,t.tagName,!1),a=Ob(e,t);let u=Ki(e,t);return Tb.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!cb(o):!0})),bl(e,a,s,t),Gi(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ab(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)}kn(e,t.position)}function yb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kn(e,t.position)}function Cb(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 s=t.name===null?e.Fragment:Tl(e,t.name,!0),a=Lb(e,t),u=Ki(e,t);return bl(e,a,s,t),Gi(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ib(e,t,n){const r={};return Gi(r,Ki(e,t)),e.create(t,e.Fragment,r,n)}function Nb(e,t){return t.value}function bl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Sb(e,t,n){return r;function r(i,s,a,u){const c=Array.isArray(a.children)?n:t;return u?c(s,a,u):c(s,a)}}function wb(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=We(r);return t(i,s,a,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Ob(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Vi.call(t.properties,i)){const s=Rb(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&xb.has(t.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else kn(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(u.expression)}else kn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ki(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Eb;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const c=i.get(o)||0;a=o+"-"+c,i.set(o,c+1)}}const u=El(e,s,a);u!==void 0&&n.push(u)}return n}function Rb(e,t,n){const r=hr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Fu(n):Hu(n)),r.property==="style"){let i=typeof n=="object"?n:Db(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Pb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Wh[r.property]||r.property:r.attribute,n]}}function Db(e,t){try{return gb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("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=gl+"#cannot-parse-style-attribute",i}}function Tl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const u=Sa(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=Sa(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Vi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);kn(e)}function kn(e,t){const n=new Ae("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=gl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Pb(e){const t={};let n;for(n in e)Vi.call(e,n)&&(t[vb(n)]=e[n]);return t}function vb(e){let t=e.replace(bb,Mb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Mb(e){return"-"+e.toLowerCase()}const Br={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"]},Bb={tokenize:Fb};function Fb(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"),ie(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),s(u)}function s(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return q(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const Hb={tokenize:Ub},Ma={tokenize:jb};function Ub(e){const t=this,n=[];let r=0,i,s,a;return u;function u(L){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const F=t.events.length;let z=F,O;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){O=t.events[z][1].end;break}y(r);let K=F;for(;K<t.events.length;)t.events[K][1].end={...O},K++;return Pe(t.events,z+1,0,t.events.slice(F)),t.events.length=K,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return f(L);if(i.currentConstruct&&i.currentConstruct.concrete)return E(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ma,h,d)(L)}function h(L){return i&&w(),y(r),f(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,E(L)}function f(L){return t.containerState={},e.attempt(Ma,p,E)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),f(L)}function E(L){if(L===null){i&&w(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(L)}function k(L){if(L===null){I(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return q(L)?(e.consume(L),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),k)}function I(L,F){const z=t.sliceStream(L);if(F&&z.push(null),L.previous=s,s&&(s.next=L),s=L,i.defineSkip(L.start),i.write(z),t.parser.lazy[L.start.line]){let O=i.events.length;for(;O--;)if(i.events[O][1].start.offset<a&&(!i.events[O][1].end||i.events[O][1].end.offset>a))return;const K=t.events.length;let G=K,X,N;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(X){N=t.events[G][1].end;break}X=!0}for(y(r),O=K;O<t.events.length;)t.events[O][1].end={...N},O++;Pe(t.events,G+1,0,t.events.slice(K)),t.events.length=O}}function y(L){let F=n.length;for(;F-- >L;){const z=n[F];t.containerState=z[1],z[0].exit.call(t,e)}n.length=L}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function jb(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const zb={tokenize:$b};function $b(e){const t=this,n=e.attempt(On,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(v1,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Yb={resolveAll:_l()},qb=xl("string"),Wb=xl("text");function xl(e){return{resolveAll:_l(e==="text"?Vb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,u);return a;function a(h){return c(h)?s(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"),s(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function _l(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Vb(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 s=i.length,a=-1,u=0,o;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(c===-2)o=!0,u++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,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:Se,43:Se,45:Se,48:Se,49:Se,50:Se,51:Se,52:Se,53:Se,54:Se,55:Se,56:Se,57:Se,62:tl},Kb={91:U1},Qb={[-2]:Dr,[-1]:Dr,32:Dr},Xb={35:W1,42:qn,45:[ka,qn],60:Q1,61:ka,95:qn,96:xa,126:xa},Zb={38:rl,92:nl},Jb={[-5]:Pr,[-4]:Pr,[-3]:Pr,33:pg,38:rl,42:si,60:[g1,rg],91:gg,92:[Y1,nl],93:qi,95:si,96:w1},eT={null:[si,Yb]},tT={null:[42,95]},nT={null:[]},rT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tT,contentInitial:Kb,disable:nT,document:Gb,flow:Xb,flowInitial:Qb,insideSpan:eT,string:Zb,text:Jb},Symbol.toStringTag,{value:"Module"}));function iT(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={},s=[];let a=[],u=[];const o={attempt:K(z),check:K(O),consume:w,enter:L,exit:F,interrupt:K(O,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&s.push(t),c;function d(U){return a=Me(a,U),I(),a[a.length-1]!==null?[]:(G(t,0),c.events=br(s,c.events,c),c.events)}function f(U,v){return aT(p(U),v)}function p(U){return sT(a,U)}function E(){const{_bufferIndex:U,_index:v,line:W,column:$,offset:j}=r;return{_bufferIndex:U,_index:v,line:W,column:$,offset:j}}function k(U){i[U.line]=U.column,N()}function I(){let U;for(;r._index<a.length;){const v=a[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 w(U){q(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,N()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,v){const W=v||{};return W.type=U,W.start=E(),c.events.push(["enter",W,c]),u.push(W),W}function F(U){const v=u.pop();return v.end=E(),c.events.push(["exit",v,c]),v}function z(U,v){G(U,v.from)}function O(U,v){v.restore()}function K(U,v){return W;function W($,j,B){let V,oe,se,x;return Array.isArray($)?Ge($):"tokenize"in $?Ge([$]):Oe($);function Oe(Te){return qt;function qt(et){const Nt=et!==null&&Te[et],St=et!==null&&Te.null,Dn=[...Array.isArray(Nt)?Nt:Nt?[Nt]:[],...Array.isArray(St)?St:St?[St]:[]];return Ge(Dn)(et)}}function Ge(Te){return V=Te,oe=0,Te.length===0?B:_(Te[oe])}function _(Te){return qt;function qt(et){return x=X(),se=Te,Te.partial||(c.currentConstruct=Te),Te.name&&c.parser.constructs.disable.null.includes(Te.name)?ct():Te.tokenize.call(v?Object.assign(Object.create(c),v):c,o,He,ct)(et)}}function He(Te){return U(se,x),j}function ct(Te){return x.restore(),++oe<V.length?_(V[oe]):B}}}function G(U,v){U.resolveAll&&!s.includes(U)&&s.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,W=c.currentConstruct,$=c.events.length,j=Array.from(u);return{from:$,restore:B};function B(){r=U,c.previous=v,c.currentConstruct=W,c.events.length=$,u=j,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function sT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function aT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
39
+ $$`:`${e}$$`},BE=e=>ME(e)%2===0?e:vE(e),FE=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=aE(e,t);if(r===-1||Tn(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let u=e.substring(r+1,t);return n==="text-only"?`${a}${u}`:`${a}[${u}](streamdown:incomplete-link)`},Ta=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!Tn(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},HE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,s=e.substring(t+1);if(!s.includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=Ta(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${a}${s}`}return`${e}](streamdown:incomplete-link)`}if(rl(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=Ta(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${a}${o}`}return`${e}](streamdown:incomplete-link)`}return null},ul=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Tn(e,n)){let r=FE(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Tn(e,r)){let i=HE(e,r,t);if(i!==null)return i}return e},UE=/^-{1,2}$/,jE=/^[\s]*-{1,2}[\s]+$/,zE=/^={1,2}$/,$E=/^[\s]*={1,2}[\s]+$/,YE=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
40
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(UE.test(i)&&!n.match(jE)){let s=r.split(`
41
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(zE.test(i)&&!n.match($E)){let s=r.split(`
42
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},qE=e=>{let t=e.match(Jg);if(t){let n=t[2];if(!n||At.test(n))return e;if((e.match(ba)||[]).length%2===1)return`${e}~~`}else if(e.match(iE)&&(e.match(ba)||[]).length%2===1)return`${e}~`;return e},Rr=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},VE=[{handler:{name:"comparisonOperators",handle:lE,priority:Ae.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:LE,priority:Ae.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:YE,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:gE,priority:Ae.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:bE,priority:Ae.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:xE,priority:Ae.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:AE,priority:Ae.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:DE,priority:Ae.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:qE,priority:Ae.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:BE,priority:Ae.KATEX},optionKey:"katex"}],WE=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return VE.filter(({handler:r,optionKey:i})=>r.name==="links"?Rr(e?.links)||Rr(e?.images):Rr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:tl(el({},r),{handle:s=>ul(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},GE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=WE(t),s=((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}}),a=[...i,...s].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 a)if(r=u.handle(r),o!=null&&o(r))return r;return r},KE=GE;const QE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZE={};function xa(e,t){return(ZE.jsx?XE:QE).test(e)}const JE=/[ \t\n\f\r]/g;function eb(e){return typeof e=="object"?e.type==="text"?ka(e.value):!1:ka(e)}function ka(e){return e.replace(JE,"")===""}var Lt={},Dr,_a;function tb(){if(_a)return Dr;_a=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
43
+ `,c="/",h="*",d="",f="comment",m="declaration";function E(I,C){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];C=C||{};var w=1,O=1;function F($){var j=$.match(t);j&&(w+=j.length);var B=$.lastIndexOf(o);O=~B?$.length-B:O+$.length}function z(){var $={line:w,column:O};return function(j){return j.position=new L($),X(),j}}function L($){this.start=$,this.end={line:w,column:O},this.source=C.source}L.prototype.content=I;function K($){var j=new Error(C.source+":"+w+":"+O+": "+$);if(j.reason=$,j.filename=C.source,j.line=w,j.column=O,j.source=I,!C.silent)throw j}function G($){var j=$.exec(I);if(j){var B=j[0];return F(B),I=I.slice(B.length),j}}function X(){G(n)}function N($){var j;for($=$||[];j=U();)j!==!1&&$.push(j);return $}function U(){var $=z();if(!(c!=I.charAt(0)||h!=I.charAt(1))){for(var j=2;d!=I.charAt(j)&&(h!=I.charAt(j)||c!=I.charAt(j+1));)++j;if(j+=2,d===I.charAt(j-1))return K("End of comment missing");var B=I.slice(2,j-2);return O+=2,F(B),I=I.slice(j),O+=2,$({type:f,comment:B})}}function M(){var $=z(),j=G(r);if(j){if(U(),!G(i))return K("property missing ':'");var B=G(s),W=$({type:m,property:_(j[0].replace(e,d)),value:B?_(B[0].replace(e,d)):d});return G(a),W}}function V(){var $=[];N($);for(var j;j=M();)j!==!1&&($.push(j),N($));return $}return X(),V()}function _(I){return I?I.replace(u,d):d}return Dr=E,Dr}var Aa;function nb(){if(Aa)return Lt;Aa=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(tb());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(s=s||{},s[c]=h)}),s}return Lt}var Qt={},Ca;function rb(){if(Ca)return Qt;Ca=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)-/,s=function(c){return!c||n.test(c)||e.test(c)},a=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),s(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,a))};return Qt.camelCase=o,Qt}var Xt,ya;function ib(){if(ya)return Xt;ya=1;var e=Xt&&Xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(nb()),n=rb();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(a[(0,n.camelCase)(u,s)]=o)}),a}return r.default=r,Xt=r,Xt}var sb=ib();const ab=pu(sb);function dn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ia(e.position):"start"in e||"end"in e?Ia(e):"line"in e||"column"in e?ri(e):""}function ri(e){return Na(e&&e.line)+":"+Na(e&&e.column)}function Ia(e){return ri(e&&e.start)+"-"+ri(e&&e.end)}function Na(e){return e&&typeof e=="number"?e:1}class _e extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_e.prototype.file="";_e.prototype.name="";_e.prototype.reason="";_e.prototype.message="";_e.prototype.stack="";_e.prototype.column=void 0;_e.prototype.line=void 0;_e.prototype.ancestors=void 0;_e.prototype.cause=void 0;_e.prototype.fatal=void 0;_e.prototype.place=void 0;_e.prototype.ruleId=void 0;_e.prototype.source=void 0;const Hi={}.hasOwnProperty,ub=new Map,ob=/[A-Z]/g,lb=new Set(["table","tbody","thead","tfoot","tr"]),cb=new Set(["td","th"]),ol="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hb(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=Tb(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=bb(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:An,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=ll(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function ll(e,t,n){if(t.type==="element")return db(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pb(e,t,n);if(t.type==="mdxjsEsm")return mb(e,t);if(t.type==="root")return gb(e,t,n);if(t.type==="text")return Eb(e,t)}function db(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 s=hl(e,t.tagName,!1),a=xb(e,t);let u=ji(e,t);return lb.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!eb(o):!0})),cl(e,a,s,t),Ui(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function fb(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)}xn(e,t.position)}function mb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xn(e,t.position)}function pb(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 s=t.name===null?e.Fragment:hl(e,t.name,!0),a=kb(e,t),u=ji(e,t);return cl(e,a,s,t),Ui(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function gb(e,t,n){const r={};return Ui(r,ji(e,t)),e.create(t,e.Fragment,r,n)}function Eb(e,t){return t.value}function cl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ui(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bb(e,t,n){return r;function r(i,s,a,u){const c=Array.isArray(a.children)?n:t;return u?c(s,a,u):c(s,a)}}function Tb(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=Ve(r);return t(i,s,a,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function xb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Hi.call(t.properties,i)){const s=_b(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&cb.has(t.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function kb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else xn(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(u.expression)}else xn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function ji(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ub;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const c=i.get(o)||0;a=o+"-"+c,i.set(o,c+1)}}const u=ll(e,s,a);u!==void 0&&n.push(u)}return n}function _b(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:Ab(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Cb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?vh[r.property]||r.property:r.attribute,n]}}function Ab(e,t){try{return ab(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new _e("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 s=-1,a;for(;++s<i.length;){const u=xa(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=xa(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Hi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);xn(e)}function xn(e,t){const n=new _e("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 Cb(e){const t={};let n;for(n in e)Hi.call(e,n)&&(t[yb(n)]=e[n]);return t}function yb(e){let t=e.replace(ob,Ib);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ib(e){return"-"+e.toLowerCase()}const Pr={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"]},Nb={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"),ie(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),s(u)}function s(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return q(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const wb={tokenize:Lb},Sa={tokenize:Ob};function Lb(e){const t=this,n=[];let r=0,i,s,a;return u;function u(O){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,o,c)(O)}return c(O)}function o(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const F=t.events.length;let z=F,L;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){L=t.events[z][1].end;break}C(r);let K=F;for(;K<t.events.length;)t.events[K][1].end={...L},K++;return Re(t.events,z+1,0,t.events.slice(F)),t.events.length=K,c(O)}return u(O)}function c(O){if(r===n.length){if(!i)return f(O);if(i.currentConstruct&&i.currentConstruct.concrete)return E(O);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sa,h,d)(O)}function h(O){return i&&w(),C(r),f(O)}function d(O){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,E(O)}function f(O){return t.containerState={},e.attempt(Sa,m,E)(O)}function m(O){return r++,n.push([t.currentConstruct,t.containerState]),f(O)}function E(O){if(O===null){i&&w(),C(0),e.consume(O);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),_(O)}function _(O){if(O===null){I(e.exit("chunkFlow"),!0),C(0),e.consume(O);return}return q(O)?(e.consume(O),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(O),_)}function I(O,F){const z=t.sliceStream(O);if(F&&z.push(null),O.previous=s,s&&(s.next=O),s=O,i.defineSkip(O.start),i.write(z),t.parser.lazy[O.start.line]){let L=i.events.length;for(;L--;)if(i.events[L][1].start.offset<a&&(!i.events[L][1].end||i.events[L][1].end.offset>a))return;const K=t.events.length;let G=K,X,N;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(X){N=t.events[G][1].end;break}X=!0}for(C(r),L=K;L<t.events.length;)t.events[L][1].end={...N},L++;Re(t.events,G+1,0,t.events.slice(K)),t.events.length=L}}function C(O){let F=n.length;for(;F-- >O;){const z=n[F];t.containerState=z[1],z[0].exit.call(t,e)}n.length=O}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ob(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Rb={tokenize:Db};function Db(e){const t=this,n=e.attempt(Nn,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(y1,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Pb={resolveAll:fl()},Mb=dl("string"),vb=dl("text");function dl(e){return{resolveAll:fl(e==="text"?Bb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,u);return a;function a(h){return c(h)?s(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"),s(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const m=d[f];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function fl(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Bb(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 s=i.length,a=-1,u=0,o;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(c===-2)o=!0,u++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,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 Fb={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:Wo},Hb={91:L1},Ub={[-2]:Lr,[-1]:Lr,32:Lr},jb={35:v1,42:zn,45:[ma,zn],60:U1,61:ma,95:zn,96:da,126:da},zb={38:Ko,92:Go},$b={[-5]:Or,[-4]:Or,[-3]:Or,33:ig,38:Ko,42:ni,60:[a1,W1],91:ag,92:[P1,Go],93:Bi,95:ni,96:T1},Yb={null:[ni,Pb]},qb={null:[42,95]},Vb={null:[]},Wb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:qb,contentInitial:Hb,disable:Vb,document:Fb,flow:jb,flowInitial:Ub,insideSpan:Yb,string:zb,text:$b},Symbol.toStringTag,{value:"Module"}));function Gb(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={},s=[];let a=[],u=[];const o={attempt:K(z),check:K(L),consume:w,enter:O,exit:F,interrupt:K(L,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:E,parser:e,previous:null,sliceSerialize:f,sliceStream:m,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&s.push(t),c;function d(U){return a=Pe(a,U),I(),a[a.length-1]!==null?[]:(G(t,0),c.events=gr(s,c.events,c),c.events)}function f(U,M){return Qb(m(U),M)}function m(U){return Kb(a,U)}function E(){const{_bufferIndex:U,_index:M,line:V,column:$,offset:j}=r;return{_bufferIndex:U,_index:M,line:V,column:$,offset:j}}function _(U){i[U.line]=U.column,N()}function I(){let U;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<M.length;)C(M.charCodeAt(r._bufferIndex));else C(M)}}function C(U){h=h(U)}function w(U){q(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,N()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function O(U,M){const V=M||{};return V.type=U,V.start=E(),c.events.push(["enter",V,c]),u.push(V),V}function F(U){const M=u.pop();return M.end=E(),c.events.push(["exit",M,c]),M}function z(U,M){G(U,M.from)}function L(U,M){M.restore()}function K(U,M){return V;function V($,j,B){let W,oe,se,x;return Array.isArray($)?Ge($):"tokenize"in $?Ge([$]):we($);function we(be){return $t;function $t(et){const yt=et!==null&&be[et],It=et!==null&&be.null,Ln=[...Array.isArray(yt)?yt:yt?[yt]:[],...Array.isArray(It)?It:It?[It]:[]];return Ge(Ln)(et)}}function Ge(be){return W=be,oe=0,be.length===0?B:k(be[oe])}function k(be){return $t;function $t(et){return x=X(),se=be,be.partial||(c.currentConstruct=be),be.name&&c.parser.constructs.disable.null.includes(be.name)?ct():be.tokenize.call(M?Object.assign(Object.create(c),M):c,o,Be,ct)(et)}}function Be(be){return U(se,x),j}function ct(be){return x.restore(),++oe<W.length?k(W[oe]):B}}}function G(U,M){U.resolveAll&&!s.includes(U)&&s.push(U),U.resolve&&Re(c.events,M,c.events.length-M,U.resolve(c.events.slice(M),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function X(){const U=E(),M=c.previous,V=c.currentConstruct,$=c.events.length,j=Array.from(u);return{from:$,restore:B};function B(){r=U,c.previous=M,c.currentConstruct=V,c.events.length=$,u=j,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Kb(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Qb(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
44
44
  `;break}case-3:{a=`\r
45
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function uT(e){const r={constructs:Wo([rT,...(e||{}).extensions||[]]),content:i(Bb),defined:[],document:i(Hb),flow:i(zb),lazy:{},string:i(qb),text:i(Wb)};return r;function i(s){return a;function a(u){return iT(r,s,u)}}}function oT(e){for(;!il(e););return e}const Ba=/[\0\t\n\r]/g;function lT(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const o=[];let c,h,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Ba.lastIndex=d,c=Ba.exec(s),f=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(f),!c){t=s.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(s.slice(d,f)),e+=f-d),p){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=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const kl={}.hasOwnProperty;function cT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hT(n)(oT(uT(n).document().write(lT()(e,t,!0))))}function hT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xs),autolinkProtocol:X,autolinkEmail:X,atxHeading:s(Es),blockQuote:s(St),characterEscape:X,characterReference:X,codeFenced:s(Dn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Dn,a),codeText:s(Bc,a),codeTextData:X,data:X,codeFlowValue:X,definition:s(Fc),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Hc),hardBreakEscape:s(bs),hardBreakTrailing:s(bs),htmlFlow:s(Ts,a),htmlFlowData:X,htmlText:s(Ts,a),htmlTextData:X,image:s(Uc),label:a,link:s(xs),listItem:s(jc),listItemValue:f,listOrdered:s(_s,d),listUnordered:s(_s),paragraph:s(zc),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Es),strong:s($c),thematicBreak:s(qc)},exit:{atxHeading:o(),atxHeadingSequence:z,autolink:o(),autolinkEmail:Nt,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:Te,characterReference:qt,codeFenced:o(I),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:o(y),codeText:o(j),codeTextData:N,data:N,definition:o(),definitionDestinationString:F,definitionLabelString:w,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(W),htmlFlowData:N,htmlText:o($),htmlTextData:N,image:o(V),label:se,labelText:oe,lineEnding:U,link:o(B),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:He,resourceDestinationString:x,resourceTitleString:Oe,resource:Ge,setextHeading:o(G),setextHeadingLineSequence:K,setextHeadingText:O,strong:o(),thematicBreak:o()}};Al(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let H={type:"root",children:[]};const Z={stack:[H],tokenStack:[],config:t,enter:u,exit:c,buffer:a,resume:h,data:n},re=[];let le=-1;for(;++le<R.length;)if(R[le][1].type==="listOrdered"||R[le][1].type==="listUnordered")if(R[le][0]==="enter")re.push(le);else{const Ue=re.pop();le=i(R,Ue,le)}for(le=-1;++le<R.length;){const Ue=t[R[le][0]];kl.call(Ue,R[le][1].type)&&Ue[R[le][1].type].call(Object.assign({sliceSerialize:R[le][2].sliceSerialize},Z),R[le][1])}if(Z.tokenStack.length>0){const Ue=Z.tokenStack[Z.tokenStack.length-1];(Ue[1]||Fa).call(Z,void 0,Ue[0])}for(H.position={start:tt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:tt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<t.transforms.length;)H=t.transforms[le](H)||H;return H}function i(R,H,Z){let re=H-1,le=-1,Ue=!1,ht,Ke,Wt,Vt;for(;++re<=Z;){const Le=R[re];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?le++:le--,Vt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(ht&&!Vt&&!le&&!Wt&&(Wt=re),Vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vt=void 0}if(!le&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||le===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(ht){let wt=re;for(Ke=void 0;wt--;){const Qe=R[wt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ke&&(R[Ke][1].type="lineEndingBlank",Ue=!0),Qe[1].type="lineEnding",Ke=wt}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Wt&&(!Ke||Wt<Ke)&&(ht._spread=!0),ht.end=Object.assign({},Ke?R[Ke][1].start:Le[1].end),R.splice(Ke||re,0,["exit",ht,Le[2]]),re++,Z++}if(Le[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};ht=wt,R.splice(re,0,["enter",wt,Le[2]]),re++,Z++,Wt=void 0,Vt=!0}}}return R[H][1]._spread=Ue,Z}function s(R,H){return Z;function Z(re){u.call(this,R(re),re),H&&H.call(this,re)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(R,H,Z){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([H,Z||void 0]),R.position={start:tt(H.start),end:void 0}}function o(R){return H;function H(Z){R&&R.call(this,Z),c.call(this,Z)}}function c(R,H){const Z=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==R.type&&(H?H.call(this,R,re[0]):(re[1]||Fa).call(this,R,re[0]));else throw new Error("Cannot close `"+R.type+"` ("+pn({start:R.start,end:R.end})+"): it’s not open");Z.position.end=tt(R.end)}function h(){return ji(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(R){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function p(){const R=this.resume(),H=this.stack[this.stack.length-1];H.lang=R}function E(){const R=this.resume(),H=this.stack[this.stack.length-1];H.meta=R}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/(\r?\n|\r)$/g,"")}function w(R){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=ze(this.sliceSerialize(R)).toLowerCase()}function L(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function F(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function z(R){const H=this.stack[this.stack.length-1];if(!H.depth){const Z=this.sliceSerialize(R).length;H.depth=Z}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function K(R){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function X(R){const Z=this.stack[this.stack.length-1].children;let re=Z[Z.length-1];(!re||re.type!=="text")&&(re=Yc(),re.position={start:tt(R.start),end:void 0},Z.push(re)),this.stack.push(re)}function N(R){const H=this.stack.pop();H.value+=this.sliceSerialize(R),H.position.end=tt(R.end)}function U(R){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=H.children[H.children.length-1];Z.position.end=tt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(X.call(this,R),N.call(this,R))}function v(){this.data.atHardBreak=!0}function W(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function $(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function j(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function B(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function V(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function oe(R){const H=this.sliceSerialize(R),Z=this.stack[this.stack.length-2];Z.label=Um(H),Z.identifier=ze(H).toLowerCase()}function se(){const R=this.stack[this.stack.length-1],H=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const re=R.children;Z.children=re}else Z.alt=H}function x(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function Oe(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function Ge(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function He(R){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=ze(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ct(R){this.data.characterReferenceType=R.type}function Te(R){const H=this.sliceSerialize(R),Z=this.data.characterReferenceType;let re;Z?(re=qo(H,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=$i(H);const le=this.stack[this.stack.length-1];le.value+=re}function qt(R){const H=this.stack.pop();H.position.end=tt(R.end)}function et(R){N.call(this,R);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(R)}function Nt(R){N.call(this,R);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(R)}function St(){return{type:"blockquote",children:[]}}function Dn(){return{type:"code",lang:null,meta:null,value:""}}function Bc(){return{type:"inlineCode",value:""}}function Fc(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hc(){return{type:"emphasis",children:[]}}function Es(){return{type:"heading",depth:0,children:[]}}function bs(){return{type:"break"}}function Ts(){return{type:"html",value:""}}function Uc(){return{type:"image",title:null,url:"",alt:null}}function xs(){return{type:"link",title:null,url:"",children:[]}}function _s(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function jc(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function zc(){return{type:"paragraph",children:[]}}function $c(){return{type:"strong",children:[]}}function Yc(){return{type:"text",value:""}}function qc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function Al(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Al(e,r):dT(e,r)}}function dT(e,t){let n;for(n in t)if(kl.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 Fa(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is still open")}function fT(e){const t=this;t.parser=n;function n(r){return cT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pT(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 mT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
46
- `}]}function gT(e,t){const n=t.value?t.value+`
47
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function ET(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Yt(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+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(a)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function xT(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 _T(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yl(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function kT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);const i={src:Yt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function AT(e,t){const n={src:Yt(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 yT(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 CT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);const i={href:Yt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function IT(e,t){const n={href:Yt(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 NT(e,t,n){const r=e.all(t),i=n?ST(n):Cl(t),s={},a=[];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:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
45
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Xb(e){const r={constructs:Fo([Wb,...(e||{}).extensions||[]]),content:i(Nb),defined:[],document:i(wb),flow:i(Rb),lazy:{},string:i(Mb),text:i(vb)};return r;function i(s){return a;function a(u){return Gb(r,s,u)}}}function Zb(e){for(;!Qo(e););return e}const wa=/[\0\t\n\r]/g;function Jb(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const o=[];let c,h,d,f,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(wa.lastIndex=d,c=wa.exec(s),f=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(f),!c){t=s.slice(d);break}if(m===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(s.slice(d,f)),e+=f-d),m){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=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const ml={}.hasOwnProperty;function eT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),tT(n)(Zb(Xb(n).document().write(Jb()(e,t,!0))))}function tT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(cs),autolinkProtocol:X,autolinkEmail:X,atxHeading:s(us),blockQuote:s(It),characterEscape:X,characterReference:X,codeFenced:s(Ln),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ln,a),codeText:s(Nc,a),codeTextData:X,data:X,codeFlowValue:X,definition:s(Sc),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(wc),hardBreakEscape:s(os),hardBreakTrailing:s(os),htmlFlow:s(ls,a),htmlFlowData:X,htmlText:s(ls,a),htmlTextData:X,image:s(Lc),label:a,link:s(cs),listItem:s(Oc),listItemValue:f,listOrdered:s(hs,d),listUnordered:s(hs),paragraph:s(Rc),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(us),strong:s(Dc),thematicBreak:s(Mc)},exit:{atxHeading:o(),atxHeadingSequence:z,autolink:o(),autolinkEmail:yt,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:be,characterReference:$t,codeFenced:o(I),codeFencedFence:_,codeFencedFenceInfo:m,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:o(C),codeText:o(j),codeTextData:N,data:N,definition:o(),definitionDestinationString:F,definitionLabelString:w,definitionTitleString:O,emphasis:o(),hardBreakEscape:o(M),hardBreakTrailing:o(M),htmlFlow:o(V),htmlFlowData:N,htmlText:o($),htmlTextData:N,image:o(W),label:se,labelText:oe,lineEnding:U,link:o(B),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Be,resourceDestinationString:x,resourceTitleString:we,resource:Ge,setextHeading:o(G),setextHeadingLineSequence:K,setextHeadingText:L,strong:o(),thematicBreak:o()}};pl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let H={type:"root",children:[]};const Z={stack:[H],tokenStack:[],config:t,enter:u,exit:c,buffer:a,resume:h,data:n},re=[];let le=-1;for(;++le<R.length;)if(R[le][1].type==="listOrdered"||R[le][1].type==="listUnordered")if(R[le][0]==="enter")re.push(le);else{const Fe=re.pop();le=i(R,Fe,le)}for(le=-1;++le<R.length;){const Fe=t[R[le][0]];ml.call(Fe,R[le][1].type)&&Fe[R[le][1].type].call(Object.assign({sliceSerialize:R[le][2].sliceSerialize},Z),R[le][1])}if(Z.tokenStack.length>0){const Fe=Z.tokenStack[Z.tokenStack.length-1];(Fe[1]||La).call(Z,void 0,Fe[0])}for(H.position={start:tt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:tt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<t.transforms.length;)H=t.transforms[le](H)||H;return H}function i(R,H,Z){let re=H-1,le=-1,Fe=!1,ht,Ke,Yt,qt;for(;++re<=Z;){const Le=R[re];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?le++:le--,qt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(ht&&!qt&&!le&&!Yt&&(Yt=re),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!le&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||le===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(ht){let Nt=re;for(Ke=void 0;Nt--;){const Qe=R[Nt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ke&&(R[Ke][1].type="lineEndingBlank",Fe=!0),Qe[1].type="lineEnding",Ke=Nt}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?R[Ke][1].start:Le[1].end),R.splice(Ke||re,0,["exit",ht,Le[2]]),re++,Z++}if(Le[1].type==="listItemPrefix"){const Nt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};ht=Nt,R.splice(re,0,["enter",Nt,Le[2]]),re++,Z++,Yt=void 0,qt=!0}}}return R[H][1]._spread=Fe,Z}function s(R,H){return Z;function Z(re){u.call(this,R(re),re),H&&H.call(this,re)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(R,H,Z){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([H,Z||void 0]),R.position={start:tt(H.start),end:void 0}}function o(R){return H;function H(Z){R&&R.call(this,Z),c.call(this,Z)}}function c(R,H){const Z=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==R.type&&(H?H.call(this,R,re[0]):(re[1]||La).call(this,R,re[0]));else throw new Error("Cannot close `"+R.type+"` ("+dn({start:R.start,end:R.end})+"): it’s not open");Z.position.end=tt(R.end)}function h(){return Di(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(R){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function m(){const R=this.resume(),H=this.stack[this.stack.length-1];H.lang=R}function E(){const R=this.resume(),H=this.stack[this.stack.length-1];H.meta=R}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/(\r?\n|\r)$/g,"")}function w(R){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=je(this.sliceSerialize(R)).toLowerCase()}function O(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function F(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function z(R){const H=this.stack[this.stack.length-1];if(!H.depth){const Z=this.sliceSerialize(R).length;H.depth=Z}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function K(R){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function X(R){const Z=this.stack[this.stack.length-1].children;let re=Z[Z.length-1];(!re||re.type!=="text")&&(re=Pc(),re.position={start:tt(R.start),end:void 0},Z.push(re)),this.stack.push(re)}function N(R){const H=this.stack.pop();H.value+=this.sliceSerialize(R),H.position.end=tt(R.end)}function U(R){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=H.children[H.children.length-1];Z.position.end=tt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(X.call(this,R),N.call(this,R))}function M(){this.data.atHardBreak=!0}function V(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function $(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function j(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function B(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function W(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function oe(R){const H=this.sliceSerialize(R),Z=this.stack[this.stack.length-2];Z.label=Lp(H),Z.identifier=je(H).toLowerCase()}function se(){const R=this.stack[this.stack.length-1],H=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const re=R.children;Z.children=re}else Z.alt=H}function x(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function we(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function Ge(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Be(R){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=je(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ct(R){this.data.characterReferenceType=R.type}function be(R){const H=this.sliceSerialize(R),Z=this.data.characterReferenceType;let re;Z?(re=Bo(H,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=Mi(H);const le=this.stack[this.stack.length-1];le.value+=re}function $t(R){const H=this.stack.pop();H.position.end=tt(R.end)}function et(R){N.call(this,R);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(R)}function yt(R){N.call(this,R);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(R)}function It(){return{type:"blockquote",children:[]}}function Ln(){return{type:"code",lang:null,meta:null,value:""}}function Nc(){return{type:"inlineCode",value:""}}function Sc(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wc(){return{type:"emphasis",children:[]}}function us(){return{type:"heading",depth:0,children:[]}}function os(){return{type:"break"}}function ls(){return{type:"html",value:""}}function Lc(){return{type:"image",title:null,url:"",alt:null}}function cs(){return{type:"link",title:null,url:"",children:[]}}function hs(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Oc(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Rc(){return{type:"paragraph",children:[]}}function Dc(){return{type:"strong",children:[]}}function Pc(){return{type:"text",value:""}}function Mc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function pl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?pl(e,r):nT(e,r)}}function nT(e,t){let n;for(n in t)if(ml.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 La(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 rT(e){const t=this;t.parser=n;function n(r){return eT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function iT(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 sT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
46
+ `}]}function aT(e,t){const n=t.value?t.value+`
47
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function uT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zt(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+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(a)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function cT(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 hT(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function dT(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 s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function fT(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 mT(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 pT(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 s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function gT(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 ET(e,t,n){const r=e.all(t),i=n?bT(n):El(t),s={},a=[];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:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
48
48
  `}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&a.push({type:"text",value:`
49
- `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function ST(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=Cl(n[r])}return t}function Cl(e){const t=e.spread;return t??e.children.length>1}function wT(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function OT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function RT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=We(t.children[1]),o=gr(t.children[t.children.length-1]);u&&o&&(a.position={start:u,end:o}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function PT(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],f={},p=a?a[o]:void 0;p&&(f.align=p);let E={type:"element",tagName:s,properties:f,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 vT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ha=9,Ua=32;function MT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(ja(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(ja(t.slice(i),i>0,!1)),s.join("")}function ja(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Ha||s===Ua;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Ha||s===Ua;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function BT(e,t){const n={type:"text",value:MT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const HT={blockquote:pT,break:mT,code:gT,delete:ET,emphasis:bT,footnoteReference:TT,heading:xT,html:_T,imageReference:kT,image:AT,inlineCode:yT,linkReference:CT,link:IT,listItem:NT,list:wT,paragraph:OT,root:LT,strong:RT,table:DT,tableCell:vT,tableRow:PT,text:BT,thematicBreak:FT,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 jT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function zT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||UT,r=e.options.footnoteBackLabel||jT,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=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(),f=Yt(d.toLowerCase());let p=0;const E=[],k=e.footnoteCounts.get(d);for(;k!==void 0&&++p<=k;){E.length>0&&E.push({type:"text",value:" "});let w=typeof n=="string"?n:n(o,p);typeof w=="string"&&(w={type:"text",value:w}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const w=I.children[I.children.length-1];w&&w.type==="text"?w.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...E)}else h.push(...E);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},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:s,properties:{...bt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
49
+ `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function bT(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 TT(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function xT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _T(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Ve(t.children[1]),o=mr(t.children[t.children.length-1]);u&&o&&(a.position={start:u,end:o}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function CT(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],f={},m=a?a[o]:void 0;m&&(f.align=m);let E={type:"element",tagName:s,properties:f,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 yT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Oa=9,Ra=32;function IT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Da(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Da(t.slice(i),i>0,!1)),s.join("")}function Da(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Oa||s===Ra;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Oa||s===Ra;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function NT(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 wT={blockquote:iT,break:sT,code:aT,delete:uT,emphasis:oT,footnoteReference:lT,heading:cT,html:hT,imageReference:dT,image:fT,inlineCode:mT,linkReference:pT,link:gT,listItem:ET,list:TT,paragraph:xT,root:kT,strong:_T,table:AT,tableCell:yT,tableRow:CT,text:NT,thematicBreak:ST,toml:Pn,yaml:Pn,definition:Pn,footnoteDefinition:Pn};function Pn(){}function LT(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 RT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LT,r=e.options.footnoteBackLabel||OT,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=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(),f=zt(d.toLowerCase());let m=0;const E=[],_=e.footnoteCounts.get(d);for(;_!==void 0&&++m<=_;){E.length>0&&E.push({type:"text",value:" "});let w=typeof n=="string"?n:n(o,m);typeof w=="string"&&(w={type:"text",value:w}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const w=I.children[I.children.length-1];w&&w.type==="text"?w.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...E)}else h.push(...E);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(c,C),u.push(C)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...gt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
50
50
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
51
- `}]}}const ui={}.hasOwnProperty,$T={};function YT(e,t){const n=t||$T,r=new Map,i=new Map,s=new Map,a={...HT,...n.handlers},u={all:c,applyData:WT,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:qT,wrap:GT};return at(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(ui.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:k,...I}=h,y=bt(I);return y.children=u.all(h),y}return bt(h)}return(u.options.unknownHandler||VT)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const E=u.one(f[p],h);if(E){if(p&&f[p-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=za(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=za(k.value))}Array.isArray(E)?d.push(...E):d.push(E)}}}return d}}function qT(e,t){e.position&&(t.position=xo(e))}function WT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,bt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function VT(e,t){const n=t.data||{},r="value"in t&&!(ui.call(n,"hProperties")||ui.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:`
51
+ `}]}}const ii={}.hasOwnProperty,DT={};function PT(e,t){const n=t||DT,r=new Map,i=new Map,s=new Map,a={...wT,...n.handlers},u={all:c,applyData:vT,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:MT,wrap:FT};return at(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,m=u.handlers[f];if(ii.call(u.handlers,f)&&m)return m(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:_,...I}=h,C=gt(I);return C.children=u.all(h),C}return gt(h)}return(u.options.unknownHandler||BT)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let m=-1;for(;++m<f.length;){const E=u.one(f[m],h);if(E){if(m&&f[m-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Pa(E.value)),!Array.isArray(E)&&E.type==="element")){const _=E.children[0];_&&_.type==="text"&&(_.value=Pa(_.value))}Array.isArray(E)?d.push(...E):d.push(E)}}}return d}}function MT(e,t){e.position&&(t.position=ho(e))}function vT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,gt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function BT(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 FT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
52
52
  `});++r<e.length;)r&&n.push({type:"text",value:`
53
53
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
54
- `}),n}function za(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $a(e,t){const n=YT(e,t),r=n.one(e,void 0),i=zT(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
55
- `},i),s}function KT(e,t){return e&&"run"in e?async function(n,r){const i=$a(n,{file:r,...t});await e.run(i,r)}:function(n,r){return $a(n,{file:r,...e||t})}}function Ya(e){if(e)throw e}var Fr,qa;function QT(){if(qa)return Fr;qa=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]"},s=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 f;for(f in c);return typeof f>"u"||e.call(c,f)},a=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 Fr=function o(){var c,h,d,f,p,E,k=arguments[0],I=1,y=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},I=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});I<y;++I)if(c=arguments[I],c!=null)for(h in c)d=u(k,h),f=u(c,h),k!==f&&(w&&f&&(s(f)||(p=i(f)))?(p?(p=!1,E=d&&i(d)?d:[]):E=d&&s(d)?d:{},a(k,{name:h,newValue:o(w,E,f)})):typeof f<"u"&&a(k,{name:h,newValue:f}));return k},Fr}var XT=QT();const Hr=Au(XT);function oi(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 ZT(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(o,...c){const h=e[++s];let d=-1;if(o){a(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?JT(h,u)(...c):a(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 JT(e,t){let n;return r;function r(...a){const u=e.length>a.length;let o;u&&a.push(i);try{o=e.apply(this,a)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...u){n||(n=!0,t(a,...u))}function s(a){i(null,a)}}const Ye={basename:e2,dirname:t2,extname:n2,join:r2,sep:"/"};function e2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ln(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function t2(e){if(Ln(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 n2(e){Ln(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function r2(...e){let t=-1,n;for(;++t<e.length;)Ln(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":i2(n)}function i2(e){Ln(e);const t=e.codePointAt(0)===47;let n=s2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function s2(e,t){let n="",r=0,i=-1,s=0,a=-1,u,o;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function Ln(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const a2={cwd:u2};function u2(){return"/"}function li(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function o2(e){if(typeof e=="string")e=new URL(e);else if(!li(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 l2(e)}function l2(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 Ur=["history","path","basename","stem","extname","dirname"];class c2{constructor(t){let n;t?li(t)?n={path:t}:typeof t=="string"||h2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":a2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ur.length;){const s=Ur[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Ur.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){zr(t,"basename"),jr(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){Wa(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(jr(t,"extname"),Wa(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){li(t)&&(t=o2(t)),zr(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){zr(t,"stem"),jr(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 Ae(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 jr(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function zr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Wa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const d2=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),f2={}.hasOwnProperty;class Qi extends d2{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=ZT()}copy(){const t=new Qi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Hr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qr("data",this.frozen),this.namespace[t]=n,this):f2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qr("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 $r("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$r("process",this.parser||this.Parser),Yr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Fn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,E=r.stringify(p,f);g2(E)?f.value=E:f.result=E,c(h,f)});function c(h,d){h||!d?a(h):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),$r("processSync",this.parser||this.Parser),Yr("processSync",this.compiler||this.Compiler),this.process(t,i),Ga("processSync","process",n),r;function i(s,a){n=!0,Ya(s),r=a}}run(t,n,r){Va(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const o=Fn(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Ga("runSync","run",r),i;function s(a,u){Ya(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Fn(n),i=this.compiler||this.Compiler;return Yr("stringify",i),Va(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(qr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(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=Hr(!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];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...E]=h;const k=r[f][1];oi(k)&&oi(p)&&(p=Hr(!0,k,p)),r[f]=[c,p,...E]}}}}const p2=new Qi().freeze();function $r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qr(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 Va(e){if(!oi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ga(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fn(e){return m2(e)?e:new c2(e)}function m2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function g2(e){return typeof e=="string"||E2(e)}function E2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Xi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var It=Xi();function Il(e){It=e}var mn={exec:()=>null};function ae(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Ie.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var b2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ie={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")},T2=/^(?:[ \t]*(?:\n|$))+/,x2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_2=/^ {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+|$)/,k2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zi=/(?:[*+-]|\d{1,9}[.)])/,Nl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sl=ae(Nl).replace(/bull/g,Zi).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(),A2=ae(Nl).replace(/bull/g,Zi).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(),Ji=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y2=/^[^\n]+/,es=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,C2=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",es).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I2=ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zi).getRegex(),xr="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",ts=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,N2=ae("^ {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",ts).replace("tag",xr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wl=ae(Ji).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",xr).getRegex(),S2=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wl).getRegex(),ns={blockquote:S2,code:x2,def:C2,fences:_2,heading:k2,hr:Rn,html:N2,lheading:Sl,list:I2,newline:T2,paragraph:wl,table:mn,text:y2},Ka=ae("^ *([^\\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",xr).getRegex(),w2={...ns,lheading:A2,table:Ka,paragraph:ae(Ji).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ka).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",xr).getRegex()},O2={...ns,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ts).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:mn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(Ji).replace("hr",Rn).replace("heading",` *#{1,6} *[^
56
- ]`).replace("lheading",Sl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},L2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,R2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ol=/^( {2,}|\\)\n(?!\s*$)/,D2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_r=/[\p{P}\p{S}]/u,rs=/[\s\p{P}\p{S}]/u,Ll=/[^\s\p{P}\p{S}]/u,P2=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rs).getRegex(),Rl=/(?!~)[\p{P}\p{S}]/u,v2=/(?!~)[\s\p{P}\p{S}]/u,M2=/(?:[^\s\p{P}\p{S}]|~)/u,B2=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",b2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Dl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,F2=ae(Dl,"u").replace(/punct/g,_r).getRegex(),H2=ae(Dl,"u").replace(/punct/g,Rl).getRegex(),Pl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U2=ae(Pl,"gu").replace(/notPunctSpace/g,Ll).replace(/punctSpace/g,rs).replace(/punct/g,_r).getRegex(),j2=ae(Pl,"gu").replace(/notPunctSpace/g,M2).replace(/punctSpace/g,v2).replace(/punct/g,Rl).getRegex(),z2=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ll).replace(/punctSpace/g,rs).replace(/punct/g,_r).getRegex(),$2=ae(/\\(punct)/,"gu").replace(/punct/g,_r).getRegex(),Y2=ae(/^<(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(),q2=ae(ts).replace("(?:-->|$)","-->").getRegex(),W2=ae("^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",q2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,V2=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",tr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vl=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",tr).replace("ref",es).getRegex(),Ml=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",es).getRegex(),G2=ae("reflink|nolink(?!\\()","g").replace("reflink",vl).replace("nolink",Ml).getRegex(),Qa=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,is={_backpedal:mn,anyPunctuation:$2,autolink:Y2,blockSkip:B2,br:Ol,code:R2,del:mn,emStrongLDelim:F2,emStrongRDelimAst:U2,emStrongRDelimUnd:z2,escape:L2,link:V2,nolink:Ml,punctuation:P2,reflink:vl,reflinkSearch:G2,tag:W2,text:D2,url:mn},K2={...is,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",tr).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",tr).getRegex()},ci={...is,emStrongRDelimAst:j2,emStrongLDelim:H2,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qa).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qa).getRegex()},Q2={...ci,br:ae(Ol).replace("{2,}","*").getRegex(),text:ae(ci.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hn={normal:ns,gfm:w2,pedantic:O2},en={normal:is,gfm:ci,breaks:Q2,pedantic:K2},X2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xa=e=>X2[e];function Xe(e,t){if(t){if(Ie.escapeTest.test(e))return e.replace(Ie.escapeReplace,Xa)}else if(Ie.escapeTestNoEncode.test(e))return e.replace(Ie.escapeReplaceNoEncode,Xa);return e}function Za(e){try{e=encodeURI(e).replace(Ie.percentDecode,"%")}catch{return null}return e}function Ja(e,t){let n=e.replace(Ie.findPipe,(s,a,u)=>{let o=!1,c=a;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(Ie.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(Ie.slashPipe,"|");return r}function tn(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 Z2(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 eu(e,t,n,r,i){let s=t.href,a=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:s,title:a,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function J2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
54
+ `}),n}function Pa(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ma(e,t){const n=PT(e,t),r=n.one(e,void 0),i=RT(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
55
+ `},i),s}function HT(e,t){return e&&"run"in e?async function(n,r){const i=Ma(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ma(n,{file:r,...e||t})}}function va(e){if(e)throw e}var Mr,Ba;function UT(){if(Ba)return Mr;Ba=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]"},s=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 f;for(f in c);return typeof f>"u"||e.call(c,f)},a=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 Mr=function o(){var c,h,d,f,m,E,_=arguments[0],I=1,C=arguments.length,w=!1;for(typeof _=="boolean"&&(w=_,_=arguments[1]||{},I=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});I<C;++I)if(c=arguments[I],c!=null)for(h in c)d=u(_,h),f=u(c,h),_!==f&&(w&&f&&(s(f)||(m=i(f)))?(m?(m=!1,E=d&&i(d)?d:[]):E=d&&s(d)?d:{},a(_,{name:h,newValue:o(w,E,f)})):typeof f<"u"&&a(_,{name:h,newValue:f}));return _},Mr}var jT=UT();const vr=pu(jT);function si(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 zT(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(o,...c){const h=e[++s];let d=-1;if(o){a(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?$T(h,u)(...c):a(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(...a){const u=e.length>a.length;let o;u&&a.push(i);try{o=e.apply(this,a)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...u){n||(n=!0,t(a,...u))}function s(a){i(null,a)}}const $e={basename:YT,dirname:qT,extname:VT,join:WT,sep:"/"};function YT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Sn(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function qT(e){if(Sn(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 VT(e){Sn(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function WT(...e){let t=-1,n;for(;++t<e.length;)Sn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":GT(n)}function GT(e){Sn(e);const t=e.codePointAt(0)===47;let n=KT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function KT(e,t){let n="",r=0,i=-1,s=0,a=-1,u,o;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function Sn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QT={cwd:XT};function XT(){return"/"}function ai(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ZT(e){if(typeof e=="string")e=new URL(e);else if(!ai(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 JT(e)}function JT(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 Br=["history","path","basename","stem","extname","dirname"];class e2{constructor(t){let n;t?ai(t)?n={path:t}:typeof t=="string"||t2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Br.length;){const s=Br[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Br.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?$e.basename(this.path):void 0}set basename(t){Hr(t,"basename"),Fr(t,"basename"),this.path=$e.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$e.dirname(this.path):void 0}set dirname(t){Fa(this.basename,"dirname"),this.path=$e.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$e.extname(this.path):void 0}set extname(t){if(Fr(t,"extname"),Fa(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=$e.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ai(t)&&(t=ZT(t)),Hr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$e.basename(this.path,this.extname):void 0}set stem(t){Hr(t,"stem"),Fr(t,"stem"),this.path=$e.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 _e(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 Fr(e,t){if(e&&e.includes($e.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$e.sep+"`")}function Hr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function t2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n2=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),r2={}.hasOwnProperty;class zi extends n2{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=zT()}copy(){const t=new zi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(vr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zr("data",this.frozen),this.namespace[t]=n,this):r2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zr("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=Mn(t),r=this.parser||this.Parser;return Ur("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ur("process",this.parser||this.Parser),jr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Mn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const m=d,E=r.stringify(m,f);a2(E)?f.value=E:f.result=E,c(h,f)});function c(h,d){h||!d?a(h):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ur("processSync",this.parser||this.Parser),jr("processSync",this.compiler||this.Compiler),this.process(t,i),Ua("processSync","process",n),r;function i(s,a){n=!0,va(s),r=a}}run(t,n,r){Ha(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const o=Mn(n);i.run(t,o,c);function c(h,d,f){const m=d||t;h?u(h):a?a(m):r(void 0,m,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Ua("runSync","run",r),i;function s(a,u){va(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Mn(n),i=this.compiler||this.Compiler;return jr("stringify",i),Ha(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(zr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(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=vr(!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];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[m,...E]=h;const _=r[f][1];si(_)&&si(m)&&(m=vr(!0,_,m)),r[f]=[c,m,...E]}}}}const i2=new zi().freeze();function Ur(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zr(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 Ha(e){if(!si(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ua(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mn(e){return s2(e)?e:new e2(e)}function s2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function a2(e){return typeof e=="string"||u2(e)}function u2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function $i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ct=$i();function bl(e){Ct=e}var fn={exec:()=>null};function ae(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(ye.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var o2=(()=>{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")},l2=/^(?:[ \t]*(?:\n|$))+/,c2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,wn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yi=/(?:[*+-]|\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=ae(Tl).replace(/bull/g,Yi).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(),f2=ae(Tl).replace(/bull/g,Yi).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(),qi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m2=/^[^\n]+/,Vi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,p2=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),g2=ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yi).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",Wi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,E2=ae("^ {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",Wi).replace("tag",br).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kl=ae(qi).replace("hr",wn).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(),b2=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",kl).getRegex(),Gi={blockquote:b2,code:c2,def:p2,fences:h2,heading:d2,hr:wn,html:E2,lheading:xl,list:g2,newline:l2,paragraph:kl,table:fn,text:m2},ja=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",wn).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(),T2={...Gi,lheading:f2,table:ja,paragraph:ae(qi).replace("hr",wn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ja).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()},x2={...Gi,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wi).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:ae(qi).replace("hr",wn).replace("heading",` *#{1,6} *[^
56
+ ]`).replace("lheading",xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},k2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_l=/^( {2,}|\\)\n(?!\s*$)/,A2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Tr=/[\p{P}\p{S}]/u,Ki=/[\s\p{P}\p{S}]/u,Al=/[^\s\p{P}\p{S}]/u,C2=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ki).getRegex(),Cl=/(?!~)[\p{P}\p{S}]/u,y2=/(?!~)[\s\p{P}\p{S}]/u,I2=/(?:[^\s\p{P}\p{S}]|~)/u,N2=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",o2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,S2=ae(yl,"u").replace(/punct/g,Tr).getRegex(),w2=ae(yl,"u").replace(/punct/g,Cl).getRegex(),Il="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",L2=ae(Il,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,Ki).replace(/punct/g,Tr).getRegex(),O2=ae(Il,"gu").replace(/notPunctSpace/g,I2).replace(/punctSpace/g,y2).replace(/punct/g,Cl).getRegex(),R2=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,Ki).replace(/punct/g,Tr).getRegex(),D2=ae(/\\(punct)/,"gu").replace(/punct/g,Tr).getRegex(),P2=ae(/^<(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(),M2=ae(Wi).replace("(?:-->|$)","-->").getRegex(),v2=ae("^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",M2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,B2=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nl=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Zn).replace("ref",Vi).getRegex(),Sl=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vi).getRegex(),F2=ae("reflink|nolink(?!\\()","g").replace("reflink",Nl).replace("nolink",Sl).getRegex(),za=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qi={_backpedal:fn,anyPunctuation:D2,autolink:P2,blockSkip:N2,br:_l,code:_2,del:fn,emStrongLDelim:S2,emStrongRDelimAst:L2,emStrongRDelimUnd:R2,escape:k2,link:B2,nolink:Sl,punctuation:C2,reflink:Nl,reflinkSearch:F2,tag:v2,text:A2,url:fn},H2={...Qi,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Zn).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zn).getRegex()},ui={...Qi,emStrongRDelimAst:O2,emStrongLDelim:w2,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",za).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",za).getRegex()},U2={...ui,br:ae(_l).replace("{2,}","*").getRegex(),text:ae(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vn={normal:Gi,gfm:T2,pedantic:x2},Zt={normal:Qi,gfm:ui,breaks:U2,pedantic:H2},j2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$a=e=>j2[e];function Xe(e,t){if(t){if(ye.escapeTest.test(e))return e.replace(ye.escapeReplace,$a)}else if(ye.escapeTestNoEncode.test(e))return e.replace(ye.escapeReplaceNoEncode,$a);return e}function Ya(e){try{e=encodeURI(e).replace(ye.percentDecode,"%")}catch{return null}return e}function qa(e,t){let n=e.replace(ye.findPipe,(s,a,u)=>{let o=!1,c=a;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 z2(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 Va(e,t,n,r,i){let s=t.href,a=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:s,title:a,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(`
57
57
  `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[u]=a;return u.length>=i.length?s.slice(i.length):s}).join(`
58
- `)}var nr=class{options;rules;lexer;constructor(e){this.options=e||It}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:tn(n,`
59
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=J2(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=tn(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:tn(t[0],`
60
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=tn(t[0],`
58
+ `)}var Jn=class{options;rules;lexer;constructor(e){this.options=e||Ct}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,`
59
+ `)}}}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],`
60
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Jt(t[0],`
61
61
  `).split(`
62
62
  `),r="",i="",s=[];for(;n.length>0;){let a=!1,u=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),a=!0;else if(!a)u.push(n[o]);else break;n=n.slice(o);let c=u.join(`
63
63
  `),h=c.replace(this.rules.other.blockquoteSetextReplace,`
64
64
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
65
65
  ${c}`:c,i=i?`${i}
66
- ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,E=p.raw+`
66
+ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,E=m.raw+`
67
67
  `+n.join(`
68
- `),k=this.blockquote(E);s[s.length-1]=k,r=r.substring(0,r.length-p.raw.length)+k.raw,i=i.substring(0,i.length-p.text.length)+k.text;break}else if(f?.type==="list"){let p=f,E=p.raw+`
68
+ `),_=this.blockquote(E);s[s.length-1]=_,r=r.substring(0,r.length-m.raw.length)+_.raw,i=i.substring(0,i.length-m.text.length)+_.text;break}else if(f?.type==="list"){let m=f,E=m.raw+`
69
69
  `+n.join(`
70
- `),k=this.list(E);s[s.length-1]=k,r=r.substring(0,r.length-f.raw.length)+k.raw,i=i.substring(0,i.length-p.raw.length)+k.raw,n=E.substring(s.at(-1).raw.length).split(`
70
+ `),_=this.list(E);s[s.length-1]=_,r=r.substring(0,r.length-f.raw.length)+_.raw,i=i.substring(0,i.length-m.raw.length)+_.raw,n=E.substring(s.at(-1).raw.length).split(`
71
71
  `);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;e;){let o=!1,c="",h="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let d=t[2].split(`
72
- `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=e.split(`
73
- `,1)[0],p=!d.trim(),E=0;if(this.options.pedantic?(E=2,h=d.trimStart()):p?E=t[1].length+1:(E=t[2].search(this.rules.other.nonSpaceChar),E=E>4?1:E,h=d.slice(E),E+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(c+=f+`
74
- `,e=e.substring(f.length+1),o=!0),!o){let k=this.rules.other.nextBulletRegex(E),I=this.rules.other.hrRegex(E),y=this.rules.other.fencesBeginRegex(E),w=this.rules.other.headingBeginRegex(E),L=this.rules.other.htmlBeginRegex(E);for(;e;){let F=e.split(`
75
- `,1)[0],z;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),z=f):z=f.replace(this.rules.other.tabCharGlobal," "),y.test(f)||w.test(f)||L.test(f)||k.test(f)||I.test(f))break;if(z.search(this.rules.other.nonSpaceChar)>=E||!f.trim())h+=`
76
- `+z.slice(E);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(d)||w.test(d)||I.test(d))break;h+=`
77
- `+f}!p&&!f.trim()&&(p=!0),c+=F+`
78
- `,e=e.substring(F.length+1),d=z.slice(E)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!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=Ja(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
79
- `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(Ja(a,s.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[o]})));return s}}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)===`
80
- `?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 s=tn(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Z2(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[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)),eu(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 s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return eu(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,s,a,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(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){u+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){o+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+a);if(Math.min(i,a)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}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 hi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||It,this.options.tokenizer=this.options.tokenizer||new nr,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:Ie,block:Hn.normal,inline:en.normal};this.options.pedantic?(n.block=Hn.pedantic,n.inline=en.pedantic):this.options.gfm&&(n.block=Hn.gfm,this.options.breaks?n.inline=en.breaks:n.inline=en.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hn,inline:en}}static lex(t,n){return new hi(n).lex(t)}static lexInline(t,n){return new hi(n).inlineTokens(t)}lex(t){t=t.replace(Ie.carriageReturn,`
81
- `),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(Ie.tabCharGlobal," ").replace(Ie.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(a=>(i=a.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 a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
72
+ `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),f=e.split(`
73
+ `,1)[0],m=!d.trim(),E=0;if(this.options.pedantic?(E=2,h=d.trimStart()):m?E=t[1].length+1:(E=t[2].search(this.rules.other.nonSpaceChar),E=E>4?1:E,h=d.slice(E),E+=t[1].length),m&&this.rules.other.blankLine.test(f)&&(c+=f+`
74
+ `,e=e.substring(f.length+1),o=!0),!o){let _=this.rules.other.nextBulletRegex(E),I=this.rules.other.hrRegex(E),C=this.rules.other.fencesBeginRegex(E),w=this.rules.other.headingBeginRegex(E),O=this.rules.other.htmlBeginRegex(E);for(;e;){let F=e.split(`
75
+ `,1)[0],z;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),z=f):z=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||w.test(f)||O.test(f)||_.test(f)||I.test(f))break;if(z.search(this.rules.other.nonSpaceChar)>=E||!f.trim())h+=`
76
+ `+z.slice(E);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||w.test(d)||I.test(d))break;h+=`
77
+ `+f}!m&&!f.trim()&&(m=!0),c+=F+`
78
+ `,e=e.substring(F.length+1),d=z.slice(E)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!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=qa(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
79
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(qa(a,s.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[o]})));return s}}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)===`
80
+ `?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 s=Jt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=z2(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[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)),Va(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 s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Va(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,s,a,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(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){u+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){o+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+a);if(Math.min(i,a)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}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}}}},Me=class oi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ct,this.options.tokenizer=this.options.tokenizer||new Jn,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:vn.normal,inline:Zt.normal};this.options.pedantic?(n.block=vn.pedantic,n.inline=Zt.pedantic):this.options.gfm&&(n.block=vn.gfm,this.options.breaks?n.inline=Zt.breaks:n.inline=Zt.gfm),this.tokenizer.rules=n}static get rules(){return{block:vn,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,`
81
+ `),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(a=>(i=a.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 a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
82
82
  `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
83
83
  `)?"":`
84
84
  `)+i.raw,a.text+=`
@@ -91,7 +91,7 @@ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
91
91
  `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
92
92
  `)?"":`
93
93
  `)+i.raw,a.text+=`
94
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,u="";for(;t;){a||(u=""),a=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,u)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),a=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},rr=class{options;parser;constructor(e){this.options=e||It}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Ie.notSpaceStart)?.[0],i=e.replace(Ie.endingNewline,"")+`
94
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,u="";for(;t;){a||(u=""),a=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,u)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),a=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},er=class{options;parser;constructor(e){this.options=e||Ct}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(ye.notSpaceStart)?.[0],i=e.replace(ye.endingNewline,"")+`
95
95
  `;return r?'<pre><code class="language-'+Xe(r)+'">'+(n?i:Xe(i,!0))+`</code></pre>
96
96
  `:"<pre><code>"+(n?i:Xe(i,!0))+`</code></pre>
97
97
  `}blockquote({tokens:e}){return`<blockquote>
@@ -109,17 +109,16 @@ ${this.parser.parse(e)}</blockquote>
109
109
  `}tablerow({text:e}){return`<tr>
110
110
  ${e}</tr>
111
111
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
112
- `}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=Za(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Xe(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Za(e);if(i===null)return Xe(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Xe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},ss=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 di{options;renderer;textRenderer;constructor(t){this.options=t||It,this.options.renderer=this.options.renderer||new rr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ss}static parse(t,n){return new di(n).parse(t)}static parseInline(t,n){return new di(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 a=i,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=u||"";continue}}let s=i;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let a=s;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},sn=class{options;block;constructor(e){this.options=e||It}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}},ex=class{defaults=Xi();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=je;Renderer=rr;TextRenderer=ss;Lexer=Be;Tokenizer=nr;Hooks=sn;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 s=i;for(let a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of s.rows)for(let u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let s=i;r=r.concat(this.walkTokens(s.items,n));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let u=s[a].flat(1/0);r=r.concat(this.walkTokens(u,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.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(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=n.renderers[s.name];a?n.renderers[s.name]=function(...u){let o=s.renderer.apply(this,u);return o===!1&&(o=a.apply(this,u)),o}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[s.level];a?a.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new rr(this.defaults);for(let a in r.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let u=a,o=r.renderer[u],c=s[u];s[u]=(...h)=>{let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new nr(this.defaults);for(let a in r.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let u=a,o=r.tokenizer[u],c=s[u];s[u]=(...h)=>{let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new sn;for(let a in r.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let u=a,o=r.hooks[u],c=s[u];sn.passThroughHooks.has(a)?s[u]=h=>{if(this.defaults.async&&sn.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(s,h);return c.call(s,f)})();let d=o.call(s,h);return c.call(s,d)}:s[u]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(s,h);return f===!1&&(f=await c.apply(s,h)),f})();let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(a.call(this,u)),s&&(o=o.concat(s.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},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let u=s.hooks?await s.hooks.preprocess(n):n,o=await(s.hooks?await s.hooks.provideLexer():t?Be.lex:Be.lexInline)(u,s),c=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?je.parse:je.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let u=(s.hooks?s.hooks.provideLexer():t?Be.lex:Be.lexInline)(n,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let o=(s.hooks?s.hooks.provideParser():t?je.parse:je.parseInline)(u,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
113
- 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 ex;function ue(e,t){return _t.parse(e,t)}ue.options=ue.setOptions=function(e){return _t.setOptions(e),ue.defaults=_t.defaults,Il(ue.defaults),ue};ue.getDefaults=Xi;ue.defaults=It;ue.use=function(...e){return _t.use(...e),ue.defaults=_t.defaults,Il(ue.defaults),ue};ue.walkTokens=function(e,t){return _t.walkTokens(e,t)};ue.parseInline=_t.parseInline;ue.Parser=je;ue.parser=je.parse;ue.Renderer=rr;ue.TextRenderer=ss;ue.Lexer=Be;ue.lexer=Be.lex;ue.Tokenizer=nr;ue.Hooks=sn;ue.parse=ue;ue.options;ue.setOptions;ue.use;ue.walkTokens;ue.parseInline;je.parse;Be.lex;var tx=300,nx="300px",rx=500;function ix(e={}){let{immediate:t=!1,debounceDelay:n=tx,rootMargin:r=nx,idleTimeout:i=rx}=e,[s,a]=A.useState(!1),u=A.useRef(null),o=A.useRef(null),c=A.useRef(null),h=A.useMemo(()=>p=>{let E=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),d=A.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,E)=>window.requestIdleCallback(p,E):h,[h]),f=A.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return A.useEffect(()=>{if(t){a(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let E=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},k=L=>{c.current=d(F=>{F.timeRemaining()>0||F.didTimeout?(a(!0),L.disconnect()):c.current=d(()=>{a(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},I=L=>{E(),o.current=window.setTimeout(()=>{var F,z;let O=L.takeRecords();(O.length===0||(z=(F=O.at(-1))==null?void 0:F.isIntersecting)!=null&&z)&&k(L)},n)},y=(L,F)=>{L.isIntersecting?I(F):E()},w=new IntersectionObserver(L=>{for(let F of L)y(F,w)},{rootMargin:r,threshold:0});return w.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),w.disconnect()}},[t,n,r,i,f,d]),{shouldRender:s,containerRef:u}}var Bl=/\s/,sx=/^\s+$/,ax=new Set(["code","pre","svg","math","annotation"]),ux=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ox=e=>e.some(t=>ux(t)&&ax.has(t.tagName)),lx=e=>{let t=[],n="",r=!1;for(let i of e){let s=Bl.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},cx=e=>{let t=[],n="";for(let r of e)Bl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},hx=(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}]}),dx=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(ox(t))return Gn;let i=r,s=i.children.indexOf(e);if(s===-1)return;let a=e.value;if(!a.trim())return;let u=(n.sep==="char"?cx(a):lx(a)).map(o=>sx.test(o)?{type:"text",value:o}:hx(o,n.animation,n.duration,n.easing));return i.children.splice(s,1,...u),s+u.length};function fi(e){var t,n,r,i;let s={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:()=>a=>{Si(a,"text",(u,o)=>dx(u,o,s))}}}fi();var as=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"})}),us=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"})}),kr=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"})}),fx=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"})]}),px=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"})}),mx=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"})}),Fl=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"})}),tu=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"})}),gx=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"})}),Ex=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"})}),Q=(...e)=>Vc(Gc(e)),Bt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},bx=A.createContext({code:""}),Hl=()=>A.useContext(bx),nu=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let[u,o]=A.useState(!1),c=A.useRef(0),{code:h}=Hl(),{isAnimating:d}=A.useContext(Fe),f=s??h,p=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(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(I){t?.(I)}};A.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let E=u?as:us;return m.jsx("button",{className:Q("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:p,title:"Copy Code",type:"button",...a,children:r??m.jsx(E,{size:14})})},ru={"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"},Tx=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let{code:u}=Hl(),{isAnimating:o}=A.useContext(Fe),c=s??u,h=`file.${n&&n in ru?ru[n]:"txt"}`,d="text/plain",f=()=>{try{Bt(h,c,d),e?.()}catch(p){t?.(p)}};return m.jsx("button",{className:Q("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:f,title:"Download file",type:"button",...a,children:r??m.jsx(kr,{size:14})})},iu=()=>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(fx,{className:"size-4 animate-spin"})})]}),xx=/\.[^/.]+$/,_x=({node:e,className:t,src:n,alt:r,...i})=>{let s=async()=>{if(n)try{let a=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=a.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(xx,"")}.${f}`}Bt(h,a,a.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:Q("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:Q("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:s,title:"Download image",type:"button",children:m.jsx(kr,{size:14})})]}):null},gn=0,kx=()=>{gn+=1,gn===1&&(document.body.style.overflow="hidden")},Ax=()=>{gn=Math.max(0,gn-1),gn===0&&(document.body.style.overflow="")},yx=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,s]=A.useState(!1),a=A.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},[e]),u=A.useCallback(()=>{r(),n()},[r,n]);return A.useEffect(()=>{if(t){kx();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),Ax()}}},[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(Fl,{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(tu,{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:Q("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:a,type:"button",children:i?m.jsxs(m.Fragment,{children:[m.jsx(as,{size:14}),m.jsx("span",{children:"Copied"})]}):m.jsxs(m.Fragment,{children:[m.jsx(us,{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(tu,{size:14}),m.jsx("span",{children:"Open link"})]})]})]})}):null},pi=A.createContext(null),Ul=()=>A.useContext(pi),vk=()=>{var e;let t=Ul();return(e=t?.code)!=null?e:null},os=()=>{var e;let t=Ul();return(e=t?.mermaid)!=null?e:null},Cx=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="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){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>s(new Error("Failed to load SVG image")),u.src=a})},Ix=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let[a,u]=A.useState(!1),o=A.useRef(null),{isAnimating:c}=A.useContext(Fe),h=os(),d=async f=>{try{if(f==="mmd"){Bt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){s?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),E=e.split("").reduce((y,w)=>(y<<5)-y+w.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(E)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:I}=await p.render(k,e);if(!I){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Bt("diagram.svg",I,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let y=await Cx(I);Bt("diagram.png",y,"image/png"),r?.(f),u(!1);return}}catch(p){s?.(p)}};return A.useEffect(()=>{let f=p=>{let E=p.composedPath();o.current&&!E.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),m.jsxs("div",{className:"relative",ref:o,children:[m.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!a),title:"Download diagram",type:"button",children:t??m.jsx(kr,{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:()=>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]})},En=0,Nx=()=>{En+=1,En===1&&(document.body.style.overflow="hidden")},Sx=()=>{En=Math.max(0,En-1),En===0&&(document.body.style.overflow="")},wx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let[a,u]=A.useState(!1),{isAnimating:o,controls:c}=A.useContext(Fe),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!a)};return A.useEffect(()=>{if(a){Nx();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),Sx()}}},[a]),A.useEffect(()=>{a?n?.():r&&r()},[a,n,r]),m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Q("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",...s,children:m.jsx(px,{size:14})}),a?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.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(Fl,{size:20})}),m.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:m.jsx(gc,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},jl=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let u of s)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let u of a){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}},zl=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===`
112
+ `}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=Ya(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Xe(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ya(e);if(i===null)return Xe(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Xe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},Xi=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}},He=class li{options;renderer;textRenderer;constructor(t){this.options=t||Ct,this.options.renderer=this.options.renderer||new er,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xi}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 a=i,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=u||"";continue}}let s=i;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let a=s;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let u='Token with "'+a.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||Ct}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?Me.lex:Me.lexInline}provideParser(){return this.block?He.parse:He.parseInline}},Y2=class{defaults=$i();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=He;Renderer=er;TextRenderer=Xi;Lexer=Me;Tokenizer=Jn;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 s=i;for(let a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of s.rows)for(let u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let s=i;r=r.concat(this.walkTokens(s.items,n));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let u=s[a].flat(1/0);r=r.concat(this.walkTokens(u,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.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(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=n.renderers[s.name];a?n.renderers[s.name]=function(...u){let o=s.renderer.apply(this,u);return o===!1&&(o=a.apply(this,u)),o}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[s.level];a?a.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new er(this.defaults);for(let a in r.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let u=a,o=r.renderer[u],c=s[u];s[u]=(...h)=>{let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Jn(this.defaults);for(let a in r.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let u=a,o=r.tokenizer[u],c=s[u];s[u]=(...h)=>{let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new nn;for(let a in r.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let u=a,o=r.hooks[u],c=s[u];nn.passThroughHooks.has(a)?s[u]=h=>{if(this.defaults.async&&nn.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(s,h);return c.call(s,f)})();let d=o.call(s,h);return c.call(s,d)}:s[u]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(s,h);return f===!1&&(f=await c.apply(s,h)),f})();let d=o.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(a.call(this,u)),s&&(o=o.concat(s.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Me.lex(t,n??this.defaults)}parser(t,n){return He.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let u=s.hooks?await s.hooks.preprocess(n):n,o=await(s.hooks?await s.hooks.provideLexer():t?Me.lex:Me.lexInline)(u,s),c=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?He.parse:He.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let u=(s.hooks?s.hooks.provideLexer():t?Me.lex:Me.lexInline)(n,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let o=(s.hooks?s.hooks.provideParser():t?He.parse:He.parseInline)(u,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
113
+ 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}}},Tt=new Y2;function ue(e,t){return Tt.parse(e,t)}ue.options=ue.setOptions=function(e){return Tt.setOptions(e),ue.defaults=Tt.defaults,bl(ue.defaults),ue};ue.getDefaults=$i;ue.defaults=Ct;ue.use=function(...e){return Tt.use(...e),ue.defaults=Tt.defaults,bl(ue.defaults),ue};ue.walkTokens=function(e,t){return Tt.walkTokens(e,t)};ue.parseInline=Tt.parseInline;ue.Parser=He;ue.parser=He.parse;ue.Renderer=er;ue.TextRenderer=Xi;ue.Lexer=Me;ue.lexer=Me.lex;ue.Tokenizer=Jn;ue.Hooks=nn;ue.parse=ue;ue.options;ue.setOptions;ue.use;ue.walkTokens;ue.parseInline;He.parse;Me.lex;var q2=300,V2="300px",W2=500;function G2(e={}){let{immediate:t=!1,debounceDelay:n=q2,rootMargin:r=V2,idleTimeout:i=W2}=e,[s,a]=A.useState(!1),u=A.useRef(null),o=A.useRef(null),c=A.useRef(null),h=A.useMemo(()=>m=>{let E=Date.now();return window.setTimeout(()=>{m({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),d=A.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(m,E)=>window.requestIdleCallback(m,E):h,[h]),f=A.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?m=>window.cancelIdleCallback(m):m=>{clearTimeout(m)},[]);return A.useEffect(()=>{if(t){a(!0);return}let m=u.current;if(!m)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let E=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},_=O=>{c.current=d(F=>{F.timeRemaining()>0||F.didTimeout?(a(!0),O.disconnect()):c.current=d(()=>{a(!0),O.disconnect()},{timeout:i/2})},{timeout:i})},I=O=>{E(),o.current=window.setTimeout(()=>{var F,z;let L=O.takeRecords();(L.length===0||(z=(F=L.at(-1))==null?void 0:F.isIntersecting)!=null&&z)&&_(O)},n)},C=(O,F)=>{O.isIntersecting?I(F):E()},w=new IntersectionObserver(O=>{for(let F of O)C(F,w)},{rootMargin:r,threshold:0});return w.observe(m),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),w.disconnect()}},[t,n,r,i,f,d]),{shouldRender:s,containerRef:u}}var wl=/\s/,K2=/^\s+$/,Q2=new Set(["code","pre","svg","math","annotation"]),X2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Z2=e=>e.some(t=>X2(t)&&Q2.has(t.tagName)),J2=e=>{let t=[],n="",r=!1;for(let i of e){let s=wl.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},ex=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},tx=(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}]}),nx=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(Z2(t))return qn;let i=r,s=i.children.indexOf(e);if(s===-1)return;let a=e.value;if(!a.trim())return;let u=(n.sep==="char"?ex(a):J2(a)).map(o=>K2.test(o)?{type:"text",value:o}:tx(o,n.animation,n.duration,n.easing));return i.children.splice(s,1,...u),s+u.length};function ci(e){var t,n,r,i;let s={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:()=>a=>{xi(a,"text",(u,o)=>nx(u,o,s))}}}ci();var Zi=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),Ji=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),rx=e=>p.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[p.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),ix=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),sx=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),Wa=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),ax=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),ux=e=>p.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:p.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"})}),Q=(...e)=>Bc(Fc(e)),Mt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},ox=A.createContext({code:""}),Ol=()=>A.useContext(ox),Ga=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let[u,o]=A.useState(!1),c=A.useRef(0),{code:h}=Ol(),{isAnimating:d}=A.useContext(ve),f=s??h,m=async()=>{var _;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(I){t?.(I)}};A.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let E=u?Zi:Ji;return p.jsx("button",{className:Q("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:m,title:"Copy Code",type:"button",...a,children:r??p.jsx(E,{size:14})})},Ka={"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"},lx=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let{code:u}=Ol(),{isAnimating:o}=A.useContext(ve),c=s??u,h=`file.${n&&n in Ka?Ka[n]:"txt"}`,d="text/plain",f=()=>{try{Mt(h,c,d),e?.()}catch(m){t?.(m)}};return p.jsx("button",{className:Q("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:f,title:"Download file",type:"button",...a,children:r??p.jsx(xr,{size:14})})},Qa=()=>p.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[p.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),p.jsx("div",{className:"flex w-full items-center justify-center p-4",children:p.jsx(rx,{className:"size-4 animate-spin"})})]}),cx=/\.[^/.]+$/,hx=({node:e,className:t,src:n,alt:r,...i})=>{let s=async()=>{if(n)try{let a=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=a.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(cx,"")}.${f}`}Mt(h,a,a.type)}catch{window.open(n,"_blank")}};return n?p.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[p.jsx("img",{alt:r,className:Q("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),p.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p.jsx("button",{className:Q("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:s,title:"Download image",type:"button",children:p.jsx(xr,{size:14})})]}):null},mn=0,dx=()=>{mn+=1,mn===1&&(document.body.style.overflow="hidden")},fx=()=>{mn=Math.max(0,mn-1),mn===0&&(document.body.style.overflow="")},mx=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,s]=A.useState(!1),a=A.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},[e]),u=A.useCallback(()=>{r(),n()},[r,n]);return A.useEffect(()=>{if(t){dx();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),fx()}}},[t,n]),t?p.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:p.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:[p.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:p.jsx(Ll,{size:16})}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[p.jsx(Wa,{size:20}),p.jsx("span",{children:"Open external link?"})]}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),p.jsx("div",{className:Q("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),p.jsxs("div",{className:"flex gap-2",children:[p.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:a,type:"button",children:i?p.jsxs(p.Fragment,{children:[p.jsx(Zi,{size:14}),p.jsx("span",{children:"Copied"})]}):p.jsxs(p.Fragment,{children:[p.jsx(Ji,{size:14}),p.jsx("span",{children:"Copy link"})]})}),p.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:[p.jsx(Wa,{size:14}),p.jsx("span",{children:"Open link"})]})]})]})}):null},hi=A.createContext(null),Rl=()=>A.useContext(hi),E3=()=>{var e;let t=Rl();return(e=t?.code)!=null?e:null},es=()=>{var e;let t=Rl();return(e=t?.mermaid)!=null?e:null},px=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="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){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>s(new Error("Failed to load SVG image")),u.src=a})},gx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let[a,u]=A.useState(!1),o=A.useRef(null),{isAnimating:c}=A.useContext(ve),h=es(),d=async f=>{try{if(f==="mmd"){Mt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){s?.(new Error("Mermaid plugin not available"));return}let m=h.getMermaid(i),E=e.split("").reduce((C,w)=>(C<<5)-C+w.charCodeAt(0)|0,0),_=`mermaid-${Math.abs(E)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:I}=await m.render(_,e);if(!I){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Mt("diagram.svg",I,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let C=await px(I);Mt("diagram.png",C,"image/png"),r?.(f),u(!1);return}}catch(m){s?.(m)}};return A.useEffect(()=>{let f=m=>{let E=m.composedPath();o.current&&!E.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),p.jsxs("div",{className:"relative",ref:o,children:[p.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!a),title:"Download diagram",type:"button",children:t??p.jsx(xr,{size:14})}),a?p.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:[p.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"}),p.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"}),p.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]})},pn=0,Ex=()=>{pn+=1,pn===1&&(document.body.style.overflow="hidden")},bx=()=>{pn=Math.max(0,pn-1),pn===0&&(document.body.style.overflow="")},Tx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let[a,u]=A.useState(!1),{isAnimating:o,controls:c}=A.useContext(ve),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!a)};return A.useEffect(()=>{if(a){Ex();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),bx()}}},[a]),A.useEffect(()=>{a?n?.():r&&r()},[a,n,r]),p.jsxs(p.Fragment,{children:[p.jsx("button",{className:Q("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",...s,children:p.jsx(ix,{size:14})}),a?p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[p.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:p.jsx(Ll,{size:20})}),p.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:p.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=[],s=e.querySelectorAll("thead th");for(let u of s)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let u of a){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===`
114
114
  `)&&(o=!0)}return o?c?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let u of n)s[a]=u.map(r).join(","),a+=1;return s.join(`
115
- `)},Ox=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
115
+ `)},xx=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
116
116
  `||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
117
117
  `?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let u of n)s[a]=u.map(r).join(" "),a+=1;return s.join(`
118
- `)},Wr=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("")},Lx=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(u=>Wr(u));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let u=0;u<t.length;u+=1)a[u]="---";r[i]=`| ${a.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?Wr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Wr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
119
- `)},Rx=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[s,a]=A.useState(!1),[u,o]=A.useState(!1),c=A.useRef(null),h=A.useRef(0),{isAnimating:d}=A.useContext(Fe),f=async E=>{var k,I;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let y=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),w=y?.querySelector("table");if(!w){r?.(new Error("Table not found"));return}let L=jl(w),F=E==="csv"?zl(L):Ox(L),z=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),o(!0),a(!1),n?.(E),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};A.useEffect(()=>{let E=k=>{let I=k.composedPath();c.current&&!I.includes(c.current)&&a(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E),window.clearTimeout(h.current)}},[]);let p=u?as:us;return m.jsxs("div",{className:"relative",ref:c,children:[m.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>a(!s),title:"Copy table",type:"button",children:e??m.jsx(p,{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:()=>f("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:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Dx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,s]=A.useState(!1),a=A.useRef(null),{isAnimating:u}=A.useContext(Fe),o=c=>{var h;try{let d=(h=a.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=jl(f),E=c==="csv"?zl(p):Lx(p);Bt(`table.${c==="csv"?"csv":"md"}`,E,c==="csv"?"text/csv":"text/markdown"),s(!1),n?.(c)}catch(d){r?.(d)}};return A.useEffect(()=>{let c=h=>{let d=h.composedPath();a.current&&!d.includes(a.current)&&s(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),m.jsxs("div",{className:"relative",ref:a,children:[m.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>s(!i),title:"Download table",type:"button",children:e??m.jsx(kr,{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]})},Px=({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(Rx,{}),m.jsx(Dx,{})]}):null,m.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:m.jsx("table",{className:Q("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),vx=A.lazy(()=>Ni(()=>import("./code-block-OCS4YCEC-DAvNvPo_.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),Mx=A.lazy(()=>Ni(()=>Promise.resolve().then(()=>Ck),void 0).then(e=>({default:e.Mermaid}))),Bx=/language-([^\s]+)/;function Ar(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,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===s?.line&&i?.column===s?.column}function pe(e,t){return e.className===t.className&&Ar(e.node,t.node)}var mi=(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},ls=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ol",{className:Q("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>pe(e,t));ls.displayName="MarkdownOl";var $l=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("li",{className:Q("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Ar(e.node,t.node));$l.displayName="MarkdownLi";var Yl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("ul",{className:Q("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>pe(e,t));Yl.displayName="MarkdownUl";var ql=A.memo(({className:e,node:t,...n})=>m.jsx("hr",{className:Q("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>pe(e,t));ql.displayName="MarkdownHr";var Wl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("span",{className:Q("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>pe(e,t));Wl.displayName="MarkdownStrong";var Fx=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:s}=A.useContext(Fe),[a,u]=A.useState(!1),o=n==="streamdown:incomplete-link",c=A.useCallback(async p=>{if(!(!(s!=null&&s.enabled&&n)||o)){if(p.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[s,n,o]),h=A.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=A.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:a,onClose:d,onConfirm:h};return s!=null&&s.enabled&&n?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Q("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),s.renderModal?s.renderModal(f):m.jsx(yx,{...f})]}):m.jsx("a",{className:Q("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Vl=A.memo(Fx,(e,t)=>pe(e,t)&&e.href===t.href);Vl.displayName="MarkdownA";var Gl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h1",{className:Q("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>pe(e,t));Gl.displayName="MarkdownH1";var Kl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h2",{className:Q("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>pe(e,t));Kl.displayName="MarkdownH2";var Ql=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h3",{className:Q("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>pe(e,t));Ql.displayName="MarkdownH3";var Xl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h4",{className:Q("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>pe(e,t));Xl.displayName="MarkdownH4";var Zl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h5",{className:Q("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>pe(e,t));Zl.displayName="MarkdownH5";var Jl=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("h6",{className:Q("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>pe(e,t));Jl.displayName="MarkdownH6";var ec=A.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=A.useContext(Fe),s=mi(i,"table");return m.jsx(Px,{className:t,showControls:s,...r,children:e})},(e,t)=>pe(e,t));ec.displayName="MarkdownTable";var tc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("thead",{className:Q("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>pe(e,t));tc.displayName="MarkdownThead";var nc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tbody",{className:Q("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>pe(e,t));nc.displayName="MarkdownTbody";var rc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("tr",{className:Q("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>pe(e,t));rc.displayName="MarkdownTr";var ic=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("th",{className:Q("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>pe(e,t));ic.displayName="MarkdownTh";var sc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("td",{className:Q("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>pe(e,t));sc.displayName="MarkdownTd";var ac=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("blockquote",{className:Q("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>pe(e,t));ac.displayName="MarkdownBlockquote";var uc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sup",{className:Q("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>pe(e,t));uc.displayName="MarkdownSup";var oc=A.memo(({children:e,className:t,node:n,...r})=>m.jsx("sub",{className:Q("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>pe(e,t));oc.displayName="MarkdownSub";var lc=A.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var u,o;if(!A.isValidElement(a))return!1;let c=Array.isArray(a.props.children)?a.props.children:[a.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(A.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let E of p){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},s=Array.isArray(e)?e.map(a=>{if(!A.isValidElement(a))return a;if(a.type===ls){let u=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(o=>!i(o));return u.length===0?null:{...a,props:{...a.props,children:u}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?m.jsx("section",{className:t,...r,children:s}):null}return m.jsx("section",{className:t,...r,children:e})},(e,t)=>pe(e,t));lc.displayName="MarkdownSection";var Hx=({node:e,className:t,children:n,...r})=>{var i;let s=!("data-block"in r),{mermaid:a,controls:u}=A.useContext(Fe),o=os();if(s)return m.jsx("code",{className:Q("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(Bx),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 p=mi(u,"mermaid"),E=Un(u,"download"),k=Un(u,"copy"),I=Un(u,"fullscreen"),y=Un(u,"panZoom"),w=p&&(E||k||I);return m.jsx(A.Suspense,{fallback:m.jsx(iu,{}),children:m.jsxs("div",{className:Q("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[w?m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[E?m.jsx(Ix,{chart:d,config:a?.config}):null,k?m.jsx(nu,{code:d}):null,I?m.jsx(wx,{chart:d,config:a?.config}):null]}):null,m.jsx(Mx,{chart:d,config:a?.config,showControls:y})]})})}let f=mi(u,"code");return m.jsx(A.Suspense,{fallback:m.jsx(iu,{}),children:m.jsx(vx,{className:Q("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?m.jsxs(m.Fragment,{children:[m.jsx(Tx,{code:d,language:h}),m.jsx(nu,{})]}):null})})},cc=A.memo(Hx,(e,t)=>e.className===t.className&&Ar(e.node,t.node));cc.displayName="MarkdownCode";var hc=A.memo(_x,(e,t)=>e.className===t.className&&Ar(e.node,t.node));hc.displayName="MarkdownImg";var dc=A.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(i.length===1&&A.isValidElement(i[0])){let s=i[0].props.node,a=s?.tagName;if(a==="img")return m.jsx(m.Fragment,{children:e});if(a==="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)=>pe(e,t));dc.displayName="MarkdownParagraph";var Ux={ol:ls,li:$l,ul:Yl,hr:ql,strong:Wl,a:Vl,h1:Gl,h2:Kl,h3:Ql,h4:Xl,h5:Zl,h6:Jl,table:ec,thead:tc,tbody:nc,tr:rc,th:ic,td:sc,blockquote:ac,code:cc,img:hc,pre:({children:e})=>A.isValidElement(e)?A.cloneElement(e,{"data-block":"true"}):e,sup:uc,sub:oc,p:dc,section:lc},jx=()=>e=>{at(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},su=[],au={allowDangerousHtml:!0},jn=new WeakMap,zx=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 s=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[E,k]=p;if(typeof E=="function"){let I=jn.get(E);I||(I=E.name,jn.set(E,I)),d+=I}else d+=String(E);d+=":",d+=JSON.stringify(k)}else if(typeof p=="function"){let E=jn.get(p);E||(E=p.name,jn.set(p,E)),d+=E}else d+=String(p)}return d},a=s(n),u=s(r),o=i?JSON.stringify(i):"",c=`${u}::${a}::${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()}},uu=new zx,fc=e=>{let t=$x(e),n=e.children||"";return Qx(t.runSync(t.parse(n),n),e)},$x=e=>{let t=uu.get(e);if(t)return t;let n=qx(e);return uu.set(e,n),n},Yx=e=>e.some(t=>Array.isArray(t)?t[0]===ni:t===ni),qx=e=>{let t=e.rehypePlugins||su,n=e.remarkPlugins||su,r=Yx(t)?n:[...n,jx],i=e.remarkRehypeOptions?{...au,...e.remarkRehypeOptions}:au;return p2().use(fT).use(r).use(KT,i).use(t)},Wx=e=>e,Vx=(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 Br)if(Object.hasOwn(Br,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=Br[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},Kx=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},Qx=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:u}=t;if(n||r||i||s||u){let o=u||Wx;at(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return Vx(d,h,s,c.value),h;if(c.type==="element"&&(Gx(c,o),Kx(c,h,d,r,i,n)&&d&&typeof h=="number"))return a&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return _b(e,{Fragment:m.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0})},Xx=/\[\^[\w-]{1,200}\](?!:)/,Zx=/\[\^[\w-]{1,200}\]:/,Jx=/<\/(\w+)>/,e_=/<(\w+)[\s>]/,t_=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),n_=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},r_=e=>{let t=Xx.test(e),n=Zx.test(e);if(t||n)return[e];let r=Be.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let u of r){let o=u.raw,c=i.length;if(s.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(Jx);if(h){let d=h[1];s.at(-1)===d&&s.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(e_);if(h){let d=h[1];o.includes(`</${d}>`)||t_.has(d.toLowerCase())||s.push(d)}}if(c>0&&!a){let h=i[c-1];if(n_(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(a=u.type==="code")}return i},ou,lu,Wn={...dn,protocols:{...dn.protocols,href:[...(lu=(ou=dn.protocols)==null?void 0:ou.href)!=null?lu:[],"tel"]}},gi={raw:ni,sanitize:[So,Wn],harden:[Ph,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},i_={gfm:[Xg,{}]},cu=Object.values(gi),s_=Object.values(i_),a_={block:" ▋",circle:" ●"},u_={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=A.createContext(u_),pc=A.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>m.jsx(fc,{...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 s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});pc.displayName="Block";var o_=["github-light","github-dark"],mc=A.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=cu,remarkPlugins:s=s_,className:a,shikiTheme:u=o_,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=pc,parseMarkdownIntoBlocksFn:p=r_,caret:E,plugins:k,remend:I,linkSafety:y={enabled:!0},allowedTags:w,...L})=>{let F=A.useId(),[z,O]=A.useTransition(),K=A.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?sb(e,I):e,[e,t,n,I]),G=A.useMemo(()=>p(K),[K,p]),[X,N]=A.useState(G);A.useEffect(()=>{t==="streaming"?O(()=>{N(G)}):N(G)},[G,t]);let U=t==="streaming"?X:G,v=A.useMemo(()=>U.map((se,x)=>`${F}-${x}`),[U.length,F]),W=A.useMemo(()=>d?d===!0?fi():fi(d):null,[d]),$=A.useMemo(()=>{var se,x;return{shikiTheme:(x=(se=k?.code)==null?void 0:se.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,k?.code]),j=A.useMemo(()=>({...Ux,...r}),[r]),B=A.useMemo(()=>{let se=[];return k!=null&&k.cjk&&(se=[...se,...k.cjk.remarkPluginsBefore]),se=[...se,...s],k!=null&&k.cjk&&(se=[...se,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(se=[...se,k.math.remarkPlugin]),se},[s,k?.math,k?.cjk]),V=A.useMemo(()=>{var se;let x=i;if(w&&Object.keys(w).length>0&&i===cu){let Oe={...Wn,tagNames:[...(se=Wn.tagNames)!=null?se:[],...Object.keys(w)],attributes:{...Wn.attributes,...w}};x=[gi.raw,[So,Oe],gi.harden]}return k!=null&&k.math&&(x=[...x,k.math.rehypePlugin]),W&&h&&(x=[...x,W.rehypePlugin]),x},[i,k?.math,W,h,w]),oe=A.useMemo(()=>E&&h?{"--streamdown-caret":`"${a_[E]}"`}:void 0,[E,h]);return t==="static"?m.jsx(pi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:$,children:m.jsx("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",a),children:m.jsx(fc,{components:j,rehypePlugins:V,remarkPlugins:B,...L,children:e})})})}):m.jsx(pi.Provider,{value:k??null,children:m.jsx(Fe.Provider,{value:$,children:m.jsxs("div",{className:Q("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,a),style:oe,children:[U.length===0&&E&&h&&m.jsx("span",{}),U.map((se,x)=>m.jsx(f,{components:j,content:se,index:x,rehypePlugins:V,remarkPlugins:B,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);mc.displayName="Streamdown";var l_=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:u=!1})=>{let o=A.useRef(null),c=A.useRef(null),[h,d]=A.useState(a),[f,p]=A.useState({x:0,y:0}),[E,k]=A.useState(!1),[I,y]=A.useState({x:0,y:0}),[w,L]=A.useState({x:0,y:0}),F=A.useCallback(v=>{d(W=>Math.max(n,Math.min(r,W+v)))},[n,r]),z=A.useCallback(()=>{F(i)},[F,i]),O=A.useCallback(()=>{F(-i)},[F,i]),K=A.useCallback(()=>{d(a),p({x:0,y:0})},[a]),G=A.useCallback(v=>{v.preventDefault();let W=v.deltaY>0?-i:i;F(W)},[F,i]),X=A.useCallback(v=>{if(v.button!==0||v.isPrimary===!1)return;k(!0),y({x:v.clientX,y:v.clientY}),L(f);let W=v.currentTarget;W instanceof HTMLElement&&W.setPointerCapture(v.pointerId)},[f]),N=A.useCallback(v=>{if(!E)return;v.preventDefault();let W=v.clientX-I.x,$=v.clientY-I.y;p({x:w.x+W,y:w.y+$})},[E,I,w]),U=A.useCallback(v=>{k(!1);let W=v.currentTarget;W instanceof HTMLElement&&W.releasePointerCapture(v.pointerId)},[]);return A.useEffect(()=>{let v=o.current;if(v)return v.addEventListener("wheel",G,{passive:!1}),()=>{v.removeEventListener("wheel",G)}},[G]),A.useEffect(()=>{let v=c.current;if(v&&E)return document.body.style.userSelect="none",v.addEventListener("pointermove",N,{passive:!1}),v.addEventListener("pointerup",U),v.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",v.removeEventListener("pointermove",N),v.removeEventListener("pointerup",U),v.removeEventListener("pointercancel",U)}},[E,N,U]),m.jsxs("div",{className:Q("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:E?"grabbing":"grab"},children:[s?m.jsxs("div",{className:Q("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:z,title:"Zoom in",type:"button",children:m.jsx(gx,{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:O,title:"Zoom out",type:"button",children:m.jsx(Ex,{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:K,title:"Reset zoom and pan",type:"button",children:m.jsx(mx,{size:16})})]}):null,m.jsx("div",{className:Q("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(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},gc=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[s,a]=A.useState(null),[u,o]=A.useState(!1),[c,h]=A.useState(""),[d,f]=A.useState(""),[p,E]=A.useState(0),{mermaid:k}=A.useContext(Fe),I=os(),y=k?.errorComponent,{shouldRender:w,containerRef:L}=ix({immediate:r});if(A.useEffect(()=>{if(w){if(!I){a("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{a(null),o(!0);let z=I.getMermaid(n),O=e.split("").reduce((X,N)=>(X<<5)-X+N.charCodeAt(0)|0,0),K=`mermaid-${Math.abs(O)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:G}=await z.render(K,e);h(G),f(G)}catch(z){if(!(d||c)){let O=z instanceof Error?z.message:"Failed to render Mermaid chart";a(O)}}finally{o(!1)}})()}},[e,n,p,w,I]),!(w||c||d))return m.jsx("div",{className:Q("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return m.jsx("div",{className:Q("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(s&&!c&&!d){let z=()=>E(O=>O+1);return y?m.jsx("div",{ref:L,children:m.jsx(y,{chart:e,error:s,retry:z})}):m.jsxs("div",{className:Q("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: ",s]}),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 F=c||d;return m.jsx("div",{className:Q("size-full",t),"data-streamdown":"mermaid",ref:L,children:m.jsx(l_,{className:Q(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:Q("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:F},role:"img"})})})};function c_({content:e,children:t,className:n="",side:r="top",align:i="center"}){const s=r==="bottom"?"top-full mt-2":"bottom-full mb-2",a=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 ${s} ${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 ${a} ${o} border-4 border-transparent`})]})]})}const Ec=/^[a-zA-Z]:[\\/]/,h_=/[/\\](attachments|conversations)[/\\]/,d_=/^\/(Users|home|tmp|private|var|opt|mnt|Volumes)(\/|$)/;function hu(e){return e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")}function f_(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 p_(e,t){if(!t)return null;const n=hu(e),r=hu(t).replace(/\/$/,"");return n===r?null:n.startsWith(`${r}/`)?n.slice(r.length+1):n.startsWith("./")?n.slice(2):!n.startsWith("/")&&!Ec.test(e)&&!n.startsWith("../")?n:null}function m_(e){return`${kt()}/attachments/by-path?path=${encodeURIComponent(e)}`}function bc(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=f_(e),r=p_(n.path,t);return r?{type:"workspace-file",path:r,line:n.line,column:n.column}:h_.test(e)?{type:"attachment",path:e,url:m_(e)}:d_.test(e)||Ec.test(e)?{type:"unknown-local",path:e}:{type:"internal",url:e}}function g_(e,t){const n=new URLSearchParams({workingDir:e,path:t});return`${kt()}/files/image?${n.toString()}`}function E_(e){const t=new URLSearchParams({path:e});return`${kt()}/files/image?${t.toString()}`}const Tc="/__agent-tower/message-intent/codex-inline-vis",xc="/__agent-tower/message-intent/agent-download",b_=/^[ \t]{0,3}::codex-inline-vis\{file="([^"\r\n]+)"\}[ \t]*$/,_c=/^[a-z0-9][a-z0-9-]*\.html$/,T_=/^[ \t]{0,3}(`{3,}|~{3,})/;function x_(e,t){const n=t[0]==="`"?"`":"~";return new RegExp(`^[ \\t]{0,3}${n}{${t.length},}[ \\t]*$`).test(e)}function __(e){let t=null;return e.split(/\r?\n/).map(n=>{if(t)return x_(n,t)&&(t=null),n;const r=n.match(T_);if(r)return t=r[1],n;const i=n.match(b_);if(i&&_c.test(i[1])){const u=`${Tc}?file=${encodeURIComponent(i[1])}`;return`[${i[1]}](${u})`}const s=ph(n);if(!s)return n;const a=`${xc}?file=${encodeURIComponent(s)}`;return`[${s}](${a})`}).join(`
120
- `)}function k_(e){try{const t=new URL(e,"http://agent-tower.local"),n=t.searchParams.get("file");if(!n)return null;if(t.pathname===Tc&&_c.test(n))return{type:"codex-inline-visualization",file:n};if(t.pathname===xc){const r=Cu(n);return r?{type:"agent-download",file:r}:null}return null}catch{return null}}function Mk(e,t){return`${kt()}/sessions/${encodeURIComponent(e)}/visualizations/${encodeURIComponent(t)}`}function A_(e,t){const n=new URLSearchParams({path:t});return`${kt()}/sessions/${encodeURIComponent(e)}/artifacts/download?${n.toString()}`}const kc=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]);function y_(e){return/^\d+$/.test(e)?`http://127.0.0.1:${e}`:/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(e)?e:`http://${e}`}function Ei(e){try{return new URL(y_(e.trim()))}catch{return null}}function du(e){return kc.has(e.hostname.toLowerCase())?"loopback":e.hostname.toLowerCase()}function fu(e){return e.port?e.port:e.protocol==="https:"?"443":"80"}function C_(e,t){return e.protocol===t.protocol&&du(e)===du(t)&&fu(e)===fu(t)}function Ac(e){return!e||e==="/"?"":e.endsWith("/")?e.slice(0,-1):e}function I_(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 pu(e,t){try{const i=new URL(e),s=i.searchParams.get("__agent_tower_preview_token"),a=new URL(t.startsWith("/")?t:`/${t}`,"http://preview.local");return i.pathname=a.pathname,i.search=a.search,i.hash=a.hash,s&&i.searchParams.set("__agent_tower_preview_token",s),i.toString()}catch{}const n=e.endsWith("/")?e:`${e}/`,r=t.startsWith("/")?t.slice(1):t;return`${n}${r}`}function Bk(e,t,n){const r=e.trim();if(!r)return null;if(r.startsWith("/"))return n?{kind:"proxy",url:pu(n,r)}:null;const i=Ei(r);if(!i)return zn(r,null);if(!t||!n)return zn(r,i);const s=Ei(t);if(!s||!C_(i,s))return zn(r,i);const a=Ac(s.pathname);if(!I_(i.pathname,a))return zn(r,i);const u=i.pathname.slice(a.length)||"/";return{kind:"proxy",url:pu(n,`${u}${i.search}${i.hash}`)}}function Fk(e,t,n,r){if(!e||!t)return null;try{const i=new URL(e),s=new URL(t,r),a=new URL(n,r),u=s.pathname==="/"?"":s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;if(a.origin!==s.origin||u&&a.pathname!==u&&!a.pathname.startsWith(`${u}/`))return a.toString();const o=a.pathname.slice(u.length)||"/",c=Ac(i.pathname);return i.pathname=`${c}${o}`.replace(/\/{2,}/g,"/")||"/",i.search=a.search,i.hash=a.hash,i.toString()}catch{return null}}function N_(e){const t=Ei(e);return!!(t&&kc.has(t.hostname.toLowerCase()))}const yc=({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)})}),S_=({href:e="",children:t,node:n,onClick:r,className:i,...s})=>{const{t:a}=ur(),{workingDir:u,onOpenWorkspaceFile:o,onOpenPreviewUrl:c,onOpenVisualization:h,downloadSessionId:d}=s,f=k_(e),p=bc(e,u),E={...s};delete E.workingDir,delete E.onOpenWorkspaceFile,delete E.onOpenPreviewUrl,delete E.onOpenVisualization,delete E.downloadSessionId;const k=ar("text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",i);if(f?.type==="codex-inline-visualization")return h?m.jsxs("button",{type:"button",onClick:()=>h(f.file),title:a("Open visualization"),className:"inline-flex max-w-full items-center gap-1.5 align-middle font-medium text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",children:[m.jsx(nh,{className:"size-4 shrink-0","aria-hidden":!0}),m.jsx("span",{className:"truncate",children:f.file})]}):m.jsx("code",{title:f.file,children:f.file});if(f?.type==="agent-download")return d?m.jsxs("a",{href:A_(d,f.file),download:f.file.split("/").at(-1),title:a("Download file"),className:"inline-flex max-w-full items-center gap-1.5 align-middle font-medium text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",children:[m.jsx(Kc,{className:"size-4 shrink-0","aria-hidden":!0}),m.jsx("span",{className:"truncate",children:f.file.split("/").at(-1)})]}):m.jsx("code",{title:f.file,children:f.file});if(c&&N_(e)){const y=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),c(e))};return m.jsx("a",{href:e,onClick:y,className:k,...E,children:t})}if(p.type==="workspace-file"&&o){const y=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),o(p.path,p.line,p.column))};return m.jsx("a",{href:e,onClick:y,className:k,...E,children:t})}if(p.type==="unknown-local"||p.type==="workspace-file"){const y=p.path;return m.jsx("code",{title:y,children:t})}const I=p.url;return m.jsx("a",{href:I,onClick:r,className:k,...E,children:t})},w_=({children:e,className:t,node:n,...r})=>m.jsx("li",{className:ar("py-0 pl-0 [&>p]:inline",t),...r,children:e}),O_={img:yc,li:w_};function L_({workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}){return{...O_,a:s=>m.jsx(S_,{...s,workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}),img:s=>{const a=bc(s.src??"",e),u=a.type==="workspace-file"&&e?g_(e,a.path):a.type==="attachment"?a.url:a.type==="unknown-local"?E_(a.path):s.src;return m.jsx(yc,{...s,src:u})}}}const R_={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},D_=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let bi=null;function P_(e){return D_.test(e)}function v_(){return bi??=Ni(async()=>{const{mermaid:e}=await import("./index-DfRNL5pP.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),bi}function M_(e){const t=P_(e),[n,r]=A.useState();return A.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return v_().then(s=>{i&&r(s)}).catch(()=>{bi=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function Cc(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 B_(e){return Cc(e)==="success"}function F_(e){const t=Cc(e);return t==="failed"||t==="timed_out"}function cs(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function H_(e){return e.type===ee.Tool&&!!e.children?.length}function U_(e){return e.type!==ee.Cursor&&!e.children?.length&&e.content.trim()===""}function hs(e){return!!e.tokenUsage||U_(e)}function j_(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function z_(e){return e.type===ee.Cursor||e.type===ee.User||e.type===ee.Assistant||e.type===ee.Error||e.type===ee.Warning?!0:e.type===ee.Info&&e.tokenUsage?!1:j_(e)}function mu(e){return cs(e)?!0:H_(e)||e.type!==ee.Tool&&e.type!==ee.Action?!1:!z_(e)}function Ic(e){return!cs(e)&&(e.type===ee.Tool||e.type===ee.Action)}function Vn(e){const t=e.filter(i=>!hs(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(mu(i)){const s=[i];let a=r+1;for(;a<t.length;){const u=t[a];if(mu(u))s.push(u),a++;else break}s.some(Ic)?n.push({kind:"execution-group",logs:s,key:s[0].id}):s.forEach(u=>n.push({kind:"single",log:u,key:u.id})),r=a}else n.push({kind:"single",log:i,key:i.id}),r++}return n}function $_(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 s of e)s.type===ee.User?(i(),n=s,r=[]):r.push(s);return i(),t}function Y_(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===ee.Assistant)return n;t===-1&&r.type===ee.Error&&(t=n)}}return t}function q_(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),s=Math.floor(r%3600/60),a=r%60;return i>0?`${i}h${s>0?` ${s}m`:""}`:s>0?`${s}m${a>0?` ${a}s`:""}`:`${a}s`}function W_(e){const t=e.agentLogs.reduce((i,s)=>Number.isFinite(s.cursorActivity?.processingStartedAt)?s.cursorActivity?.processingStartedAt:i,void 0),n=e.user?.timestamp??t??e.agentLogs.find(i=>Number.isFinite(i.timestamp))?.timestamp,r=e.agentLogs.reduce((i,s)=>Number.isFinite(s.timestamp)?i===void 0?s.timestamp:Math.max(i,s.timestamp):i,void 0);return{startedAt:n,latestLogAt:r}}function V_(e,t,n,r){const i=t&&n===!0,s=W_(e),a=i?null:t?r??s.latestLogAt??null:s.latestLogAt??null,u={start:s.startedAt,end:a};if(i)return{key:e.key,user:e.user??null,running:!0,duration:u,showSummary:!0,summaryCollapsible:!1,inlineItems:Vn(e.agentLogs),processedItems:[],finalItems:[]};if(e.agentLogs.length===0)return{key:e.key,user:e.user??null,running:!1,duration:u,showSummary:!1,summaryCollapsible:!1,inlineItems:[],processedItems:[],finalItems:[]};const o=Y_(e.agentLogs),c=o>=0?e.agentLogs.slice(0,o):e.agentLogs,h=o>=0?e.agentLogs.slice(o):[],d=c.some(f=>!hs(f));return{key:e.key,user:e.user??null,running:!1,duration:u,showSummary:!0,summaryCollapsible:d,inlineItems:[],processedItems:d?Vn(c):[],finalItems:Vn(h)}}function Vr(e){return`item:${e.key}`}function G_(e,t){const n=[];for(const r of e){if(r.user&&n.push({kind:"user",key:`user:${r.user.id}`,log:r.user}),r.showSummary&&n.push({kind:"summary",key:`summary:${r.key}`,turnKey:r.key,duration:r.duration,collapsible:r.summaryCollapsible}),r.running){for(const i of r.inlineItems)n.push({kind:"item",key:Vr(i),item:i,processed:!1});continue}if(t.has(r.key))for(const i of r.processedItems)n.push({kind:"item",key:Vr(i),item:i,processed:!0});for(const i of r.finalItems)n.push({kind:"item",key:Vr(i),item:i,processed:!1})}return n}function K_(e){if(!e)return 40;switch(e.kind){case"user":return 72;case"summary":return 44;default:return 32}}function Q_(e){let t=e?.parentElement??null;for(;t;){const n=window.getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll")return t;t=t.parentElement}return null}const ds=A.memo(({content:e,className:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})=>{const u=A.useMemo(()=>s||a?__(e):e,[e,a,s]),o=M_(u),c=A.useMemo(()=>L_({workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a}),[a,i,s,r,n]);return m.jsx(mc,{className:ar("session-log-message-markdown",t),components:c,plugins:o,controls:o?R_:void 0,children:u})});ds.displayName="MarkdownMessage";const fs=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(ds,{content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})})}));fs.displayName="UserMessage";const ps=A.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=A.useState(t),i=A.useRef(null),[s,a]=A.useState(0);A.useEffect(()=>{i.current&&a(i.current.scrollHeight)},[e,n]);const u=A.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
121
- `)[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(yn,{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?s+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()})})})]})});ps.displayName="ThinkingBlock";function X_(e,t=140){return(e.split(`
122
- `)[0]||"").slice(0,t)}function gu(e){const t=e.title?.replace(/\s*[✓✗]$/,"").replace(/\s*\(待审批\)$/,"");return e.tool?.kind?e.tool.name||t||"Tool":X_(e.content,140)||e.tool?.name||t||"Tool"}const Ti=A.memo(({title:e,content:t,type:n})=>{const[r,i]=A.useState(!1);if(n===ee.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 a=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":a?"text-emerald-400":"text-neutral-400",c=t?.split(`
123
- `)[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"})}):a?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(yu,{size:10}):m.jsx(yn,{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})})]})});Ti.displayName="ToolBlock";const xi=A.memo(({logs:e})=>{const{t}=ur(),[n,r]=A.useState(!1),i=e.filter(Ic),s=i.map(u=>gu(u)),a=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(yn,{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:a})}),!n&&m.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[s.slice(0,3).join(", "),i.length>3?" …":""]})]}),n&&m.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(u=>cs(u)?m.jsx(ps,{content:u.content,isOpenDefault:!1},u.id):m.jsx(Nc,{log:u,title:gu(u)},u.id))})]})});xi.displayName="ExecutionDetailsGroup";const Nc=A.memo(({log:e,title:t})=>{const[n,r]=A.useState(!1),i=!!e.content.trim()&&e.content.trim()!==t.trim(),s=B_(e),a=F_(e)||e.type===ee.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:a?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"})}):s?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(yu,{size:10}):m.jsx(yn,{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})})]})});Nc.displayName="ToolGroupItem";const Sc=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}));Sc.displayName="AgentText";const wc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})=>m.jsx("div",{className:`text-neutral-900 min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:m.jsx(ds,{className:"space-y-2",content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})}));wc.displayName="AssistantMessage";const Oc=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})]})}));Oc.displayName="ErrorMessage";const Lc=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})]})}));Lc.displayName="WarningMessage";function Eu(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 s=Math.floor(r/60),a=r%60;return t("{hours} 小时 {minutes} 分",{hours:s,minutes:a})}const Rc=A.memo(({activity:e})=>{const{t}=ur(),n=A.useRef(Date.now()),[r,i]=A.useState(()=>Date.now()),s=e?.processingStartedAt??n.current;A.useEffect(()=>{const c=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(c)},[]);const a=Eu(r-s,t),u=e?.lastOutputAt==null?null:Eu(r-e.lastOutputAt,t),o=t("正在思考");return m.jsx(c_,{align:"start",content:m.jsxs("div",{className:"flex min-w-max flex-col gap-0.5",children:[m.jsx("span",{children:t("已处理 {duration}",{duration:a})}),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}`))})})})});Rc.displayName="ThinkingIndicator";const Dc=A.memo(({turnKey:e,duration:t,collapsible:n,isOpen:r,onToggle:i,onBeforeToggle:s})=>{const{t:a}=ur(),u=t?a("已处理 {duration}",{duration:t}):a("已处理"),o=m.jsxs(m.Fragment,{children:[m.jsx("span",{children:u}),n&&m.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center transition-transform duration-200 motion-reduce:transition-none",style:{transform:r?"rotate(90deg)":"rotate(0deg)"},children:m.jsx(yn,{size:14,strokeWidth:2})})]});return n?m.jsx("div",{className:"mb-3 mt-1",children:m.jsx("button",{type:"button","data-at-group-header":e,"aria-expanded":r,onClick:()=>{s?.(),i(e)},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:o})}):m.jsx("div",{className:"mb-3 mt-1",children: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:o})})});Dc.displayName="ProcessedGroupSummary";function Z_(e,t,n,r,i,s,a){if(e.kind==="execution-group")return m.jsx(xi,{logs:e.logs});const u=e.log;if(u.type===ee.Tool&&u.children?.length)return m.jsx(xi,{logs:u.children});if(hs(u))return null;if(u.title==="Thinking"||u.content.startsWith("Thinking:"))return m.jsx(ps,{content:u.content,isOpenDefault:!0});switch(u.type){case ee.User:return m.jsx(fs,{content:u.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case ee.Tool:return m.jsx(Ti,{type:u.type,title:u.title||"Tool",content:u.content});case ee.Action:return m.jsx(Ti,{type:u.type,title:"Action",content:u.content});case ee.Assistant:return m.jsx(wc,{content:u.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a});case ee.Info:return u.tokenUsage?null:m.jsx(Sc,{content:u.content,compact:t});case ee.Error:return m.jsx(Oc,{content:u.content});case ee.Warning:return m.jsx(Lc,{content:u.content});case ee.Cursor:return m.jsx(Rc,{activity:u.cursorActivity});default:return null}}const J_=8,Hk=A.forwardRef(function({logs:t,isOutputActive:n,lastExitAt:r,onUserToggleDetails:i,scrollElementRef:s,workingDir:a,onOpenWorkspaceFile:u,onOpenPreviewUrl:o,onOpenVisualization:c,downloadSessionId:h},d){const[f,p]=A.useState(null),[E,k]=A.useState(!1),[I,y]=A.useState(0),[w,L]=A.useState(()=>new Set),[F,z]=A.useState(()=>Date.now());A.useEffect(()=>{if(!n)return;const B=()=>z(Date.now()),V=window.setTimeout(B,0),oe=window.setInterval(B,1e3);return()=>{window.clearTimeout(V),window.clearInterval(oe)}},[n]);const O=A.useCallback(B=>{if(!B)return;const V=s?.current??Q_(B);p(oe=>oe===V?oe:V),y(V?.clientHeight??0),k(!0)},[s]);A.useEffect(()=>{if(!f)return;const B=()=>y(f.clientHeight);if(B(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(B);return V.observe(f),()=>V.disconnect()},[f]);const K=A.useCallback(B=>{L(V=>{const oe=new Set(V);return oe.has(B)?oe.delete(B):oe.add(B),oe})},[]),G=A.useMemo(()=>{if(n===void 0)return null;const B=$_(t),V=B.length-1;return B.map((oe,se)=>V_(oe,se===V,n,r))},[t,n,r]),X=A.useMemo(()=>n===void 0?Vn(t):null,[n,t]),N=A.useMemo(()=>X?X.map(B=>({kind:"item",key:`legacy:${B.key}`,item:B,processed:!1})):G_(G??[],w),[w,X,G]),U=Ih({count:N.length,getScrollElement:()=>f,estimateSize:B=>K_(N[B]),getItemKey:B=>N[B]?.key??B,overscan:J_,measureElement:B=>B.getBoundingClientRect().height});U.shouldAdjustScrollPositionOnItemSizeChange=Nh;const v=f!==null&&I>0;A.useImperativeHandle(d,()=>({scrollToBottom:(B="instant")=>{const V=s?.current;if(!V||(v&&N.length>0&&U.scrollToIndex(N.length-1,{align:"end"}),V.scrollTo({top:V.scrollHeight,behavior:B}),B!=="instant"))return;let oe=0;const se=()=>{const x=s?.current;x&&(x.scrollHeight-x.scrollTop-x.clientHeight<=1||(x.scrollTop=x.scrollHeight,++oe<5&&requestAnimationFrame(se)))};requestAnimationFrame(se)}}),[v,N.length,s,U]);const W=A.useCallback(B=>{const V=B.end===null?F:B.end;return q_(B.start,V)},[F]),$=A.useCallback(B=>{switch(B.kind){case"user":return m.jsx(fs,{content:B.log.content,workingDir:a,onOpenWorkspaceFile:u,onOpenPreviewUrl:o});case"summary":return m.jsx(Dc,{turnKey:B.turnKey,duration:W(B.duration),collapsible:B.collapsible,isOpen:w.has(B.turnKey),onToggle:K,onBeforeToggle:i});case"item":return Z_(B.item,!1,a,u,o,c,h);default:return null}},[h,W,w,o,c,u,i,K,a]),j=U.getVirtualItems();return E?m.jsx("div",{ref:O,className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:v?m.jsx("div",{style:{height:U.getTotalSize(),width:"100%",position:"relative"},children:j.map(B=>{const V=N[B.index];return V?m.jsx("div",{"data-index":B.index,"data-at-row":V.key,...V.kind==="item"&&V.processed?{"data-processed-content":""}:{},ref:U.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${B.start}px)`},children:$(V)},V.key):null})},"virtualized"):m.jsx("div",{children:N.map(B=>m.jsx("div",{"data-at-row":B.key,...B.kind==="item"&&B.processed?{"data-processed-content":""}:{},children:$(B)},B.key))},"static")}):m.jsx("div",{ref:O,className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"}})}),ek=kt();function tk(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Uk({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(nk,{item:n,onRemove:t},n.tempId))})}function nk({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:`${ek}${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(Qc,{size:16,className:"animate-spin text-neutral-400"}):n?m.jsx(ah,{size:16,className:"text-neutral-400"}):m.jsx(ih,{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:tk(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(Xc,{size:10})})]})}const rk=kt();async function ik(e){const t=new FormData;t.append("file",e);const n=await fetch(`${rk}/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 sk=0;function jk(){const[e,t]=A.useState([]),n=A.useRef(e);n.current=e;const r=A.useCallback(async d=>{const f=d.map(p=>({tempId:`tmp-${++sk}`,file:p,progress:0,status:"uploading"}));t(p=>[...p,...f]),await Promise.allSettled(f.map(async p=>{try{const E=await ik(p.file);t(k=>k.map(I=>I.tempId===p.tempId?{...I,status:"done",progress:100,attachment:E}:I))}catch(E){t(k=>k.map(I=>I.tempId===p.tempId?{...I,status:"error",error:E instanceof Error?E.message:"Upload failed"}:I))}}))},[]),i=A.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),s=A.useCallback(d=>{t(f=>f.filter(p=>p.tempId!==d))},[]),a=A.useCallback(()=>{t([])},[]),u=A.useCallback(d=>{d.length!==0&&t(f=>{const p=new Set(f.map(k=>k.attachment?.id??k.tempId)),E=d.filter(k=>{const I=k.attachment?.id??k.tempId;return p.has(I)?!1:(p.add(I),!0)});return E.length>0?[...f,...E]:f})},[]),o=A.useCallback(()=>{const d=i();return d.length===0?"":d.map(f=>`${f.mimeType.startsWith("image/")?"!":""}[${f.originalName}](${f.storagePath})`).join(`
124
- `)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:s,clear:a,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function zk(e){const t=A.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return Zc({queryKey:["attachments","metadata",t],queryFn:()=>Jc.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}var ak=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])},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)}})(),uk=Object.prototype.hasOwnProperty;function _i(e,t){return uk.call(e,t)}function ki(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)_i(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 Ai(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 Pc(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function yi(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(yi(e[t]))return!0}else if(typeof e=="object"){for(var r=ki(e),i=r.length,s=0;s<i;s++)if(yi(e[r[s]]))return!0}}return!1}function bu(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(`
125
- `)}var vc=(function(e){ak(t,e);function t(n,r,i,s,a){var u=this.constructor,o=e.call(this,bu(n,{name:r,index:i,operation:s,tree:a}))||this;return o.name=r,o.index=i,o.operation=s,o.tree=a,Object.setPrototypeOf(o,u.prototype),o.message=bu(n,{name:r,index:i,operation:s,tree:a}),o}return t})(Error),fe=vc,ok=De,vt={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=ir(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=ir(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:An(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},lk={add:function(e,t,n){return Ai(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:vt.move,copy:vt.copy,test:vt.test,_get:vt._get};function ir(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,s){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):sr(t,0)),t.path===""){var a={newDocument:e};if(t.op==="add")return a.newDocument=t.value,a;if(t.op==="replace")return a.newDocument=t.value,a.removed=e,a;if(t.op==="move"||t.op==="copy")return a.newDocument=ir(e,t.from),t.op==="move"&&(a.removed=e),a;if(t.op==="test"){if(a.test=An(e,t.value),a.test===!1)throw new fe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a.newDocument=e,a}else{if(t.op==="remove")return a.removed=e,a.newDocument=null,a;if(t.op==="_get")return t.value=e,a;if(n)throw new fe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return a}}else{r||(e=De(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,E=void 0;for(typeof n=="function"?E=n:E=sr;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=Pc(p)),i&&(p=="__proto__"||p=="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&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&E(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!Ai(p))throw new fe("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",s,t,e);Ai(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new fe("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var a=lk[t.op].call(t,c,p,e);if(a.test===!1)throw new fe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a}}else if(h>=d){var a=vt[t.op].call(t,c,p,e);if(a.test===!1)throw new fe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new fe("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function yr(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new fe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=De(e));for(var s=new Array(t.length),a=0,u=t.length;a<u;a++)s[a]=Et(e,t[a],n,!0,i,a),e=s[a].newDocument;return s.newDocument=e,s}function ck(e,t,n){var r=Et(e,t);if(r.test===!1)throw new fe("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function sr(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new fe("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(vt[e.op]){if(typeof e.path!="string")throw new fe("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new fe('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 fe("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 fe("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")&&yi(e.value))throw new fe("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,s=r.split("/").length;if(i!==s+1&&i!==s)throw new fe("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 fe("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 a={op:"_get",path:e.from,value:void 0},u=Mc([a],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new fe("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new fe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function Mc(e,t,n){try{if(!Array.isArray(e))throw new fe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)yr(De(t),De(e),n||!0);else{n=n||sr;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof fe)return i;throw i}}function An(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,s,a;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!An(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(s=u.length,s!==Object.keys(t).length)return!1;for(i=s;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=s;i--!==0;)if(a=u[i],!An(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}const hk=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:fe,_areEquals:An,applyOperation:Et,applyPatch:yr,applyReducer:ck,deepClone:ok,getValueByPointer:ir,validate:Mc,validator:sr},Symbol.toStringTag,{value:"Module"}));var ms=new WeakMap,dk=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),fk=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function pk(e){return ms.get(e)}function mk(e,t){return e.observers.get(t)}function gk(e,t){e.observers.delete(t.callback)}function Ek(e,t){t.unobserve()}function bk(e,t){var n=[],r,i=pk(e);if(!i)i=new dk(e),ms.set(e,i);else{var s=mk(i,t);r=s&&s.observer}if(r)return r;if(r={},i.value=De(e),t){r.callback=t,r.next=null;var a=function(){Ci(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(a)};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(){Ci(r),clearTimeout(r.next),gk(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 fk(t,r)),r}function Ci(e,t){t===void 0&&(t=!1);var n=ms.get(e.object);gs(n.value,e.object,e.patches,"",t),e.patches.length&&yr(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function gs(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=ki(t),a=ki(e),u=!1,o=a.length-1;o>=0;o--){var c=a[o],h=e[c];if(_i(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)?gs(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&&s.length==a.length))for(var o=0;o<s.length;o++){var c=s[o];!_i(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:De(t[c])})}}}function Tk(e,t,n){n===void 0&&(n=!1);var r=[];return gs(e,t,r,"",n),r}const xk=Object.freeze(Object.defineProperty({__proto__:null,compare:Tk,generate:Ci,observe:bk,unobserve:Ek},Symbol.toStringTag,{value:"Module"}));Object.assign({},hk,xk,{JsonPatchError:vc,deepClone:De,escapePathComponent:pt,unescapePathComponent:Pc});const $k={entries:[],isTruncated:!1},_k=50,Tu=500;function xu(e){return typeof e?.seq=="number"?e.seq:0}function _u(e){return e?.entries.at(-1)?.id}function ku(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function Yk(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function qk(e,t){if(!e||e.isTruncated)return!0;const n=xu(e),r=xu(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=_u(e),s=_u(t);if(s&&i&&s!==i)return!0;const a=ku(e),u=ku(t);return!!(u&&a&&u!==a)}function kk(e,t){for(;t.length>_k;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const Wk=eh((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const s=i.accessOrder.filter(u=>u!==n);s.push(n);const a={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return kk(a,s)})},applyPatch:(n,r,i)=>{const s=t().conversations[n];if(!s)return!1;if(typeof i=="number"&&typeof s.seq=="number"&&i<=s.seq)return!0;try{const u={...yr(s,r,!0,!1).newDocument,seq:typeof i=="number"?i:s.seq,isTruncated:s.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(a){return console.error("[sessionLogStore] applyPatch failed:",a),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const s=[...r.accessOrder];return s.splice(i,1),s.push(n),{accessOrder:s}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=Tu?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Tu),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...s}=r.conversations;return{conversations:s,accessOrder:r.accessOrder.filter(a=>a!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),Ak={[Y.CLAUDE_CODE]:{agentType:Y.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[Y.GEMINI_CLI]:{agentType:Y.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[Y.CURSOR_AGENT]:{agentType:Y.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[Y.CODEX]:{agentType:Y.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[Y.QWEN_CODE]:{agentType:Y.QWEN_CODE,label:"Qwen Code",logoSrc:"/agent-icons/qwen-code.svg"},[Y.KIRO_CLI]:{agentType:Y.KIRO_CLI,label:"Kiro CLI",logoSrc:"/agent-icons/kiro-cli.svg"},[Y.OPENCODE]:{agentType:Y.OPENCODE,label:"OpenCode",logoSrc:"/agent-icons/opencode.svg"},[Y.PI_CODING_AGENT]:{agentType:Y.PI_CODING_AGENT,label:"Pi Coding Agent",logoSrc:"/agent-icons/pi-coding-agent.svg"},[Y.GROK_BUILD]:{agentType:Y.GROK_BUILD,label:"Grok Build",logoSrc:"/agent-icons/grok-build.svg"},[Y.MINION_CODE]:{agentType:Y.MINION_CODE,label:"Minion Code"},[Y.DEEPSEEK_HERMES]:{agentType:Y.DEEPSEEK_HERMES,label:"DeepSeek Harness",logoSrc:"/agent-icons/deepseek-hermes.svg"}};function yk(e){return e?Ak[e]??null:null}function Vk(e,t){return yk(e)?.label??t??(e?String(e):"")}const Ck=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:gc},Symbol.toStringTag,{value:"Module"}));export{Uk as A,ks as B,Ss as C,$k as E,ih as F,bx as I,Fe as L,Rk as P,mc as Q,xe as R,Cs as S,c_ as T,ch as U,ys as W,vk as Z,Q as a,Hk as b,Wk as c,Ok as d,Yk as e,yr as f,yk as g,Y as h,Lk as i,Dk as j,Vk as k,zk as l,M_ as m,wk as n,L_ as o,__ as p,R_ as q,As as r,qk as s,ah as t,jk as u,Bk as v,pu as w,Mk as x,Fk as y,O_ as z};
118
+ `)},$r=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("")},kx=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(u=>$r(u));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let u=0;u<t.length;u+=1)a[u]="---";r[i]=`| ${a.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?$r(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>$r(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
119
+ `)},_x=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[s,a]=A.useState(!1),[u,o]=A.useState(!1),c=A.useRef(null),h=A.useRef(0),{isAnimating:d}=A.useContext(ve),f=async E=>{var _,I;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.write)){r?.(new Error("Clipboard API not available"));return}try{let C=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),w=C?.querySelector("table");if(!w){r?.(new Error("Table not found"));return}let O=Dl(w),F=E==="csv"?Pl(O):xx(O),z=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),o(!0),a(!1),n?.(E),h.current=window.setTimeout(()=>o(!1),i)}catch(C){r?.(C)}};A.useEffect(()=>{let E=_=>{let I=_.composedPath();c.current&&!I.includes(c.current)&&a(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E),window.clearTimeout(h.current)}},[]);let m=u?Zi:Ji;return p.jsxs("div",{className:"relative",ref:c,children:[p.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>a(!s),title:"Copy table",type:"button",children:e??p.jsx(m,{size:14})}),s?p.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:[p.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),p.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Ax=({children:e,className:t,onDownload:n,onError:r})=>{let[i,s]=A.useState(!1),a=A.useRef(null),{isAnimating:u}=A.useContext(ve),o=c=>{var h;try{let d=(h=a.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let m=Dl(f),E=c==="csv"?Pl(m):kx(m);Mt(`table.${c==="csv"?"csv":"md"}`,E,c==="csv"?"text/csv":"text/markdown"),s(!1),n?.(c)}catch(d){r?.(d)}};return A.useEffect(()=>{let c=h=>{let d=h.composedPath();a.current&&!d.includes(a.current)&&s(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),p.jsxs("div",{className:"relative",ref:a,children:[p.jsx("button",{className:Q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>s(!i),title:"Download table",type:"button",children:e??p.jsx(xr,{size:14})}),i?p.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:[p.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"}),p.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]})},Cx=({children:e,className:t,showControls:n,...r})=>p.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?p.jsxs("div",{className:"flex items-center justify-end gap-1",children:[p.jsx(_x,{}),p.jsx(Ax,{})]}):null,p.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:p.jsx("table",{className:Q("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),yx=A.lazy(()=>Ti(()=>import("./code-block-OCS4YCEC-1KMwkqn9.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),Ix=A.lazy(()=>Ti(()=>Promise.resolve().then(()=>u3),void 0).then(e=>({default:e.Mermaid}))),Nx=/language-([^\s]+)/;function kr(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,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===s?.line&&i?.column===s?.column}function fe(e,t){return e.className===t.className&&kr(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Bn=(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},ts=A.memo(({children:e,className:t,node:n,...r})=>p.jsx("ol",{className:Q("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>fe(e,t));ts.displayName="MarkdownOl";var Ml=A.memo(({children:e,className:t,node:n,...r})=>p.jsx("li",{className:Q("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&kr(e.node,t.node));Ml.displayName="MarkdownLi";var vl=A.memo(({children:e,className:t,node:n,...r})=>p.jsx("ul",{className:Q("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})=>p.jsx("hr",{className:Q("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})=>p.jsx("span",{className:Q("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:s}=A.useContext(ve),[a,u]=A.useState(!1),o=n==="streamdown:incomplete-link",c=A.useCallback(async m=>{if(!(!(s!=null&&s.enabled&&n)||o)){if(m.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[s,n,o]),h=A.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=A.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:a,onClose:d,onConfirm:h};return s!=null&&s.enabled&&n?p.jsxs(p.Fragment,{children:[p.jsx("button",{className:Q("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),s.renderModal?s.renderModal(f):p.jsx(mx,{...f})]}):p.jsx("a",{className:Q("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})=>p.jsx("h1",{className:Q("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})=>p.jsx("h2",{className:Q("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})=>p.jsx("h3",{className:Q("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})=>p.jsx("h4",{className:Q("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})=>p.jsx("h5",{className:Q("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})=>p.jsx("h6",{className:Q("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(ve),s=di(i,"table");return p.jsx(Cx,{className:t,showControls:s,...r,children:e})},(e,t)=>fe(e,t));Vl.displayName="MarkdownTable";var Wl=A.memo(({children:e,className:t,node:n,...r})=>p.jsx("thead",{className:Q("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})=>p.jsx("tbody",{className:Q("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})=>p.jsx("tr",{className:Q("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})=>p.jsx("th",{className:Q("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})=>p.jsx("td",{className:Q("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})=>p.jsx("blockquote",{className:Q("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})=>p.jsx("sup",{className:Q("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})=>p.jsx("sub",{className:Q("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=a=>{var u,o;if(!A.isValidElement(a))return!1;let c=Array.isArray(a.props.children)?a.props.children:[a.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(A.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let m=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let E of m){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},s=Array.isArray(e)?e.map(a=>{if(!A.isValidElement(a))return a;if(a.type===ts){let u=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(o=>!i(o));return u.length===0?null:{...a,props:{...a.props,children:u}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?p.jsx("section",{className:t,...r,children:s}):null}return p.jsx("section",{className:t,...r,children:e})},(e,t)=>fe(e,t));tc.displayName="MarkdownSection";var wx=({node:e,className:t,children:n,...r})=>{var i;let s=!("data-block"in r),{mermaid:a,controls:u}=A.useContext(ve),o=es();if(s)return p.jsx("code",{className:Q("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(Nx),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 m=di(u,"mermaid"),E=Bn(u,"download"),_=Bn(u,"copy"),I=Bn(u,"fullscreen"),C=Bn(u,"panZoom"),w=m&&(E||_||I);return p.jsx(A.Suspense,{fallback:p.jsx(Qa,{}),children:p.jsxs("div",{className:Q("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[w?p.jsxs("div",{className:"flex items-center justify-end gap-2",children:[E?p.jsx(gx,{chart:d,config:a?.config}):null,_?p.jsx(Ga,{code:d}):null,I?p.jsx(Tx,{chart:d,config:a?.config}):null]}):null,p.jsx(Ix,{chart:d,config:a?.config,showControls:C})]})})}let f=di(u,"code");return p.jsx(A.Suspense,{fallback:p.jsx(Qa,{}),children:p.jsx(yx,{className:Q("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?p.jsxs(p.Fragment,{children:[p.jsx(lx,{code:d,language:h}),p.jsx(Ga,{})]}):null})})},nc=A.memo(wx,(e,t)=>e.className===t.className&&kr(e.node,t.node));nc.displayName="MarkdownCode";var rc=A.memo(hx,(e,t)=>e.className===t.className&&kr(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(s=>s!=null&&s!=="");if(i.length===1&&A.isValidElement(i[0])){let s=i[0].props.node,a=s?.tagName;if(a==="img")return p.jsx(p.Fragment,{children:e});if(a==="code"&&"data-block"in i[0].props)return p.jsx(p.Fragment,{children:e})}return p.jsx("p",{className:t,...r,children:e})},(e,t)=>fe(e,t));ic.displayName="MarkdownParagraph";var Lx={ol:ts,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=>{at(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Xa=[],Za={allowDangerousHtml:!0},Fn=new WeakMap,Rx=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 s=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let m=h[f];if(f>0&&(d+=","),Array.isArray(m)){let[E,_]=m;if(typeof E=="function"){let I=Fn.get(E);I||(I=E.name,Fn.set(E,I)),d+=I}else d+=String(E);d+=":",d+=JSON.stringify(_)}else if(typeof m=="function"){let E=Fn.get(m);E||(E=m.name,Fn.set(m,E)),d+=E}else d+=String(m)}return d},a=s(n),u=s(r),o=i?JSON.stringify(i):"",c=`${u}::${a}::${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()}},Ja=new Rx,sc=e=>{let t=Dx(e),n=e.children||"";return Ux(t.runSync(t.parse(n),n),e)},Dx=e=>{let t=Ja.get(e);if(t)return t;let n=Mx(e);return Ja.set(e,n),n},Px=e=>e.some(t=>Array.isArray(t)?t[0]===Jr:t===Jr),Mx=e=>{let t=e.rehypePlugins||Xa,n=e.remarkPlugins||Xa,r=Px(t)?n:[...n,Ox],i=e.remarkRehypeOptions?{...Za,...e.remarkRehypeOptions}:Za;return i2().use(rT).use(r).use(HT,i).use(t)},vx=e=>e,Bx=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Fx=(e,t)=>{var n;for(let r in Pr)if(Object.hasOwn(Pr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=Pr[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},Hx=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},Ux=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:u}=t;if(n||r||i||s||u){let o=u||vx;at(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return Bx(d,h,s,c.value),h;if(c.type==="element"&&(Fx(c,o),Hx(c,h,d,r,i,n)&&d&&typeof h=="number"))return a&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return hb(e,{Fragment:p.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0})},jx=/\[\^[\w-]{1,200}\](?!:)/,zx=/\[\^[\w-]{1,200}\]:/,$x=/<\/(\w+)>/,Yx=/<(\w+)[\s>]/,qx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Vx=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},Wx=e=>{let t=jx.test(e),n=zx.test(e);if(t||n)return[e];let r=Me.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let u of r){let o=u.raw,c=i.length;if(s.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match($x);if(h){let d=h[1];s.at(-1)===d&&s.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(Yx);if(h){let d=h[1];o.includes(`</${d}>`)||qx.has(d.toLowerCase())||s.push(d)}}if(c>0&&!a){let h=i[c-1];if(Vx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(a=u.type==="code")}return i},eu,tu,$n={...cn,protocols:{...cn.protocols,href:[...(tu=(eu=cn.protocols)==null?void 0:eu.href)!=null?tu:[],"tel"]}},fi={raw:Jr,sanitize:[xo,$n],harden:[Ch,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Gx={gfm:[jg,{}]},nu=Object.values(fi),Kx=Object.values(Gx),Qx={block:" ▋",circle:" ●"},Xx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ve=A.createContext(Xx),ac=A.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>p.jsx(sc,{...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 s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});ac.displayName="Block";var Zx=["github-light","github-dark"],uc=A.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=nu,remarkPlugins:s=Kx,className:a,shikiTheme:u=Zx,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=ac,parseMarkdownIntoBlocksFn:m=Wx,caret:E,plugins:_,remend:I,linkSafety:C={enabled:!0},allowedTags:w,...O})=>{let F=A.useId(),[z,L]=A.useTransition(),K=A.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?KE(e,I):e,[e,t,n,I]),G=A.useMemo(()=>m(K),[K,m]),[X,N]=A.useState(G);A.useEffect(()=>{t==="streaming"?L(()=>{N(G)}):N(G)},[G,t]);let U=t==="streaming"?X:G,M=A.useMemo(()=>U.map((se,x)=>`${F}-${x}`),[U.length,F]),V=A.useMemo(()=>d?d===!0?ci():ci(d):null,[d]),$=A.useMemo(()=>{var se,x;return{shikiTheme:(x=(se=_?.code)==null?void 0:se.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:C}},[u,c,h,t,o,C,_?.code]),j=A.useMemo(()=>({...Lx,...r}),[r]),B=A.useMemo(()=>{let se=[];return _!=null&&_.cjk&&(se=[...se,..._.cjk.remarkPluginsBefore]),se=[...se,...s],_!=null&&_.cjk&&(se=[...se,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(se=[...se,_.math.remarkPlugin]),se},[s,_?.math,_?.cjk]),W=A.useMemo(()=>{var se;let x=i;if(w&&Object.keys(w).length>0&&i===nu){let we={...$n,tagNames:[...(se=$n.tagNames)!=null?se:[],...Object.keys(w)],attributes:{...$n.attributes,...w}};x=[fi.raw,[xo,we],fi.harden]}return _!=null&&_.math&&(x=[...x,_.math.rehypePlugin]),V&&h&&(x=[...x,V.rehypePlugin]),x},[i,_?.math,V,h,w]),oe=A.useMemo(()=>E&&h?{"--streamdown-caret":`"${Qx[E]}"`}:void 0,[E,h]);return t==="static"?p.jsx(hi.Provider,{value:_??null,children:p.jsx(ve.Provider,{value:$,children:p.jsx("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",a),children:p.jsx(sc,{components:j,rehypePlugins:W,remarkPlugins:B,...O,children:e})})})}):p.jsx(hi.Provider,{value:_??null,children:p.jsx(ve.Provider,{value:$,children:p.jsxs("div",{className:Q("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,a),style:oe,children:[U.length===0&&E&&h&&p.jsx("span",{}),U.map((se,x)=>p.jsx(f,{components:j,content:se,index:x,rehypePlugins:W,remarkPlugins:B,shouldParseIncompleteMarkdown:n,...O},M[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 Jx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:u=!1})=>{let o=A.useRef(null),c=A.useRef(null),[h,d]=A.useState(a),[f,m]=A.useState({x:0,y:0}),[E,_]=A.useState(!1),[I,C]=A.useState({x:0,y:0}),[w,O]=A.useState({x:0,y:0}),F=A.useCallback(M=>{d(V=>Math.max(n,Math.min(r,V+M)))},[n,r]),z=A.useCallback(()=>{F(i)},[F,i]),L=A.useCallback(()=>{F(-i)},[F,i]),K=A.useCallback(()=>{d(a),m({x:0,y:0})},[a]),G=A.useCallback(M=>{M.preventDefault();let V=M.deltaY>0?-i:i;F(V)},[F,i]),X=A.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;_(!0),C({x:M.clientX,y:M.clientY}),O(f);let V=M.currentTarget;V instanceof HTMLElement&&V.setPointerCapture(M.pointerId)},[f]),N=A.useCallback(M=>{if(!E)return;M.preventDefault();let V=M.clientX-I.x,$=M.clientY-I.y;m({x:w.x+V,y:w.y+$})},[E,I,w]),U=A.useCallback(M=>{_(!1);let V=M.currentTarget;V instanceof HTMLElement&&V.releasePointerCapture(M.pointerId)},[]);return A.useEffect(()=>{let M=o.current;if(M)return M.addEventListener("wheel",G,{passive:!1}),()=>{M.removeEventListener("wheel",G)}},[G]),A.useEffect(()=>{let M=c.current;if(M&&E)return document.body.style.userSelect="none",M.addEventListener("pointermove",N,{passive:!1}),M.addEventListener("pointerup",U),M.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",N),M.removeEventListener("pointerup",U),M.removeEventListener("pointercancel",U)}},[E,N,U]),p.jsxs("div",{className:Q("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:E?"grabbing":"grab"},children:[s?p.jsxs("div",{className:Q("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:[p.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:z,title:"Zoom in",type:"button",children:p.jsx(ax,{size:16})}),p.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:L,title:"Zoom out",type:"button",children:p.jsx(ux,{size:16})}),p.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:K,title:"Reset zoom and pan",type:"button",children:p.jsx(sx,{size:16})})]}):null,p.jsx("div",{className:Q("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(${f.x}px, ${f.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[s,a]=A.useState(null),[u,o]=A.useState(!1),[c,h]=A.useState(""),[d,f]=A.useState(""),[m,E]=A.useState(0),{mermaid:_}=A.useContext(ve),I=es(),C=_?.errorComponent,{shouldRender:w,containerRef:O}=G2({immediate:r});if(A.useEffect(()=>{if(w){if(!I){a("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{a(null),o(!0);let z=I.getMermaid(n),L=e.split("").reduce((X,N)=>(X<<5)-X+N.charCodeAt(0)|0,0),K=`mermaid-${Math.abs(L)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:G}=await z.render(K,e);h(G),f(G)}catch(z){if(!(d||c)){let L=z instanceof Error?z.message:"Failed to render Mermaid chart";a(L)}}finally{o(!1)}})()}},[e,n,m,w,I]),!(w||c||d))return p.jsx("div",{className:Q("my-4 min-h-[200px]",t),ref:O});if(u&&!c&&!d)return p.jsx("div",{className:Q("my-4 flex justify-center p-4",t),ref:O,children:p.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[p.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),p.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(s&&!c&&!d){let z=()=>E(L=>L+1);return C?p.jsx("div",{ref:O,children:p.jsx(C,{chart:e,error:s,retry:z})}):p.jsxs("div",{className:Q("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:O,children:[p.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",s]}),p.jsxs("details",{className:"mt-2",children:[p.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),p.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let F=c||d;return p.jsx("div",{className:Q("size-full",t),"data-streamdown":"mermaid",ref:O,children:p.jsx(Jx,{className:Q(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:p.jsx("div",{"aria-label":"Mermaid chart",className:Q("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:F},role:"img"})})})};function ek({content:e,children:t,className:n="",side:r="top",align:i="center"}){const s=r==="bottom"?"top-full mt-2":"bottom-full mb-2",a=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 p.jsxs("div",{className:`group/tooltip relative inline-block ${n}`,children:[t,p.jsxs("div",{className:`invisible absolute ${s} ${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,p.jsx("div",{className:`absolute ${a} ${o} border-4 border-transparent`})]})]})}const lc=/^[a-zA-Z]:[\\/]/,tk=/[/\\](attachments|conversations)[/\\]/,nk=/^\/(Users|home|tmp|private|var|opt|mnt|Volumes)(\/|$)/;function ru(e){return e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")}function rk(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 ik(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 sk(e){return`${xt()}/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=rk(e),r=ik(n.path,t);return r?{type:"workspace-file",path:r,line:n.line,column:n.column}:tk.test(e)?{type:"attachment",path:e,url:sk(e)}:nk.test(e)||lc.test(e)?{type:"unknown-local",path:e}:{type:"internal",url:e}}function ak(e,t){const n=new URLSearchParams({workingDir:e,path:t});return`${xt()}/files/image?${n.toString()}`}function uk(e){const t=new URLSearchParams({path:e});return`${xt()}/files/image?${t.toString()}`}const hc="/__agent-tower/message-intent/codex-inline-vis",dc="/__agent-tower/message-intent/agent-download",ok=/^[ \t]{0,3}::codex-inline-vis\{file="([^"\r\n]+)"\}[ \t]*$/,fc=/^[a-z0-9][a-z0-9-]*\.html$/,lk=/^[ \t]{0,3}(`{3,}|~{3,})/;function ck(e,t){const n=t[0]==="`"?"`":"~";return new RegExp(`^[ \\t]{0,3}${n}{${t.length},}[ \\t]*$`).test(e)}function hk(e){let t=null;return e.split(/\r?\n/).map(n=>{if(t)return ck(n,t)&&(t=null),n;const r=n.match(lk);if(r)return t=r[1],n;const i=n.match(ok);if(i&&fc.test(i[1])){const u=`${hc}?file=${encodeURIComponent(i[1])}`;return`[${i[1]}](${u})`}const s=ih(n);if(!s)return n;const a=`${dc}?file=${encodeURIComponent(s)}`;return`[${s}](${a})`}).join(`
120
+ `)}function dk(e){try{const t=new URL(e,"http://agent-tower.local"),n=t.searchParams.get("file");if(!n)return null;if(t.pathname===hc&&fc.test(n))return{type:"codex-inline-visualization",file:n};if(t.pathname===dc){const r=Eu(n);return r?{type:"agent-download",file:r}:null}return null}catch{return null}}function b3(e,t){return`${xt()}/sessions/${encodeURIComponent(e)}/visualizations/${encodeURIComponent(t)}`}function fk(e,t){const n=new URLSearchParams({path:t});return`${xt()}/sessions/${encodeURIComponent(e)}/artifacts/download?${n.toString()}`}const mc=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]);function mk(e){return/^\d+$/.test(e)?`http://127.0.0.1:${e}`:/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(e)?e:`http://${e}`}function mi(e){try{return new URL(mk(e.trim()))}catch{return null}}function iu(e){return mc.has(e.hostname.toLowerCase())?"loopback":e.hostname.toLowerCase()}function su(e){return e.port?e.port:e.protocol==="https:"?"443":"80"}function pk(e,t){return e.protocol===t.protocol&&iu(e)===iu(t)&&su(e)===su(t)}function pc(e){return!e||e==="/"?"":e.endsWith("/")?e.slice(0,-1):e}function gk(e,t){return t?e===t||e.startsWith(`${t}/`):!0}function Hn(e,t){return t?{kind:"target",target:t.origin,path:`${t.pathname}${t.search}${t.hash}`}:{kind:"target",target:e,path:null}}function au(e,t){try{const i=new URL(e),s=i.searchParams.get("__agent_tower_preview_token"),a=new URL(t.startsWith("/")?t:`/${t}`,"http://preview.local");return i.pathname=a.pathname,i.search=a.search,i.hash=a.hash,s&&i.searchParams.set("__agent_tower_preview_token",s),i.toString()}catch{}const n=e.endsWith("/")?e:`${e}/`,r=t.startsWith("/")?t.slice(1):t;return`${n}${r}`}function T3(e,t,n){const r=e.trim();if(!r)return null;if(r.startsWith("/"))return n?{kind:"proxy",url:au(n,r)}:null;const i=mi(r);if(!i)return Hn(r,null);if(!t||!n)return Hn(r,i);const s=mi(t);if(!s||!pk(i,s))return Hn(r,i);const a=pc(s.pathname);if(!gk(i.pathname,a))return Hn(r,i);const u=i.pathname.slice(a.length)||"/";return{kind:"proxy",url:au(n,`${u}${i.search}${i.hash}`)}}function x3(e,t,n,r){if(!e||!t)return null;try{const i=new URL(e),s=new URL(t,r),a=new URL(n,r),u=s.pathname==="/"?"":s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;if(a.origin!==s.origin||u&&a.pathname!==u&&!a.pathname.startsWith(`${u}/`))return a.toString();const o=a.pathname.slice(u.length)||"/",c=pc(i.pathname);return i.pathname=`${c}${o}`.replace(/\/{2,}/g,"/")||"/",i.search=a.search,i.hash=a.hash,i.toString()}catch{return null}}function Ek(e){const t=mi(e);return!!(t&&mc.has(t.hostname.toLowerCase()))}const gc=({src:e,alt:t,className:n,node:r,...i})=>p.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:p.jsx("img",{src:e,alt:t,...i,className:ir("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)})}),bk=({href:e="",children:t,node:n,onClick:r,className:i,...s})=>{const{t:a}=sr(),{workingDir:u,onOpenWorkspaceFile:o,onOpenPreviewUrl:c,onOpenVisualization:h,downloadSessionId:d}=s,f=dk(e),m=cc(e,u),E={...s};delete E.workingDir,delete E.onOpenWorkspaceFile,delete E.onOpenPreviewUrl,delete E.onOpenVisualization,delete E.downloadSessionId;const _=ir("text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",i);if(f?.type==="codex-inline-visualization")return h?p.jsxs("button",{type:"button",onClick:()=>h(f.file),title:a("Open visualization"),className:"inline-flex max-w-full items-center gap-1.5 align-middle font-medium text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",children:[p.jsx(Vc,{className:"size-4 shrink-0","aria-hidden":!0}),p.jsx("span",{className:"truncate",children:f.file})]}):p.jsx("code",{title:f.file,children:f.file});if(f?.type==="agent-download")return d?p.jsxs("a",{href:fk(d,f.file),download:f.file.split("/").at(-1),title:a("Download file"),className:"inline-flex max-w-full items-center gap-1.5 align-middle font-medium text-blue-600 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-700 hover:decoration-blue-500",children:[p.jsx(Hc,{className:"size-4 shrink-0","aria-hidden":!0}),p.jsx("span",{className:"truncate",children:f.file.split("/").at(-1)})]}):p.jsx("code",{title:f.file,children:f.file});if(c&&Ek(e)){const C=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),c(e))};return p.jsx("a",{href:e,onClick:C,className:_,...E,children:t})}if(m.type==="workspace-file"&&o){const C=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),o(m.path,m.line,m.column))};return p.jsx("a",{href:e,onClick:C,className:_,...E,children:t})}if(m.type==="unknown-local"||m.type==="workspace-file"){const C=m.path;return p.jsx("code",{title:C,children:t})}const I=m.url;return p.jsx("a",{href:I,onClick:r,className:_,...E,children:t})},Tk=({children:e,className:t,node:n,...r})=>p.jsx("li",{className:ir("py-0 pl-0 [&>p]:inline",t),...r,children:e}),xk={img:gc,li:Tk};function kk({workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}){return{...xk,a:s=>p.jsx(bk,{...s,workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}),img:s=>{const a=cc(s.src??"",e),u=a.type==="workspace-file"&&e?ak(e,a.path):a.type==="attachment"?a.url:a.type==="unknown-local"?uk(a.path):s.src;return p.jsx(gc,{...s,src:u})}}}const _k={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},Ak=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let pi=null;function Ck(e){return Ak.test(e)}function yk(){return pi??=Ti(async()=>{const{mermaid:e}=await import("./index-B5PmQdbq.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),pi}function Ik(e){const t=Ck(e),[n,r]=A.useState();return A.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return yk().then(s=>{i&&r(s)}).catch(()=>{pi=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function Ec(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 Nk(e){return Ec(e)==="success"}function Sk(e){const t=Ec(e);return t==="failed"||t==="timed_out"}function ns(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function wk(e){return e.type===ee.Tool&&!!e.children?.length}function Lk(e){return e.type!==ee.Cursor&&!e.children?.length&&e.content.trim()===""}function rs(e){return!!e.tokenUsage||Lk(e)}function Ok(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function Rk(e){return e.type===ee.Cursor||e.type===ee.User||e.type===ee.Assistant||e.type===ee.Error||e.type===ee.Warning?!0:e.type===ee.Info&&e.tokenUsage?!1:Ok(e)}function uu(e){return ns(e)?!0:wk(e)||e.type!==ee.Tool&&e.type!==ee.Action?!1:!Rk(e)}function bc(e){return!ns(e)&&(e.type===ee.Tool||e.type===ee.Action)}function Yn(e){const t=e.filter(i=>!rs(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(uu(i)){const s=[i];let a=r+1;for(;a<t.length;){const u=t[a];if(uu(u))s.push(u),a++;else break}s.some(bc)?n.push({kind:"execution-group",logs:s,key:s[0].id}):s.forEach(u=>n.push({kind:"single",log:u,key:u.id})),r=a}else n.push({kind:"single",log:i,key:i.id}),r++}return n}function Dk(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 s of e)s.type===ee.User?(i(),n=s,r=[]):r.push(s);return i(),t}function Pk(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===ee.Assistant)return n;t===-1&&r.type===ee.Error&&(t=n)}}return t}function Mk(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),s=Math.floor(r%3600/60),a=r%60;return i>0?`${i}h${s>0?` ${s}m`:""}`:s>0?`${s}m${a>0?` ${a}s`:""}`:`${a}s`}function vk(e){const t=e.agentLogs.reduce((i,s)=>Number.isFinite(s.cursorActivity?.processingStartedAt)?s.cursorActivity?.processingStartedAt:i,void 0),n=e.user?.timestamp??t??e.agentLogs.find(i=>Number.isFinite(i.timestamp))?.timestamp,r=e.agentLogs.reduce((i,s)=>Number.isFinite(s.timestamp)?i===void 0?s.timestamp:Math.max(i,s.timestamp):i,void 0);return{startedAt:n,latestLogAt:r}}function Bk(e,t,n,r){const i=t&&n===!0,s=vk(e),a=i?null:t?r??s.latestLogAt??null:s.latestLogAt??null,u={start:s.startedAt,end:a};if(i)return{key:e.key,user:e.user??null,running:!0,duration:u,showSummary:!0,summaryCollapsible:!1,inlineItems:Yn(e.agentLogs),processedItems:[],finalItems:[]};if(e.agentLogs.length===0)return{key:e.key,user:e.user??null,running:!1,duration:u,showSummary:!1,summaryCollapsible:!1,inlineItems:[],processedItems:[],finalItems:[]};const o=Pk(e.agentLogs),c=o>=0?e.agentLogs.slice(0,o):e.agentLogs,h=o>=0?e.agentLogs.slice(o):[],d=c.some(f=>!rs(f));return{key:e.key,user:e.user??null,running:!1,duration:u,showSummary:!0,summaryCollapsible:d,inlineItems:[],processedItems:d?Yn(c):[],finalItems:Yn(h)}}function Yr(e){return`item:${e.key}`}function Fk(e,t){const n=[];for(const r of e){if(r.user&&n.push({kind:"user",key:`user:${r.user.id}`,log:r.user}),r.showSummary&&n.push({kind:"summary",key:`summary:${r.key}`,turnKey:r.key,duration:r.duration,collapsible:r.summaryCollapsible}),r.running){for(const i of r.inlineItems)n.push({kind:"item",key:Yr(i),item:i,processed:!1});continue}if(t.has(r.key))for(const i of r.processedItems)n.push({kind:"item",key:Yr(i),item:i,processed:!0});for(const i of r.finalItems)n.push({kind:"item",key:Yr(i),item:i,processed:!1})}return n}function Hk(e){if(!e)return 40;switch(e.kind){case"user":return 72;case"summary":return 44;default:return 32}}function Uk(e){let t=e?.parentElement??null;for(;t;){const n=window.getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll")return t;t=t.parentElement}return null}const is=A.memo(({content:e,className:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})=>{const u=A.useMemo(()=>s||a?hk(e):e,[e,a,s]),o=Ik(u),c=A.useMemo(()=>kk({workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a}),[a,i,s,r,n]);return p.jsx(uc,{className:ir("session-log-message-markdown",t),components:c,plugins:o,controls:o?_k:void 0,children:u})});is.displayName="MarkdownMessage";const ss=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})=>p.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:p.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:p.jsx(is,{content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})})}));ss.displayName="UserMessage";const as=A.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=A.useState(t),i=A.useRef(null),[s,a]=A.useState(0);A.useEffect(()=>{i.current&&a(i.current.scrollHeight)},[e,n]);const u=A.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
121
+ `)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return p.jsxs("div",{className:"my-1.5",children:[p.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:[p.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:p.jsx(kn,{size:11,strokeWidth:2})}),p.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&p.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),p.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?s+16:0},children:p.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:p.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});as.displayName="ThinkingBlock";function jk(e,t=140){return(e.split(`
122
+ `)[0]||"").slice(0,t)}function ou(e){const t=e.title?.replace(/\s*[✓✗]$/,"").replace(/\s*\(待审批\)$/,"");return e.tool?.kind?e.tool.name||t||"Tool":jk(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===ee.Action)return p.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[p.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),p.jsx("span",{children:t})]});const a=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":a?"text-emerald-400":"text-neutral-400",c=t?.split(`
123
+ `)[0]||"",h=c!==e?c:"";return p.jsxs("div",{className:"my-2",children:[p.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[p.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?p.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:p.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):a?p.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:p.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):p.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),p.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&p.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&p.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?p.jsx(gu,{size:10}):p.jsx(kn,{size:10})})]}),r&&t&&p.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:p.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}=sr(),[n,r]=A.useState(!1),i=e.filter(bc),s=i.map(u=>ou(u)),a=i.length;return p.jsxs("div",{className:"my-2",children:[p.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:[p.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:p.jsx(kn,{size:11,strokeWidth:2,className:"text-neutral-400"})}),p.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:t("工具调用")}),p.jsx("span",{className:"shrink-0 inline-flex items-center gap-1",children:p.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:a})}),!n&&p.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[s.slice(0,3).join(", "),i.length>3?" …":""]})]}),n&&p.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(u=>ns(u)?p.jsx(as,{content:u.content,isOpenDefault:!1},u.id):p.jsx(Tc,{log:u,title:ou(u)},u.id))})]})});Ei.displayName="ExecutionDetailsGroup";const Tc=A.memo(({log:e,title:t})=>{const[n,r]=A.useState(!1),i=!!e.content.trim()&&e.content.trim()!==t.trim(),s=Nk(e),a=Sk(e)||e.type===ee.Error;return p.jsxs("div",{children:[p.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:[p.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:a?p.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:p.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):s?p.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:p.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):p.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),p.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&p.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?p.jsx(gu,{size:10}):p.jsx(kn,{size:10})})]}),n&&i&&p.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:p.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Tc.displayName="ToolGroupItem";const xc=A.memo(({content:e,compact:t})=>p.jsx("div",{className:`text-neutral-900 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:e}));xc.displayName="AgentText";const kc=A.memo(({content:e,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})=>p.jsx("div",{className:`text-neutral-900 min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:p.jsx(is,{className:"space-y-2",content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})}));kc.displayName="AssistantMessage";const _c=A.memo(({content:e})=>p.jsx("div",{className:"my-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-red-500",viewBox:"0 0 16 16",fill:"currentColor",children:p.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"})}),p.jsx("pre",{className:"text-xs text-red-700 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));_c.displayName="ErrorMessage";const Ac=A.memo(({content:e})=>p.jsx("div",{className:"my-2 rounded-lg border border-amber-200 bg-amber-50/70 px-4 py-3",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-amber-500",viewBox:"0 0 16 16",fill:"currentColor",children:p.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"})}),p.jsx("pre",{className:"text-xs text-amber-800 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));Ac.displayName="WarningMessage";function lu(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 s=Math.floor(r/60),a=r%60;return t("{hours} 小时 {minutes} 分",{hours:s,minutes:a})}const Cc=A.memo(({activity:e})=>{const{t}=sr(),n=A.useRef(Date.now()),[r,i]=A.useState(()=>Date.now()),s=e?.processingStartedAt??n.current;A.useEffect(()=>{const c=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(c)},[]);const a=lu(r-s,t),u=e?.lastOutputAt==null?null:lu(r-e.lastOutputAt,t),o=t("正在思考");return p.jsx(ek,{align:"start",content:p.jsxs("div",{className:"flex min-w-max flex-col gap-0.5",children:[p.jsx("span",{children:t("已处理 {duration}",{duration:a})}),p.jsx("span",{className:"text-neutral-300",children:u?t("最后一次输出于 {duration}前",{duration:u}):t("等待首次输出")})]}),children:p.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:p.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(o).map((c,h)=>p.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${h*45}ms`},children:c},`${c}-${h}`))})})})});Cc.displayName="ThinkingIndicator";const yc=A.memo(({turnKey:e,duration:t,collapsible:n,isOpen:r,onToggle:i,onBeforeToggle:s})=>{const{t:a}=sr(),u=t?a("已处理 {duration}",{duration:t}):a("已处理"),o=p.jsxs(p.Fragment,{children:[p.jsx("span",{children:u}),n&&p.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center transition-transform duration-200 motion-reduce:transition-none",style:{transform:r?"rotate(90deg)":"rotate(0deg)"},children:p.jsx(kn,{size:14,strokeWidth:2})})]});return n?p.jsx("div",{className:"mb-3 mt-1",children:p.jsx("button",{type:"button","data-at-group-header":e,"aria-expanded":r,onClick:()=>{s?.(),i(e)},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:o})}):p.jsx("div",{className:"mb-3 mt-1",children:p.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:o})})});yc.displayName="ProcessedGroupSummary";function zk(e,t,n,r,i,s,a){if(e.kind==="execution-group")return p.jsx(Ei,{logs:e.logs});const u=e.log;if(u.type===ee.Tool&&u.children?.length)return p.jsx(Ei,{logs:u.children});if(rs(u))return null;if(u.title==="Thinking"||u.content.startsWith("Thinking:"))return p.jsx(as,{content:u.content,isOpenDefault:!0});switch(u.type){case ee.User:return p.jsx(ss,{content:u.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case ee.Tool:return p.jsx(gi,{type:u.type,title:u.title||"Tool",content:u.content});case ee.Action:return p.jsx(gi,{type:u.type,title:"Action",content:u.content});case ee.Assistant:return p.jsx(kc,{content:u.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a});case ee.Info:return u.tokenUsage?null:p.jsx(xc,{content:u.content,compact:t});case ee.Error:return p.jsx(_c,{content:u.content});case ee.Warning:return p.jsx(Ac,{content:u.content});case ee.Cursor:return p.jsx(Cc,{activity:u.cursorActivity});default:return null}}const $k=8,k3=A.forwardRef(function({logs:t,isOutputActive:n,lastExitAt:r,onUserToggleDetails:i,scrollElementRef:s,workingDir:a,onOpenWorkspaceFile:u,onOpenPreviewUrl:o,onOpenVisualization:c,downloadSessionId:h},d){const[f,m]=A.useState(null),[E,_]=A.useState(!1),[I,C]=A.useState(0),[w,O]=A.useState(()=>new Set),[F,z]=A.useState(()=>Date.now());A.useEffect(()=>{if(!n)return;const B=()=>z(Date.now()),W=window.setTimeout(B,0),oe=window.setInterval(B,1e3);return()=>{window.clearTimeout(W),window.clearInterval(oe)}},[n]);const L=A.useCallback(B=>{if(!B)return;const W=s?.current??Uk(B);m(oe=>oe===W?oe:W),C(W?.clientHeight??0),_(!0)},[s]);A.useEffect(()=>{if(!f)return;const B=()=>C(f.clientHeight);if(B(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(B);return W.observe(f),()=>W.disconnect()},[f]);const K=A.useCallback(B=>{O(W=>{const oe=new Set(W);return oe.has(B)?oe.delete(B):oe.add(B),oe})},[]),G=A.useMemo(()=>{if(n===void 0)return null;const B=Dk(t),W=B.length-1;return B.map((oe,se)=>Bk(oe,se===W,n,r))},[t,n,r]),X=A.useMemo(()=>n===void 0?Yn(t):null,[n,t]),N=A.useMemo(()=>X?X.map(B=>({kind:"item",key:`legacy:${B.key}`,item:B,processed:!1})):Fk(G??[],w),[w,X,G]),U=gh({count:N.length,getScrollElement:()=>f,estimateSize:B=>Hk(N[B]),getItemKey:B=>N[B]?.key??B,overscan:$k,measureElement:B=>B.getBoundingClientRect().height});U.shouldAdjustScrollPositionOnItemSizeChange=Eh;const M=f!==null&&I>0;A.useImperativeHandle(d,()=>({scrollToBottom:(B="instant")=>{const W=s?.current;if(!W||(M&&N.length>0&&U.scrollToIndex(N.length-1,{align:"end"}),W.scrollTo({top:W.scrollHeight,behavior:B}),B!=="instant"))return;let oe=0;const se=()=>{const x=s?.current;x&&(x.scrollHeight-x.scrollTop-x.clientHeight<=1||(x.scrollTop=x.scrollHeight,++oe<5&&requestAnimationFrame(se)))};requestAnimationFrame(se)}}),[M,N.length,s,U]);const V=A.useCallback(B=>{const W=B.end===null?F:B.end;return Mk(B.start,W)},[F]),$=A.useCallback(B=>{switch(B.kind){case"user":return p.jsx(ss,{content:B.log.content,workingDir:a,onOpenWorkspaceFile:u,onOpenPreviewUrl:o});case"summary":return p.jsx(yc,{turnKey:B.turnKey,duration:V(B.duration),collapsible:B.collapsible,isOpen:w.has(B.turnKey),onToggle:K,onBeforeToggle:i});case"item":return zk(B.item,!1,a,u,o,c,h);default:return null}},[h,V,w,o,c,u,i,K,a]),j=U.getVirtualItems();return E?p.jsx("div",{ref:L,className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:M?p.jsx("div",{style:{height:U.getTotalSize(),width:"100%",position:"relative"},children:j.map(B=>{const W=N[B.index];return W?p.jsx("div",{"data-index":B.index,"data-at-row":W.key,...W.kind==="item"&&W.processed?{"data-processed-content":""}:{},ref:U.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${B.start}px)`},children:$(W)},W.key):null})},"virtualized"):p.jsx("div",{children:N.map(B=>p.jsx("div",{"data-at-row":B.key,...B.kind==="item"&&B.processed?{"data-processed-content":""}:{},children:$(B)},B.key))},"static")}):p.jsx("div",{ref:L,className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"}})}),Yk=xt();function qk(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function _3({files:e,onRemove:t}){return e.length===0?null:p.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:e.map(n=>p.jsx(Vk,{item:n,onRemove:t},n.tempId))})}function Vk({item:e,onRemove:t}){const n=e.file.type.startsWith("image/"),r=e.status==="error",i=e.status==="uploading";return p.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?p.jsx("img",{src:`${Yk}${e.attachment.url}`,alt:e.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):p.jsx("span",{className:"flex-shrink-0",children:i?p.jsx(Uc,{size:16,className:"animate-spin text-neutral-400"}):n?p.jsx(Qc,{size:16,className:"text-neutral-400"}):p.jsx(Gc,{size:16,className:"text-neutral-400"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"truncate font-medium",children:e.file.name}),r?p.jsx("div",{className:"truncate text-red-500",children:e.error}):p.jsx("div",{className:"text-neutral-400",children:qk(e.file.size)})]}),p.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:p.jsx(jc,{size:10})})]})}const Wk=xt();async function Gk(e){const t=new FormData;t.append("file",e);const n=await fetch(`${Wk}/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 Kk=0;function A3(){const[e,t]=A.useState([]),n=A.useRef(e);n.current=e;const r=A.useCallback(async d=>{const f=d.map(m=>({tempId:`tmp-${++Kk}`,file:m,progress:0,status:"uploading"}));t(m=>[...m,...f]),await Promise.allSettled(f.map(async m=>{try{const E=await Gk(m.file);t(_=>_.map(I=>I.tempId===m.tempId?{...I,status:"done",progress:100,attachment:E}:I))}catch(E){t(_=>_.map(I=>I.tempId===m.tempId?{...I,status:"error",error:E instanceof Error?E.message:"Upload failed"}:I))}}))},[]),i=A.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),s=A.useCallback(d=>{t(f=>f.filter(m=>m.tempId!==d))},[]),a=A.useCallback(()=>{t([])},[]),u=A.useCallback(d=>{d.length!==0&&t(f=>{const m=new Set(f.map(_=>_.attachment?.id??_.tempId)),E=d.filter(_=>{const I=_.attachment?.id??_.tempId;return m.has(I)?!1:(m.add(I),!0)});return E.length>0?[...f,...E]:f})},[]),o=A.useCallback(()=>{const d=i();return d.length===0?"":d.map(f=>`${f.mimeType.startsWith("image/")?"!":""}[${f.originalName}](${f.storagePath})`).join(`
124
+ `)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:s,clear:a,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function C3(e){const t=A.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return zc({queryKey:["attachments","metadata",t],queryFn:()=>$c.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}const Qk=/^(0|[1-9]\d*)$/,Xk=2147483647;function Zk(e,t){if(!Array.isArray(t))return Ue("patch sequence must be an array");let n=e;for(const r of t){const i=Jk(n,r);if(!i.ok)return i;n=i.conversation}return{ok:!0,conversation:n}}function Jk(e,t){if(!nr(t))return Ue("operation is not an object");const n=n3(t.path);return n?t.op==="add"?e3(e,n,t):t.op==="replace"?t3(e,n,t):qe(t):qe(t)}function e3(e,t,n){if(n.value===void 0)return Ue("operation value is required");if(rr(n.value))return Ue("operation value cannot contain undefined");if(t.length===1&&t[0]==="sessionId")return Dt({...e,sessionId:n.value});if(t[0]!=="entries"||t.length!==2)return qe(n);const r=Ic(t[1]);if(r===void 0)return qe(n);if(!Array.isArray(e.entries))return Ue("entries is not an array");if(r>e.entries.length)return qe(n);const i=e.entries.slice();return i.splice(r,0,n.value),Dt(tr(e,i))}function t3(e,t,n){if(n.value===void 0)return Ue("operation value is required");if(rr(n.value))return Ue("operation value cannot contain undefined");if(t.length===1&&t[0]==="entries"){const h=n.value,d=Array.isArray(h)?h.slice():h;return Dt(tr(e,d))}if(t[0]!=="entries")return qe(n);const r=Ic(t[1]);if(r===void 0)return qe(n);if(!Array.isArray(e.entries))return Ue("entries is not an array");const i=t.length===2,s=t.length===3&&t[2]==="content",a=t.length===4&&t[2]==="metadata"&&t[3]==="status";if(!i&&!s&&!a)return qe(n);if(i){if(r>=e.entries.length)return qe(n);const h=e.entries.slice();return h[r]=n.value,Dt(tr(e,h))}const u=e.entries[r];if(!nr(u))return Ue("entry does not exist");if(s)return u.content===void 0?Ue("entry content does not exist"):Dt(cu(e,r,{...u,content:n.value}));const o=u.metadata;if(!nr(o)||o.status===void 0)return Ue("entry metadata status does not exist");const c={...o,status:n.value};return Dt(cu(e,r,{...u,metadata:c}))}function cu(e,t,n){const r=e.entries.slice();return r[t]=n,tr(e,r)}function tr(e,t){return{...e,entries:t}}function n3(e){if(!(typeof e!="string"||!e.startsWith("/")))return e.slice(1).split("/")}function Ic(e){if(!Qk.test(e))return;const t=Number(e);if(Number.isSafeInteger(t))return t<=Xk?t:void 0}function nr(e){return typeof e=="object"&&e!==null}function rr(e){return e===void 0?!0:Array.isArray(e)?e.some(rr):nr(e)?Object.keys(e).some(t=>rr(e[t])):!1}function Dt(e){return{ok:!0,conversation:e}}function Ue(e){return{ok:!1,kind:"failed",reason:e}}function qe(e){return console.warn("[sessionLogStore] unsupported conversation patch op/path",{op:e.op,path:e.path}),{ok:!1,kind:"unsupported",reason:`unsupported op/path: ${String(e.op)} ${String(e.path)}`}}const y3={entries:[],isTruncated:!1},r3=50,hu=500;function du(e){return typeof e?.seq=="number"?e.seq:0}function fu(e){return e?.entries.at(-1)?.id}function mu(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function I3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function N3(e,t){if(!e||e.isTruncated)return!0;const n=du(e),r=du(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=fu(e),s=fu(t);if(s&&i&&s!==i)return!0;const a=mu(e),u=mu(t);return!!(u&&a&&u!==a)}function i3(e,t){for(;t.length>r3;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const S3=Yc((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const s=i.accessOrder.filter(u=>u!==n);s.push(n);const a={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return i3(a,s)})},applyPatch:(n,r,i)=>{const s=t().conversations[n];if(!s)return!1;if(typeof i=="number"&&typeof s.seq=="number"&&i<=s.seq)return!0;const a=Zk(s,r);if(!a.ok)return a.kind==="failed"&&console.error("[sessionLogStore] applyPatch failed:",a.reason),!1;const u={...a.conversation,seq:typeof i=="number"?i:s.seq,isTruncated:s.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const s=[...r.accessOrder];return s.splice(i,1),s.push(n),{accessOrder:s}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=hu?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-hu),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...s}=r.conversations;return{conversations:s,accessOrder:r.accessOrder.filter(a=>a!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),s3={[Y.CLAUDE_CODE]:{agentType:Y.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[Y.GEMINI_CLI]:{agentType:Y.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[Y.CURSOR_AGENT]:{agentType:Y.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[Y.CODEX]:{agentType:Y.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[Y.QWEN_CODE]:{agentType:Y.QWEN_CODE,label:"Qwen Code",logoSrc:"/agent-icons/qwen-code.svg"},[Y.KIRO_CLI]:{agentType:Y.KIRO_CLI,label:"Kiro CLI",logoSrc:"/agent-icons/kiro-cli.svg"},[Y.OPENCODE]:{agentType:Y.OPENCODE,label:"OpenCode",logoSrc:"/agent-icons/opencode.svg"},[Y.PI_CODING_AGENT]:{agentType:Y.PI_CODING_AGENT,label:"Pi Coding Agent",logoSrc:"/agent-icons/pi-coding-agent.svg"},[Y.GROK_BUILD]:{agentType:Y.GROK_BUILD,label:"Grok Build",logoSrc:"/agent-icons/grok-build.svg"},[Y.MINION_CODE]:{agentType:Y.MINION_CODE,label:"Minion Code"},[Y.DEEPSEEK_HERMES]:{agentType:Y.DEEPSEEK_HERMES,label:"DeepSeek Harness",logoSrc:"/agent-icons/deepseek-hermes.svg"}};function a3(e){return e?s3[e]??null:null}function w3(e,t){return a3(e)?.label??t??(e?String(e):"")}const u3=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:oc},Symbol.toStringTag,{value:"Module"}));export{_3 as A,ds as B,bs as C,y3 as E,Gc as F,ox as I,ve as L,m3 as P,uc as Q,Te as R,ps as S,ek as T,eh as U,ms as W,E3 as Z,Q as a,k3 as b,S3 as c,d3 as d,I3 as e,Zk as f,a3 as g,Y as h,f3 as i,p3 as j,w3 as k,C3 as l,Ik as m,h3 as n,kk as o,hk as p,_k as q,fs as r,N3 as s,Qc as t,A3 as u,T3 as v,au as w,b3 as x,x3 as y,xk as z};