agent-tower 0.7.1 → 0.7.2-beta.4

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 (216) hide show
  1. package/dist/executors/base.executor.d.ts.map +1 -1
  2. package/dist/executors/base.executor.js +6 -3
  3. package/dist/executors/base.executor.js.map +1 -1
  4. package/dist/routes/__tests__/workspaces.test.js +244 -0
  5. package/dist/routes/__tests__/workspaces.test.js.map +1 -1
  6. package/dist/routes/workspaces.d.ts.map +1 -1
  7. package/dist/routes/workspaces.js +11 -0
  8. package/dist/routes/workspaces.js.map +1 -1
  9. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +37 -0
  10. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
  11. package/dist/runtime/__tests__/runtime-coordinator.test.js +13 -0
  12. package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
  13. package/dist/runtime/cli-driver.js +17 -3
  14. package/dist/runtime/cli-driver.js.map +1 -1
  15. package/dist/runtime/contracts.d.ts +9 -2
  16. package/dist/runtime/contracts.d.ts.map +1 -1
  17. package/dist/runtime/runtime-coordinator.d.ts +2 -0
  18. package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
  19. package/dist/runtime/runtime-coordinator.js +10 -0
  20. package/dist/runtime/runtime-coordinator.js.map +1 -1
  21. package/dist/services/__tests__/session-manager.lifecycle.test.js +67 -0
  22. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  23. package/dist/services/__tests__/session-manager.team-run.test.js +41 -46
  24. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  25. package/dist/services/__tests__/team-reconciler.service.test.js +30 -0
  26. package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
  27. package/dist/services/project.service.d.ts.map +1 -1
  28. package/dist/services/project.service.js +30 -4
  29. package/dist/services/project.service.js.map +1 -1
  30. package/dist/services/session-manager.d.ts +1 -0
  31. package/dist/services/session-manager.d.ts.map +1 -1
  32. package/dist/services/session-manager.js +38 -3
  33. package/dist/services/session-manager.js.map +1 -1
  34. package/dist/services/session-runtime-cleanup-gate.d.ts +1 -0
  35. package/dist/services/session-runtime-cleanup-gate.d.ts.map +1 -1
  36. package/dist/services/session-runtime-cleanup-gate.js +5 -3
  37. package/dist/services/session-runtime-cleanup-gate.js.map +1 -1
  38. package/dist/services/team-reconciler.service.d.ts +1 -0
  39. package/dist/services/team-reconciler.service.d.ts.map +1 -1
  40. package/dist/services/team-reconciler.service.js +1 -0
  41. package/dist/services/team-reconciler.service.js.map +1 -1
  42. package/dist/services/workspace.service.d.ts +7 -1
  43. package/dist/services/workspace.service.d.ts.map +1 -1
  44. package/dist/services/workspace.service.js +111 -9
  45. package/dist/services/workspace.service.js.map +1 -1
  46. package/dist/utils/__tests__/spawned-process-identity.test.d.ts +2 -0
  47. package/dist/utils/__tests__/spawned-process-identity.test.d.ts.map +1 -0
  48. package/dist/utils/__tests__/spawned-process-identity.test.js +31 -0
  49. package/dist/utils/__tests__/spawned-process-identity.test.js.map +1 -0
  50. package/dist/utils/spawned-process-identity.d.ts +1 -1
  51. package/dist/utils/spawned-process-identity.d.ts.map +1 -1
  52. package/dist/utils/spawned-process-identity.js +11 -3
  53. package/dist/utils/spawned-process-identity.js.map +1 -1
  54. package/dist/web/assets/AgentDemoPage-Svq9Baa7.js +1 -0
  55. package/dist/web/assets/{AgentEnvironmentSettingsPage-b0XzUzna.js → AgentEnvironmentSettingsPage-DQjnDr-h.js} +1 -1
  56. package/dist/web/assets/AgentLogo-I2etsqym.js +1 -0
  57. package/dist/web/assets/BranchSelect-Eb5UGWWX.js +1 -0
  58. package/dist/web/assets/BrandLogo-BjC1hcgv.js +1 -0
  59. package/dist/web/assets/{ConversationPage-DQRA8WuD.js → ConversationPage-jEYUuSPT.js} +2 -2
  60. package/dist/web/assets/CreateTaskInput-B_cRDkVq.js +1 -0
  61. package/dist/web/assets/{DemoPage-DaDC_MIJ.js → DemoPage-BkkueMuL.js} +1 -1
  62. package/dist/web/assets/DesignSystemPage-oM16R2Ta.js +16 -0
  63. package/dist/web/assets/{ExecutionPermissionSelector-DglILGVC.js → ExecutionPermissionSelector-BX5Xx8ta.js} +1 -1
  64. package/dist/web/assets/{GeneralSettingsPage-BKRf-usO.js → GeneralSettingsPage-B0jFlgDl.js} +1 -1
  65. package/dist/web/assets/{LoadingPreviewPage-BHAQCQDA.js → LoadingPreviewPage-BxjpxLLP.js} +1 -1
  66. package/dist/web/assets/McpSettingsPage-BErvd619.js +1 -0
  67. package/dist/web/assets/{MemberAvatar-DUXHTIXf.js → MemberAvatar-TVtoxQe8.js} +1 -1
  68. package/dist/web/assets/NotificationSettingsPage-BETMBdj1.js +1 -0
  69. package/dist/web/assets/{ProfileSettingsPage-DwziCseV.js → ProfileSettingsPage-C03ZAft-.js} +1 -1
  70. package/dist/web/assets/ProjectKanbanPage-DsPxwoVf.js +86 -0
  71. package/dist/web/assets/ProjectSettingsPage-BwNM6VWs.js +2 -0
  72. package/dist/web/assets/{ProviderSettingsPage-CC3zkdf6.js → ProviderSettingsPage-CeNQPd74.js} +3 -3
  73. package/dist/web/assets/{SettingsMasterDetail-D5lNH2f6.js → SettingsMasterDetail-B_SI2h_k.js} +1 -1
  74. package/dist/web/assets/TeamSettingsPage-BfgtMl_n.js +1 -0
  75. package/dist/web/assets/agent-meta-DOylIs2N.js +1 -0
  76. package/dist/web/assets/arc-BlZww3MO.js +1 -0
  77. package/dist/web/assets/{architectureDiagram-3BPJPVTR-C_p9_AH2.js → architectureDiagram-3BPJPVTR-DWO_DRgk.js} +1 -1
  78. package/dist/web/assets/at-sign-BFf8Sz8T.js +1 -0
  79. package/dist/web/assets/{blockDiagram-GPEHLZMM-CKsR1Tax.js → blockDiagram-GPEHLZMM-CJPYhE52.js} +1 -1
  80. package/dist/web/assets/{c4Diagram-AAUBKEIU-BBUKt2FW.js → c4Diagram-AAUBKEIU-Cx5IvcjB.js} +1 -1
  81. package/dist/web/assets/channel-D9sA6Wxp.js +1 -0
  82. package/dist/web/assets/check-Cm7Vstpm.js +1 -0
  83. package/dist/web/assets/chevron-down-C6Ta4vyM.js +1 -0
  84. package/dist/web/assets/chevron-up-BwJT7iif.js +1 -0
  85. package/dist/web/assets/{chunk-2J33WTMH-BcGNhDoU.js → chunk-2J33WTMH-D9cBNYgd.js} +1 -1
  86. package/dist/web/assets/{chunk-4BX2VUAB-9dL7TVjW.js → chunk-4BX2VUAB-BY8TNt6E.js} +1 -1
  87. package/dist/web/assets/{chunk-55IACEB6-CzJzh0tH.js → chunk-55IACEB6-pT-HP-28.js} +1 -1
  88. package/dist/web/assets/{chunk-727SXJPM-Bp5EOgoG.js → chunk-727SXJPM-hy95xDLb.js} +1 -1
  89. package/dist/web/assets/{chunk-AQP2D5EJ-BaLnh9ac.js → chunk-AQP2D5EJ-DlUN-icr.js} +1 -1
  90. package/dist/web/assets/{chunk-FMBD7UC4-BcbzC8r4.js → chunk-FMBD7UC4-Dg2iMKZR.js} +1 -1
  91. package/dist/web/assets/{chunk-ND2GUHAM-DkT5Stbd.js → chunk-ND2GUHAM-DMzFIsJ-.js} +1 -1
  92. package/dist/web/assets/{chunk-QZHKN3VN-DszScpAV.js → chunk-QZHKN3VN-C6CgmKuM.js} +1 -1
  93. package/dist/web/assets/{circle-alert-ChWS5BPS.js → circle-alert-Dm2Pl-rU.js} +1 -1
  94. package/dist/web/assets/classDiagram-4FO5ZUOK-2e2YVo9r.js +1 -0
  95. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-2e2YVo9r.js +1 -0
  96. package/dist/web/assets/code-block-OCS4YCEC-DizntuP_.js +2 -0
  97. package/dist/web/assets/{confirm-dialog-0vHzUzvI.js → confirm-dialog-DRpyE_qU.js} +1 -1
  98. package/dist/web/assets/copy-r0aUdsl8.js +1 -0
  99. package/dist/web/assets/{cose-bilkent-S5V4N54A-DueZsNr5.js → cose-bilkent-S5V4N54A-D-fvmvw-.js} +1 -1
  100. package/dist/web/assets/cssMode-DVorIr82.js +1 -0
  101. package/dist/web/assets/{dagre-BM42HDAG-BkQGrA8s.js → dagre-BM42HDAG-H0bYI1f3.js} +1 -1
  102. package/dist/web/assets/{diagram-2AECGRRQ-D4qtEjjj.js → diagram-2AECGRRQ-DI568fLp.js} +1 -1
  103. package/dist/web/assets/{diagram-5GNKFQAL-ZuFk-7GO.js → diagram-5GNKFQAL-BLcaBzw2.js} +1 -1
  104. package/dist/web/assets/{diagram-KO2AKTUF-kwBr5lw0.js → diagram-KO2AKTUF-aL1cvl23.js} +1 -1
  105. package/dist/web/assets/{diagram-LMA3HP47-m88-mNyr.js → diagram-LMA3HP47-DbOutAfH.js} +1 -1
  106. package/dist/web/assets/{diagram-OG6HWLK6-B9gV1dxA.js → diagram-OG6HWLK6-D_cWftAX.js} +1 -1
  107. package/dist/web/assets/{erDiagram-TEJ5UH35-De_DsoOX.js → erDiagram-TEJ5UH35-DRe5V8Dx.js} +1 -1
  108. package/dist/web/assets/{flowDiagram-I6XJVG4X-9VwLS0b3.js → flowDiagram-I6XJVG4X-B5-vg_Nh.js} +1 -1
  109. package/dist/web/assets/{freemarker2-CLp1Yffb.js → freemarker2-CXlYb2yX.js} +3 -3
  110. package/dist/web/assets/{ganttDiagram-6RSMTGT7-DoOyYr5i.js → ganttDiagram-6RSMTGT7-B3iBFICN.js} +1 -1
  111. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CMGuTxMz.js → gitGraphDiagram-PVQCEYII-CZ9zsKVw.js} +1 -1
  112. package/dist/web/assets/globe-JXfw4MCF.js +1 -0
  113. package/dist/web/assets/handlebars-BL0prPVZ.js +1 -0
  114. package/dist/web/assets/html-DJWeRkWe.js +1 -0
  115. package/dist/web/assets/htmlMode-D_fekqg9.js +1 -0
  116. package/dist/web/assets/{index-DI7lHrAR.js → index-CWEbo6pZ.js} +5 -5
  117. package/dist/web/assets/index-CWbMMO6g.js +122 -0
  118. package/dist/web/assets/index-uXglTJ2_.css +1 -0
  119. package/dist/web/assets/{infoDiagram-5YYISTIA-gUCDmQX7.js → infoDiagram-5YYISTIA-DQU_sN8x.js} +1 -1
  120. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-CmfFhhIz.js → ishikawaDiagram-YF4QCWOH-BVGrNzJa.js} +1 -1
  121. package/dist/web/assets/javascript-CDfuzdfe.js +1 -0
  122. package/dist/web/assets/{journeyDiagram-JHISSGLW-BvV5GoR_.js → journeyDiagram-JHISSGLW-DU4Md1Tq.js} +1 -1
  123. package/dist/web/assets/{jsonMode-BbjYNQ7Q.js → jsonMode-BMSvHUHa.js} +4 -4
  124. package/dist/web/assets/{kanban-definition-UN3LZRKU-BpTm0MC-.js → kanban-definition-UN3LZRKU-DDPgCucq.js} +1 -1
  125. package/dist/web/assets/key-round-BHVp7u3Z.js +1 -0
  126. package/dist/web/assets/{layers-DslPQJ3T.js → layers-2tjjhM75.js} +1 -1
  127. package/dist/web/assets/{linear-BJ_g8wqu.js → linear-D8yLBTVY.js} +1 -1
  128. package/dist/web/assets/link-CnunXc7X.js +1 -0
  129. package/dist/web/assets/liquid-DHrNpv6c.js +1 -0
  130. package/dist/web/assets/{lspLanguageFeatures-PSX0tqnR.js → lspLanguageFeatures-BiYvrSP0.js} +1 -1
  131. package/dist/web/assets/mdx-CIEpgUOV.js +1 -0
  132. package/dist/web/assets/mermaid-NOHMQCX5-9-DTTfp6.js +124 -0
  133. package/dist/web/assets/{message-square-C-22K3oa.js → message-square-QM0c6Dcv.js} +1 -1
  134. package/dist/web/assets/{mindmap-definition-RKZ34NQL-DS5GLydx.js → mindmap-definition-RKZ34NQL-CCAuuWFZ.js} +1 -1
  135. package/dist/web/assets/{modal-CFVLBZ5p.js → modal-BRoNvfhw.js} +1 -1
  136. package/dist/web/assets/{monaco-CkaUvvB4.js → monaco-CrBn9oMJ.js} +3 -3
  137. package/dist/web/assets/paperclip-CC7nHUQ7.js +1 -0
  138. package/dist/web/assets/pencil-DIY0Hu5t.js +1 -0
  139. package/dist/web/assets/{pieDiagram-4H26LBE5-C1PJJGsh.js → pieDiagram-4H26LBE5-CXy_N5QX.js} +2 -2
  140. package/dist/web/assets/play-CIZVXiwM.js +1 -0
  141. package/dist/web/assets/python-BIs0pClJ.js +1 -0
  142. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CzDfs-TQ.js → quadrantDiagram-W4KKPZXB-Dt44QsS8.js} +1 -1
  143. package/dist/web/assets/razor-JCx8NEwU.js +1 -0
  144. package/dist/web/assets/{requirementDiagram-4Y6WPE33-qHbU7oZa.js → requirementDiagram-4Y6WPE33-BL8D7Np0.js} +1 -1
  145. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-BfRgrEeN.js → sankeyDiagram-5OEKKPKP-I5nefO3A.js} +1 -1
  146. package/dist/web/assets/{select-CL78HCY0.js → select-BmjoUfrV.js} +1 -1
  147. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-CGTNzKk3.js → sequenceDiagram-3UESZ5HK-lbPrhX8g.js} +1 -1
  148. package/dist/web/assets/server-BNBdQGor.js +1 -0
  149. package/dist/web/assets/stateDiagram-AJRCARHV-Bw3qtv2M.js +1 -0
  150. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Xbc4HxDQ.js +1 -0
  151. package/dist/web/assets/{switch-DmQ0Brgd.js → switch-CEUHI4gI.js} +1 -1
  152. package/dist/web/assets/task-kalEmHDc.js +42 -0
  153. package/dist/web/assets/task-priority-wLXAgVZZ.js +1 -0
  154. package/dist/web/assets/{textarea-DOte4pMQ.js → textarea-CD82lB0Z.js} +1 -1
  155. package/dist/web/assets/{timeline-definition-PNZ67QCA-BBhCKsly.js → timeline-definition-PNZ67QCA-Cfg_kgoa.js} +1 -1
  156. package/dist/web/assets/{trash-2-BSAHXKfW.js → trash-2-BF_3L-qk.js} +1 -1
  157. package/dist/web/assets/{tsMode-B6rHoWny.js → tsMode-DAHSkTAr.js} +2 -2
  158. package/dist/web/assets/typescript-CptiLWGr.js +1 -0
  159. package/dist/web/assets/{upload-e87qV_RH.js → upload-B2AMXrU-.js} +1 -1
  160. package/dist/web/assets/{use-profiles-Cv2zBJOC.js → use-profiles-CQ-jIuiI.js} +1 -1
  161. package/dist/web/assets/use-projects-BYUZwQ-q.js +1 -0
  162. package/dist/web/assets/{use-providers-CnpIgITQ.js → use-providers-DdV9gbj1.js} +1 -1
  163. package/dist/web/assets/useNormalizedLogs-DdFsf-Z1.js +1 -0
  164. package/dist/web/assets/{vennDiagram-CIIHVFJN-DrDrt_Jg.js → vennDiagram-CIIHVFJN-CdEP03CK.js} +1 -1
  165. package/dist/web/assets/{wardley-L42UT6IY-CMYQm14y.js → wardley-L42UT6IY-q_Enplrs.js} +1 -1
  166. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-COLA9A80.js → wardleyDiagram-YWT4CUSO-DlL6fsid.js} +1 -1
  167. package/dist/web/assets/xml-DbPqkgZW.js +1 -0
  168. package/dist/web/assets/{xychartDiagram-2RQKCTM6-BDegkKoT.js → xychartDiagram-2RQKCTM6-B2OGqVKA.js} +1 -1
  169. package/dist/web/assets/yaml-Deyq6Z5-.js +1 -0
  170. package/dist/web/index.html +2 -2
  171. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +2 -2
  172. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
  173. package/node_modules/@agent-tower/shared/dist/types.d.ts +19 -2
  174. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  175. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  176. package/package.json +1 -1
  177. package/dist/web/assets/AgentDemoPage-Gr8q6VxC.js +0 -1
  178. package/dist/web/assets/AgentLogo-q8Chady2.js +0 -1
  179. package/dist/web/assets/CreateTaskInput-Dr6Lvllw.js +0 -1
  180. package/dist/web/assets/Icons-7lThaqQv.js +0 -1
  181. package/dist/web/assets/McpSettingsPage-CVOEPwCv.js +0 -1
  182. package/dist/web/assets/NotificationSettingsPage-DBe1YCNN.js +0 -1
  183. package/dist/web/assets/ProjectKanbanPage-Dcz8KXWU.js +0 -86
  184. package/dist/web/assets/ProjectSettingsPage-hzSrj79M.js +0 -2
  185. package/dist/web/assets/TeamSettingsPage-Cdbvh2ne.js +0 -1
  186. package/dist/web/assets/arc-d2D24uRQ.js +0 -1
  187. package/dist/web/assets/channel-D0hF47LU.js +0 -1
  188. package/dist/web/assets/check-BqhuHtHP.js +0 -1
  189. package/dist/web/assets/chevron-down-Bw_76CB_.js +0 -1
  190. package/dist/web/assets/chevron-right-DbcFf_Dw.js +0 -1
  191. package/dist/web/assets/chevron-up-x1n3MhC-.js +0 -1
  192. package/dist/web/assets/classDiagram-4FO5ZUOK-ulXJsBKw.js +0 -1
  193. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ulXJsBKw.js +0 -1
  194. package/dist/web/assets/code-block-OCS4YCEC-G8tEtSdL.js +0 -2
  195. package/dist/web/assets/cssMode-Dqx3XDOC.js +0 -1
  196. package/dist/web/assets/folder-picker-B0khMt7A.js +0 -1
  197. package/dist/web/assets/handlebars-CmLfR6Uy.js +0 -1
  198. package/dist/web/assets/html-D34UDOLc.js +0 -1
  199. package/dist/web/assets/htmlMode-qjrvkZFJ.js +0 -1
  200. package/dist/web/assets/index-DrzmyANC.js +0 -122
  201. package/dist/web/assets/index-MMCbS8_L.css +0 -1
  202. package/dist/web/assets/javascript-D5tp0LcO.js +0 -1
  203. package/dist/web/assets/liquid-DBu3_6XS.js +0 -1
  204. package/dist/web/assets/mdx-Bb4nrA8s.js +0 -1
  205. package/dist/web/assets/mermaid-NOHMQCX5-B44shuzc.js +0 -124
  206. package/dist/web/assets/pencil-DB3VPszm.js +0 -1
  207. package/dist/web/assets/python-BfodDYt4.js +0 -1
  208. package/dist/web/assets/razor-DdED1MBH.js +0 -1
  209. package/dist/web/assets/server-Cd7APx6v.js +0 -1
  210. package/dist/web/assets/stateDiagram-AJRCARHV-BY1LJ4b7.js +0 -1
  211. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BV_JKRZC.js +0 -1
  212. package/dist/web/assets/typescript-C2A3q8UY.js +0 -1
  213. package/dist/web/assets/use-projects-C8WDJXdj.js +0 -1
  214. package/dist/web/assets/useNormalizedLogs-AbIXa8s-.js +0 -1
  215. package/dist/web/assets/xml-D4xDxfjR.js +0 -1
  216. package/dist/web/assets/yaml-yJExA7tq.js +0 -1
