agent-tower 0.1.0

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 (341) hide show
  1. package/dist/app.d.ts +2 -0
  2. package/dist/app.d.ts.map +1 -0
  3. package/dist/app.js +62 -0
  4. package/dist/app.js.map +1 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +131 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/core/container.d.ts +11 -0
  10. package/dist/core/container.d.ts.map +1 -0
  11. package/dist/core/container.js +66 -0
  12. package/dist/core/container.js.map +1 -0
  13. package/dist/core/event-bus.d.ts +58 -0
  14. package/dist/core/event-bus.d.ts.map +1 -0
  15. package/dist/core/event-bus.js +29 -0
  16. package/dist/core/event-bus.js.map +1 -0
  17. package/dist/errors.d.ts +22 -0
  18. package/dist/errors.d.ts.map +1 -0
  19. package/dist/errors.js +36 -0
  20. package/dist/errors.js.map +1 -0
  21. package/dist/executors/base.executor.d.ts +160 -0
  22. package/dist/executors/base.executor.d.ts.map +1 -0
  23. package/dist/executors/base.executor.js +122 -0
  24. package/dist/executors/base.executor.js.map +1 -0
  25. package/dist/executors/claude-code.executor.d.ts +78 -0
  26. package/dist/executors/claude-code.executor.d.ts.map +1 -0
  27. package/dist/executors/claude-code.executor.js +160 -0
  28. package/dist/executors/claude-code.executor.js.map +1 -0
  29. package/dist/executors/command-builder.d.ts +64 -0
  30. package/dist/executors/command-builder.d.ts.map +1 -0
  31. package/dist/executors/command-builder.js +144 -0
  32. package/dist/executors/command-builder.js.map +1 -0
  33. package/dist/executors/cursor-agent.executor.d.ts +57 -0
  34. package/dist/executors/cursor-agent.executor.d.ts.map +1 -0
  35. package/dist/executors/cursor-agent.executor.js +109 -0
  36. package/dist/executors/cursor-agent.executor.js.map +1 -0
  37. package/dist/executors/default-profiles.json +29 -0
  38. package/dist/executors/execution-env.d.ts +64 -0
  39. package/dist/executors/execution-env.d.ts.map +1 -0
  40. package/dist/executors/execution-env.js +97 -0
  41. package/dist/executors/execution-env.js.map +1 -0
  42. package/dist/executors/gemini-cli.executor.d.ts +55 -0
  43. package/dist/executors/gemini-cli.executor.d.ts.map +1 -0
  44. package/dist/executors/gemini-cli.executor.js +117 -0
  45. package/dist/executors/gemini-cli.executor.js.map +1 -0
  46. package/dist/executors/index.d.ts +49 -0
  47. package/dist/executors/index.d.ts.map +1 -0
  48. package/dist/executors/index.js +95 -0
  49. package/dist/executors/index.js.map +1 -0
  50. package/dist/executors/profiles.d.ts +61 -0
  51. package/dist/executors/profiles.d.ts.map +1 -0
  52. package/dist/executors/profiles.js +192 -0
  53. package/dist/executors/profiles.js.map +1 -0
  54. package/dist/git/git-cli.d.ts +59 -0
  55. package/dist/git/git-cli.d.ts.map +1 -0
  56. package/dist/git/git-cli.js +156 -0
  57. package/dist/git/git-cli.js.map +1 -0
  58. package/dist/git/worktree.manager.d.ts +166 -0
  59. package/dist/git/worktree.manager.d.ts.map +1 -0
  60. package/dist/git/worktree.manager.js +481 -0
  61. package/dist/git/worktree.manager.js.map +1 -0
  62. package/dist/index.d.ts +2 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +37 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/mcp/context.d.ts +15 -0
  67. package/dist/mcp/context.d.ts.map +1 -0
  68. package/dist/mcp/context.js +19 -0
  69. package/dist/mcp/context.js.map +1 -0
  70. package/dist/mcp/http-client.d.ts +46 -0
  71. package/dist/mcp/http-client.d.ts.map +1 -0
  72. package/dist/mcp/http-client.js +100 -0
  73. package/dist/mcp/http-client.js.map +1 -0
  74. package/dist/mcp/index.d.ts +3 -0
  75. package/dist/mcp/index.d.ts.map +1 -0
  76. package/dist/mcp/index.js +36 -0
  77. package/dist/mcp/index.js.map +1 -0
  78. package/dist/mcp/server.d.ts +6 -0
  79. package/dist/mcp/server.d.ts.map +1 -0
  80. package/dist/mcp/server.js +32 -0
  81. package/dist/mcp/server.js.map +1 -0
  82. package/dist/mcp/tools/projects.d.ts +7 -0
  83. package/dist/mcp/tools/projects.d.ts.map +1 -0
  84. package/dist/mcp/tools/projects.js +12 -0
  85. package/dist/mcp/tools/projects.js.map +1 -0
  86. package/dist/mcp/tools/sessions.d.ts +7 -0
  87. package/dist/mcp/tools/sessions.d.ts.map +1 -0
  88. package/dist/mcp/tools/sessions.js +22 -0
  89. package/dist/mcp/tools/sessions.js.map +1 -0
  90. package/dist/mcp/tools/tasks.d.ts +7 -0
  91. package/dist/mcp/tools/tasks.d.ts.map +1 -0
  92. package/dist/mcp/tools/tasks.js +68 -0
  93. package/dist/mcp/tools/tasks.js.map +1 -0
  94. package/dist/mcp/tools/workspaces.d.ts +7 -0
  95. package/dist/mcp/tools/workspaces.d.ts.map +1 -0
  96. package/dist/mcp/tools/workspaces.js +45 -0
  97. package/dist/mcp/tools/workspaces.js.map +1 -0
  98. package/dist/mcp/types.d.ts +109 -0
  99. package/dist/mcp/types.d.ts.map +1 -0
  100. package/dist/mcp/types.js +55 -0
  101. package/dist/mcp/types.js.map +1 -0
  102. package/dist/middleware/tunnel-auth.d.ts +13 -0
  103. package/dist/middleware/tunnel-auth.d.ts.map +1 -0
  104. package/dist/middleware/tunnel-auth.js +39 -0
  105. package/dist/middleware/tunnel-auth.js.map +1 -0
  106. package/dist/output/__tests__/claude-code-parser-token.test.d.ts +2 -0
  107. package/dist/output/__tests__/claude-code-parser-token.test.d.ts.map +1 -0
  108. package/dist/output/__tests__/claude-code-parser-token.test.js +233 -0
  109. package/dist/output/__tests__/claude-code-parser-token.test.js.map +1 -0
  110. package/dist/output/__tests__/cursor-agent-parser-token.test.d.ts +2 -0
  111. package/dist/output/__tests__/cursor-agent-parser-token.test.d.ts.map +1 -0
  112. package/dist/output/__tests__/cursor-agent-parser-token.test.js +95 -0
  113. package/dist/output/__tests__/cursor-agent-parser-token.test.js.map +1 -0
  114. package/dist/output/__tests__/msg-store-token.test.d.ts +2 -0
  115. package/dist/output/__tests__/msg-store-token.test.d.ts.map +1 -0
  116. package/dist/output/__tests__/msg-store-token.test.js +38 -0
  117. package/dist/output/__tests__/msg-store-token.test.js.map +1 -0
  118. package/dist/output/claude-code-parser.d.ts +96 -0
  119. package/dist/output/claude-code-parser.d.ts.map +1 -0
  120. package/dist/output/claude-code-parser.js +498 -0
  121. package/dist/output/claude-code-parser.js.map +1 -0
  122. package/dist/output/cursor-agent-parser.d.ts +87 -0
  123. package/dist/output/cursor-agent-parser.d.ts.map +1 -0
  124. package/dist/output/cursor-agent-parser.js +476 -0
  125. package/dist/output/cursor-agent-parser.js.map +1 -0
  126. package/dist/output/index.d.ts +9 -0
  127. package/dist/output/index.d.ts.map +1 -0
  128. package/dist/output/index.js +13 -0
  129. package/dist/output/index.js.map +1 -0
  130. package/dist/output/msg-store.d.ts +110 -0
  131. package/dist/output/msg-store.d.ts.map +1 -0
  132. package/dist/output/msg-store.js +274 -0
  133. package/dist/output/msg-store.js.map +1 -0
  134. package/dist/output/types.d.ts +90 -0
  135. package/dist/output/types.d.ts.map +1 -0
  136. package/dist/output/types.js +93 -0
  137. package/dist/output/types.js.map +1 -0
  138. package/dist/output/utils/ansi.d.ts +8 -0
  139. package/dist/output/utils/ansi.d.ts.map +1 -0
  140. package/dist/output/utils/ansi.js +17 -0
  141. package/dist/output/utils/ansi.js.map +1 -0
  142. package/dist/output/utils/patch.d.ts +57 -0
  143. package/dist/output/utils/patch.d.ts.map +1 -0
  144. package/dist/output/utils/patch.js +113 -0
  145. package/dist/output/utils/patch.js.map +1 -0
  146. package/dist/pipeline/agent-pipeline.d.ts +28 -0
  147. package/dist/pipeline/agent-pipeline.d.ts.map +1 -0
  148. package/dist/pipeline/agent-pipeline.js +76 -0
  149. package/dist/pipeline/agent-pipeline.js.map +1 -0
  150. package/dist/routes/attachments.d.ts +3 -0
  151. package/dist/routes/attachments.d.ts.map +1 -0
  152. package/dist/routes/attachments.js +141 -0
  153. package/dist/routes/attachments.js.map +1 -0
  154. package/dist/routes/demo.d.ts +3 -0
  155. package/dist/routes/demo.d.ts.map +1 -0
  156. package/dist/routes/demo.js +152 -0
  157. package/dist/routes/demo.js.map +1 -0
  158. package/dist/routes/files.d.ts +3 -0
  159. package/dist/routes/files.d.ts.map +1 -0
  160. package/dist/routes/files.js +313 -0
  161. package/dist/routes/files.js.map +1 -0
  162. package/dist/routes/filesystem.d.ts +3 -0
  163. package/dist/routes/filesystem.d.ts.map +1 -0
  164. package/dist/routes/filesystem.js +126 -0
  165. package/dist/routes/filesystem.js.map +1 -0
  166. package/dist/routes/git.d.ts +3 -0
  167. package/dist/routes/git.d.ts.map +1 -0
  168. package/dist/routes/git.js +170 -0
  169. package/dist/routes/git.js.map +1 -0
  170. package/dist/routes/index.d.ts +3 -0
  171. package/dist/routes/index.d.ts.map +1 -0
  172. package/dist/routes/index.js +45 -0
  173. package/dist/routes/index.js.map +1 -0
  174. package/dist/routes/notifications.d.ts +10 -0
  175. package/dist/routes/notifications.d.ts.map +1 -0
  176. package/dist/routes/notifications.js +54 -0
  177. package/dist/routes/notifications.js.map +1 -0
  178. package/dist/routes/profiles.d.ts +12 -0
  179. package/dist/routes/profiles.d.ts.map +1 -0
  180. package/dist/routes/profiles.js +76 -0
  181. package/dist/routes/profiles.js.map +1 -0
  182. package/dist/routes/projects.d.ts +3 -0
  183. package/dist/routes/projects.d.ts.map +1 -0
  184. package/dist/routes/projects.js +94 -0
  185. package/dist/routes/projects.js.map +1 -0
  186. package/dist/routes/sessions.d.ts +12 -0
  187. package/dist/routes/sessions.d.ts.map +1 -0
  188. package/dist/routes/sessions.js +109 -0
  189. package/dist/routes/sessions.js.map +1 -0
  190. package/dist/routes/system.d.ts +3 -0
  191. package/dist/routes/system.d.ts.map +1 -0
  192. package/dist/routes/system.js +42 -0
  193. package/dist/routes/system.js.map +1 -0
  194. package/dist/routes/tasks.d.ts +3 -0
  195. package/dist/routes/tasks.d.ts.map +1 -0
  196. package/dist/routes/tasks.js +136 -0
  197. package/dist/routes/tasks.js.map +1 -0
  198. package/dist/routes/terminals.d.ts +3 -0
  199. package/dist/routes/terminals.d.ts.map +1 -0
  200. package/dist/routes/terminals.js +54 -0
  201. package/dist/routes/terminals.js.map +1 -0
  202. package/dist/routes/tunnel.d.ts +3 -0
  203. package/dist/routes/tunnel.d.ts.map +1 -0
  204. package/dist/routes/tunnel.js +36 -0
  205. package/dist/routes/tunnel.js.map +1 -0
  206. package/dist/routes/workspaces.d.ts +3 -0
  207. package/dist/routes/workspaces.d.ts.map +1 -0
  208. package/dist/routes/workspaces.js +171 -0
  209. package/dist/routes/workspaces.js.map +1 -0
  210. package/dist/services/commit-message.service.d.ts +32 -0
  211. package/dist/services/commit-message.service.d.ts.map +1 -0
  212. package/dist/services/commit-message.service.js +202 -0
  213. package/dist/services/commit-message.service.js.map +1 -0
  214. package/dist/services/notifications/feishu-channel.d.ts +9 -0
  215. package/dist/services/notifications/feishu-channel.d.ts.map +1 -0
  216. package/dist/services/notifications/feishu-channel.js +51 -0
  217. package/dist/services/notifications/feishu-channel.js.map +1 -0
  218. package/dist/services/notifications/index.d.ts +3 -0
  219. package/dist/services/notifications/index.d.ts.map +1 -0
  220. package/dist/services/notifications/index.js +2 -0
  221. package/dist/services/notifications/index.js.map +1 -0
  222. package/dist/services/notifications/notification.service.d.ts +10 -0
  223. package/dist/services/notifications/notification.service.d.ts.map +1 -0
  224. package/dist/services/notifications/notification.service.js +85 -0
  225. package/dist/services/notifications/notification.service.js.map +1 -0
  226. package/dist/services/notifications/os-channel.d.ts +8 -0
  227. package/dist/services/notifications/os-channel.d.ts.map +1 -0
  228. package/dist/services/notifications/os-channel.js +38 -0
  229. package/dist/services/notifications/os-channel.js.map +1 -0
  230. package/dist/services/notifications/types.d.ts +11 -0
  231. package/dist/services/notifications/types.d.ts.map +1 -0
  232. package/dist/services/notifications/types.js +2 -0
  233. package/dist/services/notifications/types.js.map +1 -0
  234. package/dist/services/project.service.d.ts +91 -0
  235. package/dist/services/project.service.d.ts.map +1 -0
  236. package/dist/services/project.service.js +138 -0
  237. package/dist/services/project.service.js.map +1 -0
  238. package/dist/services/session-manager.d.ts +164 -0
  239. package/dist/services/session-manager.d.ts.map +1 -0
  240. package/dist/services/session-manager.js +569 -0
  241. package/dist/services/session-manager.js.map +1 -0
  242. package/dist/services/task.service.d.ts +179 -0
  243. package/dist/services/task.service.d.ts.map +1 -0
  244. package/dist/services/task.service.js +281 -0
  245. package/dist/services/task.service.js.map +1 -0
  246. package/dist/services/terminal-manager.d.ts +64 -0
  247. package/dist/services/terminal-manager.d.ts.map +1 -0
  248. package/dist/services/terminal-manager.js +217 -0
  249. package/dist/services/terminal-manager.js.map +1 -0
  250. package/dist/services/tunnel.service.d.ts +16 -0
  251. package/dist/services/tunnel.service.d.ts.map +1 -0
  252. package/dist/services/tunnel.service.js +77 -0
  253. package/dist/services/tunnel.service.js.map +1 -0
  254. package/dist/services/workspace.service.d.ts +219 -0
  255. package/dist/services/workspace.service.d.ts.map +1 -0
  256. package/dist/services/workspace.service.js +351 -0
  257. package/dist/services/workspace.service.js.map +1 -0
  258. package/dist/socket/events.d.ts +2 -0
  259. package/dist/socket/events.d.ts.map +1 -0
  260. package/dist/socket/events.js +3 -0
  261. package/dist/socket/events.js.map +1 -0
  262. package/dist/socket/index.d.ts +20 -0
  263. package/dist/socket/index.d.ts.map +1 -0
  264. package/dist/socket/index.js +77 -0
  265. package/dist/socket/index.js.map +1 -0
  266. package/dist/socket/middleware/auth.d.ts +13 -0
  267. package/dist/socket/middleware/auth.d.ts.map +1 -0
  268. package/dist/socket/middleware/auth.js +29 -0
  269. package/dist/socket/middleware/auth.js.map +1 -0
  270. package/dist/socket/middleware/error-handler.d.ts +11 -0
  271. package/dist/socket/middleware/error-handler.d.ts.map +1 -0
  272. package/dist/socket/middleware/error-handler.js +39 -0
  273. package/dist/socket/middleware/error-handler.js.map +1 -0
  274. package/dist/socket/middleware/index.d.ts +3 -0
  275. package/dist/socket/middleware/index.d.ts.map +1 -0
  276. package/dist/socket/middleware/index.js +3 -0
  277. package/dist/socket/middleware/index.js.map +1 -0
  278. package/dist/socket/rooms.d.ts +30 -0
  279. package/dist/socket/rooms.d.ts.map +1 -0
  280. package/dist/socket/rooms.js +39 -0
  281. package/dist/socket/rooms.js.map +1 -0
  282. package/dist/socket/socket-gateway.d.ts +21 -0
  283. package/dist/socket/socket-gateway.d.ts.map +1 -0
  284. package/dist/socket/socket-gateway.js +173 -0
  285. package/dist/socket/socket-gateway.js.map +1 -0
  286. package/dist/types/index.d.ts +41 -0
  287. package/dist/types/index.d.ts.map +1 -0
  288. package/dist/types/index.js +41 -0
  289. package/dist/types/index.js.map +1 -0
  290. package/dist/utils/index.d.ts +12 -0
  291. package/dist/utils/index.d.ts.map +1 -0
  292. package/dist/utils/index.js +25 -0
  293. package/dist/utils/index.js.map +1 -0
  294. package/dist/web/assets/AgentDemoPage-WdWEQtyU.js +1 -0
  295. package/dist/web/assets/DemoPage-C4Z_ftHI.js +4 -0
  296. package/dist/web/assets/NotificationSettingsPage-FrLfgt9y.js +1 -0
  297. package/dist/web/assets/ProfileSettingsPage-Cs93rTRr.js +3 -0
  298. package/dist/web/assets/ProjectKanbanPage-BmlRVfzo.js +75 -0
  299. package/dist/web/assets/ProjectKanbanPage-G5OQeJvU.css +1 -0
  300. package/dist/web/assets/api-client-CEBkg5lt.js +1 -0
  301. package/dist/web/assets/circle-alert-BEozlsMd.js +1 -0
  302. package/dist/web/assets/code-block-OCS4YCEC-CGgYYS4A.js +2 -0
  303. package/dist/web/assets/folder-picker-BP3x3phB.js +1 -0
  304. package/dist/web/assets/index-BuAijQvi.js +13 -0
  305. package/dist/web/assets/index-CxV866Yg.css +1 -0
  306. package/dist/web/assets/loader-circle-yEIqsdJ1.js +1 -0
  307. package/dist/web/assets/mermaid-NOHMQCX5-CIqtI2jF.js +123 -0
  308. package/dist/web/assets/mermaid-NOHMQCX5-lI9o3AWT.css +1 -0
  309. package/dist/web/assets/modal-BoX2RXaV.js +1 -0
  310. package/dist/web/assets/query-keys-BD_s_Etj.js +1 -0
  311. package/dist/web/assets/use-profiles-Rh8rBsAt.js +1 -0
  312. package/dist/web/index.html +14 -0
  313. package/dist/web/vite.svg +1 -0
  314. package/node_modules/@agent-tower/shared/dist/dev-port.d.ts +12 -0
  315. package/node_modules/@agent-tower/shared/dist/dev-port.d.ts.map +1 -0
  316. package/node_modules/@agent-tower/shared/dist/dev-port.js +31 -0
  317. package/node_modules/@agent-tower/shared/dist/dev-port.js.map +1 -0
  318. package/node_modules/@agent-tower/shared/dist/index.d.ts +5 -0
  319. package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -0
  320. package/node_modules/@agent-tower/shared/dist/index.js +5 -0
  321. package/node_modules/@agent-tower/shared/dist/index.js.map +1 -0
  322. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts +72 -0
  323. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts.map +1 -0
  324. package/node_modules/@agent-tower/shared/dist/log-adapter.js +144 -0
  325. package/node_modules/@agent-tower/shared/dist/log-adapter.js.map +1 -0
  326. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +133 -0
  327. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -0
  328. package/node_modules/@agent-tower/shared/dist/socket/events.js +32 -0
  329. package/node_modules/@agent-tower/shared/dist/socket/events.js.map +1 -0
  330. package/node_modules/@agent-tower/shared/dist/socket/index.d.ts +2 -0
  331. package/node_modules/@agent-tower/shared/dist/socket/index.d.ts.map +1 -0
  332. package/node_modules/@agent-tower/shared/dist/socket/index.js +2 -0
  333. package/node_modules/@agent-tower/shared/dist/socket/index.js.map +1 -0
  334. package/node_modules/@agent-tower/shared/dist/types.d.ts +168 -0
  335. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -0
  336. package/node_modules/@agent-tower/shared/dist/types.js +53 -0
  337. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -0
  338. package/node_modules/@agent-tower/shared/package.json +38 -0
  339. package/package.json +46 -0
  340. package/prisma/schema.prisma +130 -0
  341. package/scripts/postinstall.js +120 -0