@@ -0,0 +1,124 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-DizntuP_.js","assets/index-CWbMMO6g.js","assets/index-uXglTJ2_.css","assets/agent-meta-DOylIs2N.js","assets/chevron-down-C6Ta4vyM.js","assets/index-CWEbo6pZ.js"])))=>i.map(i=>d[i]);
2
+ import{c as ru,r as _,D as Sc,ah as iu,j as p,a_ as Nc,a$ as wc,aH as bi,P as Et,l as Tn,u as rr,ae as Lc,V as Rc,X as Oc,m as Dc,p as Pc,b0 as Mc}from"./index-CWbMMO6g.js";import{L as ce,C as xn,F as vc}from"./agent-meta-DOylIs2N.js";import{C as su}from"./chevron-down-C6Ta4vyM.js";const Bc=[["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"}]],Fc=ru("chart-no-axes-combined",Bc);const Hc=[["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"}]],Uc=ru("image",Hc),jc=/^[ \t]{0,3}::agent-download\{file="([^"\r\n]+)"\}[ \t]*$/,zc=/^[a-zA-Z]:[\\/]/,$c=1024;function au(e){if(!e||e.length>$c||e!==e.trim()||e.includes("\\")||/[\0-\x1f\x7f]/.test(e)||e.startsWith("/")||zc.test(e))return null;const t=e.split("/");return t.some(n=>!n||n==="."||n==="..")?null:t.join("/")}function Yc(e){const t=e.match(jc);return t?au(t[1]):null}function It(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((b,A)=>r[A]!==b)))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 b=Math.round((Date.now()-h)*100)/100,A=Math.round((Date.now()-m)*100)/100,I=A/16,y=(w,R)=>{for(w=String(w);w.length<R;)w=" "+w;return w};console.info(`%c⏱ ${y(A,5)} /${y(b,5)} ms`,`
3
+ font-size: .6rem;
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 cs(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const qc=(e,t)=>Math.abs(e-t)<1.01,Vc=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},hs=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Wc=e=>e,Gc=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},Qc=(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(hs(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(hs(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},ds={passive:!0},fs=typeof window>"u"?!0:"onscrollend"in window,Kc=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=e.options.useScrollendEvent&&fs?()=>{}:Vc(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,ds);const c=e.options.useScrollendEvent&&fs;return c&&n.addEventListener("scrollend",o,ds),()=>{n.removeEventListener("scroll",u),c&&n.removeEventListener("scrollend",o)}},Xc=(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"]},Zc=(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 Jc{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:Wc,rangeExtractor:Gc,onChange:()=>{},measureElement:Xc,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=It(()=>(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=It(()=>[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=It(()=>[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),b=this.laneAssignments.get(f);let A,I;if(b!==void 0&&this.options.lanes>1){A=b;const F=d[A],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,A=F?F.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,A)}const y=o.get(m),w=typeof y=="number"?y:this.options.estimateSize(f),R=I+w;h[f]={index:f,start:I,size:w,end:R,key:m,lane:A},d[A]=f}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=It(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>this.range=n.length>0&&r>0?eh({measurements:n,outerSize:r,scrollOffset:i,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=It(()=>{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=It(()=>[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 cs(r[uu(0,r.length-1,i=>cs(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 b=this.getScrollOffset(),A=this.getOffsetForIndex(n,f);if(!A){console.warn("Failed to get offset for index:",n);return}qc(A[0],b)||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 uu=(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 eh({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=uu(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 ms=typeof document<"u"?_.useLayoutEffect:_.useEffect;function th({useFlushSync:e=!0,...t}){const n=_.useReducer(()=>({}),{})[1],r={...t,onChange:(s,a)=>{var u;e&&a?Sc.flushSync(n):n(),(u=t.onChange)==null||u.call(t,s,a)}},[i]=_.useState(()=>new Jc(r));return i.setOptions(r),ms(()=>i._didMount(),[]),ms(()=>i._willUpdate()),i}function nh(e){return th({observeElementRect:Qc,observeElementOffset:Kc,scrollToFn:Zc,...e})}function rh(e,t,n){const r=n,i=r.getScrollOffset()+r.scrollAdjustments;return e.end+t<=i}const ir=(function(e){if(e==null)return uh;if(typeof e=="function")return sr(e);if(typeof e=="object")return Array.isArray(e)?ih(e):sh(e);if(typeof e=="string")return ah(e);throw new Error("Expected function, string, or object as test")});function ih(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ir(e[n]);return sr(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function sh(e){const t=e;return sr(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function ah(e){return sr(t);function t(n){return n&&n.type===e}}function sr(e){return t;function t(n,r,i){return!!(oh(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function uh(){return!0}function oh(e){return e!==null&&typeof e=="object"&&"type"in e}const ou=[],Zt=!0,Yr=!1,Yn="skip";function Ei(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ir(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=ou,b,A,I;if((!t||s(o,c,h[h.length-1]||void 0))&&(m=lh(n(o,h)),m[0]===Yr))return m;if("children"in o&&o.children){const y=o;if(y.children&&m[0]!==Yn)for(A=(r?y.children.length:-1)+a,I=h.concat(y);A>-1&&A<y.children.length;){const w=y.children[A];if(b=u(w,A,I)(),b[0]===Yr)return b;A=typeof b[1]=="number"?b[1]:A+a}}return m}}}function lh(e){return Array.isArray(e)?e:typeof e=="number"?[Zt,e]:e==null?ou:[e]}function it(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),Ei(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=mh(e,t,n,r,i,s,a);it(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 hh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const dh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),fh=new Set(["javascript:","data:","file:","vbscript:"]);function gs(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||fh.has(a.protocol)||!(dh.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const o=hh(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 kr=Symbol("node-seen"),mh=(e,t,n,r,i,s,a)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[kr])return Zt;if(o.tagName==="a"){const d=gs(o.properties.href,t,e,!1,!1,i);return d===null?(o[kr]=!0,it(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]"}]}),Yn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",Zt)}if(o.tagName==="img"){const d=gs(o.properties.src,n,e,r,!0,i);return d===null?(o[kr]=!0,it(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")+"]"}]}),Yn):(o.properties.src=d,Zt)}return Zt};return u},lu=-1,ar=0,tn=1,qn=2,Ti=3,xi=4,ki=5,Ai=6,cu=7,hu=8,bs=typeof self=="object"?self:globalThis,ph=(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 ar:case lu:return n(a,i);case tn:{const u=n([],i);for(const o of a)u.push(r(o));return u}case qn:{const u=n({},i);for(const[o,c]of a)u[r(o)]=r(c);return u}case Ti:return n(new Date(a),i);case xi:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case ki:{const u=n(new Map,i);for(const[o,c]of a)u.set(r(o),r(c));return u}case Ai:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case cu:{const{name:u,message:o}=a;return n(new bs[u](o),i)}case hu: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 bs[s](a),i)};return r},Es=e=>ph(new Map,e)(0),St="",{toString:gh}={},{keys:bh}=Object,Yt=e=>{const t=typeof e;if(t!=="object"||!e)return[ar,t];const n=gh.call(e).slice(8,-1);switch(n){case"Array":return[tn,St];case"Object":return[qn,St];case"Date":return[Ti,St];case"RegExp":return[xi,St];case"Map":return[ki,St];case"Set":return[Ai,St];case"DataView":return[tn,n]}return n.includes("Array")?[tn,n]:n.includes("Error")?[cu,n]:[qn,n]},Ln=([e,t])=>e===ar&&(t==="function"||t==="symbol"),Eh=(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]=Yt(a);switch(u){case ar:{let h=a;switch(o){case"bigint":u=hu,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([lu],a)}return i([u,h],a)}case tn:{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 qn:{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 bh(a))(e||!Ln(Yt(a[f])))&&h.push([s(f),s(a[f])]);return d}case Ti:return i([u,a.toISOString()],a);case xi:{const{source:h,flags:d}=a;return i([u,{source:h,flags:d}],a)}case ki:{const h=[],d=i([u,h],a);for(const[f,m]of a)(e||!(Ln(Yt(f))||Ln(Yt(m))))&&h.push([s(f),s(m)]);return d}case Ai:{const h=[],d=i([u,h],a);for(const f of a)(e||!Ln(Yt(f)))&&h.push(s(f));return d}}const{message:c}=a;return i([u,{name:o,message:c}],a)};return s},Ts=(e,{json:t,lossy:n}={})=>{const r=[];return Eh(!(t||n),!!t,new Map,r)(e),r},mt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Es(Ts(e,t)):structuredClone(e):(e,t)=>Es(Ts(e,t));class kn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}kn.prototype.normal={};kn.prototype.property={};kn.prototype.space=void 0;function du(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new kn(n,r,t)}function mn(e){return e.toLowerCase()}class Ie{constructor(t,n){this.attribute=n,this.property=t}}Ie.prototype.attribute="";Ie.prototype.booleanish=!1;Ie.prototype.boolean=!1;Ie.prototype.commaOrSpaceSeparated=!1;Ie.prototype.commaSeparated=!1;Ie.prototype.defined=!1;Ie.prototype.mustUseProperty=!1;Ie.prototype.number=!1;Ie.prototype.overloadedBoolean=!1;Ie.prototype.property="";Ie.prototype.spaceSeparated=!1;Ie.prototype.space=void 0;let Th=0;const Z=Tt(),me=Tt(),qr=Tt(),v=Tt(),le=Tt(),Ot=Tt(),we=Tt();function Tt(){return 2**++Th}const Vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:me,commaOrSpaceSeparated:we,commaSeparated:Ot,number:v,overloadedBoolean:qr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Ar=Object.keys(Vr);class _i extends Ie{constructor(t,n,r,i){let s=-1;if(super(t,n),xs(this,"space",i),typeof r=="number")for(;++s<Ar.length;){const a=Ar[s];xs(this,Ar[s],(r&Vr[a])===Vr[a])}}}_i.prototype.defined=!0;function xs(e,t,n){n&&(e[t]=n)}function vt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new _i(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[mn(r)]=r,n[mn(s.attribute)]=r}return new kn(t,n,e.space)}const fu=vt({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:me,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:le,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:v,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:le,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:me,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 mu(e,t){return t in e?e[t]:t}function pu(e,t){return mu(e,t.toLowerCase())}const xh=vt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ot,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:le,autoFocus:Z,autoPlay:Z,blocking:le,capture:null,charSet:null,checked:Z,cite:null,className:le,cols:v,colSpan:null,content:null,contentEditable:me,controls:Z,controlsList:le,coords:v|Ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:qr,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:le,height:v,hidden:qr,high:v,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:le,itemRef:le,itemScope:Z,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:v,pattern:null,ping:le,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:le,required:Z,reversed:Z,rows:v,rowSpan:v,sandbox:le,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:me,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:Z,useMap:null,value:me,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,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:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:me,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:Z,disableRemotePlayback:Z,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:pu}),kh=vt({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:we,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:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:Z,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:Ot,g2:Ot,glyphName:Ot,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:we,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:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:we,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:we,rev:we,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:we,requiredFeatures:we,requiredFonts:we,requiredFormats:we,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:we,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:we,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:we,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:mu}),gu=vt({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()}}),bu=vt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pu}),Eu=vt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ah={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"},_h=/[A-Z]/g,ks=/-[a-z]/g,yh=/^data[-\w.:]+$/i;function ur(e,t){const n=mn(t);let r=t,i=Ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yh.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ks,Ih);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ks.test(s)){let a=s.replace(_h,Ch);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=_i}return new i(r,t)}function Ch(e){return"-"+e.toLowerCase()}function Ih(e){return e.charAt(1).toUpperCase()}const An=du([fu,xh,gu,bu,Eu],"html"),at=du([fu,kh,gu,bu,Eu],"svg");function As(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 Tu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _s=/[#.]/g;function Sh(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){_s.lastIndex=i;const u=_s.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 ys(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xu(e){return e.join(" ").trim()}function ku(e,t,n){const r=n?Rh(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=Sh(s,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Nh(a))u.unshift(a);else for(const[d,f]of Object.entries(a))wh(e,o.properties,d,f)}for(const c of u)Wr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Nh(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 wh(e,t,n,r){const i=ur(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=ys(r):i.commaSeparated?s=As(r):i.commaOrSpaceSeparated?s=ys(As(r).join(" ")):s=Cs(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Lh(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(Cs(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Wr(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)Wr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Wr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Cs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||mn(n)===mn(t)))return!0}return n}function Lh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Rh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Oh=["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"],Dh=ku(An,"div"),Ph=ku(at,"g",Oh);function Mh(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=Is(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=Is(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 Is(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 dt={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/"},Au={}.hasOwnProperty,vh=Object.prototype;function Bh(e,t){const n=t||{};return yi({file:n.file||void 0,location:!1,schema:n.space==="svg"?at:An,verbose:n.verbose||!1},e)}function yi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Hn(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:_u(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=Mh(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"},Hn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Hn(e,r,n),n}default:return n=Fh(e,t),n}}function _u(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=yi(e,t[n]);r.push(i)}return r}function Fh(e,t){const n=e.schema;e.schema=t.namespaceURI===dt.svg?at:An;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Au.call(vh,o)||(i[o]=u.value)}const a=(e.schema.space==="svg"?Ph:Dh)(t.tagName,i,_u(e,t.childNodes));if(Hn(e,t,a),a.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Lt(o.startTag),h=o&&o.endTag&&Lt(o.endTag),d=yi(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),a.content=d}return e.schema=n,a}function Hn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Hh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Hh(e,t,n){const r=Lt(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)Au.call(n.attrs,a)&&(s[ur(e.schema,a).property]=Lt(n.attrs[a]));n.startTag;const u=Lt(n.startTag),o=n.endTag?Lt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=s,t.data={position:c}}}return r}function Lt(e){const t=Ss({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ss({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ss(e){return e.line&&e.column?e:void 0}const Ns={}.hasOwnProperty;function yu(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&Ns.call(i,e)){const o=String(i[e]);a=Ns.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 Uh={},jh={}.hasOwnProperty,Cu=yu("type",{handlers:{root:$h,element:Gh,text:Vh,comment:Wh,doctype:qh}});function zh(e,t){const r=(t||Uh).space;return Cu(e,r==="svg"?at:An)}function $h(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ci(e.children,n,t),Bt(e,n),n}function Yh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ci(e.children,n,t),Bt(e,n),n}function qh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Bt(e,t),t}function Vh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Bt(e,t),t}function Wh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Bt(e,t),t}function Gh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=at);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&jh.call(e.properties,s)){const o=Qh(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:dt[a],childNodes:[],parentNode:null};return u.childNodes=Ci(e.children,u,r),Bt(e,u),e.tagName==="template"&&e.content&&(u.content=Yh(e.content,r)),u}function Qh(e,t,n){const r=ur(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?Tu(n):xu(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=dt[r.space]}return i}function Ci(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=Cu(e[r],n);s.parentNode=t,i.push(s)}return i}function Bt(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 Kh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Xh=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]),he="�";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 ye={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Iu(e){return e>=55296&&e<=57343}function Zh(e){return e>=56320&&e<=57343}function Jh(e,t){return(e-55296)*1024+9216+t}function Su(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Nu(e){return e>=64976&&e<=65007||Xh.has(e)}var N;(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"})(N||(N={}));const ed=65536;class td{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=ed,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(Zh(n))return this.pos++,this._addGap(),Jh(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(N.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,Iu(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){Su(t)?this._err(N.controlCharacterInInputStream):Nu(t)&&this._err(N.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var J;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(J||(J={}));function wu(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 nd=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))),rd=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 id(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=rd.get(e))!==null&&t!==void 0?t:e}var ge;(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"})(ge||(ge={}));const sd=32;var rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(rt||(rt={}));function Gr(e){return e>=ge.ZERO&&e<=ge.NINE}function ad(e){return e>=ge.UPPER_A&&e<=ge.UPPER_F||e>=ge.LOWER_A&&e<=ge.LOWER_F}function ud(e){return e>=ge.UPPER_A&&e<=ge.UPPER_Z||e>=ge.LOWER_A&&e<=ge.LOWER_Z||Gr(e)}function od(e){return e===ge.EQUALS||ud(e)}var pe;(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"})(pe||(pe={}));var Ke;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ke||(Ke={}));class ld{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=pe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ke.Strict}startEntity(t){this.decodeMode=t,this.state=pe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case pe.EntityStart:return t.charCodeAt(n)===ge.NUM?(this.state=pe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=pe.NamedEntity,this.stateNamedEntity(t,n));case pe.NumericStart:return this.stateNumericStart(t,n);case pe.NumericDecimal:return this.stateNumericDecimal(t,n);case pe.NumericHex:return this.stateNumericHex(t,n);case pe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|sd)===ge.LOWER_X?(this.state=pe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=pe.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(Gr(i)||ad(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(Gr(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===ge.SEMI)this.consumed+=1;else if(this.decodeMode===Ke.Strict)return 0;return this.emitCodePoint(id(this.result),this.consumed),this.errors&&(t!==ge.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&rt.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===Ke.Attribute&&(s===0||od(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&rt.VALUE_LENGTH)>>14,s!==0){if(a===ge.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ke.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]&rt.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]&~rt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case pe.NamedEntity:return this.result!==0&&(this.decodeMode!==Ke.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case pe.NumericDecimal:return this.emitNumericEntity(0,2);case pe.NumericHex:return this.emitNumericEntity(0,3);case pe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case pe.EntityStart:return 0}}}function cd(e,t,n,r){const i=(t&rt.BRANCH_LENGTH)>>7,s=t&rt.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 ft;(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"})(ft||(ft={}));var Re;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Re||(Re={}));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 hd=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 Ft(e){var t;return(t=hd.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,dd={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Qr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);C.STYLE,C.SCRIPT,C.XMP,C.IFRAME,C.NOEMBED,C.NOFRAMES,C.PLAINTEXT;var E;(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"})(E||(E={}));const fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function fd(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Jt(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function md(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function et(e){return md(e)||Jt(e)}function ws(e){return et(e)||fd(e)}function Rn(e){return e+32}function Lu(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Ls(e){return Lu(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function pd(e){return e===g.NULL?N.nullCharacterReference:e>1114111?N.characterReferenceOutsideUnicodeRange:Iu(e)?N.surrogateCharacterReference:Nu(e)?N.noncharacterCharacterReference:Su(e)||e===g.CARRIAGE_RETURN?N.controlCharacterReference:null}class gd{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new td(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ld(nd,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(N.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(N.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=pd(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:J.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:J.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:J.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:J.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(wu(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(N.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=Ft(t.tagName),t.type===J.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(N.endTagWithAttributes),t.selfClosing&&this._err(N.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case J.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case J.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case J.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:J.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Lu(t)?J.WHITESPACE_CHARACTER:t===g.NULL?J.NULL_CHARACTER:J.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(J.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ke.Attribute:Ke.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(N.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=E.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(et(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(N.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(N.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(et(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(N.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(N.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.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=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.tagName+=he;break}case g.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Jt(t)?Rn(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){et(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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=E.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){et(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){et(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:et(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){et(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&Ls(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.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=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case g.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&Ls(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.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=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(N.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.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=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(N.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.name+=he;break}default:this.currentAttr.name+=String.fromCodePoint(Jt(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=E.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.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=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(N.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=he;break}case g.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=he;break}case g.EOF:{this._err(N.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=E.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=he;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(N.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(N.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=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.data+=he;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ye.DASH_DASH,!0)?(this._createCommentToken(ye.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(ye.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ye.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(ye.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(N.cdataInHtmlContent),this._createCommentToken(ye.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(N.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.data+=he;break}case g.EOF:{this._err(N.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=E.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(N.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(N.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(N.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Jt(t))this._createDoctypeToken(String.fromCharCode(Rn(t))),this.state=E.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(N.unexpectedNullCharacter),this._createDoctypeToken(he),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(N.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(N.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=E.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=E.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.name+=he;break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Jt(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=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ye.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ye.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(N.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.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=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.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=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=he;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(N.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=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=he;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(N.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=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.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=E.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.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=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.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=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=he;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(N.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=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=he;break}case g.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(N.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=E.DATA;break}case g.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(N.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(N.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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()&&ws(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ws(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(N.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ru=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Rs=new Set([...Ru,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Vn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),bd=new Set([...Vn,l.OL,l.UL]),Ed=new Set([...Vn,l.BUTTON]),Os=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ds=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Td=new Set([l.TR,l.TEMPLATE,l.HTML]),xd=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),kd=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Ad=new Set([l.TD,l.TH]);class _d{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(Ad,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(kd,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(xd,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(Td,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(Ds.has(i))return!1;break}case D.MATHML:{if(Os.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Vn)}hasInListItemScope(t){return this.hasInDynamicScope(t,bd)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ed)}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(Vn.has(n))return!1;break}case D.SVG:{if(Ds.has(n))return!1;break}case D.MATHML:{if(Os.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&&Ru.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Rs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Rs.has(this.currentTagId);)this.pop()}}const _r=3;var ze;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ze||(ze={}));const Ps={type:ze.Marker};class yd{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===ze.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<_r)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_r)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>=_r&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Ps)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ze.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ze.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(Ps);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ze.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ze.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ze.Element&&n.element===t)}}const tt={createDocument(){return{nodeName:"#document",mode:Re.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};tt.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(tt.isTextNode(n)){n.value+=t;return}}tt.appendChild(e,tt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tt.isTextNode(r)?r.value+=t:tt.insertBefore(e,tt.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}}},Ou="html",Cd="about:legacy-compat",Id="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Du=["+//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//"],Sd=[...Du,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Nd=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Pu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],wd=[...Pu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ms(e,t){return t.some(n=>e.startsWith(n))}function Ld(e){return e.name===Ou&&e.publicId===null&&(e.systemId===null||e.systemId===Cd)}function Rd(e){if(e.name!==Ou)return Re.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Id)return Re.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Nd.has(n))return Re.QUIRKS;let r=t===null?Sd:Du;if(Ms(n,r))return Re.QUIRKS;if(r=t===null?Pu:wd,Ms(n,r))return Re.LIMITED_QUIRKS}return Re.NO_QUIRKS}const vs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Od="definitionurl",Dd="definitionURL",Pd=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])),Md=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}]]),vd=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])),Bd=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 Fd(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===ft.COLOR||r===ft.SIZE||r===ft.FACE)||Bd.has(t)}function Mu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Od){e.attrs[t].name=Dd;break}}function vu(e){for(let t=0;t<e.attrs.length;t++){const n=Pd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ii(e){for(let t=0;t<e.attrs.length;t++){const n=Md.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 Hd(e){const t=vd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ft(e.tagName))}function Ud(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function jd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ft.ENCODING){const i=n[r].value.toLowerCase();return i===vs.TEXT_HTML||i===vs.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function zd(e,t,n,r){return(!r||r===D.HTML)&&jd(e,t,n)||(!r||r===D.MATHML)&&Ud(e,t)}const $d="hidden",Yd=8,qd=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 Vd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Bu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Bs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tt,onParseError:null};class Fs{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={...Bs,...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 gd(this.options,this),this.activeFormattingElements=new yd(this.treeAdapter),this.fragmentContextID=r?Ft(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new _d(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={...Bs,...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:Vd,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=fe.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=fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=fe.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===J.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,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 J.CHARACTER:{this.onCharacter(t);break}case J.NULL_CHARACTER:{this.onNullCharacter(t);break}case J.COMMENT:{this.onComment(t);break}case J.DOCTYPE:{this.onDoctype(t);break}case J.START_TAG:{this._processStartTag(t);break}case J.END_TAG:{this.onEndTag(t);break}case J.EOF:{this.onEof(t);break}case J.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return zd(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ze.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 Bu.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 dd[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_0(this,t);return}switch(this.insertionMode){case T.INITIAL:{qt(this,t);break}case T.BEFORE_HTML:{nn(this,t);break}case T.BEFORE_HEAD:{rn(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{an(this,t);break}case T.AFTER_HEAD:{un(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Hu(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:{qu(this,t);break}case T.IN_COLUMN_GROUP:{Wn(this,t);break}case T.AFTER_BODY:{Gn(this,t);break}case T.AFTER_AFTER_BODY:{Un(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){A0(this,t);return}switch(this.insertionMode){case T.INITIAL:{qt(this,t);break}case T.BEFORE_HTML:{nn(this,t);break}case T.BEFORE_HEAD:{rn(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{an(this,t);break}case T.AFTER_HEAD:{un(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:{Wn(this,t);break}case T.AFTER_BODY:{Gn(this,t);break}case T.AFTER_AFTER_BODY:{Un(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kr(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:{Kr(this,t);break}case T.IN_TABLE_TEXT:{Vt(this,t);break}case T.AFTER_BODY:{Jd(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{ef(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{tf(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,N.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Vt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,N.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?y0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{qt(this,t);break}case T.BEFORE_HTML:{nf(this,t);break}case T.BEFORE_HEAD:{sf(this,t);break}case T.IN_HEAD:{Ue(this,t);break}case T.IN_HEAD_NO_SCRIPT:{of(this,t);break}case T.AFTER_HEAD:{cf(this,t);break}case T.IN_BODY:{Te(this,t);break}case T.IN_TABLE:{Pt(this,t);break}case T.IN_TABLE_TEXT:{Vt(this,t);break}case T.IN_CAPTION:{a0(this,t);break}case T.IN_COLUMN_GROUP:{wi(this,t);break}case T.IN_TABLE_BODY:{cr(this,t);break}case T.IN_ROW:{hr(this,t);break}case T.IN_CELL:{l0(this,t);break}case T.IN_SELECT:{Gu(this,t);break}case T.IN_SELECT_IN_TABLE:{h0(this,t);break}case T.IN_TEMPLATE:{f0(this,t);break}case T.AFTER_BODY:{p0(this,t);break}case T.IN_FRAMESET:{g0(this,t);break}case T.AFTER_FRAMESET:{E0(this,t);break}case T.AFTER_AFTER_BODY:{x0(this,t);break}case T.AFTER_AFTER_FRAMESET:{k0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?C0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{qt(this,t);break}case T.BEFORE_HTML:{rf(this,t);break}case T.BEFORE_HEAD:{af(this,t);break}case T.IN_HEAD:{uf(this,t);break}case T.IN_HEAD_NO_SCRIPT:{lf(this,t);break}case T.AFTER_HEAD:{hf(this,t);break}case T.IN_BODY:{lr(this,t);break}case T.TEXT:{Kf(this,t);break}case T.IN_TABLE:{pn(this,t);break}case T.IN_TABLE_TEXT:{Vt(this,t);break}case T.IN_CAPTION:{u0(this,t);break}case T.IN_COLUMN_GROUP:{o0(this,t);break}case T.IN_TABLE_BODY:{Xr(this,t);break}case T.IN_ROW:{Wu(this,t);break}case T.IN_CELL:{c0(this,t);break}case T.IN_SELECT:{Qu(this,t);break}case T.IN_SELECT_IN_TABLE:{d0(this,t);break}case T.IN_TEMPLATE:{m0(this,t);break}case T.AFTER_BODY:{Xu(this,t);break}case T.IN_FRAMESET:{b0(this,t);break}case T.AFTER_FRAMESET:{T0(this,t);break}case T.AFTER_AFTER_BODY:{Un(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{qt(this,t);break}case T.BEFORE_HTML:{nn(this,t);break}case T.BEFORE_HEAD:{rn(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{an(this,t);break}case T.AFTER_HEAD:{un(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:{$u(this,t);break}case T.TEXT:{Xf(this,t);break}case T.IN_TABLE_TEXT:{Vt(this,t);break}case T.IN_TEMPLATE:{Ku(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:{Ni(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:{Fu(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:{Yu(this,t);break}}}}function Wd(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):zu(e,t),n}function Gd(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 Qd(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>=qd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=Kd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Kd(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 Xd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ft(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 Zd(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 Si(e,t){for(let n=0;n<Yd;n++){const r=Wd(e,t);if(!r)break;const i=Gd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=Qd(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Xd(e,a,s),Zd(e,i,r)}}function Kr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Jd(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ef(e,t){e._appendCommentNode(t,e.document)}function Ni(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 tf(e,t){e._setDocumentType(t);const n=t.forceQuirks?Re.QUIRKS:Rd(t);Ld(t)||e._err(t,N.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function qt(e,t){e._err(t,N.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Re.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):nn(e,t)}function rf(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&nn(e,t)}function nn(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function sf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:rn(e,t)}}function af(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?rn(e,t):e._err(t,N.endTagWithoutMatchingOpenElement)}function rn(e,t){e._insertFakeElement(C.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Ue(e,t){switch(t.tagID){case l.HTML:{Te(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,fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,fe.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,N.misplacedStartTagForHeadElement);break}default:sn(e,t)}}function uf(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:{sn(e,t);break}case l.TEMPLATE:{xt(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function xt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,N.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,N.endTagWithoutMatchingOpenElement)}function sn(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function of(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{Ue(e,t);break}case l.NOSCRIPT:{e._err(t,N.nestedNoscriptInHead);break}default:an(e,t)}}function lf(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{an(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function an(e,t){const n=t.type===J.EOF?N.openElementsLeftAfterEof:N.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:{Te(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,N.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),Ue(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,N.misplacedStartTagForHeadElement);break}default:un(e,t)}}function hf(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{un(e,t);break}case l.TEMPLATE:{xt(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function un(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,or(e,t)}function or(e,t){switch(t.type){case J.CHARACTER:{Hu(e,t);break}case J.WHITESPACE_CHARACTER:{Fu(e,t);break}case J.COMMENT:{Kr(e,t);break}case J.START_TAG:{Te(e,t);break}case J.END_TAG:{lr(e,t);break}case J.EOF:{$u(e,t);break}}}function Fu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Hu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function df(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ff(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mf(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 pf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function gf(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 bf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ef(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 Tf(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 xf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=fe.PLAINTEXT}function kf(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 Af(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(Si(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 _f(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Si(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Cf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function If(e,t){e.treeAdapter.getDocumentMode(e.document)!==Re.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Uu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ju(e){const t=wu(e,ft.TYPE);return t!=null&&t.toLowerCase()===$d}function Sf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),ju(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Nf(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function wf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lf(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Uu(e,t)}function Rf(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Of(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Df(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Hs(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function Pf(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 Mf(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function vf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Bf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function Ff(e,t){e._reconstructActiveFormattingElements(),Mu(t),Ii(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Hf(e,t){e._reconstructActiveFormattingElements(),vu(t),Ii(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Us(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Te(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:{_f(e,t);break}case l.A:{Af(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{gf(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:{pf(e,t);break}case l.LI:case l.DD:case l.DT:{Tf(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Uu(e,t);break}case l.HR:{wf(e,t);break}case l.RB:case l.RTC:{vf(e,t);break}case l.RT:case l.RP:{Bf(e,t);break}case l.PRE:case l.LISTING:{bf(e,t);break}case l.XMP:{Of(e,t);break}case l.SVG:{Hf(e,t);break}case l.HTML:{df(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:{Ue(e,t);break}case l.BODY:{ff(e,t);break}case l.FORM:{Ef(e,t);break}case l.NOBR:{yf(e,t);break}case l.MATH:{Ff(e,t);break}case l.TABLE:{If(e,t);break}case l.INPUT:{Sf(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Nf(e,t);break}case l.IMAGE:{Lf(e,t);break}case l.BUTTON:{kf(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Cf(e,t);break}case l.IFRAME:{Df(e,t);break}case l.SELECT:{Pf(e,t);break}case l.OPTION:case l.OPTGROUP:{Mf(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Hs(e,t);break}case l.FRAMESET:{mf(e,t);break}case l.TEXTAREA:{Rf(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Hs(e,t):Us(e,t);break}case l.PLAINTEXT:{xf(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:Us(e,t)}}function Uf(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 jf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,Xu(e,t))}function zf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $f(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 Yf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function qf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function Vf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Wf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Gf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Qf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function zu(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 lr(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:{Si(e,t);break}case l.P:{Yf(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:{zf(e,t);break}case l.LI:{qf(e);break}case l.DD:case l.DT:{Vf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Wf(e);break}case l.BR:{Qf(e);break}case l.BODY:{Uf(e,t);break}case l.HTML:{jf(e,t);break}case l.FORM:{$f(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Gf(e,t);break}case l.TEMPLATE:{xt(e,t);break}default:zu(e,t)}}function $u(e,t){e.tmplInsertionModeStack.length>0?Ku(e,t):Ni(e,t)}function Kf(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 Xf(e,t){e._err(t,N.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yr(e,t){if(e.openElements.currentTagId!==void 0&&Bu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case J.CHARACTER:{qu(e,t);break}case J.WHITESPACE_CHARACTER:{Yu(e,t);break}}else _n(e,t)}function Zf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function Jf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function e0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,wi(e,t)}function t0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function n0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,cr(e,t)}function r0(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function i0(e,t){ju(t)?e._appendElement(t,D.HTML):_n(e,t),t.ackSelfClosing=!0}function s0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Pt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{n0(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{Ue(e,t);break}case l.COL:{e0(e,t);break}case l.FORM:{s0(e,t);break}case l.TABLE:{r0(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{t0(e,t);break}case l.INPUT:{i0(e,t);break}case l.CAPTION:{Zf(e,t);break}case l.COLGROUP:{Jf(e,t);break}default:_n(e,t)}}function pn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{xt(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:_n(e,t)}}function _n(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,or(e,t),e.fosterParentingEnabled=n}function Yu(e,t){e.pendingCharacterTokens.push(t)}function qu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Vt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_n(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Vu=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function a0(e,t){const n=t.tagID;Vu.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Pt(e,t)):Te(e,t)}function u0(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&&pn(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:lr(e,t)}}function wi(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{Ue(e,t);break}default:Wn(e,t)}}function o0(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:{xt(e,t);break}case l.COL:break;default:Wn(e,t)}}function Wn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function cr(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,hr(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,Pt(e,t));break}default:Pt(e,t)}}function Xr(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,pn(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:pn(e,t)}}function hr(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,cr(e,t));break}default:Pt(e,t)}}function Wu(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,Xr(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,Xr(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:pn(e,t)}}function l0(e,t){const n=t.tagID;Vu.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),hr(e,t)):Te(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(),Wu(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:lr(e,t)}}function Gu(e,t){switch(t.tagID){case l.HTML:{Te(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:{Ue(e,t);break}}}function Qu(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:{xt(e,t);break}}}function h0(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)):Gu(e,t)}function d0(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)):Qu(e,t)}function f0(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:{Ue(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,Pt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,wi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,cr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,hr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Te(e,t)}}function m0(e,t){t.tagID===l.TEMPLATE&&xt(e,t)}function Ku(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ni(e,t)}function p0(e,t){t.tagID===l.HTML?Te(e,t):Gn(e,t)}function Xu(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 Gn(e,t)}function Gn(e,t){e.insertionMode=T.IN_BODY,or(e,t)}function g0(e,t){switch(t.tagID){case l.HTML:{Te(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:{Ue(e,t);break}}}function b0(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 E0(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{Ue(e,t);break}}}function T0(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function x0(e,t){t.tagID===l.HTML?Te(e,t):Un(e,t)}function Un(e,t){e.insertionMode=T.IN_BODY,or(e,t)}function k0(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{Ue(e,t);break}}}function A0(e,t){t.chars=he,e._insertCharacters(t)}function _0(e,t){e._insertCharacters(t),e.framesetOk=!1}function Zu(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 y0(e,t){if(Fd(t))Zu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Mu(t):r===D.SVG&&(Hd(t),vu(t)),Ii(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function C0(e,t){if(t.tagID===l.P||t.tagID===l.BR){Zu(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 dr=Ju("end"),Ye=Ju("start");function Ju(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 eo(e){const t=Ye(e),n=dr(e);if(t&&n)return{start:t,end:n}}const I0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,S0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),js={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function to(e,t){const n=B0(e),r=yu("type",{handlers:{root:N0,element:w0,text:L0,comment:ro,doctype:R0,raw:D0},unknown:P0}),i={parser:n?new Fs(js):Fs.getFragmentParser(void 0,js),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Ht(i,Ye());const s=n?i.parser.document:i.parser.getFragment(),a=Bh(s,{file:i.options.file});return i.stitches&&it(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 no(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function N0(e,t){no(e.children,t)}function w0(e,t){M0(e,t),no(e.children,t),v0(e,t)}function L0(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:J.CHARACTER,chars:e.value,location:yn(e)};Ht(t,Ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function R0(e,t){const n={type:J.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yn(e)};Ht(t,Ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function O0(e,t){t.stitches=!0;const n=F0(e);if("children"in e&&"children"in n){const r=to({type:"root",children:e.children},t.options);n.children=r.children}ro({type:"comment",value:{stitch:n}},t)}function ro(e,t){const n=e.value,r={type:J.COMMENT,data:n,location:yn(e)};Ht(t,Ye(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function D0(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,io(t,Ye(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(I0,"&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 P0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))O0(n,t);else{let r="";throw S0.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 Ht(e,t){io(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=fe.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 io(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 M0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Ht(t,Ye(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:dt.html;i===dt.html&&n==="svg"&&(i=dt.svg);const s=zh({...e,children:[]},{space:i===dt.svg?"svg":"html"}),a={type:J.START_TAG,tagName:n,tagID:Ft(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 v0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Kh.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Ht(t,dr(e));const r={type:J.END_TAG,tagName:n,tagID:Ft(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===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function B0(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=Ye(e)||{line:void 0,column:void 0,offset:void 0},n=dr(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 F0(e){return"children"in e?mt({...e,children:[]}):mt(e)}function Zr(e){return function(t,n){return to(t,{...e,file:n})}}const ct=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],on={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ct,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ct],h2:[["className","sr-only"]],img:[...ct,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ct,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ct],table:[...ct],ul:[...ct,["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"]},nt={}.hasOwnProperty;function H0(e,t){let n={type:"root",children:[]};const r={schema:t?{...on,...t}:on,stack:[]},i=so(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function so(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return U0(e,n);case"doctype":return j0(e,n);case"element":return z0(e,n);case"root":return $0(e,n);case"text":return Y0(e,n)}}}function U0(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 Cn(s,t),s}}function j0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function z0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ao(e,t.children),i=q0(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&&nt.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 Cn(a,t),a}function $0(e,t){const r={type:"root",children:ao(e,t.children)};return Cn(r,t),r}function Y0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(r,t),r}function ao(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=so(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function q0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&nt.call(r,n)?r[n]:void 0,a=r&&nt.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(nt.call(u,c)){const h=u[c];let d=zs(e,$s(s,c),c,h);d==null&&(d=zs(e,$s(a,c),c,h)),d!=null&&(o[c]=d)}if(i&&nt.call(i,n)){const h=i[n];for(c in h)nt.call(h,c)&&!nt.call(o,c)&&(o[c]=h[c])}return o}function zs(e,t,n,r){return t?Array.isArray(r)?V0(e,t,n,r):uo(e,t,n,r):void 0}function V0(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=uo(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function uo(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&W0(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 W0(e,t,n){const r=e.schema.protocols&&nt.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 Cn(e,t){const n=eo(t);t.data&&(e.data=mt(t.data)),n&&(e.position=n)}function $s(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 oo(e){return function(t){return H0(t,e)}}function Ys(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 Ae=ut(/[A-Za-z]/),Ee=ut(/[\dA-Za-z]/),G0=ut(/[#-'*+\--9=?A-Z^-~]/);function Qn(e){return e!==null&&(e<32||e===127)}const Jr=ut(/\d/),Q0=ut(/[\dA-Fa-f]/),K0=ut(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function ee(e){return e===-2||e===-1||e===32}const fr=ut(new RegExp("\\p{P}|\\p{S}","u")),pt=ut(/\s/);function ut(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function X0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Z0(e,t,n){const i=ir((n||{}).ignore||[]),s=J0(t);let a=-1;for(;++a<s.length;)Ei(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const m=h[d],b=f?f.children:void 0;if(i(m,b?b.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 b=0;const I=d.children.indexOf(c);let y=!1,w=[];f.lastIndex=0;let R=f.exec(c.value);for(;R;){const F=R.index,z={index:R.index,input:R.input,stack:[...h,c]};let L=m(...R,z);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?f.lastIndex=F+1:(b!==F&&w.push({type:"text",value:c.value.slice(b,F)}),Array.isArray(L)?w.push(...L):L&&w.push(L),b=F+R[0].length,y=!0),!f.global)break;R=f.exec(c.value)}return y?(b<c.value.length&&w.push({type:"text",value:c.value.slice(b)}),d.children.splice(I,1,...w)):w=[c],I+w.length}}function J0(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([em(i[0]),tm(i[1])])}return t}function em(e){return typeof e=="string"?new RegExp(X0(e),"g"):e}function tm(e){return typeof e=="function"?e:function(){return e}}const Cr="phrasing",Ir=["autolink","link","image","label"];function nm(){return{transforms:[lm],enter:{literalAutolink:im,literalAutolinkEmail:Sr,literalAutolinkHttp:Sr,literalAutolinkWww:Sr},exit:{literalAutolink:om,literalAutolinkEmail:um,literalAutolinkHttp:sm,literalAutolinkWww:am}}}function rm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Ir},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Ir},{character:":",before:"[ps]",after:"\\/",inConstruct:Cr,notInConstruct:Ir}]}}function im(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sr(e){this.config.enter.autolinkProtocol.call(this,e)}function sm(e){this.config.exit.autolinkProtocol.call(this,e)}function am(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 um(e){this.config.exit.autolinkEmail.call(this,e)}function om(e){this.exit(e)}function lm(e){Z0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cm],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hm]],{ignore:["link","linkReference"]})}function cm(e,t,n,r,i){let s="";if(!lo(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!dm(n)))return!1;const a=fm(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 hm(e,t,n,r){return!lo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function dm(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 fm(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=Ys(e,"(");let s=Ys(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 lo(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||pt(n)||fr(n))&&(!t||n!==47)}function He(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}co.peek=Am;function mm(){this.buffer()}function pm(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gm(){this.buffer()}function bm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Em(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=He(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tm(e){this.exit(e)}function xm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=He(this.sliceSerialize(e)).toLowerCase(),n.label=t}function km(e){this.exit(e)}function Am(){return"["}function co(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 _m(){return{enter:{gfmFootnoteCallString:mm,gfmFootnoteCall:pm,gfmFootnoteDefinitionLabelString:gm,gfmFootnoteDefinition:bm},exit:{gfmFootnoteCallString:Em,gfmFootnoteCall:Tm,gfmFootnoteDefinitionLabelString:xm,gfmFootnoteDefinition:km}}}function ym(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:co},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?ho:Cm))),c(),o}}function Cm(e,t,n){return t===0?e:ho(e,t,n)}function ho(e,t,n){return(n?"":" ")+e}const Im=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fo.peek=Rm;function Sm(){return{canContainEols:["delete"],enter:{strikethrough:wm},exit:{strikethrough:Lm}}}function Nm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Im}],handlers:{delete:fo}}}function wm(e){this.enter({type:"delete",children:[]},e)}function Lm(e){this.exit(e)}function fo(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 Rm(){return"~"}function Om(e){return e.length}function Dm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Om,s=[],a=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const A=[],I=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const w=Pm(e[h][y]);if(n.alignDelimiters!==!1){const R=i(w);I[y]=R,(o[y]===void 0||R>o[y])&&(o[y]=R)}A.push(w)}a[h]=A,u[h]=I}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=qs(r[d]);else{const A=qs(r);for(;++d<c;)s[d]=A}d=-1;const f=[],m=[];for(;++d<c;){const A=s[d];let I="",y="";A===99?(I=":",y=":"):A===108?I=":":A===114&&(y=":");let w=n.alignDelimiters===!1?1:Math.max(1,o[d]-I.length-y.length);const R=I+"-".repeat(w)+y;n.alignDelimiters!==!1&&(w=I.length+w+y.length,w>o[d]&&(o[d]=w),m[d]=w),f[d]=R}a.splice(1,0,f),u.splice(1,0,m),h=-1;const b=[];for(;++h<a.length;){const A=a[h],I=u[h];d=-1;const y=[];for(;++d<c;){const w=A[d]||"";let R="",F="";if(n.alignDelimiters!==!1){const z=o[d]-(I[d]||0),L=s[d];L===114?R=" ".repeat(z):L===99?z%2?(R=" ".repeat(z/2+.5),F=" ".repeat(z/2-.5)):(R=" ".repeat(z/2),F=R):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(R),y.push(w),n.alignDelimiters!==!1&&y.push(F),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}b.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return b.join(`
8
+ `)}function Pm(e){return e==null?"":String(e)}function qs(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 Mm(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()),vm);return i(),a}function vm(e,t,n){return">"+(n?"":" ")+e}function Bm(e,t){return Vs(e,t.inConstruct,!0)&&!Vs(e,t.notInConstruct,!1)}function Vs(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 Ws(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
9
+ `&&Bm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
10
+ `}function Fm(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 Hm(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 Um(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 jm(e,t,n,r){const i=Um(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Hm(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,zm);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(Fm(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
+ `,encode:["`"],...u.current()})),d()}return h+=u.move(`
12
+ `),s&&(h+=u.move(s+`
13
+ `)),h+=u.move(o),c(),h}function zm(e,t,n){return(n?"":" ")+e}function Li(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 $m(e,t,n,r){const i=Li(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 Ym(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 gn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Mt(e){if(e===null||oe(e)||pt(e))return 1;if(fr(e))return 2}function Kn(e,t,n){const r=Mt(e),i=Mt(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}}mo.peek=qm;function mo(e,t,n,r){const i=Ym(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=Kn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=gn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Kn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+gn(d));const m=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+m}function qm(e,t,n){return n.options.emphasis||"*"}const Vm={};function Ri(e,t){const n=Vm,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(Wm(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 Gs(e.children,t,n)}return Array.isArray(e)?Gs(e,t,n):""}function Gs(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=po(e[i],t,n);return r.join("")}function Wm(e){return!!(e&&typeof e=="object")}function Gm(e,t){let n=!1;return it(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yr}),!!((!e.depth||e.depth<3)&&Ri(e)&&(t.options.setext||n))}function Qm(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Gm(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
15
+ `,after:`
16
+ `});return d(),h(),f+`
17
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
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=gn(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),o(),u(),c}go.peek=Km;function go(e){return e.value||""}function Km(){return"<"}bo.peek=Xm;function bo(e,t,n,r){const i=Li(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 Xm(){return"!"}Eo.peek=Zm;function Eo(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 Zm(){return"!"}To.peek=Jm;function To(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 Jm(){return"`"}function xo(e,t){const n=Ri(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))}ko.peek=ep;function ko(e,t,n,r){const i=Li(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(xo(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 ep(e,t,n){return xo(e,n)?"<":"["}Ao.peek=tp;function Ao(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 tp(){return"["}function Oi(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 np(e){const t=Oi(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 rp(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 _o(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 ip(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?rp(n):Oi(n);const u=e.ordered?a==="."?")":".":np(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),_o(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 sp(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 ap(e,t,n,r){const i=sp(n);let s=n.bulletCurrent||Oi(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 up(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const op=ir(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function lp(e,t,n,r){return(e.children.some(function(a){return op(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}yo.peek=hp;function yo(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=Kn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=gn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Kn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+gn(d));const m=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+m}function hp(e,t,n){return n.options.strong||"*"}function dp(e,t,n,r){return n.safe(e.value,r)}function fp(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 mp(e,t,n){const r=(_o(n)+(n.options.ruleSpaces?" ":"")).repeat(fp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Co={blockquote:Mm,break:Ws,code:jm,definition:$m,emphasis:mo,hardBreak:Ws,heading:Qm,html:go,image:bo,imageReference:Eo,inlineCode:To,link:ko,linkReference:Ao,list:ip,listItem:ap,paragraph:up,root:lp,strong:yo,text:dp,thematicBreak:mp},Qs=document.createElement("i");function Di(e){const t="&"+e+";";Qs.innerHTML=t;const n=Qs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Io(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 pp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gp(e){return e.replace(pp,bp)}function bp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Io(n.slice(s?2:1),s?16:10)}return Di(n)||e}function Ep(){return{enter:{table:Tp,tableData:Ks,tableHeader:Ks,tableRow:kp},exit:{codeText:Ap,table:xp,tableData:Nr,tableHeader:Nr,tableRow:Nr}}}function Tp(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 xp(e){this.exit(e),this.data.inTable=void 0}function kp(e){this.enter({type:"tableRow",children:[]},e)}function Nr(e){this.exit(e)}function Ks(e){this.enter({type:"tableCell",children:[]},e)}function Ap(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_p));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function _p(e,t){return t==="|"?t:e}function yp(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,b,A,I){return c(h(m,A,I),m.align)}function u(m,b,A,I){const y=d(m,A,I),w=c([y]);return w.slice(0,w.indexOf(`
21
+ `))}function o(m,b,A,I){const y=A.enter("tableCell"),w=A.enter("phrasing"),R=A.containerPhrasing(m,{...I,before:s,after:s});return w(),y(),R}function c(m,b){return Dm(m,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(m,b,A){const I=m.children;let y=-1;const w=[],R=b.enter("table");for(;++y<I.length;)w[y]=d(I[y],b,A);return R(),w}function d(m,b,A){const I=m.children;let y=-1;const w=[],R=b.enter("tableRow");for(;++y<I.length;)w[y]=o(I[y],m,b,A);return R(),w}function f(m,b,A){let I=Co.inlineCode(m,b,A);return A.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function Cp(){return{exit:{taskListCheckValueChecked:Xs,taskListCheckValueUnchecked:Xs,paragraph:Sp}}}function Ip(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Np}}}function Xs(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Sp(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 Np(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=Co.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 wp(){return[nm(),_m(),Sm(),Ep(),Cp()]}function Lp(e){return{extensions:[rm(),ym(e),Nm(),yp(e),Ip()]}}function Le(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 Oe(e,t){return e.length>0?(Le(e,e.length,0,t),e):t}const Zs={}.hasOwnProperty;function So(e){const t={};let n=-1;for(;++n<e.length;)Rp(t,e[n]);return t}function Rp(e,t){let n;for(n in t){const i=(Zs.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Zs.call(i,a)||(i[a]=[]);const u=s[a];Op(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Op(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Le(e,0,0,r)}const Dp={tokenize:Hp,partial:!0},No={tokenize:Up,partial:!0},wo={tokenize:jp,partial:!0},Lo={tokenize:zp,partial:!0},Pp={tokenize:$p,partial:!0},Ro={name:"wwwAutolink",tokenize:Bp,previous:Do},Oo={name:"protocolAutolink",tokenize:Fp,previous:Po},Xe={name:"emailAutolink",tokenize:vp,previous:Mo},qe={};function Mp(){return{text:qe}}let ht=48;for(;ht<123;)qe[ht]=Xe,ht++,ht===58?ht=65:ht===91&&(ht=97);qe[43]=Xe;qe[45]=Xe;qe[46]=Xe;qe[95]=Xe;qe[72]=[Xe,Oo];qe[104]=[Xe,Oo];qe[87]=[Xe,Ro];qe[119]=[Xe,Ro];function vp(e,t,n){const r=this;let i,s;return a;function a(d){return!ei(d)||!Mo.call(r,r.previous)||Pi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ei(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(Pp,h,c)(d):d===45||d===95||Ee(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&&Ae(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Bp(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Do.call(r,r.previous)||Pi(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Dp,e.attempt(No,e.attempt(wo,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Fp(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&Po.call(r,r.previous)&&!Pi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ae(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)||oe(d)||pt(d)||fr(d)?n(d):e.attempt(No,e.attempt(wo,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hp(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 Up(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(Lo,o,u)(c):c===null||oe(c)||pt(c)||c!==45&&fr(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 jp(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(Lo,t,s)(a):a===null||oe(a)||pt(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function zp(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||oe(u)||pt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||pt(u)?t(u):r(u)}function s(u){return Ae(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):Ae(u)?(e.consume(u),a):n(u)}}function $p(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ee(s)?n(s):t(s)}}function Do(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function Po(e){return!Ae(e)}function Mo(e){return!(e===47||ei(e))}function ei(e){return e===43||e===45||e===46||e===95||Ee(e)}function Pi(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 Ut(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Ee(e.charCodeAt(n+1))&&Ee(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 mr(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 ti={name:"attention",resolveAll:Yp,tokenize:qp};function Yp(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};Js(d,-o),Js(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=Oe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Oe(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Oe(c,mr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Oe(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=Oe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Le(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 qp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Mt(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=Mt(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 Js(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vp={name:"autolink",tokenize:Wp};function Wp(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 Ae(m)?(e.consume(m),a):m===64?n(m):c(m)}function a(m){return m===43||m===45||m===46||Ee(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||Ee(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):G0(m)?(e.consume(m),c):n(m)}function h(m){return Ee(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||Ee(m))&&r++<63){const b=m===45?f:d;return e.consume(m),b}return n(m)}}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return ee(o)?(e.enter(n),u(o)):t(o)}function u(o){return ee(o)&&s++<i?(e.consume(o),u):(e.exit(n),t(o))}}const In={partial:!0,tokenize:Gp};function Gp(e,t,n){return r;function r(s){return ee(s)?ne(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Y(s)?t(s):n(s)}}const vo={continuation:{tokenize:Kp},exit:Xp,name:"blockQuote",tokenize:Qp};function Qp(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 ee(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Kp(e,t,n){const r=this;return i;function i(a){return ee(a)?ne(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(vo,t,n)(a)}}function Xp(e){e.exit("blockQuote")}const Bo={name:"characterEscape",tokenize:Zp};function Zp(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 K0(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Fo={name:"characterReference",tokenize:Jp};function Jp(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=Ee,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=Q0,h):(e.enter("characterReferenceValue"),s=7,a=Jr,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Ee&&!Di(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 ea={partial:!0,tokenize:t1},ta={concrete:!0,name:"codeFenced",tokenize:e1};function e1(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 G=r.events[r.events.length-1];return s=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[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"),ee(L)?ne(e,d,"whitespace")(L):d(L))}function d(L){return L===null||Y(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(ea,A,F)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(L))}function f(L){return L===null||Y(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(L)):ee(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,m,"whitespace")(L)):L===96&&L===u?n(L):(e.consume(L),f)}function m(L){return L===null||Y(L)?d(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||Y(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(L)):L===96&&L===u?n(L):(e.consume(L),b)}function A(L){return e.attempt(i,F,I)(L)}function I(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),y}function y(L){return s>0&&ee(L)?ne(e,w,"linePrefix",s+1)(L):w(L)}function w(L){return L===null||Y(L)?e.check(ea,A,F)(L):(e.enter("codeFlowValue"),R(L))}function R(L){return L===null||Y(L)?(e.exit("codeFlowValue"),w(L)):(e.consume(L),R)}function F(L){return e.exit("codeFenced"),t(L)}function z(L,G,W){let K=0;return S;function S(j){return L.enter("lineEnding"),L.consume(j),L.exit("lineEnding"),U}function U(j){return L.enter("codeFencedFence"),ee(j)?ne(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"),q(j)):W(j)}function q(j){return j===u?(K++,L.consume(j),q):K>=a?(L.exit("codeFencedFenceSequence"),ee(j)?ne(L,$,"whitespace")(j):$(j)):W(j)}function $(j){return j===null||Y(j)?(L.exit("codeFencedFence"),G(j)):W(j)}}}function t1(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 wr={name:"codeIndented",tokenize:r1},n1={partial:!0,tokenize:i1};function r1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(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):Y(c)?e.attempt(n1,a,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function i1(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Y(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ne(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):Y(a)?i(a):n(a)}}const s1={name:"codeText",previous:u1,resolve:a1,tokenize:o1};function a1(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 u1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function o1(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)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class l1{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&&Wt(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),Wt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wt(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);Wt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wt(this.left,n.reverse())}}}function Wt(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 Ho(e){const t={};let n=-1,r,i,s,a,u,o,c;const h=new l1(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 Le(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,b=0,A=0;const I=[A];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&&(A=f+1,I.push(A),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 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[b+o[f][0]]=b+o[f][1],b+=o[f][1]-o[f][0]-1;return c}const h1={resolve:f1,tokenize:m1},d1={partial:!0,tokenize:p1};function f1(e){return Ho(e),e}function m1(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):Y(u)?e.check(d1,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 p1(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ne(e,s,"linePrefix")}function s(a){if(a===null||Y(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 Uo(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||Qn(y)?n(y):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(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"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(u),f(y)):y===null||y===60||Y(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function A(y){return!h&&(y===null||y===41||oe(y))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,A):y===41?(e.consume(y),h--,A):y===null||y===32||y===40||Qn(y)?n(y):(e.consume(y),y===92?I:A)}function I(y){return y===40||y===41||y===92?(e.consume(y),A):A(y)}}function jo(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):Y(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||Y(m)||u++>999?(e.exit("chunkString"),h(m)):(e.consume(m),o||(o=!ee(m)),m===92?f:d)}function f(m){return m===91||m===92||m===93?(e.consume(m),u++,d):d(m)}}function zo(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):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===a||f===null||Y(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 ln(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ee(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const g1={name:"definition",tokenize:E1},b1={partial:!0,tokenize:T1};function E1(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return jo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=He(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 oe(m)?ln(e,c)(m):c(m)}function c(m){return Uo(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(b1,d,d)(m)}function d(m){return ee(m)?ne(e,f,"whitespace")(m):f(m)}function f(m){return m===null||Y(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function T1(e,t,n){return r;function r(u){return oe(u)?ln(e,i)(u):n(u)}function i(u){return zo(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return ee(u)?ne(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Y(u)?t(u):n(u)}}const x1={name:"hardBreakEscape",tokenize:k1};function k1(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Y(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const A1={name:"headingAtx",resolve:_1,tokenize:y1};function _1(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"},Le(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function y1(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||oe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||Y(h)?(e.exit("atxHeading"),t(h)):ee(h)?ne(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const C1=["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"],na=["pre","script","style","textarea"],I1={concrete:!0,name:"htmlFlow",resolveTo:w1,tokenize:L1},S1={partial:!0,tokenize:O1},N1={partial:!0,tokenize:R1};function w1(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 L1(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,A):k===63?(e.consume(k),i=3,r.interrupt?t:x):Ae(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,b):Ae(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 b(k){const Me="CDATA[";return k===Me.charCodeAt(u++)?(e.consume(k),u===Me.length?r.interrupt?t:M:b):n(k)}function A(k){return Ae(k)?(e.consume(k),a=String.fromCharCode(k),I):n(k)}function I(k){if(k===null||k===47||k===62||oe(k)){const Me=k===47,ot=a.toLowerCase();return!Me&&!s&&na.includes(ot)?(i=1,r.interrupt?t(k):M(k)):C1.includes(a.toLowerCase())?(i=6,Me?(e.consume(k),y):r.interrupt?t(k):M(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?w(k):R(k))}return k===45||Ee(k)?(e.consume(k),a+=String.fromCharCode(k),I):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:M):n(k)}function w(k){return ee(k)?(e.consume(k),w):S(k)}function R(k){return k===47?(e.consume(k),S):k===58||k===95||Ae(k)?(e.consume(k),F):ee(k)?(e.consume(k),R):S(k)}function F(k){return k===45||k===46||k===58||k===95||Ee(k)?(e.consume(k),F):z(k)}function z(k){return k===61?(e.consume(k),L):ee(k)?(e.consume(k),z):R(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,G):ee(k)?(e.consume(k),L):W(k)}function G(k){return k===o?(e.consume(k),o=null,K):k===null||Y(k)?n(k):(e.consume(k),G)}function W(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||oe(k)?z(k):(e.consume(k),W)}function K(k){return k===47||k===62||ee(k)?R(k):n(k)}function S(k){return k===62?(e.consume(k),U):n(k)}function U(k){return k===null||Y(k)?M(k):ee(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),V):k===62&&i===4?(e.consume(k),Se):k===63&&i===3?(e.consume(k),x):k===93&&i===5?(e.consume(k),re):Y(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(S1,Ve,q)(k)):k===null||Y(k)?(e.exit("htmlFlowData"),q(k)):(e.consume(k),M)}function q(k){return e.check(N1,$,Ve)(k)}function $(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),j}function j(k){return k===null||Y(k)?q(k):(e.enter("htmlFlowData"),M(k))}function B(k){return k===45?(e.consume(k),x):M(k)}function V(k){return k===47?(e.consume(k),a="",ae):M(k)}function ae(k){if(k===62){const Me=a.toLowerCase();return na.includes(Me)?(e.consume(k),Se):M(k)}return Ae(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),ae):M(k)}function re(k){return k===93?(e.consume(k),x):M(k)}function x(k){return k===62?(e.consume(k),Se):k===45&&i===2?(e.consume(k),x):M(k)}function Se(k){return k===null||Y(k)?(e.exit("htmlFlowData"),Ve(k)):(e.consume(k),Se)}function Ve(k){return e.exit("htmlFlow"),t(k)}}function R1(e,t,n){const r=this;return i;function i(a){return Y(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 O1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(In,t,n)}}const D1={name:"htmlText",tokenize:P1};function P1(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),R):Ae(x)?(e.consume(x),W):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),s=0,b):Ae(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):Y(x)?(a=d,V(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 b(x){const Se="CDATA[";return x===Se.charCodeAt(s++)?(e.consume(x),s===Se.length?A:b):n(x)}function A(x){return x===null?n(x):x===93?(e.consume(x),I):Y(x)?(a=A,V(x)):(e.consume(x),A)}function I(x){return x===93?(e.consume(x),y):A(x)}function y(x){return x===62?B(x):x===93?(e.consume(x),y):A(x)}function w(x){return x===null||x===62?B(x):Y(x)?(a=w,V(x)):(e.consume(x),w)}function R(x){return x===null?n(x):x===63?(e.consume(x),F):Y(x)?(a=R,V(x)):(e.consume(x),R)}function F(x){return x===62?B(x):R(x)}function z(x){return Ae(x)?(e.consume(x),L):n(x)}function L(x){return x===45||Ee(x)?(e.consume(x),L):G(x)}function G(x){return Y(x)?(a=G,V(x)):ee(x)?(e.consume(x),G):B(x)}function W(x){return x===45||Ee(x)?(e.consume(x),W):x===47||x===62||oe(x)?K(x):n(x)}function K(x){return x===47?(e.consume(x),B):x===58||x===95||Ae(x)?(e.consume(x),S):Y(x)?(a=K,V(x)):ee(x)?(e.consume(x),K):B(x)}function S(x){return x===45||x===46||x===58||x===95||Ee(x)?(e.consume(x),S):U(x)}function U(x){return x===61?(e.consume(x),M):Y(x)?(a=U,V(x)):ee(x)?(e.consume(x),U):K(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,q):Y(x)?(a=M,V(x)):ee(x)?(e.consume(x),M):(e.consume(x),$)}function q(x){return x===i?(e.consume(x),i=void 0,j):x===null?n(x):Y(x)?(a=q,V(x)):(e.consume(x),q)}function $(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?K(x):(e.consume(x),$)}function j(x){return x===47||x===62||oe(x)?K(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"),ae}function ae(x){return ee(x)?ne(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):re(x)}function re(x){return e.enter("htmlTextData"),a(x)}}const Mi={name:"labelEnd",resolveAll:F1,resolveTo:H1,tokenize:U1},M1={tokenize:j1},v1={tokenize:z1},B1={tokenize:$1};function F1(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&&Le(e,0,e.length,n),e}function H1(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=Oe(u,e.slice(s+1,s+r+3)),u=Oe(u,[["enter",h,t]]),u=Oe(u,mr(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=Oe(u,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),u=Oe(u,e.slice(a+1)),u=Oe(u,[["exit",o,t]]),Le(e,s,e.length,u),e}function U1(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(He(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(M1,h,a?h:d)(f):f===91?e.attempt(v1,h,a?c:d)(f):a?h(f):d(f)}function c(f){return e.attempt(B1,h,d)(f)}function h(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function j1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return oe(d)?ln(e,s)(d):s(d)}function s(d){return d===41?h(d):Uo(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return oe(d)?ln(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?zo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return oe(d)?ln(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 z1(e,t,n){const r=this;return i;function i(u){return jo.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(He(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function $1(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 Y1={name:"labelStartImage",resolveAll:Mi.resolveAll,tokenize:q1};function q1(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 V1={name:"labelStartLink",resolveAll:Mi.resolveAll,tokenize:W1};function W1(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 Lr={name:"lineEnding",tokenize:G1};function G1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const jn={name:"thematicBreak",tokenize:Q1};function Q1(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||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),ee(c)?ne(e,u,"whitespace")(c):u(c))}}const Ce={continuation:{tokenize:J1},exit:tg,name:"list",tokenize:Z1},K1={partial:!0,tokenize:ng},X1={partial:!0,tokenize:eg};function Z1(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 b=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Jr(m)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(jn,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 Jr(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(In,r.interrupt?n:h,e.attempt(K1,f,d))}function h(m){return r.containerState.initialBlankLine=!0,s++,f(m)}function d(m){return ee(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 J1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(In,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!ee(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(X1,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Ce,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function eg(e,t,n){const r=this;return ne(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 tg(e){e.exit(this.containerState.type)}function ng(e,t,n){const r=this;return ne(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!ee(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ra={name:"setextUnderline",resolveTo:rg,tokenize:ig};function rg(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 ig(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"),ee(c)?ne(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const sg={tokenize:fg,partial:!0};function ag(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cg,continuation:{tokenize:hg},exit:dg}},text:{91:{name:"gfmFootnoteCall",tokenize:lg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ug,resolveTo:og}}}}function ug(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=He(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 og(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 lg(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||oe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(He(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return oe(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(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(a>999||b===93&&!u||b===null||b===91||oe(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return s=He(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return oe(b)||(u=!0),a++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),a++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(s)||i.push(s),ne(e,m,"gfmFootnoteDefinitionWhitespace")):n(b)}function m(b){return t(b)}}function hg(e,t,n){return e.check(In,t,e.attempt(sg,t,n))}function dg(e){e.exit("gfmFootnoteDefinition")}function fg(e,t,n){const r=this;return ne(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 mg(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&&Le(f,f.length,0,mr(m,a.slice(c+1,o),u)),Le(f,f.length,0,[["exit",d,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",h,u]]),Le(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(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(a.enter("strikethroughSequenceTemporary"),m(b))}function m(b){const A=Mt(c);if(b===126)return d>1?o(b):(a.consume(b),d++,m);if(d<2&&!n)return o(b);const I=a.exit("strikethroughSequenceTemporary"),y=Mt(b);return I._open=!y||y===2&&!!A,I._close=!A||A===2&&!!y,u(b)}}}class pg{constructor(){this.map=[]}add(t,n,r){gg(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 gg(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 bg(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 Eg(){return{flow:{null:{name:"table",tokenize:Tg,resolveAll:xg}}}}function Tg(e,t,n){const r=this;let i=0,s=0,a;return u;function u(S){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,q=M==="tableHead"||M==="tableRow"?L:o;return q===L&&r.parser.lazy[r.now().line]?n(S):q(S)}function o(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(a=!0,s+=1),h(S)}function h(S){return S===null?n(S):Y(S)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m):n(S):ee(S)?ne(e,h,"whitespace")(S):(s+=1,a&&(a=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||oe(S)?(e.exit("data"),h(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function m(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),a=!1,ee(S)?ne(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):b(S))}function b(S){return S===45||S===58?I(S):S===124?(a=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),A):z(S)}function A(S){return ee(S)?ne(e,I,"whitespace")(S):I(S)}function I(S){return S===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):S===45?(s+=1,y(S)):S===null||Y(S)?F(S):z(S)}function y(S){return S===45?(e.enter("tableDelimiterFiller"),w(S)):z(S)}function w(S){return S===45?(e.consume(S),w):S===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(S))}function R(S){return ee(S)?ne(e,F,"whitespace")(S):F(S)}function F(S){return S===124?b(S):S===null||Y(S)?!a||i!==s?z(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):z(S)}function z(S){return n(S)}function L(S){return e.enter("tableRow"),G(S)}function G(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),G):S===null||Y(S)?(e.exit("tableRow"),t(S)):ee(S)?ne(e,G,"whitespace")(S):(e.enter("data"),W(S))}function W(S){return S===null||S===124||oe(S)?(e.exit("data"),G(S)):(e.consume(S),S===92?K:W)}function K(S){return S===92||S===124?(e.consume(S),W):W(S)}}function xg(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 pg;for(;++n<e.length;){const m=e[n],b=m[1];m[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(ia(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.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({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=On(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=On(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=On(f,t,s,i,n,d)):a[1]!==0&&(d=On(f,t,a,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&ia(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=bg(t.events,n))}return e}function On(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},wt(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=wt(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=wt(t.events,n[2]),h=wt(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 b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},wt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function ia(e,t,n,r,i){const s=[],a=wt(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 wt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const kg={name:"tasklistCheck",tokenize:_g};function Ag(){return{text:{91:kg}}}function _g(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 oe(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 Y(o)?t(o):ee(o)?e.check({tokenize:yg},t,n)(o):n(o)}}function yg(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Cg(e){return So([Mp(),ag(),mg(e),Eg(),Ag()])}const Ig={};function Sg(e){const t=this,n=e||Ig,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Cg(n)),s.push(wp()),a.push(Lp(n))}var Ng=Object.defineProperty,wg=Object.defineProperties,Lg=Object.getOwnPropertyDescriptors,sa=Object.getOwnPropertySymbols,Rg=Object.prototype.hasOwnProperty,Og=Object.prototype.propertyIsEnumerable,aa=(e,t,n)=>t in e?Ng(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$o=(e,t)=>{for(var n in t||(t={}))Rg.call(t,n)&&aa(e,n,t[n]);if(sa)for(var n of sa(t))Og.call(t,n)&&aa(e,n,t[n]);return e},Yo=(e,t)=>wg(e,Lg(t)),Dg=/(\*\*)([^*]*\*?)$/,Pg=/(__)([^_]*?)$/,Mg=/(\*\*\*)([^*]*?)$/,vg=/(\*)([^*]*?)$/,Bg=/(_)([^_]*?)$/,Fg=/(`)([^`]*?)$/,Hg=/(~~)([^~]*?)$/,kt=/^[\s_~*`]*$/,qo=/^[\s]*[-*+][\s]+$/,Ug=/[\p{L}\p{N}_]/u,jg=/^```[^`\n]*```?$/,zg=/^\*{4,}$/,$g=/(__)([^_]+)_$/,Yg=/(~~)([^~]+)~$/,qg=/__/g,ua=/~~/g,st=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:Ug.test(e)},gt=(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},Vg=(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},Vo=(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},pr=(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},Wg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
22
+ `)return!1}return!1},Wo=(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]==="]"?Wg(e,t):!1;if(e[n]===`
23
+ `)return!1}return!1},vi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
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},Gg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Qg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Gg,(t,n,r,i)=>gt(e,i)?t:`${n}\\>${r}`),Kg=(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},Xg=(e,t,n,r)=>n==="\\"||e.includes("$")&&pr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&st(n)&&st(r)||(!n||n===" "||n===" "||n===`
27
+ `)&&(!r||r===" "||r===" "||r===`
28
+ `)||Kg(e,t,r)),Go=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]:"";Xg(e,r,i,s)||(t+=1)}return t},Zg=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&pr(e,t)||Wo(e,t)||n==="_"||r==="_"||n&&r&&st(n)&&st(r)),Jg=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]:"";Zg(e,r,i,s)||(t+=1)}return t},eb=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},tb=(e,t,n)=>{if(!t||kt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
29
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return qo.test(s)&&t.includes(`
30
+ `)?!0:vi(e,n,"*")},nb=e=>{let t=e.match(Dg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return gt(e,r)||tb(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},rb=(e,t,n)=>{if(!t||kt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
31
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return qo.test(s)&&t.includes(`
32
+ `)?!0:vi(e,n,"_")},ib=e=>{let t=e.match(Pg);if(!t){let i=e.match($g);if(i){let s=e.lastIndexOf(i[1]);if(!gt(e,s)&&(e.match(qg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return gt(e,r)||rb(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},sb=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!pr(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
33
+ `)&&(!r||r===" "||r===" "||r===`
34
+ `)||n&&r&&st(n)&&st(r))continue;return t}return-1},ab=e=>{if(!e.match(vg))return e;let t=sb(e);if(t===-1||gt(e,t))return e;let n=e.substring(t+1);return!n||kt.test(n)?e:Go(e)%2===1?`${e}*`:e},Qo=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!pr(e,t)&&!Wo(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&st(n)&&st(r))continue;return t}return-1},ub=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}_`},ob=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=Qo(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},lb=e=>{if(!e.match(Bg))return e;let t=Qo(e);if(t===-1||gt(e,t))return e;let n=e.substring(t+1);if(!n||kt.test(n))return e;if(Jg(e)%2===1){let r=ob(e);return r!==null?r:ub(e)}return e},cb=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Go(e);return t%2===0&&n%2===0},hb=(e,t,n)=>!t||kt.test(t)||gt(e,n)?!0:vi(e,n,"*"),db=e=>{if(zg.test(e))return e;let t=e.match(Mg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return hb(e,n,r)?e:eb(e)%2===1?cb(e)?e:`${e}***`:e},bn=(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},fb=(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},mb=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!fb(e,n)&&(t+=1);return t},pb=/<[a-zA-Z/][^>]*$/,gb=e=>{let t=e.match(pb);return!t||t.index===void 0||bn(e,t.index)?e:e.substring(0,t.index).trimEnd()},bb=e=>!e.match(jg)||e.includes(`
36
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Eb=e=>(e.match(/```/g)||[]).length%2===1,Tb=e=>{let t=bb(e);if(t!==null)return t;let n=e.match(Fg);if(n&&!Eb(e)){let r=n[2];if(!r||kt.test(r))return e;if(mb(e)%2===1)return`${e}\``}return e},xb=(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)==="```",kb=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!xb(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Ab=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
37
+ `,t)!==-1&&!e.endsWith(`
38
+ `)?`${e}
39
+ $$`:`${e}$$`},_b=e=>kb(e)%2===0?e:Ab(e),yb=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Vg(e,t);if(r===-1||bn(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)`},oa=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!bn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Vo(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},Cb=(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=oa(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${a}${s}`}return`${e}](streamdown:incomplete-link)`}if(Vo(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=oa(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},Ko=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bn(e,n)){let r=yb(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bn(e,r)){let i=Cb(e,r,t);if(i!==null)return i}return e},Ib=/^-{1,2}$/,Sb=/^[\s]*-{1,2}[\s]+$/,Nb=/^={1,2}$/,wb=/^[\s]*={1,2}[\s]+$/,Lb=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(Ib.test(i)&&!n.match(Sb)){let s=r.split(`
41
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(Nb.test(i)&&!n.match(wb)){let s=r.split(`
42
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},Rb=e=>{let t=e.match(Hg);if(t){let n=t[2];if(!n||kt.test(n))return e;if((e.match(ua)||[]).length%2===1)return`${e}~~`}else if(e.match(Yg)&&(e.match(ua)||[]).length%2===1)return`${e}~`;return e},Rr=e=>e!==!1,ke={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},Ob=[{handler:{name:"comparisonOperators",handle:Qg,priority:ke.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:gb,priority:ke.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Lb,priority:ke.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Ko,priority:ke.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:db,priority:ke.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:nb,priority:ke.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:ib,priority:ke.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:ab,priority:ke.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:lb,priority:ke.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Tb,priority:ke.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Rb,priority:ke.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:_b,priority:ke.KATEX},optionKey:"katex"}],Db=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return Ob.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:Yo($o({},r),{handle:s=>Ko(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Pb=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Db(t),s=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:Yo($o({},u),{priority:(o=u.priority)!=null?o:ke.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:ke.DEFAULT)-((h=o.handler.priority)!=null?h:ke.DEFAULT)});for(let{handler:u,earlyReturn:o}of a)if(r=u.handle(r),o!=null&&o(r))return r;return r},Mb=Pb;const vb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fb={};function la(e,t){return(Fb.jsx?Bb:vb).test(e)}const Hb=/[ \t\n\f\r]/g;function Ub(e){return typeof e=="object"?e.type==="text"?ca(e.value):!1:ca(e)}function ca(e){return e.replace(Hb,"")===""}var Nt={},Or,ha;function jb(){if(ha)return Or;ha=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 b(I,y){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];y=y||{};var w=1,R=1;function F($){var j=$.match(t);j&&(w+=j.length);var B=$.lastIndexOf(o);R=~B?$.length-B:R+$.length}function z(){var $={line:w,column:R};return function(j){return j.position=new L($),K(),j}}function L($){this.start=$,this.end={line:w,column:R},this.source=y.source}L.prototype.content=I;function G($){var j=new Error(y.source+":"+w+":"+R+": "+$);if(j.reason=$,j.filename=y.source,j.line=w,j.column=R,j.source=I,!y.silent)throw j}function W($){var j=$.exec(I);if(j){var B=j[0];return F(B),I=I.slice(B.length),j}}function K(){W(n)}function S($){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 G("End of comment missing");var B=I.slice(2,j-2);return R+=2,F(B),I=I.slice(j),R+=2,$({type:f,comment:B})}}function M(){var $=z(),j=W(r);if(j){if(U(),!W(i))return G("property missing ':'");var B=W(s),V=$({type:m,property:A(j[0].replace(e,d)),value:B?A(B[0].replace(e,d)):d});return W(a),V}}function q(){var $=[];S($);for(var j;j=M();)j!==!1&&($.push(j),S($));return $}return K(),q()}function A(I){return I?I.replace(u,d):d}return Or=b,Or}var da;function zb(){if(da)return Nt;da=1;var e=Nt&&Nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.default=n;const t=e(jb());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 Nt}var Gt={},fa;function $b(){if(fa)return Gt;fa=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.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 Gt.camelCase=o,Gt}var Qt,ma;function Yb(){if(ma)return Qt;ma=1;var e=Qt&&Qt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(zb()),n=$b();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,Qt=r,Qt}var qb=Yb();const Vb=iu(qb);function cn(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?ni(e):""}function ni(e){return ga(e&&e.line)+":"+ga(e&&e.column)}function pa(e){return ni(e&&e.start)+"-"+ni(e&&e.end)}function ga(e){return e&&typeof e=="number"?e:1}class xe 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=cn(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}}xe.prototype.file="";xe.prototype.name="";xe.prototype.reason="";xe.prototype.message="";xe.prototype.stack="";xe.prototype.column=void 0;xe.prototype.line=void 0;xe.prototype.ancestors=void 0;xe.prototype.cause=void 0;xe.prototype.fatal=void 0;xe.prototype.place=void 0;xe.prototype.ruleId=void 0;xe.prototype.source=void 0;const Bi={}.hasOwnProperty,Wb=new Map,Gb=/[A-Z]/g,Qb=new Set(["table","tbody","thead","tfoot","tr"]),Kb=new Set(["td","th"]),Xo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xb(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=sE(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=iE(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"?at:An,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Zo(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Zo(e,t,n){if(t.type==="element")return Zb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tE(e,t,n);if(t.type==="mdxjsEsm")return eE(e,t);if(t.type==="root")return nE(e,t,n);if(t.type==="text")return rE(e,t)}function Zb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=at,e.schema=i),e.ancestors.push(t);const s=el(e,t.tagName,!1),a=aE(e,t);let u=Hi(e,t);return Qb.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Ub(o):!0})),Jo(e,a,s,t),Fi(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Jb(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)}En(e,t.position)}function eE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);En(e,t.position)}function tE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=at,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:el(e,t.name,!0),a=uE(e,t),u=Hi(e,t);return Jo(e,a,s,t),Fi(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function nE(e,t,n){const r={};return Fi(r,Hi(e,t)),e.create(t,e.Fragment,r,n)}function rE(e,t){return t.value}function Jo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iE(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 sE(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=Ye(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 aE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Bi.call(t.properties,i)){const s=oE(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Kb.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 uE(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 En(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 En(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Hi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Wb;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=Zo(e,s,a);u!==void 0&&n.push(u)}return n}function oE(e,t,n){const r=ur(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tu(n):xu(n)),r.property==="style"){let i=typeof n=="object"?n:lE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=cE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ah[r.property]||r.property:r.attribute,n]}}function lE(e,t){try{return Vb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xe("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=Xo+"#cannot-parse-style-attribute",i}}function el(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=la(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=la(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Bi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);En(e)}function En(e,t){const n=new xe("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=Xo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cE(e){const t={};let n;for(n in e)Bi.call(e,n)&&(t[hE(n)]=e[n]);return t}function hE(e){let t=e.replace(Gb,dE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dE(e){return"-"+e.toLowerCase()}const Dr={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"]},fE={tokenize:mE};function mE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),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 Y(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const pE={tokenize:gE},ba={tokenize:bE};function gE(e){const t=this,n=[];let r=0,i,s,a;return u;function u(R){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,o,c)(R)}return c(R)}function o(R){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}y(r);let G=F;for(;G<t.events.length;)t.events[G][1].end={...L},G++;return Le(t.events,z+1,0,t.events.slice(F)),t.events.length=G,c(R)}return u(R)}function c(R){if(r===n.length){if(!i)return f(R);if(i.currentConstruct&&i.currentConstruct.concrete)return b(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ba,h,d)(R)}function h(R){return i&&w(),y(r),f(R)}function d(R){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(R)}function f(R){return t.containerState={},e.attempt(ba,m,b)(R)}function m(R){return r++,n.push([t.currentConstruct,t.containerState]),f(R)}function b(R){if(R===null){i&&w(),y(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),A(R)}function A(R){if(R===null){I(e.exit("chunkFlow"),!0),y(0),e.consume(R);return}return Y(R)?(e.consume(R),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(R),A)}function I(R,F){const z=t.sliceStream(R);if(F&&z.push(null),R.previous=s,s&&(s.next=R),s=R,i.defineSkip(R.start),i.write(z),t.parser.lazy[R.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 G=t.events.length;let W=G,K,S;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(K){S=t.events[W][1].end;break}K=!0}for(y(r),L=G;L<t.events.length;)t.events[L][1].end={...S},L++;Le(t.events,W+1,0,t.events.slice(G)),t.events.length=L}}function y(R){let F=n.length;for(;F-- >R;){const z=n[F];t.containerState=z[1],z[0].exit.call(t,e)}n.length=R}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bE(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const EE={tokenize:TE};function TE(e){const t=this,n=e.attempt(In,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(h1,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 xE={resolveAll:nl()},kE=tl("string"),AE=tl("text");function tl(e){return{resolveAll:nl(e==="text"?_E: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 nl(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 _E(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 yE={42:Ce,43:Ce,45:Ce,48:Ce,49:Ce,50:Ce,51:Ce,52:Ce,53:Ce,54:Ce,55:Ce,56:Ce,57:Ce,62:vo},CE={91:g1},IE={[-2]:wr,[-1]:wr,32:wr},SE={35:A1,42:jn,45:[ra,jn],60:I1,61:ra,95:jn,96:ta,126:ta},NE={38:Fo,92:Bo},wE={[-5]:Lr,[-4]:Lr,[-3]:Lr,33:Y1,38:Fo,42:ti,60:[Vp,D1],91:V1,92:[x1,Bo],93:Mi,95:ti,96:s1},LE={null:[ti,xE]},RE={null:[42,95]},OE={null:[]},DE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RE,contentInitial:CE,disable:OE,document:yE,flow:SE,flowInitial:IE,insideSpan:LE,string:NE,text:wE},Symbol.toStringTag,{value:"Module"}));function PE(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:G(z),check:G(L),consume:w,enter:R,exit:F,interrupt:G(L,{interrupt:!0})},c={code:null,containerState:{},defineSkip:A,events:[],now:b,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=Oe(a,U),I(),a[a.length-1]!==null?[]:(W(t,0),c.events=mr(s,c.events,c),c.events)}function f(U,M){return vE(m(U),M)}function m(U){return ME(a,U)}function b(){const{_bufferIndex:U,_index:M,line:q,column:$,offset:j}=r;return{_bufferIndex:U,_index:M,line:q,column:$,offset:j}}function A(U){i[U.line]=U.column,S()}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;)y(M.charCodeAt(r._bufferIndex));else y(M)}}function y(U){h=h(U)}function w(U){Y(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,S()):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 R(U,M){const q=M||{};return q.type=U,q.start=b(),c.events.push(["enter",q,c]),u.push(q),q}function F(U){const M=u.pop();return M.end=b(),c.events.push(["exit",M,c]),M}function z(U,M){W(U,M.from)}function L(U,M){M.restore()}function G(U,M){return q;function q($,j,B){let V,ae,re,x;return Array.isArray($)?Ve($):"tokenize"in $?Ve([$]):Se($);function Se(be){return jt;function jt(Ze){const _t=Ze!==null&&be[Ze],yt=Ze!==null&&be.null,wn=[...Array.isArray(_t)?_t:_t?[_t]:[],...Array.isArray(yt)?yt:yt?[yt]:[]];return Ve(wn)(Ze)}}function Ve(be){return V=be,ae=0,be.length===0?B:k(be[ae])}function k(be){return jt;function jt(Ze){return x=K(),re=be,be.partial||(c.currentConstruct=be),be.name&&c.parser.constructs.disable.null.includes(be.name)?ot():be.tokenize.call(M?Object.assign(Object.create(c),M):c,o,Me,ot)(Ze)}}function Me(be){return U(re,x),j}function ot(be){return x.restore(),++ae<V.length?k(V[ae]):B}}}function W(U,M){U.resolveAll&&!s.includes(U)&&s.push(U),U.resolve&&Le(c.events,M,c.events.length-M,U.resolve(c.events.slice(M),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function K(){const U=b(),M=c.previous,q=c.currentConstruct,$=c.events.length,j=Array.from(u);return{from:$,restore:B};function B(){r=U,c.previous=M,c.currentConstruct=q,c.events.length=$,u=j,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ME(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 vE(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
+ `;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 BE(e){const r={constructs:So([DE,...(e||{}).extensions||[]]),content:i(fE),defined:[],document:i(pE),flow:i(EE),lazy:{},string:i(kE),text:i(AE)};return r;function i(s){return a;function a(u){return PE(r,s,u)}}}function FE(e){for(;!Ho(e););return e}const Ea=/[\0\t\n\r]/g;function HE(){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(Ea.lastIndex=d,c=Ea.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 rl={}.hasOwnProperty;function UE(e,t,n){return typeof t!="string"&&(n=t,t=void 0),jE(n)(FE(BE(n).document().write(HE()(e,t,!0))))}function jE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(os),autolinkProtocol:K,autolinkEmail:K,atxHeading:s(ss),blockQuote:s(yt),characterEscape:K,characterReference:K,codeFenced:s(wn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(wn,a),codeText:s(Ec,a),codeTextData:K,data:K,codeFlowValue:K,definition:s(Tc),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(xc),hardBreakEscape:s(as),hardBreakTrailing:s(as),htmlFlow:s(us,a),htmlFlowData:K,htmlText:s(us,a),htmlTextData:K,image:s(kc),label:a,link:s(os),listItem:s(Ac),listItemValue:f,listOrdered:s(ls,d),listUnordered:s(ls),paragraph:s(_c),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ss),strong:s(yc),thematicBreak:s(Ic)},exit:{atxHeading:o(),atxHeadingSequence:z,autolink:o(),autolinkEmail:_t,autolinkProtocol:Ze,blockQuote:o(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:ot,characterReferenceMarkerNumeric:ot,characterReferenceValue:be,characterReference:jt,codeFenced:o(I),codeFencedFence:A,codeFencedFenceInfo:m,codeFencedFenceMeta:b,codeFlowValue:S,codeIndented:o(y),codeText:o(j),codeTextData:S,data:S,definition:o(),definitionDestinationString:F,definitionLabelString:w,definitionTitleString:R,emphasis:o(),hardBreakEscape:o(M),hardBreakTrailing:o(M),htmlFlow:o(q),htmlFlowData:S,htmlText:o($),htmlTextData:S,image:o(V),label:re,labelText:ae,lineEnding:U,link:o(B),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Me,resourceDestinationString:x,resourceTitleString:Se,resource:Ve,setextHeading:o(W),setextHeadingLineSequence:G,setextHeadingText:L,strong:o(),thematicBreak:o()}};il(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let H={type:"root",children:[]};const X={stack:[H],tokenStack:[],config:t,enter:u,exit:c,buffer:a,resume:h,data:n},te=[];let ue=-1;for(;++ue<O.length;)if(O[ue][1].type==="listOrdered"||O[ue][1].type==="listUnordered")if(O[ue][0]==="enter")te.push(ue);else{const ve=te.pop();ue=i(O,ve,ue)}for(ue=-1;++ue<O.length;){const ve=t[O[ue][0]];rl.call(ve,O[ue][1].type)&&ve[O[ue][1].type].call(Object.assign({sliceSerialize:O[ue][2].sliceSerialize},X),O[ue][1])}if(X.tokenStack.length>0){const ve=X.tokenStack[X.tokenStack.length-1];(ve[1]||Ta).call(X,void 0,ve[0])}for(H.position={start:Je(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Je(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)H=t.transforms[ue](H)||H;return H}function i(O,H,X){let te=H-1,ue=-1,ve=!1,lt,We,zt,$t;for(;++te<=X;){const Ne=O[te];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?ue++:ue--,$t=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(lt&&!$t&&!ue&&!zt&&(zt=te),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!ue&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||ue===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(lt){let Ct=te;for(We=void 0;Ct--;){const Ge=O[Ct];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;We&&(O[We][1].type="lineEndingBlank",ve=!0),Ge[1].type="lineEnding",We=Ct}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}zt&&(!We||zt<We)&&(lt._spread=!0),lt.end=Object.assign({},We?O[We][1].start:Ne[1].end),O.splice(We||te,0,["exit",lt,Ne[2]]),te++,X++}if(Ne[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};lt=Ct,O.splice(te,0,["enter",Ct,Ne[2]]),te++,X++,zt=void 0,$t=!0}}}return O[H][1]._spread=ve,X}function s(O,H){return X;function X(te){u.call(this,O(te),te),H&&H.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(O,H,X){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([H,X||void 0]),O.position={start:Je(H.start),end:void 0}}function o(O){return H;function H(X){O&&O.call(this,X),c.call(this,X)}}function c(O,H){const X=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==O.type&&(H?H.call(this,O,te[0]):(te[1]||Ta).call(this,O,te[0]));else throw new Error("Cannot close `"+O.type+"` ("+cn({start:O.start,end:O.end})+"): it’s not open");X.position.end=Je(O.end)}function h(){return Ri(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function m(){const O=this.resume(),H=this.stack[this.stack.length-1];H.lang=O}function b(){const O=this.resume(),H=this.stack[this.stack.length-1];H.meta=O}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/(\r?\n|\r)$/g,"")}function w(O){const H=this.resume(),X=this.stack[this.stack.length-1];X.label=H,X.identifier=He(this.sliceSerialize(O)).toLowerCase()}function R(){const O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function F(){const O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function z(O){const H=this.stack[this.stack.length-1];if(!H.depth){const X=this.sliceSerialize(O).length;H.depth=X}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function G(O){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function K(O){const X=this.stack[this.stack.length-1].children;let te=X[X.length-1];(!te||te.type!=="text")&&(te=Cc(),te.position={start:Je(O.start),end:void 0},X.push(te)),this.stack.push(te)}function S(O){const H=this.stack.pop();H.value+=this.sliceSerialize(O),H.position.end=Je(O.end)}function U(O){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=H.children[H.children.length-1];X.position.end=Je(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(K.call(this,O),S.call(this,O))}function M(){this.data.atHardBreak=!0}function q(){const O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function $(){const O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function j(){const O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function B(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function V(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ae(O){const H=this.sliceSerialize(O),X=this.stack[this.stack.length-2];X.label=gp(H),X.identifier=He(H).toLowerCase()}function re(){const O=this.stack[this.stack.length-1],H=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const te=O.children;X.children=te}else X.alt=H}function x(){const O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function Se(){const O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function Ve(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Me(O){const H=this.resume(),X=this.stack[this.stack.length-1];X.label=H,X.identifier=He(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ot(O){this.data.characterReferenceType=O.type}function be(O){const H=this.sliceSerialize(O),X=this.data.characterReferenceType;let te;X?(te=Io(H,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Di(H);const ue=this.stack[this.stack.length-1];ue.value+=te}function jt(O){const H=this.stack.pop();H.position.end=Je(O.end)}function Ze(O){S.call(this,O);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(O)}function _t(O){S.call(this,O);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(O)}function yt(){return{type:"blockquote",children:[]}}function wn(){return{type:"code",lang:null,meta:null,value:""}}function Ec(){return{type:"inlineCode",value:""}}function Tc(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xc(){return{type:"emphasis",children:[]}}function ss(){return{type:"heading",depth:0,children:[]}}function as(){return{type:"break"}}function us(){return{type:"html",value:""}}function kc(){return{type:"image",title:null,url:"",alt:null}}function os(){return{type:"link",title:null,url:"",children:[]}}function ls(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Ac(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function _c(){return{type:"paragraph",children:[]}}function yc(){return{type:"strong",children:[]}}function Cc(){return{type:"text",value:""}}function Ic(){return{type:"thematicBreak"}}}function Je(e){return{line:e.line,column:e.column,offset:e.offset}}function il(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?il(e,r):zE(e,r)}}function zE(e,t){let n;for(n in t)if(rl.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 Ta(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cn({start:t.start,end:t.end})+") is still open")}function $E(e){const t=this;t.parser=n;function n(r){return UE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function YE(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 qE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
46
+ `}]}function VE(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 WE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ut(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 KE(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 XE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sl(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 ZE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sl(e,t);const i={src:Ut(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 JE(e,t){const n={src:Ut(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 eT(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 tT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sl(e,t);const i={href:Ut(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 nT(e,t){const n={href:Ut(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 rT(e,t,n){const r=e.all(t),i=n?iT(n):al(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
+ `}),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 iT(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=al(n[r])}return t}function al(e){const t=e.spread;return t??e.children.length>1}function sT(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 aT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function oT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lT(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=Ye(t.children[1]),o=dr(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 b={type:"element",tagName:s,properties:f,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),c.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function hT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const xa=9,ka=32;function dT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Aa(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Aa(t.slice(i),i>0,!1)),s.join("")}function Aa(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===xa||s===ka;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===xa||s===ka;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function fT(e,t){const n={type:"text",value:dT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pT={blockquote:YE,break:qE,code:VE,delete:WE,emphasis:GE,footnoteReference:QE,heading:KE,html:XE,imageReference:ZE,image:JE,inlineCode:eT,linkReference:tT,link:nT,listItem:rT,list:sT,paragraph:aT,root:uT,strong:oT,table:lT,tableCell:hT,tableRow:cT,text:fT,thematicBreak:mT,toml:Dn,yaml:Dn,definition:Dn,footnoteDefinition:Dn};function Dn(){}function gT(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 bT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ET(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gT,r=e.options.footnoteBackLabel||bT,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=Ut(d.toLowerCase());let m=0;const b=[],A=e.footnoteCounts.get(d);for(;A!==void 0&&++m<=A;){b.length>0&&b.push({type:"text",value:" "});let w=typeof n=="string"?n:n(o,m);typeof w=="string"&&(w={type:"text",value:w}),b.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(...b)}else h.push(...b);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:{...mt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
50
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
51
+ `}]}}const ri={}.hasOwnProperty,TT={};function xT(e,t){const n=t||TT,r=new Map,i=new Map,s=new Map,a={...pT,...n.handlers},u={all:c,applyData:AT,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:kT,wrap:yT};return it(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(ri.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:A,...I}=h,y=mt(I);return y.children=u.all(h),y}return mt(h)}return(u.options.unknownHandler||_T)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let m=-1;for(;++m<f.length;){const b=u.one(f[m],h);if(b){if(m&&f[m-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=_a(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=_a(A.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function kT(e,t){e.position&&(t.position=eo(e))}function AT(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,mt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function _T(e,t){const n=t.data||{},r="value"in t&&!(ri.call(n,"hProperties")||ri.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 yT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
52
+ `});++r<e.length;)r&&n.push({type:"text",value:`
53
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
54
+ `}),n}function _a(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ya(e,t){const n=xT(e,t),r=n.one(e,void 0),i=ET(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 CT(e,t){return e&&"run"in e?async function(n,r){const i=ya(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ya(n,{file:r,...e||t})}}function Ca(e){if(e)throw e}var Pr,Ia;function IT(){if(Ia)return Pr;Ia=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 Pr=function o(){var c,h,d,f,m,b,A=arguments[0],I=1,y=arguments.length,w=!1;for(typeof A=="boolean"&&(w=A,A=arguments[1]||{},I=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});I<y;++I)if(c=arguments[I],c!=null)for(h in c)d=u(A,h),f=u(c,h),A!==f&&(w&&f&&(s(f)||(m=i(f)))?(m?(m=!1,b=d&&i(d)?d:[]):b=d&&s(d)?d:{},a(A,{name:h,newValue:o(w,b,f)})):typeof f<"u"&&a(A,{name:h,newValue:f}));return A},Pr}var ST=IT();const Mr=iu(ST);function ii(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 NT(){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?wT(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 wT(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 je={basename:LT,dirname:RT,extname:OT,join:DT,sep:"/"};function LT(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 RT(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 OT(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 DT(...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?".":PT(n)}function PT(e){Sn(e);const t=e.codePointAt(0)===47;let n=MT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MT(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 vT={cwd:BT};function BT(){return"/"}function si(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function FT(e){if(typeof e=="string")e=new URL(e);else if(!si(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return HT(e)}function HT(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 vr=["history","path","basename","stem","extname","dirname"];class UT{constructor(t){let n;t?si(t)?n={path:t}:typeof t=="string"||jT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vr.length;){const s=vr[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)vr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?je.basename(this.path):void 0}set basename(t){Fr(t,"basename"),Br(t,"basename"),this.path=je.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?je.dirname(this.path):void 0}set dirname(t){Sa(this.basename,"dirname"),this.path=je.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?je.extname(this.path):void 0}set extname(t){if(Br(t,"extname"),Sa(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=je.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){si(t)&&(t=FT(t)),Fr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?je.basename(this.path,this.extname):void 0}set stem(t){Fr(t,"stem"),Br(t,"stem"),this.path=je.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 xe(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 Br(e,t){if(e&&e.includes(je.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+je.sep+"`")}function Fr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Sa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zT=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),$T={}.hasOwnProperty;class Ui extends zT{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=NT()}copy(){const t=new Ui;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Mr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jr("data",this.frozen),this.namespace[t]=n,this):$T.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jr("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=Pn(t),r=this.parser||this.Parser;return Hr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hr("process",this.parser||this.Parser),Ur("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Pn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const m=d,b=r.stringify(m,f);VT(b)?f.value=b:f.result=b,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(),Hr("processSync",this.parser||this.Parser),Ur("processSync",this.compiler||this.Compiler),this.process(t,i),wa("processSync","process",n),r;function i(s,a){n=!0,Ca(s),r=a}}run(t,n,r){Na(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=Pn(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),wa("runSync","run",r),i;function s(a,u){Ca(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Pn(n),i=this.compiler||this.Compiler;return Ur("stringify",i),Na(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(jr("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=Mr(!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,...b]=h;const A=r[f][1];ii(A)&&ii(m)&&(m=Mr(!0,A,m)),r[f]=[c,m,...b]}}}}const YT=new Ui().freeze();function Hr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ur(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jr(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 Na(e){if(!ii(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wa(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pn(e){return qT(e)?e:new UT(e)}function qT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VT(e){return typeof e=="string"||WT(e)}function WT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function ji(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var At=ji();function ul(e){At=e}var hn={exec:()=>null};function ie(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(_e.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var GT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),_e={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")},QT=/^(?:[ \t]*(?:\n|$))+/,KT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Nn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ZT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zi=/(?:[*+-]|\d{1,9}[.)])/,ol=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ll=ie(ol).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(),JT=ie(ol).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(),$i=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,e2=/^[^\n]+/,Yi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,t2=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),n2=ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zi).getRegex(),gr="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",qi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,r2=ie("^ {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",qi).replace("tag",gr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cl=ie($i).replace("hr",Nn).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",gr).getRegex(),i2=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cl).getRegex(),Vi={blockquote:i2,code:KT,def:t2,fences:XT,heading:ZT,hr:Nn,html:r2,lheading:ll,list:n2,newline:QT,paragraph:cl,table:hn,text:e2},La=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nn).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",gr).getRegex(),s2={...Vi,lheading:JT,table:La,paragraph:ie($i).replace("hr",Nn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",La).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",gr).getRegex()},a2={...Vi,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qi).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:hn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie($i).replace("hr",Nn).replace("heading",` *#{1,6} *[^
56
+ ]`).replace("lheading",ll).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,o2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hl=/^( {2,}|\\)\n(?!\s*$)/,l2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,br=/[\p{P}\p{S}]/u,Wi=/[\s\p{P}\p{S}]/u,dl=/[^\s\p{P}\p{S}]/u,c2=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wi).getRegex(),fl=/(?!~)[\p{P}\p{S}]/u,h2=/(?!~)[\s\p{P}\p{S}]/u,d2=/(?:[^\s\p{P}\p{S}]|~)/u,f2=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",GT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ml=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,m2=ie(ml,"u").replace(/punct/g,br).getRegex(),p2=ie(ml,"u").replace(/punct/g,fl).getRegex(),pl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",g2=ie(pl,"gu").replace(/notPunctSpace/g,dl).replace(/punctSpace/g,Wi).replace(/punct/g,br).getRegex(),b2=ie(pl,"gu").replace(/notPunctSpace/g,d2).replace(/punctSpace/g,h2).replace(/punct/g,fl).getRegex(),E2=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,dl).replace(/punctSpace/g,Wi).replace(/punct/g,br).getRegex(),T2=ie(/\\(punct)/,"gu").replace(/punct/g,br).getRegex(),x2=ie(/^<(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(),k2=ie(qi).replace("(?:-->|$)","-->").getRegex(),A2=ie("^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",k2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,_2=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gl=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Xn).replace("ref",Yi).getRegex(),bl=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yi).getRegex(),y2=ie("reflink|nolink(?!\\()","g").replace("reflink",gl).replace("nolink",bl).getRegex(),Ra=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gi={_backpedal:hn,anyPunctuation:T2,autolink:x2,blockSkip:f2,br:hl,code:o2,del:hn,emStrongLDelim:m2,emStrongRDelimAst:g2,emStrongRDelimUnd:E2,escape:u2,link:_2,nolink:bl,punctuation:c2,reflink:gl,reflinkSearch:y2,tag:A2,text:l2,url:hn},C2={...Gi,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Xn).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xn).getRegex()},ai={...Gi,emStrongRDelimAst:b2,emStrongLDelim:p2,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ra).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:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ra).getRegex()},I2={...ai,br:ie(hl).replace("{2,}","*").getRegex(),text:ie(ai.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Mn={normal:Vi,gfm:s2,pedantic:a2},Kt={normal:Gi,gfm:ai,breaks:I2,pedantic:C2},S2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Oa=e=>S2[e];function Qe(e,t){if(t){if(_e.escapeTest.test(e))return e.replace(_e.escapeReplace,Oa)}else if(_e.escapeTestNoEncode.test(e))return e.replace(_e.escapeReplaceNoEncode,Oa);return e}function Da(e){try{e=encodeURI(e).replace(_e.percentDecode,"%")}catch{return null}return e}function Pa(e,t){let n=e.replace(_e.findPipe,(s,a,u)=>{let o=!1,c=a;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(_e.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(_e.slashPipe,"|");return r}function Xt(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 N2(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 Ma(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 w2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
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 Zn=class{options;rules;lexer;constructor(e){this.options=e||At}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:Xt(n,`
59
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=w2(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=Xt(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:Xt(t[0],`
60
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Xt(t[0],`
61
+ `).split(`
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
+ `),h=c.replace(this.rules.other.blockquoteSetextReplace,`
64
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
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 m=f,b=m.raw+`
67
+ `+n.join(`
68
+ `),A=this.blockquote(b);s[s.length-1]=A,r=r.substring(0,r.length-m.raw.length)+A.raw,i=i.substring(0,i.length-m.text.length)+A.text;break}else if(f?.type==="list"){let m=f,b=m.raw+`
69
+ `+n.join(`
70
+ `),A=this.list(b);s[s.length-1]=A,r=r.substring(0,r.length-f.raw.length)+A.raw,i=i.substring(0,i.length-m.raw.length)+A.raw,n=b.substring(s.at(-1).raw.length).split(`
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,A=>" ".repeat(3*A.length)),f=e.split(`
73
+ `,1)[0],m=!d.trim(),b=0;if(this.options.pedantic?(b=2,h=d.trimStart()):m?b=t[1].length+1:(b=t[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,h=d.slice(b),b+=t[1].length),m&&this.rules.other.blankLine.test(f)&&(c+=f+`
74
+ `,e=e.substring(f.length+1),o=!0),!o){let A=this.rules.other.nextBulletRegex(b),I=this.rules.other.hrRegex(b),y=this.rules.other.fencesBeginRegex(b),w=this.rules.other.headingBeginRegex(b),R=this.rules.other.htmlBeginRegex(b);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)||R.test(f)||A.test(f)||I.test(f))break;if(z.search(this.rules.other.nonSpaceChar)>=b||!f.trim())h+=`
76
+ `+z.slice(b);else{if(m||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}!m&&!f.trim()&&(m=!0),c+=F+`
78
+ `,e=e.substring(F.length+1),d=z.slice(b)}}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=Pa(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(Pa(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=Xt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=N2(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)),Ma(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 Ma(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}}}},De=class ui{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||At,this.options.tokenizer=this.options.tokenizer||new Zn,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:_e,block:Mn.normal,inline:Kt.normal};this.options.pedantic?(n.block=Mn.pedantic,n.inline=Kt.pedantic):this.options.gfm&&(n.block=Mn.gfm,this.options.breaks?n.inline=Kt.breaks:n.inline=Kt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Mn,inline:Kt}}static lex(t,n){return new ui(n).lex(t)}static lexInline(t,n){return new ui(n).inlineTokens(t)}lex(t){t=t.replace(_e.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(_e.tabCharGlobal," ").replace(_e.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
+ `: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
+ `)?"":`
84
+ `)+i.raw,a.text+=`
85
+ `+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
86
+ `)?"":`
87
+ `)+i.raw,a.text+=`
88
+ `+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,u=t.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},u),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
89
+ `)?"":`
90
+ `)+i.raw,a.text+=`
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
+ `)?"":`
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(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}},Jn=class{options;parser;constructor(e){this.options=e||At}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(_e.notSpaceStart)?.[0],i=e.replace(_e.endingNewline,"")+`
95
+ `;return r?'<pre><code class="language-'+Qe(r)+'">'+(n?i:Qe(i,!0))+`</code></pre>
96
+ `:"<pre><code>"+(n?i:Qe(i,!0))+`</code></pre>
97
+ `}blockquote({tokens:e}){return`<blockquote>
98
+ ${this.parser.parse(e)}</blockquote>
99
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
100
+ `}hr(e){return`<hr>
101
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let u=e.items[a];r+=this.listitem(u)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
102
+ `+r+"</"+i+`>
103
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
104
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
105
+ `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let s=e.rows[i];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
106
+ <thead>
107
+ `+t+`</thead>
108
+ `+r+`</table>
109
+ `}tablerow({text:e}){return`<tr>
110
+ ${e}</tr>
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>${Qe(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=Da(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Qe(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=Da(e);if(i===null)return Qe(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Qe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Qe(e.text)}},Qi=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}},Be=class oi{options;renderer;textRenderer;constructor(t){this.options=t||At,this.options.renderer=this.options.renderer||new Jn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Qi}static parse(t,n){return new oi(n).parse(t)}static parseInline(t,n){return new oi(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}},en=class{options;block;constructor(e){this.options=e||At}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?De.lex:De.lexInline}provideParser(){return this.block?Be.parse:Be.parseInline}},L2=class{defaults=ji();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Be;Renderer=Jn;TextRenderer=Qi;Lexer=De;Tokenizer=Zn;Hooks=en;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 Jn(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 Zn(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 en;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];en.passThroughHooks.has(a)?s[u]=h=>{if(this.defaults.async&&en.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 De.lex(t,n??this.defaults)}parser(t,n){return Be.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?De.lex:De.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?Be.parse:Be.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?De.lex:De.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?Be.parse:Be.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>"+Qe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},bt=new L2;function se(e,t){return bt.parse(e,t)}se.options=se.setOptions=function(e){return bt.setOptions(e),se.defaults=bt.defaults,ul(se.defaults),se};se.getDefaults=ji;se.defaults=At;se.use=function(...e){return bt.use(...e),se.defaults=bt.defaults,ul(se.defaults),se};se.walkTokens=function(e,t){return bt.walkTokens(e,t)};se.parseInline=bt.parseInline;se.Parser=Be;se.parser=Be.parse;se.Renderer=Jn;se.TextRenderer=Qi;se.Lexer=De;se.lexer=De.lex;se.Tokenizer=Zn;se.Hooks=en;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;Be.parse;De.lex;var R2=300,O2="300px",D2=500;function P2(e={}){let{immediate:t=!1,debounceDelay:n=R2,rootMargin:r=O2,idleTimeout:i=D2}=e,[s,a]=_.useState(!1),u=_.useRef(null),o=_.useRef(null),c=_.useRef(null),h=_.useMemo(()=>m=>{let b=Date.now();return window.setTimeout(()=>{m({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=_.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(m,b)=>window.requestIdleCallback(m,b):h,[h]),f=_.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?m=>window.cancelIdleCallback(m):m=>{clearTimeout(m)},[]);return _.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 b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},A=R=>{c.current=d(F=>{F.timeRemaining()>0||F.didTimeout?(a(!0),R.disconnect()):c.current=d(()=>{a(!0),R.disconnect()},{timeout:i/2})},{timeout:i})},I=R=>{b(),o.current=window.setTimeout(()=>{var F,z;let L=R.takeRecords();(L.length===0||(z=(F=L.at(-1))==null?void 0:F.isIntersecting)!=null&&z)&&A(R)},n)},y=(R,F)=>{R.isIntersecting?I(F):b()},w=new IntersectionObserver(R=>{for(let F of R)y(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 El=/\s/,M2=/^\s+$/,v2=new Set(["code","pre","svg","math","annotation"]),B2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",F2=e=>e.some(t=>B2(t)&&v2.has(t.tagName)),H2=e=>{let t=[],n="",r=!1;for(let i of e){let s=El.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},U2=e=>{let t=[],n="";for(let r of e)El.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},j2=(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}]}),z2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(F2(t))return Yn;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"?U2(a):H2(a)).map(o=>M2.test(o)?{type:"text",value:o}:j2(o,n.animation,n.duration,n.easing));return i.children.splice(s,1,...u),s+u.length};function li(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=>{Ei(a,"text",(u,o)=>z2(u,o,s))}}}li();var Ki=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"})}),Xi=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"})}),Er=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"})}),$2=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"})]}),Y2=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"})}),q2=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"})}),Tl=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"})}),va=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"})}),V2=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"})}),W2=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)=>Nc(wc(e)),Dt=(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)},G2=_.createContext({code:""}),xl=()=>_.useContext(G2),Ba=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let[u,o]=_.useState(!1),c=_.useRef(0),{code:h}=xl(),{isAnimating:d}=_.useContext(Pe),f=s??h,m=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.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)}};_.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?Ki:Xi;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(b,{size:14})})},Fa={"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"},Q2=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let{code:u}=xl(),{isAnimating:o}=_.useContext(Pe),c=s??u,h=`file.${n&&n in Fa?Fa[n]:"txt"}`,d="text/plain",f=()=>{try{Dt(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(Er,{size:14})})},Ha=()=>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($2,{className:"size-4 animate-spin"})})]}),K2=/\.[^/.]+$/,X2=({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(K2,"")}.${f}`}Dt(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(Er,{size:14})})]}):null},dn=0,Z2=()=>{dn+=1,dn===1&&(document.body.style.overflow="hidden")},J2=()=>{dn=Math.max(0,dn-1),dn===0&&(document.body.style.overflow="")},ex=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,s]=_.useState(!1),a=_.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},[e]),u=_.useCallback(()=>{r(),n()},[r,n]);return _.useEffect(()=>{if(t){Z2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),J2()}}},[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(Tl,{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(va,{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(Ki,{size:14}),p.jsx("span",{children:"Copied"})]}):p.jsxs(p.Fragment,{children:[p.jsx(Xi,{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(va,{size:14}),p.jsx("span",{children:"Open link"})]})]})]})}):null},ci=_.createContext(null),kl=()=>_.useContext(ci),Zk=()=>{var e;let t=kl();return(e=t?.code)!=null?e:null},Zi=()=>{var e;let t=kl();return(e=t?.mermaid)!=null?e:null},tx=(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})},nx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let[a,u]=_.useState(!1),o=_.useRef(null),{isAnimating:c}=_.useContext(Pe),h=Zi(),d=async f=>{try{if(f==="mmd"){Dt("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),b=e.split("").reduce((y,w)=>(y<<5)-y+w.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:I}=await m.render(A,e);if(!I){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Dt("diagram.svg",I,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let y=await tx(I);Dt("diagram.png",y,"image/png"),r?.(f),u(!1);return}}catch(m){s?.(m)}};return _.useEffect(()=>{let f=m=>{let b=m.composedPath();o.current&&!b.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(Er,{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]})},fn=0,rx=()=>{fn+=1,fn===1&&(document.body.style.overflow="hidden")},ix=()=>{fn=Math.max(0,fn-1),fn===0&&(document.body.style.overflow="")},sx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let[a,u]=_.useState(!1),{isAnimating:o,controls:c}=_.useContext(Pe),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 _.useEffect(()=>{if(a){rx();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),ix()}}},[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(Y2,{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(Tl,{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(Xl,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},Al=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}},_l=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
+ `)&&(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
+ `)},ax=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
116
+ `||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
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
+ `)},zr=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("")},ux=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=>zr(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?zr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>zr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
119
+ `)},ox=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[s,a]=_.useState(!1),[u,o]=_.useState(!1),c=_.useRef(null),h=_.useRef(0),{isAnimating:d}=_.useContext(Pe),f=async b=>{var A,I;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.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 R=Al(w),F=b==="csv"?_l(R):ax(R),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?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};_.useEffect(()=>{let b=A=>{let I=A.composedPath();c.current&&!I.includes(c.current)&&a(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let m=u?Ki:Xi;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]})},lx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,s]=_.useState(!1),a=_.useRef(null),{isAnimating:u}=_.useContext(Pe),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=Al(f),b=c==="csv"?_l(m):ux(m);Dt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),s(!1),n?.(c)}catch(d){r?.(d)}};return _.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(Er,{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(ox,{}),p.jsx(lx,{})]}):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})})]}),hx=_.lazy(()=>bi(()=>import("./code-block-OCS4YCEC-DizntuP_.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),dx=_.lazy(()=>bi(()=>Promise.resolve().then(()=>Wk),void 0).then(e=>({default:e.Mermaid}))),fx=/language-([^\s]+)/;function Tr(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 de(e,t){return e.className===t.className&&Tr(e.node,t.node)}var hi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,vn=(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},Ji=_.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)=>de(e,t));Ji.displayName="MarkdownOl";var yl=_.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&&Tr(e.node,t.node));yl.displayName="MarkdownLi";var Cl=_.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)=>de(e,t));Cl.displayName="MarkdownUl";var Il=_.memo(({className:e,node:t,...n})=>p.jsx("hr",{className:Q("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>de(e,t));Il.displayName="MarkdownHr";var Sl=_.memo(({children:e,className:t,node:n,...r})=>p.jsx("span",{className:Q("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>de(e,t));Sl.displayName="MarkdownStrong";var mx=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:s}=_.useContext(Pe),[a,u]=_.useState(!1),o=n==="streamdown:incomplete-link",c=_.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=_.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=_.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(ex,{...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})},Nl=_.memo(mx,(e,t)=>de(e,t)&&e.href===t.href);Nl.displayName="MarkdownA";var wl=_.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)=>de(e,t));wl.displayName="MarkdownH1";var Ll=_.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)=>de(e,t));Ll.displayName="MarkdownH2";var Rl=_.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)=>de(e,t));Rl.displayName="MarkdownH3";var Ol=_.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)=>de(e,t));Ol.displayName="MarkdownH4";var Dl=_.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)=>de(e,t));Dl.displayName="MarkdownH5";var Pl=_.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)=>de(e,t));Pl.displayName="MarkdownH6";var Ml=_.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=_.useContext(Pe),s=hi(i,"table");return p.jsx(cx,{className:t,showControls:s,...r,children:e})},(e,t)=>de(e,t));Ml.displayName="MarkdownTable";var vl=_.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)=>de(e,t));vl.displayName="MarkdownThead";var Bl=_.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)=>de(e,t));Bl.displayName="MarkdownTbody";var Fl=_.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)=>de(e,t));Fl.displayName="MarkdownTr";var Hl=_.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)=>de(e,t));Hl.displayName="MarkdownTh";var Ul=_.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)=>de(e,t));Ul.displayName="MarkdownTd";var jl=_.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)=>de(e,t));jl.displayName="MarkdownBlockquote";var zl=_.memo(({children:e,className:t,node:n,...r})=>p.jsx("sup",{className:Q("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>de(e,t));zl.displayName="MarkdownSup";var $l=_.memo(({children:e,className:t,node:n,...r})=>p.jsx("sub",{className:Q("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>de(e,t));$l.displayName="MarkdownSub";var Yl=_.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var u,o;if(!_.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(_.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 b of m){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(_.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},s=Array.isArray(e)?e.map(a=>{if(!_.isValidElement(a))return a;if(a.type===Ji){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)=>de(e,t));Yl.displayName="MarkdownSection";var px=({node:e,className:t,children:n,...r})=>{var i;let s=!("data-block"in r),{mermaid:a,controls:u}=_.useContext(Pe),o=Zi();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(fx),h=(i=c?.at(1))!=null?i:"",d="";if(_.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=hi(u,"mermaid"),b=vn(u,"download"),A=vn(u,"copy"),I=vn(u,"fullscreen"),y=vn(u,"panZoom"),w=m&&(b||A||I);return p.jsx(_.Suspense,{fallback:p.jsx(Ha,{}),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:[b?p.jsx(nx,{chart:d,config:a?.config}):null,A?p.jsx(Ba,{code:d}):null,I?p.jsx(sx,{chart:d,config:a?.config}):null]}):null,p.jsx(dx,{chart:d,config:a?.config,showControls:y})]})})}let f=hi(u,"code");return p.jsx(_.Suspense,{fallback:p.jsx(Ha,{}),children:p.jsx(hx,{className:Q("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?p.jsxs(p.Fragment,{children:[p.jsx(Q2,{code:d,language:h}),p.jsx(Ba,{})]}):null})})},ql=_.memo(px,(e,t)=>e.className===t.className&&Tr(e.node,t.node));ql.displayName="MarkdownCode";var Vl=_.memo(X2,(e,t)=>e.className===t.className&&Tr(e.node,t.node));Vl.displayName="MarkdownImg";var Wl=_.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(i.length===1&&_.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)=>de(e,t));Wl.displayName="MarkdownParagraph";var gx={ol:Ji,li:yl,ul:Cl,hr:Il,strong:Sl,a:Nl,h1:wl,h2:Ll,h3:Rl,h4:Ol,h5:Dl,h6:Pl,table:Ml,thead:vl,tbody:Bl,tr:Fl,th:Hl,td:Ul,blockquote:jl,code:ql,img:Vl,pre:({children:e})=>_.isValidElement(e)?_.cloneElement(e,{"data-block":"true"}):e,sup:zl,sub:$l,p:Wl,section:Yl},bx=()=>e=>{it(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Ua=[],ja={allowDangerousHtml:!0},Bn=new WeakMap,Ex=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[b,A]=m;if(typeof b=="function"){let I=Bn.get(b);I||(I=b.name,Bn.set(b,I)),d+=I}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof m=="function"){let b=Bn.get(m);b||(b=m.name,Bn.set(m,b)),d+=b}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()}},za=new Ex,Gl=e=>{let t=Tx(e),n=e.children||"";return Ix(t.runSync(t.parse(n),n),e)},Tx=e=>{let t=za.get(e);if(t)return t;let n=kx(e);return za.set(e,n),n},xx=e=>e.some(t=>Array.isArray(t)?t[0]===Zr:t===Zr),kx=e=>{let t=e.rehypePlugins||Ua,n=e.remarkPlugins||Ua,r=xx(t)?n:[...n,bx],i=e.remarkRehypeOptions?{...ja,...e.remarkRehypeOptions}:ja;return YT().use($E).use(r).use(CT,i).use(t)},Ax=e=>e,_x=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},yx=(e,t)=>{var n;for(let r in Dr)if(Object.hasOwn(Dr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=Dr[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},Cx=(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},Ix=(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||Ax;it(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return _x(d,h,s,c.value),h;if(c.type==="element"&&(yx(c,o),Cx(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 Xb(e,{Fragment:p.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0})},Sx=/\[\^[\w-]{1,200}\](?!:)/,Nx=/\[\^[\w-]{1,200}\]:/,wx=/<\/(\w+)>/,Lx=/<(\w+)[\s>]/,Rx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ox=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},Dx=e=>{let t=Sx.test(e),n=Nx.test(e);if(t||n)return[e];let r=De.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(wx);if(h){let d=h[1];s.at(-1)===d&&s.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(Lx);if(h){let d=h[1];o.includes(`</${d}>`)||Rx.has(d.toLowerCase())||s.push(d)}}if(c>0&&!a){let h=i[c-1];if(Ox(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(a=u.type==="code")}return i},$a,Ya,zn={...on,protocols:{...on.protocols,href:[...(Ya=($a=on.protocols)==null?void 0:$a.href)!=null?Ya:[],"tel"]}},di={raw:Zr,sanitize:[oo,zn],harden:[ch,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Px={gfm:[Sg,{}]},qa=Object.values(di),Mx=Object.values(Px),vx={block:" ▋",circle:" ●"},Bx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Pe=_.createContext(Bx),Ql=_.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>p.jsx(Gl,{...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)});Ql.displayName="Block";var Fx=["github-light","github-dark"],Kl=_.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=qa,remarkPlugins:s=Mx,className:a,shikiTheme:u=Fx,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=Ql,parseMarkdownIntoBlocksFn:m=Dx,caret:b,plugins:A,remend:I,linkSafety:y={enabled:!0},allowedTags:w,...R})=>{let F=_.useId(),[z,L]=_.useTransition(),G=_.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?Mb(e,I):e,[e,t,n,I]),W=_.useMemo(()=>m(G),[G,m]),[K,S]=_.useState(W);_.useEffect(()=>{t==="streaming"?L(()=>{S(W)}):S(W)},[W,t]);let U=t==="streaming"?K:W,M=_.useMemo(()=>U.map((re,x)=>`${F}-${x}`),[U.length,F]),q=_.useMemo(()=>d?d===!0?li():li(d):null,[d]),$=_.useMemo(()=>{var re,x;return{shikiTheme:(x=(re=A?.code)==null?void 0:re.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,A?.code]),j=_.useMemo(()=>({...gx,...r}),[r]),B=_.useMemo(()=>{let re=[];return A!=null&&A.cjk&&(re=[...re,...A.cjk.remarkPluginsBefore]),re=[...re,...s],A!=null&&A.cjk&&(re=[...re,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(re=[...re,A.math.remarkPlugin]),re},[s,A?.math,A?.cjk]),V=_.useMemo(()=>{var re;let x=i;if(w&&Object.keys(w).length>0&&i===qa){let Se={...zn,tagNames:[...(re=zn.tagNames)!=null?re:[],...Object.keys(w)],attributes:{...zn.attributes,...w}};x=[di.raw,[oo,Se],di.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),q&&h&&(x=[...x,q.rehypePlugin]),x},[i,A?.math,q,h,w]),ae=_.useMemo(()=>b&&h?{"--streamdown-caret":`"${vx[b]}"`}:void 0,[b,h]);return t==="static"?p.jsx(ci.Provider,{value:A??null,children:p.jsx(Pe.Provider,{value:$,children:p.jsx("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",a),children:p.jsx(Gl,{components:j,rehypePlugins:V,remarkPlugins:B,...R,children:e})})})}):p.jsx(ci.Provider,{value:A??null,children:p.jsx(Pe.Provider,{value:$,children:p.jsxs("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,a),style:ae,children:[U.length===0&&b&&h&&p.jsx("span",{}),U.map((re,x)=>p.jsx(f,{components:j,content:re,index:x,rehypePlugins:V,remarkPlugins:B,shouldParseIncompleteMarkdown:n,...R},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);Kl.displayName="Streamdown";var Hx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:u=!1})=>{let o=_.useRef(null),c=_.useRef(null),[h,d]=_.useState(a),[f,m]=_.useState({x:0,y:0}),[b,A]=_.useState(!1),[I,y]=_.useState({x:0,y:0}),[w,R]=_.useState({x:0,y:0}),F=_.useCallback(M=>{d(q=>Math.max(n,Math.min(r,q+M)))},[n,r]),z=_.useCallback(()=>{F(i)},[F,i]),L=_.useCallback(()=>{F(-i)},[F,i]),G=_.useCallback(()=>{d(a),m({x:0,y:0})},[a]),W=_.useCallback(M=>{M.preventDefault();let q=M.deltaY>0?-i:i;F(q)},[F,i]),K=_.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;A(!0),y({x:M.clientX,y:M.clientY}),R(f);let q=M.currentTarget;q instanceof HTMLElement&&q.setPointerCapture(M.pointerId)},[f]),S=_.useCallback(M=>{if(!b)return;M.preventDefault();let q=M.clientX-I.x,$=M.clientY-I.y;m({x:w.x+q,y:w.y+$})},[b,I,w]),U=_.useCallback(M=>{A(!1);let q=M.currentTarget;q instanceof HTMLElement&&q.releasePointerCapture(M.pointerId)},[]);return _.useEffect(()=>{let M=o.current;if(M)return M.addEventListener("wheel",W,{passive:!1}),()=>{M.removeEventListener("wheel",W)}},[W]),_.useEffect(()=>{let M=c.current;if(M&&b)return document.body.style.userSelect="none",M.addEventListener("pointermove",S,{passive:!1}),M.addEventListener("pointerup",U),M.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",S),M.removeEventListener("pointerup",U),M.removeEventListener("pointercancel",U)}},[b,S,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:b?"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(V2,{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(W2,{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:G,title:"Reset zoom and pan",type:"button",children:p.jsx(q2,{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:K,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Xl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[s,a]=_.useState(null),[u,o]=_.useState(!1),[c,h]=_.useState(""),[d,f]=_.useState(""),[m,b]=_.useState(0),{mermaid:A}=_.useContext(Pe),I=Zi(),y=A?.errorComponent,{shouldRender:w,containerRef:R}=P2({immediate:r});if(_.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((K,S)=>(K<<5)-K+S.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(L)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await z.render(G,e);h(W),f(W)}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:R});if(u&&!c&&!d)return p.jsx("div",{className:Q("my-4 flex justify-center p-4",t),ref:R,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=()=>b(L=>L+1);return y?p.jsx("div",{ref:R,children:p.jsx(y,{chart:e,error:s,retry:z})}):p.jsxs("div",{className:Q("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:R,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:R,children:p.jsx(Hx,{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 Ux({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 Zl=/^[a-zA-Z]:[\\/]/,jx=/[/\\](attachments|conversations)[/\\]/,zx=/^\/(Users|home|tmp|private|var|opt|mnt|Volumes)(\/|$)/;function Va(e){return e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")}function $x(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 Yx(e,t){if(!t)return null;const n=Va(e),r=Va(t).replace(/\/$/,"");return n===r?null:n.startsWith(`${r}/`)?n.slice(r.length+1):n.startsWith("./")?n.slice(2):!n.startsWith("/")&&!Zl.test(e)&&!n.startsWith("../")?n:null}function qx(e){return`${Et()}/attachments/by-path?path=${encodeURIComponent(e)}`}function Jl(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=$x(e),r=Yx(n.path,t);return r?{type:"workspace-file",path:r,line:n.line,column:n.column}:jx.test(e)?{type:"attachment",path:e,url:qx(e)}:zx.test(e)||Zl.test(e)?{type:"unknown-local",path:e}:{type:"internal",url:e}}function Vx(e,t){const n=new URLSearchParams({workingDir:e,path:t});return`${Et()}/files/image?${n.toString()}`}function Wx(e){const t=new URLSearchParams({path:e});return`${Et()}/files/image?${t.toString()}`}const ec="/__agent-tower/message-intent/codex-inline-vis",tc="/__agent-tower/message-intent/agent-download",Gx=/^[ \t]{0,3}::codex-inline-vis\{file="([^"\r\n]+)"\}[ \t]*$/,nc=/^[a-z0-9][a-z0-9-]*\.html$/,Qx=/^[ \t]{0,3}(`{3,}|~{3,})/;function Kx(e,t){const n=t[0]==="`"?"`":"~";return new RegExp(`^[ \\t]{0,3}${n}{${t.length},}[ \\t]*$`).test(e)}function Xx(e){let t=null;return e.split(/\r?\n/).map(n=>{if(t)return Kx(n,t)&&(t=null),n;const r=n.match(Qx);if(r)return t=r[1],n;const i=n.match(Gx);if(i&&nc.test(i[1])){const u=`${ec}?file=${encodeURIComponent(i[1])}`;return`[${i[1]}](${u})`}const s=Yc(n);if(!s)return n;const a=`${tc}?file=${encodeURIComponent(s)}`;return`[${s}](${a})`}).join(`
120
+ `)}function Zx(e){try{const t=new URL(e,"http://agent-tower.local"),n=t.searchParams.get("file");if(!n)return null;if(t.pathname===ec&&nc.test(n))return{type:"codex-inline-visualization",file:n};if(t.pathname===tc){const r=au(n);return r?{type:"agent-download",file:r}:null}return null}catch{return null}}function Jk(e,t){return`${Et()}/sessions/${encodeURIComponent(e)}/visualizations/${encodeURIComponent(t)}`}function Jx(e,t){const n=new URLSearchParams({path:t});return`${Et()}/sessions/${encodeURIComponent(e)}/artifacts/download?${n.toString()}`}const rc=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]);function ek(e){return/^\d+$/.test(e)?`http://127.0.0.1:${e}`:/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(e)?e:`http://${e}`}function fi(e){try{return new URL(ek(e.trim()))}catch{return null}}function Wa(e){return rc.has(e.hostname.toLowerCase())?"loopback":e.hostname.toLowerCase()}function Ga(e){return e.port?e.port:e.protocol==="https:"?"443":"80"}function tk(e,t){return e.protocol===t.protocol&&Wa(e)===Wa(t)&&Ga(e)===Ga(t)}function ic(e){return!e||e==="/"?"":e.endsWith("/")?e.slice(0,-1):e}function nk(e,t){return t?e===t||e.startsWith(`${t}/`):!0}function Fn(e,t){return t?{kind:"target",target:t.origin,path:`${t.pathname}${t.search}${t.hash}`}:{kind:"target",target:e,path:null}}function Qa(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 e3(e,t,n){const r=e.trim();if(!r)return null;if(r.startsWith("/"))return n?{kind:"proxy",url:Qa(n,r)}:null;const i=fi(r);if(!i)return Fn(r,null);if(!t||!n)return Fn(r,i);const s=fi(t);if(!s||!tk(i,s))return Fn(r,i);const a=ic(s.pathname);if(!nk(i.pathname,a))return Fn(r,i);const u=i.pathname.slice(a.length)||"/";return{kind:"proxy",url:Qa(n,`${u}${i.search}${i.hash}`)}}function t3(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=ic(i.pathname);return i.pathname=`${c}${o}`.replace(/\/{2,}/g,"/")||"/",i.search=a.search,i.hash=a.hash,i.toString()}catch{return null}}function rk(e){const t=fi(e);return!!(t&&rc.has(t.hostname.toLowerCase()))}const sc=({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:Tn("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)})}),ik=({href:e="",children:t,node:n,onClick:r,className:i,...s})=>{const{t:a}=rr(),{workingDir:u,onOpenWorkspaceFile:o,onOpenPreviewUrl:c,onOpenVisualization:h,downloadSessionId:d}=s,f=Zx(e),m=Jl(e,u),b={...s};delete b.workingDir,delete b.onOpenWorkspaceFile,delete b.onOpenPreviewUrl,delete b.onOpenVisualization,delete b.downloadSessionId;const A=Tn("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(Fc,{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:Jx(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(Lc,{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&&rk(e)){const y=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),c(e))};return p.jsx("a",{href:e,onClick:y,className:A,...b,children:t})}if(m.type==="workspace-file"&&o){const y=w=>{r?.(w),!w.defaultPrevented&&(w.preventDefault(),o(m.path,m.line,m.column))};return p.jsx("a",{href:e,onClick:y,className:A,...b,children:t})}if(m.type==="unknown-local"||m.type==="workspace-file"){const y=m.path;return p.jsx("code",{title:y,children:t})}const I=m.url;return p.jsx("a",{href:I,onClick:r,className:A,...b,children:t})},sk=({children:e,className:t,node:n,...r})=>p.jsx("li",{className:Tn("py-0 pl-0 [&>p]:inline",t),...r,children:e}),ak={img:sc,li:sk};function uk({workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}){return{...ak,a:s=>p.jsx(ik,{...s,workingDir:e,onOpenWorkspaceFile:t,onOpenPreviewUrl:n,onOpenVisualization:r,downloadSessionId:i}),img:s=>{const a=Jl(s.src??"",e),u=a.type==="workspace-file"&&e?Vx(e,a.path):a.type==="attachment"?a.url:a.type==="unknown-local"?Wx(a.path):s.src;return p.jsx(sc,{...s,src:u})}}}const ok={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},lk=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let mi=null;function ck(e){return lk.test(e)}function hk(){return mi??=bi(async()=>{const{mermaid:e}=await import("./index-CWEbo6pZ.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),mi}function dk(e){const t=ck(e),[n,r]=_.useState();return _.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return hk().then(s=>{i&&r(s)}).catch(()=>{mi=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function ac(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 fk(e){return ac(e)==="success"}function mk(e){const t=ac(e);return t==="failed"||t==="timed_out"}function xr(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function pk(e){return e.type===ce.Tool&&!!e.children?.length}function gk(e){return e.type!==ce.Cursor&&!e.children?.length&&e.content.trim()===""}function es(e){return!!e.tokenUsage||gk(e)}function bk(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function Ek(e){return e.type===ce.Cursor||e.type===ce.User||e.type===ce.Assistant||e.type===ce.Error||e.type===ce.Warning?!0:e.type===ce.Info&&e.tokenUsage?!1:bk(e)}function Ka(e){return xr(e)?!0:pk(e)||e.type!==ce.Tool&&e.type!==ce.Action?!1:!Ek(e)}function ts(e){return!xr(e)&&(e.type===ce.Tool||e.type===ce.Action)}function $n(e){const t=e.filter(i=>!es(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(Ka(i)){const s=[i];let a=r+1;for(;a<t.length;){const u=t[a];if(Ka(u))s.push(u),a++;else break}s.some(ts)?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 Tk(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===ce.User?(i(),n=s,r=[]):r.push(s);return i(),t}function xk(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===ce.Assistant)return n;t===-1&&r.type===ce.Error&&(t=n)}}return t}function kk(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 Ak(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 _k(e,t,n,r){const i=t&&n===!0,s=Ak(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:$n(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=xk(e.agentLogs),c=o>=0?e.agentLogs.slice(0,o):e.agentLogs,h=o>=0?e.agentLogs.slice(o):[],d=c.some(f=>!es(f));return{key:e.key,user:e.user??null,running:!1,duration:u,showSummary:!0,summaryCollapsible:d,inlineItems:[],processedItems:d?$n(c):[],finalItems:$n(h)}}function $r(e){return`item:${e.key}`}function yk(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:$r(i),item:i,processed:!1});continue}if(t.has(r.key))for(const i of r.processedItems)n.push({kind:"item",key:$r(i),item:i,processed:!0});for(const i of r.finalItems)n.push({kind:"item",key:$r(i),item:i,processed:!1})}return n}function Ck(e){if(!e)return 40;switch(e.kind){case"user":return 72;case"summary":return 44;default:return 32}}function Ik(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 ns=_.memo(({content:e,className:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})=>{const u=_.useMemo(()=>s||a?Xx(e):e,[e,a,s]),o=dk(u),c=_.useMemo(()=>uk({workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a}),[a,i,s,r,n]);return p.jsx(Kl,{className:Tn("session-log-message-markdown",t),components:c,plugins:o,controls:o?ok:void 0,children:u})});ns.displayName="MarkdownMessage";const rs=_.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(ns,{content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i})})}));rs.displayName="UserMessage";const is=_.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=_.useState(t),i=_.useRef(null),[s,a]=_.useState(0);_.useEffect(()=>{i.current&&a(i.current.scrollHeight)},[e,n]);const u=_.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(xn,{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()})})})]})});is.displayName="ThinkingBlock";function uc(e,t=140){return(e.split(`
122
+ `)[0]||"").slice(0,t)}function oc(e){const t=e.title?.replace(/\s*[✓✗]$/,"").replace(/\s*\(待审批\)$/,"");return e.tool?.kind?e.tool.name||t||"Tool":uc(e.content,140)||e.tool?.name||t||"Tool"}const Sk=new Set(["bash","shell","read","write","edit","glob","grep"]);function Nk(e){const t=oc(e),n=e.tool?.name?.trim().toLowerCase();if(!n||!Sk.has(n))return t;const r=e.content.match(/(?:^|\n)Input\n([\s\S]*?)(?:\n\nContent\n|$)/i)?.[1]?.trim();if(r)try{const i=JSON.parse(r);if(typeof i.command=="string"){const s=i.command.split(/\s*(?:&&|\|\||;)\s*/)[0]?.trim();if(s)return s.length>72?`${s.slice(0,72)}…`:s}if(typeof i.file_path=="string")return i.file_path.split("/").pop()||i.file_path;if(typeof i.pattern=="string")return i.pattern}catch{}return t}function wk(e){const t=e.flatMap(n=>{if(xr(n)){const r=uc(n.content.replace(/^Thinking:\s*/i,"").trim(),72);return r?[r]:[]}return ts(n)?[Nk(n)]:[]});return t.filter((n,r)=>r===0||n!==t[r-1])}const pi=_.memo(({title:e,content:t,type:n})=>{const[r,i]=_.useState(!1);if(n===ce.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(su,{size:10}):p.jsx(xn,{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})})]})});pi.displayName="ToolBlock";const lc=_.memo(({count:e})=>{const[t,n]=_.useState(()=>({current:e,previous:null}));return t.current!==e&&n({current:e,previous:t.current}),p.jsxs("span",{className:"agent-tool-count inline-flex items-center justify-center px-1.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:[p.jsxs("span",{className:"agent-tool-count__window",style:{width:`${String(e).length}ch`},"aria-hidden":"true",children:[t.previous!==null&&p.jsx("span",{className:"agent-tool-count__value agent-tool-count__value--out whitespace-nowrap min-w-max",onAnimationEnd:()=>n(r=>r.previous===null?r:{...r,previous:null}),children:t.previous},`out-${t.previous}`),p.jsx("span",{className:Tn("agent-tool-count__value agent-tool-count__value--in whitespace-nowrap min-w-max",t.previous!==null&&"agent-tool-count__value--rolling"),children:t.current},`in-${t.current}`)]}),p.jsx("span",{className:"sr-only",children:e})]})});lc.displayName="ToolCountBadge";const gi=_.memo(({logs:e,onBeforeToggle:t})=>{const{t:n}=rr(),[r,i]=_.useState(!1),s=e.filter(ts),a=wk(e),u=s.length;return p.jsxs("div",{className:"my-2",children:[p.jsxs("button",{type:"button",onClick:()=>{t?.(),i(!r)},"aria-expanded":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 transition-transform duration-200",style:{transform:r?"rotate(90deg)":"rotate(0deg)"},children:p.jsx(xn,{size:11,strokeWidth:2,className:"text-neutral-400"})}),p.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:n("工具调用")}),p.jsx("span",{className:"shrink-0 inline-flex items-center gap-1",children:p.jsx(lc,{count:u})}),!r&&p.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[a.slice(-3).join(", "),a.length>3?" …":""]})]}),r&&p.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(o=>xr(o)?p.jsx(is,{content:o.content,isOpenDefault:!1},o.id):p.jsx(cc,{log:o,title:oc(o),onBeforeToggle:t},o.id))})]})});gi.displayName="ExecutionDetailsGroup";const cc=_.memo(({log:e,title:t,onBeforeToggle:n})=>{const[r,i]=_.useState(!1),s=!!e.content.trim()&&e.content.trim()!==t.trim(),a=fk(e),u=mk(e)||e.type===ce.Error;return p.jsxs("div",{children:[p.jsxs("button",{type:"button",onClick:()=>{s&&(n?.(),i(!r))},"aria-expanded":s?r:void 0,className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${s?"cursor-pointer":"cursor-default"}`,children:[p.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:u?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"})}):a?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}),s&&p.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?p.jsx(su,{size:10}):p.jsx(xn,{size:10})})]}),r&&s&&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})})]})});cc.displayName="ToolGroupItem";const hc=_.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}));hc.displayName="AgentText";const dc=_.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(ns,{className:"space-y-2",content:e,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a})}));dc.displayName="AssistantMessage";const fc=_.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})]})}));fc.displayName="ErrorMessage";const mc=_.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})]})}));mc.displayName="WarningMessage";function Xa(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 pc=_.memo(({activity:e})=>{const{t}=rr(),n=_.useRef(Date.now()),[r,i]=_.useState(()=>Date.now()),s=e?.processingStartedAt??n.current;_.useEffect(()=>{const c=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(c)},[]);const a=Xa(r-s,t),u=e?.lastOutputAt==null?null:Xa(r-e.lastOutputAt,t),o=t("正在思考");return p.jsx(Ux,{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}`))})})})});pc.displayName="ThinkingIndicator";const gc=_.memo(({turnKey:e,duration:t,collapsible:n,isOpen:r,onToggle:i,onBeforeToggle:s})=>{const{t:a}=rr(),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(xn,{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})})});gc.displayName="ProcessedGroupSummary";function Lk(e,t,n,r,i,s,a,u){if(e.kind==="execution-group")return p.jsx(gi,{logs:e.logs,onBeforeToggle:u});const o=e.log;if(o.type===ce.Tool&&o.children?.length)return p.jsx(gi,{logs:o.children,onBeforeToggle:u});if(es(o))return null;if(o.title==="Thinking"||o.content.startsWith("Thinking:"))return p.jsx(is,{content:o.content,isOpenDefault:!0});switch(o.type){case ce.User:return p.jsx(rs,{content:o.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i});case ce.Tool:return p.jsx(pi,{type:o.type,title:o.title||"Tool",content:o.content});case ce.Action:return p.jsx(pi,{type:o.type,title:"Action",content:o.content});case ce.Assistant:return p.jsx(dc,{content:o.content,compact:t,workingDir:n,onOpenWorkspaceFile:r,onOpenPreviewUrl:i,onOpenVisualization:s,downloadSessionId:a});case ce.Info:return o.tokenUsage?null:p.jsx(hc,{content:o.content,compact:t});case ce.Error:return p.jsx(fc,{content:o.content});case ce.Warning:return p.jsx(mc,{content:o.content});case ce.Cursor:return p.jsx(pc,{activity:o.cursorActivity});default:return null}}const Rk=8,n3=_.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]=_.useState(null),[b,A]=_.useState(!1),[I,y]=_.useState(0),[w,R]=_.useState(()=>new Set),[F,z]=_.useState(()=>Date.now());_.useEffect(()=>{if(!n)return;const B=()=>z(Date.now()),V=window.setTimeout(B,0),ae=window.setInterval(B,1e3);return()=>{window.clearTimeout(V),window.clearInterval(ae)}},[n]);const L=_.useCallback(B=>{if(!B)return;const V=s?.current??Ik(B);m(ae=>ae===V?ae:V),y(V?.clientHeight??0),A(!0)},[s]);_.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 G=_.useCallback(B=>{R(V=>{const ae=new Set(V);return ae.has(B)?ae.delete(B):ae.add(B),ae})},[]),W=_.useMemo(()=>{if(n===void 0)return null;const B=Tk(t),V=B.length-1;return B.map((ae,re)=>_k(ae,re===V,n,r))},[t,n,r]),K=_.useMemo(()=>n===void 0?$n(t):null,[n,t]),S=_.useMemo(()=>K?K.map(B=>({kind:"item",key:`legacy:${B.key}`,item:B,processed:!1})):yk(W??[],w),[w,K,W]),U=nh({count:S.length,getScrollElement:()=>f,estimateSize:B=>Ck(S[B]),getItemKey:B=>S[B]?.key??B,overscan:Rk,measureElement:B=>B.getBoundingClientRect().height});U.shouldAdjustScrollPositionOnItemSizeChange=rh;const M=f!==null&&I>0;_.useImperativeHandle(d,()=>({scrollToBottom:(B="instant")=>{const V=s?.current;if(!V||(M&&S.length>0&&U.scrollToIndex(S.length-1,{align:"end"}),V.scrollTo({top:V.scrollHeight,behavior:B}),B!=="instant"))return;let ae=0;const re=()=>{const x=s?.current;x&&(x.scrollHeight-x.scrollTop-x.clientHeight<=1||(x.scrollTop=x.scrollHeight,++ae<5&&requestAnimationFrame(re)))};requestAnimationFrame(re)}}),[M,S.length,s,U]);const q=_.useCallback(B=>{const V=B.end===null?F:B.end;return kk(B.start,V)},[F]),$=_.useCallback(B=>{switch(B.kind){case"user":return p.jsx(rs,{content:B.log.content,workingDir:a,onOpenWorkspaceFile:u,onOpenPreviewUrl:o});case"summary":return p.jsx(gc,{turnKey:B.turnKey,duration:q(B.duration),collapsible:B.collapsible,isOpen:w.has(B.turnKey),onToggle:G,onBeforeToggle:i});case"item":return Lk(B.item,!1,a,u,o,c,h,i);default:return null}},[h,q,w,o,c,u,i,G,a]),j=U.getVirtualItems();return b?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 V=S[B.index];return V?p.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:B.start,left:0,width:"100%"},children:$(V)},V.key):null})},"virtualized"):p.jsx("div",{children:S.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"}})}),Ok=Et();function Dk(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function r3({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(Pk,{item:n,onRemove:t},n.tempId))})}function Pk({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:`${Ok}${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(Rc,{size:16,className:"animate-spin text-neutral-400"}):n?p.jsx(Uc,{size:16,className:"text-neutral-400"}):p.jsx(vc,{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:Dk(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(Oc,{size:10})})]})}const Mk=Et();async function vk(e){const t=new FormData;t.append("file",e);const n=await fetch(`${Mk}/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 Bk=0;function i3(){const[e,t]=_.useState([]),n=_.useRef(e);n.current=e;const r=_.useCallback(async d=>{const f=d.map(m=>({tempId:`tmp-${++Bk}`,file:m,progress:0,status:"uploading"}));t(m=>[...m,...f]),await Promise.allSettled(f.map(async m=>{try{const b=await vk(m.file);t(A=>A.map(I=>I.tempId===m.tempId?{...I,status:"done",progress:100,attachment:b}:I))}catch(b){t(A=>A.map(I=>I.tempId===m.tempId?{...I,status:"error",error:b instanceof Error?b.message:"Upload failed"}:I))}}))},[]),i=_.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),s=_.useCallback(d=>{t(f=>f.filter(m=>m.tempId!==d))},[]),a=_.useCallback(()=>{t([])},[]),u=_.useCallback(d=>{d.length!==0&&t(f=>{const m=new Set(f.map(A=>A.attachment?.id??A.tempId)),b=d.filter(A=>{const I=A.attachment?.id??A.tempId;return m.has(I)?!1:(m.add(I),!0)});return b.length>0?[...f,...b]:f})},[]),o=_.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 s3(e){const t=_.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return Dc({queryKey:["attachments","metadata",t],queryFn:()=>Pc.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}const Fk=/^(0|[1-9]\d*)$/,Hk=2147483647;function Uk(e,t){if(!Array.isArray(t))return Fe("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(!tr(t))return Fe("operation is not an object");const n=Yk(t.path);return n?t.op==="add"?zk(e,n,t):t.op==="replace"?$k(e,n,t):$e(t):$e(t)}function zk(e,t,n){if(n.value===void 0)return Fe("operation value is required");if(nr(n.value))return Fe("operation value cannot contain undefined");if(t.length===1&&t[0]==="sessionId")return Rt({...e,sessionId:n.value});if(t[0]!=="entries"||t.length!==2)return $e(n);const r=bc(t[1]);if(r===void 0)return $e(n);if(!Array.isArray(e.entries))return Fe("entries is not an array");if(r>e.entries.length)return $e(n);const i=e.entries.slice();return i.splice(r,0,n.value),Rt(er(e,i))}function $k(e,t,n){if(n.value===void 0)return Fe("operation value is required");if(nr(n.value))return Fe("operation value cannot contain undefined");if(t.length===1&&t[0]==="entries"){const h=n.value,d=Array.isArray(h)?h.slice():h;return Rt(er(e,d))}if(t[0]!=="entries")return $e(n);const r=bc(t[1]);if(r===void 0)return $e(n);if(!Array.isArray(e.entries))return Fe("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 $e(n);if(i){if(r>=e.entries.length)return $e(n);const h=e.entries.slice();return h[r]=n.value,Rt(er(e,h))}const u=e.entries[r];if(!tr(u))return Fe("entry does not exist");if(s)return u.content===void 0?Fe("entry content does not exist"):Rt(Za(e,r,{...u,content:n.value}));const o=u.metadata;if(!tr(o)||o.status===void 0)return Fe("entry metadata status does not exist");const c={...o,status:n.value};return Rt(Za(e,r,{...u,metadata:c}))}function Za(e,t,n){const r=e.entries.slice();return r[t]=n,er(e,r)}function er(e,t){return{...e,entries:t}}function Yk(e){if(!(typeof e!="string"||!e.startsWith("/")))return e.slice(1).split("/")}function bc(e){if(!Fk.test(e))return;const t=Number(e);if(Number.isSafeInteger(t))return t<=Hk?t:void 0}function tr(e){return typeof e=="object"&&e!==null}function nr(e){return e===void 0?!0:Array.isArray(e)?e.some(nr):tr(e)?Object.keys(e).some(t=>nr(e[t])):!1}function Rt(e){return{ok:!0,conversation:e}}function Fe(e){return{ok:!1,kind:"failed",reason:e}}function $e(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 a3={entries:[],isTruncated:!1},qk=50,Ja=500;function eu(e){return typeof e?.seq=="number"?e.seq:0}function tu(e){return e?.entries.at(-1)?.id}function nu(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function u3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function o3(e,t){if(!e||e.isTruncated)return!0;const n=eu(e),r=eu(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=tu(e),s=tu(t);if(s&&i&&s!==i)return!0;const a=nu(e),u=nu(t);return!!(u&&a&&u!==a)}function Vk(e,t){for(;t.length>qk;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const l3=Mc((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 Vk(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=Uk(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<=Ja?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Ja),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:[]})}})),Wk=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Xl},Symbol.toStringTag,{value:"Module"}));export{r3 as A,a3 as E,G2 as I,Pe as L,Kl as Q,Ux as T,Zk as Z,n3 as a,l3 as b,Uk as c,s3 as d,dk as e,uk as f,Q as g,ok as h,Uc as i,Qa as j,Jk as k,t3 as l,ak as m,u3 as n,Xx as p,e3 as r,o3 as s,i3 as u};