@@ -0,0 +1,123 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-CGgYYS4A.js","assets/index-BuAijQvi.js","assets/index-CxV866Yg.css","assets/api-client-CEBkg5lt.js"])))=>i.map(i=>d[i]);
2
+ import{c as Je,j as g,D as qs,r as N,_ as Vs,i as ec,g as tc,s as Vt,S as ve,C as Wt}from"./index-BuAijQvi.js";import{t as nc,b as rc,a as ic}from"./api-client-CEBkg5lt.js";const ac=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sc=Je("check",ac);const uc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ti=Je("chevron-down",uc);const oc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ir=Je("chevron-right",oc);const lc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],cc=Je("circle-dot",lc);const hc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ca=Je("circle",hc);const dc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Sx=Je("globe",dc);const fc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],wx=Je("paperclip",fc);const pc=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lx=Je("settings",pc);const mc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ox=Je("square",mc),Rx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1z",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 1a7 7 0 0 0 0 14V1z",fill:"currentColor"})]}),Dx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),g.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),Px=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Mx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),vx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M5.5 5.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]});var de;(function(e){e.Action="Action",e.Assistant="Assistant",e.Info="Info",e.Tool="Tool",e.User="User",e.Cursor="Cursor"})(de||(de={}));function gc(e){const t=e.metadata?.toolName||"Tool",n=e.metadata?.action,r=e.metadata?.status,a=n?{file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"}[n]:t;return r==="success"?`${a} ✓`:r==="failed"?`${a} ✗`:r==="pending_approval"?`${a} (待审批)`:a}function Ec(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,type:de.User,content:e.content};case"assistant_message":return{id:e.id,type:de.Assistant,content:e.content};case"next_action":return{id:e.id,type:de.Action,content:e.content};case"thinking":return{id:e.id,type:de.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,type:de.Tool,title:gc(e),content:e.content,isCollapsed:e.metadata?.status==="success"};case"error_message":return{id:e.id,type:de.Info,content:`❌ ${e.content}${e.metadata?.error?`
3
+ ${e.metadata.error}`:""}`};case"system_message":return{id:e.id,type:de.Info,content:e.content};case"loading":return{id:e.id,type:de.Cursor,content:""};case"token_usage_info":if(e.metadata?.tokenUsage){const{totalTokens:t=0,modelContextWindow:n}=e.metadata.tokenUsage;return{id:e.id,type:de.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function bc(e){return e.map(Ec).filter(t=>t!==null)}function Tc(){return{id:`cursor-${Date.now()}`,type:de.Cursor,content:""}}const ar=(function(e){if(e==null)return Ac;if(typeof e=="function")return sr(e);if(typeof e=="object")return Array.isArray(e)?xc(e):kc(e);if(typeof e=="string")return _c(e);throw new Error("Expected function, string, or object as test")});function xc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ar(e[n]);return sr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function kc(e){const t=e;return sr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function _c(e){return sr(t);function t(n){return n&&n.type===e}}function sr(e){return t;function t(n,r,i){return!!(yc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ac(){return!0}function yc(e){return e!==null&&typeof e=="object"&&"type"in e}const Ws=[],nn=!0,Yr=!1,Vn="skip";function xi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ar(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Ws,b,y,I;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=Cc(n(o,h)),p[0]===Yr))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Vn)for(y=(r?A.children.length:-1)+s,I=h.concat(A);y>-1&&y<A.children.length;){const O=A.children[y];if(b=u(O,y,I)(),b[0]===Yr)return b;y=typeof b[1]=="number"?b[1]:y+s}}return p}}}function Cc(e){return Array.isArray(e)?e:typeof e=="number"?[nn,e]:e==null?Ws:[e]}function ut(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),xi(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Nc({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Lc(e,t,n,r,i,a,s);ut(c,h)}}function ha(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 Ic(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Sc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),wc=new Set(["javascript:","data:","file:","vbscript:"]);function da(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=ha(e,n);if(!s||wc.has(s.protocol)||!(Sc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Ic(e);return s&&t.some(c=>{const h=ha(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const kr=Symbol("node-seen"),Lc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[kr])return nn;if(o.tagName==="a"){const d=da(o.properties.href,t,e,!1,!1,i);return d===null?(o[kr]=!0,ut(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Vn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",nn)}if(o.tagName==="img"){const d=da(o.properties.src,n,e,r,!0,i);return d===null?(o[kr]=!0,ut(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Vn):(o.properties.src=d,nn)}return nn};return u},Gs=-1,ur=0,sn=1,Wn=2,ki=3,_i=4,Ai=5,yi=6,Qs=7,Ks=8,fa=typeof self=="object"?self:globalThis,Oc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ur:case Gs:return n(s,i);case sn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Wn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case ki:return n(new Date(s),i);case _i:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ai:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case yi:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Qs:{const{name:u,message:o}=s;return n(new fa[u](o),i)}case Ks:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new fa[a](s),i)};return r},pa=e=>Oc(new Map,e)(0),wt="",{toString:Rc}={},{keys:Dc}=Object,Gt=e=>{const t=typeof e;if(t!=="object"||!e)return[ur,t];const n=Rc.call(e).slice(8,-1);switch(n){case"Array":return[sn,wt];case"Object":return[Wn,wt];case"Date":return[ki,wt];case"RegExp":return[_i,wt];case"Map":return[Ai,wt];case"Set":return[yi,wt];case"DataView":return[sn,n]}return n.includes("Array")?[sn,n]:n.includes("Error")?[Qs,n]:[Wn,n]},Pn=([e,t])=>e===ur&&(t==="function"||t==="symbol"),Pc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Gt(s);switch(u){case ur:{let h=s;switch(o){case"bigint":u=Ks,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([Gs],s)}return i([u,h],s)}case sn:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case Wn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Dc(s))(e||!Pn(Gt(s[f])))&&h.push([a(f),a(s[f])]);return d}case ki:return i([u,s.toISOString()],s);case _i:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ai:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Pn(Gt(f))||Pn(Gt(p))))&&h.push([a(f),a(p)]);return d}case yi:{const h=[],d=i([u,h],s);for(const f of s)(e||!Pn(Gt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ma=(e,{json:t,lossy:n}={})=>{const r=[];return Pc(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pa(ma(e,t)):structuredClone(e):(e,t)=>pa(ma(e,t));class Cn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cn.prototype.normal={};Cn.prototype.property={};Cn.prototype.space=void 0;function Xs(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Cn(n,r,t)}function bn(e){return e.toLowerCase()}class Le{constructor(t,n){this.attribute=n,this.property=t}}Le.prototype.attribute="";Le.prototype.booleanish=!1;Le.prototype.boolean=!1;Le.prototype.commaOrSpaceSeparated=!1;Le.prototype.commaSeparated=!1;Le.prototype.defined=!1;Le.prototype.mustUseProperty=!1;Le.prototype.number=!1;Le.prototype.overloadedBoolean=!1;Le.prototype.property="";Le.prototype.spaceSeparated=!1;Le.prototype.space=void 0;let Mc=0;const K=_t(),ge=_t(),qr=_t(),v=_t(),oe=_t(),Pt=_t(),Re=_t();function _t(){return 2**++Mc}const Vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:K,booleanish:ge,commaOrSpaceSeparated:Re,commaSeparated:Pt,number:v,overloadedBoolean:qr,spaceSeparated:oe},Symbol.toStringTag,{value:"Module"})),_r=Object.keys(Vr);class Ci extends Le{constructor(t,n,r,i){let a=-1;if(super(t,n),ga(this,"space",i),typeof r=="number")for(;++a<_r.length;){const s=_r[a];ga(this,_r[a],(r&Vr[s])===Vr[s])}}}Ci.prototype.defined=!0;function ga(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ci(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bn(r)]=r,n[bn(a.attribute)]=r}return new Cn(t,n,e.space)}const Zs=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:oe,ariaCurrent:null,ariaDescribedBy:oe,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:oe,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:oe,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oe,ariaLevel:v,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:oe,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:oe,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:ge,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 Js(e,t){return t in e?e[t]:t}function eu(e,t){return Js(e,t.toLowerCase())}const vc=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,acceptCharset:oe,accessKey:oe,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:oe,autoFocus:K,autoPlay:K,blocking:oe,capture:null,charSet:null,checked:K,cite:null,className:oe,cols:v,colSpan:null,content:null,contentEditable:ge,controls:K,controlsList:oe,coords:v|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:qr,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:oe,height:v,hidden:qr,high:v,href:null,hrefLang:null,htmlFor:oe,httpEquiv:oe,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:oe,itemRef:oe,itemScope:K,itemType:oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,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:K,optimum:v,pattern:null,ping:oe,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:oe,required:K,reversed:K,rows:v,rowSpan:v,sandbox:oe,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:ge,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:K,useMap:null,value:ge,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oe,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:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:ge,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:K,disableRemotePlayback:K,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:eu}),Bc=Ft({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Re,accentHeight: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:oe,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:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pt,g2:Pt,glyphName:Pt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Re,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:oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant: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:Re,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:Re,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:Re,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:Js}),tu=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),nu=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eu}),ru=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Fc={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"},Hc=/[A-Z]/g,Ea=/-[a-z]/g,Uc=/^data[-\w.:]+$/i;function or(e,t){const n=bn(t);let r=t,i=Le;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ea,zc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ea.test(a)){let s=a.replace(Hc,jc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ci}return new i(r,t)}function jc(e){return"-"+e.toLowerCase()}function zc(e){return e.charAt(1).toUpperCase()}const Nn=Xs([Zs,vc,tu,nu,ru],"html"),lt=Xs([Zs,Bc,tu,nu,ru],"svg");function ba(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function iu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ta=/[#.]/g;function $c(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Ta.lastIndex=i;const u=Ta.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function xa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function au(e){return e.join(" ").trim()}function su(e,t,n){const r=n?Wc(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=$c(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Yc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))qc(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 Yc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function qc(e,t,n,r){const i=or(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=xa(r):i.commaSeparated?a=ba(r):i.commaOrSpaceSeparated?a=xa(ba(r).join(" ")):a=ka(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Vc(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ka(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}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 ka(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bn(n)===bn(t)))return!0}return n}function Vc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Wc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Gc=["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"],Qc=su(Nn,"div"),Kc=su(lt,"g",Gc);function Xc(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=_a(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=_a(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function _a(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
4
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const mt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},uu={}.hasOwnProperty,Zc=Object.prototype;function Jc(e,t){const n=t||{};return Ni({file:n.file||void 0,location:!1,schema:n.space==="svg"?lt:Nn,verbose:n.verbose||!1},e)}function Ni(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},zn(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:ou(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Xc(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},zn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},zn(e,r,n),n}default:return n=eh(e,t),n}}function ou(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ni(e,t[n]);r.push(i)}return r}function eh(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?lt:Nn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;uu.call(Zc,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?Kc:Qc)(t.tagName,i,ou(e,t.childNodes));if(zn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Rt(o.startTag),h=o&&o.endTag&&Rt(o.endTag),d=Ni(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function zn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=th(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function th(e,t,n){const r=Rt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)uu.call(n.attrs,s)&&(a[or(e.schema,s).property]=Rt(n.attrs[s]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Rt(e){const t=Aa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Aa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Aa(e){return e.line&&e.column?e:void 0}const ya={}.hasOwnProperty;function lu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&ya.call(i,e)){const o=String(i[e]);s=ya.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const nh={},rh={}.hasOwnProperty,cu=lu("type",{handlers:{root:ah,element:ch,text:oh,comment:lh,doctype:uh}});function ih(e,t){const r=(t||nh).space;return cu(e,r==="svg"?lt:Nn)}function ah(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ii(e.children,n,t),Ht(e,n),n}function sh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ii(e.children,n,t),Ht(e,n),n}function uh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function oh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function lh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function ch(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=lt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&rh.call(e.properties,a)){const o=hh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[s],childNodes:[],parentNode:null};return u.childNodes=Ii(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=sh(e.content,r)),u}function hh(e,t,n){const r=or(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?iu(n):au(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=mt[r.space]}return i}function Ii(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=cu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ht(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const dh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],fh=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ce="�";var m;(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"})(m||(m={}));const Se={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function hu(e){return e>=55296&&e<=57343}function ph(e){return e>=56320&&e<=57343}function mh(e,t){return(e-55296)*1024+9216+t}function du(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fu(e){return e>=64976&&e<=65007||fh.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const gh=65536;class Eh{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=gh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(ph(n))return this.pos++,this._addGap(),mh(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(S.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.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,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,hu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){du(t)?this._err(S.controlCharacterInInputStream):fu(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Z;(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"})(Z||(Z={}));function pu(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 bh=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))),Th=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 xh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Th.get(e))!==null&&t!==void 0?t:e}var be;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(be||(be={}));const kh=32;var st;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(st||(st={}));function Gr(e){return e>=be.ZERO&&e<=be.NINE}function _h(e){return e>=be.UPPER_A&&e<=be.UPPER_F||e>=be.LOWER_A&&e<=be.LOWER_F}function Ah(e){return e>=be.UPPER_A&&e<=be.UPPER_Z||e>=be.LOWER_A&&e<=be.LOWER_Z||Gr(e)}function yh(e){return e===be.EQUALS||Ah(e)}var Ee;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ee||(Ee={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class Ch{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===be.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|kh)===be.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Gr(i)||_h(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===be.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(xh(this.result),this.consumed),this.errors&&(t!==be.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&st.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Nh(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(a===0||yh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&st.VALUE_LENGTH)>>14,a!==0){if(s===be.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ze.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&st.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~st.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Nh(e,t,n,r){const i=(t&st.BRANCH_LENGTH)>>7,a=t&st.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var gt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(gt||(gt={}));var Be;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Be||(Be={}));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 Ih=new Map([[C.A,l.A],[C.ADDRESS,l.ADDRESS],[C.ANNOTATION_XML,l.ANNOTATION_XML],[C.APPLET,l.APPLET],[C.AREA,l.AREA],[C.ARTICLE,l.ARTICLE],[C.ASIDE,l.ASIDE],[C.B,l.B],[C.BASE,l.BASE],[C.BASEFONT,l.BASEFONT],[C.BGSOUND,l.BGSOUND],[C.BIG,l.BIG],[C.BLOCKQUOTE,l.BLOCKQUOTE],[C.BODY,l.BODY],[C.BR,l.BR],[C.BUTTON,l.BUTTON],[C.CAPTION,l.CAPTION],[C.CENTER,l.CENTER],[C.CODE,l.CODE],[C.COL,l.COL],[C.COLGROUP,l.COLGROUP],[C.DD,l.DD],[C.DESC,l.DESC],[C.DETAILS,l.DETAILS],[C.DIALOG,l.DIALOG],[C.DIR,l.DIR],[C.DIV,l.DIV],[C.DL,l.DL],[C.DT,l.DT],[C.EM,l.EM],[C.EMBED,l.EMBED],[C.FIELDSET,l.FIELDSET],[C.FIGCAPTION,l.FIGCAPTION],[C.FIGURE,l.FIGURE],[C.FONT,l.FONT],[C.FOOTER,l.FOOTER],[C.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[C.FORM,l.FORM],[C.FRAME,l.FRAME],[C.FRAMESET,l.FRAMESET],[C.H1,l.H1],[C.H2,l.H2],[C.H3,l.H3],[C.H4,l.H4],[C.H5,l.H5],[C.H6,l.H6],[C.HEAD,l.HEAD],[C.HEADER,l.HEADER],[C.HGROUP,l.HGROUP],[C.HR,l.HR],[C.HTML,l.HTML],[C.I,l.I],[C.IMG,l.IMG],[C.IMAGE,l.IMAGE],[C.INPUT,l.INPUT],[C.IFRAME,l.IFRAME],[C.KEYGEN,l.KEYGEN],[C.LABEL,l.LABEL],[C.LI,l.LI],[C.LINK,l.LINK],[C.LISTING,l.LISTING],[C.MAIN,l.MAIN],[C.MALIGNMARK,l.MALIGNMARK],[C.MARQUEE,l.MARQUEE],[C.MATH,l.MATH],[C.MENU,l.MENU],[C.META,l.META],[C.MGLYPH,l.MGLYPH],[C.MI,l.MI],[C.MO,l.MO],[C.MN,l.MN],[C.MS,l.MS],[C.MTEXT,l.MTEXT],[C.NAV,l.NAV],[C.NOBR,l.NOBR],[C.NOFRAMES,l.NOFRAMES],[C.NOEMBED,l.NOEMBED],[C.NOSCRIPT,l.NOSCRIPT],[C.OBJECT,l.OBJECT],[C.OL,l.OL],[C.OPTGROUP,l.OPTGROUP],[C.OPTION,l.OPTION],[C.P,l.P],[C.PARAM,l.PARAM],[C.PLAINTEXT,l.PLAINTEXT],[C.PRE,l.PRE],[C.RB,l.RB],[C.RP,l.RP],[C.RT,l.RT],[C.RTC,l.RTC],[C.RUBY,l.RUBY],[C.S,l.S],[C.SCRIPT,l.SCRIPT],[C.SEARCH,l.SEARCH],[C.SECTION,l.SECTION],[C.SELECT,l.SELECT],[C.SOURCE,l.SOURCE],[C.SMALL,l.SMALL],[C.SPAN,l.SPAN],[C.STRIKE,l.STRIKE],[C.STRONG,l.STRONG],[C.STYLE,l.STYLE],[C.SUB,l.SUB],[C.SUMMARY,l.SUMMARY],[C.SUP,l.SUP],[C.TABLE,l.TABLE],[C.TBODY,l.TBODY],[C.TEMPLATE,l.TEMPLATE],[C.TEXTAREA,l.TEXTAREA],[C.TFOOT,l.TFOOT],[C.TD,l.TD],[C.TH,l.TH],[C.THEAD,l.THEAD],[C.TITLE,l.TITLE],[C.TR,l.TR],[C.TRACK,l.TRACK],[C.TT,l.TT],[C.U,l.U],[C.UL,l.UL],[C.SVG,l.SVG],[C.VAR,l.VAR],[C.WBR,l.WBR],[C.XMP,l.XMP]]);function Ut(e){var t;return(t=Ih.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const M=l,Sh={[D.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[D.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[D.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Qr=new Set([M.H1,M.H2,M.H3,M.H4,M.H5,M.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 pe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function wh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function rn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Lh(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function rt(e){return Lh(e)||rn(e)}function Ca(e){return rt(e)||wh(e)}function Mn(e){return e+32}function mu(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Na(e){return mu(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Oh(e){return e===m.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:hu(e)?S.surrogateCharacterReference:fu(e)?S.noncharacterCharacterReference:du(e)||e===m.CARRIAGE_RETURN?S.controlCharacterReference:null}class Rh{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 Eh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ch(bh,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Oh(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:Z.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Z.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Z.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Z.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(pu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ut(t.tagName),t.type===Z.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Z.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Z.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Z.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:Z.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=mu(t)?Z.WHITESPACE_CHARACTER:t===m.NULL?Z.NULL_CHARACTER:Z.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Z.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ze.Attribute:Ze.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 m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(rt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(rt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=ce;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){rt(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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.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===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){rt(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 m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.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){rt(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===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.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 m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:rt(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){rt(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(Se.SCRIPT,!1)&&Na(this.preprocessor.peek(Se.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Se.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 m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.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(Se.SCRIPT,!1)&&Na(this.preprocessor.peek(Se.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Se.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(S.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=ce;break}default:this.currentAttr.name+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Se.DASH_DASH,!0)?(this._createCommentToken(Se.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Se.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Se.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Se.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(Se.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.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 m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.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 m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=ce;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(S.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(S.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 m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(S.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 m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(rn(t))this._createDoctypeToken(String.fromCharCode(Mn(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(ce),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.name+=ce;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Se.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Se.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(S.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.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(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ca(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ca(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Ia=new Set([...gu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Gn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Dh=new Set([...Gn,l.OL,l.UL]),Ph=new Set([...Gn,l.BUTTON]),Sa=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),wa=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Mh=new Set([l.TR,l.TEMPLATE,l.HTML]),vh=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Bh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Fh=new Set([l.TD,l.TH]);class Hh{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(Fh,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(Bh,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(vh,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(Mh,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(wa.has(i))return!1;break}case D.MATHML:{if(Sa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Dh)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ph)}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(Gn.has(n))return!1;break}case D.SVG:{if(wa.has(n))return!1;break}case D.MATHML:{if(Sa.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&&gu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ia.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ia.has(this.currentTagId);)this.pop()}}const Ar=3;var Ve;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ve||(Ve={}));const La={type:Ve.Marker};class Uh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Ve.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ar)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ar)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=Ar&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(La)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ve.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ve.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(La);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ve.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ve.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ve.Element&&n.element===t)}}const it={createDocument(){return{nodeName:"#document",mode:Be.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};it.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(it.isTextNode(n)){n.value+=t;return}}it.appendChild(e,it.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&it.isTextNode(r)?r.value+=t:it.insertBefore(e,it.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}}},Eu="html",jh="about:legacy-compat",zh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",bu=["+//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//"],$h=[...bu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Yh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Tu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],qh=[...Tu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Oa(e,t){return t.some(n=>e.startsWith(n))}function Vh(e){return e.name===Eu&&e.publicId===null&&(e.systemId===null||e.systemId===jh)}function Wh(e){if(e.name!==Eu)return Be.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===zh)return Be.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Yh.has(n))return Be.QUIRKS;let r=t===null?$h:bu;if(Oa(n,r))return Be.QUIRKS;if(r=t===null?Tu:qh,Oa(n,r))return Be.LIMITED_QUIRKS}return Be.NO_QUIRKS}const Ra={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Gh="definitionurl",Qh="definitionURL",Kh=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])),Xh=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}]]),Zh=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])),Jh=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 ed(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===gt.COLOR||r===gt.SIZE||r===gt.FACE)||Jh.has(t)}function xu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Gh){e.attrs[t].name=Qh;break}}function ku(e){for(let t=0;t<e.attrs.length;t++){const n=Kh.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Si(e){for(let t=0;t<e.attrs.length;t++){const n=Xh.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 td(e){const t=Zh.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ut(e.tagName))}function nd(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function rd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===gt.ENCODING){const i=n[r].value.toLowerCase();return i===Ra.TEXT_HTML||i===Ra.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function id(e,t,n,r){return(!r||r===D.HTML)&&rd(e,t,n)||(!r||r===D.MATHML)&&nd(e,t)}const ad="hidden",sd=8,ud=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 od={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_u=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Da={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:it,onParseError:null};class Pa{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={...Da,...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 Rh(this.options,this),this.activeFormattingElements=new Uh(this.treeAdapter),this.fragmentContextID=r?Ut(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Hh(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={...Da,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:od,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=pe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===C.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=pe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=pe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=pe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=pe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(C.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===Z.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===C.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case Z.CHARACTER:{this.onCharacter(t);break}case Z.NULL_CHARACTER:{this.onNullCharacter(t);break}case Z.COMMENT:{this.onComment(t);break}case Z.DOCTYPE:{this.onDoctype(t);break}case Z.START_TAG:{this._processStartTag(t);break}case Z.END_TAG:{this.onEndTag(t);break}case Z.EOF:{this.onEof(t);break}case Z.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return id(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ve.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return _u.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 Sh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Hf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Qt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{yu(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:{Lu(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{$n(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ff(this,t);return}switch(this.insertionMode){case T.INITIAL:{Qt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{yr(this,t);break}case T.IN_COLUMN_GROUP:{Qn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{$n(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:{Kt(this,t);break}case T.AFTER_BODY:{md(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{gd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{Ed(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Uf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Qt(this,t);break}case T.BEFORE_HTML:{bd(this,t);break}case T.BEFORE_HEAD:{xd(this,t);break}case T.IN_HEAD:{Ye(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Ad(this,t);break}case T.AFTER_HEAD:{Cd(this,t);break}case T.IN_BODY:{_e(this,t);break}case T.IN_TABLE:{vt(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{_f(this,t);break}case T.IN_COLUMN_GROUP:{Oi(this,t);break}case T.IN_TABLE_BODY:{hr(this,t);break}case T.IN_ROW:{dr(this,t);break}case T.IN_CELL:{Cf(this,t);break}case T.IN_SELECT:{Du(this,t);break}case T.IN_SELECT_IN_TABLE:{If(this,t);break}case T.IN_TEMPLATE:{wf(this,t);break}case T.AFTER_BODY:{Of(this,t);break}case T.IN_FRAMESET:{Rf(this,t);break}case T.AFTER_FRAMESET:{Pf(this,t);break}case T.AFTER_AFTER_BODY:{vf(this,t);break}case T.AFTER_AFTER_FRAMESET:{Bf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?jf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Qt(this,t);break}case T.BEFORE_HTML:{Td(this,t);break}case T.BEFORE_HEAD:{kd(this,t);break}case T.IN_HEAD:{_d(this,t);break}case T.IN_HEAD_NO_SCRIPT:{yd(this,t);break}case T.AFTER_HEAD:{Nd(this,t);break}case T.IN_BODY:{cr(this,t);break}case T.TEXT:{df(this,t);break}case T.IN_TABLE:{Tn(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{Af(this,t);break}case T.IN_COLUMN_GROUP:{yf(this,t);break}case T.IN_TABLE_BODY:{Xr(this,t);break}case T.IN_ROW:{Ru(this,t);break}case T.IN_CELL:{Nf(this,t);break}case T.IN_SELECT:{Pu(this,t);break}case T.IN_SELECT_IN_TABLE:{Sf(this,t);break}case T.IN_TEMPLATE:{Lf(this,t);break}case T.AFTER_BODY:{vu(this,t);break}case T.IN_FRAMESET:{Df(this,t);break}case T.AFTER_FRAMESET:{Mf(this,t);break}case T.AFTER_AFTER_BODY:{$n(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Qt(this,t);break}case T.BEFORE_HTML:{un(this,t);break}case T.BEFORE_HEAD:{on(this,t);break}case T.IN_HEAD:{ln(this,t);break}case T.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case T.AFTER_HEAD:{hn(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Su(this,t);break}case T.TEXT:{ff(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_TEMPLATE:{Mu(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Li(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.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:{Au(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:{wu(this,t);break}}}}function ld(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):Iu(e,t),n}function cd(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 hd(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=ud;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=dd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function dd(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 fd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ut(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pd(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function wi(e,t){for(let n=0;n<sd;n++){const r=ld(e,t);if(!r)break;const i=cd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=hd(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&fd(e,s,a),pd(e,i,r)}}function Kr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function md(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gd(e,t){e._appendCommentNode(t,e.document)}function Li(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function Ed(e,t){e._setDocumentType(t);const n=t.forceQuirks?Be.QUIRKS:Wh(t);Vh(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Qt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Be.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function bd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):un(e,t)}function Td(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&un(e,t)}function un(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function xd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:on(e,t)}}function kd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?on(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function on(e,t){e._insertFakeElement(C.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Ye(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,pe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,pe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,pe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,pe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:ln(e,t)}}function _d(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{ln(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function At(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function ln(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Ad(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{Ye(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:cn(e,t)}}function yd(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{cn(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function cn(e,t){const n=t.type===Z.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Cd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),Ye(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:hn(e,t)}}function Nd(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{hn(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function hn(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,lr(e,t)}function lr(e,t){switch(t.type){case Z.CHARACTER:{yu(e,t);break}case Z.WHITESPACE_CHARACTER:{Au(e,t);break}case Z.COMMENT:{Kr(e,t);break}case Z.START_TAG:{_e(e,t);break}case Z.END_TAG:{cr(e,t);break}case Z.EOF:{Su(e,t);break}}}function Au(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Id(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Sd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wd(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 Ld(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Od(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 Rd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Dd(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 Pd(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 Md(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=pe.PLAINTEXT}function vd(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 Bd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(wi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(wi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ud(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jd(e,t){e.treeAdapter.getDocumentMode(e.document)!==Be.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Cu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Nu(e){const t=pu(e,gt.TYPE);return t!=null&&t.toLowerCase()===ad}function zd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Nu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function $d(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Yd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qd(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Cu(e,t)}function Vd(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Wd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Gd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Ma(e,t){e._switchToTextParsing(t,pe.RAWTEXT)}function Qd(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 Kd(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Xd(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Zd(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function Jd(e,t){e._reconstructActiveFormattingElements(),xu(t),Si(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function ef(e,t){e._reconstructActiveFormattingElements(),ku(t),Si(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function va(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function _e(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{Fd(e,t);break}case l.A:{Bd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Od(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:{Ld(e,t);break}case l.LI:case l.DD:case l.DT:{Pd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Cu(e,t);break}case l.HR:{Yd(e,t);break}case l.RB:case l.RTC:{Xd(e,t);break}case l.RT:case l.RP:{Zd(e,t);break}case l.PRE:case l.LISTING:{Rd(e,t);break}case l.XMP:{Wd(e,t);break}case l.SVG:{ef(e,t);break}case l.HTML:{Id(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:{Ye(e,t);break}case l.BODY:{Sd(e,t);break}case l.FORM:{Dd(e,t);break}case l.NOBR:{Hd(e,t);break}case l.MATH:{Jd(e,t);break}case l.TABLE:{jd(e,t);break}case l.INPUT:{zd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{$d(e,t);break}case l.IMAGE:{qd(e,t);break}case l.BUTTON:{vd(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Ud(e,t);break}case l.IFRAME:{Gd(e,t);break}case l.SELECT:{Qd(e,t);break}case l.OPTION:case l.OPTGROUP:{Kd(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Ma(e,t);break}case l.FRAMESET:{wd(e,t);break}case l.TEXTAREA:{Vd(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Ma(e,t):va(e,t);break}case l.PLAINTEXT:{Md(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:va(e,t)}}function tf(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 nf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,vu(e,t))}function rf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function af(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 sf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function uf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function of(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function hf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Iu(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function cr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{wi(e,t);break}case l.P:{sf(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:{rf(e,t);break}case l.LI:{uf(e);break}case l.DD:case l.DT:{of(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{lf(e);break}case l.BR:{hf(e);break}case l.BODY:{tf(e,t);break}case l.HTML:{nf(e,t);break}case l.FORM:{af(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{cf(e,t);break}case l.TEMPLATE:{At(e,t);break}default:Iu(e,t)}}function Su(e,t){e.tmplInsertionModeStack.length>0?Mu(e,t):Li(e,t)}function df(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 ff(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yr(e,t){if(e.openElements.currentTagId!==void 0&&_u.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 Z.CHARACTER:{Lu(e,t);break}case Z.WHITESPACE_CHARACTER:{wu(e,t);break}}else In(e,t)}function pf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function mf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function gf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Oi(e,t)}function Ef(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function bf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,hr(e,t)}function Tf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function xf(e,t){Nu(t)?e._appendElement(t,D.HTML):In(e,t),t.ackSelfClosing=!0}function kf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{bf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{Ye(e,t);break}case l.COL:{gf(e,t);break}case l.FORM:{kf(e,t);break}case l.TABLE:{Tf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{Ef(e,t);break}case l.INPUT:{xf(e,t);break}case l.CAPTION:{pf(e,t);break}case l.COLGROUP:{mf(e,t);break}default:In(e,t)}}function Tn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lr(e,t),e.fosterParentingEnabled=n}function wu(e,t){e.pendingCharacterTokens.push(t)}function Lu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Kt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ou=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function _f(e,t){const n=t.tagID;Ou.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,vt(e,t)):_e(e,t)}function Af(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&Tn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:cr(e,t)}}function Oi(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{Ye(e,t);break}default:Qn(e,t)}}function yf(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{At(e,t);break}case l.COL:break;default:Qn(e,t)}}function Qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function hr(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,dr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,vt(e,t));break}default:vt(e,t)}}function 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,Tn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Tn(e,t)}}function dr(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,hr(e,t));break}default:vt(e,t)}}function Ru(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:Tn(e,t)}}function Cf(e,t){const n=t.tagID;Ou.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),dr(e,t)):_e(e,t)}function Nf(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(),Ru(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:cr(e,t)}}function Du(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{Ye(e,t);break}}}function Pu(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}}}function If(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)):Du(e,t)}function Sf(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)):Pu(e,t)}function wf(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:{Ye(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,vt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Oi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,hr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,dr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,_e(e,t)}}function Lf(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function Mu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Li(e,t)}function Of(e,t){t.tagID===l.HTML?_e(e,t):Kn(e,t)}function vu(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Kn(e,t)}function Kn(e,t){e.insertionMode=T.IN_BODY,lr(e,t)}function Rf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{Ye(e,t);break}}}function Df(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 Pf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{Ye(e,t);break}}}function Mf(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function vf(e,t){t.tagID===l.HTML?_e(e,t):$n(e,t)}function $n(e,t){e.insertionMode=T.IN_BODY,lr(e,t)}function Bf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{Ye(e,t);break}}}function Ff(e,t){t.chars=ce,e._insertCharacters(t)}function Hf(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bu(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 Uf(e,t){if(ed(t))Bu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?xu(t):r===D.SVG&&(td(t),ku(t)),Si(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function jf(e,t){if(t.tagID===l.P||t.tagID===l.BR){Bu(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 fr=Fu("end"),We=Fu("start");function Fu(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 Hu(e){const t=We(e),n=fr(e);if(t&&n)return{start:t,end:n}}const zf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$f=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ba={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Uu(e,t){const n=Jf(e),r=lu("type",{handlers:{root:Yf,element:qf,text:Vf,comment:zu,doctype:Wf,raw:Qf},unknown:Kf}),i={parser:n?new Pa(Ba):Pa.getFragmentParser(void 0,Ba),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),jt(i,We());const a=n?i.parser.document:i.parser.getFragment(),s=Jc(a,{file:i.options.file});return i.stitches&&ut(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function ju(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Yf(e,t){ju(e.children,t)}function qf(e,t){Xf(e,t),ju(e.children,t),Zf(e,t)}function Vf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Z.CHARACTER,chars:e.value,location:Sn(e)};jt(t,We(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Wf(e,t){const n={type:Z.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Sn(e)};jt(t,We(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Gf(e,t){t.stitches=!0;const n=e0(e);if("children"in e&&"children"in n){const r=Uu({type:"root",children:e.children},t.options);n.children=r.children}zu({type:"comment",value:{stitch:n}},t)}function zu(e,t){const n=e.value,r={type:Z.COMMENT,data:n,location:Sn(e)};jt(t,We(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Qf(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,$u(t,We(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(zf,"&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 Kf(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Gf(n,t);else{let r="";throw $f.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function jt(e,t){$u(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=pe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function $u(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 Xf(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,We(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:mt.html;i===mt.html&&n==="svg"&&(i=mt.svg);const a=ih({...e,children:[]},{space:i===mt.svg?"svg":"html"}),s={type:Z.START_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Sn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Zf(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&dh.includes(n)||t.parser.tokenizer.state===pe.PLAINTEXT)return;jt(t,fr(e));const r={type:Z.END_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Sn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pe.RCDATA||t.parser.tokenizer.state===pe.RAWTEXT||t.parser.tokenizer.state===pe.SCRIPT_DATA)&&(t.parser.tokenizer.state=pe.DATA)}function Jf(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Sn(e){const t=We(e)||{line:void 0,column:void 0,offset:void 0},n=fr(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 e0(e){return"children"in e?bt({...e,children:[]}):bt(e)}function Zr(e){return function(t,n){return Uu(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],dn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},at={}.hasOwnProperty;function t0(e,t){let n={type:"root",children:[]};const r={schema:t?{...dn,...t}:dn,stack:[]},i=Yu(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Yu(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return n0(e,n);case"doctype":return r0(e,n);case"element":return i0(e,n);case"root":return a0(e,n);case"text":return s0(e,n)}}}function n0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return wn(a,t),a}}function r0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function i0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qu(e,t.children),i=u0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&at.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return wn(s,t),s}function a0(e,t){const r={type:"root",children:qu(e,t.children)};return wn(r,t),r}function s0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function qu(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Yu(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function u0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&at.call(r,n)?r[n]:void 0,s=r&&at.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(at.call(u,c)){const h=u[c];let d=Fa(e,Ha(a,c),c,h);d==null&&(d=Fa(e,Ha(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&at.call(i,n)){const h=i[n];for(c in h)at.call(h,c)&&!at.call(o,c)&&(o[c]=h[c])}return o}function Fa(e,t,n,r){return t?Array.isArray(r)?o0(e,t,n,r):Vu(e,t,n,r):void 0}function o0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Vu(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Vu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&l0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function l0(e,t,n){const r=e.schema.protocols&&at.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=Hu(t);t.data&&(e.data=bt(t.data)),n&&(e.position=n)}function Ha(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Wu(e){return function(t){return t0(t,e)}}function Ua(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ce=ct(/[A-Za-z]/),ke=ct(/[\dA-Za-z]/),c0=ct(/[#-'*+\--9=?A-Z^-~]/);function Xn(e){return e!==null&&(e<32||e===127)}const Jr=ct(/\d/),h0=ct(/[\dA-Fa-f]/),d0=ct(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function ue(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const pr=ct(new RegExp("\\p{P}|\\p{S}","u")),Tt=ct(/\s/);function ct(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function f0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function p0(e,t,n){const i=ar((n||{}).ignore||[]),a=m0(t);let s=-1;for(;++s<a.length;)xi(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const I=d.children.indexOf(c);let A=!1,O=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const U=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=U+1:(b!==U&&O.push({type:"text",value:c.value.slice(b,U)}),Array.isArray(w)?O.push(...w):w&&O.push(w),b=U+L[0].length,A=!0),!f.global)break;L=f.exec(c.value)}return A?(b<c.value.length&&O.push({type:"text",value:c.value.slice(b)}),d.children.splice(I,1,...O)):O=[c],I+O.length}}function m0(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([g0(i[0]),E0(i[1])])}return t}function g0(e){return typeof e=="string"?new RegExp(f0(e),"g"):e}function E0(e){return typeof e=="function"?e:function(){return e}}const Cr="phrasing",Nr=["autolink","link","image","label"];function b0(){return{transforms:[C0],enter:{literalAutolink:x0,literalAutolinkEmail:Ir,literalAutolinkHttp:Ir,literalAutolinkWww:Ir},exit:{literalAutolink:y0,literalAutolinkEmail:A0,literalAutolinkHttp:k0,literalAutolinkWww:_0}}}function T0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Nr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Nr},{character:":",before:"[ps]",after:"\\/",inConstruct:Cr,notInConstruct:Nr}]}}function x0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ir(e){this.config.enter.autolinkProtocol.call(this,e)}function k0(e){this.config.exit.autolinkProtocol.call(this,e)}function _0(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 A0(e){this.config.exit.autolinkEmail.call(this,e)}function y0(e){this.exit(e)}function C0(e){p0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,N0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),I0]],{ignore:["link","linkReference"]})}function N0(e,t,n,r,i){let a="";if(!Gu(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!S0(n)))return!1;const s=w0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function I0(e,t,n,r){return!Gu(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function S0(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 w0(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=Ua(e,"(");let a=Ua(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Gu(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tt(n)||pr(n))&&(!t||n!==47)}function $e(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Qu.peek=F0;function L0(){this.buffer()}function O0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function R0(){this.buffer()}function D0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function P0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$e(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M0(e){this.exit(e)}function v0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$e(this.sliceSerialize(e)).toLowerCase(),n.label=t}function B0(e){this.exit(e)}function F0(){return"["}function Qu(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function H0(){return{enter:{gfmFootnoteCallString:L0,gfmFootnoteCall:O0,gfmFootnoteDefinitionLabelString:R0,gfmFootnoteDefinition:D0},exit:{gfmFootnoteCallString:P0,gfmFootnoteCall:M0,gfmFootnoteDefinitionLabelString:v0,gfmFootnoteDefinition:B0}}}function U0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Qu},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
5
+ `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Ku:j0))),c(),o}}function j0(e,t,n){return t===0?e:Ku(e,t,n)}function Ku(e,t,n){return(n?"":" ")+e}const z0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xu.peek=W0;function $0(){return{canContainEols:["delete"],enter:{strikethrough:q0},exit:{strikethrough:V0}}}function Y0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:z0}],handlers:{delete:Xu}}}function q0(e){this.enter({type:"delete",children:[]},e)}function V0(e){this.exit(e)}function Xu(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function W0(){return"~"}function G0(e){return e.length}function Q0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||G0,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const y=[],I=[];let A=-1;for(e[h].length>c&&(c=e[h].length);++A<e[h].length;){const O=K0(e[h][A]);if(n.alignDelimiters!==!1){const L=i(O);I[A]=L,(o[A]===void 0||L>o[A])&&(o[A]=L)}y.push(O)}s[h]=y,u[h]=I}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=ja(r[d]);else{const y=ja(r);for(;++d<c;)a[d]=y}d=-1;const f=[],p=[];for(;++d<c;){const y=a[d];let I="",A="";y===99?(I=":",A=":"):y===108?I=":":y===114&&(A=":");let O=n.alignDelimiters===!1?1:Math.max(1,o[d]-I.length-A.length);const L=I+"-".repeat(O)+A;n.alignDelimiters!==!1&&(O=I.length+O+A.length,O>o[d]&&(o[d]=O),p[d]=O),f[d]=L}s.splice(1,0,f),u.splice(1,0,p),h=-1;const b=[];for(;++h<s.length;){const y=s[h],I=u[h];d=-1;const A=[];for(;++d<c;){const O=y[d]||"";let L="",U="";if(n.alignDelimiters!==!1){const j=o[d]-(I[d]||0),w=a[d];w===114?L=" ".repeat(j):w===99?j%2?(L=" ".repeat(j/2+.5),U=" ".repeat(j/2-.5)):(L=" ".repeat(j/2),U=L):U=" ".repeat(j)}n.delimiterStart!==!1&&!d&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||d)&&A.push(" "),n.alignDelimiters!==!1&&A.push(L),A.push(O),n.alignDelimiters!==!1&&A.push(U),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&A.push("|")}b.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return b.join(`
6
+ `)}function K0(e){return e==null?"":String(e)}function ja(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 X0(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Z0);return i(),s}function Z0(e,t,n){return">"+(n?"":" ")+e}function J0(e,t){return za(e,t.inConstruct,!0)&&!za(e,t.notInConstruct,!1)}function za(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 $a(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
7
+ `&&J0(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
8
+ `}function ep(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function tp(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 np(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function rp(e,t,n,r){const i=np(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(tp(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,ip);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(ep(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
9
+ `,encode:["`"],...u.current()})),d()}return h+=u.move(`
10
+ `),a&&(h+=u.move(a+`
11
+ `)),h+=u.move(o),c(),h}function ip(e,t,n){return(n?"":" ")+e}function Ri(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ap(e,t,n,r){const i=Ri(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
12
+ `,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function sp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bt(e){if(e===null||ue(e)||Tt(e))return 1;if(pr(e))return 2}function Zn(e,t,n){const r=Bt(e),i=Bt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Zu.peek=up;function Zu(e,t,n,r){const i=sp(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Zn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=xn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Zn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+xn(d));const p=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function up(e,t,n){return n.options.emphasis||"*"}const op={};function Di(e,t){const n=op,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ju(e,r,i)}function Ju(e,t,n){if(lp(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 Ya(e.children,t,n)}return Array.isArray(e)?Ya(e,t,n):""}function Ya(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ju(e[i],t,n);return r.join("")}function lp(e){return!!(e&&typeof e=="object")}function cp(e,t){let n=!1;return ut(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)&&Di(e)&&(t.options.setext||n))}function hp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(cp(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
13
+ `,after:`
14
+ `});return d(),h(),f+`
15
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
16
+ `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
17
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=xn(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}eo.peek=dp;function eo(e){return e.value||""}function dp(){return"<"}to.peek=fp;function to(e,t,n,r){const i=Ri(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function fp(){return"!"}no.peek=pp;function no(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function pp(){return"!"}ro.peek=mp;function ro(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function mp(){return"`"}function io(e,t){const n=Di(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ao.peek=gp;function ao(e,t,n,r){const i=Ri(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(io(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),o()),c+=s.move(")"),u(),c}function gp(e,t,n){return io(e,n)?"<":"["}so.peek=Ep;function so(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Ep(){return"["}function Pi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bp(e){const t=Pi(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Tp(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 uo(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 xp(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Tp(n):Pi(n);const u=e.ordered?s==="."?")":".":bp(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),uo(n)===s&&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&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function kp(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 _p(e,t,n,r){const i=kp(n);let a=n.bulletCurrent||Pi(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?a:a+" ".repeat(s-a.length))+d}}function Ap(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const yp=ar(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Cp(e,t,n,r){return(e.children.some(function(s){return yp(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Np(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}oo.peek=Ip;function oo(e,t,n,r){const i=Np(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Zn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=xn(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Zn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+xn(d));const p=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function Ip(e,t,n){return n.options.strong||"*"}function Sp(e,t,n,r){return n.safe(e.value,r)}function wp(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 Lp(e,t,n){const r=(uo(n)+(n.options.ruleSpaces?" ":"")).repeat(wp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const lo={blockquote:X0,break:$a,code:rp,definition:ap,emphasis:Zu,hardBreak:$a,heading:hp,html:eo,image:to,imageReference:no,inlineCode:ro,link:ao,linkReference:so,list:xp,listItem:_p,paragraph:Ap,root:Cp,strong:oo,text:Sp,thematicBreak:Lp},qa=document.createElement("i");function Mi(e){const t="&"+e+";";qa.innerHTML=t;const n=qa.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function co(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 Op=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rp(e){return e.replace(Op,Dp)}function Dp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return co(n.slice(a?2:1),a?16:10)}return Mi(n)||e}function Pp(){return{enter:{table:Mp,tableData:Va,tableHeader:Va,tableRow:Bp},exit:{codeText:Fp,table:vp,tableData:Sr,tableHeader:Sr,tableRow:Sr}}}function Mp(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 vp(e){this.exit(e),this.data.inTable=void 0}function Bp(e){this.enter({type:"tableRow",children:[]},e)}function Sr(e){this.exit(e)}function Va(e){this.enter({type:"tableCell",children:[]},e)}function Fp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hp(e,t){return t==="|"?t:e}function Up(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
18
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:u}};function s(p,b,y,I){return c(h(p,y,I),p.align)}function u(p,b,y,I){const A=d(p,y,I),O=c([A]);return O.slice(0,O.indexOf(`
19
+ `))}function o(p,b,y,I){const A=y.enter("tableCell"),O=y.enter("phrasing"),L=y.containerPhrasing(p,{...I,before:a,after:a});return O(),A(),L}function c(p,b){return Q0(p,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(p,b,y){const I=p.children;let A=-1;const O=[],L=b.enter("table");for(;++A<I.length;)O[A]=d(I[A],b,y);return L(),O}function d(p,b,y){const I=p.children;let A=-1;const O=[],L=b.enter("tableRow");for(;++A<I.length;)O[A]=o(I[A],p,b,y);return L(),O}function f(p,b,y){let I=lo.inlineCode(p,b,y);return y.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function jp(){return{exit:{taskListCheckValueChecked:Wa,taskListCheckValueUnchecked:Wa,paragraph:$p}}}function zp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Yp}}}function Wa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $p(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Yp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=lo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function qp(){return[b0(),H0(),$0(),Pp(),jp()]}function Vp(e){return{extensions:[T0(),U0(e),Y0(),Up(e),zp()]}}function Pe(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Fe(e,t){return e.length>0?(Pe(e,e.length,0,t),e):t}const Ga={}.hasOwnProperty;function ho(e){const t={};let n=-1;for(;++n<e.length;)Wp(t,e[n]);return t}function Wp(e,t){let n;for(n in t){const i=(Ga.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Ga.call(i,s)||(i[s]=[]);const u=a[s];Gp(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Gp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pe(e,0,0,r)}const Qp={tokenize:tm,partial:!0},fo={tokenize:nm,partial:!0},po={tokenize:rm,partial:!0},mo={tokenize:im,partial:!0},Kp={tokenize:am,partial:!0},go={name:"wwwAutolink",tokenize:Jp,previous:bo},Eo={name:"protocolAutolink",tokenize:em,previous:To},et={name:"emailAutolink",tokenize:Zp,previous:xo},Ge={};function Xp(){return{text:Ge}}let ft=48;for(;ft<123;)Ge[ft]=et,ft++,ft===58?ft=65:ft===91&&(ft=97);Ge[43]=et;Ge[45]=et;Ge[46]=et;Ge[95]=et;Ge[72]=[et,Eo];Ge[104]=[et,Eo];Ge[87]=[et,go];Ge[119]=[et,go];function Zp(e,t,n){const r=this;let i,a;return s;function s(d){return!ei(d)||!xo.call(r,r.previous)||vi(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(Kp,h,c)(d):d===45||d===95||ke(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Jp(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!bo.call(r,r.previous)||vi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Qp,e.attempt(fo,e.attempt(po,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function em(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&To.call(r,r.previous)&&!vi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Xn(d)||ue(d)||Tt(d)||pr(d)?n(d):e.attempt(fo,e.attempt(po,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function tm(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function nm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(mo,o,u)(c):c===null||ue(c)||Tt(c)||c!==45&&pr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function rm(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(mo,t,a)(s):s===null||ue(s)||Tt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function im(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||ue(u)||Tt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ue(u)||Tt(u)?t(u):r(u)}function a(u){return Ce(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),s):n(u)}}function am(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ke(a)?n(a):t(a)}}function bo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ue(e)}function To(e){return!Ce(e)}function xo(e){return!(e===47||ei(e))}function ei(e){return e===43||e===45||e===46||e===95||ke(e)}function vi(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function zt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&ke(e.charCodeAt(n+1))&&ke(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function mr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ti={name:"attention",resolveAll:sm,tokenize:um};function sm(e,t){let n=-1,r,i,a,s,u,o,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Qa(d,-o),Qa(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Fe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Fe(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Fe(c,mr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Fe(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Fe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Pe(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function um(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Bt(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!f)),c._close=!!(a===42?f:f&&(h||!d)),t(o)}}function Qa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const om={name:"autolink",tokenize:lm};function lm(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Ce(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||ke(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||ke(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Xn(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):c0(p)?(e.consume(p),c):n(p)}function h(p){return ke(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||ke(p))&&r++<63){const b=p===45?f:d;return e.consume(p),b}return n(p)}}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return J(o)?(e.enter(n),u(o)):t(o)}function u(o){return J(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Ln={partial:!0,tokenize:cm};function cm(e,t,n){return r;function r(a){return J(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const ko={continuation:{tokenize:dm},exit:fm,name:"blockQuote",tokenize:hm};function hm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return J(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function dm(e,t,n){const r=this;return i;function i(s){return J(s)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(ko,t,n)(s)}}function fm(e){e.exit("blockQuote")}const _o={name:"characterEscape",tokenize:pm};function pm(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return d0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ao={name:"characterReference",tokenize:mm};function mm(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=ke,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=h0,h):(e.enter("characterReferenceValue"),a=7,s=Jr,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===ke&&!Mi(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const Ka={partial:!0,tokenize:Em},Xa={concrete:!0,name:"codeFenced",tokenize:gm};function gm(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),J(w)?ne(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Ka,y,U)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):J(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,p,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),f)}function p(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),b)}function y(w){return e.attempt(i,U,I)(w)}function I(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),A}function A(w){return a>0&&J(w)?ne(e,O,"linePrefix",a+1)(w):O(w)}function O(w){return w===null||Y(w)?e.check(Ka,y,U)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||Y(w)?(e.exit("codeFlowValue"),O(w)):(e.consume(w),L)}function U(w){return e.exit("codeFenced"),t(w)}function j(w,V,q){let Q=0;return _;function _(B){return w.enter("lineEnding"),w.consume(B),w.exit("lineEnding"),F}function F(B){return w.enter("codeFencedFence"),J(B)?ne(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):P(B)}function P(B){return B===u?(w.enter("codeFencedFenceSequence"),$(B)):q(B)}function $(B){return B===u?(Q++,w.consume(B),$):Q>=s?(w.exit("codeFencedFenceSequence"),J(B)?ne(w,z,"whitespace")(B):z(B)):q(B)}function z(B){return B===null||Y(B)?(w.exit("codeFencedFence"),V(B)):q(B)}}}function Em(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const wr={name:"codeIndented",tokenize:Tm},bm={partial:!0,tokenize:xm};function Tm(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):Y(c)?e.attempt(bm,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function xm(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const km={name:"codeText",previous:Am,resolve:_m,tokenize:ym};function _m(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 Am(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ym(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class Cm{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xt(this.left,n.reverse())}}}function Xt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function yo(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new Cm(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Nm(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Pe(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Nm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],c={};let h,d,f=-1,p=n,b=0,y=0;const I=[y];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(y=f+1,I.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):I.pop(),f=I.length;f--;){const A=u.slice(I[f],I[f+1]),O=a.pop();o.push([O,O+A.length-1]),e.splice(O,2,A)}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 Im={resolve:wm,tokenize:Lm},Sm={partial:!0,tokenize:Om};function wm(e){return yo(e),e}function Lm(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Y(u)?e.check(Sm,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Om(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Co(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(A){return A===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(A),e.exit(a),f):A===null||A===32||A===41||Xn(A)?n(A):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),y(A))}function f(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===62?(e.exit("chunkString"),e.exit(u),f(A)):A===null||A===60||Y(A)?n(A):(e.consume(A),A===92?b:p)}function b(A){return A===60||A===62||A===92?(e.consume(A),p):p(A)}function y(A){return!h&&(A===null||A===41||ue(A))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(A)):h<c&&A===40?(e.consume(A),h++,y):A===41?(e.consume(A),h--,y):A===null||A===32||A===40||Xn(A)?n(A):(e.consume(A),A===92?I:y)}function I(A){return A===40||A===41||A===92?(e.consume(A),y):y(A)}}function No(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Y(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!J(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function Io(e,t,n,r,i,a){let s;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),o(s)):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===s||f===null||Y(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===s||f===92?(e.consume(f),h):h(f)}}function fn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Rm={name:"definition",tokenize:Pm},Dm={partial:!0,tokenize:Mm};function Pm(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return No.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=$e(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return ue(p)?fn(e,c)(p):c(p)}function c(p){return Co(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Dm,d,d)(p)}function d(p){return J(p)?ne(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Mm(e,t,n){return r;function r(u){return ue(u)?fn(e,i)(u):n(u)}function i(u){return Io(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return J(u)?ne(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Y(u)?t(u):n(u)}}const vm={name:"hardBreakEscape",tokenize:Bm};function Bm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Fm={name:"headingAtx",resolve:Hm,tokenize:Um};function Hm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Um(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||ue(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)):J(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||ue(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const jm=["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"],Za=["pre","script","style","textarea"],zm={concrete:!0,name:"htmlFlow",resolveTo:qm,tokenize:Vm},$m={partial:!0,tokenize:Gm},Ym={partial:!0,tokenize:Wm};function qm(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 Vm(e,t,n){const r=this;let i,a,s,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),a=!0,y):k===63?(e.consume(k),i=3,r.interrupt?t:x):Ce(k)?(e.consume(k),s=String.fromCharCode(k),I):n(k)}function f(k){return k===45?(e.consume(k),i=2,p):k===91?(e.consume(k),i=5,u=0,b):Ce(k)?(e.consume(k),i=4,r.interrupt?t:x):n(k)}function p(k){return k===45?(e.consume(k),r.interrupt?t:x):n(k)}function b(k){const Te="CDATA[";return k===Te.charCodeAt(u++)?(e.consume(k),u===Te.length?r.interrupt?t:P:b):n(k)}function y(k){return Ce(k)?(e.consume(k),s=String.fromCharCode(k),I):n(k)}function I(k){if(k===null||k===47||k===62||ue(k)){const Te=k===47,Me=s.toLowerCase();return!Te&&!a&&Za.includes(Me)?(i=1,r.interrupt?t(k):P(k)):jm.includes(s.toLowerCase())?(i=6,Te?(e.consume(k),A):r.interrupt?t(k):P(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?O(k):L(k))}return k===45||ke(k)?(e.consume(k),s+=String.fromCharCode(k),I):n(k)}function A(k){return k===62?(e.consume(k),r.interrupt?t:P):n(k)}function O(k){return J(k)?(e.consume(k),O):_(k)}function L(k){return k===47?(e.consume(k),_):k===58||k===95||Ce(k)?(e.consume(k),U):J(k)?(e.consume(k),L):_(k)}function U(k){return k===45||k===46||k===58||k===95||ke(k)?(e.consume(k),U):j(k)}function j(k){return k===61?(e.consume(k),w):J(k)?(e.consume(k),j):L(k)}function w(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,V):J(k)?(e.consume(k),w):q(k)}function V(k){return k===o?(e.consume(k),o=null,Q):k===null||Y(k)?n(k):(e.consume(k),V)}function q(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ue(k)?j(k):(e.consume(k),q)}function Q(k){return k===47||k===62||J(k)?L(k):n(k)}function _(k){return k===62?(e.consume(k),F):n(k)}function F(k){return k===null||Y(k)?P(k):J(k)?(e.consume(k),F):n(k)}function P(k){return k===45&&i===2?(e.consume(k),te):k===60&&i===1?(e.consume(k),le):k===62&&i===4?(e.consume(k),X):k===63&&i===3?(e.consume(k),x):k===93&&i===5?(e.consume(k),ie):Y(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($m,Ie,$)(k)):k===null||Y(k)?(e.exit("htmlFlowData"),$(k)):(e.consume(k),P)}function $(k){return e.check(Ym,z,Ie)(k)}function z(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),B}function B(k){return k===null||Y(k)?$(k):(e.enter("htmlFlowData"),P(k))}function te(k){return k===45?(e.consume(k),x):P(k)}function le(k){return k===47?(e.consume(k),s="",xe):P(k)}function xe(k){if(k===62){const Te=s.toLowerCase();return Za.includes(Te)?(e.consume(k),X):P(k)}return Ce(k)&&s.length<8?(e.consume(k),s+=String.fromCharCode(k),xe):P(k)}function ie(k){return k===93?(e.consume(k),x):P(k)}function x(k){return k===62?(e.consume(k),X):k===45&&i===2?(e.consume(k),x):P(k)}function X(k){return k===null||Y(k)?(e.exit("htmlFlowData"),Ie(k)):(e.consume(k),X)}function Ie(k){return e.exit("htmlFlow"),t(k)}}function Wm(e,t,n){const r=this;return i;function i(s){return Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Gm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ln,t,n)}}const Qm={name:"htmlText",tokenize:Km};function Km(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):Ce(x)?(e.consume(x),q):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,b):Ce(x)?(e.consume(x),O):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):Y(x)?(s=d,le(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?te(x):x===45?f(x):d(x)}function b(x){const X="CDATA[";return x===X.charCodeAt(a++)?(e.consume(x),a===X.length?y:b):n(x)}function y(x){return x===null?n(x):x===93?(e.consume(x),I):Y(x)?(s=y,le(x)):(e.consume(x),y)}function I(x){return x===93?(e.consume(x),A):y(x)}function A(x){return x===62?te(x):x===93?(e.consume(x),A):y(x)}function O(x){return x===null||x===62?te(x):Y(x)?(s=O,le(x)):(e.consume(x),O)}function L(x){return x===null?n(x):x===63?(e.consume(x),U):Y(x)?(s=L,le(x)):(e.consume(x),L)}function U(x){return x===62?te(x):L(x)}function j(x){return Ce(x)?(e.consume(x),w):n(x)}function w(x){return x===45||ke(x)?(e.consume(x),w):V(x)}function V(x){return Y(x)?(s=V,le(x)):J(x)?(e.consume(x),V):te(x)}function q(x){return x===45||ke(x)?(e.consume(x),q):x===47||x===62||ue(x)?Q(x):n(x)}function Q(x){return x===47?(e.consume(x),te):x===58||x===95||Ce(x)?(e.consume(x),_):Y(x)?(s=Q,le(x)):J(x)?(e.consume(x),Q):te(x)}function _(x){return x===45||x===46||x===58||x===95||ke(x)?(e.consume(x),_):F(x)}function F(x){return x===61?(e.consume(x),P):Y(x)?(s=F,le(x)):J(x)?(e.consume(x),F):Q(x)}function P(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Y(x)?(s=P,le(x)):J(x)?(e.consume(x),P):(e.consume(x),z)}function $(x){return x===i?(e.consume(x),i=void 0,B):x===null?n(x):Y(x)?(s=$,le(x)):(e.consume(x),$)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ue(x)?Q(x):(e.consume(x),z)}function B(x){return x===47||x===62||ue(x)?Q(x):n(x)}function te(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function le(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),xe}function xe(x){return J(x)?ne(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ie(x)}function ie(x){return e.enter("htmlTextData"),s(x)}}const Bi={name:"labelEnd",resolveAll:e1,resolveTo:t1,tokenize:n1},Xm={tokenize:r1},Zm={tokenize:i1},Jm={tokenize:a1};function e1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Pe(e,0,e.length,n),e}function t1(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Fe(u,e.slice(a+1,a+r+3)),u=Fe(u,[["enter",h,t]]),u=Fe(u,mr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Fe(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=Fe(u,e.slice(s+1)),u=Fe(u,[["exit",o,t]]),Pe(e,a,e.length,u),e}function n1(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(f){return a?a._inactive?d(f):(s=r.parser.defined.includes($e(r.sliceSerialize({start:a.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(Xm,h,s?h:d)(f):f===91?e.attempt(Zm,h,s?c:d)(f):s?h(f):d(f)}function c(f){return e.attempt(Jm,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function r1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ue(d)?fn(e,a)(d):a(d)}function a(d){return d===41?h(d):Co(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ue(d)?fn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Io(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return ue(d)?fn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function i1(e,t,n){const r=this;return i;function i(u){return No.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes($e(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function a1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const s1={name:"labelStartImage",resolveAll:Bi.resolveAll,tokenize:u1};function u1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const o1={name:"labelStartLink",resolveAll:Bi.resolveAll,tokenize:l1};function l1(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Lr={name:"lineEnding",tokenize:c1};function c1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const Yn={name:"thematicBreak",tokenize:h1};function h1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),J(c)?ne(e,u,"whitespace")(c):u(c))}}const we={continuation:{tokenize:m1},exit:E1,name:"list",tokenize:p1},d1={partial:!0,tokenize:b1},f1={partial:!0,tokenize:g1};function p1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Jr(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Yn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Jr(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ln,r.interrupt?n:h,e.attempt(d1,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function m1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ln,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!J(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(f1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(we,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function g1(e,t,n){const r=this;return ne(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function E1(e){e.exit(this.containerState.type)}function b1(e,t,n){const r=this;return ne(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!J(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ja={name:"setextUnderline",resolveTo:T1,tokenize:x1};function T1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function x1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),J(c)?ne(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const k1={tokenize:w1,partial:!0};function _1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:N1,continuation:{tokenize:I1},exit:S1}},text:{91:{name:"gfmFootnoteCall",tokenize:C1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:A1,resolveTo:y1}}}}function A1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=$e(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function y1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function C1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||ue(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes($e(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ue(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function N1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=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(s>999||b===93&&!u||b===null||b===91||ue(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=$e(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ue(b)||(u=!0),s++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function I1(e,t,n){return e.check(Ln,t,e.attempt(k1,t,n))}function S1(e){e.exit("gfmFootnoteDefinition")}function w1(e,t,n){const r=this;return ne(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function L1(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&Pe(f,f.length,0,mr(p,s.slice(c+1,o),u)),Pe(f,f.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Pe(s,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const y=Bt(c);if(b===126)return d>1?o(b):(s.consume(b),d++,p);if(d<2&&!n)return o(b);const I=s.exit("strikethroughSequenceTemporary"),A=Bt(b);return I._open=!A||A===2&&!!y,I._close=!y||y===2&&!!A,u(b)}}}class O1{constructor(){this.map=[]}add(t,n,r){R1(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function R1(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 D1(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function P1(){return{flow:{null:{name:"table",tokenize:M1,resolveAll:v1}}}}function M1(e,t,n){const r=this;let i=0,a=0,s;return u;function u(_){let F=r.events.length-1;for(;F>-1;){const z=r.events[F][1].type;if(z==="lineEnding"||z==="linePrefix")F--;else break}const P=F>-1?r.events[F][1].type:null,$=P==="tableHead"||P==="tableRow"?w:o;return $===w&&r.parser.lazy[r.now().line]?n(_):$(_)}function o(_){return e.enter("tableHead"),e.enter("tableRow"),c(_)}function c(_){return _===124||(s=!0,a+=1),h(_)}function h(_){return _===null?n(_):Y(_)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),p):n(_):J(_)?ne(e,h,"whitespace")(_):(a+=1,s&&(s=!1,i+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(_)))}function d(_){return _===null||_===124||ue(_)?(e.exit("data"),h(_)):(e.consume(_),_===92?f:d)}function f(_){return _===92||_===124?(e.consume(_),d):d(_)}function p(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(_):(e.enter("tableDelimiterRow"),s=!1,J(_)?ne(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):b(_))}function b(_){return _===45||_===58?I(_):_===124?(s=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),y):j(_)}function y(_){return J(_)?ne(e,I,"whitespace")(_):I(_)}function I(_){return _===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),A):_===45?(a+=1,A(_)):_===null||Y(_)?U(_):j(_)}function A(_){return _===45?(e.enter("tableDelimiterFiller"),O(_)):j(_)}function O(_){return _===45?(e.consume(_),O):_===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(_))}function L(_){return J(_)?ne(e,U,"whitespace")(_):U(_)}function U(_){return _===124?b(_):_===null||Y(_)?!s||i!==a?j(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):j(_)}function j(_){return n(_)}function w(_){return e.enter("tableRow"),V(_)}function V(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),V):_===null||Y(_)?(e.exit("tableRow"),t(_)):J(_)?ne(e,V,"whitespace")(_):(e.enter("data"),q(_))}function q(_){return _===null||_===124||ue(_)?(e.exit("data"),V(_)):(e.consume(_),_===92?Q:q)}function Q(_){return _===92||_===124?(e.consume(_),q):q(_)}}function v1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const f=new O1;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(es(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,a=[0,0,0,0],s=[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,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=vn(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=vn(f,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=vn(f,t,a,i,n,d)):s[1]!==0&&(d=vn(f,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&es(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=D1(t.events,n))}return e}function vn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Ot(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Ot(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ot(t.events,n[2]),h=Ot(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,y=n[3]-n[2]-1;e.add(b,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Ot(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function es(e,t,n,r,i){const a=[],s=Ot(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ot(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const B1={name:"tasklistCheck",tokenize:H1};function F1(){return{text:{91:B1}}}function H1(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return ue(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Y(o)?t(o):J(o)?e.check({tokenize:U1},t,n)(o):n(o)}}function U1(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function j1(e){return ho([Xp(),_1(),L1(e),P1(),F1()])}const z1={};function $1(e){const t=this,n=e||z1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(j1(n)),a.push(qp()),s.push(Vp(n))}var Y1=Object.defineProperty,q1=Object.defineProperties,V1=Object.getOwnPropertyDescriptors,ts=Object.getOwnPropertySymbols,W1=Object.prototype.hasOwnProperty,G1=Object.prototype.propertyIsEnumerable,ns=(e,t,n)=>t in e?Y1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,So=(e,t)=>{for(var n in t||(t={}))W1.call(t,n)&&ns(e,n,t[n]);if(ts)for(var n of ts(t))G1.call(t,n)&&ns(e,n,t[n]);return e},wo=(e,t)=>q1(e,V1(t)),Q1=/(\*\*)([^*]*\*?)$/,K1=/(__)([^_]*?)$/,X1=/(\*\*\*)([^*]*?)$/,Z1=/(\*)([^*]*?)$/,J1=/(_)([^_]*?)$/,eg=/(`)([^`]*?)$/,tg=/(~~)([^~]*?)$/,yt=/^[\s_~*`]*$/,Lo=/^[\s]*[-*+][\s]+$/,ng=/[\p{L}\p{N}_]/u,rg=/^```[^`\n]*```?$/,ig=/^\*{4,}$/,ag=/(__)([^_]+)_$/,sg=/(~~)([^~]+)~$/,ug=/__/g,rs=/~~/g,ot=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:ng.test(e)},xt=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},og=(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},Oo=(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},gr=(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},lg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
20
+ `)return!1}return!1},Ro=(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]==="]"?lg(e,t):!1;if(e[n]===`
21
+ `)return!1}return!1},Fi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
22
+ `){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
23
+ `){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},cg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,hg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(cg,(t,n,r,i)=>xt(e,i)?t:`${n}\\>${r}`),dg=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
24
+ `){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},fg=(e,t,n,r)=>n==="\\"||e.includes("$")&&gr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ot(n)&&ot(r)||(!n||n===" "||n===" "||n===`
25
+ `)&&(!r||r===" "||r===" "||r===`
26
+ `)||dg(e,t,r)),Do=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";fg(e,r,i,a)||(t+=1)}return t},pg=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&gr(e,t)||Ro(e,t)||n==="_"||r==="_"||n&&r&&ot(n)&&ot(r)),mg=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";pg(e,r,i,a)||(t+=1)}return t},gg=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},Eg=(e,t,n)=>{if(!t||yt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
27
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return Lo.test(a)&&t.includes(`
28
+ `)?!0:Fi(e,n,"*")},bg=e=>{let t=e.match(Q1);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Eg(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Tg=(e,t,n)=>{if(!t||yt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
29
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return Lo.test(a)&&t.includes(`
30
+ `)?!0:Fi(e,n,"_")},xg=e=>{let t=e.match(K1);if(!t){let i=e.match(ag);if(i){let a=e.lastIndexOf(i[1]);if(!xt(e,a)&&(e.match(ug)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return xt(e,r)||Tg(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},kg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!gr(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
31
+ `)&&(!r||r===" "||r===" "||r===`
32
+ `)||n&&r&&ot(n)&&ot(r))continue;return t}return-1},_g=e=>{if(!e.match(Z1))return e;let t=kg(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);return!n||yt.test(n)?e:Do(e)%2===1?`${e}*`:e},Po=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!gr(e,t)&&!Ro(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ot(n)&&ot(r))continue;return t}return-1},Ag=e=>{let t=e.length;for(;t>0&&e[t-1]===`
33
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},yg=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=Po(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Cg=e=>{if(!e.match(J1))return e;let t=Po(e);if(t===-1||xt(e,t))return e;let n=e.substring(t+1);if(!n||yt.test(n))return e;if(mg(e)%2===1){let r=yg(e);return r!==null?r:Ag(e)}return e},Ng=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Do(e);return t%2===0&&n%2===0},Ig=(e,t,n)=>!t||yt.test(t)||xt(e,n)?!0:Fi(e,n,"*"),Sg=e=>{if(ig.test(e))return e;let t=e.match(X1);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ig(e,n,r)?e:gg(e)%2===1?Ng(e)?e:`${e}***`:e},kn=(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},wg=(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},Lg=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!wg(e,n)&&(t+=1);return t},Og=/<[a-zA-Z/][^>]*$/,Rg=e=>{let t=e.match(Og);return!t||t.index===void 0||kn(e,t.index)?e:e.substring(0,t.index).trimEnd()},Dg=e=>!e.match(rg)||e.includes(`
34
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Pg=e=>(e.match(/```/g)||[]).length%2===1,Mg=e=>{let t=Dg(e);if(t!==null)return t;let n=e.match(eg);if(n&&!Pg(e)){let r=n[2];if(!r||yt.test(r))return e;if(Lg(e)%2===1)return`${e}\``}return e},vg=(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)==="```",Bg=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!vg(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Fg=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
35
+ `,t)!==-1&&!e.endsWith(`
36
+ `)?`${e}
37
+ $$`:`${e}$$`},Hg=e=>Bg(e)%2===0?e:Fg(e),Ug=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=og(e,t);if(r===-1||kn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},is=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!kn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Oo(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},jg=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=is(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(Oo(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=is(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${s}${o}`}return`${e}](streamdown:incomplete-link)`}return null},Mo=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!kn(e,n)){let r=Ug(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!kn(e,r)){let i=jg(e,r,t);if(i!==null)return i}return e},zg=/^-{1,2}$/,$g=/^[\s]*-{1,2}[\s]+$/,Yg=/^={1,2}$/,qg=/^[\s]*={1,2}[\s]+$/,Vg=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
38
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(zg.test(i)&&!n.match($g)){let a=r.split(`
39
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(Yg.test(i)&&!n.match(qg)){let a=r.split(`
40
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Wg=e=>{let t=e.match(tg);if(t){let n=t[2];if(!n||yt.test(n))return e;if((e.match(rs)||[]).length%2===1)return`${e}~~`}else if(e.match(sg)&&(e.match(rs)||[]).length%2===1)return`${e}~`;return e},Or=e=>e!==!1,ye={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},Gg=[{handler:{name:"comparisonOperators",handle:hg,priority:ye.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Rg,priority:ye.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Vg,priority:ye.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Mo,priority:ye.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Sg,priority:ye.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:bg,priority:ye.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:xg,priority:ye.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:_g,priority:ye.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Cg,priority:ye.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Mg,priority:ye.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Wg,priority:ye.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Hg,priority:ye.KATEX},optionKey:"katex"}],Qg=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return Gg.filter(({handler:r,optionKey:i})=>r.name==="links"?Or(e?.links)||Or(e?.images):Or(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:wo(So({},r),{handle:a=>Mo(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Kg=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Qg(t),a=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:wo(So({},u),{priority:(o=u.priority)!=null?o:ye.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:ye.DEFAULT)-((h=o.handler.priority)!=null?h:ye.DEFAULT)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},Xg=Kg;const Zg=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jg=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eE={};function as(e,t){return(eE.jsx?Jg:Zg).test(e)}const tE=/[ \t\n\f\r]/g;function nE(e){return typeof e=="object"?e.type==="text"?ss(e.value):!1:ss(e)}function ss(e){return e.replace(tE,"")===""}var Lt={},Rr,us;function rE(){if(us)return Rr;us=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
41
+ `,c="/",h="*",d="",f="comment",p="declaration";function b(I,A){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];A=A||{};var O=1,L=1;function U(z){var B=z.match(t);B&&(O+=B.length);var te=z.lastIndexOf(o);L=~te?z.length-te:L+z.length}function j(){var z={line:O,column:L};return function(B){return B.position=new w(z),Q(),B}}function w(z){this.start=z,this.end={line:O,column:L},this.source=A.source}w.prototype.content=I;function V(z){var B=new Error(A.source+":"+O+":"+L+": "+z);if(B.reason=z,B.filename=A.source,B.line=O,B.column=L,B.source=I,!A.silent)throw B}function q(z){var B=z.exec(I);if(B){var te=B[0];return U(te),I=I.slice(te.length),B}}function Q(){q(n)}function _(z){var B;for(z=z||[];B=F();)B!==!1&&z.push(B);return z}function F(){var z=j();if(!(c!=I.charAt(0)||h!=I.charAt(1))){for(var B=2;d!=I.charAt(B)&&(h!=I.charAt(B)||c!=I.charAt(B+1));)++B;if(B+=2,d===I.charAt(B-1))return V("End of comment missing");var te=I.slice(2,B-2);return L+=2,U(te),I=I.slice(B),L+=2,z({type:f,comment:te})}}function P(){var z=j(),B=q(r);if(B){if(F(),!q(i))return V("property missing ':'");var te=q(a),le=z({type:p,property:y(B[0].replace(e,d)),value:te?y(te[0].replace(e,d)):d});return q(s),le}}function $(){var z=[];_(z);for(var B;B=P();)B!==!1&&(z.push(B),_(z));return z}return Q(),$()}function y(I){return I?I.replace(u,d):d}return Rr=b,Rr}var os;function iE(){if(os)return Lt;os=1;var e=Lt&&Lt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=n;const t=e(rE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return Lt}var Zt={},ls;function aE(){if(ls)return Zt;ls=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Zt.camelCase=o,Zt}var Jt,cs;function sE(){if(cs)return Jt;cs=1;var e=Jt&&Jt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(iE()),n=aE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Jt=r,Jt}var uE=sE();const oE=qs(uE);function pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hs(e.position):"start"in e||"end"in e?hs(e):"line"in e||"column"in e?ni(e):""}function ni(e){return ds(e&&e.line)+":"+ds(e&&e.column)}function hs(e){return ni(e&&e.start)+"-"+ni(e&&e.end)}function ds(e){return e&&typeof e=="number"?e:1}class Ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=pn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const Hi={}.hasOwnProperty,lE=new Map,cE=/[A-Z]/g,hE=new Set(["table","tbody","thead","tfoot","tr"]),dE=new Set(["td","th"]),vo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fE(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=kE(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=xE(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"?lt:Nn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Bo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Bo(e,t,n){if(t.type==="element")return pE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EE(e,t,n);if(t.type==="mdxjsEsm")return gE(e,t);if(t.type==="root")return bE(e,t,n);if(t.type==="text")return TE(e,t)}function pE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=lt,e.schema=i),e.ancestors.push(t);const a=Ho(e,t.tagName,!1),s=_E(e,t);let u=ji(e,t);return hE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!nE(o):!0})),Fo(e,s,a,t),Ui(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function mE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}_n(e,t.position)}function gE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_n(e,t.position)}function EE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=lt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Ho(e,t.name,!0),s=AE(e,t),u=ji(e,t);return Fo(e,s,a,t),Ui(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function bE(e,t,n){const r={};return Ui(r,ji(e,t)),e.create(t,e.Fragment,r,n)}function TE(e,t){return t.value}function Fo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ui(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function kE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=We(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function _E(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Hi.call(t.properties,i)){const a=yE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&dE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function AE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else _n(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else _n(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ji(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:lE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=Bo(e,a,s);u!==void 0&&n.push(u)}return n}function yE(e,t,n){const r=or(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?iu(n):au(n)),r.property==="style"){let i=typeof n=="object"?n:CE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=NE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Fc[r.property]||r.property:r.attribute,n]}}function CE(e,t){try{return oE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=vo+"#cannot-parse-style-attribute",i}}function Ho(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=as(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=as(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Hi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);_n(e)}function _n(e,t){const n=new Ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=vo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function NE(e){const t={};let n;for(n in e)Hi.call(e,n)&&(t[IE(n)]=e[n]);return t}function IE(e){let t=e.replace(cE,SE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function SE(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"]},wE={tokenize:LE};function LE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Y(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const OE={tokenize:RE},fs={tokenize:DE};function RE(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();const U=t.events.length;let j=U,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}A(r);let V=U;for(;V<t.events.length;)t.events[V][1].end={...w},V++;return Pe(t.events,j+1,0,t.events.slice(U)),t.events.length=V,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return f(L);if(i.currentConstruct&&i.currentConstruct.concrete)return b(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fs,h,d)(L)}function h(L){return i&&O(),A(r),f(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(L)}function f(L){return t.containerState={},e.attempt(fs,p,b)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),f(L)}function b(L){if(L===null){i&&O(),A(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(L)}function y(L){if(L===null){I(e.exit("chunkFlow"),!0),A(0),e.consume(L);return}return Y(L)?(e.consume(L),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),y)}function I(L,U){const j=t.sliceStream(L);if(U&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const V=t.events.length;let q=V,Q,_;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(Q){_=t.events[q][1].end;break}Q=!0}for(A(r),w=V;w<t.events.length;)t.events[w][1].end={..._},w++;Pe(t.events,q+1,0,t.events.slice(V)),t.events.length=w}}function A(L){let U=n.length;for(;U-- >L;){const j=n[U];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function O(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function DE(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 PE={tokenize:ME};function ME(e){const t=this,n=e.attempt(Ln,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Im,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const vE={resolveAll:jo()},BE=Uo("string"),FE=Uo("text");function Uo(e){return{resolveAll:jo(e==="text"?HE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function jo(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function HE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const UE={42:we,43:we,45:we,48:we,49:we,50:we,51:we,52:we,53:we,54:we,55:we,56:we,57:we,62:ko},jE={91:Rm},zE={[-2]:wr,[-1]:wr,32:wr},$E={35:Fm,42:Yn,45:[Ja,Yn],60:zm,61:Ja,95:Yn,96:Xa,126:Xa},YE={38:Ao,92:_o},qE={[-5]:Lr,[-4]:Lr,[-3]:Lr,33:s1,38:Ao,42:ti,60:[om,Qm],91:o1,92:[vm,_o],93:Bi,95:ti,96:km},VE={null:[ti,vE]},WE={null:[42,95]},GE={null:[]},QE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:WE,contentInitial:jE,disable:GE,document:UE,flow:$E,flowInitial:zE,insideSpan:VE,string:YE,text:qE},Symbol.toStringTag,{value:"Module"}));function KE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:V(j),check:V(w),consume:O,enter:L,exit:U,interrupt:V(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:b,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(F){return s=Fe(s,F),I(),s[s.length-1]!==null?[]:(q(t,0),c.events=mr(a,c.events,c),c.events)}function f(F,P){return ZE(p(F),P)}function p(F){return XE(s,F)}function b(){const{_bufferIndex:F,_index:P,line:$,column:z,offset:B}=r;return{_bufferIndex:F,_index:P,line:$,column:z,offset:B}}function y(F){i[F.line]=F.column,_()}function I(){let F;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<P.length;)A(P.charCodeAt(r._bufferIndex));else A(P)}}function A(F){h=h(F)}function O(F){Y(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,_()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=F}function L(F,P){const $=P||{};return $.type=F,$.start=b(),c.events.push(["enter",$,c]),u.push($),$}function U(F){const P=u.pop();return P.end=b(),c.events.push(["exit",P,c]),P}function j(F,P){q(F,P.from)}function w(F,P){P.restore()}function V(F,P){return $;function $(z,B,te){let le,xe,ie,x;return Array.isArray(z)?Ie(z):"tokenize"in z?Ie([z]):X(z);function X(me){return $t;function $t(tt){const Nt=tt!==null&&me[tt],It=tt!==null&&me.null,Dn=[...Array.isArray(Nt)?Nt:Nt?[Nt]:[],...Array.isArray(It)?It:It?[It]:[]];return Ie(Dn)(tt)}}function Ie(me){return le=me,xe=0,me.length===0?te:k(me[xe])}function k(me){return $t;function $t(tt){return x=Q(),ie=me,me.partial||(c.currentConstruct=me),me.name&&c.parser.constructs.disable.null.includes(me.name)?Me():me.tokenize.call(P?Object.assign(Object.create(c),P):c,o,Te,Me)(tt)}}function Te(me){return F(ie,x),B}function Me(me){return x.restore(),++xe<le.length?k(le[xe]):te}}}function q(F,P){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Pe(c.events,P,c.events.length-P,F.resolve(c.events.slice(P),c)),F.resolveTo&&(c.events=F.resolveTo(c.events,c))}function Q(){const F=b(),P=c.previous,$=c.currentConstruct,z=c.events.length,B=Array.from(u);return{from:z,restore:te};function te(){r=F,c.previous=P,c.currentConstruct=$,c.events.length=z,u=B,_()}}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function XE(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function ZE(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
42
+ `;break}case-3:{s=`\r
43
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function JE(e){const r={constructs:ho([QE,...(e||{}).extensions||[]]),content:i(wE),defined:[],document:i(OE),flow:i(PE),lazy:{},string:i(BE),text:i(FE)};return r;function i(a){return s;function s(u){return KE(r,a,u)}}}function eb(e){for(;!yo(e););return e}const ps=/[\0\t\n\r]/g;function tb(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(ps.lastIndex=d,c=ps.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(a.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const zo={}.hasOwnProperty;function nb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),rb(n)(eb(JE(n).document().write(tb()(e,t,!0))))}function rb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(oa),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(aa),blockQuote:a(It),characterEscape:Q,characterReference:Q,codeFenced:a(Dn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Dn,s),codeText:a(ql,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(Vl),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Wl),hardBreakEscape:a(sa),hardBreakTrailing:a(sa),htmlFlow:a(ua,s),htmlFlowData:Q,htmlText:a(ua,s),htmlTextData:Q,image:a(Gl),label:s,link:a(oa),listItem:a(Ql),listItemValue:f,listOrdered:a(la,d),listUnordered:a(la),paragraph:a(Kl),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(aa),strong:a(Xl),thematicBreak:a(Jl)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Nt,autolinkProtocol:tt,blockQuote:o(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:me,characterReference:$t,codeFenced:o(I),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:_,codeIndented:o(A),codeText:o(B),codeTextData:_,data:_,definition:o(),definitionDestinationString:U,definitionLabelString:O,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o($),htmlFlowData:_,htmlText:o(z),htmlTextData:_,image:o(le),label:ie,labelText:xe,lineEnding:F,link:o(te),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Te,resourceDestinationString:x,resourceTitleString:X,resource:Ie,setextHeading:o(q),setextHeadingLineSequence:V,setextHeadingText:w,strong:o(),thematicBreak:o()}};$o(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let H={type:"root",children:[]};const G={stack:[H],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},ee=[];let se=-1;for(;++se<R.length;)if(R[se][1].type==="listOrdered"||R[se][1].type==="listUnordered")if(R[se][0]==="enter")ee.push(se);else{const je=ee.pop();se=i(R,je,se)}for(se=-1;++se<R.length;){const je=t[R[se][0]];zo.call(je,R[se][1].type)&&je[R[se][1].type].call(Object.assign({sliceSerialize:R[se][2].sliceSerialize},G),R[se][1])}if(G.tokenStack.length>0){const je=G.tokenStack[G.tokenStack.length-1];(je[1]||ms).call(G,void 0,je[0])}for(H.position={start:nt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:nt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)H=t.transforms[se](H)||H;return H}function i(R,H,G){let ee=H-1,se=-1,je=!1,ht,Qe,Yt,qt;for(;++ee<=G;){const Oe=R[ee];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?se++:se--,qt=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ht&&!qt&&!se&&!Yt&&(Yt=ee),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!se&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||se===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ht){let St=ee;for(Qe=void 0;St--;){const Ke=R[St];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;Qe&&(R[Qe][1].type="lineEndingBlank",je=!0),Ke[1].type="lineEnding",Qe=St}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}Yt&&(!Qe||Yt<Qe)&&(ht._spread=!0),ht.end=Object.assign({},Qe?R[Qe][1].start:Oe[1].end),R.splice(Qe||ee,0,["exit",ht,Oe[2]]),ee++,G++}if(Oe[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ht=St,R.splice(ee,0,["enter",St,Oe[2]]),ee++,G++,Yt=void 0,qt=!0}}}return R[H][1]._spread=je,G}function a(R,H){return G;function G(ee){u.call(this,R(ee),ee),H&&H.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(R,H,G){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([H,G||void 0]),R.position={start:nt(H.start),end:void 0}}function o(R){return H;function H(G){R&&R.call(this,G),c.call(this,G)}}function c(R,H){const G=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==R.type&&(H?H.call(this,R,ee[0]):(ee[1]||ms).call(this,R,ee[0]));else throw new Error("Cannot close `"+R.type+"` ("+pn({start:R.start,end:R.end})+"): it’s not open");G.position.end=nt(R.end)}function h(){return Di(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(R){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function p(){const R=this.resume(),H=this.stack[this.stack.length-1];H.lang=R}function b(){const R=this.resume(),H=this.stack[this.stack.length-1];H.meta=R}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/(\r?\n|\r)$/g,"")}function O(R){const H=this.resume(),G=this.stack[this.stack.length-1];G.label=H,G.identifier=$e(this.sliceSerialize(R)).toLowerCase()}function L(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function U(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function j(R){const H=this.stack[this.stack.length-1];if(!H.depth){const G=this.sliceSerialize(R).length;H.depth=G}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function V(R){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(R){const G=this.stack[this.stack.length-1].children;let ee=G[G.length-1];(!ee||ee.type!=="text")&&(ee=Zl(),ee.position={start:nt(R.start),end:void 0},G.push(ee)),this.stack.push(ee)}function _(R){const H=this.stack.pop();H.value+=this.sliceSerialize(R),H.position.end=nt(R.end)}function F(R){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=H.children[H.children.length-1];G.position.end=nt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(Q.call(this,R),_.call(this,R))}function P(){this.data.atHardBreak=!0}function $(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function z(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function B(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function te(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function le(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function xe(R){const H=this.sliceSerialize(R),G=this.stack[this.stack.length-2];G.label=Rp(H),G.identifier=$e(H).toLowerCase()}function ie(){const R=this.stack[this.stack.length-1],H=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const ee=R.children;G.children=ee}else G.alt=H}function x(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function X(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function Ie(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Te(R){const H=this.resume(),G=this.stack[this.stack.length-1];G.label=H,G.identifier=$e(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function Me(R){this.data.characterReferenceType=R.type}function me(R){const H=this.sliceSerialize(R),G=this.data.characterReferenceType;let ee;G?(ee=co(H,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Mi(H);const se=this.stack[this.stack.length-1];se.value+=ee}function $t(R){const H=this.stack.pop();H.position.end=nt(R.end)}function tt(R){_.call(this,R);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(R)}function Nt(R){_.call(this,R);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(R)}function It(){return{type:"blockquote",children:[]}}function Dn(){return{type:"code",lang:null,meta:null,value:""}}function ql(){return{type:"inlineCode",value:""}}function Vl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Wl(){return{type:"emphasis",children:[]}}function aa(){return{type:"heading",depth:0,children:[]}}function sa(){return{type:"break"}}function ua(){return{type:"html",value:""}}function Gl(){return{type:"image",title:null,url:"",alt:null}}function oa(){return{type:"link",title:null,url:"",children:[]}}function la(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Ql(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Kl(){return{type:"paragraph",children:[]}}function Xl(){return{type:"strong",children:[]}}function Zl(){return{type:"text",value:""}}function Jl(){return{type:"thematicBreak"}}}function nt(e){return{line:e.line,column:e.column,offset:e.offset}}function $o(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$o(e,r):ib(e,r)}}function ib(e,t){let n;for(n in t)if(zo.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 ms(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is still open")}function ab(e){const t=this;t.parser=n;function n(r){return nb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function sb(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 ub(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
44
+ `}]}function ob(e,t){const n=t.value?t.value+`
45
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function lb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function db(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 fb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Yo(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function pb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yo(e,t);const i={src:zt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function mb(e,t){const n={src:zt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function gb(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 Eb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yo(e,t);const i={href:zt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bb(e,t){const n={href:zt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Tb(e,t,n){const r=e.all(t),i=n?xb(n):qo(t),a={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
46
+ `}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
47
+ `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function xb(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=qo(n[r])}return t}function qo(e){const t=e.spread;return t??e.children.length>1}function kb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function _b(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ab(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=We(t.children[1]),o=fr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Nb(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],f={},p=s?s[o]:void 0;p&&(f.align=p);let b={type:"element",tagName:a,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 Ib(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const gs=9,Es=32;function Sb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(bs(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(bs(t.slice(i),i>0,!1)),a.join("")}function bs(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===gs||a===Es;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===gs||a===Es;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function wb(e,t){const n={type:"text",value:Sb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ob={blockquote:sb,break:ub,code:ob,delete:lb,emphasis:cb,footnoteReference:hb,heading:db,html:fb,imageReference:pb,image:mb,inlineCode:gb,linkReference:Eb,link:bb,listItem:Tb,list:kb,paragraph:_b,root:Ab,strong:yb,table:Cb,tableCell:Ib,tableRow:Nb,text:wb,thematicBreak:Lb,toml:Bn,yaml:Bn,definition:Bn,footnoteDefinition:Bn};function Bn(){}function Rb(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 Db(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Pb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Rb,r=e.options.footnoteBackLabel||Db,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),f=zt(d.toLowerCase());let p=0;const b=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++p<=y;){b.length>0&&b.push({type:"text",value:" "});let O=typeof n=="string"?n:n(o,p);typeof O=="string"&&(O={type:"text",value:O}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const O=I.children[I.children.length-1];O&&O.type==="text"?O.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...b)}else h.push(...b);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(c,A),u.push(A)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...bt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
48
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
49
+ `}]}}const ri={}.hasOwnProperty,Mb={};function vb(e,t){const n=t||Mb,r=new Map,i=new Map,a=new Map,s={...Ob,...n.handlers},u={all:c,applyData:Fb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:Bb,wrap:Ub};return ut(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(ri.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:y,...I}=h,A=bt(I);return A.children=u.all(h),A}return bt(h)}return(u.options.unknownHandler||Hb)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const b=u.one(f[p],h);if(b){if(p&&f[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Ts(b.value)),!Array.isArray(b)&&b.type==="element")){const y=b.children[0];y&&y.type==="text"&&(y.value=Ts(y.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function Bb(e,t){e.position&&(t.position=Hu(e))}function Fb(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,bt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Hb(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 Ub(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
50
+ `});++r<e.length;)r&&n.push({type:"text",value:`
51
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
52
+ `}),n}function Ts(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xs(e,t){const n=vb(e,t),r=n.one(e,void 0),i=Pb(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
53
+ `},i),a}function jb(e,t){return e&&"run"in e?async function(n,r){const i=xs(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xs(n,{file:r,...e||t})}}function ks(e){if(e)throw e}var Pr,_s;function zb(){if(_s)return Pr;_s=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Pr=function o(){var c,h,d,f,p,b,y=arguments[0],I=1,A=arguments.length,O=!1;for(typeof y=="boolean"&&(O=y,y=arguments[1]||{},I=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});I<A;++I)if(c=arguments[I],c!=null)for(h in c)d=u(y,h),f=u(c,h),y!==f&&(O&&f&&(a(f)||(p=i(f)))?(p?(p=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(y,{name:h,newValue:o(O,b,f)})):typeof f<"u"&&s(y,{name:h,newValue:f}));return y},Pr}var $b=zb();const Mr=qs($b);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 Yb(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?qb(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function qb(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const qe={basename:Vb,dirname:Wb,extname:Gb,join:Qb,sep:"/"};function Vb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');On(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Wb(e){if(On(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Gb(e){On(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Qb(...e){let t=-1,n;for(;++t<e.length;)On(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Kb(n)}function Kb(e){On(e);const t=e.codePointAt(0)===47;let n=Xb(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Xb(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function On(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Zb={cwd:Jb};function Jb(){return"/"}function ai(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eT(e){if(typeof e=="string")e=new URL(e);else if(!ai(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tT(e)}function tT(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 nT{constructor(t){let n;t?ai(t)?n={path:t}:typeof t=="string"||rT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Zb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vr.length;){const a=vr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)vr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?qe.basename(this.path):void 0}set basename(t){Fr(t,"basename"),Br(t,"basename"),this.path=qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qe.dirname(this.path):void 0}set dirname(t){As(this.basename,"dirname"),this.path=qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qe.extname(this.path):void 0}set extname(t){if(Br(t,"extname"),As(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=qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ai(t)&&(t=eT(t)),Fr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qe.basename(this.path,this.extname):void 0}set stem(t){Fr(t,"stem"),Br(t,"stem"),this.path=qe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Br(e,t){if(e&&e.includes(qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qe.sep+"`")}function Fr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function As(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function rT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),aT={}.hasOwnProperty;class zi extends iT{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=Yb()}copy(){const t=new zi;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):aT.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=Fn(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(a,s){const u=Fn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,b=r.stringify(p,f);oT(b)?f.value=b:f.result=b,c(h,f)});function c(h,d){h||!d?s(h):a?a(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),Cs("processSync","process",n),r;function i(a,s){n=!0,ks(a),r=s}}run(t,n,r){ys(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Fn(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Cs("runSync","run",r),i;function a(s,u){ks(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Fn(n),i=this.compiler||this.Compiler;return Ur("stringify",i),ys(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):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=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];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...b]=h;const y=r[f][1];ii(y)&&ii(p)&&(p=Mr(!0,y,p)),r[f]=[c,p,...b]}}}}const sT=new zi().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 ys(e){if(!ii(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Cs(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fn(e){return uT(e)?e:new nT(e)}function uT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oT(e){return typeof e=="string"||lT(e)}function lT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function $i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ct=$i();function Vo(e){Ct=e}var mn={exec:()=>null};function re(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ne.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var cT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ne={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")},hT=/^(?:[ \t]*(?:\n|$))+/,dT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yi=/(?:[*+-]|\d{1,9}[.)])/,Wo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Go=re(Wo).replace(/bull/g,Yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),mT=re(Wo).replace(/bull/g,Yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gT=/^[^\n]+/,Vi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ET=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bT=re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yi).getRegex(),Er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,TT=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Wi).replace("tag",Er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qo=re(qi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Er).getRegex(),xT=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qo).getRegex(),Gi={blockquote:xT,code:dT,def:ET,fences:fT,heading:pT,hr:Rn,html:TT,lheading:Go,list:bT,newline:hT,paragraph:Qo,table:mn,text:gT},Ns=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Er).getRegex(),kT={...Gi,lheading:mT,table:Ns,paragraph:re(qi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ns).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",Er).getRegex()},_T={...Gi,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(qi).replace("hr",Rn).replace("heading",` *#{1,6} *[^
54
+ ]`).replace("lheading",Go).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},AT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ko=/^( {2,}|\\)\n(?!\s*$)/,CT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,br=/[\p{P}\p{S}]/u,Qi=/[\s\p{P}\p{S}]/u,Xo=/[^\s\p{P}\p{S}]/u,NT=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qi).getRegex(),Zo=/(?!~)[\p{P}\p{S}]/u,IT=/(?!~)[\s\p{P}\p{S}]/u,ST=/(?:[^\s\p{P}\p{S}]|~)/u,wT=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",cT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Jo=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,LT=re(Jo,"u").replace(/punct/g,br).getRegex(),OT=re(Jo,"u").replace(/punct/g,Zo).getRegex(),el="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",RT=re(el,"gu").replace(/notPunctSpace/g,Xo).replace(/punctSpace/g,Qi).replace(/punct/g,br).getRegex(),DT=re(el,"gu").replace(/notPunctSpace/g,ST).replace(/punctSpace/g,IT).replace(/punct/g,Zo).getRegex(),PT=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xo).replace(/punctSpace/g,Qi).replace(/punct/g,br).getRegex(),MT=re(/\\(punct)/,"gu").replace(/punct/g,br).getRegex(),vT=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),BT=re(Wi).replace("(?:-->|$)","-->").getRegex(),FT=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",BT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,HT=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tl=re(/^!?\[(label)\]\[(ref)\]/).replace("label",Jn).replace("ref",Vi).getRegex(),nl=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vi).getRegex(),UT=re("reflink|nolink(?!\\()","g").replace("reflink",tl).replace("nolink",nl).getRegex(),Is=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ki={_backpedal:mn,anyPunctuation:MT,autolink:vT,blockSkip:wT,br:Ko,code:yT,del:mn,emStrongLDelim:LT,emStrongRDelimAst:RT,emStrongRDelimUnd:PT,escape:AT,link:HT,nolink:nl,punctuation:NT,reflink:tl,reflinkSearch:UT,tag:FT,text:CT,url:mn},jT={...Ki,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",Jn).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Jn).getRegex()},si={...Ki,emStrongRDelimAst:DT,emStrongLDelim:OT,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Is).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Is).getRegex()},zT={...si,br:re(Ko).replace("{2,}","*").getRegex(),text:re(si.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hn={normal:Gi,gfm:kT,pedantic:_T},en={normal:Ki,gfm:si,breaks:zT,pedantic:jT},$T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ss=e=>$T[e];function Xe(e,t){if(t){if(Ne.escapeTest.test(e))return e.replace(Ne.escapeReplace,Ss)}else if(Ne.escapeTestNoEncode.test(e))return e.replace(Ne.escapeReplaceNoEncode,Ss);return e}function ws(e){try{e=encodeURI(e).replace(Ne.percentDecode,"%")}catch{return null}return e}function Ls(e,t){let n=e.replace(Ne.findPipe,(a,s,u)=>{let o=!1,c=s;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(Ne.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(Ne.slashPipe,"|");return r}function tn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function YT(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 Os(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function qT(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
55
+ `).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
56
+ `)}var er=class{options;rules;lexer;constructor(e){this.options=e||Ct}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:tn(n,`
57
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=qT(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=tn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:tn(t[0],`
58
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=tn(t[0],`
59
+ `).split(`
60
+ `),r="",i="",a=[];for(;n.length>0;){let s=!1,u=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),s=!0;else if(!s)u.push(n[o]);else break;n=n.slice(o);let c=u.join(`
61
+ `),h=c.replace(this.rules.other.blockquoteSetextReplace,`
62
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
63
+ ${c}`:c,i=i?`${i}
64
+ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=d,n.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,b=p.raw+`
65
+ `+n.join(`
66
+ `),y=this.blockquote(b);a[a.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,i=i.substring(0,i.length-p.text.length)+y.text;break}else if(f?.type==="list"){let p=f,b=p.raw+`
67
+ `+n.join(`
68
+ `),y=this.list(b);a[a.length-1]=y,r=r.substring(0,r.length-f.raw.length)+y.raw,i=i.substring(0,i.length-p.raw.length)+y.raw,n=b.substring(a.at(-1).raw.length).split(`
69
+ `);continue}}return{type:"blockquote",raw:r,tokens:a,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 a=this.rules.other.listItemRegex(n),s=!1;for(;e;){let o=!1,c="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let d=t[2].split(`
70
+ `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),f=e.split(`
71
+ `,1)[0],p=!d.trim(),b=0;if(this.options.pedantic?(b=2,h=d.trimStart()):p?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),p&&this.rules.other.blankLine.test(f)&&(c+=f+`
72
+ `,e=e.substring(f.length+1),o=!0),!o){let y=this.rules.other.nextBulletRegex(b),I=this.rules.other.hrRegex(b),A=this.rules.other.fencesBeginRegex(b),O=this.rules.other.headingBeginRegex(b),L=this.rules.other.htmlBeginRegex(b);for(;e;){let U=e.split(`
73
+ `,1)[0],j;if(f=U,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),j=f):j=f.replace(this.rules.other.tabCharGlobal," "),A.test(f)||O.test(f)||L.test(f)||y.test(f)||I.test(f))break;if(j.search(this.rules.other.nonSpaceChar)>=b||!f.trim())h+=`
74
+ `+j.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(d)||O.test(d)||I.test(d))break;h+=`
75
+ `+f}!p&&!f.trim()&&(p=!0),c+=U+`
76
+ `,e=e.substring(U.length+1),d=j.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=c}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(o.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};o.checked=h.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!i.loose){let c=o.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}}if(i.loose)for(let o of i.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Ls(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
77
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Ls(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
78
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=tn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=YT(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Os(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Os(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},He=class ui{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ct,this.options.tokenizer=this.options.tokenizer||new er,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:Ne,block:Hn.normal,inline:en.normal};this.options.pedantic?(n.block=Hn.pedantic,n.inline=en.pedantic):this.options.gfm&&(n.block=Hn.gfm,this.options.breaks?n.inline=en.breaks:n.inline=en.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hn,inline:en}}static lex(t,n){return new ui(n).lex(t)}static lexInline(t,n){return new ui(n).inlineTokens(t)}lex(t){t=t.replace(Ne.carriageReturn,`
79
+ `),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(Ne.tabCharGlobal," ").replace(Ne.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
80
+ `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
81
+ `)?"":`
82
+ `)+i.raw,s.text+=`
83
+ `+i.text,this.inlineQueue.at(-1).src=s.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 s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
84
+ `)?"":`
85
+ `)+i.raw,s.text+=`
86
+ `+i.raw,this.inlineQueue.at(-1).src=s.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 a=t;if(this.options.extensions?.startBlock){let s=1/0,u=t.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},u),typeof o=="number"&&o>=0&&(s=Math.min(s,o))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=n.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
87
+ `)?"":`
88
+ `)+i.raw,s.text+=`
89
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),r=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
90
+ `)?"":`
91
+ `)+i.raw,s.text+=`
92
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}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 a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,u="";for(;t;){s||(u=""),s=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,u)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),s=!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}},tr=class{options;parser;constructor(e){this.options=e||Ct}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Ne.notSpaceStart)?.[0],i=e.replace(Ne.endingNewline,"")+`
93
+ `;return r?'<pre><code class="language-'+Xe(r)+'">'+(n?i:Xe(i,!0))+`</code></pre>
94
+ `:"<pre><code>"+(n?i:Xe(i,!0))+`</code></pre>
95
+ `}blockquote({tokens:e}){return`<blockquote>
96
+ ${this.parser.parse(e)}</blockquote>
97
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
98
+ `}hr(e){return`<hr>
99
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let u=e.items[s];r+=this.listitem(u)}let i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
100
+ `+r+"</"+i+`>
101
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
102
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
103
+ `}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 a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
104
+ <thead>
105
+ `+t+`</thead>
106
+ `+r+`</table>
107
+ `}tablerow({text:e}){return`<tr>
108
+ ${e}</tr>
109
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
110
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ws(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Xe(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ws(e);if(i===null)return Xe(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Xe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},Xi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ze=class oi{options;renderer;textRenderer;constructor(t){this.options=t||Ct,this.options.renderer=this.options.renderer||new tr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xi}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 s=i,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=u||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},an=class{options;block;constructor(e){this.options=e||Ct}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?He.lex:He.lexInline}provideParser(){return this.block?ze.parse:ze.parseInline}},VT=class{defaults=$i();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ze;Renderer=tr;TextRenderer=Xi;Lexer=He;Tokenizer=er;Hooks=an;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)r=r.concat(this.walkTokens(s.tokens,n));for(let s of a.rows)for(let u of s)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let u=a[s].flat(1/0);r=r.concat(this.walkTokens(u,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new tr(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let u=s,o=r.renderer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new er(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,o=r.tokenizer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new an;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let u=s,o=r.hooks[u],c=a[u];an.passThroughHooks.has(s)?a[u]=h=>{if(this.defaults.async&&an.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await o.call(a,h);return c.call(a,f)})();let d=o.call(a,h);return c.call(a,d)}:a[u]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return He.lex(t,n??this.defaults)}parser(t,n){return ze.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?He.lex:He.lexInline)(u,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?ze.parse:ze.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?He.lex:He.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?ze.parse:ze.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
111
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Xe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},kt=new VT;function ae(e,t){return kt.parse(e,t)}ae.options=ae.setOptions=function(e){return kt.setOptions(e),ae.defaults=kt.defaults,Vo(ae.defaults),ae};ae.getDefaults=$i;ae.defaults=Ct;ae.use=function(...e){return kt.use(...e),ae.defaults=kt.defaults,Vo(ae.defaults),ae};ae.walkTokens=function(e,t){return kt.walkTokens(e,t)};ae.parseInline=kt.parseInline;ae.Parser=ze;ae.parser=ze.parse;ae.Renderer=tr;ae.TextRenderer=Xi;ae.Lexer=He;ae.lexer=He.lex;ae.Tokenizer=er;ae.Hooks=an;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;ze.parse;He.lex;var WT=300,GT="300px",QT=500;function KT(e={}){let{immediate:t=!1,debounceDelay:n=WT,rootMargin:r=GT,idleTimeout:i=QT}=e,[a,s]=N.useState(!1),u=N.useRef(null),o=N.useRef(null),c=N.useRef(null),h=N.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=N.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):h,[h]),f=N.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return N.useEffect(()=>{if(t){s(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},y=L=>{c.current=d(U=>{U.timeRemaining()>0||U.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},I=L=>{b(),o.current=window.setTimeout(()=>{var U,j;let w=L.takeRecords();(w.length===0||(j=(U=w.at(-1))==null?void 0:U.isIntersecting)!=null&&j)&&y(L)},n)},A=(L,U)=>{L.isIntersecting?I(U):b()},O=new IntersectionObserver(L=>{for(let U of L)A(U,O)},{rootMargin:r,threshold:0});return O.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),O.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:u}}var rl=/\s/,XT=/^\s+$/,ZT=new Set(["code","pre","svg","math","annotation"]),JT=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",e2=e=>e.some(t=>JT(t)&&ZT.has(t.tagName)),t2=e=>{let t=[],n="",r=!1;for(let i of e){let a=rl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},n2=e=>{let t=[],n="";for(let r of e)rl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},r2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),i2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(e2(t))return Vn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?n2(s):t2(s)).map(o=>XT.test(o)?{type:"text",value:o}:r2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function li(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{xi(s,"text",(u,o)=>i2(u,o,a))}}}li();var Zi=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ji=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Tr=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),a2=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),s2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),u2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),il=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Rs=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),o2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),l2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),W=(...e)=>nc(rc(e)),Mt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},c2=N.createContext({code:""}),al=()=>N.useContext(c2),Ds=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=N.useState(!1),c=N.useRef(0),{code:h}=al(),{isAnimating:d}=N.useContext(Ue),f=a??h,p=async()=>{var y;if(typeof window>"u"||!((y=navigator?.clipboard)!=null&&y.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)}};N.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?Zi:Ji;return g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(b,{size:14})})},Ps={"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"},h2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=al(),{isAnimating:o}=N.useContext(Ue),c=a??u,h=`file.${n&&n in Ps?Ps[n]:"txt"}`,d="text/plain",f=()=>{try{Mt(h,c,d),e?.()}catch(p){t?.(p)}};return g.jsx("button",{className:W("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",...s,children:r??g.jsx(Tr,{size:14})})},Ms=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(a2,{className:"size-4 animate-spin"})})]}),d2=/\.[^/.]+$/,f2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,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(d2,"")}.${f}`}Mt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:W("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:W("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:g.jsx(Tr,{size:14})})]}):null},gn=0,p2=()=>{gn+=1,gn===1&&(document.body.style.overflow="hidden")},m2=()=>{gn=Math.max(0,gn-1),gn===0&&(document.body.style.overflow="")},g2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=N.useState(!1),s=N.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=N.useCallback(()=>{r(),n()},[r,n]);return N.useEffect(()=>{if(t){p2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),m2()}}},[t,n]),t?g.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:g.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:[g.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:g.jsx(il,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Rs,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:W("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Zi,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ji,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.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:[g.jsx(Rs,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},ci=N.createContext(null),sl=()=>N.useContext(ci),Fx=()=>{var e;let t=sl();return(e=t?.code)!=null?e:null},ea=()=>{var e;let t=sl();return(e=t?.mermaid)!=null?e:null},E2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},b2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=N.useState(!1),o=N.useRef(null),{isAnimating:c}=N.useContext(Ue),h=ea(),d=async f=>{try{if(f==="mmd"){Mt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),b=e.split("").reduce((A,O)=>(A<<5)-A+O.charCodeAt(0)|0,0),y=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:I}=await p.render(y,e);if(!I){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Mt("diagram.svg",I,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let A=await E2(I);Mt("diagram.png",A,"image/png"),r?.(f),u(!1);return}}catch(p){a?.(p)}};return N.useEffect(()=>{let f=p=>{let b=p.composedPath();o.current&&!b.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),g.jsxs("div",{className:"relative",ref:o,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??g.jsx(Tr,{size:14})}),s?g.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:[g.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"}),g.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"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},En=0,T2=()=>{En+=1,En===1&&(document.body.style.overflow="hidden")},x2=()=>{En=Math.max(0,En-1),En===0&&(document.body.style.overflow="")},k2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=N.useState(!1),{isAnimating:o,controls:c}=N.useContext(Ue),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(!s)};return N.useEffect(()=>{if(s){T2();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),x2()}}},[s]),N.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:g.jsx(s2,{size:14})}),s?g.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:[g.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:g.jsx(il,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:g.jsx(Ml,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},ul=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},ol=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
112
+ `)&&(o=!0)}return o?c?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let u of n)a[s]=u.map(r).join(","),s+=1;return a.join(`
113
+ `)},_2=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
114
+ `||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
115
+ `?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
116
+ `)},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("")},A2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>zr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?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(`
117
+ `)},y2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=N.useState(!1),[u,o]=N.useState(!1),c=N.useRef(null),h=N.useRef(0),{isAnimating:d}=N.useContext(Ue),f=async b=>{var y,I;if(typeof window>"u"||!((y=navigator?.clipboard)!=null&&y.write)){r?.(new Error("Clipboard API not available"));return}try{let A=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),O=A?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=ul(O),U=b==="csv"?ol(L):_2(L),j=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(A){r?.(A)}};N.useEffect(()=>{let b=y=>{let I=y.composedPath();c.current&&!I.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?Zi:Ji;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.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:[g.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"}),g.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]})},C2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=N.useState(!1),s=N.useRef(null),{isAnimating:u}=N.useContext(Ue),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=ul(f),b=c==="csv"?ol(p):A2(p);Mt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return N.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(Tr,{size:14})}),i?g.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:[g.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"}),g.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]})},N2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(y2,{}),g.jsx(C2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:W("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),I2=N.lazy(()=>Vs(()=>import("./code-block-OCS4YCEC-CGgYYS4A.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.CodeBlock}))),S2=N.lazy(()=>Vs(()=>Promise.resolve().then(()=>Cx),void 0).then(e=>({default:e.Mermaid}))),w2=/language-([^\s]+)/;function xr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function fe(e,t){return e.className===t.className&&xr(e.node,t.node)}var hi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ta=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:W("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>fe(e,t));ta.displayName="MarkdownOl";var ll=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:W("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&xr(e.node,t.node));ll.displayName="MarkdownLi";var cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:W("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>fe(e,t));cl.displayName="MarkdownUl";var hl=N.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:W("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>fe(e,t));hl.displayName="MarkdownHr";var dl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:W("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>fe(e,t));dl.displayName="MarkdownStrong";var L2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=N.useContext(Ue),[s,u]=N.useState(!1),o=n==="streamdown:incomplete-link",c=N.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=N.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=N.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(g2,{...f})]}):g.jsx("a",{className:W("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},fl=N.memo(L2,(e,t)=>fe(e,t)&&e.href===t.href);fl.displayName="MarkdownA";var pl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:W("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>fe(e,t));pl.displayName="MarkdownH1";var ml=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:W("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>fe(e,t));ml.displayName="MarkdownH2";var gl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:W("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>fe(e,t));gl.displayName="MarkdownH3";var El=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:W("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>fe(e,t));El.displayName="MarkdownH4";var bl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:W("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>fe(e,t));bl.displayName="MarkdownH5";var Tl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:W("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>fe(e,t));Tl.displayName="MarkdownH6";var xl=N.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=N.useContext(Ue),a=hi(i,"table");return g.jsx(N2,{className:t,showControls:a,...r,children:e})},(e,t)=>fe(e,t));xl.displayName="MarkdownTable";var kl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:W("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>fe(e,t));kl.displayName="MarkdownThead";var _l=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:W("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>fe(e,t));_l.displayName="MarkdownTbody";var Al=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:W("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>fe(e,t));Al.displayName="MarkdownTr";var yl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:W("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>fe(e,t));yl.displayName="MarkdownTh";var Cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:W("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>fe(e,t));Cl.displayName="MarkdownTd";var Nl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:W("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>fe(e,t));Nl.displayName="MarkdownBlockquote";var Il=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:W("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>fe(e,t));Il.displayName="MarkdownSup";var Sl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:W("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>fe(e,t));Sl.displayName="MarkdownSub";var wl=N.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!N.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(N.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(N.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!N.isValidElement(s))return s;if(s.type===ta){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>fe(e,t));wl.displayName="MarkdownSection";var O2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=N.useContext(Ue),o=ea();if(a)return g.jsx("code",{className:W("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(w2),h=(i=c?.at(1))!=null?i:"",d="";if(N.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=hi(u,"mermaid"),b=Un(u,"download"),y=Un(u,"copy"),I=Un(u,"fullscreen"),A=Un(u,"panZoom"),O=p&&(b||y||I);return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsxs("div",{className:W("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[O?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(b2,{chart:d,config:s?.config}):null,y?g.jsx(Ds,{code:d}):null,I?g.jsx(k2,{chart:d,config:s?.config}):null]}):null,g.jsx(S2,{chart:d,config:s?.config,showControls:A})]})})}let f=hi(u,"code");return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsx(I2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(h2,{code:d,language:h}),g.jsx(Ds,{})]}):null})})},Ll=N.memo(O2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ll.displayName="MarkdownCode";var Ol=N.memo(f2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ol.displayName="MarkdownImg";var Rl=N.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&N.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>fe(e,t));Rl.displayName="MarkdownParagraph";var R2={ol:ta,li:ll,ul:cl,hr:hl,strong:dl,a:fl,h1:pl,h2:ml,h3:gl,h4:El,h5:bl,h6:Tl,table:xl,thead:kl,tbody:_l,tr:Al,th:yl,td:Cl,blockquote:Nl,code:Ll,img:Ol,pre:({children:e})=>N.isValidElement(e)?N.cloneElement(e,{"data-block":"true"}):e,sup:Il,sub:Sl,p:Rl,section:wl},D2=()=>e=>{ut(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},vs=[],Bs={allowDangerousHtml:!0},jn=new WeakMap,P2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,y]=p;if(typeof b=="function"){let I=jn.get(b);I||(I=b.name,jn.set(b,I)),d+=I}else d+=String(b);d+=":",d+=JSON.stringify(y)}else if(typeof p=="function"){let b=jn.get(p);b||(b=p.name,jn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Fs=new P2,Dl=e=>{let t=M2(e),n=e.children||"";return z2(t.runSync(t.parse(n),n),e)},M2=e=>{let t=Fs.get(e);if(t)return t;let n=B2(e);return Fs.set(e,n),n},v2=e=>e.some(t=>Array.isArray(t)?t[0]===Zr:t===Zr),B2=e=>{let t=e.rehypePlugins||vs,n=e.remarkPlugins||vs,r=v2(t)?n:[...n,D2],i=e.remarkRehypeOptions?{...Bs,...e.remarkRehypeOptions}:Bs;return sT().use(ab).use(r).use(jb,i).use(t)},F2=e=>e,H2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},U2=(e,t)=>{var n;for(let r in Dr)if(Object.hasOwn(Dr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Dr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},j2=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},z2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||F2;ut(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return H2(d,h,a,c.value),h;if(c.type==="element"&&(U2(c,o),j2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return fE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},$2=/\[\^[\w-]{1,200}\](?!:)/,Y2=/\[\^[\w-]{1,200}\]:/,q2=/<\/(\w+)>/,V2=/<(\w+)[\s>]/,W2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),G2=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},Q2=e=>{let t=$2.test(e),n=Y2.test(e);if(t||n)return[e];let r=He.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(q2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(V2);if(h){let d=h[1];o.includes(`</${d}>`)||W2.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(G2(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},Hs,Us,qn={...dn,protocols:{...dn.protocols,href:[...(Us=(Hs=dn.protocols)==null?void 0:Hs.href)!=null?Us:[],"tel"]}},di={raw:Zr,sanitize:[Wu,qn],harden:[Nc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},K2={gfm:[$1,{}]},js=Object.values(di),X2=Object.values(K2),Z2={block:" ▋",circle:" ●"},J2={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Ue=N.createContext(J2),Pl=N.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(Dl,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Pl.displayName="Block";var ex=["github-light","github-dark"],na=N.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=js,remarkPlugins:a=X2,className:s,shikiTheme:u=ex,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=Pl,parseMarkdownIntoBlocksFn:p=Q2,caret:b,plugins:y,remend:I,linkSafety:A={enabled:!0},allowedTags:O,...L})=>{let U=N.useId(),[j,w]=N.useTransition(),V=N.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?Xg(e,I):e,[e,t,n,I]),q=N.useMemo(()=>p(V),[V,p]),[Q,_]=N.useState(q);N.useEffect(()=>{t==="streaming"?w(()=>{_(q)}):_(q)},[q,t]);let F=t==="streaming"?Q:q,P=N.useMemo(()=>F.map((ie,x)=>`${U}-${x}`),[F.length,U]),$=N.useMemo(()=>d?d===!0?li():li(d):null,[d]),z=N.useMemo(()=>{var ie,x;return{shikiTheme:(x=(ie=y?.code)==null?void 0:ie.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:A}},[u,c,h,t,o,A,y?.code]),B=N.useMemo(()=>({...R2,...r}),[r]),te=N.useMemo(()=>{let ie=[];return y!=null&&y.cjk&&(ie=[...ie,...y.cjk.remarkPluginsBefore]),ie=[...ie,...a],y!=null&&y.cjk&&(ie=[...ie,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(ie=[...ie,y.math.remarkPlugin]),ie},[a,y?.math,y?.cjk]),le=N.useMemo(()=>{var ie;let x=i;if(O&&Object.keys(O).length>0&&i===js){let X={...qn,tagNames:[...(ie=qn.tagNames)!=null?ie:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};x=[di.raw,[Wu,X],di.harden]}return y!=null&&y.math&&(x=[...x,y.math.rehypePlugin]),$&&h&&(x=[...x,$.rehypePlugin]),x},[i,y?.math,$,h,O]),xe=N.useMemo(()=>b&&h?{"--streamdown-caret":`"${Z2[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(ci.Provider,{value:y??null,children:g.jsx(Ue.Provider,{value:z,children:g.jsx("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(Dl,{components:B,rehypePlugins:le,remarkPlugins:te,...L,children:e})})})}):g.jsx(ci.Provider,{value:y??null,children:g.jsx(Ue.Provider,{value:z,children:g.jsxs("div",{className:W("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,s),style:xe,children:[F.length===0&&b&&h&&g.jsx("span",{}),F.map((ie,x)=>g.jsx(f,{components:B,content:ie,index:x,rehypePlugins:le,remarkPlugins:te,shouldParseIncompleteMarkdown:n,...L},P[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);na.displayName="Streamdown";var tx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=N.useRef(null),c=N.useRef(null),[h,d]=N.useState(s),[f,p]=N.useState({x:0,y:0}),[b,y]=N.useState(!1),[I,A]=N.useState({x:0,y:0}),[O,L]=N.useState({x:0,y:0}),U=N.useCallback(P=>{d($=>Math.max(n,Math.min(r,$+P)))},[n,r]),j=N.useCallback(()=>{U(i)},[U,i]),w=N.useCallback(()=>{U(-i)},[U,i]),V=N.useCallback(()=>{d(s),p({x:0,y:0})},[s]),q=N.useCallback(P=>{P.preventDefault();let $=P.deltaY>0?-i:i;U($)},[U,i]),Q=N.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;y(!0),A({x:P.clientX,y:P.clientY}),L(f);let $=P.currentTarget;$ instanceof HTMLElement&&$.setPointerCapture(P.pointerId)},[f]),_=N.useCallback(P=>{if(!b)return;P.preventDefault();let $=P.clientX-I.x,z=P.clientY-I.y;p({x:O.x+$,y:O.y+z})},[b,I,O]),F=N.useCallback(P=>{y(!1);let $=P.currentTarget;$ instanceof HTMLElement&&$.releasePointerCapture(P.pointerId)},[]);return N.useEffect(()=>{let P=o.current;if(P)return P.addEventListener("wheel",q,{passive:!1}),()=>{P.removeEventListener("wheel",q)}},[q]),N.useEffect(()=>{let P=c.current;if(P&&b)return document.body.style.userSelect="none",P.addEventListener("pointermove",_,{passive:!1}),P.addEventListener("pointerup",F),P.addEventListener("pointercancel",F),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",_),P.removeEventListener("pointerup",F),P.removeEventListener("pointercancel",F)}},[b,_,F]),g.jsxs("div",{className:W("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:W("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:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(o2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(l2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:g.jsx(u2,{size:16})})]}):null,g.jsx("div",{className:W("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:Q,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Ml=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=N.useState(null),[u,o]=N.useState(!1),[c,h]=N.useState(""),[d,f]=N.useState(""),[p,b]=N.useState(0),{mermaid:y}=N.useContext(Ue),I=ea(),A=y?.errorComponent,{shouldRender:O,containerRef:L}=KT({immediate:r});if(N.useEffect(()=>{if(O){if(!I){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=I.getMermaid(n),w=e.split("").reduce((Q,_)=>(Q<<5)-Q+_.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await j.render(V,e);h(q),f(q)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,I]),!(O||c||d))return g.jsx("div",{className:W("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:W("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return A?g.jsx("div",{ref:L,children:g.jsx(A,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:W("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let U=c||d;return g.jsx("div",{className:W("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(tx,{className:W(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:W("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:U},role:"img"})})})};function zs(e){return e.replace(/\s*[✓✗]$/,"").replace(/\s*\(.*\)$/,"").trim()}function nx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type===de.Tool&&r.title){const i=zs(r.title),a=[r];let s=n+1;for(;s<e.length;){const u=e[s];if(u.type===de.Tool&&u.title&&zs(u.title)===i)a.push(u),s++;else break}if(a.length>=2)t.push({kind:"group",label:i,logs:a,key:a[0].id});else for(const u of a)t.push({kind:"single",log:u,key:u.id});n=s}else t.push({kind:"single",log:r,key:r.id}),n++}return t}const rx="/api";function ix(e){if(!ec())return e;const t=tc();if(!t)return e;const n=e.includes("?")?"&":"?";return`${e}${n}token=${encodeURIComponent(t)}`}const ax=e=>e.includes("data/attachments/")||e.includes("data\\attachments\\")?ix(`${rx}/attachments/by-path?path=${encodeURIComponent(e)}`):e,sx=({src:e,alt:t,...n})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...n,className:"max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 transition-opacity"})}),ux={img:sx},vl=N.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.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:g.jsx(na,{urlTransform:ax,components:ux,children:e})})}));vl.displayName="UserMessage";const Bl=N.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=N.useState(t),i=N.useRef(null),[a,s]=N.useState(0);N.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=N.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
118
+ `)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.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:[g.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:g.jsx(ir,{size:11,strokeWidth:2})}),g.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&g.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),g.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:g.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:g.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});Bl.displayName="ThinkingBlock";const fi=N.memo(({title:e,content:t,type:n})=>{const[r,i]=N.useState(!1);if(n===de.Action)return g.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[g.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),g.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
119
+ `)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(Ti,{size:10}):g.jsx(ir,{size:10})})]}),r&&t&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});fi.displayName="ToolBlock";const Fl=N.memo(({label:e,logs:t})=>{const[n,r]=N.useState(!1),i=t.map(u=>{const o=u.content.split(`
120
+ `)[0]||"",c=o.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return c?c[1]:o.slice(0,40)}),a=t.filter(u=>u.title?.endsWith("✓")).length,s=t.filter(u=>u.title?.endsWith("✗")).length;return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.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:g.jsx(ir,{size:11,strokeWidth:2,className:"text-neutral-400"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e}),g.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none shrink-0 tabular-nums",children:t.length}),a>0&&g.jsxs("span",{className:"text-emerald-400 text-[10px]",children:[a,"✓"]}),s>0&&g.jsxs("span",{className:"text-red-400 text-[10px]",children:[s,"✗"]}),!n&&g.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[i.slice(0,3).join(", "),t.length>3?" …":""]})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:t.map(u=>{const o=u.content.split(`
121
+ `)[0]||"";return g.jsx(Hl,{log:u,firstLine:o},u.id)})})]})});Fl.displayName="ToolGroup";const Hl=N.memo(({log:e,firstLine:t})=>{const[n,r]=N.useState(!1),i=e.content.includes(`
122
+ `),a=e.title?.endsWith("✓"),s=e.title?.endsWith("✗");return g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>i&&r(!n),className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?g.jsx(Ti,{size:10}):g.jsx(ir,{size:10})})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Hl.displayName="ToolGroupItem";const Ul=N.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-800 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-6 mb-1":"text-sm leading-7 mb-2"}`,children:e}));Ul.displayName="AgentText";const jl=N.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-800 min-w-0 ${t?"text-[13px] leading-6 mb-1":"text-sm leading-7 mb-2"}`,children:g.jsx(na,{children:e})}));jl.displayName="AssistantMessage";function ox(e,t){if(e.kind==="group")return g.jsx(Fl,{label:e.label,logs:e.logs});const n=e.log;if(!n.content&&n.type!==de.Cursor)return null;if(n.title==="Thinking"||n.content.startsWith("Thinking:"))return g.jsx(Bl,{content:n.content,isOpenDefault:!0});switch(n.type){case de.User:return g.jsx(vl,{content:n.content,compact:t});case de.Tool:return g.jsx(fi,{type:n.type,title:n.title||"Tool",content:n.content});case de.Action:return g.jsx(fi,{type:n.type,title:"Action",content:n.content});case de.Assistant:return g.jsx(jl,{content:n.content,compact:t});case de.Info:return n.tokenUsage?null:g.jsx(Ul,{content:n.content,compact:t});case de.Cursor:return g.jsx("div",{className:"h-4 w-1.5 bg-neutral-400 animate-pulse rounded-sm mt-1 inline-block align-middle"});default:return null}}const Hx=N.forwardRef(function({logs:t,scrollElementRef:n},r){const i=N.useMemo(()=>nx(t),[t]);return N.useImperativeHandle(r,()=>({scrollToBottom:(a="instant")=>{n.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:a})}}),[n]),g.jsx("div",{className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:i.map(a=>g.jsx("div",{children:ox(a)},a.key))})}),$s="agent-tower-todo-panel-open";function lx(e,t){const n=t?"h-3 w-3":"h-3.5 w-3.5",r=(e||"").toLowerCase();return r==="completed"?g.jsx(sc,{"aria-hidden":!0,className:`${n} text-emerald-500`}):r==="in_progress"||r==="in-progress"?g.jsx(cc,{"aria-hidden":!0,className:`${n} text-blue-500`}):r==="cancelled"?g.jsx(ca,{"aria-hidden":!0,className:`${n} text-neutral-300`}):g.jsx(ca,{"aria-hidden":!0,className:`${n} text-neutral-400`})}function Ux({todos:e,compact:t}){const[n,r]=N.useState(()=>{if(t)return!1;const s=localStorage.getItem($s);return s===null?!0:s==="true"});if(N.useEffect(()=>{localStorage.setItem($s,String(n))},[n]),!e||e.length===0)return null;const i=e.filter(s=>s.status?.toLowerCase()==="completed").length,a=e.length>0?i/e.length*100:0;return g.jsxs("details",{className:"group",open:n,onToggle:s=>r(s.target.open),children:[g.jsx("summary",{className:"list-none cursor-pointer select-none [&::-webkit-details-marker]:hidden",children:g.jsxs("div",{className:`bg-neutral-50/80 border border-neutral-100 rounded-lg flex items-center justify-between hover:bg-neutral-100/80 transition-colors ${t?"px-3 py-1.5":"px-3 py-2"}`,children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx("span",{className:"text-neutral-500 font-medium text-xs",children:"待办"}),g.jsxs("span",{className:"text-neutral-400 tabular-nums text-xs",children:[i,"/",e.length]}),g.jsx("div",{className:"w-12 h-1 bg-neutral-200/60 rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-300",style:{width:`${a}%`}})})]}),g.jsx(Ti,{"aria-hidden":!0,className:`text-neutral-400 transition-transform group-open:rotate-180 ${t?"h-3 w-3":"h-3.5 w-3.5"}`})]})}),g.jsx("div",{className:`pt-1.5 pb-0.5 ${t?"max-h-28 overflow-y-auto px-1":"px-1"}`,children:g.jsx("ul",{className:"space-y-px",role:"list","aria-label":"Agent todo list",children:e.map((s,u)=>{const o=s.status?.toLowerCase()==="cancelled",c=s.status?.toLowerCase()==="completed";return g.jsxs("li",{className:`flex items-center gap-1.5 rounded-md px-2 ${t?"py-0.5":"py-[3px]"} ${c?"opacity-60":""}`,children:[g.jsx("span",{className:`flex items-center justify-center shrink-0 ${t?"h-3 w-3":"h-3.5 w-3.5"}`,children:lx(s.status,t)}),g.jsx("span",{className:`${t?"text-[11px] leading-[14px]":"text-xs leading-4"} text-neutral-600 wrap-break-word truncate ${o?"line-through text-neutral-400":""} ${c?"text-neutral-400":""}`,children:s.content})]},`${s.content}-${u}`)})})})]})}var cx=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),hx=Object.prototype.hasOwnProperty;function pi(e,t){return hx.call(e,t)}function mi(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)pi(e,i)&&r.push(i);return r}function De(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function gi(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function pt(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function zl(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ei(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(Ei(e[t]))return!0}else if(typeof e=="object"){for(var r=mi(e),i=r.length,a=0;a<i;a++)if(Ei(e[r[a]]))return!0}}return!1}function Ys(e,t){var n=[e];for(var r in t){var i=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof i<"u"&&n.push(r+": "+i)}return n.join(`
123
+ `)}var $l=(function(e){cx(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,Ys(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=Ys(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),he=$l,dx=De,Dt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=nr(n,this.path);r&&(r=De(r));var i=Et(n,{op:"remove",path:this.from}).removed;return Et(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=nr(n,this.from);return Et(n,{op:"add",path:this.path,value:De(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:yn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},fx={add:function(e,t,n){return gi(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Dt.move,copy:Dt.copy,test:Dt.test,_get:Dt._get};function nr(e,t){if(t=="")return e;var n={op:"_get",path:t};return Et(e,n),n.value}function Et(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):rr(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=nr(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=yn(e,t.value),s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=De(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,b=void 0;for(typeof n=="function"?b=n:b=rr;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=zl(p)),i&&(p=="__proto__"||p=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&b(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!gi(p))throw new he("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);gi(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new he("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=fx[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Dt[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new he("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function An(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=De(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=Et(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function px(e,t,n){var r=Et(e,t);if(r.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function rr(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new he("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Dt[e.op]){if(typeof e.path!="string")throw new he("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new he('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new he("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Ei(e.value))throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new he("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new he("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=Yl([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new he("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function Yl(e,t,n){try{if(!Array.isArray(e))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)An(De(t),De(e),n||!0);else{n=n||rr;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof he)return i;throw i}}function yn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!yn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!yn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const mx=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:he,_areEquals:yn,applyOperation:Et,applyPatch:An,applyReducer:px,deepClone:dx,getValueByPointer:nr,validate:Yl,validator:rr},Symbol.toStringTag,{value:"Module"}));var ra=new WeakMap,gx=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),Ex=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function bx(e){return ra.get(e)}function Tx(e,t){return e.observers.get(t)}function xx(e,t){e.observers.delete(t.callback)}function kx(e,t){t.unobserve()}function _x(e,t){var n=[],r,i=bx(e);if(!i)i=new gx(e),ra.set(e,i);else{var a=Tx(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=De(e),t){r.callback=t,r.next=null;var s=function(){bi(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){bi(r),clearTimeout(r.next),xx(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new Ex(t,r)),r}function bi(e,t){t===void 0&&(t=!1);var n=ra.get(e.object);ia(n.value,e.object,e.patches,"",t),e.patches.length&&An(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ia(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=mi(t),s=mi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(pi(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?ia(h,d,n,r+"/"+pt(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"replace",path:r+"/"+pt(c),value:De(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+pt(c),value:De(h)}),n.push({op:"remove",path:r+"/"+pt(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!pi(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:De(t[c])})}}}function Ax(e,t,n){n===void 0&&(n=!1);var r=[];return ia(e,t,r,"",n),r}const yx=Object.freeze(Object.defineProperty({__proto__:null,compare:Ax,generate:bi,observe:_x,unobserve:kx},Symbol.toStringTag,{value:"Module"}));Object.assign({},mx,yx,{JsonPatchError:$l,deepClone:De,escapePathComponent:pt,unescapePathComponent:zl});const $r=!0;function jx(e){const{sessionId:t,onAgentSessionId:n,onExit:r,onError:i}=e,[a,s]=N.useState(()=>Vt.isConnected()),[u,o]=N.useState(!1),[c,h]=N.useState(!1),[d,f]=N.useState({entries:[]}),[p,b]=N.useState(null),[y,I]=N.useState(!1),A=N.useRef(!1),O=N.useRef([]),L=N.useRef({onAgentSessionId:n,onExit:r,onError:i});L.current={onAgentSessionId:n,onExit:r,onError:i},N.useEffect(()=>{if(!t)return;const _=Vt.getSocket();s(_.connected);const F=()=>s(!0),P=()=>{s(!1),o(!1),A.current=!1,O.current=[]};let $=0;const z=(X,Ie)=>{const k=Date.now(),Te=X.entries.length;try{const Me=An(X,Ie,!0,!1),me=Me.newDocument.entries.length;return $r&&console.log(`[useNormalizedLogs:applyPatch] t=${Date.now()} applyTime=${Date.now()-k}ms entries=${Te}->${me} delta=${me-Te}`),Me.newDocument}catch(Me){return console.error("Failed to apply patch:",Me,Ie),X}},B=X=>{if(X.sessionId!==t)return;$++;const Ie=Date.now();{const k=X.patch.map(Te=>`${Te.op}:${Te.path}`).join(", ");console.log(`[useNormalizedLogs:handlePatch] t=${Ie} #${$} sessionId=${t} ops=${X.patch.length} snapshotLoaded=${A.current} [${k}]`)}if(!A.current){O.current.push(X);return}f(k=>z(k,X.patch)),I(!0)},te=X=>{X.sessionId===t&&(console.log(`[useNormalizedLogs:handleSessionId] t=${Date.now()} agentSessionId=${X.agentSessionId}`),b(X.agentSessionId),L.current.onAgentSessionId?.(X.agentSessionId))},le=X=>{X.sessionId===t&&(o(!1),I(!1),L.current.onExit?.(X.exitCode))},xe=X=>{X.sessionId===t&&L.current.onError?.(X.message)},ie=X=>{X.sessionId===t&&o(!0)},x=X=>{X.sessionId===t&&o(!1)};return _.on("connect",F),_.on("disconnect",P),_.on(ve.SESSION_PATCH,B),_.on(ve.SESSION_ID,te),_.on(ve.SESSION_EXIT,le),_.on(ve.SESSION_ERROR,xe),_.on(ve.SESSION_SUBSCRIBED,ie),_.on(ve.SESSION_UNSUBSCRIBED,x),s(_.connected),()=>{_.off("connect",F),_.off("disconnect",P),_.off(ve.SESSION_PATCH,B),_.off(ve.SESSION_ID,te),_.off(ve.SESSION_EXIT,le),_.off(ve.SESSION_ERROR,xe),_.off(ve.SESSION_SUBSCRIBED,ie),_.off(ve.SESSION_UNSUBSCRIBED,x),A.current=!1,O.current=[],f({entries:[]}),b(null),I(!1),_.emit(Wt.UNSUBSCRIBE,{topic:"session",id:t})}},[t]);const U=N.useCallback(async()=>{if(t){console.log(`[useNormalizedLogs:loadSnapshot] t=${Date.now()} sessionId=${t} start`),h(!0);try{const _=await ic.get(`/sessions/${t}/logs`,{cache:"no-store"});$r&&console.log(`[useNormalizedLogs:loadSnapshot] t=${Date.now()} sessionId=${t} entries=${_.entries.length}`);const F=O.current;O.current=[],A.current=!0,f(()=>{let P=_;for(const $ of F){const z=Date.now();try{const B=An(P,$.patch,!0,!1);$r&&console.log(`[useNormalizedLogs:loadSnapshot] replay buffered patch, applyTime=${Date.now()-z}ms entries=${B.newDocument.entries.length}`),P=B.newDocument}catch(B){console.error("Failed to replay buffered patch:",B)}}return P}),_.entries.length>0&&I(!0)}catch(_){console.error("[useNormalizedLogs:loadSnapshot] Failed to load snapshot:",_),A.current=!0,O.current=[]}finally{h(!1)}}},[t]),j=N.useCallback(()=>new Promise(_=>{const F=Vt.getSocket();if(console.log(`[useNormalizedLogs:attach] t=${Date.now()} sessionId=${t} connected=${F.connected} snapshotLoaded=${A.current}`),!F.connected){_(!1);return}if(A.current){console.log("[useNormalizedLogs:attach] skipping loadSnapshot — already have live state"),F.emit(Wt.SUBSCRIBE,{topic:"session",id:t},$=>{_($.success)});return}const P=Date.now();F.emit(Wt.SUBSCRIBE,{topic:"session",id:t},$=>{console.log(`[useNormalizedLogs:attach] t=${Date.now()} ack received, roundtrip=${Date.now()-P}ms success=${$.success}`),U(),_($.success)})}),[t,U]),w=N.useCallback(()=>{Vt.getSocket().emit(Wt.UNSUBSCRIBE,{topic:"session",id:t})},[t]),V=N.useCallback(_=>{Vt.getSocket().emit(Wt.INPUT,{sessionId:t,data:_})},[t]),q=N.useCallback(()=>{f({entries:[]}),b(null),I(!1),A.current=!1,O.current=[]},[]),Q=N.useMemo(()=>{const _=bc(d.entries);return y&&u&&_.push(Tc()),_},[d.entries,y,u]);return{isConnected:a,isAttached:u,isLoadingSnapshot:c,logs:Q,entries:d.entries,agentSessionId:p,attach:j,detach:w,sendInput:V,clearLogs:q}}function zx(e){return N.useMemo(()=>{let t=[],n=0;for(const i of e)if(i.entryType==="tool_use"&&i.metadata?.action==="todo_management"&&i.metadata.todos&&i.metadata.todos.length>0){const a=i.metadata.todos;a.every(u=>u.content&&u.content.trim().length>0&&u.status)&&i.timestamp>=n&&(t=a,n=i.timestamp)}const r=t.find(i=>{const a=i.status?.toLowerCase();return a==="in_progress"||a==="in-progress"})??null;return{todos:t,inProgressTodo:r}},[e])}const Cx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Ml},Symbol.toStringTag,{value:"Module"}));export{ir as C,Sx as G,c2 as I,Ue as L,wx as P,Lx as S,Ux as T,Fx as Z,zx as a,Dx as b,Mx as c,Px as d,Ti as e,Hx as f,W as g,Ox as h,Rx as i,vx as j,sc as k,jx as u};